/* Tile Reveal — webapp styles.
   Ported from design-reference/project/Vault Screen.dc.html (authoritative)
   + Shared Vault.dc.html identity sheet.
   Keyframes are verbatim from the design. */

/* ---------------------------------------------------------------- keyframes */
@keyframes sv-flip{0%{transform:scaleX(1) scaleY(1)}20%{transform:scaleX(.72) scaleY(1.06)}46%{transform:scaleX(.06) scaleY(1.12)}54%{transform:scaleX(.06) scaleY(1.12)}78%{transform:scaleX(.8) scaleY(1.05)}100%{transform:scaleX(1) scaleY(1)}}
@keyframes sv-pop{0%{transform:scale(1.16)}48%{transform:scale(.95)}76%{transform:scale(1.03)}100%{transform:scale(1)}}
@keyframes sv-turn{0%{transform:translateZ(0) rotateY(0deg) scale(1)}12%{transform:translateZ(10px) rotateY(-14deg) scale(1.05)}52%{transform:translateZ(32px) rotateY(96deg) scale(1.1)}88%{transform:translateZ(6px) rotateY(194deg) scale(1.03)}100%{transform:translateZ(0) rotateY(180deg) scale(1)}}
@keyframes sv-shadeA{0%{opacity:0}12%{opacity:.14}50%{opacity:.74}100%{opacity:.74}}
@keyframes sv-shadeB{0%{opacity:.74}50%{opacity:.74}88%{opacity:.07}100%{opacity:0}}
@keyframes sv-drop{0%,100%{opacity:.4;transform:scaleX(1)}52%{opacity:.12;transform:scaleX(.6)}}
@keyframes sv-shake{0%,100%{transform:translate(0,0) rotate(0)}12%{transform:translate(-5px,1px) rotate(-3deg)}26%{transform:translate(5px,-1px) rotate(3deg)}40%{transform:translate(-4px,0) rotate(-2deg)}56%{transform:translate(4px,1px) rotate(2deg)}74%{transform:translate(-2px,0) rotate(-1deg)}88%{transform:translate(1px,0)}}
@keyframes sv-pulse{0%,100%{box-shadow:0 0 0 0 rgba(255,194,75,.55),0 4px 0 var(--tshadow)}50%{box-shadow:0 0 0 10px rgba(255,194,75,0),0 4px 0 var(--tshadow)}}
@keyframes sv-bob{0%,100%{transform:translateY(0)}50%{transform:translateY(-3px)}}
@keyframes sv-rise{from{transform:translateY(110%)}to{transform:translateY(0)}}
@keyframes sv-fade{from{opacity:0}to{opacity:1}}
@keyframes sv-tick{from{width:100%}to{width:0%}}
@keyframes sv-float{0%{transform:translateY(6px) scale(.7);opacity:0}28%{transform:translateY(-10px) scale(1.08);opacity:1}100%{transform:translateY(-32px) scale(.95);opacity:0}}
@keyframes sv-dots{0%,20%{opacity:.25}50%{opacity:1}80%,100%{opacity:.25}}
@keyframes sv-spark{0%,100%{opacity:1;transform:scale(1) rotate(0)}50%{opacity:.55;transform:scale(1.4) rotate(35deg)}}
@keyframes sv-numA{0%{transform:scale(1)}35%{transform:scale(1.13)}62%{transform:scale(.98)}100%{transform:scale(1)}}
@keyframes sv-numB{0%{transform:scale(1)}35%{transform:scale(1.13)}62%{transform:scale(.98)}100%{transform:scale(1)}}
@keyframes sv-sheen{0%{transform:translateX(-140%) skewX(-18deg)}100%{transform:translateX(320%) skewX(-18deg)}}
/* Boomerang variant for the primary gold buttons only (out and back, no
   teleport-to-start jump-cut). Same per-leg sweep speed as sv-sheen's old
   one-way 3.4s pass — this just adds the return leg instead of snapping back.
   The hero progress-bar fill keeps the original one-way sv-sheen untouched. */
@keyframes sv-sheen-boom{0%{transform:translateX(-140%) skewX(-18deg)}50%{transform:translateX(320%) skewX(-18deg)}100%{transform:translateX(-140%) skewX(-18deg)}}
@keyframes sv-dial{from{transform:rotate(0)}to{transform:rotate(360deg)}}
@keyframes sv-part{0%{transform:translate(0,0) scale(1);opacity:1}100%{transform:translate(var(--px),-38px) scale(.4);opacity:0}}
@keyframes sv-ringpop{0%{transform:scale(.86)}55%{transform:scale(1.1)}100%{transform:scale(1)}}
@keyframes sv-flash{0%{opacity:.85}100%{opacity:0}}
@keyframes sv-quake{0%,100%{transform:translate(0,0)}7%{transform:translate(-8px,5px)}16%{transform:translate(8px,-6px)}27%{transform:translate(-7px,-3px)}39%{transform:translate(6px,5px)}52%{transform:translate(-5px,-2px)}66%{transform:translate(4px,3px)}80%{transform:translate(-2px,1px)}92%{transform:translate(1px,-1px)}}
@keyframes sv-shock{0%{transform:translate(-50%,-50%) scale(.15);opacity:.95}70%{opacity:.3}100%{transform:translate(-50%,-50%) scale(7);opacity:0}}
@keyframes sv-shard{0%{transform:translate(-50%,-50%) rotate(0) scale(1);opacity:1}100%{transform:translate(var(--tx),var(--ty)) rotate(320deg) scale(.2);opacity:0}}
@keyframes sv-slam{0%{transform:scale(2.6) rotate(-15deg);opacity:0}20%{transform:scale(.84) rotate(4deg);opacity:1}42%{transform:scale(1.14) rotate(-5deg)}64%{transform:scale(.96) rotate(1deg)}100%{transform:scale(1) rotate(-2.5deg)}}
@keyframes sv-burst{0%{transform:translate(-50%,-50%) scale(.2) rotate(0);opacity:0}22%{opacity:.8}100%{transform:translate(-50%,-50%) scale(2.1) rotate(40deg);opacity:0}}
@keyframes sv-whiteout{0%{opacity:1}16%{opacity:.92}100%{opacity:0}}
@keyframes sv-heart{0%,100%{opacity:.7}50%{opacity:1}}
@keyframes sv-pop2{0%{transform:scale(1.3) rotate(4deg)}40%{transform:scale(.9) rotate(-3deg)}70%{transform:scale(1.08) rotate(1deg)}100%{transform:scale(1) rotate(0)}}
@keyframes sv-pop3{0%{transform:scale(1.52) rotate(7deg)}28%{transform:scale(.84) rotate(-6deg)}52%{transform:scale(1.22) rotate(3deg)}76%{transform:scale(.95) rotate(-1deg)}100%{transform:scale(1) rotate(0)}}
@keyframes sv-ring2{0%{transform:translate(-50%,-50%) scale(.35);opacity:.95}100%{transform:translate(-50%,-50%) scale(3.4);opacity:0}}
@keyframes sv-goldflash{0%{opacity:.5}100%{opacity:0}}
@keyframes sv-share-surge{0%{transform:scale(.88);box-shadow:0 0 0 0 rgba(255,194,75,.8)}45%{transform:scale(1.08);box-shadow:0 0 0 9px rgba(255,194,75,0)}100%{transform:scale(1)}}
@keyframes sv-share-out{0%{transform:scale(1) rotate(0);filter:brightness(1)}14%{transform:scale(1.13) rotate(-2.5deg);filter:brightness(1.7)}28%{transform:scale(.96) rotate(2deg)}43%{transform:scale(1.08) rotate(-1.5deg)}62%{transform:scale(.98) rotate(.7deg)}100%{transform:scale(1) rotate(0);filter:brightness(1)}}
@keyframes sv-outburst{0%,100%{transform:scale(1) rotate(0)}35%{transform:scale(1.45) rotate(-12deg)}65%{transform:scale(.92) rotate(7deg)}}
@keyframes sv-own-claim{0%,100%{transform:translateY(0);box-shadow:0 0 0 1px rgba(103,232,255,.28),0 0 8px rgba(103,232,255,.11)}50%{transform:translateY(-1px);box-shadow:0 0 0 1px rgba(103,232,255,.58),0 0 17px rgba(103,232,255,.3)}}
@keyframes sv-winner-settle{0%{transform:scale(.9);filter:brightness(1)}45%{transform:scale(1.035);filter:brightness(1.35)}100%{transform:scale(1);filter:brightness(1)}}

/* Shared notebook-paper grain (theme-invariant neutral noise; reused by both the
   dark "drafting paper" and light "warm paper" backdrops below). Baked-in low
   opacity so the same asset reads as a faint lightening speckle on dark and a
   faint darkening speckle on light — no separate light/dark asset needed. */
:root{--paper-grain:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='150' height='150'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.05'/%3E%3C/svg%3E")}

/* ---------------------------------------------------------------- palettes */
: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;
  /* brand (theme-invariant) */
  --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;
  --navy:#101722; --navy-edge:#22304A;
}
[data-theme="light"]{
  --gold-text:#8F6400;
  --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;
}
/* NOTE: this generic light --bg is overridden per-build below (each build's
   "signature" section redeclares --bg to its own notebook-paper tone). */

/* ---------------------------------------------------------------- base */
*{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. The decorative .sv-sweep band (and the ::before/
   ::after orbs) are oversized and animate a transform that pushes their box
   well past the right edge — with overflow:hidden that made .app a horizontal
   SCROLL container (scrollWidth > clientWidth). Focusing a right-aligned
   control then (e.g. tapping the theme toggle) let the browser auto-scroll
   .app sideways to reveal it, shifting the whole column left and clipping it
   until reload. overflow:clip clips identically but establishes NO scroll
   container, so scrollLeft can never move. .app is fixed at 100dvh and never
   needs to scroll itself — the inner .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:sv-quake .62s cubic-bezier(.3,0,.4,1)}

.screen{display:none;flex:1;min-height:0;flex-direction:column}
.screen.active{display:flex}

/* ---------------------------------------------------------------- header */
.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);letter-spacing:-.01em}
.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}

/* ---------------------------------------------------------------- generic ui */
.col{flex:1;display:flex;flex-direction:column;gap:9px;padding:11px 16px 0;min-height:0;overflow-y:auto}
.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. 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:sv-sheen-boom 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.hot{border-color:var(--red);box-shadow:0 5px 0 rgba(255,90,78,.28);color:var(--red)}
.ghost-slab:disabled{opacity:.45;cursor:default}
/* WALLET GATE explainer under a gated control — reuses .hint-line's type;
   .short recolors it into the balance-shortfall warning so it reads
   differently from the neutral "connect your wallet" copy. Neither control
   on this screen has a KNOWN stake yet (Tile Reveal picks the entry in the
   LOBBY, after creation — see app.js), so `.short` is dormant today but kept
   for the one shared paintWalletGate() every game runs. */
.wgate-note{text-align:left}
.wgate-note.short{color:var(--red)}
.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;background:none;border:none;padding:0}

.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::placeholder{color:var(--hint)}
.field:focus{border-color:var(--gold)}
.flabel{font:800 9.5px Manrope,system-ui;letter-spacing:.14em;color:var(--hint)}

/* ---------------------------------------------------------------- home */
.brandhead{display:flex;align-items:center;gap:8px;padding:14px 16px 4px}
.brandhead .btitle{font:700 20px Fredoka,system-ui;color:var(--text);letter-spacing:-.01em;flex:1}
.modecard{position:relative;text-align:left;width:100%;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;cursor:pointer;color:#EDF2F8}
.modecard.sel{border-color:var(--gold)}
.modecard .glow{position:absolute;inset:0;background:radial-gradient(115% 85% at 50% -12%,rgba(255,194,75,.17),transparent 62%);pointer-events:none}
.modecard .mtitle{position:relative;font:600 17px Fredoka,system-ui;color:var(--gold)}
.modecard .msub{position:relative;font:500 13px Manrope,system-ui;line-height:1.4;color:#7E8FA6;margin-top:4px}
.modecard .mtag{position:absolute;top:13px;right:14px;font:800 9px Manrope,system-ui;letter-spacing:.13em;color:#7E8FA6}

/* ---------------------------------------------------------------- gem hero accent (home)
   art/gem2.png is a flat sprite with TRUE alpha, so it needs no dark backing plate and no
   mix-blend-mode:screen hack — it sits straight on the ambient backdrop over a soft halo. */
.gem-hero-row{position:relative;display:flex;justify-content:center;flex:none;pointer-events:none;
  padding:6px 0 2px}
.gem-hero-row::before{content:'';position:absolute;left:50%;top:50%;width:158px;height:158px;
  transform:translate(-50%,-50%);border-radius:50%;pointer-events:none;
  background:radial-gradient(circle,rgba(96,226,255,.20),rgba(96,226,255,.07) 46%,transparent 70%)}
.gem-hero{position:relative;width:94px;height:94px;object-fit:contain;
  filter:drop-shadow(0 7px 15px rgba(0,0,0,.45));
  animation:sv-gem-float 9s ease-in-out infinite}
@keyframes sv-gem-float{
  0%,100%{transform:translateY(0) rotate(-2.2deg)}
  50%{transform:translateY(-7px) rotate(2.2deg)}
}
/* Reusable reveal spin — nothing triggers this yet; a later board-reveal can add .gem-spin to a gem img. */
.gem-spin{animation:sv-gem-spin 1.2s cubic-bezier(.3,.1,.3,1)}
@keyframes sv-gem-spin{
  0%{transform:rotate(0deg) scaleX(1)}
  25%{transform:rotate(90deg) scaleX(.35)}
  50%{transform:rotate(180deg) scaleX(1)}
  75%{transform:rotate(270deg) scaleX(.35)}
  100%{transform:rotate(360deg) scaleX(1)}
}
/* 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){
  .gem-hero{animation:none}
  .gem-spin{animation:none}
}

/* ---------------------------------------------------------------- hero card (brand anchor: navy in BOTH themes) */
.hero{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:13px 15px 12px;overflow:hidden;flex:none}
.hero .glow{position:absolute;inset:0;background:radial-gradient(115% 85% at 50% -12%,rgba(255,194,75,.17),transparent 62%);pointer-events:none}
.hero .dial{position:absolute;right:-26px;top:-24px;width:150px;height:150px;opacity:.09;pointer-events:none}
.hero .dial g{transform-origin:60px 60px;animation:sv-dial 34s linear infinite}
.hero .hlabel{position:relative;text-align:center;font:800 9.5px Manrope,system-ui;letter-spacing:.17em;color:#7E8FA6}
.hero .hmult-wrap{position:relative;text-align:center;margin-top:-1px}
.hero .hmult{font:600 60px Fredoka,system-ui;color:var(--gold);letter-spacing:-.02em;line-height:1.08;
  display:inline-block;text-shadow:0 4px 0 rgba(0,0,0,.38)}
.hero .hmult .hmult-unit{font:600 17px Fredoka,system-ui;margin-left:7px;letter-spacing:0;
  color:inherit;opacity:.85;text-shadow:none}
.hero .hmult .hmult-unit em{font-style:normal;font:700 13px Manrope,system-ui;opacity:.75;margin-left:3px}
.hero .hmult.blown{color:var(--red)}
.hero .hmult.punchA{animation:sv-numA .42s cubic-bezier(.2,1.4,.4,1)}
.hero .hmult.punchB{animation:sv-numB .42s cubic-bezier(.2,1.4,.4,1)}
.hero .hchips{position:relative;display:flex;gap:8px;margin-top:4px}
.hero .hpot{flex:1;display:flex;align-items:center;justify-content:center;gap:6px;padding:7px 8px;
  border-radius:12px;background:rgba(255,255,255,.05);border:1px solid rgba(255,255,255,.09)}
.hero .hpot .val{font:800 14px Fredoka,system-ui;color:#EDF2F8}
.hero .hpot .unit{font:700 10px Manrope,system-ui;color:#7E8FA6}
.hero .hnext{display:flex;align-items:center;gap:5px;padding:7px 11px;border-radius:12px;
  background:rgba(255,194,75,.13);border:1px solid rgba(255,194,75,.26)}
.hero .hnext .lbl{font:700 9.5px Manrope,system-ui;color:#B98A2E}
.hero .hnext .val{font:700 13px Fredoka,system-ui;color:var(--gold)}
.hero .prog{position:relative;height:6px;border-radius:4px;background:rgba(255,255,255,.09);margin-top:10px;overflow:hidden}
.hero .prog .fill{position:absolute;left:0;top:0;bottom:0;overflow:hidden;border-radius:4px;width:0%;
  background:linear-gradient(90deg,#E09B12,#FFC24B);transition:width .45s cubic-bezier(.2,1,.3,1)}
.hero .prog .fill.blown{background:var(--red)}
.hero .prog .fill .sheen{position:absolute;inset:0;width:40%;
  background:linear-gradient(90deg,transparent,rgba(255,255,255,.55),transparent);animation:sv-sheen 2.6s ease-in-out infinite}
.hero .hfoot{position:relative;display:flex;justify-content:space-between;margin-top:6px}
.hero .hfoot .open{font:700 11px Manrope,system-ui;color:#7E8FA6}
.hero .hfoot .bombs{font:700 11px Manrope,system-ui;color:#C4756C}

/* ---------------------------------------------------------------- fair strip */
.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);letter-spacing:-.02em}
.fairstrip .fv{margin-left:auto;display:flex;align-items:center;gap:3px;font:800 10.5px Manrope,system-ui;color:var(--blue)}

/* ---------------------------------------------------------------- avatar row */
.avrow{display:flex;align-items:flex-start;gap:8px;flex:none;min-height:56px;padding-bottom:11px}
.avlist{display:flex;gap:6px}
.avwrap{position:relative;flex:none;overflow:visible}
.av{width:100%;height:100%;background:var(--chip);border:3px solid var(--edge);box-shadow:0 3px 0 var(--tshadow);
  color:var(--hint);font:800 12px Manrope,system-ui;display:flex;align-items:center;justify-content:center}
.avwrap.on .av{background:var(--gold);border-color:var(--gold);box-shadow:0 4px 0 var(--gold-shadow);
  color:var(--gold-ink);transform:translateY(-2px);animation:sv-ringpop .32s cubic-bezier(.2,1.5,.4,1)}
.avwrap.off .av{opacity:.45}
.avwrap.dead .av{background:linear-gradient(145deg,#7D1712,#D3362C);border-color:var(--red);
  box-shadow:0 3px 0 var(--red-shadow),0 0 0 2px rgba(255,90,78,.18);color:#fff;filter:saturate(.9)}
.avname{position:absolute;left:-12px;right:-12px;top:calc(100% + 3px);text-align:center;
  font:800 9px Manrope,system-ui;letter-spacing:.04em;color:var(--gold);white-space:nowrap;overflow:hidden}
.avname.outname{color:var(--red);letter-spacing:.12em;text-shadow:0 1px 0 rgba(0,0,0,.24)}
[data-theme="light"] .avname{color:#8A5D0A}
[data-theme="light"] .avname.outname{color:#C52D24}
.escrow{margin-left:auto;text-align:right}
.escrow .l1{font:800 11.5px Manrope,system-ui;color:var(--text)}
.escrow .l2{font:600 11px Manrope,system-ui;line-height:1.3;color:var(--hint)}
.sharestrip{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px;flex:none}
.sharehead{grid-column:1/-1;display:flex;align-items:baseline;justify-content:space-between;gap:8px;padding:0 2px}
.sharehead b{font:800 9px Manrope,system-ui;letter-spacing:.045em;color:var(--text)}
.sharehead span{font:600 11px Manrope,system-ui;line-height:1.35;color:var(--hint);text-align:right}
.sharehead.final b{color:var(--gold);text-shadow:0 0 9px rgba(255,194,75,.24)}
.sharechip{position:relative;display:grid;grid-template-columns:1fr auto;align-items:center;gap:1px 6px;padding:6px 8px;
  border-radius:10px;background:var(--chip);border:1px solid var(--line);min-width:0;overflow:hidden}
.sharechip .sharename{font:800 9.5px Manrope,system-ui;color:var(--text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.sharechip .sharename em{margin-left:4px;padding:1px 3px;border-radius:4px;background:rgba(42,171,238,.14);color:var(--blue);font:800 9px Manrope,system-ui;font-style:normal}
.sharechip .shareweight{font:600 10px Manrope,system-ui;color:var(--hint);grid-column:1}
.sharechip .shareclaim{display:flex;flex-direction:column;align-items:flex-end;justify-content:center;min-width:72px;padding:4px 7px 3px;
  border:1px solid rgba(103,232,255,.34);border-radius:7px;background:linear-gradient(145deg,#0A1C30,#071321);
  color:#F2FDFF;grid-column:2;grid-row:1 / span 2;box-shadow:inset 0 1px 0 rgba(255,255,255,.06),0 2px 6px rgba(0,0,0,.28)}
.sharechip .claimvalue{display:flex;align-items:baseline;gap:3px;line-height:1;white-space:nowrap}
.sharechip .claimvalue strong{font:700 16px "Chakra Petch",Fredoka,system-ui;letter-spacing:-.035em;color:#F5FEFF;text-shadow:0 0 9px rgba(103,232,255,.32)}
.sharechip:not(.settled) .claimvalue strong{font-size:18px}
.sharechip .claimvalue i{font:800 9px Manrope,system-ui;font-style:normal;letter-spacing:.04em;color:#70E9FF}
.sharechip .shareclaim small{font:800 9px Manrope,system-ui;letter-spacing:.02em;line-height:1.25;max-width:72px;color:#9EC7D4;margin-top:2px}
.sharechip.you{box-shadow:inset 0 0 0 1px rgba(42,171,238,.28)}
.sharechip.you.alive .shareclaim{border-color:rgba(103,232,255,.68);background:linear-gradient(145deg,#10314A,#091B31);animation:sv-own-claim 2.8s ease-in-out infinite}
.sharechip.active{border-color:rgba(255,194,75,.5);background:rgba(255,194,75,.10)}
.sharechip.out{grid-column:1/-1;min-height:43px;border:2px solid var(--red);padding:5px 7px;opacity:1;
  background:repeating-linear-gradient(135deg,rgba(255,90,78,.19) 0 9px,rgba(255,90,78,.08) 9px 18px),var(--chip);
  box-shadow:inset 0 0 16px rgba(255,58,44,.15),0 0 0 1px rgba(126,22,16,.28)}
.sharechip.out .sharename{color:var(--red);text-decoration:line-through;text-decoration-thickness:1.5px}
.sharechip.out .shareweight{color:var(--red);font-weight:800;letter-spacing:.035em}
.sharechip.out .shareclaim{color:#fff;padding:3px 6px;border-color:#FF9A91;background:var(--red);text-shadow:0 1px 0 rgba(80,0,0,.28)}
.sharechip.out .claimvalue strong{color:#fff;font-size:14px;text-shadow:0 1px 0 rgba(80,0,0,.28)}
.sharechip.out .shareclaim small{color:#fff;opacity:.9}
.sharechip .outburst{display:inline-block;margin-right:4px;font-style:normal;text-decoration:none;animation:sv-outburst 1s ease-in-out infinite}
.sharechip.surge{animation:sv-share-surge .85s cubic-bezier(.2,1.4,.3,1)}
.sharechip.eliminated{z-index:2;animation:sv-share-out 1.05s cubic-bezier(.2,1.4,.3,1)}
.sharechip.settled .shareclaim{animation:none}
.sharechip.paid:not(.winner){border-color:rgba(255,194,75,.42)}
.sharechip.winner{border-color:var(--gold);background:linear-gradient(105deg,rgba(255,194,75,.2),var(--chip) 62%);
  box-shadow:inset 3px 0 0 var(--gold),0 0 18px rgba(255,194,75,.18)}
.sharechip.winner .sharename{color:var(--gold)}
.sharechip.winner .shareclaim{border-color:#FFD978;background:linear-gradient(145deg,#FFD978,#FFB72F);box-shadow:0 2px 0 #8A5A12,0 0 16px rgba(255,194,75,.32)}
.sharechip.winner .claimvalue strong,.sharechip.winner .claimvalue i,.sharechip.winner .shareclaim small{color:var(--gold-ink);text-shadow:none}
.sharechip.sole-winner{grid-column:1/-1;min-height:50px;animation:sv-winner-settle .72s cubic-bezier(.2,1.25,.3,1)}
.sharechip.sole-winner .claimvalue strong{font-size:19px}
.sharechip .winner-crown{display:inline-block;margin-right:4px;color:var(--gold);font-style:normal;text-shadow:0 0 8px rgba(255,194,75,.6)}
.crystallegend{display:flex;align-items:center;justify-content:center;gap:5px;flex-wrap:wrap;flex:none;margin-top:-1px}
.crystallegend .legendtitle{font:800 9px Manrope,system-ui;letter-spacing:.05em;color:var(--hint)}
.crystallegend .legendchip{padding:3px 5px;border-radius:7px;border:1px solid var(--line);
  font:700 9px Manrope,system-ui;color:var(--text);background:var(--chip)}
.crystallegend .legendchip b{font:700 10px Fredoka,system-ui}
.crystallegend .legendchip.azure{border-color:rgba(63,184,234,.5);color:#3FB8EA}
.crystallegend .legendchip.gold{border-color:rgba(255,194,75,.55);color:#C98A13}
.crystallegend .legendchip.prism{border-color:rgba(175,112,255,.55);color:#AF70FF}
.crystallegend em{width:100%;text-align:center;font:600 11px Manrope,system-ui;line-height:1.3;font-style:normal;color:var(--hint)}

/* ---------------------------------------------------------------- grid */
.gridwrap{position:relative;display:grid;margin:2px auto 0;width:388px;max-width:100%;flex:none;
  transition:filter .3s ease}
.gridwrap.blown{filter:saturate(.5) brightness(.85)}
/* per-cols geometry (design GEO map) */
.gridwrap[data-cols="4"]{grid-template-columns:repeat(4,1fr);gap:9px;--trad:15px;--ico:45px;--tnum:13px}
.gridwrap[data-cols="5"]{grid-template-columns:repeat(5,1fr);gap:8px;--trad:13px;--ico:39px;--tnum:11px}
.gridwrap[data-cols="6"]{grid-template-columns:repeat(6,1fr);gap:7px;--trad:11px;--ico:32px;--tnum:10px}

.tile{position:relative;aspect-ratio:1;cursor:pointer}
.tile .plate{position:absolute;inset:0;border-radius:var(--trad);display:flex;align-items:center;justify-content:center;
  overflow:hidden}
.tile .plate.hiddenp{background:var(--tile);border:3px solid var(--edge);box-shadow:0 4px 0 var(--tshadow);
  overflow:visible;transition:transform .12s ease}
.tile.tappable .plate.hiddenp:hover{transform:translateY(-2px)}
.tile.tappable .plate.hiddenp:active{transform:translateY(3px)}
.tile .inner-line{position:absolute;left:4px;right:4px;top:4px;bottom:6px;border-radius:calc(var(--trad) - 5px);
  border:2px solid rgba(255,255,255,.05)}
.tile .tnum{position:relative;font:700 var(--tnum) Manrope,system-ui;color:var(--hint);opacity:.45}
.tile .plate.pendingp{background:var(--tile);border:3px dashed var(--gold);
  box-shadow:0 0 0 0 rgba(255,194,75,.55),0 4px 0 var(--tshadow);animation:sv-pulse 1.3s ease-out infinite}
.tile .plate.pendingp .q{font:600 var(--ico) Fredoka,system-ui;color:var(--gold);line-height:1}
.tile .crystal.azure{--crystal-bg:#5BC9F2;--crystal-edge:#187FA8;--crystal-shadow:#0E5C7B;
  --gem-main:#0E4964;--gem-top:#1B6687;--gem-line:#8CE5FF;--gem-dark:#082D3E}
.tile .crystal.gold{--crystal-bg:#FFC24B;--crystal-edge:#B0741A;--crystal-shadow:#8A5A12;
  --gem-main:#4A3208;--gem-top:#6B4A0D;--gem-line:#D5A83E;--gem-dark:#2E1F04}
.tile .crystal.prism{--crystal-bg:#B77AFF;--crystal-edge:#7340B3;--crystal-shadow:#52277F;
  --gem-main:#3D1768;--gem-top:#60299A;--gem-line:#E2C3FF;--gem-dark:#260C44}
.tile .plate.safep.crystal{background:var(--crystal-bg);border:3px solid var(--crystal-edge);box-shadow:0 4px 0 var(--crystal-shadow)}
.tile .plate.bombp{background:var(--red);border:3px solid var(--red-edge);box-shadow:0 4px 0 var(--red-shadow);
  animation:sv-shake .5s cubic-bezier(.3,0,.4,1)}
.tile .band-top{position:absolute;left:0;right:0;top:0;height:34%;background:rgba(255,255,255,.22)}
.tile .band-bot{position:absolute;left:0;right:0;bottom:0;height:36%;background:rgba(176,116,26,.3)}
.tile .band-bot.red{background:rgba(168,30,20,.32)}
.tile .flashfill{position:absolute;inset:0;background:#FFE3B0;animation:sv-flash .32s ease-out forwards}
.tile .glyph{position:relative;width:var(--ico);height:var(--ico);filter:drop-shadow(0 3px 2px rgba(0,0,0,.28))}
.tile .bomb-glyph{width:calc(var(--ico) * 1.08);height:calc(var(--ico) * 1.08);filter:drop-shadow(0 3px 2px rgba(69,5,2,.35))}
.tile .crystal-factor{position:absolute;right:4px;bottom:2px;padding:1px 2px;border-radius:4px;
  background:rgba(8,15,25,.66);font:800 9px Fredoka,system-ui;color:#fff;letter-spacing:-.02em}
.tile .spark{transform-origin:41px 9px;animation:sv-spark .5s ease-in-out infinite}

/* flip */
.tile .flip-shadow{position:absolute;left:12%;right:12%;bottom:-5px;height:7px;border-radius:50%;
  background:rgba(0,0,0,.55);animation:sv-drop .56s cubic-bezier(.5,0,.5,1)}
.tile .persp{position:absolute;inset:0;perspective:460px;perspective-origin:50% 46%}
.tile .flip-inner{position:absolute;inset:0;transform-style:preserve-3d;-webkit-transform-style:preserve-3d;
  will-change:transform;animation:sv-turn .56s cubic-bezier(.5,0,.5,1) forwards}
.tile .face{position:absolute;inset:0;border-radius:var(--trad);display:flex;align-items:center;justify-content:center;
  overflow:hidden;backface-visibility:hidden;-webkit-backface-visibility:hidden}
.tile .face.front{background:var(--tile);border:3px solid var(--edge);box-shadow:0 4px 0 var(--tshadow)}
.tile .face.back{transform:rotateY(180deg)}
.tile .face.back.gold{background:var(--gold);border:3px solid var(--gold-edge);box-shadow:0 4px 0 var(--gold-shadow)}
.tile .face.back.crystal{background:var(--crystal-bg);border:3px solid var(--crystal-edge);box-shadow:0 4px 0 var(--crystal-shadow)}
.tile .face.back.red{background:var(--red);border:3px solid var(--red-edge);box-shadow:0 4px 0 var(--red-shadow)}
.tile .shadeA{position:absolute;inset:0;border-radius:var(--trad);background:#05080D;opacity:0;
  animation:sv-shadeA .56s cubic-bezier(.5,0,.5,1) forwards}
.tile .shadeB{position:absolute;inset:0;border-radius:var(--trad);background:#05080D;opacity:.74;
  animation:sv-shadeB .56s cubic-bezier(.5,0,.5,1) forwards}

/* pop (tiered landing punch) */
.tile .plate.popp{background:var(--gold);border:3px solid var(--gold-edge);box-shadow:0 4px 0 var(--gold-shadow)}
.tile .plate.popp.crystal{background:var(--crystal-bg);border-color:var(--crystal-edge);box-shadow:0 4px 0 var(--crystal-shadow)}
.tile .plate.popp.t0{animation:sv-pop .36s cubic-bezier(.2,1.5,.4,1)}
.tile .plate.popp.t1{box-shadow:0 4px 0 var(--gold-shadow),0 0 14px 2px rgba(255,194,75,.35);
  animation:sv-pop2 .48s cubic-bezier(.2,1.4,.35,1)}
.tile .plate.popp.t2{box-shadow:0 4px 0 var(--gold-shadow),0 0 26px 6px rgba(255,194,75,.55);
  animation:sv-pop3 .62s cubic-bezier(.2,1.4,.35,1)}
.tile .popring{position:absolute;left:50%;top:50%;width:100%;height:100%;border-radius:var(--trad);pointer-events:none}
.tile .popring.t0{border:3px solid rgba(255,216,138,.5);animation:sv-ring2 .5s cubic-bezier(.15,.7,.3,1) forwards}
.tile .popring.t1{border:4px solid rgba(255,216,138,.72);animation:sv-ring2 .68s cubic-bezier(.15,.7,.3,1) forwards}
.tile .popring.t2{border:5px solid rgba(255,216,138,.94);animation:sv-ring2 .86s cubic-bezier(.15,.7,.3,1) forwards}

/* floating gain + coin particles */
.gainwrap{position:absolute;left:0;right:0;top:-8px;text-align:center;pointer-events:none;z-index:6}
.gainwrap .gain{display:inline-block;font:700 12px Fredoka,system-ui;color:var(--gold-text);
  text-shadow:0 2px 0 rgba(0,0,0,.55);animation:sv-float 1.15s ease-out forwards}
.gainwrap .p{position:absolute;border-radius:50%;animation:sv-part var(--pd,0.9s) var(--pw,0s) ease-out forwards}

/* shockwave + shards (positioned from bomb tile by JS) */
.shockorigin{position:absolute;pointer-events:none;z-index:5;width:0;height:0}
.shockorigin .ring{position:absolute;left:0;top:0;width:64px;height:64px;margin:-32px 0 0 -32px;border-radius:50%}
.shockorigin .r1{border:9px solid var(--red);animation:sv-shock .78s cubic-bezier(.15,.7,.3,1) forwards}
.shockorigin .r2{border:6px solid var(--gold);animation:sv-shock .95s .1s cubic-bezier(.15,.7,.3,1) forwards}
.shockorigin .r3{border:3px solid rgba(255,255,255,.75);animation:sv-shock 1.1s .2s cubic-bezier(.15,.7,.3,1) forwards}
.shockorigin .shard{position:absolute;left:0;top:0;border-radius:2px;
  animation:sv-shard var(--sd) cubic-bezier(.15,.7,.3,1) forwards}

/* ---------------------------------------------------------------- ambiance vignette */
.amb{position:absolute;inset:0;z-index:30;pointer-events:none;transition:box-shadow .6s ease}
.amb.heart{animation:sv-heart var(--hb,2s) ease-in-out infinite}

/* ---------------------------------------------------------------- footer / turn bar */
.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)}
.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-yours span{color:var(--hint);font-weight:600}
.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:sv-dots 1.1s infinite}
.turnbar .dots i:nth-child(2){animation-delay:.18s}
.turnbar .dots i:nth-child(3){animation-delay:.36s}
.turnbar .tb-over{font:700 12px Manrope,system-ui}
.turnbar .tb-over.gold{color:var(--gold-text)}
.turnbar .tb-over.red{color:var(--red)}
.turnbar .tb-right{margin-left:auto;font:700 11px Manrope,system-ui;color:var(--hint)}
.btnrow{display:flex;gap:9px}
.btnrow .gold-slab{flex:1}

/* ---------------------------------------------------------------- sheets & overlays */
.sheetback{position:absolute;inset:0;z-index:60;background:rgba(6,10,16,.74);display:none;
  flex-direction:column;justify-content:flex-end;animation:sv-fade .18s ease-out}
.sheetback.open{display:flex}
.sheet{background:var(--panel);border-radius:22px 22px 0 0;padding:18px 18px 20px;
  /* `both`: sv-rise starts fully below the viewport, so without a fill mode a
     delayed/coalesced animation start can leave the sheet parked off-screen
     behind its scrim with no way to dismiss it. Same fix as plinko/nerve. */
  animation:sv-rise .28s cubic-bezier(.2,1.1,.3,1) both;max-height:88%;overflow-y:auto}
.sheet.gold-top{border-top:3px solid var(--gold)}

/* veto sheet */
.vtick{height:3px;border-radius:2px;background:var(--gold);width:100%;margin-bottom:14px}
.vhead{display:flex;align-items:center;gap:11px}
.vtile{width:46px;height:46px;flex:none;border-radius:14px;background:var(--tile);border:3px dashed var(--gold);
  display:flex;align-items:center;justify-content:center;font:700 16px Fredoka,system-ui;color:var(--gold-text);
  animation:sv-bob 1.8s ease-in-out infinite}
.vtitle{font:800 15px Manrope,system-ui;color:var(--text);letter-spacing:-.01em}
.vsub{font:500 11.5px Manrope,system-ui;color:var(--hint)}
.vchips{display:flex;gap:6px;margin:14px 0 4px;flex-wrap:wrap}
.vchip{flex:1;min-width:92px;display:flex;align-items:center;gap:6px;padding:8px 9px;border-radius:12px}
.vchip.block{background:rgba(255,90,78,.14);border:1px solid rgba(255,90,78,.3)}
.vchip.allow{background:rgba(255,194,75,.14);border:1px solid rgba(255,194,75,.3)}
.vchip.wait{background:var(--chip);border:1px dashed var(--edge)}
/* AWAY: alive, still counted in the threshold, but not on the network to
   answer. Distinct from 'wait' (present, thinking) so the proposer can tell a
   pending vote from one that only silence can resolve. */
.vchip.away{background:var(--chip);border:1px dashed var(--edge);opacity:.55}
.vchip .mini{width:20px;height:20px;border-radius:7px;font:800 9px Manrope,system-ui;
  display:flex;align-items:center;justify-content:center;flex:none}
.vchip.block .mini{background:var(--red);color:var(--red-ink)}
.vchip.allow .mini{background:var(--gold);color:var(--gold-ink)}
.vchip.wait .mini{background:var(--edge);color:var(--hint)}
.vchip.away .mini{background:var(--edge);color:var(--hint)}
.vchip .vlbl{font:700 10.5px Manrope,system-ui;color:var(--text)}
.vchip.wait .vlbl{color:var(--hint)}
.vchip.away .vlbl{color:var(--hint);font-style:italic}
.vhint{font:600 11px Manrope,system-ui;color:var(--hint);margin:10px 0 12px}
.vbtns{display:flex;gap:9px}
.vallow{flex:1;text-align:center;padding:14px 0;border-radius:15px;background:var(--gold);
  border:3px solid var(--gold-edge);box-shadow:0 4px 0 var(--gold-shadow);
  font:600 15px Fredoka,system-ui;color:var(--gold-ink);cursor:pointer}
.vblock{flex:1;text-align:center;padding:14px 0;border-radius:15px;background:transparent;
  border:3px solid var(--red);box-shadow:0 4px 0 rgba(255,90,78,.28);
  font:600 15px Fredoka,system-ui;color:var(--red);cursor:pointer}

/* bomb overlay */
.bombover{position:absolute;inset:0;z-index:55;pointer-events:none;overflow:hidden;display:none}
.bombover.open{display:block}
.bombover .whiteout{position:absolute;inset:0;background:#FFF6E2;animation:sv-whiteout .42s ease-out forwards}
.bombover .redveil{position:absolute;inset:0;box-shadow:inset 0 0 100px 16px rgba(255,58,44,.6);
  background:rgba(120,14,8,.22);animation:sv-fade .35s .1s ease-out backwards}
.bombover .burst{position:absolute;left:50%;top:44%;width:520px;height:520px;transform:translate(-50%,-50%);
  animation:sv-burst .9s cubic-bezier(.1,.7,.3,1) forwards}
.bombover .bannerwrap{position:absolute;left:0;right:0;top:44%;transform:translateY(-50%);text-align:center}
.bombover .banner{display:inline-block;padding:13px 28px;border-radius:18px;background:var(--red);
  border:3px solid var(--red-shadow);box-shadow:0 7px 0 var(--red-shadow);
  animation:sv-slam .72s cubic-bezier(.2,1.1,.3,1) forwards}
.bombover .banner .big{font:700 32px Fredoka,system-ui;color:var(--red-ink);letter-spacing:-.01em;line-height:1}
.bombover .banner .sub{font:800 11px Manrope,system-ui;color:rgba(42,11,8,.72);letter-spacing:.06em;margin-top:3px}

/* banked gold flash */
.goldflash{position:absolute;inset:0;z-index:54;pointer-events:none;background:rgba(255,194,75,.5);
  animation:sv-goldflash .6s ease-out forwards}

/* receipt sheet */
.rhead{display:flex;align-items:center;gap:8px;margin-bottom:14px}
.rtitle{font:800 16px Manrope,system-ui;color:var(--text);letter-spacing:-.01em}
.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);font-weight:700}
.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 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}

/* free-mode outcome card in receipt */
.cardwrap{margin-top:12px;border-radius:14px;overflow:hidden;border:1px solid var(--line);background:var(--navy)}
.cardwrap canvas{display:block;width:100%;height:auto}
.cardbtns{display:flex;gap:8px;margin-top:10px;flex-wrap:wrap}
.cardbtns .cb{flex:1;min-width:100px;text-align:center;padding:11px 0;border-radius:13px;background:var(--chip);
  border:1px solid var(--line);font:700 12px Manrope,system-ui;color:var(--text);cursor:pointer;text-decoration:none}
.cardbtns .cb.gold{background:var(--gold);border:1px solid var(--gold-edge);color:var(--gold-ink)}

/* ---------------------------------------------------------------- lobby */
.roomcode{display:flex;align-items:center;gap:10px;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)}
.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;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.prow .pmeta{font:600 10.5px Manrope,system-ui;color:var(--hint);text-align:right}
.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 .sbtn:active{transform:translateY(2px);box-shadow:0 1px 0 var(--tshadow)}
.stepper .sval{width:92px;min-width:74px;padding:6px 8px;text-align:center;
  font:600 18px Fredoka,system-ui;color:var(--gold-text);background:var(--chip);
  border:1px solid var(--line);border-radius:11px;outline:none}
.stepper .sval:focus{border-color:var(--gold);box-shadow:0 0 0 2px rgba(255,194,75,.16)}
.stepper .sval:disabled{opacity:.85;color:var(--gold-text);-webkit-text-fill-color:var(--gold-text)}
.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}
.lb-list{display:flex;flex-direction:column;gap:5px}
.lb-row{display:flex;align-items:center;gap:8px;padding:7px 10px;border-radius:11px;background:var(--chip);
  border:1px solid var(--line);font:600 11.5px Manrope,system-ui;color:var(--hint)}
.lb-row .names{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--text);font-weight:700}
.lb-row .m{color:var(--gold-text);font:700 12px Fredoka,system-ui}
.hint-line{font:500 11px Manrope,system-ui;color:var(--hint);text-align:center}

/* ---------------------------------------------------------------- toasts */
.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:sv-fade .2s ease-out;
  text-align:center}
.toast.err{border-color:rgba(255,90,78,.5)}

/* ---------------------------------------------------------------- verifier page */
.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)}
.vf-grid{display:grid;gap:5px;width:100%;max-width:300px;margin:0 auto}
.vf-cell{aspect-ratio:1;border-radius:8px;background:var(--tile);border:2px solid var(--edge);
  display:flex;flex-direction:column;align-items:center;justify-content:center;font:700 10px Manrope,system-ui;color:var(--hint)}
.vf-cell.bomb{background:var(--red);border-color:var(--red-edge);color:var(--red-ink);font-weight:800}
.vf-cell.crystal.azure{background:#5BC9F2;border-color:#187FA8;color:#08344A}
.vf-cell.crystal.gold{background:#FFC24B;border-color:#B0741A;color:#3D2A06}
.vf-cell.crystal.prism{background:#B77AFF;border-color:#7340B3;color:#260C44}
.vf-cell.crystal b{font:700 10px Fredoka,system-ui}
.vf-cell.claimed{outline:2px dashed var(--gold);outline-offset:1px}
.vf-form{display:flex;flex-direction:column;gap:7px}

@media (max-width:359px){
  .hero .hmult{font-size:48px}
  .roomcode .code{font-size:36px}
}

/* ---------------------------------------------------------------- signature: crystalline cyber vault
   Competitive Tile Reveal uses cold cobalt glass, cyan circuitry, violet
   facets, and tighter corners. Gold stays reserved for money/reward actions. */
:root,[data-theme="dark"]{
  --bg:#07101E;--header:#0A1730;--panel:#0C1B31;--tile:#142B46;--edge:#2B6682;
  --tshadow:#030811;--text:#EAFBFF;--hint:#79A7BA;--line:rgba(92,219,255,.13);--brand-title:#DFFBFF;
  --chip:#0D223A;--blue:#5DE4FF;--navy:#061425;--navy-edge:#246A88;
}
[data-theme="light"]{
  /* Ambient backdrop, matching plinko/nerve: a cool neutral page that the
     cyan/violet glows sit on. (An earlier pass made this warm ivory with a
     ruled grid and a margin rule — it read as literal notebook paper, which
     is not the family's language.) */
  --bg:#C2D9EE;--header:#E5F4F8;--panel:#F8FDFF;--tile:#CDE5ED;--edge:#65A3B8;
  --tshadow:#8DB4C0;--text:#071B29;--hint:#2F4B56;--line:rgba(4,74,102,.13);--brand-title:#0B4F63;
  /* #007FA6 was 4.06:1 on the old page tone — below AA, and it stays below
     under the ambient glow. #006B85 clears AA even at the glow's darkest. */
  --chip:#E1F1F5;--blue:#006B85;
}
body{background:
  radial-gradient(circle at 18% 0,rgba(66,218,255,.17),transparent 32%),
  radial-gradient(circle at 82% 100%,rgba(157,89,255,.17),transparent 36%),#030815}
/* (the light-theme blue surround was superseded by the plain white
   surround appended at the end of this file) */
/* Ambient backdrop — three stacked layers, ONE compositor-only animation:
     .app            base colour + a static circuit lattice
     .app::before    art/bg.jpg nebula texture, low opacity, faded out downward
     .app::after     an oversized field of soft glows that drifts over 76 s
   Both pseudo-elements sit at z-index:-1 inside .app's own stacking context, so they paint
   above .app's background colour and below every screen, overlay, sheet and toast. */
.app{z-index:0;background-color:var(--bg);background-image:var(--paper-grain);
  background-size:150px 150px;
  border-inline:1px solid rgba(82,220,255,.18)}
.app::before,.app::after{content:'';position:absolute;z-index:-1;pointer-events:none}
/* Contrast: in light theme the cyan/violet glows below locally darken the composited
   backdrop enough to pull --hint under 4.5:1 AA over part of the column (measured
   floor 3.46:1 against a 4.82:1 flat baseline). Fixed at the token: light --hint
   darkened #4A7482 -> #3D5F6B, which only raises contrast everywhere else it's used
   (--bg/--panel/--chip/--tile are all lighter than --hint), so the backdrop layers
   below are untouched. */
.app::before{inset:0;background:url(art/bg.jpg) center/cover no-repeat;opacity:.22;
  -webkit-mask-image:linear-gradient(180deg,#000,rgba(0,0,0,.4) 58%,rgba(0,0,0,.62));
  mask-image:linear-gradient(180deg,#000,rgba(0,0,0,.4) 58%,rgba(0,0,0,.62))}
/* Circular glows (closest-side circle, like plinko's) rather than wide ellipses:
   they read as distinct soft orbs drifting behind the column instead of one
   flat wash across the page. */
.app::after{inset:-30% -40%;background-repeat:no-repeat;background:
  radial-gradient(closest-side circle,rgba(64,214,255,.30),rgba(64,214,255,0)) 22% 16%/46% 46%,
  radial-gradient(closest-side circle,rgba(150,92,255,.26),rgba(150,92,255,0)) 82% 60%/50% 50%,
  radial-gradient(closest-side circle,rgba(46,208,232,.20),rgba(46,208,232,0)) 46% 92%/38% 38%;
  animation:sv-ambient 76s ease-in-out infinite alternate;will-change:transform}
/* Light theme: same drift, a fraction of the strength — visible breathing that
   never greys the white cards sitting on top of it. */
.app[data-theme="light"]::before{opacity:.13}
.app[data-theme="light"]::after{background:
  radial-gradient(closest-side circle,rgba(38,146,205,.30),rgba(38,146,205,0)) 22% 16%/46% 46%,
  radial-gradient(closest-side circle,rgba(126,96,196,.24),rgba(126,96,196,0)) 82% 60%/50% 50%,
  radial-gradient(closest-side circle,rgba(30,168,196,.22),rgba(30,168,196,0)) 46% 92%/38% 38%;
  background-repeat:no-repeat}
@keyframes sv-ambient{
  0%{transform:translate3d(-2%,-1.5%,0) rotate(0deg) scale(1)}
  50%{transform:translate3d(1.5%,2.5%,0) rotate(3.5deg) scale(1.07)}
  100%{transform:translate3d(3%,-2%,0) rotate(-2.5deg) scale(1.03)}
}
/* NOTE: data-theme lives ON .app, so light overrides must be COMPOUNDED
   (.app[data-theme="light"]) — a descendant selector never matches here. */
.app[data-theme="light"]::before{opacity:.11;filter:invert(1) saturate(.35) brightness(1.08)}
.app[data-theme="light"]::after{background:
  radial-gradient(38% 26% at 26% 20%,rgba(0,176,224,.19),transparent 70%),
  radial-gradient(34% 24% at 78% 56%,rgba(140,92,255,.14),transparent 72%),
  radial-gradient(30% 21% at 44% 88%,rgba(0,196,214,.12),transparent 74%)}
.app[data-theme="light"] .gem-hero{filter:drop-shadow(0 6px 12px rgba(6,60,80,.3))}
/* The cyber-vault header gradient is hard-coded dark; in light theme that put dark --text on a
   dark bar (the in-game title was unreadable). Light gets the same gradient, inverted. */
.app[data-theme="light"] .gheader{background:linear-gradient(90deg,#E4F3F8,#D3E9F2 52%,#E4F3F8);
  border-bottom-color:rgba(4,74,102,.22);box-shadow:0 2px 12px rgba(11,79,99,.07)}
@media (prefers-reduced-motion:reduce){.app::after{animation:none}}

/* Travelling highlight: a soft diagonal band of light that crosses the column
   about every 19s. Its own element so it layers over the drifting orbs; pure
   transform+opacity so it stays on the compositor. */
.app>.sv-sweep{position:absolute;inset:-40% -60%;z-index:-1;pointer-events:none;
  background:linear-gradient(104deg,transparent 38%,rgba(255,255,255,.16) 47%,
    rgba(190,232,255,.24) 51%,rgba(255,255,255,.16) 55%,transparent 64%);
  /* BOOMERANG. This ran -38% -> +38% linear and then snapped back to -38%,
     so the light sweep visibly teleported across the page once a cycle.
     `alternate` plays it back the other way instead, and ease-in-out
     eases the turn so the reversal itself is not a second hard edge. */
  animation:sv-sweep 19s ease-in-out infinite alternate;will-change:transform}
.app[data-theme="light"]>.sv-sweep{background:linear-gradient(104deg,transparent 38%,
  rgba(255,255,255,.42) 47%,rgba(255,255,255,.62) 51%,rgba(255,255,255,.42) 55%,transparent 64%)}
@keyframes sv-sweep{from{transform:translate3d(-38%,0,0)}to{transform:translate3d(38%,0,0)}}
@media (prefers-reduced-motion:reduce){.app>.sv-sweep{animation:none;opacity:.35}}

.gheader{background:linear-gradient(90deg,#071426,#101A3B 52%,#08172D);
  border-bottom-color:rgba(93,228,255,.28);box-shadow:0 2px 14px rgba(51,177,225,.08)}
.brandhead .btitle,.modecard .mtitle,.gheader .htitle b,.hero .hmult,.roomcode .code{
  font-family:"Chakra Petch",Manrope,sans-serif;font-weight:700;letter-spacing:.015em}
/* No decorative glyph box before the title — it read as two dead squares. The title carries
   the header on its own, so it gets a touch more tracking and a little breathing room. */
.brandhead .btitle{font-size:21px;text-transform:uppercase;color:var(--brand-title);letter-spacing:.045em}
.modecard,.hero{border-radius:6px 17px;background:
  linear-gradient(135deg,rgba(88,226,255,.12),transparent 31%),
  linear-gradient(315deg,rgba(169,101,255,.11),transparent 37%),var(--navy);
  border-color:#287492;box-shadow:0 5px 0 #020711,0 0 22px rgba(69,205,255,.08),inset 0 0 0 1px rgba(161,103,255,.1)}
.modecard .glow,.hero .glow{background:
  radial-gradient(80% 80% at 18% 5%,rgba(80,224,255,.17),transparent 65%),
  radial-gradient(80% 85% at 92% 100%,rgba(174,102,255,.15),transparent 66%)}
.modecard .mtitle,.hero .hmult{color:#71E8FF;text-shadow:0 3px 0 #063448,0 0 22px rgba(91,226,255,.24)}
.gold-slab{border-radius:7px;background:linear-gradient(105deg,#FFD36F,#FFB735);
  box-shadow:0 5px 0 var(--gold-shadow),0 0 15px rgba(255,194,75,.14)}
.field,.lsection,.prow,.turnbar,.fairstrip,.sharechip,.seedbox{border-radius:7px}
.tile .plate.hiddenp,.tile .face.front{background:
  linear-gradient(135deg,rgba(103,232,255,.15),transparent 36%),
  linear-gradient(315deg,rgba(175,104,255,.13),transparent 44%),
  linear-gradient(180deg,#193954,#0E2039);border-color:#2B7190;box-shadow:0 4px 0 #030A13}
.tile .inner-line{border-color:rgba(104,225,255,.2)}
.gridwrap[data-cols="4"]{--trad:6px}.gridwrap[data-cols="5"]{--trad:5px}.gridwrap[data-cols="6"]{--trad:4px}
.sharechip{background:linear-gradient(105deg,rgba(73,215,255,.07),var(--chip) 55%);
  border-color:rgba(84,213,255,.2)}
.sharechip.you{box-shadow:inset 3px 0 0 #67E8FF,0 0 12px rgba(78,216,255,.08)}
.turnbar.yours{background:linear-gradient(90deg,rgba(82,220,255,.12),rgba(163,96,255,.08));
  border-color:rgba(84,220,255,.38)}

@media (prefers-reduced-motion:reduce){
  .sharechip.you.alive .shareclaim,.sharechip.sole-winner{animation:none}
  .gold-slab .sheen{animation: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 rounds become a settlement-first screen; the proof stays opt-in. */
#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:17px 13px 13px;border:1px solid rgba(103,232,255,.32);
  border-radius:6px 18px;background:linear-gradient(145deg,rgba(64,218,255,.1),transparent 35%),linear-gradient(180deg,#10243A,var(--navy));
  box-shadow:0 5px 0 var(--tshadow),inset 0 0 38px rgba(104,92,255,.055);animation:sv-fade .3s ease}
.end-summary::before{content:'';position:absolute;inset:6px;border:1px solid rgba(103,232,255,.09);border-radius:4px 13px;pointer-events:none}
.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:#71E8FF}
.end-title{text-align:center;margin-top:5px;font:700 25px Fredoka,system-ui;color:#71E8FF;line-height:1.08;text-shadow:0 0 18px rgba(91,226,255,.25)}
.end-detail{text-align:center;margin-top:4px;font:600 10px Manrope,system-ui;color:#8297AE}
.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 rgba(103,232,255,.14);border-radius:4px 10px;background:rgba(52,207,255,.055);text-align:center}
.end-totals small,.end-cell small{display:block;font:800 9px Manrope,system-ui;letter-spacing:.03em;line-height:1.2;color:#8297AE;white-space:normal}
.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:#71E8FF}.end-ledger-title span{font:600 11px Manrope,system-ui;color:#8297AE}
.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 rgba(103,232,255,.12);border-radius:4px 10px;background:#162337}
.end-player.winner{background:linear-gradient(95deg,rgba(77,224,255,.11),#162337 42%)}
.end-player.you{border-color:rgba(103,232,255,.48);box-shadow:inset 3px 0 0 #71E8FF}
.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 rgba(103,232,255,.3);border-radius:4px 8px;font:700 10px Fredoka,system-ui;color:#71E8FF}
.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:var(--red)}.end-summary .flat{color:var(--hint)}
.end-note,.end-balance{text-align:center;margin:8px 3px 0;font:600 11px Manrope,system-ui;line-height:1.35;color:#8297AE}
.end-receipt{width:100%;margin-top:9px;padding:9px;border:1px solid rgba(103,232,255,.3);border-radius:4px 10px;background:rgba(52,207,255,.07);font:800 11px Manrope,system-ui;letter-spacing:.02em;color:#71E8FF}
.end-empty{padding:16px;text-align:center;color:var(--hint);font-size:11px}
@media(max-width:370px){.end-summary{padding-inline:9px}.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}}

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

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

/* More sub-44px targets found by the audit. Same idiom as the block above:
   grow ONLY the hit area, leave every visible pixel untouched.
   · .rdone            — the receipt's "Done" close button, 30x17px. It is the
                         only way to dismiss the provably-fair receipt.
   · .stepper .sbtn    — the -/+ that set every room's buy-in, 34x34px.
   · .blue-link        — "Copy seed" / "Open verifier", ~15px tall: the
                         controls for the fairness flow itself.
   Bleed is bounded so no control can steal a neighbour's tap: the stepper's
   horizontal gap to #stake-val is 8px (so +/-4px is the maximum), and the two
   blue links sit 12px apart. .blue-link uses 40px rather than 44px because a
   44px band centred on a 15px line overruns the seedbox's 12px padding. */
.rdone{position:relative}
.rdone::after{content:"";position:absolute;top:50%;left:-12px;right:-12px;
  transform:translateY(-50%);height:44px}
.stepper .sbtn{position:relative}
.stepper .sbtn::after{content:"";position:absolute;top:50%;left:-4px;right:-4px;
  transform:translateY(-50%);height:44px}
.blue-link{position:relative}
.blue-link::after{content:"";position:absolute;top:50%;left:-4px;right:-4px;
  transform:translateY(-50%);height:40px}

/* A stepper button at its bound: still focusable for the toast, visibly inert. */
.sbtn[aria-disabled="true"]{opacity:.45;cursor:default}

/* ═══ HOME SCREEN: the create button gets the column's own beat (2026-09-11) ═══
   #home-entry is a plain block <div> with no rule of its own, so its five
   children are spaced only by their own inline margin-top:8px — and the
   "Create a vault" slab has none. Measured at 375x812: its top border sat
   FLUSH on the TEST MODE panel (0px), the one seam on the screen with no gap
   at all, while every other block ran on the column's 8/9px beat.

   Under it the "OR JOIN A CREW" label does carry margin-top:8px, but
   .gold-slab paints a 5px hard drop shadow OUTSIDE its box (styles.css
   .gold-slab box-shadow) and :active pushes it 3px further down, so only ~3px
   of that 8px was ever visible. margin-bottom:5px here adds to the label's own
   8px: 13px of box, 5px of it under the shadow, 8px apparent — equal to the
   gap above, which is what "proportional to the other gaps" means here.

   Deliberately two properties on one selector rather than making #home-entry a
   flex column: the siblings' 8px margins are INLINE, so a container `gap`
   would stack on top of them and every one would need an HTML edit — in two
   files (webapp/index.html and webapp/updated.html carry this block
   byte-identically, and updated-ui.test.js pins their id parity). A rule keyed
   on the id fixes both from one place and touches no markup. */
#home-entry > #create-btn{margin-top:8px;margin-bottom:5px}

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