/* Nerve PvP — family visual identity with a dedicated live-market treatment. */

@keyframes pk-rise{from{transform:translateY(110%)}to{transform:translateY(0)}}
@keyframes pk-fade{from{opacity:0}to{opacity:1}}
/* Boomerang, not a loop: 0% and 100% are the SAME resting position (off-stage
   left), with the sweep's far point sitting at 50%. A plain 0%->100% sweep
   (old: 0%{-140%} 100%{320%}) reads fine mid-flight but on `infinite` loops
   back from 320% to -140% between iterations with no frames in between — a
   teleport/glitch. Going out-and-back inside one cycle removes the jump: the
   frame the loop ends on IS the frame it starts the next one from. */
@keyframes pk-sheen{0%,100%{transform:translateX(-140%) skewX(-18deg)}50%{transform:translateX(320%) 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)}}

: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;
  --gold:#FFC24B; --gold-edge:#B0741A; --gold-shadow:#8A5A12; --gold-ink:#3D2A06; --gold-text:var(--gold);
  --red:#FF5A4E; --red-edge:#A81E14; --red-shadow:#7E1610; --red-ink:#2A0B08; --red-text:var(--red);
  --navy:#101722; --navy-edge:#22304A;
}
[data-theme="light"]{
  --gold-text:#8F6400; --red-text:#C0392B;
  --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;
}

*{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)}
.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 #cash-btn,.app.spectating #ready-btn,.app.spectating #receipt-again{
  pointer-events:none;opacity:.5;filter:grayscale(.4)}

/* `flex:1` made the scroll column greedily fill the app, which pinned the
   footer (and CASH OUT) to the very bottom edge with dead space above it.
   `flex:0 1 auto` lets the column take only the height it needs, so the
   footer — and the button you actually tap — sits directly under the content
   and the whole screen reads compact. min-height:0 + overflow-y keep it
   scrollable when the content IS taller than the viewport. */
.col{flex:0 1 auto;display:flex;flex-direction:column;gap:9px;padding:11px 16px 0;min-height:0;overflow-y:auto}
/* LOBBY only: the fix above trades "gap above the footer" for "gap below the
   footer" when a screen's content is shorter than the viewport — for the
   busy GAME screen that's the right trade (see the comment above), but the
   lobby's desk-ticket + traders list is often short enough to leave the
   READY button floating mid-screen with the bare .screen background exposed
   beneath it (elementFromPoint below the button hits ".screen", not
   content). A bottom-anchored CTA is the normal, expected pattern for a
   lobby screen (unlike a live game's CASH OUT reading disconnected from the
   position book above it), so #scr-lobby alone opts back into flex:1 —
   scoped by id so it wins over the shared .col rule regardless of source
   order, and it does not touch #scr-home or #game-col. */
#scr-lobby .col{flex:1}
.flabel{font:800 10px Manrope,system-ui;letter-spacing:.1em;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)}
.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)}
/* 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. min-height + line-height are a second,
   independent floor so the label survives even if that changes again. */
.gold-slab{position:relative;overflow:hidden;flex:none;text-align:center;padding:15px 0;
  min-height:54px;line-height:1.3;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}
.quick-row{display:flex;gap:8px}
.quick-tier-btn{flex:1;min-width:0;text-align:center;padding:11px 4px;border-radius:13px;
  background:var(--chip);border:2px solid var(--edge);box-shadow:0 3px 0 var(--tshadow);
  font:700 15px Fredoka,system-ui;color:var(--text);cursor:pointer}
.quick-tier-btn:active{transform:translateY(2px);box-shadow:0 1px 0 var(--tshadow)}
.quick-tier-btn:disabled{opacity:.45;cursor:default}
.quick-tier-btn small{display:block;margin-top:2px;font:800 9px Manrope,system-ui;
  letter-spacing:.05em;color:var(--hint)}
/* 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:3px;
  font:700 10px "IBM Plex Mono",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;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(255,194,75,.17),transparent 62%);pointer-events:none}
.introcard .mtitle{position:relative;font:600 17px Fredoka,system-ui;color:var(--gold)}
.introcard .msub{position:relative;font:500 13px Manrope,system-ui;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);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:var(--chip);border:1px solid var(--line)}
.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.host .pav{background:var(--gold);border-color:var(--gold-edge);box-shadow:0 3px 0 var(--gold-shadow);color:var(--gold-ink)}
.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)}

/* score strip */
.scorerow{display:flex;gap:6px;flex:none}
.scard{flex:1;display:flex;flex-direction:column;align-items:center;gap:2px;padding:7px 4px 6px;
  border-radius:13px;background:var(--chip);border:1px solid var(--line)}
.scard.on{background:rgba(255,194,75,.10);border-color:rgba(255,194,75,.4);animation:pk-ringpop .3s cubic-bezier(.2,1.5,.4,1)}
.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.on .sname{color:var(--gold-text)}
.scard .sscore{font:600 20px Fredoka,system-ui;color:var(--text);line-height:1}
.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(--gold)}
.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}
.boardwrap .glow{position:absolute;inset:0;background:radial-gradient(115% 85% at 50% -12%,rgba(255,194,75,.14),transparent 62%);pointer-events:none}
.boardwrap canvas{display:block;width:100%;height:auto;position:relative}
.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.hot{background:rgba(255,194,75,.2);border-color:rgba(255,194,75,.5);color:var(--gold);animation:pk-pop .5s cubic-bezier(.2,1.4,.4,1)}
.slot.rich{color:#C9D6E6}
.pfloat{position:absolute;font:700 15px Fredoka,system-ui;color:var(--gold);
  text-shadow:0 2px 0 rgba(0,0,0,.55);animation:pk-float 1.2s ease-out forwards;pointer-events:none;z-index:5}

/* risk picker + footer */
.gfooter{flex:none;padding:11px 16px 14px;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)}
.turnbar.yours{background:rgba(255,194,75,.10);border-color:rgba(255,194,75,.32)}
.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)}

/* fair strip, sheets, toasts */
.fairstrip{display:flex;align-items:center;gap:7px;padding:8px 11px;border-radius:13px;
  background:var(--chip);border:1px solid var(--line);cursor:pointer;flex:none;width:100%;text-align:left}
.fairstrip .ft{font:700 11px Manrope,system-ui;color:var(--text)}
.fairstrip .fh{font:600 10.5px ui-monospace,Menlo,monospace;color:var(--hint)}
.fairstrip .fv{margin-left:auto;font:800 10.5px Manrope,system-ui;color:var(--blue)}
.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)}
.seedbox{margin-top:12px;padding:12px 13px;border-radius:14px;background:var(--chip);border:1px solid var(--line)}
.seedbox .sl{font:800 10px Manrope,system-ui;letter-spacing:.1em;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(255,194,75,.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:rgba(255,194,75,.14);border:1px solid rgba(255,194,75,.4);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} }

/* ---------------------------------------------------------------- nerve */
@keyframes nv-climb{0%,100%{text-shadow:0 4px 0 rgba(0,0,0,.38)}50%{text-shadow:0 4px 0 rgba(0,0,0,.38),0 0 26px rgba(255,194,75,.45)}}
@keyframes nv-slam{0%{transform:scale(2.4) rotate(-12deg);opacity:0}22%{transform:scale(.86) rotate(3deg);opacity:1}46%{transform:scale(1.12) rotate(-4deg)}70%{transform:scale(.97) rotate(1deg)}100%{transform:scale(1) rotate(-2deg)}}
@keyframes nv-edgepulse{0%,100%{opacity:.22}48%{opacity:.88}58%{opacity:.42}}
@keyframes nv-heartbeat{0%,38%,100%{transform:translate(-50%,-50%) scale(.72);opacity:0}42%{opacity:.55}58%{transform:translate(-50%,-50%) scale(1.42);opacity:0}}
@keyframes nv-scan{from{transform:translateY(-100%)}to{transform:translateY(100%)}}
@keyframes nv-warning{0%,100%{filter:saturate(1)}50%{filter:saturate(1.45) brightness(1.08)}}
@keyframes nv-hold-pulse{0%,100%{opacity:.62;text-shadow:0 0 0 transparent}50%{opacity:1;text-shadow:0 0 10px rgba(var(--market-rgb),.58)}}
@keyframes nv-quote-pulse{0%,100%{filter:brightness(.88)}50%{filter:brightness(1.22)}}
.nerve-fx{position:absolute;inset:0;z-index:45;pointer-events:none;opacity:0;transition:opacity .35s ease;overflow:hidden}
.app.nerve-live .nerve-fx{opacity:calc(.18 + var(--stress,0) * .72)}
.nerve-fx .edge{position:absolute;animation:nv-edgepulse var(--heart-speed,1.2s) ease-in-out infinite}
.nerve-fx .edge.left,.nerve-fx .edge.right{top:0;bottom:0;width:20px;background:linear-gradient(90deg,rgba(var(--market-rgb),calc(.28 + var(--move,0) * .58)),transparent)}
.nerve-fx .edge.left{left:0}.nerve-fx .edge.right{right:0;transform:scaleX(-1)}
.nerve-fx .edge.top,.nerve-fx .edge.bottom{left:0;right:0;height:18px;background:linear-gradient(180deg,rgba(var(--market-rgb),calc(.2 + var(--move,0) * .5)),transparent)}
.nerve-fx .edge.top{top:0}.nerve-fx .edge.bottom{bottom:0;transform:scaleY(-1)}
.nerve-fx .scanlines{position:absolute;inset:-100% 0;background:linear-gradient(180deg,transparent 46%,rgba(var(--market-rgb),calc(.04 + var(--move,0) * .13)) 50%,transparent 54%);animation:nv-scan 3.8s linear infinite}
.nerve-fx .heart-ring{position:absolute;left:50%;top:46%;width:330px;height:330px;border-radius:50%;border:3px solid rgba(var(--market-rgb),calc(.18 + var(--move,0) * .45));animation:nv-heartbeat var(--heart-speed,1.2s) ease-out infinite}
.app.nerve-panic .nerve-fx .edge{animation-duration:calc(var(--heart-speed,.65s) * .78)}
.app.nerve-crashed .nerve-fx{opacity:1;background:radial-gradient(circle,transparent 20%,rgba(255,30,20,.58) 100%)}
.nv-stage{position:relative;border-radius:20px;background:var(--navy);border:2px solid var(--navy-edge);
  box-shadow:0 4px 0 rgba(0,0,0,.3),inset 0 0 40px rgba(42,171,238,.04);padding:14px 14px 10px;overflow:hidden;flex:none;transition:border-color .2s,box-shadow .2s}
.app.nerve-live .nv-stage{border-color:rgba(var(--market-rgb),calc(.36 + var(--move,0) * .46));box-shadow:0 5px 0 rgba(0,0,0,.38),0 0 calc(9px + var(--move,0) * 28px) rgba(var(--market-rgb),calc(.1 + var(--move,0) * .22)),inset 0 0 65px rgba(var(--market-rgb),calc(.035 + var(--move,0) * .11))}
.app.nerve-panic .nv-stage{animation:nv-warning var(--heart-speed,.65s) ease-in-out infinite}
.nv-stage .glow{position:absolute;inset:0;background:radial-gradient(100% 76% at 50% 0,rgba(var(--market-rgb),calc(.055 + var(--move,0) * .19)),transparent 68%);pointer-events:none;transition:background .18s}
.nv-potlabel{position:relative;text-align:center;font:800 8px "IBM Plex Mono",Manrope,system-ui;letter-spacing:.18em;color:var(--hint)}
.nv-pot{position:relative;display:flex;align-items:baseline;justify-content:center;gap:7px;line-height:1;margin-top:2px;color:var(--market-up);text-shadow:0 0 calc(8px + var(--move,0) * 20px) rgba(var(--market-rgb),calc(.18 + var(--move,0) * .45));transition:color .16s}
.nv-pot strong{font:700 50px "IBM Plex Mono",Fredoka,system-ui;letter-spacing:-.075em}
.nv-pot i{font:800 12px "IBM Plex Mono",Manrope,system-ui;font-style:normal;letter-spacing:.1em}
.market-down .nv-pot{color:var(--market-down)}.market-up .nv-pot{color:var(--market-up)}
.nv-poolmeta{position:relative;text-align:center;margin-top:3px;font:700 7.5px "IBM Plex Mono",Manrope,system-ui;letter-spacing:.08em;color:#7FA993}
.nv-mult{position:relative;font:800 17px "IBM Plex Mono",Fredoka,system-ui;color:var(--market-up);letter-spacing:-.04em;line-height:1;text-shadow:0 0 10px rgba(var(--market-rgb),.35)}
.nv-mult.hot{animation:nv-quote-pulse 1.1s ease-in-out infinite}
.nv-mult.rising{color:var(--market-up)}
.nv-mult.falling{color:var(--market-down);text-shadow:0 4px 0 rgba(0,0,0,.38),0 0 28px rgba(255,90,78,.42)}
.nv-mult.crashed{color:var(--red-text)}
.nv-sub{position:relative;text-align:center;font:800 10px Manrope,system-ui;letter-spacing:.16em;color:#7E8FA6;margin-top:2px}
.nv-market{position:relative;margin:7px auto 0;width:max-content;max-width:100%;display:flex;align-items:center;gap:7px;padding:5px 9px;border-radius:999px;background:rgba(255,255,255,.045);border:1px solid rgba(255,255,255,.08);font:800 8px Manrope,system-ui;letter-spacing:.06em;color:#7E8FA6}
.nv-market span{display:flex;align-items:center;gap:4px}.nv-market span i{width:5px;height:5px;border-radius:50%;background:var(--gold);box-shadow:0 0 7px var(--gold)}
.nv-market b{color:var(--gold-text)}.nv-market em{min-width:30px;text-align:right;font-style:normal;color:var(--hint)}
.nv-market.falling{border-color:rgba(255,90,78,.32);background:rgba(255,90,78,.09)}
.nv-market.falling span i{background:var(--red);box-shadow:0 0 8px var(--red)}
.nv-market.falling b{color:var(--red-text)}
.nv-market.rising{border-color:rgba(255,194,75,.28)}
.nv-stage canvas{display:block;width:100%;height:auto;position:relative;margin-top:8px}
.nv-crashband{position:absolute;left:0;right:0;top:34%;text-align:center;z-index:5;pointer-events:none}
.nv-crashband .banner{display:inline-block;padding:12px 26px;border-radius:16px;background:var(--red);
  border:3px solid var(--red-shadow);box-shadow:0 6px 0 var(--red-shadow);
  animation:nv-slam .6s cubic-bezier(.2,1.1,.3,1) forwards}
.nv-crashband .big{font:700 26px Fredoka,system-ui;color:var(--red-ink);line-height:1}
.nv-crashband .sub{font:800 10px Manrope,system-ui;color:rgba(42,11,8,.72);letter-spacing:.06em;margin-top:2px}
.scard .sstat{font:600 13px Fredoka,system-ui;line-height:1.1;min-height:15px}
.scard .sstat.hold{color:var(--hint)}
.scard .sstat.cash{color:var(--gold-text)}
.scard .sstat.bust{color:var(--red)}
.scard{position:relative;overflow:hidden;border-top:2px solid var(--seat-color,var(--line))}
.scard.on .sstat.hold{animation:nv-hold-pulse 1.35s ease-in-out infinite}
.scard.banked{background:linear-gradient(180deg,rgba(255,194,75,.11),var(--chip));border-color:rgba(255,194,75,.35)}
.scard.busted{background:linear-gradient(180deg,rgba(255,90,78,.13),var(--chip));border-color:rgba(255,90,78,.38)}
.scard.tappable{cursor:pointer;border-color:rgba(42,171,238,.5);box-shadow:inset 0 0 0 1px rgba(42,171,238,.12)}
.app.nerve-live #cash-btn:not(.dim){animation:nv-warning var(--heart-speed,1.1s) ease-in-out infinite;box-shadow:0 5px 0 var(--gold-shadow),0 0 calc(10px + var(--stress,0) * 22px) rgba(255,194,75,.34)}

/* ---------------------------------------------------------------- signature: after-hours trading terminal
   Near-black terminal surfaces, phosphor green gains, monospaced market data,
   and hard red risk cues make Nerve feel intentionally clinical and tense. */
:root,[data-theme="dark"]{
  --bg:#040A08;--header:#06110D;--panel:#091712;--tile:#0D211A;--edge:#23533F;
  --tshadow:#010302;--text:#DFFFF2;--hint:#6C9884;--line:rgba(92,242,162,.12);
  --chip:#091B15;--blue:#5CF2A2;--navy:#030B08;--navy-edge:#1C5A3E;
  --market-up:#5CF2A2;--market-acid:#D7FF63;--market-down:#FF7066;
}
[data-theme="light"]{
  --bg:#F0F8F3;--header:#E5F2EA;--panel:#FAFFFC;--tile:#CFE5D8;--edge:#6A9A7F;
  --tshadow:#89A995;--text:#071B12;--hint:#465F52;--line:rgba(20,84,51,.13);
  --chip:#E1EFE7;--blue:#087943;--navy:#06110D;--navy-edge:#28714E;
  --market-up:#087943;--market-acid:#8CA823;--market-down:#C1472C;
}
body{background:
  radial-gradient(circle at 50% 10%,rgba(92,242,162,.11),transparent 35%),
  linear-gradient(180deg,#020504,#07130E)}
.app{background-color:var(--bg);background-image:
  linear-gradient(rgba(92,242,162,.027) 1px,transparent 1px),
  linear-gradient(90deg,rgba(92,242,162,.027) 1px,transparent 1px);
  background-size:20px 20px;border-inline:1px solid rgba(92,242,162,.16)}
.gheader{background:color-mix(in srgb, var(--header) 94%, transparent);border-bottom-color:var(--line);
  box-shadow:0 2px 12px rgba(0,0,0,.35)}
.brandhead .btitle,.gheader .htitle b,.introcard .mtitle,.roomcode .code,
.nv-pot,.nv-potlabel,.nv-poolmeta,.nv-mult,.nv-sub,.nv-market,.scard .sstat,.stepper .sval{
  font-family:"IBM Plex Mono",ui-monospace,monospace}
.brandhead .btitle{text-transform:uppercase;letter-spacing:.13em;font-size:17px;color:var(--market-up)}
.brandhead::before{content:'LIVE';padding:2px 5px;border:1px solid rgba(92,242,162,.55);color:var(--market-up);
  font:700 7px "IBM Plex Mono",monospace;letter-spacing:.12em;box-shadow:0 0 8px rgba(92,242,162,.14)}
.introcard{border-radius:10px;background:
  linear-gradient(120deg,rgba(92,242,162,.08),transparent 38%),#040D09;
  border-color:#1B5E3E;box-shadow:0 5px 0 #010302,inset 0 0 0 1px rgba(92,242,162,.06)}
.introcard .mtitle{color:var(--market-up);font-size:15px;text-transform:uppercase;letter-spacing:.03em}
.introcard .glow{background:linear-gradient(90deg,transparent,rgba(92,242,162,.06),transparent)}
/* The stage FRAME (this rule) is the "surrounding game screen" — it now
   tracks var(--panel), so it visibly lightens in the light theme and gains
   the same ambient tint the menus already had. .chart-shell nested inside
   (the actual candle chart) is the deliberate always-dark trading-terminal
   screen and is intentionally left alone below. */
.nv-stage{border-radius:10px;background-color:var(--panel);background-image:
  linear-gradient(rgba(var(--market-rgb),calc(.025 + var(--move,0) * .05)) 1px,transparent 1px),
  linear-gradient(90deg,rgba(var(--market-rgb),calc(.025 + var(--move,0) * .05)) 1px,transparent 1px);
  background-size:28px 28px;border-color:var(--edge);box-shadow:0 5px 0 var(--tshadow),inset 0 0 36px rgba(92,242,162,.035)}
.app.nerve-live .nv-stage{border-color:rgba(var(--market-rgb),calc(.36 + var(--move,0) * .46));box-shadow:0 5px 0 var(--tshadow),
  0 0 calc(9px + var(--move,0) * 28px) rgba(var(--market-rgb),calc(.1 + var(--move,0) * .22)),inset 0 0 55px rgba(var(--market-rgb),calc(.035 + var(--move,0) * .11))}
.nv-stage .glow{background:linear-gradient(180deg,rgba(var(--market-rgb),calc(.04 + var(--move,0) * .15)),transparent 48%)}
.nv-mult.rising,.nv-market.rising b,.scard .sstat.cash{color:var(--market-up)}
.nv-market span i{background:var(--market-up);box-shadow:0 0 8px var(--market-up)}
.nv-market.rising{border-color:rgba(92,242,162,.3)}
.nv-market{border-radius:999px;background:rgba(92,242,162,.035);border-color:rgba(92,242,162,.13)}
.gold-slab{border-radius:10px;background:linear-gradient(180deg,#E8FF88,#A9DA45);border-color:#628A20;
  box-shadow:0 5px 0 #355010,0 0 14px rgba(215,255,99,.13);color:#102000}
/* Nerve keeps a sharper-than-family edge for the terminal look, but flat 2-3px
   corners on light-theme white panels read as harsh unstyled rectangles — this
   pass rounds them to a deliberately-still-crisp 7-10px instead of the family's
   full 13-22px, and adds overflow:hidden anywhere a flush child would otherwise
   poke a square corner through the new curve. */
.ghost-slab,.field,.lsection,.prow,.scard,.turnbar,.fairstrip,.sheet,.seedbox,.rrows,.quick-tier-btn{border-radius:10px}
.scard.banked{background:linear-gradient(180deg,rgba(92,242,162,.1),var(--chip));border-color:rgba(92,242,162,.34)}
.nerve-fx .scanlines{background:linear-gradient(180deg,transparent 46%,rgba(var(--market-rgb),calc(.04 + var(--move,0) * .13)) 50%,transparent 54%)}
.roomcode .code{color:var(--market-up);text-shadow:0 0 15px rgba(92,242,162,.34)}
.fairstrip .fv,.blue-link,.rdone{color:var(--market-up)}

/* ---------------------------------------------------------------- ambient backdrop
   The flat fill (white in the light theme) is replaced by a slow, deliberately
   boring desk-at-night backdrop: a texture plate (art/bg.jpg) at the bottom,
   three wide phosphor/cyan glows drifting on ~50-70s loops, and a scanline
   sheet creeping down the column. Every animation is a TRANSFORM or OPACITY on
   a composited layer — no layout, no per-frame JS — and all of it stops under
   prefers-reduced-motion, leaving the static gradients. Sits at z-index 0 with
   the screens lifted to 1, so it never covers content or takes a pointer. */
/* Softened a further notch (2026-08 pass): every alpha below is ~20-25% lower
   than the previous pass, on both themes. */
.app{--amb-a:rgba(92,242,162,.12);--amb-b:rgba(64,214,255,.08);--amb-c:rgba(215,255,99,.06);
  --amb-grain:.16;--amb-line:rgba(92,242,162,.04);--amb-vig:rgba(1,6,4,.46)}
[data-theme="light"]{--amb-a:rgba(8,150,84,.26);--amb-b:rgba(10,150,170,.22);--amb-c:rgba(120,170,25,.16);
  --amb-grain:.03;--amb-line:rgba(9,86,52,.035);--amb-vig:rgba(12,58,38,.02);
  --amb-top:rgba(255,255,255,.55)}
.ambient{position:absolute;inset:0;z-index:0;pointer-events:none;overflow:hidden;contain:layout paint style}
.screen{position:relative;z-index:1}
/* bg.jpg is a dark teal plate: soft-light lets it sit under the dark theme,
   but over the light theme's near-white it would drag the whole column grey —
   there it becomes a faint multiply tint instead of a shading pass. */
.amb-grain{position:absolute;inset:0;background:url(art/bg.jpg) center/cover no-repeat;
  opacity:var(--amb-grain);mix-blend-mode:soft-light}
[data-theme="light"] .amb-grain{mix-blend-mode:multiply}
.amb-orb{position:absolute;border-radius:50%;filter:blur(42px);will-change:transform}
.amb-orb.o1{left:-24%;top:2%;width:78%;aspect-ratio:1;background:radial-gradient(circle,var(--amb-a),transparent 68%);
  animation:amb-drift-a 54s ease-in-out infinite}
.amb-orb.o2{right:-30%;top:34%;width:88%;aspect-ratio:1;background:radial-gradient(circle,var(--amb-b),transparent 68%);
  animation:amb-drift-b 71s ease-in-out infinite}
.amb-orb.o3{left:14%;bottom:-26%;width:66%;aspect-ratio:1;background:radial-gradient(circle,var(--amb-c),transparent 68%);
  animation:amb-drift-c 63s ease-in-out infinite}
.amb-scan{position:absolute;left:0;right:0;top:-50%;height:200%;
  background:repeating-linear-gradient(180deg,transparent 0 3px,var(--amb-line) 3px 4px);
  opacity:.55;animation:amb-scan-drift 34s linear infinite}
.amb-vignette{position:absolute;inset:0;background:
  radial-gradient(120% 60% at 50% 0,var(--amb-top,transparent),transparent 58%),
  radial-gradient(120% 74% at 50% 0,transparent 42%,var(--amb-vig))}
@keyframes amb-drift-a{0%,100%{transform:translate3d(0,0,0) scale(1)}50%{transform:translate3d(9%,7%,0) scale(1.12)}}
@keyframes amb-drift-b{0%,100%{transform:translate3d(0,0,0) scale(1.05)}50%{transform:translate3d(-11%,-6%,0) scale(.92)}}
@keyframes amb-drift-c{0%,100%{transform:translate3d(0,0,0) scale(.96)}50%{transform:translate3d(7%,-9%,0) scale(1.1)}}
/* Seamless by construction rather than by luck: the scanlines are a 4px
   repeating pattern, so travelling an exact multiple of 4px (40px = 10
   periods) lands on an identical frame and the loop point is invisible.
   The old 25% was a percentage of a fluid element, so it almost never
   landed on a period boundary and snapped. */
@keyframes amb-scan-drift{from{transform:translate3d(0,0,0)}to{transform:translate3d(0,40px,0)}}

.app{--market-rgb:92,242,162;--move:0}
.app.market-up{--market-rgb:92,242,162}
.app.market-down{--market-rgb:255,90,78}
/* nv-stage now tracks var(--panel) (see the comment above the .nv-stage rule),
   which lightens in the light theme, so its live values must keep tracking
   var(--market-up)/var(--red) (already set at lines ~246-263 and ~329-332)
   instead of the fixed dark-terminal hex values this block used to force back
   in — that override made the multiplier/pot unreadable on the light panel. */
/* The prefers-reduced-motion guard itself lives at the very end of this file
   (see the last block) — every selector it targets is declared somewhere
   above; a media query adds no specificity of its own, so at equal
   specificity the LATER rule in source order wins the cascade. A guard
   placed here, ahead of e.g. .chart-bezel::after (declared further down),
   would lose to that later declaration and silently keep animating. */

/* 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 rounds switch from the live chart to a market-close settlement. */
#game-col.show-end-summary>:not(.end-summary){display:none!important}
.end-summary[hidden]{display:none!important}
/* Settlement receipt — same conversion as the live stage: fill/border/text
   now track var(--panel)/var(--chip)/var(--text)/var(--hint) instead of a
   fixed dark palette, so the round-end screen matches whichever theme the
   player has toggled instead of reverting to always-dark. */
.end-summary{position:relative;overflow:hidden;flex:none;padding:16px 12px 12px;border:1px solid rgba(92,242,162,.3);border-radius:10px;
  background-image:linear-gradient(rgba(92,242,162,.025) 1px,transparent 1px),linear-gradient(90deg,rgba(92,242,162,.025) 1px,transparent 1px),linear-gradient(180deg,rgba(92,242,162,.055),transparent 34%);
  background-size:16px 16px,16px 16px,auto;background-color:var(--panel);box-shadow:0 5px 0 var(--tshadow),inset 0 0 44px rgba(92,242,162,.035);animation:pk-fade .3s ease}
.end-summary::before{content:'';position:absolute;right:8px;top:6px;width:34px;border-top:1px solid rgba(92,242,162,.32)}
.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:left;font:800 10px ui-monospace,monospace;letter-spacing:.1em;color:var(--market-up)}
.end-title{margin-top:7px;font:700 24px Fredoka,system-ui;color:var(--text);line-height:1.08}
.end-detail{margin-top:4px;font:600 11px ui-monospace,monospace;line-height:1.35;color:var(--hint)}
.end-totals{display:grid;grid-template-columns:repeat(3,1fr);gap:5px;margin-top:13px}
.end-totals>span{min-width:0;padding:8px 5px;border:1px solid var(--line);border-radius:7px;background:var(--chip);text-align:left}
.end-totals small,.end-cell small{display:block;font:800 9px ui-monospace,monospace;letter-spacing:.03em;color:var(--hint);line-height:1.25}
.end-totals b{display:block;margin-top:3px;font:700 13px ui-monospace,monospace;color:var(--text);white-space:nowrap}
.end-ledger-title{display:flex;flex-wrap:wrap;gap:2px 8px;align-items:end;justify-content:space-between;margin:13px 2px 6px}
.end-ledger-title b{font:800 10px ui-monospace,monospace;letter-spacing:.06em;color:var(--market-up)}.end-ledger-title span{font:600 11px ui-monospace,monospace;color:var(--hint)}
.end-ledger{display:flex;flex-direction:column;gap:4px}
.end-player{display:grid;grid-template-columns:minmax(0,1fr) 58px 58px 63px;gap:5px;align-items:center;padding:7px;border:1px solid var(--line);border-left:3px solid var(--row-color,var(--market-up));border-radius:7px;background:var(--chip)}
.end-player.winner{background:linear-gradient(90deg,color-mix(in srgb,var(--row-color) 11%,var(--chip)),var(--chip) 50%)}
.end-player.you{box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--row-color) 46%,transparent)}
.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:var(--text);white-space:nowrap}
.end-person small{display:block;font:800 9px ui-monospace,monospace;color:var(--hint);line-height:1.25}
.end-rank{display:grid;place-items:center;flex:none;width:22px;height:22px;border:1px solid var(--row-color,var(--market-up));border-radius:6px;font:700 10px ui-monospace,monospace;color:var(--row-color,var(--market-up))}
.end-cell{text-align:right;min-width:0}.end-cell b{display:block;margin-top:1px;font:700 11px ui-monospace,monospace;color:var(--text);white-space:nowrap}
.end-summary .positive{color:var(--market-up)}.end-summary .negative{color:var(--red)}.end-summary .flat{color:var(--hint)}
.end-note,.end-balance{text-align:center;margin:8px 3px 0;font:600 11px ui-monospace,monospace;line-height:1.35;color:var(--hint)}
.end-receipt{width:100%;margin-top:9px;padding:9px;border:1px solid var(--line);border-radius:7px;background:var(--chip);font:800 11px ui-monospace,monospace;letter-spacing:.03em;color:var(--market-up)}
.end-empty{padding:16px;text-align:center;color:var(--hint);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}}

/* ---------------------------------------------------------------- broker exchange v2
   Adds real trading-terminal hierarchy without inventing financial data: the
   quote, vault, session range, traders, and position states all come from the
   current authoritative round or its public deterministic curve. */
@keyframes nv-live-dot{0%,100%{opacity:.38;box-shadow:0 0 0 rgba(92,242,162,0)}50%{opacity:1;box-shadow:0 0 9px rgba(92,242,162,.8)}}
@keyframes nv-tape-in{from{opacity:0;transform:translateY(-5px)}to{opacity:1;transform:translateY(0)}}
.brandhead{min-height:58px;padding-bottom:8px;border-bottom:1px solid rgba(92,242,162,.13);background:rgba(3,10,7,.72)}
.brandhead::before{display:none}
.gheader .htitle b{color:var(--market-up)}
.gheader .htitle span{color:var(--hint)}
.brandlock{display:flex;align-items:center;gap:8px;min-width:0;flex:1}
.brandlock>span:last-child{display:flex;flex-direction:column;min-width:0}
.brandlock .btitle{display:block;flex:none!important;font-size:15px!important;line-height:1.05;white-space:nowrap;color:#5CF2A2!important}
.brandlock small{font:600 9px "IBM Plex Mono",monospace;letter-spacing:.06em;color:#7CA58F;margin-top:3px}
.exchange-mark{display:grid;place-items:center;width:30px;height:30px;flex:none;border:1px solid #2D8058;background:#071B11;
  font:700 12px "IBM Plex Mono",monospace;color:#8BFFC0;box-shadow:inset 0 0 14px rgba(92,242,162,.08)}
.session-pill{display:flex;align-items:center;gap:5px;padding:5px 7px;border:1px solid rgba(92,242,162,.22);background:rgba(92,242,162,.035);
  font:700 9px "IBM Plex Mono",monospace;letter-spacing:.04em;color:#6E9A82;white-space:nowrap}
.session-pill i,.desk-ticket em i,.exchange-head em i{width:5px;height:5px;border-radius:50%;background:#5CF2A2;animation:nv-live-dot 1.4s ease-in-out infinite}

.introcard{padding:12px 13px 13px;flex:none}
.terminal-top{position:relative;display:flex;justify-content:space-between;align-items:center;padding-bottom:7px;border-bottom:1px solid rgba(92,242,162,.16);
  font:700 9px "IBM Plex Mono",monospace;letter-spacing:.05em;color:#6C9884}
.terminal-top em{font-style:normal;color:#D7FF63}
.instrument-preview{position:relative;display:grid;grid-template-columns:1.15fr .85fr;gap:1px;margin:9px 0;background:rgba(92,242,162,.15);border:1px solid rgba(92,242,162,.15);border-radius:8px;overflow:hidden}
.instrument-preview>span{display:flex;flex-direction:column;padding:9px;background:#06120C}
.instrument-preview small,.terms-grid small{font:700 9px "IBM Plex Mono",monospace;letter-spacing:.04em;line-height:1.25;color:#557965}
.instrument-preview b{font:700 17px "IBM Plex Mono",monospace;color:#DFFFF2;margin-top:2px}
.instrument-preview i{font:600 9px "IBM Plex Mono",monospace;font-style:normal;line-height:1.3;color:#6C9884;margin-top:2px}
.introcard .mtitle{margin-top:6px;font-size:14px}
.introcard .msub{line-height:1.55;color:#86A897}
.rule-tape{position:relative;display:flex;gap:6px;flex-wrap:wrap;margin-top:9px}
.rule-tape span{padding:4px 6px;border-left:2px solid #5CF2A2;background:rgba(92,242,162,.055);font:700 9px "IBM Plex Mono",monospace;letter-spacing:.03em;color:#8AB59F}
.compliance-note{font-family:"IBM Plex Mono",monospace!important;font-size:10px!important;letter-spacing:.02em;line-height:1.4}

.desk-ticket{display:flex;align-items:center;justify-content:space-between;padding:11px 12px;border:1px solid #245B42;background:#07150E;box-shadow:0 4px 0 #010302;border-radius:10px}
.desk-ticket>span{display:flex;flex-direction:column}.desk-ticket small{font:700 9px "IBM Plex Mono",monospace;letter-spacing:.05em;color:#557965}
.desk-ticket .code{font:700 30px "IBM Plex Mono",monospace;letter-spacing:.16em;color:#A3FFC9;text-shadow:0 0 13px rgba(92,242,162,.3);line-height:1.1}
.desk-ticket em{display:flex;align-items:center;gap:5px;padding:5px 7px;border:1px solid rgba(92,242,162,.2);font:700 9px "IBM Plex Mono",monospace;font-style:normal;letter-spacing:.04em;color:#79A58E}
.terms-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:1px;background:rgba(92,242,162,.13);border:1px solid rgba(92,242,162,.12);width:100%;border-radius:8px;overflow:hidden}
.terms-grid span{display:flex;flex-direction:column;padding:7px 6px;background:var(--panel)}
.terms-grid b{font:700 11px "IBM Plex Mono",monospace;color:var(--text);margin-top:2px;white-space:nowrap}
.prow{border-left:2px solid #2A7753}.prow.host{background:linear-gradient(90deg,rgba(92,242,162,.08),var(--chip) 38%)}
.prow .pav{border-radius:7px;box-shadow:none}.prow .pmeta{font-family:"IBM Plex Mono",monospace;font-size:9px;text-align:right}

#test-banner{border-radius:7px!important;background:rgba(92,242,162,.055)!important;border-color:rgba(92,242,162,.24)!important;color:var(--hint)!important;
  font-family:"IBM Plex Mono",monospace!important;font-size:10px!important;letter-spacing:.02em;line-height:1.4}
.exchange-tape{display:grid;grid-template-columns:1.25fr repeat(3,1fr);gap:1px;flex:none;background:rgba(92,242,162,.15);border:1px solid rgba(92,242,162,.16);animation:nv-tape-in .25s ease;border-radius:8px;overflow:hidden}
.exchange-tape>span{display:flex;flex-direction:column;justify-content:center;min-width:0;padding:6px 7px;background:var(--panel)}
.exchange-tape small{font:700 9px "IBM Plex Mono",monospace;letter-spacing:.04em;line-height:1.25;color:var(--hint)}
.exchange-tape b{font:700 10px "IBM Plex Mono",monospace;color:var(--text);white-space:nowrap}
.exchange-tape .tape-symbol b{font-size:11px;color:var(--market-up)}.exchange-tape .tape-symbol small{color:var(--hint)}

/* LIVE public table — cycle status board. Routed through the panel/text/hint
   tokens (was hardcoded terminal-dark in both themes — the exact "surrounding
   game screen ignores the theme toggle" bug); the accent dot/lines stay the
   brand green since they're thin overlays, not the panel's own fill. */
.live-strip{display:flex;flex-direction:column;gap:1px;flex:none;background:rgba(92,242,162,.15);border:1px solid rgba(92,242,162,.16);border-radius:8px;overflow:hidden}
.live-strip .ls-head{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:6px 8px;background:var(--panel)}
.live-strip .ls-phase{display:flex;align-items:center;gap:5px;min-width:0}
.live-strip .ls-phase i{flex:none;width:5px;height:5px;border-radius:50%;background:var(--market-up);animation:nv-live-dot 1.4s ease-in-out infinite}
.live-strip .ls-phase b{font:700 10px "IBM Plex Mono",monospace;letter-spacing:.06em;color:var(--market-up);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.live-strip .ls-head em{flex:none;font:700 14px "IBM Plex Mono",monospace;font-style:normal;letter-spacing:-.03em;color:var(--text)}
.live-strip .ls-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:1px}
.live-strip .ls-grid span{display:flex;flex-direction:column;min-width:0;padding:5px 7px;background:var(--panel)}
.live-strip .ls-grid small{font:700 9px "IBM Plex Mono",monospace;letter-spacing:.03em;line-height:1.25;color:var(--hint)}
.live-strip .ls-grid b{font:700 10px "IBM Plex Mono",monospace;color:var(--text);margin-top:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.live-strip .ls-note{padding:5px 8px;background:var(--panel);font:600 11px "IBM Plex Mono",monospace;letter-spacing:.01em;line-height:1.35;color:var(--hint)}
/* entered = your money is in this round */
.live-strip.entered{border-color:rgba(215,255,99,.42)}
.live-strip.entered .ls-phase b{color:var(--market-acid)}
.live-strip.entered .ls-phase i{background:var(--market-acid)}
/* the round is running: no entries until the next window */
.live-strip.closed .ls-phase b{color:var(--red)}
.live-strip.closed .ls-phase i{background:var(--red);animation:none}

.nv-stage{padding:0!important;overflow:hidden}
/* The price screen is the point of the game: the surrounding furniture gives
   up a few px each so the chart can grow without pushing the position book,
   the countdown or the entry button below the fold. */
#game-col{gap:7px}
.exchange-head{position:relative;display:flex;align-items:center;justify-content:space-between;padding:7px 11px;border-bottom:1px solid rgba(92,242,162,.17);background:rgba(92,242,162,.025)}
.exchange-head>span{display:flex;flex-direction:column}.exchange-head>span b{font:700 13px "IBM Plex Mono",monospace;color:var(--text)}.exchange-head>span small{font:600 9px "IBM Plex Mono",monospace;letter-spacing:.04em;color:var(--hint);margin-top:2px}
.exchange-head em{display:flex;align-items:center;gap:5px;padding:4px 6px;border:1px solid rgba(92,242,162,.2);font:700 9px "IBM Plex Mono",monospace;font-style:normal;letter-spacing:.04em;color:var(--hint)}
.exchange-head em.open{color:var(--market-up);border-color:rgba(92,242,162,.4);background:rgba(92,242,162,.06)}
.exchange-head em.closed{color:var(--red);border-color:rgba(255,90,78,.35);background:rgba(255,90,78,.055)}
.exchange-head em.closed i{background:var(--red);animation:none}
.quote-grid{position:relative;display:grid;grid-template-columns:.88fr 1.12fr;gap:1px;background:rgba(92,242,162,.14);border-bottom:1px solid rgba(92,242,162,.13)}
.quote-grid>div{min-width:0;background:var(--panel);padding:9px 11px}
.vault-quote{display:flex;flex-direction:column;justify-content:center}
.nv-potlabel{text-align:left;font-size:9px;letter-spacing:.05em}.nv-pot{justify-content:flex-start;margin-top:5px;text-shadow:none}.nv-pot strong{font-size:29px;letter-spacing:-.06em}.nv-pot i{font-size:10px}
.nv-poolmeta{text-align:left;font-size:9px;line-height:1.35;letter-spacing:.02em;color:var(--hint);margin-top:5px;max-width:145px}
.price-quote{display:grid;grid-template-columns:1fr auto;grid-template-areas:"sub sub" "label price" "market price";align-items:end}
.price-quote>.nv-sub{grid-area:sub;text-align:left;margin:0 0 3px;font-size:9px;color:var(--hint);letter-spacing:.04em}
.price-quote>small{grid-area:label;align-self:end;font:700 9px "IBM Plex Mono",monospace;letter-spacing:.03em;color:var(--hint);margin-bottom:3px}
.price-quote>.nv-mult{grid-area:price;align-self:center;font-size:38px;text-align:right;letter-spacing:-.08em}
.price-quote>.nv-market{grid-area:market;justify-self:start;margin:0;padding:0;border:0;background:none;display:flex;flex-wrap:wrap;row-gap:1px;gap:7px;font-size:9px;letter-spacing:.02em}
.nv-market span{gap:4px}.nv-market span i{width:4px;height:4px}.nv-market em{min-width:0}.nv-market.falling,.nv-market.rising{border:0;background:none}
.market-stats{position:relative;display:grid;grid-template-columns:repeat(4,1fr);gap:1px;background:rgba(92,242,162,.13);border-bottom:1px solid rgba(92,242,162,.14)}
.market-stats span{display:flex;flex-direction:column;padding:6px 8px;background:var(--panel)}
.market-stats small{font:700 9px "IBM Plex Mono",monospace;letter-spacing:.03em;line-height:1.25;color:var(--hint)}
.market-stats b{font:700 10px "IBM Plex Mono",monospace;color:var(--text);margin-top:2px}
/* CHART BEZEL — PROCEDURAL, no bitmap. The old frame.png border-image was
   raster (squared corners, photoreal metal) AND it was a real border, so it
   ate 18px of canvas width on every side. This bezel is an absolutely
   positioned overlay: rounded hairlines in gold over phosphor green, four
   corner ticks, and a glow that breathes by ANIMATING OPACITY only. It costs
   the chart zero area and stays crisp at any zoom. art/frame.png is gone. */
.chart-shell{position:relative;background:#020806;border:0;padding:0;
  border-radius:14px;overflow:hidden;
  box-shadow:0 0 0 1px rgba(92,242,162,.14),0 6px 20px rgba(0,0,0,.45)}
.chart-bezel{position:absolute;inset:0;z-index:5;pointer-events:none;border-radius:inherit;
  border:1px solid rgba(255,194,75,.34);
  box-shadow:inset 0 0 0 1px rgba(2,10,7,.9),inset 0 0 0 2px rgba(92,242,162,.20),
    inset 0 0 30px rgba(92,242,162,.05)}
.chart-bezel::after{content:'';position:absolute;inset:-1px;border-radius:inherit;
  box-shadow:0 0 14px rgba(var(--market-rgb),.34),inset 0 0 16px rgba(var(--market-rgb),.11);
  opacity:.28;animation:nv-bezel-breathe 6.5s ease-in-out infinite}
@keyframes nv-bezel-breathe{0%,100%{opacity:.2}50%{opacity:.62}}
/* corner ticks — two borders each, radius matched to the shell's own curve */
.chart-bezel i{position:absolute;width:15px;height:15px;border:1.5px solid rgba(255,194,75,.5)}
.chart-bezel i:nth-child(1){left:4px;top:4px;border-right:0;border-bottom:0;border-top-left-radius:10px}
.chart-bezel i:nth-child(2){right:4px;top:4px;border-left:0;border-bottom:0;border-top-right-radius:10px}
.chart-bezel i:nth-child(3){right:4px;bottom:4px;border-left:0;border-top:0;border-bottom-right-radius:10px}
.chart-bezel i:nth-child(4){left:4px;bottom:4px;border-right:0;border-top:0;border-bottom-left-radius:10px}
.chart-toolbar{position:relative;z-index:4;display:flex;align-items:center;gap:5px;height:23px;padding:0 12px;border-bottom:1px solid rgba(92,242,162,.1);font:700 9px "IBM Plex Mono",monospace;letter-spacing:.04em;color:#638272}
.chart-toolbar span{margin-right:auto}.chart-toolbar em{padding:2px 4px;border:1px solid #163D29;font-style:normal}.chart-toolbar em.live{color:#5CF2A2}
.chart-shell canvas{display:block;width:100%;height:auto;margin:0!important;position:relative;z-index:1;
  object-fit:contain}
.chart-watermark{position:absolute;left:50%;top:54%;transform:translate(-50%,-50%);font:700 25px "IBM Plex Mono",monospace;letter-spacing:.08em;color:rgba(92,242,162,.035);pointer-events:none}
.nv-crashband{top:38%}.nv-crashband .banner{border-radius:8px;background:rgba(163,23,19,.94);border:1px solid #FF7066;box-shadow:0 0 24px rgba(255,90,78,.32)}
.nv-crashband .big{font:700 20px "IBM Plex Mono",monospace;color:#FFE5E2}.nv-crashband .sub{font:700 9px "IBM Plex Mono",monospace;color:#FFBBB6}

.positions-head{display:flex;align-items:center;justify-content:space-between;padding:1px 2px 0;font:700 9px "IBM Plex Mono",monospace;letter-spacing:.05em;color:var(--hint)}
.positions-head b{color:var(--text)}
.scorerow{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px}
.scard{display:block;min-width:0;padding:7px 8px 6px;text-align:left;border-radius:7px;background:var(--chip);border:1px solid var(--line);border-left:3px solid var(--seat-color)}
.scard.on{background:linear-gradient(90deg,rgba(92,242,162,.07),var(--chip) 45%);border-color:#2D7754;animation:none}
.scard .position-id{font:700 9px "IBM Plex Mono",monospace;letter-spacing:.03em;color:var(--hint);text-align:right;line-height:1}
.scard .sname{font:700 10px "IBM Plex Mono",monospace;color:var(--text);margin-top:-4px;padding-right:40px}.scard.on .sname{color:var(--text)}
.scard .top-tag{padding:1px 3px;background:var(--market-acid);color:#172500;font-size:9px}
.scard .sstat{display:flex;align-items:baseline;justify-content:space-between;min-height:17px;margin-top:4px;font-family:"IBM Plex Mono",monospace}
.scard .sstat small{font:700 9px "IBM Plex Mono",monospace;letter-spacing:.04em}.scard .sstat b{font:700 12px "IBM Plex Mono",monospace}
.scard .sstat.hold small{color:var(--hint)}.scard .sstat.hold b{color:var(--market-up)}.scard .sstat.cash b{color:var(--market-acid)}.scard .sstat.bust b{font-size:10px;color:var(--red)}
.scard .position-side{margin-top:3px;padding-top:3px;border-top:1px solid rgba(92,242,162,.09);font:600 9px "IBM Plex Mono",monospace;line-height:1.3;letter-spacing:.03em;color:var(--hint)}
.scard.banked{background:linear-gradient(90deg,rgba(215,255,99,.06),var(--chip) 48%);border-color:#70833B}.scard.busted{background:linear-gradient(90deg,rgba(255,90,78,.07),var(--chip) 48%);border-color:#73352F}
.scard.tappable{border-color:#4D9B72;box-shadow:inset 0 0 0 1px rgba(92,242,162,.08),0 0 10px rgba(92,242,162,.06)}
.turnbar{border-radius:7px;background:var(--chip);border-color:var(--line);font-family:"IBM Plex Mono",monospace}.turnbar .tb-wait,.turnbar .tb-right{font-family:"IBM Plex Mono",monospace;font-size:11px;line-height:1.3}
.fairstrip{border-radius:7px;background:var(--chip);border-color:var(--line)}.fairstrip .ft,.fairstrip .fv,.fairstrip .fh{font-family:"IBM Plex Mono",monospace;font-size:11px}
#cash-btn{font-family:"IBM Plex Mono",monospace;font-size:14px;letter-spacing:.03em;text-transform:uppercase}
.stepper .sval{color:var(--market-up)}
.end-title{font-family:"IBM Plex Mono",monospace;font-size:20px;text-transform:uppercase;letter-spacing:-.04em}
.end-summary.all-busted{border-color:rgba(215,255,99,.48);box-shadow:0 5px 0 var(--tshadow),inset 0 0 44px rgba(215,255,99,.045)}
.end-summary.all-busted::before{border-color:rgba(215,255,99,.42)}

@media(max-height:730px){.nv-pot strong{font-size:25px}.price-quote>.nv-mult{font-size:34px}.market-stats span{padding-block:5px}.chart-shell canvas{max-height:152px}}
/* 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:730px)` 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 - 730px) * 999` is hugely positive above
   the breakpoint and hugely negative below it; clamp() turns that into a
   two-value switch (compact at or below 730px, normal above). */
.col{gap:clamp(7px, calc(7px + (var(--tg-vh,100dvh) - 730px) * 999), 9px);padding-top:clamp(8px, calc(8px + (var(--tg-vh,100dvh) - 730px) * 999), 11px)}
.gfooter{padding-top:clamp(7px, calc(7px + (var(--tg-vh,100dvh) - 730px) * 999), 11px);gap:clamp(7px, calc(7px + (var(--tg-vh,100dvh) - 730px) * 999), 9px)}
@media(max-width:370px){.session-pill{display:none}.brandlock .btitle{font-size:14px!important}.exchange-tape>span{padding-inline:5px}.quote-grid>div{padding-inline:8px}.nv-pot strong{font-size:25px}.price-quote>.nv-mult{font-size:33px}.market-stats span{padding-inline:5px}.scard{padding-inline:6px}}
/* iPhone SE (375x560, the team's own declared smallest current target) — the
   730px pass above still leaves quote + full chart + position book taller
   than the visible column (measured: 164px of forced scroll), and because
   the live multiplier sits ABOVE the chart, scrolling far enough to reach
   the position book pushed it uncomfortably close to the top edge — there
   was no scroll position that comfortably showed the price and the
   opponents together. The OPEN/SESSION HIGH/LOW/ELAPSED stat row and the
   chart's own "PRICE ACTION / LIVE" toolbar label are decoration, not
   numbers you act on mid-round (the live multiplier and trend badge already
   carry that), so they go first; the canvas gets a shorter cap on top of
   that. Verified live: with these trims the quote, chart and every seated
   trader's card share one screenful with zero scroll at 2 traders, and a
   full 4-trader room only needs a small scroll confined to the fair-play
   strip below the position book — the quote never leaves view. */
@media(max-height:600px){
  #game-col{gap:5px;padding-top:6px}
  .market-stats{display:none}
  .chart-toolbar{display:none}
  .chart-shell canvas{max-height:100px}
  .quote-grid>div{padding:6px 9px}
  .exchange-tape>span{padding-block:4px}
}

/* Contrast: the HOME screen's instrument/brief panels are still deliberately
   terminal-dark in both themes (unchanged, out of this pass's scope), so
   their text stays light-on-dark on purpose. The GAME screen's quote-grid
   and market-stats panels are no longer always-dark (see .nv-stage / .quote-grid
   / .market-stats above, now on var(--panel)) — their text already tracks
   var(--hint)/var(--text) per-theme at the point each rule is declared, so
   they are intentionally absent from this legacy dark-only list. */
[data-theme="light"] .introcard .mtitle{color:#5CF2A2}
[data-theme="light"] .introcard .msub{color:#9FD9BE}
[data-theme="light"] .instrument-brief small,
[data-theme="light"] .instrument-preview small{color:#8FBFA6}
.instrument-brief small,
.instrument-preview small{color:#8FBFA6}

/* ---------------------------------------------------------------- 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))}

/* prefers-reduced-motion — kept as the LAST rules in the file on purpose.
   A media query adds no specificity of its own, so at equal specificity the
   later rule in source order wins the cascade; every selector below is
   copied verbatim from its animated declaration earlier in the file so the
   specificity matches exactly, and being last guarantees the source-order
   tiebreak goes to "stop animating" no matter where the original rule sits. */
/* 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 second item is a bare
   #copy-link would hide the invite link on the SOLO screen too. */
body.group-entry #copy-code,
body.group-entry #copy-link { display: none !important; }

@media (prefers-reduced-motion:reduce){
  .scard.on .sstat.hold,.nv-mult.hot{animation:none}
  /* ambient backdrop: freezes to its static resting frame */
  .amb-orb.o1,.amb-orb.o2,.amb-orb.o3,.amb-scan,.chart-bezel::after{animation:none}
  .chart-bezel::after{opacity:.34}
  /* in-round motion: full-bleed edge pulse, scanlines, heartbeat ring, the
     whole-stage panic warning, and the pulsing CASH OUT button */
  .nerve-fx .edge,.nerve-fx .scanlines,.nerve-fx .heart-ring{animation:none}
  .app.nerve-panic .nv-stage{animation:none}
  .app.nerve-live #cash-btn:not(.dim){animation:none}
  /* exchange-v2 chrome: mount-in slide, live-status dots, CTA sheen sweep */
  .exchange-tape{animation:none}
  .session-pill i,.desk-ticket em i,.exchange-head em i,.live-strip .ls-phase i{animation:none}
  /* display:none, NOT animation:none — the sheen is only ever off-button
     because the animation moves it there, so freezing it parks a permanent
     white glare stripe on every gold CTA. Same fix as plinko. */
  .gold-slab .sheen{display:none}
}

/* 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. */

/* ── 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}
