/* Plinko PvP — family visual identity (Tile Reveal design pass): navy anchor,
   reward gold, danger red, Fredoka numbers + Manrope UI. Compact single-page. */

@keyframes pk-rise{from{transform:translateY(110%)}to{transform:translateY(0)}}
@keyframes pk-fade{from{opacity:0}to{opacity:1}}
/* BOOMERANG, not a loop: out to the far edge and back to the start inside
   ONE cycle, so 100% already matches 0% and the next iteration never has a
   visible snap-back (the old 0%->100% one-way sweep teleported to -140% on
   every repeat). */
@keyframes pk-sheen{0%{transform:translateX(-140%) skewX(-18deg)}50%{transform:translateX(320%) skewX(-18deg)}100%{transform:translateX(-140%) skewX(-18deg)}}
@keyframes pk-dots{0%,20%{opacity:.25}50%{opacity:1}80%,100%{opacity:.25}}
@keyframes pk-pop{0%{transform:scale(1.3)}45%{transform:scale(.92)}75%{transform:scale(1.06)}100%{transform:scale(1)}}
@keyframes pk-float{0%{transform:translateY(6px) scale(.7);opacity:0}28%{transform:translateY(-12px) scale(1.1);opacity:1}100%{transform:translateY(-40px) scale(.95);opacity:0}}
@keyframes pk-ringpop{0%{transform:scale(.86)}55%{transform:scale(1.1)}100%{transform:scale(1)}}
@keyframes pk-flash{0%{opacity:.6}100%{opacity:0}}
@keyframes pk-quake{0%,100%{transform:translate(0,0)}18%{transform:translate(-5px,3px)}38%{transform:translate(5px,-3px)}58%{transform:translate(-3px,1px)}78%{transform:translate(2px,-1px)}}
@keyframes pk-slot-impact{0%{transform:translateY(0) scale(.72);filter:brightness(2.2)}34%{transform:translateY(-9px) scale(1.38);filter:brightness(1.45)}62%{transform:translateY(2px) scale(.94)}82%{transform:translateY(-2px) scale(1.07)}100%{transform:translateY(0) scale(1);filter:brightness(1)}}
@keyframes pk-land-ring{0%{transform:translate(-50%,-50%) scale(.2);opacity:1}100%{transform:translate(-50%,-50%) scale(3.6);opacity:0}}
@keyframes pk-land-ray{0%{transform:rotate(var(--ray)) translateY(0) scaleY(.3);opacity:1}100%{transform:rotate(var(--ray)) translateY(-34px) scaleY(1);opacity:0}}
@keyframes pk-edge-jackpot{0%,100%{filter:brightness(1);box-shadow:0 0 4px rgba(224,164,74,.12)}50%{filter:brightness(1.13);box-shadow:0 0 9px rgba(224,164,74,.3)}}
@keyframes pk-edge-sweep{from{transform:translateX(0) skewX(-18deg)}to{transform:translateX(360%) skewX(-18deg)}}
@keyframes pk-claim-pop{0%{transform:scale(.72);filter:brightness(2.4)}48%{transform:scale(1.24);filter:brightness(1.45)}75%{transform:scale(.96)}100%{transform:scale(1);filter:brightness(1)}}
@keyframes pk-drop-ready{0%,100%{box-shadow:0 0 8px var(--seat-wash)}50%{box-shadow:0 0 18px var(--seat-color)}}

:root, [data-theme="dark"]{
  --bg:#131A24; --header:#17212B; --panel:#1B2432; --tile:#26344A; --edge:#33455F;
  --tshadow:#0C121B; --text:#EDF2F8; --hint:#7E8FA6; --line:rgba(255,255,255,.09);
  --chip:#1E293A; --blue:#2AABEE; --blue-ink:#2AABEE;
  /* GOLD — three roles, so contrast can be met per role instead of per hue.
     --gold      the FILL (slab face, washes, decorative bloom) — never ink.
     --gold-text the INK on page surfaces        — must clear 4.5:1.
     --gold-line the non-text UI stroke/dot/dash — must clear 3:1.
     Retuned 2026-08-29 off #FFC24B: deeper and less lemon (h38°/s100%/l65%
     -> h36°/s80%/l58%), and the light theme no longer paints ink with the
     fill colour, which was the 1.4:1 failure the user was seeing. */
  --gold:#E0A44A; --gold-text:#E9A83F; --gold-line:#E9A83F; --gold-text-lg:#E9A83F;
  --gold-edge:#9C6A1C; --gold-shadow:#7A5214; --gold-ink:#2B1C05;
  --red:#FF5A4E; --red-edge:#A81E14; --red-shadow:#7E1610; --red-ink:#2A0B08;
  /* --red-text: the loss/danger INK for a raw points figure on a themed page
     surface (scoreboard, receipt sheet) — same three-role split as gold
     above. --red itself stays full-saturation for the always-dark board
     (navy never lightens, so it never needs the AA-safe swap). Dark theme's
     panels are already dark enough that --red clears 4.5:1 on them (~4.9–
     6.8:1 measured), so dark reuses it as-is. */
  --red-text:#FF5A4E;
  --navy:#101722; --navy-edge:#22304A;
}
[data-theme="light"]{
  --gold-text:#94620C; --gold-line:#A8760F;
  /* Large text only (>=18.66px bold / >=24px) needs 3:1, not 4.5:1 — so the
     big numerals can be a genuinely rich gold instead of AA-safe mustard. */
  --gold-text-lg:#B87C18;
  --bg:#FFFFFF; --header:#F7F8FA; --panel:#F2F4F7; --tile:#E6EAF0; --edge:#CCD4DF;
  --tshadow:#C0C8D3; --text:#0F1620; --hint:#707579; --line:rgba(0,0,0,.09);
  --chip:#F0F3F7; --blue:#3390EC;
  /* Small-text blue: --blue is 3.0:1 on light panels; this clears AA at 5.21:1. */
  --blue-ink:#2668AC;
  /* --red at full saturation is only 3.08:1 on a light panel/chip — reuse the
     existing (until now unused) --red-edge ink, measured 6.1–7.2:1 on the
     light --chip/--panel this ink actually sits on. */
  --red-text:#A81E14;
}

*{box-sizing:border-box;margin:0;padding:0}
html,body{height:100%}
/* The ROOT never scrolls. tg-viewport.js HOLDS .app at its resting height while
   the on-screen keyboard is up, so on Android (which resizes the whole WebView)
   .app overflows body for the duration — and the engine's focus-scrolling then
   scrolled the DOCUMENT to reveal the field: the header slid off the top and
   the page looked "compressed upward". html{overflow:hidden} propagates to the
   viewport; body{overflow:clip} clips the overflow WITHOUT becoming a scroll
   container, so there is nothing left for the engine to scroll. .col owns the
   only vertical scroll (tg-keyboard.js gives it the room it needs). */
html{overflow:hidden}
body{overflow:clip}
body{background:var(--bg);font-family:Manrope,system-ui,sans-serif;-webkit-font-smoothing:antialiased;
  display:flex;justify-content:center;overscroll-behavior:none}
button{font:inherit;color:inherit;background:none;border:none;cursor:pointer}
input{font:inherit}

/* overflow:CLIP, not hidden (same reasoning as tile-reveal-pvp): hidden still
   makes .app a scroll container the engine may scroll to reveal a focused
   field; clip clips identically and can never scroll. .col owns the vertical
   scroll. */
.app{position:relative;width:100%;max-width:420px;height:var(--tg-vh,100dvh);overflow:clip;
  display:flex;flex-direction:column;background:var(--bg);color:var(--text)}
/* No seat-coloured bars down the screen edges (user request). Seat 0 is
   #FFD447, so for most testers this read as two gold borders framing the app.
   The edges now simply show the background. The rest of the seat theming — the
   header accent, the drop button, the board wash — is untouched, so you can
   still tell whose turn it is without the app being boxed in. */
.app.seat-themed{box-shadow:0 0 26px var(--player-wash)}
/* header hairline stays neutral too — it was the second gold line on screen */
.app.seat-themed .gheader .htitle b{color:var(--player-color)}
.app.seat-themed #test-banner{background:var(--player-wash)!important;border-color:var(--player-color)!important;color:var(--player-color)!important}
.app.quake{animation:pk-quake .5s cubic-bezier(.3,0,.4,1)}
.screen{display:none;flex:1;min-height:0;flex-direction:column}
.screen.active{display:flex}

.gheader{display:flex;align-items:center;gap:10px;height:48px;padding:0 14px;
  background:var(--header);border-bottom:1px solid var(--line);flex:none}
.gheader .htitle{flex:1;text-align:center;line-height:1.12}
.gheader .htitle b{display:block;font:700 14px Manrope,system-ui;color:var(--text)}
.gheader .htitle span{display:block;font:500 10px Manrope,system-ui;color:var(--hint)}
.hbtn{display:flex;align-items:center;justify-content:center;width:26px;height:26px;border-radius:9px;
  background:var(--chip);border:1px solid var(--line);cursor:pointer;flex:none}

/* SPECTATE — its own feature flag (shared/const.js SPECTATE_ENABLED); a
   spectator holds no seat and every money control is inert. Badge hidden
   unless #app carries .spectating (set in app.js render() from you.spectating). */
.spectate-badge{display:none;flex:none;align-items:center;gap:4px;padding:3px 9px;border-radius:999px;
  background:color-mix(in srgb, var(--blue) 16%, transparent);border:1px solid var(--blue);
  color:var(--blue);font:800 10px Manrope,system-ui;letter-spacing:.06em;white-space:nowrap}
.app.spectating .spectate-badge{display:inline-flex}
.app.spectating #drop-btn,.app.spectating #ready-btn,.app.spectating #game-again,.app.spectating #receipt-again{
  pointer-events:none;opacity:.5;filter:grayscale(.4)}

.col{flex:1;display:flex;flex-direction:column;gap:9px;padding:11px 16px 0;min-height:0;overflow-y:auto}
.flabel{font:800 9.5px Manrope,system-ui;letter-spacing:.14em;color:var(--hint)}
.field{width:100%;padding:12px 13px;border-radius:13px;background:var(--chip);
  border:1px solid var(--line);color:var(--text);font:600 14px Manrope,system-ui;outline:none}
.field:focus{border-color:var(--gold-line)}
.chipbtn{padding:7px 14px;border-radius:9px;cursor:pointer;white-space:nowrap;
  font:700 11px Manrope,system-ui;background:transparent;color:var(--text);border:1px solid var(--line)}
.chipbtn.on{background:var(--text);color:var(--bg);border-color:var(--text)}
/* WALLET GATE — same "opacity:.45;cursor:default" idiom .riskbtn/.rp-btn
   already use for a genuinely-disabled control, not .dim (that class is a
   TOGGLE's off state, still a valid press target — a gated quick-tier chip is
   not). Covers create-btn/join-btn (below) and the quick-tier chips (this
   class) alike. */
.chipbtn:disabled{opacity:.45;cursor:default}
/* flex:none is load-bearing: .gold-slab sits in flex-column containers (.col,
   .gfooter) and its own overflow:hidden (needed to clip the .sheen shine)
   zeroes its flexbox "automatic minimum size" — without flex:none it becomes
   the one sibling allowed to shrink below content height on a tight viewport,
   silently squeezing and clipping its own label instead of the column
   scrolling like everything else. Measured with the keyboard up (375x812,
   __tgViewport.force(340)): the slab compressed to 36px, well under the 44px a
   fingertip needs. Same guard nerve-pvp already carries; .ghost-slab has had
   it since it was written. .btnrow .gold-slab{flex:1} is MORE specific and
   still wins, which is correct — that is a row, not a squeezed column. */
.gold-slab{position:relative;overflow:hidden;flex:none;text-align:center;padding:15px 0;border-radius:17px;
  background:var(--gold);border:3px solid var(--gold-edge);box-shadow:0 5px 0 var(--gold-shadow);
  font:600 17px Fredoka,system-ui;color:var(--gold-ink);cursor:pointer;width:100%}
.gold-slab:active{transform:translateY(3px);box-shadow:0 2px 0 var(--gold-shadow)}
.gold-slab.dim{background:var(--chip);border-color:var(--edge);box-shadow:0 4px 0 var(--tshadow);color:var(--hint)}
.gold-slab:disabled{opacity:.45;cursor:default}
.gold-slab .sheen{position:absolute;top:0;bottom:0;left:0;width:26%;
  background:linear-gradient(90deg,transparent,rgba(255,255,255,.5),transparent);
  animation:pk-sheen 6.8s ease-in-out infinite;pointer-events:none}
.ghost-slab{flex:none;min-width:92px;text-align:center;padding:15px 14px;border-radius:17px;background:transparent;
  border:3px solid var(--edge);box-shadow:0 5px 0 var(--tshadow);
  font:600 17px Fredoka,system-ui;color:var(--hint);cursor:pointer}
.ghost-slab:disabled{opacity:.45;cursor:default}
/* WALLET GATE explainer under a gated control — reuses .hint-line's type and
   .blue-link's inline "Connect wallet" action; .short recolors it into the
   balance-shortfall warning (--red-text) so it reads differently from the
   neutral "connect your wallet" copy. */
.wgate-note{text-align:left}
.wgate-note.short{color:var(--red-text)}
.fresh-reset{width:100%;padding:7px 10px;color:var(--hint);border:1px solid var(--line);border-radius:7px;
  font:700 10px Manrope,system-ui;letter-spacing:.03em;background:var(--chip);cursor:pointer}
.fresh-reset:active{transform:translateY(1px);color:var(--text)}
.blue-link{font:700 11px Manrope,system-ui;color:var(--blue);cursor:pointer}
.hint-line{font:500 11px Manrope,system-ui;color:var(--hint);text-align:center}

.brandhead{display:flex;align-items:center;gap:8px;padding:14px 16px 4px}
.brandhead .btitle{font:700 20px Fredoka,system-ui;color:var(--text);flex:1}
.introcard{position:relative;flex-shrink:0;border-radius:20px;padding:15px 16px;background:var(--navy);
  border:2px solid var(--navy-edge);box-shadow:0 4px 0 rgba(0,0,0,.3);overflow:hidden;color:#EDF2F8}
.introcard .glow{position:absolute;inset:0;background:radial-gradient(115% 85% at 50% -12%,rgba(224,164,74,.17),transparent 62%);pointer-events:none}
.introcard .mtitle{position:relative;font:600 17px Fredoka,system-ui;color:var(--gold-text)}
.introcard .msub{position:relative;font:500 13px Manrope,system-ui;line-height:1.35;color:#7E8FA6;margin-top:3px}

.roomcode{display:flex;justify-content:center;padding:6px 0 0}
.roomcode .code{font:600 44px Fredoka,system-ui;color:var(--gold-text-lg);letter-spacing:.14em;text-shadow:0 3px 0 rgba(0,0,0,.25)}
.lsection{display:flex;flex-direction:column;gap:7px;padding:11px 12px;border-radius:16px;
  background:var(--panel);border:1px solid var(--line)}
.lsecrow{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.plist{display:flex;flex-direction:column;gap:7px}
.prow{display:flex;align-items:center;gap:10px;padding:9px 11px;border-radius:14px;
  background:linear-gradient(90deg,var(--seat-wash),var(--chip) 64%);border:1px solid var(--seat-edge)}
.prow .pav{width:34px;height:34px;border-radius:11px;background:var(--tile);border:3px solid var(--edge);
  box-shadow:0 3px 0 var(--tshadow);color:var(--hint);font:800 11px Manrope,system-ui;
  display:flex;align-items:center;justify-content:center;flex:none}
.prow .pav,.prow.host .pav{background:var(--seat-color);border-color:var(--seat-edge);box-shadow:0 3px 0 var(--seat-edge);color:var(--seat-ink)}
.prow.me{box-shadow:inset 0 0 0 1px var(--seat-color),0 0 10px var(--seat-wash)}
.prow .pname{font:700 13px Manrope,system-ui;color:var(--text);flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.prow .pmeta{font:600 10.5px Manrope,system-ui;color:var(--hint)}
.prow.dc{opacity:.5}
.stepper{display:flex;align-items:center;gap:8px}
.stepper .sbtn{width:34px;height:34px;border-radius:11px;background:var(--tile);border:2px solid var(--edge);
  box-shadow:0 3px 0 var(--tshadow);color:var(--text);font:700 16px Fredoka,system-ui;cursor:pointer;flex:none}
.stepper .sval{min-width:74px;text-align:center;font:600 18px Fredoka,system-ui;color:var(--gold-text-lg)}

/* score strip */
.claim-note{text-align:center;font:800 9px Manrope,system-ui;letter-spacing:.08em;color:var(--arcade-cyan);margin-bottom:-4px}
.scorerow{display:flex;gap:6px;flex:none}
.scard{position:relative;flex:1;min-width:0;display:flex;flex-direction:column;align-items:center;gap:1px;padding:7px 3px 6px;
  border-radius:13px;background:linear-gradient(180deg,var(--seat-wash),var(--chip));border:1px solid var(--seat-edge);border-top:3px solid var(--seat-color)}
.scard.on{box-shadow:0 0 12px var(--seat-wash);animation:pk-ringpop .3s cubic-bezier(.2,1.5,.4,1)}
.scard.you{background:var(--seat-color);border-color:var(--seat-edge);box-shadow:0 4px 0 var(--seat-edge),0 0 14px var(--seat-wash)}
.scard.drop-ready{cursor:pointer;animation:pk-drop-ready 1.05s ease-in-out infinite;transform:translateY(0)}
.scard.drop-ready:active{transform:translateY(2px) scale(.97)}
.scard .sname{font:800 9.5px Manrope,system-ui;color:var(--hint);letter-spacing:.04em;max-width:100%;
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.scard .seatdot{display:inline-block;width:9px;height:9px;border-radius:50%;margin-right:4px;vertical-align:-1px;
  background:var(--seat-color);border:1.5px solid var(--seat-edge);box-shadow:inset 0 1px 1px rgba(255,255,255,.65),0 0 5px var(--seat-color)}
.scard .sname em{margin-left:3px;padding:1px 3px;border-radius:4px;background:rgba(0,0,0,.18);font:800 9px Manrope,system-ui;font-style:normal}
.scard.on .sname{color:var(--seat-color)}
.scard.you .sname,.scard.you .sclaim,.scard.you .spoints{color:var(--player-ink)}
.scard.you .seatdot{background:#fff;border-color:var(--seat-edge);box-shadow:0 0 5px rgba(255,255,255,.8)}
.scard .sclaim{display:flex;align-items:baseline;gap:2px;color:var(--hint);line-height:1}
.scard.claiming .sclaim{color:var(--seat-color);text-shadow:0 0 10px var(--seat-wash)}
.scard.you.claiming .sclaim{color:var(--player-ink);text-shadow:0 0 8px rgba(255,255,255,.38)}
.scard .sclaim strong{font:600 16px Fredoka,system-ui;letter-spacing:-.02em}
.scard .sclaim small{font:900 9px Manrope,system-ui;letter-spacing:.03em}
.scard .sclaim.jump{animation:pk-claim-pop .64s cubic-bezier(.18,1.5,.35,1)}
.scard .spoints{font:700 10px Manrope,system-ui;color:var(--hint);line-height:1.1}
.scard .spoints b{font-weight:900}
/* CRAZY WILD's centre trap (-30) can push a running total negative — the
   scorecard sits on themed --chip/--seat-wash, so this uses --red-text (the
   AA-safe ink), not the board's plain --red. No clamping anywhere upstream:
   this only ever COLORS whatever signed number is already there. */
.scard .spoints b.neg{color:var(--red-text)}
/* .you's card fills with the bright per-seat colour (yellow/cyan/green/pink),
   not a themed panel — --red-text (tuned for light page surfaces) measures as
   low as 3.6:1 against the pink seat. --red-ink is dark enough to clear
   4.5:1 against EVERY seat colour (6.3:1 worst case, on pink; 7.9-12.8:1 on
   the other three) — same role SEAT_INKS already plays for the card's other
   text, just red instead of the seat's own ink. */
.scard.you .spoints b.neg{color:var(--red-ink)}
.scard .sballs{display:flex;gap:3px;height:6px}
.scard .sballs i{width:6px;height:6px;border-radius:50%;background:var(--edge)}
.scard .sballs i.left{background:var(--seat-color)}
.scard.you .sballs i{background:rgba(0,0,0,.22)}.scard.you .sballs i.left{background:var(--player-ink)}
.scard .seatdrop{margin-top:2px;width:calc(100% - 8px);padding:3px 2px;border-radius:4px;background:var(--seat-color);color:var(--seat-ink);
  font:900 9px Manrope,system-ui;letter-spacing:.03em;line-height:1.2;box-shadow:0 2px 0 var(--seat-edge)}
.scard.you .seatdrop{background:var(--player-ink);color:var(--seat-color);box-shadow:0 2px 0 rgba(0,0,0,.28)}
.scard.dc{opacity:.55}

/* board */
.boardwrap{position:relative;border-radius:20px;background:var(--navy);border:2px solid var(--navy-edge);
  box-shadow:0 4px 0 rgba(0,0,0,.3);padding:10px 8px 8px;overflow:hidden;flex:none}
/* The board keeps its own dark --navy-edge instead of being framed in the
   seat colour — for seat 0 (#FFD447) that frame was the gold border round
   the table. The inner wash stays, so the table is still tinted to whoever
   is playing, just not outlined. */
.app.seat-themed .boardwrap{box-shadow:0 5px 0 rgba(0,0,0,.34),inset 0 0 45px var(--player-wash)}
.boardwrap .glow{position:absolute;inset:0;background:radial-gradient(115% 85% at 50% -12%,rgba(255,255,255,.05),transparent 62%);pointer-events:none}
.boardwrap canvas{display:block;width:100%;height:auto;position:relative}
.rail{display:none}
.slotrow{position:relative;display:grid;grid-template-columns:repeat(13,1fr);gap:2px;margin-top:4px}
.slot{text-align:center;padding:6px 0 5px;border-radius:7px;background:rgba(255,255,255,.05);
  border:1px solid rgba(255,255,255,.08);font:600 9.5px Fredoka,system-ui;color:#7E8FA6;line-height:1}
.slot.landed{position:relative;z-index:2;background:var(--slot-fill);border:2px solid rgba(255,255,255,.82);padding:5px 0 4px;color:#fff;text-shadow:0 1px 2px rgba(0,0,0,.8);box-shadow:0 0 10px var(--slot-glow),inset 0 0 7px rgba(255,255,255,.28)}
.slot.landed[data-hits]:not([data-hits="1"])::after{content:'×' attr(data-hits);position:absolute;right:-3px;top:-7px;padding:1px 3px;border-radius:5px;background:#fff;color:#111;font:800 9px Manrope,system-ui;text-shadow:none;box-shadow:0 1px 4px rgba(0,0,0,.45)}
.slot.impact{animation:pk-slot-impact .82s cubic-bezier(.2,1.4,.3,1)}
.slot.rich{color:#C9D6E6}
/* CRAZY WILD's centre trap (-30) — the board is ALWAYS the dark navy
   .boardwrap regardless of theme, so this uses --red at full saturation
   (already ~6.8:1 on --navy) rather than the theme-swapped --red-text ink
   meant for lighter page surfaces. The number's own minus sign is the
   "explicit minus"; the tint + dashed ring make it unmistakable at a glance,
   not just on close reading. */
.slot.loss{color:var(--red);background:rgba(255,90,78,.16);border-color:rgba(255,90,78,.5)}
.slot.loss.landed{background:var(--slot-fill);border-color:#fff}
.slotrow .slot:first-child,.slotrow .slot:last-child{position:relative;overflow:hidden;color:#F4F6FF;
  border-color:rgba(224,164,74,.55);background:linear-gradient(180deg,rgba(224,164,74,.22),rgba(224,164,74,.07));
  animation:pk-edge-jackpot 1.8s ease-in-out infinite}
.slotrow .slot:first-child::before,.slotrow .slot:last-child::before{content:'';position:absolute;top:-3px;bottom:-3px;left:-60%;width:45%;
  background:linear-gradient(90deg,transparent,rgba(255,255,255,.68),transparent);animation:pk-edge-sweep 2.05s linear infinite;will-change:transform}
.slotrow[data-risk="wild"] .slot:first-child,.slotrow[data-risk="wild"] .slot:last-child{border-color:#D97982;
  color:#FFF1F2;animation-duration:1.05s;box-shadow:0 0 10px rgba(217,121,130,.3)}
.slotrow[data-risk="wild"] .slot:first-child::before,.slotrow[data-risk="wild"] .slot:last-child::before{animation-duration:1.35s}
.slotrow .slot.landed:first-child,.slotrow .slot.landed:last-child{background:var(--slot-fill);border-color:#fff;
  box-shadow:0 0 14px var(--slot-glow),inset 0 0 8px rgba(255,255,255,.34);animation:none}
.slotrow .slot.impact:first-child,.slotrow .slot.impact:last-child{animation:pk-slot-impact .82s cubic-bezier(.2,1.4,.3,1)}
.slotrow .slot.landed:first-child::before,.slotrow .slot.landed:last-child::before{display:none}
.pfloat{position:absolute;font:700 15px Fredoka,system-ui;color:#F0B75A;
  text-shadow:0 2px 0 rgba(0,0,0,.55);animation:pk-float 1.2s ease-out forwards;pointer-events:none;z-index:5}
/* CRAZY WILD centre-trap drop feedback (see app.js landBall) — a static glow,
   not an extra animation, so it stays transform/opacity-only for reduced
   motion (the existing pk-float keyframe already is) */
.pfloat.loss{text-shadow:0 2px 0 rgba(0,0,0,.55),0 0 9px rgba(255,90,78,.6)}
.landburst{position:absolute;width:4px;height:4px;margin:-2px 0 0 -2px;z-index:8;pointer-events:none;color:var(--burst-color)}
.landburst::before{content:'';position:absolute;left:50%;top:50%;width:20px;height:20px;border:3px solid currentColor;border-radius:50%;animation:pk-land-ring .9s ease-out forwards}
.landburst i{position:absolute;left:1px;top:1px;width:2px;height:14px;border-radius:2px;background:currentColor;transform-origin:1px 1px;animation:pk-land-ray .82s ease-out forwards}
.landburst i:nth-child(1){--ray:0deg}.landburst i:nth-child(2){--ray:60deg}.landburst i:nth-child(3){--ray:120deg}.landburst i:nth-child(4){--ray:180deg}.landburst i:nth-child(5){--ray:240deg}.landburst i:nth-child(6){--ray:300deg}

/* risk picker + footer */
.gfooter{flex:none;padding:11px 16px 16px;display:flex;flex-direction:column;gap:9px}
.turnbar{display:flex;align-items:center;gap:8px;padding:9px 12px;border-radius:13px;
  background:var(--chip);border:1px solid var(--line)}
.app.seat-themed .turnbar{border-color:var(--player-edge);background:linear-gradient(90deg,var(--player-wash),var(--chip) 58%)}
.app.seat-themed #drop-btn:not(.dim){background:var(--player-color);border-color:var(--player-edge);box-shadow:0 5px 0 var(--player-edge),0 0 16px var(--player-wash);color:var(--player-ink)}
.turnbar.yours{background:color-mix(in srgb,var(--gold) 12%,transparent);border-color:var(--gold-line)}
.turnbar .tb-yours{font:700 12px Manrope,system-ui;color:var(--gold-text)}
.turnbar .tb-wait{display:flex;align-items:center;gap:6px;font:700 12px Manrope,system-ui;color:var(--hint)}
.turnbar .dots{display:flex;gap:3px}
.turnbar .dots i{width:4px;height:4px;border-radius:50%;background:var(--hint);animation:pk-dots 1.1s infinite}
.turnbar .dots i:nth-child(2){animation-delay:.18s}
.turnbar .dots i:nth-child(3){animation-delay:.36s}
.turnbar .tb-right{margin-left:auto;font:700 11px Manrope,system-ui;color:var(--hint)}
.riskrow{display:flex;gap:9px}
.riskbtn{flex:1;text-align:center;padding:12px 0 10px;border-radius:15px;background:var(--chip);
  border:3px solid var(--edge);box-shadow:0 4px 0 var(--tshadow);cursor:pointer}
.riskbtn:active{transform:translateY(3px);box-shadow:0 1px 0 var(--tshadow)}
.riskbtn .rname{font:600 15px Fredoka,system-ui;color:var(--text);line-height:1.1}
.riskbtn .rsub{font:600 9px Manrope,system-ui;color:var(--hint);letter-spacing:.06em}
.riskbtn.safe .rname{color:#7FD0A0}
.riskbtn.medium .rname{color:var(--gold-text)}
.riskbtn.wild .rname{color:var(--red)}
.riskbtn:disabled{opacity:.45;cursor:default}
.riskbtn:disabled:active{transform:none;box-shadow:0 4px 0 var(--tshadow)}

/* PROVABLY FAIR is a header square, not a strip (owner, 2026-09-18). The old
   .fairstrip sat under the board: shield, "Provably fair", the short commit
   hash and RECEIPT › on a 36px row plus the column gap over it — on the 3D
   entry that was height the cabinet could have had, and the game header's
   right-hand slot sat empty until the match ended. It is now an .hbtn beside
   the play-again square (index.html / 3d.html), same id, same click. The
   hash app.js still writes into #fair-hash is kept for screen readers only —
   the receipt sheet shows the full commit one tap away. */
.fairbtn{color:var(--blue)}
.fairbtn svg{display:block;flex:none}
.fairbtn .fh{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;
  clip:rect(0 0 0 0);white-space:nowrap;border:0}
/* The match header now carries up to three squares beside the How-to pill, so
   the sub-line ("match #12 · Classic · 2 players · round 1 of 3") may wrap —
   to two lines at most, which still fits the 48px bar; the round number is
   repeated in the turn bar anyway. */
#scr-game .gheader .htitle span{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}

/* sheets, toasts */
.sheetback{position:absolute;inset:0;z-index:60;background:rgba(6,10,16,.74);display:none;
  flex-direction:column;justify-content:flex-end;animation:pk-fade .18s ease-out}
.sheetback.open{display:flex}
.sheet{background:var(--panel);border-radius:22px 22px 0 0;padding:18px;max-height:88%;overflow-y:auto;
  /* `both` is load-bearing, not polish: pk-rise starts at translateY(110%)
     (fully below the viewport). Without a fill mode the element can be left
     showing that FROM-keyframe when the animation's start is delayed or
     coalesced by a concurrent render — observed at 375x812 as a receipt
     sheet parked off-screen behind its scrim, with no way to read or
     dismiss the provably-fair seed. `both` pins the terminal state. */
  animation:pk-rise .28s cubic-bezier(.2,1.1,.3,1) both}
.rhead{display:flex;align-items:center;gap:8px;margin-bottom:14px}
.rtitle{font:800 16px Manrope,system-ui;color:var(--text)}
.rdone{margin-left:auto;font:700 12px Manrope,system-ui;color:var(--blue);cursor:pointer}
.rrows{display:flex;flex-direction:column;gap:1px;border-radius:14px;overflow:hidden;border:1px solid var(--line)}
.rrow{display:flex;justify-content:space-between;gap:10px;padding:11px 13px;background:var(--chip);
  font:600 12px Manrope,system-ui;color:var(--hint)}
.rrow b{color:var(--text)}
.rrow b.gold{color:var(--gold-text)}
.rrow b.red{color:var(--red-text)}
.seedbox{margin-top:12px;padding:12px 13px;border-radius:14px;background:var(--chip);border:1px solid var(--line)}
.seedbox .sl{font:800 9.5px Manrope,system-ui;letter-spacing:.13em;color:var(--hint);margin-bottom:5px}
.seedbox .sh{font:600 11px ui-monospace,Menlo,monospace;color:var(--text);word-break:break-all;line-height:1.5}
.seedbox .sh.dim{color:var(--hint)}
.seedbox .sbtns{display:flex;gap:12px;margin-top:10px}
.sheet .again{margin-top:12px}
.goldflash{position:absolute;inset:0;z-index:54;pointer-events:none;background:rgba(224,164,74,.5);
  animation:pk-flash .6s ease-out forwards}
.toasts{position:absolute;left:0;right:0;bottom:96px;z-index:80;display:flex;flex-direction:column;
  align-items:center;gap:6px;pointer-events:none}
.toast{max-width:86%;padding:9px 14px;border-radius:12px;background:rgba(6,10,16,.86);color:#EDF2F8;
  font:600 12px Manrope,system-ui;border:1px solid rgba(255,255,255,.12);animation:pk-fade .2s ease-out;text-align:center}
.toast.err{border-color:rgba(255,90,78,.5)}

/* verifier */
.vf-badge{display:inline-flex;align-items:center;gap:6px;padding:7px 12px;border-radius:11px;font:800 12px Manrope,system-ui}
.vf-badge.pass{background:color-mix(in srgb,var(--gold) 14%,transparent);border:1px solid var(--gold-line);color:var(--gold-text)}
.vf-badge.fail{background:rgba(255,90,78,.14);border:1px solid rgba(255,90,78,.4);color:var(--red)}
.vf-badge.idle{background:var(--chip);border:1px dashed var(--edge);color:var(--hint)}

@media (max-width:359px){ .roomcode .code{font-size:36px} .scard .sscore{font-size:16px} }
/* The 390px canvas height only clears .col's own scroll room down at the
   760px boundary this query was tuned for — every shorter viewport still got
   the same 390px, so on an iPhone-SE-class screen the slot row (where the
   ball actually lands) rendered below the fold with no on-screen cue to
   scroll for it. .col's non-board chrome (header/footer bars) measures a
   steady ~383px of that budget (169px above the board, ~27px for the slot
   row below it, ~176px of screen chrome outside .col, +11px measured
   margin — derived from live iPhone-SE and 393x700 measurements), so tying
   the canvas height to the real viewport keeps the whole board+payout row
   in view instead of one fixed number that only happens to work at the
   top of the range. */
@media (max-height:760px){.boardwrap canvas{height:clamp(150px, calc(var(--tg-vh,100dvh) - 383px), 390px)}}
/* COMPACT SPACING ON SHORT SCREENS — keyed on the LAYOUT height, not on the
   media query above. On Android the on-screen keyboard shrinks the real
   viewport, so a `@media (max-height:760px)` rule flips ON the moment the name
   field is tapped and every control below it moves up a few px while the
   finger is still down (the "UI compresses when the keyboard shows up"
   report). tg-viewport.js holds .app at its resting height while a field is
   focused, and var(--tg-vh,100dvh) IS that held height — so a step function on
   it does not move while typing. `(h - 760px) * 999` is hugely positive above
   the breakpoint and hugely negative below it; clamp() turns that into a
   two-value switch (compact at or below 760px, normal above). */
.col{gap:clamp(7px, calc(7px + (var(--tg-vh,100dvh) - 760px) * 999), 9px);padding-top:clamp(8px, calc(8px + (var(--tg-vh,100dvh) - 760px) * 999), 11px)}
.gfooter{padding-top:clamp(8px, calc(8px + (var(--tg-vh,100dvh) - 760px) * 999), 11px)}

/* ---------------------------------------------------------------- signature: modern pachinko cabinet
   Restrained arcade color, physical depth, and warm prize accents keep
   Plinko distinct without turning the whole shell into a neon terminal. */
:root,[data-theme="dark"]{
  --bg:#0E1520;--header:#131C2A;--panel:#172231;--tile:#223047;--edge:#40516C;
  --tshadow:#050A11;--text:#EEF2F6;--hint:#91A0B3;--line:rgba(173,190,211,.13);
  --chip:#192538;--blue:#66B3D0;--navy:#09111D;--navy-edge:#3E4E69;
  --arcade-cyan:#68BBC3;--arcade-violet:#9288B3;--arcade-pink:#C8799E;
}
[data-theme="light"]{
  --bg:#F3F5F8;--header:#ECEFF3;--panel:#FFFFFF;--tile:#E1E6ED;--edge:#A5B0C0;
  --tshadow:#A8B1BE;--text:#18212D;--hint:#464F5C;--line:rgba(38,52,69,.12);
  --chip:#E9EDF2;--blue:#397F9E;
  /* The arcade accents were only ever defined for the dark cabinet, so the
     light theme inherited them as ink: the 44px lobby room code was landing at
     2.03:1 on --bg — the worst contrast on any menu, gold included. Deepened
     here for the light surfaces only; the dark cabinet keeps its neon. */
  --arcade-cyan:#2C6F78;--arcade-violet:#635891;--arcade-pink:#9C3F68;
}
body{background:
  radial-gradient(circle at 12% 8%,rgba(104,187,195,.1),transparent 31%),
  radial-gradient(circle at 88% 90%,rgba(146,136,179,.08),transparent 34%),#080D15}
.app{background-color:var(--bg);background-image:
  linear-gradient(180deg,rgba(255,255,255,.018),transparent 18%),
  radial-gradient(circle at 50% 0,rgba(104,187,195,.035),transparent 42%);
  border-inline:1px solid rgba(142,158,181,.16)}
.gheader{background:linear-gradient(90deg,#111A27,#182334 54%,#111B29);
  border-bottom-color:rgba(168,185,207,.2);box-shadow:0 2px 10px rgba(0,0,0,.12)}
.brandhead .btitle,.gheader .htitle b,.introcard .mtitle,.roomcode .code,
.scard .sscore,.slot,.gold-slab{font-family:"Space Grotesk",Manrope,sans-serif}
.brandhead .btitle{letter-spacing:.018em;font-size:20px}
.brandhead::before{content:'●';color:var(--gold-line);font-size:10px;text-shadow:none}
.introcard{border-radius:10px;background:
  linear-gradient(120deg,rgba(104,187,195,.07),transparent 34%),
  linear-gradient(180deg,#162233,#101824);border-color:#44536B;
  box-shadow:0 5px 0 #070B11,inset 0 1px 0 rgba(255,255,255,.045)}
.introcard .mtitle{color:#DCE7EE;letter-spacing:.01em;text-shadow:none}
.introcard .glow{background:linear-gradient(90deg,transparent,rgba(224,164,74,.035),transparent)}
.boardwrap{border-radius:10px;background:#09111D;border:2px solid #3D4C65;
  box-shadow:0 5px 0 #04080E,inset 0 0 0 1px rgba(255,255,255,.035)}
/* This later rule is the one that actually painted the gold frame — it set the
   border to --player-color (#FFD447 for seat 0), and being further down the
   file it won. Keep the neutral #3D4C65 edge from the rule above; the tint
   stays as an inner wash only. */
.app.seat-themed .boardwrap{box-shadow:0 5px 0 #02030A,inset 0 0 24px var(--player-wash)}
.boardwrap .glow{background:radial-gradient(90% 55% at 50% 0,rgba(154,177,196,.075),transparent 72%)}
.slot{border-radius:5px;background:rgba(132,151,177,.1);border-color:rgba(173,193,214,.13);color:#91A1B5}
.slot.rich{color:#E2E7EE;text-shadow:none}
.slot.landed{border-color:#FFFFFF;box-shadow:0 0 14px var(--slot-glow),inset 0 0 8px rgba(255,255,255,.34)}
.gold-slab{border-radius:9px;background:linear-gradient(180deg,#EDB85B,#D2913A);
  border-color:#96651B;box-shadow:0 5px 0 #6C4512,inset 0 1px 0 rgba(255,255,255,.26);color:var(--gold-ink)}
.ghost-slab,.field,.lsection,.prow,.scard,.turnbar,.sheet,.seedbox{border-radius:7px}
.riskbtn.safe .rname{color:var(--arcade-cyan)}
.riskbtn.medium .rname{color:var(--gold-text)}
.riskbtn.wild .rname{color:#D97982}
.roomcode .code{color:var(--arcade-cyan);text-shadow:0 2px 0 rgba(0,0,0,.24)}
.blue-link,.rdone{color:var(--blue)}

/* GROUP TABLE (PLATFORM-SEAM §1). A table anchored to an operator's chat card
   has NO code and NO invite link — it is found by the card, and the way back is
   that chat. Hide the invite/code affordances rather than offer a code that
   would not work. The 3% commission disclosure is untouched: it is disclosed
   exactly once per screen in BOTH entry models. `prefers-reduced-motion` must
   stay the last block in this file, so this goes above it.
   EVERY selector below repeats the body.group-entry prefix on purpose: a CSS
   selector list does NOT inherit it, so a list whose later items are bare
   #copy-link / #ch-invite would hide the invite link (and the challenge invite
   pane) on the SOLO screen too. */
body.group-entry #copy-code,
body.group-entry #copy-link,
body.group-entry #ch-invite { display: none !important; }

@media (prefers-reduced-motion:reduce){
  /* display:none, NOT animation:none. The sheen is a 26%-wide white gradient
     band that is only ever off-button because the animation moves it there;
     stopping the animation PARKS it at its untransformed position, leaving a
     permanent glare stripe near the left edge of every gold CTA. Measured:
     an 88px rgba(255,255,255,.5) band 3px from the left of a 343px button.
     Reduced motion means no motion, not a frozen artefact. */
  .gold-slab .sheen{display:none}
  .slotrow .slot:first-child,.slotrow .slot:last-child{animation:none}
  .slotrow .slot:first-child::before,.slotrow .slot:last-child::before{display:none}
}

/* Modern phone viewport + notch/home-indicator handling. */
.app{height:100vh;height:var(--tg-vh,100dvh)}
.gheader{height:calc(48px + max(env(safe-area-inset-top,0px),var(--tg-safe-top,0px)));padding-top:max(env(safe-area-inset-top,0px),var(--tg-safe-top,0px));
  padding-left:calc(14px + max(env(safe-area-inset-left,0px),var(--tg-safe-left,0px)));padding-right:calc(14px + max(env(safe-area-inset-right,0px),var(--tg-safe-right,0px)))}
.brandhead{padding-top:calc(14px + max(env(safe-area-inset-top,0px),var(--tg-safe-top,0px)));
  padding-left:calc(16px + max(env(safe-area-inset-left,0px),var(--tg-safe-left,0px)));padding-right:calc(16px + max(env(safe-area-inset-right,0px),var(--tg-safe-right,0px)))}
.col{padding-left:calc(16px + max(env(safe-area-inset-left,0px),var(--tg-safe-left,0px)));padding-right:calc(16px + max(env(safe-area-inset-right,0px),var(--tg-safe-right,0px)))}
#scr-home>.col{padding-bottom:calc(16px + max(env(safe-area-inset-bottom,0px),var(--tg-safe-bottom,0px)))}
.gfooter{padding-left:calc(16px + max(env(safe-area-inset-left,0px),var(--tg-safe-left,0px)));padding-right:calc(16px + max(env(safe-area-inset-right,0px),var(--tg-safe-right,0px)));
  padding-bottom:calc(16px + max(env(safe-area-inset-bottom,0px),var(--tg-safe-bottom,0px)))}
.sheet{padding-left:calc(18px + max(env(safe-area-inset-left,0px),var(--tg-safe-left,0px)));padding-right:calc(18px + max(env(safe-area-inset-right,0px),var(--tg-safe-right,0px)));
  padding-bottom:calc(18px + max(env(safe-area-inset-bottom,0px),var(--tg-safe-bottom,0px)))}
.toasts{bottom:calc(96px + max(env(safe-area-inset-bottom,0px),var(--tg-safe-bottom,0px)))}
.field{font-size:16px}
button,a{touch-action:manipulation}

/* Finished matches switch to a cabinet-style settlement board. */
#game-col.show-end-summary>:not(.end-summary){display:none!important}
.end-summary[hidden]{display:none!important}
.end-summary{position:relative;overflow:hidden;flex:none;padding:16px 12px 12px;border:2px solid #4D607B;border-radius:8px;
  background:linear-gradient(180deg,rgba(157,180,204,.08),transparent 26%),#09111D;
  box-shadow:0 5px 0 #02030A,inset 0 0 34px rgba(128,157,189,.06);animation:pk-fade .3s ease}
.end-summary::before{content:'';position:absolute;left:8px;right:8px;top:7px;height:2px;background:linear-gradient(90deg,transparent,#8EA7BF,transparent);opacity:.5}
.end-kicker,.end-title,.end-detail,.end-totals,.end-ledger-title,.end-ledger,.end-note,.end-balance,.end-receipt{position:relative;z-index:1}
.end-kicker{text-align:center;font:800 9px Manrope,system-ui;letter-spacing:.16em;color:#93AEC6}
.end-title{text-align:center;margin-top:5px;font:700 25px Fredoka,system-ui;color:#EFBE72;line-height:1.08}
.end-detail{text-align:center;margin-top:4px;font:600 10px Manrope,system-ui;color:#8FA1B5}
.end-totals{display:grid;grid-template-columns:repeat(3,1fr);gap:6px;margin-top:13px}
.end-totals>span{min-width:0;padding:8px 5px;border:1px solid #314159;border-radius:5px;background:#101B2A;text-align:center}
.end-totals small{display:block;font:800 9px Manrope,system-ui;letter-spacing:.03em;color:#7F93A9;line-height:1.25}
.end-cell small{display:block;font:800 9px Manrope,system-ui;letter-spacing:.03em;color:#7F93A9;white-space:nowrap}
.end-totals b{display:block;margin-top:2px;font:700 13px Fredoka,system-ui;color:#EDF2F8;white-space:nowrap}
.end-ledger-title{display:flex;align-items:end;justify-content:space-between;margin:13px 2px 6px}
.end-ledger-title b{font:800 9px Manrope,system-ui;letter-spacing:.12em;color:#93AEC6}.end-ledger-title span{font:600 11px Manrope,system-ui;color:#7F93A9}
.end-ledger{display:flex;flex-direction:column;gap:5px}
.end-player{display:grid;grid-template-columns:minmax(0,1fr) 58px 58px 63px;gap:5px;align-items:center;padding:7px;border:1px solid #2B3B51;border-left:3px solid var(--row-color,#93AEC6);border-radius:5px;background:#101B2A}
.end-player.winner{background:linear-gradient(90deg,color-mix(in srgb,var(--row-color) 14%,#101B2A),#101B2A 48%);box-shadow:inset 0 0 18px color-mix(in srgb,var(--row-color) 8%,transparent)}
.end-player.you{outline:1px solid color-mix(in srgb,var(--row-color) 58%,transparent);outline-offset:-1px}
.end-person{display:flex;align-items:center;min-width:0;gap:6px}.end-person>span:last-child{min-width:0}
.end-person b{display:block;overflow:hidden;text-overflow:ellipsis;font:700 12px Manrope,system-ui;color:#EDF2F8;white-space:nowrap}
.end-person small{display:block;overflow:hidden;text-overflow:ellipsis;font:800 9px Manrope,system-ui;color:#8297AE;white-space:nowrap}
.end-rank{display:grid;place-items:center;flex:none;width:22px;height:22px;border:1px solid var(--row-color,#93AEC6);border-radius:4px;font:700 10px Fredoka,system-ui;color:var(--row-color,#93AEC6)}
.end-cell{text-align:right;min-width:0}.end-cell b{display:block;margin-top:1px;font:700 11px Fredoka,system-ui;color:#EDF2F8;white-space:nowrap}
.end-summary .positive{color:#5CF2A2}.end-summary .negative{color:#FF7066}.end-summary .flat{color:#8297AE}
.end-note,.end-balance{text-align:center;margin:8px 3px 0;font:600 11px Manrope,system-ui;line-height:1.35;color:#7F93A9}
.end-receipt{width:100%;margin-top:9px;padding:9px;border:1px solid #526985;border-radius:5px;background:#142238;font:800 11px Manrope,system-ui;letter-spacing:.02em;color:#A8C0D5}
.end-empty{padding:16px;text-align:center;color:#8297AE;font-size:11px}
@media(max-width:370px){.end-summary{padding-inline:8px}.end-player{grid-template-columns:minmax(0,1fr) 51px 51px 57px;gap:3px;padding-inline:5px}.end-cell b{font-size:10px}.end-ledger-title span{display:none}}

/* crazy mode: saw contact sparks (count/reach scale with fling magnitude) */
@keyframes pk-sawspark{0%{transform:translate(0,0);opacity:1}100%{transform:translate(var(--sx),calc(var(--sy) + 34px));opacity:0}}
.sawspark{position:absolute;z-index:9;border-radius:1px;pointer-events:none;
  animation:pk-sawspark .62s cubic-bezier(.2,.6,.6,1) forwards}
@media (prefers-reduced-motion: reduce){.sawspark{display:none}}

/* crazy mode: gate split — a ring tears into two halves as the ball divides */
@keyframes pk-splithalf{0%{transform:translate(-50%,-50%) scale(.5);opacity:1}
  100%{transform:translate(calc(-50% + var(--dx)),-50%) scale(1.5);opacity:0}}
.splithalf{position:absolute;width:20px;height:20px;border-radius:50%;
  border:3px solid #F0B75A;z-index:9;pointer-events:none;
  animation:pk-splithalf .7s cubic-bezier(.2,.7,.4,1) forwards}
@media (prefers-reduced-motion: reduce){.splithalf{display:none}}

/* ---- battle modes + tournament framing (both themes via vars) ---- */
.prztable{display:flex;flex-direction:column;gap:5px;padding:9px 11px;margin-top:6px;
  background:var(--chip);border:1px solid var(--line);border-radius:11px}
.przrow{display:flex;align-items:baseline;gap:8px;font:700 11px Manrope,system-ui;color:var(--text)}
.przrow small{font:600 10px Manrope,system-ui;color:var(--hint)}
.przrow b{margin-left:auto;font:700 12px Manrope,system-ui;color:var(--gold-text)}
.przfoot{margin-top:2px;font:500 11px Manrope,system-ui;line-height:1.35;color:var(--hint)}
.modebadge{text-align:center;font:800 9px Manrope,system-ui;letter-spacing:.13em;
  color:var(--gold-text);padding:4px 8px;border:1px dashed var(--edge);border-radius:8px;
  background:var(--chip)}
.teambar{display:flex;align-items:center;justify-content:center;gap:10px;
  padding:5px 8px;border:1px solid var(--line);border-radius:9px;background:var(--chip)}
.teambar .tside{font:800 11px Manrope,system-ui;color:var(--hint);letter-spacing:.04em}
.teambar .tside.lead{color:var(--gold-text)}
.teambar em{font:600 9px Manrope,system-ui;color:var(--hint);font-style:normal}
.scard .sname em.teamtag{margin-left:0;margin-right:3px}

/* ---- async challenge (both themes via vars) ---- */
.chlist{display:flex;flex-direction:column;gap:6px}
.chrow{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:3px 10px;align-items:center;
  padding:9px 11px;border-radius:12px;background:var(--chip);border:1px solid var(--line);
  border-left:3px solid var(--gold-text);text-align:left;width:100%;cursor:pointer;color:var(--text)}
.chrow:active{transform:translateY(1px)}
.chrow.settled{border-left-color:var(--blue)}
.chrow.gone{border-left-color:var(--edge);opacity:.72;cursor:default}
.chrow .chname{font:700 12.5px Manrope,system-ui;color:var(--text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.chrow .chstate{grid-column:1;font:600 10px Manrope,system-ui;color:var(--hint)}
.chrow .chval{grid-row:1 / span 2;grid-column:2;text-align:right;font:700 12px Fredoka,system-ui;color:var(--gold-text);white-space:nowrap}
.chrow .chval small{display:block;font:800 9px Manrope,system-ui;letter-spacing:.03em;color:var(--hint)}
.chempty{font:500 11px Manrope,system-ui;color:var(--hint)}
.chpanel{flex:none;display:flex;flex-direction:column;gap:8px;padding:13px 12px;
  border-radius:14px;background:var(--chip);border:1px solid var(--line)}
.chpanel .chtitle{font:700 15px Fredoka,system-ui;color:var(--gold-text);text-align:center}
.chpanel .chsub{font:500 11px Manrope,system-ui;color:var(--hint);text-align:center;line-height:1.45}
.chpanel .chlink{font:600 10.5px ui-monospace,Menlo,monospace;color:var(--text);word-break:break-all;
  padding:8px 10px;border-radius:9px;background:var(--panel);border:1px dashed var(--edge);text-align:center}
.chpanel .chbtns{display:flex;gap:8px;flex-wrap:wrap;justify-content:center}
.chcommit{font:600 10px ui-monospace,Menlo,monospace;color:var(--hint);word-break:break-all;text-align:center}
.chvs{display:flex;align-items:center;justify-content:center;gap:8px;font:800 10px Manrope,system-ui;
  letter-spacing:.1em;color:var(--hint)}
.chvs b{font:700 15px Fredoka,system-ui;color:var(--text);letter-spacing:0}

/* ---- ARENA: open board, streak, weekly leaderboard (both themes) --------- */
/* Depth line ("Showing 30 of 214 — ending soonest first"): sits between the
   static rules hint and the row list, so the ordering/paging state is read
   before any row is. Empty (no text) when the board itself is empty — the
   .chempty state already explains that case. */
.arena-depth{font:700 11px Manrope,system-ui;letter-spacing:0;line-height:1.35;color:var(--hint);text-align:left}
.arena-depth:empty{display:none}
#arena-more[hidden]{display:none!important}
.arenalist{display:flex;flex-direction:column;gap:6px}
.arow{display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:3px 8px;align-items:center;
  padding:9px 10px;border-radius:12px;background:var(--chip);border:1px solid var(--line);
  border-left:3px solid var(--blue)}
.arow-info{grid-column:1;display:flex;flex-direction:column;gap:2px;min-width:0}
.arow .arname{font:700 12.5px Manrope,system-ui;color:var(--text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.arow .arstate{font:600 11px Manrope,system-ui;color:var(--hint);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.arow .arstake{grid-column:2;text-align:right;font:700 12px Fredoka,system-ui;color:var(--gold-text);white-space:nowrap}
.arow .arstake small{display:block;font:800 9px Manrope,system-ui;letter-spacing:.03em;color:var(--hint)}
.arow [data-arena-accept]{grid-column:3;padding:6px 12px;font-size:10.5px;white-space:nowrap}

/* One tight row of four stats — no oversized numeral, so the whole card
   stays a single line tall instead of eating a card's worth of height. Only
   the current-streak number goes gold when a streak is actually running. */
.streakcard{display:flex;align-items:center;gap:4px;padding:8px 6px;border-radius:12px;
  background:var(--chip);border:1px solid var(--line);transition:background .25s,border-color .25s}
.streakcard.hot{background:linear-gradient(135deg,var(--chip),rgba(224,164,74,.16));border-color:var(--gold-line)}
.streakitem{flex:1;min-width:0;display:flex;flex-direction:column;align-items:center;gap:1px}
.streakitem b{font:800 15px Fredoka,system-ui;color:var(--text)}
.streakcard.hot .streakitem:first-child b{color:var(--gold-text-lg)}
.streakitem span{font:700 9.5px Manrope,system-ui;letter-spacing:.03em;color:var(--hint);text-transform:uppercase}

.lblist{display:flex;flex-direction:column;gap:4px}
.lbrow{display:grid;grid-template-columns:20px minmax(0,1fr) auto auto;gap:6px;align-items:center;
  padding:7px 10px;border-radius:10px;background:var(--chip);border:1px solid var(--line);
  transition:background .2s,border-color .2s}
.lbrow.mine{border-color:var(--gold-line);background:rgba(224,164,74,.1)}
.lbrank{font:800 11px Manrope,system-ui;color:var(--hint);text-align:center}
.lbname{font:700 12px Manrope,system-ui;color:var(--text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.lbwins{font:700 11px Fredoka,system-ui;color:var(--gold-text);white-space:nowrap;text-align:right}
.lbwins small{display:block;font:800 9px Manrope,system-ui;letter-spacing:.03em;color:var(--hint)}
/* separate all-time streak badge — deliberately its own sub-label (never
   "WINS", never bare) so nobody reads the section's 7-day heading onto it */
.lbstreak{font:700 11px Fredoka,system-ui;color:var(--text);white-space:nowrap;text-align:right}
.lbstreak small{display:block;font:800 9px Manrope,system-ui;letter-spacing:.02em;color:var(--hint)}
.lbdivider{font:700 9px Manrope,system-ui;letter-spacing:.1em;text-transform:uppercase;color:var(--hint);
  text-align:center;margin:2px 0}
@media(max-width:370px){.arow{grid-template-columns:minmax(0,1fr) auto;grid-template-rows:auto auto}
  .arow .arstate{grid-row:1;grid-column:2}.arow [data-arena-accept]{grid-row:2;grid-column:1/-1}
  .lbrow{grid-template-columns:18px minmax(0,1fr) auto auto;gap:4px;padding:6px 8px}
  .lbwins small,.lbstreak small{font-size:9px;letter-spacing:.01em}}

/* ---- QUICK MATCH (both themes via vars) ----------------------------------
   The searching card is the only screen between the lobby's /?quick=<tier>
   link and a real table, so it stays deliberately thin: what stake, what
   happens next, and a way out. The WAITING badge/banner is its mid-match
   twin — a reserved seat is not a spectator seat, so it never borrows the
   blue spectate badge. */
.qcard{position:relative;overflow:hidden;margin-top:8px;padding:22px 16px 20px;border-radius:16px;
  background:var(--panel);border:1px solid var(--line);box-shadow:0 4px 0 var(--tshadow);text-align:center}
.qcard .glow{position:absolute;inset:0;pointer-events:none;
  background:radial-gradient(115% 85% at 50% -12%,color-mix(in srgb,var(--gold) 13%,transparent),transparent 62%)}
.qtitle{position:relative;font:700 19px Fredoka,system-ui;color:var(--gold-text-lg)}
.qsub{position:relative;margin-top:6px;font:500 11.5px Manrope,system-ui;color:var(--hint);line-height:1.5}
.qdots{position:relative;display:flex;justify-content:center;gap:7px;margin-bottom:12px}
.qdots i{width:9px;height:9px;border-radius:50%;background:var(--gold-line);animation:pk-dots 1.1s ease-in-out infinite}
.qdots i:nth-child(2){animation-delay:.16s}
.qdots i:nth-child(3){animation-delay:.32s}
@media (prefers-reduced-motion:reduce){.qdots i{animation:none;opacity:.6}}

/* ---- hero orb — home title + quick-match "finding a table" ----------------
   Composed PROCEDURALLY, not from a sprite. A ball is exact geometry, and the
   old art/ball.png was an opaque RGB bitmap with a baked near-black square:
   mix-blend-mode:screen hid the square against the dark chip, but the moment
   it bounced the chip clipped it and the box showed. There is no box here —
   just a circle, a specular highlight and a contact shadow, all painted with
   the live theme tokens, so it reads gold in dark and bronze in light with
   nothing to clip. Decorative only: aria-hidden, no pointer events, and both
   animations stop under prefers-reduced-motion. */
.introtop{position:relative;display:flex;align-items:center;gap:10px}
.introtop .mtitle{flex:1;min-width:0}
.hero-orb{flex:none;position:relative;width:72px;height:72px;pointer-events:none}
/* Nothing paints the host box — no panel, no wash, no gradient field. Every
   pixel this element draws belongs to a round shape (the orb and its elliptical
   contact shadow), which is the whole point: there is no rectangle left to
   become visible when the ball moves. */
/* Rest position and apex are chosen so the whole travel stays inside the 72px
   box: at rest the orb's top sits at 46% (33px) and the apex lifts it by one
   orb-height (-100% = 30px), landing at 3px. .introcard clips overflow, so an
   apex any higher would shear the top off the ball mid-bounce. */
.hero-orb .orb{position:absolute;left:50%;top:46%;width:42%;aspect-ratio:1;margin-left:-21%;
  border-radius:50%;
  background:
    radial-gradient(circle at 34% 28%,rgba(255,255,255,.92) 0 8%,rgba(255,255,255,.34) 18%,transparent 42%),
    radial-gradient(circle at 62% 70%,color-mix(in srgb,var(--gold-ink) 42%,transparent),transparent 58%),
    radial-gradient(circle at 42% 36%,color-mix(in srgb,#FFFFFF 26%,var(--gold)),var(--gold) 52%,var(--gold-edge) 100%);
  box-shadow:0 0 0 1px color-mix(in srgb,var(--gold-edge) 70%,transparent),
             0 0 14px color-mix(in srgb,var(--gold) 45%,transparent);
  animation:pk-orb-bounce 1.15s linear infinite}
/* the contact shadow lives on the shaft floor and pulses against the bounce */
.hero-orb::after{content:'';position:absolute;left:50%;bottom:9%;width:34%;height:5px;margin-left:-17%;
  border-radius:50%;background:color-mix(in srgb,var(--gold-ink) 55%,transparent);
  filter:blur(2px);animation:pk-orb-shadow 1.15s linear infinite}
.qhero{margin:0 auto 12px}
/* A BOUNCE IS NOT AN EASE-IN-OUT (rewritten 2026-09-13).
   The old version ran one cubic-bezier(.45,0,.55,1) across every segment. That
   curve is slow at BOTH ends, so the ball decelerated on its way DOWN into the
   floor and crawled back out of it — read as a pause before and after every
   impact ("too much delay between stages"). It also spent 24% of a 2.6s cycle
   (~620ms) squashed near the floor, where a real contact is under a tenth of
   that.

   Gravity has one shape and it is a parabola: leaving the floor the ball is at
   its fastest and decelerating, at the apex it is momentarily still, and
   falling it accelerates back to that same speed. Height under constant
   acceleration is quadratic in time, so the easing is per-segment — CSS
   applies the timing function declared IN a keyframe to the segment starting
   there — and the two curves are the exact cubic-Bézier forms of the QUADRATIC
   ease pair: (.33,.66,.66,1) rising, (.33,0,.66,.33) falling. Anything
   stronger (the first attempt used .1,.64,.34,1) overshoots the parabola early
   and the ball hangs at the top like a balloon; measured, it reached 52% of
   its height in the first 10% of the cycle where gravity gives 36%.

   The whole contact — squash and launch — is compressed into 10% of the cycle,
   and the round trip is 1.15s instead of 2.6s, which is what 24px of travel
   actually looks like. */
@keyframes pk-orb-bounce{
  /* contact: flattened against the floor, and leaving it fast */
  0%{transform:translateY(0) scale(1.16,.84);animation-timing-function:cubic-bezier(.16,.78,.38,1)}
  /* airborne, stretched along the direction of travel */
  5%{transform:translateY(-15%) scale(.94,1.08);animation-timing-function:cubic-bezier(.33,.66,.66,1)}
  /* apex: momentarily still, and round again — nothing is stretching it */
  50%{transform:translateY(-100%) scale(1,1);animation-timing-function:cubic-bezier(.33,0,.66,.33)}
  /* falling at full speed, stretched again */
  95%{transform:translateY(-15%) scale(.94,1.08);animation-timing-function:cubic-bezier(.72,0,1,1)}
  100%{transform:translateY(0) scale(1.16,.84)}
}
/* The shadow is the same motion seen from the floor, so it carries the same
   per-segment easing — matched at every keyframe. A shadow drifting on its own
   curve is the tell that makes a bounce look pasted together. */
@keyframes pk-orb-shadow{
  0%{transform:scaleX(1.14);opacity:.62;animation-timing-function:cubic-bezier(.16,.78,.38,1)}
  5%{transform:scaleX(1);opacity:.54;animation-timing-function:cubic-bezier(.33,.66,.66,1)}
  50%{transform:scaleX(.46);opacity:.14;animation-timing-function:cubic-bezier(.33,0,.66,.33)}
  95%{transform:scaleX(1);opacity:.54;animation-timing-function:cubic-bezier(.72,0,1,1)}
  100%{transform:scaleX(1.14);opacity:.62}
}
@media (prefers-reduced-motion:reduce){
  .hero-orb .orb,.hero-orb::after{animation:none}
  /* A ball that is not moving is a ball at rest ON the floor — the old -50%
     parked it halfway up the shaft, hanging over its own contact shadow. */
  .hero-orb .orb{transform:translateY(0) scale(1,1)}
}
@media (max-width:359px){.hero-orb{width:64px;height:64px}}

/* WAITING — a quick joiner who arrived mid-match: reserved seat, zero escrow,
   every action inert until the table returns to its lobby. */
.wait-badge{display:none;flex:none;align-items:center;gap:4px;padding:3px 9px;border-radius:999px;
  background:color-mix(in srgb,var(--gold) 16%,transparent);border:1px solid var(--gold-line);
  color:var(--gold-text);font:800 10px Manrope,system-ui;letter-spacing:.06em;white-space:nowrap}
.app.waiting .wait-badge{display:inline-flex}
.app.waiting .spectate-badge{display:none}
.waitbanner{padding:8px 10px;border-radius:10px;text-align:center;
  background:color-mix(in srgb,var(--gold) 11%,transparent);border:1px solid var(--gold-line);
  color:var(--gold-text);font:700 11px Manrope,system-ui;line-height:1.45}
/* The quick screen carries no seat palette, and the header bar is dark in BOTH
   themes — pin its ink so the title is not near-black on navy in light mode. */
#scr-quick .gheader .htitle b{color:#EDF2F8}
#scr-quick .gheader .htitle span{color:#91A0B3}

/* ---------------------------------------------------------------- desktop scale-up
   These are mobile-first Telegram mini apps: a fixed 420px column that is
   unreadably small on a large monitor. `zoom` scales every px unit uniformly
   (layout, fonts, canvas, art) with no transform side effects. The app's own
   height must be divided back out, because viewport units resolve against the
   REAL viewport and are then multiplied by the zoom. */
:root{--app-zoom:1}
@media (min-width:680px) and (min-height:720px){ :root{--app-zoom:1.1} }
@media (min-width:900px) and (min-height:860px){ :root{--app-zoom:1.22} }
@media (min-width:1200px) and (min-height:1000px){ :root{--app-zoom:1.32} }
.app{zoom:var(--app-zoom);height:calc(var(--tg-vh,100dvh) / var(--app-zoom))}

/* ================================================================ ambient backdrop
   Every menu (home / quick / lobby / game) sits on one slowly breathing dark
   emerald field. Three radial washes drift past each other on prime periods
   (47s / 61s / 73s) so the loop never visibly repeats, over a single
   low-opacity photographic texture. Deliberately cheap: no blur() filters, no
   per-frame JS, nothing but transform + opacity on four composited layers, so a
   phone GPU carries it and the main thread never sees it. It lives BEHIND every
   screen, and every card that matters (.introcard, .lsection, .boardwrap,
   .prztable) stays fully opaque, so board and prize legibility are untouched.
   --hint text with no such opaque card under it (a bare .flabel/.hint-line in
   .col/.gfooter) is unaffected either way, by construction not by tuning: see
   the opaque-backing rule further down — so nothing here needs re-checking
   against contrast when these numbers move again.

   RETUNED 2026-08-29 (user: "less strong" overall, but the circles themselves
   "more strong… and a bit smaller… actually subtly animated"): the photo
   texture and the three blobs' PEAK alpha both used to blend into one big
   colour wash rather than read as distinct shapes, so satisfying both asks at
   once was one change, not two — shrink each blob's footprint (86–92% of the
   layer down to 40–52%, and squared off so the `circle` keyword actually
   renders a circle instead of an ellipse, in the same visual language as the
   hero-orb the user called out) while nudging its peak colour up ~15-20%.
   Smaller + slightly richer per blob but far less total screen area covered
   nets out to a WEAKER overall wash (helped by the texture opacity dropping
   ~35%) with three genuinely legible drifting circles, not a fog. The same
   translate3d percentages drift the *element*'s own box (unchanged size), so
   shrinking only the background-size makes that identical motion read as a
   proportionally bigger, more noticeable move relative to each blob's new,
   smaller radius — no keyframe rewrite needed for "actually" animated, only
   the duration retune below (89s/113s exceeded the requested 40-80s ceiling;
   47/61/73 keeps the same incommensurate-period trick inside it). */
.screen{position:relative;z-index:1}
.ambient{position:absolute;inset:0;z-index:0;overflow:hidden;pointer-events:none;contain:paint}
.amb-tex{position:absolute;inset:-8%;background:url("art/bg.jpg") center/cover no-repeat;
  opacity:.17;animation:pk-amb-tex 113s ease-in-out infinite alternate;will-change:transform}
.amb-field{position:absolute;inset:-25%;background-repeat:no-repeat;will-change:transform}
.amb-a{background-image:radial-gradient(closest-side circle,rgba(26,124,98,.54),rgba(26,124,98,0));
  background-size:48% 48%;background-position:8% 10%;
  animation:pk-amb-a 47s ease-in-out infinite alternate}
.amb-b{background-image:radial-gradient(closest-side circle,rgba(18,98,110,.46),rgba(18,98,110,0));
  background-size:52% 52%;background-position:92% 84%;
  animation:pk-amb-b 61s ease-in-out infinite alternate}
/* a whisper of the family's violet keeps this a pachinko cabinet, not a forest */
.amb-c{background-image:radial-gradient(closest-side circle,rgba(96,84,140,.32),rgba(96,84,140,0));
  background-size:40% 40%;background-position:70% 26%;
  animation:pk-amb-c 73s ease-in-out infinite alternate}
@keyframes pk-amb-tex{from{transform:scale(1) translate3d(0,0,0)}to{transform:scale(1.1) translate3d(-1.5%,1.5%,0)}}
@keyframes pk-amb-a{from{transform:translate3d(0,0,0) scale(1)}to{transform:translate3d(14%,9%,0) scale(1.18)}}
@keyframes pk-amb-b{from{transform:translate3d(0,0,0) scale(1.12)}to{transform:translate3d(-13%,-8%,0) scale(1)}}
@keyframes pk-amb-c{from{transform:translate3d(0,0,0) scale(1)}to{transform:translate3d(-9%,12%,0) scale(1.22)}}
/* Light theme gets the same drift at a fraction of the strength — enough to
   see the page breathe, not enough to grey the white cards it sits behind. */
[data-theme="light"] .amb-tex{opacity:.13}
[data-theme="light"] .amb-a{background-image:radial-gradient(closest-side circle,rgba(24,138,108,.26),rgba(24,138,108,0))}
[data-theme="light"] .amb-b{background-image:radial-gradient(closest-side circle,rgba(22,116,132,.22),rgba(22,116,132,0))}
[data-theme="light"] .amb-c{background-image:radial-gradient(closest-side circle,rgba(112,100,160,.17),rgba(112,100,160,0))}
@media (prefers-reduced-motion:reduce){
  .amb-tex,.amb-field{animation:none}
}
/* the page around the 420px column joins the same emerald field, dimmed to
   match the retune above */
body{background:
  radial-gradient(circle at 12% 6%,rgba(26,124,98,.12),transparent 34%),
  radial-gradient(circle at 88% 92%,rgba(96,84,140,.07),transparent 36%),#060C11}
.app{background-color:var(--bg);background-image:
  linear-gradient(180deg,rgba(255,255,255,.018),transparent 18%),
  radial-gradient(circle at 50% 0,rgba(26,124,98,.04),transparent 44%)}

/* Every .flabel/.hint-line already sitting inside an opaque card (.lsection,
   .qcard, .chpanel) composites against that card's solid panel colour and was
   never affected by the ambient wash. The ones that sit bare in .col/.gfooter/
   .stepper/the tab panes composite directly over the animated wash instead —
   --hint on --bg is 6.87:1/5.35:1 (dark/light) at rest, but the moving wash
   sweeps it as low as 3.58:1/3.78:1, below AA (4.5:1) for a third to over half
   of a 71-113s loop. Give every instance its own opaque backing (harmless
   where a card already backs it — same solid colour underneath) instead of
   retuning the wash: correctness no longer depends on how strong/positioned
   the ambient is tuned to be, now or later. */
.flabel,.hint-line{background:var(--bg);border-radius:6px;padding:2px 6px}
.lsection .flabel,.lsection .hint-line,
.qcard .flabel,.qcard .hint-line,
.chpanel .flabel,.chpanel .hint-line{background:none;padding:0}

/* ================================================================ prize disclosure
   Text-heavy for a first-timer, so the 2P/3P/4P breakdown collapses. What the
   entry-fee framing requires to be visible BEFORE entry is NOT collapsed: the
   applicable prize and the commission line live in the always-open <summary>,
   with the rest one tap away and clearly labelled. Native <details>, so the
   keyboard and screen-reader behaviour is the platform's, not ours. */
.przbox{margin-top:6px;border-radius:11px;background:var(--chip);border:1px solid var(--line)}
.przsum{display:list-item;list-style:none;cursor:pointer;padding:9px 11px;border-radius:11px}
.przsum>.sumrow{display:flex;align-items:center;gap:6px 10px;flex-wrap:wrap}
.przsum .sumrow::after{content:none}   /* .przsum-more carries this one's chevron */
.przsum::-webkit-details-marker{display:none}
.przsum:focus-visible{outline:2px solid var(--gold-line);outline-offset:-2px}
.przsum-main{display:flex;align-items:baseline;gap:7px;flex-wrap:wrap;min-width:0}
.przsum-lab{font:800 9.5px Manrope,system-ui;letter-spacing:.08em;color:var(--hint);white-space:nowrap}
.przsum-val{font:700 15px Fredoka,"Space Grotesk",system-ui;color:var(--gold-text);white-space:nowrap}
.przsum-note{font:600 11px Manrope,system-ui;line-height:1.35;color:var(--hint)}
.przsum-more{display:inline-flex;align-items:center;gap:5px;margin-left:auto;flex:none;
  font:800 9.5px Manrope,system-ui;letter-spacing:.06em;color:var(--blue)}
.przsum-more::before{content:'ALL COUNTS'}
.przbox[open] .przsum-more::before{content:'HIDE'}
.przsum-more::after{content:'';width:5px;height:5px;margin-bottom:2px;
  border-right:2px solid currentColor;border-bottom:2px solid currentColor;
  transform:rotate(45deg);transition:transform .18s ease}
.przbox[open] .przsum-more::after{transform:rotate(-135deg);margin-bottom:-1px}
.przbox.solo .przsum{cursor:default}
.przbox .prztable{margin-top:0;background:none;border:0;border-top:1px solid var(--line);
  border-radius:0;padding:9px 11px}
.przrow.on b{color:var(--gold-text)}
.przrow.on span{color:var(--text)}
.przbox .przrow:not(.on) span,.przbox .przrow:not(.on) b{opacity:.72}
/* Light theme only: --blue and --gold-text at .72 opacity on .przbox's --chip
   land under 4.5:1 (3.80:1 / 3.25:1 measured) — the only failures, since dark
   theme's lighter inks still clear AA once blended. Darken the toggle ink and
   swap the dimmed amount to the pre-existing --gold-ink token (already tuned
   dark enough for on-fill text) rather than touching --blue/--gold-text
   globally, which other components rely on at full opacity. */
[data-theme="light"] .przsum-more{color:#2A6B85}
[data-theme="light"] .przbox .przrow:not(.on) b{color:var(--gold-ink)}
@media (prefers-reduced-motion:reduce){.przsum-more::after{transition:none}}

/* ================================================================ menu disclosures
   The create screen used to show every explainer paragraph at once — mode
   rule, board rule, test-mode instructions, the full "how a round works"
   copy — all visible at once: "too much text… messy and overwhelming" for a
   first-time player. Collapsed the same way the prize table already was:
   what a new player needs to ACT on (name, quick-play tiers, entry amount,
   the primary button, and the mode/board PICKERS themselves — hiding a
   control they must set before creating a room would be worse, not better)
   stays visible; the prose explaining each choice collapses into a
   labelled, closed-by-default <details>. Native disclosure widgets, so
   keyboard/SR behaviour is the platform's, matching .przbox. Nothing here
   hides the prize schedule — that keeps its own always-reachable .przbox
   per the entry-fee/prizes-announced posture; collapsed, never hidden. */
.minihelp{margin-top:1px}
.minihelp summary{display:list-item;list-style:none;cursor:pointer;
  font:700 10px Manrope,system-ui;color:var(--blue-ink,var(--blue))}
.minihelp summary::-webkit-details-marker{display:none}
.minihelp summary:focus-visible{outline:2px solid var(--gold-line);outline-offset:2px;border-radius:4px}
.minihelp .hint-line{margin-top:6px}

/* a whole <details class="lsection"> — the section's own .flabel becomes the
   summary, so collapsing it hides the controls inside too. Used ONLY where
   the controls are optional and not part of the create flow every player
   needs (test mode: a QA/solo-check feature a regular player never has to
   see, let alone touch). */
summary.flabel{cursor:pointer;list-style:none;display:list-item}
summary.flabel::-webkit-details-marker{display:none}
summary.flabel:focus-visible{outline:2px solid var(--gold-line);outline-offset:2px;border-radius:4px}

/* the intro card's fuller rules copy — the card is ALWAYS dark navy
   regardless of theme (see .mtitle/.msub above), so this is fixed on-dark
   ink, never a themed token: --blue measures 4.28:1 here in light mode
   (tuned for light PANELS, not this permanently-dark card) — just under
   AA — while this fixed value (matching dark theme's own --blue) clears
   ~8:1 in both. */
.introhelp{margin-top:7px;position:relative}
.introhelp summary{cursor:pointer;list-style:none;display:list-item;
  font:700 10.5px Manrope,system-ui;color:#66B3D0}
.introhelp summary::-webkit-details-marker{display:none}
.introhelp summary:focus-visible{outline:2px solid var(--gold-line);outline-offset:2px;border-radius:4px}
.introhelp-body{position:relative;margin-top:6px;font:500 11px Manrope,system-ui;color:#7E8FA6;line-height:1.5}

/* ================================================================ join row
   The code field is 5 characters by contract, but an <input> with no `size`
   reports a ~20ch min-content width, and `min-width:auto` on a flex item made
   that min-content the floor — so at 375px, and again at the 1.10/1.22/1.32
   desktop zoom tiers, the field + Join button measured wider than the 420px
   column and the row (plus the note under it) broke out of the layout. Fixed
   structurally: size="5" in the markup, min-width:0 here, and the two controls
   now share one height and one 5px cabinet shadow so they sit on one baseline. */
.joinrow{display:flex;align-items:stretch;gap:8px;margin-bottom:5px}
.joinrow .codefield{flex:1 1 auto;min-width:0;width:auto;text-align:center;
  text-transform:uppercase;letter-spacing:.2em;font-family:Fredoka,"Space Grotesk",system-ui;
  border-width:2px;box-shadow:0 5px 0 var(--tshadow)}
.joinrow .ghost-slab{flex:0 0 auto;min-width:96px;padding:12px 16px;display:flex;
  align-items:center;justify-content:center}
.joinnote{text-align:left}
/* long single-line chips must be allowed to wrap rather than push the column */
.wrapchip{align-self:center;max-width:100%;white-space:normal;text-align:center;line-height:1.35}
@media (max-width:359px){
  .joinrow .ghost-slab{min-width:78px;padding-inline:12px;font-size:15px}
  .joinrow .codefield{letter-spacing:.12em}
}

/* SURROUND — the page area OUTSIDE the ~420px app column (the "phone screen").
   Deliberately plain white in both themes so the app reads as a device sitting
   on a clean page. The column's own backdrop is unaffected; only the margin
   around it changes. Appended last so it wins over the earlier body rules. */
body{background:#FFFFFF}

/* ======================================= TOUCH TARGETS & PRESS FEEDBACK (phone)
 * Two faults found on a real phone, both invisible at desktop width.
 *
 * 1. Tapping a tile or a button painted a press effect over the WHOLE screen.
 *    Nothing in this stylesheet does that — it is the webview's default
 *    -webkit-tap-highlight-color, which fills the nearest *clickable ancestor*;
 *    with a document-level tap listener in play that ancestor is effectively
 *    the page. So kill the default outright and give each control its own
 *    :active, and the feedback becomes the button and only the button.
 *
 * 2. Small controls read as dead. The header buttons are 26px and the chips
 *    31px tall — well under the ~44px a fingertip actually needs — which is why
 *    "+1 seat", the LOBBY back button and the theme toggle all seemed not to
 *    respond. The VISIBLE size is deliberately unchanged; an invisible ::after
 *    extends the HIT AREA only: vertically into the 48px header's own slack,
 *    horizontally by less than half the 10px flex gap, so no two neighbouring
 *    controls can ever steal each other's taps.
 */
html{-webkit-tap-highlight-color:transparent}
.hbtn,.chipbtn{position:relative}
.hbtn::after,.chipbtn::after{content:"";position:absolute;top:50%;transform:translateY(-50%);height:44px}
.hbtn::after{left:-4px;right:-4px}
.chipbtn::after{left:0;right:0}
.hbtn:active{transform:translateY(1px)}
.chipbtn:active{transform:translateY(1px)}

/* ===================================== NO WHITE GAPS ON A PHONE (reported)
 * `.app` is a 420px column and the SURROUND behind it is deliberately white,
 * which is right on a monitor — the app reads as a device on a clean page.
 * On a phone it is just a bug: every current handset is WIDER than 420 CSS px
 * (iPhone Pro Max 430, most Androids 412–430), so the game sat in a 5–10px
 * white stripe down each edge.
 *
 * Below the desktop scale-up breakpoint there is no "page" to frame, so the
 * column simply fills the screen and that reclaimed width becomes padding for
 * the content. The white surround stays for the desktop framing above it.
 */
@media (max-width:679px){
  .app{max-width:none;border-inline:0}
}
/* No body background override here on purpose. `data-theme` is set on #app, so
   `body{background:var(--bg)}` resolves against :root and would paint the DARK
   colour behind a LIGHT-theme app — a worse artefact than the one being fixed.
   The column now spans the full width (measured: 0px either side at 430px), so
   there is nothing behind it to paint. */

/* ===================================== ARENA REPLAY (async challenge)
 * A replay bar under the board: re-animate your own committed arc any time,
 * and — once the challenge has SETTLED and the server seed is out — both
 * arcs together on the same board, told apart by seat colour with a named
 * legend. The animation itself is the existing ball path (canvas + the one
 * shared rAF loop, each ball carrying its own setTimeout failsafe); the
 * round-to-round scheduler is a plain setTimeout, so nothing here stalls
 * when a Telegram webview pauses rAF. CSS transitions only.
 */
.replaybar[hidden]{display:none!important}   /* an author display: beats the UA [hidden] rule */
.replaybar{flex:none;display:flex;flex-direction:column;gap:7px;padding:9px 10px;
  border-radius:13px;background:var(--chip);border:1px solid var(--line)}
.replaybar .rp-btns{display:flex;gap:7px;flex-wrap:wrap;justify-content:center}
.rp-btn{flex:1 1 auto;min-width:0;max-width:100%;padding:8px 11px;border-radius:10px;cursor:pointer;
  font:800 11px Manrope,system-ui;letter-spacing:.02em;white-space:nowrap;overflow:hidden;
  text-overflow:ellipsis;color:var(--text);background:var(--panel);border:1px solid var(--edge);
  transition:background .16s ease,border-color .16s ease,color .16s ease,transform .1s ease}
.rp-btn:active{transform:translateY(1px)}
.rp-btn:disabled{opacity:.45;cursor:default}
.rp-btn.dual{color:var(--gold-text);border-color:var(--gold-line)}
.rp-btn.stop{color:var(--red);border-color:rgba(255,90,78,.45)}
.rp-legend[hidden]{display:none!important}
.rp-legend{display:flex;gap:10px;flex-wrap:wrap;justify-content:center;align-items:center}
.rp-who{display:inline-flex;align-items:center;gap:5px;font:700 10.5px Manrope,system-ui;
  color:var(--text);max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.rp-who i{width:9px;height:9px;border-radius:50%;flex:none;
  background:var(--seat-color);box-shadow:0 0 7px var(--seat-color)}
.rp-note{font:500 10px Manrope,system-ui;color:var(--hint);text-align:center;line-height:1.42}
@media (max-width:359px){ .rp-btn{flex:1 1 100%;font-size:10.5px} }

/* A settled challenge collapses #game-col down to the final scorecard alone
   (`#game-col.show-end-summary>:not(.end-summary){display:none!important}`).
   The provably-fair replay is a SETTLED-ONLY feature, so its controls have to
   survive that collapse — and while one is actually RUNNING the board comes
   back and the scorecard steps aside, returning the moment the replay stops.
   `.replaying` is toggled by renderReplayBar(). */
#game-col.show-end-summary>.replaybar:not([hidden]){display:flex!important}
#game-col.show-end-summary.replaying>.end-summary{display:none!important}
#game-col.show-end-summary.replaying>.boardwrap{display:block!important}
#game-col.show-end-summary.replaying>#crazy-legend{display:block!important}

/* ═══ ROOM-CREATION SCREEN: fit more, scroll less (2026-09-10) ═══════════
   The home screen asked for more scrolling than it needed. Three changes,
   all additive so the base rules above stay readable. */

/* 1 · The intro card was the tallest thing on screen for the least
      information. Padding 15px→10px and the orb 72px→56px take ~17% off its
      height (MEASURED 144px → 118px at 375px wide = 18.1%), comfortably the 15% asked
      for with a little margin. The copy is untouched. */
.introcard{padding:10px 13px}
.hero-orb{width:56px;height:56px}
.introtop{gap:8px}

/* 2 · The how-to button and the name field share one row instead of stacking.
      The button keeps its own look but is forced to the field's height so the
      two read as one control pair rather than two unrelated widgets. */
.namerow{display:flex;gap:8px;align-items:stretch;margin-top:9px}
.namerow .field{flex:1;min-width:0;margin-top:0}
.namerow #howto-slot{flex:none;display:flex}
.tgh-cta-inrow{margin:0!important;width:auto!important;white-space:nowrap;
  display:flex;align-items:center;gap:6px;padding:0 12px;
  font:600 13px Manrope,system-ui;border-radius:12px}

/* 3 · THE STEPPER WAS A 34px TARGET WITH NO OVERLAY — every other chip on this
      screen already grows its hit area with an ::after, these two did not, so
      on a phone they read as unresponsive rather than small. Grow the HIT AREA
      only (CLAUDE.md): the visible 34px circle is unchanged, the touch box is
      44px. Also stop a double-tap selecting the number between them. */
.sbtn{position:relative}
.sbtn::after{content:'';position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);
  width:44px;height:44px;border-radius:50%}
.stepper{user-select:none;-webkit-user-select:none}
.stepper .sval{min-width:64px;text-align:center}

/* ═══ ONE SURFACE LANGUAGE FOR THE ROOM-CREATION SCREEN (2026-09-11) ════════
   The screen had grown one look per block: four different corner radii, two
   different card fills, prose that was centred in one card and left-aligned in
   the next, and eight different vertical gaps produced by per-element margins
   fighting the column's own `gap`. Reported as "some rectangles are sharper
   than others, some have different gradients, some are centred while others
   aren't, the vertical gaps aren't constant".

   Fixed by rule rather than by touch-up: two radii (card / control), one card
   fill, one text alignment inside a card, and ONE spacing number that every
   block in the column shares. Everything below is additive — the base rules
   further up stay readable as the original design. */

/* ---- 1 · SUMMARIES KEEP THEIR NATIVE DISPLAY ---------------------------
   THE "DETAILS DOES NOTHING" BUG. Every disclosure on this screen used to set
   `display:flex` / `display:inline-flex` on its <summary>. Blink tolerates
   that; WebKit — every iPhone, so every iOS Telegram client — does not: the
   summary stops acting as the disclosure's content slot and the body never
   paints. The element still flips `open`, so every [open] rule still fires and
   the chevron still rotates. That is exactly the reported symptom — "it
   toggles, and the arrow becomes vertical not horizontal, however no details
   actually appear on the screen" — and it is why this never reproduced in the
   Chromium preview at any viewport.

   So the <summary> keeps display:list-item (its UA default, marker removed)
   and the row layout moves INSIDE it, onto .sumrow. Never set `display` on a
   <summary> in this file again. */
.sumrow{display:flex;align-items:center;gap:6px;width:100%;min-width:0}
.sumrow::after{content:'';flex:none;width:5px;height:5px;margin-left:auto;
  border-right:2px solid currentColor;border-bottom:2px solid currentColor;
  transform:rotate(45deg);transition:transform .18s ease}
details[open]>summary>.sumrow::after{transform:rotate(-135deg);margin-bottom:-3px}
/* The whole row is the target now, not the few characters of label text. */
.minihelp summary,summary.flabel,.introhelp summary{padding:3px 0}

/* ---- 2 · TWO RADII, NOT FIVE ------------------------------------------- */
.app{--r-card:12px;--r-ctl:10px;--r-ink:6px}
.introcard,.lsection,.qcard,.chpanel,#pane-challenge>.przbox,#scr-quick .przbox{border-radius:var(--r-card)}
.field,.chipbtn,.gold-slab,.ghost-slab,.stepper .sbtn,.namerow .tgh-cta{border-radius:var(--r-ctl)}
.flabel,.hint-line{border-radius:var(--r-ink)}

/* ---- 3 · ONE CARD FILL -------------------------------------------------
   Section cards are flat --panel, full stop. The hero keeps a gradient because
   it is the hero; it is now the ONLY gradient on the screen (its cyan wash is
   dropped, leaving one vertical fall plus the existing .glow sweep). */
.lsection{background:var(--panel)}
.introcard{background:linear-gradient(180deg,#162233,#101824)}
/* A prize box INSIDE a card is not a second card: no fill, no border, no
   radius — just a rule separating it from the controls that priced it. */
.lsection>.przbox{margin:0;background:none;border:0;border-top:1px solid var(--line);
  border-radius:0}
.lsection>.przbox>.przsum{padding:8px 0 0}
.lsection>.przbox>.prztable{padding:8px 0 0}

/* ---- 4 · ONE VERTICAL RHYTHM -------------------------------------------
   --stack is the column's gap expression (the short-screen clamp from the
   compact-spacing block above, unchanged). The panes now use the SAME token
   instead of per-child margins, so every gap on the screen is one number and
   stays one number when the clamp switches. */
.app{--stack:clamp(7px, calc(7px + (var(--tg-vh,100dvh) - 760px) * 999), 9px)}
.col{gap:var(--stack)}
#pane-live,#pane-challenge{display:flex;flex-direction:column;gap:var(--stack)}
.namerow,.qcard,.joinrow,.minihelp,.przbox{margin-top:0}
.joinrow{margin-bottom:0}

/* ---- 5 · ONE ALIGNMENT INSIDE A CARD -----------------------------------
   Labels and explanatory prose read from the left edge of the card they sit
   in. Centring is reserved for the two lines that are NOT inside a card (the
   play-money footer and the standalone watch chip). */
.flabel{text-transform:uppercase}
.lsection .hint-line,.chpanel .hint-line,.lsection .flabel{text-align:left}
.arena-depth{text-align:left}
/* The stepper's caption takes its own line under the controls rather than
   floating right — it was the only right-aligned text on the screen. */
.stepper{flex-wrap:wrap}
.stepper>.hint-line{flex:1 0 100%;margin-left:0;text-align:left}

/* ---- 6 · THE NAME ROW IS ONE CONTROL PAIR ------------------------------
   tg-howto.js injects its own <style> AFTER this file, so `.tgh-cta` beat a
   bare `.tgh-cta-inrow` on source order at equal specificity — the in-row
   font and radius set in the 2026-09-10 pass were silently discarded (measured
   11px radius / 700 11px font, i.e. the sheet's own values). `.namerow
   .tgh-cta` is two classes and wins on specificity instead of luck. */
.namerow{align-items:stretch}
.namerow .tgh-cta{width:auto;height:auto;margin:0;padding:0 14px;flex:none;
  border:1px solid var(--line);background:var(--chip);color:var(--text);
  font:700 12.5px/1 Manrope,system-ui;letter-spacing:.02em;white-space:nowrap}
.namerow .field{flex:1;min-width:0}

/* ---- 7 · AN OPEN DISCLOSURE LOOKS OPEN ---------------------------------
   Belt and braces for §1: even if a body renders at the very edge of the fold,
   it arrives as an indented block with its own rule down the left, so "it
   toggled but I see nothing" cannot be true of something that is on screen. */
.minihelp[open]>.hint-line,.introhelp[open]>.introhelp-body{
  border-left:2px solid var(--line);padding-left:9px;animation:pk-disc .18s ease both}
details.lsection[open]>.lsecrow,details.lsection[open]>.hint-line{animation:pk-disc .18s ease both}
@keyframes pk-disc{from{opacity:0;transform:translateY(-3px)}to{opacity:1;transform:none}}

/* ---- 8 · THE HEADER GETS AN EDGE, NOT A CUT ----------------------------
   .col is the only scroller, so content used to pass under a hard line at the
   header. A soft blue halo fades down out of the header and the first ~24px of
   the column fades out into it, so text dissolves on the way up instead of
   being sliced. Both appear only once there is something scrolled under them
   (`.screen.scrolled`, set in app.js), so a page at rest is untouched. */
.brandhead,.gheader{position:relative;z-index:2}
/* NO TRANSITION ON THIS OPACITY — deliberate, and the second time this bit me.
   Chromium will not start a transition on a pseudo-element that had no
   before-change style of its own: measured here, .screen.scrolled was applied
   on a real scroll gesture and the halo stayed computed at opacity 0 until
   something else forced a restyle (dropping the transition made it 1
   immediately). A fade that works only sometimes is worse than no fade; the
   halo is soft enough that appearing on the first scrolled pixel reads as part
   of the scroll rather than as a flash. */
.brandhead::after,.gheader::after{content:'';position:absolute;left:0;right:0;top:100%;
  height:30px;pointer-events:none;display:none;
  background:linear-gradient(180deg,
    color-mix(in srgb,var(--blue) 24%,transparent),
    color-mix(in srgb,var(--blue) 8%,transparent) 40%,
    transparent)}
.screen.scrolled>.brandhead::after,.screen.scrolled>.gheader::after{display:block}
/* NOT #game-col. A mask promotes its element to its own compositing layer, and
   that column holds the <canvas> the balls are drawn on — the one surface in
   this app where frame rate is the product. The halo (a 30px pseudo-element)
   still applies there; only the mask is held back. */
.screen.scrolled>.col:not(#game-col){
  -webkit-mask-image:linear-gradient(180deg,transparent 0,rgba(0,0,0,.5) 14px,#000 32px);
  mask-image:linear-gradient(180deg,transparent 0,rgba(0,0,0,.5) 14px,#000 32px)}

@media (prefers-reduced-motion:reduce){
  .sumrow::after{transition:none}
  .minihelp[open]>.hint-line,.introhelp[open]>.introhelp-body,
  details.lsection[open]>.lsecrow,details.lsection[open]>.hint-line{animation:none}
}

/* ---- 9 · THE JOIN ROW MATCHES THE NAME ROW -----------------------------
   Two text fields on one screen cannot look like two different widgets. The
   code field carried a 2px border and a 5px cabinet shadow while the name
   field beside it is 1px and flat; the Join button carried a 3px border. Both
   now use the shared control treatment, and the row keeps the one-baseline
   sizing the comment above it describes. */
.joinrow .codefield{border-width:1px;box-shadow:none}
.joinrow .ghost-slab{border-width:1px;box-shadow:none;min-width:88px;padding:0 18px;
  font:700 14px Manrope,system-ui;color:var(--text)}
.joinrow .ghost-slab:active{transform:translateY(1px)}

/* ---- 10 · ONE CONTROL HEIGHT ------------------------------------------
   The four controls in the two paired rows measured 44/46/48px because each
   derived its height from its own font and padding (Fredoka in the code field,
   Manrope in the name field, the sheet's own 44px on the How-to button). A
   fixed height on all four makes them one family and keeps every one of them
   at or above the family's 44px minimum target. */
.namerow>*,.namerow .field,.namerow .tgh-cta,.joinrow>*{height:46px}
.namerow .field,.joinrow .field{padding-top:0;padding-bottom:0}

/* ---- 11 · AN UNFILLED PRIZE BOX IS NOT A CONTROL -----------------------
   THIS IS THE "DETAILS BUTTON DOES NOTHING" BUG, and it was never on the home
   screen where it was hunted. All four .przbox elements ship as a literally
   empty <details> that renderPrizeTable() fills in later — and a <details>
   with no <summary> of its own renders the USER AGENT'S default summary:
   Chromium and WebKit both draw a ▶ triangle labelled "Details". It is a
   perfectly working disclosure over nothing at all, so tapping it rotates the
   triangle from ▶ to ▼ and no content appears. Reported, exactly: "it toggles,
   and the arrow becomes vertical not horizontal, however no details actually
   appear on the screen".

   It is visible wherever the box has not been filled yet:
     #prize-lobby   — from entering the lobby until the first snapshot renders
     #prize-quick   — until a quick-match tier is chosen
   Both are reachable in a normal session, which is why it kept coming back
   after each fix aimed at the disclosures on the create screen.

   :empty is the whole fix and it cannot rot: the box appears the moment it has
   content and is not in the layout for one frame before that. */
.przbox:empty{display:none}

/* ═══ THE BOKEH FIELD TWINKLES (2026-09-12) ══════════════════════════════════
   `art/bg.jpg` is a field of soft out-of-focus circles — the "dots" behind the
   board and behind the room-selection menu, pale grey-white in the light theme.
   It was already animated, on a 113-SECOND cycle of a 10% scale, which is not
   subtle, it is invisible: nothing on screen moves far enough in the time
   anybody looks at it. (The 2026-09-0x retune that took the three colour blobs
   to 47/61/73s deliberately left this layer alone; that is the gap being
   closed here.)

   A twinkle, not a pulse. A SECOND copy of the same field is laid over the
   first, rotated a half turn and scaled up so the two dot patterns cannot
   align, and drifted the other way on its own incommensurate period. Where a
   bright circle of one layer slides across the dark gap of the other,
   individual dots brighten and fade on their own — which is what bokeh
   actually does, and it costs one extra composited layer of an already-decoded
   image, no script and no timer. Periods 67s and 53s never repeat together,
   the same trick the blobs above already use.

   Amplitude is held down by the parent: `.amb-tex` sits at opacity .17 (.13 in
   the light theme) and the child multiplies INSIDE that, so the second field
   peaks at roughly .12 of the page and the swing between its ends is about
   .04. It reads as the background being alive, never as something to look at.

   `background:inherit` rather than a second url(): one image, one decode, and
   the light/dark opacity overrides above keep applying to both layers at once. */
.amb-tex{animation-duration:67s}
.amb-tex::after{
  content:'';position:absolute;inset:0;pointer-events:none;
  background:inherit;
  animation:pk-amb-twinkle 53s ease-in-out infinite alternate;
  will-change:transform,opacity}
@keyframes pk-amb-twinkle{
  from{transform:scale(1.26) rotate(180deg) translate3d(0,0,0);opacity:.40}
  to  {transform:scale(1.33) rotate(180deg) translate3d(2.6%,-2.1%,0);opacity:.70}}

/* The existing reduced-motion rule above names `.amb-tex,.amb-field` and a
   pseudo-element is not covered by its parent's selector — without this the
   second field would keep drifting for exactly the people who asked it not to.
   Parked at the midpoint of its own keyframes, so switching motion off changes
   the brightness of the page as little as possible. */
@media (prefers-reduced-motion:reduce){
  .amb-tex::after{animation:none;transform:scale(1.30) rotate(180deg);opacity:.55}
}

/* ---- 12 · THE NAME ROW IS 70 / 30, NOT "WHATEVER THE BUTTON WANTS" -----
   §2 and §6 put the two controls on one line but left the split to content:
   the how-to button was `flex:none` with nowrap text, so IT took whatever
   its label needed and the name field got the remainder. That made the row's
   proportions a function of the string "How to play" rather than a decision,
   and the field — the only control here you actually type into — came second
   in both order and width.

   Now the field leads at 70% and the button rides at 30%. The 4px on each
   basis is half the 8px gap: two bases summing to exactly 100% plus a gap
   overflow the row and both get shrunk, which is how you end up with a
   69/29 that drifts with the gap. Subtracting the gap up front keeps the
   ratio true at every width. */
.namerow .field{flex:0 0 calc(70% - 4px);min-width:0;margin-top:0}
.namerow #howto-slot{flex:0 0 calc(30% - 4px);display:flex;min-width:0}

/* The button now fills the slot instead of sizing itself. Its label is the
   one thing that can't shrink, so the in-row copy loses the padding it no
   longer needs and the ? badge, which is decoration next to a word that
   already says what the button does — measured, that is the difference
   between fitting and not fitting at 320px. */
.namerow .tgh-cta{flex:1 1 auto;width:100%;min-width:0;padding:0 4px;
  font:700 12px/1 Manrope,system-ui;letter-spacing:0;gap:0}
.namerow .tgh-cta .tgh-q{display:none}

/* ---- 13 · ADVANCED SETTINGS COLLAPSE INTO ONE CARD --------------------
   Mode and board were two permanent cards asking a question almost nobody
   answers: both defaults (Classic scoring, classic board) are what a normal
   room wants. They are now two groups inside one disclosure, which takes the
   collapsed home screen down to stake → create → join.

   They are GROUPS, not cards. `.lsection` inside `.lsection` would be a box
   in a box, the exact thing §4/§5 removed from this screen; the hairline
   between them is enough to say "two settings, one drawer". */
.advgrp{display:flex;flex-direction:column;gap:7px;min-width:0}
.advgrp+.advgrp{border-top:1px solid var(--line);padding-top:9px}

/* §7's disclosure animation is written for DIRECT children of a details —
   without this the two groups would be the only thing on the screen that
   appears without it. */
details.lsection[open]>.advgrp{animation:pk-disc .18s ease both}
@media (prefers-reduced-motion:reduce){details.lsection[open]>.advgrp{animation:none}}

/* THE BADGE IS THE WHOLE SAFETY ARGUMENT for collapsing these. It names any
   choice that is not the default, so "Advanced settings" closed is proof the
   room is a standard one rather than merely an unopened box. Gold, because
   everything else on this screen that changes what a round IS is gold. */
.advbadge{flex:none;padding:2px 7px;border-radius:999px;
  border:1px solid var(--gold);color:var(--gold);background:transparent;
  font:800 9.5px/1.35 Manrope,system-ui;letter-spacing:.04em;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:62%}

/* ---- 14 · THE HOW-TO BUTTON DRESSES ITSELF ----------------------------
   It is now a plain <button> in index.html rather than tg-howto.js's CTA
   moved into place after the fact (see bindHowToButton in app.js for why).
   The sheet's `.tgh-cta{all:unset;...}` is injected at script time, so a
   button that relied on it would paint as a raw OS button for the gap
   between first paint and that script running — visible on a cold phone
   load, which is the case this whole change exists to fix. Everything the
   control needs is therefore stated here, and the sheet's rule becomes a
   harmless duplicate rather than a dependency. */
.namerow .tgh-cta{-webkit-appearance:none;appearance:none;box-sizing:border-box;
  display:flex;align-items:center;justify-content:center;cursor:pointer;
  white-space:nowrap;text-align:center}
.namerow .tgh-cta:active{transform:translateY(1px)}

/* ── the in-round TEST MODE banner is hidden (owner, 2026-09-17) ──────────
   "remove the top most panel, saying test mode … from all games". The markup
   and app.js's own show/hide stay put (it sets display:'' , which yields to
   this rule), so deleting these two lines brings the banner back. */
#test-banner{display:none!important}

/* ── the round-end door (owner, 2026-09-17) ───────────────────────────────
   A small chip back to the lobby, under whatever big "play again" the footer
   shows, so the next round stays the loud option. lobby-back.js fills the
   slot with the same chip (and the same group-mode behaviour) the header
   uses. It is revealed ONLY while the end-of-round panel is up: a live round
   still offers no way out (see game-lobby/test/no-in-round-exit.test.js). */
.end-exit{display:none;justify-content:center;margin-top:2px}
#scr-game:has(#end-summary:not([hidden])) .end-exit{display:flex}
