/* 7X3 — Luxury crystal + gold visual language.
   Palette extracted from /graphical-interface{,-1,-2,-3}.jpg:
     deep cobalt blue, electric-cyan glow, warm rich gold filigree,
     translucent crystal surfaces, asymmetric flourishes.
   No red, no brown, no wood — every "structural" surface is glass-deep
   blue with a gold rim and an inner light source.
   IMPORTANT: every JS/3D-dice contract is preserved exactly:
     .die-stage 88x88, .die-face[data-side=N] translateZ(44px),
     rollSpin keyframes, .chip::before 6-segment conic rim, JS-set
     inline `background` on chips flows through .chip::after { background: inherit }. */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* Deep cobalt structure (from image 0 background, image 2 shadows). */
  --night:        #050b1c;
  --indigo:       #0c1a3c;
  --indigo-mid:   #142a64;
  --azure:        #1f4ea8;
  --azure-lt:     #3a78d8;

  /* Electric blue inner light (image 0 face glow, image 1 particle paths). */
  --cyan:         #5fb7ff;
  --cyan-soft:    #8fcdff;
  --cyan-pale:    #c8e6ff;

  /* Warm rich gold (filigree, pen rings, palace archways). */
  --gold-dk:      #8a5a13;
  --gold:         #c98f1f;
  --gold-lt:      #f0c252;
  --gold-glow:    #ffe39a;
  --cream:        #fff5d8;

  /* Used very sparingly — image 3 interior warm. */
  --amber:        #ffb24a;

  /* Text. */
  --txt:          #eaf2ff;
  --txt-dim:      rgba(234, 242, 255, 0.62);

  /* Legacy aliases — preserved so any JS/HTML referencing them still works. */
  --bg:           var(--night);
  --sf:           var(--indigo);
  --card:         var(--indigo-mid);
  --gold-dk-alias:var(--gold-dk);
  --blue:         var(--azure);
  --red:          #ef4444;     /* lose-glow only */
  --grn:          #22c55e;     /* win-glow only */
  --dim:          var(--txt-dim);
  --bd-blue:      var(--indigo-mid);
  --bd-blue-dk:   var(--indigo);
  --bd-blue-lt:   var(--azure);
  --bd-gold:      var(--gold);
  --bd-gold-lt:   var(--gold-lt);
  --bd-gold-dk:   var(--gold-dk);
  --bd-text:      var(--cream);
}

html, body {
  height: 100%; width: 100%; overflow: hidden;
  color: var(--txt);
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* Stab 139 Change A: background moved from `html, body` (both elements)
   to `html` ONLY. Reason: body::before { z-index: -1 } paints BELOW
   body's own background-color/image when body has its own opaque bg —
   the pseudo-element's plus pattern was completely covered. 3DICE
   works at z-index:-1 because 3DICE's html has no explicit bg, so
   body-bg propagates to html level and body::before sits above the
   (now-html-level) propagated bg. Mirroring that paint order on 7X3:
   bg goes on html, body has no bg, pseudo paints above html bg and
   below body's foreground content. The radial-gradients now paint at
   html-level (same visible appearance to the user; only the paint
   order under body::before changes). */
html {
  background:
    radial-gradient(ellipse 120% 80% at 50% 0%,    rgba(31, 78, 168, 0.18) 0%, transparent 65%),
    radial-gradient(ellipse 100% 60% at 50% 100%,  rgba(95, 183, 255, 0.10) 0%, transparent 70%),
    var(--night);
}

/* Stab 134b: body becomes a flex column so the hoisted #shared-header
   (now body-level sibling of #app, matching 3DICE's structure) stacks
   above #app cleanly. #shared-header has flex: 0 0 auto from shared/
   header.css; #app gets flex: 1 1 auto below so it fills remaining
   viewport height. The 500px max-width on #app stays — only the
   header escapes that constraint, spanning edge-to-edge of the body. */
body {
  display: flex;
  flex-direction: column;
}

/* Stab 137: subtle decorative plus-mark pattern in the body background.
   Cousin to 3DICE's diamond pattern (Stab 136) — same desktop-only
   gating, same z-index strategy, same subtlety level — but a different
   shape (plus marks vs diamonds), a different color tone (warm gold
   #f0c252 vs cool cyan #5fb7ff), and a slightly looser grid (40px tile
   vs 32px). Owner A/B compares the two and picks the platform-wide
   pattern in a future stab. Inline SVG data URI so no extra HTTP
   request. stroke-opacity 0.05 on warm gold reads as a hairline
   sparkle on 7X3's bright cosmic-blue body background. Pseudo-element
   sits at z-index -1 (above body background, below all content);
   verified no 7X3 element claims z-index 0 or negative (all positive:
   1, 5, 6, 10, 20, 50, 55, 100, 200, 1000, 1120). */
@media (min-width: 768px) {
  body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    /* Stab 139 Change A: filled plus-polygon (8-vertex path) replaces
       Stab 137's invisible stroke variant. Paints ~24 solid pixels
       per 40×40 tile (vs old ~12 anti-aliased stroke pixels). The
       paired html/body bg split above (moving bg to html only)
       puts this pseudo-element ABOVE the gradient backdrop instead
       of below it, which is what actually fixes Stab 137's visibility.
       fill-opacity 0.10: 2× 3DICE's 0.05 to overcome 7X3's gradient-
       overlay brightness noise that 3DICE's solid #0a1530 bg lacks.
       Subtle-but-perceivable target. */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40'%3E%3Cpath d='M19 17h2v3h3v2h-3v3h-2v-3h-3v-2h3z' fill='%23f0c252' fill-opacity='0.10'/%3E%3C/svg%3E");
    background-repeat: repeat;
  }
}

#app {
  width: 100%; min-height: 0; max-width: 500px; margin: 0 auto;
  flex: 1 1 auto;
  display: flex; flex-direction: column;
  overflow: hidden; position: relative;
  padding-top:    env(safe-area-inset-top, 0);
  padding-bottom: 0;
  padding-left:   env(safe-area-inset-left, 0);
  padding-right:  env(safe-area-inset-right, 0);
  /* Stab 138: transparent backdrop so the body-level decorative
     pattern (Stab 137 plus-marks) shows through behind the game
     content. Individual game elements (dice-rail, fields, buttons)
     keep their own backgrounds. Mirrors 3DICE's structure where the
     game content sits directly on the body background. The gold
     separator line at the bottom of the shared-header is now
     visible across the full viewport. */
  background: transparent;
}

/* Stab 131: legacy .bar / .brand / .back-to-lobby / .user-tag rules
   removed. The top bar is now owned by shared/header (X close +
   7X3 title + wallet pill + person icon), styled via shared/header/
   header.css.
   Stab 134b: the duplicate .lobby-person + .wallet-btn rules that
   previously lived here (and contradicted this very comment) are now
   actually removed. shared/header.css's #shared-header-prefixed
   selectors have higher specificity and were already winning at
   runtime; the bare-class duplicates here were dead code. The
   .wallet-btn.coin-arrived / .coin-arrived-big animation classes
   further down in this file are KEPT — they're game-specific FX
   triggered by win-fx.js, not header chrome. */

/* Stab 132: .lobby-ov / .lobby-ov-card / .lobby-ov-bd / .lobby-ov-close
   / .lobby-ov-title / .lobby-ov-sub / .lobby-ov-section family +
   .lobby-ov-section-value + .lobby-ov-actions + .lobby-ov-btn (+
   .single-col / :active / :disabled / .danger / .danger:hover)
   REMOVED. The #profileOv + #withdrawOv elements that consumed
   these styles are gone (replaced by the iframe's account view).
   ~125 lines of CSS retired. */

/* ─────────────────────────────────────────────────────────────────
   DICE STAGE — premium recessed crystal trough.
   Replaces the wood-rail. Cobalt glass interior, electric-cyan ground
   glow under the dice, gold rim along the upper inner lip with an
   asymmetric flourish on the LEFT only (image 0 reference).
   ───────────────────────────────────────────────────────────────── */
.dice-rail {
  flex: 4; min-height: 0;
  display: flex; flex-direction: column;
  margin: 8px 10px;
  border-radius: 22px;
  padding: 12px 12px 8px;
  position: relative;
  background:
    /* asymmetric gold bloom on the LEFT — like the crystal hand's gold filaments */
    radial-gradient(ellipse 55% 35% at 8% 12%, rgba(255, 227, 154, 0.22) 0%, transparent 60%),
    radial-gradient(ellipse 35% 25% at 92% 88%, rgba(240, 194, 82, 0.10) 0%, transparent 60%),
    /* deep cobalt body */
    linear-gradient(180deg, #0a1838 0%, #050d24 55%, #02070f 100%);
  border: 1px solid rgba(240, 194, 82, 0.55);
  box-shadow:
    /* outer cool rim glow (cyan from image 0) */
    0 0 18px -4px rgba(95, 183, 255, 0.25),
    /* outer warm pinstripe (gold from image 1 pen) */
    0 0 0 1px rgba(255, 227, 154, 0.10),
    /* inner highlights — top reflection + bottom seat */
    inset 0 1px 0 rgba(255, 245, 216, 0.18),
    inset 0 -2px 0 rgba(0, 0, 0, 0.55),
    inset 0 0 36px -6px rgba(0, 0, 0, 0.60),
    /* drop shadow off the page */
    0 8px 22px rgba(0, 0, 0, 0.55);
}
.dice-rail::before {
  /* asymmetric ornamental flourish — top-left corner only.
     Implied gold filigree via a swept gradient + blurred curve. */
  content: ''; position: absolute; top: 0; left: 0; width: 60%; height: 18px;
  background:
    radial-gradient(ellipse 80% 100% at 0% 0%, rgba(255, 227, 154, 0.45) 0%, transparent 70%);
  border-top-left-radius: 22px;
  pointer-events: none;
}
.dice-rail::after {
  /* hairline gold inner border — the engraved frame */
  content: ''; position: absolute; inset: 4px; border-radius: 18px;
  border: 1px solid rgba(240, 194, 82, 0.18);
  pointer-events: none;
}

.dice-area {
  flex: 1; min-height: 220px; position: relative; overflow: hidden;
  border-radius: 14px;
  /* Deep crystal stage. Cool blue interior, bright cyan halo under
     where the dice sit (image 0 face glow), warm gold rim hint at the
     top-left (image 1 hand light). No wood, no brown. */
  background:
    radial-gradient(ellipse 60% 65% at 50% 62%, rgba(95, 183, 255, 0.42) 0%, rgba(31, 78, 168, 0.20) 35%, transparent 70%),
    radial-gradient(ellipse 55% 55% at 18% 18%, rgba(255, 227, 154, 0.22) 0%, rgba(240, 194, 82, 0.08) 40%, transparent 80%),
    radial-gradient(ellipse 120% 90% at 50% 55%, rgba(10, 24, 56, 0.55) 0%, rgba(2, 7, 15, 0.95) 95%);
  box-shadow:
    inset 0 0 0 1px rgba(240, 194, 82, 0.22),
    inset 12px 0 36px -14px rgba(255, 227, 154, 0.32),
    inset -8px 0 32px -10px rgba(95, 183, 255, 0.30),
    inset 0 -14px 32px -10px rgba(0, 0, 0, 0.70);
  display: flex; align-items: center; justify-content: center; gap: 24px;
  perspective: 800px;
}
/* The 3D dice canvas appended by dice-replay-player must fill the
   container so we never hit the FALLBACK_W/H 320×240 default that
   leaves the dice tiny in a corner on small screens. */
.dice-area canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}

/* ─────────────────────────────────────────────────────────────────
   CAMERA-VIEW BUTTONS — kept (so 3D presets still work) but reduced
   to subtle crystal pills inside the rail. Belong to the same family.
   ───────────────────────────────────────────────────────────────── */
.dice-cam-row {
  display: none;
  flex-direction: row;
  justify-content: center;
  gap: 8px;
  margin-top: 8px;
  padding: 4px 6px;
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(2, 7, 15, 0.45) 0%, rgba(2, 7, 15, 0.20) 100%);
  box-shadow:
    inset 0 1px 2px rgba(0, 0, 0, 0.55),
    inset 0 -1px 0 rgba(240, 194, 82, 0.14);
  /* Sit above the dice canvas so iPhone touch events are not swallowed
     by the WebGL surface below. pointer-events:auto is the default but
     we set it explicitly because a couple of decorative ::before /
     ::after layers in this rail use pointer-events:none. */
  position: relative;
  z-index: 6;
  pointer-events: auto;
}
.dice-cam-row .dice-cam-btn { pointer-events: auto; touch-action: manipulation; }
.dice-cam-row.visible { display: flex; }
.dice-cam-btn {
  flex: 1; max-width: 80px;
  padding: 6px 0;
  background:
    radial-gradient(ellipse 80% 100% at 50% 0%, rgba(95, 183, 255, 0.18) 0%, transparent 70%),
    linear-gradient(180deg, rgba(20, 42, 100, 0.65) 0%, rgba(10, 24, 56, 0.85) 100%);
  color: var(--cream);
  border: 1px solid rgba(240, 194, 82, 0.45);
  border-radius: 7px;
  font-size: 10.5px;
  font-weight: 900;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  cursor: pointer;
  font-family: inherit;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.65);
  box-shadow:
    inset 0 1px 0 rgba(200, 230, 255, 0.12),
    inset 0 -1px 0 rgba(0, 0, 0, 0.45),
    0 1px 2px rgba(0, 0, 0, 0.55);
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.dice-cam-btn:active { transform: translateY(1px); box-shadow: inset 0 2px 3px rgba(0, 0, 0, 0.50); }
.dice-cam-btn.active {
  background:
    radial-gradient(ellipse 80% 100% at 50% 0%, rgba(255, 227, 154, 0.55) 0%, transparent 70%),
    linear-gradient(180deg, rgba(240, 194, 82, 0.60) 0%, rgba(138, 90, 19, 0.70) 100%);
  border-color: rgba(255, 227, 154, 0.85);
  color: #1a0f00;
  text-shadow: 0 1px 0 rgba(255, 245, 216, 0.55);
  box-shadow:
    0 0 0 1px rgba(255, 227, 154, 0.85),
    0 0 12px rgba(240, 194, 82, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

/* ── Dice geometry — UNCHANGED. JS depends on these exact values. ── */
.die-stage { width: 88px; height: 88px; transform-style: preserve-3d; transform: rotateX(0) rotateY(0); transition: transform 1.1s cubic-bezier(.18,.9,.25,1); }
.die-stage.rolling { animation: rollSpin 1.1s linear; }
@keyframes rollSpin {
  0%   { transform: rotateX(0)     rotateY(0); }
  25%  { transform: rotateX(540deg) rotateY(180deg); }
  50%  { transform: rotateX(900deg) rotateY(540deg); }
  75%  { transform: rotateX(1260deg) rotateY(900deg); }
  100% { transform: rotateX(1440deg) rotateY(1080deg); }
}
.die-face {
  position: absolute; inset: 0;
  background: linear-gradient(145deg, #fafdff, #c5d4ea);
  border: 1px solid rgba(20, 42, 100, 0.30);
  border-radius: 14px;
  display: grid; grid-template-columns: 1fr 1fr 1fr; grid-template-rows: 1fr 1fr 1fr;
  padding: 10px;
  box-shadow:
    inset 0 -3px 6px rgba(20, 42, 100, 0.18),
    inset 0 1px 2px rgba(255, 255, 255, 0.7),
    0 0 18px -8px rgba(95, 183, 255, 0.55);
}
.die-face .pip {
  width: 12px; height: 12px; border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #1f4ea8, #050b1c);
  align-self: center; justify-self: center;
}
.die-face[data-side="1"] { transform: translateZ(44px); }
.die-face[data-side="2"] { transform: rotateY( 90deg) translateZ(44px); }
.die-face[data-side="3"] { transform: rotateY(180deg) translateZ(44px); }
.die-face[data-side="4"] { transform: rotateY(-90deg) translateZ(44px); }
.die-face[data-side="5"] { transform: rotateX( 90deg) translateZ(44px); }
.die-face[data-side="6"] { transform: rotateX(-90deg) translateZ(44px); }

/* ─────────────────────────────────────────────────────────────────
   RESULT line — engraved gold on a thin glass strip.
   ───────────────────────────────────────────────────────────────── */
/* Stab 138: .result is now a flex row containing the help button on
   the left and the dice-pip/sum/win-text content centered. Backdrop
   gradient removed so body pattern shows through; gold border lines
   kept as visual separators. Height bumped from 26px to fit the
   larger pip glyphs comfortably without crowding. */
.result {
  padding: 4px 12px; flex-shrink: 0;
  min-height: 36px;
  display: flex; align-items: center;
  /* Stab PF-6: gap reduced 10 → 4 to match 3DICE's post-PF-5c
     actions-top tightening. The PF badge sits between #helpBtn and
     #resultContent; auto-margins below center the [badge · dice]
     pair while keeping help (?) flush left. */
  gap: 4px;
  font-size: 14px; font-weight: 800;
  letter-spacing: 0.06em;
  color: rgba(255, 245, 216, 0.55);
  background: transparent;
  border-top: 1px solid rgba(240, 194, 82, 0.25);
  border-bottom: 1px solid rgba(240, 194, 82, 0.25);
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.55), 0 0 8px rgba(95, 183, 255, 0.20);
}
/* Stab PF-6: help button takes its natural width on the left; the
   auto right-margin pushes everything else (badge + result content)
   toward the right half of the row, then result-content's auto
   right-margin pulls it back leftward — net effect: [badge · dice]
   centered between help (?) and the right edge of the row. */
.result .help-btn {
  flex: 0 0 auto;
  margin-right: auto;
}
/* The dice-pip / sum / win-text content lives in this span; game.js
   writes innerHTML here so the help button + PF badge (siblings)
   are preserved across renders. Stab PF-6: flex changed from
   1 1 auto → 0 0 auto so the span shrinks to content width; the
   margin-right:auto absorbs the right-side free space to keep the
   pair visually centered. */
.result .result-content {
  flex: 0 0 auto;
  margin-right: auto;
  text-align: center;
}
.result.win  { color: #6dffa8; text-shadow: 0 0 10px rgba(34, 197, 94, 0.55); }
.result.lose { color: #ff9f9f; text-shadow: 0 0 10px rgba(239, 68, 68, 0.40); }
/* Stab 138: dice-pip glyphs in the result row. Mirrors 3DICE's
   .result-pip pattern (style.css :841): font-size scaled up, normal
   weight so iOS Safari renders the outlined dice with visible pips
   instead of solid-fill colored emoji.
   Stab 139 Change B: owner reported the Stab-138 pips read as "bold"
   despite font-weight:400 + U+FE0E text-style selector. Cause: the
   parent .result has text-shadow: 0 1px 0 rgba(0,0,0,0.55), 0 0 8px
   rgba(95,183,255,0.20) — the 8px cyan glow inflated each pip
   glyph's perceived stroke. text-shadow:none on the pip span
   suppresses that inheritance. Also added translateY(-1px) for
   baseline alignment with the surrounding " + ", " = ", and sum
   digit — matches 3DICE's .result-pip pattern exactly. line-height
   tightened 0.8 → 0.7 to match 3DICE so the glyph hugs the row
   height instead of fattening it. */
.result .result-pip {
  display: inline-block;
  /* Stab PF-6: keep 7X3 at 200% (smaller than 3DICE's post-PF-5c
     240%). 7X3 shows 2 dice vs 3DICE's 3, so the row is less
     crowded — the smaller size already reads well alongside the
     new in-row PF badge. */
  font-size: 200%;
  font-weight: 400;
  line-height: 0.7;
  vertical-align: middle;
  transform: translateY(-1px);
  text-shadow: none;
}

/* ─── Stab PF-6: Provably Fair badge in the result row ─────────────
   Same chassis as 3DICE's post-PF-5c badge (32×32 circular, 22×22
   shield SVG). Sits in the .result flex row between #helpBtn and
   #resultContent; the parent's gap:4 + the result-content's
   flex:0 0 auto + auto right-margin centers the [badge · dice] pair.
   Clicking opens /auth/?mode=fairness via openAuthIframe('fairness')
   wired in game.js's bindHeaderClicks counterpart.
*/
.result #pfBadge {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  margin: 0;
  margin-right: -2px;       /* tight to result-content (mirrors 3DICE) */
  padding: 0;
  border-radius: 50%;
  background: rgba(2, 7, 15, 0.40);
  border: 1px solid rgba(255, 227, 154, 0.55);
  cursor: pointer;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}
.result #pfBadge:hover  { border-color: #ffd882; }
.result #pfBadge:active { transform: translateY(1px); }
.result #pfBadge .pf-badge-icon {
  width: 22px;
  height: 22px;
  display: block;
  filter: drop-shadow(0 0 3px rgba(255, 227, 154, 0.45));
}

/* Stab FIX-NONCE-ROW: .result-content .result-nonce (PF-6) deleted —
   the inline " · nonce N" span removed from game.js. PF nonce stays
   reachable via the PF badge's title attribute. */

/* ─────────────────────────────────────────────────────────────────
   BOARD — three crystal panels with gold framing.
   The seven panel is the focal point: warmer interior, asymmetric
   corner flourish, halo ring.
   ───────────────────────────────────────────────────────────────── */
.board {
  flex: 2; min-height: 0;
  display: flex; gap: 10px;
  padding: 10px 12px; align-items: stretch;
  /* Stab 138: transparent backdrop — body pattern shows through.
     Each .field keeps its own crystal-gold panel chrome below. */
  background: transparent;
  border-top: 1px solid rgba(240, 194, 82, 0.18);
}
.field {
  flex: 1;
  display: flex; flex-direction: column; align-items: stretch;
  min-width: 0; min-height: 0;
  background:
    /* deep cobalt crystal */
    radial-gradient(ellipse 100% 60% at 50% 0%, rgba(95, 183, 255, 0.22) 0%, transparent 60%),
    linear-gradient(180deg, #14306e 0%, #0a1a44 50%, #050d24 100%);
  border-radius: 14px; cursor: pointer;
  position: relative;
  border: 1px solid rgba(240, 194, 82, 0.55);
  box-shadow:
    inset 0 1px 0 rgba(200, 230, 255, 0.20),
    inset 0 0 0 1px rgba(255, 227, 154, 0.10),
    inset 0 -10px 22px rgba(0, 0, 0, 0.50),
    0 0 12px -4px rgba(95, 183, 255, 0.20),
    0 4px 10px rgba(0, 0, 0, 0.55);
  transition: box-shadow 0.20s, transform 0.06s, border-color 0.20s;
  padding: 6px 5px;
  overflow: visible;
  -webkit-tap-highlight-color: transparent;
}
.field::before {
  /* asymmetric gold flourish — top-LEFT corner of every field */
  content: ''; position: absolute; top: 0; left: 0; width: 70%; height: 36%;
  background: radial-gradient(ellipse 70% 100% at 0% 0%, rgba(255, 227, 154, 0.16) 0%, transparent 70%);
  border-top-left-radius: 14px;
  pointer-events: none;
}
.field::after {
  /* engraved gold inner border */
  content: ''; position: absolute; inset: 3px; border-radius: 11px;
  border: 1px solid rgba(240, 194, 82, 0.16);
  pointer-events: none;
}
.field:active { transform: scale(0.97); }

.field[data-f="seven"] {
  flex: 1.18;
  background:
    /* warmer, more luminous interior — the lucky-7 focal point */
    radial-gradient(ellipse 100% 60% at 50% 0%, rgba(255, 227, 154, 0.30) 0%, transparent 60%),
    radial-gradient(ellipse 80% 60% at 50% 100%, rgba(31, 78, 168, 0.45) 0%, transparent 70%),
    linear-gradient(180deg, #1c3e8e 0%, #0e1f4a 60%, #050d24 100%);
  border-color: rgba(255, 227, 154, 0.85);
  box-shadow:
    inset 0 1px 0 rgba(255, 245, 216, 0.32),
    inset 0 0 0 1px rgba(255, 227, 154, 0.22),
    inset 0 -10px 22px rgba(0, 0, 0, 0.45),
    0 0 18px rgba(255, 227, 154, 0.32),
    0 4px 10px rgba(0, 0, 0, 0.55);
}
.field[data-f="seven"]::before {
  /* heavier asymmetric flourish on seven — top-LEFT bloom */
  background:
    radial-gradient(ellipse 80% 100% at 0% 0%, rgba(255, 227, 154, 0.30) 0%, transparent 75%),
    radial-gradient(ellipse 30% 100% at 100% 0%, rgba(95, 183, 255, 0.18) 0%, transparent 80%);
}

.field.active-bet {
  border-color: var(--gold-glow);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.30),
    inset 0 0 0 1px rgba(255, 245, 216, 0.35),
    inset 0 -10px 22px rgba(0, 0, 0, 0.40),
    0 0 18px rgba(255, 227, 154, 0.55),
    0 4px 10px rgba(0, 0, 0, 0.55);
}
.field.win-glow {
  border-color: #4ade80 !important;
  box-shadow:
    0 0 28px rgba(34, 197, 94, 0.70),
    inset 0 0 30px rgba(34, 197, 94, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.30) !important;
}
.field.lose-glow {
  border-color: #fca5a5 !important;
  box-shadow:
    0 0 18px rgba(239, 68, 68, 0.40),
    inset 0 0 18px rgba(239, 68, 68, 0.10),
    inset 0 1px 0 rgba(255, 255, 255, 0.20) !important;
}

.field-top {
  display: flex; flex-direction: column; align-items: center; gap: 1px;
  flex-shrink: 0; text-align: center; padding: 4px 2px 2px;
  position: relative; z-index: 1;
}
.field-range {
  font-size: clamp(15px, 4vw, 20px); font-weight: 900; line-height: 1;
  background: linear-gradient(180deg, var(--cream) 0%, var(--gold-lt) 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.45);
  filter: drop-shadow(0 0 4px rgba(95, 183, 255, 0.20));
}
.field[data-f="seven"] .field-range {
  font-size: clamp(17px, 4.6vw, 22px);
  background: linear-gradient(180deg, #fff8e0 0%, var(--gold-glow) 60%, var(--gold) 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 8px rgba(240, 194, 82, 0.55));
}
.field-mult {
  font-size: clamp(13px, 3.4vw, 16px); font-weight: 800; line-height: 1.1; letter-spacing: 0.5px;
  color: var(--cyan-pale);
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.55), 0 0 8px rgba(95, 183, 255, 0.30);
}
.field[data-f="seven"] .field-mult {
  color: var(--gold-glow);
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.55), 0 0 10px rgba(255, 227, 154, 0.50);
}
/* Stab 31: "pays" verb prefix on the middle card's multiplier —
   visually secondary so it reads as a label modifier, not part of
   the headline ×3. Smaller, lighter weight, muted gold-lt to match
   the wallet/deposit muted-label treatment. Side cards untouched. */
.field[data-f="seven"] .field-pays {
  font-size: 0.88em; font-weight: 600;
  color: var(--gold-lt); opacity: 0.80;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.45);
}
.field-tag {
  font-size: clamp(7.5px, 1.7vw, 9.5px); font-weight: 800; letter-spacing: 0.20em;
  text-transform: uppercase;
  color: var(--gold-lt); opacity: 0.95;
  line-height: 1; margin-top: 1px; white-space: nowrap;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.55);
}
.field-chips { flex: 1 1 auto; min-height: 36px; position: relative; width: 100%; overflow: visible; z-index: 5; }
.field-amt {
  flex-shrink: 0; align-self: center; width: calc(100% - 6px);
  min-height: 22px; margin-top: 2px;
  display: flex; align-items: center; justify-content: center;
  padding: 3px 8px; border-radius: 9px;
  font-size: clamp(10.5px, 2.8vw, 12px); font-weight: 900; letter-spacing: 0.04em;
  color: var(--cream);
  background:
    radial-gradient(ellipse 80% 100% at 50% 0%, rgba(95, 183, 255, 0.22) 0%, transparent 70%),
    linear-gradient(180deg, rgba(2, 7, 15, 0.65), rgba(2, 7, 15, 0.45));
  border: 1px solid rgba(240, 194, 82, 0.55);
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.65);
  box-shadow: inset 0 1px 0 rgba(200, 230, 255, 0.10);
}
.field-amt:empty { visibility: hidden; }

/* ─────────────────────────────────────────────────────────────────
   CASINO CHIPS — rim painted by ::before (kept JS-compatible),
   body color set inline by chipColor() and inherited by ::after,
   gold OUTER ring added via box-shadow so it never fights the rim.
   Edge inserts changed to a soft cream-gold so the chip reads as
   premium gold-trimmed crystal rather than plain plastic.
   ───────────────────────────────────────────────────────────────── */
.chip {
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 900; color: #fff;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.7), 0 0 4px rgba(0, 0, 0, 0.5);
  position: relative;
  background-clip: padding-box;
  -webkit-tap-highlight-color: transparent;
  /* Outer gold halo + crisp dark seat — gives every chip a polished
     metal trim without depending on JS. */
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.55),
    0 0 0 2px rgba(240, 194, 82, 0.65),
    0 0 8px rgba(255, 227, 154, 0.20);
}
.chip::before {
  /* 6 cream-gold edge inserts (image 1 pen-ring metaphor). */
  content: '';
  position: absolute; inset: 0; border-radius: 50%;
  background: conic-gradient(
    var(--gold-glow) 0deg     22deg,
    transparent      22deg     60deg,
    var(--gold-glow) 60deg     82deg,
    transparent      82deg    120deg,
    var(--gold-glow) 120deg   142deg,
    transparent     142deg    180deg,
    var(--gold-glow) 180deg   202deg,
    transparent     202deg    240deg,
    var(--gold-glow) 240deg   262deg,
    transparent     262deg    300deg,
    var(--gold-glow) 300deg   322deg,
    transparent     322deg    360deg
  );
  -webkit-mask: radial-gradient(circle, transparent 60%, #000 60%, #000 90%, transparent 91%);
          mask: radial-gradient(circle, transparent 60%, #000 60%, #000 90%, transparent 91%);
  pointer-events: none;
}
.chip::after {
  /* Inner disc carries the JS-set body color via background:inherit.
     A cyan-soft inner ring + warm sheen sells the crystal feel. */
  content: '';
  position: absolute; inset: 12%;
  border-radius: 50%;
  background: inherit;
  border: 1px dashed rgba(255, 245, 216, 0.40);
  box-shadow:
    inset 0 2px 3px rgba(255, 245, 216, 0.30),
    inset 0 -3px 4px rgba(0, 0, 0, 0.35),
    inset 0 0 8px rgba(95, 183, 255, 0.15);
  pointer-events: none;
}
.chip > .chip-val { position: relative; z-index: 2; pointer-events: none; }

.chip-on-board {
  width: 38px; height: 38px;
  position: absolute;
  border: 1.5px solid rgba(0, 0, 0, 0.40);
  font-size: 12px;
  pointer-events: none;
  z-index: 10;
}
.drag-chip {
  width: 50px; height: 50px;
  position: fixed;
  border: 1.5px solid rgba(0, 0, 0, 0.45);
  font-size: 14px;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.55),
    0 0 0 2px rgba(240, 194, 82, 0.65),
    0 8px 16px rgba(0, 0, 0, 0.70);
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 1000;
  user-select: none; -webkit-user-select: none;
}

/* ─────────────────────────────────────────────────────────────────
   CONTROLS — denom selector + ROLL + mute. ROLL is the headline.
   Gold-rimmed crystal pill, deep cobalt fill, cyan inner glow that
   intensifies on press.
   ───────────────────────────────────────────────────────────────── */
.ctrls {
  flex-shrink: 0;
  padding: 8px 12px 12px;
  display: flex; align-items: center; justify-content: center; gap: 12px;
  /* Stab 138: transparent backdrop — body pattern shows through.
     The chip selector, ROLL button, and mute button each keep their
     own crystal-glass backgrounds. */
  background: transparent;
  border-top: 1px solid rgba(240, 194, 82, 0.18);
}
.denom { display: flex; align-items: center; gap: 0; }
.darr {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; color: var(--cyan-soft); cursor: pointer;
  background:
    radial-gradient(ellipse 80% 100% at 50% 0%, rgba(95, 183, 255, 0.18) 0%, transparent 70%),
    linear-gradient(180deg, rgba(20, 42, 100, 0.65) 0%, rgba(10, 24, 56, 0.85) 100%);
  border: 1px solid rgba(240, 194, 82, 0.40);
  border-radius: 11px; outline: none;
  -webkit-tap-highlight-color: transparent;
  font-family: inherit;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.55);
  box-shadow:
    inset 0 1px 0 rgba(200, 230, 255, 0.12),
    inset 0 -1px 0 rgba(0, 0, 0, 0.55),
    0 1px 2px rgba(0, 0, 0, 0.55);
}
.darr:active { transform: translateY(2px); box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.55); }
.chip-sel {
  width: 56px; height: 56px;
  font-size: 18px;
  cursor: pointer;
  border: 1.5px solid rgba(0, 0, 0, 0.45);
  margin: 0 4px;
  /* extra outer glow for the active chip-selector */
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.55),
    0 0 0 2px rgba(240, 194, 82, 0.85),
    0 0 14px rgba(255, 227, 154, 0.35),
    0 6px 14px rgba(0, 0, 0, 0.65);
}
.chip-sel:active { transform: scale(0.93); }

.roll-btn {
  flex: 1; max-width: 200px; padding: 13px 0;
  font-size: 16px; font-weight: 900; letter-spacing: 0.18em;
  color: var(--cream);
  background:
    /* layered cyan-gold light: cyan inner glow + gold rim sheen + cobalt body */
    radial-gradient(ellipse 80% 100% at 50% 100%, rgba(95, 183, 255, 0.55) 0%, transparent 70%),
    radial-gradient(ellipse 100% 50% at 50% 0%, rgba(255, 227, 154, 0.30) 0%, transparent 70%),
    linear-gradient(180deg, #1f4ea8 0%, #0e1f4a 60%, #050d24 100%);
  border: 1px solid rgba(255, 227, 154, 0.85);
  border-radius: 100px; cursor: pointer; outline: none;
  -webkit-tap-highlight-color: transparent;
  position: relative;
  box-shadow:
    /* outer warm/cool double-ring */
    0 0 0 1px rgba(0, 0, 0, 0.55),
    0 0 14px rgba(255, 227, 154, 0.40),
    0 0 26px -4px rgba(95, 183, 255, 0.45),
    inset 0 1px 0 rgba(255, 245, 216, 0.40),
    inset 0 -2px 4px rgba(0, 0, 0, 0.55),
    0 4px 14px rgba(0, 0, 0, 0.55);
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.55), 0 0 10px rgba(255, 227, 154, 0.45);
  font-family: inherit;
  transition: transform 0.08s, box-shadow 0.20s;
}
.roll-btn::before {
  /* asymmetric glint along the top-LEFT — like the pen barrel highlight */
  content: ''; position: absolute; top: 1px; left: 12%; width: 30%; height: 35%;
  border-radius: 100px;
  background: linear-gradient(180deg, rgba(255, 245, 216, 0.55) 0%, transparent 100%);
  pointer-events: none;
}
.roll-btn:active {
  transform: translateY(2px);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.55),
    0 0 22px rgba(255, 227, 154, 0.65),
    0 0 36px -4px rgba(95, 183, 255, 0.65),
    inset 0 1px 0 rgba(255, 245, 216, 0.50),
    inset 0 -1px 2px rgba(0, 0, 0, 0.55),
    0 2px 6px rgba(0, 0, 0, 0.55);
}
.roll-btn:disabled {
  opacity: 0.35; cursor: default; transform: none;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.55),
    0 0 6px rgba(240, 194, 82, 0.18),
    inset 0 1px 0 rgba(255, 245, 216, 0.20),
    inset 0 -2px 4px rgba(0, 0, 0, 0.55);
}
.mute-btn {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  background:
    radial-gradient(ellipse 80% 100% at 50% 0%, rgba(95, 183, 255, 0.18) 0%, transparent 70%),
    linear-gradient(180deg, rgba(20, 42, 100, 0.65) 0%, rgba(10, 24, 56, 0.85) 100%);
  border: 1px solid rgba(240, 194, 82, 0.40);
  border-radius: 11px; cursor: pointer;
  color: var(--cyan-soft); outline: none;
  -webkit-tap-highlight-color: transparent;
  box-shadow:
    inset 0 1px 0 rgba(200, 230, 255, 0.12),
    0 1px 2px rgba(0, 0, 0, 0.55);
}

/* ─────────────────────────────────────────────────────────────────
   START OVERLAY — black-glass with cyan-gold logo.
   Stab 135: moved to body-level placement (index.html) + ported the
   slide-up dismiss animation from 3DICE style.css :599-620. Pre-135
   the overlay was nested inside #app (max-width:500px), so on wide
   screens it occupied only the central column; body-level placement
   lets position:absolute; inset:0 fall back to the viewport.
   Transition expanded from opacity-only 0.4s to opacity+transform
   2500ms ease-out (theatrical lift — matches 3DICE Stab 6d). 7X3's
   own gradient is preserved; only the timing/transform are ported.
   ───────────────────────────────────────────────────────────────── */
.start-ov {
  position: absolute; inset: 0; z-index: 50;
  background:
    radial-gradient(ellipse 60% 50% at 50% 45%, rgba(31, 78, 168, 0.30) 0%, transparent 70%),
    radial-gradient(ellipse 80% 40% at 50% 80%, rgba(95, 183, 255, 0.15) 0%, transparent 70%),
    rgba(2, 6, 15, 0.96);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 14px;
  padding: 0 20px;
  cursor: pointer;
  opacity: 1;
  transform: translateY(0);
  transition: opacity 2500ms ease-out, transform 2500ms ease-out;
}
.start-ov.hidden {
  opacity: 0;
  transform: translateY(-100%);
  pointer-events: none;
}
.start-ov .icon  { font-size: 56px; filter: drop-shadow(0 0 18px rgba(255, 227, 154, 0.55)); }
.start-ov .title {
  font-size: 38px; font-weight: 900; letter-spacing: 0.18em;
  background: linear-gradient(180deg, var(--cream) 0%, var(--gold-lt) 50%, var(--gold) 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 14px rgba(240, 194, 82, 0.45));
}
.start-ov .sub {
  font-size: 21px; color: #ffffff;
  letter-spacing: 0.20em; text-transform: uppercase;
}
.start-ov .tip {
  font-size: 17px; color: var(--amber);
  text-align: center; max-width: 280px; padding: 0 16px;
  line-height: 1.45;
  text-shadow: 0 0 8px rgba(255, 178, 74, 0.30);
}
/* Site logo wordmark — small, subtle, anchored to the top of the
   start overlay. Positioned absolute so it doesn't displace the
   centered title/dice/sub/tip stack. */
.start-ov .site-logo {
  position: absolute;
  top: calc(14px + env(safe-area-inset-top, 0px));
  left: 50%; transform: translateX(-50%);
  display: inline-flex; align-items: center; gap: 8px;
  text-decoration: none; opacity: 0.9;
  -webkit-tap-highlight-color: transparent;
}
.start-ov .site-logo img {
  height: 28px; width: auto; display: block;
  filter: drop-shadow(0 0 4px rgba(255, 227, 154, 0.30));
}
.start-ov .site-logo span {
  font-size: 13px; font-weight: 800; letter-spacing: 0.04em; line-height: 1;
  background: linear-gradient(180deg, var(--cream) 0%, var(--gold-lt) 60%, var(--gold) 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.start-ov .site-logo:hover { opacity: 1; }
/* Footer icon row — three icons (legal / support / share) at the
   very bottom of the start overlay. Same chassis as apex
   .lobby-footer-support but scoped to the start overlay. */
.start-ov-footer {
  position: absolute;
  bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  left: 50%; transform: translateX(-50%);
  display: flex; gap: 14px; align-items: center;
}
.start-ov-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px;
  color: var(--gold-lt);
  background: none; border: none; padding: 0; margin: 0;
  font: inherit; cursor: pointer; text-decoration: none;
  filter: drop-shadow(0 0 4px rgba(255, 227, 154, 0.30));
  -webkit-tap-highlight-color: transparent;
}
.start-ov-icon:hover {
  color: var(--cream);
  filter: drop-shadow(0 0 6px rgba(255, 227, 154, 0.55));
}
.start-ov-icon svg { display: block; }

/* ─── Stab 83: legal menu overlay ────────────────────────────────────
   Three-item menu opened from the start overlay's LEGAL icon. Layout
   + selectors mirror apex's #legalOv (main-domain/index.html
   :367-440 + :291-324). The item anchors use root-relative URLs so
   the existing info-ui click delegation intercepts them as in-game
   overlays — preserves 7X3's never-leave-the-game UX. */
.legal-menu-ov {
  position: fixed; inset: 0;
  display: flex; align-items: flex-start; justify-content: center;
  z-index: 100;
  padding: 24px 14px;
  padding-top: calc(24px + env(safe-area-inset-top, 0px));
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.30s ease-out;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.legal-menu-ov.open { pointer-events: auto; opacity: 1; }
@media (min-width: 540px) {
  .legal-menu-ov { align-items: center; padding: 24px; }
}
.legal-menu-bd {
  position: fixed; inset: 0;
  background: rgba(2, 7, 15, 0.70);
  -webkit-backdrop-filter: blur(4px);
          backdrop-filter: blur(4px);
}
.legal-menu-card {
  position: relative;
  width: 100%; max-width: 440px;
  padding: 22px 18px calc(20px + env(safe-area-inset-bottom, 0px));
  border-radius: 22px;
  background:
    radial-gradient(ellipse 100% 30% at 50% 0%, rgba(95, 183, 255, 0.22) 0%, transparent 60%),
    linear-gradient(180deg, rgba(20, 42, 100, 0.96) 0%, rgba(5, 13, 36, 0.96) 100%);
  border: 1px solid rgba(240, 194, 82, 0.65);
  box-shadow:
    inset 0 1px 0 rgba(255, 245, 216, 0.22),
    inset 0 0 0 1px rgba(255, 227, 154, 0.10),
    0 16px 36px rgba(0, 0, 0, 0.70);
  transform: translateY(-20px);
  transition: transform 0.30s ease-out;
}
.legal-menu-ov.open .legal-menu-card { transform: translateY(0); }
.legal-menu-close {
  position: absolute; top: 12px; right: 12px;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(240, 194, 82, 0.55);
  color: var(--cream);
  font-size: 20px; line-height: 1;
  cursor: pointer; outline: none;
  font-family: inherit;
  display: inline-flex; align-items: center; justify-content: center;
  -webkit-tap-highlight-color: transparent;
  z-index: 2;
}
.legal-menu-close:hover { border-color: var(--gold-lt); color: var(--gold-glow); }
.legal-menu-title {
  font-size: 18px; font-weight: 900; letter-spacing: 0.10em; text-transform: uppercase;
  color: var(--cream);
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.55);
  padding-right: 36px;
  margin-bottom: 4px;
}
.legal-menu-sub {
  font-size: 13px; color: var(--txt-dim); line-height: 1.5;
  margin-bottom: 14px;
}
.legal-menu-row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(2, 7, 15, 0.45);
  border: 1px solid rgba(240, 194, 82, 0.30);
  color: var(--cream);
  text-decoration: none;
  font-family: inherit;
  font-size: 14px; font-weight: 700; letter-spacing: 0.02em;
  cursor: pointer; outline: none;
  transition: border-color 0.18s, background 0.18s, transform 0.06s;
  -webkit-tap-highlight-color: transparent;
}
.legal-menu-row + .legal-menu-row { margin-top: 8px; }
.legal-menu-row:hover  { border-color: var(--gold-lt); background: rgba(20, 42, 100, 0.55); }
.legal-menu-row:active { transform: translateY(1px); }
.legal-menu-row-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; flex-shrink: 0;
  border-radius: 50%;
  background: linear-gradient(180deg, var(--gold-glow) 0%, var(--gold-lt) 60%, var(--gold) 100%);
  color: #1a1408;
  box-shadow: inset 0 1px 0 rgba(255, 245, 216, 0.40);
}
.legal-menu-row-icon svg { width: 20px; height: 20px; display: block; }
.legal-menu-row-label { flex: 1 1 auto; }
.legal-menu-row-meta {
  display: inline-flex; align-items: center;
  font-size: 11px; font-weight: 800; letter-spacing: 0.10em; text-transform: uppercase;
  color: var(--cyan-soft);
  min-width: 60px; justify-content: flex-end;
}

/* ─── Stab 84: help / instructions overlay ──────────────────────────
   Same apex-derived card chassis as .legal-menu-*. Per Stab 84 spec:
   open animation is 300ms ease-in with translateY(8px → 0) + backdrop
   opacity 0 → 1; close is 200ms ease-out reverse. */
.help-ov {
  position: fixed; inset: 0;
  display: flex; align-items: flex-start; justify-content: center;
  z-index: 100;
  padding: 24px 14px;
  padding-top: calc(24px + env(safe-area-inset-top, 0px));
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.20s ease-out;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.help-ov.open {
  pointer-events: auto;
  opacity: 1;
  transition: opacity 0.30s ease-in;
}
@media (min-width: 540px) {
  .help-ov { align-items: center; padding: 24px; }
}
.help-ov-bd {
  position: fixed; inset: 0;
  background: rgba(2, 7, 15, 0.70);
  -webkit-backdrop-filter: blur(4px);
          backdrop-filter: blur(4px);
}
.help-ov-card {
  position: relative;
  width: 100%; max-width: 460px;
  padding: 22px 18px calc(20px + env(safe-area-inset-bottom, 0px));
  border-radius: 22px;
  background:
    radial-gradient(ellipse 100% 30% at 50% 0%, rgba(95, 183, 255, 0.22) 0%, transparent 60%),
    linear-gradient(180deg, rgba(20, 42, 100, 0.96) 0%, rgba(5, 13, 36, 0.96) 100%);
  border: 1px solid rgba(240, 194, 82, 0.65);
  box-shadow:
    inset 0 1px 0 rgba(255, 245, 216, 0.22),
    inset 0 0 0 1px rgba(255, 227, 154, 0.10),
    0 16px 36px rgba(0, 0, 0, 0.70);
  transform: translateY(8px);
  transition: transform 0.20s ease-out;
}
.help-ov.open .help-ov-card {
  transform: translateY(0);
  transition: transform 0.30s ease-in;
}
.help-ov-close {
  position: absolute; top: 12px; right: 12px;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(240, 194, 82, 0.55);
  color: var(--cream);
  font-size: 20px; line-height: 1;
  cursor: pointer; outline: none;
  font-family: inherit;
  display: inline-flex; align-items: center; justify-content: center;
  -webkit-tap-highlight-color: transparent;
  z-index: 2;
}
.help-ov-close:hover { border-color: var(--gold-lt); color: var(--gold-glow); }
.help-ov-title {
  font-size: 18px; font-weight: 900; letter-spacing: 0.10em; text-transform: uppercase;
  color: var(--cream);
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.55);
  padding-right: 36px;
  margin-bottom: 12px;
}
.help-ov-section { margin-top: 12px; }
.help-ov-section:first-of-type { margin-top: 0; }
.help-ov-section-title {
  margin: 0 0 4px 0;
  font-size: 13px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--gold-lt);
}
/* When the heading is itself a link (e.g. the external "Ultimate Guide"
   blurb), the bare <a> would otherwise inherit the browser's blue link
   default. Pin all four link states to the same --gold-lt the sibling
   non-linked headings use, and keep the underline so it still reads as
   a link. Color + underline only — font-size / weight / spacing stay
   on the parent .help-ov-section-title rule above. */
.help-ov-section-title a,
.help-ov-section-title a:link,
.help-ov-section-title a:visited,
.help-ov-section-title a:hover,
.help-ov-section-title a:active {
  color: var(--gold-lt);
  text-decoration: underline;
}
.help-ov-section-body {
  margin: 0;
  font-size: 13px; line-height: 1.55;
  color: var(--txt);
}
.help-ov-section-body b { color: var(--gold-glow); font-weight: 800; }

/* ─────────────────────────────────────────────────────────────────
   WIN OVERLAY — gold burst.
   ───────────────────────────────────────────────────────────────── */
.win-ov {
  position: absolute; inset: 0; z-index: 55;
  display: none; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  background:
    radial-gradient(circle at 50% 45%, rgba(255, 227, 154, 0.45) 0%, rgba(31, 78, 168, 0.30) 35%, rgba(2, 6, 15, 0.96) 75%);
  pointer-events: none;
}
.win-ov.show  { display: flex; animation: fadeIn 0.3s ease; }
.win-ov .lbl  {
  font-size: 18px; font-weight: 700;
  color: var(--cyan-pale); letter-spacing: 0.20em; text-transform: uppercase;
  text-shadow: 0 0 10px rgba(95, 183, 255, 0.35);
}
.win-ov .amt  {
  font-size: 60px; font-weight: 900;
  background: linear-gradient(180deg, var(--cream) 0%, var(--gold-glow) 50%, var(--gold) 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 28px rgba(255, 227, 154, 0.55));
}
.win-ov .dice { font-size: 14px; color: var(--cyan-soft); margin-top: 4px; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ─────────────────────────────────────────────────────────────────
   HELP "?" + REAL MONEY pill — small crystal medallions.
   Both belong to the same gold-rim cobalt-glass family.
   ───────────────────────────────────────────────────────────────── */
/* Stab 138: .help-btn moved INSIDE the .result row, in-line with the
   dice-pip glyphs and sum. Drops position:absolute / top / left /
   z-index. Slightly smaller (24×24 vs old 28×28) to fit inside the
   36px-tall result row without crowding. Chrome (gold rim + cobalt
   glass fill) is preserved. */
.help-btn {
  flex-shrink: 0;
  width: 24px; height: 24px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 30%, rgba(95, 183, 255, 0.45) 0%, transparent 60%),
    linear-gradient(180deg, rgba(20, 42, 100, 0.85) 0%, rgba(5, 13, 36, 0.95) 100%);
  color: var(--gold-glow);
  border: 1px solid rgba(240, 194, 82, 0.65);
  font-family: inherit;
  font-size: 13px; font-weight: 900;
  text-decoration: none;
  cursor: pointer;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.55), 0 0 6px rgba(255, 227, 154, 0.45);
  box-shadow:
    inset 0 1px 0 rgba(200, 230, 255, 0.20),
    inset 0 -1px 0 rgba(0, 0, 0, 0.55),
    0 0 10px rgba(95, 183, 255, 0.20),
    0 2px 4px rgba(0, 0, 0, 0.65);
  -webkit-tap-highlight-color: transparent;
}
.help-btn:active { transform: translateY(1px); }
.help-btn:hover  { color: var(--cream); border-color: var(--gold-glow); }

/* Stab 131: .real-money button + .rm-dot + body.is-demo/.is-real
   visibility-toggle rules + .user-tag .login-link rules all removed.
   The Real Money button is gone (replaced by the in-iframe
   play-mode toggle after Stab 132); the body class flips are no
   longer set by game.js; #userTag span is gone with the .bar block. */


/* ─────────────────────────────────────────────────────────────────
   DEPOSIT OVERLAY — reuses .auth-ov chrome for the slide-in card,
   adds deposit-specific layouts for the 5 screens.
   ───────────────────────────────────────────────────────────────── */


.dep-footer {
  margin-top: 18px;
  padding-top: 10px;
  border-top: 1px solid rgba(240, 194, 82, 0.20);
  display: flex; flex-wrap: wrap; gap: 6px 12px;
  justify-content: center;
  font-size: 11.5px;
}
.dep-footer a {
  color: var(--gold-lt); text-decoration: none; opacity: 0.85; letter-spacing: 0.04em;
}
.dep-footer a:hover { opacity: 1; color: var(--cream); text-shadow: 0 0 8px rgba(255, 227, 154, 0.45); }
.dep-footer .dot { color: var(--cyan-soft); opacity: 0.45; }

.dep-secondary {
  margin-top: 8px;
  padding: 11px 0;
  width: 100%;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font-size: 13px; font-weight: 800; letter-spacing: 0.10em; text-transform: uppercase;
  color: var(--cream);
  background:
    radial-gradient(ellipse 80% 100% at 50% 0%, rgba(95, 183, 255, 0.18) 0%, transparent 70%),
    linear-gradient(180deg, rgba(20, 42, 100, 0.65) 0%, rgba(10, 24, 56, 0.85) 100%);
  border: 1px solid rgba(240, 194, 82, 0.55);
  border-radius: 100px;
  cursor: pointer; outline: none;
  font-family: inherit;
  text-decoration: none;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.55);
  box-shadow:
    inset 0 1px 0 rgba(200, 230, 255, 0.12),
    0 1px 2px rgba(0, 0, 0, 0.55);
  -webkit-tap-highlight-color: transparent;
}
.dep-secondary:active   { transform: translateY(1px); }
.dep-secondary[disabled]{ opacity: 0.45; cursor: default; }

.dep-section-label {
  font-size: 11.5px; font-weight: 800; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--cyan-soft);
  margin: 6px 0 8px;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.45);
}

.dep-note {
  margin: 10px 0 0;
  font-size: 12.5px; line-height: 1.45;
  color: rgba(234, 242, 255, 0.70);
}
.dep-link-row {
  display: flex; gap: 14px; justify-content: center;
  margin-top: 10px;
}

/* ── Welcome screen ────────────────────────────────────────────── */
.dep-welcome { text-align: center; padding: 8px 4px 4px; }
.dep-check   { display: flex; justify-content: center; margin-bottom: 12px; filter: drop-shadow(0 0 14px rgba(52, 211, 153, 0.45)); }
.dep-headline {
  font-size: 18px; font-weight: 900; letter-spacing: 0.10em; text-transform: uppercase;
  color: var(--cream);
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.55), 0 0 10px rgba(95, 183, 255, 0.20);
  margin-bottom: 8px;
}
.dep-sub {
  font-size: 14px; line-height: 1.5;
  color: rgba(234, 242, 255, 0.78);
  margin-bottom: 20px;
}
.dep-primary { /* alias for .auth-submit; just keeps the welcome HTML readable */ }

/* DEPOSIT NOW — primary, dominant CTA on the welcome screen.
   Bigger pad + slightly larger type + stronger gold glow. Full-width
   so it reads as THE action, not one of two equal options. */
.dep-welcome .dep-primary {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 17px 0;
  font-size: 16px;
  letter-spacing: 0.16em;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.45),
    0 0 22px rgba(255, 227, 154, 0.55),
    0 0 36px -4px rgba(95, 183, 255, 0.55),
    inset 0 1px 0 rgba(255, 245, 216, 0.55),
    inset 0 -2px 4px rgba(0, 0, 0, 0.55);
}

/* CONTINUE FREE PLAY — secondary, ghost-style. Same width to keep
   alignment, but lighter font + soft gold rim + no glow so it does
   not compete with DEPOSIT NOW. */
.dep-welcome .dep-secondary {
  margin-top: 10px;
  padding: 8px 0;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: rgba(234, 242, 255, 0.72);
  background: transparent;
  border: 1px solid rgba(240, 194, 82, 0.32);
  box-shadow: none;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.45);
}
.dep-welcome .dep-secondary:hover {
  color: var(--cream);
  border-color: rgba(240, 194, 82, 0.50);
}

/* Stab 27 / Stab 28 / Stab 29: balance display in the deposit flow.
   - .deposit-balance-banner: chassis-level top strip on amount /
     method / confirm screens.
   - .welcome-balance: inline line between the two welcome CTAs
     (restored in Stab 29 after the Stab 28 audit miss — welcome IS
     reachable for depositors via doLogin / Google login / Back navs).
   Both shown only when real balance > 0; deposit-ui.js's helper now
   reads window.__7X3_GET_REAL_BAL__ from game.js (Stab 29) — covers
   both real-mode (G.bal) and forced free-play (savedRealBal).
   Both 17px gold-lt for visual consistency. */
.deposit-balance-banner {
  text-align: center;
  padding: 10px 14px 12px;
  font-size: 17px; font-weight: 700;
  color: var(--gold-lt);
  letter-spacing: 0.04em;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.45);
  border-bottom: 1px solid rgba(240, 194, 82, 0.18);
}
.dep-welcome .welcome-balance {
  margin-top: 10px;
  text-align: center;
  font-size: 17px; font-weight: 700;
  color: var(--gold-lt);
  letter-spacing: 0.04em;
  opacity: 0.85;
}

/* ── Amount grid ──────────────────────────────────────────────── */
.dep-amount-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
  margin-bottom: 6px;
}
.dep-amount {
  position: relative;
  padding: 14px 10px;
  text-align: center;
  border-radius: 12px;
  cursor: pointer; outline: none;
  font-family: inherit;
  background:
    radial-gradient(ellipse 100% 60% at 50% 0%, rgba(95, 183, 255, 0.20) 0%, transparent 70%),
    linear-gradient(180deg, #14306e 0%, #0a1a44 60%, #050d24 100%);
  border: 1px solid rgba(240, 194, 82, 0.45);
  color: var(--cream);
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.55);
  box-shadow:
    inset 0 1px 0 rgba(200, 230, 255, 0.16),
    inset 0 -8px 16px rgba(0, 0, 0, 0.45),
    0 2px 6px rgba(0, 0, 0, 0.55);
  -webkit-tap-highlight-color: transparent;
}
.dep-amount:active { transform: scale(0.98); }
.dep-amount.selected {
  border-color: var(--gold-glow);
  box-shadow:
    inset 0 1px 0 rgba(255, 245, 216, 0.30),
    inset 0 -8px 16px rgba(0, 0, 0, 0.40),
    0 0 16px rgba(255, 227, 154, 0.45),
    0 0 24px -4px rgba(95, 183, 255, 0.35);
}
.dep-amount-usd {
  display: block;
  font-size: 22px; font-weight: 900; letter-spacing: 0.04em;
  background: linear-gradient(180deg, var(--cream) 0%, var(--gold-lt) 60%, var(--gold) 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 6px rgba(240, 194, 82, 0.30));
}
.dep-amount-chips {
  display: block; margin-top: 4px;
  font-size: 12px; font-weight: 700; letter-spacing: 0.06em;
  color: var(--cyan-soft);
}

/* ── Method list ──────────────────────────────────────────────── */
.dep-method-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 8px; }
.dep-method {
  display: flex; align-items: center; gap: 12px;
  width: 100%;
  padding: 12px 14px;
  text-align: left;
  border-radius: 12px;
  cursor: pointer; outline: none;
  font-family: inherit;
  background:
    radial-gradient(ellipse 60% 100% at 0% 50%, rgba(95, 183, 255, 0.16) 0%, transparent 70%),
    linear-gradient(180deg, rgba(20, 42, 100, 0.65) 0%, rgba(10, 24, 56, 0.85) 100%);
  border: 1px solid rgba(240, 194, 82, 0.45);
  color: var(--cream);
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.55);
  box-shadow:
    inset 0 1px 0 rgba(200, 230, 255, 0.12),
    0 1px 2px rgba(0, 0, 0, 0.55);
  -webkit-tap-highlight-color: transparent;
}
.dep-method:active { transform: scale(0.99); }
.dep-method.selected {
  border-color: var(--gold-glow);
  box-shadow:
    inset 0 1px 0 rgba(255, 245, 216, 0.22),
    0 0 14px rgba(255, 227, 154, 0.40);
}
.dep-method[disabled] {
  cursor: default; opacity: 0.55;
}
.dep-method-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px;
  color: var(--cyan-soft);
}
.dep-method-name { flex: 1; font-weight: 800; letter-spacing: 0.04em; }
.dep-method-badge {
  margin-left: auto;
  padding: 2px 8px;
  font-size: 10px; font-weight: 800; letter-spacing: 0.10em; text-transform: uppercase;
  color: var(--cyan-soft);
  background: rgba(95, 183, 255, 0.10);
  border: 1px solid rgba(95, 183, 255, 0.30);
  border-radius: 100px;
}

/* ── Confirm screen ───────────────────────────────────────────── */
.dep-confirm {
  text-align: center; padding: 14px 4px 6px;
  border: 1px solid rgba(240, 194, 82, 0.35);
  border-radius: 12px;
  background:
    radial-gradient(ellipse 100% 60% at 50% 0%, rgba(255, 227, 154, 0.10) 0%, transparent 70%),
    linear-gradient(180deg, rgba(20, 42, 100, 0.45) 0%, rgba(5, 13, 36, 0.55) 100%);
}
.dep-confirm-amount {
  font-size: 38px; font-weight: 900; letter-spacing: 0.04em;
  background: linear-gradient(180deg, var(--cream) 0%, var(--gold-lt) 60%, var(--gold) 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 10px rgba(240, 194, 82, 0.35));
}
.dep-confirm-chips  { font-size: 14px; color: var(--cyan-pale); letter-spacing: 0.06em; margin-top: 4px; }
.dep-confirm-method { font-size: 13px; color: rgba(234, 242, 255, 0.78); margin-top: 8px; }

/* ── Instructions screen ──────────────────────────────────────── */
.dep-stub-note {
  margin-bottom: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(255, 178, 74, 0.08);
  border: 1px solid rgba(255, 178, 74, 0.40);
  color: var(--amber);
  font-size: 12px; line-height: 1.4;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.55);
}
.dep-pay-amount {
  display: flex; align-items: baseline; justify-content: center; gap: 8px;
  padding: 14px 8px;
  border-radius: 12px;
  background:
    radial-gradient(ellipse 100% 60% at 50% 0%, rgba(255, 227, 154, 0.12) 0%, transparent 70%),
    linear-gradient(180deg, rgba(20, 42, 100, 0.45) 0%, rgba(5, 13, 36, 0.55) 100%);
  border: 1px solid rgba(240, 194, 82, 0.45);
  margin-bottom: 10px;
}
.dep-pay-amount-num {
  font-family: 'SFMono-Regular', Consolas, Menlo, monospace;
  font-size: 26px; font-weight: 700; letter-spacing: 0.04em;
  color: var(--cream);
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.55);
}
.dep-pay-amount-asset {
  font-size: 14px; font-weight: 800; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--gold-lt);
}
.dep-pay-actions {
  display: flex; gap: 8px; flex-wrap: wrap;
  margin: 8px 0 12px;
}
.dep-pay-actions .dep-secondary { flex: 1; min-width: 130px; padding: 9px 0; font-size: 11.5px; }
.dep-qr {
  display: flex; justify-content: center;
  padding: 10px;
  background: #ffffff;
  border-radius: 12px;
  border: 1px solid rgba(240, 194, 82, 0.45);
  margin: 8px 0 12px;
}
.dep-qr img { display: block; width: 100%; max-width: 220px; height: auto; }
.dep-address {
  word-break: break-all;
  padding: 10px 12px;
  font-family: 'SFMono-Regular', Consolas, Menlo, monospace;
  font-size: 12.5px;
  color: var(--cream);
  background: rgba(2, 6, 15, 0.55);
  border: 1px solid rgba(240, 194, 82, 0.35);
  border-radius: 10px;
  -webkit-user-select: all; user-select: all;
}
.dep-status {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(31, 78, 168, 0.20);
  border: 1px solid rgba(95, 183, 255, 0.35);
  font-size: 13px; color: var(--cyan-pale);
  text-align: center;
}

/* Card screen — looks production-ready, but the form has no submit
   handler and the Pay button is disabled. */
.dep-card-summary { margin-bottom: 12px; }
.dep-card-brands {
  display: flex; gap: 8px; justify-content: center; margin-bottom: 12px;
  flex-wrap: wrap;
}
.dep-card-brand {
  padding: 4px 10px; border-radius: 6px;
  font-size: 11px; font-weight: 800; letter-spacing: 0.10em;
  background: linear-gradient(180deg, rgba(255,255,255,0.92), rgba(220,225,235,0.85));
  color: #142a64;
  border: 1px solid rgba(20, 42, 100, 0.35);
  box-shadow: 0 1px 2px rgba(0,0,0,0.35);
}
.dep-card-form { display: flex; flex-direction: column; gap: 10px; }
.dep-card-row3 { display: grid; grid-template-columns: 2fr 1.4fr 1.6fr; gap: 8px; }
.dep-card-secure {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px; margin-top: 4px;
  font-size: 11.5px; line-height: 1.4;
  color: var(--cyan-soft);
  background: rgba(95, 183, 255, 0.08);
  border: 1px solid rgba(95, 183, 255, 0.25);
  border-radius: 8px;
}
.dep-card-lock { font-size: 13px; }
.dep-card-pay { margin-top: 6px; }
.dep-card-note {
  margin-top: 4px;
  padding: 8px 10px;
  font-size: 11.5px; line-height: 1.4;
  color: rgba(234, 242, 255, 0.70);
  background: rgba(255, 178, 74, 0.06);
  border: 1px solid rgba(255, 178, 74, 0.30);
  border-radius: 8px;
}

/* Stab 131: .user-tag .user-name-link and .user-tag .verify-email-link
   rules removed. The #userTag span carried these affordances; both
   the span and its inner anchors are gone with the .bar deletion.
   The verify-email path is reachable via shared/auth's verify mode
   triggered from login flow (post-Stab-132 iframe also routes here). */

/* ─────────────────────────────────────────────────────────────────
   IN-GAME INFO OVERLAY — How to Play, Privacy, Terms, Responsible
   Play. Reuses .auth-ov chrome (slide-up glass card, gold rim).
   The body is scrollable on mobile so long legal text stays usable.
   ───────────────────────────────────────────────────────────────── */

.info-ov .info-card { padding-bottom: 14px; }

.info-body {
  display: block;
  max-height: 60vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-right: 4px;        /* breathing room next to the scroll track */
}
.info-body h2 {
  font-size: 15px; color: var(--cyan-pale);
  margin-top: 16px; margin-bottom: 6px;
  letter-spacing: 0.05em;
  text-shadow: 0 0 8px rgba(95, 183, 255, 0.25);
}
.info-body p, .info-body li {
  font-size: 13.5px; line-height: 1.55;
  color: rgba(234, 242, 255, 0.85);
}
.info-body b { color: var(--gold-glow); }
.info-body a {
  color: var(--gold-lt);
  text-decoration: underline;
  text-decoration-color: rgba(240, 194, 82, 0.45);
  text-underline-offset: 2px;
}
.info-body a:hover { color: var(--cream); text-decoration-color: var(--gold-lt); }
.info-body ul { padding-left: 20px; margin-bottom: 8px; }
.info-body p:first-child { margin-top: 0; }
.info-body .callout {
  margin: 14px 0; padding: 12px 14px; border-radius: 12px;
  background:
    radial-gradient(ellipse 100% 80% at 0% 0%, rgba(255, 227, 154, 0.18) 0%, transparent 70%),
    linear-gradient(180deg, rgba(31, 78, 168, 0.25) 0%, rgba(12, 26, 60, 0.55) 100%);
  border: 1px solid rgba(255, 227, 154, 0.55);
  color: var(--cream);
  font-size: 13px; font-weight: 700;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.45);
}
.info-loading { color: var(--cyan-soft); text-align: center; padding: 18px 0; }
.info-back { margin-top: 12px; }

/* ─────────────────────────────────────────────────────────────────
   WIN CELEBRATION — coin flight + wallet pulse.
   The flight layer sits OVER the game on z-index 100, with
   pointer-events:none so chip drag/drop is unaffected. Coins are
   tiny gold disks animated via JS (transform on each rAF frame).
   ───────────────────────────────────────────────────────────────── */
.coin-flight-layer {
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 100;
  overflow: hidden;
  contain: layout paint;
}
.flying-coin {
  position: absolute; top: 0; left: 0;
  width: 18px; height: 18px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 30%,
      #fff5d8 0%,
      #ffe39a 28%,
      #f0c252 58%,
      #c98f1f 82%,
      #8a5a13 100%);
  border: 0.5px solid rgba(138, 90, 19, 0.85);
  box-shadow:
    0 0 10px rgba(255, 227, 154, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.65),
    inset 0 -2px 2px rgba(0, 0, 0, 0.30);
  will-change: transform, opacity;
  transform-origin: 50% 50%;
  pointer-events: none;
}

/* Wallet pulse on coin arrival. The wallet pill already has a
   gold rim — this animation briefly brightens + scales it so the
   player feels coins landing. Two intensities: small (per coin)
   and big (reduced-motion path / first arrival). */
.wallet-btn.coin-arrived {
  animation: wallet-pop-small 0.32s ease-out;
}
.wallet-btn.coin-arrived-big {
  animation: wallet-pop-big 0.7s ease-out;
}
@keyframes wallet-pop-small {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.06); filter: brightness(1.18); }
  100% { transform: scale(1); }
}
@keyframes wallet-pop-big {
  0%   { transform: scale(1);   filter: brightness(1); }
  35%  { transform: scale(1.12); filter: brightness(1.30) drop-shadow(0 0 12px rgba(255, 227, 154, 0.85)); }
  100% { transform: scale(1);   filter: brightness(1); }
}

/* Reduced-motion path — kill any incidental coin animation if the
   user has the OS setting on. JS still runs the simple wallet
   pulse so wins remain noticeable. */
@media (prefers-reduced-motion: reduce) {
  .flying-coin { animation: none !important; opacity: 0; }
}

/* ── Toast notifications ───────────────────────────────────────────
   Top-right stack, slide-in from the right, fade-out on dismiss.
   Sits above gameplay (z 9000) but below auth/deposit overlays
   (which use their own backdrops at higher z). */
.toast-host {
  position: fixed;
  top: 12px;
  right: 12px;
  z-index: 9000;
  display: flex; flex-direction: column; gap: 8px;
  pointer-events: none;
  max-width: calc(100vw - 24px);
}
.toast {
  pointer-events: auto;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 13.5px; font-weight: 700; letter-spacing: 0.04em;
  color: var(--cream);
  background: linear-gradient(180deg, rgba(20, 42, 100, 0.95) 0%, rgba(10, 24, 56, 0.95) 100%);
  border: 1px solid rgba(240, 194, 82, 0.55);
  box-shadow:
    inset 0 1px 0 rgba(200, 230, 255, 0.12),
    0 6px 18px rgba(0, 0, 0, 0.55);
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.55);
  opacity: 0;
  transform: translateX(20px);
  transition: opacity 0.22s ease-out, transform 0.22s ease-out;
}
.toast.show { opacity: 1; transform: translateX(0); }
.toast-err {
  border-color: rgba(255, 184, 159, 0.70);
  color: #ffe2d2;
}
@media (prefers-reduced-motion: reduce) {
  .toast { transition: opacity 0.18s linear; transform: none; }
}


/* Stab 134: .auth-iframe-overlay + .auth-iframe-overlay iframe +
   html.auth-overlay-open / body.auth-overlay-open rules removed
   from this file. The chassis lives in shared/iframe-overlay/
   iframe-overlay.css now, loaded via <link> in index.html. Class
   names renamed to .iframe-overlay / .iframe-overlay-open in the
   shared copy (forward-compatible with non-auth iframes). The
   shared module adds an animated fade-in + slide-in transition
   that the local copy lacked. */
