/* Per-game styles. Colours come from --acc (the current game's accent as "r g b"). */
:root {
  --r-common: #8e8e93; --r-uncommon: #34c759; --r-rare: #3c87f7; --r-epic: #af52de; --r-legendary: #ff9500;
}
.stack { display: grid; gap: var(--sp-md); }
.center { text-align: center; justify-items: center; }
.bj-stage { display: grid; gap: var(--sp-md); }
.spinner { width: 28px; height: 28px; margin: var(--sp-xl) auto; border-radius: 50%; border: 3px solid var(--line); border-top-color: rgb(var(--acc)); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 2s; } }
.shake { animation: shake 400ms var(--ease-out); }
@keyframes shake { 20% { transform: translateX(7px); } 40% { transform: translateX(-6px); } 60% { transform: translateX(4px); } 80% { transform: translateX(-2px); } }

/* ---- blackjack ---- */
.bj-table { display: grid; gap: var(--sp-md); }
.bj-hands { display: grid; gap: var(--sp-sm); }
.bj-dealer, .bj-hand { display: grid; gap: var(--sp-sm); }
.bj-hand { transition: box-shadow 200ms, background-color 200ms; }
.bj-hand.active { box-shadow: inset 0 0 0 1.5px rgb(var(--acc)), var(--glass-shadow); background: linear-gradient(rgb(var(--acc) / .14), rgb(var(--acc) / .14)), var(--glass); }
.bj-hand-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--sp-sm); }
.cap.bad { color: var(--bad); }
.bj-result { display: grid; justify-items: start; min-height: 0; }
.bj-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(80px, 1fr)); gap: var(--sp-sm); }
.bj-act { min-height: 46px; padding: 0 var(--sp-sm); font-weight: 700; }
.bj-foot:empty { display: none; }
.bubble { display: flex; gap: var(--sp-sm); align-items: flex-start; }
.bubble-fox { font-size: 30px; line-height: 1; }
.bubble-text { font-size: 15px; line-height: 1.4; text-wrap: pretty; }
.bubble-text.dim { color: var(--muted); }

/* ---- baccarat ---- */
.bac-hand { display: grid; gap: var(--sp-sm); transition: background-color 200ms; }
.bac-hand.winner { background: linear-gradient(rgb(52 199 89 / .18), rgb(52 199 89 / .18)), var(--glass); }
.bac-hand.winner .cap { color: var(--good); }
.bac-head { display: flex; align-items: center; justify-content: space-between; }
.bac-total { font-size: 22px; font-weight: 750; font-variant-numeric: tabular-nums; }

/* ---- chicken road ---- */
.odds { display: flex; justify-content: space-around; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.road-head { display: flex; align-items: center; justify-content: space-between; }
.road-mult { font-size: 19px; font-weight: 750; font-variant-numeric: tabular-nums; transition: transform 200ms var(--ease-out), color 200ms; }
.road-mult.good { color: var(--good); transform: scale(1.15); }
.road { position: relative; display: flex; height: 64px; border-radius: 12px; overflow: hidden; }
.lane { position: relative; flex: 1; background: var(--line); border-left: 1px solid rgb(255 255 255 / .25); transition: background-color 300ms var(--ease-out); }
.lane.start { background: rgb(52 199 89 / .25); border-left: 0; }
.lane.passed { background: rgb(var(--acc) / .35); }
.lane span { position: absolute; bottom: 3px; left: 0; right: 0; text-align: center; font-size: 10px; font-weight: 700; color: var(--muted); }
.chicken { position: absolute; top: 14px; font-size: 30px; line-height: 1; transition: left 300ms var(--ease-out), transform 300ms var(--ease-out); transform-origin: 50% 100%; }
.chicken.busted { transform: rotate(95deg) translateY(-6px); }
.chicken.hop { animation: hop 320ms var(--ease-out); }
@keyframes hop { 0% { translate: 0 0; } 45% { translate: 0 -18px; rotate: -8deg; } 100% { translate: 0 0; } }
.truck { position: absolute; top: 6px; font-size: 34px; line-height: 1; animation: truck 320ms var(--ease-out); }
@keyframes truck { from { transform: translateY(-40px); opacity: 0; } }
.road-controls { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-sm); }
.road-controls .banner, .road-controls .block { grid-column: 1 / -1; }
.road-controls .btn { min-height: 50px; font-size: 16px; }
.panel.bust { background: linear-gradient(rgb(217 52 43 / .18), rgb(217 52 43 / .18)), var(--glass); }

/* ---- cases ---- */
.case-picker { display: flex; gap: var(--sp-sm); overflow-x: auto; padding: 2px 2px 6px; scrollbar-width: none; }
.case-btn { flex: none; width: 92px; display: grid; justify-items: center; gap: 2px; padding: 10px 6px; border-radius: var(--r-control); background: var(--glass); border: 1px solid var(--glass-edge); transition: transform 160ms var(--ease-out), box-shadow 200ms; }
.case-btn:active { transform: scale(.96); }
.case-btn.on { box-shadow: inset 0 0 0 2px rgb(var(--acc)); background: linear-gradient(rgb(var(--acc) / .18), rgb(var(--acc) / .18)), var(--glass); }
.case-btn:disabled { opacity: .6; }
.case-emoji { font-size: 30px; line-height: 1.1; }
.case-name { font-size: 12px; font-weight: 650; }
.reel { position: relative; height: 96px; overflow: hidden; border-radius: 12px; background: var(--line); }
.reel-track { position: absolute; left: 0; top: 4px; display: flex; gap: 8px; will-change: transform; }
.reel-track.idle { position: static; display: grid; place-items: center; height: 100%; }
.reel-idle { font-size: 44px; }
.reel-marker { position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: rgb(var(--acc)); z-index: 2; }
.reel-tile { flex: none; width: 88px; height: 88px; display: grid; place-content: center; justify-items: center; gap: 2px; border-radius: 12px; border: 2px solid; background: var(--field); }
.reel-emoji { font-size: 32px; line-height: 1.1; }
.case-result { display: grid; justify-items: center; gap: 6px; }
.case-result:empty { display: none; }
.case-won-emoji { font-size: 56px; line-height: 1.1; animation: pop 320ms var(--ease-out) both; }
.case-won-name { font-weight: 750; letter-spacing: .02em; }
.content-row { display: flex; align-items: center; gap: var(--sp-sm); }
.content-emoji { font-size: 22px; }
.content-name { flex: 1; font-size: 15px; font-weight: 600; }

/* ---- plinko ---- */
.plinko-canvas { width: 100%; aspect-ratio: 336 / 296; display: block; }
.ball-counts { display: flex; align-items: center; gap: var(--sp-sm); }
.ball-counts .chip-sm.on { background: var(--btn-bg); color: var(--on-acc); }

/* ---- slots ---- */
.jackpots { display: flex; gap: var(--sp-sm); flex-wrap: wrap; justify-content: center; }
.jp { display: flex; align-items: center; gap: 4px; padding: 5px 11px; border-radius: 999px; background: var(--glass); border: 1px solid var(--glass-edge); font-weight: 650; font-size: 13px; }
.jp-n { font-variant-numeric: tabular-nums; }
.slot-head { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-sm); }
.slot-tools { display: flex; gap: 6px; }
.chip-sm.on { background: var(--btn-bg); color: var(--on-acc); }
.paytable { display: grid; gap: 4px; }
.pt-row { display: grid; grid-template-columns: 1fr repeat(3, 56px); align-items: center; font-size: 14px; }
.pt-row.head { font-size: 12px; color: var(--muted); }
.pt-n { text-align: right; font-variant-numeric: tabular-nums; font-size: 13px; }
.pt-bonus { display: flex; justify-content: space-between; align-items: center; font-size: 13px; padding-top: 4px; }
.reels { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; }
.reel-col { position: relative; overflow: hidden; border-radius: 10px; }
.reel-static { display: grid; gap: 4px; }
.sym { aspect-ratio: 1; display: grid; place-items: center; font-size: clamp(22px, 7.4vw, 42px); line-height: 1; border-radius: 10px; background: var(--field); transition: transform 300ms cubic-bezier(.34, 1.4, .64, 1), background-color 200ms, box-shadow 200ms; }
.sym.win { background: rgb(var(--acc) / .35); box-shadow: inset 0 0 0 2px rgb(var(--acc)); transform: scale(1.06); }
.reel-strip { display: none; position: absolute; top: 0; left: 0; right: 0; gap: 4px; filter: blur(1.5px); animation: reel-roll 420ms linear infinite; }
.reel-col.spinning .reel-static { visibility: hidden; }
.reel-col.spinning .reel-strip { display: grid; }
@keyframes reel-roll { from { transform: translateY(-50%); } to { transform: translateY(0); } }
.reel-static.settle { animation: settle 330ms var(--ease-out); }
@keyframes settle { from { transform: translateY(-14px); opacity: .5; } }
@media (prefers-reduced-motion: reduce) { .reel-strip { animation-duration: 900ms; } }

/* ---- slot features ---- */
.feature-wrap { display: grid; gap: var(--sp-md); }
.feature-head { display: grid; justify-items: center; gap: 4px; text-align: center; }
.feature-emoji { font-size: 44px; line-height: 1; }
.feature-name { font-size: 22px; font-weight: 800; letter-spacing: .02em; }
.fbox { display: grid; gap: var(--sp-sm); }
.frow { display: flex; justify-content: space-between; font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
.fl { color: var(--muted); }
.fgrid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; }
.fcell { position: relative; aspect-ratio: 1; display: grid; place-items: center; border-radius: 10px; background: var(--field); border: 1px solid transparent; transition: opacity 200ms; }
.fcell.dim { opacity: .45; }
.fem { font-size: clamp(16px, 4.6vw, 26px); line-height: 1; }
.fem.cyc { opacity: .55; }
.fem.ghost { opacity: .3; }
.fland { display: grid; place-items: center; gap: 0; animation: pop 220ms var(--ease-out) both; }
.fval { font-size: 11px; font-weight: 750; font-variant-numeric: tabular-nums; }
.fstack { display: grid; place-items: center; }
.fstack > * { grid-area: 1 / 1; }
.fhat { position: absolute; top: 2px; right: 4px; font-size: 11px; }
.fnote { text-align: center; font-weight: 750; font-size: 14px; }
.fnote.good { color: var(--good); }
.fnote.jack { color: #af52de; }
.fmods { display: flex; gap: var(--sp-sm); flex-wrap: wrap; justify-content: center; }
.fmod { padding: 3px 9px; border-radius: 999px; border: 1px solid; font-size: 12px; font-weight: 650; }
.fsmall { text-align: center; font-size: 13px; color: var(--muted); }
.fkey { display: flex; gap: var(--sp-md); justify-content: center; font-size: 12px; }
.ffoot { display: grid; gap: 10px; text-align: center; padding-top: var(--sp-sm); }
.fpay { font-size: 34px; font-weight: 800; color: var(--good); font-variant-numeric: tabular-nums; animation: pop 300ms var(--ease-out) both; }
.skip-btn { justify-self: center; color: var(--muted); font-size: 13px; padding: 8px 14px; border-radius: 999px; }
.wheel-wrap { position: relative; width: 260px; height: 260px; margin: 0 auto; }
.wheel { position: relative; width: 260px; height: 260px; border-radius: 50%; background: var(--field); border: 3px solid rgb(var(--acc)); }
.wheel-face { position: absolute; inset: 0; }
.wheel-seg { position: absolute; left: 50%; top: 50%; width: 44px; height: 20px; margin: -10px 0 0 -22px; text-align: center; font-weight: 700; font-size: 14px; line-height: 20px; }
.wheel-seg.again { color: rgb(var(--acc)); font-size: 18px; }
.wheel-pointer { position: absolute; left: 50%; top: -8px; width: 0; height: 0; border-left: 11px solid transparent; border-right: 11px solid transparent; border-top: 18px solid rgb(var(--acc)); transform: translateX(-50%); }
.wheel-label { text-align: center; font-weight: 700; color: var(--muted); }

/* ---- poker ---- */
.meta.faint { color: var(--faint); font-size: 12px; }
.pk-header { text-align: center; display: grid; gap: 2px; padding-top: 2px; }
.pk-big { display: flex; justify-content: center; align-items: center; gap: 10px; font-size: clamp(34px, 9vw, 46px); font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.pk-rate { color: var(--muted); font-weight: 600; font-variant-numeric: tabular-nums; }
.pk-table { position: relative; }
.pk-felt { width: 100%; display: grid; justify-items: center; gap: 12px; padding: 24px 12px; border-radius: var(--r-card); color: #fff; background: linear-gradient(#0f5c36, #0a3f26); border: 1.5px solid rgb(255 255 255 / .2); box-shadow: var(--glass-shadow); transition: transform 150ms var(--ease-out); }
.pk-felt:active { transform: scale(.975); }
.pk-hand { justify-content: center; }
.pk-hand .pc { --w: 52px; }
.pk-label { font-weight: 800; font-size: 17px; }
.pk-label.big { color: #ffd60a; }
.pk-sub { font-size: 13px; color: rgb(255 255 255 / .75); }
.pk-gains { position: absolute; inset: 0; pointer-events: none; display: grid; place-items: center; }
.pk-gain { position: absolute; font-weight: 800; font-size: 22px; color: #fff; text-shadow: 0 1px 3px rgb(0 0 0 / .55); animation: gain 850ms var(--ease-out) forwards; }
.pk-gain.big { font-size: 30px; color: #ffd60a; }
@keyframes gain { from { transform: translate(var(--dx), 0); opacity: 1; } to { transform: translate(var(--dx), -90px); opacity: 0; } }
.pk-golden { position: absolute; z-index: 3; transform: translate(-50%, -50%); font-size: 40px; line-height: 1; padding: 8px; border-radius: 50%; background: rgb(255 214 10 / .35); border: 2px solid #ffd60a; animation: gpulse 1s ease-in-out infinite alternate; }
@keyframes gpulse { to { transform: translate(-50%, -50%) scale(1.12); } }
.pk-row { display: flex; align-items: center; gap: var(--sp-md); padding: 10px 12px; }
.pk-em { flex: none; font-size: 30px; width: 44px; text-align: center; line-height: 1.1; }
.pk-info { flex: 1; min-width: 0; }
.pk-buy { display: grid; justify-items: end; gap: 2px; }
.pk-ms { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-md); }
.pk-progress { height: 8px; border-radius: 999px; background: var(--line); overflow: hidden; }
.pk-progress-fill { height: 100%; border-radius: inherit; background: var(--good); transition: width 300ms var(--ease-out); }
.pk-staff-head { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-md); }
.pk-h { margin: 0; font-size: 20px; letter-spacing: -.01em; }
.pk-pick { width: 170px; }
.pk-welcome { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-md); background: linear-gradient(rgb(255 214 10 / .18), rgb(255 214 10 / .18)), var(--glass); }
.pk-welcome[hidden] { display: none; }

/* ---- exchange ---- */
.num { font-variant-numeric: tabular-nums; }
.up { color: var(--good); }
.down { color: var(--bad); }
.xp { gap: 6px; }
.xp-row { display: flex; justify-content: center; align-items: center; gap: 8px; font-size: 40px; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.1; }
.xp-pnl { font-weight: 650; font-variant-numeric: tabular-nums; }
.xcoin { display: flex; align-items: center; gap: var(--sp-md); width: 100%; text-align: left; padding: 10px 12px; color: inherit; transition: transform 160ms var(--ease-out); }
.xcoin:active { transform: scale(.985); }
.xc-em { flex: none; width: 48px; height: 48px; display: grid; place-items: center; font-size: 28px; border-radius: 14px; background: rgb(255 255 255 / .08); }
.xc-name { flex: 1; min-width: 0; }
.xc-price { text-align: right; min-width: 76px; }
.spark { flex: none; width: 64px; height: 32px; }
.xd-price { font-size: 40px; font-weight: 800; letter-spacing: -.02em; }
.xd-sub { display: flex; gap: var(--sp-sm); justify-content: center; font-weight: 650; flex-wrap: wrap; }
.xd-chart { padding: var(--sp-sm); min-height: 236px; }
.xchart { width: 100%; height: 220px; display: block; touch-action: none; }
.xaxis { font-size: 10px; fill: var(--muted); }
.xd-actions { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-sm); }
.xd-actions .btn { min-height: 50px; font-size: 17px; }
.xd-stat { display: flex; justify-content: space-between; font-size: 15px; }
.xt-head, .xt-line { display: flex; justify-content: space-between; align-items: center; }
.xt-amount { font-size: 22px; font-weight: 750; }
.xt-est { font-size: 18px; font-weight: 650; }
.xt-msg:empty { display: none; }
.xt-msg.good { color: var(--good); text-align: center; font-weight: 650; }
