/* Lounge presentation; gameplay and server-driven visibility stay in app.js. */
:root { --gold: #caaa66; --gold-hi: #f1dbab; --gold-deep: #806b42; --text: #f3efdf; --text-dim: #b4c2b9; --line: #caaa6638; }
body { background: radial-gradient(ellipse at 50% 35%, #17352c, #080f0d 75%); overflow: auto; }
button:focus-visible, input:focus-visible { outline: 3px solid #f1dbab; outline-offset: 4px; }
.ctrl-btn, .btn-confirm { min-height: 46px; box-shadow: none; }
.ctrl-btn.primary, .btn-confirm { background: linear-gradient(135deg, #f1dbab, #caaa66); box-shadow: 0 5px 18px #0003; border-color: #e3c58a; }
.ctrl-btn:disabled { color: #9ba79f; background: #1c2923; border-color: #ffffff14; box-shadow: none; }
.overlay { background: #07130eef; }
.overlay-card { background: radial-gradient(ellipse at top, #233c30, #101f19 80%); border-color: #786744; border-radius: 24px; padding: 28px 22px; }
.overlay-card h2 { letter-spacing: 1px; }
/* Home: title, chips, two buttons, one link — nothing else. */
.overlay.home-scene { background: radial-gradient(ellipse at 50% 35%, #17352c, #080f0d 75%); }
.home-col { width: min(420px, 100%); justify-content: center; padding: 24px 24px max(24px, env(safe-area-inset-bottom)); background: none; box-shadow: none; }
.home-float { max-width: 320px; margin: 0 auto; text-align: center; }
.home-title { font-size: clamp(36px, 10vw, 46px); line-height: 1.12; letter-spacing: 3px; color: #f3efdf; text-shadow: none; margin-bottom: 28px; }
.home-title span { color: var(--gold-hi); }
.home-chips { font-family: 'Unbounded', sans-serif; font-size: 22px; font-weight: 800; color: var(--gold-hi); margin-bottom: 28px; font-variant-numeric: tabular-nums; }
.home-scene .btn-confirm { margin: 0 0 10px; padding: 16px 20px; font-size: 16px; border-radius: 12px; }
.home-scene .ctrl-btn.block { background: #17271f; border-color: #465044; }
.records-heading { text-align: left; font-size: 13px; margin: 18px 0 10px; color: var(--gold-hi); }
.chat-panel { position: fixed; z-index: 65; right: 12px; bottom: 12px; width: min(350px, calc(100% - 24px)); max-height: calc(100dvh - 24px); overflow-y: auto; padding: 14px; border: 1px solid var(--gold-deep); border-radius: 16px; background: #10251f; box-shadow: 0 12px 40px #0008; }
.chat-heading { display: flex; align-items: center; justify-content: space-between; }
.chat-panel button { min-height: 36px; border: 1px solid var(--line); border-radius: 8px; background: #1b362a; color: var(--text); padding: 6px 10px; cursor: pointer; }
#chatClose { min-width: 44px; min-height: 44px; font-size: 24px; }
.chat-messages { height: min(190px, 28dvh); overflow-y: auto; margin: 10px 0; font-size: 13px; color: var(--text-dim); }
.chat-message { padding: 7px 0; border-bottom: 1px solid #ffffff10; overflow-wrap: anywhere; }
.chat-message strong { display: block; color: var(--gold-hi); font-size: 11px; margin-bottom: 3px; }
.chat-message span { color: var(--text); user-select: text; }
.chat-phrases { display: flex; flex-wrap: wrap; gap: 5px; }
.chat-phrases button { font-size: 11px; }
.chat-form label { display: block; font-size: 12px; margin: 10px 0 5px; }
.chat-form > div { display: flex; gap: 7px; }
#chatInput { min-width: 0; flex: 1; height: 44px; font-size: 16px; background: #071a12; color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 8px; user-select: text; }
#chatSend { min-height: 44px; background: var(--gold-hi); color: #20190e; }
#chatStatus { font-size: 12px; color: var(--text-dim); margin-top: 8px; }
.game-container { max-width: 560px; min-height: 640px; padding: 0 14px; isolation: isolate; }
.game-container::before { content: ''; position: absolute; z-index: -1; inset: 100px 24px 170px; border: 12px solid #262923; border-radius: 48%; background: radial-gradient(ellipse, var(--felt-mid), var(--felt-lo)); box-shadow: 0 0 0 1px #8a7850, 0 0 0 6px #111a15, inset 0 0 0 2px #9c89534d, inset 0 0 60px #0007, 0 22px 40px #0009; }
.game-container::after { content: ''; position: absolute; z-index: -1; inset: 119px 44px 190px; border: 1px solid #d7bd7338; border-radius: 48%; pointer-events: none; }
.opponents { inset: 60px 4px 215px; }
.opp { width: 90px; gap: 2px; }
.opp--top { top: 0; left: 50%; transform: translateX(-50%); }
.opp--tl { top: 22%; left: 0; transform: none; width: 90px; }
.opp--tr { top: 22%; left: auto; right: 0; transform: none; width: 90px; }
.opp--left { top: 69%; left: 0; width: 90px; }
.opp--right { top: 69%; right: 0; width: 90px; }
.avatar-wrap { position: relative; width: 44px; height: 44px; }
.player-avatar { width: 40px; height: 40px; display: inline-flex; justify-content: center; align-items: center; border-radius: 50%; overflow: hidden; background: linear-gradient(145deg, #637b66, #233c32); color: #f6ebcd; font: 800 20px 'Montserrat', sans-serif; border: 2px solid #8f9e78; }
.player-avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-wrap .player-avatar { position: absolute; inset: 2px; }
.opp-timer { position: absolute; inset: -3px; width: 50px; height: 50px; }
.seat-timer .ring-bg { fill: none; stroke: #ddd8b330; stroke-width: 2; }
.seat-timer .ring-fg { stroke-width: 2.5; stroke: transparent; }
.seat-timer.live .ring-fg { stroke: #ecd18f; }
.seat-timer.warn { animation: none; }
.seat-timer.live.warn .ring-fg { stroke: #ee8585; }
.avatar-wrap .seat-tag { position: absolute; bottom: -2px; right: -6px; background: #efda9f; color: #201e13; font-size: 9px; border: 0; padding: 2px 5px; }
.opp-name { flex-direction: column; width: 100%; gap: 1px; padding: 3px 5px; border-radius: 7px; background: #0b1815ed; font-size: 10px; }
.opp-pname { max-width: 100%; }
.opp-score { color: #ebdcb8; font: 700 11px 'Montserrat', sans-serif; }
.opp-score .schip { display: none; }
.opp-fan { position: absolute; top: 5px; left: calc(50% + 19px); min-height: 0; padding: 0; border: 0; }
/* Right-hand seats fan toward the felt, or revealed cards run off the screen. */
.opp--tr .opp-fan, .opp--right .opp-fan { left: auto; right: calc(50% + 19px); }
.opp.turn .opp-fan { box-shadow: none; border: 0; }
.opp.turn .opp-name { border: 1px solid var(--gold); box-shadow: 0 0 12px #d7bc6333; }
.opp.done { opacity: .72; }
.opp-fold { display: none; }
.mini-back { width: 16px; height: 23px; margin-left: -9px; }
.opp-fan .card { width: 22px; font-size: 6px; }
.opp-action { min-height: 20px; font-size: 10px; padding: 3px 6px; max-width: 112px; background: #15241f; }
.opp-action:empty { visibility: hidden; }
.opp-action.chips { gap: 4px; background: #34412a; padding: 3px 6px; }
.opp-action .bamt { font-size: 10px; }
.table-area { position: absolute; inset: 60px 0 215px; padding: calc((max(640px, 100dvh) - 275px) * .22 + 108px) 0 0; justify-content: flex-start; gap: 9px; pointer-events: none; }
.table-combo { min-height: 0; gap: 4px; }
.table-combo .card, .board-slot { width: clamp(40px, 11vw, 54px); height: auto; aspect-ratio: 5 / 7; font-size: 12px; flex: 0 0 auto; }
.board-slot { border: 1px solid #ddc88e35; border-radius: 6px; display: grid; place-items: center; color: #ddc88e28; font-size: 22px; background: #06221733; }
.pot-pile { min-height: 18px; }
.pot-pile .bchip { height: 23px; }
.table-label { font-size: 19px; line-height: 1.4; }
.table-label small { font-size: 9px; letter-spacing: 2px; }
.turn-line { order: 1; min-height: 28px; font-size: 10px; max-width: 62%; padding: 5px 10px; background: #0b271bd9; border: 1px solid #d7bd7340; box-shadow: none; white-space: normal; text-align: center; }
.me-area { position: absolute; bottom: 0; left: 14px; right: 14px; height: 214px; padding: 0 0 max(8px, env(safe-area-inset-bottom)); background: none; }
.me-bar { position: relative; width: max-content; max-width: 100%; min-height: 43px; margin: 0 auto; padding: 5px 12px 5px 54px; border: 1px solid #caaa6677; border-radius: 12px; background: #10251e; display: grid; grid-template-columns: auto auto; gap: 0 12px; }
#meAvatar { position: absolute; left: 6px; top: 2px; width: 38px; height: 38px; }
.me-timer { position: absolute; left: 1px; top: -3px; width: 48px; height: 48px; margin: 0; }
.me-name { font-size: 11px; }
.me-score { font-size: 12px; }
.me-status { grid-column: 1 / -1; justify-content: center; font-size: 10px; min-height: 14px; margin: 0; }
.me-status.chips { margin: 0; }
.me-status .bamt { font-size: 10px; }
.hand { height: 77px; min-height: 0; padding: 5px 0 0; gap: 6px; }
.hand .card { width: 49px; font-size: 12px; }
#actRow { margin-top: 5px; }
#foldBtn:not(:disabled) { background: #392323; border-color: #a5706655; color: #f5ccc3; }
#foldBtn.muted:not(:disabled) { background: transparent; border-color: #ffffff1f; color: var(--text-dim); }
/* Leave and chat live in the top corners as icons; the bottom edge belongs
   to the action row. */
#secRow { position: absolute; z-index: 7; top: max(10px, env(safe-area-inset-top)); left: 14px; right: 14px; margin: 0; pointer-events: none; }
.icon-btn { pointer-events: auto; position: relative; width: 40px; height: 40px; padding: 0; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line); background: #10251ecc; color: var(--gold-hi); cursor: pointer; }
.icon-btn svg { width: 20px; height: 20px; }
.icon-btn:active { transform: scale(.94); }
#chatToggle { margin-left: auto; }
#chatToggle[data-unread]:not([data-unread=""])::after { content: attr(data-unread); position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 999px; background: #d4505a; color: #fff; font: 800 10px/18px 'Montserrat', sans-serif; }
#actRow { padding-bottom: max(10px, env(safe-area-inset-bottom)); }
.raise-panel { position: absolute; z-index: 6; bottom: 44px; left: 0; right: 0; background: #13251f; border: 1px solid #a78c55; border-radius: 16px; padding: 14px; box-shadow: 0 -10px 40px #0008; }
.raise-panel input { margin: 12px 0; }
.wait-room { pointer-events: auto; z-index: 5; width: min(320px, 90%); max-height: 100%; overflow-y: auto; padding: 16px; background: #10251ff5; border: 1px solid var(--line); border-radius: 16px; }
@media (min-width: 700px) { .game-container { border-left: 1px solid #caaa6620; border-right: 1px solid #caaa6620; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* Resolution-independent chips. The adjacent amount remains the exact total. */
.poker-chip { --chip-color: #254d41; --chip-ink: #fff5dc; --chip-size: 28px; position: relative; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; width: var(--chip-size); height: var(--chip-size); border: 3px dashed #f4e9d4; border-radius: 50%; background: var(--chip-color); color: var(--chip-ink); box-shadow: 0 2px 0 #131b18, 0 4px 0 var(--chip-color), 0 5px 1px #101612, 0 7px 6px #0006; filter: none; vertical-align: middle; }
.poker-chip > span { display: grid; place-items: center; width: 78%; height: 78%; border: 1px solid #fff8; border-radius: 50%; font: 800 9px 'Montserrat', sans-serif; letter-spacing: -.4px; }
.chip-gold { --chip-color: #bf9440; --chip-ink: #1c170c; }
.chip-blue { --chip-color: #2955a0; }
.chip-black { --chip-color: #252a31; }
.chip-green { --chip-color: #26705b; }
.chip-red { --chip-color: #a13740; }
.chip-white { --chip-color: #dfd9c9; --chip-ink: #232721; border-color: #5f7481; }
.poker-chip.schip { --chip-size: 20px; border-width: 2px; margin: 0 6px 2px 0; box-shadow: 0 2px 0 #0d1913; }
.poker-chip.schip > span { font-size: 6px; }
.pot-pile { gap: 0; min-height: 35px; align-items: center; }
.pot-pile .poker-chip { --chip-size: 32px; width: var(--chip-size); height: var(--chip-size); margin: 0 0 6px -10px; filter: none; }
.pot-pile .poker-chip:first-child { margin-left: 0; }
.pot-pile .poker-chip:nth-child(2n) { margin-bottom: 10px; }
.pot-pile .poker-chip:nth-child(3n) { margin-bottom: 6px; }
.flychips .poker-chip { --chip-size: 28px; width: var(--chip-size); height: var(--chip-size); margin-left: -8px; filter: none; }
.me-score { display: inline-flex; align-items: center; font-variant-numeric: tabular-nums; }

/* Scale the complete table, not just its cards, when the embedded frame is short. */
@media (max-width: 759px) {
  body { height: 100dvh; min-height: 0; align-items: flex-start; overflow: hidden; overscroll-behavior: none; }
  .game-container { flex-shrink: 0; width: var(--table-width, 100%); height: var(--table-height, 100dvh); min-height: 0; transform: scale(var(--table-fit, 1)); transform-origin: center top; }
  .table-area { padding-top: calc((max(640px, var(--table-height, 100dvh)) - 275px) * .22 + 108px); }
  .overlay-card { max-height: calc(100dvh - 24px); }
}
/* Desktop / embedded web: a wide table, not a stretched phone column. */
@media (min-width: 760px) {
  .game-container { width: 100%; max-width: 1280px; min-height: 680px; border: 0; }
  .game-container::before { inset: 112px 70px 204px; border-width: 16px; border-radius: 50%; box-shadow: 0 0 0 2px #8a7850, 0 0 0 9px #151c18, inset 0 0 0 2px #c5ad6555, inset 0 0 90px #0006, 0 30px 60px #0008; }
  .game-container::after { inset: 139px 100px 231px; border-radius: 50%; }
  .opponents { inset: 85px 24px 215px; }
  .opp { width: 140px; gap: 4px; }
  .opp--top { top: 0; left: 50%; transform: translateX(-50%); }
  .opp--tl { top: 6%; left: 23%; right: auto; transform: translateX(-50%); }
  .opp--tr { top: 6%; left: 77%; right: auto; transform: translateX(-50%); }
  .opp--left { top: 55%; left: 0; transform: none; }
  .opp--right { top: 55%; right: 0; left: auto; transform: none; }
  .avatar-wrap { width: 56px; height: 56px; }
  .avatar-wrap .player-avatar { width: 52px; height: 52px; font-size: 26px; }
  .opp-timer { width: 62px; height: 62px; }
  .opp-name { padding: 7px 10px; font-size: 13px; border: 1px solid #78927e40; border-radius: 10px; }
  .opp-score { font-size: 14px; }
  .opp-fan { top: 13px; left: calc(50% + 30px); }
  .opp--tr .opp-fan, .opp--right .opp-fan { left: auto; right: calc(50% + 30px); }
  .mini-back { width: 23px; height: 32px; margin-left: -10px; }
  .opp-fan .card { width: 30px; font-size: 8px; }
  .opp-action, .opp-action.chips { font-size: 12px; min-height: 25px; padding: 4px 10px; max-width: 160px; }
  .opp-action .bamt { font-size: 12px; }
  .table-area { inset: 110px 160px 218px; padding: 45px 0 0; justify-content: center; gap: 12px; }
  .table-combo { gap: 8px; max-width: 100%; }
  .table-combo .card, .board-slot { width: clamp(52px, 6vw, 76px); font-size: 18px; border-radius: 9px; }
  .board-slot { font-size: 30px; }
  .table-label { font: 800 25px 'Montserrat', sans-serif; }
  .table-label small { font: 600 11px 'Montserrat', sans-serif; letter-spacing: 2px; }
  .turn-line { font: 600 12px 'Montserrat', sans-serif; max-width: 100%; padding: 7px 16px; }
  .pot-pile { min-height: 44px; }
  .pot-pile .poker-chip { --chip-size: 38px; }
  .pot-pile .poker-chip > span { font-size: 11px; }
  .me-area { left: 36px; right: 36px; bottom: 14px; height: 190px; }
  .me-bar { min-height: 52px; padding: 6px 18px 6px 66px; gap: 2px 18px; }
  #meAvatar { width: 46px; height: 46px; top: 2px; left: 8px; font-size: 24px; }
  .me-timer { width: 56px; height: 56px; left: 3px; top: -3px; }
  .me-name { font: 700 14px 'Montserrat', sans-serif; }
  .me-score { font: 700 16px 'Montserrat', sans-serif; }
  .me-status, .me-status .bamt { font-size: 12px; }
  .hand { height: 112px; padding-top: 12px; gap: 10px; }
  .hand .card { width: 64px; font-size: 16px; }
  #actRow { position: absolute; bottom: 0; right: 0; width: min(35%, 370px); gap: 8px; }
  #actRow .ctrl-btn { min-height: 52px; font-size: 14px; }
  .raise-panel { left: auto; right: 0; bottom: 0; width: 330px; }
  .wait-room { max-height: 100%; width: 340px; }
  .lobby-card { max-width: 520px; }
}
@media (min-width: 760px) and (max-height: 760px) {
  .table-area { inset: 255px 160px 210px; padding: 0; justify-content: flex-start; gap: 8px; }
  .table-combo .card, .board-slot { width: 56px; font-size: 14px; }
  .table-label { font-size: 20px; }
  .pot-pile { min-height: 36px; }
  .pot-pile .poker-chip { --chip-size: 30px; }
}
@media (min-width: 760px) and (max-width: 959px) {
  .table-area { top: calc(265px + (max(680px, 100dvh) - 680px) * .06); padding: 0; justify-content: flex-start; gap: 8px; }
  .table-combo .card, .board-slot { width: 52px; font-size: 14px; }
  .table-label { font-size: 20px; }
  .pot-pile { min-height: 36px; }
  .pot-pile .poker-chip { --chip-size: 30px; }
}

/* ══════════ Polish pass ══════════
   One system: Montserrat for UI and numbers (tabular), Unbounded only for
   display that never holds Ө/Ү: home title, chip count, the win line. Text never below 11px. Touch targets
   ≥44px. Your turn and the win are the two moments that must be loud. */
:root {
  --surface: #10251e; --surface-2: #17322a; --text-off: #6f7e76;
  --ease: cubic-bezier(.2, .8, .2, 1);
}
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* buttons: enabled reads as enabled, disabled as off */
.ctrl-btn { background: var(--surface-2); border-color: #caaa6655; transition: transform .12s var(--ease), filter .2s; }
.ctrl-btn:disabled { background: transparent; border-color: #ffffff14; color: var(--text-off); }
#actRow .ctrl-btn { min-height: 52px; font: 700 15px 'Montserrat', sans-serif; }
.ctrl-btn:not(:disabled):active, .preset-btn:active, .chat-panel button:active { transform: scale(.97); }
@media (hover: hover) { .ctrl-btn:not(:disabled):hover, .preset-btn:hover, .icon-btn:hover { filter: brightness(1.12); } }
.icon-btn { width: 44px; height: 44px; }

/* type: nothing under 11px, one face per job */
.opp-name { font: 700 12px 'Montserrat', sans-serif; }
.opp-score, .me-score, .table-label, .bamt { font-family: 'Montserrat', sans-serif; font-variant-numeric: tabular-nums; }
.opp-score { font-size: 12px; font-weight: 700; }
.opp-action, .opp-action.chips { font: 700 11px 'Montserrat', sans-serif; }
.opp-action .bamt, .me-status .bamt { font-size: 11px; }
.me-name { font: 700 13px 'Montserrat', sans-serif; color: var(--text); }
.me-score { font-size: 14px; font-weight: 800; }
.me-status { font: 600 12px 'Montserrat', sans-serif; }
.avatar-wrap .seat-tag { font: 800 10px/14px 'Montserrat', sans-serif; min-width: 18px; text-align: center; }
.table-label { font-size: 20px; font-weight: 800; }
.table-label small { font: 700 11px 'Montserrat', sans-serif; letter-spacing: 1.5px; }
.kicker b.kick-red { color: #ff9aa5; }
#chatToggle[data-unread]:not([data-unread=""])::after { background: #c23a46; }

/* your turn */
.me-bar { transition: border-color .2s, box-shadow .2s; }
.me-area.turn .me-bar { border-color: var(--gold-hi); box-shadow: 0 0 0 2px #f1dbab55, 0 0 18px #caaa6666; }

/* whose turn, across the table */
.seat-timer .ring-fg { stroke-width: 3.5; }
.opp.turn .opp-name { border: 1.5px solid var(--gold-hi); background: var(--surface-2); }
.seat-timer.live.warn { animation: pulseTime 1s ease-in-out infinite; }

/* folded seats step back */
.opp.done .player-avatar { filter: grayscale(1); }

/* the win */
.turn-line { font: 700 13px 'Montserrat', sans-serif; }
.turn-line.mine { font: 800 17px 'Unbounded', sans-serif; padding: 8px 20px; min-height: 40px; }
.opp.win .player-avatar, .me-bar.win { box-shadow: 0 0 0 3px var(--gold), 0 0 28px #caaa66aa; }
.opp.win .avatar-wrap { animation: winPop .5s var(--ease); }
@keyframes winPop { 40% { transform: scale(1.12); } }

/* cards: yours big, revealed ones readable, new ones dealt */
@media (max-width: 759px) {
  .me-area { height: 236px; }
  .opponents, .table-area { bottom: 237px; }
  .game-container::before { bottom: 192px; }
  .game-container::after { bottom: 212px; }
  .hand { height: 100px; }
  .hand .card { width: 68px; font-size: 16px; }
}
.hand { gap: 0; }
.hand .card { box-shadow: 0 6px 14px #0007; }
.hand .card + .card { margin-left: -10px; }
.hand .card:first-child { transform: rotate(-4deg); }
.hand .card:last-child { transform: rotate(4deg); }
.opp-fan .card { width: 34px; font-size: 10px; }
.opp-fan .card .corner b { font-size: 1.2em; }
.opp-fan .card .pip { font-size: 1.8em; }
.opp-fan .card.faded { filter: brightness(.6); }
.card.deal { animation: deal .32s var(--ease) both; }
@keyframes deal { from { opacity: 0; transform: translateY(-20px) rotateY(90deg); } }

/* raise sizer floats over the empty felt so your cards stay visible */
.raise-panel { padding: 12px; gap: 10px; }
.preset-row { gap: 8px; }
.preset-btn { min-height: 40px; font: 700 13px 'Montserrat', sans-serif; color: var(--text); background: var(--surface-2); }
.preset-btn.on { color: var(--gold-ink, #20190e); background: var(--gold-hi); border-color: var(--gold-hi); }
.step-btn { flex-basis: 44px; height: 44px; }
.raise-panel input[type="range"] { height: 6px; margin: 4px 0; background: linear-gradient(90deg, var(--gold) var(--p, 0%), #caaa6633 var(--p, 0%)); }
.raise-panel input[type="range"]::-webkit-slider-thumb { width: 28px; height: 28px; }
.raise-panel input[type="range"]::-moz-range-thumb { width: 28px; height: 28px; }
.raise-panel .controls { gap: 8px; }
#raiseGo { flex: 1 1 auto; }

/* waiting room */
.wait-room .ctrl-btn { min-height: 48px; }

/* chat: half the screen at most, quick phrases in one swipeable row */
.chat-panel { max-height: min(50dvh, calc(var(--visible-height, 100dvh) - 24px)); }
.chat-messages:empty { display: none; }
.chat-phrases { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 10px -14px 0; padding: 0 14px; }
.chat-phrases::-webkit-scrollbar { display: none; }
.chat-phrases button { flex: none; min-height: 40px; font-size: 13px; border-radius: 999px; padding: 0 14px; }
.chat-form > div { margin-top: 10px; }
#chatSend { width: 44px; min-width: 44px; padding: 0; display: grid; place-items: center; border-radius: 50%; }
#chatSend svg { width: 20px; height: 20px; }

/* records */
.record-big { font: 800 36px 'Montserrat', sans-serif; font-variant-numeric: tabular-nums; color: var(--text); margin: 8px 0 4px; }
.record-big.pos { color: var(--good); }
.record-big.neg { color: #ff9aa5; }
.sb-rank.r1, .sb-rank.r2, .sb-rank.r3 { width: 24px; height: 24px; line-height: 24px; border-radius: 50%; color: #20190e; }
.sb-rank.r1 { background: #f1dbab; }
.sb-rank.r2 { background: #c9ced2; }
.sb-rank.r3 { background: #d39a6a; }

/* home: one rhythm */
.home-scene .btn-confirm, .home-scene .ctrl-btn.block { margin: 0 0 12px; min-height: 52px; }
#recordsBtn { margin-top: 0; }

@media (min-width: 760px) {
  .hand .card { width: 78px; font-size: 19px; }
  .opp-fan .card { width: 44px; font-size: 13px; }
  .opp-name { font-size: 13px; }
  .opp-score { font-size: 14px; }
  .table-label { font-size: 25px; }
}

/* ── Second pass ── */
/* phones: the result pill sits in the empty strip above the board, clear of every seat */
@media (max-width: 759px) {
  .turn-line { position: absolute; left: 50%; transform: translateX(-50%); order: 0; max-width: 200px;
    top: calc((max(640px, var(--table-height, 100dvh)) - 275px) * .22 + 62px); }
}
/* seat tags sit on the side away from the revealed fan */
.opp:not(.opp--tr):not(.opp--right) .avatar-wrap .seat-tag { right: auto; left: -6px; }
#meTag { position: absolute; inset: 0; pointer-events: none; }
#meTag .seat-tag { position: absolute; left: 34px; bottom: -4px; background: #efda9f; color: #201e13; font: 800 10px/14px 'Montserrat', sans-serif; padding: 2px 5px; border: 0; border-radius: 999px; z-index: 2; }
/* compact raise sizer: presets + one slider row; ✕ / Raise-to take over the action row */
.raise-panel { padding: 10px 12px; gap: 8px; }
.raise-mid { gap: 10px; }
.raise-mid input[type="range"] { flex: 1 1 auto; margin: 0; }
#actRow:not(.sizing) #raiseBack, #actRow:not(.sizing) #raiseGo { display: none; }
#actRow.sizing #foldBtn, #actRow.sizing #midBtn, #actRow.sizing #raiseBtn { display: none; }
#raiseGo { flex: 2 1 auto; }
/* your turn: cards lift, the primary action breathes */
.hand .card { transition: transform .2s var(--ease), opacity .2s; }
.me-area.turn .hand .card:first-child { transform: translateY(-6px) rotate(-4deg); }
.me-area.turn .hand .card:last-child { transform: translateY(-6px) rotate(4deg); }
.me-area.turn #actRow .primary:not(:disabled) { position: relative; }
/* the glow fades in and out on its own layer: opacity, not box-shadow, animates */
.me-area.turn #actRow .primary:not(:disabled)::after { content: ''; position: absolute; inset: -1px; border-radius: inherit; pointer-events: none; box-shadow: 0 0 0 3px #f1dbab55, 0 0 18px #caaa6699; opacity: 0; animation: breathe 1.2s ease-in-out infinite; }
@keyframes breathe { 50% { opacity: 1; } }
/* folded hand steps back */
.hand.folded .card { opacity: .35; filter: none; }
.hand.folded .card:first-child { transform: translateY(12px) scale(.92) rotate(-4deg); }
.hand.folded .card:last-child { transform: translateY(12px) scale(.92) rotate(4deg); }
/* dealt out this hand */
.card.ghost { background: transparent; border: 1px dashed #ddc88e40; box-shadow: none; }
/* chat opens from the top, away from your cards */
.chat-panel { top: calc(max(10px, env(safe-area-inset-top)) + 52px); bottom: auto; }
.callout.chat { color: var(--ink); background: var(--cream, #f7f2e4); border-color: var(--gold-deep); font-weight: 700; }
/* leave dialog */
.leave-ask .lobby-title { margin-bottom: 16px; }
@media (min-width: 760px) {
  .raise-panel { bottom: 72px; }
}

/* ── Third pass ── */
/* my bet on the felt, my hand named above my cards */
.me-area .my-bet { position: absolute; top: -34px; left: 50%; transform: translateX(-50%); display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px 2px 4px; border-radius: 999px; background: #34412a; font: 700 12px 'Montserrat', sans-serif; }
.me-area .my-bet:empty { display: none; }
/* someone else's win still reads as a win */
.turn-line:not(.mine):not(.blank) { border-color: var(--gold); color: var(--gold-hi); }
/* folded: dim the seat, keep the Fold tag legible */
.opp.done { opacity: 1; }
.opp.done .avatar-wrap, .opp.done .opp-name { opacity: .5; }
/* records: no gap, no table behind it */
#recordStatus:empty { display: none; }
#recordsOv { background: radial-gradient(ellipse at 50% 35%, #17352c, #080f0d 75%); backdrop-filter: none; }
/* waiting room rhythm */
.wait-list { gap: 6px; }
.wait-row { min-height: 40px; }
.wait-count { color: var(--text-dim); font: 700 13px 'Montserrat', sans-serif; }
/* chat: shorter, phrases fade at the edge */
.chat-messages { height: min(110px, 18dvh); }
.chat-phrases { mask-image: linear-gradient(90deg, #000 88%, transparent); }
@media (max-width: 759px) {
  /* raise sizer over my bar, clear of the side seats' bets and my cards */
  .raise-panel { bottom: calc(100% - 50px); padding: 6px 10px; gap: 6px; }
  .preset-btn { min-height: 36px; }
  .raise-mid .step-btn { height: 36px; flex-basis: 36px; }
  /* result text stays inside the felt */
  .table-label { max-width: 210px; font-size: 16px; text-wrap: balance; text-align: center; }
  /* bigger board */
  .table-combo .card, .board-slot { width: clamp(48px, 13.6vw, 56px); font-size: 14px; }
  /* seats off the screen edge */
  .opp { width: 84px; }
  .opp--left, .opp--tl { left: 10px; }
  .opp--right, .opp--tr { right: 10px; }
}
@media (min-width: 760px) {
  .opp { width: 170px; }
  .opp-name { font-size: 15px; }
  .opp-score { font-size: 16px; }
  .avatar-wrap { width: 68px; height: 68px; }
  .avatar-wrap .player-avatar { width: 64px; height: 64px; font-size: 30px; }
  .opp-timer { width: 74px; height: 74px; }
  .opp--left { left: 56px; }
  .opp--right { right: 56px; }
  #actRow .ctrl-btn { min-height: 58px; font-size: 16px; }
}

/* ── No plate behind opponent names ── */
.opp-name, .opp.turn .opp-name { background: none; border: 0; box-shadow: none; padding: 2px 0; }
.opp-name { text-shadow: 0 1px 3px #000c, 0 0 8px #0009; }
.opp.turn .opp-pname { color: var(--gold-hi); }
/* …nor behind mine: your turn shows on the avatar and the name instead */
.me-bar, .me-area.turn .me-bar, .me-bar.win { background: none; border: 0; box-shadow: none; }
.me-bar { text-shadow: 0 1px 3px #000c, 0 0 8px #0009; }
.me-area.turn .me-name { color: var(--gold-hi); }
.me-area.turn #meAvatar { box-shadow: 0 0 0 2px var(--gold-hi), 0 0 16px #caaa66aa; }
.me-bar.win #meAvatar { box-shadow: 0 0 0 3px var(--gold), 0 0 28px #caaa66aa; }

/* ── Fourth pass ── */
/* the hand name sits low, over where the two cards overlap — never on an index */
.table-area.showdown .pot-pile { min-height: 0; }
/* callouts never draw over the leave dialog */
.leave-ask { z-index: 63; }
#leaveGo { background: #392323; border-color: #a5706655; color: #f5ccc3; }
/* records: say what the number is */
.record-label { margin-top: 6px; font: 700 11px 'Montserrat', sans-serif; letter-spacing: 1.5px; color: var(--text-dim); }
.record-big { margin-top: 2px; }
/* no 6px text inside my stack chip */
.me-score .schip > span { display: none; }
@media (max-width: 759px) {
  .opp--tl, .opp--tr { top: 20%; }
  .opp--tr .opp-fan { top: -2px; }
  .wait-room { width: min(290px, 80%); margin-top: 20px; }
}
@media (min-width: 760px) {
  .me-name { font-size: 15px; }
  .me-score { font-size: 17px; }
  .opp-action, .opp-action.chips, .opp-action .bamt { font-size: 12px; }
}

/* Corners carry the rank only; the big centre pip says the suit. */
.card .corner i { display: none; }

/* ── Fifth pass ── */
/* the win line never wraps under the board */
.turn-line.mine { white-space: nowrap; max-width: none; font-size: 15px; padding: 7px 16px; z-index: 4; }
/* ✕ lives in the sizer's corner; the action row is just Raise-to while sizing */
.raise-panel .raise-close { position: absolute; top: -18px; right: -6px; width: 36px; height: 36px; z-index: 2; }
.raise-panel .raise-close svg { width: 16px; height: 16px; }
#raiseGo { flex: 1 1 auto; }
.preset-btn { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; line-height: 1.1; }
.preset-btn small { font: 600 11px 'Montserrat', sans-serif; opacity: .75; font-variant-numeric: tabular-nums; }
/* Fold while a check is free: quiet, but clearly a live button */
#foldBtn.muted:not(:disabled) { color: var(--text); border-color: #ffffff33; }
/* chat: no heading row (the corner icon closes it), two lines of history */
.chat-heading { display: none; }
.chat-messages { height: auto; max-height: 56px; margin-top: 0; }
/* nothing under 11px */
.avatar-wrap .seat-tag, #meTag .seat-tag { font-size: 11px; line-height: 16px; min-width: 22px; }
.pot-pile .poker-chip > span { font-size: 0; }
/* an opponent's turn reads at a glance */
.opp .avatar-wrap { transition: transform .2s var(--ease); }
.opp.turn .avatar-wrap { transform: scale(1.08); }
.opp.turn .player-avatar { box-shadow: 0 0 0 2px var(--gold-hi), 0 0 18px #caaa6699; }
/* waiting room: one title, details on a quiet line */
.wait-count { display: block; margin-top: 4px; font: 600 12px 'Montserrat', sans-serif; }
/* records: plain, like home */
#recordsOv .overlay-card { background: none; border: 0; box-shadow: none; }

/* ── Features: pre-actions, sound, pot, win, emoji, desktop ── */
/* pre-action toggles while others act: two quiet buttons, gold when set */
#actRow.pre #raiseBtn { display: none; }
#actRow.pre .ctrl-btn { background: transparent; border: 1.5px dashed #caaa6655; color: var(--text); font-size: 14px; }
#actRow.pre .ctrl-btn.on { background: #caaa6626; border-style: solid; border-color: var(--gold-hi); color: var(--gold-hi); }
#actRow.pre .ctrl-btn.on::before { content: '✓ '; }
/* speaker sits left of chat */
#soundBtn { margin-left: auto; }
#chatToggle { margin-left: 8px; }
#soundBtn .off, #soundBtn.muted .on { display: none; }
#soundBtn.muted .off { display: block; }
#soundBtn.muted { color: var(--text-dim); }
/* pot heap */
.pot-pile .poker-chip:nth-child(n+2) { margin-left: -14px; }
/* a stack that just won glows while it counts */
.opp-score.counting, .me-score.counting { color: var(--gold-hi); text-shadow: 0 0 12px #caaa66cc; }
/* the result pill arrives */
.turn-line.win { border-color: var(--gold); color: var(--gold-hi); animation: winLine .45s var(--ease) both; }
.turn-line.win.mine { color: #2a210a; }
@keyframes winLine { from { opacity: 0; transform: translateX(-50%) scale(.8); } }
@media (min-width: 760px) { @keyframes winLine { from { opacity: 0; transform: scale(.8); } } }
/* emoji reactions */
.chat-emojis { display: flex; justify-content: space-between; gap: 4px; margin: 0 0 8px; }
.chat-emojis button { flex: 1; min-height: 44px; font-size: 22px; padding: 0; border-radius: 12px; }
.callout.chat.emoji { font-size: 30px; padding: 0 4px; background: none; border: 0; box-shadow: none; }
@media (min-width: 760px) {
  .hand { height: 132px; }
  .hand .card { width: 92px; font-size: 22px; }
  .me-area { height: 212px; }
  .table-combo .card, .board-slot { width: clamp(60px, 6.4vw, 84px); font-size: 20px; }
  .pot-pile .poker-chip { --chip-size: 44px; }
}

/* ── Chips, redrawn ──
   A real casino chip: six edge inserts, a thin inner ring, a little gloss
   and thickness. No value printed inside — the amount always sits beside it. */
.poker-chip {
  --edge: #f4ecd8;
  border: 0;
  background:
    radial-gradient(circle, var(--chip-color) 0 54%, transparent 55%),
    repeating-conic-gradient(from 8deg, var(--edge) 0 18deg, var(--chip-color) 18deg 60deg);
  box-shadow:
    inset 0 0 0 1px #0000004d,
    0 1.5px 0 color-mix(in srgb, var(--chip-color) 50%, #000),
    0 3px 5px #00000066;
}
.poker-chip::after {
  content: ''; position: absolute; inset: 0; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle at 35% 28%, #ffffff40, transparent 45%);
}
.poker-chip > span { width: 64%; height: 64%; border: 1.5px solid #ffffffa6; font-size: 0; }
.poker-chip.schip { border: 0; }
.poker-chip.schip > span { border-width: 1px; font-size: 0; }
.chip-white { --edge: #2f5a78; }
.chip-white > span { border-color: #2f5a7899; }
.chip-gold { --edge: #fff6d8; }

/* ── Sixth pass ── */
/* an armed fold looks armed */
#foldBtn.armed:not(:disabled) { background: #6b2a2a; border-color: #e07a7a; color: #fff; animation: winPop .25s var(--ease); }
/* pre-actions: solid buttons with a checkbox, not drop zones */
#actRow.pre .ctrl-btn { border: 1.5px solid #ffffff22; display: flex; align-items: center; justify-content: center; }
#actRow.pre .ctrl-btn::before { content: ''; flex: none; width: 16px; height: 16px; margin-right: 8px; border: 2px solid var(--gold); border-radius: 4px; }
#actRow.pre .ctrl-btn.on { border-style: solid; }
#actRow.pre .ctrl-btn.on::before { content: '✓'; background: var(--gold); color: #20190e; font: 900 12px/16px 'Montserrat', sans-serif; text-align: center; }
/* the pot: denomination columns stacked upward */
.pot-pile { display: flex; align-items: flex-end; gap: 6px; }
.pot-col { display: flex; flex-direction: column-reverse; }
.pot-pile .pot-col .poker-chip { margin: 0; }
.pot-pile .pot-col .poker-chip + .poker-chip { margin-bottom: calc(var(--chip-size) * -0.82); }
/* emoji reactions land big */
.callout.chat.emoji { font-size: 52px; line-height: 1; }
.callout.chat.emoji.pop { animation: emojiPop .45s var(--ease); }
@keyframes emojiPop { 0% { transform: scale(.4); } 60% { transform: scale(1.2); } 100% { transform: scale(1); } }
.chat-emojis button:disabled, .chat-phrases button:disabled { opacity: .45; }
@media (max-width: 759px) {
  /* raise sizer: ✕ inside the panel, cards never clipped */
  .raise-panel { bottom: calc(100% - 42px); }
  .raise-panel .raise-close { top: 6px; right: 6px; width: 32px; height: 32px; }
  .raise-panel .preset-row { margin-right: 40px; }
  /* bets step off the rail onto the felt */
  .opp--left .opp-action, .opp--tl .opp-action { transform: translateX(34px); }
  .opp--right .opp-action, .opp--tr .opp-action { transform: translateX(-34px); }
  .opp--top .opp-action { margin-top: 6px; }
  /* the win pill clears the lifted winning cards */
  .turn-line.mine { transform: translate(-50%, -8px); }
}
@media (min-width: 760px) {
  .opp-fan .mini-back { width: 40px; height: 56px; margin-left: -18px; }
  #actRow { right: auto; left: calc(50% + 200px); }
}

/* ── Seventh pass ── */
/* winning hand: the hand, then what made it */
.hand-detail { display: block; font: 700 13px 'Montserrat', sans-serif; color: var(--text-dim); margin-top: 2px; }
/* bets show their chips */
.opp-action .poker-chip + .poker-chip { margin-left: -12px; }
/* my clock runs down on Raise-to while I size */
#actRow.sizing #raiseGo { background: linear-gradient(90deg, var(--gold-hi) calc(var(--t, 1) * 100%), #b89a55 0); }
#actRow.sizing #raiseGo.warn { background: linear-gradient(90deg, #f0a0a0 calc(var(--t, 1) * 100%), #a85656 0); }
/* a pre-call that lapsed flashes once */
#midBtn.lapsed { animation: lapse .45s ease-out; }
@keyframes lapse { 30% { box-shadow: 0 0 0 3px #e07a7a; } }
/* records: my rank */
.record-rank { margin-top: -2px; font: 700 13px 'Montserrat', sans-serif; color: var(--gold-hi); }
.record-rank:empty { display: none; }
/* no dead buttons at the bottom between hands */
#actRow:not(.pre):not(.sizing):has(#foldBtn:disabled) { visibility: hidden; }
@media (max-width: 759px) {
  .turn-line.win { max-width: calc(100% - 32px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
}
@media (min-width: 760px) {
  .raise-panel { left: calc(50% + 200px); right: auto; width: 370px; }
  .raise-panel .raise-close { top: 6px; right: 6px; width: 32px; height: 32px; }
  .raise-panel .preset-row { margin-right: 40px; }
}

/* ── Calmer table, uniform cards ── */
/* every card: rank top-left and bottom-right, suit in the middle */
/* my two cards stand apart so both bottom ranks show */
.hand .card + .card { margin-left: 8px; }
/* my status line doubles as my hand's name */
.me-status.held { color: var(--gold-hi); }
/* folded seats need no tag — they are dimmed */
.opp-action.pass { display: none; }
/* name · stack · status on ONE line — a second line pushed the cards and the
   action row off the bottom */
.me-bar { grid-template-columns: auto auto auto; align-items: center; }
.me-status { grid-column: auto; margin: 0; justify-content: flex-start; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 150px; }
.me-status:empty { display: none; }

/* ── Eighth pass ── */
/* under 5s the drained part goes red; the button stays a gold confirm */
#actRow.sizing #raiseGo.warn { background: linear-gradient(90deg, var(--gold-hi) calc(var(--t, 1) * 100%), #6b2a2a 0); box-shadow: 0 0 0 2px #e07a7a; color: #20190e; }
/* taps are briefly ignored after the row changes — show it */
#actRow.settling .ctrl-btn { opacity: .65; transition: opacity .1s; }
/* comfortable raise controls */
.raise-mid .step-btn, .raise-panel .step-btn { width: 44px; height: 44px; flex-basis: 44px; }
.raise-panel .raise-close { width: 40px; height: 40px; }
.raise-panel .preset-row { margin-right: 46px; }
/* revealed hands readable at showdown */
@media (max-width: 759px) {
  .opp-fan .card { width: 40px; font-size: 12px; }
  .opp--right .opp-fan .card:last-child, .opp--tr .opp-fan .card:last-child { margin-right: 6px; }
  .turn-line.win:not(.mine) { max-width: 150px; }
  .opp-score { font-size: 13px; }
}
/* records: back always reachable, rank legible */
#recordsBack { position: sticky; bottom: 12px; }
.record-rank { font-size: 16px; }
/* pre-actions: three toggles */
#actRow.pre #raiseBtn { display: flex; }
#actRow.pre .ctrl-btn { font-size: 13px; padding: 0 6px; }
@media (min-width: 760px) { .opp-name { font-size: 16px; } }
/* my cards stand straight, like the board — no tilt */
.hand .card:first-child, .hand .card:last-child { transform: none; }
.me-area.turn .hand .card:first-child, .me-area.turn .hand .card:last-child { transform: translateY(-6px); }
.hand.folded .card:first-child, .hand.folded .card:last-child { transform: translateY(12px) scale(.92); }

/* ── Clean profiles ──
   A plain circle. The timer ring is the only thing drawn around it, and only
   on that player's turn; no border, no track, no second glow. */
.player-avatar { border: 0; background: #234536; box-shadow: none; }
.seat-timer:not(.live) { visibility: hidden; }
.seat-timer .ring-bg { stroke: #ffffff14; }
.opp.turn .player-avatar, .me-area.turn #meAvatar { box-shadow: none; }
.opp.turn .avatar-wrap { transform: none; }

/* ── Ninth pass ── */
/* the drained part of Raise-to stays readable under 5s; the red ring is the cue */
#actRow.sizing #raiseGo.warn { background: linear-gradient(90deg, var(--gold-hi) calc(var(--t, 1) * 100%), #a8894e 0); }
/* my bar never re-centres as the hand name changes */
.me-status { width: 110px; }
.me-status:empty { display: flex; visibility: hidden; }
/* my D tag on the avatar's left, clear of my cards — like the opponents' */
#meTag .seat-tag { left: -6px; right: auto; bottom: -4px; }
/* even pre-action buttons */
#actRow.pre .ctrl-btn { flex: 1 1 0; min-width: 0; }
@media (max-width: 759px) {
  .turn-line.win:not(.mine) { max-width: calc(100% - 48px); }
  /* chat opens above the action row, over my own seat — the opponents stay in view */
  .chat-panel { top: auto; bottom: calc(96px + var(--keyboard-inset, 0px)); }
}
@media (min-width: 760px) {
  .me-status, .me-name { font-size: 15px; }
  .me-status { width: 160px; }
  .opp--left .opp-action { transform: translateX(24px); }
}

/* ── Tenth pass ── */
/* the bottom rank reads the right way up — a rotated 6 looked like a 9 */
.card .corner.br { transform: none; }
/* my stack column doesn't change width as digits come and go */
#meChips { min-width: 64px; }
/* no empty slots on the felt before the flop */
.board-slot { visibility: hidden; }
.record-hands { font: 600 13px 'Montserrat', sans-serif; color: var(--text-dim); margin-top: 2px; }
.record-hands:empty { display: none; }
@media (max-width: 759px) {
  /* the banner names the winner; the seat pill would sit on it */
  .opponents .opp.win .opp-action.win { display: none; }
  /* revealed cards ride a little higher, clear of the names */
  .opp-fan { top: -6px; }
}
@media (min-width: 760px) {
  .opp-fan .card { width: 56px; font-size: 15px; }
  .opp-fan .mini-back { width: 44px; height: 62px; margin-left: -26px; box-shadow: inset 0 0 0 1px #caaa6655; }
}

/* ── Eleventh pass ── */
/* the pot label never moves: the chip tower has a fixed slot above it */
.pot-pile { height: 64px; min-height: 0; align-items: flex-end; }
.table-area.showdown .pot-pile { height: 0; }
@media (max-width: 759px) {
  /* hand detail clears the revealed side-seat cards */
  .table-area.showdown #potLine { transform: translateY(-10px); }
  /* top seat's revealed cards clear the corner icons */
  .opp--top .opp-fan { top: 0; }
  /* my bar spans the row: name, stack, then the hand name pushed right */
  .me-bar { width: 100%; grid-template-columns: auto auto 1fr; }
  .me-status { width: auto; max-width: none; justify-self: end; }
  .me-name { white-space: nowrap; max-width: 130px; overflow: hidden; text-overflow: ellipsis; }
  /* a win without a showdown lands where the pot was, not by the top seats */
  .turn-line.win.solo { transform: translate(-50%, 170px); }
}
@media (min-width: 760px) {
  .opp-fan { top: -20px; }
  .me-status { width: 140px; }
  .turn-line { font-size: 15px; }
}

/* ── Twelfth pass ── */
/* the banner names the winner everywhere; no second "+N$" at the seat */
.opponents .opp.win .opp-action.win { display: none; }
@media (max-width: 759px) {
  /* raise sizer: presets + slider only, sitting just above my bar */
  .raise-panel { bottom: calc(100% + 2px); }
  .raise-mid .step-btn, .raise-panel .step-btn { display: none; }
  .raise-panel { padding: 8px 12px 14px; }
  .raise-mid { min-height: 28px; }
  /* my own win line clears the board */
  .table-area.showdown .turn-line.mine:not(.solo) { transform: translate(-50%, -14px); }
}
@media (min-width: 760px) {
  .opp--tl .opp-fan, .opp--left .opp-fan, .opp--top .opp-fan { margin-left: 6px; }
  .opp--tr .opp-fan, .opp--right .opp-fan { margin-right: 6px; }
}

/* ── Thirteenth pass ── */
/* having bet, only Call Any is a live pre-choice */
#actRow.pre.bettor #foldBtn, #actRow.pre.bettor #midBtn { display: none; }
@media (max-width: 759px) {
  /* a slimmer sizer clears the lower side seats' names and stacks */
  .raise-panel { padding: 6px 10px; gap: 6px; }
  .raise-panel .preset-btn { min-height: 36px; padding: 0; }
  .raise-mid { min-height: 24px; }
  /* a big own win stays clear of the top seats */
  .table-area.showdown .turn-line.mine { font-size: 15px; max-width: 196px; }
}
@media (min-width: 760px) {
  .opp--tl .opp-fan, .opp--tr .opp-fan { top: 4px; }
}

/* ── Fourteenth pass ── */
.table-area.showdown .pot-pile { display: none; }
@media (max-width: 759px) {
  .table-area.showdown .turn-line.mine.long { font-size: 13px; letter-spacing: 0; padding-left: 12px; padding-right: 12px; }
  body.sizing .opp--left .opp-action { transform: translate(34px, -14px); }
  body.sizing .opp--right .opp-action { transform: translate(-34px, -14px); }
}
@media (min-width: 760px) {
  .opp--tl .opp-fan { top: 12px; }
}

/* ── Fifteenth pass ── */
/* the chosen preset is lit on every screen size */
.raise-panel .preset-btn.on { background: var(--gold-hi); color: #20190e; border-color: var(--gold-hi); }
@media (max-width: 759px) {
  /* lifted lower-side bets clear both the sizer and their own stack */
  body.sizing .opp--left .opp-action { transform: translate(52px, -24px); }
  body.sizing .opp--right .opp-action { transform: translate(-52px, -24px); }
  /* the top seat's revealed cards stay off its name */
  .opp--top .opp-fan { top: -2px; }
  .opp--top .opp-fan .card { width: 34px; font-size: 10px; }
  /* during a runout the pot label sits just below the board */
  .table-area.showdown.runout #potLine { transform: translateY(4px); }
}

/* ── Sixteenth pass ── */
@media (max-width: 759px) {
  /* lifted lower-side bets clear the sizer at 812px tall too */
  body.sizing .opp--left .opp-action { transform: translate(52px, -36px); }
  body.sizing .opp--right .opp-action { transform: translate(-52px, -36px); }
}

/* ── Eighteenth pass ── */
@media (max-width: 759px) {
  /* upper seats' shown cards ride clear of their names */
  .opp--tr .opp-fan, .opp--tl .opp-fan { top: -8px; }
}
@media (max-width: 380px) {
  #actRow.pre .ctrl-btn { font-size: 12px; }
  #actRow.pre .ctrl-btn::before { margin-right: 5px; }
  body.sizing .opp--left, body.sizing .opp--right { margin-top: -8px; }
}

/* ── Records list ── */
.sb-row { gap: 10px; }
.sb-ava { width: 28px; height: 28px; flex: none; font-size: 13px; }
.sb-score { font: 700 14px 'Montserrat', sans-serif; font-variant-numeric: tabular-nums; }
.records-heading[hidden] { display: none; }
