:root {
  color-scheme: light;
  font-family: "Avenir Next", Avenir, ui-rounded, system-ui, sans-serif;
  --brand-blue: #86A1DB;
  --brand-light-blue: #B4DFFF;
  --brand-lime: #F7FFB2;
  --brand-peach: #FFDCA7;
  --brand-pink: #FFA3BF;
  --game-cream: #E7DCC9;
  --game-paper: #FFFDF8;
  --game-ink: #2A1E10;
  --game-teal: #1DB7B9;
  --game-teal-deep: #126D68;
  --game-teal-shadow: #0B4E4A;
  --game-orange: #F87523;
  --game-orange-shadow: #C85812;
  --game-yellow: #FFC31B;
  --game-yellow-shadow: #D89E00;
  --ink: var(--game-ink);
  --ink-strong: #1B1B1B;
  --ink-muted: #655B4C;
  --page: var(--game-cream);
  --surface: var(--game-paper);
  --surface-soft: #F5EBD9;
  --border: #B8A993;
  --primary: var(--game-teal-deep);
  --primary-hover: var(--game-teal-shadow);
  --secondary: #5D716D;
  --focus: var(--game-teal);
  --radius-lg: 1.5rem;
  --radius-md: 1rem;
  --radius-sm: .7rem;
  --shadow-hard: 0 .3rem 0 var(--game-teal-shadow);
  --shadow-strong: .38rem .38rem 0 var(--game-ink);
  --success: #28653c;
  --success-bg: #e8f5d1;
  --warning: #765313;
  --warning-bg: #fff0ca;
  --error: #8a2943;
  --error-bg: #ffe5ed;
  --disabled: #e3e6ed;
  --state-open: #28653c;
  --state-open-bg: var(--brand-lime);
  --state-closed: #5d4668;
  --state-closed-bg: var(--brand-pink);
  --state-scored: #72501b;
  --state-scored-bg: var(--brand-peach);
  --state-revealed: #244f85;
  --state-revealed-bg: var(--brand-light-blue);
  --state-finished: #273c70;
  --state-finished-bg: var(--brand-blue);
  background: var(--page);
  color: var(--ink);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { min-height: 100vh; margin: 0; background: radial-gradient(circle at top, #fffdf7, #fff3dc); }
a { color: #9b3511; font-weight: 700; }
h1 { margin: .25rem 0 1rem; font-size: clamp(2rem, 8vw, 3.4rem); line-height: 1; }
h2 { margin: .5rem 0; }
.shell { width: min(72rem, calc(100% - 2rem)); margin: 0 auto; padding: 2rem 0 4rem; }
.shell-narrow { width: min(32rem, calc(100% - 2rem)); min-height: 100vh; display: grid; align-items: center; }
.boot-card, .card { padding: clamp(1.25rem, 5vw, 2.5rem); border: 1px solid #f0dcc1; border-radius: 1.5rem; background: #fff; box-shadow: 0 1rem 3rem rgba(80, 42, 9, .10); }
.boot-card { width: min(36rem, calc(100% - 2rem)); position: absolute; inset: 50% auto auto 50%; transform: translate(-50%, -50%); }
.eyebrow { margin: 0 0 .5rem; color: #bd4b16; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.button, button { display: inline-block; min-height: 3rem; padding: .85rem 1.15rem; border: 0; border-radius: .85rem; background: #c94b16; color: #fff; font: inherit; font-weight: 800; text-decoration: none; cursor: pointer; }
.button-secondary { background: #5a4639; }
.topbar { min-height: 4rem; padding: .75rem max(1rem, calc((100% - 72rem) / 2)); display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: space-between; background: #2f1d13; color: #fff; }
.topbar a, .link-button { color: #fff; background: none; padding: 0; min-height: auto; }
.topbar form { margin: 0; }
.page-heading { display: flex; gap: 1rem; align-items: center; justify-content: space-between; margin-bottom: 1.25rem; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr)); gap: 1rem; }
.code { float: right; padding: .45rem .65rem; border-radius: .6rem; background: #fff0d0; font: 800 1.1rem ui-monospace, monospace; letter-spacing: .12em; }
.badge { padding: .25rem .5rem; border-radius: 99rem; background: #f1e6d7; font-size: .75rem; font-weight: 800; }
.stack { display: grid; gap: 1rem; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); gap: 1rem; }
label { display: grid; gap: .4rem; font-weight: 750; }
label small, .muted { color: #77665b; font-weight: 500; }
input, select { width: 100%; min-height: 3rem; padding: .7rem .8rem; border: 1px solid #cdbba9; border-radius: .7rem; background: #fff; color: inherit; font: inherit; }
input:focus, select:focus { outline: 3px solid #ffd48d; border-color: #b13e12; }
.checks { display: flex; flex-wrap: wrap; gap: 1rem; }
.checks label { display: flex; align-items: center; }
.checks input { width: 1.25rem; min-height: 1.25rem; }
.alert, .notice, .success { padding: .8rem 1rem; border-radius: .75rem; font-weight: 700; }
.alert { background: #ffe6df; color: #8b2612; }
.notice { background: #fff0d0; color: #62400e; }
.success { background: #e4f5e8; color: #185b2c; }
.field { display: grid; gap: .4rem; }
.field-title { display: flex; gap: .45rem; align-items: center; font-weight: 750; }
.field-help { position: relative; display: inline-block; }
.field-help summary { width: 1.35rem; height: 1.35rem; display: grid; place-items: center; border: 1px solid #bda892; border-radius: 50%; color: #7d4325; cursor: pointer; font: 800 .8rem/1 system-ui, sans-serif; list-style: none; }
.field-help summary::-webkit-details-marker { display: none; }
.field-help span { position: absolute; z-index: 5; left: 0; top: 1.7rem; width: min(18rem, 75vw); padding: .7rem .8rem; border-radius: .65rem; background: #2f1d13; color: #fff; box-shadow: 0 .6rem 1.5rem rgba(47,29,19,.2); font-size: .85rem; font-weight: 500; line-height: 1.4; }
.field-help[open] summary { background: #fff0d0; }
.check-help { display: flex; gap: .4rem; align-items: center; }
.join-link { margin: 1rem 0 1.5rem; padding: 1rem; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .75rem 1rem; align-items: center; border: 1px solid #e2c9a9; border-radius: 1rem; background: #fff8eb; }
.join-link p { margin: .35rem 0 0; overflow-wrap: anywhere; font-family: ui-monospace, monospace; font-size: .85rem; }
.copy-feedback { min-height: 1.2rem; color: #185b2c; font-weight: 800; grid-column: 2; text-align: center; }
.danger-zone { margin-top: 2rem; padding-top: 1rem; border-top: 1px solid #ead7c3; }
.danger { background: #8b2612; }
.balance { display: grid; gap: .25rem; margin: 1.5rem 0; padding: 1.25rem; border-radius: 1rem; background: #fff0d0; }
.balance strong { font-size: 2.5rem; }
.live-status { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1rem; margin-bottom: 1rem; background: #2f1d13; color: #fff; }
.live-status div { display: grid; gap: .3rem; }
.live-status strong { font-size: clamp(2rem,8vw,4rem); line-height: 1; }
.live-status small { min-height: 1.2rem; color: #ead7c3; }
.live-action { margin-top: 1rem; }
.control-grid { display: grid; gap: 1rem; }
.control-grid button, .live-action>form>button { width: 100%; min-height: 4rem; font-size: 1.2rem; }
.shell-player { width: min(42rem,calc(100% - 1rem)); padding: .5rem 0 2rem; }
.player-card { padding: clamp(1rem,4vw,2rem); }
.player-heading { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 1rem; align-items: start; }
.player-heading h1 { font-size: clamp(1.8rem,8vw,3rem); }
.player-heading .balance { margin: 0; min-width: 10rem; padding: .8rem 1rem; }
.player-heading .balance strong { font-size: 1.8rem; }
.player-balances { display: grid; grid-template-columns: repeat(3,minmax(7rem,1fr)); gap: .5rem; }
.pat-card { margin: 1rem 0; padding: 1rem; border: 2px solid #e6a42c; border-radius: 1rem; background: #fff8df; }
.pat-terms { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: .5rem; margin: 1rem 0; }
.pat-terms div { display: grid; gap: .2rem; padding: .7rem; border-radius: .7rem; background: #fff; }
.pat-terms span { color: #77665b; font-size: .72rem; font-weight: 800; text-transform: uppercase; }
.pat-terms strong { font-size: 1.35rem; }
.result-card { margin-top: 1rem; padding: 1rem; border-radius: 1rem; background: #e4f5e8; }
.result-details { display: grid; grid-template-columns: repeat(auto-fit,minmax(8rem,1fr)); gap: .5rem; }
.result-details div { display: grid; gap: .15rem; padding: .65rem; border-radius: .7rem; background: #fff; }
.result-details span { color: #77665b; font-size: .75rem; font-weight: 800; text-transform: uppercase; }
.round-strip, .bet-facts { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .65rem; margin: 1rem 0; }
.round-strip>div, .bet-facts>div { display: grid; gap: .15rem; padding: .8rem; border-radius: .85rem; background: #2f1d13; color: #fff; }
.round-strip span, .bet-facts span { font-size: .75rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: #ead7c3; }
.round-strip strong, .bet-facts strong { font-size: 1.25rem; }
.bet-facts { grid-template-columns: repeat(3,minmax(0,1fr)); }
.bet-facts>div { background: #fff0d0; color: #24170f; text-align: center; }
.bet-facts span { color: #79512c; }
.choice-grid { margin: 0; padding: 0; border: 0; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: .65rem; }
.choice-grid legend { width: 100%; margin-bottom: .5rem; font-weight: 800; }
.choice { position: relative; display: block; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice span { min-height: 3.5rem; display: grid; place-items: center; border: 2px solid #d8c1a4; border-radius: .9rem; background: #fff; font-weight: 900; cursor: pointer; }
.choice input:checked+span { border-color: #b53e12; background: #fff0d0; color: #8b2612; }
.choice input:focus-visible+span { outline: 3px solid #ffd48d; }
.choice input:disabled+span { cursor: not-allowed; opacity: .55; }
.wager-inputs { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .75rem; }
#wager-submit { width: 100%; min-height: 4rem; font-size: 1.15rem; }
.split-actions { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .75rem; }
.split-actions button { width: 100%; }
.preview-facts { display: flex; gap: .6rem; }
.preview-facts span { padding: .6rem .8rem; border-radius: .7rem; background: #fff0d0; }
.table-scroll { overflow-x: auto; margin: 1rem 0; }
.adjustment-preview { margin: 1rem 0; padding: 1rem; border: 2px solid #e6a42c; border-radius: 1rem; background: #fff8df; }
.adjustment-preview p { margin: .45rem 0; font-size: 1.05rem; }
.audit-list { display: grid; gap: .6rem; }
.audit-list details { padding: .8rem 1rem; border-radius: .8rem; background: #fff8eb; }
.audit-list summary { cursor: pointer; }
.audit-list code { white-space: pre-wrap; overflow-wrap: anywhere; }
.staff-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(16rem,1fr)); gap: 1rem; }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th,td { padding: .7rem; border-bottom: 1px solid #ead7c3; text-align: left; white-space: nowrap; }
th { color: #79512c; font-size: .75rem; text-transform: uppercase; }
.positive { color: #185b2c; font-weight: 800; }.negative { color: #8b2612; font-weight: 800; }
.role-awards { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .75rem; margin: 1rem 0; }
.role-awards div { display: grid; gap: .2rem; padding: 1rem; border-radius: .9rem; background: #fff0d0; }
.role-awards strong { font-size: 1.8rem; }
.leaderboard-shell { width: min(48rem,calc(100% - 1rem)); }
.leaderboard-list { margin: 1rem 0; padding: 0; display: grid; gap: .55rem; list-style: none; }
.leaderboard-row { display: grid; grid-template-columns: 3rem minmax(0,1fr) auto auto; gap: .75rem; align-items: center; padding: .85rem 1rem; border-radius: .9rem; background: #fff8eb; }
.leaderboard-row.current-player { outline: 3px solid #e6a42c; background: #fff0d0; }
.leaderboard-rank { font-size: 1.35rem; font-weight: 900; color: #9b3511; }
.leaderboard-score { font-size: 1.25rem; font-weight: 900; }
@media (max-width: 38rem) { .page-heading { align-items: flex-start; flex-direction: column; } .page-heading .button { width: 100%; text-align: center; } .topbar span { display: none; } .join-link { grid-template-columns: 1fr; } .join-link button { width: 100%; } .copy-feedback { grid-column: 1; } }
@media (max-width: 30rem) { .player-heading { grid-template-columns: 1fr; } .player-balances { grid-template-columns: 1fr; } .player-heading .balance { grid-template-columns: 1fr auto; align-items: center; } .pat-terms { grid-template-columns: 1fr; } .bet-facts { gap: .4rem; } .bet-facts>div { padding: .65rem .35rem; } }
.shared-body { min-height: 100vh; overflow-x: hidden; background: radial-gradient(circle at 20% 0,#fff9db,#f8c66c 55%,#cc5421 140%); }
.shared-fullscreen { position: fixed; z-index: 20; top: 0; right: 0; width: 3.5rem; height: 3.5rem; padding: 0; border: 0; border-radius: 0 0 0 .8rem; opacity: 0; background: #2f1d13; color: #fff; cursor: pointer; transition: opacity .15s ease; }
.shared-fullscreen span { position: absolute; top: .75rem; right: .75rem; width: max-content; padding: .5rem .7rem; border-radius: .55rem; background: #2f1d13; font-size: .8rem; font-weight: 800; transform: translateY(2.5rem); }
.shared-fullscreen:hover,.shared-fullscreen:focus-visible { width: 10.5rem; opacity: .92; outline: 3px solid #ffd48d; outline-offset: -3px; }
.shared-fullscreen:fullscreen { opacity: 0; }
.shared-screen { width: min(100%,100rem); min-height: 100vh; margin: 0 auto; padding: clamp(1rem,2.5vw,2.5rem); display: grid; align-content: start; gap: clamp(1rem,2vw,2rem); }
.shared-header { display: flex; justify-content: space-between; gap: 1rem; align-items: center; }
.shared-header h1 { margin: 0; font-size: clamp(2rem,4vw,4.5rem); }
.shared-code { padding: .7rem 1rem; border-radius: 1rem; background: #2f1d13; color: #fff; font: 900 clamp(1.2rem,2vw,2rem) ui-monospace,monospace; letter-spacing: .15em; }
.shared-layout { min-width: 0; display: grid; grid-template-columns: minmax(0,1.7fr) minmax(18rem,.8fr); gap: clamp(1rem,2vw,2rem); }
.shared-main,.shared-leaderboard { min-width: 0; }
.shared-stage,.shared-leaderboard { height: 100%; padding: clamp(1.25rem,3vw,3rem); border: 1px solid rgba(120,55,20,.18); border-radius: clamp(1.25rem,2vw,2rem); background: rgba(255,255,255,.94); box-shadow: 0 1.5rem 4rem rgba(91,43,12,.16); }
.shared-stage[data-state="BETTING_OPEN"] { outline: .45rem solid #299447; }
.shared-stage[data-state="BETTING_CLOSED"] { outline: .45rem solid #6b5b50; }
.shared-stage[data-state="REVEALED"],.shared-stage[data-state="FINISHED"] { outline: .45rem solid #e6a42c; }
.shared-kicker { margin: 0; color: #a83e16; font-size: clamp(1rem,1.6vw,1.5rem); font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.shared-stage>h2 { margin: .5rem 0; font-size: clamp(3rem,7vw,7rem); line-height: .95; }
.shared-subtitle { font-size: clamp(1.15rem,2vw,2rem); }
.shared-round-facts { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: .75rem; margin-top: 2rem; }
.shared-round-facts div,.shared-result,.shared-join { min-width: 0; display: grid; gap: .25rem; padding: clamp(.8rem,1.5vw,1.35rem); border-radius: 1rem; background: #fff0d0; }
.shared-round-facts span,.shared-result span,.shared-join span { color: #79512c; font-size: .8rem; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; }
.shared-round-facts strong { overflow-wrap: anywhere; font-size: clamp(1.1rem,2vw,2rem); }
.shared-result { margin-top: 1.5rem; grid-template-columns: 1fr auto; align-items: end; background: #e4f5e8; }
.shared-result strong { font-size: clamp(3rem,7vw,7rem); }.shared-result b { font-size: clamp(1.5rem,3vw,3rem); color: #185b2c; }
.shared-winners { margin-top: 1rem; }.shared-winners h3 { font-size: clamp(1.3rem,2vw,2rem); }.shared-winners>div { display: flex; flex-wrap: wrap; gap: .65rem; }.shared-winners>div>div { display: flex; gap: .7rem; padding: .7rem 1rem; border-radius: 99rem; background: #fff0d0; }
.shared-join { margin-top: 1.5rem; }.shared-join strong { overflow-wrap: anywhere; font-size: clamp(1rem,1.7vw,1.5rem); }
.shared-leaderboard>h2 { font-size: clamp(2rem,3vw,3.5rem); }.shared-leaderboard ol { margin: 1rem 0 0; padding: 0; display: grid; gap: .45rem; list-style: none; }.shared-leaderboard li { min-width: 0; display: grid; grid-template-columns: 2.5rem minmax(0,1fr) auto; gap: .7rem; padding: .65rem .8rem; border-radius: .8rem; background: #fff8eb; font-size: clamp(1rem,1.4vw,1.35rem); }.shared-leaderboard li span { color: #a83e16; font-weight: 900; }.shared-leaderboard li strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.shared-leaderboard li.shared-winner { outline: .2rem solid #e6a42c; background: #fff0d0; }
.shared-connection { min-height: 1.5rem; margin: 0; text-align: center; font-weight: 800; }
@media (max-width: 64rem) { .shared-layout { grid-template-columns: 1fr; } .shared-leaderboard { height: auto; } .shared-round-facts { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media (max-width: 38rem) { .shared-screen { padding: .75rem; } .shared-header { align-items: flex-start; } .shared-code { font-size: 1rem; } .shared-stage>h2 { font-size: clamp(2.5rem,14vw,4rem); } .shared-round-facts { grid-template-columns: 1fr 1fr; } .shared-result { grid-template-columns: 1fr; } }

/* Ready Bet Go v1 visual system */
body { color: var(--ink); background: linear-gradient(145deg, var(--page), #eef3ff 58%, #fff8ed); }
h1,h2,h3,.code,.shared-stage>h2 { color: var(--ink-strong); font-family: "Arial Rounded MT Bold", "Avenir Next", system-ui, sans-serif; letter-spacing: -.025em; }
a { color: var(--primary); text-underline-offset: .18em; }
a:hover { color: var(--primary-hover); }
.eyebrow { color: var(--primary); letter-spacing: .12em; }
.boot-card,.card { border: 1px solid var(--border); background: var(--surface); box-shadow: 0 1rem 2.5rem rgba(53,70,110,.12); }
.card { position: relative; overflow: clip; }
.button,button { border: 2px solid transparent; background: var(--primary); color: #fff; box-shadow: 0 .25rem 0 #263b6b; transition: transform .12s ease,background .12s ease,box-shadow .12s ease; }
.button:hover,button:hover { color: #fff; background: var(--primary-hover); transform: translateY(-1px); }
.button:active,button:active { transform: translateY(2px); box-shadow: none; }
.button-secondary { background: var(--secondary); box-shadow: 0 .25rem 0 #354054; }
button:focus-visible,.button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,summary:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
button:disabled,input:disabled,select:disabled { color: #666d7a; background: var(--disabled); box-shadow: none; cursor: not-allowed; opacity: .78; }
.topbar { background: var(--ink-strong); border-bottom: .35rem solid var(--brand-blue); }
.topbar strong { letter-spacing: .04em; }
.topbar a,.link-button { color: #fff; }
.code { color: var(--ink-strong); background: var(--brand-lime); border: 2px solid #c5ce70; }
.badge { color: var(--ink-strong); background: var(--surface-soft); border: 1px solid var(--border); }
.badge-active { background: var(--state-open-bg); border-color: #a8b85c; }
.badge-finished { color: #fff; background: var(--state-finished); border-color: var(--state-finished); }
.badge-archived { background: var(--disabled); }
.game-card { min-height: 15rem; }
.game-actions { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.game-actions .button { padding: .55rem .8rem; min-height: 2.45rem; }
input,select,textarea { border: 2px solid var(--border); background: var(--surface); color: var(--ink); }
input:focus,select:focus,textarea:focus { border-color: var(--primary); outline: 3px solid rgba(134,161,219,.45); }
label small,.muted { color: var(--ink-muted); }
.alert,.notice,.success { border: 2px solid currentColor; }
.alert { color: var(--error); background: var(--error-bg); }
.notice { color: var(--warning); background: var(--warning-bg); }
.success { color: var(--success); background: var(--success-bg); }
.danger { background: var(--error); box-shadow: 0 .25rem 0 #5f182d; }
.join-link,.audit-list details,.leaderboard-row { border: 1px solid var(--border); background: var(--surface-soft); }
.balance { border: 2px solid #c5ce70; background: var(--brand-lime); }
.player-card { border-radius: 2rem; }
.player-heading { padding-top: .3rem; }
.player-balances .balance:nth-child(1) { background: var(--brand-lime); }
.player-balances .balance:nth-child(2) { background: var(--brand-light-blue); border-color: #81bce5; }
.player-balances .balance:nth-child(3) { background: var(--brand-pink); border-color: #db7897; }
.round-strip>div { background: var(--ink-strong); border: 2px solid var(--brand-blue); }
.round-strip span { color: #dce7ff; }
[data-game-state="BETTING_OPEN"] .round-strip>div:last-child { color: var(--state-open); background: var(--state-open-bg); border-color: var(--state-open); }
[data-game-state="BETTING_CLOSED"] .round-strip>div:last-child,[data-game-state="RESULT_ENTERED"] .round-strip>div:last-child,[data-game-state="SCORED"] .round-strip>div:last-child { color: var(--state-closed); background: var(--state-closed-bg); border-color: var(--state-closed); }
[data-game-state="REVEALED"] .round-strip>div:last-child { color: var(--state-revealed); background: var(--state-revealed-bg); border-color: var(--state-revealed); }
.bet-facts>div { color: var(--ink); background: var(--brand-peach); border: 2px solid #d6aa68; }
.bet-facts>div:first-child { background: var(--brand-light-blue); border-color: #81bce5; transform: scale(1.03); }
.bet-facts span { color: var(--ink-muted); }
.choice span { min-height: 4.25rem; color: var(--ink-strong); border-width: 3px; box-shadow: 0 .22rem 0 var(--border); }
.choice:nth-of-type(1) span::before { content: "↑"; margin-right: .4rem; }
.choice:nth-of-type(2) span::before { content: "↓"; margin-right: .4rem; }
.choice:nth-of-type(3) span::before { content: "="; margin-right: .4rem; }
.choice:nth-of-type(1) span { border-color: var(--brand-blue); background: #f4f7ff; }
.choice:nth-of-type(2) span { border-color: var(--brand-pink); background: #fff4f7; }
.choice:nth-of-type(3) span { border-color: #d6aa68; background: #fff9eb; }
.choice input:checked+span { color: var(--ink-strong); border-color: var(--ink-strong); background: var(--brand-lime); box-shadow: 0 .3rem 0 var(--ink-strong); transform: translateY(-2px); }
#wager-submit { background: var(--primary); font-size: 1.3rem; }
.pat-card { border: 3px solid #d6aa68; background: linear-gradient(135deg,var(--brand-peach),#fff8e8); box-shadow: .45rem .45rem 0 rgba(255,163,191,.55); }
.pat-card .eyebrow { color: #76421f; }
.pat-terms div { border: 1px solid #d6aa68; }
#pat-borrow { color: var(--ink-strong); background: var(--brand-pink); box-shadow: 0 .25rem 0 #ba637d; }
.result-card { border: 3px solid var(--state-revealed); background: var(--state-revealed-bg); }
.leaderboard-shell .card { background: linear-gradient(180deg,#fff,var(--surface-soft)); }
.leaderboard-row:nth-child(1) { background: var(--brand-lime); }
.leaderboard-row:nth-child(2) { background: var(--brand-light-blue); }
.leaderboard-row:nth-child(3) { background: var(--brand-peach); }
.leaderboard-row.current-player { outline: 3px solid var(--focus); background: var(--brand-pink); }
.leaderboard-rank { color: var(--primary-hover); }
.live-status { background: var(--ink-strong); border: .3rem solid var(--brand-blue); }
.live-action { border-left: .55rem solid var(--brand-blue); }
.role-awards div,.preview-facts span,.adjustment-preview { background: var(--brand-peach); border-color: #d6aa68; }
th { color: var(--primary-hover); background: var(--surface-soft); }
th,td { border-bottom-color: var(--border); }
.positive { color: var(--success); }.negative { color: var(--error); }

.shared-body { background: var(--ink-strong); }
.shared-screen { width: min(100%,120rem); background: radial-gradient(circle at 8% 5%,rgba(180,223,255,.38),transparent 28%),linear-gradient(135deg,#f8faff 0 48%,#fff4e2 48%); }
.shared-header { padding: .6rem 1rem; border-radius: 1.2rem; background: var(--brand-blue); border: .25rem solid var(--ink-strong); box-shadow: .45rem .45rem 0 var(--ink-strong); }
.shared-header .eyebrow { color: var(--ink-strong); }
.shared-code { color: var(--ink-strong); background: var(--brand-lime); border: .2rem solid var(--ink-strong); }
.shared-stage,.shared-leaderboard { border: .25rem solid var(--ink-strong); box-shadow: .6rem .6rem 0 var(--ink-strong); }
.shared-stage { background: var(--surface); }
.shared-stage[data-state="WAITING"],.shared-stage[data-state="SETUP"] { border-top: 1rem solid var(--brand-blue); }
.shared-stage[data-state="BETTING_OPEN"] { outline: none; border-top: 1rem solid var(--state-open); background: linear-gradient(145deg,var(--surface),var(--state-open-bg)); }
.shared-stage[data-state="BETTING_CLOSED"] { outline: none; border-top: 1rem solid var(--state-closed); background: linear-gradient(145deg,var(--surface),#fff0f5); }
.shared-stage[data-state="REVEALED"] { outline: none; border-top: 1rem solid var(--state-revealed); background: linear-gradient(145deg,var(--surface),var(--state-revealed-bg)); }
.shared-stage[data-state="FINISHED"] { outline: none; border-top: 1rem solid var(--state-finished); background: linear-gradient(145deg,var(--surface),var(--brand-peach)); }
.shared-kicker { color: var(--primary-hover); }
.shared-round-facts div,.shared-join { color: var(--ink); background: var(--brand-peach); border: 2px solid #d6aa68; }
.shared-round-facts div:nth-child(2) { background: var(--brand-pink); border-color: #db7897; }
.shared-round-facts div:nth-child(3) { background: var(--brand-light-blue); border-color: #81bce5; }
.shared-result { color: var(--ink); background: var(--brand-lime); border: 3px solid var(--state-open); }
.shared-result b { color: var(--state-open); }
.shared-leaderboard { background: var(--brand-light-blue); }
.shared-leaderboard li { border: 2px solid var(--border); background: var(--surface); }
.shared-leaderboard li.shared-winner { outline: .25rem solid var(--ink-strong); background: var(--brand-lime); }
.shared-fullscreen { background: var(--ink-strong); }
.shared-fullscreen:hover,.shared-fullscreen:focus-visible { outline-color: var(--brand-lime); }

@media (max-width: 48rem) {
  .topbar { justify-content: flex-start; }
  .topbar form { margin-left: auto; }
  .live-status { grid-template-columns: 1fr; }
  .game-actions { line-height: 2; }
}
@media (max-width: 30rem) {
  .shell-player { width: min(100% - .75rem,42rem); }
  .player-card { border-radius: 1.25rem; }
  .choice-grid { gap: .35rem; }
  .choice span { min-height: 4rem; padding: .35rem; font-size: .88rem; }
  .wager-inputs,.split-actions { grid-template-columns: 1fr; }
  .leaderboard-row { grid-template-columns: 2.25rem minmax(0,1fr) auto; padding: .75rem; }
  .leaderboard-row small { grid-column: 2; }
}
@media (prefers-reduced-motion: reduce) { *,*::before,*::after { scroll-behavior: auto!important; transition: none!important; } }

/* Player dashboard hierarchy refinement. Intentionally scoped to this surface. */
.shell-player { width: min(46rem,calc(100% - 1rem)); }
body:has(.shell-player) { background: radial-gradient(circle at 50% -10%,#fff 0,var(--surface-soft) 42%,#f8f2ff 100%); }
.shell-player .player-card { padding: clamp(.9rem,3vw,1.5rem); border: 1px solid rgba(64,93,157,.18); border-radius: 1.65rem; background: rgba(255,255,255,.92); box-shadow: 0 .6rem 0 rgba(134,161,219,.28),0 1rem 2.5rem rgba(48,63,99,.12); }
.shell-player .player-heading { display: flex; justify-content: space-between; gap: 1rem; align-items: baseline; padding: .15rem 0 .6rem; border-bottom: 1px solid rgba(98,106,125,.2); }
.shell-player .player-heading h1 { margin: 0; font-size: clamp(1.35rem,5vw,2rem); line-height: 1.1; }
.shell-player .player-identity { max-width: 45%; overflow: hidden; color: var(--ink-muted); font-size: 1rem; text-overflow: ellipsis; white-space: nowrap; }
.shell-player .round-strip { display: flex; justify-content: space-between; gap: 1rem; margin: .45rem 0; padding: .42rem .15rem; border: 0; border-radius: 0; background: transparent; }
.shell-player .round-strip>div { display: flex; gap: .4rem; align-items: center; padding: 0; border: 0; background: transparent; color: var(--ink); }
.shell-player .round-strip span { color: var(--ink-muted); }
.shell-player .round-strip strong { font-size: .9rem; letter-spacing: .025em; text-transform: uppercase; }
.shell-player .state-dot { width: .65rem; height: .65rem; flex: 0 0 auto; border: 2px solid currentColor; border-radius: 50%; background: transparent; }
.shell-player[data-game-state="BETTING_OPEN"] .round-strip>div:last-child,.shell-player[data-game-state="BETTING_CLOSED"] .round-strip>div:last-child,.shell-player[data-game-state="RESULT_ENTERED"] .round-strip>div:last-child,.shell-player[data-game-state="SCORED"] .round-strip>div:last-child,.shell-player[data-game-state="REVEALED"] .round-strip>div:last-child { border: 0; background: transparent; }
.shell-player[data-game-state="BETTING_OPEN"] .state-dot { background: var(--state-open); }
.shell-player[data-game-state="BETTING_CLOSED"] .state-dot,.shell-player[data-game-state="RESULT_ENTERED"] .state-dot,.shell-player[data-game-state="SCORED"] .state-dot { background: var(--state-closed); }
.shell-player[data-game-state="REVEALED"] .state-dot { background: var(--state-revealed); }
.shell-player #wager-message { display: inline-block; max-width: 100%; margin: .05rem 0 .55rem; padding: .25rem 0; border: 0; border-radius: 0; background: transparent; font-family: system-ui,sans-serif; font-size: .8rem; }
.shell-player #wager-message.success { color: var(--success); }
.shell-player #wager-message.notice { color: var(--warning); }
.shell-player #wager-message.alert { padding: .35rem .5rem; border-left: .3rem solid currentColor; background: var(--error-bg); }
.shell-player .wager-panel { margin-top: .1rem; padding: .65rem; border: 0; border-radius: 1.25rem; background: linear-gradient(155deg,rgba(180,223,255,.2),rgba(247,255,178,.12) 55%,rgba(255,163,191,.1)); box-shadow: inset 0 1px 0 rgba(255,255,255,.9); }
.shell-player .tony-callout { position: relative; margin: 0 0 .9rem; padding: .7rem .75rem .65rem; overflow: hidden; border: 0; border-radius: 1.15rem; background: var(--brand-light-blue); text-align: center; box-shadow: 0 .38rem 0 #86bddd,0 .7rem 1rem rgba(64,93,157,.14); }
.shell-player .tony-callout::after { content: ""; position: absolute; width: 4rem; height: 4rem; right: -1.4rem; top: -1.7rem; border-radius: 50%; background: var(--brand-pink); opacity: .65; }
.shell-player .tony-callout>span { position: relative; z-index: 1; color: var(--primary-hover); font-size: .78rem; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.shell-player .tony-callout>strong { position: relative; z-index: 1; display: block; width: fit-content; min-width: 2em; margin: .08rem auto .3rem; padding: 0 .2em; border: 0; background: transparent; color: var(--ink-strong); font-size: clamp(3.2rem,14vw,5.2rem); line-height: .95; letter-spacing: .01em; text-shadow: 0 .08em 0 rgba(255,255,255,.62); box-shadow: none; }
.shell-player .bet-limits { position: relative; z-index: 1; display: flex; justify-content: center; gap: .5rem; max-width: 22rem; margin: 0 auto; color: var(--ink-muted); font-family: system-ui,sans-serif; font-size: .78rem; }
.shell-player .bet-limits span+span::before { content: "•"; margin-right: .5rem; color: var(--primary); }
.shell-player .bet-limits b { color: var(--ink); }
.shell-player .choice-grid { gap: .55rem; }
.shell-player .choice-grid legend { margin-bottom: .4rem; font-size: 1rem; }
.shell-player .choice span { position: relative; min-height: 4.35rem; display: flex; gap: .25rem; flex-direction: column; border: 2px solid rgba(18,24,42,.3); border-radius: 1rem; background: var(--surface); box-shadow: 0 .38rem 0 rgba(18,24,42,.32),0 .55rem .8rem rgba(47,71,125,.12),inset 0 2px 0 rgba(255,255,255,.52); transition: transform .1s ease,box-shadow .1s ease,filter .1s ease; }
.shell-player .choice:nth-of-type(1) span { background: var(--brand-lime); }
.shell-player .choice:nth-of-type(2) span { background: var(--brand-pink); }
.shell-player .choice:nth-of-type(3) span { background: var(--brand-peach); }
.shell-player .choice span::before { margin: 0!important; font-size: 1.65rem; line-height: 1; }
.shell-player .choice span::after { display: none; }
.shell-player .choice:hover span { transform: translateY(-2px); box-shadow: 0 .5rem 0 rgba(18,24,42,.34),0 .7rem 1rem rgba(47,71,125,.16),inset 0 2px 0 rgba(255,255,255,.58); filter: saturate(1.08); }
.shell-player .choice:active span { transform: translateY(.3rem); box-shadow: 0 .08rem 0 rgba(18,24,42,.35),inset 0 2px 0 rgba(255,255,255,.45); }
.shell-player .choice input:checked+span { border: 3px solid var(--ink-strong); color: var(--ink-strong); box-shadow: 0 .5rem 0 var(--primary-hover),0 .75rem 1rem rgba(47,71,125,.18),inset 0 2px 0 rgba(255,255,255,.6); transform: translateY(-2px); filter: saturate(1.15); }
.shell-player .choice input:checked+span::after { content: "✓"; position: absolute; top: .38rem; right: .38rem; width: 1.15rem; height: 1.15rem; display: grid; place-items: center; border-radius: .4rem; background: var(--ink-strong); color: #fff; font: 800 .72rem/1 system-ui,sans-serif; }
.shell-player .choice input:focus-visible+span { outline: 4px solid var(--focus); outline-offset: 3px; }
.shell-player .choice input:disabled+span { transform: none; border-color: var(--border); background: var(--disabled); box-shadow: 0 .2rem 0 var(--border); filter: grayscale(.4); }
.shell-player .wager-inputs { gap: .65rem; }
.shell-player .wager-inputs label { font-family: system-ui,sans-serif; font-size: .85rem; font-weight: 750; }
.shell-player .wager-inputs input { margin-top: .25rem; border: 2px solid rgba(64,93,157,.28); border-radius: .8rem; background: rgba(255,255,255,.86); font: 800 1.08rem system-ui,sans-serif; box-shadow: inset 0 .12rem .25rem rgba(64,93,157,.1),0 .18rem 0 rgba(134,161,219,.22); }
.shell-player .wager-amount { color: var(--primary-hover); }
.shell-player .wager-amount input { border-color: var(--primary); background: #f7f9ff; }
.shell-player #wager-submit { min-height: 3.8rem; margin: .15rem 0 .3rem; border: 2px solid rgba(18,24,42,.3); border-radius: 1rem; background: var(--brand-blue); color: var(--ink-strong); font-size: 1.25rem; box-shadow: 0 .45rem 0 var(--primary-hover),0 .7rem 1rem rgba(47,71,125,.18),inset 0 2px 0 rgba(255,255,255,.38); }
.shell-player #wager-submit:hover { background: #95afe4; transform: translateY(-2px); box-shadow: 0 .58rem 0 var(--primary-hover),0 .85rem 1.2rem rgba(47,71,125,.2),inset 0 2px 0 rgba(255,255,255,.45); }
.shell-player #wager-submit:active { transform: translateY(.35rem); box-shadow: 0 .08rem 0 var(--primary-hover),inset 0 2px 0 rgba(255,255,255,.28); }
.shell-player #wager-submit:focus-visible { outline: 4px solid var(--focus); outline-offset: 3px; }
.shell-player #wager-submit:disabled { border-color: var(--ink-muted); background: var(--disabled); color: var(--ink-muted); box-shadow: none; transform: none; }
.shell-player .player-balances { margin: .85rem 0 .35rem; padding: .55rem .35rem; border: 0; border-radius: .9rem; background: rgba(180,223,255,.2); }
.shell-player .player-balances .balance { min-width: 0; margin: 0; padding: .4rem .25rem; border: 0; border-radius: 0; background: transparent; text-align: center; }
.shell-player .player-balances .balance + .balance { border-left: 1px solid rgba(64,93,157,.2); }
.shell-player .player-balances .balance span { color: var(--ink-muted); font-family: system-ui,sans-serif; font-size: .64rem; font-weight: 800; letter-spacing: .045em; text-transform: uppercase; }
.shell-player .player-balances .balance strong { font: 900 1.2rem/1.1 ui-monospace,"SFMono-Regular",Consolas,monospace; }
.shell-player:not(.has-pat-debt) .balance-debt { opacity: .55; }
.shell-player.has-pat-debt .balance-debt strong { color: var(--error); }
.shell-player .player-footer { display: flex; justify-content: space-between; gap: 1rem; align-items: center; margin-top: .6rem; }
.shell-player .player-footer p { margin: 0; font-size: .75rem; }
.shell-player .player-leaderboard-link { color: var(--primary-hover); font-size: .9rem; font-weight: 800; text-decoration-thickness: .1em; text-underline-offset: .2em; }
.shell-player .player-leaderboard-link:hover { color: var(--ink-strong); }

/* Player reference design: scoped palette and mobile game-controller treatment. */
.shell-player {
  width: min(30rem,calc(100% - 1rem));
  --player-orange: #F87523;
  --player-orange-deep: #C85812;
  --player-yellow: #FFC31B;
  --player-yellow-deep: #D89E00;
  --player-cream: #E7DCC9;
  --player-paper: #FFFDF8;
  --player-teal: #1DB7B9;
  --player-teal-deep: #0E8688;
  --player-deep-teal: #126D68;
  --player-deep-teal-2: #0B4E4A;
  --player-ink: #2A1E10;
}
body:has(.shell-player) { background: var(--player-cream); }
.shell-player .player-card { padding: clamp(1rem,4vw,1.35rem); border: 4px solid var(--player-ink); border-radius: 2rem; background: #F5EBD9; box-shadow: 0 .55rem 0 var(--player-ink); }
.shell-player .player-heading { padding: .15rem 0 .55rem; border: 0; }
.shell-player .player-heading h1 { color: var(--player-ink); font-size: clamp(1.65rem,7vw,2.2rem); }
.shell-player .player-identity { max-width: 42%; padding: .4rem .7rem; overflow: hidden; border-radius: 99rem; background: var(--player-ink); color: #FFF7E8; font: 800 .85rem/1 system-ui,sans-serif; text-overflow: ellipsis; white-space: nowrap; }
.shell-player .round-strip { justify-content: flex-start; gap: .38rem; margin: 0 0 .55rem; padding: 0 .1rem; color: var(--player-deep-teal); font-family: system-ui,sans-serif; }
.shell-player .round-strip span { color: inherit; font-size: .85rem; font-weight: 800; }
.shell-player .round-strip strong { color: inherit; font-size: .85rem; letter-spacing: 0; }
.shell-player .state-dot { width: .62rem; height: .62rem; border: 2px solid var(--player-deep-teal); background: var(--player-teal); }
.shell-player[data-game-state="BETTING_CLOSED"] .state-dot,.shell-player[data-game-state="RESULT_ENTERED"] .state-dot,.shell-player[data-game-state="SCORED"] .state-dot { border-color: var(--error); background: var(--brand-pink); }
.shell-player #wager-message { display: block; margin: .2rem 0 .75rem; padding: .65rem .75rem; border: 2px solid var(--player-deep-teal); border-radius: .8rem; background: var(--player-paper); color: var(--player-deep-teal); font-size: .8rem; line-height: 1.25; }
.shell-player #wager-message.alert { border-left-width: 2px; background: var(--error-bg); color: var(--error); }
.shell-player .wager-panel { padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.shell-player .tony-callout { margin-bottom: .95rem; padding: .8rem .75rem .75rem; overflow: visible; border: 4px solid var(--player-ink); border-radius: 1.4rem; background: var(--player-orange); box-shadow: 0 .48rem 0 var(--player-orange-deep); }
.shell-player .tony-callout::after { display: none; }
.shell-player .tony-callout>span { display: inline-block; padding: .38rem .75rem; border-radius: 99rem; background: var(--player-ink); color: var(--player-yellow); font: 900 .8rem/1 system-ui,sans-serif; letter-spacing: .02em; text-transform: none; }
.shell-player .tony-callout>strong { margin: .12rem auto .2rem; padding: 0; color: var(--player-yellow); font-size: clamp(4.75rem,23vw,7rem); line-height: .95; letter-spacing: -.04em; -webkit-text-stroke: 3px var(--player-ink); paint-order: stroke fill; text-shadow: .06em .06em 0 var(--player-ink); }
.shell-player .bet-limits { width: fit-content; padding: .38rem .7rem; border: 3px solid var(--player-ink); border-radius: 99rem; background: var(--player-paper); color: var(--player-ink); font-size: .75rem; }
.shell-player .bet-limits span+span::before { color: var(--player-orange-deep); }
.shell-player .bet-limits b { color: var(--player-ink); }
.shell-player .choice-grid { gap: .55rem; }
.shell-player .choice-grid legend { margin-bottom: .5rem; color: var(--player-ink); font-size: 1.2rem; }
.shell-player .choice span { min-height: 4.65rem; border: 3px solid var(--player-ink); border-radius: 1rem; background: var(--player-paper)!important; color: var(--player-ink); box-shadow: none; }
.shell-player .choice span::before { font-size: 1.7rem; }
.shell-player .choice:nth-of-type(1) span::before { content: "▲"; }
.shell-player .choice:nth-of-type(2) span::before { content: "▼"; }
.shell-player .choice:hover span { transform: translateY(-2px); box-shadow: 0 .25rem 0 rgba(42,30,16,.42); filter: none; }
.shell-player .choice:active span { transform: translateY(.3rem); box-shadow: none; }
.shell-player .choice input:checked+span { border: 4px solid var(--player-ink); background: var(--player-teal)!important; box-shadow: .34rem .34rem 0 var(--player-ink); transform: translate(-2px,-2px); filter: none; }
.shell-player .choice input:checked+span::after { top: .34rem; right: .34rem; width: 1.15rem; height: 1.15rem; border-radius: 50%; background: var(--player-ink); }
.shell-player .choice input:focus-visible+span { outline: 4px solid var(--player-yellow); outline-offset: 3px; }
.shell-player .choice input:disabled+span { border-color: #887d6d; background: #DDD4C5!important; box-shadow: none; opacity: .65; }
.shell-player .wager-inputs label { color: var(--player-deep-teal); font-size: .9rem; }
.shell-player .wager-inputs input { min-height: 3.35rem; padding: .75rem .8rem; border: 3px solid var(--player-ink); border-radius: 1rem; background: var(--player-paper); color: var(--player-ink); font-size: 1.15rem; box-shadow: none; }
.shell-player .wager-inputs input:focus { border-color: var(--player-deep-teal); outline: 4px solid rgba(29,183,185,.35); }
.shell-player .wager-amount { color: var(--player-deep-teal); }
.shell-player .wager-amount input { background: var(--player-paper); }
.shell-player #wager-submit { min-height: 4rem; margin: .2rem 0 .4rem; border: 4px solid var(--player-ink); border-radius: 1.15rem; background: var(--player-yellow); color: var(--player-ink); font-size: 1.3rem; box-shadow: 0 .48rem 0 var(--player-yellow-deep); }
.shell-player #wager-submit:hover { background: #FFD34F; transform: translateY(-2px); box-shadow: 0 .6rem 0 var(--player-yellow-deep); }
.shell-player #wager-submit:active { transform: translateY(.4rem); box-shadow: 0 .08rem 0 var(--player-yellow-deep); }
.shell-player #wager-submit:focus-visible { outline: 4px solid var(--player-teal); outline-offset: 3px; }
.shell-player #wager-submit:disabled { border-color: #887d6d; background: #D8CEBB; color: #776C5C; box-shadow: 0 .2rem 0 #9E917D; }
.shell-player .player-balances { margin: .95rem 0 .55rem; padding: .75rem .35rem; border: 3px solid var(--player-ink); border-radius: 1.1rem; background: var(--player-deep-teal); box-shadow: 0 .3rem 0 var(--player-deep-teal-2); }
.shell-player .player-balances .balance { display: flex; flex-direction: column; gap: .18rem; color: #fff; }
.shell-player .player-balances .balance + .balance { border-left: 1px solid rgba(255,255,255,.35); }
.shell-player .player-balances .balance strong { color: var(--player-yellow); font-size: 1.3rem; }
.shell-player .player-balances .balance span { color: #fff; font-size: .66rem; letter-spacing: 0; text-transform: none; }
.shell-player:not(.has-pat-debt) .balance-debt { opacity: .65; }
.shell-player.has-pat-debt .balance-debt { opacity: 1; }
.shell-player.has-pat-debt .balance-debt strong { color: var(--brand-pink); }
.shell-player .player-footer { margin-top: .7rem; }
.shell-player .player-footer p { color: var(--player-deep-teal); font-size: .78rem; }
.shell-player .player-leaderboard-link { color: var(--player-orange-deep); font-size: .85rem; text-transform: none; }
.shell-player .player-leaderboard-link:hover { color: var(--player-ink); }
.shell-player .pat-card { border-color: var(--player-ink); border-radius: 1.25rem; background: var(--brand-peach); box-shadow: 0 .35rem 0 var(--player-orange-deep); }
.shell-player .result-card { border-color: var(--player-deep-teal); border-radius: 1.25rem; }

@media (max-width: 30rem) {
  .shell-player .player-heading { align-items: center; }
  .shell-player .player-heading h1 { min-width: 0; overflow-wrap: anywhere; }
  .shell-player .player-identity { max-width: 40%; }
  .shell-player .choice-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .shell-player .choice span { min-height: 4.15rem; padding: .35rem .15rem; font-size: .78rem; }
  .shell-player .wager-inputs { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .shell-player .wager-inputs input { padding: .65rem .55rem; }
  .shell-player .player-balances { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .shell-player .player-footer { align-items: center; flex-direction: row; gap: .5rem; }
}

/* Approved Ready Bet Go visual system across staff, reporting, and public surfaces. */
body:not(.shared-body):not(:has(.shell-player)) { background: var(--game-cream); }
.topbar { min-height: 4.25rem; gap: .65rem 1rem; border: 0; border-bottom: 4px solid var(--game-ink); background: var(--game-teal-deep); box-shadow: 0 .28rem 0 var(--game-teal-shadow); }
.topbar strong { color: var(--game-yellow); font-family: "Arial Rounded MT Bold","Avenir Next",system-ui,sans-serif; font-size: 1.15rem; }
.topbar a { padding: .35rem .55rem; border-radius: var(--radius-sm); color: #fff; text-decoration: none; }
.topbar a:hover,.topbar a:focus-visible { background: rgba(255,255,255,.16); color: var(--game-yellow); }
.topbar .link-button { color: #fff; text-decoration: underline; box-shadow: none; }
.shell:not(.shell-player) { padding-top: 2.25rem; }
.page-heading { padding-bottom: .8rem; border-bottom: 3px solid var(--game-ink); }
.page-heading h1 { margin-bottom: .25rem; }
.eyebrow { color: var(--game-teal-deep); }
.boot-card,.card { border: 2px solid var(--game-ink); border-radius: var(--radius-lg); background: var(--game-paper); box-shadow: var(--shadow-hard); }
.card { overflow: visible; }
.button,button { border: 3px solid var(--game-ink); border-radius: var(--radius-md); background: var(--game-yellow); color: var(--game-ink); box-shadow: 0 .32rem 0 var(--game-yellow-shadow); font-weight: 900; }
.button:hover,button:hover { background: #FFD34F; color: var(--game-ink); transform: translateY(-2px); box-shadow: 0 .44rem 0 var(--game-yellow-shadow); }
.button:active,button:active { transform: translateY(.28rem); box-shadow: 0 .06rem 0 var(--game-yellow-shadow); }
.button-secondary { border-color: var(--game-teal-deep); background: var(--game-paper); color: var(--game-teal-deep); box-shadow: 0 .24rem 0 var(--game-teal-shadow); }
.button-secondary:hover { background: #D9F4F1; color: var(--game-ink); box-shadow: 0 .34rem 0 var(--game-teal-shadow); }
.danger { border-color: #551525; background: var(--error); color: #fff; box-shadow: 0 .3rem 0 #551525; }
.danger:hover { background: #A83A55; color: #fff; box-shadow: 0 .42rem 0 #551525; }
button:disabled,.button[aria-disabled="true"],input:disabled,select:disabled { border-color: #8C8171; background: #D8CEBB; color: #706657; box-shadow: 0 .12rem 0 #A99C88; opacity: 1; }
.code { border: 3px solid var(--game-ink); border-radius: 99rem; background: var(--game-yellow); box-shadow: 0 .2rem 0 var(--game-yellow-shadow); }
.badge { padding: .3rem .6rem; border: 2px solid var(--game-ink); background: var(--surface-soft); }
.badge-active { background: var(--game-teal); }
.badge-finished { background: var(--game-teal-deep); color: #fff; }
.badge-archived { border-color: #817767; background: #D8CEBB; color: #655C4F; }
.game-grid { align-items: stretch; }
.game-card { border-width: 3px; box-shadow: 0 .35rem 0 var(--game-teal-shadow); }
.game-card h2 { padding-right: 5rem; }
.game-card.game-status-active { background: #E8F8F2; }
.game-card.game-status-finished,.game-card.game-status-archived { filter: saturate(.55); box-shadow: 0 .2rem 0 #8F8372; }
.game-card.game-status-archived { opacity: .74; }
.game-actions { padding-top: .8rem; border-top: 1px solid var(--border); line-height: 1.7; }
.game-actions .button { background: var(--game-yellow); color: var(--game-ink); }
input,select,textarea { border: 2px solid var(--game-ink); border-radius: var(--radius-sm); background: var(--game-paper); }
input:focus,select:focus,textarea:focus { border-color: var(--game-teal-deep); outline: 4px solid rgba(29,183,185,.32); }
label { color: var(--game-teal-deep); }
.field-help summary { border: 2px solid var(--game-teal-deep); color: var(--game-teal-deep); }
.field-help span { background: var(--game-ink); }
.join-link { border: 2px solid var(--game-teal-deep); background: #E9F8F5; }
.alert,.notice,.success { border-width: 2px; border-radius: var(--radius-md); }
.success { color: var(--success); background: #E8F5DF; }
.notice { color: var(--warning); background: #FFF1C5; }
.alert { color: var(--error); background: var(--error-bg); }
.table-scroll { border: 2px solid var(--game-ink); border-radius: var(--radius-md); background: var(--game-paper); }
table { background: var(--game-paper); }
th { color: #fff; background: var(--game-teal-deep); }
th,td { border-bottom: 1px solid #CDBFA9; }
tbody tr:nth-child(even) { background: #F7EEDF; }
tbody tr:hover { background: #E5F6F2; }
.audit-list details { border: 1px solid var(--border); background: #F8EEDD; }
.audit-list summary { color: var(--game-teal-deep); font-weight: 900; }
.adjustment-preview { border: 3px solid var(--game-orange-shadow); background: #FFE0B2; box-shadow: 0 .3rem 0 var(--game-orange-shadow); }
.preview-facts span,.role-awards div { border: 2px solid var(--game-ink); background: #FFE0B2; }
.role-awards div:nth-child(2) { background: #D7F3F1; }
.leaderboard-shell { width: min(52rem,calc(100% - 1rem)); }
.leaderboard-shell .card { background: #F5EBD9; }
.leaderboard-row { border: 2px solid var(--game-ink); border-radius: var(--radius-md); background: var(--game-paper); box-shadow: 0 .18rem 0 #A99A84; }
.leaderboard-row:nth-child(1) { background: var(--game-yellow); }
.leaderboard-row:nth-child(2) { background: #D6F2F0; }
.leaderboard-row:nth-child(3) { background: #FFE0B2; }
.leaderboard-row.current-player { outline: 4px solid var(--game-orange); background: #FFF1C5; }
.leaderboard-rank { color: var(--game-orange-shadow); font-size: 1.55rem; }
.leaderboard-score { color: var(--game-teal-deep); font-size: 1.35rem; }
.host-screen .live-status { border: 4px solid var(--game-ink); border-radius: var(--radius-lg); background: var(--game-teal-deep); box-shadow: 0 .38rem 0 var(--game-teal-shadow); }
.host-screen .live-status .eyebrow,.host-screen .live-status small { color: #D8F5F1; }
.host-screen .live-status strong { color: var(--game-yellow); }
.host-screen[data-round-status="BETTING_OPEN"] .live-status { background: var(--game-teal); }
.host-screen[data-round-status="BETTING_OPEN"] .live-status strong,.host-screen[data-round-status="BETTING_OPEN"] .live-status .eyebrow { color: var(--game-ink); }
.host-screen[data-round-status="BETTING_CLOSED"] .live-status,.host-screen[data-round-status="RESULT_ENTERED"] .live-status { background: var(--game-orange); }
.host-screen[data-round-status="SCORED"] .live-status { background: var(--game-yellow); }
.host-screen[data-round-status="SCORED"] .live-status strong,.host-screen[data-round-status="SCORED"] .live-status .eyebrow { color: var(--game-ink); }
.host-screen .live-action { border-left: 0; }
.host-screen .live-action>.control-grid>form>button,.host-screen .live-action>.control-grid>.split-actions button,.host-screen .live-action>form>button { font-size: 1.25rem; }
.host-screen .control-grid label:first-child,.host-screen form[action$="/configure"] .form-grid label:nth-child(-n+2) { padding: .75rem; border: 2px solid var(--game-teal-deep); border-radius: var(--radius-md); background: #DDF5F2; }
.danger-zone { border: 2px solid var(--error); background: #FFF0F2; }

.shared-body { background: var(--game-cream); }
.shared-screen { background: radial-gradient(circle at 10% 0,#FFFDF8,transparent 32%),var(--game-cream); }
.shared-header { border: 4px solid var(--game-ink); border-radius: 1.5rem; background: var(--game-orange); box-shadow: .5rem .5rem 0 var(--game-orange-shadow); }
.shared-header .eyebrow { color: var(--game-ink); }
.shared-code { border: 3px solid var(--game-ink); border-radius: 99rem; background: var(--game-yellow); color: var(--game-ink); }
.shared-stage,.shared-leaderboard { border: 4px solid var(--game-ink); border-radius: 1.75rem; box-shadow: .55rem .55rem 0 var(--game-ink); }
.shared-stage { background: var(--game-paper); }
.shared-stage[data-state="WAITING"],.shared-stage[data-state="SETUP"] { border-top-color: var(--game-teal); }
.shared-stage[data-state="BETTING_OPEN"] { border-top-color: var(--game-teal); background: #E2F7F3; }
.shared-stage[data-state="BETTING_CLOSED"] { border-top-color: var(--game-orange); background: #FFF0DB; }
.shared-stage[data-state="REVEALED"] { border-top-color: var(--game-yellow); background: #FFF6D6; }
.shared-stage[data-state="FINISHED"] { border-top-color: var(--game-teal-deep); background: #DDF3EF; }
.shared-kicker { color: var(--game-teal-deep); }
.shared-round-facts div { border: 3px solid var(--game-ink); background: #FFE0B2; }
.shared-round-facts div:nth-child(2) { background: #FFD2DE; }
.shared-round-facts div:nth-child(3) { background: #D6F2F0; }
.shared-round-facts div:nth-child(4) { background: var(--game-yellow); }
.shared-result { border: 4px solid var(--game-ink); background: var(--game-yellow); }
.shared-result b { color: var(--game-teal-deep); }
.shared-join { border: 3px solid var(--game-ink); background: var(--game-orange); }
.shared-leaderboard { background: var(--game-teal); }
.shared-leaderboard li { border: 2px solid var(--game-ink); background: var(--game-paper); }
.shared-leaderboard li.shared-winner { outline-color: var(--game-ink); background: var(--game-yellow); }
.shared-fullscreen { background: var(--game-ink); }
.shared-fullscreen:hover,.shared-fullscreen:focus-visible { outline-color: var(--game-yellow); }

@media (max-width: 48rem) {
  .topbar { align-items: center; }
  .topbar a { padding: .45rem; }
  .page-heading { align-items: flex-start; }
  .game-card { min-height: auto; }
  .host-screen .control-grid button { min-height: 3.5rem; }
}

/* Host controller: compact, phone-friendly operational hierarchy. */
.host-shell { padding-top: 1.25rem!important; }
.host-heading { margin-bottom: .75rem; padding-bottom: .55rem; align-items: center; }
.host-heading .eyebrow { display: inline; margin-right: .45rem; }
.host-heading h1 { display: inline; margin: 0; font-size: clamp(1.55rem,4vw,2.35rem); }
.host-heading .code { padding: .35rem .6rem; font-size: .95rem; }
.host-screen .live-status { min-height: 0; margin-bottom: .75rem; padding: .65rem 1rem; display: flex; justify-content: space-between; gap: .75rem; align-items: center; border-width: 3px; border-radius: var(--radius-md); box-shadow: 0 .25rem 0 var(--game-teal-shadow); }
.host-screen .live-status>div { display: flex; gap: .38rem; align-items: baseline; }
.host-screen .live-status span,.host-screen .live-status strong,.host-screen .live-status small { color: #fff; }
.host-screen .live-status strong { font-size: 1rem; line-height: 1.1; text-transform: uppercase; }
.host-screen .live-status small { min-height: 0; font-size: .72rem; }
.host-screen .host-state { justify-content: flex-end; flex-wrap: wrap; }
.host-screen .host-state i { width: .65rem; height: .65rem; flex: 0 0 auto; align-self: center; border: 2px solid currentColor; border-radius: 50%; background: var(--game-yellow); }
.host-screen .host-state small { flex-basis: 100%; text-align: right; }
.host-screen[data-round-status="BETTING_OPEN"] .host-state i { background: var(--game-yellow); }
.host-screen[data-round-status="BETTING_CLOSED"] .host-state i,.host-screen[data-round-status="RESULT_ENTERED"] .host-state i { background: #fff; }
.host-screen[data-round-status="SCORED"] .live-status span,.host-screen[data-round-status="SCORED"] .live-status strong,.host-screen[data-round-status="SCORED"] .live-status small { color: var(--game-ink); }
.host-screen .card { margin-bottom: .75rem; padding: clamp(.85rem,2.2vw,1.35rem); }
.host-screen .card h2 { margin-top: 0; }
.host-screen .card>p.muted { margin: .35rem 0 .75rem; font-size: .86rem; }
.host-screen form[action$="/configure"] .form-grid { grid-template-columns: repeat(6,minmax(0,1fr)); gap: .65rem; }
.host-screen form[action$="/configure"] .form-grid label:nth-child(1),.host-screen form[action$="/configure"] .form-grid label:nth-child(2) { grid-column: span 2; }
.host-screen form[action$="/configure"] .form-grid label:nth-child(3) { grid-column: span 2; padding: .75rem; border: 2px solid var(--game-orange-shadow); border-radius: var(--radius-md); background: #FFE6C2; }
.host-screen form[action$="/configure"] .form-grid label:nth-child(4),.host-screen form[action$="/configure"] .form-grid label:nth-child(5) { grid-column: span 3; color: var(--ink-muted); }
.host-screen form[action$="/configure"]>button,.host-screen .live-action .control-grid button { min-height: 3.6rem; width: 100%; }

/* Shared presentation: viewport-constrained 16:9 composition. */
.shared-screen { height: 100vh; min-height: 0; padding: clamp(.65rem,1.4vw,1.4rem); grid-template-rows: auto minmax(0,1fr) auto; gap: clamp(.6rem,1.1vw,1.1rem); overflow: hidden; }
.shared-header { min-height: 0; padding: clamp(.4rem,.8vw,.75rem) clamp(.7rem,1.2vw,1.2rem); border-width: 3px; border-radius: 1.15rem; box-shadow: .3rem .3rem 0 var(--game-orange-shadow); }
.shared-header h1 { font-size: clamp(1.7rem,3vw,3.25rem); line-height: 1; }
.shared-header .eyebrow { margin-bottom: .2rem; font-size: clamp(.65rem,.8vw,.85rem); }
.shared-code { padding: .45rem .75rem; font-size: clamp(1rem,1.5vw,1.45rem); }
.shared-layout { min-height: 0; grid-template-columns: minmax(0,2fr) minmax(16rem,.72fr); gap: clamp(.6rem,1.1vw,1.1rem); }
.shared-main,.shared-leaderboard { min-height: 0; }
.shared-stage,.shared-leaderboard { min-height: 0; padding: clamp(.8rem,1.7vw,1.75rem); border-width: 3px; border-radius: 1.35rem; box-shadow: .35rem .35rem 0 var(--game-ink); overflow: hidden; }
.shared-stage { display: flex; flex-direction: column; }
.shared-stage>h2 { margin: .25rem 0; font-size: clamp(2.4rem,min(6vw,10vh),6rem); }
.shared-subtitle { margin: .35rem 0; font-size: clamp(1rem,1.6vw,1.55rem); }
.shared-round-facts { margin-top: auto; gap: .5rem; }
.shared-round-facts div,.shared-result,.shared-join { padding: clamp(.55rem,1vw,.9rem); border-width: 2px; border-radius: .8rem; }
.shared-round-facts span,.shared-result span,.shared-join span { font-size: clamp(.62rem,.7vw,.76rem); }
.shared-round-facts strong { font-size: clamp(.95rem,1.5vw,1.45rem); }
.shared-result { margin-top: .65rem; }
.shared-result strong { font-size: clamp(2.5rem,min(6vw,9vh),5.5rem); }
.shared-result b { font-size: clamp(1.25rem,2.3vw,2.4rem); }
.shared-winners { margin-top: .5rem; }
.shared-winners h3 { margin: .25rem 0; font-size: clamp(1.05rem,1.4vw,1.45rem); }
.shared-winners>div { gap: .4rem; }
.shared-winners>div>div { padding: .4rem .65rem; }
.shared-winners p { margin: .35rem 0 0; }
.shared-join { margin-top: auto; }
.shared-leaderboard>h2 { margin: .15rem 0 .45rem; font-size: clamp(1.6rem,2.25vw,2.45rem); }
.shared-leaderboard ol { margin-top: .35rem; gap: clamp(.2rem,.45vh,.38rem); }
.shared-leaderboard li { grid-template-columns: 1.7rem minmax(0,1fr) auto auto; gap: .4rem; padding: clamp(.28rem,.5vh,.46rem) .55rem; border-radius: .6rem; font-size: clamp(.76rem,min(1vw,1.65vh),1.05rem); }
.shared-leaderboard li .pats-fave { padding: .14rem .35rem; border: 1px solid var(--game-ink); border-radius: 99rem; background: var(--game-orange); color: var(--game-ink); font-size: .62em; font-weight: 900; white-space: nowrap; }
.shared-connection { min-height: .8rem; margin: 0; font-size: .75rem; }

@media (max-width: 48rem) {
  .host-heading { align-items: center; flex-direction: row; }
  .host-heading>div:first-child { min-width: 0; }
  .host-heading h1 { display: block; overflow: hidden; font-size: 1.55rem; text-overflow: ellipsis; white-space: nowrap; }
  .host-screen .live-status { align-items: center; }
  .host-screen form[action$="/configure"] .form-grid { grid-template-columns: 1fr; }
  .host-screen form[action$="/configure"] .form-grid label:nth-child(n) { grid-column: auto; }
}
@media (max-width: 27rem) {
  .host-shell { width: min(100% - .75rem,72rem); }
  .host-screen .topbar { gap: .35rem; font-size: .78rem; }
  .host-screen .live-status { padding: .55rem .65rem; }
  .host-screen .host-round-context { flex-wrap: wrap; }
  .host-screen .host-state small { display: none; }
}
