/* ==========================================================================
   Casino game screens, rules and history. Builds on the site design tokens in site.css.
   Sweep Coins use the emerald accent and Gold Coins the gold one, so a player can
   always tell at a glance which coin they are playing with.
   ========================================================================== */

:root {
    --credits: var(--sc);
    --credits-strong: var(--sc-strong);
    --credits-soft: var(--sc-soft);
    --credits-border: rgba(63, 224, 165, 0.38);
    --positive: #7dfcd0;
}

/* ---------- Play Credits chip (top bar) ---------- */

.credits-chip {
    display: inline-flex; align-items: center; gap: 0.55rem;
    min-height: 40px; padding: 0 0.9rem;
    border: 1px solid var(--credits-border); border-radius: 999px;
    background: var(--credits-soft); color: var(--ink);
}
.credits-chip:hover { color: var(--ink); border-color: var(--credits); }
.credits-chip i { color: var(--credits); }
.credits-chip small { color: var(--ink-2); font-size: 0.75rem; }
.credits-chip strong { font-weight: 700; font-variant-numeric: tabular-nums; }
button.credits-chip { font: inherit; cursor: pointer; }
.credits-chip .coin-ico { width: 22px; height: 22px; }
.credits-chip .cg-swap { color: var(--muted); font-size: 0.8rem; }
.credits-chip:hover .cg-swap { color: var(--ink); }
.credits-chip.coin-GC { border-color: rgba(255, 201, 77, 0.45); background: var(--gold-soft); }
.credits-chip.coin-GC:hover { border-color: var(--gold); }
body[data-coin="GC"] .stake-value output, body[data-coin="GC"] .total-stake strong { color: var(--gold); }
@media (max-width: 560px) { .app-topbar .brand-name, .app-topbar .user-chip { display: none; } }
@media (max-width: 560px) { .credits-chip small { display: none; } .credits-chip, .balance-chip { padding: 0 0.6rem; font-size: 0.82rem; } }

.credits-figure, .panel-header p.credits-figure { color: var(--credits); }
/* The grid's gap already spaces these, so the site's stacked-panel margin would push all but the first one down. */
.rg-grid > .panel { margin-top: 0; }
.hero-figure.credits-hero { border-color: var(--credits-border); background: radial-gradient(circle at 100% 0, rgba(94, 234, 212, 0.14), transparent 45%), var(--surface); }
.hero-figure.credits-hero .stat-value { color: var(--credits); }

.no-cash-note {
    display: flex; gap: 0.6rem; align-items: flex-start;
    padding: 12px 14px; border: 1px solid var(--credits-border); border-radius: var(--radius);
    background: var(--credits-soft); color: var(--ink-2); font-size: 0.88rem;
}
.no-cash-note i { color: var(--credits); line-height: 1.5; }
.no-cash-note strong { color: var(--ink); }

/* ---------- Lobby ---------- */

.lobby-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 20px 0; }
.lobby-tools .input { flex: 1 1 220px; max-width: 340px; }
.filter-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.filter-chip {
    min-height: 36px; padding: 0 0.85rem; border: 1px solid var(--border-strong); border-radius: 999px;
    background: transparent; color: var(--ink-2); font: 600 0.82rem var(--font-ui); cursor: pointer;
}
.filter-chip:hover { border-color: var(--credits); color: var(--ink); }
.filter-chip[aria-pressed="true"] { border-color: var(--credits); background: var(--credits-soft); color: var(--credits); }

.casino-tile { position: relative; }
.casino-tile .cover-link { display: block; }
.casino-tile .tile-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 4px 4px; }
.casino-tile .tile-meta small { color: var(--muted); }
.casino-tile h3 { margin: 0; font-size: 1.02rem; }
.casino-tile .tile-tagline { margin: 0; padding: 0 4px; color: var(--muted); font-size: 0.8rem; min-height: 2.4em; }
.fav-button {
    position: absolute; right: 18px; top: 18px; z-index: 2;
    display: grid; place-items: center; width: 34px; height: 34px;
    border: 0; border-radius: 50%; background: rgba(8, 11, 22, 0.75); color: var(--ink-2); cursor: pointer;
}
.fav-button:hover { color: var(--ink); }
.fav-button[aria-pressed="true"] { color: var(--credits); }

.lobby-row { margin-bottom: 28px; }
.lobby-row h2 { font-size: 1.15rem; margin-bottom: 12px; }
.lobby-empty { padding: 28px; text-align: center; color: var(--muted); }

/* ---------- History ---------- */

.tab-row { display: flex; gap: 6px; margin-bottom: 16px; }
.tab-row a { padding: 0.45rem 0.9rem; border-radius: 999px; border: 1px solid var(--border-strong); color: var(--ink-2); font-weight: 600; font-size: 0.85rem; }
.tab-row a[aria-current="page"] { border-color: var(--credits); background: var(--credits-soft); color: var(--credits); }

/* ---------- Rules ---------- */

.rules-body { display: grid; gap: 28px; color: var(--ink-2); font-size: 0.9rem; }
.rules-body h3 { margin-bottom: 0.7rem; color: var(--ink); }
.rules-body ul { margin: 0; padding-left: 1.2rem; }
.rules-body li + li { margin-top: 0.35rem; }
.rules-body strong { color: var(--ink); }
.rules-paytable { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); margin-bottom: 10px; }
.rules-symbol { display: flex; align-items: center; gap: 12px; padding: 10px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--page); }
.rules-symbol img { width: 60px; height: 60px; flex: none; }
.rules-symbol strong { display: block; }
.rules-symbol p { margin: 0.2rem 0 0; font-size: 0.78rem; }
.rules-symbol dl { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 0.25rem 0 0; font-size: 0.78rem; }
.rules-symbol dt { color: var(--muted); font-weight: 500; }
.rules-symbol dd { margin: 0; color: var(--gold); font-weight: 600; font-variant-numeric: tabular-nums; }
.rules-paylines { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(62px, 1fr)); margin: 0; padding: 0; list-style: none; }
.rules-paylines li { margin: 0 !important; padding: 5px; border: 1px solid var(--border); border-radius: 8px; text-align: center; color: var(--muted); font-size: 0.68rem; }
.rules-table { width: 100%; font-size: 0.82rem; }
.rules-table th { padding: 4px 8px 4px 0; color: var(--muted); font-weight: 500; text-align: left; }
.rules-table td { padding: 4px 8px 4px 0; border-top: 1px solid var(--border); }
.rules-table tbody th { border-top: 1px solid var(--border); color: var(--ink-2); font-weight: 600; }
.rules-table .num { font-variant-numeric: tabular-nums; }
.rules-table .is-active { color: var(--gold); font-weight: 700; }
.rules-returns { margin-top: 0.5rem !important; padding: 0 !important; list-style: none; }
.rules-returns li { display: flex; justify-content: space-between; gap: 16px; padding-bottom: 4px; border-bottom: 1px solid var(--border); }
.rules-returns .num { color: var(--ink); }
.rules-small { margin-top: 0.6rem !important; color: var(--muted); font-size: 0.78rem; }
.rules-weights { display: grid; gap: 4px 24px; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); padding: 0 !important; list-style: none; }
.rules-weights li { display: flex; justify-content: space-between; gap: 12px; margin: 0 !important; }

/* ---------- Game page shell ---------- */

html.casino-page { background: #03050c; }
html.casino-page body { background: transparent; }
.casino-game { min-height: 100dvh; display: flex; flex-direction: column; }
.cg-backdrop { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; background: #03050c; }
.cg-header {
    position: sticky; top: 0; z-index: 30;
    display: flex; align-items: center; gap: 8px;
    min-height: 60px; padding: 8px clamp(10px, 2vw, 20px);
    border-bottom: 1px solid var(--border); background: rgba(3, 5, 12, 0.6); backdrop-filter: blur(14px);
}
.cg-title { flex: 1; min-width: 0; }
.cg-title h1 { margin: 0; font-size: 1.05rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cg-title p { margin: 0; color: var(--muted); font-size: 0.74rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cg-icon {
    display: inline-grid; place-items: center; min-width: 40px; height: 40px; padding: 0 0.6rem;
    border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.04); color: var(--ink); cursor: pointer; font-size: 1rem;
}
.cg-icon:hover { background: rgba(255, 255, 255, 0.09); color: var(--ink); }
.cg-icon.is-on { border-color: var(--credits); color: var(--credits); }
.cg-connection { display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.2rem 0.6rem; border-radius: 999px; border: 1px solid var(--border-strong); font-size: 0.72rem; font-weight: 700; white-space: nowrap; }
.cg-connection.offline { border-color: rgba(208, 59, 59, 0.5); color: var(--critical-text); }
.cg-connection.retrying { border-color: rgba(250, 178, 25, 0.4); color: var(--warning-text); }
.cg-main { position: relative; flex: 1; display: flex; flex-direction: column; }
.cg-disclaimer { margin: 0; padding: 6px 12px 104px; color: var(--muted); font-size: 0.72rem; text-align: center; }
@media (max-width: 620px) {
    .cg-title p, .cg-label { display: none; }
    .cg-header { gap: 5px; }
    .cg-icon { min-width: 36px; padding: 0 0.3rem; }
}

.casino-dialog {
    width: min(760px, calc(100% - 24px)); max-height: min(86dvh, 900px); padding: 0;
    border: 1px solid var(--border-strong); border-radius: var(--radius-lg);
    background: var(--surface); color: var(--ink); box-shadow: var(--shadow);
}
.casino-dialog::backdrop { background: rgba(3, 5, 12, 0.72); backdrop-filter: blur(3px); }
.casino-dialog-head { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--border); background: var(--surface); }
.casino-dialog-head h2 { margin: 0; font-size: 1.15rem; }
.casino-dialog-body, .bet-builder { padding: 20px; }
.reminder-stats { display: grid; gap: 10px; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0 0 14px; text-align: center; }
.reminder-stats div { padding: 12px 6px; border: 1px solid var(--border); border-radius: var(--radius); }
.reminder-stats dt { color: var(--muted); font-size: 0.75rem; font-weight: 500; }
.reminder-stats dd { margin: 0.2rem 0 0; font-weight: 600; font-variant-numeric: tabular-nums; }

.casino-toasts { position: fixed; top: 72px; right: 12px; z-index: 60; display: grid; gap: 8px; width: min(340px, calc(100% - 24px)); }
.casino-toast { display: flex; gap: 0.6rem; padding: 12px 14px; border: 1px solid var(--border-strong); border-radius: var(--radius); background: var(--raised); box-shadow: var(--shadow); animation: toast-in 0.2s ease-out; }
.casino-toast i { color: var(--credits); line-height: 1.4; }
.casino-toast.error i { color: var(--critical-text); }
.casino-toast.success i { color: var(--good-text); }
.casino-toast strong { display: block; font-size: 0.88rem; }
.casino-toast p { margin: 0.1rem 0 0; color: var(--ink-2); font-size: 0.8rem; }
@keyframes toast-in { from { opacity: 0; transform: translateY(-6px); } }

.visually-hidden-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
.gold-figure { color: var(--gold); font-variant-numeric: tabular-nums; font-size: 1.05em; }
.gold-figure.large { font-size: 1.2em; }
.muted-line { color: var(--ink-2); }
.muted-note { color: var(--muted); font-size: 0.78rem; }
.is-positive { color: var(--positive) !important; }

/* ---------- Bottom control bar ---------- */

.game-controls {
    position: fixed; inset: auto 0 0 0; z-index: 20;
    padding-bottom: env(safe-area-inset-bottom);
    border-top: 1px solid var(--border); background: rgba(3, 5, 12, 0.85); backdrop-filter: blur(14px);
}
.game-controls-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; max-width: 1100px; margin: 0 auto; padding: 10px clamp(10px, 2vw, 24px); }
.game-controls-inner.is-table { flex-wrap: wrap; }
.spin-slot { display: flex; align-items: center; justify-content: center; }
.last-round { width: 11.5rem; text-align: right; }
.last-round span, .stake-value span, .total-stake span { display: block; color: var(--muted); font-size: 0.62rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; }
.last-round strong { font-size: 1.1rem; font-variant-numeric: tabular-nums; }
@media (max-width: 620px) { .last-round { display: none; } }

.stake-selector { display: flex; align-items: center; gap: 6px; }
.stake-step {
    width: 46px; height: 46px; border: 1px solid var(--border-strong); border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.05); color: var(--ink); font-size: 1.25rem; cursor: pointer;
}
.stake-step:hover:not(:disabled) { background: rgba(255, 255, 255, 0.1); }
.stake-step:disabled { opacity: 0.4; cursor: not-allowed; }
.stake-value { min-width: 5.4rem; padding: 4px 10px; border: 1px solid rgba(242, 195, 91, 0.25); border-radius: var(--radius); background: rgba(3, 5, 12, 0.6); text-align: center; }
.stake-value output { display: block; color: var(--gold); font-size: 1.05rem; font-weight: 700; line-height: 1.2; font-variant-numeric: tabular-nums; }
.stake-selector.small .stake-step { width: 36px; height: 44px; }
.stake-selector.small .stake-value { min-width: 3.9rem; padding: 3px 6px; }
.stake-selector.small .stake-value span { font-size: 0.55rem; letter-spacing: 0.1em; }

.spin-button {
    position: relative; display: grid; place-items: center; width: 80px; height: 80px;
    padding: 0; border: 0; border-radius: 50%; background: transparent; color: #06121a; cursor: pointer;
    transition: transform 0.12s;
}
.spin-button:active:not(:disabled) { transform: scale(0.95); }
.spin-button:disabled { cursor: not-allowed; color: rgba(255, 255, 255, 0.55); }
.spin-face { position: absolute; inset: 0; border-radius: 50%; box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.7), 0 6px 0 rgba(0, 0, 0, 0.45), 0 18px 40px -10px rgba(0, 0, 0, 0.6); }
.spin-button:disabled .spin-face { background: linear-gradient(180deg, #212c5a, #0e152d) !important; box-shadow: 0 4px 0 #0e152d; }
.spin-ring { position: absolute; inset: 7px; border: 2px solid rgba(255, 255, 255, 0.4); border-radius: 50%; }
.spin-button svg { position: relative; }
.spin-button.is-busy svg { animation: spin-rotate 0.9s linear infinite; }
@keyframes spin-rotate { to { transform: rotate(360deg); } }

.button.large { min-height: 52px; padding-inline: 1.5rem; font-size: 1rem; }
.button.accent { background: linear-gradient(180deg, #a68bff, #6c4cf0); color: #fff; }
.button.accent:hover { background: linear-gradient(180deg, #b9a3ff, #7d60f5); color: #fff; }
.button.icon { width: 40px; padding: 0; }
.action-grid { display: grid; gap: 8px; width: 100%; }
.action-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.action-grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.action-grid .button { padding-inline: 0.4rem; }
.action-row { display: flex; align-items: center; gap: 8px; }
.total-stake { margin-right: 4px; }
.total-stake strong { display: block; color: var(--gold); font-size: 1.05rem; font-variant-numeric: tabular-nums; }
@media (max-width: 620px) { .game-controls-inner.is-table { justify-content: center; } .action-row { width: 100%; justify-content: flex-end; } .action-row .button.large { flex: 1; } }

/* ---------- Slots ---------- */

.slot-screen { display: flex; flex-direction: column; width: 100%; max-width: 1040px; margin: 0 auto; padding: 12px clamp(8px, 2vw, 24px) 0; }
.slot-status { display: flex; align-items: center; justify-content: center; min-height: 44px; margin-bottom: 10px; }
.slot-tagline { margin: 0; color: var(--ink-2); font-size: 0.88rem; text-align: center; }
.status-pill {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px;
    padding: 7px 16px; border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent); border-radius: 999px;
    background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--ink); font-size: 0.85rem; font-weight: 600;
}
.status-pill .dot { opacity: 0.5; }
.ladder { display: inline-flex; gap: 3px; }
.ladder span { padding: 1px 6px; border-radius: 6px; font-size: 0.74rem; opacity: 0.5; font-variant-numeric: tabular-nums; }
.ladder span.is-current { background: rgba(255, 255, 255, 0.9); color: #03050c; opacity: 1; }
.pill-button { margin-left: 2px; padding: 1px 10px; border: 1px solid rgba(255, 255, 255, 0.25); border-radius: 999px; background: none; color: inherit; font-size: 0.74rem; cursor: pointer; }
.pill-button:hover { border-color: rgba(255, 255, 255, 0.6); }
.respin-dots { display: inline-flex; align-items: center; gap: 4px; }
.respin-dots i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: rgba(255, 255, 255, 0.15); }
.respin-dots i.is-on { background: var(--accent); }

.reel-cap { width: 100%; margin: 0 auto; }
.reel-frame { padding: 3px; border-radius: 30px; box-shadow: 0 40px 90px -30px rgba(0, 0, 0, 0.95); }
.reel-inner { position: relative; overflow: hidden; padding: 10px; border-radius: 27px; }
.reel-columns { position: absolute; inset: 10px; display: grid; pointer-events: none; }
.reel-columns > div { background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent); }
.reel-columns > div + div { border-left: 1px solid rgba(255, 255, 255, 0.05); }
.reel-window { position: relative; width: 100%; }
.reel-host { position: absolute; inset: 0; }
.reel-overlays, .reel-notices { position: absolute; inset: 0; pointer-events: none; }
.reel-overlays > *, .reel-notice { pointer-events: auto; }
.stage-loading { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 10px; color: var(--ink-2); font-size: 0.85rem; }
.stage-loading p { margin: 0; }
.skeleton-disc { width: 60px; height: 60px; border-radius: 50%; background: linear-gradient(90deg, rgba(255, 255, 255, 0.04) 25%, rgba(255, 255, 255, 0.1) 37%, rgba(255, 255, 255, 0.04) 63%); background-size: 400% 100%; animation: shimmer-disc 2.8s linear infinite; }
@keyframes shimmer-disc { from { background-position: -200% 0; } to { background-position: 200% 0; } }

.win-overlay { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none !important; animation: win-pop 0.35s cubic-bezier(0.22, 1.2, 0.36, 1); }
.win-card { padding: 16px 32px; border-radius: 22px; background: rgba(3, 5, 12, 0.62); backdrop-filter: blur(4px); text-align: center; }
.win-title { margin: 0; color: var(--ink); font: 700 clamp(1.5rem, 5vw, 2.8rem) var(--font-brand); }
.win-figure { margin: 0; color: var(--gold); font: 700 clamp(2rem, 7vw, 3.6rem) var(--font-brand); font-variant-numeric: tabular-nums; }
@keyframes win-pop { from { opacity: 0; transform: scale(0.7); } }

.feature-intro { position: absolute; inset: 0; display: grid; place-items: center; padding: 16px; background: rgba(3, 5, 12, 0.72); backdrop-filter: blur(4px); text-align: center; animation: toast-in 0.25s ease-out; }
.feature-intro p { margin: 0.3rem 0 0; color: var(--ink); }
.feature-title { color: var(--gold) !important; font: 700 clamp(2rem, 6vw, 3.6rem) var(--font-brand); }

.reel-notice { position: absolute; inset: 0; display: grid; place-items: center; padding: 12px; background: rgba(3, 5, 12, 0.55); backdrop-filter: blur(2px); z-index: 3; }
.reel-notice-card, .table-notice { display: grid; justify-items: center; gap: 10px; width: 100%; max-width: 440px; padding: 16px; border: 1px solid var(--border-strong); border-radius: var(--radius); background: var(--surface); text-align: center; font-size: 0.88rem; }
.reel-notice-card p, .table-notice p { margin: 0; color: var(--ink-2); }
.table-notice { margin: 14px auto 0; }

.result-line { display: flex; align-items: center; justify-content: center; min-height: 44px; margin-top: 8px; font-size: 0.95rem; text-align: center; }

/* Midnight Express pick board */
.pick-board { position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; padding: 10px; background: rgba(3, 5, 12, 0.82); backdrop-filter: blur(4px); }
.pick-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px; margin-bottom: 6px; font-size: 0.82rem; }
.pick-head p { margin: 0; }
.pick-head p:first-child { color: var(--gold); font: 600 1.05rem var(--font-brand); }
.pick-totals { color: var(--ink-2); }
.pick-grid { flex: 1; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; margin: 0; padding: 0; list-style: none; min-height: 0; }
.pick-grid li { min-height: 0; }
.pick-grid button { width: 100%; height: 100%; padding: 2px; border: 1px solid rgba(226, 189, 99, 0.25); border-radius: 12px; background: #1d130c; color: inherit; cursor: pointer; }
.pick-grid button:hover:not(:disabled) { border-color: rgba(241, 213, 138, 0.7); background: #2a1b10; }
.pick-grid button:disabled { cursor: default; }
.pick-sealed, .pick-open { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; gap: 2px; }
.pick-sealed img { width: auto; height: 58%; max-height: 64px; }
.pick-sealed small, .pick-open small { color: var(--muted); font-size: 0.66rem; }
.pick-sealed.is-dim { opacity: 0.35; }
.pick-open { border-radius: 10px; animation: pick-flip 0.45s ease-out; }
.pick-open.prize { background: rgba(226, 189, 99, 0.1); }
.pick-open.prize strong { color: var(--gold); font-size: clamp(0.8rem, 2.2vw, 1.2rem); font-variant-numeric: tabular-nums; }
.pick-open.terminus { background: rgba(90, 20, 36, 0.4); color: #ffb3c0; font-size: 0.68rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
@keyframes pick-flip { from { opacity: 0; transform: rotateY(90deg); } }
.pick-foot { display: flex; align-items: center; justify-content: center; min-height: 34px; margin-top: 6px; color: var(--ink-2); font-size: 0.82rem; text-align: center; }

/* ---------- Cards and chips ---------- */

.playing-card { position: relative; flex: none; perspective: 800px; animation: card-enter 0.45s cubic-bezier(0.22, 1, 0.36, 1); transition: filter 0.25s; }
.playing-card.is-dim { filter: brightness(0.5) saturate(0.6); }
.playing-card.is-highlight .card-face { box-shadow: 0 0 0 3px var(--positive), 0 12px 24px -8px rgba(0, 0, 0, 0.75); }
.card-inner { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1); }
.playing-card.is-down .card-inner { transform: rotateY(180deg); }
.card-face, .card-back { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 8%; box-shadow: 0 12px 24px -8px rgba(0, 0, 0, 0.75); backface-visibility: hidden; }
.card-back { transform: rotateY(180deg); }
@keyframes card-enter { from { opacity: 0; transform: translate(var(--from-x), var(--from-y)) rotate(8deg); } }
html[data-motion="reduced"] .playing-card { animation: fade-only 0.15s; }
html[data-motion="reduced"] .card-inner { transition: none; }
@keyframes fade-only { from { opacity: 0; } }

.card-fan { display: flex; justify-content: center; }
.card-fan > .playing-card + .playing-card { margin-left: -40px; }
.card-fan.bac > .playing-card + .playing-card { margin-left: -28px; }
.card-fan.bac > .playing-card.is-third { transform: rotate(90deg); align-self: flex-end; }
.card-gap { display: flex; justify-content: center; gap: 8px; }
.card-row { display: flex; justify-content: center; align-items: flex-start; min-height: 118px; margin-top: 10px; }

.chip-glyph { display: inline-grid; place-items: center; line-height: 0; }
.chip-selector { display: flex; align-items: center; gap: 4px; }
.chip-selector button { display: grid; place-items: center; width: 52px; height: 52px; padding: 0; border: 0; border-radius: 50%; background: transparent; cursor: pointer; transition: transform 0.12s; }
.chip-selector button:hover:not(:disabled) { transform: translateY(-2px); }
.chip-selector button.is-selected { transform: translateY(-5px); box-shadow: 0 0 0 2px #03050c, 0 0 0 4px var(--gold); }
.chip-selector button:disabled { opacity: 0.6; cursor: not-allowed; }
@media (max-width: 420px) { .chip-selector button { width: 44px; height: 44px; } .chip-selector svg { width: 40px; height: 40px; } }

.bet-spots { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: center; gap: 16px; margin-top: 18px; }
.bet-spot-wrap { display: flex; flex-direction: column; align-items: center; }
.bet-spot {
    position: relative; display: grid; place-items: center; width: 124px; height: 124px; padding: 0;
    border: 2px dashed rgba(241, 213, 138, 0.6); border-radius: 50%; background: rgba(3, 5, 12, 0.3); color: var(--ink); cursor: pointer;
}
.bet-spot.sm { width: 104px; height: 104px; }
.bet-spot.lg { width: 150px; height: 150px; }
.bet-spot.tone-violet { border-color: rgba(201, 184, 255, 0.6); }
.bet-spot.tone-emerald { border-color: rgba(125, 252, 208, 0.6); }
.bet-spot:hover:not(:disabled) { background: rgba(255, 255, 255, 0.06); }
.bet-spot:disabled { cursor: default; }
.bet-spot-label { position: absolute; top: 12px; color: rgba(238, 241, 251, 0.85); font-size: 0.64rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; }
.bet-spot-hint { margin-top: 14px; padding: 0 8px; color: var(--muted); font-size: 0.66rem; line-height: 1.2; text-align: center; }
.bet-spot-amount { display: flex; flex-direction: column; align-items: center; margin-top: 12px; }
.bet-spot-amount strong { color: var(--gold); font-size: 0.85rem; font-variant-numeric: tabular-nums; }
.bet-spot-amount.is-lost { opacity: 0.4; }
.bet-spot-badge { position: absolute; bottom: -9px; padding: 1px 8px; border-radius: 999px; background: rgba(226, 189, 99, 0.85); color: #03050c; font-size: 0.72rem; font-weight: 800; }
.bet-spot-badge.is-win { background: var(--positive); }

/* ---------- Table games ---------- */

.table-screen { display: flex; flex-direction: column; width: 100%; max-width: 1040px; margin: 0 auto; padding: 16px clamp(10px, 2vw, 24px) 0; }
.table-screen.centered { align-items: center; }
.table-arc { width: 100%; max-width: 760px; margin: 0 auto; }
.seat { text-align: center; }
.seat-label { margin: 0; color: var(--muted); font-size: 0.74rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; }
.total-pill, .stake-pill, .result-pill { display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px; border-radius: 999px; background: rgba(3, 5, 12, 0.7); color: var(--ink); font-size: 0.82rem; font-weight: 600; letter-spacing: 0; text-transform: none; font-variant-numeric: tabular-nums; }
.stake-pill { color: var(--gold); }
.result-pill { background: var(--positive); color: #03050c; font-weight: 700; }
.result-pill.lose { background: rgba(3, 5, 12, 0.85); color: var(--ink-2); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2); }
.result-pill.push { background: rgba(226, 189, 99, 0.2); color: var(--gold); }
.felt-print { margin: 14px 0; color: rgba(241, 213, 138, 0.7); font-size: 0.68rem; font-weight: 600; letter-spacing: 0.18em; text-align: center; text-transform: uppercase; }
.hands-area { display: flex; flex-direction: column; align-items: center; }
.hands-row { display: flex; flex-wrap: wrap; justify-content: center; align-items: flex-start; gap: 20px; width: 100%; }
.hand-seat { display: flex; flex-direction: column; align-items: center; padding: 12px; border-radius: 22px; transition: background-color 0.2s; }
.hand-seat.is-active { background: rgba(125, 252, 208, 0.1); box-shadow: 0 0 0 2px rgba(125, 252, 208, 0.7); }
.hand-info { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px; margin-top: 10px; }
.bet-circle { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-top: 18px; }
.bet-circle-ring { display: grid; place-items: center; width: 128px; height: 128px; padding: 12px; border: 2px dashed rgba(241, 213, 138, 0.5); border-radius: 50%; background: rgba(3, 5, 12, 0.3); color: var(--ink-2); font-size: 0.75rem; text-align: center; }
.bet-circle-ring .bet-spot-amount { margin: 0; }
.round-summary { margin-top: 14px; color: var(--ink-2); font-size: 0.88rem; text-align: center; }
.round-summary p { margin: 0.2rem 0 0; }
.round-summary strong { color: var(--ink); }
.outcome-title { margin: 0 !important; color: var(--ink); font: 700 1.5rem var(--font-brand); }
.outcome-title.gold { color: var(--gold); font-size: 2.4rem; }

.bac-seats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(12px, 3vw, 28px); }
.bac-seat { padding: clamp(10px, 2vw, 18px); border: 1px solid var(--border); border-radius: 22px; background: rgba(3, 5, 12, 0.25); text-align: center; transition: border-color 0.2s, background-color 0.2s; }
.bac-seat.is-winner { border-color: rgba(125, 252, 208, 0.7); background: rgba(125, 252, 208, 0.1); }
.bac-seat h2 { margin: 0; font-size: 1.05rem; letter-spacing: 0.08em; text-transform: uppercase; }
.bac-seat.player h2 { color: #e2d8ff; }
.bac-seat.banker h2 { color: var(--gold); }
.seat-total { margin: 0.1rem 0 0; min-height: 1.4em; color: var(--ink-2); font-size: 0.85rem; }
.history-strip { width: 100%; max-width: 620px; margin: 22px auto 0; }
.history-title { margin: 0; color: var(--muted); font-size: 0.74rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
.history-note { margin: 0; color: var(--muted); font-size: 0.7rem; }
.road, .pocket-history { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 0; padding: 0; list-style: none; }
.road-mark { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; font-size: 0.74rem; font-weight: 700; }
.road-mark.player { background: #8a6bff; color: #fff; }
.road-mark.banker { background: #e2bd63; color: #03050c; }
.road-mark.tie { background: #15c98d; color: #03050c; }

.war-seats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; width: 100%; max-width: 520px; }
.hand-name { min-height: 1.6em; margin: 8px 0 0; color: var(--ink); font: 600 1.1rem var(--font-brand); }
.bet-detail { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 3px 16px; width: min(100%, 420px); margin: 16px 0 0; padding: 14px; border: 1px solid var(--border); border-radius: var(--radius); background: rgba(10, 16, 33, 0.8); font-size: 0.86rem; }
.bet-detail dt { color: var(--muted); font-weight: 500; }
.bet-detail dt.is-strong { color: var(--ink-2); font-weight: 700; }
.bet-detail dd { margin: 0; color: var(--ink); text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- Video poker ---------- */

.vp-paytable { width: 100%; max-width: 640px; padding: 8px; border: 1px solid var(--border); border-radius: var(--radius); background: rgba(10, 16, 33, 0.8); overflow-x: auto; }
.vp-paytable table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 0.82rem; }
.vp-paytable th, .vp-paytable td { padding: 3px 8px; font-weight: 600; }
.vp-paytable thead th { color: var(--muted); font-size: 0.64rem; letter-spacing: 0.1em; text-transform: uppercase; }
.vp-paytable tbody th { color: var(--ink-2); text-align: left; }
.vp-paytable tbody th small { color: var(--muted); font-weight: 400; }
.vp-paytable .amount { text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; }
.vp-paytable .amount.is-active { background: rgba(226, 189, 99, 0.12); color: var(--gold); font-weight: 700; }
.vp-paytable tr.is-win { background: rgba(46, 230, 166, 0.2); }
.vp-paytable tr.is-win th { color: var(--positive); }
.vp-paytable tr.is-dealt { background: rgba(255, 255, 255, 0.06); }
@media (max-width: 620px) { .vp-paytable .is-compact { display: none; } }
.vp-hand { width: 100%; margin-top: 18px; }
.vp-cards { display: flex; justify-content: center; gap: clamp(4px, 1.5vw, 12px); margin: 0; padding: 0; list-style: none; }
.vp-cards li { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.held-tag { height: 18px; color: var(--positive); font-size: 0.64rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; opacity: 0; transition: opacity 0.12s; }
.held-tag.is-held { opacity: 1; }
.vp-card { padding: 0; border: 0; border-radius: 10px; background: none; cursor: pointer; transition: transform 0.12s; }
.vp-card:hover:not(:disabled) { transform: translateY(-4px); }
.vp-card.is-raised { transform: translateY(-8px); }
.vp-card:disabled { cursor: default; }
.vp-index { color: var(--muted); font-size: 0.62rem; }
.vp-line { display: flex; align-items: center; justify-content: center; min-height: 48px; margin-top: 10px; text-align: center; }
.vp-line p { margin: 0; }
.vp-stake { display: flex; align-items: center; gap: 12px; }
.coin-radios { display: flex; gap: 4px; }
.coin-radios button { width: 34px; height: 44px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: transparent; color: var(--ink-2); font-weight: 700; cursor: pointer; }
.coin-radios button:hover:not(:disabled) { border-color: rgba(255, 255, 255, 0.35); }
.coin-radios button.is-selected { border-color: var(--gold); background: var(--gold-soft); color: var(--gold); }
.coin-radios button:disabled { opacity: 0.5; cursor: not-allowed; }
@media (max-width: 620px) { .vp-stake { width: 100%; justify-content: space-between; } .game-controls-inner.is-table > .button.large { width: 100%; } }

/* ---------- Roulette ---------- */

.roulette-screen { display: grid; gap: 18px; width: 100%; max-width: 1180px; margin: 0 auto; padding: 16px clamp(10px, 2vw, 24px) 0; }
@media (min-width: 900px) { .roulette-screen { grid-template-columns: minmax(280px, 380px) minmax(0, 1fr); gap: 28px; padding-top: 28px; } }
.roulette-left { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.roulette-right { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.wheel-host { width: 100%; max-width: 260px; aspect-ratio: 1; }
@media (min-width: 620px) { .wheel-host { max-width: 340px; } }
.wheel-svg { width: 100%; height: 100%; filter: drop-shadow(0 30px 40px rgba(0, 0, 0, 0.7)); }
.roulette-panel { display: flex; align-items: center; justify-content: center; width: 100%; max-width: 380px; min-height: 92px; text-align: center; }
.roulette-panel p { margin: 0; font-size: 0.88rem; }
.result-card { display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px; border: 1px solid var(--border); border-radius: var(--radius); background: rgba(10, 16, 33, 0.8); text-align: left; }
.result-card dl { flex: 1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 3px 10px; margin: 0; font-size: 0.86rem; }
.result-card dt { color: var(--muted); font-weight: 500; }
.result-card dt.is-strong { color: var(--ink-2); font-weight: 700; }
.result-card dd { margin: 0; text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.pocket-badge { display: inline-grid; place-items: center; flex: none; border-radius: 50%; color: var(--ink); font: 700 1.1rem var(--font-brand); }
.pocket-badge.red { background: #b3183a; }
.pocket-badge.black { background: #16171d; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2); }
.pocket-badge.green { background: #0f8a54; }
.pocket-badge.sm { width: 32px; height: 32px; font-size: 0.85rem; }
.pocket-badge.md { width: 44px; height: 44px; }
.pocket-badge.lg { width: 76px; height: 76px; font-size: 2rem; }
.roulette-meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 0.82rem; }
.roulette-meta p { margin: 0; }
.roulette-right .history-strip { margin: 0; max-width: none; }

.roulette-board { padding: 8px; border: 2px solid rgba(201, 160, 68, 0.5); border-radius: 16px; background: #0b3d30; box-shadow: inset 0 0 60px rgba(0, 0, 0, 0.5); }
.board-top { display: flex; }
.zero-stack { display: flex; flex-direction: column; width: 7%; }
.number-area { position: relative; flex: 1; min-width: 0; }
.column-stack { display: grid; grid-template-rows: repeat(3, minmax(0, 1fr)); width: 7%; }
.number-grid { display: grid; }
.roulette-board.horizontal .number-grid { grid-template-columns: repeat(12, minmax(0, 1fr)); grid-template-rows: repeat(3, minmax(0, 1fr)); aspect-ratio: 12 / 3; }
.board-row { display: grid; width: 86%; margin-left: 7%; }
.board-row.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.board-row.six { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.num-cell, .zero-cell, .outside-cell {
    position: relative; display: grid; place-items: center; min-height: 0; padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.15); color: var(--ink); cursor: pointer; font-weight: 700;
}
.num-cell { font: 700 0.95rem var(--font-brand); }
.num-cell.red { background: #9e1634; color: #ffe3ea; }
.num-cell.black { background: #15161d; }
.zero-cell { flex: 1; background: #0f8a54; font: 700 0.95rem var(--font-brand); }
.outside-cell { padding: 2px; background: #0d4a39; font-size: 0.72rem; letter-spacing: 0.03em; text-transform: uppercase; }
.outside-cell.tall { min-height: 42px; }
.num-cell:hover:not(:disabled), .zero-cell:hover:not(:disabled) { filter: brightness(1.25); }
.outside-cell:hover:not(:disabled) { background: #126148; }
.num-cell:disabled, .zero-cell:disabled, .outside-cell:disabled { cursor: default; }
.is-covered { box-shadow: inset 0 0 0 2px #f8e7b5; }
.is-winner { z-index: 1; box-shadow: inset 0 0 0 4px var(--positive); }
.rb-label { display: inline-flex; align-items: center; gap: 4px; }
.rb-diamond { display: inline-block; width: 12px; height: 12px; transform: rotate(45deg); }
.rb-diamond.red { background: #c8193f; }
.rb-diamond.black { background: #0b0b10; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.4); }
.bet-marker { position: absolute; left: 50%; top: 50%; z-index: 2; transform: translate(-50%, -50%); pointer-events: none; }
.bet-marker.is-lost { opacity: 0.35; }
.bet-marker-win { position: absolute; top: -14px; left: 50%; transform: translateX(-50%); padding: 0 5px; border-radius: 999px; background: var(--positive); color: #03050c; font-size: 0.62rem; font-weight: 800; white-space: nowrap; }
.combo-layer { position: absolute; inset: 0; pointer-events: none; }
.combo-spot { position: absolute; z-index: 3; width: 20px; height: 20px; padding: 0; border: 0; border-radius: 50%; background: transparent; opacity: 0; transform: translate(-50%, -50%); cursor: pointer; pointer-events: auto; transition: opacity 0.12s; }
.combo-spot:hover, .combo-spot:focus, .combo-spot.is-placed { opacity: 1; }
.combo-spot:hover { background: rgba(248, 231, 181, 0.5); }
@media (pointer: coarse) { .combo-layer { display: none; } }

.roulette-board.vertical { display: flex; padding: 5px; }
.board-v-numbers { width: 64%; }
.board-v-dozens { display: grid; grid-template-rows: repeat(3, minmax(0, 1fr)); width: 16%; margin: 44px 0 0; }
.board-v-even { display: grid; grid-template-rows: repeat(6, minmax(0, 1fr)); width: 20%; margin: 44px 0 40px; }
.zero-row { display: flex; height: 44px; }
.column-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.column-row .outside-cell { min-height: 40px; }
.roulette-board.vertical .number-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: repeat(12, 40px); }
.vertical-text { writing-mode: vertical-rl; }

.bet-builder p { color: var(--ink-2); font-size: 0.88rem; }
.bet-builder ul { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); max-height: 45dvh; margin: 14px 0 0; padding: 0 4px 0 0; overflow-y: auto; list-style: none; }
.bet-builder li button { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; padding: 9px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--page); color: var(--ink); text-align: left; font-size: 0.85rem; cursor: pointer; }
.bet-builder li button:hover:not(:disabled) { border-color: var(--credits); }
.bet-builder li button:disabled { opacity: 0.5; }
.bet-builder li strong { display: block; }
.bet-builder li small { display: block; color: var(--muted); font-size: 0.74rem; }

/* Six items in the phone nav since the casino joined it: keep every label on one line. */
@media (max-width: 420px) {
    .bottom-nav a { font-size: 0.62rem; white-space: nowrap; }
    .bottom-nav { padding-inline: 2px; }
}

/* Table games have a taller, two-row control bar on phones; keep the page end clear of it. */
@media (max-width: 620px) {
    .cg-disclaimer { padding-bottom: 170px; }
}

/* ---------- Gold Coins ---------- */

.gold-chip i, .gold-chip:hover { color: var(--gold); }
.gold-chip:hover { border-color: var(--gold); }
.gold-hero { background: linear-gradient(120deg, rgba(246, 195, 67, 0.14), rgba(246, 195, 67, 0.02) 60%), var(--surface); border-color: rgba(246, 195, 67, 0.35); }
.gold-hero .stat-value { color: var(--gold); }
.gold-hero .stat-value small { font-size: 0.5em; color: var(--ink-2); }
.panel-header p.gold-figure { color: var(--gold); }

.spin-ready-chip, .spin-banner { color: #2a1800; background: linear-gradient(120deg, #fff3b0, #f6c343 60%, #e39b1c); animation: spin-prompt 1.6s ease-in-out infinite; }
.spin-ready-chip { display: inline-flex; align-items: center; gap: 0.35rem; min-height: 36px; padding: 0 0.8rem; border-radius: 999px; font-size: 0.82rem; font-weight: 700; white-space: nowrap; text-decoration: none; }
.spin-ready-chip:hover { color: #2a1800; filter: brightness(1.06); }
.spin-banner { display: flex; align-items: center; gap: 0.7rem; margin-bottom: 14px; padding: 12px 16px; border-radius: var(--radius-lg); text-decoration: none; }
.spin-banner:hover { color: #2a1800; }
.spin-banner > span:not(.button) { flex: 1; }
.spin-banner .button { background: #2a1800; color: #fff3b0; border-color: transparent; }
@keyframes spin-prompt { 50% { box-shadow: 0 0 0 5px rgba(246, 195, 67, 0.25); } }

.coin-chips { display: contents; }
@media (max-width: 560px) {
    .app-topbar .topbar-actions { gap: 6px; }
    .app-topbar .user-chip { display: none; }
    .app-topbar .balance-chip i { display: none; }
    .app-topbar .coin-chips { display: grid; gap: 2px; }
    .app-topbar .coin-chips .credits-chip { justify-content: space-between; gap: 0.4rem; min-height: 21px; height: 21px; padding: 0 0.45rem; border-radius: 7px; font-size: 0.72rem; }
    .app-topbar .coin-chips i { display: none; }
    .app-topbar .coin-chips small { display: inline; font-size: 0.64rem; }
    .spin-ready-chip span { display: none; }
    .spin-ready-chip { padding: 0 0.55rem; }
}

/* ---------- Lucky Wheel ---------- */

.wheel-page { position: relative; }
.wheel-head { text-align: center; margin-bottom: 18px; }
.wheel-head .eyebrow { justify-content: center; }
.wheel-head h1 { margin: 0.1rem 0 0.3rem; background: linear-gradient(120deg, #fff3b0, #f6c343 45%, #fb7185); -webkit-background-clip: text; background-clip: text; color: transparent; text-shadow: none; }
.wheel-head p:last-child { margin: 0 auto; max-width: 56ch; color: var(--ink-2); }

.wheel-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 340px); gap: 28px; align-items: start; }
.wheel-stage { position: relative; width: min(100%, 560px); margin: 0 auto; aspect-ratio: 1; padding-top: 22px; box-sizing: content-box; }
.wheel-stage::before { content: ""; position: absolute; inset: 2% 2% -2%; border-radius: 50%; background: radial-gradient(closest-side, rgba(167, 139, 250, 0.45), rgba(246, 195, 67, 0.16) 65%, transparent); filter: blur(22px); }
.wheel-svg { position: relative; display: block; width: 100%; height: 100%; filter: drop-shadow(0 18px 40px rgba(0, 0, 0, 0.55)); }
.wheel-pointer { position: absolute; z-index: 3; top: 0; left: 50%; width: 9%; min-width: 34px; margin-left: calc(max(9%, 34px) / -2); transform-origin: 50% 22%; filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.5)); }

.wheel-amount { fill: #fff; font-family: var(--font-brand), system-ui, sans-serif; font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; paint-order: stroke; stroke: rgba(0, 0, 0, 0.45); stroke-width: 2.5px; }
.wheel-slice.tier-big .wheel-amount { font-size: 19px; }
.wheel-slice.tier-double .wheel-amount { fill: #3a2300; font-size: 20px; stroke: rgba(255, 243, 176, 0.6); }
.wheel-double-word { fill: #3a2300; font-family: var(--font-brand), system-ui, sans-serif; font-size: 11px; font-weight: 800; letter-spacing: 0.04em; }
.wheel-slice { transition: opacity 0.4s; }
.wheel-slice.is-dimmed { opacity: 0.32; }
.wheel-slice.is-winner path { stroke: #fff3b0; stroke-width: 4; }

.wheel-bulbs circle { fill: #7a4d0b; }
.wheel-bulbs .bulb-a { animation: wheel-bulb 1.1s steps(1) infinite; }
.wheel-bulbs .bulb-b { animation: wheel-bulb 1.1s steps(1) infinite 0.55s; }
.is-spinning .wheel-bulbs .bulb-a, .is-spinning .wheel-bulbs .bulb-b { animation-duration: 0.28s; }
.is-spinning .wheel-bulbs .bulb-b { animation-delay: 0.14s; }
.is-settled .wheel-bulbs .bulb-a, .is-settled .wheel-bulbs .bulb-b { animation-duration: 0.6s; }
.is-settled .wheel-bulbs .bulb-b { animation-delay: 0.3s; }
@keyframes wheel-bulb { 0% { fill: #fff8d6; filter: drop-shadow(0 0 5px #fde68a); } 50% { fill: #7a4d0b; filter: none; } }

.wheel-hub { position: absolute; z-index: 2; top: calc(50% + 11px); left: 50%; width: 19%; aspect-ratio: 1; transform: translate(-50%, -50%); border: 3px solid #fff3b0; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #ff8fa8, #e11d6b 55%, #8f0f45); color: #fff; font-family: var(--font-brand), system-ui, sans-serif; font-size: clamp(0.85rem, 3vw, 1.35rem); font-weight: 800; letter-spacing: 0.04em; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5), inset 0 -4px 10px rgba(0, 0, 0, 0.25); cursor: pointer; animation: wheel-hub-pulse 1.5s ease-in-out infinite; }
.wheel-hub:hover:not(:disabled) { filter: brightness(1.12); }
.wheel-hub:active:not(:disabled) { transform: translate(-50%, -50%) scale(0.94); }
.wheel-hub:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.wheel-hub:disabled { cursor: default; animation: none; filter: saturate(0.75); }
@keyframes wheel-hub-pulse { 50% { box-shadow: 0 0 0 10px rgba(225, 29, 107, 0.25), 0 6px 18px rgba(0, 0, 0, 0.5), inset 0 -4px 10px rgba(0, 0, 0, 0.25); } }

.wheel-side { display: grid; gap: 16px; }
.wheel-side .panel + .panel { margin-top: 0; }
.wheel-odds-list { list-style: none; display: grid; gap: 10px; margin: 0; padding: 0; }
.wheel-odds-list li { display: flex; align-items: center; gap: 0.7rem; }
.wheel-odds-list strong, .wheel-odds-list small { display: block; }
.wheel-odds-list small { color: var(--ink-2); }
.wheel-swatch { flex: none; width: 20px; height: 20px; border-radius: 6px; border: 1px solid rgba(255, 255, 255, 0.3); }
.wheel-swatch.tier-standard { background: linear-gradient(135deg, #7c3aed, #14b8a6); }
.wheel-swatch.tier-big { background: linear-gradient(135deg, #fb7185, #be185d); }
.wheel-swatch.tier-double { background: linear-gradient(135deg, #fff3b0, #f59e0b); }

.wheel-result { text-align: center; animation: wheel-result-in 0.45s cubic-bezier(0.2, 1.4, 0.4, 1); border-color: rgba(246, 195, 67, 0.5); outline: none; }
.wheel-result.tier-double { background: radial-gradient(circle at 50% 0, rgba(246, 195, 67, 0.35), transparent 70%), var(--surface); box-shadow: 0 0 34px rgba(246, 195, 67, 0.4); }
.wheel-result.tier-big { background: radial-gradient(circle at 50% 0, rgba(251, 113, 133, 0.25), transparent 70%), var(--surface); }
.wheel-result-kicker { margin: 0; color: #fff3b0; font-family: var(--font-brand), system-ui, sans-serif; font-size: 1.5rem; font-weight: 800; }
.wheel-result.tier-double .wheel-result-kicker { font-size: 2rem; letter-spacing: 0.04em; }
.wheel-result-amount { margin: 0.1rem 0 0.4rem; color: var(--gold); font-family: var(--font-brand), system-ui, sans-serif; font-size: clamp(2.2rem, 6vw, 3rem); font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.1; }
.wheel-result-amount small { font-size: 0.45em; color: var(--ink-2); }
.wheel-result .button-row { justify-content: center; margin-top: 12px; }
@keyframes wheel-result-in { from { opacity: 0; transform: scale(0.85); } }

.wheel-confetti { position: fixed; inset: 0; z-index: 2000; width: 100%; height: 100%; pointer-events: none; }

@media (max-width: 900px) {
    .wheel-layout { grid-template-columns: minmax(0, 1fr); gap: 18px; }
    .wheel-stage { width: min(100%, 460px); }
}

html[data-motion="reduced"] .wheel-bulbs circle, html[data-motion="reduced"] .wheel-hub, html[data-motion="reduced"] .spin-ready-chip, html[data-motion="reduced"] .spin-banner { animation: none; }
@media (prefers-reduced-motion: reduce) {
    .wheel-bulbs circle, .wheel-hub, .spin-ready-chip, .spin-banner, .wheel-result { animation: none; }
}

/* ---------- Reduced motion ---------- */

html[data-motion="reduced"] *, html[data-motion="reduced"] *::before, html[data-motion="reduced"] *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
html[data-hidden="true"] .sky-layer { animation-play-state: paused !important; }

/* Stormhorn backdrop: rain during the Storm Run and lightning when a bull lands. Purely decorative. */
.sh-distant { position: absolute; inset: 0; opacity: 0; background: radial-gradient(60% 40% at 72% 30%, rgb(190 205 255 / 0.32), transparent 70%); animation: sh-distant 17s linear infinite; }
.sh-flash { position: absolute; inset: 0; opacity: 0; background: radial-gradient(90% 70% at 50% 18%, rgb(255 240 200 / 0.55), rgb(160 180 255 / 0.18) 55%, transparent 80%); }
.sh-rain { position: absolute; inset: -20% 0 0; opacity: 0; transition: opacity 0.8s; background-image: repeating-linear-gradient(104deg, transparent 0 46px, rgb(190 210 255 / 0.22) 46px 47px, transparent 47px 90px); background-size: 180px 180px; animation: sh-rain 0.9s linear infinite; }
.cg-backdrop.is-storm .sh-rain { opacity: 1; }
.cg-backdrop.is-flash .sh-flash { animation: sh-flash 0.7s ease-out; }
@keyframes sh-distant { 0%, 61%, 66%, 100% { opacity: 0; } 62% { opacity: 1; } 63% { opacity: 0.25; } 64% { opacity: 0.8; } }
@keyframes sh-flash { 0% { opacity: 0; } 12% { opacity: 1; } 24% { opacity: 0.25; } 34% { opacity: 0.85; } 100% { opacity: 0; } }
@keyframes sh-rain { to { background-position: -44px 180px; } }
html[data-motion="reduced"] .sh-distant, html[data-motion="reduced"] .sh-rain { animation: none; }
html[data-hidden="true"] .sh-distant, html[data-hidden="true"] .sh-rain { animation-play-state: paused; }

/* ---------- Machine layout: reels inside a painted cabinet (Hell Tour) ----------
   slot-kit passes the painted reel window and margins in image pixels. --mw is the live reel window's width on screen:
   as wide as a phone allows (the painted frame may bleed off the edges, the reels never do), and on larger screens as
   tall as fits above the controls. --k converts image pixels to screen pixels, so the scene lines up at every size. */
.slot-screen.is-machine { max-width: none; padding: 0; overflow-x: clip; }
.machine {
    --chrome: 228px;
    --fit-w: calc((100vw - 4px) / 1.06);
    --mw: max(min(680px, var(--fit-w), calc((100dvh - var(--chrome)) * var(--win-w) / (var(--above) + var(--win-h) + var(--below)))), min(300px, var(--fit-w)));
    --k: calc(var(--mw) / var(--win-w));
    position: relative; width: var(--mw); margin: 0 auto;
    padding: calc(var(--k) * var(--above)) 0 calc(var(--k) * var(--below));
}
.machine-scene {
    position: absolute; z-index: 0; pointer-events: none;
    left: calc(var(--k) * var(--scene-x) * -1);
    top: calc(var(--k) * (var(--above) - var(--scene-y)));
    width: calc(var(--k) * var(--scene-w));
    height: calc(var(--k) * (var(--scene-y) + var(--win-h) + var(--below) + 200));
    background-repeat: no-repeat; background-position: 0 0;
    background-size: calc(var(--k) * var(--scene-w)) calc(var(--k) * var(--scene-h));
    -webkit-mask-image: linear-gradient(180deg, transparent, #000 18%, #000 calc(100% - var(--k) * 200), transparent), linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
    -webkit-mask-composite: source-in;
    mask-image: linear-gradient(180deg, transparent, #000 18%, #000 calc(100% - var(--k) * 200), transparent), linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
    mask-composite: intersect;
}
.machine-top {
    position: absolute; z-index: 3; top: 0; left: 50%; display: flex; align-items: center; justify-content: center;
    width: min(calc(100vw - 16px), 620px); height: calc(var(--k) * var(--above)); transform: translateX(-50%);
}
.machine-top .slot-status { min-height: 0; margin: 0; }
.machine-top .status-pill { background: rgb(14 5 4 / 0.78); backdrop-filter: blur(6px); box-shadow: 0 6px 18px rgb(0 0 0 / 0.45); }
.machine-top .slot-tagline { padding: 6px 14px; border-radius: 999px; background: rgb(14 5 4 / 0.72); color: #ffe7c2; backdrop-filter: blur(6px); }
.machine-window {
    z-index: 1; overflow: hidden; border-radius: calc(var(--k) * 8);
    background: radial-gradient(120% 90% at 50% 0%, #3a1410, #1c0909 60%, #0d0405);
    box-shadow: 0 0 0 calc(var(--k) * 3) rgb(20 6 6 / 0.85);
    transition: box-shadow 0.6s;
}
.machine-window::after {
    content: ""; position: absolute; inset: 0; z-index: 4; border-radius: inherit; pointer-events: none;
    box-shadow: inset 0 calc(var(--k) * 8) calc(var(--k) * 18) rgb(0 0 0 / 0.55), inset 0 0 0 1px rgb(0 0 0 / 0.7);
}
.slot-screen.is-machine .result-line {
    position: relative; z-index: 2; width: fit-content; max-width: calc(100% - 16px); margin: 2px auto 0; padding: 0 16px;
    border-radius: 999px; background: rgb(10 4 4 / 0.62); backdrop-filter: blur(6px);
}

/* ---------- Hell Tour ---------- */
.ht-backdrop { position: absolute; inset: 0; background: #0d0405 url("../art/hell-tour/backdrop.webp") center 55% / cover no-repeat; }
.ht-embers {
    position: absolute; inset: -20% 0 0; opacity: 0; transition: opacity 1.2s;
    background-image:
        radial-gradient(2px 2px at 12% 80%, #ffb547, transparent), radial-gradient(1.5px 1.5px at 33% 40%, #ff7a2a, transparent),
        radial-gradient(2px 2px at 58% 70%, #ffd36e, transparent), radial-gradient(1.5px 1.5px at 81% 22%, #ff9a3c, transparent),
        radial-gradient(2.5px 2.5px at 92% 64%, #ffb547, transparent);
    background-size: 320px 320px; animation: ht-embers 11s linear infinite;
}
body.ht-touring .ht-embers { opacity: 0.9; }
@keyframes ht-embers { to { background-position: 60px -320px; } }
body.ht-touring .machine-window { box-shadow: 0 0 0 calc(var(--k) * 3) rgb(60 12 4 / 0.9), 0 0 calc(var(--k) * 46) rgb(255 106 24 / 0.55); }

/* Heat ladder tags, hung on the side of the bus like the paper tags in the artwork. */
.ht-ladder {
    position: absolute; z-index: 2; right: calc(100% + var(--k) * 24); top: calc(var(--k) * (var(--above) + 30));
    display: grid; gap: calc(var(--k) * 16); margin: 0; padding: 0; list-style: none;
}
.ht-ladder li {
    position: relative; display: grid; place-items: center; width: max(48px, calc(var(--k) * 96)); height: max(30px, calc(var(--k) * 56));
    color: #1d0c06; font: 800 italic max(0.9rem, calc(var(--k) * 30)) var(--font-brand); letter-spacing: 0.02em;
    transform: rotate(-5deg); opacity: 0.6; filter: grayscale(0.5) brightness(0.75); transition: opacity 0.3s, filter 0.3s;
}
.ht-ladder li:nth-child(even) { transform: rotate(4deg); }
.ht-ladder li::before {
    content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, #fffaf0, #e3d6c4);
    clip-path: polygon(0 10%, 9% 0, 30% 5%, 52% 0, 76% 6%, 100% 0, 95% 48%, 100% 94%, 72% 100%, 48% 95%, 24% 100%, 0 96%, 5% 52%);
}
.ht-ladder li.is-lit { opacity: 1; filter: none; }
.ht-ladder li.is-lit::before { background: linear-gradient(180deg, #fff6d0, #ffc45a); }
.ht-ladder li.is-current { filter: drop-shadow(0 0 10px rgb(255 140 40 / 0.95)); }
.ht-ladder li.is-rising { animation: ht-rise 0.7s cubic-bezier(0.2, 1.5, 0.4, 1); }
@keyframes ht-rise { 0% { scale: 1.7; filter: brightness(2.2) drop-shadow(0 0 22px #ffb547); } 100% { scale: 1; } }
@media (max-width: 759px) { .ht-ladder { display: none; } }
.ht-heat { color: #ffc24a; }

.win-overlay.has-art { background: radial-gradient(circle at 50% 45%, rgb(8 2 2 / 0.78), rgb(8 2 2 / 0.4) 75%); }
.win-overlay.has-art .win-card { display: grid; justify-items: center; padding: 0; background: none; backdrop-filter: none; }
/* Badges are cut-outs (see build-hell-tour-art.py), so they need no mask; the figure overlaps the badge's lower edge. */
.win-art { display: block; width: min(94%, 460px); height: auto; filter: drop-shadow(0 0 22px rgb(255 120 30 / 0.35)); }
.win-overlay.has-art .win-figure { margin-top: -0.35em; color: #ffd36e; text-shadow: 0 3px 0 #3a0d05, 0 0 18px rgb(255 140 40 / 0.7); }

/* Tour title cards: a column that always fits the reel window, from a small phone up. */
.feature-intro.ht-card {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; overflow: hidden;
    background: radial-gradient(circle at 50% 40%, rgb(48 10 4 / 0.9), rgb(6 2 2 / 0.94));
}
.ht-card-art {
    display: block; flex: none; width: auto; height: 46%; max-width: 88%; object-fit: contain;
    -webkit-mask-image: radial-gradient(closest-side, #000 72%, transparent); mask-image: radial-gradient(closest-side, #000 72%, transparent);
}
.ht-card-text { flex: none; }
.ht-card .feature-title { margin: 0; color: #ffc24a !important; font-size: clamp(1.7rem, 7cqw, 3rem); text-shadow: 0 3px 0 #4a1205, 0 0 20px rgb(255 120 30 / 0.6); }
.ht-card-text p:not(.feature-title) { margin: 0.15rem 0 0; color: #ffe7c2; font-size: clamp(0.8rem, 3.4cqw, 1rem); }
.machine-window { container-type: size; }
html[data-motion="reduced"] .ht-embers { animation: none; }
html[data-hidden="true"] .ht-embers { animation-play-state: paused; }
