/* ============================================================================
   GRAND ATLANTIC — shared theme layer (cohesion pass, additive)
   ----------------------------------------------------------------------------
   Loaded AFTER each game's own stylesheet (import order / link order), so the
   token overrides below win the cascade without !important. It deliberately
   only retunes COLOR TOKENS + a few universal chrome details toward the
   gateway's obsidian-and-gold crest identity — zero layout changes, and each
   game keeps its own panels, felts and signature hues.

   Canon (from the gateway crest / overlay):
     obsidian page base  #0a0908
     crest gold          #e2b755   (light #f7df9a · deep #a5813d)
   ========================================================================== */

:root {
  /* page base — one obsidian across the whole floor
     (--bg: roulette/craps/baccarat · --bg-0: poker) */
  --bg: #0a0908;
  --bg-0: #0a0908;

  /* one gold — the crest gold every game accents with
     (--gold is the shared accent var in poker/roulette/craps/baccarat) */
  --gold: #e2b755;
  --gold-dim: #a5813d; /* poker's deep-gold gradient stop, matched to the crest */
}

/* universal chrome: selection, scrollbars, focus — same at every table */
::selection {
  background: rgba(226, 183, 85, 0.32);
  color: #fff6dd;
}
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(226, 183, 85, 0.35) rgba(255, 255, 255, 0.04);
}
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: rgba(255, 255, 255, 0.03); }
::-webkit-scrollbar-thumb {
  background: rgba(226, 183, 85, 0.30);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: content-box;
}
::-webkit-scrollbar-thumb:hover { background-color: rgba(226, 183, 85, 0.5); }

:focus-visible {
  outline: 2px solid rgba(226, 183, 85, 0.75);
  outline-offset: 2px;
}

/* ═══════════════════════ CANONICAL WALLET (v1.2) ═══════════════════════
   One explicit bankroll readout at every table. Games render their existing
   balance slot with this markup and keep their own value binding:

     <span class="ga-wallet" title="Shared GRAND ATLANTIC bankroll">
       <i class="ga-wallet-ico" aria-hidden="true"></i>
       <span class="ga-wallet-lbl">Bankroll</span>
       <b class="ga-wallet-amt">$1,234</b>
     </span>

   Add .ga-wallet--hot while the amount is animating up, .ga-wallet--cold
   while it drops (games toggle these for ~0.8 s on change).              */
.ga-wallet {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px 6px 10px;
  border: 1px solid rgba(226, 183, 85, 0.45);
  border-radius: 999px;
  background:
    linear-gradient(160deg, rgba(34, 28, 16, 0.92), rgba(16, 13, 9, 0.92));
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(247, 223, 154, 0.12);
  white-space: nowrap;
  line-height: 1;
}
.ga-wallet-ico {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23e2b755' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 7H5a2 2 0 0 1 0-4h13v4'/%3E%3Cpath d='M3 5v13a2 2 0 0 0 2 2h15a1 1 0 0 0 1-1V8a1 1 0 0 0-1-1'/%3E%3Ccircle cx='16.5' cy='13.5' r='1.4' fill='%23e2b755' stroke='none'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
}
.ga-wallet-lbl {
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(247, 223, 154, 0.75);
}
.ga-wallet-amt {
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  color: #f7df9a;
  text-shadow: 0 0 12px rgba(226, 183, 85, 0.35);
}
.ga-wallet--hot .ga-wallet-amt { color: #3ddc84; transition: color 0.2s; }
.ga-wallet--cold .ga-wallet-amt { color: #ff5d6c; transition: color 0.2s; }

/* ═══════════════════════ CANONICAL CHIPS (v1.3) ═══════════════════════
   The same premium clay chips at every table — AC palette from
   shared/chips.js ($1 white · $5 red · $25 green · $100 black · $500 purple
   · $1000 orange · $5000 gray). Modern build: a domed face with a hairline
   inner ring, eight crisp edge cuts on the rim, and a soft top sheen — all
   painted in `background-image` (below the label) with a solid
   `background-color` fallback, so a browser without `color-mix()` still
   shows a coloured chip. Use on chip-selector buttons:
     <button class="ga-chip ga-chip--25">$25</button>
   Add .is-active to the selected chip. Denomination shades derive from
   --chip-c so a game only sets the base colour.                          */
.ga-chip {
  --chip-c: #cc2f3b;
  --chip-ink: #fff;
  --chip-hi: color-mix(in srgb, var(--chip-c), #fff 38%);
  --chip-lo: color-mix(in srgb, var(--chip-c), #000 32%);
  --chip-edge: color-mix(in srgb, var(--chip-c), #000 12%);
  --chip-rim: color-mix(in srgb, var(--chip-c), #000 42%);
  --chip-cut: #f4efe2;
  position: relative;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 0;
  cursor: pointer;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.02em;
  color: var(--chip-ink);
  background-color: var(--chip-c); /* fallback if color-mix is unsupported */
  background-image:
    /* hairline inner ring */
    radial-gradient(circle, transparent 0 55%, rgba(0, 0, 0, 0.28) 55.5% 57%, rgba(255, 255, 255, 0.28) 57% 58.5%, transparent 59%),
    /* domed face — transparent past 58% so the rim + cuts show through */
    radial-gradient(circle at 42% 34%, var(--chip-hi) 0%, var(--chip-c) 40%, var(--chip-lo) 57%, transparent 58%),
    /* eight sleek edge cuts around the rim */
    repeating-conic-gradient(from -12deg, var(--chip-cut) 0deg 9deg, transparent 9deg 45deg),
    /* rim metal */
    radial-gradient(circle, var(--chip-edge) 54%, var(--chip-rim) 100%);
  box-shadow:
    0 5px 13px rgba(0, 0, 0, 0.55),
    inset 0 0 0 1.5px rgba(0, 0, 0, 0.3),
    inset 0 -3px 7px rgba(0, 0, 0, 0.4),
    inset 0 3px 6px rgba(255, 255, 255, 0.18);
  transition: transform 0.14s cubic-bezier(0.2, 0.9, 0.25, 1.35), box-shadow 0.14s ease;
}
.ga-chip::after {
  /* soft top sheen */
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  pointer-events: none;
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.28) 0%, rgba(255, 255, 255, 0.03) 30%, transparent 44%);
}
.ga-chip > * { position: relative; z-index: 1; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35); }
.ga-chip:hover { transform: translateY(-3px); }
.ga-chip:active { transform: translateY(-1px) scale(0.97); }
.ga-chip.is-active {
  transform: translateY(-4px);
  box-shadow:
    0 0 0 3px rgba(226, 183, 85, 0.95),
    0 0 16px rgba(226, 183, 85, 0.4),
    0 8px 18px rgba(0, 0, 0, 0.6),
    inset 0 -3px 7px rgba(0, 0, 0, 0.4),
    inset 0 3px 6px rgba(255, 255, 255, 0.18);
}
.ga-chip--1    { --chip-c: #c9c3b0; --chip-ink: #2a2a24; --chip-cut: #8a8676; }
.ga-chip--5    { --chip-c: #cc2f3b; --chip-ink: #fff; }
.ga-chip--25   { --chip-c: #1f9152; --chip-ink: #fff; }
.ga-chip--100  { --chip-c: #31353d; --chip-ink: #fff; --chip-cut: #e7e2d4; }
.ga-chip--500  { --chip-c: #7a41ad; --chip-ink: #fff; }
.ga-chip--1000 { --chip-c: #e0821e; --chip-ink: #2a1600; }
.ga-chip--5000 { --chip-c: #8a8f98; --chip-ink: #101216; --chip-cut: #eceff3; }
@media (prefers-reduced-motion: reduce) {
  .ga-chip, .ga-chip:hover, .ga-chip:active { transition: none; transform: none; }
}

/* ═══════════════════════ GENIE ALERT BADGE (v1.4) ═══════════════════════
   Every genie's floating button can flag that it has something to say (e.g.
   you just placed a terrible-EV bet). The FAB gets position:relative and
   this badge — a blinking count — pinned to its corner. Consistent across
   the roulette / baccarat / craps / poker genies.
     <button class="…-fab" style="position:relative">
       … <span class="ga-genie-badge" aria-label="1 new tip">1</span>
     </button>                                                              */
.ga-genie-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  box-sizing: border-box;
  border-radius: 999px;
  background: #e5484d;
  color: #fff;
  font: 700 11px/18px "IBM Plex Mono", ui-monospace, monospace;
  text-align: center;
  box-shadow: 0 0 0 2px rgba(10, 9, 8, 0.92), 0 0 10px rgba(229, 72, 77, 0.6);
  animation: ga-genie-pulse 1.4s ease-in-out infinite;
  pointer-events: none;
  z-index: 2;
}
@keyframes ga-genie-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.2); opacity: 0.82; }
}
@media (prefers-reduced-motion: reduce) { .ga-genie-badge { animation: none; } }
