/* ═══════════════════════════════════════════════════════════════
   ARNOW CASINO — HUD SKIN
   deep teal enamel · dark walnut · warm gold · ivory

   One design language for every panel and control:
     · enamel body — a top-lit teal with a soft inner bevel
     · gold edge   — a real gradient hairline (masked pseudo-element),
                     not a flat 1px stroke, so the border reads as inlay
     · ivory type  — Cinzel small-caps for labels, gold for values
   Everything here is presentation only: every id and class the game
  's JS touches is preserved exactly.
   ═══════════════════════════════════════════════════════════════ */
:root {
  --gold:        #d4af37;
  --gold-hi:     #ffe6a8;
  --gold-deep:   #8a6a1e;
  --teal-950:    #041a16;
  --teal-900:    #07251f;
  --teal-800:    #0a3329;
  --teal-700:    #10443a;
  --ivory:       #f6f0e2;
  --ivory-dim:   rgba(198, 232, 220, .88);
  --red:         #b3121c;
  --serif:       'Cinzel', Georgia, 'Times New Roman', serif;
  --serif-body:  'Cormorant Garamond', Georgia, serif;

  /* the enamel recipe, reused everywhere */
  --enamel: linear-gradient(180deg, rgba(22, 70, 60, .97) 0%, rgba(8, 40, 34, .98) 46%, rgba(4, 22, 19, .98) 100%);
  --gold-edge: linear-gradient(158deg, #f7e2a6 0%, #b7912f 26%, #6f5514 50%, #e7c877 72%, #8d6c1f 100%);
  --panel-shadow:
    inset 0 1px 0 rgba(255, 240, 200, .22),
    inset 0 -1px 0 rgba(0, 0, 0, .55),
    0 10px 26px rgba(0, 0, 0, .55),
    0 2px 4px rgba(0, 0, 0, .4);
}

* { margin: 0; padding: 0; box-sizing: border-box; user-select: none; }
html, body { width: 100%; height: 100%; overflow: hidden; background: #050807; }
/* Final scene grade. The 3D pass is already tone-mapped, but measured against
   the mockup this frame still came out flatter (local contrast 32 vs 51) — a
   denser, crisper image. A small saturate/contrast lift on the canvas closes
   that gap at the display stage, which is where a mockup gets its polish, and
   costs nothing at runtime compared with another lighting pass. It is applied
   to the canvas ONLY, so HUD text and buttons keep their own values. */
#gl {
  position: fixed; inset: 0; display: block;
  filter: saturate(1.06) contrast(1.05) brightness(1.02);
}

.hidden { display: none !important; }

/* ── Cutscene overlay ─────────────────────────────────────────
   Two stacked layers so a clip change is a dissolve, never a black
   frame. Never interactive: the overlay covers the viewport, so
   pointer-events here would swallow every felt click. */
#cutscene, #cutscene-b {
  position: fixed; inset: 0; width: 100%; height: 100%;
  object-fit: cover; z-index: 40; pointer-events: none;
  background: #000;
}
#btn-skip-veo {
  position: fixed; right: 26px; bottom: 26px; z-index: 45;
  pointer-events: auto; cursor: pointer;
  font-family: var(--serif); font-size: 11px; letter-spacing: .16em;
  color: var(--gold-hi); background: rgba(6, 10, 9, .62);
  border: 1px solid rgba(212, 175, 55, .55); border-radius: 999px;
  padding: 10px 20px; backdrop-filter: blur(6px);
  transition: background .25s cubic-bezier(.22,.61,.36,1), border-color .25s;
}
#btn-skip-veo:hover { background: rgba(20, 40, 34, .85); border-color: var(--gold); }

/* Scene grade — over the canvas, under the HUD.
   Keeps the room's edges down so the lit table carries the frame.
   Round 2 pulled this back hard: the old ramp reached rgba(0,0,0,.40) by 80%
   of the radius and .64 at the corner, and the betting layout sits at 57-80%
   of frame height — so the felt was being veiled by up to 40% black. That is
   a wash over the action, which is the same category of error as the fog.
   Now the gradient stays clear across the table and only bites at the very
   edges of the frame. */
#scene-vignette {
  position: fixed; inset: 0; z-index: 15; pointer-events: none;
  background:
    radial-gradient(88% 78% at 50% 52%, transparent 62%, rgba(0, 0, 0, .26) 92%, rgba(0, 0, 0, .46) 100%),
    linear-gradient(180deg, rgba(2, 10, 8, .34) 0%, transparent 15%, transparent 92%, rgba(2, 8, 6, .34) 100%);
}

/* ═══════════ HUD SHELL ═══════════ */
#hud {
  position: fixed; inset: 0; z-index: 20; pointer-events: none;
  font-family: var(--serif); color: var(--ivory);
  /* Visibility must be a state flip, not a transition: under a throttled
     renderer a CSS transition on the HUD never advances and the floor stays
     invisible at opacity 0. */
  transition: none !important;
}
#hud button, #hud .clickable { pointer-events: auto; }

/* ── the shared panel recipe ── */
.hud-panel {
  position: relative;
  background-image: var(--enamel);
  background-color: transparent;
  border: 0;
  border-radius: 11px;
  box-shadow: var(--panel-shadow);
  padding: 9px 15px 10px;
}
.hud-panel::before {
  content: ''; position: absolute; inset: 0; border-radius: 11px;
  padding: 1px;
  background: var(--gold-edge);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}
/* a second, inner hairline — the bevel that makes the panel feel extruded */
.hud-panel::after {
  content: ''; position: absolute; inset: 3px; border-radius: 8px;
  border: 1px solid rgba(255, 232, 178, .09);
  pointer-events: none;
}

.plaque-title {
  position: static;
  font-size: 9.5px; letter-spacing: .16em; font-weight: 700;
  color: rgba(214, 240, 230, .92);
  text-shadow: 0 1px 0 rgba(0, 0, 0, .8);
}

/* ── TOP LEFT — wordmark + winning medallion ── */
#hud-top-left {
  position: absolute; top: 20px; left: 24px;
  display: flex; flex-direction: column; gap: 16px; align-items: flex-start;
}
#brand-mark {
  display: flex; align-items: baseline; gap: 8px;
  font-family: var(--serif); letter-spacing: .22em;
  text-shadow: 0 2px 12px rgba(0, 0, 0, .9);
}
#brand-mark .brand-arnow { font-size: 17px; font-weight: 700; color: var(--gold-hi); }
#brand-mark .brand-casino { font-size: 17px; font-weight: 700; color: #ded6c2; }

#winning-plaque {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  min-width: 118px; padding: 8px 14px 11px;
}
#winning-number {
  width: 64px; height: 64px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif); font-size: 30px; font-weight: 900; line-height: 1;
  color: var(--gold-hi);
  background:
    radial-gradient(circle at 50% 32%, rgba(255, 240, 200, .16), transparent 62%),
    linear-gradient(180deg, #0d3b31, #051e19);
  border: 1px solid rgba(212, 175, 55, .55);
  box-shadow:
    inset 0 2px 6px rgba(0, 0, 0, .6),
    inset 0 -1px 0 rgba(255, 232, 178, .18),
    0 0 0 3px rgba(212, 175, 55, .10);
  text-shadow: 0 2px 0 #3a2b08, 0 0 18px rgba(255, 220, 130, .45);
  transition: background .45s cubic-bezier(.22,.61,.36,1), color .3s;
}
#winning-number[data-color="red"] {
  background: radial-gradient(circle at 50% 32%, #c81d25, #7b0d13 72%);
  border-color: rgba(255, 190, 190, .55); color: #fff3f3;
}
#winning-number[data-color="black"] {
  background: radial-gradient(circle at 50% 32%, #23262a, #0a0b0d 72%);
  border-color: rgba(230, 236, 240, .38); color: #f2f4f6;
}
#winning-number[data-color="green"] {
  background: radial-gradient(circle at 50% 32%, #16855a, #08472f 72%);
  border-color: rgba(150, 245, 200, .5); color: #eafff5;
}
#winning-number[data-color] { text-shadow: 0 2px 8px rgba(0, 0, 0, .55); }

/* ── TOP CENTRE — phase cue ── */
#phase-banner-wrap { position: absolute; top: 20px; left: 50%; transform: translateX(-50%); }
#phase-banner { display: none !important; }
#phase-pill {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 9px 24px; border-radius: 999px;
  background-image: var(--enamel);
  color: var(--gold-hi);
  font-family: var(--serif); font-size: 12px; font-weight: 700;
  letter-spacing: .26em; text-indent: .26em; white-space: nowrap;
  box-shadow: var(--panel-shadow);
  animation: pillIn .45s cubic-bezier(.22,.61,.36,1);
}
#phase-pill::before {
  content: ''; position: absolute; inset: 0; border-radius: 999px; padding: 1px;
  background: var(--gold-edge);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  pointer-events: none;
}
#phase-pill[data-phase="bannerSpinning"],
#phase-pill[data-phase="bannerNoMore"] { color: #ffcf8a; }
#phase-pill[data-phase="bannerSpinning"]::before,
#phase-pill[data-phase="bannerNoMore"]::before {
  background: linear-gradient(158deg, #ffd79a, #c1741f 45%, #7a4310 62%, #ffca86 82%, #a35d16);
}
@keyframes pillIn {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── TOP RIGHT — balance + results ── */
#hud-top-right {
  position: absolute; top: 20px; right: 24px;
  display: flex; flex-direction: column; gap: 10px; align-items: flex-end;
}
#balance-plaque { min-width: 150px; text-align: right; padding: 8px 16px 10px; }
#balance-amount {
  font-family: var(--serif); font-size: 24px; font-weight: 900; line-height: 1.1;
  color: var(--gold-hi); letter-spacing: .02em;
  text-shadow: 0 2px 0 rgba(58, 43, 8, .9), 0 0 18px rgba(255, 224, 138, .3);
}
#results-plaque { padding: 8px 12px 10px; min-width: 172px; }
#recent-results {
  display: flex; gap: 5px; margin: 4px 0 0; min-height: 24px;
  justify-content: flex-end;
}
.result-slot {
  width: 24px; height: 24px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif); font-size: 10px; font-weight: 800; color: #fff;
  background: rgba(0, 0, 0, .34);
  border: 1px solid rgba(212, 175, 55, .22);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, .7);
}
.result-slot.red   { background: linear-gradient(180deg, #b3161f, #7c0d13); border-color: rgba(255, 170, 170, .38); }
.result-slot.black { background: linear-gradient(180deg, #23262a, #0c0d0f); border-color: rgba(225, 232, 238, .26); }
.result-slot.green { background: linear-gradient(180deg, #14804f, #07462c); border-color: rgba(140, 240, 190, .42); }

/* ── LEFT — chip rail ── */
#chip-rack {
  position: absolute; left: 22px; top: 50%; transform: translateY(-50%);
  display: flex; flex-direction: column; gap: 8px;
  padding: 12px 10px; border-radius: 16px;
  background-image: linear-gradient(180deg, rgba(14, 52, 45, .92), rgba(4, 22, 19, .95));
  box-shadow: var(--panel-shadow);
}
#chip-rack::before {
  content: ''; position: absolute; inset: 0; border-radius: 16px; padding: 1px;
  background: var(--gold-edge);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  pointer-events: none;
}
.chip-btn {
  position: relative; width: 62px; height: 62px; border-radius: 50%;
  border: 0; background: transparent; cursor: pointer; overflow: visible;
  display: flex; align-items: center; justify-content: center;
  transition: transform .28s cubic-bezier(.22,.61,.36,1), filter .28s;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, .65));
}
.chip-btn img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block; }
.chip-btn.no-img { background: radial-gradient(circle, var(--chip-color) 55%, #000 56%); }
.chip-btn span {
  position: absolute; bottom: -1px; right: -2px;
  min-width: 22px; padding: 1px 5px; border-radius: 999px;
  font-size: 9.5px; font-weight: 800; letter-spacing: .02em; color: #1c1607;
  background: linear-gradient(180deg, #ffe6a8, #c9a338);
  box-shadow: 0 2px 5px rgba(0, 0, 0, .6);
}
.chip-btn:hover { transform: translateY(-2px) scale(1.04); filter: drop-shadow(0 6px 12px rgba(0, 0, 0, .7)) brightness(1.06); }
/* Selected chip: an unmistakable gold ring, plus a lift. The style guide
   asks for exactly one obvious signal and this is it. */
.chip-btn.selected {
  transform: translateY(-2px) scale(1.07);
  filter: drop-shadow(0 0 10px rgba(255, 220, 130, .55)) drop-shadow(0 6px 12px rgba(0, 0, 0, .7));
}
.chip-btn.selected::after {
  content: ''; position: absolute; inset: -5px; border-radius: 50%;
  border: 2px solid var(--gold-hi);
  box-shadow: 0 0 0 3px rgba(255, 230, 168, .16), inset 0 0 10px rgba(255, 230, 168, .3);
}
.chip-btn.selected span { background: linear-gradient(180deg, #fff1c2, #e7c877); }

/* ── BOTTOM — one control bar ── */
#action-bar {
  position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%);
  display: flex; align-items: center; gap: 8px;
  padding: 10px 12px; border-radius: 16px;
  background-image: linear-gradient(180deg, rgba(16, 58, 50, .96), rgba(3, 18, 15, .97));
  box-shadow: var(--panel-shadow);
  max-width: calc(100vw - 40px);
}
#action-bar::before {
  content: ''; position: absolute; inset: 0; border-radius: 16px; padding: 1px;
  background: var(--gold-edge);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  pointer-events: none;
}

#total-bet-badge {
  font-size: 8.5px; letter-spacing: .18em; font-weight: 700; color: var(--ivory-dim);
  padding: 0 12px 0 4px; margin-right: 2px;
  border-right: 1px solid rgba(212, 175, 55, .26);
  line-height: 1.35; white-space: nowrap;
}
#total-bet {
  display: block; margin-top: 2px;
  color: var(--gold-hi); font-size: 17px; font-weight: 900; letter-spacing: .01em;
  text-shadow: 0 0 14px rgba(255, 224, 138, .3);
}

.action-btn {
  height: 42px; min-width: 74px; padding: 0 14px; border-radius: 10px; cursor: pointer;
  /* background-color must be set explicitly: a <button> defaults to the UA
     `buttonface` grey, which showed through the translucent gradient and made
     these read as white buttons with white labels. */
  background-color: #0a2b24;
  background-image: linear-gradient(180deg, rgba(255, 255, 255, .085), rgba(255, 255, 255, .02));
  border: 1px solid rgba(212, 175, 55, .26);
  color: #efe7d3; font-family: var(--serif);
  font-size: 10px; font-weight: 800; letter-spacing: .13em; text-indent: .13em;
  box-shadow: inset 0 1px 0 rgba(255, 240, 200, .14), 0 2px 6px rgba(0, 0, 0, .45);
  transition: background .22s cubic-bezier(.22,.61,.36,1), border-color .22s, color .22s, transform .22s;
}
.action-btn:hover {
  background-image: linear-gradient(180deg, rgba(255, 235, 180, .18), rgba(255, 235, 180, .05));
  border-color: rgba(255, 224, 138, .55); color: #fff8e6; transform: translateY(-1px);
}
.action-btn img { display: none; }
.action-btn.disabled, .action-btn:disabled {
  opacity: .38; cursor: default; transform: none; box-shadow: none;
  background-color: rgba(6, 22, 19, .8);
}

/* SPIN — the one action that matters. Convex gold, dark enamel label. */
.action-btn.spin {
  min-width: 168px; height: 56px; border-radius: 28px; margin: 0 4px;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  background-color: #c9a338;
  background-image: linear-gradient(180deg, #fff0b8 0%, #f2d478 22%, #d2a63a 58%, #a87f1f 100%) !important;
  color: #241a04; font-size: 15px; font-weight: 900; letter-spacing: .2em; text-indent: .2em;
  border: 1px solid #fff3c9;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .92),
    inset 0 -2px 6px rgba(90, 60, 8, .45),
    0 8px 22px rgba(0, 0, 0, .5),
    0 0 30px rgba(226, 182, 74, .34);
  text-shadow: 0 1px 0 rgba(255, 248, 220, .7);
  transition: transform .3s cubic-bezier(.22,.61,.36,1), box-shadow .3s, filter .3s;
}
.action-btn.spin:hover { transform: translateY(-2px); filter: brightness(1.05); }
.action-btn.spin.disabled, .action-btn.spin:disabled {
  background-image: none !important;
  background-color: rgba(8, 26, 22, .92);
  color: rgba(239, 231, 211, .34); border-color: rgba(212, 175, 55, .18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06); text-shadow: none;
  filter: none; transform: none;
}

/* utility cluster — grouped, quieter, separated by a rule */
#hud-utils {
  position: static !important; right: auto !important; bottom: auto !important;
  display: flex; flex-direction: row !important; align-items: center; gap: 5px;
  margin-left: 4px; padding-left: 10px;
  border-left: 1px solid rgba(212, 175, 55, .22);
}
.hud-icon-btn {
  height: 30px; padding: 0 9px; border-radius: 7px; cursor: pointer;
  background: rgba(255, 255, 255, .03);
  border: 1px solid rgba(212, 175, 55, .18);
  color: rgba(184, 216, 206, .82);
  font-family: var(--serif); font-size: 8.5px; font-weight: 800; letter-spacing: .12em;
  transition: color .22s, border-color .22s, background .22s;
}
.hud-icon-btn:hover { color: var(--gold-hi); border-color: rgba(255, 224, 138, .5); background: rgba(255, 235, 180, .07); }

/* ── overlays ── */
#callout-wrap { position: absolute; top: 19%; left: 50%; transform: translateX(-50%); pointer-events: none; }
#callout {
  position: relative;
  padding: 10px 26px; border-radius: 10px;
  background-image: var(--enamel);
  color: var(--gold-hi); font-weight: 700; font-size: 15px; letter-spacing: .16em;
  box-shadow: var(--panel-shadow);
  animation: pillIn .4s cubic-bezier(.22,.61,.36,1);
  white-space: nowrap;
}
#callout::before {
  content: ''; position: absolute; inset: 0; border-radius: 10px; padding: 1px;
  background: var(--gold-edge);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
}
#outcome-banner-wrap { position: absolute; top: 33%; left: 50%; transform: translate(-50%, -50%); pointer-events: none; }
#outcome-banner { height: 200px; filter: drop-shadow(0 12px 36px rgba(0, 0, 0, .8)); animation: bannerPop .55s cubic-bezier(.22,.61,.36,1); }
@keyframes bannerPop { from { opacity: 0; transform: scale(.72); } to { opacity: 1; transform: scale(1); } }

#bet-tooltip {
  position: fixed; z-index: 30; pointer-events: none;
  background: linear-gradient(180deg, rgba(10, 44, 37, .98), rgba(4, 22, 19, .98));
  border: 1px solid rgba(212, 175, 55, .6); border-radius: 9px;
  padding: 9px 15px; min-width: 176px;
  box-shadow: 0 10px 26px rgba(0, 0, 0, .75);
}
#tooltip-name { color: var(--gold-hi); font-weight: 700; font-size: 13px; letter-spacing: .1em; }
#tooltip-odds { color: #fff; font-size: 12px; margin: 2px 0; font-family: var(--serif-body); }
#tooltip-nums { color: #9fdccf; font-size: 11px; font-family: var(--serif-body); letter-spacing: .06em; }

#lock-badge {
  position: absolute; top: 76px; left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 8px;
  background: linear-gradient(180deg, rgba(132, 16, 20, .94), rgba(78, 8, 11, .95));
  border: 1px solid rgba(255, 150, 150, .55); border-radius: 22px;
  padding: 5px 16px 5px 5px;
  color: #ffe3e4; font-weight: 700; font-size: 10.5px; letter-spacing: .18em;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .65);
  animation: pillIn .4s cubic-bezier(.22,.61,.36,1);
}
#lock-badge img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; }

/* retired on the floor: the DEALER picker still names the host */
#dealer-badge { display: none !important; }

/* ═══════════ MODALS ═══════════ */
.modal-overlay {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(2, 10, 8, .74); backdrop-filter: blur(7px);
  display: flex; align-items: center; justify-content: center;
  animation: pillIn .3s ease;
}
.modal-card {
  position: relative;
  background:
    radial-gradient(120% 90% at 50% 0%, rgba(255, 214, 130, .10), transparent 58%),
    linear-gradient(180deg, #0b3b32, #05201b);
  border-radius: 18px; padding: 28px 34px;
  min-width: 420px; max-width: 660px;
  color: var(--ivory); font-family: var(--serif);
  box-shadow: 0 28px 90px rgba(0, 0, 0, .85), inset 0 1px 0 rgba(255, 236, 190, .18);
  text-align: center;
}
.modal-card::before {
  content: ''; position: absolute; inset: 0; border-radius: 18px; padding: 1px;
  background: var(--gold-edge);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
}
.modal-card h2 { color: var(--gold-hi); letter-spacing: .18em; margin-bottom: 14px; font-size: 20px; }
.modal-head { display: flex; align-items: center; gap: 14px; justify-content: center; }
.modal-head img { width: 68px; height: 68px; border-radius: 50%; border: 1px solid var(--gold); object-fit: cover; }
.modal-note { color: var(--ivory-dim); font-size: 13px; margin-bottom: 10px; font-family: var(--serif-body); }
.modal-bank { color: var(--gold-hi); font-size: 15px; letter-spacing: .1em; margin-bottom: 16px; }
.modal-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 14px; }
.gold-btn {
  font-family: var(--serif); font-weight: 800; letter-spacing: .1em; font-size: 12px;
  background: linear-gradient(180deg, #ffe8ac, #d4af37 60%, #b8912a);
  color: #2b2005; border: 1px solid #8a6a14; border-radius: 10px; padding: 11px 20px;
  cursor: pointer; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .8), 0 4px 14px rgba(0, 0, 0, .5);
  transition: filter .22s, transform .22s;
}
.gold-btn:hover { filter: brightness(1.07); transform: translateY(-1px); }
.ghost-btn {
  font-family: var(--serif); font-weight: 800; letter-spacing: .1em; font-size: 12px;
  background: transparent; color: var(--gold-hi);
  border: 1px solid rgba(212, 175, 55, .55); border-radius: 10px; padding: 11px 20px; cursor: pointer;
  transition: background .22s;
}
.ghost-btn:hover { background: rgba(212, 175, 55, .12); }
.modal-prop { width: 200px; margin-top: 16px; opacity: .9; border-radius: 10px; }
.dealer-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 12px 0; }
.dealer-card {
  background: rgba(255, 255, 255, .03); border: 1px solid rgba(212, 175, 55, .35);
  border-radius: 12px; padding: 9px; cursor: pointer; color: var(--ivory);
  font-size: 10px; letter-spacing: .06em;
  display: flex; flex-direction: column; gap: 8px; align-items: center;
  transition: transform .22s, border-color .22s;
}
.dealer-card img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; }
.dealer-card:hover { transform: translateY(-3px); border-color: var(--gold-hi); }
.rule-row { display: flex; flex-direction: column; gap: 6px; margin: 12px 0; text-align: left; color: #cfe8e0; font-size: 12px; letter-spacing: .06em; }
.rule-row select {
  background: #07251f; color: var(--gold-hi); border: 1px solid rgba(212, 175, 55, .45);
  border-radius: 8px; padding: 9px 10px; font-family: var(--serif); font-size: 12px;
}

/* Cast badge toast */
.cast-badge {
  position: fixed; bottom: 104px; right: 20px; z-index: 45;
  display: flex; align-items: center; gap: 10px;
  background: linear-gradient(180deg, rgba(12, 50, 43, .96), rgba(5, 26, 22, .97));
  border: 1px solid rgba(212, 175, 55, .55); border-radius: 12px;
  padding: 7px 15px 7px 7px;
  color: var(--gold-hi); font-family: var(--serif); font-size: 11px; letter-spacing: .08em;
  opacity: 0; transform: translateX(30px);
  transition: opacity .45s cubic-bezier(.22,.61,.36,1), transform .45s cubic-bezier(.22,.61,.36,1);
  box-shadow: 0 12px 32px rgba(0, 0, 0, .7);
}
.cast-badge.show { opacity: 1; transform: translateX(0); }
.cast-badge img { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; border: 1px solid rgba(212, 175, 55, .6); }

/* ═══════════ LANDING — VIP SALON ═══════════
   The 3D room keeps rendering behind this layer and the camera keeps drifting,
   so the landing is a lit set rather than a still: chandelier bloom overhead,
   emerald wash, brass hairline frame, mahogany rim at the foot, host in the
   light. Entrance animates opacity/focus only — never transform — because the
   host and logo panel are moved by pointer parallax from JS. */
#title-screen {
  position: fixed; inset: 0; z-index: 60; overflow: hidden;
  font-family: var(--serif); cursor: default;
  transition: opacity .9s cubic-bezier(.22,.61,.36,1);
}
#title-screen.gone { opacity: 0; pointer-events: none; }

.title-grade {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(78% 46% at 50% -6%, rgba(255, 201, 104, .26), rgba(255, 170, 60, .06) 42%, transparent 70%),
    radial-gradient(46% 54% at 52% 56%, rgba(2, 9, 7, .62), transparent 76%),
    radial-gradient(40% 32% at 5% 3%, rgba(2, 8, 6, .72), transparent 72%),
    radial-gradient(120% 80% at 50% 46%, rgba(9, 60, 45, .30), transparent 68%),
    linear-gradient(180deg, rgba(4, 13, 10, .86) 0%, rgba(4, 13, 10, .34) 30%, rgba(3, 11, 8, .55) 58%, rgba(2, 7, 5, .94) 100%);
}

/* chandelier bokeh — few, large, slow: light, not sparkle */
.title-bokeh { position: absolute; inset: 0; pointer-events: none; mix-blend-mode: screen; }
.title-bokeh span {
  position: absolute; border-radius: 50%; opacity: .5;
  background: radial-gradient(circle, rgba(255, 224, 158, .85), rgba(255, 183, 84, .22) 42%, transparent 72%);
  filter: blur(3px); animation: bokehDrift 24s ease-in-out infinite;
}
.title-bokeh span:nth-child(1) { width: 190px; height: 190px; top: 4%;  left: 6%;   animation-delay: 0s; }
.title-bokeh span:nth-child(2) { width: 120px; height: 120px; top: 12%; right: 9%;  animation-delay: -6s;  opacity: .4; }
.title-bokeh span:nth-child(3) { width: 78px;  height: 78px;  top: 34%; left: 16%;  animation-delay: -11s; opacity: .3; }
.title-bokeh span:nth-child(4) { width: 150px; height: 150px; top: 26%; right: 22%; animation-delay: -15s; opacity: .34; }
.title-bokeh span:nth-child(5) { width: 62px;  height: 62px;  top: 8%;  left: 44%;  animation-delay: -3s;  opacity: .28; }
.title-bokeh span:nth-child(6) { width: 96px;  height: 96px;  top: 48%; right: 4%;  animation-delay: -19s; opacity: .22; }
@keyframes bokehDrift {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  33%      { transform: translate3d(14px, -10px, 0) scale(1.06); }
  66%      { transform: translate3d(-10px, 8px, 0) scale(.97); }
}

/* mahogany table rim + brass bumper, straight off the table */
.title-rim {
  position: absolute; left: 0; right: 0; bottom: 0; height: 92px; pointer-events: none;
  background: linear-gradient(180deg, rgba(43, 20, 8, 0) 0%, rgba(48, 23, 10, .72) 46%, rgba(22, 9, 4, .97) 100%);
  border-top: 1px solid rgba(212, 175, 55, .26);
  box-shadow: inset 0 1px 0 rgba(255, 224, 150, .16);
}
.title-frame { position: absolute; inset: 18px; pointer-events: none; border: 1px solid rgba(212, 175, 55, .38); }
.title-frame::after { content: ''; position: absolute; inset: 7px; border: 1px solid rgba(212, 175, 55, .14); }
.title-frame i { position: absolute; width: 15px; height: 15px; border: 1px solid rgba(249, 229, 150, .7); }
.title-frame i:nth-child(1) { top: -1px;    left: -1px;  border-right: 0; border-bottom: 0; }
.title-frame i:nth-child(2) { top: -1px;    right: -1px; border-left: 0;  border-bottom: 0; }
.title-frame i:nth-child(3) { bottom: -1px; left: -1px;  border-right: 0; border-top: 0; }
.title-frame i:nth-child(4) { bottom: -1px; right: -1px; border-left: 0;  border-top: 0; }

/* Brand sits small in the top-left like the salon plaque on the wall: the host
   owns the centre, so the badge's own mascot bust reads as a crest, not a
   second character. */
.title-panel {
  position: absolute; top: 38px; left: 44px;
  display: flex; flex-direction: column; align-items: flex-start; gap: 9px; z-index: 2;
  animation: focusIn .85s cubic-bezier(.22,.61,.36,1) both;
}
.logo-wrap { position: relative; display: inline-block; }
#title-logo {
  display: block; width: min(190px, 18vw);
  filter: drop-shadow(0 12px 28px rgba(0, 0, 0, .92)) brightness(.9) saturate(.9);
}
.logo-sheen {
  position: absolute; inset: 0; pointer-events: none; mix-blend-mode: screen;
  background: linear-gradient(101deg, transparent 36%, rgba(255, 246, 216, .55) 47%, rgba(255, 255, 255, .92) 51%, rgba(255, 240, 190, .35) 56%, transparent 66%);
  background-size: 280% 100%; background-position: 190% 0;
  -webkit-mask: url('../arnow_casino_assets/arnow_asset_01.png') center / contain no-repeat;
  mask: url('../arnow_casino_assets/arnow_asset_01.png') center / contain no-repeat;
  animation: logoSheen 8.5s cubic-bezier(.4,.15,.2,1) 1.8s infinite;
}
@keyframes logoSheen {
  0%, 64%   { background-position: 190% 0; }
  82%, 100% { background-position: -90% 0; }
}
#title-sub {
  color: rgba(255, 236, 176, .98); font-size: 10px; letter-spacing: .4em;
  text-shadow: 0 2px 12px rgba(0, 0, 0, .95), 0 0 18px rgba(212, 175, 55, .4);
}

/* the host: the sun in this composition */
.title-hero {
  position: absolute; bottom: 208px; left: 50%; transform: translateX(-50%);
  height: min(62vh, 580px); z-index: 1; pointer-events: none;
  animation: focusIn 1s cubic-bezier(.22,.61,.36,1) .1s both;
}
.hero-breathe { position: relative; height: 100%; animation: hostBreathe 7.5s ease-in-out infinite; }
.host-img {
  position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
  height: 100%; width: auto; opacity: 0;
  transition: opacity .5s cubic-bezier(.22,.61,.36,1);
  filter: drop-shadow(0 34px 50px rgba(0, 0, 0, .72)) drop-shadow(0 0 30px rgba(255, 182, 88, .14));
}
.host-img.on { opacity: 1; }
.hero-halo {
  position: absolute; left: 50%; bottom: 12%; width: 108%; height: 74%;
  transform: translateX(-50%);
  background: radial-gradient(circle at 50% 55%, rgba(255, 208, 122, .38), rgba(255, 168, 58, .11) 44%, transparent 72%);
  filter: blur(26px); z-index: -1;
}
.hero-plinth {
  position: absolute; left: 50%; bottom: -14px; width: 66%; height: 34px;
  transform: translateX(-50%); border-radius: 50%;
  background:
    radial-gradient(ellipse at 50% 45%, rgba(0, 0, 0, .88), rgba(0, 0, 0, .42) 42%, transparent 74%),
    radial-gradient(ellipse at 50% 60%, rgba(0, 0, 0, .55), transparent 70%);
  filter: blur(9px);
}
@keyframes hostBreathe {
  0%, 100% { transform: translateY(0) scale(1); }
  50%      { transform: translateY(-9px) scale(1.005); }
}

.title-actions {
  position: absolute; bottom: 42px; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 13px; z-index: 3;
  animation: focusIn .9s cubic-bezier(.22,.61,.36,1) .24s both;
}

#btn-enter {
  position: relative; overflow: hidden; cursor: pointer;
  font-family: var(--serif); font-weight: 900; font-size: 14.5px; letter-spacing: .2em; text-indent: .2em;
  color: #2c2205; padding: 17px 56px; border-radius: 999px;
  background: linear-gradient(180deg, #ffeaa6 0%, #e9c65d 44%, #b8902a 100%);
  border: 1px solid rgba(255, 242, 196, .9);
  box-shadow: 0 16px 42px rgba(212, 175, 55, .26), inset 0 1px 0 rgba(255, 255, 255, .8), inset 0 -2px 6px rgba(90, 60, 8, .35);
  transition: transform .38s cubic-bezier(.22,.61,.36,1), box-shadow .38s, filter .38s;
  animation: btnGlow 5.5s ease-in-out infinite;
}
#btn-enter::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(101deg, transparent 40%, rgba(255, 255, 255, .62) 50%, transparent 60%);
  transform: translateX(-130%); transition: transform .75s cubic-bezier(.22,.61,.36,1);
}
#btn-enter:hover { transform: translateY(-2px) scale(1.02); filter: brightness(1.04); }
#btn-enter:hover::after { transform: translateX(130%); }
#btn-enter:active { transform: translateY(0) scale(.995); }
#btn-enter:focus-visible { outline: 2px solid var(--gold-hi); outline-offset: 4px; }
@keyframes btnGlow {
  0%, 100% { box-shadow: 0 16px 42px rgba(212, 175, 55, .24), inset 0 1px 0 rgba(255, 255, 255, .8), inset 0 -2px 6px rgba(90, 60, 8, .35); }
  50%      { box-shadow: 0 18px 52px rgba(212, 175, 55, .4),  inset 0 1px 0 rgba(255, 255, 255, .85), inset 0 -2px 6px rgba(90, 60, 8, .35); }
}

.host-switch {
  display: flex; gap: 2px; padding: 4px; border-radius: 999px;
  border: 1px solid rgba(212, 175, 55, .4); background: rgba(4, 18, 13, .72);
  backdrop-filter: blur(10px); box-shadow: 0 10px 26px rgba(0, 0, 0, .5);
}
.host-switch button {
  font-family: var(--serif); font-size: 9.5px; letter-spacing: .22em; text-indent: .22em;
  color: rgba(255, 244, 205, .95); background: none; border: 0; cursor: pointer;
  padding: 8px 18px; border-radius: 999px;
  box-shadow: inset 0 0 0 1px rgba(212, 175, 55, .22);
  transition: color .3s, background .3s, box-shadow .3s;
}
.host-switch button:hover { color: var(--gold-hi); }
.host-switch button.active {
  color: #2c2205; background: linear-gradient(180deg, #ffe79c, #d4af37);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7);
}
.host-switch button:not(.active):hover { background: rgba(212, 175, 55, .12); box-shadow: inset 0 0 0 1px rgba(249, 229, 150, .5); }
.host-switch button:focus-visible { outline: 1px solid var(--gold-hi); outline-offset: 2px; }

#title-note { color: rgba(226, 248, 238, .95); font-family: var(--serif-body); font-size: 13.5px; letter-spacing: .11em; text-shadow: 0 2px 10px rgba(0, 0, 0, .95); }

/* rack focus on load — no transform, so JS parallax keeps ownership of that */
@keyframes focusIn {
  from { opacity: 0; filter: blur(7px); }
  to   { opacity: 1; filter: blur(0); }
}

/* The in-game HUD is furniture of the floor, not of the front door. */
body.at-landing #hud { opacity: 0 !important; pointer-events: none; }
body:not(.at-landing) #hud { opacity: 1 !important; }

/* Boot/error strip: a blank scene must never be the only feedback. */
#boot-strip {
  position: fixed; left: 50%; bottom: 12px; transform: translateX(-50%);
  z-index: 9999; max-width: 92vw; display: none;
  padding: 9px 14px; border-radius: 8px;
  background: rgba(120, 18, 18, .96); border: 1px solid rgba(255, 140, 140, .7);
  color: #ffe9e9; font: 12px/1.4 ui-monospace, Menlo, monospace; white-space: pre-wrap;
}

@media (prefers-reduced-motion: reduce) {
  .title-bokeh span, .hero-breathe, #btn-enter, .logo-sheen { animation: none !important; }
  .title-panel, .title-hero, .title-actions { animation-duration: .01s !important; }
  #phase-pill, #callout, #lock-badge { animation: none !important; }
}
