/* Blackjack identity: "casino pit at night". Teal felt, padded black leather rail, gold marquee (Limelight), chip red. */
:root {
  --bg: #061a1c; --surface: #0c2a2c; --surface-2: #123a3c; --ink: #f4f1e6; --ink-2: #a9c2c0; --line: #1c4a4c;
  --accent: #f2c14e; --accent-ink: #1e1607; --chip-red: #c8322b; --ok: #7fe0a3; --warn: #f2c14e; --bad: #ff6b6b; --info: #7fd6d9;
  /* the dome's top corners scale with the viewport so a narrow phone doesn't clip the shoe/arc text a wide desktop
     canvas has room for at a full 160px (see blackjack/DESIGN.md §15 "responsive table radius") */
  --felt: #0f4c4c; --felt-2: #0b3a3a; --leather: #1a1614; --leather-2: #2a2420; --rail: linear-gradient(180deg, #2a2420, #1a1614 60%); --table-radius: clamp(74px, 22vw, 160px) clamp(74px, 22vw, 160px) 18px 18px;
  --back-1: #1a1614; --back-2: #f2c14e;
  --font-display: "Limelight", "Poiret One", Georgia, serif; --font-ui: "Inter", system-ui, sans-serif;
}
:root[data-theme="light"] { --bg: #e3efee; --surface: #ffffff; --surface-2: #d6e6e5; --ink: #0d2a2c; --ink-2: #4f6b6c; --line: #bdd3d2; --accent: #a97f12; --accent-ink: #fff; --felt: #146464; --felt-2: #0f5252; --leather: #2a2420; --rail: linear-gradient(180deg, #3a322c, #2a2420 60%); }
:root[data-colorblind="1"] { --chip-red: #e69f00; --ok: #56b4e9; --bad: #8f8f8f; }
:root[data-contrast="1"] { --ink-2: #e2f0ee; --felt: #0a3c3c; --accent: #ffd66b; }
body { background: radial-gradient(ellipse at 50% -20%, #114444 0%, var(--bg) 60%); }
:root[data-theme="light"] body { background: radial-gradient(ellipse at 50% -20%, #fff 0%, var(--bg) 60%); }
h1, h2, .title, .sheet-title, .mode b, .cta, .ctl-main, .bank b, .bet-circle, .chip, .seat-tag .score { font-family: var(--font-display); font-weight: 400; }
.title { letter-spacing: .04em; text-shadow: 0 0 6px color-mix(in oklab, var(--accent) 60%, transparent), 0 0 30px color-mix(in oklab, var(--accent) 40%, transparent), 0 2px 0 rgb(0 0 0 / .5); }
.marquee { display: inline-flex; gap: 6px; justify-content: center; margin-bottom: 4px; }
.marquee i { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px var(--accent); animation: marquee 1.2s steps(2) infinite; }
.marquee i:nth-child(odd) { animation-delay: .6s; }
@keyframes marquee { 0% { opacity: 1; } 100% { opacity: .35; } }
:root[data-motion="reduced"] .marquee i { animation: none; }
.tagline { letter-spacing: .12em; text-transform: uppercase; font-size: .8rem; font-weight: 600; }
.mode b { font-size: 1.1rem; }
/* the table is a semicircle: no shadow ring, the leather rail below is the frame */
.play .stage { padding: 4px 8px 0; }
.play .stage-canvas { border-radius: var(--table-radius); box-shadow: 0 0 0 4px var(--leather-2), 0 0 0 5px var(--accent), 0 18px 50px rgb(0 0 0 / .6); }
.rail-actions { background: var(--rail); }
.rail-actions::before { border-top-color: rgb(255 255 255 / .12); border-top-style: dashed; }
.chip-tray { padding: 2px 0; }
.bet-circle { border-color: color-mix(in oklab, var(--accent) 70%, transparent); font-size: 1.1rem; }
.bank b { font-size: 1.7rem; text-shadow: 0 0 10px color-mix(in oklab, var(--accent) 50%, transparent); }
.actions .ctl { background: linear-gradient(180deg, #2f6d6d, #1c5252); color: #fff; font-weight: 700; box-shadow: inset 0 1px 0 rgb(255 255 255 / .25), 0 3px 0 #0b3535; }
.actions .ctl:active { transform: translateY(2px); box-shadow: inset 0 1px 0 rgb(255 255 255 / .25), 0 1px 0 #0b3535; }
.actions .ctl small { color: rgb(255 255 255 / .7); }
#btn-deal { font-size: 1.3rem; letter-spacing: .1em; }
#btn-surrender { background: transparent; color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line); }
/* seat tag for the dealer at the top and the player hands (canvas draws the totals) */
.seat-tag[data-seat="dealer"] { --pc: #6b5b4a; }
.seat-tag .name { letter-spacing: .1em; text-transform: uppercase; }
.count-pill { display: inline-flex; gap: 6px; align-items: center; height: 26px; padding: 0 10px; border-radius: 999px; background: color-mix(in oklab, var(--bg) 70%, transparent); font-size: .72rem; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.count-pill b { color: var(--accent); }
/* coach sheet rows: your play vs book */
.coach-line .coach-badge { flex: 0 0 auto; }
.rule-warn { display: flex; gap: 8px; align-items: center; color: var(--warn); font-size: .85rem; }
.result-verdict { font-family: var(--font-display); font-size: 1.3rem; color: var(--accent); }
.bankroll-delta[data-up="true"] { color: var(--ok); } .bankroll-delta[data-up="false"] { color: var(--bad); }
@media (min-width: 900px) and (min-aspect-ratio: 5/4) { .play .rail-actions { max-width: 720px; justify-self: center; width: 100%; } }
/* phones: the HUD holds back, round, bankroll, coach and settings; the shoe percentage and the "bank" label give way */
@media (max-width: 480px) {
  .play .hud { gap: 4px; }
  .play .hud .hud-pill:not(.hud-bank) .sep, #hud-shoe, .hud-bank small { display: none; }
  #hud-bank::before { content: "$"; }
}

/* phone landscape: a 340 px-tall table cannot take 160 px corners (they clip the shoe); scale them to the height */
@media (orientation: landscape) and (max-height: 540px) { :root { --table-radius: 96px 96px 14px 14px; } }
