:root {
  color-scheme: light;
  --ink: #18261f;
  --muted: #5d665c;
  --cream: #f8f3e7;
  --paper: #fffdf8;
  --green: #1b7a4f;
  --green-dark: #176943;
  --green-soft: #e4f2e6;
  --coral: #ed7259;
  --yellow: #f3bf49;
  --line: #e9e3d6;
  --shadow: 0 16px 44px rgba(47, 54, 37, .09);
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--cream); color: var(--ink); font-family: system-ui, -apple-system, "Segoe UI", sans-serif; min-height: 100vh; }
button, input { font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
#app { min-height: 100vh; display: flex; flex-direction: column; }
.topbar { height: 76px; padding: 0 clamp(20px, 5vw, 72px); display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid rgba(24,38,31,.07); }
.brand { display: flex; align-items: center; gap: 10px; font: 700 26px system-ui, sans-serif; letter-spacing: -1.5px; }
.brand-mark { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 12px; color: white; background: var(--green); font: 700 25px "Space Grotesk", sans-serif; transform: rotate(-7deg); }
.brand-period { color: var(--coral); }
.topbar-right { display: flex; gap: 16px; align-items: center; }
.mode-pill { white-space: nowrap; text-transform: uppercase; border: 1px solid #dfd8c8; color: #4f574c; padding: 8px 11px; border-radius: 30px; font-size: 10px; font-weight: 800; letter-spacing: .9px; }
.mode-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--yellow); margin-right: 6px; }
.avatar-button { width: 44px; height: 44px; flex: none; border: 0; border-radius: 50%; background: #dff0de; color: var(--green-dark); font-weight: 800; }
#screen { width: 100%; max-width: 1180px; margin: 0 auto; padding: 42px 28px 64px; flex: 1; outline: 0; }
.site-footer { padding: 18px clamp(20px, 5vw, 72px); display: flex; justify-content: space-between; color: #9b9b8e; font-size: 9px; letter-spacing: 1.2px; font-weight: 800; }
.eyebrow { display: flex; gap: 8px; align-items: center; color: var(--green); text-transform: uppercase; letter-spacing: 1.5px; font-weight: 800; font-size: 11px; }
.eyebrow:before { content: ""; width: 20px; height: 2px; background: var(--coral); }
h1,h2,h3,p { margin-top: 0; }
h1,h2,h3 { font-family: system-ui, -apple-system, "Segoe UI", sans-serif; letter-spacing: -1.5px; }
h1 { font-size: clamp(38px, 6vw, 68px); line-height: 1.02; margin: 18px 0; }
h2 { font-size: clamp(28px, 4vw, 42px); margin: 10px 0 12px; }
h3 { letter-spacing: -.6px; }
.muted { color: var(--muted); line-height: 1.65; }
.display-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 40px; align-items: center; min-height: 540px; }
.hero-copy { max-width: 520px; }
.hero-copy h1 em { font-style: normal; color: var(--green); position: relative; }
.hero-copy h1 em:after { content: ""; position: absolute; left: 0; bottom: -3px; height: 8px; width: 100%; background: #f7d86f; z-index: -1; border-radius: 8px; transform: rotate(-2deg); }
.hero-copy .muted { font-size: 16px; max-width: 420px; }
.competition-welcome { min-height:540px; display:grid; grid-template-columns:1fr .9fr; gap:clamp(36px,7vw,100px); align-items:center; }
.welcome-copy { max-width:560px; }
.welcome-copy h1 { max-width:540px; }
.welcome-copy .muted { max-width:480px; font-size:16px; }
.welcome-types { display:grid; gap:14px; }
.welcome-games { display:grid; gap:10px; }
.welcome-game { display:grid; grid-template-columns:auto minmax(0,1fr) auto; gap:14px; align-items:center; width:100%; padding:14px 16px; border:1px solid var(--line); border-radius:16px; background:var(--paper); box-shadow:var(--shadow); color:var(--ink); font:inherit; text-align:left; cursor:pointer; transition:transform .15s, border-color .15s; }
@media (hover:hover) { .welcome-game:hover { transform:translateY(-2px); border-color:var(--green); } }
.welcome-game:focus-visible { border-color:var(--green); }
.welcome-game:focus:not(:focus-visible) { outline:none; }
.welcome-game.is-soon { cursor:default; box-shadow:none; border-style:dashed; opacity:.7; }
.welcome-game-text { display:grid; gap:1px; min-width:0; }
.welcome-game-text small { color:var(--green-dark); font-size:11px; font-weight:800; letter-spacing:.1em; text-transform:uppercase; }
.welcome-game-text small b { color:#c4492f; }
.welcome-game-text strong { font-size:18px; line-height:1.25; }
.welcome-game-text > span { color:var(--muted); font-size:14px; }
.welcome-game-go { color:var(--muted); font-size:26px; line-height:1; }
.welcome-actions { align-items:center; }
.welcome-signin { margin:0; color:var(--muted); font-size:15px; }
.welcome-copy .lobby-pulse { margin-top:14px; }
.welcome-type { display:grid; grid-template-columns:auto 1fr; gap:18px; align-items:start; padding:24px; border:1px solid var(--line); border-radius:20px; background:var(--paper); box-shadow:var(--shadow); }
.welcome-type-ready { border-color:#c8dfcc; }
.type-mark,.competition-icon { width:48px; height:48px; display:grid; place-items:center; border-radius:15px; background:#e4f2e6; font-size:23px; }
.welcome-type h2 { margin:7px 0; font-size:22px; }
.welcome-type p { margin:0; color:var(--muted); font-size:13px; line-height:1.55; }
.type-status { color:var(--green-dark); font-size:9px; font-weight:800; letter-spacing:1px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.btn { border: 0; border-radius: 13px; padding: 14px 20px; font-weight: 800; transition: transform .16s, box-shadow .16s, background .16s; }
.btn:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 8px 18px rgba(31,135,88,.18); }
.btn:focus-visible, button:focus-visible, input:focus-visible { outline: 3px solid rgba(31,135,88,.34); outline-offset: 3px; }
.btn-primary { background: var(--green); color: white; }
.btn-primary:hover:not(:disabled) { background: var(--green-dark); }
.btn-secondary { background: #f2ead7; color: var(--ink); }
.btn-quiet { color: var(--green-dark); background: transparent; padding-left: 4px; padding-right: 4px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.info-note { margin-top: 22px; color: #787b6e; font-size: 12px; }
.hero-art { position: relative; display: grid; place-items: center; min-height: 450px; }
.art-sun { position: absolute; width: min(390px, 80vw); aspect-ratio: 1; border-radius: 50%; background: #f3c44e; opacity: .2; }
.hero-board { width: min(390px, 88%); aspect-ratio: 1; border: 12px solid var(--paper); border-radius: 50%; background: var(--green); box-shadow: var(--shadow); position: relative; transform: rotate(-9deg); display: grid; place-items: center; }
.hero-board:before { content:""; position:absolute; inset: 17%; border: 4px dashed rgba(255,255,255,.5); border-radius: 50%; }
.hero-piece { position:absolute; width:54px; height:54px; border:8px solid white; border-radius:50%; box-shadow:0 8px 18px #124f3840; }
.hero-piece.one { top: 11%; left: 16%; background: var(--coral); }
.hero-piece.two { bottom: 13%; right: 13%; background: #f4c249; }
.hero-die { width: 104px; height: 104px; background: white; display:grid; place-items:center; border-radius:24px; box-shadow:0 12px 26px #144f3650; transform:rotate(9deg); }
.die-dots { width: 61px; height: 61px; display:grid; grid-template-columns: repeat(3,1fr); grid-template-rows:repeat(3,1fr); }
.die-dot { width: 11px; height: 11px; border-radius:50%; background:var(--green-dark); align-self:center; justify-self:center; }
.die-dot.pip-empty { visibility:hidden; }
.floating-label { position:absolute; top: 12%; right: 0; background:white; padding:12px 16px; border-radius:14px; box-shadow:var(--shadow); font-size:12px; font-weight:800; transform:rotate(5deg); }
.float-star { position:absolute; color:var(--coral); font-size:34px; top:25%; left:2%; }
.content-card { background:var(--paper); border:1px solid rgba(24,38,31,.07); border-radius:24px; box-shadow:var(--shadow); }
.form-layout { max-width: 920px; margin: 20px auto; display:grid; grid-template-columns: .9fr 1.1fr; overflow:hidden; }
.form-aside { background:var(--green); color:white; padding:44px 36px; position:relative; overflow:hidden; }
.form-aside:after { content:""; position:absolute; width:260px; height:260px; right:-100px; bottom:-100px; border:1px solid #ffffff40; border-radius:50%; box-shadow:0 0 0 25px #ffffff10, 0 0 0 50px #ffffff0a; }
.form-aside .brand { color:white; margin-bottom:62px; }
.form-aside .brand-mark { background:var(--yellow); color:var(--green-dark); }
.form-aside p { color:#d9eddf; line-height:1.7; }
.form-body { padding:44px 42px; }
.form-body h2 { font-size:32px; margin-bottom:8px; }
.form-body form { margin-top:28px; }
.field { display:flex; flex-direction:column; gap:7px; margin:16px 0; }
.field label { font-size:12px; font-weight:800; }
.field input { width:100%; border:1px solid var(--line); background:#fffefa; border-radius:11px; padding:13px 14px; color:var(--ink); }
.field small { color:var(--muted); font-size:11px; line-height:1.5; }
.form-error { color:#b84735; font-size:12px; min-height:18px; }
.form-foot { margin-top:16px; font-size:12px; color:var(--muted); }
.lobby-head { display:flex; align-items:flex-end; justify-content:space-between; margin-bottom:28px; gap:20px; }
.game-feature { display:grid; grid-template-columns:1.1fr .9fr; overflow:hidden; margin-top:24px; }
.game-feature-copy { padding:38px; }
.game-feature-art { min-height:310px; background:#e5f2dd; display:grid; place-items:center; position:relative; overflow:hidden; }
.game-feature-art:before { content:""; width:250px; height:250px; border-radius:50%; background:#f5ca59; position:absolute; opacity:.7; }
.game-chip { z-index:1; padding:10px 16px; border-radius:30px; background:var(--green); color:white; font-weight:800; font-size:12px; position:absolute; top:24px; left:24px; }
.mini-board { z-index:1; width:190px; aspect-ratio:1; background:white; border:10px solid white; border-radius:24px; transform:rotate(-7deg); box-shadow:0 18px 40px #39683c30; display:grid; grid-template:repeat(3,1fr)/repeat(3,1fr); overflow:hidden; }
.mini-cell { margin:4px; border-radius:8px; background:#f3f0e6; }
.mini-cell:nth-child(2),.mini-cell:nth-child(4) { background:var(--coral); }
.mini-cell:nth-child(6),.mini-cell:nth-child(8) { background:var(--green); }
.mini-cell:nth-child(5) { background:var(--yellow); }
.section-title { margin:38px 0 18px; }
.tier-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:14px; }
.tier-card { padding:20px; border:1px solid var(--line); border-radius:18px; background:#fffdf8; text-align:left; transition:.18s; }
.tier-card:hover { border-color:var(--green); transform:translateY(-3px); }
.tier-card strong { display:block; font:700 24px "Space Grotesk",sans-serif; margin:8px 0; }
.tier-card small { color:var(--muted); }
.tier-card span { color:var(--green-dark); font-size:11px; font-weight:800; }
.competition-home-head { display:flex; align-items:flex-end; justify-content:space-between; gap:20px; margin-bottom:30px; }
.competition-home-head h1 { margin:10px 0; font-size:clamp(34px,5vw,52px); }
.competition-home-head .muted { margin:0; }
.mode-notice { flex:none; padding:11px 14px; border:1px solid #e6d9a8; border-radius:14px; background:#fff8df; color:#655b3f; font-size:10px; font-weight:800; letter-spacing:.4px; }
.competition-grid { display:grid; grid-template-columns:1fr 1fr; gap:20px; align-items:stretch; }
.competition-card { padding:clamp(22px,3vw,34px); border:1px solid var(--line); border-radius:22px; background:var(--paper); box-shadow:var(--shadow); }
.ludo-card { border-top:4px solid var(--green); }
.sports-competition-card { border-top:4px solid #e2bd53; }
.competition-card-head { display:flex; align-items:center; justify-content:space-between; margin-bottom:24px; }
.availability { padding:8px 10px; border-radius:30px; font-size:9px; font-weight:800; letter-spacing:.5px; }
.availability.available { background:#e4f2e6; color:var(--green-dark); }
.availability.experimental { background:#fff3cb; color:#775c12; }
.competition-card h2 { margin:8px 0; font-size:30px; }
.competition-card > .muted { min-height:64px; }
.how-it-works { display:grid; gap:6px; margin:20px 0; padding:15px; border-radius:13px; background:#f6f3eb; font-size:12px; line-height:1.5; }
.how-it-works span { color:var(--muted); }
.competition-card .section-title { margin:24px 0 12px; }
.competition-card .section-title p { margin:5px 0 0; font-size:12px; }
.competition-card .tier-grid { grid-template-columns:repeat(4,minmax(0,1fr)); gap:9px; }
.competition-card .tier-card { padding:13px 10px; }
.competition-card .tier-card strong { font-size:19px; }
.competition-card .tier-card small { font-size:9px; }
.competition-card .tier-card span { display:block; margin-top:10px; }
.sports-competition-card > .btn { margin-top:4px; }
.competition-footnote { margin:18px 0 0; color:var(--muted); font-size:11px; line-height:1.6; }
.sports-signin-prompt { display:flex; align-items:center; justify-content:space-between; gap:20px; }
.sports-signin-prompt h3 { margin:8px 0; }
.sports-signin-prompt .muted { margin:0; }
.queue-card { max-width:600px; margin:50px auto; padding:36px; text-align:center; }
.queue-orbit { width:82px; height:82px; border:3px solid #e6eee2; border-top-color:var(--green); border-radius:50%; margin:0 auto 24px; animation:orbit 1.5s linear infinite; display:grid; place-items:center; }
.queue-orbit span { animation:orbit-reverse 1.5s linear infinite; font-size:26px; }
@keyframes orbit { to { transform:rotate(360deg); } }
@keyframes orbit-reverse { to { transform:rotate(-360deg); } }
.matchup { display:flex; align-items:center; justify-content:center; gap:20px; margin:24px 0; }
.player-badge { width:70px; height:70px; border-radius:22px; background:#f9dfd5; display:grid; place-items:center; color:#9e4836; font-weight:800; font-size:20px; }
.player-badge.opponent { background:#e5f0d7; color:var(--green-dark); }
.vs { font-size:11px; font-weight:800; color:var(--muted); }
.game-layout { max-width:1040px; margin:0 auto; }
.game-topline { display:flex; align-items:center; justify-content:space-between; margin-bottom:16px; }
.game-topline h2 { font-size:30px; margin:5px 0; }
.game-status { border-radius:30px; padding:9px 14px; background:#e4f2e6; font-weight:800; font-size:12px; color:var(--green-dark); }
.game-turn-meta { display:flex; align-items:center; gap:10px; }
.turn-timer { min-width:92px; border-radius:30px; padding:9px 12px; background:#f2ead7; color:#5e5541; font-size:12px; font-weight:800; text-align:center; font-variant-numeric:tabular-nums; }
.turn-timer.warning { background:#fbe2d8; color:#a8422f; }
.table-card { padding:clamp(12px, 3vw, 30px); }
.board-wrap { width:min(100%,680px); margin:0 auto; position:relative; isolation:isolate; }
#ludoBoard { width:100%; display:block; border-radius:24px; background:#f8f1df; box-shadow:inset 0 0 0 1px #e7ddc8; }
.board-cell { stroke:#e4dccb; stroke-width:.7; }
.token { stroke:white; stroke-width:2; filter:drop-shadow(0 3px 2px #293a2d50); transition:cx .12s cubic-bezier(.2,.8,.2,1), cy .12s cubic-bezier(.2,.8,.2,1); cursor:pointer; }
.token.selectable { stroke:#19271f; stroke-width:4; animation:tokenPulse 1.4s ease-in-out infinite; }
@keyframes tokenPulse { 50% { filter:drop-shadow(0 0 7px #fff); } }
.board-dice { position:absolute; z-index:2; left:50%; top:50%; transform:translate(-50%,-50%); display:flex; align-items:center; gap:clamp(12px,2vw,22px); perspective:900px; perspective-origin:center; transform-style:preserve-3d; }
.board-dice:before { content:""; position:absolute; z-index:-1; left:50%; top:58%; width:150%; height:90%; border:1px solid #ffffffa8; border-radius:50%; background:radial-gradient(ellipse,#fff9 0%,#d1e8d04a 48%,transparent 72%); box-shadow:0 0 28px #ffffff90; transform:translate(-50%,-50%) rotateX(66deg); pointer-events:none; }
.game-die { --die-depth:clamp(16.2px,3.33vw,23.4px); position:relative; flex:none; width:calc(var(--die-depth)*2); height:calc(var(--die-depth)*2); padding:0; border:0; border-radius:10.8px; display:block; background:transparent; color:var(--green-dark); transform-style:preserve-3d; cursor:default; -webkit-tap-highlight-color:transparent; }
.game-die:before { content:""; position:absolute; z-index:-1; left:12%; right:12%; bottom:-20%; height:23%; border-radius:50%; background:#16271c6b; filter:blur(7px); transform:translateZ(-8px); transition:opacity .2s,transform .2s; }
.game-die.available { cursor:pointer; }
.game-die.available:hover { transform:translateY(-3px) scale(1.03); }
.game-die.available:hover:before { opacity:.68; transform:translateY(3px) scale(.86); }
.game-die.selected { outline:3px solid #1f8758; outline-offset:7px; border-radius:14px; }
.game-die:disabled { opacity:1; }
.die-cube { position:absolute; inset:0; display:block; transform:var(--die-result); transform-style:preserve-3d; }
.die-side { position:absolute; inset:0; display:grid; place-items:center; overflow:hidden; border:1px solid #e8e7df; border-radius:10.8px; background:linear-gradient(145deg,#fff 0%,#fdfcf8 48%,#e9e7df 100%); box-shadow:inset 0 2px 3px #ffffff,inset 0 -3px 5px #b5b4ac52,0 1px 2px #fff8; backface-visibility:hidden; }
.die-side:after { content:""; position:absolute; inset:0; border-radius:inherit; background:linear-gradient(135deg,#fff8,transparent 42%,#9a9b8c15); pointer-events:none; }
.die-front { transform:translateZ(var(--die-depth)); }
.die-back { transform:rotateY(180deg) translateZ(var(--die-depth)); }
.die-right { transform:rotateY(90deg) translateZ(var(--die-depth)); }
.die-left { transform:rotateY(-90deg) translateZ(var(--die-depth)); }
.die-top { transform:rotateX(90deg) translateZ(var(--die-depth)); background:linear-gradient(145deg,#fff 0%,#f4f3ec 100%); }
.die-bottom { transform:rotateX(-90deg) translateZ(var(--die-depth)); background:linear-gradient(145deg,#f3f1e8,#deddd5); }
.die-pips { width:100%; height:100%; padding:20%; display:grid; grid-template:repeat(3,1fr)/repeat(3,1fr); }
.die-dot { width:clamp(4.5px,1.125vw,8.1px); height:clamp(4.5px,1.125vw,8.1px); border-radius:50%; align-self:center; justify-self:center; background:radial-gradient(circle at 32% 28%,#438765 0%,#176943 53%,#0e5134 100%); box-shadow:inset 0 1px 1px #c5f1d2,0 1px 2px #113d2c88; }
.die-dot.pip-empty { visibility:hidden; }
.board-dice.rolling .game-die:first-child { animation:die-flight-left .825s cubic-bezier(.15,.72,.2,1) both; }
.board-dice.rolling .game-die:last-child { animation:die-flight-right .825s cubic-bezier(.15,.72,.2,1) .03s both; }
.board-dice.rolling .die-cube { animation:dice-tumble-left .825s cubic-bezier(.12,.72,.2,1) both; }
.board-dice.rolling .game-die:last-child .die-cube { animation-name:dice-tumble-right; animation-delay:.03s; }
@keyframes die-flight-left {
  0% { transform:translate3d(0,0,0) scale(.82) rotateZ(0); }
  18% { transform:translate3d(-25px,-34px,40px) scale(1.24) rotateZ(-22deg); }
  42% { transform:translate3d(-58px,-12px,28px) scale(1.16) rotateZ(20deg); }
  67% { transform:translate3d(-23px,16px,12px) scale(1.06) rotateZ(-13deg); }
  86% { transform:translate3d(4px,-4px,0) scale(1.02) rotateZ(4deg); }
  94%,100% { transform:translate3d(0,0,0) scale(1); }
}
@keyframes die-flight-right {
  0% { transform:translate3d(0,0,0) scale(.82) rotateZ(0); }
  17% { transform:translate3d(25px,-29px,38px) scale(1.22) rotateZ(24deg); }
  43% { transform:translate3d(58px,-9px,28px) scale(1.16) rotateZ(-19deg); }
  69% { transform:translate3d(22px,18px,12px) scale(1.06) rotateZ(14deg); }
  86% { transform:translate3d(-4px,-4px,0) scale(1.02) rotateZ(-4deg); }
  94%,100% { transform:translate3d(0,0,0) scale(1); }
}
@keyframes dice-tumble-left {
  0% { transform:var(--die-result); }
  72% { transform:rotateX(760deg) rotateY(1000deg) rotateZ(285deg); }
  88% { transform:rotateX(720deg) rotateY(1080deg) rotateZ(360deg); }
  95%,100% { transform:var(--die-result); }
}
@keyframes dice-tumble-right {
  0% { transform:var(--die-result); }
  68% { transform:rotateX(-720deg) rotateY(-1000deg) rotateZ(-300deg); }
  87% { transform:rotateX(-720deg) rotateY(-1080deg) rotateZ(-360deg); }
  95%,100% { transform:var(--die-result); }
}
.game-controls { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,.9fr); gap:22px; align-items:center; max-width:680px; margin:24px auto 0; padding:17px 20px; background:#f7f3e9; border:1px solid var(--line); border-radius:19px; }
.turn-info { min-width:0; }
.turn-info > strong { display:block; margin-top:4px; font-size:14px; }
.turn-info .eyebrow { font-size:10px; }
.player-color-list { display:flex; flex-wrap:wrap; gap:7px; margin-top:8px; }
.player-color { display:inline-flex; align-items:center; gap:5px; padding:4px 8px; border-radius:20px; background:#fffdf8; color:#5d655b; font-size:10px; font-weight:800; text-transform:capitalize; }
.player-color i { width:8px; height:8px; display:block; border-radius:50%; background:var(--token-color); box-shadow:0 1px 2px #1a251b40; }
.game-hint { margin:11px 0 0; color:#536256; font-size:12px; font-weight:700; line-height:1.5; }
.game-message { text-align:left; min-height:22px; margin:5px 0 0; font-size:13px; color:var(--muted); }
.player-scoreboard { display:grid; gap:8px; }
.player-score { padding:10px 12px; border:1px solid transparent; border-radius:13px; background:#fffdf8; }
.player-score.active { border-color:#c4dfca; box-shadow:inset 3px 0 #1f8758; }
.player-score-name { display:flex; justify-content:space-between; gap:8px; align-items:center; }
.player-score-name strong { font-size:11px; overflow:hidden; text-overflow:ellipsis; }
.player-score-name > span,.player-score small { color:var(--muted); font-size:10px; white-space:nowrap; }
.player-score .player-color-list { margin-top:6px; gap:5px; }
.player-score .player-color { font-size:9px; padding:3px 6px; }
.player-score small { display:block; margin-top:5px; }
.game-bottom { max-width:720px; margin:14px auto 0; display:flex; flex-wrap:wrap; justify-content:space-between; align-items:center; gap:12px; }
.rules-link { font-size:12px; font-weight:700; color:var(--green-dark); border:0; background:transparent; }
.stake-label { font-size:11px; color:var(--muted); text-align:right; }
.modal-backdrop { position:fixed; inset:0; background:#101a15a8; z-index:20; display:grid; place-items:center; padding:20px; }
.modal { width:min(100%,480px); padding:30px; background:var(--paper); border-radius:22px; box-shadow:var(--shadow); }
.modal h2 { font-size:29px; }
.modal ul { color:var(--muted); line-height:1.8; padding-left:20px; }
.result-card { max-width:650px; margin:30px auto; text-align:center; padding:40px; }
.result-confetti { font-size:44px; letter-spacing:8px; }
.result-card h1 { font-size:48px; }
.result-reason { max-width:46ch; margin:0 auto; }
.result-money { display:grid; gap:4px; justify-items:center; max-width:380px; margin:22px auto; padding:18px; border-radius:18px; background:#f5f0e4; }
.result-money strong { font:800 clamp(30px,8vw,40px)/1.1 "Space Grotesk", system-ui, sans-serif; font-variant-numeric:tabular-nums; }
.result-money.is-up strong { color:#157a46; }
.result-money.is-down strong { color:var(--ink); }
.result-balance { font-size:14px; color:var(--muted); }
.result-balance b { color:var(--ink); }
.result-money small { color:var(--muted); font-size:13px; line-height:1.5; }
.result-actions { display:grid; gap:10px; max-width:380px; margin:0 auto; }
.result-actions .btn { width:100%; min-height:52px; font-size:16px; }
.result-links { display:flex; flex-wrap:wrap; justify-content:center; gap:4px 18px; margin-top:16px; }
.result-links .link-button { min-height:44px; font-size:14px; }
.result-confetti .gi { width:56px; height:56px; margin:0 auto; }
[data-theme="dark"] .result-money { background:#1b241e; }
[data-theme="dark"] .result-money.is-up strong { color:#6fd1a2; }
.result-status { display:grid; gap:7px; max-width:380px; margin:24px auto; padding:18px; border:1px solid var(--line); border-radius:16px; background:#f5f0e4; font-size:13px; }
.result-status span { color:var(--muted); font-size:12px; }
.payout-box { margin:25px auto; max-width:360px; background:#f5f0e4; border-radius:17px; padding:18px; text-align:left; }
.payout-line { display:flex; justify-content:space-between; padding:7px 0; font-size:13px; }
.payout-line.total { border-top:1px solid var(--line); margin-top:7px; padding-top:14px; font-weight:800; }
.audit-modal { max-height:min(85vh,780px); overflow:auto; }
.audit-events { display:grid; gap:10px; margin:18px 0; }
.audit-event { border:1px solid var(--line); border-radius:12px; padding:12px; background:#fffefa; }
.audit-event strong,.audit-event small,.audit-event code { display:block; }
.audit-event small { color:var(--muted); margin:5px 0; line-height:1.45; }
.audit-event code { color:var(--green-dark); font-size:10px; overflow-wrap:anywhere; }
#toast { position:fixed; left:50%; top:calc(78px + env(safe-area-inset-top, 0px)); max-width:calc(100% - 32px); text-align:center; box-shadow:0 10px 30px #0003; transform:translate(-50%,-12px); opacity:0; transition:.2s; z-index:40; background:#17251e; color:white; border-radius:12px; padding:12px 18px; font-size:13px; pointer-events:none; }
#toast.show { opacity:1; transform:translate(-50%,0); }
.hidden { display:none !important; }
@media(max-width:760px) {
  #screen { padding:28px 18px 42px; }
  .display-grid { grid-template-columns:1fr; gap:4px; min-height:0; }
  .competition-welcome { grid-template-columns:1fr; gap:26px; min-height:0; }
  .welcome-types { max-width:560px; }
  .competition-home-head { align-items:flex-start; flex-direction:column; }
  .competition-grid { grid-template-columns:1fr; }
  .competition-card .tier-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .competition-card > .muted { min-height:0; }
  .hero-copy { padding-top:16px; }
  .hero-art { min-height:360px; }
  .hero-board { width:min(320px,80vw); }
  .form-layout { grid-template-columns:1fr; margin:0 auto; }
  .form-aside { padding:26px; }
  .form-aside .brand { margin-bottom:28px; }
  .form-body { padding:30px 24px; }
  .game-feature { grid-template-columns:1fr; }
  .game-feature-art { min-height:230px; grid-row:1; }
  .game-feature-copy { padding:27px; }
  .lobby-head { align-items:flex-start; flex-direction:column; }
  .tier-grid { grid-template-columns:1fr; }
  .tier-card { display:flex; align-items:center; justify-content:space-between; }
  .tier-card strong { margin:0; }
  .game-controls { grid-template-columns:1fr; gap:16px; margin-top:18px; padding:14px; }
  .player-scoreboard { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .game-bottom { align-items:flex-start; }
}
@media(max-width:420px) {
  .topbar { height:65px; padding:0 16px; }
  .mode-pill { font-size:9px; }
  .site-footer { font-size:8px; }
  .hero-actions .btn { flex:1; }
  .welcome-type { padding:18px; gap:13px; }
  .competition-card { padding:21px 17px; }
  .competition-card .tier-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .competition-card .tier-card { display:block; text-align:left; }
  .competition-card .tier-card strong { margin:5px 0; }
  .sports-signin-prompt { align-items:flex-start; flex-direction:column; }
  .game-topline h2 { font-size:25px; }
  .game-status { font-size:10px; }
  .game-turn-meta { gap:6px; }
  .turn-timer { min-width:78px; padding:8px 9px; font-size:10px; }
  .die-pips .die-dot { width:6px; height:6px; }
  .turn-info > strong { font-size:13px; }
  .game-message { font-size:12px; }
  .game-bottom { flex-direction:column; }
  .stake-label { text-align:left; }
  .player-scoreboard { grid-template-columns:1fr; }
}
.sports-page { max-width:900px; margin:0 auto; }
.sports-page-head,.sports-section-head { display:flex; align-items:center; justify-content:space-between; gap:20px; }
.sports-page-head { margin:10px 0 22px; }
.sports-page-head h2 { margin:8px 0; }
.sports-disclaimer { padding:14px 16px; border-left:4px solid var(--yellow); border-radius:8px; background:#fff8df; color:#655b3f; font-size:12px; line-height:1.6; }
.sports-create-card { padding:26px 30px; margin:24px 0 36px; }
.sports-create-card h3,.sports-admin-box h3 { margin:10px 0 18px; }
.sports-create-card form { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:0 20px; }
.sports-create-card form > button { align-self:center; justify-self:start; }
.sports-create-card .field { min-width:0; }
.sports-create-card select,.sports-join-form select { width:100%; border:1px solid var(--line); background:#fffefa; border-radius:11px; padding:13px 14px; color:var(--ink); }
.sports-open-section { margin:20px 0; }
.sports-section-head { margin-bottom:16px; }
.sports-section-head h3 { margin:8px 0 0; }
.sports-challenge-card { padding:20px; margin:12px 0; background:var(--paper); border:1px solid var(--line); border-radius:17px; }
.sports-challenge-heading { display:flex; justify-content:space-between; gap:12px; }
.sports-challenge-heading span { color:var(--green-dark); font-size:10px; font-weight:800; text-transform:uppercase; }
.sports-challenge-card p { margin:10px 0; font-size:13px; }
.sports-challenge-card p.muted { font-size:12px; }
.sports-join-form { display:flex; align-items:end; gap:14px; margin-top:16px; }
.sports-join-form label { flex:1; display:grid; gap:7px; font-size:12px; font-weight:800; }
.sports-detail-card { padding:24px; }
.sports-detail-card dl { margin:0 0 20px; }
.sports-detail-card dl > div { display:grid; grid-template-columns:minmax(140px,.7fr) 1.3fr; gap:14px; padding:13px 0; border-bottom:1px solid var(--line); }
.sports-detail-card dt { color:var(--muted); font-size:12px; }
.sports-detail-card dd { margin:0; font-size:13px; overflow-wrap:anywhere; }
.sports-admin-box { margin:22px 0; padding:24px; background:#fffdf8; border:1px solid var(--line); border-radius:18px; }
.sports-admin-box .field { max-width:440px; }
.sports-confirm-final { display:flex; align-items:flex-start; gap:9px; margin:4px 0 18px; color:var(--muted); font-size:12px; line-height:1.5; }
.sports-confirm-final input { margin-top:2px; accent-color:var(--green); }
@media(prefers-reduced-motion:reduce) {
  *,*::before,*::after { scroll-behavior:auto !important; animation-duration:.01ms !important; animation-iteration-count:1 !important; transition-duration:.01ms !important; }
}
@media(max-width:760px) {
  .sports-page-head,.sports-section-head { align-items:flex-start; flex-direction:column; }
  .sports-create-card form { grid-template-columns:1fr; }
  .sports-join-form { align-items:stretch; flex-direction:column; }
}
.home-base-shell { stroke-width:1.6; filter:drop-shadow(0 2px 2px #14251b3d); }
.home-base-inlay { stroke:#ffffffc7; stroke-width:1.5; }
.home-base-sheen { fill:url(#base-gloss); opacity:.8; pointer-events:none; }
.launch-pad-shadow { fill:#18302436; }
.launch-pad-rim { fill:url(#launch-pad-rim); stroke:#ffffff; stroke-width:1; }
.launch-pad-inset { fill:#ffffff; stroke:#b6c0b9; stroke-width:.65; }
.home-base-green .launch-pad-inset { fill:#d8ead5; }
.home-base-yellow .launch-pad-inset { fill:#f3e5c7; }
.home-base-red .launch-pad-inset { fill:#f1d8d4; }
.home-base-blue .launch-pad-inset { fill:#d4e4f2; }
.launch-pad-center { fill:url(#launch-pad-center); stroke:#ffffff; stroke-width:.7; }
.launch-pad-glint { fill:#fff; opacity:.8; }
.home-base-emblem { fill:#ffffff8c; stroke:#ffffffcf; stroke-width:.8; }
.home-base-emblem-letter { fill:#ffffff; font:700 11px "Space Grotesk",sans-serif; pointer-events:none; }
.base-label-pill { fill:#fffefa; stroke:#ffffff; stroke-width:.7; opacity:.95; filter:drop-shadow(0 1px 2px #14281d44); }
.base-label-text { fill:#173225; pointer-events:none; }
.game-experience { max-width:900px; }
.game-experience .game-topline { margin-bottom:16px; }
.game-experience .game-topline h2 { margin:5px 0 0; font-size:30px; }
.game-experience .game-turn-meta { gap:8px; }
.game-stake-pill { display:flex; align-items:center; gap:7px; padding:8px 12px; border:1px solid #dfe8dc; border-radius:30px; background:#fffdf8; color:var(--green-dark); font-size:12px; font-weight:800; white-space:nowrap; }
.game-stake-pill small { color:var(--muted); font-size:8px; letter-spacing:.8px; }
.duel-strip { display:grid; grid-template-columns:minmax(0,1fr) 38px minmax(0,1fr); align-items:center; gap:12px; max-width:780px; margin:0 auto 16px; }
.duel-player { --player-accent:var(--green); min-width:0; display:grid; grid-template-columns:42px minmax(0,1fr) auto; align-items:center; gap:11px; padding:12px 14px; border:1px solid #e8e4d9; border-left:4px solid var(--player-accent); border-radius:17px; background:#fffdf8; box-shadow:0 6px 18px #3a49300b; transition:border-color .2s,box-shadow .2s; }
.duel-player.is-active { border-color:var(--player-accent); box-shadow:0 7px 20px #2c48331a, inset 0 0 0 1px var(--player-accent); }
.duel-avatar { width:42px; height:42px; display:grid; place-items:center; border-radius:14px; background:var(--player-accent); color:#fff; font:700 19px "Space Grotesk",sans-serif; box-shadow:inset 0 2px 3px #ffffff45,0 3px 8px #18332625; }
.duel-player-info { min-width:0; display:grid; gap:3px; }
.duel-role { color:var(--muted); font-size:8px; font-weight:800; letter-spacing:1px; }
.duel-player.is-active .duel-role { color:var(--green-dark); }
.duel-player-info > strong { overflow:hidden; color:var(--ink); font-size:12px; text-overflow:ellipsis; white-space:nowrap; }
.duel-color-dots { display:flex; gap:4px; align-items:center; }
.duel-color-dots i { width:8px; height:8px; border:1px solid #ffffff; border-radius:50%; background:var(--token-color); box-shadow:0 0 0 1px #253c2c1a; }
.duel-progress { height:3px; margin-top:1px; overflow:hidden; border-radius:4px; background:#eeeadd; }
.duel-progress i { width:var(--progress); height:100%; display:block; border-radius:inherit; background:var(--player-accent); transition:width .3s ease; }
.duel-finish-count { min-width:31px; display:grid; justify-items:center; color:var(--green-dark); }
.duel-finish-count strong { font:700 20px "Space Grotesk",sans-serif; line-height:1; }
.duel-finish-count small { margin-top:3px; color:var(--muted); font-size:7px; font-weight:800; letter-spacing:.6px; }
.duel-vs { width:32px; height:32px; display:grid; place-items:center; border:1px solid #e6e1d4; border-radius:50%; background:#f6f1e5; color:#7b8072; font-size:9px; font-weight:800; }
.game-table { padding:clamp(12px,2.4vw,24px); border-radius:26px; }
.game-table-heading { display:flex; align-items:center; gap:13px; margin:0 auto 15px; max-width:680px; }
.game-turn-indicator { flex:none; display:inline-flex; align-items:center; gap:7px; padding:8px 11px; border:1px solid #e7e1d4; border-radius:30px; background:#f5f0e4; color:#6b6c5e; font-size:9px; font-weight:800; letter-spacing:.8px; white-space:nowrap; }
.game-turn-indicator.is-your-turn { border-color:#cfe3d1; background:#eaf4e9; color:var(--green-dark); }
.turn-indicator-dot { width:7px; height:7px; border-radius:50%; background:#b8ae98; }
.is-your-turn .turn-indicator-dot { background:#35a56b; box-shadow:0 0 0 3px #35a56b22; animation:turnPulse 1.8s ease-out infinite; }
@keyframes turnPulse { 50% { box-shadow:0 0 0 6px #35a56b08; } }
.game-table-message { min-width:0; display:grid; gap:2px; }
.game-table-message strong { font-size:13px; }
.game-table-message span { overflow:hidden; color:var(--muted); font-size:11px; text-overflow:ellipsis; white-space:nowrap; }
.game-board-stage { padding:clamp(10px,2vw,18px); overflow:hidden; border:1px solid #ffffff1a; border-radius:24px; background-color:#294237; background-image:radial-gradient(ellipse at 50% 34%,#46644b 0%,#304b3b 52%,#263d32 100%),repeating-linear-gradient(45deg,transparent 0 17px,#ffffff03 17px 18px); box-shadow:inset 0 2px 12px #12251a6b,0 10px 24px #263e3020; }
.board-stage-heading,.board-stage-footer { max-width:680px; margin:0 auto; display:flex; justify-content:space-between; align-items:center; gap:12px; color:#e4ecdfbd; font-size:8px; font-weight:800; letter-spacing:1px; }
.board-stage-heading { padding:0 3px 11px; }
.board-stage-mark { color:#ffffffa8; font-size:7px; }
.board-stage-mark i { color:#f3bf49; font-style:normal; }
.board-wrap { width:min(100%,680px); }
#ludoBoard { border-radius:16px; box-shadow:0 12px 28px #14251b66,0 0 0 1px #ffffff40; }
.game-board-stage:has(.pixi-wrap) { background:#0b0e22; border-color:#ffffff14; box-shadow:0 10px 30px #0b0e2260; }
.pixi-wrap { width:min(100%,560px); margin:0 auto; position:relative; }
.pixi-mount { line-height:0; touch-action:manipulation; }
.pixi-canvas { display:block; width:100%; height:auto; }
.sr-only { position:absolute; width:1px; height:1px; margin:-1px; padding:0; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; border:0; }
.sr-only .board-dice { position:static; transform:none; }
.capture-options { display:flex; gap:10px; margin:16px 0 8px; }
.capture-option { flex:1; display:inline-flex; align-items:center; justify-content:center; gap:8px; background:var(--green-soft); color:var(--ink); border:2px solid var(--token-color); }
.capture-option i { width:16px; height:16px; border-radius:50%; background:var(--token-color); box-shadow:inset 0 -3px 0 #0003; }
.board-stage-footer { padding:11px 3px 0; color:#d5e0d1a8; font-size:7px; letter-spacing:.65px; }
.game-action-hint { max-width:680px; min-height:53px; display:flex; align-items:center; gap:11px; margin:13px auto 0; padding:9px 13px; border:1px solid #e8e3d8; border-radius:15px; background:#f8f5ed; }
.game-hint-mark { width:31px; height:31px; flex:none; display:grid; place-items:center; border-radius:11px; background:#e4f2e6; color:var(--green-dark); font-size:20px; font-weight:800; }
.game-action-hint > span:last-child { min-width:0; display:grid; gap:2px; }
.game-action-hint strong { color:var(--green-dark); font-size:8px; letter-spacing:.8px; }
.game-action-hint small { color:#5f6b60; font-size:11px; line-height:1.35; }
.game-utilities { max-width:680px; display:flex; align-items:center; flex-wrap:wrap; gap:7px; margin:12px auto 0; }
.utility-link { min-height:35px; display:inline-flex; align-items:center; gap:6px; padding:7px 10px; border:1px solid #ece7dc; border-radius:10px; background:#fffdf8; color:#4f6255; font-size:10px; font-weight:700; }
.utility-link:hover { border-color:#c9dccb; background:#f1f7ee; }
.utility-link > span { width:16px; height:16px; display:grid; place-items:center; border-radius:5px; background:#edf3e9; color:var(--green-dark); font-weight:800; }
.utility-leave { min-height:35px; margin-left:auto; padding:8px 12px; border-radius:10px; font-size:10px; }
.game-info-note { margin:9px 0 0; color:#929388; font-size:9px; text-align:right; }
@media(max-width:760px) {
  .game-experience { margin:-15px -9px -16px; }
  .duel-strip { gap:7px; margin-bottom:11px; }
  .duel-player { grid-template-columns:34px minmax(0,1fr) auto; gap:7px; padding:9px 8px; border-radius:14px; }
  .duel-avatar { width:34px; height:34px; border-radius:11px; font-size:16px; }
  .duel-player-info > strong { font-size:10px; }
  .duel-role { font-size:7px; letter-spacing:.7px; }
  .duel-finish-count { min-width:24px; }
  .duel-finish-count strong { font-size:17px; }
  .duel-vs { width:26px; height:26px; font-size:8px; }
  .game-table { padding:12px; border-radius:20px; }
  .game-board-stage { border-radius:19px; }
  .board-stage-footer span:last-child { text-align:right; }
  .game-utilities { gap:6px; }
}
@media(max-width:420px) {
  .game-experience .game-topline { align-items:center; }
  .game-experience .game-topline h2 { font-size:25px; }
  .game-experience .game-turn-meta { gap:5px; }
  .game-stake-pill { gap:4px; padding:7px 8px; font-size:10px; }
  .game-stake-pill small { font-size:7px; letter-spacing:.4px; }
  .game-experience .turn-timer { min-width:66px; padding:7px 6px; font-size:9px; }
  .duel-strip { grid-template-columns:minmax(0,1fr) 23px minmax(0,1fr); gap:4px; }
  .duel-player { grid-template-columns:29px minmax(0,1fr) auto; gap:5px; padding:8px 6px; }
  .duel-avatar { width:29px; height:29px; border-radius:9px; font-size:14px; }
  .duel-player-info > strong { font-size:9px; }
  .duel-finish-count { min-width:19px; }
  .duel-finish-count strong { font-size:15px; }
  .duel-finish-count small { font-size:6px; }
  .game-table { padding:9px; }
  .game-table-heading { gap:8px; margin-bottom:10px; }
  .game-turn-indicator { gap:5px; padding:7px 8px; font-size:8px; }
  .game-table-message strong { font-size:11px; }
  .game-table-message span { font-size:9px; }
  .game-board-stage { padding:8px; }
  .board-stage-heading { font-size:7px; letter-spacing:.6px; }
  .board-stage-mark { font-size:6px; }
  .board-stage-footer { font-size:6px; letter-spacing:.2px; }
  .game-action-hint { min-height:47px; margin-top:9px; padding:7px 9px; }
  .game-action-hint small { font-size:10px; }
  .game-utilities { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); }
  .utility-link { justify-content:center; padding:7px 4px; font-size:9px; }
  .utility-leave { grid-column:1/-1; margin:0; }
  .game-info-note { text-align:center; font-size:8px; }
}
@media(prefers-reduced-motion:reduce) {
  .is-your-turn .turn-indicator-dot { animation:none; }
}

.theme-button { width:44px; height:44px; flex:none; border:1px solid var(--line); border-radius:50%; background:transparent; color:var(--ink); font-size:16px; line-height:1; }

/* Dark theme: app.js resolves the system preference into data-theme. */
:root[data-theme="dark"] {
  color-scheme: dark;
  --ink: #e8ece6;
  --muted: #9aa59c;
  --cream: #0e1310;
  --paper: #171f1a;
  --green: #2f9e6c;
  --green-dark: #6fd1a2;
  --green-soft: #1c3025;
  --line: #2a352d;
  --shadow: 0 16px 44px rgba(0, 0, 0, .35);
}
[data-theme="dark"] .topbar { border-bottom-color:#ffffff14; }
[data-theme="dark"] .mode-pill { border-color:#2f3a32; color:#aab5ab; }
[data-theme="dark"] .avatar-button { background:#1f3a2b; }
[data-theme="dark"] .site-footer { color:#6f7a71; }
[data-theme="dark"] .btn-primary:hover:not(:disabled) { background:#38b07a; }
[data-theme="dark"] .btn-secondary { background:#243029; color:var(--ink); }
[data-theme="dark"] .content-card { border-color:#ffffff12; }
[data-theme="dark"] .type-mark,
[data-theme="dark"] .competition-icon,
[data-theme="dark"] .availability.available,
[data-theme="dark"] .game-status,
[data-theme="dark"] .game-hint-mark,
[data-theme="dark"] .utility-link > span { background:#1f3a2b; }
[data-theme="dark"] .field input,
[data-theme="dark"] .sports-create-card select,
[data-theme="dark"] .sports-join-form select,
[data-theme="dark"] .audit-event,
[data-theme="dark"] .tier-card,
[data-theme="dark"] .open-ticket,
[data-theme="dark"] .sports-admin-box,
[data-theme="dark"] .player-color,
[data-theme="dark"] .player-score,
[data-theme="dark"] .game-stake-pill,
[data-theme="dark"] .utility-link { background:#1b241e; border-color:#2a352d; color:var(--ink); }
[data-theme="dark"] .utility-link:hover { background:#223028; border-color:#365342; }
[data-theme="dark"] .duel-player { background:#171f1a; border-color:#2a352d; border-left-color:var(--player-accent); box-shadow:none; }
[data-theme="dark"] .duel-progress { background:#2a352d; }
[data-theme="dark"] .duel-vs { background:#1b241e; border-color:#2a352d; color:#9aa59c; }
[data-theme="dark"] .game-turn-indicator,
[data-theme="dark"] .turn-timer,
[data-theme="dark"] .how-it-works,
[data-theme="dark"] .result-status,
[data-theme="dark"] .payout-box,
[data-theme="dark"] .game-controls,
[data-theme="dark"] .game-action-hint { background:#1b241e; border-color:#2a352d; color:#b4beb5; }
[data-theme="dark"] .game-turn-indicator.is-your-turn { background:#1c3025; border-color:#2c5a40; color:var(--green-dark); }
[data-theme="dark"] .turn-timer.warning { background:#4a2820; color:#ffb4a2; }
[data-theme="dark"] .game-action-hint small { color:#9aa59c; }
[data-theme="dark"] .mode-notice,
[data-theme="dark"] .sports-disclaimer { background:#2b2614; border-color:#4a4222; color:#e3d6a3; }
[data-theme="dark"] .availability.experimental { background:#3a3114; color:#f0d77a; }
[data-theme="dark"] .player-badge { background:#4a2c24; color:#ffb4a2; }
[data-theme="dark"] .player-badge.opponent { background:#1f3a2b; color:var(--green-dark); }
[data-theme="dark"] .modal-backdrop { background:#000000a8; }
[data-theme="dark"] .game-board-stage:has(.pixi-wrap) { border-color:#ffffff1f; }

.wallet-page h3{margin:1.5rem 0 .5rem}.wallet-table{width:100%;border-collapse:collapse}.wallet-table td{padding:.5rem .25rem;border-bottom:1px solid rgba(128,128,128,.25)}.wallet-table .pos{color:#157a46}.wallet-table .neg{color:#d64545}.wallet-list{padding-left:1.2rem}

/* Players waiting for an opponent (Ludo lobby) */
.open-tickets { margin:14px 0 4px; }
.open-tickets-head { display:flex; align-items:baseline; justify-content:space-between; gap:10px; margin-bottom:8px; }
.open-tickets-head .muted { font-size:12px; }
.open-tickets-empty { font-size:13px; margin:0; padding:12px 14px; border:1px dashed var(--line); border-radius:14px; }
.open-ticket-list { list-style:none; margin:0; padding:0; display:grid; gap:8px; max-height:264px; overflow-y:auto; }
.open-ticket { display:flex; align-items:center; gap:10px; padding:9px 10px; border:1px solid var(--line); border-radius:14px; background:#fffdf8; }
.open-ticket .player-badge { width:36px; height:36px; border-radius:12px; font-size:15px; flex:none; }
.open-ticket-info { display:flex; flex-direction:column; min-width:0; flex:1; }
.open-ticket-info strong { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.open-ticket-info small { color:var(--muted); font-size:12px; }
.btn.open-ticket-play { flex:none; padding:9px 14px; font-size:13px; white-space:nowrap; }
@media(max-width:420px) {
  .btn.open-ticket-play { padding:8px 10px; font-size:12px; }
}
/* Sports challenges: outcome picker, the two sides, and the payout preview */
.sports-create-card .sports-outcome-field,.sports-create-card .sports-preview { grid-column:1 / -1; }
.field-label { font-size:12px; font-weight:800; }
.sports-outcomes { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; }
.sports-outcome { position:relative; cursor:pointer; }
.sports-outcome input { position:absolute; opacity:0; inset:0; margin:0; cursor:pointer; }
.sports-outcome span { display:flex; flex-direction:column; gap:3px; height:100%; padding:11px 12px; border:1px solid var(--line); border-radius:12px; background:#fffefa; transition:.15s; }
.sports-outcome strong { font-size:13px; line-height:1.25; overflow-wrap:anywhere; }
.sports-outcome small { color:var(--muted); font-size:11px; }
.sports-outcome input:checked + span { border-color:var(--green); background:var(--green-soft); box-shadow:0 0 0 1px var(--green) inset; }
.sports-outcome input:focus-visible + span { outline:2px solid var(--green); outline-offset:2px; }
.sports-preview { margin:4px 0 16px; padding:12px 14px; border-radius:12px; background:var(--green-soft); font-size:13px; line-height:1.55; }
.sports-preview:empty { display:none; }
.link-button { border:0; background:none; padding:0; color:var(--green-dark); font:inherit; font-weight:800; text-decoration:underline; cursor:pointer; }
.sports-sides { display:grid; grid-template-columns:1fr 1fr; gap:8px; margin:12px 0 4px; }
.sports-sides > div { display:flex; flex-direction:column; gap:2px; padding:10px 12px; border:1px solid var(--line); border-radius:12px; }
.sports-sides small { color:var(--muted); font-size:11px; }
.sports-sides strong { font-size:14px; }
.sports-sides span { font-size:12px; color:var(--muted); }
.sports-side-you { background:var(--green-soft); border-color:transparent !important; }
@media(max-width:520px) {
  .sports-outcomes { grid-template-columns:1fr; }
  .sports-sides { grid-template-columns:1fr; }
}
[data-theme="dark"] .sports-outcome span { background:#1b241e; border-color:#2a352d; }
[data-theme="dark"] .sports-outcome input:checked + span,
[data-theme="dark"] .sports-preview,
[data-theme="dark"] .sports-side-you { background:#1c3025; }
[data-theme="dark"] .sports-sides > div { border-color:#2a352d; }
/* ---------- Whot ---------- */
.whot-screen { --maroon:#7a1e22; --cream:#fbf4e4; max-width:620px; margin:0 auto; display:flex; flex-direction:column; gap:12px; }
.whot-topbar { display:flex; justify-content:space-between; align-items:flex-end; gap:12px; flex-wrap:wrap; }
.whot-topbar .eyebrow { margin-bottom:6px; }
.whot-topbar-actions { display:flex; align-items:center; gap:10px; }
.hold-leave { position:relative; overflow:hidden; padding:10px 14px; font-size:13px; user-select:none; -webkit-user-select:none; touch-action:none; }
.hold-leave .hold-fill { position:absolute; inset:0; width:0; background:#d9533b33; }
.hold-leave .hold-text { position:relative; }
.hold-leave.is-holding .hold-fill { width:100%; transition:width 1.5s linear; }
.whot-player { display:flex; align-items:center; gap:12px; padding:10px 14px; border:1px solid var(--line); border-radius:16px; background:var(--paper); }
.whot-player .player-badge { width:44px; height:44px; border-radius:14px; font-size:17px; flex:none; transition:box-shadow .2s; }
.whot-player.is-turn .player-badge { box-shadow:0 0 0 3px var(--paper), 0 0 0 6px var(--yellow); animation:turn-ring 1.4s ease-in-out infinite; }
@keyframes turn-ring { 50% { box-shadow:0 0 0 3px var(--paper), 0 0 0 9px #f3bf4966; } }
.whot-player-info { display:flex; flex-direction:column; gap:2px; min-width:0; flex:1; }
.whot-player-info strong { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.whot-player-info span { color:var(--muted); font-size:13px; }
.last-card { color:#c0392b; font-weight:800; }
.opponent-fan { display:flex; flex:none; }
.opponent-fan .whot-card + .whot-card { margin-left:-22px; }
.whot-market-btn { padding:10px 16px; font-size:13px; flex:none; }

.whot-table { display:flex; justify-content:center; align-items:center; gap:clamp(24px, 8vw, 64px); padding:28px 16px; border-radius:26px;
  background:radial-gradient(ellipse at 50% 40%, #2f7d4f 0%, #1f5c39 62%, #17472d 100%); border:7px solid #5b3a1f; box-shadow:inset 0 0 40px #0006, 0 10px 24px #0002; }
.market { position:relative; border:0; background:none; padding:0; display:flex; flex-direction:column; align-items:center; gap:8px; color:#e8f3ea; font-weight:700; font-size:12px; }
.market .whot-card { --card-w:78px; box-shadow:3px 3px 0 #3e0f12, 6px 6px 0 #2a0a0c, 0 10px 18px #0005; }
.market.is-active { cursor:pointer; }
.market.is-active .whot-card { outline:3px solid var(--yellow); outline-offset:3px; }
.market.is-active:hover .whot-card { transform:translateY(-3px); }
.market.is-pulse .whot-card { animation:market-pulse .45s ease; }
@keyframes market-pulse { 40% { transform:scale(.94); } }
.pile { display:flex; flex-direction:column; align-items:center; gap:8px; }
.top-card { --card-w:92px; transform:rotate(-5deg); box-shadow:0 12px 22px #0005; }
.top-card.from-me { animation:card-from-me .42s cubic-bezier(.2,.8,.2,1); }
.top-card.from-opponent { animation:card-from-opponent .42s cubic-bezier(.2,.8,.2,1); }
@keyframes card-from-me { from { transform:translateY(180px) rotate(8deg) scale(.8); opacity:.4; } }
@keyframes card-from-opponent { from { transform:translateY(-180px) rotate(-14deg) scale(.8); opacity:.4; } }
.called-shape { display:flex; align-items:center; gap:6px; min-height:26px; padding:4px 10px; border-radius:999px; background:#fbf4e4; color:#7a1e22; font-size:12px; font-weight:800; }
.called-shape.is-empty { visibility:hidden; }
.called-icon { width:14px; height:14px; fill:#7a1e22; }
.whot-status { margin:0; text-align:center; font-size:14px; color:var(--muted); min-height:20px; }

.whot-card { --card-w:64px; position:relative; display:inline-flex; align-items:center; justify-content:center; width:var(--card-w); aspect-ratio:5 / 7;
  border-radius:calc(var(--card-w) * .12); background:#fbf4e4; border:2px solid #7a1e22; color:#7a1e22; box-shadow:0 2px 6px #0002; flex:none; transition:transform .18s; }
.whot-card.small { --card-w:26px; border-width:1.5px; }
.whot-card .card-shape { width:52%; fill:#7a1e22; }
.whot-card .corner { position:absolute; top:5%; left:8%; display:flex; flex-direction:column; align-items:center; font:800 calc(var(--card-w) * .2)/1 "Space Grotesk", system-ui, sans-serif; }
.whot-card .corner.flip { top:auto; left:auto; bottom:5%; right:8%; transform:rotate(180deg); }
.whot-card .corner-shape { width:calc(var(--card-w) * .13); fill:#7a1e22; margin-top:2px; }
.whot-card.is-whot { flex-direction:column; gap:4%; }
.whot-word { font:900 calc(var(--card-w) * .21)/1 "Space Grotesk", system-ui, sans-serif; letter-spacing:.02em; padding:4% 6%; border:1.5px dashed #7a1e22; border-radius:4px; }
.whot-shapes { display:flex; gap:2px; }
.mini-shape { width:calc(var(--card-w) * .11); fill:#7a1e22; }
.whot-card.is-back { background:repeating-linear-gradient(45deg, #7a1e22 0 6px, #6a171b 6px 12px); border-color:#f3dcc0; box-shadow:inset 0 0 0 3px #7a1e22, inset 0 0 0 5px #f3dcc0aa; }
.back-mark { display:grid; place-items:center; width:42%; aspect-ratio:1; border-radius:30%; background:#fbf4e4; color:#7a1e22; font:900 calc(var(--card-w) * .26)/1 "Space Grotesk", system-ui, sans-serif; }
.whot-card.small .back-mark { display:none; }

.whot-hand { display:flex; justify-content:center; padding:16px 8px 6px; overflow-x:auto; scrollbar-width:thin; }
.whot-hand.is-crowded { justify-content:flex-start; }
.hand-card { border:0; padding:0; background:none; flex:none; transition:transform .18s, opacity .18s; }
.hand-card + .hand-card { margin-left:-16px; }
.whot-hand.is-crowded .hand-card + .hand-card { margin-left:-30px; }
.hand-card .whot-card { --card-w:68px; box-shadow:-2px 2px 6px #0003; }
.hand-card.is-playable { cursor:pointer; padding-top:20px; margin-top:-20px; position:relative; }
.hand-card.is-playable .whot-card { transform:translateY(-12px); box-shadow:0 0 0 3px var(--yellow), -2px 6px 12px #0003; }
.hand-card.is-playable:hover, .hand-card.is-playable:focus-visible { z-index:2; outline:none; }
.hand-card.is-playable:hover .whot-card, .hand-card.is-playable:focus-visible .whot-card { transform:translateY(-20px); }
.hand-card.is-dim { opacity:.55; }
.hand-card:disabled { cursor:default; }
.hand-card.is-new .whot-card { animation:card-drawn .45s cubic-bezier(.2,.8,.2,1); }
@keyframes card-drawn { from { transform:translateY(-120px) scale(.7); opacity:0; } }
.whot-footer { display:flex; justify-content:center; }

.shape-picker .shape-options { display:grid; grid-template-columns:repeat(5, minmax(0,1fr)); gap:8px; margin:16px 0; }
.shape-option { display:flex; flex-direction:column; align-items:center; gap:6px; padding:12px 4px; border:1px solid var(--line); border-radius:14px; background:#fbf4e4; color:#7a1e22; font-size:12px; font-weight:800; cursor:pointer; }
.shape-option:hover, .shape-option:focus-visible { border-color:#7a1e22; outline:none; transform:translateY(-2px); }
.shape-option-icon { width:34px; height:34px; fill:#7a1e22; }

@media(min-width:760px) {
  .top-card { --card-w:112px; }
  .market .whot-card { --card-w:96px; }
  .hand-card .whot-card { --card-w:84px; }
}
@media(max-width:520px) {
  .whot-table { padding:22px 10px; }
  .top-card { --card-w:80px; }
  .market .whot-card { --card-w:66px; }
  .hand-card .whot-card { --card-w:60px; }
  .hand-card + .hand-card { margin-left:-26px; }
  .opponent-fan .whot-card + .whot-card { margin-left:-20px; }
  .shape-picker .shape-options { grid-template-columns:repeat(3, minmax(0,1fr)); }
}
@media(prefers-reduced-motion:reduce) {
  .top-card.from-me, .top-card.from-opponent, .hand-card.is-new .whot-card, .market.is-pulse .whot-card, .whot-player.is-turn .player-badge { animation:none; }
}
[data-theme="dark"] .whot-player { background:#1b241e; border-color:#2a352d; }
[data-theme="dark"] .whot-player.is-turn .player-badge { box-shadow:0 0 0 3px #1b241e, 0 0 0 6px var(--yellow); }
/* Consent, breaks and limits */
.consent-check { display:flex; gap:10px; align-items:flex-start; margin:14px 0 6px; font-size:13px; line-height:1.5; }
.consent-check input { margin-top:3px; width:18px; height:18px; flex:none; accent-color:var(--green); }
.consent-check a { color:var(--green-dark); font-weight:700; }
.break-banner { margin:14px 0; padding:12px 16px; border-radius:14px; background:#fff1c7; border:1px solid #ecd58a; font-size:14px; line-height:1.5; }
.limits-section { margin-top:28px; padding-top:8px; border-top:1px solid var(--line); }
.limits-grid { display:grid; grid-template-columns:repeat(3, minmax(0,1fr)); gap:0 14px; }
.break-options { display:flex; flex-wrap:wrap; gap:8px; margin-top:8px; }
.footer-links { display:flex; gap:14px; }
.footer-links a { color:inherit; text-decoration:none; display:inline-flex; align-items:center; min-height:32px; }
@media (pointer:coarse) { .footer-links a { min-height:44px; } }
.footer-links a:hover { text-decoration:underline; }
@media(max-width:620px) {
  .limits-grid { grid-template-columns:1fr; }
  .site-footer { flex-wrap:wrap; gap:8px 14px; }
}
[data-theme="dark"] .break-banner { background:#2b2614; border-color:#4a4222; color:#e3d6a3; }
/* Header balance */
.balance-pill { position:relative; display:inline-flex; flex-direction:column; align-items:flex-end; gap:1px; padding:6px 14px; border:1px solid #c8dfcc; border-radius:14px; background:#e4f2e6; color:var(--green-dark); cursor:pointer; line-height:1.1; transition:background .3s, border-color .3s; }
.balance-pill[hidden] { display:none; }
.balance-label { font-size:10px; font-weight:800; letter-spacing:.6px; text-transform:uppercase; color:#1c5a3c; }
.balance-amount { font:800 16px/1.1 "Space Grotesk", system-ui, sans-serif; font-variant-numeric:tabular-nums; }
.balance-pill.is-up { animation:balance-up 1.4s ease; }
.balance-pill.is-down { animation:balance-down 1.4s ease; }
@keyframes balance-up { 15% { background:#c9ecd3; border-color:#1f8758; transform:scale(1.06); } }
@keyframes balance-down { 15% { background:#fde0d9; border-color:#e5533d; } }
.balance-delta { position:absolute; right:8px; top:100%; margin-top:4px; padding:2px 8px; border-radius:999px; font-size:12px; font-weight:800; white-space:nowrap; pointer-events:none; animation:delta-float 1.8s ease forwards; }
.balance-delta.up { background:#1f8758; color:#fff; }
.balance-delta.down { background:#e5533d; color:#fff; }
@keyframes delta-float { 0% { opacity:0; transform:translateY(-6px); } 15% { opacity:1; transform:translateY(0); } 75% { opacity:1; } 100% { opacity:0; transform:translateY(6px); } }
/* Signed out, the account button reads "Sign in". */
.avatar-button.is-out { width:auto; padding:0 16px; border-radius:22px; background:var(--green); color:#fff; font-size:14px; }
[data-theme="dark"] .avatar-button.is-out { background:#2fbf7f; color:#0b1510; }
.eyebrow { color: var(--green-dark); }
[data-theme="dark"] .balance-label { color:inherit; }
.btn-quiet { min-height:44px; }
@media(max-width:560px) { .mode-long { display:none; } }
/* With a balance showing, the mode badge gives way on small screens. */
@media(max-width:560px) {
  body.has-balance .mode-pill { display:none; }
  .topbar-right { gap:10px; }
  .balance-pill { padding:5px 11px; }
  .balance-amount { font-size:15px; }
}
[data-theme="dark"] .balance-pill { background:#1c3025; border-color:#2c5a40; color:#7fd3a6; }

/* Coins (coins.js): free games only, never money, so they look nothing like the green cash pill. */
.coin-mark { display:inline-block; width:1em; height:1em; flex:none; border-radius:50%; vertical-align:-.14em; background:radial-gradient(circle at 35% 30%, #ffe9a3 0 18%, #f2b42b 45%, #c98a0c 100%); box-shadow:inset 0 0 0 .09em #b07508; }
.coin-amount { display:inline-flex; align-items:center; gap:.3em; font-variant-numeric:tabular-nums; white-space:nowrap; }
.coin-pill { display:inline-flex; align-items:center; gap:6px; min-height:36px; padding:6px 12px; border:1px solid #ecd9a6; border-radius:14px; background:#fbf3dc; color:#6b4a00; font:800 15px/1.1 "Space Grotesk", system-ui, sans-serif; font-variant-numeric:tabular-nums; cursor:pointer; }
.coin-pill[hidden] { display:none; }
.coin-pill .coin-mark { font-size:16px; }
.coin-pill.is-low { border-color:#e0a422; box-shadow:0 0 0 2px rgba(224,164,34,.25); }
.coin-pill.is-up { animation:coin-up 1.4s ease; }
.coin-pill.is-down { animation:coin-down 1.4s ease; }
@keyframes coin-up { 15% { background:#f9e3a0; border-color:#c98a0c; transform:scale(1.06); } }
@keyframes coin-down { 15% { background:#fde0d9; border-color:#e5533d; } }
@media(max-width:560px) { .coin-pill { padding:5px 9px; font-size:14px; } }
@media(max-width:380px) { .coin-pill { padding:5px 7px; } }
/* Signed in on a phone, the header holds coins and cash: the wordmark and the header sound button give way
   (every game has its own sound button in the game bar). */
@media(max-width:560px) {
  body.has-balance .brand > span:not(.brand-mark) { display:none; }
  body.has-balance .topbar-right .sound-button { display:none; }
}
@media(max-width:380px) {
  body.has-balance .topbar-right { gap:6px; }
  body.has-balance .topbar-right .theme-button, body.has-balance .topbar-right .avatar-button { width:38px; height:38px; }
  body.has-balance .balance-pill { padding:4px 9px; }
}
[data-theme="dark"] .coin-pill { background:#2e2614; border-color:#5a4718; color:#f2cf73; }
[data-theme="dark"] .coin-pill.is-low { border-color:#e0a422; }
.coins-sheet h2 { display:flex; align-items:baseline; gap:8px; flex-wrap:wrap; font-size:clamp(30px,8vw,40px); }
.coins-sheet h2 .coin-amount { color:#8a5f00; }
.coins-word { font-size:18px; color:var(--muted); font-weight:700; }
.coins-facts { margin:10px 0 16px; padding-left:20px; display:grid; gap:6px; color:var(--muted); font-size:14px; }
.coins-gift { display:flex; align-items:center; flex-wrap:wrap; gap:6px 10px; margin:14px 0; padding:12px 14px; border-radius:14px; background:#fbf3dc; color:#5c3d00; }
.coins-gift .coin-amount { font:800 22px/1.1 "Space Grotesk", system-ui, sans-serif; }
[data-theme="dark"] .coins-sheet h2 .coin-amount { color:#f2cf73; }
[data-theme="dark"] .coins-gift { background:#2e2614; color:#f2cf73; }
.coin-cash-nudge { display:flex; flex-wrap:wrap; align-items:center; gap:6px 12px; margin:14px 0 4px; padding:12px 14px; border:1px solid var(--line); border-radius:14px; text-align:left; font-size:14px; }
.coin-cash-nudge strong { flex:1 0 100%; }
.coin-cash-nudge span { flex:1 1 200px; color:var(--muted); }
.result-card.is-coins .result-money.is-up strong { color:#8a5f00; }
[data-theme="dark"] .result-card.is-coins .result-money.is-up strong { color:#f2cf73; }
.wallet-tile.is-coins { font:inherit; text-align:left; color:inherit; cursor:pointer; }
.wallet-tile.is-coins strong .coin-amount { font-size:inherit; }
.wallet-tile.is-coins strong .coin-mark { font-size:.8em; }

/* Win confetti */
.confetti-canvas { position:fixed; inset:0; width:100vw; height:100vh; pointer-events:none; z-index:9999; }

/* Players waiting, shown above all games */
.open-tickets.content-card { padding:18px 22px; margin:0 0 20px; }
/* USDT deposits and withdrawals */
.pay-tabs { display:inline-flex; gap:4px; padding:4px; margin:4px 0 12px; border:1px solid var(--line); border-radius:999px; background:var(--paper); }
.pay-tabs button { border:0; background:none; padding:8px 16px; border-radius:999px; font-weight:800; font-size:13px; color:var(--muted); cursor:pointer; }
.pay-tabs button.is-active { background:var(--green); color:#fff; }
.field-label { font-size:12px; font-weight:800; }
.network-options { display:grid; grid-template-columns:repeat(2, minmax(0,1fr)); gap:8px; }
.network-option { position:relative; cursor:pointer; }
.network-option input { position:absolute; opacity:0; inset:0; margin:0; cursor:pointer; }
.network-option span { display:flex; flex-direction:column; gap:2px; padding:11px 12px; border:1px solid var(--line); border-radius:12px; background:#fffefa; }
.network-option small { color:var(--muted); font-size:11px; }
.network-option input:checked + span { border-color:var(--green); background:var(--green-soft); box-shadow:0 0 0 1px var(--green) inset; }
.network-option input:focus-visible + span { outline:2px solid var(--green); outline-offset:2px; }
.usdt-card { margin:6px 0 18px; padding:18px; border:1px solid var(--line); border-radius:18px; background:var(--paper); }
.usdt-step { margin:0 0 6px; font-size:12px; font-weight:800; color:var(--muted); text-transform:uppercase; letter-spacing:.06em; }
.usdt-amount, .usdt-address { display:flex; align-items:center; justify-content:space-between; gap:10px; flex-wrap:wrap; padding:12px 14px; border-radius:12px; background:var(--green-soft); margin-bottom:12px; }
.usdt-amount strong { font:800 22px/1.2 "Space Grotesk", system-ui, sans-serif; }
.usdt-address code { font-size:14px; word-break:break-all; flex:1 1 220px; }
.usdt-warning { margin:0 0 14px; padding:10px 12px; border-radius:12px; background:#fde0d9; color:#8a2a1a; font-size:13px; }
.usdt-status { display:flex; align-items:center; gap:8px; font-weight:700; font-size:14px; }
.pulse-dot { width:10px; height:10px; border-radius:50%; background:var(--yellow); animation:pulse-dot 1.4s ease-in-out infinite; }
@keyframes pulse-dot { 50% { opacity:.3; transform:scale(.7); } }
.usdt-history { margin:6px 0 16px; font-size:14px; }
.usdt-history summary { cursor:pointer; font-weight:700; color:var(--green-dark); }
@media(max-width:520px) { .network-options { grid-template-columns:1fr; } }
@media(prefers-reduced-motion:reduce) { .pulse-dot { animation:none; } }
[data-theme="dark"] .network-option span { background:#1b241e; border-color:#2a352d; }
[data-theme="dark"] .network-option input:checked + span, [data-theme="dark"] .usdt-amount, [data-theme="dark"] .usdt-address { background:#1c3025; }
[data-theme="dark"] .usdt-warning { background:#4a2820; color:#ffcfc2; }
[data-theme="dark"] .usdt-card, [data-theme="dark"] .pay-tabs { background:#161e19; border-color:#2a352d; }
/* Deposit bank details */
.bank-card { margin:6px 0 10px; padding:6px 16px; border:1px solid var(--line); border-radius:16px; background:var(--paper); }
.bank-row { display:flex; align-items:center; gap:10px; padding:10px 0; border-bottom:1px solid var(--line); flex-wrap:wrap; }
.bank-row:last-child { border-bottom:0; }
.bank-row span { flex:0 0 150px; color:var(--muted); font-size:13px; }
.bank-row strong { flex:1 1 auto; font-size:16px; }
.bank-number { font:800 20px/1.2 "Space Grotesk", system-ui, sans-serif; letter-spacing:.04em; font-variant-numeric:tabular-nums; }
.bank-row.is-reference strong { color:var(--green-dark); }
@media(max-width:520px) { .bank-row span { flex-basis:100%; } }
[data-theme="dark"] .bank-card { background:#161e19; border-color:#2a352d; }

/* ---------- Ayo ---------- */
.ayo-board { --wood:#8a5a2b; --wood-dark:#5d3a19; --well:#3d2510; position:relative; padding:14px 12px; border-radius:26px; background:linear-gradient(160deg,#a8743d 0%,var(--wood) 45%,#74471f 100%); box-shadow:inset 0 2px 0 #ffffff2e, inset 0 -6px 14px #00000040, 0 18px 40px #3d25104d; }
.ayo-board::before { content:""; position:absolute; inset:0; border-radius:inherit; background:repeating-linear-gradient(100deg,#ffffff08 0 3px,transparent 3px 14px,#00000010 14px 16px,transparent 16px 31px); pointer-events:none; }
.ayo-row { position:relative; display:grid; grid-template-columns:repeat(6,1fr); gap:8px; }
.ayo-direction { position:relative; display:flex; justify-content:space-between; align-items:center; margin:6px 4px; color:#fde9c8b3; font-size:10px; font-weight:700; letter-spacing:.12em; text-transform:uppercase; }
.ayo-direction span:first-child, .ayo-direction span:last-child { font-size:14px; letter-spacing:0; }
.ayo-pit { position:relative; aspect-ratio:1; border:0; padding:0; border-radius:50%; background:none; font:inherit; cursor:default; display:block; width:100%; }
.ayo-well { position:absolute; inset:0; border-radius:50%; background:radial-gradient(circle at 50% 38%,#26160a 0%,var(--well) 55%,#6b4220 100%); box-shadow:inset 0 6px 12px #000000a0, inset 0 -2px 3px #ffffff1f, 0 1px 0 #ffffff26; overflow:hidden; transition:box-shadow .15s, transform .15s; }
.ayo-seed { position:absolute; width:22%; height:19%; margin:-9.5% 0 0 -11%; border-radius:50% 50% 46% 54%; background:radial-gradient(circle at 35% 30%,#fff6dc 0%,#d9c08a 35%,#8f7445 100%); box-shadow:0 1px 1.5px #0000008c; transform:rotate(var(--tilt)); }
.ayo-count { position:absolute; right:-2px; bottom:-2px; min-width:22px; height:22px; padding:0 5px; border-radius:11px; background:#fdf3df; color:#3d2510; font-size:12px; font-weight:800; line-height:22px; text-align:center; box-shadow:0 2px 6px #00000040; font-variant-numeric:tabular-nums; }
.ayo-row.is-top .ayo-count { bottom:auto; top:-2px; }
.ayo-pit.is-empty .ayo-count { opacity:.55; }
.ayo-pit.is-playable { cursor:pointer; }
.ayo-pit.is-playable .ayo-well { box-shadow:inset 0 6px 12px #000000a0, 0 0 0 3px var(--yellow), 0 0 16px #f3bf4999; animation:ayoGlow 1.6s ease-in-out infinite; }
.ayo-pit.is-playable:hover .ayo-well, .ayo-pit.is-playable:focus-visible .ayo-well { transform:translateY(-2px) scale(1.04); }
.ayo-pit.is-playable:focus-visible { outline:none; }
.ayo-pit.is-hot .ayo-well { box-shadow:inset 0 6px 12px #000000a0, 0 0 0 3px #fff3d6, 0 0 18px #fff3d6aa; }
.ayo-pit.is-captured .ayo-well { box-shadow:inset 0 6px 12px #000000a0, 0 0 0 3px var(--coral), 0 0 22px #ed7259cc; animation:ayoCapture .42s ease-in-out; }
@keyframes ayoGlow { 50% { box-shadow:inset 0 6px 12px #000000a0, 0 0 0 3px var(--yellow), 0 0 6px #f3bf4955; } }
@keyframes ayoCapture { 40% { transform:scale(1.1); } }
.ayo-player .whot-player-info { flex:1; min-width:0; }
.ayo-progress { display:block; height:6px; margin-top:6px; border-radius:3px; background:var(--line); overflow:hidden; }
.ayo-progress span { display:block; height:100%; border-radius:inherit; background:linear-gradient(90deg,#c9a46a,#8a5a2b); transition:width .4s ease; }
.ayo-store-count { display:flex; flex-direction:column; align-items:flex-end; line-height:1; }
.ayo-store-count strong { font-size:26px; font-variant-numeric:tabular-nums; }
.ayo-store-count small { margin-top:3px; color:var(--muted); font-size:11px; font-weight:700; }
.ayo-player.is-scoring .ayo-store-count strong { animation:ayoScore .5s ease; color:var(--green); }
@keyframes ayoScore { 40% { transform:scale(1.35); } }
.rules-list { padding-left:18px; display:grid; gap:8px; }
@media (max-width:420px) {
  .ayo-board { padding:10px 8px; border-radius:20px; }
  .ayo-row { gap:5px; }
  .ayo-count { min-width:19px; height:19px; line-height:19px; font-size:11px; border-radius:10px; }
}
@media (prefers-reduced-motion: reduce) {
  .ayo-pit.is-playable .ayo-well, .ayo-pit.is-captured .ayo-well, .ayo-player.is-scoring .ayo-store-count strong { animation:none; }
}

/* ---------- Draughts ---------- */
.d-board-frame { width:100%; max-width:max(300px, calc(100vh - 340px)); margin:0 auto; box-sizing:border-box; padding:10px; border-radius:18px; background:linear-gradient(160deg,#6b4423,#4a2c14); box-shadow:inset 0 2px 0 #ffffff26, 0 18px 40px #3d25104d; }
.d-board { display:grid; grid-template-columns:repeat(10,1fr); aspect-ratio:1; border-radius:6px; overflow:hidden; box-shadow:0 0 0 2px #2b1909; }
.d-cell { position:relative; display:block; aspect-ratio:1; border:0; padding:0; margin:0; font:inherit; background:none; }
.d-cell.is-light { background:#efe0c2; }
.d-cell.is-dark { background:#7a8f5c; background:linear-gradient(145deg,#80955f,#6d8152); }
button.d-cell { cursor:pointer; }
.d-cell.is-last { box-shadow:inset 0 0 0 100px #f3bf4933; }
.d-cell.is-route { box-shadow:inset 0 0 0 100px #ffffff2e; }
.d-cell.is-target::after { content:""; position:absolute; inset:34%; border-radius:50%; background:#f3bf49; box-shadow:0 0 0 3px #f3bf4966, 0 0 12px #f3bf49; animation:ayoGlow 1.4s ease-in-out infinite; }
.d-cell.is-target:has(.d-piece)::after { inset:8%; background:none; box-shadow:0 0 0 3px #f3bf49; }
.d-piece { position:absolute; inset:9%; border-radius:50%; display:grid; place-items:center; transition:transform .15s, opacity .2s, box-shadow .15s; }
.d-piece.is-white { background:radial-gradient(circle at 38% 32%,#fffdf6 0%,#efe4cc 55%,#cdbd9a 100%); box-shadow:0 2px 0 #a8956f, 0 3px 6px #00000059, inset 0 0 0 3px #ffffff80, inset 0 0 0 5px #d9c8a4; }
.d-piece.is-black { background:radial-gradient(circle at 38% 32%,#5a4234 0%,#2a1c14 60%,#140c07 100%); box-shadow:0 2px 0 #0b0604, 0 3px 6px #00000080, inset 0 0 0 3px #ffffff14, inset 0 0 0 5px #3b2a1e; }
.d-crown { font-size:clamp(11px,2.6vw,20px); line-height:1; color:#c08a1a; text-shadow:0 1px 0 #00000040; }
.d-piece.is-black .d-crown { color:#f3bf49; }
.d-piece.is-movable { box-shadow:0 0 0 3px #f3bf49, 0 0 14px #f3bf49b3, 0 3px 6px #00000059; animation:dPulse 1.6s ease-in-out infinite; }
.d-piece.is-selected { transform:translateY(-3px) scale(1.06); box-shadow:0 0 0 3px #fff, 0 0 18px #ffffffb3, 0 6px 10px #00000066; }
.d-piece.is-captured { opacity:.35; box-shadow:0 0 0 3px var(--coral), 0 0 14px #ed7259; }
.d-cell.is-hot .d-piece { transform:scale(1.08); }
@keyframes dPulse { 50% { box-shadow:0 0 0 3px #f3bf49, 0 0 4px #f3bf4966, 0 3px 6px #00000059; } }
.d-dot { display:inline-block; width:10px; height:10px; margin-right:6px; border-radius:50%; vertical-align:-1px; box-shadow:0 0 0 1px #00000033; }
.d-dot.is-white { background:#f3ead6; }
.d-dot.is-black { background:#2a1c14; }
@media (max-width:420px) { .d-board-frame { padding:6px; border-radius:14px; } }
@media (prefers-reduced-motion: reduce) { .d-piece.is-movable, .d-cell.is-target::after { animation:none; } }

/* ---------- Chess ---------- */
.c-board-frame { width:100%; max-width:max(300px, calc(100vh - 360px)); margin:0 auto; box-sizing:border-box; padding:8px; border-radius:16px; background:linear-gradient(160deg,#3b4a3f,#26302a); box-shadow:inset 0 2px 0 #ffffff1f, 0 18px 40px #18261f40; }
.c-board { display:grid; grid-template-columns:repeat(8,1fr); aspect-ratio:1; border-radius:6px; overflow:hidden; }
.c-cell { position:relative; display:grid; place-items:center; aspect-ratio:1; border:0; padding:0; margin:0; font:inherit; container-type:inline-size; }
.c-cell.is-light { background:#eeeed2; }
.c-cell.is-dark { background:#769656; }
button.c-cell { cursor:pointer; }
.c-cell.is-last.is-light { background:#f6f682; }
.c-cell.is-last.is-dark { background:#baca44; }
.c-cell.is-selected { box-shadow:inset 0 0 0 100px #f3bf4999; }
.c-cell.is-check { background:radial-gradient(circle,#ff4d4d 0%,#e2412f99 45%,transparent 75%); }
.c-cell.is-movable .c-piece { filter:drop-shadow(0 0 3px #f3bf49) drop-shadow(0 0 1px #f3bf49); }
.c-cell.is-target::after { content:""; position:absolute; width:30%; height:30%; border-radius:50%; background:#18261f40; }
.c-cell.is-capture::after { content:""; position:absolute; inset:4%; border-radius:50%; box-shadow:inset 0 0 0 5px #18261f40; }
.c-piece { font-family:"Segoe UI Symbol","Noto Sans Symbols 2","DejaVu Sans","Apple Symbols",serif; font-size:82cqi; line-height:1; user-select:none; pointer-events:none; }
.c-piece.is-w { color:#fffdf6; -webkit-text-stroke:1.2px #2a2118; paint-order:stroke fill; text-shadow:0 2px 2px #00000040; }
.c-piece.is-b { color:#1d1a17; -webkit-text-stroke:.6px #000; text-shadow:0 2px 2px #00000040; }
.c-rank, .c-file { position:absolute; font-size:clamp(8px,1.6vw,11px); font-weight:800; line-height:1; pointer-events:none; }
.c-rank { top:3px; left:3px; }
.c-file { right:3px; bottom:3px; }
.c-cell.is-light .c-rank, .c-cell.is-light .c-file { color:#769656; }
.c-cell.is-dark .c-rank, .c-cell.is-dark .c-file { color:#eeeed2; }
.c-clock { min-width:74px; padding:8px 12px; border-radius:12px; background:var(--line); color:var(--muted); font-size:22px; font-weight:800; text-align:center; font-variant-numeric:tabular-nums; }
.c-clock.is-running { background:var(--ink); color:var(--paper); }
.c-clock.is-low.is-running { background:var(--coral); color:#fff; }
.c-captured { display:flex; align-items:center; flex-wrap:wrap; gap:0; min-height:18px; }
.c-captured b { margin-left:6px; font-size:12px; color:var(--muted); }
.c-taken { font-family:"Segoe UI Symbol","Noto Sans Symbols 2","DejaVu Sans",serif; font-size:16px; line-height:1; margin-right:-3px; }
.c-taken.is-w { color:#fffdf6; -webkit-text-stroke:.8px #2a2118; paint-order:stroke fill; }
.c-taken.is-b { color:#1d1a17; }
.c-moves { padding:10px 14px; border:1px solid var(--line); border-radius:14px; background:var(--paper); font-size:13px; line-height:1.7; max-height:76px; overflow-y:auto; overflow-wrap:anywhere; }
.c-moves b { color:var(--muted); font-weight:700; margin-left:4px; }
.c-offer { display:flex; align-items:center; gap:10px; flex-wrap:wrap; padding:10px 14px; border-radius:14px; background:var(--green-soft); }
.c-offer span { flex:1; font-weight:700; }
.c-draw-btn { padding:10px 12px; font-size:13px; }
.c-promo-options { display:grid; grid-template-columns:repeat(4,1fr); gap:10px; margin:14px 0; }
.c-promo-option { aspect-ratio:1; border:1px solid var(--line); border-radius:14px; background:#eeeed2; cursor:pointer; container-type:inline-size; display:grid; place-items:center; }
.c-promo-option:hover, .c-promo-option:focus-visible { background:#f6f682; }
@media (max-width:420px) { .c-board-frame { padding:5px; border-radius:12px; } .c-clock { min-width:64px; font-size:19px; padding:6px 10px; } }
.whot-topbar .game-stake-pill { display:inline-flex; }

/* ---------- Referrals ---------- */
.wallet-buckets { display:grid; grid-template-columns:repeat(auto-fit,minmax(150px,1fr)); gap:10px; margin:6px 0 8px; }
.wallet-buckets > div { display:flex; flex-direction:column; gap:2px; padding:12px 14px; border:1px solid var(--line); border-radius:14px; background:var(--paper); }
.wallet-buckets small { color:var(--muted); font-size:11px; font-weight:800; letter-spacing:.08em; text-transform:uppercase; }
.wallet-buckets strong { font-size:22px; font-variant-numeric:tabular-nums; }
.wallet-buckets span { color:var(--muted); font-size:12px; }
.referral-card { margin:18px 0; padding:18px; border-radius:18px; background:linear-gradient(135deg,var(--green-soft),var(--paper)); border:1px solid var(--line); }
.referral-card h3 { margin:4px 0 6px; }
.referral-link { display:flex; gap:8px; flex-wrap:wrap; margin:12px 0 6px; }
.referral-link input { flex:1 1 220px; min-width:0; padding:10px 12px; border:1px solid var(--line); border-radius:12px; background:var(--paper); color:var(--ink); font:inherit; font-size:14px; }
.referral-stats { display:flex; gap:18px; flex-wrap:wrap; margin:10px 0; font-size:14px; color:var(--muted); }
.referral-stats strong { color:var(--ink); }
.referral-cashout { display:flex; align-items:center; justify-content:space-between; gap:10px; flex-wrap:wrap; padding:10px 12px; border-radius:12px; background:var(--paper); border:1px solid var(--line); }
.invite-note { padding:10px 14px; border-radius:12px; background:var(--green-soft); color:var(--ink); font-size:14px; }

/* ---------- Lobby: compact game list ---------- */
.game-list { display:grid; grid-template-columns:repeat(auto-fill,minmax(300px,1fr)); gap:12px; }
.game-tile { display:flex; align-items:center; gap:14px; width:100%; padding:16px 18px; border:1px solid var(--line); border-radius:18px; background:var(--paper); box-shadow:var(--shadow); color:var(--ink); font:inherit; text-align:left; cursor:pointer; transition:transform .15s, box-shadow .15s, border-color .15s; }
@media (hover:hover) { .game-tile:hover { transform:translateY(-2px); border-color:var(--green); } }
.game-tile:focus-visible, .game-tile:has(:focus-visible) { border-color:var(--green); outline:none; }
.game-tile .competition-icon { flex:none; }
.game-tile-text { display:flex; flex-direction:column; gap:2px; min-width:0; flex:1; }
.game-tile-kind { color:var(--green-dark); font-size:11px; font-weight:800; letter-spacing:.1em; text-transform:uppercase; }
.game-tile-kind b { color:#c4492f; }
[data-theme="dark"] .game-tile-kind b, [data-theme="dark"] .welcome-game-text small b { color:#ff8f78; }
.game-tile strong { font-size:20px; line-height:1.2; }
.game-tile-line { color:var(--muted); font-size:14px; }
.game-tile-meta { color:var(--muted); font-size:12px; font-weight:700; margin-top:2px; }
.game-tile-waiting { color:var(--green); }
.game-tile-arrow { flex:none; color:var(--muted); font-size:20px; transition:transform .15s; }
.game-tile:hover .game-tile-arrow { transform:translateX(3px); color:var(--green); }
.lobby-back { align-self:flex-start; margin-bottom:4px; padding-left:0; }
.game-detail { margin-bottom:16px; }
.game-detail > .muted { min-height:0; }
@media (max-width:420px) { .game-list { grid-template-columns:1fr; } .game-tile { padding:14px; gap:12px; } .game-tile strong { font-size:18px; } }
/* Lobby logos for chess and draughts: always dark so they show on the light icon tiles. */
.icon-chess { font-family:"Segoe UI Symbol","Noto Sans Symbols 2","DejaVu Sans","Apple Symbols",serif; color:#1d1a17; font-size:1.15em; line-height:1; }
.icon-draughts { display:inline-block; width:1em; height:1em; border-radius:50%; background:radial-gradient(circle at 38% 32%,#5a4234 0%,#2a1c14 60%,#140c07 100%); box-shadow:0 2px 3px #00000059, inset 0 0 0 .12em #ffffff14, inset 0 0 0 .2em #3b2a1e; vertical-align:middle; }

/* ---------- 8-ball pool ---------- */
.pool-screen { max-width:900px; }
.p2 { display:flex; flex-direction:column; gap:10px; padding:12px; border-radius:22px; background:radial-gradient(120% 80% at 50% 0%,#24302b 0%,#121815 70%); color:#f3efe4; box-shadow:0 20px 50px #0b120f55; }
.p2-top { display:grid; grid-template-columns:1fr auto 1fr; align-items:center; gap:8px; }
.p2-player { display:flex; align-items:center; gap:8px; min-width:0; padding:6px 8px; border-radius:14px; background:#ffffff0d; border:1px solid #ffffff14; transition:background .2s, border-color .2s; }
.p2-player.is-them { flex-direction:row-reverse; text-align:right; }
.p2-player.is-turn { background:#f5c51817; border-color:#f5c51866; }
.p2-avatar { position:relative; flex:none; width:40px; height:40px; display:grid; place-items:center; }
.p2-avatar svg { position:absolute; inset:0; width:100%; height:100%; transform:rotate(-90deg); }
.p2-avatar b { width:30px; height:30px; display:grid; place-items:center; border-radius:50%; background:linear-gradient(135deg,#2f7d57,#14543a); font-weight:800; font-size:14px; }
.p2-player.is-them .p2-avatar b { background:linear-gradient(135deg,#7a4fd0,#43268a); }
.p2-ring-bg { fill:none; stroke:#ffffff1a; stroke-width:3; }
.p2-ring { fill:none; stroke:transparent; stroke-width:3; stroke-linecap:round; stroke-dasharray:125.66; stroke-dashoffset:0; transition:stroke-dashoffset .9s linear; }
.p2-player.is-turn .p2-ring { stroke:#f5c518; }
.p2-ring.is-low { stroke:#ff6b5e !important; }
.p2-who { display:flex; flex-direction:column; gap:3px; min-width:0; }
.p2-who strong { font-size:13px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.p2-balls { display:flex; flex-wrap:wrap; align-items:center; gap:2px; min-height:13px; }
.p2-player.is-them .p2-balls { justify-content:flex-end; }
.p2-balls em { font-style:normal; font-size:10px; font-weight:700; color:#c9c3b3; margin-right:3px; text-transform:uppercase; letter-spacing:.04em; }
.p2-open { font-size:11px; color:#c9c3b3; }
.p2-on8 { font-size:11px; color:#f5c518; margin-left:3px; }
.p2-mini { display:inline-block; width:11px; height:11px; border-radius:50%; background:var(--ball); box-shadow:inset -1px -2px 2px #00000055, inset 1px 1px 1px #ffffff40; }
.p2-mini.is-stripe { background:linear-gradient(#fbf8ef 0 24%, var(--ball) 24% 76%, #fbf8ef 76%); }
.p2-mid { display:flex; flex-direction:column; align-items:center; gap:4px; }
.p2-timer { font:800 18px/1 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing:.04em; min-height:18px; }
.p2-timer.warning { color:#ff6b5e; animation:p2-pulse .9s ease-in-out infinite; }
@keyframes p2-pulse { 50% { opacity:.45; } }
.p2-status { text-align:center; font-size:13px; font-weight:600; color:#d9d4c6; min-height:18px; }
.p2-status.is-mine { color:#fff; }
.p2-stage { display:flex; justify-content:center; align-items:flex-start; gap:10px; }
.p2 .p-table-wrap { position:relative; flex:1 1 auto; min-width:0; display:flex; justify-content:center; }
.p2 .p-table-wrap canvas { display:block; touch-action:none; border-radius:10px; box-shadow:0 22px 40px #00000080, 0 0 0 1px #00000060; cursor:crosshair; }
.p2-power { position:relative; flex:none; width:34px; border-radius:17px; background:linear-gradient(#0d1210,#1c2420); border:1px solid #ffffff1c; box-shadow:inset 0 2px 8px #000a; touch-action:none; cursor:ns-resize; overflow:hidden; outline:none; }
.p2-power:focus-visible { box-shadow:0 0 0 3px #f5c51888, inset 0 2px 8px #000a; }
.p2-power.is-off { opacity:.4; pointer-events:none; }
.p2-power-fill { position:absolute; left:0; right:0; top:0; background:linear-gradient(#3ad07a,#f5c518 55%,#ff5a3c); opacity:.85; }
.p2-power-cue { position:absolute; left:50%; width:10px; height:62%; transform:translate(-50%,-100%); margin-top:-4px; border-radius:5px 5px 2px 2px; background:linear-gradient(90deg,#b88a4c,#f7dfae 45%,#b88a4c); box-shadow:0 2px 4px #0008; }
.p2-power-cue::after { content:""; position:absolute; left:0; right:0; bottom:0; height:6px; border-radius:2px; background:#3b7fd6; }
.p2-power-label { position:absolute; left:0; right:0; bottom:8px; text-align:center; font:800 9px/1 system-ui, sans-serif; letter-spacing:.06em; color:#fff; text-shadow:0 1px 2px #000; pointer-events:none; }
.p2-toast { position:absolute; left:50%; top:42%; transform:translate(-50%,-50%); padding:10px 18px; border-radius:999px; background:#000000c4; color:#fff; font-weight:800; font-size:17px; letter-spacing:.01em; box-shadow:0 10px 30px #0008; pointer-events:none; white-space:nowrap; animation:p2-pop .25s ease-out; }
.p2-toast.is-good { background:linear-gradient(135deg,#1f9a5c,#137043); }
.p2-toast.is-foul { background:linear-gradient(135deg,#d6342c,#8f1e18); }
.p2-toast.is-warn { background:linear-gradient(135deg,#b7791f,#7a4e10); font-size:14px; }
.p2-toast[hidden] { display:none; }
@keyframes p2-pop { from { transform:translate(-50%,-50%) scale(.7); opacity:0; } }
.p2-controls { display:grid; grid-template-columns:auto 1fr; align-items:center; gap:10px; }
.p2-controls.is-off { opacity:.5; }
.p2-spin-btn { display:flex; flex-direction:column; align-items:center; gap:2px; padding:0; background:none; border:0; color:#c9c3b3; cursor:pointer; }
.p2-spin-btn small, .p2-wheel small { font-size:10px; font-weight:700; text-transform:uppercase; letter-spacing:.06em; }
.p2-spin-ball { position:relative; width:42px; height:42px; border-radius:50%; background:radial-gradient(circle at 36% 30%,#fff,#ece5d4 65%,#bdb39b); box-shadow:0 3px 8px #0008; }
.p2-spin-ball i { position:absolute; width:9px; height:9px; margin:-4.5px 0 0 -4.5px; border-radius:50%; background:#d6342c; box-shadow:0 0 0 2px #fff8; }
.p2-wheel { position:relative; height:46px; border-radius:12px; background:linear-gradient(#0b0f0d,#26302b 50%,#0b0f0d); border:1px solid #ffffff1c; touch-action:none; cursor:ew-resize; overflow:hidden; outline:none; display:flex; align-items:flex-end; justify-content:center; padding-bottom:3px; color:#c9c3b3; }
.p2-wheel:focus-visible { box-shadow:0 0 0 3px #f5c51888; }
.p2-wheel-ridges { position:absolute; inset:4px 0 16px; background-image:repeating-linear-gradient(90deg,#ffffff00 0 5px,#ffffff38 5px 6px,#00000066 6px 7px,#ffffff00 7px 10px); -webkit-mask-image:linear-gradient(90deg,transparent,#000 25%,#000 75%,transparent); mask-image:linear-gradient(90deg,transparent,#000 25%,#000 75%,transparent); }
.p2-rules { width:42px; height:42px; border-radius:50%; border:1px solid #ffffff2a; background:#ffffff10; color:#fff; font-weight:800; font-size:18px; cursor:pointer; }
.p2-foot { display:flex; justify-content:center; }
.p2-spin-big { position:relative; width:220px; height:220px; margin:12px auto 16px; border-radius:50%; background:radial-gradient(circle at 36% 30%,#fff,#ece5d4 62%,#b8ae95); box-shadow:0 12px 30px #0006, inset 0 0 0 1px #0001; touch-action:none; cursor:crosshair; }
.p2-spin-big::before, .p2-spin-big::after { content:""; position:absolute; background:#0000001f; }
.p2-spin-big::before { left:50%; top:10%; bottom:10%; width:1px; }
.p2-spin-big::after { top:50%; left:10%; right:10%; height:1px; }
.p2-spin-aim { position:absolute; width:26px; height:26px; margin:-13px 0 0 -13px; border-radius:50%; background:#d6342c; box-shadow:0 0 0 4px #ffffffb0, 0 3px 8px #0006; }
@media (max-width:640px) {
  .p2 { padding:10px 8px; border-radius:18px; }
  .p2-avatar { width:34px; height:34px; } .p2-avatar b { width:26px; height:26px; font-size:12px; }
  .p2-who strong { font-size:12px; }
  .p2-stage { gap:6px; }
  .p2-power { width:28px; }
}
.icon-pool { display:inline-grid; place-items:center; width:1.05em; height:1.05em; border-radius:50%; background:radial-gradient(circle at 36% 30%,#555 0%,#141414 55%,#000 100%); color:#141414; font:800 .48em/1 system-ui, sans-serif; position:relative; box-shadow:0 2px 3px #00000059; vertical-align:middle; }
.icon-pool::before { content:""; position:absolute; z-index:-1; width:52%; height:52%; border-radius:50%; background:#fbf8ef; }
.icon-pool { isolation:isolate; }

/* Game page: nothing to play with right now. */
.money-short { display:flex; flex-wrap:wrap; align-items:center; gap:10px 14px; margin:12px 0; padding:12px 14px; border-radius:14px; background:#fbefd2; color:#5c3d00; font-size:14px; }
.money-short span { flex:1 1 220px; }
.money-short .btn { padding:10px 16px; }
[data-theme="dark"] .money-short { background:#352a12; color:#f2c46a; }

/* ---------- Account security: devices, freeze ---------- */
.device-list { list-style:none; margin:0 0 12px; padding:0; display:grid; gap:8px; }
.device-list li { display:flex; flex-wrap:wrap; align-items:center; gap:6px 10px; padding:10px 12px; border:1px solid var(--line); border-radius:12px; }
.device-list li .muted { margin-left:auto; font-size:13px; }
.btn.btn-danger { background:#b8402f; border-color:#b8402f; color:#fff; }
.btn.btn-danger:hover:not(:disabled) { background:#9a3426; }

.peak-line { margin:0 0 12px; color:var(--muted); font-size:13px; font-weight:600; }
.open-tickets.is-busy { border:1px solid var(--green); }

/* ---------- Account page groups ---------- */
.account-group { border:1px solid var(--line); border-radius:16px; margin:12px 0; background:var(--paper); }
.account-group > summary { display:grid; gap:2px; padding:14px 44px 14px 16px; cursor:pointer; list-style:none; position:relative; min-height:56px; }
.account-group > summary::-webkit-details-marker { display:none; }
.account-group > summary::after { content:"›"; position:absolute; right:18px; top:50%; transform:translateY(-50%) rotate(90deg); color:var(--muted); font-size:22px; transition:transform .15s; }
.account-group[open] > summary::after { transform:translateY(-50%) rotate(-90deg); }
.account-group-title { font-weight:800; font-size:17px; }
.account-group-sub { color:var(--muted); font-size:13px; }
.account-group-body { padding:0 16px 8px; border-top:1px solid var(--line); }
.account-group-body > section { border:0; margin:0; padding:14px 0; background:none; box-shadow:none; }
.account-group-body > section + section { border-top:1px solid var(--line); }
#limitsForm { display:grid; gap:12px; margin-bottom:18px; }
#limitsForm .btn { justify-self:start; }

/* ---------- Challenge a friend sheet (challenges.js) ---------- */
.challenge-sheet { display:grid; gap:10px; }
.challenge-sheet h2 { margin:0; }
.cs-label { font-size:12px; font-weight:800; letter-spacing:.08em; text-transform:uppercase; color:var(--muted); margin-top:4px; }
.cs-games { display:grid; grid-template-columns:repeat(auto-fill,minmax(130px,1fr)); gap:8px; }
.cs-game, .cs-amount { display:flex; align-items:center; gap:8px; min-height:48px; padding:6px 10px; border:1px solid var(--line); border-radius:12px; background:var(--paper); color:var(--ink); font:inherit; font-weight:700; font-size:14px; text-align:left; cursor:pointer; }
.cs-game.is-active, .cs-amount.is-active { border-color:var(--green); box-shadow:inset 0 0 0 1px var(--green); background:var(--green-soft); }
.cs-icon .gi { width:28px; height:28px; }
.cs-amounts { display:flex; flex-wrap:wrap; gap:8px; }
.cs-amount { justify-content:center; min-width:96px; }
.cs-amount:disabled { opacity:.45; cursor:not-allowed; }

/* ---------- One bar on top of every game (match.js gameBar) ---------- */
body:is([data-screen="game"],[data-screen="whot"],[data-screen="ayo"],[data-screen="draughts"],[data-screen="chess"],[data-screen="pool"],[data-screen="penalty"]) .topbar,
body:is([data-screen="game"],[data-screen="whot"],[data-screen="ayo"],[data-screen="draughts"],[data-screen="chess"],[data-screen="pool"],[data-screen="penalty"]) .site-footer { display:none; }
body:is([data-screen="game"],[data-screen="whot"],[data-screen="ayo"],[data-screen="draughts"],[data-screen="chess"],[data-screen="pool"],[data-screen="penalty"]) #screen { padding-top:max(10px, env(safe-area-inset-top, 0px)); padding-bottom:88px; }
.game-bar { display:grid; grid-template-columns:auto minmax(0,1fr) auto; align-items:center; gap:10px; margin:0 0 10px; padding:6px; border:1px solid var(--line); border-radius:16px; background:var(--paper); }
.game-bar .game-bar-leave { min-height:44px; padding:8px 12px; border:0; border-radius:12px; background:#f2ead7; color:var(--ink); font-weight:800; font-size:13px; white-space:nowrap; }
.game-bar-title { display:grid; min-width:0; text-align:center; line-height:1.2; }
.game-bar-title strong { font-size:15px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.game-bar-title span { color:var(--muted); font-size:12px; font-weight:700; white-space:nowrap; }
.game-bar-actions { display:flex; align-items:center; gap:4px; }
.game-bar-icon, .game-bar .watch-share-btn { width:44px; height:44px; display:grid; place-items:center; padding:0; border:0; border-radius:12px; background:transparent; color:var(--ink); font-size:17px; font-weight:800; }
.game-bar-icon:hover, .game-bar .watch-share-btn:hover { background:#f2ead7; }
[data-theme="dark"] .game-bar .game-bar-leave { background:#243029; }
[data-theme="dark"] .game-bar-icon:hover, [data-theme="dark"] .game-bar .watch-share-btn:hover { background:#243029; }
.game-timer-row { display:flex; justify-content:flex-end; align-items:center; gap:10px; min-height:0; margin:-4px 0 6px; }
.game-timer-row:empty { display:none; }
.pool-screen .game-bar { background:#ffffff10; border-color:#ffffff1f; color:#f3efe4; }
.pool-screen .game-bar .game-bar-leave { background:#ffffff14; color:#f3efe4; }
.pool-screen .game-bar-title span { color:#c9c3b3; }
.pool-screen .game-bar-icon { color:#f3efe4; }
.pool-screen .game-bar-icon:hover { background:#ffffff14; }
@media (max-width:380px) { .game-bar .game-bar-leave { padding:8px 9px; font-size:12px; } .game-bar-icon, .game-bar .watch-share-btn { width:40px; } }

/* ---------- In-game chat ---------- */
#chatDock { position:fixed; right:16px; bottom:16px; z-index:60; display:flex; flex-direction:column; align-items:flex-end; gap:8px; pointer-events:none; }
#chatDock[hidden] { display:none; }
#chatDock > * { pointer-events:auto; }
.chat-fab { position:relative; width:54px; height:54px; border:0; border-radius:50%; background:var(--green); color:#fff; font-size:24px; box-shadow:0 10px 26px #18261f55; cursor:pointer; }
#chatDock.is-open .chat-fab { display:none; }
.chat-badge { position:absolute; top:-3px; right:-3px; min-width:20px; height:20px; padding:0 5px; border-radius:10px; background:var(--coral); color:#fff; font-size:11px; font-weight:800; line-height:20px; box-shadow:0 0 0 2px var(--cream); }
.chat-peek { max-width:240px; padding:10px 14px; border-radius:16px 16px 4px 16px; background:var(--paper); border:1px solid var(--line); box-shadow:var(--shadow); font-size:14px; cursor:pointer; overflow-wrap:anywhere; animation:chatIn .2s ease; }
.chat-panel { display:flex; flex-direction:column; width:min(360px, calc(100vw - 32px)); height:min(460px, calc(100vh - 120px)); border:1px solid var(--line); border-radius:20px; background:var(--paper); box-shadow:0 18px 48px #18261f40; overflow:hidden; animation:chatIn .2s ease; }
.chat-head { display:flex; align-items:center; gap:6px; padding:10px 10px 10px 16px; border-bottom:1px solid var(--line); }
.chat-head strong { flex:1; font-size:15px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.chat-mute, .chat-close { padding:6px 10px; font-size:13px; }
.chat-close { font-size:20px; line-height:1; }
.chat-list { flex:1; margin:0; padding:12px; list-style:none; overflow-y:auto; display:flex; flex-direction:column; gap:6px; }
.chat-msg { display:flex; flex-direction:column; max-width:80%; }
.chat-msg.is-mine { align-self:flex-end; align-items:flex-end; }
.chat-msg.is-theirs { align-self:flex-start; align-items:flex-start; }
.chat-bubble { padding:8px 12px; border-radius:16px; font-size:14px; line-height:1.35; overflow-wrap:anywhere; }
.chat-msg.is-mine .chat-bubble { background:var(--green); color:#fff; border-bottom-right-radius:4px; }
.chat-msg.is-theirs .chat-bubble { background:var(--line); color:var(--ink); border-bottom-left-radius:4px; }
.chat-report { margin-top:2px; padding:0 4px; border:0; background:none; color:var(--muted); font-size:11px; cursor:pointer; }
.chat-report:disabled { cursor:default; opacity:.7; }
.chat-empty { margin:auto; color:var(--muted); font-size:14px; text-align:center; }
.chat-quick { display:flex; gap:6px; padding:8px 12px 0; overflow-x:auto; scrollbar-width:none; }
.chat-chip { flex:none; padding:6px 10px; border:1px solid var(--line); border-radius:999px; background:var(--cream); color:var(--ink); font:inherit; font-size:13px; cursor:pointer; white-space:nowrap; }
.chat-chip:hover { border-color:var(--green); }
.chat-form { display:flex; gap:8px; padding:10px 12px 4px; }
.chat-form input { flex:1; min-width:0; padding:10px 12px; border:1px solid var(--line); border-radius:12px; background:var(--cream); color:var(--ink); font:inherit; font-size:15px; }
.chat-form .btn { padding:10px 14px; }
.chat-note { margin:0; padding:0 12px 10px; color:var(--muted); font-size:11px; }
.chat-note.is-error { color:#c2412d; font-weight:700; }
@keyframes chatIn { from { opacity:0; transform:translateY(8px); } }
@media (max-width:480px) {
  #chatDock { right:12px; bottom:12px; }
  #chatDock.is-open { left:0; right:0; bottom:0; align-items:stretch; }
  .chat-panel { width:100%; height:min(70vh, 520px); border-radius:20px 20px 0 0; }
}
.chat-panel[hidden], .chat-peek[hidden], .chat-badge[hidden] { display:none; }

/* ---------- Stable game layout ----------
   Nothing above a board may change height between moves (timer text, turn labels, messages and
   buttons that come and go), otherwise the board jumps after every move on phones. */
.turn-timer { white-space:nowrap; box-sizing:border-box; min-width:10.5em; }
.game-topline { flex-wrap:nowrap; gap:10px; }
.game-title { min-width:0; }
.game-title .eyebrow { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.game-turn-meta { flex:none; }
.duel-role { display:block; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.duel-player-info strong { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.game-table-message strong { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.whot-topbar { flex-wrap:nowrap; }
.whot-topbar > div:first-child { min-width:0; }
.whot-topbar .eyebrow { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.whot-topbar-actions { flex:none; }
.whot-player-info strong, .whot-player-info > span { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.whot-status { min-height:2.8em; line-height:1.4; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.c-draw-btn.is-unavailable { visibility:hidden; }
@media (max-width:560px) {
  .whot-topbar { display:grid; grid-template-columns:1fr; gap:8px; align-items:stretch; }
  .whot-topbar-actions { justify-content:space-between; }
  .whot-topbar .eyebrow { margin-bottom:4px; }
  .game-experience .turn-timer { min-width:11.5em; }
}

/* Compact chat: a smaller panel so most of the board stays visible. */
.chat-panel { width:min(320px, calc(100vw - 32px)); height:min(380px, calc(100vh - 140px)); }
.chat-head { padding:6px 6px 6px 14px; }
.chat-head strong { font-size:14px; }
.chat-list { padding:8px 10px; gap:4px; }
.chat-bubble { padding:6px 10px; font-size:13px; }
.chat-quick { padding:6px 10px 0; }
.chat-chip { padding:5px 9px; font-size:12px; }
.chat-form { padding:8px 10px 8px; }
.chat-form input { padding:8px 10px; font-size:15px; }
.chat-form .btn { padding:8px 12px; }
.chat-note { display:none; padding:0 10px 8px; }
.chat-note.is-error { display:block; }
@media (max-width:480px) {
  #chatDock.is-open { left:8px; right:8px; bottom:8px; }
  .chat-panel { width:100%; height:min(40vh, 300px); border-radius:18px; box-shadow:0 10px 30px #18261f55; }
}
.chat-msg.is-theirs { flex-direction:row; align-items:center; gap:4px; }
.chat-report { margin:0; padding:2px 4px; font-size:13px; opacity:.55; }
.chat-report:hover { opacity:1; }
.game-tile.is-coming-soon { cursor:default; box-shadow:none; background:var(--cream); border-style:dashed; }
.game-tile.is-coming-soon:hover { transform:none; border-color:var(--line); }
.game-tile.is-coming-soon .competition-icon, .game-tile.is-coming-soon .game-tile-text { opacity:.6; }
.coming-soon-badge { flex:none; padding:5px 10px; border-radius:999px; background:#f3e3c7; color:#7a5a1d; font-size:11px; font-weight:800; letter-spacing:.06em; text-transform:uppercase; }
.game-tile .icon-pool { width:1.35em; height:1.35em; font-size:1em; }
.game-tile .icon-pool::before { width:50%; height:50%; }

/* ---------- Telegram join prompt ---------- */
.tg-prompt { display:flex; align-items:center; gap:10px; margin-top:14px; padding:10px 12px; border:1px solid #cfe2f3; border-radius:14px; background:#eef6fd; color:var(--ink); text-decoration:none; text-align:left; font-size:14px; line-height:1.35; }
.tg-prompt:hover { border-color:#2aabee; }
.tg-icon { flex:none; display:grid; place-items:center; width:30px; height:30px; border-radius:50%; background:#2aabee; color:#fff; }
.tg-text { flex:1; min-width:0; }
.tg-join { flex:none; padding:6px 12px; border-radius:999px; background:#1877b8; color:#fff; font-size:13px; font-weight:800; }
.tg-prompt.is-compact { padding:8px 10px; font-size:13px; }
.tg-prompt.is-compact .tg-icon { width:26px; height:26px; }
.tg-prompt.is-delayed { animation:tgReveal .4s ease 20s both; }
@keyframes tgReveal { from { opacity:0; visibility:hidden; transform:translateY(6px); } to { opacity:1; visibility:visible; transform:none; } }
[data-theme="dark"] .tg-prompt { background:#132433; border-color:#1f3d55; }
@media (prefers-reduced-motion: reduce) { .tg-prompt.is-delayed { animation-duration:.01s; } }

/* ---------- Account email ---------- */
.email-banner { display:flex; align-items:center; gap:12px; margin:14px 0; padding:12px 14px; border-radius:14px; background:var(--green-soft); border:1px solid #c6e2cb; font-size:14px; line-height:1.45; }
.email-banner-icon { flex:none; font-size:20px; }
.email-banner-text { flex:1; min-width:0; }
.email-banner .btn { flex:none; padding:9px 14px; font-size:13px; }
.email-banner-close { flex:none; width:30px; height:30px; border:0; border-radius:50%; background:transparent; color:#5e665a; font-size:20px; line-height:1; cursor:pointer; }
.email-banner-close:hover { background:rgba(0,0,0,.06); }
.email-card { margin-top:28px; padding-top:6px; }
.email-current { display:flex; flex-wrap:wrap; align-items:center; gap:8px; }
.verified-pill { display:inline-block; padding:3px 9px; border-radius:999px; background:var(--green-soft); color:var(--green-dark); font-size:12px; font-weight:800; }
.code-input { font-size:24px !important; letter-spacing:8px; text-align:center; font-variant-numeric:tabular-nums; }
@media (max-width:560px) {
  .email-banner { flex-wrap:wrap; }
  .email-banner-text { flex-basis:calc(100% - 80px); }
  .email-banner .btn { margin-left:32px; }
}
[data-theme="dark"] .email-banner { background:#16271d; border-color:#24432f; }
[data-theme="dark"] .verified-pill { background:#16271d; color:#8fd1a6; }

/* ---------- Challenge a friend and win cards ---------- */
.play-mode { display:grid; grid-template-columns:1fr 1fr; gap:4px; margin:6px 0 12px; padding:4px; border-radius:14px; background:#efe8d8; }
.play-mode button { border:0; border-radius:10px; padding:10px 8px; background:transparent; color:#5e665a; font:inherit; font-weight:800; font-size:14px; cursor:pointer; }
.play-mode button.is-active { background:#fff; color:var(--green-dark); box-shadow:0 1px 3px rgba(0,0,0,.08); }
.play-mode-note { font-size:13px; margin:0 0 12px; }
.challenge-share { margin:16px 0; }
.challenge-share-buttons { display:flex; flex-wrap:wrap; justify-content:center; gap:8px; }
.challenge-share-buttons .btn { flex:1 1 110px; justify-content:center; }
.challenge-share.is-compact { margin-top:18px; padding-top:14px; border-top:1px solid #ebe4d4; }
.challenge-share.is-compact .btn { padding:9px 12px; font-size:13px; }
.challenge-share-title { margin:0 0 10px; font-size:13px; font-weight:700; color:#5e665a; }
.btn-whatsapp { background:#25d366; color:#06331a; border-color:#25d366; text-decoration:none; }
.btn-whatsapp:hover { background:#1fbe5b; }
.share-row { display:flex; flex-wrap:wrap; justify-content:center; gap:10px; margin-top:12px; }
.win-card-modal { max-width:420px; }
.win-card-preview { display:block; width:100%; max-width:240px; margin:8px auto 12px; border-radius:16px; box-shadow:0 6px 24px rgba(0,0,0,.18); }
[data-theme="dark"] .play-mode { background:#1d2621; }
[data-theme="dark"] .play-mode button.is-active { background:#2a352f; color:#8fd1a6; }
[data-theme="dark"] .challenge-share.is-compact { border-color:#2a352f; }
.challenge-share-buttons .btn, .win-card-modal .btn, .btn-whatsapp { display:inline-flex; align-items:center; justify-content:center; text-decoration:none; }

/* Popups taller than the screen (identity, email) scroll inside themselves on small phones. */
.modal { max-height:calc(100vh - 40px); max-height:calc(100dvh - 40px); overflow-y:auto; overscroll-behavior:contain; }

/* Arena tournaments */
.arena-strip { display:grid; grid-template-columns:repeat(auto-fill, minmax(260px, 1fr)); gap:12px; margin:14px 0 4px; }
.arena-strip > .eyebrow { grid-column:1 / -1; }
.arena-card { display:flex; flex-direction:column; gap:6px; padding:16px 18px; border:1px solid #f0d58f; border-radius:18px; background:linear-gradient(135deg, #fff8e4, var(--paper)); box-shadow:var(--shadow); color:var(--ink); font:inherit; text-align:left; cursor:pointer; transition:transform .15s, border-color .15s; }
.arena-card:hover, .arena-card:focus-visible { transform:translateY(-2px); border-color:var(--yellow); outline:none; }
.arena-card strong { font-size:19px; line-height:1.2; }
.arena-card-top { display:flex; justify-content:space-between; align-items:center; gap:8px; flex-wrap:wrap; }
.arena-card-line { color:var(--muted); font-size:13px; }
.arena-card-line b { color:var(--green); }
.arena-card-prizes { font-size:13px; font-weight:700; color:var(--green-dark); }
.arena-entry { font-size:12px; font-weight:800; color:var(--muted); }
.arena-badge { display:inline-block; padding:4px 9px; border-radius:20px; background:var(--green-soft); color:var(--green-dark); font-size:11px; font-weight:800; letter-spacing:.05em; }
.arena-badge.is-live { background:#fde6e0; color:#b8432c; }
.arena-badge.is-live:before { content:""; display:inline-block; width:7px; height:7px; border-radius:50%; background:var(--coral); margin-right:6px; animation:arenaPulse 1.4s infinite; }
.arena-badge.is-done { background:#eeeae0; color:var(--muted); }
@keyframes arenaPulse { 50% { opacity:.3; } }
.arena-page { display:flex; flex-direction:column; gap:14px; }
.arena-head h1 { font-size:clamp(30px, 5vw, 48px); margin:10px 0; }
.arena-prizes { display:flex; flex-direction:column; gap:3px; padding:12px 14px; margin:12px 0; border-radius:14px; background:#fff8e4; border:1px solid #f0d58f; }
.arena-prizes span { font-size:17px; font-weight:800; color:var(--green-dark); }
.arena-prizes small { color:var(--muted); }
.arena-me { display:flex; flex-wrap:wrap; align-items:baseline; gap:6px 12px; margin:12px 0; padding:12px 14px; border-radius:14px; background:var(--green-soft); }
.arena-me strong { font-size:24px; }
.arena-me em { flex-basis:100%; font-style:normal; font-size:13px; color:var(--green-dark); font-weight:700; }
.arena-me .arena-won { color:#b8432c; }
.arena-note { margin:0; color:var(--muted); flex-basis:100%; }
.arena-live { margin:10px 0 0; font-size:13px; }
.arena-standings { overflow-x:auto; }
.arena-table { width:100%; border-collapse:collapse; margin-top:10px; font-size:14px; }
.arena-table th { text-align:left; font-size:11px; letter-spacing:.08em; text-transform:uppercase; color:var(--muted); padding:6px 8px; border-bottom:1px solid var(--line); }
.arena-table td { padding:9px 8px; border-bottom:1px solid var(--line); }
.arena-table tr.is-me td { background:var(--green-soft); font-weight:800; }
.arena-table td:first-child { width:32px; font-weight:800; }
[data-theme="dark"] .arena-card { background:linear-gradient(135deg, #2c2716, var(--paper)); border-color:#5a4a1e; }
[data-theme="dark"] .arena-prizes { background:#2c2716; border-color:#5a4a1e; }
[data-theme="dark"] .arena-badge.is-live { background:#3d221c; color:#f39a86; }
[data-theme="dark"] .arena-badge.is-done { background:#2a302b; }
.arena-head .arena-card-top { margin-bottom:12px; }

/* Happy hour */
.peak-banner { display:flex; gap:10px; align-items:flex-start; margin:12px 0; padding:12px 14px; border-radius:14px; background:#fff3dc; border:1px solid #f3cf82; color:var(--ink); font-size:14px; line-height:1.5; }
.peak-banner.is-on { background:#fde6e0; border-color:#f2a493; }
.peak-banner strong { color:#b8432c; }
.peak-flame { font-size:18px; line-height:1.2; }
[data-theme="dark"] .peak-banner { background:#2c2716; border-color:#5a4a1e; }
[data-theme="dark"] .peak-banner.is-on { background:#3d221c; border-color:#7a3a2c; }
[data-theme="dark"] .peak-banner strong { color:#f39a86; }

/* Invite reward checklist */
.invite-check { margin:12px 0; padding:14px 16px; border-radius:14px; background:var(--green-soft); border:1px solid #bfe0c5; display:flex; flex-direction:column; gap:8px; }
.invite-check ol { list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:6px; }
.invite-check li { display:flex; gap:8px; align-items:baseline; color:var(--ink); }
.invite-check li span { width:18px; flex:none; font-weight:800; color:var(--muted); }
.invite-check li.is-done { color:var(--muted); }
.invite-check li.is-done span { color:var(--green); }
.invite-check .btn { align-self:flex-start; }
.invite-check small { font-size:12px; }
[data-theme="dark"] .invite-check { border-color:#2c4a37; }

/* Friend challenges and notifications */
.my-challenges { display:flex; flex-direction:column; gap:8px; margin:12px 0; }
.my-challenge { display:flex; justify-content:space-between; align-items:center; gap:10px; flex-wrap:wrap; padding:12px 14px; border-radius:14px; background:var(--paper); border:1px solid var(--line); font-size:14px; }
.my-challenge.is-ready { border-color:var(--green); background:var(--green-soft); }
.my-challenge-actions { display:flex; gap:4px; }
.my-challenge .btn { padding:8px 12px; }
.challenge-countdown { font-size:22px; font-weight:800; color:var(--green-dark); margin:8px 0; font-variant-numeric:tabular-nums; }
.challenge-ready h2 { color:var(--green-dark); }
.challenge-push { display:flex; flex-direction:column; gap:8px; align-items:center; margin:14px 0; padding:14px; border-radius:14px; background:#fff3dc; border:1px solid #f3cf82; }
.challenge-push p { margin:0; }
.challenge-push-on { margin:12px 0; }
[data-theme="dark"] .challenge-push { background:#2c2716; border-color:#5a4a1e; }

/* Watching a game (spectator links) */
.watch-card { max-width:640px; margin:0 auto; display:flex; flex-direction:column; gap:10px; }
.watch-head { display:flex; justify-content:space-between; align-items:center; gap:8px; flex-wrap:wrap; }
.watch-live { padding:4px 10px; border-radius:20px; background:#eeeae0; color:var(--muted); font-size:11px; font-weight:800; letter-spacing:.08em; }
.watch-live.is-live { background:#fde6e0; color:#b8432c; }
.watch-live.is-live:before { content:""; display:inline-block; width:7px; height:7px; border-radius:50%; background:var(--coral); margin-right:6px; animation:arenaPulse 1.4s infinite; }
.watch-title { font-size:clamp(22px, 5vw, 32px); margin:0; }
.watch-title .vs { color:var(--muted); font-size:.6em; }
.watch-players { display:flex; gap:8px; }
.watch-player { flex:1; display:flex; flex-direction:column; gap:2px; padding:10px 12px; border-radius:12px; border:1px solid var(--line); background:var(--paper); font-size:14px; }
.watch-player.is-turn { border-color:var(--green); background:var(--green-soft); }
.watch-player span { color:var(--muted); font-size:13px; }
.watch-board { display:flex; flex-direction:column; gap:10px; }
.watch-backs { display:flex; flex-wrap:wrap; gap:3px; margin-top:4px; }
.whot-card.is-mini { width:22px; height:32px; border-radius:4px; }
.whot-card.is-mini .back-mark { font-size:12px; }
.watch-whot-table { display:flex; align-items:center; justify-content:center; gap:16px; padding:16px; border-radius:14px; background:#1f5b3f; color:#fff; flex-wrap:wrap; }
.watch-whot-table .muted { color:#d7eadf; }
.watch-called { display:flex; align-items:center; gap:6px; font-weight:700; }
.watch-message { color:var(--muted); font-size:14px; margin:0; min-height:1.4em; }
.watch-end, .watch-cta { display:flex; flex-direction:column; align-items:center; gap:8px; padding:14px; border-radius:14px; background:var(--green-soft); text-align:center; }
.watch-cta { flex-direction:row; justify-content:space-between; background:transparent; border:1px dashed var(--line); }
.watch-share-btn { padding:8px 10px; }

/* "I've sent it" bank-transfer notices */
.deposit-notice { display:flex; flex-direction:column; gap:8px; align-items:flex-start; margin:12px 0; padding:12px 14px; border-radius:14px; background:var(--green-soft); }
.deposit-notice .wallet-list { margin:0; width:100%; }
.deposit-notice small { font-size:12px; }
/* "Deposit to wallet" and the deposit page, with "I've sent it" pinned to the bottom of the screen */
.deposit-entry { display:flex; flex-direction:column; gap:8px; margin:10px 0 14px; }
.deposit-entry .wallet-list { margin:0; }
.deposit-entry-btn { width:100%; justify-content:center; min-height:52px; font-size:17px; }
.deposit-page { padding-bottom:0; }
.deposit-steps { list-style:none; padding:0; margin:18px 0 8px; display:flex; flex-direction:column; gap:18px; }
.deposit-steps li { display:flex; gap:12px; align-items:flex-start; }
.deposit-steps li > div { flex:1; min-width:0; display:flex; flex-direction:column; gap:6px; }
.deposit-steps .bank-card { margin:2px 0 0; }
.deposit-steps small { font-size:13px; }
.step-no { flex:none; width:28px; height:28px; border-radius:50%; display:grid; place-items:center; background:var(--green); color:#fff; font-weight:800; font-size:14px; margin-top:1px; }
.deposit-sent-bar { position:sticky; bottom:0; z-index:5; margin:16px -24px 0; padding:12px 24px calc(12px + env(safe-area-inset-bottom)); background:linear-gradient(to top, var(--paper) 75%, transparent); }
.deposit-sent-btn { width:100%; justify-content:center; min-height:56px; font-size:18px; box-shadow:0 10px 24px rgba(31,135,88,.28); }
.deposit-leave { text-align:center; margin:4px 0 18px; }
/* "How did you hear about Rake?" */
.source-answers { display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:8px; margin:16px 0 12px; }
.source-answers .btn { justify-content:center; min-height:44px; padding:10px 12px; }
.source-answers .btn.is-picked { outline:2px solid var(--green); outline-offset:1px; }
.source-detail { display:flex; flex-wrap:wrap; gap:8px; align-items:center; margin-bottom:12px; }
.source-detail[hidden] { display:none; }
.source-detail label { width:100%; font-size:13px; font-weight:700; }
.source-detail input { flex:1; min-width:0; padding:11px 12px; border:1px solid var(--line); border-radius:12px; background:var(--paper); color:var(--ink); font:inherit; }

/* "Add Rake to your home screen" (install.js) */
.install-bar { position:fixed; left:12px; right:12px; bottom:calc(12px + env(safe-area-inset-bottom)); z-index:15; max-width:520px; margin:0 auto; display:flex; align-items:center; gap:12px; padding:10px 12px; background:var(--paper); border:1px solid var(--line); border-radius:16px; box-shadow:0 10px 30px #0000002e; }
.install-bar img { border-radius:10px; flex:none; }
.install-text { display:grid; gap:1px; min-width:0; flex:1; font-size:13px; line-height:1.3; }
.install-text strong { font-size:14px; }
.install-text span { color:var(--muted); }
.install-bar .btn { flex:none; padding:9px 16px; }
.install-x { flex:none; width:34px; height:34px; border:0; border-radius:50%; background:transparent; color:var(--muted); font-size:22px; line-height:1; cursor:pointer; }
.install-steps { padding-left:22px; line-height:1.6; display:grid; gap:10px; margin:14px 0; }
.install-glyph { width:18px; height:18px; vertical-align:-3px; color:var(--green); }

/* Free play or cash (lobby) */
.money-mode { margin-top:10px; }
.money-mode button[disabled] { opacity:.5; cursor:not-allowed; }
.money-note { margin:6px 0 12px; font-size:13px; }
.tier-card.is-free small { color:var(--green); }
.free-tag { display:inline-block; padding:1px 6px; border-radius:6px; background:var(--green); color:#fff; font-size:10px; letter-spacing:.4px; }
.tier-card[disabled] { opacity:.5; cursor:not-allowed; }

/* Signup: on phones the green panel goes, so the form starts at the top of the screen. */
@media(max-width:760px) { .form-layout .form-aside { display:none; } }
.code-fields { margin:4px 0 14px; }
.code-fields summary { cursor:pointer; color:var(--green); font-weight:700; font-size:14px; padding:6px 0; }
.code-fields[open] summary { margin-bottom:8px; }

/* Lobby: a game tile opens the game's page; its Play button starts a game in one tap. */
.game-tile:has(.game-tile-open) { padding:0; gap:0; cursor:default; }
.game-tile:has(.game-tile-open):hover { transform:none; }
.game-tile-open { display:flex; align-items:center; gap:14px; flex:1; min-width:0; padding:14px 6px 14px 16px; border:0; background:none; color:inherit; font:inherit; text-align:left; cursor:pointer; border-radius:18px 0 0 18px; }
.game-tile-open:focus-visible { outline:2px solid var(--green); outline-offset:-2px; }
.game-tile-play { flex:none; align-self:center; margin-right:14px; min-width:82px; padding:10px 12px; border:0; border-radius:13px; background:var(--green); color:#fff; font:inherit; font-weight:800; font-size:15px; line-height:1.15; text-align:center; cursor:pointer; box-shadow:0 6px 14px #1f87582e; }
.game-tile-play small { display:block; font-size:11px; font-weight:700; }
.game-tile-play:hover, .game-tile-play:focus-visible { background:var(--green-dark); outline:none; }
.lobby-head { margin-bottom:18px; }
.lobby-head h1 { font-size:clamp(30px,5vw,48px); }
.competition-footnote .link-button { font-size:inherit; }
/* Lobby layout: fixed columns so the rows line up, text aligned to the top of each tile, and a last
   tile left on its own fills the row instead of leaving a gap. */
.game-list { grid-template-columns:1fr; }
@media (min-width:640px) { .game-list { grid-template-columns:repeat(2,minmax(0,1fr)); } .game-list > .game-tile:last-child:nth-child(odd) { grid-column:1 / -1; } }
@media (min-width:1000px) {
  .game-list { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .game-list > .game-tile:last-child:nth-child(odd) { grid-column:auto; }
  .game-list > .game-tile:last-child:nth-child(3n+1) { grid-column:1 / -1; }
}
.game-tile:has(.game-tile-open) { align-items:stretch; }
.game-tile-open { align-items:flex-start; padding-top:18px; padding-bottom:18px; }
.game-list + .open-tickets { margin-top:18px; }
.game-tile-open .game-tile-text { padding-top:1px; }
/* Game icons (core.js GAME_ICONS): one drawn set on one tile colour. */
.gi { display:block; width:38px; height:38px; --gi-ink:#18261f; --gi-paper:#fffdf8; --gi-accent:#ed7259; }
.gi .gi-paper { fill:var(--gi-paper); }
.gi .gi-ink { fill:var(--gi-ink); }
.gi .gi-ink-fill { fill:var(--gi-ink); }
.gi .gi-line { stroke:var(--gi-ink); stroke-width:2.4; stroke-linecap:round; stroke-linejoin:round; }
.gi path.gi-line:not(.gi-paper), .gi .gi-ring { fill:none; }
.gi .gi-ink-line { fill:none; stroke:var(--gi-ink); stroke-width:1.8; }
.gi .gi-accent { fill:var(--gi-accent); }
.gi .gi-accent-join { stroke:var(--gi-accent); stroke-width:1.2; stroke-linejoin:round; }
.gi .gi-accent-line { fill:none; stroke:var(--gi-accent); stroke-width:2.2; stroke-linecap:round; }
[data-theme="dark"] .gi { --gi-ink:#e9f3ea; --gi-paper:#16271e; }
.queue-orbit .gi { width:46px; height:46px; }
/* The fee line closes the lobby, centred over a rule, readable size. */
.competition-home > .competition-footnote { margin:22px 0 0; padding-top:16px; border-top:1px solid var(--line); text-align:center; font-size:13px; }
/* Footer: readable size and contrast, wraps onto two lines when it needs to. */
.site-footer { flex-wrap:wrap; align-items:center; gap:10px 24px; font-size:11px; letter-spacing:.6px; color:#66685f; }
.site-footer .footer-links { flex-wrap:wrap; gap:6px 16px; }
[data-theme="dark"] .site-footer { color:#9aa59b; }
#screen { padding-bottom:40px; }
/* Game page: the name, then the amounts, then the rules. */
.game-detail-head { display:flex; align-items:center; gap:14px; margin-bottom:14px; }
.game-detail-head h2 { margin:2px 0 0; }
.game-detail .tier-grid { margin-bottom:14px; }
.game-detail-about { margin-top:16px; }

/* Lobby: online now, rematches, recent wins, "Notify me". */
.lobby-pulse { display:flex; flex-wrap:wrap; gap:8px; margin:-6px 0 16px; }
.pulse-chip { display:inline-flex; align-items:center; gap:6px; padding:6px 11px; border-radius:999px; background:#e7f3ec; color:var(--green-dark); font-size:13px; font-weight:700; }
.pulse-dot { width:8px; height:8px; border-radius:50%; background:#2fbf7f; display:inline-block; box-shadow:0 0 0 3px #2fbf7f33; }
.rematch-list { display:grid; gap:8px; margin:0 0 14px; }
.rematch-row { display:flex; align-items:center; gap:12px; padding:12px 14px; border:1px solid var(--line); border-radius:16px; background:var(--paper); }
.rematch-info { display:grid; min-width:0; flex:1; }
.rematch-info small { color:var(--muted); font-size:12.5px; }
.rematch-button { flex:none; padding:9px 14px; }
.recent-wins { display:flex; flex-wrap:wrap; gap:4px 14px; margin:0 0 16px; padding:10px 14px; border-radius:14px; background:#fbf6ec; color:var(--muted); font-size:12.5px; }
.recent-wins strong { color:var(--ink); }
.lobby-alert-button { margin-top:10px; width:100%; }
.lobby-alert-on { margin:10px 0 0; font-size:13px; color:var(--green-dark); }
[data-theme="dark"] .pulse-chip { background:#1d3a2b; color:#bfe6cf; }
[data-theme="dark"] .recent-wins { background:#22201b; }

/* ---------- Wallet: one screen (balance, in progress, activity, invite) ---------- */
.wallet-page > .eyebrow { margin-bottom:10px; }
.wallet-balance { display:flex; flex-direction:column; gap:12px; }
.wallet-tiles { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.wallet-tile { display:flex; flex-direction:column; gap:2px; padding:14px 16px; border-radius:16px; border:1px solid var(--line); background:var(--paper); min-width:0; }
.wallet-tile.is-cash { background:var(--green); border-color:var(--green); color:#fff; }
.wallet-tile small { font-size:11px; font-weight:800; letter-spacing:.08em; text-transform:uppercase; }
.wallet-tile strong { font-size:clamp(24px,7vw,32px); letter-spacing:-1px; font-variant-numeric:tabular-nums; overflow-wrap:anywhere; }
.wallet-tile span { font-size:12px; }
.wallet-tile.is-free span, .wallet-tile.is-free small { color:var(--muted); opacity:1; }
.wallet-extras { display:flex; gap:16px; flex-wrap:wrap; font-size:14px; color:var(--muted); }
.wallet-extras strong { color:var(--ink); }
.wallet-actions { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.wallet-actions .btn { min-height:52px; font-size:16px; justify-content:center; }
.wallet-explain summary, .referral-more summary { cursor:pointer; font-size:13px; font-weight:700; color:var(--green-dark); list-style:none; }
.wallet-explain summary::-webkit-details-marker, .referral-more summary::-webkit-details-marker { display:none; }
.wallet-explain summary:after, .referral-more summary:after { content:" ›"; }
.wallet-explain[open] summary:after, .referral-more[open] summary:after { content:" ⌄"; }
.wallet-explain p { margin:8px 0 0; font-size:14px; }
.wallet-page h3, .withdraw-page h3 { margin:22px 0 8px; font-size:18px; }
.wallet-progress ul { list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:8px; }
.wallet-progress li { display:flex; align-items:center; gap:10px; padding:10px 12px; border-radius:12px; background:#fff7e3; border:1px solid #f1dfae; }
.wallet-progress li > div { flex:1; min-width:0; display:flex; flex-direction:column; }
.wallet-progress small { color:var(--muted); font-size:12px; }
.wallet-progress .btn { padding:6px 8px; }
.progress-dot { width:9px; height:9px; flex:none; border-radius:50%; background:var(--yellow); animation:progressPulse 1.6s ease-in-out infinite; }
@keyframes progressPulse { 50% { opacity:.35; } }
@media (prefers-reduced-motion:reduce) { .progress-dot { animation:none; } }
.activity-list { list-style:none; margin:0; padding:0; }
.activity-list li { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:10px 0; border-bottom:1px solid var(--line); }
.activity-list li:last-child { border-bottom:0; }
.activity-list li > div { display:flex; flex-direction:column; min-width:0; }
.activity-list strong { font-size:15px; overflow-wrap:anywhere; }
.activity-list small { color:var(--muted); font-size:12px; }
.activity-amount { flex:none; font-weight:800; font-variant-numeric:tabular-nums; text-align:right; }
.activity-amount.pos { color:#157a46; }
.activity-amount.neg { color:var(--ink); }
.activity-amount.held { color:var(--muted); }
.wallet-more { display:block; margin:6px auto 0; }
.referral-card.is-compact { margin:22px 0 10px; padding:16px; }
.referral-card.is-compact h3 { margin:6px 0 4px; font-size:19px; }
.referral-one-line { margin:0 0 12px; font-size:14px; line-height:1.5; }
.referral-actions { display:grid; grid-template-columns:1fr 1fr; gap:8px; margin-bottom:10px; }
.referral-actions .btn { justify-content:center; padding:12px 10px; font-size:14px; text-align:center; }
.referral-more p { font-size:14px; margin:10px 0; }
.referral-link-text span { overflow-wrap:anywhere; color:var(--ink); }
.wallet-links, .account-links { display:flex; flex-wrap:wrap; gap:6px 10px; align-items:center; margin:18px 0 0; color:var(--muted); }
.wallet-links .rules-link, .account-links .rules-link { font-size:13px; padding:4px 0; }

/* ---------- Withdraw page ---------- */
.withdraw-time { margin:-4px 0 12px; font-size:14px; }
.withdraw-check { list-style:none; margin:4px 0 6px; padding:12px 14px; border-radius:14px; background:var(--green-soft); display:flex; flex-direction:column; gap:8px; }
.withdraw-check li { display:flex; align-items:center; gap:8px; font-weight:700; }
.withdraw-check li span { width:18px; flex:none; color:var(--muted); }
.withdraw-check li.is-done { color:var(--muted); font-weight:600; }
.withdraw-check li.is-done span { color:var(--green); font-weight:800; }
.withdraw-check .btn { margin-left:auto; padding:8px 12px; font-size:13px; }
.amount-row { display:flex; gap:8px; align-items:center; }
.amount-row input { flex:1; min-width:0; }
.amount-row .btn { flex:none; white-space:nowrap; }
.field select { width:100%; border:1px solid var(--line); background:#fffefa; border-radius:11px; padding:13px 14px; color:var(--ink); font:inherit; }
.field input[hidden] { display:none; }
.field small.is-ok { color:var(--green-dark); font-weight:700; }
.withdraw-submit { width:100%; min-height:52px; font-size:16px; justify-content:center; }
.withdraw-page .activity-list li { padding:8px 0; }

/* ---------- Account page ---------- */
.account-page h2 { overflow-wrap:anywhere; }
.account-signout { border-top:1px solid var(--line); padding-top:18px; }

[data-theme="dark"] .wallet-tile.is-free { background:#1b241e; }
[data-theme="dark"] .wallet-progress li { background:#2a2615; border-color:#4a4220; }
[data-theme="dark"] .field select { background:#121915; border-color:var(--line); color:var(--ink); }
[data-theme="dark"] .activity-amount.pos { color:#6fd1a2; }
.wallet-page, .withdraw-page, .account-page, .deposit-page { padding:22px clamp(16px,4vw,32px) 26px; }

/* The sound switch in the top bar (sound.js). */
.sound-button { font-size:15px; }
@media (max-width:380px) { .topbar-right { gap:8px; } }

/* ---------- Ludo on one screen ---------- */
body[data-screen="game"] #screen, body[data-screen="draughts"] #screen, body[data-screen="penalty"] #screen { padding:8px 10px 20px; }
.ludo-compact { max-width:620px; margin:0 auto; display:flex; flex-direction:column; gap:8px; }
.ludo-bar { display:grid; grid-template-columns:minmax(0,1fr) auto minmax(0,1fr); align-items:center; gap:8px; }
.ludo-side { --player-accent:var(--green); min-width:0; display:flex; align-items:center; gap:7px; padding:7px 10px; border:1px solid var(--line); border-left:4px solid var(--player-accent); border-radius:13px; background:var(--paper); }
.ludo-side:not(.is-me) { flex-direction:row-reverse; border-left-width:1px; border-right:4px solid var(--player-accent); }
.ludo-side.is-active { box-shadow:inset 0 0 0 2px var(--player-accent); }
.ludo-side-dots { display:flex; gap:3px; flex:none; }
.ludo-side-dots i { width:10px; height:10px; border-radius:50%; background:var(--token-color); box-shadow:0 0 0 1.5px #fff; }
.ludo-side-name { flex:1; min-width:0; font-size:13px; font-weight:800; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.ludo-side:not(.is-me) .ludo-side-name { text-align:right; }
.ludo-side-home { flex:none; font-size:18px; font-variant-numeric:tabular-nums; }
.ludo-side-home small { font-size:11px; color:var(--muted); font-weight:700; }
.ludo-timer { min-width:0; padding:7px 9px; font-size:12px; white-space:nowrap; border-radius:999px; }
.ludo-status { display:flex; align-items:center; gap:8px; min-height:34px; padding:6px 12px; border-radius:12px; background:var(--paper); border:1px solid var(--line); font-size:14px; line-height:1.25; }
.ludo-status strong { flex:none; }
.ludo-status span:not(.ludo-status-dot) { min-width:0; color:var(--muted); font-size:12px; overflow:hidden; text-overflow:ellipsis; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; }
.ludo-status-dot { width:9px; height:9px; flex:none; border-radius:50%; background:var(--muted); }
.ludo-status.is-mine { background:var(--green-soft); border-color:#bfe0c5; }
.ludo-status.is-mine .ludo-status-dot { background:var(--green); box-shadow:0 0 0 4px #1f875833; }
.ludo-board-area { background:#0b0e22; border-radius:20px; padding:8px; box-shadow:0 10px 30px #0b0e2240; }
/* The board and its dice always fit the screen height (15 board rows + the dice row = 18.4 rows tall). */
.ludo-board-area .pixi-wrap, .ludo-board-area .board-wrap { width:min(100%, 560px, calc((100svh - 264px) * 15 / 18.4)); margin:0 auto; }
.ludo-choice { position:fixed; left:0; right:0; bottom:0; z-index:70; display:flex; flex-wrap:wrap; gap:8px; justify-content:center; padding:12px 12px calc(12px + env(safe-area-inset-bottom)); background:var(--paper); border-top:1px solid var(--line); box-shadow:0 -10px 30px #18261f26; animation:choiceUp .18s ease-out; }
.ludo-choice .btn { flex:1 1 40%; min-height:48px; justify-content:center; font-size:15px; }
.ludo-choice .btn-quiet { flex:0 0 auto; }
.ludo-choice .is-capture { background:#d93a49; }
@keyframes choiceUp { from { transform:translateY(100%); } to { transform:none; } }
body.ludo-choosing #chatDock { display:none; }
.ludo-more { border:1px solid var(--line); border-radius:13px; background:var(--paper); }
.ludo-more > summary { display:flex; justify-content:space-between; align-items:center; gap:10px; padding:9px 12px; cursor:pointer; font-size:13px; font-weight:800; color:var(--green-dark); list-style:none; }
.ludo-more > summary::-webkit-details-marker { display:none; }
.ludo-more > summary > span:first-child:after { content:" ›"; }
.ludo-more[open] > summary > span:first-child:after { content:" ⌄"; }
.ludo-more-stake { color:var(--muted); font-size:12px; font-weight:700; }
.ludo-more-body { display:flex; flex-wrap:wrap; gap:8px; padding:0 12px 12px; }
.ludo-more-body .utility-leave { flex-basis:100%; }
.ludo-more-body .game-info-note { flex-basis:100%; margin:4px 0 0; font-size:12px; color:var(--muted); line-height:1.5; }
body[data-screen="game"] #chatDock .chat-fab, body[data-screen="draughts"] #chatDock .chat-fab, body[data-screen="penalty"] #chatDock .chat-fab { width:44px; height:44px; font-size:20px; }
body[data-screen="game"] .ludo-more > summary, body[data-screen="draughts"] .ludo-more > summary, body[data-screen="penalty"] .ludo-more > summary { padding-right:64px; }
/* Captures, tokens home and double sixes. */
.ludo-flash { position:fixed; z-index:80; left:50%; top:45%; transform:translate(-50%,-50%); padding:12px 20px; border-radius:999px; font-weight:900; font-size:20px; letter-spacing:-.3px; color:#fff; white-space:nowrap; pointer-events:none; box-shadow:0 14px 34px #0006; animation:ludoFlash 1.5s ease-out forwards; }
.ludo-flash.is-good { background:#1f8758; }
.ludo-flash.is-bad { background:#c73a3a; }
.ludo-flash.is-six { background:linear-gradient(135deg,#f3bf49,#ed7259); color:#1b1306; }
@keyframes ludoFlash { 0% { opacity:0; transform:translate(-50%,-30%) scale(.7); } 12% { opacity:1; transform:translate(-50%,-50%) scale(1.08); } 22% { transform:translate(-50%,-50%) scale(1); } 75% { opacity:1; } 100% { opacity:0; transform:translate(-50%,-80%); } }
@media (prefers-reduced-motion:reduce) { .ludo-flash { animation:ludoFlashFade 1.5s linear forwards; } .ludo-choice { animation:none; } }
@keyframes ludoFlashFade { 0%,80% { opacity:1; } 100% { opacity:0; } }
@media (max-width:380px) { .ludo-side { padding:6px 7px; gap:5px; } .ludo-side-name { font-size:12px; } .ludo-timer { font-size:11px; padding:6px 7px; } }
[data-theme="dark"] .ludo-status.is-mine { border-color:#2c4a37; }

/* ---------- WhatsApp sharing (share.js) ---------- */
.wa-box { margin:14px 0 10px; padding:14px; border:2px solid #1fa855; border-radius:18px; background:#effaf2; text-align:left; display:flex; flex-direction:column; gap:8px; }
.wa-box strong { font-size:15px; }
.wa-box .muted { font-size:13px; margin:0; line-height:1.45; }
.wa-box .btn, .share-post .btn { width:100%; justify-content:center; text-align:center; }
.wa-row { display:grid; grid-template-columns:1fr 1fr; gap:8px; }
.wa-row .btn { padding:11px 8px; font-size:14px; }
.btn-whatsapp { background:#15803d; color:#fff; }
[data-theme="dark"] .wa-box { background:#13261a; border-color:#1f8a47; }
.share-pack { margin:12px 0 4px; display:flex; flex-direction:column; gap:10px; }
.share-pack-head { display:flex; flex-direction:column; gap:2px; }
.share-pack-head .muted { font-size:12px; line-height:1.3; }
.share-stats { display:grid; grid-template-columns:repeat(3,1fr); gap:6px; }
.share-stats span { display:flex; flex-direction:column; align-items:center; padding:8px 4px; border-radius:12px; background:var(--paper); border:1px solid var(--line); font-size:11px; color:var(--muted); text-align:center; }
.share-stats b { font-size:17px; color:var(--ink); }
.share-post { padding:10px; border-radius:16px; background:var(--paper); border:1px solid var(--line); display:flex; flex-direction:column; gap:8px; }
.share-post-art { border-radius:12px; min-height:120px; padding:14px; display:flex; flex-direction:column; align-items:center; justify-content:center; text-align:center; color:#fff; }
.share-post-art strong { font-size:22px; letter-spacing:-.6px; line-height:1.1; }
.share-post-art span { font-size:17px; font-weight:800; }
.share-post-art small { margin-top:6px; font-size:12px; font-weight:700; opacity:.9; }
.share-post-art.is-warm { background:linear-gradient(135deg,#f3bf49,#ed7259); color:#1d1406; }
.share-post-art.is-green { background:linear-gradient(135deg,#1f8758,#0b3f2a); }
.share-post-art.is-dark { background:linear-gradient(135deg,#18261f,#0b1712); }
.share-post-text { margin:0; font-size:12.5px; line-height:1.45; color:var(--muted); overflow-wrap:anywhere; }

/* ---------- Draughts on one screen ---------- */
.d-compact { max-width:640px; margin:0 auto; display:flex; flex-direction:column; gap:8px; }
/* The board is as wide as the phone allows while the rows above and below still fit. */
.d-compact .d-board-frame { width:100%; max-width:min(100%, calc(100svh - 227px)); padding:5px; border-radius:14px; }
.d-side .ludo-side-dots .d-dot { margin:0; width:12px; height:12px; }
.d-lead { margin-left:4px; padding:1px 5px; border-radius:999px; background:var(--green); color:#fff !important; font-size:11px !important; vertical-align:2px; }
.ludo-status.is-must { background:#fde8e4; border-color:#f3b8ab; }
.ludo-status.is-must .ludo-status-dot { background:#d93a49; box-shadow:0 0 0 4px #d93a4933; }
.d-piece.is-must { box-shadow:0 0 0 3px #ff3048, 0 0 14px #ff3048b3, 0 3px 6px #00000059; animation:dPulse 1.2s ease-in-out infinite; }
.d-danger { position:absolute; top:-2px; right:-2px; width:32%; height:32%; border-radius:50%; background:#ff3048; box-shadow:0 0 0 2px #fff; }
@media (prefers-reduced-motion: reduce) { .d-piece.is-must { animation:none; } }
[data-theme="dark"] .ludo-status.is-must { background:#3a1d1d; border-color:#5a2a2a; }

/* ---------- Penalty shootout ---------- */
.pk-compact { max-width:560px; margin:0 auto; display:flex; flex-direction:column; gap:8px; }
/* The scorebug: like a TV broadcast. */
.pk-bug { display:grid; grid-template-columns:minmax(0,1fr) auto minmax(0,1fr); align-items:center; gap:8px; padding:8px 10px; border-radius:16px; background:linear-gradient(180deg,#123827,#0b2419); color:#f4fff8; box-shadow:0 6px 18px #0b241933, inset 0 1px 0 #ffffff14; }
.pk-bug-side { display:grid; gap:5px; min-width:0; }
.pk-bug-side.is-them { justify-items:end; text-align:right; }
.pk-bug-name { font-weight:800; font-size:14px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; max-width:100%; }
.pk-bug-name i { font-style:normal; font-size:12px; }
.pk-bug-side.is-me .pk-bug-name { color:#9ff0c2; }
.pk-bug-side.is-them .pk-bug-name { color:#ffc2b4; }
.pk-bug-mid { display:grid; justify-items:center; gap:3px; }
.pk-bug-score { font-size:28px; line-height:1; font-weight:900; letter-spacing:-.5px; font-variant-numeric:tabular-nums; padding:4px 12px; border-radius:10px; background:#05140d; box-shadow:inset 0 0 0 1px #ffffff1a; }
.pk-bug-score span { margin:0 5px; opacity:.55; }
.pk-bug-timer { font-size:11.5px; font-weight:800; letter-spacing:.3px; color:#cfe9da; white-space:nowrap; min-height:14px; }
.pk-bug-timer.warning { color:#ffb4a8; }
.pk-dots { display:flex; gap:4px; flex-wrap:wrap; }
.pk-bug-side.is-them .pk-dots { justify-content:flex-end; }
.pk-dot { width:11px; height:11px; border-radius:50%; background:#ffffff1f; box-shadow:inset 0 0 0 1.5px #ffffff2e; display:inline-block; }
.pk-dot.is-goal { background:#2fd08a; box-shadow:0 0 6px #2fd08a99; }
.pk-dot.is-miss { background:#ff6b5e; box-shadow:none; }
.pk-dot.is-sd { margin-left:6px; }
.pk-role { display:flex; flex-wrap:wrap; align-items:center; gap:6px 10px; font-size:13px; color:var(--muted); padding:0 2px; }
.pk-role strong { color:var(--ink); }
.pk-role-tag { padding:3px 10px; border-radius:999px; font-weight:800; font-size:12px; color:#fff; }
.pk-role-tag.is-kick { background:#1f8758; }
.pk-role-tag.is-keep { background:#c8761a; }
/* The stadium. */
.pk-stage { position:relative; border-radius:18px; overflow:hidden; background:#0b2419; box-shadow:0 10px 28px #0b241940; user-select:none; -webkit-user-select:none; touch-action:manipulation; }
.pk-scene { display:block; width:100%; height:auto; }
.pk-zone rect { fill:#ffffff; fill-opacity:0; stroke:#ffffff; stroke-opacity:0; stroke-width:1.5; transition:fill-opacity .15s, stroke-opacity .15s; }
.pk-zone.is-live { cursor:pointer; }
.pk-zone.is-live rect { fill-opacity:.04; stroke-opacity:.22; stroke-dasharray:4 4; }
.pk-zone.is-live:hover rect, .pk-zone.is-live:focus rect { fill-opacity:.12; stroke-opacity:.6; }
.pk-zone:focus { outline:none; }
.pk-zone.is-picked rect { fill:#f3bf49; fill-opacity:.2; stroke:#f3bf49; stroke-opacity:1; stroke-dasharray:none; stroke-width:2.5; }
.pk-zone-label { font:800 8.5px system-ui,sans-serif; letter-spacing:1px; fill:#ffffff; fill-opacity:.0; pointer-events:none; }
.pk-zone.is-live .pk-zone-label, .pk-zone.is-picked .pk-zone-label { fill-opacity:.75; }
.pk-reticle { animation:pkReticle 1s ease-in-out infinite alternate; transform-box:fill-box; transform-origin:center; }
@keyframes pkReticle { from { opacity:.75; } to { opacity:1; } }
.pk-dive-hint { opacity:.9; }
/* The keeper: dives around the feet, gloves go up. */
.pk-keeper, .pk-kp, .pk-arm { transform-box:fill-box; }
.pk-kp { transform-origin:50% 100%; }
.pk-arm-l { transform-origin:100% 0; } .pk-arm-r { transform-origin:0 0; }
.pk-keeper:not([class*="is-"]) .pk-kp { animation:pkReady 1.6s ease-in-out infinite; }
@keyframes pkReady { 0%,100% { transform:translateX(-3px); } 50% { transform:translateX(3px) translateY(-1px); } }
.pk-keeper.is-dive-left .pk-kp { animation:pkDiveL .5s cubic-bezier(.2,.8,.3,1) .12s both; }
.pk-keeper.is-dive-right .pk-kp { animation:pkDiveR .5s cubic-bezier(.2,.8,.3,1) .12s both; }
.pk-keeper.is-dive-middle .pk-kp { animation:pkJump .55s ease-out .12s both; }
.pk-keeper.is-gather .pk-kp { animation:pkGather .6s ease-out .3s both; }
.pk-keeper[class*="is-dive"] .pk-arm-l { animation:pkArmL .3s ease-out .12s both; }
.pk-keeper[class*="is-dive"] .pk-arm-r { animation:pkArmR .3s ease-out .12s both; }
.pk-keeper[class*="is-dive"] .pk-k-shadow, .pk-keeper.is-gather .pk-k-shadow { opacity:.15; }
@keyframes pkDiveL { to { transform:translate(-80px,-18px) rotate(-78deg); } }
@keyframes pkDiveR { to { transform:translate(80px,-18px) rotate(78deg); } }
@keyframes pkJump { 40% { transform:translateY(-26px) scale(1.04); } 100% { transform:translateY(-6px); } }
@keyframes pkGather { to { transform:translateY(6px) scale(.96,.9); } }
@keyframes pkArmL { to { transform:rotate(120deg); } }
@keyframes pkArmR { to { transform:rotate(-120deg); } }
/* The ball: flies to its target, spinning and getting smaller. */
.pk-ball, .pk-ball-shadow { transform-box:fill-box; transform-origin:center; }
.pk-ball-spin { transform-box:fill-box; transform-origin:center; }
.pk-ball[class*="is-"] { animation:pkFly .55s cubic-bezier(.15,.7,.35,1) both; }
.pk-ball[class*="is-"] .pk-ball-spin { animation:pkSpin .55s linear both; }
.pk-ball.is-over { animation:pkFlyOver .65s cubic-bezier(.15,.7,.35,1) both; }
.pk-ball.is-soft { animation:pkFlySoft 1.1s cubic-bezier(.2,.6,.3,1) both; }
.pk-ball.is-saved { animation:pkFlySaved .9s cubic-bezier(.15,.7,.35,1) both; }
.pk-ball-shadow[class*="is-"] { animation:pkShadow .55s ease-out both; }
@keyframes pkFly { to { transform:translate(var(--tx),var(--ty)) scale(.42); } }
@keyframes pkFlyOver { 70% { opacity:1; } to { transform:translate(var(--tx),var(--ty)) scale(.32); opacity:0; } }
@keyframes pkFlySoft { to { transform:translate(var(--tx),var(--ty)) scale(.5); } }
@keyframes pkFlySaved { 60% { transform:translate(var(--tx),var(--ty)) scale(.42); } to { transform:translate(calc(var(--tx) * 1.15),calc(var(--ty) + 60px)) scale(.48); } }
@keyframes pkSpin { to { transform:rotate(540deg); } }
@keyframes pkShadow { to { transform:translate(calc(var(--tx) * .9),-94px) scale(.4); opacity:.2; } }
.pk-net { transform-box:fill-box; transform-origin:50% 0; }

.pk-hit { fill:#ffffff; opacity:0; transform-box:fill-box; transform-origin:center; animation:pkHit .7s ease-out .5s both; }
.pk-hit.is-save { fill:#f3bf49; }
@keyframes pkHit { 0% { opacity:.85; transform:scale(.3); } 100% { opacity:0; transform:scale(2.4); } }
.pk-stage:has(.pk-ball.is-goal) .pk-net { animation:pkNet .5s ease-out .52s both; }
@keyframes pkNet { 40% { transform:scale(1.02,1.05); } 100% { transform:none; } }
/* Banners over the stadium. */
.pk-banner { position:absolute; left:50%; top:62%; transform:translate(-50%,-50%) skewX(-8deg); padding:10px 26px; border-radius:12px; font-style:italic; letter-spacing:.5px; color:#fff; white-space:nowrap; pointer-events:none; box-shadow:0 14px 30px #0007; animation:pkBanner .45s cubic-bezier(.2,1.6,.4,1) .6s both; }
.pk-banner b { display:block; font-size:clamp(24px,7.5vw,36px); font-weight:900; text-shadow:0 2px 0 #0003; }
.pk-banner.is-goal { background:linear-gradient(135deg,#2fd08a,#17834f); }
.pk-banner.is-miss { background:linear-gradient(135deg,#ff6b5e,#b8302a); }
@keyframes pkBanner { from { opacity:0; transform:translate(-50%,-50%) skewX(-8deg) scale(.4); } to { opacity:1; transform:translate(-50%,-50%) skewX(-8deg) scale(1); } }
.pk-intro { position:absolute; left:50%; top:66%; transform:translate(-50%,-50%) skewX(-8deg); padding:8px 20px; border-radius:10px; background:linear-gradient(135deg,#123827,#0b2419); border:1px solid #ffffff2a; color:#fff; font-weight:900; font-style:italic; font-size:clamp(17px,5vw,22px); letter-spacing:.4px; white-space:nowrap; box-shadow:0 10px 24px #0006; animation:pkIntro 1.3s ease-out both; pointer-events:none; }
.pk-intro.is-sd { background:linear-gradient(135deg,#e5654c,#a8281f); }
@keyframes pkIntro { 0% { opacity:0; transform:translate(-40%,-50%) skewX(-8deg); } 15%, 78% { opacity:1; transform:translate(-50%,-50%) skewX(-8deg); } 100% { opacity:0; transform:translate(-60%,-50%) skewX(-8deg); } }
/* The power bar. */
.pk-bar { position:relative; margin:8px 6px 4px; height:28px; border-radius:999px; background:linear-gradient(90deg,#c9372c,#e86a3c 12%,#f3bf49 19%,#f3bf49 21%,transparent 21%,transparent 79%,#f3bf49 79%,#f3bf49 81%,#e86a3c 88%,#c9372c); box-shadow:0 0 0 2.5px #f4fff8, 0 6px 16px #0006, inset 0 2px 0 #ffffff40; overflow:visible; }
.pk-bar-green { position:absolute; top:0; bottom:0; background:linear-gradient(180deg,#46e39b,#1fa868); box-shadow:inset 0 2px 0 #ffffff55; display:grid; place-items:center; }
.pk-bar-green em { font:900 9px system-ui,sans-serif; letter-spacing:1.2px; color:#0b3b24; font-style:normal; opacity:.75; }
.pk-bar-zone { position:absolute; top:50%; transform:translateY(-50%); font:900 8px system-ui,sans-serif; letter-spacing:1px; color:#fff; opacity:.85; }
.pk-bar-zone.is-soft { left:4%; } .pk-bar-zone.is-over { right:4%; }
.pk-needle { position:absolute; top:-10px; bottom:-10px; width:6px; margin-left:-3px; border-radius:3px; background:#fff; box-shadow:0 0 0 1.5px #0b2419, 0 0 10px #fff; }
.pk-needle::before { content:""; position:absolute; left:50%; top:-7px; margin-left:-6px; border:6px solid transparent; border-top-color:#fff; }
.pk-actions { display:flex; gap:8px; }
.pk-actions .pk-shoot { flex:1; min-height:56px; font-size:20px; font-weight:900; letter-spacing:1px; font-style:italic; background:linear-gradient(180deg,#2fbf7f,#17834f); box-shadow:0 8px 18px #17834f55, inset 0 2px 0 #ffffff40; }
.pk-actions .pk-shoot:disabled { opacity:.5; font-style:normal; font-size:16px; letter-spacing:0; box-shadow:none; }
.pk-hint { flex:1; margin:0; text-align:center; font-size:13px; color:var(--muted); }
/* Reading the opponent. */
.pk-read { display:flex; flex-wrap:wrap; align-items:center; gap:6px 10px; padding:8px 12px; border:1px solid var(--line); border-radius:12px; background:var(--paper); font-size:13px; }
.pk-read > span:first-child { font-weight:700; }
.pk-read small { color:var(--muted); margin-left:auto; }
.pk-chips { display:flex; gap:4px; }
.pk-chip { display:inline-grid; place-items:center; width:24px; height:24px; border-radius:7px; background:var(--line); font-size:12px; font-weight:900; }
.pk-chip.is-good { background:#e5654c; color:#fff; }
.pk-coach { padding:7px 12px; border-radius:10px; background:#fff3e0; border:1px solid #f3cf9a; color:#7a4a12; font-size:13px; }
[data-theme="dark"] .pk-coach { background:#3a2a14; border-color:#5a4220; color:#f3cf9a; }
.pk-hurry { margin-top:-4px; padding:6px 12px; border-radius:10px; background:#fde8e4; color:#a1261f; font-size:13px; font-weight:700; animation:pkPulse .8s ease-in-out infinite alternate; }
[data-theme="dark"] .pk-hurry { background:#3a1d1d; color:#ffb4a8; }
@keyframes pkPulse { to { opacity:.6; } }
/* The result screen's kick sheet. */
.pk-sheet { display:grid; gap:6px; margin:12px auto 0; max-width:320px; text-align:left; }
.pk-sheet-row { display:grid; grid-template-columns:minmax(0,1fr) auto 28px; align-items:center; gap:10px; padding:7px 12px; border-radius:12px; background:linear-gradient(180deg,#123827,#0b2419); color:#f4fff8; }
.pk-sheet-row b { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:14px; }
.pk-sheet-row strong { text-align:right; font-size:18px; }
@media (prefers-reduced-motion: reduce) { .pk-ball, .pk-ball-shadow, .pk-kp, .pk-arm, .pk-banner, .pk-intro, .pk-net, .pk-hit, .pk-hurry, .pk-reticle, .pk-ball-spin { animation-duration:.01s !important; animation-delay:0s !important; animation-iteration-count:1 !important; } }

/* Games still being tested (game-access.js): only testers see them. */
.game-tile-kind .testing-tag { color:#b5651d; }
.testing-note { margin:8px 0 0; padding:8px 12px; border-radius:10px; background:#fff3e0; border:1px solid #f3cf9a; font-size:13px; color:#7a4a12; }
[data-theme="dark"] .testing-note { background:#3a2a14; border-color:#5a4220; color:#f3cf9a; }

/* What search engines (and slow phones) see before the app starts: public/index.html. */
.seo-intro h1 { font-size:26px; line-height:1.2; margin:0 0 8px; }
.seo-intro ul { padding-left:20px; margin:12px 0; }
.seo-intro li { margin:4px 0; }
/* A game's code still downloading (see loadGame in core.js). */
.game-loading { margin-top: 12px; text-align: center; }
.game-loading .eyebrow { justify-content: center; }
/* Players waiting: a row whose player has gone keeps its height, so nothing below it moves. */
.open-ticket { min-height:64px; }
.open-ticket.is-gone { opacity:.62; border-style:dashed; }
.competition-home > .open-tickets.is-busy { margin:4px 0 14px; }
/* A note that floats over the lobby when someone starts waiting and the list is under the games. */
.waiting-pill { position:fixed; left:50%; bottom:calc(18px + env(safe-area-inset-bottom)); transform:translateX(-50%); z-index:40; display:inline-flex; align-items:center; gap:8px; max-width:calc(100vw - 120px); min-height:44px; padding:10px 16px; border:0; border-radius:999px; background:var(--ink); color:var(--cream); font-family:inherit; font-size:14px; font-weight:700; line-height:1.2; box-shadow:0 10px 26px #18261f40; cursor:pointer; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; animation:waitingPillIn .25s ease-out; }
.waiting-pill[hidden] { display:none; }
.waiting-pill-dot { width:8px; height:8px; border-radius:50%; background:#3ddc84; flex:none; }
@keyframes waitingPillIn { from { opacity:0; transform:translate(-50%, 8px); } }
@media (prefers-reduced-motion: reduce) { .waiting-pill { animation:none; } }
.open-tickets-head .muted:empty::after { content:"\00a0"; }

/* ---------- Game screens stay still ----------
   Nothing on a game screen may change height during play: a status line that grows to two lines, a clock that is
   empty for a moment, or a line that comes and goes would push the board down under the player's thumb. Each part
   that changes gets a fixed height, and anything that appears mid-game floats over the screen instead. */
html:has(body[data-screen="game"]), html:has(body[data-screen="whot"]), html:has(body[data-screen="ayo"]), html:has(body[data-screen="draughts"]),
html:has(body[data-screen="chess"]), html:has(body[data-screen="pool"]), html:has(body[data-screen="penalty"]) { overscroll-behavior:none; }
body[data-screen="game"], body[data-screen="whot"], body[data-screen="ayo"], body[data-screen="draughts"],
body[data-screen="chess"], body[data-screen="pool"], body[data-screen="penalty"] { overscroll-behavior:none; }
/* Ludo, draughts and the shootout: the status line is always two lines tall. */
.ludo-status { height:46px; box-sizing:border-box; padding:4px 12px; overflow:hidden; }
.ludo-status strong:last-child { flex:1 1 auto; min-width:0; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
/* Turn clocks keep their size while they wait for their first reading. */
.turn-timer:empty { visibility:hidden; }
.turn-timer:empty::before { content:"\00a0"; }
/* Chess: the move list has one height from the first move on, and a draw offer slides up from the bottom. */
.c-moves { height:66px; max-height:none; box-sizing:border-box; }
.c-offer { position:fixed; left:0; right:0; bottom:0; z-index:70; border-radius:0; padding:12px 12px calc(12px + env(safe-area-inset-bottom)); border-top:1px solid var(--line); box-shadow:0 -10px 30px #18261f26; animation:choiceUp .18s ease-out; }
/* Pool: the status line is always two lines tall. */
.p2-status { height:32px; line-height:16px; display:grid; place-items:center; overflow:hidden; }
/* Shootout: the role line keeps its place (the "Choose now" warning takes it over), and the power bar and SHOOT
   button sit in a space that's always there. */
.pk-role { position:relative; height:24px; flex-wrap:nowrap; white-space:nowrap; overflow:hidden; }
.pk-role > span:last-child { min-width:0; overflow:hidden; text-overflow:ellipsis; }
.pk-role .pk-hurry { position:absolute; inset:0; margin:0; padding:0 12px; display:flex; align-items:center; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.pk-role:has(.pk-hurry) > :not(.pk-hurry) { visibility:hidden; }
.pk-controls { display:flex; flex-direction:column; gap:8px; min-height:104px; }
/* Chess: the chat button sits over the end of the move list instead of below the screen, and the board shrinks to
   fit short screens. */
body[data-screen="chess"] #screen { padding-bottom:20px; }
.chess-screen .c-moves { padding-right:68px; }
.chess-screen .c-board-frame { max-width:min(100%, max(220px, calc(100svh - 456px))); }
/* Shootout: the goal shrinks to fit short screens. */
.pk-compact .pk-stage { width:min(100%, max(240px, calc((100svh - 424px) * 1.268))); margin-inline:auto; }
/* Short screens (a phone browser with its address and tool bars): Whot, Ayo and chess tighten up so the whole
   game fits without the page scrolling. */
@media (max-height:760px) {
  .whot-screen { gap:8px; }
  .whot-screen .game-timer-row { margin:-2px 0 0; }
  .whot-player { padding:6px 12px; }
  .whot-player .player-badge { width:36px; height:36px; font-size:15px; }
  .whot-table { padding:12px 10px; }
  .whot-screen .market .whot-card { --card-w:56px; }
  .whot-screen .top-card { --card-w:68px; }
  .whot-hand { padding-top:14px; }
  .chess-screen .c-moves { height:44px; padding-top:6px; padding-bottom:6px; }
  .chess-screen .c-board-frame { max-width:min(100%, max(220px, calc(100svh - 384px))); }
}
@media (prefers-reduced-motion:reduce) { .c-offer { animation:none; } }
