/* Original Japanese fantasy illustration. Motion and result geometry stay in race-motion. */
#announcer { position: fixed; top: 0; left: 0; }
body[data-screen="entrance"] .site-shell { display: flex; flex-direction: column; min-height: 100svh; }
body[data-screen="entrance"] .site-header { flex-shrink: 0; }
body[data-screen="entrance"] .entrance-main { flex: 1; min-height: auto; }
:root {
  --bg: #0e1729;
  --surface: #19263c;
  --surface-raised: #22334d;
  --line: #b8cae521;
  --text: #f1f4fa;
  --muted: #aabbd1;
  --gold: #ebd19b;
  --green: #9bdcce;
  --red: #efa6af;
}
.illustrated-art { object-fit: contain; display: block; }
.brand-chip { background: #ebd19b; color: #24364d; border-color: #f4e6c7; box-shadow: none; }
.primary { background: #ebd19b; border-color: #f4e6c7; }
.secondary { background: #253751; }
.input { background: #101d30; }
/* Single-line native fields need room for the font, including the larger desktop type. */
.input, #create-form .input { padding-block: 0; }
.property-art { background: radial-gradient(ellipse at 50% 75%,color-mix(in srgb,var(--property-color) 22%,transparent),transparent 68%),#142138; }
.hero-world, .entrance-world { background: #152b4a; }
.hero-world::after { background: linear-gradient(90deg,#10213ce8,#10213cab 30%,#10213c10 58%,transparent); }
.hero-art { filter: none; object-position: 70% 40%; }
.entrance-world>img { filter: none; object-position: 76% 42%; }
.hero-copy h1 span { color: #f2dba9; }
.hero-copy>p:not(.eyebrow) { color: #e3ebf7; text-shadow: 0 1px 4px #10213c; }
.game-card { border-color: #b8cae521; }
.game-card-art { background: radial-gradient(ellipse at 50% 40%,#33506955,transparent 75%),#17253b; }
.game-card-art::before, .game-card-art::after { opacity: .18; }
.game-card-art>.game-art { filter: none; }
.game-card-art>.illustrated-art { padding: 3px; }
.game-card-rocket .game-card-art>.illustrated-art { transform: rotate(18deg); }
.game-card-tower .game-card-art>.illustrated-art { padding: 0; }

/* A quiet illustrated surface keeps live cards, pips and results readable. */
.slot-stage, .roulette-stage, .felt-stage, .card-table, .coin-stage,
.number-stage, .limbo-stage, .tower-stage, .pinball-cabinet, .ticket-stage {
  background: #183b4f url('/assets/japan-table-v3.webp') center / 100% 100% no-repeat;
  border-color: #9eb8c447;
  box-shadow: none;
}
.stage-caption, .card-hand>small, .dice-total, .tower-die>span { color: #cfdfec; }
.stage-caption b, .hand-total, .tower-die strong { color: #f6e8c8; }
.stage-speck { color: #ebd19b; filter: none; }

.slot-cabinet {
  background: linear-gradient(#142b433d,#142b433d),#192b43 url('/assets/japan-card-back-v3.webp') center / 100% 100% no-repeat;
  border: 2px solid #c1a977;
  box-shadow: 0 4px 0 #101e30, inset 0 0 0 3px #91acbe30;
}
.slot-marquee { color: #f1ddb4; text-shadow: 0 1px 3px #101d30; }
.slot-reels { background: #12243b; border-color: #22384d; box-shadow: 0 0 0 1px #c1a977; }
.reel-window { background: linear-gradient(#e1dfd8,#fffcf1 27%,#fffcf1 70%,#e1dfd8); box-shadow: none; }
.reel-window::after { background: linear-gradient(#29405826,transparent 23%,transparent 77%,#29405826); }
.reel-symbol .game-art { filter: none; }
.slot-bottom { color: #f1ddb4; }
.slot-bottom i { background: #d8c496; box-shadow: none; }
.wheel-wrap { background: linear-gradient(145deg,#eddbad,#a89066); box-shadow: 0 0 0 2px #1b2a40; filter: none; }
.wheel {
  border-color: #1b2a40;
  background: conic-gradient(#bd657b 0deg 20deg,#647eae 20deg 40deg,#bd657b 40deg 60deg,#647eae 60deg 80deg,#bd657b 80deg 100deg,#647eae 100deg 120deg,#bd657b 120deg 140deg,#647eae 140deg 160deg,#bd657b 160deg 180deg,#647eae 180deg 200deg,#bd657b 200deg 220deg,#647eae 220deg 240deg,#bd657b 240deg 260deg,#647eae 260deg 280deg,#bd657b 280deg 300deg,#647eae 300deg 320deg,#d7bb78 320deg 360deg);
  box-shadow: inset 0 0 0 2px #fff6df70;
}
.wheel b { background: #24364d url('/assets/japan-chip-v3.webp') center / 110% 110% no-repeat; border-color: #ead5a8; font-size: 0; color: transparent; box-shadow: none; }
.wheel-mark { color: #fff7e8; }
.wheel-pointer { border-top-color: #f6e8c8; filter: drop-shadow(0 2px 0 #1b2a40); }

.die-face { background: linear-gradient(135deg,#fffdf4,#eee6d8); border: 1px solid #97a7b3; box-shadow: inset 0 0 0 2px #fffcf4; }
.die-face i { background: #344558; box-shadow: none; }
.die-shadow { background: #101d3555; filter: blur(3px); }
.playing-card { background: linear-gradient(145deg,#fffdf4,#f1eadb); color: #243c51; border-color: #faf7ed; box-shadow: 0 2px 0 #abb9c4,0 4px 8px #0e1b3426; }
.playing-card.red-card { color: #b85871; }
.duel-back, .playing-card.card-back,
.card-table.revealing:not(.duel-table) .card-hand:first-child .playing-card:not(.card-back)::after {
  background: #192b43 url('/assets/japan-card-back-v3.webp') center / 100% 100% no-repeat;
  border-color: #e5d6b7;
  box-shadow: 0 2px 0 #8c9baa;
}
.duel-back::before { content: none; }
.duel-back>span, .playing-card.card-back>span, .playing-card.card-back>i { visibility: hidden; }
.card-table.revealing:not(.duel-table) .card-hand:first-child .playing-card:not(.card-back)::after { font-size: 0; }
.physical-duel.decided .card-hand.winner .duel-front { box-shadow: 0 0 0 2px #ebd19b; }
.blackjack-explanation { background: #20374b; border-color: #829ab344; }
.blackjack-explanation strong, .blackjack-explanation p { color: #edf5fa; }
.blackjack-explanation .card-sum, .blackjack-explanation small { color: #bed3e1; }
.blackjack-explanation.busted { background: #4b3042; border-color: #efa6af66; }

.coin-face { border-color: #c6ad79; outline-color: #21334b; box-shadow: inset 0 0 0 2px #9f8457,inset 0 0 0 5px #f4e4bd; }
.coin-sun { background: radial-gradient(circle at 35% 30%,#fff6dd,#e3c58b 65%,#b49360); color: #806338; text-shadow: none; }
.coin-moon { background: radial-gradient(circle at 35% 30%,#ecf4fa,#9ebbd0 65%,#6e90af); color: #3d5b80; border-color: #bfd2e2; outline-color: #21334b; text-shadow: none; box-shadow: inset 0 0 0 2px #698ba7,inset 0 0 0 5px #dae8f2; }
.coin-edge { background: #b9c4cb; border-color: #667f97; }
.coin-scene .coin-shadow { background: #10213b55; filter: blur(3px); }
.coin-orbit { border-color: #c8d6e73d; box-shadow: none; }

.treasure-table { background: #174457 url('/assets/japan-vault-v3.webp') center / cover no-repeat; border-color: #90c9c65c; }
.treasure-info strong { color: #c2f1e6; }
.treasure-info>span:last-child { color: #d8ebef; }
.treasure-info>.game-art, .mine-cell .game-art { filter: none; }
.mine-cell { background: linear-gradient(145deg,#2d5270,#193b55); border: 1px solid #afc7cf; box-shadow: inset 0 0 0 3px #c6ad7933,0 2px 0 #15283f; color: #e9d8ae; }
.mine-cell .tile-seal { color: #e9d8ae; opacity: .85; }
.mine-cell:hover:enabled { background: #39627d; }
.mine-cell.opened { background: #94d7cd29; border-color: #a1e2d7; }
.mine-cell.trap { background: #663247; border-color: #efa6af; color: #ffe2dc; }
.mine-cell.flipping::after { background: #284b66; color: #e9d8ae; }
.treasure-table.revealing .mine-cell.trap:not(.exposed) { background: #284b66; border-color: #afc7cf; }
.treasure-table.revealing .mine-cell.trap:not(.exposed)::after { color: #e9d8ae; }

.rocket-stage { background: #1b3462 url('/assets/japan-orbit-v3.webp') center / cover no-repeat; border-color: #adc3df55; color: #b0e4d6; }
.rocket-grid, .space-orbit { display: none; }
.rocket-ship { filter: none; }
.flight-readout { padding: 12px 16px; border: 1px solid #afc7e335; border-radius: 10px; background: #142c4cdd; }
.flight-readout .eyebrow, .rocket-label { color: #dbe7f5; }
.flight-readout strong { color: #faf1d9; text-shadow: none; }
.physical-rocket.impact { background: linear-gradient(#932e422b,#932e422b),url('/assets/japan-orbit-v3.webp') center / cover no-repeat; }
.rocket-burst { background: radial-gradient(circle,#fff6df 0 15%,#ead3a3 16% 31%,#d98b7f 32% 47%,transparent 48%); }
.rocket-fragment { background: #e8c18e; box-shadow: none; }

.tower-floors { position: relative; background: url('/assets/japan-tower-v3.webp') -35px center / 170px 100% no-repeat; perspective: none; padding: 7px 0; gap: 9px; }
.tower-floor { transform: none; margin-left: 93px; padding: 5px 7px; min-height: 34px; background: #193a51de; color: #c7d8e5; border: 1px solid #a6bdca78; border-radius: 5px; box-shadow: none; }
.tower-floor.reached { color: #b7ecdb; background: #28505b; border-color: #90cbbd; }
.tower-floor.current { color: #f6e8c8; background: #405063; border-color: #e8cc91; box-shadow: none; }
.tower-floor>.game-art { position: absolute; left: -35px; top: 3px; width: 29px; height: 29px; filter: none; }
.tower-roll { filter: none; }
.tower-floor b { font-variant-numeric: tabular-nums; }
.tower-floor.awaiting-floor { background: #193a51de; color: #c7d8e5; border-color: #a6bdca78; }

.pinball-rail { fill: #253e60aa; stroke: #99b7d0; }
.pinball-launch { stroke: #ead5a8; }
.pin-stud { fill: #9bbdce; stroke: #eef4f5; stroke-width: .6; filter: none; }
.pinball-ball { fill: #e6c88d; stroke: #fff6df; stroke-width: 1; }
.pin-pocket rect { fill: #3b587c; stroke: #a8bfd4; }
.pin-pocket path { stroke: #a8bfd4; }
.pin-pocket text { fill: #f1f4fa; }
.pin-pocket[data-bin="0"] rect, .pin-pocket[data-bin="8"] rect { fill: #835565; }
.pin-pocket[data-bin="1"] rect, .pin-pocket[data-bin="7"] rect { fill: #64658b; }
.pin-pocket.landed rect { fill: #e6c88d; stroke: #fff6df; }
.pin-pocket.landed text { fill: #24364d; }
.draw-balls span { background: linear-gradient(135deg,#fffdf4,#eadfc9); color: #344c68; box-shadow: 0 2px 0 #7f95ae; }
.number-cell { background: #375779; color: #e9f0f7; border-color: #95b0cc; box-shadow: 0 2px 0 #1b304d; }
.number-cell.selected { background: #e6c88d; color: #24364d; border-color: #fff6df; }
.number-cell.drawn { background: #496f82; border-color: #9bdcce; box-shadow: inset 0 0 0 1px #9bdcce; }
.number-cell.selected.drawn { background: #a5dbcb; color: #253e51; }
.number-cell span { color: inherit; }
.limbo-number { background: none; color: #faf1d9; }
.limbo-ring { box-shadow: none; border-color: #91accd; }
.limbo-stage.cleared .limbo-number { filter: none; color: #b7ecdb; }
.sort-chip { box-shadow: inset 0 0 0 2px #f6e8c880; }

.ticket-stage { color: #f6e8c8; }
.ticket-heading small, .annuity-direction { color: #c7d8ec; }
.lottery-ball, .lottery-ball.settled { background: linear-gradient(145deg,#fff6df,#e2c58b); color: #344c68; border-color: #fff6df; box-shadow: 0 2px 0 #7f95ae; }
.constellation-drum { border-color: #c7d8ec55; box-shadow: none; }
.scratch-card { background: #243b5d; border: 1px solid #d5bf91; box-shadow: 0 3px 0 #17243c,inset 0 0 0 3px #d5bf9129; }
.scratch-card-heading, .scratch-card-heading small, .scratch-card-footer { color: #f6e8c8; }
.scratch-coating { background: repeating-linear-gradient(125deg,#cbd9e7 0 3px,#e3ebf3 3px 6px); color: #596c86; text-shadow: none; }
.scratch-token { background: #e6c88d; color: #24364d; border-color: #fff6df; box-shadow: 0 2px 0 #24364d; }
.ticket-digit { background: #fff6df; border-color: #afc9d8; color: #34516b; box-shadow: 0 2px 0 #647f9a; }
.ticket-digit.matched { background: #a5dbcb; color: #253e51; border-color: #edf9f2; }

@media(max-width:600px) {
  .hero-art { object-position: 66% 40%; }
  .hero-world::after { background: linear-gradient(90deg,#10213ce8,#10213c77 65%,#10213c22); }
  .tower-floors { background-size: 126px 100%; background-position: -31px center; }
  .tower-floor { margin-left: 70px; padding: 5px; min-height: 32px; }
  .tower-floor>.game-art { left: -27px; width: 24px; height: 24px; }
  .tower-floor b { font-size: 11px; }
}
.slot-grid-stage { --slot-cell: 66px; min-height: 320px; padding: 14px; }
.slot-grid-stage .slot-cabinet { width: min(370px,100%); padding: 13px 18px 12px; border-radius: 20px; }
.slot-grid-stage .slot-marquee { margin: 0 0 10px; font-size: 13px; letter-spacing: 4px; }
.slot-grid-board { position: relative; }
.slot-grid-stage .slot-reels { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 5px; padding: 5px; border-radius: 9px; }
.slot-grid-stage .reel-window { height: calc(var(--slot-cell)*3); position: relative; overflow: hidden; border-radius: 5px; }
.slot-grid-stage .reel-strip { height: calc(var(--slot-cell)*5); transform: translateY(calc(var(--reel-position,1)*var(--slot-cell)*-1)); animation: none!important; }
.slot-grid-stage .reel-symbol { height: var(--slot-cell); position: relative; border-bottom: 1px solid #a7957130; }
.slot-grid-stage .reel-symbol .game-art { width: 55px; height: 55px; }
.slot-grid-stage .reel-symbol.winning-symbol { background: #ffe6a54f; box-shadow: inset 0 0 0 2px #d7a94b80; }
.slot-grid-stage .slot-bottom { margin: 9px 0 7px; min-height: 14px; font-size: 9px; letter-spacing: 1px; }
.slot-win-lines { position: absolute; inset: 5px; width: calc(100% - 10px); height: calc(100% - 10px); z-index: 2; pointer-events: none; }
.slot-win-lines polyline { fill: none; stroke: #dba351; stroke-width: 2; opacity: 0; filter: drop-shadow(0 1px 1px #fff5d0); }
.slot-win-lines polyline.active { opacity: .85; }
.slot-line-legend { display: flex; justify-content: center; gap: 4px; }
.slot-line-legend span { padding: 3px 5px; border: 1px solid #f4d39525; border-radius: 4px; color: #c7c2c0; font-size: 9px; line-height: 1.2; white-space: nowrap; }
.slot-line-legend .hit { background: #f3d296; border-color: #f3d296; color: #382b36; }
.slot-paytable { display: block; line-height: 1.8; margin: 10px 0 0; }
.slot-paytable small { display: block; color: #b4c6ce; font-size: 10px; }
@media(min-width:1101px) {
  #room-side>aside { max-height: calc(100svh - 330px); display: flex; flex-direction: column; gap: 12px; }
  #room-side .sidebar { min-height: 160px; display: flex; flex-direction: column; overflow: hidden; }
  #room-side .side-heading { flex-shrink: 0; }
  #room-side .sidebar .player-list { min-height: 0; max-height: calc(100svh - 570px); overflow-y: auto; }
  #room-side .recent-feed { margin-top: 0; flex-shrink: 0; }
  .final-panel { padding: 24px; }
  .final-panel .trophy { font-size: 42px; margin: 0; }
  .final-panel h2 { margin: 8px 0; }
  .final-panel .winner-amount { font-size: 44px; }
  .final-board { max-height: max(180px,calc(100svh - 700px)); overflow-y: auto; overscroll-behavior: contain; margin: 20px auto; }
  .final-board .player-row { padding: 10px 0; }
}
@media(max-width:600px) {
  .slot-grid-stage { --slot-cell: 51px; min-height: 260px; padding: 10px; }
  .slot-grid-stage .slot-cabinet { padding: 10px; }
  .slot-grid-stage .slot-marquee { font-size: 11px; margin-bottom: 8px; }
  .slot-grid-stage .reel-symbol .game-art { width: 43px; height: 43px; }
  .slot-grid-stage .slot-bottom { font-size: 8px; }
  .slot-line-legend { gap: 3px; }
  .slot-line-legend span { padding: 3px; font-size: 8px; }
  .slot-paytable { font-size: 9px; }
  .slot-paytable small { font-size: 9px; }
}

/* One champion; the rest of the field stays in a compact, scrollable standings list. */
body[data-screen="room"][data-phase="finished"] .final-panel { max-width: 1080px; padding: 24px; text-align: left; }
.final-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 20px; }
.final-heading .eyebrow { margin: 0; color: var(--gold); font-size: 10px; }
.final-heading>span { color: var(--muted); font-size: 12px; }
.final-grid { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1.1fr); gap: 24px; }
.champion-card { display: flex; flex-direction: column; justify-content: center; align-items: center; min-width: 0; padding: 30px 20px; border: 1px solid #e8c87f70; border-radius: 14px; text-align: center; background: radial-gradient(ellipse at 50% 15%,#e5c57c20,transparent 70%),#142137; }
.champion-crown { color: #f2d58f; font-size: 68px; line-height: 1; text-shadow: 0 5px 22px #e7c26d30; }
.champion-label { margin: 16px 0 10px; color: var(--gold); font-size: 11px; font-weight: 800; letter-spacing: 2px; }
.final-panel .champion-card h2 { margin: 0 0 28px; max-width: 100%; font-size: clamp(25px,2.3vw,36px); line-height: 1.4; overflow-wrap: anywhere; }
.champion-card h2 small,.final-name small { display: inline-block; margin-left: 7px; font-size: 10px; vertical-align: middle; padding: 2px 5px; border-radius: 4px; color: var(--green); background: #9bdcce14; }
.champion-asset-label { margin: 0 0 6px; font-size: 11px; color: var(--muted); }
.final-panel .winner-amount { max-width: 100%; margin: 0; color: #ffe7b0; font-size: clamp(26px,2.7vw,42px); font-weight: 850; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; line-height: 1.25; }
.final-panel .winner-amount small { margin-left: 7px; font-size: 13px; color: var(--muted); font-weight: 500; }
.champion-profit { margin: 12px 0 0; color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.final-standings { min-width: 0; }
.final-standings-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 4px 12px 12px; border-bottom: 1px solid var(--line); }
.final-standings-heading h3 { margin: 0; font-size: 14px; }
.final-standings-heading>span { font-size: 11px; color: var(--muted); }
.final-panel .final-board { width: 100%; max-width: none; max-height: min(420px,calc(100svh - 465px)); min-height: 120px; margin: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #57657b transparent; }
.final-row { display: grid; grid-template-columns: 27px minmax(0,1fr) minmax(0,1.1fr); gap: 9px; align-items: center; min-height: 37px; padding: 8px 12px; border-bottom: 1px solid #b8cae510; font-size: 12px; }
.final-row.me { background: #9bdcce0e; border-radius: 6px; }
.final-rank { color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.final-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.final-row>strong { min-width: 0; text-align: right; font-size: 12px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.final-row>strong small { margin-left: 4px; color: var(--muted); font-size: 9px; font-weight: 400; }
.final-row.left { opacity: .55; }
.final-tie-rule,.final-solo { margin: 10px 12px 0; color: var(--muted); font-size: 11px; }
.final-panel .final-settlements { display: flex; gap: 18px; max-width: none; margin: 18px 0 0; padding: 12px 16px; }
.final-settlements>strong { flex-shrink: 0; font-size: 11px; color: var(--muted); padding-top: 3px; }
.final-settlements>div { min-width: 0; }
.final-settlements p { overflow-wrap: anywhere; }
.final-actions { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); }
.final-actions .button { margin: 0; font-size: 13px; min-height: 46px; }
.final-actions .stake-help,.final-actions>p { margin: 0; font-size: 11px; color: var(--muted); }
.player-row.assets-only { display: grid; grid-template-columns: 30px minmax(0,1fr) auto; gap: 8px; min-height: 42px; padding: 9px 8px; align-items: center; }
.player-row.assets-only .live-rank { color: var(--muted); font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; text-align: center; }
.player-row.assets-only .live-rank small { font-size: 8px; margin-left: 2px; font-weight: 400; }
.player-row.assets-only .player-name { min-width: 0; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.player-row.assets-only .player-name small { margin-left: 5px; color: var(--green); font-size: 9px; }
.player-row.assets-only .player-money { display: block; min-width: 0; max-width: 124px; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.player-row.assets-only.leader { min-height: 48px; background: #ebd19b13; border: 1px solid #ebd19b50; border-radius: 8px; box-shadow: none; margin-bottom: 3px; }
.player-row.assets-only.leader .live-rank { color: #ffe4a6; font-size: 16px; }
.player-row.assets-only.leader .player-name { color: #ffe4a6; font-weight: 800; }
.sidebar .player-list { padding-right: 6px; scrollbar-gutter: stable; scrollbar-color: #667791 transparent; }
.final-rank { white-space: nowrap; }
.final-row>strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Keep a readable standings column at the 1080p baseline, then grow both columns together. */
@media(min-width:1440px) {
  .site-shell, body[data-screen="lobby"] .site-shell { max-width: clamp(1760px,87.5vw,2880px); }
  body[data-screen="room"]:not([data-phase="finished"]) .room-layout { grid-template-columns: minmax(0,1fr) clamp(320px,16.67vw,440px); }
}
@media(min-width:1921px) {
  .site-shell, body[data-screen="lobby"] .site-shell { padding-inline: clamp(32px,1.67vw,64px); }
  .site-header, body[data-screen="lobby"] .site-header { height: clamp(76px,3.96vw,104px); }
  .room-layout { gap: clamp(20px,1.04vw,36px); }
  .room-heading { padding-block: clamp(12px,.625vw,20px); }
  .room-heading h1, .arena-head h2, .property-heading h2 { font-size: clamp(24px,1.25vw,32px); }
  .race-banner { padding: clamp(12px,.625vw,20px) clamp(20px,1.04vw,32px); margin-bottom: clamp(14px,.73vw,24px); }
  .countdown { font-size: clamp(32px,1.67vw,44px); }
  .bank-stats b { font-size: clamp(25px,1.3vw,36px); }
  .room-mode-bar>button { min-height: clamp(38px,1.98vw,54px); font-size: clamp(14px,.73vw,18px); }
  .game-tab { min-height: clamp(40px,2.08vw,56px); }
  .game-tab span { font-size: clamp(12px,.625vw,16px); }
  .game-tab .game-art { width: clamp(24px,1.25vw,34px); height: clamp(24px,1.25vw,34px); }
  .arena { grid-template-columns: minmax(0,1fr) clamp(280px,14.58vw,400px); gap: clamp(20px,1.04vw,32px); padding: clamp(20px,1.04vw,32px); }
  .table-console { padding: clamp(12px,.625vw,22px); gap: clamp(8px,.417vw,14px); }
  .button, .input { font-size: clamp(14px,.73vw,18px); }
  .button { min-height: clamp(46px,2.4vw,62px); }
  .table-instruction, .table-instruction strong, .stake-help, .side-heading strong { font-size: clamp(13px,.677vw,17px); }
  .stake-control input { min-height: clamp(48px,2.5vw,64px); font-size: clamp(20px,1.04vw,28px); }
  .stake-presets button { min-height: clamp(36px,1.875vw,48px); font-size: clamp(11px,.573vw,15px); }
  .sidebar { padding: clamp(18px,.9375vw,26px); }
  .player-row.assets-only { min-height: clamp(42px,2.188vw,56px); gap: clamp(8px,.417vw,12px); }
  .player-row.assets-only.leader { min-height: clamp(48px,2.5vw,62px); }
  .player-row.assets-only .player-name, .player-row.assets-only .player-money { font-size: clamp(13px,.677vw,17px); }
  .player-row.assets-only .player-money { max-width: clamp(124px,6.46vw,176px); }
  .player-row.assets-only .live-rank { font-size: clamp(12px,.625vw,16px); }
  .player-row.assets-only.leader .live-rank { font-size: clamp(16px,.833vw,20px); }
  #room-side .sidebar .player-list { max-height: clamp(510px,48svh,800px); }
  .feed-row, .empty-feed, .recent-feed h3 { font-size: clamp(11px,.573vw,15px); }
  .slot-stage, .roulette-stage, .felt-stage, .card-table, .coin-stage, .number-stage, .limbo-stage, .tower-stage.tower-climb-stage, .pinball-cabinet { min-height: clamp(338px,30svh,600px); }
  .slot-grid-stage { --slot-cell: clamp(66px,3.4375vw,90px); }
  .slot-grid-stage .slot-cabinet { width: min(100%,clamp(370px,19.27vw,530px)); padding: clamp(14px,.73vw,22px); }
  .slot-grid-stage .reel-symbol .game-art { width: clamp(55px,2.865vw,76px); height: clamp(55px,2.865vw,76px); }
  .slot-grid-stage .slot-marquee, .slot-paytable { font-size: clamp(13px,.677vw,17px); }
  .slot-line-legend span, .slot-paytable small { font-size: clamp(10px,.521vw,13px); }
  .wheel-wrap { width: clamp(228px,11.875vw,330px); height: clamp(228px,11.875vw,330px); }
  .dice-rig { --die-size: clamp(66px,3.4375vw,92px); }
  .coin-scene { --coin-size: clamp(132px,6.875vw,184px); width: calc(var(--coin-size)*2); height: calc(var(--coin-size)*2.12); }
  .pinball-cabinet .pinball-board { max-width: clamp(308px,16.04vw,440px); }
  .rocket-stage { height: clamp(290px,28svh,540px); }
  .property-panel, .market-panel, .recovery-panel { padding: clamp(18px,.9375vw,30px); }
  .property-art>.game-art { height: clamp(118px,6.15vw,166px); max-width: clamp(170px,8.85vw,240px); }
  .market-item { min-height: clamp(80px,4.17vw,110px); }
  .market-item strong, .market-order, .property-card h3 { font-size: clamp(14px,.73vw,18px); }
  .workshop { max-width: clamp(700px,36.46vw,1000px); }
  body[data-screen="lobby"] .hero-grid { grid-template-columns: minmax(0,1fr) clamp(360px,18.75vw,500px); }
  body[data-screen="lobby"] .hero-world { min-height: clamp(330px,17.19vw,470px); }
  body[data-screen="lobby"] .hero-copy h1 { font-size: clamp(52px,2.71vw,72px); }
  body[data-screen="lobby"] .game-card { min-height: clamp(128px,6.67vw,180px); grid-template-columns: clamp(88px,4.58vw,124px) minmax(0,1fr); }
  body[data-screen="lobby"] .game-card-art>.game-art { width: clamp(82px,4.27vw,114px); height: clamp(90px,4.69vw,126px); }
  body[data-screen="lobby"] .game-card-info h3 { font-size: clamp(16px,.833vw,21px); }
  body[data-screen="lobby"] .game-card-info p { font-size: clamp(12px,.625vw,16px); }
  body[data-screen="room"][data-phase="finished"] .final-panel { max-width: clamp(1080px,56.25vw,1540px); padding: clamp(24px,1.25vw,36px); }
  .final-panel .final-board { max-height: clamp(420px,29.17svh,620px); }
  .final-row { min-height: clamp(37px,1.93vw,50px); font-size: clamp(12px,.625vw,16px); }
  .final-row>strong, .final-rank { font-size: clamp(12px,.625vw,16px); }
}

.tower-stage.tower-climb-stage { display: flex; align-items: center; justify-content: center; gap: 24px; min-height: 338px; padding: 16px; }
.tower-ascent { position: relative; flex: 0 1 230px; min-width: 150px; height: 300px; }
.tower-spine { position: absolute; left: 50%; bottom: 18px; width: 54px; height: 235px; border: 1px solid #d5ba7938; border-radius: 7px 7px 2px 2px; transform: translateX(-50%); background: repeating-linear-gradient(0deg,transparent 0 29px,#d0bc7930 29px 31px,transparent 31px 44px),linear-gradient(90deg,#182d48e0,#425979c9 45%,#20324dde); box-shadow: 5px 0 0 #0b172955; }
.tower-platform { position: absolute; bottom: calc(18px + var(--step)*44px); left: calc(50% + var(--step-x)); transform: translateX(-50%); width: 100px; height: 17px; display: flex; justify-content: space-between; align-items: center; padding: 0 8px; border: 1px solid #829ab566; border-radius: 5px; color: #aebdd0; background: linear-gradient(#465a79,#293b56); box-shadow: 0 5px 0 #101b30; font-size: 8px; }
.tower-platform.reached { background: linear-gradient(#777057,#454640); border-color: #dfc48380; color: #fff0c9; }
.tower-platform.current { box-shadow: 0 5px 0 #17243a,0 0 14px #edd59420; border-color: #ffe0a4; }
.tower-platform.awaiting-step { background: #293b56; color: #aebdd0; border-color: #829ab566; }
.tower-token { position: absolute; left: calc(50% - 22px); bottom: 34px; width: 44px; height: 46px; z-index: 2; transform-origin: 50% 90%; will-change: transform; }
.tower-token .die-art { display: block; width: 100%; height: 100%; filter: drop-shadow(0 3px 3px #080e2080); }
.tower-readout { flex: 0 0 120px; min-width: 0; text-align: left; }
.tower-readout>span { color: var(--muted); font-size: 11px; }
.tower-readout>strong { display: block; margin: 7px 0 14px; color: var(--gold); font-size: 46px; line-height: 1; }
.tower-readout>strong small { color: var(--muted); font-size: 12px; font-weight: 500; }
.tower-readout>b { color: var(--green); font-size: 13px; }
.tower-readout>p { color: var(--muted); font-size: 11px; margin: 8px 0 0; line-height: 1.5; }
.tower-climb-stage.fallen .tower-token { opacity: .35; }
.tower-climb-stage.fallen .tower-readout>b { color: var(--red); }
.tower-climb-stage.banking .tower-platform.current { background: #766344; }
@media(max-width:600px) {
  .tower-stage.tower-climb-stage { gap: 8px; padding: 8px; min-height: 318px; }
  .tower-ascent { flex-basis: 172px; }
  .tower-readout { flex-basis: 72px; }
  .tower-readout>strong { font-size: 36px; }
  .tower-readout>strong small { display: block; margin-top: 6px; font-size: 10px; }
  .tower-readout>b,.tower-readout>p { font-size: 10px; }
}

/* Keep the controls mounted while a result is revealed; no progress block changes the layout. */
@media(min-width:601px) {
  .table-console #game-result { min-height: 108px; }
  .table-console #game-result:empty { display: block; }
}
@media(max-width:600px) {
  body[data-screen="room"][data-phase="finished"] .final-panel { padding: 16px; }
  .final-heading { margin-bottom: 14px; }
  .final-grid { grid-template-columns: minmax(0,1fr); gap: 20px; }
  .champion-card { padding: 23px 15px; }
  .champion-crown { font-size: 52px; }
  .final-panel .champion-card h2 { margin-bottom: 18px; }
  .final-panel .final-board { max-height: 300px; }
  .final-row { padding: 9px 6px; grid-template-columns: 28px minmax(0,1fr) minmax(0,1.1fr); gap: 5px; }
  .final-panel .final-settlements { display: block; padding: 10px; }
  .final-settlements>strong { display: block; margin-bottom: 6px; }
  .final-actions { flex-direction: column; gap: 10px; }
  .final-actions .button { width: 100%; }
  .table-console, .table-console:has(#game-result:empty):has(#ticket-receipt:empty) { padding: 0; gap: 10px; background: transparent; border: 0; }
  .table-console:has(.blackjack-explanation) { padding: 10px 12px; background: #101d30; border: 1px solid var(--line); }
}

/* Every game uses the same play surface, option space, and action column. */
.arena {
  --play-height: 352px;
  --options-height: 104px;
  --console-info-height: 112px;
  --mat-top: 32px;
  --mat-bottom: 44px;
  --mat-footer: 76px;
  grid-template-rows: auto calc(var(--play-height) + var(--options-height));
  align-items: start;
}
.arena[data-table-game="rocket"] { --mat-footer: 0px; }
.arena[data-table-game="slots"] { --mat-footer: 40px; }
.arena[data-table-game="limbo"] { --mat-footer: 60px; }
.arena[data-table-game="annuity"] { --mat-footer: 92px; }
.arena[data-table-game="lottery"], .arena[data-table-game="scratch"],
.arena[data-table-game="blackjack"], .arena[data-table-game="tower"],
.arena[data-table-game="numbers"], .arena[data-table-game="mines"] { --mat-footer: 40px; }
/* The mat surrounds both the game and its choices. Its painted border is never the playing area. */
#game-visual {
  position: relative;
  display: grid; grid-template-columns: minmax(0,1fr); grid-template-rows: minmax(0,1fr) var(--mat-footer); gap: 8px;
  height: calc(var(--play-height) + var(--options-height)); min-height: 0;
  padding: var(--mat-top) 5% var(--mat-bottom);
  background: #183b4f url('/assets/japan-table-v3.webp') center / 100% 100% no-repeat;
  border: 1px solid #9eb8c447; border-radius: 12px;
}
#game-visual > :first-child {
  width: 100%; max-width: none; min-width: 0;
  height: 100%; min-height: 0;
  margin: 0; padding: 0; box-sizing: border-box;
}
#game-visual > :is(.slot-stage, .roulette-stage, .felt-stage, .card-table, .coin-stage,
  .number-stage, .limbo-stage, .tower-stage, .pinball-cabinet, .ticket-stage) {
  background: transparent; border-color: transparent; box-shadow: none;
}
#game-visual > .pinball-cabinet { display: grid; grid-template-rows: minmax(0,1fr); place-items: center; }
#game-visual .pinball-board { max-height: 100%; }
#game-visual > :is(.constellation-stage, .annuity-stage) { display: flex; flex-direction: column; justify-content: center; }
#game-visual > .number-stage { display: flex; flex-direction: column; justify-content: center; }
#game-visual > .number-stage .number-board { width: min(380px,100%); margin: 0 auto; }
/* Shared center line and footer rails keep choices close to their playing pieces. */
#game-visual > .game-footer {
  width: min(640px,100%); min-width: 0; height: 100%; justify-self: center;
  display: flex; flex-direction: column; align-items: stretch; justify-content: center; gap: 8px;
}
.game-footer > :is(.bet-options,.paytable,.mine-caption,.annuity-entry) { margin: 0; }
.game-footer > .bet-options { width: 100%; gap: 8px; }
.game-footer .bet-option { min-height: 48px; padding: 7px 6px; line-height: 1.35; }
.game-footer .bet-option small { line-height: 1.35; }
.game-footer .paytable, .game-footer .mine-caption { text-align: center; }
.game-footer .paytable { display: block; }
.game-footer .slot-paytable small { margin-top: 2px; }
.game-footer .two-options { max-width: 400px; align-self: center; }
#game-visual > .duel-table + .game-footer { gap: 6px; }
#game-visual > .duel-table + .game-footer .paytable { font-size: 11px; }
#game-visual .physical-dice { gap: 0; }
#game-visual .physical-dice .dice-pair { margin: 0; }
#game-visual .physical-dice .dice-total { position: absolute; bottom: 30px; }
#game-visual .physical-dice .table-emboss { top: 26px; color: #b6c8d5; }
#game-visual .constellation-stage { align-items: center; }
#game-visual .constellation-stage :is(.ticket-picker-head,.lottery-board) { width: min(640px,100%); }
#game-visual .blackjack-table .card-hand {
  display: grid; grid-template-columns: 72px minmax(0,1fr) 72px;
  width: min(440px,96%); gap: 12px;
}
#game-visual .blackjack-table .card-hand > small { width: auto; }
#game-visual .blackjack-table .playing-cards {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0,1fr); justify-items: center;
  width: max-content; min-width: 0; max-width: 100%; justify-self: center;
}
#game-visual .blackjack-table .hand-total { justify-self: stretch; }
@media(min-width:1180px) {
  #game-visual > :is(.roulette-stage,.tower-climb-stage) { display: grid; grid-template-columns: 1fr auto 1fr; gap: 24px; }
  #game-visual :is(.wheel-wrap,.tower-ascent) { grid-column: 2; }
  #game-visual .tower-ascent { width: 230px; }
  #game-visual :is(.stage-caption,.tower-readout) { grid-column: 3; justify-self: start; }
}
/* Scene artwork gets the same corner clearance without changing motion coordinates. */
#game-visual > :is(.treasure-table, .rocket-stage) { position: relative; isolation: isolate; background: transparent; border-color: transparent; }
#game-visual > .treasure-table { --scene-art: url('/assets/japan-vault-v3.webp'); }
#game-visual > .rocket-stage { --scene-art: url('/assets/japan-orbit-v3.webp'); }
#game-visual > :is(.treasure-table, .rocket-stage)::before {
  content: ''; position: absolute; inset: 0 5%; z-index: -1; pointer-events: none;
  border-radius: 12px; background: var(--scene-art) center / cover no-repeat;
}
#game-visual > .rocket-stage.impact::before { background-image: linear-gradient(#932e422b,#932e422b),var(--scene-art); }
#game-visual .flight-readout { left: 6%; }
#game-visual .flight-baseline { left: 6%; right: 6%; color: #c7d8ec; }
.arena .table-console {
  height: auto; max-height: calc(var(--play-height) + var(--options-height)); min-height: 0;
  display: grid; grid-template-rows: auto auto minmax(0,1fr);
  align-self: start; align-content: start; gap: 12px; padding: 16px;
}
.arena .table-console > #game-controls { grid-row: 1; }
.arena .table-console > .table-info { grid-row: 2; padding-top: 14px; border-top: 1px solid var(--line); }
.arena .table-console > .table-feedback { grid-row: 3; }
.arena .table-instruction strong { display: block; font-size: 11px; color: var(--gold); margin-bottom: 4px; }
.table-info, .table-feedback { min-width: 0; min-height: 0; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #667791 transparent; }
.table-info .table-instruction { margin: 0; }
.table-info:has(#table-description:empty) { display: none; }
.table-info .blackjack-explanation { margin: 0; }
.arena[data-table-game] #game-controls { margin-top: 0; }
.table-feedback { display: flex; flex-direction: column; gap: 10px; }
.table-feedback:empty { display: none; }
.table-feedback #game-result { min-height: 0; margin: 0; }
.table-feedback #game-result:empty, .table-feedback #ticket-status:empty { display: none; }
.table-feedback .ticket-status { gap: 5px 10px; padding: 9px 10px; font-size: 11px; }
.table-feedback .ticket-status>span:last-child { margin-left: 0; flex-basis: 100%; }
.table-feedback .lottery-receipt { padding: 8px; }
.annuity-entry .input { padding-block: 0; }
.constellation-drum { pointer-events: none; }
.constellation-stage .lottery-balls { padding-top: 12px; min-height: 62px; }
.constellation-stage .ticket-picker-head { margin: 10px 0 8px; }
.constellation-stage .number-board { position: relative; z-index: 1; }
#game-visual .annuity-entry { display: grid; grid-template-columns: auto minmax(0,148px) auto; justify-content: center; margin: 0; }
#game-visual .annuity-entry .input { width: 100%; min-width: 0; height: 42px; }
#game-visual .annuity-entry + .paytable { margin: 0; }
#annuity-number-help { display: flex; flex-wrap: wrap; justify-content: center; column-gap: 10px; row-gap: 2px; }
#annuity-number-help>span { white-space: nowrap; color: inherit; }
#game-visual .scratch-card-heading { line-height: 1.3; }
@media(min-width:601px) {
  .game-tabs { min-height: 86px; grid-template-columns: repeat(6,minmax(0,1fr)); grid-template-rows: repeat(2,minmax(0,1fr)); }
  .game-tabs .game-tab { flex-direction: row; }
  .game-tabs.ticket-tabs { min-height: 44px; grid-template-columns: repeat(3,minmax(0,1fr)); grid-template-rows: minmax(0,1fr); }
  .arena-head { min-height: 46px; }
}
@media(min-width:1180px) {
  body[data-screen="room"][data-phase="running"] .site-header { height: 64px; }
  body[data-screen="room"][data-phase="running"] .room-heading { padding-block: 8px; }
  .game-tabs { min-height: 86px; }
  .personal-history { display: flex; align-items: center; gap: 12px; padding-top: 12px; }
  .personal-history h3 { flex: 0 0 auto; margin: 0; white-space: nowrap; }
  .personal-history>div { min-width: 0; flex-wrap: nowrap; overflow-x: auto; }
  .arena { padding: 16px; row-gap: 12px; }
  .arena-head { min-height: 38px; }
}
@media(min-width:1921px) {
  body[data-screen="room"][data-phase="running"] .site-header { height: clamp(64px,calc(64px + (100vw - 1920px)*.0125),84px); }
  body[data-screen="room"][data-phase="running"] .room-heading { padding-block: 10px; }
  .arena {
    --play-height: clamp(352px,calc(352px + (100vw - 1920px)*.18),536px);
    --options-height: 104px;
    --console-info-height: 128px; --mat-top: clamp(32px,1.667vw,40px); --mat-bottom: clamp(44px,2.292vw,56px);
    padding: clamp(16px,calc(16px + (100vw - 1920px)*.01),32px); row-gap: clamp(12px,.625vw,24px);
  }
  .game-tabs { min-height: calc(clamp(40px,2.08vw,56px)*2 + 6px); }
  .arena[data-table-game="slots"] { --mat-footer: 52px; }
}
@media(min-width:601px) and (max-width:900px) {
  .arena { grid-template-columns: minmax(0,1fr); grid-template-rows: auto calc(var(--play-height) + var(--options-height)) auto; }
  .arena .table-console { height: auto; min-height: 160px; padding: 14px; grid-template-columns: minmax(0,1fr) minmax(0,1fr); grid-template-rows: auto minmax(0,1fr); }
  .arena .table-console > .table-info { grid-column: 1; grid-row: 2; }
  .arena .table-console > #game-controls { grid-column: 1; grid-row: 1; }
  .arena .table-console > .table-feedback { grid-column: 2; grid-row: 1 / -1; }
}
@media(max-width:600px) {
  .arena { --play-height: clamp(380px,calc(100svh - 440px),420px); --options-height: 0px; --mat-footer: 72px; --mat-top: 24px; --mat-bottom: 36px; grid-template-rows: auto var(--play-height) auto; padding: 10px; gap: 10px; }
  .arena .table-console, .arena .table-console:has(#game-result:empty):has(#ticket-receipt:empty) {
    height: auto; max-height: none; padding: 0; border: 0; background: transparent; grid-template-columns: minmax(0,1fr); grid-template-rows: auto auto auto; gap: 8px;
  }
  .arena .table-console > #game-controls { grid-row: 1; }
  .arena .table-console > .table-info { grid-row: 2; padding: 0; border: 0; }
  .arena .table-console > .table-feedback { grid-row: 3; }
  .table-info .table-instruction { color: var(--muted); font-size: 11px; line-height: 1.5; }
  .table-feedback:not(:has(.ticket-status,.lottery-receipt,.annuity-income,.result-bar)) { display: none; }
  .table-feedback { gap: 6px; }
  .table-feedback .ticket-status { padding: 6px 8px; line-height: 1.4; }
  .table-feedback .ticket-status>span:last-child { display: none; }
  .table-feedback .lottery-receipt { padding: 6px; }
  .table-feedback .lottery-receipt h3 { font-size: 11px; line-height: 1.4; margin-bottom: 4px; }
  .table-feedback .lottery-receipt dl { gap: 3px; }
  .table-feedback .lottery-receipt dd span { width: 20px; height: 20px; font-size: 10px; }
  .table-feedback .lottery-receipt p { margin-top: 4px; line-height: 1.4; }
  .arena #game-controls:not(:empty) { min-height: 0; }
  .arena #game-controls .ticket-purchase { min-height: 52px; }
  .arena #game-controls .button-row .button, .arena #game-controls>.button { min-height: 48px; }
  .slot-grid-stage .slot-line-legend { flex-wrap: wrap; }
  #game-visual .slot-grid-stage { --slot-cell: 51px; }
  #game-visual .slot-grid-stage .slot-cabinet { padding: 8px; }
  #game-visual .slot-grid-stage .slot-bottom { margin-block: 4px; }
  .game-footer .bet-options { gap: 5px; }
  .game-footer .bet-option { padding-inline: 2px; font-size: 10px; }
  .game-footer .bet-option small { font-size: 8px; }
  #game-visual .blackjack-table .card-hand { grid-template-columns: 34px minmax(0,1fr) 38px; gap: 5px; width: 100%; }
  #game-visual .blackjack-table .card-hand > small { text-align: center; }
  #game-visual .blackjack-table .hand-total { justify-self: stretch; min-width: 0; padding: 5px 2px; font-size: 18px; }
  #game-visual .blackjack-table { gap: 12px; }
  #game-visual .blackjack-table .playing-card { width: 54px; height: 78px; }
  #game-visual .blackjack-table .card-hand>small { font-size: 9px; }
  #game-visual > .treasure-table { flex-direction: column; gap: 16px; }
  #game-visual .treasure-info { width: max-content; max-width: 100%; flex-direction: row; align-items: center; justify-content: center; gap: 8px; }
  #game-visual .treasure-info > .eyebrow { display: none; }
  #game-visual .treasure-info > .game-art { width: 34px; height: 34px; margin: 0; }
  #game-visual .treasure-info > strong { font-size: 28px; margin: 0; }
  #game-visual .treasure-info > span:last-child { font-size: 9px; white-space: nowrap; margin: 0; }
  #game-visual .annuity-entry { grid-template-columns: auto minmax(0,1fr) auto; gap: 6px; }
  #game-visual .annuity-entry label { font-size: 11px; white-space: nowrap; }
  #game-visual .annuity-entry .input { font-size: 18px; letter-spacing: 3px; }
  #game-visual .annuity-entry .quiet-button { font-size: 10px; padding: 6px; white-space: nowrap; }
  .constellation-stage .ticket-heading strong { font-size: 14px; margin-block: 4px; }
  .constellation-stage .ticket-heading small { font-size: 8px; }
  .constellation-stage .lottery-balls { padding-top: 8px; min-height: 56px; gap: 6px; }
  .constellation-stage .lottery-ball { width: 36px; height: 36px; font-size: 17px; }
  .constellation-stage .ticket-picker-head { margin: 6px 0; }
  .constellation-stage .lottery-board .number-cell { min-height: 38px; }
  #game-visual .constellation-stage .ticket-heading small { display: none; }
  #game-visual .constellation-stage .ticket-heading strong { font-size: 12px; line-height: 16px; margin: 0; }
  #game-visual .constellation-stage .lottery-balls { min-height: 42px; padding-top: 4px; }
  #game-visual .constellation-stage .ticket-picker-head { margin-block: 2px; }
  #game-visual .tower-ascent { transform: scale(.88); transform-origin: center; }
  #game-visual .tower-ascent { flex-basis: 152px; min-width: 140px; }
  #game-visual .tower-readout { flex-basis: 90px; }
  #game-visual .tower-readout>b { word-break: keep-all; }
  #game-visual .scratch-card { padding: 10px 10px 8px; }
  #game-visual .scratch-card-heading strong { font-size: 16px; margin-bottom: 6px; }
  #game-visual .scratch-row { margin-block: 6px; }
  #game-visual .scratch-symbols { height: 46px; }
  #game-visual .coin-scene { --coin-size: 120px; width: 240px; height: 230px; }
  #game-visual .game-footer .bet-option { min-height: 44px; font-size: 11px; }
  #game-visual .game-footer .bet-option small { font-size: 9px; }
  #game-visual .game-footer .paytable { font-size: 10px; line-height: 1.5; }
  .arena .table-console .result-bar { min-height: 0; }
  #annuity-number-help { display: flex; flex-wrap: wrap; justify-content: center; column-gap: 10px; row-gap: 2px; }
  #annuity-number-help>span { white-space: nowrap; }
  #annuity-number-help>span:last-child { flex-basis: 100%; }
}

/* Flat, readable chip denominations add to the amount; ALL IN fills the wallet. */
#game-controls .chip-stake-bar { display: grid; grid-template-columns: minmax(0,1fr); gap: 8px; }
#game-controls .chip-stake-bar .stake-control { grid-column: 1; grid-row: 1; }
#game-controls .chip-stake-bar>.button { grid-column: 1; grid-row: 4; margin: 0; }
.stake-tools { display: flex; align-items: center; gap: 5px; grid-column: 1; grid-row: 2; min-width: 0; }
.stake-tools button { padding: 4px 8px; min-width: 30px; min-height: 28px; border: 1px solid var(--line); border-radius: 6px; background: #1c2a40; color: var(--muted); font-size: 11px; }
.stake-tools>span { flex: 1; min-width: 0; font-size: 10px; text-align: right; color: var(--muted); white-space: nowrap; }
.stake-chips { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 6px; grid-column: 1; grid-row: 3; width: 100%; }
.stake-chips .stake-chip { position: relative; display: flex; align-items: center; justify-content: center; min-width: 0; min-height: 66px; padding: 0; margin: 0; border: 1px solid transparent; border-radius: 12px; background: transparent; cursor: pointer; transition: background-color .15s,border-color .15s; }
.stake-chip-art { display: block; position: relative; flex: 0 1 66px; width: 66px; height: 66px; max-width: 100%; pointer-events: none; }
.stake-chip-art img { display: block; width: 100%; height: 100%; object-fit: contain; user-select: none; }
.stake-chip-value,.stake-chip-word { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); max-width: 66%; color: #24344b; font-family: Georgia,'Times New Roman',serif; font-size: var(--chip-number-size); font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.6px; white-space: nowrap; line-height: 1; text-shadow: 0 1px 0 #ffffffa0; }
.stake-chip-word { top: 53%; color: #664319; font-weight: 800; letter-spacing: -.15px; }
.stake-chips .stake-chip:hover:not(:disabled),.stake-chips .stake-chip.selected { background: color-mix(in srgb,var(--chip-color) 9%,transparent); border-color: color-mix(in srgb,var(--chip-color) 40%,transparent); }
.stake-chips .stake-chip:focus-visible,.stake-tools button:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.stake-chips .stake-chip:disabled { opacity: .35; cursor: default; }
@media(min-width:2400px) { .stake-chips .stake-chip { min-height: 74px; } .stake-chip-art { flex-basis: 74px; width: 74px; height: 74px; } .stake-chip-value,.stake-chip-word { font-size: calc(var(--chip-number-size) * 1.1); } }
@media(max-width:600px) {
  #game-controls .chip-stake-bar { grid-template-columns: minmax(0,.85fr) minmax(135px,1.15fr); }
  #game-controls .chip-stake-bar>.button { grid-column: 2; grid-row: 1; }
  #game-controls .chip-stake-bar .stake-tools { grid-column: 1 / -1; }
  #game-controls .chip-stake-bar .stake-chips { grid-column: 1 / -1; }
  .stake-tools { gap: 6px; }
  .stake-tools button { min-height: 32px; }
}
@media(prefers-reduced-motion:reduce) { .stake-chips .stake-chip { transition: none; } }
.annuity-stage .ticket-heading strong { word-break: keep-all; text-wrap: balance; line-height: 1.45; }
@media(max-width:360px) {
  #game-visual .tower-readout { flex-basis: 72px; }
}

/* One set of controls: inline on desktop, within reach on narrow screens. */
.stake-action-row { display: contents; }
.stake-control .stake-caption { max-width: calc(100% - 36px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.team-activity { margin-top: 12px; border: 1px solid #efd39730; border-radius: 12px; background: #111d2bb3; overflow: hidden; }
.team-activity summary { cursor: pointer; padding: 12px; color: var(--gold); font-size: 12px; font-weight: 700; }
.team-activity summary>span { float: right; font-size: 10px; font-weight: 400; color: var(--muted); }
.team-activity ul { list-style: none; margin: 0; padding: 0 12px; max-height: 228px; overflow-y: auto; overscroll-behavior: contain; }
.team-activity li { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,.9fr); align-items: center; gap: 8px; border-top: 1px solid #ffffff0d; padding: 10px 0; font-size: 11px; }
.team-activity li>div { min-width: 0; }
.team-activity li b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.team-activity li small { display: block; color: var(--muted); font-size: 10px; line-height: 1.5; overflow-wrap: anywhere; }
.team-activity li strong { text-align: right; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.team-activity>p { padding: 0 12px 12px; margin: 0; font-size: 11px; color: var(--muted); line-height: 1.6; }
.personal-history h3 small { color: var(--muted); font-size: 10px; font-weight: 400; margin-left: 8px; }
button.history-pill { cursor: pointer; font: inherit; color: inherit; text-align: left; }
button.history-pill:hover { border-color: var(--gold); }
button.history-pill:focus-visible,.team-activity summary:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.history-reason { line-height: 1.7; overflow-wrap: anywhere; }
.history-amounts { margin: 20px 0; }
.history-amounts>div { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1.1fr); gap: 12px; padding: 12px 0; border-top: 1px solid #ffffff14; align-items: center; }
.history-amounts dt { color: var(--muted); font-size: 12px; }
.history-amounts dd { margin: 0; text-align: right; font-weight: 700; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
@media(max-width:600px) { button.history-pill { min-height: 44px; } }
#game-controls .chip-stake-bar .stake-action-row>.button { grid-column: 1; grid-row: 4; min-height: 48px; margin: 0; }
.stake-control .stake-caption { position: absolute; left: 12px; top: 6px; color: var(--muted); font-size: 10px; pointer-events: none; }
.stake-action-row .stake-control input { padding-top: 21px; padding-bottom: 5px; min-height: 56px; }
.live-actions { display: grid; gap: 6px; }
.action-clock { margin: 0; font-size: 11px; color: var(--muted); line-height: 1.4; }
.live-actions .button-row { margin: 0; }
.room-mode-bar .return-to-play { border-color: var(--gold); color: var(--gold); background: #ecd09313; }
@media(max-width:600px) {
  body[data-screen="room"][data-phase="running"].has-action-dock .site-shell { padding-bottom: calc(104px + env(safe-area-inset-bottom,0px)); }
  #game-controls .play-action-row { position: fixed; z-index: 40; left: 10px; right: 10px; bottom: var(--action-bottom,0px); display: grid; gap: 8px; padding: 10px 10px calc(10px + env(safe-area-inset-bottom,0px)); background: #101b2ef5; border: 1px solid #efd39755; border-bottom: 0; border-radius: 14px 14px 0 0; box-shadow: 0 -4px 18px #0004; }
  #game-controls .stake-action-row { grid-template-columns: minmax(0,.85fr) minmax(0,1.15fr); }
  #game-controls .chip-stake-bar .stake-action-row>.stake-control { grid-column: 1; grid-row: 1; }
  #game-controls .chip-stake-bar .stake-action-row>.button { grid-column: 2; grid-row: 1; min-height: 56px; padding: 8px; font-size: 12px; line-height: 1.4; word-break: keep-all; }
  #game-controls .live-actions .button { min-height: 48px; margin: 0; padding: 10px 8px; font-size: 13px; word-break: keep-all; }
  #game-controls .live-actions .button-row { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
  #game-controls .ticket-purchase { grid-template-columns: minmax(0,.65fr) minmax(0,1.35fr); align-items: center; }
  #game-controls .ticket-purchase p { margin: 0; line-height: 1.4; }
  #game-controls .ticket-purchase .button { min-height: 56px; margin: 0; font-size: 12px; padding: 8px; word-break: keep-all; }
  #game-controls .stake-tools { grid-row: 1; }
  #game-controls .stake-chips { grid-row: 2; }
  #game-controls .stake-tools button { min-height: 44px; min-width: 44px; }
  #game-controls .stake-tools>span { font-size: 10px; white-space: normal; word-break: keep-all; }
  body.has-action-dock #toast { bottom: calc(114px + var(--action-bottom,0px) + env(safe-area-inset-bottom,0px)); }
}
