/* Jackpot Heaven player app — production design system. Every value is a token; no magic numbers in
   component rules. Dark-mode-native. Reference bar: Stake / Thrill / Rollbit. */

:root {
  /* brand — Jackpot Heaven: royal gold + royal blue + crimson spark */
  --gold-bright: #FCE08A;
  --gold-deep: #C8901E;
  --royal: #2E5BD0;
  --royal-deep: #10286B;
  --crimson: #E11D2A;
  /* legacy tokens repointed so every existing var(--cyan)/var(--violet) recolours app-wide */
  --violet: #2E5BD0;
  --cyan: #F4C13C;
  --grad: linear-gradient(135deg, #FCE08A, #F3B528 52%, #DC9618);
  --grad-soft: linear-gradient(135deg, rgba(244, 193, 60, .16), rgba(46, 91, 208, .16));
  /* surfaces */
  --base: #0A0A0F;
  --surface: #15151F;
  --surface-2: #1D1D2B;
  --surface-3: #262638;
  --border: #26263A;
  --border-2: #32324A;
  /* text */
  --text: #E8E8F0;
  --muted: #9090A8;
  --dim: #6B6B85;
  /* status */
  --success: #10B981;
  --success-soft: rgba(16, 185, 129, .14);
  --danger: #EF4444;
  --danger-soft: rgba(239, 68, 68, .14);
  --gold: #F4C13C;
  --gold-soft: rgba(244, 193, 60, .12);
  /* geometry */
  --r-card: 16px;
  --r-btn: 12px;
  --r-sheet: 24px;
  --r-pill: 999px;
  /* spacing */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px;
  /* motion */
  --t-fast: 120ms;
  --t-base: 200ms;
  --t-slow: 400ms;
  --ease: cubic-bezier(.2, .8, .2, 1);
  /* type */
  --font: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: ui-monospace, 'SF Mono', SFMono-Regular, Menlo, monospace;
  /* layout */
  --topbar-h: 56px;
  --xpbar-h: 30px;
  --bottomnav-h: 62px;
}

/* ---------- reset / base ---------- */
* { box-sizing: border-box; margin: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--base);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
  min-height: 100dvh;
}
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
[hidden] { display: none !important; }
input, select { font: inherit; }
a { color: var(--cyan); text-decoration: none; }
svg.ic { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.num { font-variant-numeric: tabular-nums; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; border-radius: 4px; }
::selection { background: rgba(46, 91, 208, .45); }
.sr-only { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); overflow: hidden; }

/* ---------- app shell ---------- */
#topbar {
  position: sticky; top: 0; z-index: 40;
  height: var(--topbar-h);
  display: flex; align-items: center; gap: var(--s3);
  padding: 0 var(--s4);
  background: rgba(10, 10, 15, .86);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: var(--s2); font-weight: 800; font-size: 19px; letter-spacing: -.02em; }
.brand .bolt { width: 22px; height: 22px; }
.brand .word { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; white-space: nowrap; }
.brand .net {
  font-size: 10px; font-weight: 700; letter-spacing: .06em; color: var(--gold);
  border: 1px solid rgba(245, 179, 1, .35); background: var(--gold-soft);
  padding: 1px 7px; border-radius: var(--r-pill); margin-left: var(--s1); text-transform: uppercase;
}
#topbar .spacer { flex: 1; }

.balance-chip {
  display: flex; align-items: center; gap: var(--s2);
  background: var(--surface); border: 1px solid var(--border-2);
  border-radius: var(--r-pill); padding: 7px var(--s3) 7px var(--s3);
  font-weight: 700; font-size: 15px;
  transition: border-color var(--t-base) var(--ease);
}
.balance-chip .coin { width: 17px; height: 17px; }
.balance-chip.flash-up { animation: flashUp var(--t-slow) var(--ease); }
.balance-chip.flash-down { animation: flashDown var(--t-slow) var(--ease); }
@keyframes flashUp { 30% { border-color: var(--success); box-shadow: 0 0 14px rgba(16, 185, 129, .35); } }
@keyframes flashDown { 30% { border-color: var(--danger); } }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s2);
  border-radius: var(--r-btn); padding: 10px var(--s4);
  font-weight: 700; font-size: 14px; line-height: 1.2;
  transition: transform var(--t-fast) var(--ease), filter var(--t-fast) var(--ease), background var(--t-base) var(--ease), box-shadow var(--t-base) var(--ease);
  user-select: none; -webkit-user-select: none; touch-action: manipulation;
}
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--grad); color: #07070C; box-shadow: 0 4px 18px rgba(46, 91, 208, .35); }
.btn-primary:hover:not(:disabled) { filter: brightness(1.1); }
.btn-ghost { background: var(--surface-2); border: 1px solid var(--border-2); color: var(--text); }
.btn-ghost:hover:not(:disabled) { background: var(--surface-3); }
.btn-danger { background: var(--danger-soft); border: 1px solid rgba(239, 68, 68, .4); color: var(--danger); }
.btn-cash { background: linear-gradient(135deg, #10B981, #34D399); color: #06251B; box-shadow: 0 4px 18px rgba(16, 185, 129, .35); }
.btn-cash:hover:not(:disabled) { filter: brightness(1.08); }
.btn-lg { width: 100%; padding: 14px var(--s4); font-size: 16px; border-radius: var(--r-btn); }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: var(--r-btn);
  color: var(--muted); background: transparent;
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.icon-btn:active { transform: scale(.93); }

/* XP strip */
#xpbar {
  position: sticky; top: var(--topbar-h); z-index: 39;
  height: var(--xpbar-h);
  display: flex; align-items: center; gap: var(--s3);
  padding: 0 var(--s4);
  background: var(--base);
  border-bottom: 1px solid var(--border);
  font-size: 12px; color: var(--muted);
}
.tier-badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-weight: 700; font-size: 11px; color: var(--tier-color, var(--muted));
  text-transform: uppercase; letter-spacing: .05em; white-space: nowrap;
}
.tier-badge::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--tier-color, var(--muted)); box-shadow: 0 0 8px var(--tier-color, transparent); }
.xp-track { flex: 1; height: 5px; border-radius: var(--r-pill); background: var(--surface-2); overflow: hidden; }
.xp-fill { height: 100%; width: 0%; background: var(--grad); border-radius: var(--r-pill); transition: width .6s var(--ease); }

/* desktop nav pills */
#navpills {
  display: flex; gap: var(--s1); padding: var(--s3) var(--s4) 0;
  max-width: 1140px; margin: 0 auto; width: 100%;
}
#navpills button, #bottomnav button {
  display: flex; align-items: center; gap: 7px;
  color: var(--muted); font-weight: 600; font-size: 14px;
  padding: 9px 14px; border-radius: var(--r-btn);
  transition: color var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
  position: relative;
}
#navpills button:hover { color: var(--text); background: var(--surface); }
#navpills button.active { color: var(--text); background: var(--surface-2); }
#navpills button.active::after {
  content: ''; position: absolute; left: 14px; right: 14px; bottom: 3px; height: 2px;
  border-radius: 2px; background: var(--grad);
}

/* bottom nav (mobile) */
#bottomnav {
  display: none;
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  height: calc(var(--bottomnav-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: rgba(13, 13, 20, .92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--border);
}
#bottomnav { justify-content: space-around; align-items: stretch; }
#bottomnav button {
  flex-direction: column; gap: 3px; flex: 1;
  font-size: 10px; font-weight: 600; padding: 8px 0 6px; border-radius: 0;
  justify-content: center;
}
#bottomnav button svg.ic { width: 22px; height: 22px; }
#bottomnav button.active { color: var(--text); }
#bottomnav button.active::before {
  content: ''; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 26px; height: 3px; border-radius: 0 0 3px 3px; background: var(--grad);
  box-shadow: 0 2px 10px rgba(46, 91, 208, .6);
}

/* main */
main {
  max-width: 1140px; margin: 0 auto; width: 100%;
  padding: var(--s4) var(--s4) calc(var(--s6) * 2);
}
@media (max-width: 768px) {
  #navpills { display: none; }
  #bottomnav { display: flex; }
  main { padding-bottom: calc(var(--bottomnav-h) + var(--s6) + env(safe-area-inset-bottom)); }
  .balance-chip { font-size: 14px; padding: 6px 10px; }
  .brand { font-size: 17px; gap: 6px; }
  .brand .bolt { width: 20px; height: 20px; }
  .brand .net { display: none; }
}
/* narrowest phones — keep the longer "Jackpot Heaven" wordmark on one line */
@media (max-width: 420px) {
  .brand { font-size: 15.5px; }
  .wallet-label { display: none; }
  #walletBtn { padding: 10px; }
}

/* ---------- cards / layout ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  padding: var(--s5);
}
.card h2 { font-size: 15px; font-weight: 700; margin-bottom: var(--s4); display: flex; align-items: center; gap: var(--s2); }
.card h2 .sub { font-size: 12px; color: var(--muted); font-weight: 500; margin-left: auto; }
.game-layout { display: grid; grid-template-columns: 340px 1fr; gap: var(--s4); align-items: start; }
/* Desktop: pin the bet controls while the (often taller) stage scrolls, and lift the action button
   to sit right under the stake field (stake → Bet → extras) — players never hunt for "Bet" below
   stats/options. :has() catches games whose button lives in a wrapper row; older browsers keep
   today's order. */
@media (min-width: 881px) {
  .game-layout > .controls { position: sticky; top: calc(var(--topbar-h) + var(--xpbar-h) + var(--s4)); }
  .game-layout .controls > .field:first-of-type { order: -2; }
  .game-layout .controls > .btn-lg,
  .game-layout .controls > :has(> .btn-lg) { order: -1; }
}
@media (max-width: 880px) {
  .game-layout { grid-template-columns: 1fr; padding-bottom: var(--s4); }
  .game-layout .stage { order: -1; }
  /* Phone: hoist the primary action to the TOP of the controls card so it sits directly under the
     game stage — no scrolling past stake/options/stats to play. :has() also catches games whose
     button lives in a wrapper row (scratch, slots); older browsers just keep today's order. */
  .game-layout .controls > .btn-lg,
  .game-layout .controls > :has(> .btn-lg) { order: -1; }
  /* Thumb-sized tap targets */
  .game-layout .controls .btn-lg { min-height: 52px; font-size: 17px; }
  .chips button { padding: 11px 0; font-size: 13px; }
  /* 16px+ inputs stop iOS Safari from auto-zooming the page on focus */
  .input-wrap input, .input-wrap select { font-size: 16px; padding: 13px var(--s3); }
}

/* live-bets rail — the 3rd pane, shown only on wide screens (see min-width:1200 rule) */
.game-rail { display: none; flex-direction: column; padding: 0; overflow: hidden; align-self: start; max-height: 74vh; }
.game-rail .rail-head { padding: 12px 14px; border-bottom: 1px solid var(--border); flex: none; }
.rail-live { display: inline-flex; align-items: center; gap: 7px; font-size: 11px; font-weight: 800; letter-spacing: .08em; }
.rail-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--success); box-shadow: 0 0 8px var(--success); animation: livePulse 1.4s infinite; }
.rail-list { overflow-y: auto; flex: 1; padding: 6px; display: flex; flex-direction: column; gap: 2px; scrollbar-width: thin; }
.rail-list::-webkit-scrollbar { width: 6px; } .rail-list::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 6px; }
.rail-row { display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto; gap: 0 8px; padding: 6px 10px; border-radius: 8px; }
.rail-row:nth-child(odd) { background: rgba(255, 255, 255, .025); }
.rail-user { grid-area: 1 / 1; color: var(--text); font-weight: 600; font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rail-game { grid-area: 2 / 1; color: var(--muted); font-size: 10px; letter-spacing: .02em; }
.rail-x { grid-area: 1 / 2 / 3 / 3; align-self: center; font-weight: 800; font-size: 13px; font-variant-numeric: tabular-nums; }
.rail-x.win { color: var(--success); } .rail-x.lose { color: var(--dim); }
.rail-empty { padding: 22px 12px; text-align: center; color: var(--dim); font-size: 12px; }
.stack { display: grid; gap: var(--s4); }

/* trust strip on each game */
.trust {
  display: flex; align-items: center; gap: var(--s3);
  font-size: 12px; color: var(--muted);
  padding-top: var(--s3); margin-top: var(--s4);
  border-top: 1px solid var(--border);
}
.trust svg.ic { width: 15px; height: 15px; color: var(--success); }
.trust .rtp { margin-left: auto; }

/* ---------- inputs ---------- */
.field { display: grid; gap: 6px; }
.field label { font-size: 11px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.input-wrap { position: relative; display: flex; align-items: center; }
.input-wrap input, .input-wrap select {
  width: 100%; background: var(--base); color: var(--text);
  border: 1px solid var(--border-2); border-radius: var(--r-btn);
  padding: 11px var(--s3); font-weight: 600; font-variant-numeric: tabular-nums;
  transition: border-color var(--t-fast) var(--ease);
  -webkit-appearance: none; appearance: none;
}
.input-wrap input:focus, .input-wrap select:focus { border-color: var(--violet); outline: none; }
.input-wrap input::-webkit-outer-spin-button, .input-wrap input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.input-wrap input[type=number] { -moz-appearance: textfield; appearance: textfield; }
.input-wrap .unit { position: absolute; right: var(--s3); font-size: 12px; font-weight: 700; color: var(--dim); pointer-events: none; }
.chips { display: flex; gap: var(--s1); }
.chips button {
  flex: 1; padding: 7px 0; font-size: 12px; font-weight: 700;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; color: var(--muted);
  transition: all var(--t-fast) var(--ease);
}
.chips button:hover { color: var(--text); border-color: var(--border-2); background: var(--surface-3); }
.chips button:active { transform: scale(.95); }
.seg { display: flex; background: var(--base); border: 1px solid var(--border-2); border-radius: var(--r-btn); padding: 3px; gap: 3px; }
.seg button { flex: 1; padding: 8px 0; border-radius: 9px; font-weight: 700; font-size: 13px; color: var(--muted); transition: all var(--t-fast) var(--ease); }
.seg button.active { background: var(--surface-3); color: var(--text); box-shadow: inset 0 0 0 1px var(--border-2); }

/* stat tiles */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s2); }
.stat { background: var(--base); border: 1px solid var(--border); border-radius: var(--r-btn); padding: 10px var(--s3); }
.stat .k { font-size: 10px; font-weight: 600; color: var(--dim); text-transform: uppercase; letter-spacing: .05em; }
.stat .v { font-size: 16px; font-weight: 800; font-variant-numeric: tabular-nums; }

/* ---------- big result numerals ---------- */
.rollnum {
  font-size: clamp(44px, 9vw, 72px); font-weight: 800; letter-spacing: -.03em;
  font-variant-numeric: tabular-nums; line-height: 1; text-align: center;
  color: var(--text); transition: color var(--t-base) var(--ease);
}
.rollnum.win { color: var(--success); text-shadow: 0 0 32px rgba(16, 185, 129, .45); }
.rollnum.lose { color: var(--danger); text-shadow: 0 0 32px rgba(239, 68, 68, .35); }
.rollnum.idle { color: var(--dim); text-shadow: none; }
.rollnum.pop { animation: pop var(--t-slow) var(--ease); }
@keyframes pop { 35% { transform: scale(1.07); } }

/* ---------- dice ---------- */
.dice-stage { display: grid; gap: var(--s5); padding: var(--s5) var(--s5) var(--s4); }
.slider-zone { position: relative; padding: var(--s4) 0 var(--s5); }
.track {
  position: relative; height: 12px; border-radius: var(--r-pill);
  background: linear-gradient(to right, var(--danger) var(--split, 50%), var(--success) var(--split, 50%));
  box-shadow: inset 0 1px 4px rgba(0, 0, 0, .5);
}
.track.under { background: linear-gradient(to right, var(--success) var(--split, 50%), var(--danger) var(--split, 50%)); }
.track input[type=range] {
  position: absolute; inset: -14px 0; width: 100%; height: 40px;
  -webkit-appearance: none; appearance: none; background: transparent; cursor: ew-resize; margin: 0;
}
.track input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 28px; height: 28px; border-radius: 9px;
  background: #fff; border: 3px solid var(--violet);
  box-shadow: 0 2px 12px rgba(0, 0, 0, .6), 0 0 0 4px rgba(46, 91, 208, .25);
  transition: transform var(--t-fast) var(--ease);
}
.track input[type=range]:active::-webkit-slider-thumb { transform: scale(1.12); }
.track input[type=range]::-moz-range-thumb {
  width: 24px; height: 24px; border-radius: 9px; background: #fff; border: 3px solid var(--violet);
  box-shadow: 0 2px 12px rgba(0, 0, 0, .6);
}
.track .ticks { position: absolute; inset: 18px 0 auto; display: flex; justify-content: space-between; font-size: 10px; color: var(--dim); font-variant-numeric: tabular-nums; }
.marker {
  position: absolute; top: -34px; left: 50%;
  transform: translateX(-50%);
  background: var(--surface-3); border: 1px solid var(--border-2);
  font-size: 12px; font-weight: 800; font-variant-numeric: tabular-nums;
  padding: 3px 8px; border-radius: 7px;
  transition: left .45s var(--ease);
  pointer-events: none; opacity: 0;
}
.marker.show { opacity: 1; }
.marker.win { border-color: var(--success); color: var(--success); }
.marker.lose { border-color: var(--danger); color: var(--danger); }
.marker::after { content: ''; position: absolute; top: 100%; left: 50%; transform: translateX(-50%); border: 5px solid transparent; border-top-color: var(--border-2); }

/* ============================================================================
   LUXURY ISOMETRIC DICE — Jackpot Heaven (zero-dependency, hand-authored)
   Replaces the old `.dice3d` block (styles.css lines ~344-369).
   Royal gold #F4C13C / #FCE08A / #C8901E, royal blue #2E5BD0, dark base #0A0A0F.
   ============================================================================ */
.dice3d{
  --die:104px;
  position:relative; display:flex; gap:28px; justify-content:center; align-items:flex-end;
  min-height:172px; width:100%; margin-bottom:2px;
  border-radius:18px; padding:16px 10px 12px; overflow:hidden;
  /* blue royal halo above + soft seat shadow below */
  background:
    radial-gradient(120% 95% at 50% 12%, rgba(46,91,208,.12), transparent 58%),
    radial-gradient(78% 70% at 50% 122%, rgba(0,0,0,.5), transparent 70%);
}
/* dark felt the dice sit on */
.dice3d::before{
  content:""; position:absolute; left:-4%; right:-4%; bottom:0; height:48%; z-index:0;
  background:radial-gradient(120% 130% at 50% 132%, #123a23 0%, #0c2618 40%, transparent 72%);
  opacity:.92; transition:background .4s ease;
}
/* inner vignette for depth */
.dice3d::after{
  content:""; position:absolute; inset:0; border-radius:18px; pointer-events:none; z-index:3;
  box-shadow:inset 0 0 70px 8px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,255,255,.05);
}

.dice3d .die{
  position:relative; width:var(--die); height:calc(var(--die)*1.16); z-index:1;
  will-change:transform; transform:translateY(0);
  transition:transform .6s cubic-bezier(.12,.85,.2,1);
}
.dice3d .die svg{ display:block; width:100%; height:100%; overflow:visible; }

/* contact shadow under each die */
.dice3d .shadow{
  position:absolute; left:50%; bottom:-3px; width:84%; height:18px; transform:translateX(-50%);
  background:radial-gradient(50% 50% at 50% 50%, rgba(0,0,0,.6), rgba(0,0,0,0) 72%);
  filter:blur(2px); z-index:-1;
  transition:transform .6s cubic-bezier(.12,.85,.2,1), opacity .6s;
}
.dice3d .spin{ transform-origin:50% 56%; }

/* spark burst layer (win only) */
.dice3d .spark{ position:absolute; left:50%; top:48%; width:0; height:0; pointer-events:none; z-index:4; }
.dice3d .spark i{
  position:absolute; left:0; top:0; width:9px; height:9px; margin:-4.5px 0 0 -4.5px; border-radius:50%;
  background:radial-gradient(circle, #FFF8DC 0%, #F4C13C 50%, rgba(244,193,60,0) 72%); opacity:0;
}

/* ---------- TUMBLE: weighty multi-axis hop + spin + motion blur ---------- */
.dice3d.rolling .die{ animation:dieHop .5s cubic-bezier(.33,0,.5,1) infinite; }
.dice3d.rolling .die:nth-child(2){ animation-duration:.44s; animation-delay:.04s; }
.dice3d.rolling .spin{ animation:dieSpin .4s linear infinite; }
.dice3d.rolling .die:nth-child(2) .spin{ animation-duration:.34s; animation-direction:reverse; }
.dice3d.rolling .shadow{ animation:shadowPulse .5s cubic-bezier(.33,0,.5,1) infinite; }
.dice3d.rolling .die svg{ filter:url(#jhDiceBlur); }
@keyframes dieHop{ 0%{transform:translateY(0)} 30%{transform:translateY(-38px)} 55%{transform:translateY(-50px)} 100%{transform:translateY(0)} }
@keyframes shadowPulse{ 0%,100%{transform:translateX(-50%) scale(1); opacity:.82} 52%{transform:translateX(-50%) scale(.58); opacity:.36} }
@keyframes dieSpin{ 0%{transform:rotate(0) scale(1)} 50%{transform:rotate(184deg) scale(.9)} 100%{transform:rotate(366deg) scale(1)} }

/* ---------- SETTLE: drop + overshoot + micro-bounce ---------- */
.dice3d.settling .die{ animation:dieSettle .68s cubic-bezier(.22,.9,.26,1.5); }
.dice3d.settling .die:nth-child(2){ animation-delay:.05s; }
@keyframes dieSettle{
  0%{transform:translateY(-34px) rotate(-10deg)}
  42%{transform:translateY(3px) rotate(3deg)}
  64%{transform:translateY(-8px) rotate(-2deg)}
  82%{transform:translateY(2px) rotate(1deg)}
  100%{transform:translateY(0) rotate(0)}
}

/* ---------- WIN: gold glow + brighter rim + warm felt + spark burst ---------- */
.dice3d.win .die{
  animation:dieSettle .68s cubic-bezier(.22,.9,.26,1.5);
  filter:drop-shadow(0 0 14px rgba(244,193,60,.7)) drop-shadow(0 0 30px rgba(244,193,60,.4));
}
.dice3d.win .die:nth-child(2){ animation-delay:.05s; }
.dice3d.win .rim{ stroke:#FCE08A !important; stroke-width:3 !important; }
.dice3d.win::before{ background:radial-gradient(120% 130% at 50% 132%, #3a3414 0%, #231c0a 42%, transparent 74%); }
.dice3d.win .spark i{ animation:sparkFly .72s ease-out forwards; }
@keyframes sparkFly{
  0%{opacity:0; transform:translate(0,0) scale(.3)}
  14%{opacity:1}
  100%{opacity:0; transform:translate(var(--sx),var(--sy)) scale(1)}
}

/* ---------- LOSE: cool settle, subtle dark shadow ---------- */
.dice3d.lose .die{ filter:drop-shadow(0 8px 16px rgba(0,0,0,.55)); }

/* ---------- reduced motion: no tumble/spin/blur; faces still resolve ---------- */
@media (prefers-reduced-motion:reduce){
  .dice3d .die, .dice3d .spin, .dice3d .shadow{ animation:none !important; transform:none !important; }
  .dice3d.rolling .die svg{ filter:none; }
  .dice3d.win .spark i{ animation:none; opacity:0; }
  .dice3d.win .die{ filter:drop-shadow(0 0 12px rgba(244,193,60,.7)); }
}

/* ---------- mines ---------- */
.mines-grid {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: var(--s2);
  max-width: 420px; margin: 0 auto; width: 100%;
  perspective: 700px;
}
.tile {
  aspect-ratio: 1; border-radius: 12px;
  background: linear-gradient(180deg, var(--surface-3), var(--surface-2));
  border: 1px solid var(--border-2);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; position: relative;
  transition: transform var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease), background var(--t-base) var(--ease), border-color var(--t-base) var(--ease);
  transform-style: preserve-3d;
}
.tile svg { width: 55%; height: 55%; }
.tile:hover:not(.disabled) { transform: translateY(-3px); box-shadow: 0 6px 16px rgba(0, 0, 0, .45); border-color: var(--violet); }
.tile:active:not(.disabled) { transform: translateY(0) scale(.95); }
.tile.disabled { cursor: default; }
.tile.safe {
  background: var(--success-soft); border-color: rgba(16, 185, 129, .5);
  animation: flipIn var(--t-slow) var(--ease);
}
.tile.mine { background: var(--danger-soft); border-color: rgba(239, 68, 68, .55); animation: flipIn var(--t-slow) var(--ease); }
.tile.dim { opacity: .38; }
@keyframes flipIn { 0% { transform: rotateY(90deg); } 100% { transform: rotateY(0); } }
.grid-shake { animation: shake .45s var(--ease); }
@keyframes shake { 20% { transform: translateX(-7px); } 40% { transform: translateX(6px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(3px); } }

/* ---------- crash ---------- */
.crash-stage { position: relative; padding: var(--s4); }
.crash-canvas-wrap { position: relative; border-radius: var(--r-btn); background: var(--base); border: 1px solid var(--border); overflow: hidden; }
#c-canvas { display: block; width: 100%; height: 230px; }
.crash-overlay {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; pointer-events: none; gap: 2px;
}
.crash-overlay .phase { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.countdown-track { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--surface-2); }
.countdown-fill { height: 100%; width: 0%; background: var(--grad); transition: width .1s linear; }
.recent-pills { display: flex; gap: var(--s1); flex-wrap: wrap; margin-top: var(--s3); min-height: 26px; }
.recent-pills > * {
  font-size: 11px; font-weight: 800; font-variant-numeric: tabular-nums;
  padding: 3px 9px; border-radius: var(--r-pill); text-decoration: none;
}
.cr-hi { background: var(--success-soft); color: var(--success); }
.cr-lo { background: var(--danger-soft); color: var(--danger); }
.feed { display: grid; gap: 2px; max-height: 180px; overflow-y: auto; }
.feed-row {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 13px; padding: 7px var(--s3);
  background: var(--base); border-radius: 8px;
  animation: rowIn var(--t-base) var(--ease);
}
@keyframes rowIn { from { opacity: 0; transform: translateY(-4px); } }
.feed-row .you { color: var(--cyan); font-weight: 700; }

/* ---------- rewards ---------- */
.rewards-hero {
  display: flex; align-items: center; gap: var(--s5);
  background: linear-gradient(135deg, rgba(46, 91, 208, .12), rgba(244, 193, 60, .07)), var(--surface);
  border: 1px solid var(--border-2);
}
.ring-wrap { position: relative; width: 108px; height: 108px; flex: none; }
.ring-wrap svg { transform: rotate(-90deg); }
.ring-bg { stroke: var(--surface-3); }
.ring-fg { stroke: url(#ringGrad); transition: stroke-dashoffset .8s var(--ease); }
.ring-label { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.ring-label .lvl { font-size: 22px; font-weight: 800; line-height: 1; }
.ring-label .cap { font-size: 9px; color: var(--muted); text-transform: uppercase; letter-spacing: .07em; }
.reward-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s4); }
@media (max-width: 880px) { .reward-cards { grid-template-columns: 1fr; } }
.reward-card { display: grid; gap: var(--s2); align-content: start; }
.reward-card .amount { font-size: 26px; font-weight: 800; font-variant-numeric: tabular-nums; }
.reward-card .meta { font-size: 12px; color: var(--muted); }
.reward-card .amount.bump { animation: pop var(--t-slow) var(--ease); }
table.lb { width: 100%; border-collapse: collapse; font-size: 13px; }
table.lb th { font-size: 10px; text-transform: uppercase; letter-spacing: .06em; color: var(--dim); text-align: left; padding: var(--s2) var(--s3); border-bottom: 1px solid var(--border); }
table.lb td { padding: 9px var(--s3); border-bottom: 1px solid var(--border); font-variant-numeric: tabular-nums; }
table.lb tr.me td { background: rgba(244, 193, 60, .06); }
table.lb tr:last-child td { border-bottom: 0; }

/* ---------- fairness drawer + history ---------- */
details.drawer { border: 1px solid var(--border); border-radius: var(--r-card); background: var(--surface); overflow: hidden; }
details.drawer summary {
  list-style: none; display: flex; align-items: center; gap: var(--s2);
  padding: var(--s4) var(--s5); cursor: pointer; font-weight: 700; font-size: 14px;
  transition: background var(--t-fast) var(--ease);
}
details.drawer summary::-webkit-details-marker { display: none; }
details.drawer summary:hover { background: var(--surface-2); }
details.drawer summary .chev { margin-left: auto; transition: transform var(--t-base) var(--ease); }
details.drawer[open] summary .chev { transform: rotate(180deg); }
details.drawer .drawer-body { padding: 0 var(--s5) var(--s5); display: grid; gap: var(--s4); }
.kv { display: grid; gap: 4px; }
.kv .k { font-size: 11px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.kv .v { font-family: var(--mono); font-size: 12px; color: var(--text); word-break: break-all; }
table.bets { width: 100%; border-collapse: collapse; font-size: 13px; }
table.bets th { font-size: 10px; text-transform: uppercase; letter-spacing: .06em; color: var(--dim); text-align: left; padding: var(--s2) var(--s3); border-bottom: 1px solid var(--border); }
table.bets td { padding: 9px var(--s3); border-bottom: 1px solid var(--border); vertical-align: middle; }
table.bets tr:last-child td { border-bottom: 0; }
table.bets td .gname { display: inline-flex; align-items: center; gap: 7px; text-transform: capitalize; }
table.bets td .gname svg.ic { width: 15px; height: 15px; color: var(--muted); }
.pill { display: inline-block; padding: 2px 9px; border-radius: var(--r-pill); font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums; }
.pill.win { background: var(--success-soft); color: var(--success); }
.pill.lose { background: var(--danger-soft); color: var(--danger); }
.vlink { font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; gap: 4px; }
.vlink svg.ic { width: 13px; height: 13px; }
.vlink.locked { color: var(--dim); cursor: default; }
.empty { color: var(--dim); text-align: center; padding: var(--s5) 0; font-size: 13px; }

/* ---------- "claim your free play" popup ---------- */
#claim-pop {
  position: fixed; inset: 0; z-index: 60;
  display: grid; place-items: center; padding: var(--s4);
  background: rgba(5, 6, 12, .68);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  opacity: 0; pointer-events: none; transition: opacity .25s var(--ease);
}
#claim-pop.open { opacity: 1; pointer-events: auto; }
.claim-card {
  position: relative; width: 100%; max-width: 420px;
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid rgba(244, 193, 60, .45); border-radius: var(--r-card);
  padding: 30px 24px 22px; text-align: center;
  box-shadow: 0 24px 80px rgba(0, 0, 0, .6), 0 0 44px rgba(244, 193, 60, .14);
  display: grid; gap: 12px; justify-items: center;
  transform: translateY(14px) scale(.97); transition: transform .28s var(--ease);
}
#claim-pop.open .claim-card { transform: none; }
.claim-crown { width: 44px; height: 44px; color: var(--gold); filter: drop-shadow(0 0 14px rgba(244, 193, 60, .55)); }
.claim-div { display: flex; align-items: center; gap: 10px; width: 100%; color: var(--dim); font-size: 12px; }
.claim-div::before, .claim-div::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.claim-card h2 { font-size: 23px; font-weight: 900; letter-spacing: -.01em; }
.claim-sub { color: var(--muted); font-size: 14.5px; line-height: 1.5; max-width: 300px; }
.claim-sub strong { color: var(--gold-bright); }
.claim-card .input-wrap, .claim-card .btn-lg { width: 100%; }
.claim-card .input-wrap input { font-size: 16px; padding: 13px var(--s3); text-align: center; }
.claim-later { background: none; border: none; color: var(--dim); font-size: 12.5px; cursor: pointer; padding: 4px 8px; }
.claim-later:hover { color: var(--muted); text-decoration: underline; }
@media (prefers-reduced-motion: reduce) { #claim-pop, .claim-card { transition: none; } }

/* ---------- wallet sheet ---------- */
#sheet-backdrop {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(5, 5, 9, .65);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  opacity: 0; pointer-events: none;
  transition: opacity var(--t-base) var(--ease);
}
#sheet-backdrop.open { opacity: 1; pointer-events: auto; }
#sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 51;
  max-width: 560px; margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--border-2); border-bottom: 0;
  border-radius: var(--r-sheet) var(--r-sheet) 0 0;
  transform: translateY(105%);
  transition: transform .32s var(--ease);
  max-height: 86dvh; display: flex; flex-direction: column;
  padding-bottom: env(safe-area-inset-bottom);
  box-shadow: 0 -18px 60px rgba(0, 0, 0, .55);
}
#sheet.open { transform: translateY(0); }
.sheet-handle { width: 40px; height: 4px; border-radius: var(--r-pill); background: var(--border-2); margin: 10px auto 2px; flex: none; }
.sheet-head { display: flex; align-items: center; gap: var(--s2); padding: var(--s3) var(--s5) 0; }
.sheet-head h2 { font-size: 17px; font-weight: 800; }
.sheet-head .icon-btn { margin-left: auto; }
.sheet-tabs { display: flex; gap: var(--s1); padding: var(--s3) var(--s5) 0; border-bottom: 1px solid var(--border); }
.sheet-tabs button {
  padding: 9px 14px; font-weight: 700; font-size: 13px; color: var(--muted);
  border-radius: var(--r-btn) var(--r-btn) 0 0; position: relative;
}
.sheet-tabs button.active { color: var(--text); }
.sheet-tabs button.active::after { content: ''; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2px; background: var(--grad); border-radius: 2px; }
.sheet-body { padding: var(--s5); overflow-y: auto; display: grid; gap: var(--s4); }
.faucet-note {
  display: flex; gap: var(--s2); align-items: flex-start;
  font-size: 12px; color: var(--gold);
  background: var(--gold-soft); border: 1px solid rgba(245, 179, 1, .3);
  border-radius: var(--r-btn); padding: var(--s3);
}
.faucet-note svg.ic { width: 15px; height: 15px; margin-top: 1px; }
.amount-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s2); }
.amount-grid button {
  padding: 14px 0; font-weight: 800; font-size: 16px; font-variant-numeric: tabular-nums;
  background: var(--surface-2); border: 1px solid var(--border-2); border-radius: var(--r-btn);
  transition: all var(--t-fast) var(--ease);
}
.amount-grid button:hover { border-color: var(--violet); background: var(--surface-3); }
.amount-grid button:active { transform: scale(.96); }
.amount-grid button small { display: block; font-size: 10px; color: var(--muted); font-weight: 600; }

/* ---------- toasts ---------- */
#toasts {
  position: fixed; top: calc(var(--topbar-h) + var(--s3)); left: 50%; transform: translateX(-50%);
  z-index: 60; display: grid; gap: var(--s2); width: min(92vw, 380px); pointer-events: none;
}
.toast {
  display: flex; align-items: center; gap: var(--s2);
  background: var(--surface-3); border: 1px solid var(--border-2);
  border-radius: var(--r-btn); padding: 11px var(--s4);
  font-size: 13px; font-weight: 600;
  box-shadow: 0 10px 32px rgba(0, 0, 0, .5);
  animation: toastIn var(--t-base) var(--ease);
}
.toast.out { animation: toastOut var(--t-base) var(--ease) forwards; }
.toast.ok { border-color: rgba(16, 185, 129, .4); }
.toast.ok svg.ic { color: var(--success); }
.toast.err { border-color: rgba(239, 68, 68, .45); }
.toast.err svg.ic { color: var(--danger); }
.toast svg.ic { width: 16px; height: 16px; flex: none; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-10px) scale(.97); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(-8px) scale(.97); } }

/* ---------- skeletons ---------- */
.skel { position: relative; overflow: hidden; background: var(--surface-2); border-radius: 8px; min-height: 14px; }
.skel::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .05), transparent);
  animation: shimmer 1.4s infinite;
}
@keyframes shimmer { from { transform: translateX(-100%); } to { transform: translateX(100%); } }

/* ---------- confetti ---------- */
.confetti-piece {
  position: fixed; width: 8px; height: 8px; z-index: 70; pointer-events: none;
  animation: confetti 1s var(--ease) forwards;
}
@keyframes confetti {
  0% { transform: translate(0, 0) rotate(0); opacity: 1; }
  100% { transform: translate(var(--cx), var(--cy)) rotate(540deg); opacity: 0; }
}

/* ---------- game switch transition ---------- */
.game-panel[hidden], .nav-panel[hidden] { display: none; }
.game-panel, .nav-panel { animation: panelIn var(--t-base) var(--ease); }
@keyframes panelIn { from { opacity: 0; transform: translateY(8px); } }

/* ---------- originals sub-switcher ---------- */
.subnav { max-width: 480px; margin-bottom: var(--s4); }
.subnav button { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 9px 0; }
.subnav button svg.ic { width: 16px; height: 16px; }

/* ---------- withdraw tab ---------- */
.chips.single { justify-content: flex-end; }
.chips.single button { flex: 0 0 auto; padding: 7px var(--s4); }
.pill.gold { background: var(--gold-soft); color: var(--gold); }
.pill.neutral { background: var(--surface-2); color: var(--muted); }
.wd-list { display: grid; gap: var(--s2); }
.wd-row {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s3);
  background: var(--base); border: 1px solid var(--border); border-radius: var(--r-btn);
  padding: 10px var(--s3);
  animation: rowIn var(--t-base) var(--ease);
}
.wd-amt { font-weight: 800; font-size: 14px; }
.wd-when { font-size: 11px; color: var(--dim); }
.wd-side { display: grid; justify-items: end; gap: 3px; }
.wd-reason { font-size: 11px; color: var(--danger); text-align: right; max-width: 220px; }
.note-link {
  color: inherit; font-weight: 800; padding: 0;
  text-decoration: underline; text-underline-offset: 2px;
  transition: opacity var(--t-fast) var(--ease);
}
.note-link:hover { opacity: .8; }
.note-link:active { opacity: .65; }

/* ---------- vault (responsible play) ---------- */
.card.vcard { display: grid; gap: var(--s3); align-content: start; }
.card.vcard h2 { margin-bottom: 0; }
.limit-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s4); }
@media (max-width: 880px) { .limit-cards { grid-template-columns: 1fr; } }
.meter { height: 8px; border-radius: var(--r-pill); background: var(--surface-2); overflow: hidden; }
.meter-fill { height: 100%; width: 0%; border-radius: var(--r-pill); background: var(--grad); transition: width .6s var(--ease); }
.meter-fill.over { background: var(--danger); }
.meter-legend { display: flex; justify-content: space-between; gap: var(--s2); font-size: 12px; color: var(--muted); }
.limit-controls { display: grid; grid-template-columns: 1fr auto auto; gap: var(--s2); }
.meta-text { font-size: 12px; color: var(--muted); }
.vault-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s4); align-items: start; }
@media (max-width: 880px) { .vault-grid { grid-template-columns: 1fr; } }
.card.danger {
  border-color: rgba(239, 68, 68, .35);
  background: linear-gradient(180deg, rgba(239, 68, 68, .05), transparent 55%), var(--surface);
}
.btn-danger:hover:not(:disabled) { background: rgba(239, 68, 68, .24); }
.danger-note {
  display: flex; gap: var(--s2); align-items: flex-start;
  font-size: 12px; color: var(--danger); font-weight: 600;
  background: var(--danger-soft); border: 1px solid rgba(239, 68, 68, .35);
  border-radius: var(--r-btn); padding: var(--s3);
}
.danger-note svg.ic { width: 15px; height: 15px; margin-top: 1px; flex: none; }
.break-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3); }
.break-actions { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s2); }
.kyc-form { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s4); }
.kyc-form .wide, .kyc-form .btn { grid-column: 1 / -1; }
@media (max-width: 560px) { .kyc-form { grid-template-columns: 1fr; } }
.uc { text-transform: uppercase; }

/* ---------- reality check dialog ---------- */
#rc-backdrop {
  position: fixed; inset: 0; z-index: 80;
  background: rgba(5, 5, 9, .7);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
#rc-dialog {
  position: fixed; z-index: 81; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: min(92vw, 400px);
  background: var(--surface); border: 1px solid var(--border-2); border-radius: var(--r-card);
  padding: var(--s6) var(--s5) var(--s5);
  display: grid; gap: var(--s3); justify-items: center; text-align: center;
  box-shadow: 0 24px 80px rgba(0, 0, 0, .6);
  animation: panelIn var(--t-base) var(--ease);
}
#rc-dialog h2 { font-size: 17px; font-weight: 800; }
#rc-dialog p { font-size: 13px; color: var(--muted); }
#rc-dialog p strong { color: var(--text); }
.rc-icon { width: 52px; height: 52px; border-radius: 50%; background: var(--grad-soft); display: grid; place-items: center; }
.rc-icon svg.ic { width: 26px; height: 26px; color: var(--cyan); }
.rc-actions { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s2); width: 100%; margin-top: var(--s2); }

/* ---------- affiliate ---------- */
.aff-link-row { display: flex; gap: var(--s2); }
.aff-link-row .input-wrap { flex: 1; min-width: 0; }
.aff-link-row input { font-family: var(--mono); font-size: 12px; }
.stats.cols4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 560px) { .stats.cols4 { grid-template-columns: repeat(2, 1fr); } }
.tier-sub { color: var(--muted); font-size: 11px; }

/* ---------- blocked / excluded full-screen states ---------- */
.blocked-state {
  min-height: 56dvh;
  display: grid; place-content: center; justify-items: center; gap: var(--s4);
  text-align: center; padding: var(--s6) var(--s4);
  animation: panelIn var(--t-slow) var(--ease);
}
.blocked-icon {
  width: 76px; height: 76px; border-radius: 50%;
  background: var(--grad-soft); border: 1px solid var(--border-2);
  display: grid; place-items: center;
  box-shadow: 0 0 48px rgba(46, 91, 208, .25);
}
.blocked-icon svg.ic { width: 36px; height: 36px; color: var(--cyan); }
.blocked-state h2 { font-size: clamp(20px, 4vw, 26px); font-weight: 800; letter-spacing: -.02em; }
.blocked-state p { color: var(--muted); font-size: 14px; max-width: 440px; }
.code-chip {
  font-size: 12px; font-weight: 800; letter-spacing: .08em; color: var(--text);
  background: var(--surface-2); border: 1px solid var(--border-2);
  border-radius: var(--r-pill); padding: 5px 14px;
}

/* ---------- casino lobby (aggregator games) ---------- */
.casino-head { display: flex; align-items: center; gap: var(--s3); flex-wrap: wrap; }
.page-title { font-size: 18px; font-weight: 800; letter-spacing: -.01em; display: flex; align-items: center; gap: var(--s2); }
.provider-chip {
  margin-left: auto; display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  color: var(--gold); background: var(--gold-soft); border: 1px solid rgba(245, 179, 1, .35);
  padding: 3px 10px; border-radius: var(--r-pill);
}
.casino-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s4); }
@media (max-width: 880px) { .casino-grid { grid-template-columns: repeat(2, 1fr); } }
.cg-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card);
  overflow: hidden; text-align: left; padding: 0; display: grid; align-content: start;
  transition: transform var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease), box-shadow var(--t-base) var(--ease);
}
button.cg-card:hover { transform: translateY(-3px); border-color: var(--border-2); box-shadow: 0 10px 28px rgba(0, 0, 0, .4); }
button.cg-card:active { transform: translateY(-1px) scale(.99); }
.cg-art {
  aspect-ratio: 16 / 9; display: grid; place-items: center;
  background: linear-gradient(160deg, var(--accent, var(--violet)), #11111A 145%);
}
.cg-glyph { font-size: 44px; font-weight: 800; color: rgba(255, 255, 255, .92); text-shadow: 0 4px 24px rgba(0, 0, 0, .45); }
.cg-body { padding: var(--s3) var(--s4) var(--s4); display: grid; gap: var(--s2); }
.cg-title { font-weight: 800; font-size: 15px; }
.cg-badges { display: flex; gap: var(--s1); flex-wrap: wrap; }
.badge {
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
  padding: 2px 8px; border-radius: var(--r-pill);
  background: var(--surface-2); color: var(--muted); border: 1px solid var(--border);
}
.badge.vol-low { color: var(--success); }
.badge.vol-med { color: var(--gold); }
.badge.vol-high { color: var(--danger); }

/* ---------- slot view (3 reels) ---------- */
.slot-head { display: flex; align-items: center; gap: var(--s3); flex-wrap: wrap; }
.slot-head h2 { font-size: 18px; font-weight: 800; letter-spacing: -.01em; }
.slot-head .cg-badges { margin-left: auto; }
.slot-stage { display: grid; gap: var(--s4); padding: var(--s5); }
.reels { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s3); max-width: 420px; margin: 0 auto; width: 100%; }
.reel {
  position: relative; height: 132px; border-radius: var(--r-btn);
  background: var(--base); border: 1px solid var(--border-2);
  overflow: hidden; box-shadow: inset 0 8px 18px rgba(0, 0, 0, .45);
}
.reel::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(10, 10, 15, .85), transparent 30%, transparent 70%, rgba(10, 10, 15, .85));
}
.reel-strip { display: flex; flex-direction: column; }
.reel-cell { height: 132px; flex: none; display: grid; place-items: center; }
.reel.spinning .reel-strip { animation: reelSpin .45s linear infinite; }
@keyframes reelSpin { to { transform: translateY(-50%); } }
.reel-cell.settle { animation: reelSettle var(--t-slow) var(--ease); }
@keyframes reelSettle { 0% { transform: translateY(-30%); opacity: .4; } 60% { transform: translateY(4%); } 100% { transform: translateY(0); } }
svg.sym { width: 58px; height: 58px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.sym-text { font-size: 48px; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1; }
.slot-result { font-size: 17px; font-weight: 800; text-align: center; min-height: 24px; color: var(--dim); transition: color var(--t-base) var(--ease); }
.slot-result.win { color: var(--success); text-shadow: 0 0 24px rgba(16, 185, 129, .4); }
.slot-result.lose { color: var(--danger); }
@media (max-width: 480px) { .reel, .reel-cell { height: 104px; } svg.sym { width: 46px; height: 46px; } .sym-text { font-size: 38px; } }

/* ---------- sportsbook seam ---------- */
.sb-card { display: grid; gap: var(--s4); padding: var(--s6); justify-items: start; }
.sb-icon {
  width: 64px; height: 64px; border-radius: 50%;
  background: var(--grad-soft); border: 1px solid var(--border-2);
  display: grid; place-items: center;
  box-shadow: 0 0 36px rgba(46, 91, 208, .22);
}
.sb-icon svg.ic { width: 30px; height: 30px; color: var(--cyan); }
.sb-title { font-size: clamp(17px, 3vw, 20px); font-weight: 800; letter-spacing: -.01em; display: flex; align-items: center; gap: var(--s2); flex-wrap: wrap; margin-bottom: 0; }
.sb-copy { color: var(--muted); font-size: 14px; max-width: 560px; }
.sb-stats { width: 100%; }
.sb-stats .stat { padding: var(--s3) var(--s4); }
.sb-stats .stat .v { font-size: 13px; font-weight: 600; line-height: 1.45; }
@media (max-width: 680px) { .sb-stats { grid-template-columns: 1fr; } }

/* ---------- cashier (deposit + withdraw routing) ---------- */
.addr-row { display: flex; gap: var(--s2); }
.addr-row .input-wrap { flex: 1; min-width: 0; }
input.mono { font-family: var(--mono); font-size: 12px; }
.sim-row { display: grid; grid-template-columns: 1fr auto; gap: var(--s2); }
@media (max-width: 480px) { .sim-row { grid-template-columns: 1fr; } }
.btn-gold { background: var(--gold-soft); border: 1px solid rgba(245, 179, 1, .4); color: var(--gold); }
.btn-gold:hover:not(:disabled) { background: rgba(245, 179, 1, .22); }
.divider { height: 1px; background: var(--border); }
.input-wrap.invalid input { border-color: var(--danger); }
.input-wrap.invalid input:focus { border-color: var(--danger); }
.field-err { font-size: 12px; color: var(--danger); font-weight: 600; }

/* five bottom-nav items still fit 390px; tighten labels on the narrowest screens */
@media (max-width: 400px) { #bottomnav button { font-size: 9px; } }

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ---------- lobby + rich game cards ---------- */
.cat-chips { display: flex; gap: var(--s2); overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.cat-chips::-webkit-scrollbar { display: none; }
.cat-chip {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  min-width: 88px; padding: 12px 10px; flex: none;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-btn);
  font-size: 10px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted);
  transition: all var(--t-fast) var(--ease);
}
.cat-chip svg.ic { width: 22px; height: 22px; }
.cat-chip:hover { color: var(--text); border-color: var(--border-2); background: var(--surface-2); }
.cat-chip:active { transform: scale(.96); }
.cat-chip.active { color: var(--cyan); background: var(--surface-2); border-color: rgba(244, 193, 60, .4); box-shadow: 0 0 16px rgba(244, 193, 60, .12); }
.lobby-search { max-width: 420px; }
.grow-head { display: flex; align-items: center; gap: var(--s2); margin-top: var(--s2); }
.grow-head h3 { font-size: 16px; font-weight: 800; display: flex; align-items: center; gap: var(--s2); }
.grow-head h3 svg.ic { width: 17px; height: 17px; color: var(--muted); }
.grow-head .arrows { margin-left: auto; display: flex; gap: var(--s1); }
.grow-head .arrows button {
  width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--muted);
  transition: all var(--t-fast) var(--ease);
}
.grow-head .arrows button:hover { color: var(--text); border-color: var(--border-2); }
.grow-head .arrows svg.ic { width: 15px; height: 15px; }
.grow {
  display: flex; gap: var(--s3); overflow-x: auto; padding: var(--s1) 2px var(--s3);
  scroll-snap-type: x proximity; scrollbar-width: none; scroll-behavior: smooth;
}
.grow::-webkit-scrollbar { display: none; }
.gcard {
  position: relative; flex: none; width: 152px; aspect-ratio: 10 / 13;
  border-radius: 14px; overflow: hidden; scroll-snap-align: start;
  border: 1px solid rgba(255, 255, 255, .08); background: var(--surface-2);
  transition: transform var(--t-base) var(--ease), box-shadow var(--t-base) var(--ease), border-color var(--t-base) var(--ease);
  text-align: left; padding: 0; isolation: isolate;
}
.gcard > svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.gcard:hover:not(.soon) { transform: translateY(-5px) scale(1.015); border-color: rgba(255, 255, 255, .22); box-shadow: 0 14px 30px rgba(0, 0, 0, .55); }
.gcard:active:not(.soon) { transform: translateY(-1px) scale(.99); }
.gcard-kicker {
  position: absolute; top: 9px; left: 9px; z-index: 1;
  font-size: 7.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase;
  color: rgba(255, 255, 255, .92); background: rgba(0, 0, 0, .28); backdrop-filter: blur(2px);
  padding: 3px 7px; border-radius: var(--r-pill);
}
.gcard-title {
  position: absolute; top: 30px; left: 10px; right: 10px; z-index: 1;
  font-size: 19px; font-weight: 900; letter-spacing: -.01em; line-height: .95; text-transform: uppercase;
  color: #fff; text-shadow: 0 2px 10px rgba(0, 0, 0, .5);
}
.gcard-rtp {
  position: absolute; bottom: 9px; left: 9px; z-index: 1;
  font-size: 8.5px; font-weight: 800; font-variant-numeric: tabular-nums;
  color: #A7F3D0; background: rgba(0, 0, 0, .42); padding: 2px 7px; border-radius: var(--r-pill);
}
.gcard-live {
  position: absolute; top: 9px; right: 9px; z-index: 1; display: inline-flex; align-items: center; gap: 4px;
  font-size: 8px; font-weight: 800; letter-spacing: .08em; color: #fff;
  background: rgba(239, 68, 68, .85); padding: 3px 7px; border-radius: var(--r-pill);
}
.gcard-live::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: #fff; animation: livePulse 1.4s infinite; }
@keyframes livePulse { 50% { opacity: .4; } }
.gcard.soon > svg { filter: saturate(.35) brightness(.6); }
.gcard.soon { cursor: default; }
.gcard-soon {
  position: absolute; inset: 0; z-index: 2; display: grid; place-items: center;
}
.gcard-soon span {
  font-size: 11px; font-weight: 800; letter-spacing: .14em; color: var(--text);
  background: rgba(10, 10, 15, .65); border: 1px solid var(--border-2); backdrop-filter: blur(3px);
  padding: 6px 14px; border-radius: var(--r-pill);
}
.lobby-banner {
  position: relative; overflow: hidden; border-radius: var(--r-card);
  border: 1px solid var(--border-2);
  background: linear-gradient(120deg, rgba(46, 91, 208, .35), rgba(244, 193, 60, .18)), var(--surface);
  padding: var(--s5) var(--s5); display: flex; align-items: center; gap: var(--s4);
}
.lobby-banner h2 { font-size: clamp(18px, 3vw, 24px); font-weight: 900; letter-spacing: -.02em; }
.lobby-banner p { color: var(--muted); font-size: 13px; max-width: 52ch; }
.lobby-banner .bolt-big { width: 54px; height: 54px; flex: none; filter: drop-shadow(0 4px 14px rgba(46, 91, 208, .6)); }
@media (max-width: 600px) { .gcard { width: 128px; } .lobby-banner .bolt-big { display: none; } }

/* casino grid now uses the rich portrait cards */
.casino-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: var(--s3); }
.casino-grid .gcard { width: auto; }

/* ---------- UX polish: clickable balance, delta fly-outs, onboarding, big win ---------- */
.balance-chip { cursor: pointer; }
.balance-chip:hover { border-color: var(--violet); box-shadow: 0 0 12px rgba(46, 91, 208, .25); }
.bal-fly {
  position: fixed; z-index: 65; pointer-events: none;
  font-size: 14px; font-weight: 800; font-variant-numeric: tabular-nums;
  text-shadow: 0 2px 8px rgba(0, 0, 0, .6);
  animation: balFly .9s var(--ease) forwards;
}
.bal-fly.up { color: var(--success); }
.bal-fly.down { color: var(--danger); }
@keyframes balFly { 0% { opacity: 0; transform: translateY(6px); } 18% { opacity: 1; } 100% { opacity: 0; transform: translateY(-30px); } }
.ob-card {
  position: relative; overflow: hidden;
  background: linear-gradient(120deg, rgba(46, 91, 208, .22), rgba(244, 193, 60, .1)), var(--surface);
  border: 1px solid var(--border-2); border-radius: var(--r-card); padding: var(--s5);
}
.ob-card h2 { font-size: 18px; font-weight: 900; margin-bottom: var(--s3); }
.ob-points { display: grid; gap: var(--s2); margin-bottom: var(--s4); }
.ob-points li { display: flex; gap: var(--s2); align-items: flex-start; font-size: 13.5px; color: var(--muted); list-style: none; }
.ob-points svg.ic { width: 17px; height: 17px; margin-top: 1px; flex: none; }
.ob-points strong { color: var(--text); }
.ob-actions { display: flex; gap: var(--s2); flex-wrap: wrap; }
.back-lobby { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: 13px; font-weight: 600; padding: 7px 10px; border-radius: 10px; transition: all var(--t-fast) var(--ease); }
.back-lobby:hover { color: var(--text); background: var(--surface-2); }
.back-lobby svg.ic { width: 15px; height: 15px; }
.og-row { display: flex; align-items: center; gap: var(--s2); }
.og-row .seg.subnav { flex: 1; }
.bigwin-toast { font-size: 15px !important; }

/* ---------- card extras: favourite heart, hover Play, volatility tag ---------- */
.gcard-fav {
  position: absolute; top: 7px; right: 7px; z-index: 4;
  width: 28px; height: 28px; display: grid; place-items: center;
  border-radius: 50%; background: rgba(10, 10, 15, .45); backdrop-filter: blur(3px);
  color: rgba(255, 255, 255, .85); cursor: pointer;
  transition: transform var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
}
.gcard-fav svg.ic { width: 15px; height: 15px; transition: fill var(--t-fast) var(--ease), stroke var(--t-fast) var(--ease); }
.gcard-fav:hover { background: rgba(10, 10, 15, .7); transform: scale(1.12); }
.gcard.faved .gcard-fav { background: rgba(239, 68, 68, .18); }
.gcard.faved .gcard-fav svg.ic { fill: var(--danger); stroke: var(--danger); }
.gcard-tag {
  position: absolute; bottom: 8px; right: 8px; z-index: 1;
  font-size: 8px; font-weight: 800; letter-spacing: .08em;
  padding: 2px 7px; border-radius: var(--r-pill); color: #fff;
}
.gcard-tag.vol-low { background: rgba(16, 185, 129, .85); }
.gcard-tag.vol-med { background: rgba(245, 179, 1, .9); color: #1a1405; }
.gcard-tag.vol-high { background: rgba(239, 68, 68, .85); }
.gcard-tag.live { background: rgba(239, 68, 68, .9); display: inline-flex; align-items: center; gap: 4px; }
.gcard-tag.live::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: #fff; animation: livePulse 1.4s infinite; }
.gcard-play {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 8px; font-size: 12px; font-weight: 800;
  color: #fff; background: linear-gradient(0deg, rgba(10,10,15,.82), rgba(10,10,15,0));
  opacity: 0; transform: translateY(8px); pointer-events: none;
  transition: opacity var(--t-base) var(--ease), transform var(--t-base) var(--ease);
}
.gcard-play svg.ic { width: 15px; height: 15px; fill: #fff; }
.gcard:hover:not(.soon) .gcard-play, .gcard:focus-visible:not(.soon) .gcard-play { opacity: 1; transform: translateY(0); }
@media (hover: none) { .gcard-play { display: none; } }

/* ---------- toolbar: filter chips + sort ---------- */
.toolbar { display: flex; align-items: center; gap: var(--s3); flex-wrap: wrap; }
.filter-chips { display: flex; gap: var(--s1); flex-wrap: wrap; }
.fchip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 8px 14px; border-radius: var(--r-pill);
  font-size: 13px; font-weight: 700; color: var(--muted);
  background: var(--surface-2); border: 1px solid var(--border);
  transition: all var(--t-fast) var(--ease);
}
.fchip svg.ic { width: 14px; height: 14px; }
.fchip:hover { color: var(--text); border-color: var(--border-2); }
.fchip.active { color: var(--text); background: var(--surface-3); border-color: var(--violet); box-shadow: 0 0 12px rgba(46, 91, 208, .18); }
.sort-select { display: inline-flex; align-items: center; gap: 7px; margin-left: auto; color: var(--muted); }
.sort-select svg.ic { width: 16px; height: 16px; }
.sort-select select {
  background: var(--surface-2); border: 1px solid var(--border-2); color: var(--text);
  padding: 8px 12px; border-radius: var(--r-btn); font: inherit; font-weight: 600; cursor: pointer;
  -webkit-appearance: none; appearance: none;
}
.sort-select select:focus { outline: none; border-color: var(--violet); }
.icon-btn.faved svg.ic { fill: var(--danger); stroke: var(--danger); }

/* full-screen game stage fills the viewport cleanly */
#slotview:fullscreen { background: var(--base); padding: var(--s5); overflow-y: auto; }

/* ---------- desktop left sidebar (Stake/Thrill layout) ≥980px ---------- */
@media (min-width: 980px) {
  #navpills {
    position: fixed; top: calc(var(--topbar-h) + var(--xpbar-h)); left: 0; bottom: 0;
    width: 212px; flex-direction: column; align-items: stretch; gap: 3px;
    padding: var(--s4) var(--s3); margin: 0; max-width: none;
    background: var(--surface); border-right: 1px solid var(--border);
    overflow-y: auto; z-index: 38;
  }
  #navpills button { width: 100%; justify-content: flex-start; padding: 11px 14px; font-size: 14.5px; }
  #navpills button svg.ic { width: 19px; height: 19px; }
  #navpills button.active { background: var(--surface-2); }
  #navpills button.active::after { left: 0; right: auto; top: 8px; bottom: 8px; width: 3px; height: auto; border-radius: 0 3px 3px 0; }
  main { margin-left: 212px; max-width: min(1680px, calc(100% - 212px)); }
  .cat-chips { display: none; } /* sidebar replaces the category shortcuts on desktop */
  /* keep a single game from sprawling across an ultra-wide stage — center it */
  .game-layout { max-width: 1080px; margin-inline: auto; }
}

/* wide screens: 3-pane in-game layout — controls · stage · live-bets rail (fills the right side) */
@media (min-width: 1280px) {
  .game-layout { grid-template-columns: 300px minmax(0, 1fr) 280px; max-width: 1340px; }
  .game-rail { display: flex; }
}

/* ---------- contain horizontal-scroll rows (prevent grid blow-out on mobile) ---------- */
/* A grid column defaults to max-content; the .grow / .cat-chips scrollers would force the whole
   lobby column wider than the viewport. minmax(0,1fr) pins the column to the container width so
   the scrollers stay within bounds and scroll internally. */
.nav-panel > .stack { grid-template-columns: minmax(0, 1fr); }
.grow, .cat-chips, #lob-recent-wrap, #lob-fav-wrap { min-width: 0; }

/* kicker never collides with the fav heart — clip with ellipsis before it */
.gcard-kicker { max-width: calc(100% - 46px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ===================== JACKPOT HEAVEN STUDIO — animated first-party slots ===================== */
.studio-wrap { display: grid; gap: var(--s3); }
.studio-stage {
  position: relative; overflow: hidden;
  padding: clamp(14px, 3vw, 28px);
  /* --sd-* vars are set per-game by studio.js applyStageTheme(); fallbacks = the original violet stage */
  background:
    radial-gradient(135% 100% at 50% -14%, var(--sd-glow, rgba(46, 91, 208, .3)), transparent 60%),
    linear-gradient(180deg, var(--sd-base1, #14121F), var(--sd-base2, #0C0A16));
  border: 1px solid var(--border-2);
  box-shadow: inset 0 0 70px rgba(0, 0, 0, .45), inset 0 1px 0 rgba(255, 255, 255, .05);
  transition: background var(--t-slow) var(--ease);
}
/* slow-drifting themed glow behind the reel — gives the stage life without distracting */
.studio-stage::before {
  content: ''; position: absolute; inset: -25%; z-index: 0; pointer-events: none;
  background:
    radial-gradient(38% 38% at 28% 22%, color-mix(in srgb, var(--sd-accent, #2E5BD0) 24%, transparent), transparent 70%),
    radial-gradient(42% 42% at 74% 82%, color-mix(in srgb, var(--sd-accent, #2E5BD0) 16%, transparent), transparent 72%);
  animation: sdDrift 16s ease-in-out infinite alternate;
}
@keyframes sdDrift { from { transform: translate(-3%, -2%) scale(1); } to { transform: translate(3%, 2%) scale(1.1); } }
.studio-stage.fs {
  background:
    radial-gradient(120% 80% at 50% -10%, rgba(245, 179, 1, .26), transparent 60%),
    linear-gradient(180deg, #1A1606, #100C04);
  border-color: rgba(245, 179, 1, .45);
  box-shadow: inset 0 0 0 1px rgba(245, 179, 1, .25), 0 0 36px rgba(245, 179, 1, .12);
}
.studio-grid {
  --cols: 6; --rows: 5;
  display: grid;
  grid-template-columns: repeat(var(--cols), 1fr);
  grid-template-rows: repeat(var(--rows), 1fr);
  gap: clamp(4px, 1vw, 9px);
  aspect-ratio: var(--cols) / var(--rows);
  width: 100%; max-width: 640px; margin-inline: auto;
  position: relative; z-index: 1;
  padding: clamp(6px, 1.4vw, 12px);
  border-radius: clamp(12px, 2vw, 20px);
  /* a defined "reel window": dark recessed bed + a glowing themed frame so the tiles read against it */
  background: linear-gradient(180deg, rgba(0, 0, 0, .42), rgba(0, 0, 0, .58));
  border: 2px solid color-mix(in srgb, var(--sd-accent, #2E5BD0) 50%, rgba(255, 255, 255, .08));
  box-shadow:
    inset 0 3px 20px rgba(0, 0, 0, .65),
    0 0 0 1px rgba(0, 0, 0, .45),
    0 0 28px color-mix(in srgb, var(--sd-accent, #2E5BD0) 26%, transparent),
    0 16px 40px rgba(0, 0, 0, .5);
}
.sd-cell {
  position: relative; overflow: hidden;
  display: grid; place-items: center;
  border-radius: clamp(9px, 1.5vw, 15px);
  background: linear-gradient(180deg,
    color-mix(in srgb, var(--sd-accent, #2E5BD0) 9%, #20212C) 0%,
    color-mix(in srgb, var(--sd-accent, #2E5BD0) 5%, #14151D) 46%,
    #0C0D14 100%);
  border: 2px solid transparent;
  border-image: linear-gradient(160deg, var(--sd-frame, #FCE08A) 0%, var(--sd-frame2, #F4C13C) 42%, var(--sd-framelo, #C8901E) 100%) 1;
  box-shadow:
    inset 0 2px 0 rgba(255,255,255,.16), inset 0 1px 3px rgba(255,255,255,.10),
    inset 0 -10px 18px rgba(0,0,0,.55), inset 0 0 0 3px rgba(0,0,0,.40),
    0 1px 0 rgba(255,255,255,.06), 0 4px 10px rgba(0,0,0,.45);
  transition: filter var(--t-base) var(--ease), transform var(--t-base) var(--ease), box-shadow var(--t-base) var(--ease), opacity var(--t-base);
}
.sd-cell::before {
  content: ''; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(72% 58% at 50% 30%, rgba(255,255,255,.14), rgba(255,255,255,.03) 46%, rgba(255,255,255,0) 70%);
}
.sd-cell::after {
  content: ''; position: absolute; left: 0; top: 0; width: 46%; height: 30%;
  z-index: 3; pointer-events: none; border-top-left-radius: inherit;
  background: radial-gradient(120% 120% at 0% 0%, color-mix(in srgb, var(--sd-frame, #FCE08A) 55%, #fff) 0%, rgba(255,255,255,.10) 36%, rgba(255,255,255,0) 64%);
  opacity: .55; mix-blend-mode: screen;
}
.sd-cell .sym-svg {
  width: 92%; height: 92%; display: block; position: relative; z-index: 2;
  filter: drop-shadow(0 3px 5px rgba(0,0,0,.62)) drop-shadow(0 1px 1px rgba(0,0,0,.9)) drop-shadow(0 0 1px rgba(255,255,255,.4)) saturate(1.18) contrast(1.08);
}
.sd-head-actions { margin-left: auto; display: flex; gap: 6px; flex: 0 0 auto; }
.sd-badges-row { flex-basis: 100%; order: 5; }
.sd-drop { animation: sdDrop .42s var(--ease) both; animation-delay: var(--d, 0ms); }
@keyframes sdDrop { 0% { transform: translateY(-130%) scale(.7); opacity: 0; } 70% { opacity: 1; } 85% { transform: translateY(6%) scale(1.04); } 100% { transform: translateY(0) scale(1); opacity: 1; } }
.sd-dim { filter: saturate(.45) brightness(.5); opacity: .55; }
.sd-winc {
  border-color: rgba(255, 255, 255, .55);
  background: radial-gradient(120% 120% at 50% 35%,
    color-mix(in srgb, var(--sd-accent, #2E5BD0) 55%, transparent),
    color-mix(in srgb, var(--sd-accent, #2E5BD0) 14%, transparent));
  box-shadow: 0 0 0 2px rgba(255, 255, 255, .35), 0 0 22px var(--sd-winglow, rgba(46, 91, 208, .7));
  z-index: 2; animation: sdWin .62s var(--ease) infinite alternate;
}
.studio-stage.fs .sd-winc { background: radial-gradient(120% 120% at 50% 35%, rgba(245, 179, 1, .6), rgba(245, 179, 1, .16)); box-shadow: 0 0 0 2px rgba(255, 240, 200, .5), 0 0 24px rgba(245, 179, 1, .75); }
@keyframes sdWin { from { transform: scale(1); } to { transform: scale(1.07); } }
.sd-flash { z-index: 2; animation: sdFlash .48s var(--ease); border-color: rgba(244, 193, 60, .7); box-shadow: 0 0 0 2px rgba(244, 193, 60, .4), 0 0 22px rgba(244, 193, 60, .65); }
@keyframes sdFlash { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.1); } }
.sd-pop { animation: sdPop .24s ease-in forwards; z-index: 3; }
@keyframes sdPop { to { transform: scale(0) rotate(18deg); opacity: 0; } }
.sd-scatter { box-shadow: 0 0 0 2px rgba(245, 179, 1, .5), 0 0 18px rgba(245, 179, 1, .55); animation: sdScatter 1.1s ease-in-out infinite; }
@keyframes sdScatter { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.06); } }
.sd-coin { background: radial-gradient(120% 120% at 50% 30%, rgba(245, 179, 1, .35), rgba(245, 179, 1, .08)); border-color: rgba(245, 179, 1, .55); }
.sd-coin.sd-lock { box-shadow: 0 0 0 2px rgba(245, 179, 1, .45), 0 0 18px rgba(245, 179, 1, .5); }
.sd-coinv { position: absolute; bottom: 8%; left: 0; right: 0; text-align: center; font-weight: 800; font-size: clamp(10px, 2vw, 15px); color: #3A2606; text-shadow: 0 1px 0 rgba(255, 255, 255, .5); }

/* banners (free spins / big win / hold&win) */
.studio-banner { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; opacity: 0; z-index: 5; }
.studio-banner.show { opacity: 1; }
.studio-banner.show .sd-banner-in { animation: sdBanner .4s var(--ease) both; }
.sd-banner-in {
  text-align: center; padding: 18px 34px; border-radius: 18px;
  background: linear-gradient(135deg, rgba(46, 91, 208, .96), rgba(244, 193, 60, .96));
  box-shadow: 0 18px 50px rgba(0, 0, 0, .55), inset 0 0 0 1px rgba(255, 255, 255, .35);
}
.sd-banner-t { font-size: clamp(22px, 5vw, 40px); font-weight: 900; letter-spacing: 1px; color: #fff; text-shadow: 0 2px 14px rgba(0, 0, 0, .4); }
.sd-banner-s { font-size: clamp(12px, 2.4vw, 16px); font-weight: 600; color: rgba(255, 255, 255, .92); margin-top: 4px; }
@keyframes sdBanner { 0% { transform: scale(.6) translateY(14px); opacity: 0; } 60% { transform: scale(1.06); } 100% { transform: scale(1); opacity: 1; } }

.sd-fsbadge { position: absolute; top: 12px; right: 12px; z-index: 4; display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 8px 14px; border-radius: 14px; background: linear-gradient(135deg, rgba(245, 179, 1, .95), rgba(245, 130, 1, .95)); box-shadow: 0 8px 22px rgba(0, 0, 0, .4); }
.sd-fsmult { font-size: 22px; font-weight: 900; color: #1A1206; line-height: 1; }
.sd-fslabel { font-size: 9px; font-weight: 800; letter-spacing: 1.5px; text-transform: uppercase; color: rgba(26, 18, 6, .8); }

@keyframes sdBump { 0% { transform: scale(1); } 40% { transform: scale(1.16); } 100% { transform: scale(1); } }

/* in-stage status badges */
.sd-turbobadge { position: absolute; top: 12px; left: 12px; z-index: 4; display: inline-flex; align-items: center; gap: 4px; padding: 5px 10px; border-radius: var(--r-pill); font-size: 10px; font-weight: 800; letter-spacing: 1px; color: #1A1206; background: linear-gradient(135deg, #FDE047, #F59E0B); box-shadow: 0 6px 16px rgba(0, 0, 0, .35); }
.sd-turbobadge .ic { width: 12px; height: 12px; }
.sd-autocount { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); z-index: 4; padding: 4px 12px; border-radius: var(--r-pill); font-size: 11px; font-weight: 800; letter-spacing: .5px; color: #fff; background: rgba(0, 0, 0, .5); border: 1px solid rgba(255, 255, 255, .18); }

/* meters bar: BALANCE | BET | WIN */
.sd-meters { display: grid; grid-template-columns: 1fr 1fr 1.2fr; gap: 1px; padding: 0; overflow: hidden; background: var(--border); }
.sd-meter { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 10px 8px; background: var(--surface); min-width: 0; }
.sd-mk { font-size: 9px; font-weight: 800; letter-spacing: 1.5px; text-transform: uppercase; color: var(--dim); }
.sd-mv { font-size: clamp(15px, 3.2vw, 20px); font-weight: 800; color: var(--text); max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.sd-meter-win { background: linear-gradient(180deg, color-mix(in srgb, var(--sd-accent, #2E5BD0) 12%, var(--surface)), var(--surface)); }
.sd-meter-win .sd-mk { color: color-mix(in srgb, var(--sd-accent, #2E5BD0) 70%, var(--muted)); }
#sd-win { font-size: clamp(16px, 3.4vw, 22px); font-weight: 900; color: var(--muted); transition: color var(--t-base); line-height: 1; }
#sd-win.on { color: #fff; text-shadow: 0 0 18px var(--sd-winglow, rgba(46, 91, 208, .6)); }
.sd-winx { font-size: 11px; font-weight: 800; color: var(--sd-accent, var(--cyan)); }
#sd-win.bump { animation: sdBump .34s var(--ease); }

/* controls: bet stepper | presets | actions */
.sd-controls { display: flex; align-items: center; gap: var(--s3); flex-wrap: wrap; }
.sd-betctl { display: flex; align-items: stretch; gap: 6px; }
.sd-step { width: 40px; border: 1px solid var(--border-2); border-radius: var(--r-btn); background: var(--surface-2); color: var(--text); font-size: 22px; font-weight: 700; cursor: pointer; transition: background var(--t-fast), transform var(--t-fast); }
.sd-step:hover { background: var(--surface-3); }
.sd-step:active { transform: scale(.92); }
.sd-betbox { display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 86px; padding: 4px 12px; border-radius: var(--r-btn); background: var(--base); border: 1px solid var(--border-2); }
.sd-betk { font-size: 8px; font-weight: 800; letter-spacing: 1.5px; text-transform: uppercase; color: var(--dim); }
.sd-betnum { font-size: 17px; font-weight: 800; color: var(--text); }
.sd-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.sd-chips button { padding: 8px 12px; border-radius: var(--r-btn); background: var(--surface-2); border: 1px solid var(--border-2); color: var(--text); font-weight: 700; font-size: 13px; cursor: pointer; transition: background var(--t-fast), transform var(--t-fast); }
.sd-chips button:hover { background: var(--surface-3); }
.sd-chips button:active { transform: scale(.94); }
.sd-actions { display: flex; align-items: center; gap: var(--s2); margin-left: auto; }
.sd-toggle { width: 46px; height: 46px; border-radius: 50%; background: var(--surface-2); border: 1px solid var(--border-2); color: var(--muted); cursor: pointer; display: grid; place-items: center; transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast); }
.sd-toggle:hover { background: var(--surface-3); color: var(--text); }
.sd-toggle.on { background: color-mix(in srgb, var(--sd-accent, #2E5BD0) 22%, transparent); border-color: var(--sd-accent, var(--violet)); color: #fff; }
.sd-toggle .ic { width: 20px; height: 20px; }

/* spin button — big circular gradient with progress ring */
.sd-spinbtn { position: relative; width: 100px; height: 100px; border: none; border-radius: 50%; cursor: pointer; color: #fff; font-weight: 900; font-size: 16px; letter-spacing: .5px; background: var(--grad); box-shadow: 0 12px 30px rgba(46, 91, 208, .45), inset 0 2px 6px rgba(255, 255, 255, .3); display: grid; place-items: center; transition: transform var(--t-fast), box-shadow var(--t-base); }
.sd-spinbtn:hover { box-shadow: 0 16px 38px rgba(46, 91, 208, .6), inset 0 2px 6px rgba(255, 255, 255, .35); }
.sd-spinbtn:active { transform: scale(.95); }
.sd-spintext { position: relative; z-index: 2; text-transform: uppercase; }
.sd-spinring { position: absolute; inset: 5px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, .28); border-top-color: rgba(255, 255, 255, .92); opacity: 0; }
.sd-spinbtn.spinning .sd-spinring { opacity: 1; animation: sdSpinRing .7s linear infinite; }
.sd-spinbtn.spinning { pointer-events: none; }
.sd-spinbtn.stopping { background: linear-gradient(135deg, #EF4444, #B91C1C); box-shadow: 0 12px 30px rgba(239, 68, 68, .5), inset 0 2px 6px rgba(255, 255, 255, .25); }
@keyframes sdSpinRing { to { transform: rotate(360deg); } }

/* autoplay panel */
.sd-autopanel { display: flex; align-items: center; gap: var(--s3); flex-wrap: wrap; padding: var(--s3); border: 1px solid var(--border-2); border-radius: var(--r-card); background: var(--surface); }
.sd-autolabel { font-size: 12px; font-weight: 800; letter-spacing: .5px; color: var(--muted); }
.sd-autoopts { display: flex; gap: 6px; flex-wrap: wrap; }
.sd-autoopts button { min-width: 44px; padding: 8px 10px; border-radius: var(--r-btn); background: var(--surface-2); border: 1px solid var(--border-2); color: var(--text); font-weight: 800; cursor: pointer; transition: background var(--t-fast); }
.sd-autoopts button.on { background: color-mix(in srgb, var(--sd-accent, #2E5BD0) 26%, transparent); border-color: var(--sd-accent, var(--violet)); color: #fff; }
#sd-autostart { margin-left: auto; }

/* paytable overlay */
.sd-paytable { position: absolute; inset: 0; z-index: 8; overflow-y: auto; padding: clamp(14px, 3vw, 24px); background: linear-gradient(180deg, rgba(8, 8, 14, .97), rgba(8, 8, 14, .99)); backdrop-filter: blur(4px); animation: ptIn .2s var(--ease); }
@keyframes ptIn { from { opacity: 0; } to { opacity: 1; } }
.pt-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.pt-head h3 { font-size: 20px; font-weight: 900; }
.pt-mech { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.pt-how { font-size: 13px; line-height: 1.5; color: var(--muted); margin-bottom: 14px; }
.pt-how b { color: var(--text); font-weight: 700; }
.pt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.pt-row { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: var(--r-btn); background: var(--surface); border: 1px solid var(--border); }
.pt-sym { width: 46px; height: 46px; flex: 0 0 46px; display: grid; place-items: center; }
.pt-sym .sym-svg { width: 100%; height: 100%; }
.pt-info { min-width: 0; }
.pt-name { font-size: 11px; font-weight: 800; letter-spacing: .5px; color: var(--muted); text-transform: uppercase; }
.pt-pays { display: flex; flex-direction: column; gap: 1px; font-size: 12px; }
.pt-pays span { display: flex; justify-content: space-between; gap: 8px; color: var(--muted); }
.pt-pays i { font-style: normal; color: var(--dim); }
.pt-pays b { color: var(--text); font-weight: 800; }
.pt-note { margin-top: 12px; font-size: 12.5px; line-height: 1.5; color: var(--muted); padding: 10px 12px; border-radius: var(--r-btn); background: var(--surface); border: 1px solid var(--border); }
.pt-note b { color: var(--gold); }
.pt-foot { margin-top: 12px; font-size: 11px; color: var(--dim); line-height: 1.5; }

.studio-foot { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); flex-wrap: wrap; }
.sd-trust { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.sd-trust .ic { color: var(--success); width: 14px; height: 14px; }

/* lobby/grid studio cards + row badge */
.gcard.gcard-studio { box-shadow: inset 0 0 0 1px rgba(245, 179, 1, .22); }
.row-badge, .badge-new { display: inline-block; margin-left: 8px; padding: 2px 8px; border-radius: var(--r-pill); font-size: 9px; font-weight: 800; letter-spacing: 1px; color: #1A1206; background: var(--gold); vertical-align: middle; }

@media (min-width: 760px) {
  .studio-wrap { max-width: 760px; margin-inline: auto; }
}
@media (prefers-reduced-motion: reduce) {
  .sd-drop, .sd-winc, .sd-flash, .sd-scatter, #sd-win.bump, .studio-banner.show .sd-banner-in, .studio-stage::before { animation: none !important; }
}

/* win-tier banners (escalating celebration) + gold bonus banners */
.studio-banner.tier-big .sd-banner-in { background: linear-gradient(135deg, #2E5BD0, #F4C13C); }
.studio-banner.tier-mega .sd-banner-in { background: linear-gradient(135deg, #D946EF, #F59E0B); }
.studio-banner.tier-epic .sd-banner-in { background: linear-gradient(135deg, #FACC15, #EF4444 55%, #D946EF); box-shadow: 0 22px 60px rgba(0,0,0,.6), inset 0 0 0 1px rgba(255,255,255,.45), 0 0 60px rgba(245,158,11,.4); }
.studio-banner.tier-epic .sd-banner-t { font-size: clamp(28px, 6.4vw, 52px); }
.studio-banner.tier-gold .sd-banner-in { background: linear-gradient(135deg, #FDE047, #F59E0B); }
.studio-banner.tier-gold .sd-banner-t, .studio-banner.tier-gold .sd-banner-s { color: #1A1206; text-shadow: none; }

/* keep the spin button centred + controls tidy on narrow phones */
@media (max-width: 540px) {
  .sd-controls { justify-content: center; }
  .sd-actions { margin-left: 0; width: 100%; justify-content: center; }
  .sd-betctl, .sd-chips { justify-content: center; }
  .pt-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
}

/* ===================== VOLT ROULETTE ===================== */
.rl-wrap { display: grid; gap: var(--s3); max-width: 980px; margin-inline: auto; }
.rl-top { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: var(--s3); align-items: stretch; }
@media (max-width: 720px) { .rl-top { grid-template-columns: minmax(0, 1fr); } }

.rl-wheelbox { display: grid; place-items: center; padding: clamp(12px, 2.4vw, 24px); background: radial-gradient(120% 100% at 50% -10%, #16161f, #08080e); }
.rl-wheel { position: relative; width: 100%; max-width: 360px; aspect-ratio: 1; }
.rl-wheel-svg { width: 100%; height: 100%; display: block; filter: drop-shadow(0 14px 32px rgba(0, 0, 0, .7)); }
.rl-rotor, .rl-turret, .rl-ball-orbit { transform-origin: 100px 100px; }
/* the ball rides the rim (cy 14.5) while orbiting; on settle it drops inward into the pocket band */
.rl-ball { transition: transform .55s cubic-bezier(.34,1.45,.5,1); }
.rl-ball.settled { transform: translateY(11px); }
/* result chip overlapping the bottom of the wheel (like the reference) */
.rl-wheel-res { position: absolute; bottom: 4%; left: 50%; transform: translateX(-50%); min-width: 44px; padding: 6px 10px; border-radius: 12px; font-size: clamp(20px, 5vw, 30px); font-weight: 900; color: #fff; text-align: center; z-index: 5; box-shadow: 0 8px 20px rgba(0, 0, 0, .55); animation: rlResPop .3s var(--ease); }
.rl-wheel-res.c-red { background: linear-gradient(180deg, #EE3F52, #C01D30); }
.rl-wheel-res.c-black { background: linear-gradient(180deg, #2C2C3A, #16161F); }
.rl-wheel-res.c-green { background: linear-gradient(180deg, #1FD389, #0C9A5E); }
@keyframes rlResPop { 0% { transform: translateX(-50%) scale(.5); opacity: 0; } 100% { transform: translateX(-50%) scale(1); opacity: 1; } }

.rl-side-panel { display: flex; flex-direction: column; gap: var(--s3); }
.rl-result { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 120px; border-radius: var(--r-card); background: var(--surface); border: 1px solid var(--border); }
.rl-result .rl-rnum { font-size: clamp(40px, 12vw, 72px); font-weight: 900; line-height: 1; }
.rl-result .rl-rtext { font-size: 14px; font-weight: 700; color: var(--muted); }
.rl-result.c-red .rl-rnum { color: #FF5A6A; text-shadow: 0 0 24px rgba(220, 38, 56, .6); }
.rl-result.c-black .rl-rnum { color: #E8E8F0; text-shadow: 0 0 24px rgba(255, 255, 255, .25); }
.rl-result.c-green .rl-rnum { color: #34D399; text-shadow: 0 0 24px rgba(16, 185, 129, .6); }
.rl-result.win { border-color: rgba(245, 179, 1, .5); box-shadow: 0 0 30px rgba(245, 179, 1, .18); }
.rl-result.win .rl-rtext { color: var(--gold); }
.rl-recent { display: flex; gap: 5px; flex-wrap: wrap; }
.rl-rp { min-width: 24px; height: 24px; padding: 0 5px; display: inline-grid; place-items: center; border-radius: 6px; font-size: 12px; font-weight: 800; color: #fff; }
.rl-rp.c-red { background: #B91C2C; } .rl-rp.c-black { background: #2A2A38; } .rl-rp.c-green { background: #0E9F6E; }

/* board */
.rl-boardwrap { overflow-x: auto; padding: clamp(8px, 1.6vw, 14px); }
.rl-board { position: relative; display: grid; grid-template-columns: 0.85fr repeat(12, minmax(24px, 1fr)) 0.95fr; grid-auto-rows: minmax(30px, auto); gap: 4px; min-width: 320px; }
/* inside-bet hit-targets overlaid on cell edges/corners (splits + corners + zero splits) */
.rl-inslayer { position: absolute; inset: 0; z-index: 6; pointer-events: none; }
.rl-ins { position: absolute; pointer-events: auto; border: none; background: transparent; padding: 0; border-radius: 7px; cursor: pointer; transition: background var(--t-fast), box-shadow var(--t-fast); }
.rl-ins-corner { border-radius: 50%; }
.rl-ins:hover { background: rgba(245, 179, 1, .4); box-shadow: 0 0 0 1px rgba(245, 179, 1, .7); }
.rl-ins.rl-win { background: rgba(255, 255, 255, .25); box-shadow: 0 0 0 2px rgba(255, 255, 255, .75); z-index: 7; }
.rl-ins-stack { position: absolute; inset: 0; display: none; place-items: center; color: #1A1206; font-size: 8px; font-weight: 900; }
.rl-ins-stack.on { display: grid; }
.rl-ins-stack.on::before { content: ''; position: absolute; width: 17px; height: 17px; border-radius: 50%; background: radial-gradient(circle at 38% 32%, #FFE9A8, #F59E0B); border: 1.5px dashed rgba(255, 255, 255, .75); box-shadow: 0 2px 5px rgba(0, 0, 0, .55); z-index: -1; }
.rl-cell { position: relative; display: grid; place-items: center; border: none; border-radius: 6px; color: #fff; font-weight: 800; font-size: clamp(11px, 2.4vw, 14px); cursor: pointer; padding: 6px 2px; transition: transform var(--t-fast), box-shadow var(--t-fast), filter var(--t-fast); }
.rl-cell:hover { filter: brightness(1.15); }
.rl-cell:active { transform: scale(.95); }
.rl-cell.c-red { background: linear-gradient(180deg, #EC3F52, #C01D30); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18); }
.rl-cell.c-black { background: linear-gradient(180deg, #2A2A38, #15151F); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12); }
.rl-cell.c-green { background: linear-gradient(180deg, #1FD389, #0C9A5E); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2); }
.rl-zero { grid-column: 1; font-size: clamp(14px, 3vw, 20px); }
.rl-side { background: var(--surface-2); color: var(--muted); font-size: 11px; }
.rl-out { background: var(--surface-2); color: var(--text); font-size: clamp(10px, 2.2vw, 13px); letter-spacing: .3px; }
.rl-diamond { font-size: 18px; }
.rl-diamond.c-red { color: #FF6675; background: var(--surface-2); }
.rl-diamond.c-black { color: #cfcfe0; background: var(--surface-2); }
.rl-cl { position: relative; z-index: 1; pointer-events: none; }
.rl-stack { position: absolute; inset: 0; display: none; place-items: center; z-index: 2; pointer-events: none; }
.rl-stack.on { display: grid; }
.rl-stack.on::before { content: ''; position: absolute; width: 22px; height: 22px; border-radius: 50%; background: radial-gradient(circle at 38% 32%, #FFE9A8, #F59E0B); border: 2px dashed rgba(255, 255, 255, .7); box-shadow: 0 2px 6px rgba(0, 0, 0, .5); }
.rl-stack.on { color: #1A1206; font-size: 10px; font-weight: 900; text-shadow: 0 1px 0 rgba(255, 255, 255, .4); }
.rl-cell.rl-hit { box-shadow: 0 0 0 3px var(--gold), 0 0 18px rgba(245, 179, 1, .8); z-index: 4; animation: rlHit 1s ease-in-out infinite alternate; }
.rl-cell.rl-win { box-shadow: 0 0 0 2px rgba(255, 255, 255, .7), 0 0 14px rgba(255, 255, 255, .4); z-index: 3; }
@keyframes rlHit { from { box-shadow: 0 0 0 3px var(--gold), 0 0 12px rgba(245, 179, 1, .6); } to { box-shadow: 0 0 0 3px #FFE9A8, 0 0 26px rgba(245, 179, 1, .95); } }

/* controls */
.rl-controls { display: flex; flex-direction: column; gap: var(--s3); }
.rl-chiprow { display: flex; align-items: center; gap: var(--s3); }
.rl-chiplabel { font-size: 11px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; color: var(--dim); }
.rl-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.rl-chip { width: 46px; height: 46px; border-radius: 50%; border: 2px dashed rgba(255, 255, 255, .55); background: radial-gradient(circle at 38% 32%, color-mix(in srgb, var(--c) 70%, #fff), var(--c)); color: #0A0A0F; font-weight: 900; font-size: 13px; cursor: pointer; display: grid; place-items: center; transition: transform var(--t-fast), box-shadow var(--t-fast); }
.rl-chip:hover { transform: translateY(-2px); }
.rl-chip.on { box-shadow: 0 0 0 3px #fff, 0 6px 16px rgba(0, 0, 0, .5); transform: translateY(-2px) scale(1.04); }
.rl-actions { display: flex; align-items: center; gap: var(--s2); flex-wrap: wrap; }
.rl-act { padding: 10px 16px; }
.rl-totalbox { display: flex; flex-direction: column; align-items: flex-start; padding: 4px 14px; border-radius: var(--r-btn); background: var(--base); border: 1px solid var(--border-2); margin-left: auto; }
.rl-tk { font-size: 8px; font-weight: 800; letter-spacing: 1.5px; text-transform: uppercase; color: var(--dim); }
.rl-tv { font-size: 17px; font-weight: 800; }
.rl-spinbtn { min-width: 150px; }
.rl-spinbtn.spinning { opacity: .75; pointer-events: none; }
@media (prefers-reduced-motion: reduce) { .rl-cell.rl-hit { animation: none !important; } }

/* roulette — manual/autoplay tabs, autoplay panel, re-bet/double */
.rl-controls { position: relative; }
.rl-modes { display: inline-flex; gap: 2px; padding: 3px; border-radius: var(--r-btn); background: var(--base); border: 1px solid var(--border-2); align-self: flex-start; }
.rl-mode { padding: 7px 18px; border: none; border-radius: 9px; background: transparent; color: var(--muted); font-weight: 700; font-size: 13px; cursor: pointer; transition: background var(--t-fast), color var(--t-fast); }
.rl-mode.on { background: var(--surface-3); color: var(--text); }
.rl-autopanel { display: flex; align-items: center; gap: var(--s3); flex-wrap: wrap; }
.rl-autolabel { font-size: 11px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; color: var(--dim); }
.rl-autoopts { display: flex; gap: 6px; flex-wrap: wrap; }
.rl-autoopts button { min-width: 44px; padding: 8px 10px; border-radius: var(--r-btn); background: var(--surface-2); border: 1px solid var(--border-2); color: var(--text); font-weight: 800; cursor: pointer; transition: background var(--t-fast); }
.rl-autoopts button.on { background: color-mix(in srgb, var(--success) 26%, transparent); border-color: var(--success); color: #fff; }
.rl-autocount { position: absolute; top: 10px; right: 12px; padding: 4px 12px; border-radius: var(--r-pill); font-size: 11px; font-weight: 800; color: #fff; background: rgba(16, 185, 129, .22); border: 1px solid rgba(16, 185, 129, .5); }
.rl-spinbtn.spinning { opacity: .8; }

/* roulette racetrack (call bets + neighbours) */
.rl-trackrow { display: flex; justify-content: center; }
.rl-tracktoggle { display: inline-flex; align-items: center; gap: 7px; padding: 9px 18px; border-radius: var(--r-pill); background: var(--surface-2); border: 1px solid var(--border-2); color: var(--muted); font-weight: 700; font-size: 13px; cursor: pointer; transition: background var(--t-fast), color var(--t-fast); }
.rl-tracktoggle .ic { width: 15px; height: 15px; }
.rl-tracktoggle.on { background: color-mix(in srgb, var(--success) 22%, transparent); border-color: var(--success); color: #fff; }
.rl-track { padding: clamp(8px, 1.6vw, 14px); }
.rt-svg { width: 100%; max-width: 520px; display: block; margin: 0 auto; }
.rt-num { cursor: pointer; }
.rt-num circle { stroke: rgba(0, 0, 0, .45); stroke-width: .5; transition: filter var(--t-fast); }
.rt-num text { font-size: 9px; font-weight: 800; fill: #fff; pointer-events: none; }
.rt-num.c-red circle { fill: #D8273B; } .rt-num.c-black circle { fill: #1E1E2A; } .rt-num.c-green circle { fill: #12B886; }
.rt-num:hover circle { filter: brightness(1.3); }
.rt-num:hover { transform-box: fill-box; }
.rt-calls { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; max-width: 420px; margin: 10px auto 0; }
.rt-calls button { padding: 10px 12px; border-radius: var(--r-btn); background: var(--surface-2); border: 1px solid var(--border-2); color: var(--text); font-weight: 700; font-size: 13px; cursor: pointer; transition: background var(--t-fast), transform var(--t-fast); }
.rt-calls button:hover { background: var(--surface-3); }
.rt-calls button:active { transform: scale(.96); }

/* roulette session stats panel */
.rl-stats { padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.rl-stats-head { display: flex; align-items: baseline; justify-content: space-between; }
.rl-stats-head > span:first-child { font-size: 10px; font-weight: 800; letter-spacing: 1.5px; text-transform: uppercase; color: var(--dim); }
.rl-stats-profit { font-size: 18px; font-weight: 800; color: var(--muted); }
.rl-spark { width: 100%; height: 34px; display: block; }
.rl-stats-row { display: flex; flex-wrap: wrap; gap: 10px; font-size: 11px; color: var(--muted); }
.rl-stats-row b { color: var(--text); margin-left: 3px; }
.rl-stats-row .cr-hi { color: var(--success); } .rl-stats-row .cr-lo { color: var(--danger); }

/* ===================== LIVE SOCIAL: bet feed ticker + chat ===================== */
.feed-strip { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 8px 10px; border-radius: var(--r-card); background: var(--surface); border: 1px solid var(--border); }
.feed-live { display: inline-flex; align-items: center; gap: 6px; flex: 0 0 auto; font-size: 10px; font-weight: 800; letter-spacing: 1px; color: var(--success); }
.feed-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 0 rgba(16, 185, 129, .6); animation: feedPulse 1.6s infinite; }
@keyframes feedPulse { 0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, .55); } 70% { box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); } 100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); } }
.feed-ticker { display: flex; gap: 6px; overflow-x: auto; min-width: 0; scrollbar-width: none; }
.feed-ticker::-webkit-scrollbar { display: none; }
.feed-item { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px; padding: 5px 9px; border-radius: var(--r-pill); background: var(--surface-2); border: 1px solid var(--border-2); font-size: 11px; animation: feedIn .35s var(--ease); }
@keyframes feedIn { from { opacity: 0; transform: translateX(-8px); } to { opacity: 1; transform: none; } }
.feed-item b { color: var(--text); font-weight: 700; }
.feed-item .fi-game { color: var(--muted); }
.feed-item i { font-style: normal; font-weight: 800; }
.feed-item.fi-win i { color: var(--success); } .feed-item.fi-lo i { color: var(--dim); } .feed-item.fi-hi { border-color: rgba(245, 179, 1, .5); } .feed-item.fi-hi i { color: var(--gold); }

.chat-panel { position: fixed; top: var(--topbar-h); right: 0; bottom: 0; width: min(340px, 92vw); z-index: 60; display: flex; flex-direction: column; background: var(--surface); border-left: 1px solid var(--border-2); box-shadow: -16px 0 40px rgba(0, 0, 0, .5); transform: translateX(105%); transition: transform var(--t-base) var(--ease); }
.chat-panel.open { transform: none; }
.chat-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border-bottom: 1px solid var(--border); }
.chat-title { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; }
.chat-messages { flex: 1; overflow-y: auto; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.chat-empty { color: var(--dim); font-size: 13px; text-align: center; margin: auto; }
.chat-msg { max-width: 92%; padding: 7px 11px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); align-self: flex-start; }
.chat-msg.mine { align-self: flex-end; background: color-mix(in srgb, var(--violet) 22%, var(--surface-2)); border-color: rgba(46, 91, 208, .4); }
.chat-user { display: block; font-size: 10px; font-weight: 800; color: var(--cyan); margin-bottom: 1px; }
.chat-msg.mine .chat-user { color: #FCE08A; }
.chat-text { font-size: 13.5px; color: var(--text); word-break: break-word; }
.chat-compose { display: flex; gap: 8px; padding: 12px 14px 6px; border-top: 1px solid var(--border); }
.chat-compose input { flex: 1; padding: 11px 14px; border-radius: var(--r-btn); background: var(--base); border: 1px solid var(--border-2); color: var(--text); font-size: 14px; }
.chat-compose .btn { padding: 0 16px; }
.chat-rules { font-size: 10px; color: var(--dim); text-align: center; padding: 4px 14px 12px; }
@media (min-width: 1100px) { body.chat-on main { margin-right: 340px; } }

/* promotions & races */
.promos-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--s3); }
.promo-card { position: relative; overflow: hidden; padding: 18px; border-radius: var(--r-card); border: 1px solid var(--border-2); display: flex; flex-direction: column; gap: 8px; }
.promo-card h3 { font-size: 17px; font-weight: 800; }
.promo-card p { font-size: 13px; color: var(--muted); line-height: 1.45; flex: 1; }
.promo-card .btn { align-self: flex-start; margin-top: 4px; }
.promo-tag { align-self: flex-start; font-size: 10px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; padding: 3px 9px; border-radius: var(--r-pill); }
.promo-welcome { background: radial-gradient(120% 100% at 0% 0%, rgba(46, 91, 208, .25), transparent 60%), var(--surface); }
.promo-welcome .promo-tag { background: rgba(46, 91, 208, .25); color: #FCE08A; }
.promo-race { background: radial-gradient(120% 100% at 0% 0%, rgba(245, 179, 1, .2), transparent 60%), var(--surface); }
.promo-race .promo-tag { background: rgba(245, 179, 1, .2); color: var(--gold); }
.promo-refer { background: radial-gradient(120% 100% at 0% 0%, rgba(16, 185, 129, .2), transparent 60%), var(--surface); }
.promo-refer .promo-tag { background: rgba(16, 185, 129, .2); color: var(--success); }


/* ============================================================================
   LIMBO ROCKET — drop-in. Append to styles.css (after the existing dice block).
   Reuses tokens already defined in :root (--gold, --gold-bright, --gold-deep,
   --royal, --crimson, --base, --success, --danger, --ease, --s*, --r-*).
   The stage <div> keeps its existing classes .card.stage.dice-stage so layout,
   grid and the wide-screen live-rail are untouched.
   ============================================================================ */

/* The limbo stage gets a dedicated modifier so the rocket fills it.
   Add class "limbo-stage" to the stage div (see integration). */
.limbo-stage { gap: var(--s3); }

/* ---- altitude gauge: the night-sky shaft the rocket climbs ---- */
.lk-gauge {
  position: relative; width: 100%; max-width: 360px; margin: 0 auto;
  aspect-ratio: 3 / 4; min-height: 300px; border-radius: 14px; overflow: hidden;
  background:
    radial-gradient(120% 78% at 50% 112%, #18285f 0%, #0c1336 36%, #07070f 74%);
  border: 1px solid rgba(244, 193, 60, .16);
  box-shadow: inset 0 0 70px rgba(0, 0, 0, .62), 0 10px 30px rgba(0, 0, 0, .45);
  isolation: isolate;
}
/* starfield — pure CSS, drifts slowly downward to sell upward motion */
.lk-gauge::before {
  content: ""; position: absolute; inset: -10% 0 0 0; z-index: 0; opacity: .55;
  background-image:
    radial-gradient(1px 1px at 18% 22%, #fff, transparent),
    radial-gradient(1px 1px at 72% 14%, #cfe0ff, transparent),
    radial-gradient(1.4px 1.4px at 42% 58%, #fff, transparent),
    radial-gradient(1px 1px at 86% 70%, #fff, transparent),
    radial-gradient(1px 1px at 12% 82%, #bcd, transparent),
    radial-gradient(1.2px 1.2px at 60% 40%, #fff, transparent),
    radial-gradient(1px 1px at 32% 90%, #fff, transparent),
    radial-gradient(1.3px 1.3px at 90% 34%, #e8f0ff, transparent);
  background-size: 100% 50%;
}
.lk-gauge.launching::before { animation: lkStars 1.1s linear infinite; }
@keyframes lkStars { to { background-position: 0 50%; } }

/* faint altitude gridlines */
.lk-grid { position: absolute; left: 0; right: 0; height: 1px; z-index: 1;
  background: linear-gradient(90deg, transparent, rgba(120, 150, 220, .20), transparent); }

/* ---- target line: the multiplier the player needs to clear ---- */
.lk-target { position: absolute; left: 8px; right: 8px; z-index: 4;
  border-top: 2px dashed var(--gold);
  box-shadow: 0 0 14px rgba(244, 193, 60, .5);
  transition: top .35s var(--ease); top: 40%; }
.lk-target .lk-tflag {
  position: absolute; right: 0; top: -10px; font-size: 12px; font-weight: 700;
  color: var(--base); background: var(--grad);
  padding: 2px 8px; border-radius: var(--r-pill); line-height: 1.3;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .4);
}
.lk-target .tlabel { position: absolute; left: 0; top: -18px; font-size: 10px;
  letter-spacing: .08em; text-transform: uppercase; color: var(--gold-deep); }
.lk-gauge.win .lk-target { border-top-color: var(--success);
  box-shadow: 0 0 18px rgba(16, 185, 129, .6); }

/* ---- launch pad ---- */
.lk-pad { position: absolute; left: 50%; bottom: 10px; z-index: 3;
  width: 96px; height: 12px; transform: translateX(-50%); border-radius: 4px;
  background: linear-gradient(#2a2f45, #11131f);
  box-shadow: 0 4px 12px rgba(0, 0, 0, .6), inset 0 1px 0 rgba(255, 255, 255, .08); }
.lk-pad::before, .lk-pad::after { content: ""; position: absolute; bottom: -7px;
  width: 6px; height: 8px; background: linear-gradient(#1c2030, #0c0d16); border-radius: 0 0 2px 2px; }
.lk-pad::before { left: 12px; } .lk-pad::after { right: 12px; }

/* ---- the rocket craft: JS drives translateY via --lk-y ---- */
.lk-rocket { position: absolute; left: 50%; bottom: 22px; z-index: 6;
  width: 64px; height: 142px;
  transform: translate(-50%, var(--lk-y, 0)) rotate(var(--lk-rot, 0deg));
  filter: drop-shadow(0 8px 18px rgba(46, 91, 208, .5));
  transition: filter var(--t-base) var(--ease); }
.lk-svg { display: block; width: 100%; height: 100%; }

/* idle bob before launch */
.lk-gauge.idle .lk-rocket { animation: lkBob 2.6s ease-in-out infinite; }
@keyframes lkBob { 50% { transform: translate(-50%, calc(var(--lk-y, 0) - 5px)) rotate(var(--lk-rot, 0deg)); } }

/* exhaust flame — hidden at rest, ignites during climb */
.lk-flame { opacity: 0; transform-origin: 50% 38%; transition: opacity var(--t-base) var(--ease); }
.lk-gauge.launching .lk-rocket .lk-flame,
.lk-gauge.win .lk-rocket .lk-flame { opacity: 1; animation: lkFlicker .09s steps(2) infinite; }
@keyframes lkFlicker { 0% { transform: scaleY(1) scaleX(1); } 100% { transform: scaleY(1.32) scaleX(.82); } }

/* WIN: rocket glows gold and rips off the top of the frame */
.lk-gauge.win .lk-rocket { filter: drop-shadow(0 0 26px rgba(244, 193, 60, .9)) drop-shadow(0 0 8px rgba(252, 224, 138, .8)); }
.lk-gauge.win .lk-rocket { animation: lkSoar 1s cubic-bezier(.5, 0, .8, 0) forwards; }
@keyframes lkSoar { to { transform: translate(-50%, calc(var(--lk-y, 0) - 220px)) rotate(0deg); } }
/* gold shockwave ring on win */
.lk-burst { position: absolute; left: 50%; z-index: 5; width: 40px; height: 40px;
  border-radius: 50%; transform: translate(-50%, -50%) scale(.2); opacity: 0; pointer-events: none;
  border: 3px solid var(--gold-bright);
  box-shadow: 0 0 26px rgba(244, 193, 60, .8), inset 0 0 18px rgba(244, 193, 60, .5); }
.lk-gauge.win .lk-burst { animation: lkBurst .7s var(--ease) forwards; }
@keyframes lkBurst { 0% { opacity: 1; transform: translate(-50%, -50%) scale(.2); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(4.6); } }

/* BUST: rocket flares crimson, jolts, then tumbles + falls out of frame */
.lk-gauge.bust .lk-rocket { filter: drop-shadow(0 0 22px rgba(225, 29, 42, .85)); }
.lk-gauge.bust .lk-rocket { animation: lkBust 1.15s cubic-bezier(.3, .1, .7, 1) forwards; }
@keyframes lkBust {
  0%   { transform: translate(-50%, var(--lk-y, 0)) rotate(0deg); }
  10%  { transform: translate(-50%, calc(var(--lk-y, 0) - 8px)) rotate(-6deg) scale(1.08); }
  30%  { transform: translate(-50%, calc(var(--lk-y, 0) + 6px)) rotate(14deg); }
  100% { transform: translate(-50%, calc(var(--lk-y, 0) + 320px)) rotate(150deg); }
}
/* crimson explosion flash on bust */
.lk-boom { position: absolute; left: 50%; z-index: 7; width: 26px; height: 26px;
  border-radius: 50%; transform: translate(-50%, -50%) scale(.2); opacity: 0; pointer-events: none;
  background: radial-gradient(circle, #FCE08A 0%, #F4C13C 22%, #E11D2A 55%, rgba(225,29,42,0) 72%); }
.lk-gauge.bust .lk-boom { animation: lkBoom .55s var(--ease) forwards; }
@keyframes lkBoom { 0% { opacity: 1; transform: translate(-50%, -50%) scale(.2); }
  55% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -50%) scale(5); } }

/* whole-stage screen flash tint */
.lk-gauge.win::after, .lk-gauge.bust::after { content: ""; position: absolute; inset: 0; z-index: 8;
  pointer-events: none; opacity: 0; }
.lk-gauge.win::after  { background: radial-gradient(60% 60% at 50% 50%, rgba(244,193,60,.28), transparent); animation: lkFlash .6s var(--ease); }
.lk-gauge.bust::after { background: radial-gradient(60% 60% at 50% 50%, rgba(225,29,42,.30), transparent); animation: lkFlash .45s var(--ease); }
@keyframes lkFlash { 0% { opacity: 1; } 100% { opacity: 0; } }

/* particle canvas (sparks/debris) overlays the whole gauge */
.lk-fx { position: absolute; inset: 0; z-index: 9; pointer-events: none; }

/* ---- cockpit readout: the existing #l-result, restyled as the HUD ---- */
.limbo-stage .lk-hud { position: absolute; left: 0; right: 0; top: 12px; z-index: 10;
  text-align: center; pointer-events: none; }
.limbo-stage #l-result.rollnum {
  font-size: clamp(34px, 8vw, 56px); color: var(--gold-bright);
  text-shadow: 0 0 26px rgba(244, 193, 60, .5), 0 2px 0 rgba(0, 0, 0, .4); }
.limbo-stage #l-result.rollnum.win  { color: var(--gold-bright); text-shadow: 0 0 34px rgba(244, 193, 60, .8); }
.limbo-stage #l-result.rollnum.lose { color: var(--danger); text-shadow: 0 0 30px rgba(225, 29, 42, .55); }
.limbo-stage #l-result.rollnum.idle { color: var(--gold); opacity: .85; text-shadow: 0 0 18px rgba(244, 193, 60, .3); }
.lk-hud .lk-cap { font-size: 10px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--gold-deep); margin-top: 2px; }

/* recent pills sit below the gauge, untouched markup (#l-recent) */
.limbo-stage .recent-pills { justify-content: center; }

@media (max-width: 880px) { .lk-gauge { max-width: 320px; } }

/* ---- reduced motion: no climb/flicker/tumble; keep static clarity ---- */
@media (prefers-reduced-motion: reduce) {
  .lk-gauge.idle .lk-rocket,
  .lk-gauge.launching::before,
  .lk-flame { animation: none; }
  .lk-gauge.win .lk-rocket  { animation: none; filter: drop-shadow(0 0 22px rgba(244, 193, 60, .85)); }
  .lk-gauge.bust .lk-rocket { animation: none; filter: drop-shadow(0 0 18px rgba(225, 29, 42, .8)); }
  .lk-gauge.win .lk-burst, .lk-gauge.bust .lk-boom,
  .lk-gauge.win::after, .lk-gauge.bust::after { animation: none; opacity: 0; }
  .lk-gauge.win .lk-rocket .lk-flame { opacity: 1; }
}

/* session panel internals (replaces the live-bets rail content) */
.game-rail .rail-head { display: flex; align-items: center; justify-content: space-between; }
.rail-reset { color: var(--muted); font-size: 16px; line-height: 1; padding: 1px 7px; border-radius: 6px; }
.rail-reset:hover { color: var(--text); background: var(--surface-2); }
.rail-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--border); border-bottom: 1px solid var(--border); flex: none; }
.rail-stats .rs { background: var(--surface); padding: 9px 12px; display: flex; flex-direction: column; gap: 2px; }
.rail-stats .rs-k { font-size: 9.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--dim); }
.rail-stats .rs-v { font-size: 15px; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--text); }
.rail-stats .sess-profit.up { color: var(--success); }
.rail-stats .sess-profit.down { color: var(--danger); }
.rail-sub { padding: 9px 12px 3px; font-size: 9.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--dim); flex: none; }
.game-rail .rail-x.lose { color: var(--danger); }

/* ===== styles.css — Plinko (append near the dice/limbo stage rules) ===== */

.plinko-stage { display: grid; gap: var(--s3); padding: var(--s5) var(--s5) var(--s4); align-content: start; }

.pk-board {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 0.82;
  min-height: 300px;
  border-radius: var(--r-card);
  background:
    radial-gradient(120% 90% at 50% -10%, rgba(46, 91, 208, .16), transparent 60%),
    linear-gradient(180deg, var(--surface-2), var(--surface-3));
  border: 1px solid var(--border);
  overflow: hidden;
}
.pk-pegs { position: absolute; inset: 0; width: 100%; height: 100%; }

.pk-ball {
  position: absolute; top: 0; left: 0;
  width: 21px; height: 21px; border-radius: 50%;
  background: radial-gradient(circle at 33% 27%, #FFFFFF, var(--gold-bright) 26%, var(--gold) 58%, var(--gold-deep));
  box-shadow: 0 0 20px rgba(244, 193, 60, .9), 0 0 7px rgba(255, 248, 220, .7), inset 0 -3px 5px rgba(120, 80, 10, .55), inset 0 2px 3px rgba(255, 255, 255, .8);
  opacity: 0; pointer-events: none; will-change: transform;
  transform: translate(-50%, -50%);
}
/* multiplier buckets row */
.pk-buckets {
  display: grid;
  grid-template-columns: repeat(var(--pk-cols, 17), 1fr);
  gap: 3px;
}
.pk-bucket {
  text-align: center;
  font: 700 11px/1.1 var(--font-num, inherit);
  font-variant-numeric: tabular-nums;
  padding: 7px 1px;
  border-radius: 8px;
  color: #0A0A0F;
  background: var(--surface-3);
  border: 1px solid var(--border-2);
  transition: transform var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease), filter var(--t-fast) var(--ease);
}
@media (max-width: 560px) { .pk-bucket { font-size: 9px; padding: 6px 0; } }

.pk-bucket.pk-cold { background: linear-gradient(180deg, #f06472, var(--crimson)); color: #fff; }
.pk-bucket.pk-even { background: linear-gradient(180deg, #5b82e8, var(--royal)); color: #fff; }
.pk-bucket.pk-warm { background: linear-gradient(180deg, var(--gold-bright), var(--gold)); }
.pk-bucket.pk-hot  { background: linear-gradient(180deg, var(--gold-bright), var(--gold-deep)); box-shadow: 0 0 10px rgba(244, 193, 60, .35); }

.pk-bucket.flash {
  transform: translateY(3px) scale(1.06);
  box-shadow: 0 0 0 2px var(--gold-bright), 0 0 22px rgba(244, 193, 60, .9);
  filter: brightness(1.18);
  animation: pkPop .5s var(--ease);
}
@keyframes pkPop {
  0% { transform: translateY(0) scale(1); }
  40% { transform: translateY(4px) scale(1.12); }
  100% { transform: translateY(3px) scale(1.06); }
}

@media (prefers-reduced-motion: reduce) {
  .pk-ball { transition: none; }
  .pk-bucket, .pk-bucket.flash { transition: none; animation: none; }
}

/* ===== apps/casino/public/styles.css — append at end. Keno board + paytable ===== */
.keno-stage { display: grid; gap: var(--s5); padding: var(--s5) var(--s5) var(--s4); }

/* small ghost buttons used for Auto-pick / Clear */
.btn-sm { padding: 8px 14px; font-size: 13px; border-radius: var(--r-btn); width: auto; }
.k-pickrow { display: flex; gap: var(--s2); }
.k-pickrow .btn-sm { flex: 1; }

/* 8×5 number grid */
.keno-grid {
  display: grid; grid-template-columns: repeat(8, 1fr); gap: 8px;
}
@media (max-width: 520px) { .keno-grid { gap: 6px; } }

.keno-cell {
  position: relative; aspect-ratio: 1 / 1; min-height: 0;
  display: grid; place-items: center;
  border-radius: 12px; cursor: pointer;
  background: var(--surface-2); border: 1px solid var(--border-2);
  color: var(--text); font: inherit;
  transition: transform var(--t-fast) var(--ease), background var(--t-base) var(--ease),
              border-color var(--t-base) var(--ease), box-shadow var(--t-base) var(--ease), color var(--t-base) var(--ease);
}
.keno-cell .kc-n {
  font-variant-numeric: tabular-nums; font-weight: 700;
  font-size: clamp(13px, 2.4vw, 17px); letter-spacing: .01em;
}
.keno-cell:hover { transform: translateY(-2px); border-color: var(--gold-deep); box-shadow: 0 6px 16px rgba(0, 0, 0, .4); }
.keno-cell:active { transform: translateY(0) scale(.95); }
.keno-cell:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* selected by the player */
.keno-cell.picked {
  background: linear-gradient(180deg, var(--royal) 0%, var(--royal-deep) 100%);
  border-color: #5d83e6; color: #eaf1ff;
  box-shadow: 0 4px 14px rgba(46, 91, 208, .42), inset 0 1px 0 rgba(255, 255, 255, .18);
}

/* a number the engine drew that the player did NOT pick — subtle marker dot */
.keno-cell.drawn:not(.picked)::after {
  content: ""; position: absolute; right: 6px; top: 6px;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--border-2); box-shadow: 0 0 0 2px var(--surface);
}
.keno-cell.drawn { animation: kenoPop var(--t-base) var(--ease); }

/* a HIT — picked AND drawn: glossy royal-gold */
.keno-cell.hit {
  background: linear-gradient(180deg, var(--gold-bright) 0%, var(--gold) 45%, var(--gold-deep) 100%);
  border-color: var(--gold-bright); color: #2a1c02;
  box-shadow: 0 0 0 1px var(--gold-bright), 0 6px 20px rgba(244, 193, 60, .5), inset 0 1px 0 rgba(255, 255, 255, .5);
  animation: kenoHit 460ms var(--ease);
}
/* a picked number that MISSED — dim it */
.keno-cell.miss { opacity: .4; filter: saturate(.7); }
/* gold burst ring on a HIT — the reward pop */
.keno-cell.hit::before {
  content: ''; position: absolute; inset: -3px; border-radius: 14px;
  border: 2px solid var(--gold-bright); opacity: 0; pointer-events: none;
  animation: kenoHitBurst .52s var(--ease);
}
@keyframes kenoHitBurst { 0% { opacity: .85; transform: scale(.7); } 100% { opacity: 0; transform: scale(1.55); } }

@keyframes kenoPop { 0% { transform: scale(.82); } 60% { transform: scale(1.06); } 100% { transform: scale(1); } }
@keyframes kenoHit {
  0% { transform: scale(.7) rotate(-8deg); }
  55% { transform: scale(1.18) rotate(4deg); }
  100% { transform: scale(1) rotate(0); }
}

/* dynamic paytable strip */
.keno-pay { border: 1px solid var(--border); border-radius: var(--r-card); background: var(--surface); overflow: hidden; }
.kp-empty { padding: var(--s4); text-align: center; color: var(--text-dim, #8a8aa0); font-size: 13px; }
.kp-head {
  display: flex; justify-content: space-between; padding: 10px var(--s4);
  border-bottom: 1px solid var(--border);
  font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--gold);
}
.kp-rows { display: flex; flex-wrap: wrap; gap: 6px; padding: var(--s3) var(--s4); }
.kp-row {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 12px; border-radius: var(--r-pill, 999px);
  background: var(--surface-2); border: 1px solid var(--border-2);
  transition: background var(--t-base) var(--ease), border-color var(--t-base) var(--ease), box-shadow var(--t-base) var(--ease);
}
.kp-row .kp-h { font-weight: 700; font-variant-numeric: tabular-nums; color: var(--text); }
.kp-row .kp-h::after { content: " hit"; font-weight: 500; color: var(--text-dim, #8a8aa0); font-size: 11px; }
.kp-row .kp-m { font-variant-numeric: tabular-nums; color: var(--gold-bright); }
/* the winning hit-count after a draw */
.kp-row.lit {
  background: var(--gold-soft); border-color: var(--gold);
  box-shadow: 0 0 0 1px var(--gold), 0 4px 16px rgba(244, 193, 60, .3);
}
.kp-row.lit .kp-h, .kp-row.lit .kp-h::after { color: var(--gold-bright); }

@media (prefers-reduced-motion: reduce) {
  .keno-cell, .keno-cell.drawn, .keno-cell.hit { animation: none !important; transition: none !important; }
  .keno-cell.hit::before { animation: none !important; opacity: 0 !important; }
}

/* =========================================================================
   MINES — premium royal-jackpot tiles. Replaces the `.tile` block
   (styles.css lines ~371-398). Reuses .mines-grid, #m-grid, .tile,
   .safe, .mine, .dim, .disabled, .grid-shake — all unchanged ids/classes.
   ========================================================================= */
.mines-grid {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px;
  max-width: 440px; margin: 0 auto; width: 100%;
  perspective: 1000px;
  padding: 6px;
}

.tile {
  aspect-ratio: 1; border-radius: 14px;
  position: relative; cursor: pointer;
  border: none; background: none; padding: 0;
  transform-style: preserve-3d;
  transition: transform var(--t-fast) var(--ease), filter var(--t-base) var(--ease);
  /* soft seat shadow so the board reads as raised buttons */
  filter: drop-shadow(0 4px 8px rgba(0,0,0,.45));
}

/* --- COVERED LID: gold-rimmed dark cushion with embossed crown facet --- */
.tile .lid {
  position: absolute; inset: 0; border-radius: 14px;
  background:
    radial-gradient(120% 90% at 50% 18%, rgba(244,193,60,.18), transparent 60%),
    linear-gradient(180deg, #2b2b3d 0%, #1b1b27 55%, #14141d 100%);
  border: 1px solid rgba(244,193,60,.28);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.10),
    inset 0 -10px 18px rgba(0,0,0,.55),
    inset 0 0 0 1px rgba(0,0,0,.35);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  transition: opacity var(--t-base) var(--ease), transform var(--t-base) var(--ease);
  backface-visibility: hidden;
}
/* embossed crown motif so covered tiles look like sealed treasure, not blanks */
.tile .lid::before {
  content: ""; width: 46%; height: 46%;
  background:
    conic-gradient(from 0deg, transparent) ,
    radial-gradient(circle at 50% 60%, rgba(244,193,60,.16), transparent 70%);
  -webkit-mask: var(--crown-mask) center/contain no-repeat;
          mask: var(--crown-mask) center/contain no-repeat;
  background: linear-gradient(180deg, rgba(252,224,138,.55), rgba(200,144,30,.30));
  opacity: .5;
  transition: opacity var(--t-base) var(--ease);
}
:root { --crown-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 18h18l-1.5-9-4.5 4-3-6-3 6-4.5-4L3 18z'/%3E%3Crect x='3' y='18.5' width='18' height='2.4'/%3E%3C/svg%3E"); }
/* faint sheen sweep across covered tiles */
.tile .lid::after {
  content: ""; position: absolute; top: -60%; left: -30%;
  width: 50%; height: 220%;
  background: linear-gradient(105deg, transparent, rgba(255,255,255,.12), transparent);
  transform: rotate(8deg);
  pointer-events: none;
}

/* hover/active only while the tile is live (covered + not disabled) */
.tile:not(.disabled):hover { transform: translateY(-4px); filter: drop-shadow(0 10px 16px rgba(0,0,0,.55)); }
.tile:not(.disabled):hover .lid { border-color: var(--gold); box-shadow: inset 0 1px 0 rgba(255,255,255,.16), inset 0 -10px 18px rgba(0,0,0,.5), 0 0 0 1px rgba(244,193,60,.4), 0 0 18px rgba(244,193,60,.30); }
.tile:not(.disabled):hover .lid::before { opacity: .9; }
.tile:not(.disabled):active { transform: translateY(-1px) scale(.96); }
.tile.disabled { cursor: default; }

/* --- REVEAL FACE: the SVG art container, hidden until safe/mine --- */
.tile .face-art {
  position: absolute; inset: 0; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transform: rotateY(90deg);
  backface-visibility: hidden;
}
.tile .face-art svg { width: 74%; height: 74%; display: block; }

/* SAFE (gem) reveal */
.tile.safe .lid { opacity: 0; transform: rotateY(-90deg); }
.tile.safe .face-art {
  background:
    radial-gradient(95% 80% at 50% 38%, rgba(244,193,60,.22), transparent 65%),
    linear-gradient(180deg, #20202e, #15151f);
  border: 1px solid rgba(244,193,60,.45);
  box-shadow: inset 0 0 22px rgba(244,193,60,.18), 0 0 16px rgba(244,193,60,.22);
}
.tile.safe:not(.dim) .face-art { animation: gemReveal .5s var(--ease) both; }
.tile.safe .gem-svg { filter: drop-shadow(0 3px 6px rgba(0,0,0,.5)) drop-shadow(0 0 7px rgba(244,193,60,.5)); animation: gemFloat 3.2s ease-in-out infinite; }
.tile.safe:not(.dim) .gem-shine { animation: gemSweep .6s var(--ease) .18s both; }

/* MINE (bomb) reveal */
.tile.mine .lid { opacity: 0; transform: rotateY(-90deg); }
.tile.mine .face-art {
  background:
    radial-gradient(90% 80% at 50% 45%, rgba(225,29,42,.30), transparent 68%),
    linear-gradient(180deg, #2a1115, #190a0d);
  border: 1px solid rgba(225,29,42,.55);
  box-shadow: inset 0 0 22px rgba(225,29,42,.25);
}
/* the tile the player actually hit (not dim) gets the violent reveal */
.tile.mine:not(.dim) .face-art { animation: bombReveal .42s cubic-bezier(.2,1.4,.3,1) both; box-shadow: inset 0 0 26px rgba(225,29,42,.4), 0 0 26px rgba(225,29,42,.6); }
.tile.mine:not(.dim) .bomb-spark { animation: sparkFlicker .5s steps(2) infinite; transform-origin: 62px 9px; }
.tile.mine.dim .face-art { animation: gemReveal .45s var(--ease) both; }   /* reveal the *other* mines on cashout/bust, gentler */
.tile.dim { opacity: .42; }

/* explosion shockwave + debris injected into the hit tile by JS */
.tile .boom {
  position: absolute; inset: 0; pointer-events: none; z-index: 3;
  display: flex; align-items: center; justify-content: center;
}
.tile .boom .ring {
  position: absolute; width: 30%; height: 30%; border-radius: 50%;
  border: 3px solid #FCE08A;
  box-shadow: 0 0 24px 6px rgba(225,29,42,.7);
  animation: boomRing .6s cubic-bezier(.15,.7,.3,1) forwards;
}
.tile .boom .flash {
  position: absolute; inset: 0; border-radius: 14px;
  background: radial-gradient(circle at 50% 50%, #FFF6DB, #F4C13C 30%, #E11D2A 60%, transparent 72%);
  animation: boomFlash .42s ease-out forwards;
}
.tile .boom .shard {
  position: absolute; width: 7px; height: 7px; border-radius: 1px;
  background: linear-gradient(180deg, #FCE08A, #C8901E);
  animation: shardFly .6s cubic-bezier(.2,.6,.4,1) forwards;
}

@keyframes gemReveal { 0% { opacity: 0; transform: rotateY(90deg) scale(.6); } 60% { opacity: 1; transform: rotateY(-8deg) scale(1.08); } 100% { opacity: 1; transform: rotateY(0) scale(1); } }
@keyframes bombReveal { 0% { opacity: 0; transform: rotateY(90deg) scale(.5); } 55% { opacity: 1; transform: scale(1.18); } 100% { opacity: 1; transform: scale(1); } }
@keyframes gemFloat { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
@keyframes gemSweep { 0% { transform: translateX(0) skewX(-12deg); opacity: 0; } 30% { opacity: .85; } 100% { transform: translateX(560%) skewX(-12deg); opacity: 0; } }
@keyframes sparkFlicker { 0% { opacity: 1; transform: scale(1); } 100% { opacity: .55; transform: scale(1.25); } }
@keyframes boomRing { 0% { width: 16%; height: 16%; opacity: 1; } 100% { width: 150%; height: 150%; opacity: 0; } }
@keyframes boomFlash { 0% { opacity: .95; transform: scale(.4); } 100% { opacity: 0; transform: scale(1.3); } }
@keyframes shardFly { 0% { opacity: 1; transform: translate(0,0) scale(1) rotate(0); } 100% { opacity: 0; transform: translate(var(--sx), var(--sy)) scale(.4) rotate(220deg); } }

/* grid bust shake (kept; just retuned) */
.grid-shake { animation: shake .5s var(--ease); }
@keyframes shake { 0%,100% { transform: translateX(0); } 18% { transform: translateX(-9px) rotate(-.5deg); } 38% { transform: translateX(8px) rotate(.4deg); } 58% { transform: translateX(-5px); } 78% { transform: translateX(3px); } }

/* keep flipIn name alive if referenced elsewhere */
@keyframes flipIn { 0% { transform: rotateY(90deg); } 100% { transform: rotateY(0); } }

@media (prefers-reduced-motion: reduce) {
  .tile.safe .gem-svg, .tile.safe .gem-shine,
  .tile.mine .bomb-spark, .tile .boom * { animation: none !important; }
  .tile.safe .face-art, .tile.mine .face-art { animation: none !important; opacity: 1 !important; transform: none !important; }
  .tile.safe .lid, .tile.mine .lid { opacity: 0 !important; }
}

/* limbo exhaust trail (climb only) */
.lk-rocket::after { content: ''; position: absolute; left: 50%; top: 90%; width: 15px; height: 64px; transform: translateX(-50%); border-radius: 50%; background: linear-gradient(180deg, rgba(252,224,138,.7), rgba(244,193,60,.32) 42%, rgba(225,29,42,0) 100%); filter: blur(3px); opacity: 0; transition: opacity var(--t-base) var(--ease); pointer-events: none; z-index: -1; }
.lk-gauge.launching .lk-rocket::after, .lk-gauge.win .lk-rocket::after { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .lk-rocket::after { display: none; } }

/* =====================================================================
   CRASH — render-upgrade styles. Append to apps/casino/public/styles.css,
   right after the existing crash block (after @keyframes rowIn, ~line 425).
   Only ADDS the bust screen-flash overlay; nothing existing is modified.
   ===================================================================== */

.crash-flash {
  position: absolute; inset: 0; pointer-events: none; opacity: 0;
  border-radius: var(--r-btn);
  background: radial-gradient(120% 90% at 50% 60%,
    rgba(225,29,42,.55) 0%, rgba(225,29,42,.18) 38%, rgba(225,29,42,0) 72%);
  mix-blend-mode: screen;
}
.crash-flash.on { animation: crashFlash .52s var(--ease) forwards; }
@keyframes crashFlash {
  0%   { opacity: 0; }
  12%  { opacity: 1; }
  100% { opacity: 0; }
}

/* Gentle nudge on the whole stage when a round busts — sells the impact. */
.crash-canvas-wrap.busting { animation: crashShake .42s var(--ease); }
@keyframes crashShake {
  20% { transform: translateX(-5px); }
  45% { transform: translateX(4px); }
  70% { transform: translateX(-3px); }
  100% { transform: translateX(0); }
}

@media (prefers-reduced-motion: reduce) {
  .crash-flash.on { animation: none; opacity: 0; }
  .crash-canvas-wrap.busting { animation: none; }
}

/* studio slots: thicker winning-tile gold frame + all-gold frame in free spins */
.sd-winc { border-image: linear-gradient(160deg, #FFF3C8 0%, var(--sd-frame2, #F4C13C) 55%, var(--sd-framelo, #C8901E) 100%) 1; }
.studio-stage.fs .sd-cell { --sd-frame: #FCE08A; --sd-frame2: #F4C13C; --sd-framelo: #C8901E; }

/* ===== responsive hardening (audit fixes) ===== */
/* 1) topbar resilience on small phones (brand yields before the balance clips) */
#topbar { gap: var(--s2); }
@media (max-width: 420px) {
  #topbar { gap: 6px; padding: 0 var(--s3); }
  .brand { min-width: 0; flex: 0 1 auto; }
  .brand .word { overflow: hidden; text-overflow: ellipsis; }
  .balance-chip { min-width: 0; }
  #balanceChip span { overflow: hidden; text-overflow: ellipsis; max-width: 80px; }
}
/* 3) chat open: suppress the in-game rail and tighten the content cap so the fixed panels never collide */
body.chat-on .game-rail { display: none; }
body.chat-on .game-layout { grid-template-columns: 300px minmax(0, 1fr); }
@media (min-width: 1100px) { body.chat-on main { max-width: min(1240px, calc(100% - 212px - 340px)); } }
/* 4) casino grid: one responsive source of truth — 2-up on phones, capped width on ultrawide */
.casino-grid { grid-template-columns: repeat(auto-fill, minmax(clamp(132px, 42vw, 168px), 1fr)); }
@media (min-width: 1440px) { .casino-grid { grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)); } }
/* 9) tie the in-game rail height to real remaining space (short laptops) */
@media (min-width: 1280px) { .game-rail { max-height: calc(100dvh - var(--topbar-h) - var(--xpbar-h) - var(--s6)); } }
/* prevent off-screen fixed panels (closed chat drawer) from creating horizontal scroll on phones */
html, body { overflow-x: clip; }


/* ultrawide: widen the centred 3-pane game layout so big screens are filled, not left-hugged */
@media (min-width: 1600px) { .game-layout { max-width: 1560px; } }

/* ===== Fish Shooter ===== */
.fish-stage { padding: 0; overflow: hidden; min-height: 320px; position: relative; }
.fish-canvas { display: block; width: 100%; height: 100%; cursor: crosshair; touch-action: none; }
.fish-type-label { font-size: .75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 4px; }
.fish-type-bar { display: flex; flex-wrap: wrap; gap: 6px; }
.fish-type-btn {
  display: flex; flex-direction: column; align-items: center;
  padding: 6px 10px; border-radius: var(--rad-sm); border: 1.5px solid var(--border);
  background: var(--surface); cursor: pointer; gap: 2px; transition: border-color .15s, background .15s;
}
.fish-type-btn:hover, .fish-type-btn.active { border-color: var(--fc, var(--accent)); background: color-mix(in srgb, var(--fc, var(--accent)) 12%, transparent); }
.fish-type-btn .ft-name { font-size: .72rem; color: var(--text-muted); }
.fish-type-btn .ft-mult { font-size: .85rem; font-weight: 700; color: var(--fc, var(--accent)); }
.fi-win-banner {
  padding: 10px 14px; border-radius: var(--rad-sm);
  background: linear-gradient(135deg, #1A3A1A, #0D2210); border: 1px solid #2ECC71;
  color: #2ECC71; font-weight: 600; font-size: .92rem; text-align: center;
}
.fi-win-banner.win-flash { animation: win-flash .35s ease; }
@keyframes win-flash { 0%,100% { opacity: 1; } 50% { opacity: .6; } }
.seed-hint { font-size: .68rem; color: var(--text-muted); word-break: break-all; margin-top: 4px; }

/* ===== Scratch Cards ===== */
.scratch-stage { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; min-height: 320px; }
.sc-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
  width: 100%; max-width: 340px;
}
.sc-cell {
  aspect-ratio: 1; border-radius: var(--rad); border: 2px solid var(--border);
  background: var(--surface-2); display: flex; align-items: center; justify-content: center;
  font-size: 2rem; cursor: pointer; position: relative; overflow: hidden;
  transition: transform .15s;
  user-select: none;
}
.sc-cell.scratching { background: var(--surface-2); }
.sc-cell.scratching:hover { transform: scale(1.05); border-color: var(--accent); }
/* champagne-gold metallic scratch-off foil with a slow travelling sheen */
.sc-cell .sc-cover {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; color: rgba(60,44,8,.55); text-shadow: 0 1px 0 rgba(255,255,255,.35);
  background:
    linear-gradient(115deg, transparent 34%, rgba(255,255,255,.5) 48%, transparent 62%),
    repeating-linear-gradient(58deg, rgba(255,255,255,.07) 0 2px, rgba(0,0,0,.05) 2px 4px),
    linear-gradient(135deg, #F4D98B 0%, #C79A38 52%, #E4C871 100%);
  background-size: 260% 100%, auto, auto;
  background-position: 210% 0, 0 0, 0 0;
  animation: sc-foil-sheen 2.8s linear infinite;
  transition: opacity .3s, transform .3s;
}
@media (prefers-reduced-motion: reduce) { .sc-cell .sc-cover { animation: none; background-position: 50% 0, 0 0, 0 0; } }
@keyframes sc-foil-sheen { to { background-position: -130% 0, 0 0, 0 0; } }
.sc-cell .sc-symbol { font-size: 2rem; opacity: 0; transform: scale(.3); }
.sc-cell.revealed .sc-cover { opacity: 0; transform: scale(1.4) rotate(7deg); pointer-events: none; } /* peel away */
.sc-cell.revealed .sc-symbol { opacity: 1; animation: sc-pop .42s cubic-bezier(.34,1.56,.64,1) forwards; }
@keyframes sc-pop { 0% { transform: scale(.3); opacity: 0; } 55% { opacity: 1; } 100% { transform: scale(1); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .sc-cell.revealed .sc-symbol { animation: none; transform: scale(1); } }
.sc-cell.win-row { border-color: #FFD700; background: color-mix(in srgb, #FFD700 14%, var(--surface-2)); box-shadow: 0 0 14px rgba(255,215,0,.4); animation: sc-winpulse 1s ease-in-out 2 both; }
@keyframes sc-winpulse { 0%,100% { box-shadow: 0 0 12px rgba(255,215,0,.35); transform: translateY(0); } 50% { box-shadow: 0 0 24px rgba(255,215,0,.75); transform: translateY(-3px); } }
/* near-miss: two of a row matched, the third still hidden — "so close" */
.sc-cell.near-miss { border-color: #F4C13C; animation: sc-nearmiss .65s ease-in-out 3 both; }
@keyframes sc-nearmiss { 0%,100% { box-shadow: 0 0 4px rgba(244,193,60,.2); } 50% { box-shadow: 0 0 16px rgba(244,193,60,.65); } }
@media (prefers-reduced-motion: reduce) { .sc-cell.win-row, .sc-cell.near-miss { animation: none; } }
.sc-banner { padding: 12px 16px; border-radius: var(--rad-sm); text-align: center; font-weight: 600; font-size: 1rem; }
.sc-banner.win-banner { background: linear-gradient(135deg, #1A3A1A, #0D2210); border: 1px solid #2ECC71; color: #2ECC71; }
.sc-banner.lose-banner { background: var(--surface-2); border: 1px solid var(--border); color: var(--text-muted); }
.sc-status { font-size: .85rem; color: var(--text-muted); text-align: center; }
.scratch-paytable { display: flex; flex-direction: column; gap: 4px; padding: 8px; background: var(--surface-2); border-radius: var(--rad-sm); margin-bottom: 4px; }
.spt-row { display: flex; justify-content: space-between; font-size: .82rem; color: var(--text-muted); }
.spt-row .num { color: var(--text); font-weight: 600; }
.stack-h { display: flex; flex-direction: row; }