:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #070a10;
  color: #eef4f8;
  --bg: #070a10;
  --panel: #0d131c;
  --panel-2: #101824;
  --line: #202b3a;
  --muted: #7f8b9a;
  --text: #eef4f8;
  --green: #59e3ad;
  --green-dark: #173d32;
  --blue: #6ca7ff;
  --red: #ff727d;
  --gold: #f4c76b;
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background:
  radial-gradient(circle at 42% 18%, rgba(31, 92, 74, .13), transparent 30%),
  linear-gradient(180deg, #080c12, #06080d 70%); }
button, input { font: inherit; }
button { color: inherit; }

.app-shell { width: min(1480px, calc(100% - 28px)); margin: 0 auto; padding: 22px 0 48px; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.brand-wrap { display: flex; align-items: center; gap: 12px; }
.brand-mark { width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; font-weight: 900; font-size: 20px; color: #06110d; background: linear-gradient(145deg, #72f0bd, #45b890); box-shadow: 0 8px 30px rgba(74,220,164,.22); }
.eyebrow, .panel-kicker { color: #718094; font-size: 10px; letter-spacing: .16em; font-weight: 800; }
h1, h2, h3 { margin: 0; }
h1 { margin-top: 2px; font-size: 25px; letter-spacing: -.03em; }
h1 span { color: #7b899a; font-weight: 600; }
.top-actions { display: flex; align-items: center; gap: 10px; }
.table-count { border: 1px solid var(--line); background: rgba(13,19,28,.75); padding: 9px 12px; border-radius: 12px; color: #9aa7b8; font-size: 12px; }
.table-count span { color: var(--text); font-weight: 800; }

.btn { border: 1px solid var(--line); background: #151e2a; border-radius: 11px; padding: 10px 14px; cursor: pointer; transition: .15s ease; font-weight: 750; font-size: 13px; }
.btn:hover:not(:disabled) { transform: translateY(-1px); border-color: #35455a; }
.btn:disabled { opacity: .42; cursor: default; }
.btn.primary { background: linear-gradient(180deg, #47ca97, #2d9d75); color: #04110c; border-color: #62e2b1; }
.btn.ghost { background: #0a0f16; }
.btn.full { width: 100%; }
.btn.danger-soft { background: #1b1015; border-color: #3b2029; color: #e7a1a8; }

.layout { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 16px; align-items: start; }
.left-column { min-width: 0; display: grid; gap: 16px; }
.sidebar { display: grid; gap: 12px; position: sticky; top: 12px; }
.panel, .history-card { border: 1px solid var(--line); background: linear-gradient(180deg, rgba(15,22,32,.96), rgba(9,14,21,.96)); border-radius: 16px; padding: 15px; box-shadow: 0 18px 50px rgba(0,0,0,.18); }
.panel h2 { margin-top: 4px; font-size: 18px; }
.panel h3 { margin-top: 2px; font-size: 15px; }
.hint { color: #8794a5; font-size: 12px; line-height: 1.45; margin: 8px 0 13px; }

.table-frame { border: 1px solid #233044; background: #0c121a; border-radius: 24px; padding: 28px 34px 34px; min-height: 720px; overflow: hidden; position: relative; }
.felt { position: relative; width: 100%; min-height: 650px; border-radius: 48%; border: 15px solid #253349; outline: 3px solid #52627a; background:
  radial-gradient(ellipse at center, rgba(54,157,113,.30), transparent 68%),
  linear-gradient(155deg, #0f6045, #0c4b38 58%, #083528);
  box-shadow: inset 0 0 90px rgba(0,0,0,.42), 0 25px 60px rgba(0,0,0,.28); }
.felt::before { content:""; position:absolute; inset:10px; border-radius:48%; border:1px solid rgba(255,255,255,.08); pointer-events:none; }
.table-glow { position:absolute; inset:12%; border-radius:50%; background:radial-gradient(ellipse, rgba(80,221,167,.12), transparent 65%); pointer-events:none; }

.table-center { position: absolute; inset: 50% auto auto 50%; transform: translate(-50%, -48%); width: 58%; display: grid; justify-items: center; text-align: center; z-index: 2; }
.street-badge { font-size: 10px; letter-spacing: .18em; font-weight: 850; color: #c2d5cc; background: rgba(4,25,19,.65); border: 1px solid rgba(129,231,193,.15); border-radius: 999px; padding: 6px 10px; }
.board-cards { display: flex; justify-content: center; gap: 8px; min-height: 88px; margin: 13px 0 10px; }
.card { width: 58px; height: 82px; border-radius: 9px; background: linear-gradient(160deg, #fff, #e8edf0); color: #111820; display: grid; place-items: center; font-size: 20px; font-weight: 900; border: 1px solid rgba(0,0,0,.18); box-shadow: 0 8px 20px rgba(0,0,0,.27); }
.card.red { color: #cf3545; }
.card.back { background: repeating-linear-gradient(45deg, #1f2d45 0 5px, #3a5279 5px 10px); border: 2px solid #9db3d0; }
.player-cards .card { width: 39px; height: 55px; font-size: 14px; border-radius: 7px; }
.pot-box { min-width: 120px; padding: 7px 12px; border-radius: 10px; border: 1px solid rgba(255,255,255,.1); background: rgba(5,22,17,.72); }
.pot-box span { font-size: 9px; color: #9eb9ad; letter-spacing: .14em; font-weight: 800; display:block; }
.pot-box strong { font-size: 16px; display:block; margin-top:1px; }
.result-text { margin-top: 11px; min-height: 34px; max-width: 620px; font-size: 12px; line-height: 1.45; color: #d9e7e0; }

.seat { position: absolute; z-index: 4; width: 164px; min-height: 92px; transform: translate(-50%, -50%); }
.seat-0 { left: 50%; top: 94%; }
.seat-1 { left: 18%; top: 82%; }
.seat-2 { left: 7%; top: 48%; }
.seat-3 { left: 27%; top: 8%; }
.seat-4 { left: 73%; top: 8%; }
.seat-5 { left: 93%; top: 48%; }
.seat-6 { left: 82%; top: 82%; }

.seat-card { position: relative; min-height: 80px; border: 1px solid #33435a; background: rgba(11,17,26,.96); border-radius: 14px; padding: 9px 10px 8px; box-shadow: 0 10px 30px rgba(0,0,0,.32); transition:.15s ease; }
.seat-card.active-turn { border-color: #58e2ad; box-shadow: 0 0 0 2px rgba(88,226,173,.12), 0 10px 34px rgba(0,0,0,.35); }
.seat-card.folded { opacity: .42; filter: saturate(.55); }
.seat-card.all-in { border-color: #e0b55e; }
.seat-topline { display:flex; align-items:center; justify-content:space-between; gap:6px; }
.seat-name { min-width:0; font-size:12px; font-weight:850; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.position-chip { flex:0 0 auto; font-size:8px; letter-spacing:.08em; font-weight:900; border-radius:999px; padding:3px 5px; background:#182332; color:#9eb0c4; }
.position-chip.btn-pos { background:#4b2730; color:#ffc0c7; }
.seat-stack { font-size:11px; color:#9aa7b7; margin-top:3px; }
.seat-meta { display:flex; align-items:center; justify-content:space-between; gap:6px; margin-top:7px; }
.bot-level { font-size:8px; text-transform:uppercase; letter-spacing:.05em; color:#6e7d8f; }
.player-cards { display:flex; gap:3px; min-height:55px; }
.seat-edit { position:absolute; right:-7px; top:-7px; width:23px; height:23px; border-radius:50%; border:1px solid #3a4b61; background:#121b28; display:grid; place-items:center; font-size:12px; cursor:pointer; }
.seat-empty { width:100%; min-height:76px; border:1px dashed #53657b; background:rgba(9,14,21,.62); color:#a8b7c8; border-radius:14px; cursor:pointer; display:grid; place-items:center; gap:2px; padding:9px; }
.seat-empty strong { color:#dce8f1; font-size:12px; }
.seat-empty span { color:#6f8093; font-size:9px; letter-spacing:.08em; }
.seat-empty:hover { border-color:#6fe6b6; color:#6fe6b6; }
.seat-lock { opacity:.45; cursor:not-allowed; }

.section-title-row { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.section-title-row h2 { font-size:16px; margin-top:3px; }
.section-title-row.compact { margin-bottom:10px; }
.text-link { color:#7baeff; font-size:11px; text-decoration:none; }
.text-link.disabled { opacity:.4; pointer-events:none; }
.history-list { margin-top:12px; display:grid; gap:5px; max-height:310px; overflow:auto; padding-right:3px; }
.history-row { display:grid; grid-template-columns:72px 110px minmax(0,1fr) 85px; gap:9px; align-items:center; background:#090e15; border:1px solid #17212e; border-radius:9px; padding:7px 9px; font-size:11px; }
.history-street { color:#667589; text-transform:uppercase; font-size:9px; letter-spacing:.06em; }
.history-player { font-weight:800; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.history-player.hero { color:#67dfb0; }
.history-action { color:#c7d1dc; }
.history-pot { color:#6e7d8e; text-align:right; }
.empty-state { color:#68778a; padding:16px 4px; font-size:12px; }

.action-grid { display:grid; grid-template-columns:1fr 1fr; gap:7px; }
.action-grid button { border:1px solid #293749; background:#121a25; border-radius:10px; padding:11px 8px; font-weight:850; font-size:11px; cursor:pointer; }
.action-grid button.primary { background:#17382e; border-color:#356c58; color:#8ff0c8; }
.action-grid button.fold { color:#e9a1a7; background:#211218; border-color:#46242d; }
.action-grid button.all-in { color:#ffd081; background:#241c0d; border-color:#59461e; }
.sizing-wrap { margin-top:12px; padding-top:12px; border-top:1px solid #1e2937; }
.sizing-wrap label { color:#788698; font-size:10px; }
.amount-row { display:flex; align-items:center; gap:7px; margin-top:5px; }
.amount-row input { width:100%; border:1px solid #293749; background:#080d14; color:#f3f7fa; border-radius:9px; padding:9px 10px; outline:none; }
.amount-row span { color:#7a899b; font-size:11px; }
.quick-sizes { display:grid; grid-template-columns:repeat(4,1fr); gap:5px; margin-top:6px; }
.quick-sizes button { border:1px solid #253244; background:#101721; border-radius:8px; padding:7px 3px; font-size:10px; cursor:pointer; }

.mini-badge { font-size:9px; font-weight:850; background:#182333; color:#8da4bd; border-radius:7px; padding:4px 6px; }
.solver-note, .solver-warning { color:#77869a; font-size:10px; line-height:1.5; margin-top:10px; }
.solver-loading { color:#81c8ac; font-size:11px; margin-top:9px; }
.review-card { border:1px solid #223044; background:#090f17; border-radius:10px; padding:9px; margin:9px 0; }
.review-grade { font-size:11px; font-weight:900; color:#6fe6b6; }
.review-grade.mid { color:#efc36d; }
.review-grade.bad { color:#ff7d88; }
.review-meta { color:#9aa8b8; font-size:10px; line-height:1.55; margin-top:3px; }
.solver-actions { display:grid; gap:6px; margin-top:9px; }
.solver-row { border:1px solid #1c2735; border-radius:8px; padding:7px; background:#090e15; }
.solver-row.best { border-color:#315d4d; }
.solver-row-top { display:grid; grid-template-columns:1fr 44px 56px; gap:5px; font-size:9px; }
.solver-frequency, .solver-ev { text-align:right; color:#93a1b2; }
.solver-bar { height:3px; background:#111b27; border-radius:99px; margin-top:5px; overflow:hidden; }
.solver-bar span { display:block; height:100%; background:#59d6a7; border-radius:99px; }

.stats-grid { display:grid; grid-template-columns:1fr 1fr; gap:7px; margin:10px 0; }
.stats-grid div { border:1px solid #1d2836; background:#090e15; border-radius:9px; padding:8px; }
.stats-grid span { display:block; color:#6f7e90; font-size:9px; }
.stats-grid strong { display:block; margin-top:2px; font-size:11px; }
.format-panel { display:grid; gap:8px; }
.format-row { display:flex; justify-content:space-between; gap:10px; font-size:10px; color:#6f7e90; }
.format-row strong { color:#bdc8d4; text-align:right; }

.modal-backdrop { position:fixed; inset:0; z-index:50; display:grid; place-items:center; padding:16px; background:rgba(2,5,9,.74); backdrop-filter:blur(6px); }
.modal-backdrop[hidden] { display:none; }
.modal { position:relative; width:min(430px,100%); border:1px solid #2b394b; background:linear-gradient(180deg,#111925,#0b1018); border-radius:18px; padding:20px; box-shadow:0 30px 100px rgba(0,0,0,.55); }
.modal h2 { margin:4px 0 18px; font-size:21px; }
.modal-close { position:absolute; right:12px; top:10px; border:0; background:transparent; color:#748397; font-size:24px; cursor:pointer; }
.field-label { display:block; color:#7f8da0; font-size:10px; font-weight:800; margin:12px 0 5px; }
.modal-input { width:100%; border:1px solid #2b394b; background:#080d14; color:#f0f5f8; border-radius:10px; padding:10px 11px; outline:none; }
.difficulty-grid { display:grid; grid-template-columns:1fr 1fr; gap:7px; }
.difficulty-grid button { text-align:left; border:1px solid #253244; background:#0c121b; border-radius:10px; padding:9px; cursor:pointer; }
.difficulty-grid button.active { border-color:#56dbaa; background:#112d25; }
.difficulty-grid strong { display:block; font-size:11px; }
.difficulty-grid span { display:block; color:#6e7d8f; font-size:9px; margin-top:2px; }
.modal-actions { display:flex; justify-content:flex-end; gap:8px; margin-top:18px; }

@media (max-width: 1120px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { position:static; grid-template-columns:repeat(2,minmax(0,1fr)); }
  .action-panel { grid-row:span 2; }
}
@media (max-width: 780px) {
  .app-shell { width:min(100% - 12px,1480px); padding-top:10px; }
  .topbar { align-items:flex-start; }
  .table-count { display:none; }
  .table-frame { min-height:620px; padding:18px 10px 28px; overflow:auto; }
  .felt { min-width:720px; min-height:560px; }
  .seat { width:142px; }
  .sidebar { grid-template-columns:1fr; }
  .history-row { grid-template-columns:58px 80px 1fr; }
  .history-pot { display:none; }
}


/* v0.7.1 — визуальные фишки и ставки */
.felt { overflow: visible; }
.table-center { pointer-events: none; }
.pot-chips { height: 30px; min-width: 92px; display:flex; align-items:flex-end; justify-content:center; margin-bottom:2px; opacity:.2; transition:opacity .18s ease; }
.pot-chips.has-chips { opacity:1; }
.chip-stack { position:relative; display:inline-block; width:92px; height:29px; vertical-align:middle; }
.chip-stack.compact { width:53px; height:22px; }
.poker-chip { position:absolute; left:50%; bottom:0; width:25px; height:9px; transform:translateX(calc(-50% + (var(--i) - 3) * 8px)) translateY(calc(var(--i) * -1px)); border-radius:50%; border:2px dashed rgba(255,255,255,.82); box-shadow:0 2px 4px rgba(0,0,0,.42), inset 0 0 0 2px rgba(0,0,0,.18); }
.chip-stack.compact .poker-chip { width:20px; height:8px; transform:translateX(calc(-50% + (var(--i) - 2) * 6px)) translateY(calc(var(--i) * -1px)); }
.chip-100 { background:#232830; border-color:#e6c760; }
.chip-25 { background:#1f9b66; border-color:#e9fff6; }
.chip-5 { background:#d84b59; border-color:#fff0f2; }
.chip-1 { background:#e9edf2; border-color:#3d7fb9; }
.chip-05 { background:#724fb8; border-color:#f2e9ff; }

.bet-marker { position:absolute; z-index:7; display:flex; align-items:center; gap:4px; white-space:nowrap; padding:3px 6px 3px 2px; border-radius:999px; background:rgba(5,15,15,.88); border:1px solid rgba(126,238,191,.25); box-shadow:0 5px 14px rgba(0,0,0,.34); animation:bet-pop .16s ease-out; }
.bet-marker span { color:#dcf7ea; font-size:9px; font-weight:850; text-shadow:0 1px 2px #000; }
@keyframes bet-pop { from { opacity:0; transform:scale(.82); } to { opacity:1; } }
.seat-0 .bet-marker { left:50%; top:-36px; transform:translateX(-50%); }
.seat-1 .bet-marker { left:86%; top:-22px; }
.seat-2 .bet-marker { left:103%; top:41%; }
.seat-3 .bet-marker { left:74%; top:94%; }
.seat-4 .bet-marker { right:74%; top:94%; }
.seat-5 .bet-marker { right:103%; top:41%; }
.seat-6 .bet-marker { right:86%; top:-22px; }

.dealer-button { position:absolute; z-index:8; right:-12px; bottom:8px; width:25px; height:25px; border-radius:50%; display:grid; place-items:center; background:linear-gradient(145deg,#f8fbfd,#aeb8bf); border:2px solid #303a42; color:#172029; font-size:11px; font-weight:950; box-shadow:0 3px 9px rgba(0,0,0,.42); }
.player-status { position:absolute; z-index:8; left:50%; top:-10px; transform:translateX(-50%); border-radius:999px; padding:2px 7px; font-size:8px; line-height:1.3; font-weight:950; letter-spacing:.08em; box-shadow:0 3px 9px rgba(0,0,0,.38); }
.status-turn { background:#4ce0a8; color:#062118; }
.status-allin { background:#e8b952; color:#2c1d02; }
.status-fold { background:#3a242a; color:#f0a4ae; }
.seat-card.active-turn { animation:turn-pulse 1.5s ease-in-out infinite; }
@keyframes turn-pulse { 0%,100% { box-shadow:0 0 0 2px rgba(88,226,173,.10),0 10px 34px rgba(0,0,0,.35); } 50% { box-shadow:0 0 0 4px rgba(88,226,173,.20),0 0 24px rgba(88,226,173,.18),0 10px 34px rgba(0,0,0,.35); } }

/* лёгкая фактура сукна без внешних картинок */
.felt::after { content:""; position:absolute; inset:22px; border-radius:43%; pointer-events:none; opacity:.18; background-image:radial-gradient(rgba(255,255,255,.13) .55px, transparent .7px); background-size:5px 5px; mix-blend-mode:soft-light; }

/* v0.7.2 — движение фишек */
.chip-flight {
  position: absolute;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 4px;
  pointer-events: none;
  will-change: transform, opacity;
  filter: drop-shadow(0 7px 9px rgba(0,0,0,.42));
}
.chip-flight > span {
  display: block;
  white-space: nowrap;
  padding: 3px 6px;
  border-radius: 999px;
  background: rgba(4,12,12,.9);
  border: 1px solid rgba(111,230,182,.28);
  color: #e0f8ee;
  font-size: 8px;
  font-weight: 900;
  text-shadow: 0 1px 2px #000;
}
.chip-flight.parked { z-index: 15; }
.pot-chips.pot-impact { animation: pot-impact .22s ease-out; }
@keyframes pot-impact {
  0% { transform: scale(.88); filter: brightness(1.45); }
  65% { transform: scale(1.10); }
  100% { transform: scale(1); filter: brightness(1); }
}
.seat-card.winner-impact { animation: winner-impact .34s ease-out !important; }
@keyframes winner-impact {
  0% { box-shadow: 0 0 0 2px rgba(244,199,107,.2), 0 10px 34px rgba(0,0,0,.35); }
  50% { box-shadow: 0 0 0 5px rgba(244,199,107,.55), 0 0 36px rgba(244,199,107,.34), 0 10px 34px rgba(0,0,0,.35); transform: translateY(-2px); }
  100% { box-shadow: 0 10px 34px rgba(0,0,0,.35); transform: none; }
}
.chips-moving #actionButtons button,
.chips-moving #newHand,
.chips-moving [data-add-seat],
.chips-moving [data-edit-seat] {
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  .chip-flight { display: none !important; }
  .seat-card.active-turn,
  .pot-chips.pot-impact,
  .seat-card.winner-impact { animation: none !important; }
}
.bet-marker.fx-collected { opacity: .12; transform: scale(.92); transition: opacity .16s ease, transform .16s ease; }


/* v0.7.3 — раздача и открытие карт */
.deck-anchor {
  position: absolute;
  z-index: 9;
  left: 31%;
  top: 57%;
  width: 42px;
  height: 58px;
  transform: translate(-50%, -50%) rotate(-7deg);
  opacity: .58;
  pointer-events: none;
  transition: opacity .16s ease, filter .16s ease, transform .16s ease;
}
.deck-anchor i {
  position: absolute;
  inset: 0;
  border-radius: 7px;
  border: 2px solid #9db3d0;
  background:
    linear-gradient(45deg, transparent 46%, rgba(255,255,255,.17) 47% 53%, transparent 54%),
    repeating-linear-gradient(45deg, #1f2d45 0 5px, #3a5279 5px 10px);
  box-shadow: 0 5px 12px rgba(0,0,0,.28);
}
.deck-anchor i:nth-child(1) { transform: translate(-4px, 3px); opacity:.55; }
.deck-anchor i:nth-child(2) { transform: translate(-2px, 1px); opacity:.8; }
.deck-anchor i:nth-child(3) { transform: none; }
.deck-anchor.active {
  opacity: 1;
  filter: drop-shadow(0 0 10px rgba(121,218,184,.34));
  transform: translate(-50%, -50%) rotate(-4deg) scale(1.04);
}

.card-flight {
  position: absolute;
  z-index: 46;
  pointer-events: none;
  perspective: 500px;
  filter: drop-shadow(0 10px 12px rgba(0,0,0,.42));
  will-change: transform, opacity;
}
.card-flight .flight-card {
  width: 46px;
  height: 64px;
  font-size: 15px;
  border-radius: 7px;
}
.player-cards .card.deal-hidden,
.board-cards .card.community-hidden {
  opacity: 0 !important;
}
.player-cards .card,
.board-cards .card {
  transform-style: preserve-3d;
  backface-visibility: hidden;
}
.card.is-flipping { will-change: transform; }

.street-splash {
  position: absolute;
  z-index: 45;
  left: 50%;
  top: 38%;
  transform: translate(-50%, -50%) scale(.86);
  opacity: 0;
  pointer-events: none;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid rgba(119,239,195,.28);
  background: rgba(4,19,15,.88);
  box-shadow: 0 10px 35px rgba(0,0,0,.32), 0 0 24px rgba(89,227,173,.10);
  color: #bff8df;
  font-size: 11px;
  font-weight: 950;
  letter-spacing: .18em;
}
.street-splash.show { animation: street-splash .30s ease-out; }
@keyframes street-splash {
  0% { opacity:0; transform:translate(-50%,-50%) scale(.80); }
  35% { opacity:1; transform:translate(-50%,-50%) scale(1.05); }
  75% { opacity:1; transform:translate(-50%,-50%) scale(1); }
  100% { opacity:0; transform:translate(-50%,-56%) scale(.98); }
}

.cards-moving #actionButtons button,
.cards-moving #newHand,
.cards-moving [data-add-seat],
.cards-moving [data-edit-seat] {
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  .card-flight { display:none !important; }
  .street-splash { display:none !important; }
  .deck-anchor { transition:none; }
  .player-cards .card.deal-hidden,
  .board-cards .card.community-hidden { opacity:1 !important; }
}

/* v0.8 — профили и долговременная модель игрока */
.profile-head { margin-bottom: 10px; }
.profile-controls { display:grid; grid-template-columns:minmax(0,1fr) 34px 34px; gap:7px; align-items:center; }
.profile-controls select {
  min-width:0;
  width:100%;
  border:1px solid #263447;
  background:#080d14;
  color:#edf4f7;
  border-radius:10px;
  padding:9px 10px;
  outline:none;
  font-size:10px;
  font-weight:750;
}
.profile-controls select:focus { border-color:#4fbc94; box-shadow:0 0 0 2px rgba(89,227,173,.08); }
.profile-controls select:disabled { opacity:.55; }
.profile-icon-btn {
  height:34px;
  border:1px solid #263447;
  background:#0b121b;
  color:#a9b7c7;
  border-radius:10px;
  cursor:pointer;
  font-size:16px;
  font-weight:800;
}
.profile-icon-btn:hover:not(:disabled) { border-color:#4e977d; color:#d9fff0; background:#102219; }
.profile-icon-btn:disabled { opacity:.35; cursor:not-allowed; }
.profile-help { margin:7px 1px 2px; color:#69788b; font-size:9px; line-height:1.45; }
.profile-stats { grid-template-columns:1fr 1fr; }
.model-box { margin:10px 0 12px; border:1px solid #1f2b39; background:linear-gradient(180deg,#0a1119,#080d13); border-radius:11px; padding:10px; }
.model-topline { display:flex; align-items:center; justify-content:space-between; gap:10px; color:#738295; font-size:9px; }
.model-topline strong { color:#bdeed9; font-size:10px; }
.confidence-track { margin-top:6px; height:5px; overflow:hidden; border-radius:999px; background:#151f2b; }
.confidence-track span { display:block; height:100%; width:0; border-radius:inherit; background:linear-gradient(90deg,#2d7f65,#5be4ae); transition:width .3s ease; box-shadow:0 0 10px rgba(91,228,174,.16); }
.model-traits { display:grid; gap:6px; margin-top:9px; }
.model-empty { color:#667588; font-size:9px; line-height:1.45; }
.model-trait { display:grid; grid-template-columns:minmax(0,1fr) 48px; gap:8px; align-items:center; border-top:1px solid #151f2b; padding-top:6px; }
.model-trait:first-child { border-top:0; padding-top:0; }
.model-trait strong { display:block; color:#cbd6df; font-size:9px; line-height:1.25; }
.model-trait span { display:block; margin-top:2px; color:#69788b; font-size:8px; }
.model-trait i { display:block; position:relative; height:4px; border-radius:999px; background:#17212c; overflow:hidden; }
.model-trait i::after { content:""; position:absolute; inset:0 auto 0 0; width:var(--strength); border-radius:inherit; background:#4dcf9e; }
.profile-modal-note { margin-top:9px; color:#718095; font-size:9px; line-height:1.5; }

@media (max-width:1120px) {
  .stats-panel { align-self:start; }
}

/* v0.9 multi-profile seats + saved tables */
.occupant-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 12px 0 16px;
}
.occupant-tab {
  border: 1px solid #27313d;
  background: #0c1118;
  color: #aab5c2;
  border-radius: 10px;
  padding: 11px 12px;
  font-weight: 700;
}
.occupant-tab.active {
  color: #eafff6;
  border-color: #2f8c69;
  background: #102b22;
}
.saved-table-create { display: grid; gap: 9px; margin-top: 12px; }
.saved-tables-list { display: grid; gap: 8px; margin-top: 12px; }
.saved-table-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
  border: 1px solid #202936;
  background: #090e14;
  border-radius: 11px;
  padding: 10px;
}
.saved-table-row.current { border-color: #34795f; background: #0b1713; }
.saved-table-main { min-width: 0; }
.saved-table-main strong { display: block; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.saved-table-main span { color: #748092; font-size: 11px; }
.saved-table-actions { display: flex; gap: 5px; }
.saved-table-actions button {
  border: 1px solid #27313d;
  background: #10161e;
  color: #c7d0dc;
  border-radius: 8px;
  padding: 6px 8px;
  cursor: pointer;
}
.saved-table-actions button.danger { color: #ff9a9a; }
.seat-human .bot-level { color: #8edab9; }
.seat-bot .bot-level { color: #9cadd0; }
.hotseat-callout {
  border: 1px solid #2d8061;
  background: #0d241c;
  color: #c9ffe8;
  border-radius: 10px;
  padding: 10px 11px;
  margin-top: 10px;
  font-size: 12px;
}

/* v0.9.1: continuous sessions + bot-only spectator mode */
.top-actions { flex-wrap: wrap; justify-content: flex-end; }
.btn.mode-active {
  border-color: #2ca97e;
  background: linear-gradient(180deg, #0f2f26, #0b211b);
  color: #89f2cd;
  box-shadow: inset 0 0 0 1px rgba(73, 216, 163, .08), 0 0 18px rgba(48, 197, 142, .08);
}
.btn.spectator-paused {
  border-color: #9b7b38;
  color: #f3cd78;
  background: #251f12;
}
body.spectator-mode .action-panel {
  border-color: rgba(72, 180, 143, .35);
  background: linear-gradient(180deg, rgba(12, 28, 24, .96), rgba(9, 14, 18, .96));
}
body.spectator-mode .action-panel .panel-kicker { color: #69d8b1; }
@media (max-width: 760px) {
  .top-actions { width: 100%; justify-content: stretch; }
  .top-actions .btn { flex: 1 1 auto; }
  .table-count { width: 100%; text-align: center; }
}

/* v0.9.2 · bot bust cooldown */
.compact-select {
  min-width: 145px;
  border: 1px solid #2b3441;
  border-radius: 9px;
  background: #0a0f15;
  color: #eef3f7;
  padding: 7px 9px;
  font-size: 12px;
}
.compact-select:disabled { opacity: .45; }
.cooldown-setting-row { align-items: center; }
.cooldown-box {
  margin-top: 10px;
  border: 1px solid #232b35;
  border-radius: 12px;
  background: #0a0e13;
  padding: 10px;
}
.cooldown-box-title {
  color: #687482;
  font-size: 10px;
  letter-spacing: .15em;
  margin-bottom: 7px;
}
.cooldown-list {
  display: grid;
  gap: 6px;
  color: #8994a2;
  font-size: 12px;
}
.cooldown-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  border-radius: 8px;
  padding: 7px 8px;
  background: #0e141b;
}
.cooldown-row strong { color: #dce4ec; font-weight: 650; }
.cooldown-row span { color: #93a0ad; text-align: right; }

/* =========================================================
   v0.10 — NIGHT / NEON UI OVERHAUL
   ========================================================= */
:root {
  --bg: #050711;
  --panel: rgba(9, 12, 24, .82);
  --panel-2: rgba(13, 17, 31, .9);
  --line: rgba(118, 139, 191, .18);
  --muted: #7b89a4;
  --text: #f2f6ff;
  --green: #51f0c7;
  --cyan: #58ddff;
  --violet: #9270ff;
  --magenta: #ff5fd2;
  --red: #ff6f91;
  --gold: #ffd271;
}

html { background:#04050b; }
body {
  background:
    radial-gradient(circle at 13% 12%, rgba(73, 67, 255, .16), transparent 26%),
    radial-gradient(circle at 86% 9%, rgba(255, 55, 190, .10), transparent 24%),
    radial-gradient(circle at 50% 54%, rgba(29, 219, 205, .07), transparent 38%),
    linear-gradient(180deg, #050711 0%, #04050a 56%, #020308 100%);
  background-attachment: fixed;
}
body::before {
  content:"";
  position:fixed;
  inset:0;
  pointer-events:none;
  opacity:.24;
  background-image:
    linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px);
  background-size:44px 44px;
  mask-image:linear-gradient(to bottom, rgba(0,0,0,.65), transparent 76%);
}

.app-shell { width:min(1510px, calc(100% - 30px)); padding-top:18px; }
.topbar {
  border:1px solid rgba(104, 125, 179, .15);
  background:rgba(6, 9, 18, .58);
  backdrop-filter:blur(18px);
  border-radius:18px;
  padding:12px 14px;
  box-shadow:0 18px 55px rgba(0,0,0,.22), inset 0 1px 0 rgba(255,255,255,.025);
}
.brand-mark {
  color:#071018;
  background:linear-gradient(145deg, #67e7ff, #7c6cff 58%, #fa67d6);
  box-shadow:0 0 28px rgba(87, 215, 255, .20), 0 0 44px rgba(147, 93, 255, .12);
}
h1 span { color:#8190ad; }
.eyebrow,.panel-kicker { color:#697994; }

.btn,
.action-grid button,
.quick-sizes button,
.profile-icon-btn,
.occupant-tab,
.saved-table-actions button {
  border-color:rgba(109, 130, 180, .2);
  background:linear-gradient(180deg, rgba(19,24,42,.92), rgba(10,14,27,.94));
  box-shadow:inset 0 1px 0 rgba(255,255,255,.025);
}
.btn:hover:not(:disabled),
.action-grid button:hover:not(:disabled),
.quick-sizes button:hover:not(:disabled) {
  border-color:rgba(94, 219, 255, .46);
  box-shadow:0 0 18px rgba(76, 201, 240, .08), inset 0 1px 0 rgba(255,255,255,.04);
}
.btn.primary,
.action-grid button.primary {
  color:#061116;
  border-color:rgba(101, 239, 232, .68);
  background:linear-gradient(135deg, #53e4e8, #6b9cff 58%, #9d72ff);
  box-shadow:0 0 24px rgba(79, 218, 233, .12);
}
.btn.danger-soft,.action-grid button.fold {
  background:rgba(51, 15, 35, .55);
  border-color:rgba(255, 93, 145, .28);
  color:#ff9ebc;
}
.action-grid button.all-in {
  color:#ffe0a2;
  background:rgba(47, 31, 9, .60);
  border-color:rgba(255, 202, 96, .32);
}

.panel,.history-card {
  border-color:rgba(106, 127, 176, .16);
  background:linear-gradient(180deg, rgba(11,15,30,.87), rgba(6,9,18,.91));
  backdrop-filter:blur(18px);
  box-shadow:0 20px 55px rgba(0,0,0,.26), inset 0 1px 0 rgba(255,255,255,.022);
}

.table-frame {
  background:
    radial-gradient(circle at 50% 6%, rgba(88, 97, 255, .08), transparent 34%),
    linear-gradient(180deg, rgba(6,9,19,.95), rgba(3,5,12,.98));
  border:1px solid rgba(106, 130, 193, .16);
  box-shadow:0 30px 90px rgba(0,0,0,.34), inset 0 1px 0 rgba(255,255,255,.025);
  border-radius:28px;
}
.felt {
  border:12px solid #12182b;
  outline:1px solid rgba(85, 219, 255, .42);
  background:
    radial-gradient(ellipse at 50% 48%, rgba(26, 138, 142, .23), transparent 55%),
    radial-gradient(ellipse at 18% 22%, rgba(121, 76, 255, .10), transparent 34%),
    linear-gradient(145deg, #071e27, #071820 53%, #08131c);
  box-shadow:
    inset 0 0 115px rgba(0,0,0,.72),
    inset 0 0 36px rgba(55, 216, 230, .06),
    0 0 0 4px rgba(89, 110, 188, .06),
    0 0 40px rgba(61, 205, 233, .09),
    0 30px 80px rgba(0,0,0,.40);
}
.felt::before {
  inset:8px;
  border:1px solid rgba(83, 224, 255, .16);
  box-shadow:inset 0 0 26px rgba(104, 82, 255, .05);
}
.felt::after {
  opacity:.08;
  background-image:radial-gradient(rgba(145, 232, 255, .36) .5px, transparent .65px);
  background-size:6px 6px;
}
.table-glow {
  inset:9%;
  background:
    radial-gradient(ellipse at 35% 48%, rgba(69, 238, 232, .10), transparent 55%),
    radial-gradient(ellipse at 70% 42%, rgba(140, 78, 255, .09), transparent 52%);
  filter:blur(4px);
}
.street-badge {
  color:#c5f9ff;
  background:rgba(5, 15, 28, .66);
  border-color:rgba(87, 222, 255, .20);
  box-shadow:0 0 18px rgba(82, 218, 255, .06);
}
.pot-box {
  background:rgba(5, 11, 23, .76);
  border-color:rgba(94, 221, 255, .16);
  box-shadow:0 0 22px rgba(78, 201, 255, .05);
}
.pot-box span { color:#79a8b5; }
.result-text { color:#cfd9e8; }

/* Seats: avatar first, no rectangular player backing. */
.seat { width:176px; min-height:98px; }
.seat-card {
  min-height:88px;
  display:grid;
  grid-template-columns:50px minmax(0,1fr);
  grid-template-rows:auto auto;
  column-gap:9px;
  align-items:center;
  padding:0;
  border:0;
  background:transparent;
  border-radius:0;
  box-shadow:none;
  overflow:visible;
}
.avatar-wrap {
  position:relative;
  grid-row:1 / span 2;
  width:50px;
  height:50px;
  align-self:start;
}
.player-avatar {
  width:50px;
  height:50px;
  border-radius:50%;
  display:grid;
  place-items:center;
  color:#f4fbff;
  font-weight:950;
  font-size:13px;
  letter-spacing:.03em;
  border:2px solid hsla(var(--avatar-hue), 88%, 72%, .72);
  background:
    radial-gradient(circle at 33% 26%, hsla(var(--avatar-hue), 90%, 72%, .44), transparent 34%),
    linear-gradient(145deg, hsla(var(--avatar-hue), 62%, 33%, .92), hsla(calc(var(--avatar-hue) + 30), 58%, 17%, .96));
  box-shadow:
    inset 0 0 0 3px rgba(5,8,17,.78),
    0 8px 18px rgba(0,0,0,.38),
    0 0 20px hsla(var(--avatar-hue), 85%, 62%, .13);
  transition:transform .18s ease, box-shadow .18s ease, border-color .18s ease, filter .18s ease;
}
.seat-human .player-avatar {
  background:
    radial-gradient(circle at 33% 26%, rgba(255, 111, 221, .38), transparent 34%),
    linear-gradient(145deg, #47266e, #172a58);
}
.seat-bot .player-avatar span { text-shadow:0 0 12px rgba(99, 229, 255, .42); }
.seat-card.active-turn .player-avatar {
  transform:translateY(-2px) scale(1.045);
  border-color:#6ef5ff;
  box-shadow:
    inset 0 0 0 3px rgba(5,8,17,.72),
    0 8px 22px rgba(0,0,0,.38),
    0 0 0 4px rgba(81, 226, 255, .09),
    0 0 28px rgba(73, 220, 255, .34),
    0 0 50px rgba(135, 90, 255, .12);
}
.seat-card.active-turn { animation:none; }
.seat-card.folded { opacity:.38; filter:saturate(.45); }
.seat-card.all-in .player-avatar {
  border-color:#ffd477;
  box-shadow:inset 0 0 0 3px rgba(5,8,17,.75), 0 0 28px rgba(255, 194, 82, .26);
}
.seat-identity {
  min-width:0;
  align-self:start;
  margin-top:2px;
  padding:6px 8px 5px 9px;
  border-radius:12px;
  background:linear-gradient(90deg, rgba(5,8,18,.82), rgba(5,8,18,.34) 76%, transparent);
  border-left:1px solid rgba(121, 165, 225, .18);
  backdrop-filter:blur(8px);
}
.seat-topline { justify-content:flex-start; gap:6px; }
.seat-name { font-size:12px; color:#f3f7ff; text-shadow:0 1px 5px rgba(0,0,0,.55); }
.seat-stack { margin-top:2px; font-size:11px; color:#a9b9d1; font-weight:780; }
.bot-level { margin-top:2px; font-size:7px; color:#61708b; }
.seat-human .bot-level { color:#a487d9; }
.seat-bot .bot-level { color:#68a9bc; }
.position-chip {
  font-size:7px;
  padding:2px 5px;
  color:#9cb0c9;
  background:rgba(40, 54, 85, .56);
  border:1px solid rgba(125, 155, 210, .12);
}
.position-chip.btn-pos {
  color:#ffd1f2;
  background:rgba(100, 31, 83, .44);
  border-color:rgba(255, 111, 214, .16);
}
.player-cards {
  grid-column:2;
  min-height:45px;
  margin-top:4px;
  align-items:center;
}
.player-cards .card {
  width:34px;
  height:47px;
  font-size:12px;
  border-radius:7px;
  box-shadow:0 7px 16px rgba(0,0,0,.34), 0 0 0 1px rgba(255,255,255,.04);
}
.player-status {
  position:absolute;
  left:50%;
  bottom:-9px;
  transform:translateX(-50%);
  z-index:8;
  white-space:nowrap;
  font-size:7px;
  letter-spacing:.06em;
  padding:3px 6px;
  border-radius:999px;
  background:#080b14;
  border:1px solid rgba(113, 138, 192, .18);
  color:#9caac1;
  box-shadow:0 5px 12px rgba(0,0,0,.32);
}
.status-turn,.status-thinking { color:#92f5ff; border-color:rgba(86, 226, 255, .28); }
.status-allin { color:#ffd98a; border-color:rgba(255, 205, 104, .28); }
.status-fold { color:#9a8491; }
.thinking-dots { display:inline-flex; gap:2px; margin-left:4px; vertical-align:middle; }
.thinking-dots b { width:3px; height:3px; border-radius:50%; background:currentColor; opacity:.28; animation:thinking-dot 1.1s ease-in-out infinite; }
.thinking-dots b:nth-child(2){ animation-delay:.16s; }
.thinking-dots b:nth-child(3){ animation-delay:.32s; }
@keyframes thinking-dot { 0%,70%,100%{ transform:translateY(0); opacity:.25;} 35%{transform:translateY(-2px); opacity:1;} }
.dealer-button {
  width:23px;
  height:23px;
  border-radius:50%;
  display:grid;
  place-items:center;
  background:linear-gradient(145deg,#f6f8fc,#9ba7ba);
  color:#111726;
  font-size:9px;
  font-weight:950;
  border:2px solid #202943;
  box-shadow:0 4px 12px rgba(0,0,0,.38), 0 0 12px rgba(210,229,255,.10);
}
.seat-edit {
  right:auto;
  left:35px;
  top:-7px;
  width:22px;
  height:22px;
  border-color:rgba(112, 143, 199, .20);
  background:rgba(7,10,20,.88);
  color:#93a5c2;
  font-size:8px;
  letter-spacing:-1px;
}
.seat-empty {
  width:auto;
  min-width:66px;
  min-height:66px;
  display:flex;
  flex-direction:column;
  justify-content:center;
  align-items:center;
  gap:4px;
  margin:auto;
  padding:0;
  border:0;
  background:transparent;
  color:#71819c;
}
.empty-avatar {
  width:43px;
  height:43px;
  border-radius:50%;
  display:grid;
  place-items:center;
  border:1px dashed rgba(101, 211, 236, .42);
  background:rgba(7, 14, 29, .48);
  font-size:20px;
  color:#76dff2;
  box-shadow:0 0 20px rgba(73, 211, 239, .05);
}
.seat-empty strong { font-size:8px; color:#6e829f; letter-spacing:.05em; text-transform:uppercase; }
.seat-empty span:not(.empty-avatar) { display:none; }
.seat-empty:hover .empty-avatar { border-color:#9e82ff; color:#b5a4ff; box-shadow:0 0 24px rgba(142, 101, 255, .14); }

/* Cards */
.card {
  border-color:rgba(6, 10, 20, .24);
  background:linear-gradient(145deg,#ffffff,#edf2f8 72%,#d8e0eb);
  box-shadow:0 10px 22px rgba(0,0,0,.34), inset 0 1px 0 rgba(255,255,255,.8);
}
.card.back {
  border-color:#6679aa;
  background:
    radial-gradient(circle at 50% 50%, rgba(92, 225, 255, .12), transparent 38%),
    repeating-linear-gradient(45deg,#141d37 0 5px,#273767 5px 10px);
  box-shadow:0 9px 20px rgba(0,0,0,.34), 0 0 12px rgba(101, 118, 255, .10);
}

/* Side-view chip stacks. One physical-looking stack + exact text, not a fan of top-down discs. */
.pot-chips { height:42px; min-width:70px; }
.chip-stack { width:44px; height:38px; }
.chip-stack.compact { width:34px; height:31px; }
.poker-chip {
  left:50%;
  bottom:1px;
  width:30px;
  height:13px;
  border:1px solid rgba(255,255,255,.38);
  border-radius:50% / 34%;
  transform:translateX(-50%) translateY(calc(var(--i) * -4px));
  box-shadow:
    0 3px 4px rgba(0,0,0,.42),
    inset 0 4px 0 rgba(255,255,255,.14),
    inset 0 -4px 0 rgba(0,0,0,.28);
  overflow:visible;
}
.poker-chip::before {
  content:"";
  position:absolute;
  inset:2px 5px 4px;
  border-radius:50%;
  border:1px dashed rgba(255,255,255,.58);
  opacity:.76;
}
.chip-stack.compact .poker-chip {
  width:25px;
  height:11px;
  transform:translateX(-50%) translateY(calc(var(--i) * -3.5px));
}
.chip-100 { background:linear-gradient(180deg,#3b3547,#14141d); border-color:#e4c75b; }
.chip-25 { background:linear-gradient(180deg,#2cc18e,#126349); border-color:#cffff0; }
.chip-5 { background:linear-gradient(180deg,#f0687d,#8f263c); border-color:#ffe4ea; }
.chip-1 { background:linear-gradient(180deg,#f5f8fb,#98a7b8); border-color:#72b8ef; }
.chip-05 { background:linear-gradient(180deg,#9f7df1,#4c327d); border-color:#eee4ff; }
.bet-marker {
  padding:2px 7px 2px 4px;
  background:rgba(5,9,19,.77);
  border-color:rgba(82, 223, 242, .14);
  box-shadow:0 8px 20px rgba(0,0,0,.32), 0 0 16px rgba(84, 217, 243, .04);
  backdrop-filter:blur(8px);
}
.bet-marker span { color:#d9f7ff; font-size:9px; }
.chip-flight {
  filter:drop-shadow(0 8px 8px rgba(0,0,0,.34));
}
.chip-flight > span {
  background:rgba(6,10,20,.90);
  border-color:rgba(83, 219, 246, .18);
  color:#e2f8ff;
}

.deck-anchor { opacity:.42; filter:hue-rotate(22deg); }
.deck-anchor.active { opacity:.88; filter:drop-shadow(0 0 12px rgba(104, 209, 255, .26)) hue-rotate(22deg); }
.street-splash {
  border-color:rgba(93, 221, 255, .22);
  background:rgba(7, 10, 25, .88);
  color:#bdf5ff;
  box-shadow:0 10px 35px rgba(0,0,0,.32), 0 0 26px rgba(96, 216, 255, .10), 0 0 44px rgba(151, 91, 255, .08);
}

.format-note {
  margin:-2px 0 10px;
  color:#64738f;
  font-size:9px;
  line-height:1.45;
}
.bot-speed-row { align-items:center; }
body.bot-thinking .action-panel {
  border-color:rgba(91, 218, 255, .26);
  box-shadow:0 0 34px rgba(69, 194, 255, .06), 0 20px 55px rgba(0,0,0,.26);
}
body.bot-thinking .action-panel .panel-kicker { color:#6cdbef; }

/* Desktop tuning */
@media (min-width: 781px) {
  .seat-0 { top:93%; }
  .seat-1 { left:18%; top:81%; }
  .seat-2 { left:7.5%; top:48%; }
  .seat-3 { left:27%; top:8.5%; }
  .seat-4 { left:73%; top:8.5%; }
  .seat-5 { left:92.5%; top:48%; }
  .seat-6 { left:82%; top:81%; }
}

/* =========================================================
   MOBILE LAYOUT — separate composition, no 720px horizontal table
   ========================================================= */
@media (max-width: 780px) {
  body { padding-bottom:18px; }
  body.human-turn { padding-bottom:230px; }
  .app-shell { width:100%; padding:8px 8px 28px; }
  .topbar {
    margin-bottom:8px;
    padding:9px 10px;
    border-radius:14px;
    align-items:flex-start;
    gap:8px;
  }
  .brand-mark { width:34px; height:34px; border-radius:11px; font-size:16px; }
  h1 { font-size:17px; }
  h1 span { display:block; margin-top:1px; font-size:10px; letter-spacing:0; }
  .eyebrow { font-size:8px; }
  .top-actions { width:auto; display:grid; grid-template-columns:1fr 1fr; gap:6px; }
  .top-actions .btn { padding:8px 7px; font-size:9px; min-width:0; }
  .table-count { grid-column:1 / -1; width:auto; padding:6px 8px; font-size:9px; border-radius:9px; }

  .layout { display:flex; flex-direction:column; gap:9px; }
  .left-column { gap:9px; }
  .table-frame {
    min-height:0;
    padding:7px;
    overflow:hidden;
    border-radius:18px;
  }
  .felt {
    min-width:0 !important;
    width:100%;
    height:clamp(520px, 72svh, 620px);
    min-height:0;
    border-width:7px;
    border-radius:44% / 38%;
    outline-width:1px;
  }
  .felt::before { border-radius:42% / 36%; }
  .table-center { width:62%; top:48%; transform:translate(-50%,-45%); }
  .street-badge { font-size:7px; padding:4px 7px; }
  .board-cards { gap:3px; min-height:60px; margin:8px 0 7px; }
  .board-cards .card { width:39px; height:57px; font-size:14px; border-radius:6px; }
  .pot-box { min-width:92px; padding:5px 8px; }
  .pot-box span { font-size:7px; }
  .pot-box strong { font-size:12px; }
  .result-text { margin-top:7px; font-size:9px; line-height:1.3; min-height:28px; max-width:220px; }
  .deck-anchor { left:27%; top:58%; width:31px; height:43px; }

  .seat { width:105px; min-height:72px; }
  .seat-0 { left:50%; top:91%; }
  .seat-1 { left:18%; top:80%; }
  .seat-2 { left:10%; top:50%; }
  .seat-3 { left:28%; top:12%; }
  .seat-4 { left:72%; top:12%; }
  .seat-5 { left:90%; top:50%; }
  .seat-6 { left:82%; top:80%; }
  .seat-card {
    min-height:62px;
    grid-template-columns:35px minmax(0,1fr);
    column-gap:5px;
  }
  .avatar-wrap,.player-avatar { width:35px; height:35px; }
  .player-avatar { font-size:9px; border-width:1.5px; }
  .seat-identity { padding:4px 4px 3px 5px; border-radius:8px; }
  .seat-name { font-size:9px; max-width:60px; }
  .position-chip { font-size:6px; padding:1px 3px; }
  .seat-stack { font-size:8px; }
  .bot-level { display:none; }
  .player-cards { grid-column:2; min-height:35px; gap:2px; margin-top:2px; }
  .player-cards .card { width:24px; height:34px; font-size:9px; border-radius:5px; }
  .dealer-button { width:18px; height:18px; font-size:7px; }
  .seat-edit { left:24px; top:-6px; width:18px; height:18px; font-size:7px; }
  .player-status { font-size:5.5px; bottom:-8px; padding:2px 4px; }
  .thinking-dots b { width:2px; height:2px; }
  .seat-empty { min-width:46px; min-height:50px; }
  .empty-avatar { width:32px; height:32px; font-size:16px; }
  .seat-empty strong { font-size:6px; }

  .chip-stack { width:34px; height:31px; }
  .poker-chip { width:24px; height:10px; transform:translateX(-50%) translateY(calc(var(--i) * -3.2px)); }
  .chip-stack.compact { width:27px; height:25px; }
  .chip-stack.compact .poker-chip { width:20px; height:9px; transform:translateX(-50%) translateY(calc(var(--i) * -2.8px)); }
  .bet-marker { gap:1px; padding:1px 4px 1px 1px; }
  .bet-marker span { font-size:6.5px; }
  .seat-0 .bet-marker { top:-28px; }
  .seat-1 .bet-marker { left:76%; top:-18px; }
  .seat-2 .bet-marker { left:92%; top:37%; }
  .seat-3 .bet-marker { left:62%; top:82%; }
  .seat-4 .bet-marker { right:62%; top:82%; }
  .seat-5 .bet-marker { right:92%; top:37%; }
  .seat-6 .bet-marker { right:76%; top:-18px; }

  .history-card { padding:11px; border-radius:13px; }
  .history-list { max-height:180px; }
  .history-row { grid-template-columns:53px 74px minmax(0,1fr); gap:5px; font-size:8px; padding:6px; }
  .history-pot { display:none; }
  .section-title-row h2 { font-size:13px; }
  .text-link { font-size:8px; }

  .sidebar { position:static; display:grid; gap:9px; width:100%; }
  .panel { border-radius:13px; padding:12px; }
  body.human-turn .action-panel {
    position:fixed;
    z-index:110;
    left:8px;
    right:8px;
    bottom:max(8px, env(safe-area-inset-bottom));
    padding:12px;
    border-color:rgba(89, 224, 255, .38);
    background:linear-gradient(180deg, rgba(9,14,29,.95), rgba(4,7,16,.98));
    box-shadow:0 -12px 45px rgba(0,0,0,.45), 0 0 30px rgba(91, 211, 255, .08);
    backdrop-filter:blur(22px);
  }
  body.human-turn .action-panel .hint { margin:5px 0 8px; font-size:9px; max-height:31px; overflow:hidden; }
  body.human-turn .action-panel h2 { font-size:14px; }
  body.human-turn .action-grid { grid-template-columns:repeat(3,1fr); gap:5px; }
  body.human-turn .action-grid button { padding:10px 4px; font-size:9px; }
  body.human-turn .sizing-wrap { margin-top:8px; padding-top:8px; }
  body.human-turn .amount-row input { padding:7px 8px; }
  body.human-turn .quick-sizes button { padding:6px 2px; }

  .profile-stats { grid-template-columns:repeat(2,1fr); }
  .saved-table-row { padding:8px; }
  .compact-select { min-width:122px; font-size:10px; padding:6px 7px; }
  .format-row { font-size:10px; }
  .format-note { font-size:8px; }
}

@media (max-width: 420px) {
  .felt { height:560px; }
  .seat { width:96px; }
  .seat-name { max-width:53px; }
  .board-cards .card { width:36px; height:53px; }
  .topbar { flex-direction:column; }
  .top-actions { width:100%; }
}
/* v0.10 cleanup against legacy rectangular seat states */
.seat-card.active-turn,
.seat-card.all-in,
.seat-card.winner-impact {
  border-color:transparent;
  box-shadow:none;
}
.seat-card.winner-impact { animation:none !important; }
.seat-card.winner-impact .player-avatar {
  box-shadow:inset 0 0 0 3px rgba(5,8,17,.70), 0 0 0 4px rgba(255,210,113,.12), 0 0 34px rgba(255,210,113,.38);
  transform:translateY(-2px) scale(1.06);
}
.player-status { top:auto; }
.dealer-button { right:auto; left:34px; bottom:0; }
@media (max-width:780px) {
  .dealer-button { left:23px; bottom:-1px; }
}


/* =========================================================
   v0.10.2 — live-table chip layout
   Центральный банк = несколько настоящих стопок под бордом.
   Ставки лежат на радиальной линии игрок → банк, а не приклеены к плашке.
   ========================================================= */
.wager-layer {
  position:absolute;
  inset:0;
  z-index:6;
  pointer-events:none;
}

.pot-chips {
  position:relative;
  width:180px;
  min-width:180px;
  height:62px;
  margin:1px 0 -8px;
  display:flex;
  align-items:flex-end;
  justify-content:center;
  opacity:.15;
  filter:drop-shadow(0 12px 12px rgba(0,0,0,.46));
}
.pot-chips.has-chips { opacity:1; }

.chip-cluster {
  position:relative;
  display:flex;
  align-items:flex-end;
  justify-content:center;
  gap:0;
  height:58px;
  min-width:46px;
  filter:drop-shadow(0 7px 5px rgba(0,0,0,.38));
}
.chip-column {
  --lift: 0px;
  position:relative;
  display:inline-block;
  width:27px;
  height:54px;
  margin:0 -3px;
  transform:translateY(calc((var(--col) % 2) * 3px)) rotate(calc((var(--col) - 2) * .8deg));
}
.poker-chip {
  position:absolute;
  left:50%;
  bottom:2px;
  width:25px;
  height:11px;
  transform:translateX(-50%) translateY(calc(var(--i) * -5px));
  border-radius:50% / 37%;
  border:1px solid rgba(255,255,255,.45);
  box-shadow:
    0 2px 2px rgba(0,0,0,.42),
    inset 0 3px 0 rgba(255,255,255,.18),
    inset 0 -4px 0 rgba(0,0,0,.34);
  overflow:visible;
}
.poker-chip::before {
  content:"";
  position:absolute;
  left:4px;
  right:4px;
  top:1px;
  height:5px;
  border-radius:50%;
  border:1px dashed rgba(255,255,255,.68);
  background:radial-gradient(ellipse at 50% 18%,rgba(255,255,255,.36),transparent 48%);
  opacity:.88;
}
.poker-chip::after {
  content:"";
  position:absolute;
  left:3px;
  right:3px;
  bottom:1px;
  height:2px;
  border-radius:50%;
  background:rgba(0,0,0,.23);
}
.chip-100 { background:linear-gradient(180deg,#34333b 0 42%,#11131a 43% 100%); border-color:#e0d379; }
.chip-25  { background:linear-gradient(180deg,#49d9df 0 42%,#126d78 43% 100%); border-color:#d9feff; }
.chip-5   { background:linear-gradient(180deg,#ff5b9c 0 42%,#9c2457 43% 100%); border-color:#ffe3ef; }
.chip-1   { background:linear-gradient(180deg,#f4f7fa 0 42%,#8395aa 43% 100%); border-color:#5dbcf3; }
.chip-05  { background:linear-gradient(180deg,#8b72ff 0 42%,#463192 43% 100%); border-color:#e9e3ff; }

.chip-cluster.compact {
  height:42px;
  min-width:30px;
  gap:0;
}
.chip-cluster.compact .chip-column {
  width:22px;
  height:39px;
  margin:0 -4px;
  transform:translateY(calc((var(--col) % 2) * 2px)) rotate(calc((var(--col) - 1.5) * 1.7deg));
}
.chip-cluster.compact .poker-chip {
  width:20px;
  height:9px;
  transform:translateX(-50%) translateY(calc(var(--i) * -4px));
}
.chip-cluster.compact .poker-chip::before {
  left:3px;
  right:3px;
  height:4px;
}

/* Amount is a small tag UNDER the chips. The chips themselves stay visually clean. */
.bet-marker {
  position:absolute;
  z-index:8;
  transform:translate(-50%,-50%);
  display:grid;
  justify-items:center;
  gap:0;
  min-width:42px;
  padding:0;
  background:transparent;
  border:0;
  border-radius:0;
  box-shadow:none;
  backdrop-filter:none;
  white-space:nowrap;
  animation:wager-enter .16s ease-out;
}
.bet-marker span {
  position:relative;
  z-index:3;
  margin-top:-4px;
  padding:2px 6px 2px;
  border-radius:7px;
  border:1px solid rgba(89,217,246,.16);
  background:rgba(3,7,15,.90);
  box-shadow:0 4px 10px rgba(0,0,0,.38);
  color:#e6f8ff;
  font-size:8px;
  font-weight:900;
  line-height:1.15;
  text-shadow:0 1px 2px #000;
}
@keyframes wager-enter {
  from { opacity:0; transform:translate(-50%,-44%) scale(.88); }
  to { opacity:1; transform:translate(-50%,-50%) scale(1); }
}
.bet-marker.fx-collected {
  opacity:.08;
  transform:translate(-50%,-50%) scale(.9);
  transition:opacity .16s ease, transform .16s ease;
}

/* Bank label tucks into the chip pile like a live table amount plaque. */
.pot-box {
  position:relative;
  z-index:3;
  min-width:112px;
  margin-top:-3px;
  padding:5px 11px 6px;
  border-radius:8px;
  border:1px solid rgba(91,222,248,.14);
  background:rgba(3,7,15,.88);
  box-shadow:0 7px 16px rgba(0,0,0,.34);
}
.pot-box span { font-size:7px; }
.pot-box strong { font-size:13px; }

/* Flying packets use the same upright compact stacks and slide flat along the felt. */
.chip-flight {
  align-items:flex-end;
  gap:0;
  filter:drop-shadow(0 9px 7px rgba(0,0,0,.38));
  transform-style:preserve-3d;
}
.chip-flight > span {
  margin-left:-5px;
  margin-bottom:2px;
  padding:2px 5px;
  border-radius:6px;
  font-size:7px;
}

@media (max-width:780px) {
  .pot-chips {
    width:118px;
    min-width:118px;
    height:48px;
    margin-bottom:-7px;
  }
  .chip-cluster { height:46px; }
  .chip-column {
    width:21px;
    height:43px;
    margin:0 -4px;
  }
  .poker-chip {
    width:20px;
    height:9px;
    transform:translateX(-50%) translateY(calc(var(--i) * -4px));
  }
  .chip-cluster.compact { height:34px; }
  .chip-cluster.compact .chip-column { width:17px; height:31px; margin:0 -4px; }
  .chip-cluster.compact .poker-chip { width:16px; height:7px; transform:translateX(-50%) translateY(calc(var(--i) * -3px)); }
  .bet-marker span { font-size:6.5px; padding:1.5px 4px; margin-top:-3px; }
  .pot-box { min-width:88px; padding:4px 7px 5px; }
  .pot-box strong { font-size:11px; }
}

/* =========================================================
   v0.10.3 — center composition + mobile-first pass
   ========================================================= */

/* Cleaner center: board is the hero, chips are the pot. */
.table-center {
  top:47%;
  transform:translate(-50%,-46%);
  width:min(66%, 650px);
}
.street-badge {
  padding:5px 10px;
  font-size:9px;
  letter-spacing:.2em;
  background:rgba(5,11,24,.44);
  border-color:rgba(105,230,255,.16);
  backdrop-filter:blur(8px);
}
.board-cards {
  gap:10px;
  min-height:104px;
  margin:14px 0 5px;
  align-items:center;
}
.board-cards .card {
  width:68px;
  height:96px;
  border-radius:11px;
}
.card {
  position:relative;
  display:block;
  overflow:hidden;
  padding:0;
  background:linear-gradient(150deg,#fff 0%,#f6f8fb 62%,#e4e9f0 100%);
  border:1px solid rgba(9,16,30,.22);
  box-shadow:
    0 12px 26px rgba(0,0,0,.36),
    0 1px 0 rgba(255,255,255,.95) inset,
    0 -1px 0 rgba(7,16,32,.08) inset;
}
.card-rank {
  position:absolute;
  left:9px;
  top:7px;
  font-size:.78em;
  line-height:1;
  font-weight:950;
  letter-spacing:-.06em;
}
.card-suit {
  position:absolute;
  left:50%;
  top:54%;
  transform:translate(-50%,-50%);
  font-size:1.28em;
  line-height:1;
  filter:drop-shadow(0 1px 0 rgba(255,255,255,.42));
}
.card.back .card-rank,
.card.back .card-suit { display:none; }
.player-cards .card-rank { left:5px; top:4px; font-size:.72em; }
.player-cards .card-suit { font-size:1.15em; }

/* No floating rectangular BANK widget. */
.pot-total {
  position:relative;
  z-index:4;
  display:flex;
  align-items:baseline;
  justify-content:center;
  gap:5px;
  min-height:20px;
  margin-top:-2px;
  color:#d8f8ff;
  text-shadow:0 0 16px rgba(73,224,255,.18), 0 2px 5px rgba(0,0,0,.65);
}
.pot-total-label {
  color:#668da2;
  font-size:8px;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.12em;
}
.pot-total strong {
  font-size:15px;
  letter-spacing:.01em;
}
.pot-chips {
  margin-top:-1px;
  margin-bottom:-4px;
}
.result-text {
  margin-top:6px;
  min-height:28px;
  max-width:520px;
  color:#a9bacd;
  font-size:11px;
}

/* Small utility UI only used on phones. */
.mobile-dock,
.mobile-sheet-close,
.mobile-turn-tools,
.mobile-sheet-backdrop { display:none; }
.sheet-head-actions { display:flex; align-items:center; gap:8px; }

@media (max-width: 780px) {
  html, body { max-width:100%; overflow-x:hidden; }
  body {
    padding-bottom:calc(68px + env(safe-area-inset-bottom));
    background:
      radial-gradient(circle at 50% 18%, rgba(43,123,164,.10), transparent 34%),
      linear-gradient(180deg,#03050c,#050814 58%,#03050b);
  }
  body.human-turn { padding-bottom:calc(222px + env(safe-area-inset-bottom)); }
  body.sheet-open { overflow:hidden; }

  .app-shell { width:100%; padding:6px 6px 22px; }
  .topbar {
    min-height:52px;
    margin:0 0 6px;
    padding:7px 8px;
    flex-direction:row;
    align-items:center;
    border-radius:12px;
    background:rgba(5,8,18,.84);
    border:1px solid rgba(92,130,191,.12);
    backdrop-filter:blur(16px);
  }
  .brand-wrap { gap:7px; min-width:0; }
  .brand-mark { width:30px; height:30px; border-radius:10px; font-size:13px; flex:0 0 auto; }
  .brand-wrap .eyebrow { display:none; }
  h1 { font-size:13px; white-space:nowrap; }
  h1 span { display:block; max-width:145px; margin-top:1px; font-size:7px; overflow:hidden; text-overflow:ellipsis; }
  .top-actions { margin-left:auto; width:auto; display:flex; justify-content:flex-end; gap:4px; }
  .table-count { display:none; }
  .top-actions .btn { padding:7px 8px; min-width:0; border-radius:9px; font-size:7.5px; white-space:nowrap; }
  #spectatorPause:not([hidden]), #abortHand:not([hidden]) { display:inline-flex; }

  .layout, .left-column { gap:7px; }
  .table-frame {
    padding:5px;
    border-radius:17px;
    background:linear-gradient(180deg,rgba(5,8,17,.95),rgba(2,4,10,.98));
    border-color:rgba(87,137,196,.13);
    box-shadow:0 18px 50px rgba(0,0,0,.28);
  }
  .felt {
    width:100%;
    height:clamp(480px, 65svh, 555px);
    min-height:0;
    border-width:6px;
    border-radius:44% / 39%;
    outline:1px solid rgba(85,219,255,.30);
    box-shadow:
      inset 0 0 90px rgba(0,0,0,.76),
      inset 0 0 24px rgba(55,216,230,.05),
      0 0 24px rgba(61,205,233,.06),
      0 18px 50px rgba(0,0,0,.38);
  }
  .felt::before { inset:5px; border-radius:43% / 38%; }
  .felt::after { inset:12px; border-radius:42% / 37%; opacity:.06; }

  .table-center {
    width:70%;
    top:45.5%;
    transform:translate(-50%,-44%);
  }
  .street-badge { padding:3px 6px; font-size:6.5px; }
  .board-cards {
    gap:3px;
    min-height:65px;
    margin:7px 0 3px;
  }
  .board-cards .card {
    width:42px;
    height:61px;
    border-radius:7px;
    box-shadow:0 8px 15px rgba(0,0,0,.35), inset 0 1px 0 #fff;
  }
  .board-cards .card-rank { left:5px; top:4px; font-size:11px; }
  .board-cards .card-suit { font-size:18px; }

  .pot-chips {
    width:112px;
    min-width:112px;
    height:43px;
    margin:-1px 0 -5px;
  }
  .pot-total { min-height:15px; gap:4px; }
  .pot-total-label { font-size:6px; }
  .pot-total strong { font-size:10px; }
  .result-text {
    max-width:195px;
    min-height:22px;
    max-height:36px;
    overflow:hidden;
    margin-top:4px;
    font-size:7.5px;
    line-height:1.25;
  }
  .deck-anchor { left:27%; top:57%; width:27px; height:38px; opacity:.65; }

  /* Mobile seats are avatar-first and stack vertically to avoid long labels crossing the table. */
  .seat { width:82px; min-height:68px; }
  .seat-0 { left:50%; top:89%; }
  .seat-1 { left:18%; top:78%; }
  .seat-2 { left:8%; top:50%; }
  .seat-3 { left:25%; top:10%; }
  .seat-4 { left:75%; top:10%; }
  .seat-5 { left:92%; top:50%; }
  .seat-6 { left:82%; top:78%; }
  .seat-card {
    min-height:64px;
    width:82px;
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:flex-start;
    gap:1px;
    padding:0;
  }
  .avatar-wrap {
    grid-row:auto;
    width:34px;
    height:34px;
    align-self:center;
    z-index:3;
  }
  .player-avatar { width:34px; height:34px; font-size:8px; border-width:1.5px; }
  .seat-card.active-turn .player-avatar { transform:translateY(-1px) scale(1.05); }
  .seat-identity {
    width:auto;
    max-width:78px;
    margin:-1px 0 0;
    padding:2px 4px 3px;
    text-align:center;
    background:rgba(3,6,14,.52);
    border:0;
    border-radius:7px;
    backdrop-filter:blur(6px);
  }
  .seat-topline { justify-content:center; gap:2px; }
  .seat-name { max-width:54px; font-size:7.5px; text-align:center; }
  .position-chip { font-size:5px; padding:1px 2px; }
  .seat-stack { margin-top:1px; font-size:7px; line-height:1; text-align:center; }
  .bot-level { display:none; }
  .player-cards {
    order:3;
    min-height:29px;
    margin-top:1px;
    display:flex;
    justify-content:center;
    gap:1px;
  }
  .player-cards .card { width:21px; height:30px; border-radius:4px; }
  .seat-human .player-cards .card { width:24px; height:34px; }
  .player-cards .card-rank { left:3px; top:3px; font-size:6px; }
  .player-cards .card-suit { font-size:9px; }
  .seat-human .player-cards .card-rank { font-size:7px; }
  .seat-human .player-cards .card-suit { font-size:11px; }
  .seat-edit { left:23px; top:-4px; width:16px; height:16px; font-size:6px; }
  .dealer-button { left:22px; bottom:0; width:16px; height:16px; font-size:6px; }
  .player-status { bottom:auto; top:30px; font-size:4.8px; padding:1px 3px; }
  .seat-empty { min-width:42px; min-height:48px; }
  .empty-avatar { width:29px; height:29px; font-size:14px; }
  .seat-empty strong { font-size:5px; }

  /* Wagers remain between the player and center, but are deliberately small on phones. */
  .wager-marker { transform:translate(-50%,-50%) scale(.88); }
  .chip-cluster.compact { transform:scale(.86); transform-origin:center bottom; }
  .bet-marker span { font-size:5.7px; margin-top:-4px; }

  /* The game surface stays clean; secondary information is in bottom sheets. */
  .history-card,
  .solver-panel { display:none; }
  body.mobile-history-open .history-card,
  body.mobile-solver-open .solver-panel {
    display:block;
    position:fixed;
    z-index:220;
    left:6px;
    right:6px;
    bottom:calc(6px + env(safe-area-inset-bottom));
    max-height:min(72svh, 620px);
    overflow:auto;
    margin:0;
    padding:14px;
    border-radius:20px;
    border:1px solid rgba(94,218,255,.23);
    background:linear-gradient(180deg,rgba(11,16,31,.985),rgba(4,7,15,.995));
    box-shadow:0 -18px 70px rgba(0,0,0,.62), 0 0 42px rgba(67,206,255,.08);
    backdrop-filter:blur(22px);
  }
  body.mobile-solver-open .solver-panel { z-index:221; }
  .mobile-sheet-backdrop {
    position:fixed;
    z-index:210;
    inset:0;
    display:block;
    background:rgba(0,2,8,.68);
    backdrop-filter:blur(4px);
  }
  .mobile-sheet-backdrop[hidden] { display:none; }
  .mobile-sheet-close {
    display:grid;
    place-items:center;
    width:28px;
    height:28px;
    padding:0;
    border-radius:50%;
    border:1px solid rgba(116,151,206,.22);
    background:rgba(9,14,27,.9);
    color:#aebbd0;
    font-size:18px;
    cursor:pointer;
  }
  .history-list { max-height:52svh; }
  .history-row { grid-template-columns:48px 68px minmax(0,1fr); gap:5px; font-size:8px; padding:7px; }
  .history-pot { display:none; }

  /* Thumb-friendly bottom action tray. */
  body.human-turn .action-panel {
    position:fixed;
    z-index:150;
    left:6px;
    right:6px;
    bottom:calc(6px + env(safe-area-inset-bottom));
    max-height:218px;
    overflow:auto;
    padding:10px 10px 9px;
    border-radius:18px;
    border-color:rgba(91,225,255,.31);
    background:linear-gradient(180deg,rgba(9,14,29,.97),rgba(3,6,14,.995));
    box-shadow:0 -15px 54px rgba(0,0,0,.52),0 0 34px rgba(76,214,255,.07);
  }
  body.human-turn .action-panel .panel-kicker { font-size:6px; }
  body.human-turn .action-panel h2 { margin-top:1px; font-size:12px; }
  body.human-turn .action-panel .hint { margin:3px 0 7px; max-height:24px; font-size:7px; line-height:1.25; }
  body.human-turn .action-grid {
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(66px,1fr));
    gap:5px;
  }
  body.human-turn .action-grid button {
    min-height:42px;
    padding:8px 4px;
    border-radius:11px;
    font-size:9px;
    touch-action:manipulation;
  }
  .mobile-turn-tools {
    display:none;
  }
  body.human-turn .mobile-turn-tools {
    display:flex;
    gap:5px;
    margin-top:6px;
  }
  .mobile-turn-tools button {
    flex:1;
    min-height:27px;
    border:1px solid rgba(104,139,194,.15);
    border-radius:8px;
    background:rgba(8,12,24,.70);
    color:#8395b1;
    font-size:7px;
  }
  body.human-turn .sizing-wrap { margin-top:6px; padding-top:6px; }
  body.human-turn .sizing-wrap label { display:none; }
  body.human-turn .amount-row { margin-top:0; }
  body.human-turn .amount-row input { height:31px; padding:5px 8px; font-size:11px; text-align:center; }
  body.human-turn .quick-sizes { gap:4px; margin-top:4px; }
  body.human-turn .quick-sizes button { min-height:27px; padding:5px 2px; font-size:8px; }

  /* Bottom dock when the user is watching / between actions. */
  .mobile-dock {
    position:fixed;
    z-index:120;
    left:50%;
    bottom:calc(6px + env(safe-area-inset-bottom));
    transform:translateX(-50%);
    display:grid;
    grid-template-columns:repeat(3,1fr);
    width:min(286px,calc(100% - 28px));
    min-height:48px;
    padding:4px;
    border-radius:16px;
    border:1px solid rgba(95,139,200,.18);
    background:rgba(5,8,18,.92);
    box-shadow:0 14px 45px rgba(0,0,0,.48),0 0 26px rgba(80,195,255,.05);
    backdrop-filter:blur(18px);
  }
  .mobile-dock button {
    border:0;
    border-radius:11px;
    background:transparent;
    color:#8392aa;
    font-size:6.5px;
    font-weight:750;
  }
  .mobile-dock button span { display:block; margin-bottom:1px; color:#8be9ff; font-size:15px; line-height:1; }
  body.human-turn .mobile-dock,
  body.sheet-open .mobile-dock { display:none; }

  .sidebar { position:static; display:grid; gap:7px; }
  .sidebar .panel:not(.action-panel):not(.solver-panel) { border-radius:12px; padding:10px; }
}

@media (max-width: 430px) {
  .felt { height:clamp(470px, 64svh, 525px); }
  .seat { width:76px; }
  .seat-0 { top:88.5%; }
  .seat-1 { left:17%; top:78%; }
  .seat-2 { left:7.5%; top:50%; }
  .seat-3 { left:24%; top:9.5%; }
  .seat-4 { left:76%; top:9.5%; }
  .seat-5 { left:92.5%; top:50%; }
  .seat-6 { left:83%; top:78%; }
  .board-cards .card { width:39px; height:57px; }
  .board-cards .card-rank { font-size:10px; }
  .board-cards .card-suit { font-size:16px; }
  .table-center { width:72%; }
}

@media (max-width: 370px) {
  .top-actions #infiniteMode { display:none; }
  .felt { height:465px; }
  .seat { width:70px; }
  .avatar-wrap,.player-avatar { width:31px; height:31px; }
  .seat-name { max-width:47px; font-size:6.7px; }
  .seat-stack { font-size:6.4px; }
  .board-cards .card { width:36px; height:53px; }
  .board-cards { gap:2px; }
  .pot-chips { transform:scale(.9); transform-origin:center bottom; }
}

/* v0.10.3 mobile flex-width regression guard */
@media (max-width:780px) {
  .layout { width:100%; align-items:stretch; }
  .left-column, .table-frame, .felt { width:100%; min-width:0; }
}


/* =========================================================
   v0.10.4 — visibility + scale + mobile focus mode
   Main fix: viewer cards/text must dominate; phone = table + actions.
   ========================================================= */

/* Desktop: pull seats inside the rail and increase readable scale. */
@media (min-width: 781px) {
  .table-frame {
    min-height: 665px;
    padding: 22px 26px 28px;
  }
  .felt {
    min-height: 602px;
  }
  .seat { width: 196px; min-height: 104px; }
  .seat-0 { left:50%; top:87%; }
  .seat-1 { left:19%; top:76%; }
  .seat-2 { left:9%; top:48%; }
  .seat-3 { left:28%; top:13%; }
  .seat-4 { left:72%; top:13%; }
  .seat-5 { left:91%; top:48%; }
  .seat-6 { left:81%; top:76%; }

  .seat-card {
    grid-template-columns:56px minmax(0,1fr);
    column-gap:10px;
    min-height:96px;
  }
  .avatar-wrap, .player-avatar { width:56px; height:56px; }
  .player-avatar { font-size:14px; }
  .seat-identity { padding:7px 10px 6px; }
  .seat-name { font-size:13px; max-width:108px; }
  .seat-stack { font-size:12px; }
  .position-chip { font-size:7.5px; }
  .bot-level { font-size:7.5px; }
  .player-cards { min-height:56px; gap:4px; }
  .player-cards .card { width:40px; height:56px; font-size:14px; }

  /* The local viewer gets a deliberately stronger visual hierarchy. */
  .seat-card.viewer-seat {
    grid-template-columns:64px minmax(0,1fr);
    width:226px;
    transform:translateX(-15px);
    z-index:12;
  }
  .viewer-seat .avatar-wrap,
  .viewer-seat .player-avatar { width:64px; height:64px; }
  .viewer-seat .player-avatar { font-size:16px; }
  .viewer-seat .seat-identity { padding:8px 11px 7px; background:linear-gradient(90deg,rgba(8,12,27,.94),rgba(8,12,27,.60) 80%,transparent); }
  .viewer-seat .seat-name { font-size:15px; max-width:124px; }
  .viewer-seat .seat-stack { font-size:14px; color:#e8f4ff; }
  .viewer-seat .position-chip { font-size:8px; }
  .viewer-seat .player-cards { min-height:82px; gap:6px; margin-top:3px; }
  .viewer-seat .player-cards .card { width:58px; height:82px; border-radius:9px; }
  .viewer-seat .player-cards .card-rank { left:7px; top:6px; font-size:13px; }
  .viewer-seat .player-cards .card-suit { font-size:23px; }
  .viewer-seat .player-status { font-size:8px; padding:3px 7px; }

  .board-cards .card { width:72px; height:101px; }
  .board-cards .card-rank { font-size:15px; }
  .board-cards .card-suit { font-size:28px; }
  .pot-total strong { font-size:16px; }
  .result-text { font-size:12px; }
}

/* Mobile is intentionally a different product surface: only table + hand controls. */
@media (max-width: 780px) {
  html, body {
    width:100%;
    height:100%;
    min-height:100%;
    overflow:hidden !important;
    overscroll-behavior:none;
  }
  body,
  body.human-turn {
    padding:0 !important;
  }
  .app-shell {
    width:100%;
    height:100svh;
    padding:0;
    margin:0;
    overflow:hidden;
  }

  /* Keep only the new-hand / abort controls as tiny floating table controls. */
  .topbar {
    display:contents;
  }
  .brand-wrap,
  .table-count,
  #infiniteMode,
  #spectatorPause {
    display:none !important;
  }
  .top-actions {
    position:fixed;
    z-index:195;
    top:7px;
    right:7px;
    width:auto !important;
    margin:0;
    display:flex !important;
    gap:5px;
    pointer-events:none;
  }
  .top-actions #newHand,
  .top-actions #abortHand:not([hidden]) {
    pointer-events:auto;
    min-width:0;
    min-height:32px;
    padding:7px 10px;
    border-radius:11px;
    font-size:9px;
    backdrop-filter:blur(14px);
  }
  .top-actions #newHand:disabled { display:none; }

  .layout,
  .left-column {
    display:block;
    width:100%;
    height:100%;
    margin:0;
    padding:0;
  }
  .table-frame {
    position:fixed;
    z-index:1;
    inset:0;
    width:100%;
    height:100svh;
    min-height:0;
    margin:0;
    padding:3px;
    border:0;
    border-radius:0;
    overflow:hidden;
    background:#02040b;
  }
  .felt {
    width:100%;
    height:calc(100svh - 6px);
    min-height:0;
    margin:0;
    border-width:5px;
    border-radius:43% / 40%;
  }
  .felt::before { inset:4px; border-radius:42% / 39%; }
  .felt::after { inset:10px; border-radius:41% / 38%; }

  /* Secondary desktop UI does not exist in the phone gameplay surface. */
  .history-card,
  .sidebar > .panel:not(.action-panel),
  .mobile-dock,
  .mobile-sheet-backdrop,
  .mobile-sheet-close,
  .mobile-turn-tools {
    display:none !important;
  }
  .sidebar {
    display:block;
    position:static;
    width:0;
    height:0;
    margin:0;
    padding:0;
  }
  .sidebar .action-panel {
    display:none;
  }

  /* Center has less dead space, board is still readable. */
  .table-center {
    width:78%;
    top:38.5%;
    transform:translate(-50%,-44%);
  }
  .street-badge { padding:3px 7px; font-size:7px; letter-spacing:.16em; }
  .board-cards {
    gap:4px;
    min-height:70px;
    margin:8px 0 4px;
  }
  .board-cards .card {
    width:45px;
    height:64px;
    border-radius:7px;
  }
  .board-cards .card-rank { left:5px; top:4px; font-size:11px; }
  .board-cards .card-suit { font-size:19px; }
  .pot-chips { width:120px; min-width:120px; height:46px; margin:-2px 0 -6px; }
  .pot-total { min-height:18px; }
  .pot-total-label { font-size:7px; }
  .pot-total strong { font-size:12px; }
  .result-text {
    max-width:230px;
    max-height:34px;
    min-height:18px;
    margin-top:3px;
    overflow:hidden;
    font-size:8px;
    line-height:1.2;
  }
  .deck-anchor { left:24%; top:49%; width:27px; height:38px; }

  /* Pull the whole ring inward and use meaningful text sizes. */
  .seat { width:91px; min-height:76px; }
  .seat-0 { left:50%; top:72%; }
  .seat-1 { left:18%; top:66%; }
  .seat-2 { left:9%; top:39%; }
  .seat-3 { left:25%; top:9%; }
  .seat-4 { left:75%; top:9%; }
  .seat-5 { left:91%; top:39%; }
  .seat-6 { left:82%; top:66%; }
  .seat-card {
    width:91px;
    min-height:70px;
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:flex-start;
    gap:1px;
    padding:0;
  }
  .avatar-wrap,
  .player-avatar { width:39px; height:39px; }
  .player-avatar { font-size:10px; border-width:1.5px; }
  .seat-identity {
    width:auto;
    min-width:64px;
    max-width:89px;
    margin:-1px 0 0;
    padding:3px 6px 4px;
    text-align:center;
    border:0;
    border-radius:8px;
    background:rgba(2,6,15,.72);
  }
  .seat-topline { justify-content:center; gap:3px; }
  .seat-name { max-width:61px; font-size:9.5px; line-height:1.05; text-align:center; }
  .seat-stack { margin-top:2px; font-size:9px; line-height:1; color:#b9c9df; text-align:center; }
  .position-chip { font-size:5.5px; padding:1px 3px; }
  .bot-level { display:none; }
  .player-cards {
    order:3;
    min-height:33px;
    margin-top:1px;
    display:flex;
    justify-content:center;
    gap:2px;
  }
  .player-cards .card { width:23px; height:33px; border-radius:4px; }
  .player-cards .card-rank { left:3px; top:3px; font-size:6.5px; }
  .player-cards .card-suit { font-size:10px; }
  .seat-edit { left:27px; top:-4px; width:17px; height:17px; }
  .dealer-button { left:27px; bottom:1px; width:17px; height:17px; font-size:6px; }
  .player-status { top:34px; bottom:auto; font-size:5.5px; padding:2px 4px; }

  /* Your seat gets large cards and sits above the control tray, not under it. */
  .seat-card.viewer-seat {
    width:128px;
    min-height:126px;
    z-index:30;
  }
  .viewer-seat .player-cards {
    order:-1;
    min-height:66px;
    margin:0 0 2px;
    gap:5px;
  }
  .viewer-seat .player-cards .card {
    width:47px;
    height:66px;
    border-radius:7px;
    box-shadow:0 9px 20px rgba(0,0,0,.48),0 0 0 1px rgba(255,255,255,.05);
  }
  .viewer-seat .player-cards .card-rank { left:6px; top:5px; font-size:11px; }
  .viewer-seat .player-cards .card-suit { font-size:20px; }
  .viewer-seat .avatar-wrap,
  .viewer-seat .player-avatar { width:42px; height:42px; }
  .viewer-seat .player-avatar { font-size:11px; }
  .viewer-seat .seat-identity { min-width:92px; max-width:122px; padding:4px 7px 5px; }
  .viewer-seat .seat-name { max-width:88px; font-size:11px; }
  .viewer-seat .seat-stack { font-size:10.5px; color:#eef8ff; }
  .viewer-seat .position-chip { font-size:6px; }
  .viewer-seat .player-status { top:101px; font-size:6px; }

  /* Wagers remain legible but do not compete with cards. */
  .wager-marker { transform:translate(-50%,-50%) scale(.92); }
  .bet-marker span { font-size:6.5px; }

  /* The only phone panel is the hand action tray. */
  body.human-turn .sidebar .action-panel {
    display:block;
    position:fixed;
    z-index:180;
    left:6px;
    right:6px;
    bottom:calc(6px + env(safe-area-inset-bottom));
    width:auto;
    max-height:190px;
    overflow:hidden;
    margin:0;
    padding:9px;
    border-radius:17px;
    border:1px solid rgba(91,225,255,.34);
    background:linear-gradient(180deg,rgba(8,13,28,.975),rgba(3,6,14,.995));
    box-shadow:0 -14px 48px rgba(0,0,0,.58),0 0 35px rgba(76,214,255,.08);
    backdrop-filter:blur(22px);
    pointer-events:auto;
  }
  body.human-turn .action-panel .panel-kicker,
  body.human-turn .action-panel .hint {
    display:none;
  }
  body.human-turn .action-panel h2 {
    margin:0 0 7px;
    font-size:12px;
    line-height:1.1;
    text-align:center;
  }
  body.human-turn .action-grid {
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(70px,1fr));
    gap:5px;
  }
  body.human-turn .action-grid button {
    min-height:47px;
    padding:8px 4px;
    border-radius:12px;
    font-size:11px;
    font-weight:900;
    touch-action:manipulation;
  }
  body.human-turn .sizing-wrap {
    margin-top:6px;
    padding-top:6px;
  }
  body.human-turn .sizing-wrap label { display:none; }
  body.human-turn .amount-row { margin:0; }
  body.human-turn .amount-row input { height:32px; padding:5px 8px; font-size:12px; text-align:center; }
  body.human-turn .quick-sizes { gap:4px; margin-top:4px; }
  body.human-turn .quick-sizes button { min-height:28px; padding:4px 2px; font-size:9px; }
}

@media (max-width: 430px) {
  .seat { width:86px; }
  .seat-0 { top:71%; }
  .seat-1 { left:18%; top:64%; }
  .seat-2 { left:8%; top:38%; }
  .seat-3 { left:24%; top:8%; }
  .seat-4 { left:76%; top:8%; }
  .seat-5 { left:92%; top:38%; }
  .seat-6 { left:82%; top:64%; }
  .board-cards { gap:3px; }
  .board-cards .card { width:42px; height:60px; }
  .viewer-seat .player-cards .card { width:45px; height:64px; }
}

@media (max-width: 370px) {
  .table-center { width:80%; top:37%; }
  .board-cards .card { width:38px; height:55px; }
  .board-cards .card-rank { font-size:10px; }
  .board-cards .card-suit { font-size:16px; }
  .seat { width:78px; }
  .seat-0 { top:70%; }
  .seat-1 { left:18%; top:63%; }
  .seat-2 { left:7%; top:38%; }
  .seat-3 { left:23%; top:7.5%; }
  .seat-4 { left:77%; top:7.5%; }
  .seat-5 { left:93%; top:38%; }
  .seat-6 { left:82%; top:63%; }
  .avatar-wrap,.player-avatar { width:35px; height:35px; }
  .seat-name { max-width:54px; font-size:8.5px; }
  .seat-stack { font-size:8px; }
  .viewer-seat .player-cards .card { width:42px; height:60px; }
  .viewer-seat .seat-name { font-size:10px; }
  .viewer-seat .seat-stack { font-size:9.5px; }
  body.human-turn .sidebar .action-panel { max-height:184px; }
  body.human-turn .action-grid button { min-height:44px; font-size:10px; }
}


/* v0.10.5 overrides — preactions, timer, neon controls, mobile full-table */
.turn-meta { display:flex; align-items:center; gap:8px; flex-wrap:wrap; margin:10px 0 12px; }
.action-timer, .preaction-status, .queue-clear { border-radius:999px; }
.action-timer { border:1px solid rgba(110,235,255,.42); background:rgba(8,20,35,.86); color:#aef3ff; font-size:12px; font-weight:900; padding:6px 10px; box-shadow:0 0 18px rgba(74,199,255,.14); }
.action-timer.danger { color:#ffd6df; border-color:rgba(255,105,137,.45); box-shadow:0 0 18px rgba(255,105,137,.18); }
.preaction-status { border:1px solid rgba(117,142,255,.32); background:rgba(14,18,34,.88); color:#d8e2ff; font-size:11px; font-weight:700; padding:6px 10px; }
.preaction-status.invalid { border-color:rgba(255,142,167,.38); color:#ffc7d4; }
.queue-clear { border:1px solid rgba(255,255,255,.12); background:rgba(14,17,25,.86); color:#cfd8e8; padding:6px 10px; font-size:11px; cursor:pointer; }
.action-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.action-grid button { min-height:48px; border-radius:14px; padding:12px 10px; font-size:13px; font-weight:900; letter-spacing:.01em; color:#dff7ff; border:1px solid rgba(81,114,164,.45); background:linear-gradient(180deg, rgba(12,20,39,.96), rgba(8,13,26,.98)); box-shadow: inset 0 1px 0 rgba(180,210,255,.05), 0 10px 24px rgba(0,0,0,.22); }
.action-grid button:hover:not(:disabled) { border-color:rgba(112,198,255,.58); box-shadow:0 0 0 1px rgba(112,198,255,.12), 0 0 18px rgba(90,160,255,.12); }
.action-grid button.primary { color:#edfcff; border-color:rgba(110,226,255,.55); background:linear-gradient(135deg, rgba(39,176,243,.92), rgba(122,74,255,.88)); box-shadow:0 0 0 1px rgba(100,220,255,.12), 0 0 22px rgba(65,154,255,.18); }
.action-grid button.fold { color:#ffd7df; border-color:rgba(255,111,152,.42); background:linear-gradient(180deg, rgba(39,15,28,.96), rgba(23,9,16,.98)); }
.action-grid button.all-in { color:#ffe8bd; border-color:rgba(255,196,89,.44); background:linear-gradient(180deg, rgba(48,28,8,.96), rgba(24,15,5,.98)); }
.action-grid button.queued { position:relative; border-color:#79f2df !important; box-shadow:0 0 0 1px rgba(121,242,223,.18), 0 0 22px rgba(121,242,223,.22); }
.action-grid button.queued::after { content:"маркер"; position:absolute; top:5px; right:8px; font-size:9px; font-weight:900; color:#79f2df; text-transform:uppercase; letter-spacing:.08em; }
.sizing-wrap { margin-top:14px; padding-top:14px; border-top:1px solid rgba(98,118,163,.25); }
.amount-row { gap:8px; }
.amount-step { width:42px; height:42px; border-radius:12px; border:1px solid rgba(112,198,255,.35); background:linear-gradient(180deg, rgba(12,20,39,.96), rgba(8,13,26,.98)); color:#cfe9ff; font-size:22px; font-weight:900; cursor:pointer; }
.amount-row input { height:44px; border-radius:12px; border-color:rgba(112,198,255,.32); background:rgba(6,10,20,.96); font-size:18px; font-weight:800; text-align:center; }
.quick-sizes { gap:8px; margin-top:8px; }
.quick-sizes button { min-height:42px; border-radius:12px; border:1px solid rgba(112,198,255,.26); background:linear-gradient(180deg, rgba(12,20,39,.92), rgba(8,13,26,.98)); color:#dbedff; font-size:12px; font-weight:800; }
.dealer-button { right:auto; left:-12px; bottom:18px; }
.viewer-seat .dealer-button { left:-14px; bottom:20px; }
@media (max-width: 780px) {
  body { overflow-x:hidden; }
  .app-shell { width:100%; padding:0; }
  .topbar { position:sticky; top:0; z-index:25; padding:10px 10px 6px; margin-bottom:0; background:linear-gradient(180deg, rgba(4,6,12,.94), rgba(4,6,12,.78)); backdrop-filter: blur(10px); }
  .brand-wrap > div { display:none; }
  .brand-mark { width:34px; height:34px; border-radius:11px; font-size:16px; }
  .top-actions { width:100%; justify-content:flex-end; gap:8px; }
  .top-actions .btn.ghost, .top-actions .table-count { display:none; }
  .top-actions .btn { padding:9px 12px; font-size:12px; }
  .layout { display:flex; flex-direction:column; gap:0; min-height:calc(100dvh - 52px); }
  .left-column { display:flex; flex-direction:column; flex:1; gap:0; }
  .table-frame { flex:1; min-height:calc(100dvh - 280px); padding:6px 6px 0; border:none; border-radius:0; background:transparent; }
  .felt { min-width:0 !important; width:100%; min-height:100%; height:calc(100dvh - 270px); border-width:9px; outline-width:2px; border-radius:46% / 49%; }
  .table-center { width:66%; transform:translate(-50%, -49%); }
  .board-cards { gap:7px; margin:10px 0 8px; min-height:76px; }
  .card { width:50px; height:72px; font-size:18px; }
  .player-cards .card { width:32px; height:46px; font-size:12px; }
  .viewer-seat .player-cards .card { width:47px; height:66px; font-size:17px; }
  .seat { width:108px; }
  .seat-0 { left:50%; top:86%; }
  .seat-1 { left:17%; top:73%; }
  .seat-2 { left:9%; top:47%; }
  .seat-3 { left:22%; top:15%; }
  .seat-4 { left:78%; top:15%; }
  .seat-5 { left:91%; top:47%; }
  .seat-6 { left:83%; top:73%; }
  .seat-card { background:rgba(7,10,18,.58); border-color:rgba(92,124,185,.26); box-shadow:none; padding:4px 4px 2px; min-height:0; }
  .viewer-seat .seat-card { background:rgba(8,12,24,.86); border-color:rgba(112,210,255,.34); }
  .player-avatar { width:34px; height:34px; }
  .viewer-seat .player-avatar { width:42px; height:42px; }
  .seat-name { font-size:10px; }
  .seat-stack { font-size:10px; }
  .bot-level, .position-chip { font-size:7px; }
  .dealer-button { left:-8px; bottom:20px; width:17px; height:17px; font-size:7px; }
  .viewer-seat .dealer-button { left:-10px; bottom:26px; }
  .history-card, .solver-panel, .stats-panel, .saved-tables-panel, .format-panel, .mobile-dock, .mobile-turn-tools { display:none !important; }
  .sidebar { position:static; display:block; }
  .action-panel { position:sticky; bottom:0; z-index:20; margin:0; border-radius:18px 18px 0 0; border:1px solid rgba(78,120,186,.35); background:linear-gradient(180deg, rgba(7,11,23,.98), rgba(4,8,16,.99)); box-shadow:0 -10px 32px rgba(0,0,0,.35); padding:12px 10px calc(10px + env(safe-area-inset-bottom)); }
  .panel-kicker, #turnTitle, #hint { text-align:center; }
  #turnTitle { font-size:16px; }
  .hint { margin:6px 0 10px; font-size:11px; }
  .turn-meta { justify-content:center; margin-top:0; }
  .action-grid { grid-template-columns:repeat(3, minmax(0,1fr)); }
  .action-grid button { min-height:46px; font-size:13px; padding:10px 6px; }
  .sizing-wrap { margin-top:10px; padding-top:10px; }
  .amount-row { display:grid; grid-template-columns:42px 1fr 42px auto; align-items:center; }
  .amount-row span { font-size:12px; }
  .quick-sizes { grid-template-columns:repeat(4,1fr); }
}
@media (max-width: 430px) {
  .table-frame { min-height:calc(100dvh - 260px); }
  .felt { height:calc(100dvh - 252px); }
  .card { width:46px; height:66px; font-size:16px; }
  .viewer-seat .player-cards .card { width:44px; height:62px; font-size:16px; }
  .seat { width:102px; }
  .seat-0 { top:85%; }
  .table-center { width:70%; }
}
@media (max-width: 370px) {
  .felt { height:calc(100dvh - 246px); }
  .card { width:42px; height:61px; font-size:15px; }
  .viewer-seat .player-cards .card { width:40px; height:58px; font-size:15px; }
  .seat { width:96px; }
  .seat-name { font-size:9px; }
  .seat-stack { font-size:9px; }
  .action-grid button { font-size:12px; }
}


/* =========================================================
   v0.10.6 — visual rebuild based on approved neon references
   ========================================================= */
:root {
  --neon-cyan:#36d9ff;
  --neon-blue:#3c79ff;
  --neon-violet:#8c4dff;
  --neon-magenta:#f13cff;
  --neon-pink:#ff3d9b;
  --neon-orange:#ff8b2d;
  --glass:#07101f;
  --glass-2:#09172a;
}
html, body { min-height:100%; background:#02050c; }
body {
  background:
    radial-gradient(circle at 50% 18%, rgba(76,64,255,.20), transparent 24%),
    radial-gradient(circle at 15% 45%, rgba(226,44,255,.10), transparent 22%),
    radial-gradient(circle at 85% 43%, rgba(0,167,255,.10), transparent 24%),
    linear-gradient(180deg,#030713 0%,#040817 42%,#02050b 100%);
  color:#eef7ff;
  overflow-x:hidden;
}
body::before {
  content:""; position:fixed; z-index:-5; inset:0;
  background:
    linear-gradient(90deg, transparent 0 10%, rgba(28,44,88,.11) 10.2% 10.5%, transparent 10.7% 24%, rgba(118,35,255,.10) 24.3% 24.6%, transparent 24.9% 73%, rgba(0,178,255,.08) 73.2% 73.5%, transparent 73.8% 100%),
    repeating-linear-gradient(90deg,transparent 0 70px,rgba(58,91,160,.025) 71px 72px);
  pointer-events:none;
}
.room-ambience { position:fixed; inset:0; z-index:-4; overflow:hidden; pointer-events:none; }
.neon-bar { position:absolute; width:4px; border-radius:99px; filter:blur(.2px); box-shadow:0 0 18px currentColor,0 0 46px currentColor; opacity:.7; }
.neon-bar.bar-a { left:8%; top:5%; height:33vh; color:#19aaff; background:#19aaff; }
.neon-bar.bar-b { right:7%; top:8%; height:38vh; color:#df36ff; background:#df36ff; }
.city-glow { position:absolute; left:20%; right:20%; top:0; height:30vh; opacity:.22; background:repeating-linear-gradient(90deg,transparent 0 24px,rgba(63,130,255,.4) 25px 28px,transparent 29px 46px); clip-path:polygon(0 88%,4% 42%,9% 72%,14% 28%,20% 70%,28% 18%,35% 68%,45% 35%,53% 72%,62% 20%,70% 65%,78% 30%,84% 74%,91% 48%,100% 88%,100% 100%,0 100%); filter:drop-shadow(0 0 16px #244eff); }
.room-plant { position:absolute; bottom:0; width:15vw; height:34vh; opacity:.12; background:radial-gradient(ellipse at 50% 20%,#35d76d 0 7%,transparent 8%),radial-gradient(ellipse at 30% 42%,#35d76d 0 6%,transparent 7%),radial-gradient(ellipse at 70% 55%,#35d76d 0 6%,transparent 7%); filter:blur(1px); }
.plant-a{left:0}.plant-b{right:0;transform:scaleX(-1)}

.app-shell { width:min(1540px,100%); padding:12px 18px 290px; position:relative; }
.topbar { position:relative; z-index:40; max-width:1440px; margin:0 auto 8px; padding:6px 8px; }
.brand-mark { background:linear-gradient(145deg,#23d8ff,#8b4cff); color:white; box-shadow:0 0 24px rgba(50,192,255,.35); }
.top-actions .btn.primary { background:linear-gradient(135deg,rgba(22,121,255,.85),rgba(158,46,255,.88)); color:white; border-color:rgba(96,221,255,.52); box-shadow:0 0 22px rgba(89,87,255,.18); }
#abortHand { border-color:rgba(255,56,134,.55); background:linear-gradient(180deg,rgba(48,11,31,.94),rgba(24,5,16,.98)); color:#ffbdd8; box-shadow:0 0 20px rgba(255,37,129,.14); }

/* Game takes the screen; secondary tools continue below the fold. */
.layout { display:block; max-width:1480px; margin:0 auto; }
.left-column { display:block; }
.sidebar { position:static; display:grid; grid-template-columns:repeat(4,minmax(220px,1fr)); gap:14px; margin-top:18px; }
.history-card { margin-top:16px; }

.table-frame { position:relative; min-height:760px; padding:28px 52px 50px; border:0; background:transparent; border-radius:0; overflow:visible; }
.table-frame::before { content:""; position:absolute; left:5%; right:5%; bottom:1%; height:20%; border-radius:50%; background:radial-gradient(ellipse,rgba(10,25,70,.60),transparent 72%); filter:blur(18px); }
.felt {
  min-height:660px; width:100%; border:10px solid rgba(13,28,60,.94); outline:2px solid rgba(50,212,255,.44); border-radius:48% / 44%; overflow:visible;
  background:
    radial-gradient(ellipse at 50% 48%,rgba(22,98,139,.28),transparent 43%),
    radial-gradient(ellipse at center,rgba(14,65,90,.26),transparent 69%),
    linear-gradient(150deg,#07172a,#061829 46%,#05111f 100%);
  box-shadow:
    inset 0 0 95px rgba(0,0,0,.72),
    inset 0 0 0 4px rgba(66,38,145,.18),
    0 0 0 2px rgba(116,50,255,.18),
    0 0 34px rgba(18,166,255,.22),
    0 0 60px rgba(154,41,255,.10),
    0 36px 95px rgba(0,0,0,.70);
}
.felt::before { inset:11px; border:1px solid rgba(106,67,255,.23); box-shadow:inset 0 0 28px rgba(34,199,255,.08); }
.felt::after { opacity:.08; background-size:4px 4px; }
.table-glow { inset:4%; background:radial-gradient(ellipse,rgba(32,156,210,.16),transparent 65%); }

.table-center { top:47%; width:54%; transform:translate(-50%,-50%); }
.street-badge { padding:7px 17px; border-color:rgba(48,212,255,.38); background:rgba(2,12,27,.86); color:#d9f8ff; box-shadow:0 0 18px rgba(36,190,255,.12); font-size:11px; }
.board-cards { gap:11px; min-height:105px; margin:15px 0 13px; }
.board-cards .card { width:72px; height:101px; border-radius:10px; box-shadow:0 9px 22px rgba(0,0,0,.42),0 3px 0 rgba(45,151,255,.44),0 0 15px rgba(97,68,255,.14); }
.board-cards .card-rank { font-size:18px; }
.board-cards .card-suit { font-size:32px; }
.pot-chips { height:48px; min-width:160px; margin:0 0 3px; }
.pot-total { gap:5px; margin-top:0; padding:5px 10px; border-radius:9px; background:rgba(3,9,20,.68); border:1px solid rgba(80,168,255,.13); }
.pot-total-label { font-size:11px; color:#8ea9c8; letter-spacing:.06em; }
.pot-total strong { font-size:19px; color:#f5fbff; }
.result-text { max-width:700px; font-size:13px; color:#d8e6f3; }

/* Player glass cards from the approved reference. */
.seat { width:172px; min-height:134px; }
.seat-0 { left:50%; top:88%; }
.seat-1 { left:23%; top:78%; }
.seat-2 { left:9%; top:49%; }
.seat-3 { left:25%; top:13%; }
.seat-4 { left:75%; top:13%; }
.seat-5 { left:91%; top:49%; }
.seat-6 { left:77%; top:78%; }
.seat-card { width:100%; min-height:118px; padding:8px 10px 10px; border:1px solid rgba(72,128,207,.30); border-radius:18px; background:linear-gradient(180deg,rgba(6,13,28,.82),rgba(4,9,20,.90)); box-shadow:0 12px 28px rgba(0,0,0,.34),inset 0 1px 0 rgba(150,190,255,.04); backdrop-filter:blur(10px); }
.seat-card.seat-bot { border-color:hsla(var(--avatar-hue),92%,62%,.34); box-shadow:0 0 16px hsla(var(--avatar-hue),90%,55%,.07),0 13px 26px rgba(0,0,0,.34); }
.avatar-wrap { width:54px; height:54px; margin:-23px auto 3px; }
.player-avatar { width:54px; height:54px; border:2px solid hsla(var(--avatar-hue),92%,63%,.88); background:radial-gradient(circle at 35% 30%,hsla(var(--avatar-hue),75%,55%,.72),hsla(var(--avatar-hue),70%,20%,.94) 65%); box-shadow:0 0 0 4px rgba(3,7,17,.9),0 0 21px hsla(var(--avatar-hue),95%,56%,.38); font-size:15px; }
.seat-identity { margin:0; padding:1px 2px 0; background:none; border:0; text-align:center; }
.seat-topline { justify-content:center; gap:6px; }
.seat-name { max-width:110px; font-size:13px; color:#f5f9ff; font-weight:900; }
.seat-stack { margin-top:4px; font-size:13px; color:#f1f7ff; font-weight:850; text-align:center; }
.position-chip { padding:2px 6px; font-size:8px; color:#9fbaff; background:rgba(35,48,95,.78); }
.bot-level { display:none; }
.player-cards { justify-content:center; gap:5px; min-height:55px; margin-top:7px; }
.player-cards .card { width:43px; height:60px; border-radius:7px; border-color:rgba(104,139,224,.7); box-shadow:0 5px 13px rgba(0,0,0,.38); }
.player-cards .card.back { background:repeating-linear-gradient(45deg,#0f2555 0 7px,#183b85 7px 14px); border:2px solid #9bb5ff; }
.player-status { top:-38px; }
.seat-card.active-turn { box-shadow:0 0 0 2px rgba(53,219,255,.34),0 0 28px rgba(75,87,255,.24),0 14px 28px rgba(0,0,0,.34); }
.viewer-seat { z-index:20; }
.seat-card.viewer-seat { width:182px; min-height:155px; padding-top:7px; border-color:rgba(50,206,255,.55); background:linear-gradient(180deg,rgba(8,20,42,.90),rgba(4,10,22,.94)); box-shadow:0 0 0 1px rgba(47,203,255,.16),0 0 32px rgba(44,123,255,.20),0 15px 34px rgba(0,0,0,.44); }
.viewer-seat .player-cards { order:-1; min-height:86px; gap:8px; margin:-65px 0 8px; }
.viewer-seat .player-cards .card { width:61px; height:86px; border-radius:9px; }
.viewer-seat .player-cards .card-rank { font-size:15px; }
.viewer-seat .player-cards .card-suit { font-size:28px; }
.viewer-seat .avatar-wrap,.viewer-seat .player-avatar { width:62px; height:62px; }
.viewer-seat .player-avatar { font-size:18px; }
.viewer-seat .seat-name { font-size:15px; }
.viewer-seat .seat-stack { font-size:15px; }
.dealer-button { left:auto; right:-25px; bottom:26px; width:31px; height:31px; border:3px solid #171d28; background:linear-gradient(180deg,#f5f6fb,#8b92a4); box-shadow:0 5px 12px rgba(0,0,0,.55); color:#171d28; font-size:14px; }
.viewer-seat .dealer-button { left:auto; right:-27px; bottom:30px; }

/* Chip labels like the reference. */
.bet-marker { background:transparent; border:0; box-shadow:none; padding:0; flex-direction:column; gap:0; }
.bet-marker span { margin-top:2px; padding:2px 5px; border-radius:6px; background:rgba(1,7,17,.84); color:#f4f8ff; font-size:9px; }
.poker-chip { filter:saturate(1.2) brightness(1.08); }

/* Desktop action tray: always present during a live local hand, including pre-actions. */
body.local-player-active .sidebar .action-panel { display:block; position:fixed; z-index:220; left:50%; bottom:14px; transform:translateX(-50%); width:min(1120px,calc(100vw - 44px)); margin:0; padding:14px 18px 15px; border:1px solid rgba(98,105,255,.42); border-radius:25px; background:linear-gradient(180deg,rgba(6,10,25,.97),rgba(3,6,16,.99)); box-shadow:0 0 0 1px rgba(41,202,255,.10),0 -10px 50px rgba(0,0,0,.55),0 0 34px rgba(93,47,255,.10); backdrop-filter:blur(24px); }
body.local-player-active .action-panel .panel-kicker, body.local-player-active .action-panel h2, body.local-player-active .action-panel .hint { display:none; }
body.local-player-active .turn-meta { position:absolute; left:-138px; bottom:18px; width:118px; justify-content:center; }
body.local-player-active .action-timer { width:118px; height:84px; display:flex; align-items:center; justify-content:center; border-radius:17px; font-size:25px; background:linear-gradient(180deg,rgba(15,12,38,.95),rgba(7,7,22,.98)); border-color:rgba(232,64,255,.48); color:#f3b5ff; box-shadow:0 0 22px rgba(236,45,255,.16); }
body.local-player-active .preaction-status { position:absolute; right:0; bottom:100%; margin-bottom:9px; }
body.local-player-active .queue-clear { position:absolute; right:0; top:-42px; }
body.local-player-active .action-grid { display:grid; grid-template-columns:repeat(5,minmax(120px,1fr)); gap:12px; }
body.local-player-active .action-grid button { min-height:66px; border-radius:14px; font-size:17px; text-transform:uppercase; }
body.local-player-active .action-grid button:nth-child(1) { border-color:rgba(62,176,255,.65); box-shadow:0 0 18px rgba(27,141,255,.10); }
body.local-player-active .action-grid button.primary { background:linear-gradient(180deg,rgba(14,45,91,.95),rgba(7,23,52,.98)); border-color:rgba(48,195,255,.72); color:#edfaff; box-shadow:0 0 20px rgba(39,174,255,.15); }
body.local-player-active .action-grid button.queued,body.local-player-active .action-grid button:nth-last-child(2).queued { background:linear-gradient(180deg,rgba(79,18,104,.94),rgba(37,8,54,.98)); border-color:#f040ff !important; box-shadow:0 0 0 1px rgba(236,54,255,.20),0 0 26px rgba(234,52,255,.30); }
body.local-player-active .action-grid button.all-in { background:linear-gradient(180deg,rgba(83,35,11,.96),rgba(39,15,6,.99)); border-color:rgba(255,135,42,.78); color:#ffe4bd; box-shadow:0 0 20px rgba(255,112,30,.16); }
body.local-player-active .sizing-wrap { display:grid; grid-template-columns:1fr 230px; column-gap:18px; margin-top:10px; padding-top:10px; }
body.local-player-active .sizing-wrap > label { display:none; }
body.local-player-active .quick-sizes { grid-column:1; grid-row:1; display:grid; grid-template-columns:repeat(4,1fr); gap:10px; margin:0; }
body.local-player-active .quick-sizes button { min-height:43px; border-color:rgba(74,143,255,.42); color:#d9cfff; font-size:14px; }
body.local-player-active .amount-row { grid-column:2; grid-row:1; display:grid; grid-template-columns:46px 1fr 46px auto; gap:8px; margin:0; }
body.local-player-active .amount-step { width:46px; height:43px; border-color:rgba(245,62,255,.52); color:#f2a8ff; }
body.local-player-active .amount-row input { height:43px; font-size:22px; color:#e9c4ff; }
.bet-slider-row { grid-column:1 / -1; display:grid; grid-template-columns:46px 1fr 46px; align-items:center; gap:10px; margin-top:10px; color:#7c87a4; font-size:11px; font-weight:800; }
.bet-slider-row span:last-child { text-align:right; }
#amountSlider { --range-progress:25%; width:100%; height:18px; appearance:none; background:transparent; cursor:pointer; }
#amountSlider::-webkit-slider-runnable-track { height:7px; border-radius:99px; background:linear-gradient(90deg,#1e95ff 0 var(--range-progress),#db3aff var(--range-progress),#17213c var(--range-progress)); box-shadow:inset 0 1px 2px rgba(0,0,0,.65); }
#amountSlider::-webkit-slider-thumb { appearance:none; width:25px; height:25px; margin-top:-9px; border-radius:50%; border:2px solid #ff84ff; background:radial-gradient(circle at 35% 30%,#ff8dff,#d426f1 60%,#7d148f); box-shadow:0 0 18px rgba(244,50,255,.75); }
#amountSlider::-moz-range-track { height:7px; border-radius:99px; background:#17213c; }
#amountSlider::-moz-range-progress { height:7px; border-radius:99px; background:linear-gradient(90deg,#1e95ff,#d83cff); }
#amountSlider::-moz-range-thumb { width:24px; height:24px; border-radius:50%; border:2px solid #ff84ff; background:#db2cf0; box-shadow:0 0 18px rgba(244,50,255,.75); }

/* Mobile follows the approved vertical reference almost one-to-one. */
@media (max-width:780px) {
  .room-ambience .neon-bar,.room-plant { display:none; }
  .city-glow { left:0; right:0; top:0; height:23vh; opacity:.18; }
  .app-shell { min-height:100dvh; padding:0 0 300px; }
  .topbar { position:absolute; inset:0 0 auto; z-index:300; height:64px; padding:12px 14px; background:transparent; backdrop-filter:none; pointer-events:none; }
  .brand-wrap { pointer-events:auto; }
  .brand-mark { width:46px; height:46px; border-radius:14px; background:rgba(5,10,22,.90); border:1px solid rgba(79,182,255,.42); box-shadow:0 0 18px rgba(47,127,255,.16); font-size:0; }
  .brand-mark::after { content:"☰"; font-size:25px; color:white; }
  .top-actions { pointer-events:auto; }
  .top-actions > *:not(#abortHand):not(#newHand) { display:none !important; }
  #newHand { display:none; }
  #abortHand { margin-left:auto; padding:12px 16px; font-size:12px; border-radius:13px; }
  .layout,.left-column { min-height:100dvh; }
  .table-frame { height:calc(100dvh - 238px); min-height:660px; padding:76px 4px 2px; }
  .felt { width:100%; height:100%; min-height:0; border-width:7px; border-radius:47% / 43%; outline-width:1px; box-shadow:inset 0 0 72px rgba(0,0,0,.68),0 0 20px rgba(20,180,255,.20),0 0 35px rgba(183,42,255,.08); }
  .table-center { top:48%; width:76%; transform:translate(-50%,-50%); display:flex; flex-direction:column; align-items:center; }
  .street-badge { order:0; padding:5px 12px; font-size:9px; }
  .pot-total { order:1; margin-top:19px; padding:0; background:transparent; border:0; display:flex; flex-direction:column; }
  .pot-total-label { font-size:11px; }
  .pot-total strong { font-size:25px; line-height:1.05; }
  .pot-chips { order:2; height:52px; margin-top:6px; }
  .board-cards { order:3; min-height:83px; gap:7px; margin:16px 0 0; }
  .board-cards .card { width:54px; height:78px; }
  .board-cards .card-rank { font-size:14px; }
  .board-cards .card-suit { font-size:24px; }
  .result-text { order:4; display:none; }

  .seat { width:112px; min-height:104px; }
  .seat-0 { left:50%; top:88%; }
  .seat-1 { left:17%; top:72%; }
  .seat-2 { left:8%; top:45%; }
  .seat-3 { left:24%; top:16%; }
  .seat-4 { left:76%; top:16%; }
  .seat-5 { left:92%; top:45%; }
  .seat-6 { left:83%; top:72%; }
  .seat-card { min-height:97px; border-radius:14px; padding:5px 5px 6px; background:linear-gradient(180deg,rgba(4,10,23,.78),rgba(3,8,18,.88)); }
  .avatar-wrap { width:43px; height:43px; margin:-20px auto 2px; }
  .player-avatar { width:43px; height:43px; font-size:11px; }
  .seat-name { font-size:11px; max-width:79px; }
  .seat-stack { font-size:11px; margin-top:2px; }
  .position-chip { font-size:7px; padding:1px 4px; }
  .player-cards { min-height:45px; margin-top:5px; gap:3px; }
  .player-cards .card { width:35px; height:47px; }
  .viewer-seat { width:142px; }
  .seat-card.viewer-seat { width:142px; min-height:122px; padding:3px 6px 7px; }
  .viewer-seat .player-cards { min-height:72px; margin:-62px 0 6px; gap:5px; }
  .viewer-seat .player-cards .card { width:49px; height:69px; }
  .viewer-seat .avatar-wrap,.viewer-seat .player-avatar { width:49px; height:49px; }
  .viewer-seat .player-avatar { font-size:14px; }
  .viewer-seat .seat-name { font-size:13px; }
  .viewer-seat .seat-stack { font-size:13px; }
  .dealer-button,.viewer-seat .dealer-button { right:-18px; left:auto; bottom:25px; width:24px; height:24px; font-size:10px; }
  .bet-marker span { font-size:8px; }

  .sidebar { display:block; margin:0; }
  .history-card,.solver-panel,.stats-panel,.saved-tables-panel,.format-panel,.mobile-dock,.mobile-turn-tools { display:none !important; }
  body.local-player-active .sidebar .action-panel { display:block; position:fixed; z-index:400; left:8px; right:8px; bottom:calc(8px + env(safe-area-inset-bottom)); transform:none; width:auto; padding:11px 10px 12px; border-radius:21px; }
  body.local-player-active .turn-meta { position:static; width:auto; min-height:0; margin:0 0 8px; display:flex; justify-content:space-between; }
  body.local-player-active .action-timer { width:auto; height:auto; min-width:92px; padding:7px 11px; border-radius:12px; font-size:18px; }
  body.local-player-active .preaction-status { position:static; margin:0; flex:1; max-width:220px; text-align:center; }
  body.local-player-active .queue-clear { position:static; margin-left:auto; }
  body.local-player-active .action-grid { grid-template-columns:repeat(4,1fr); gap:7px; }
  body.local-player-active .action-grid button { min-width:0; min-height:57px; padding:8px 4px; font-size:13px; border-radius:13px; }
  body.local-player-active .action-grid button.queued::after { top:4px; right:5px; font-size:7px; }
  body.local-player-active .sizing-wrap { display:grid; grid-template-columns:1fr; row-gap:8px; margin-top:8px; padding-top:8px; }
  body.local-player-active .quick-sizes { grid-column:1; grid-row:1; grid-template-columns:repeat(4,1fr); gap:7px; }
  body.local-player-active .quick-sizes button { min-height:42px; font-size:12px; border-radius:11px; }
  body.local-player-active .amount-row { grid-column:1; grid-row:2; grid-template-columns:46px 1fr 46px auto; }
  body.local-player-active .amount-step { height:44px; }
  body.local-player-active .amount-row input { height:44px; font-size:21px; }
  body.local-player-active .bet-slider-row { grid-column:1; grid-row:3; margin-top:2px; }
}

@media (max-width:430px) {
  .table-frame { height:calc(100dvh - 242px); min-height:620px; padding-top:70px; }
  .seat { width:102px; }
  .seat-0 { top:87%; }
  .seat-1 { left:18%; top:71%; }
  .seat-2 { left:7%; top:44%; }
  .seat-3 { left:24%; top:15%; }
  .seat-4 { left:76%; top:15%; }
  .seat-5 { left:93%; top:44%; }
  .seat-6 { left:82%; top:71%; }
  .seat-card { min-height:91px; }
  .seat-name,.seat-stack { font-size:10px; }
  .player-cards .card { width:32px; height:43px; }
  .viewer-seat .player-cards .card { width:47px; height:66px; }
  .table-center { width:78%; }
  .board-cards .card { width:50px; height:72px; }
  .pot-total strong { font-size:23px; }
  body.local-player-active .sidebar .action-panel { left:5px; right:5px; padding:9px 8px 10px; }
  body.local-player-active .action-grid { gap:5px; }
  body.local-player-active .action-grid button { min-height:54px; font-size:12px; }
}

@media (max-width:370px) {
  .table-frame { height:calc(100dvh - 232px); min-height:590px; }
  .seat { width:92px; }
  .seat-name,.seat-stack { font-size:9px; }
  .player-cards .card { width:29px; height:40px; }
  .viewer-seat .player-cards .card { width:44px; height:62px; }
  .board-cards .card { width:46px; height:67px; }
  body.local-player-active .action-grid button { min-height:50px; font-size:11px; }
  body.local-player-active .quick-sizes button { min-height:38px; font-size:11px; }
}


/* =========================================================
   v0.10.7 — approved reference composition
   ========================================================= */
.neon-ref-v107 {
  --ref-bg:#020611;
  --ref-panel:rgba(3,8,20,.94);
  --ref-blue:#31c8ff;
  --ref-violet:#7c4dff;
  --ref-magenta:#ed3bff;
  --ref-orange:#ff8b2e;
  min-height:100vh;
  background:#020611;
}
.neon-ref-v107 .room-ambience {
  position:fixed; inset:0; z-index:-5; display:block;
  background:
    linear-gradient(180deg,rgba(2,4,12,.08) 0%,rgba(2,5,14,.35) 42%,rgba(1,3,9,.96) 100%),
    url('/static/assets/neon-room-desktop.webp') center top / cover no-repeat;
  opacity:1;
}
.neon-ref-v107 .room-ambience > * { display:none !important; }
.neon-ref-v107::before {
  content:""; position:fixed; inset:0; z-index:-4; pointer-events:none;
  background:
    radial-gradient(ellipse at 50% 18%,rgba(39,79,255,.16),transparent 34%),
    radial-gradient(circle at 15% 34%,rgba(229,42,255,.12),transparent 22%),
    radial-gradient(circle at 84% 34%,rgba(14,166,255,.11),transparent 23%),
    linear-gradient(180deg,rgba(1,3,10,.05),rgba(1,3,10,.68) 70%,#01030a 100%);
}

/* Active table = full reference scene. Other management panels stay below the fold. */
.neon-ref-v107 .app-shell { width:100%; max-width:none; padding:0 18px 300px; }
.neon-ref-v107 .layout { width:min(1500px,100%); max-width:none; margin:0 auto; }
.neon-ref-v107 .topbar { height:76px; margin:0; padding:13px 22px; position:absolute; inset:0 0 auto; z-index:310; pointer-events:none; }
.neon-ref-v107 .topbar > * { pointer-events:auto; }
.neon-ref-v107.local-player-active .brand-wrap,
.neon-ref-v107.local-player-active .table-count,
.neon-ref-v107.local-player-active #infiniteMode,
.neon-ref-v107.local-player-active #spectatorPause,
.neon-ref-v107.local-player-active #newHand { display:none !important; }
.neon-ref-v107.local-player-active .top-actions { margin-left:auto; }
.neon-ref-v107 #abortHand {
  border-radius:14px; padding:13px 22px; font-size:13px; font-weight:850;
  border:1px solid rgba(255,46,126,.62); color:#ffbfd6;
  background:rgba(29,5,20,.78); box-shadow:0 0 22px rgba(255,28,120,.12);
}

.neon-ref-v107 .table-frame {
  min-height:790px; height:min(830px,calc(100vh - 115px));
  padding:108px 46px 44px; overflow:visible; background:transparent; border:0;
}
.neon-ref-v107 .felt {
  height:100%; min-height:670px; border:10px solid rgba(5,14,34,.98);
  outline:2px solid rgba(38,196,255,.48); border-radius:49% / 45%;
  background:
    radial-gradient(ellipse at 50% 48%,rgba(14,88,135,.34),transparent 48%),
    linear-gradient(160deg,#071a30 0%,#061c32 47%,#061325 100%);
  box-shadow:
    inset 0 0 110px rgba(0,0,0,.72),
    inset 0 0 0 3px rgba(102,44,245,.20),
    0 0 0 2px rgba(50,210,255,.17),
    0 0 26px rgba(21,170,255,.30),
    0 0 40px rgba(209,37,255,.15),
    0 35px 90px rgba(0,0,0,.76);
}
.neon-ref-v107 .felt::before { inset:9px; border-color:rgba(147,47,255,.22); }
.neon-ref-v107 .table-glow { inset:2%; background:radial-gradient(ellipse,rgba(40,143,198,.15),transparent 68%); }

/* Central composition matches the reference: street -> cards -> pot. */
.neon-ref-v107 .table-center { top:48%; width:52%; transform:translate(-50%,-50%); }
.neon-ref-v107 .street-badge {
  min-width:90px; padding:7px 15px; border-radius:999px; border:1px solid rgba(47,202,255,.46);
  background:rgba(1,8,20,.84); color:#e9f9ff; box-shadow:0 0 17px rgba(39,191,255,.10);
  font-size:11px; letter-spacing:.09em;
}
.neon-ref-v107 .board-cards { gap:10px; min-height:110px; margin:18px 0 13px; }
.neon-ref-v107 .board-cards .card { width:76px; height:108px; border-radius:10px; box-shadow:0 9px 24px rgba(0,0,0,.50),0 3px 0 rgba(42,154,255,.45),0 0 17px rgba(90,64,255,.13); }
.neon-ref-v107 .board-cards .card-rank { font-size:19px; }
.neon-ref-v107 .board-cards .card-suit { font-size:34px; }
.neon-ref-v107 .pot-chips { height:54px; min-width:170px; margin-top:0; }
.neon-ref-v107 .pot-total { margin-top:2px; padding:4px 9px; border:0; background:rgba(1,7,18,.70); border-radius:8px; }
.neon-ref-v107 .pot-total-label { font-size:11px; text-transform:uppercase; }
.neon-ref-v107 .pot-total strong { font-size:18px; }
.neon-ref-v107 .result-text { font-size:12px; max-width:620px; opacity:.9; }

/* Seats overlap the table edge like the approved reference. */
.neon-ref-v107 .seat { width:152px; min-height:128px; z-index:8; }
.neon-ref-v107 .seat-0 { left:50%; top:91%; }
.neon-ref-v107 .seat-1 { left:25%; top:78%; }
.neon-ref-v107 .seat-2 { left:10%; top:49%; }
.neon-ref-v107 .seat-3 { left:26%; top:13%; }
.neon-ref-v107 .seat-4 { left:74%; top:13%; }
.neon-ref-v107 .seat-5 { left:90%; top:49%; }
.neon-ref-v107 .seat-6 { left:75%; top:78%; }
.neon-ref-v107 .seat-card {
  min-height:116px; padding:8px 10px 10px; border-radius:18px;
  border:1px solid rgba(67,116,191,.32);
  background:linear-gradient(180deg,rgba(5,12,28,.87),rgba(3,8,19,.94));
  box-shadow:0 12px 30px rgba(0,0,0,.38),inset 0 1px 0 rgba(160,190,255,.04);
  backdrop-filter:blur(11px);
}
.neon-ref-v107 .avatar-wrap { width:54px; height:54px; margin:-27px auto 4px; }
.neon-ref-v107 .player-avatar { width:54px; height:54px; font-size:15px; border-width:2px; box-shadow:0 0 0 4px rgba(2,6,15,.96),0 0 20px hsla(var(--avatar-hue),96%,60%,.48); }
.neon-ref-v107 .seat-identity { text-align:center; }
.neon-ref-v107 .seat-topline { justify-content:center; gap:6px; }
.neon-ref-v107 .seat-name { max-width:92px; font-size:14px; font-weight:900; }
.neon-ref-v107 .seat-stack { font-size:14px; line-height:1.05; font-weight:900; color:#f7fbff; }
.neon-ref-v107 .position-chip { font-size:8px; background:rgba(38,43,88,.88); color:#b6c9ff; }
.neon-ref-v107 .player-cards { min-height:56px; margin-top:8px; gap:5px; }
.neon-ref-v107 .player-cards .card { width:44px; height:61px; border-radius:7px; }
.neon-ref-v107 .player-cards .card.back { background:repeating-linear-gradient(45deg,#0b1c47 0 7px,#173b82 7px 14px); border:2px solid #8fa9f6; }
.neon-ref-v107 .dealer-button { left:auto; right:-29px; bottom:25px; width:31px; height:31px; font-size:14px; z-index:20; }

/* Hero is larger and cards sit above the identity block. */
.neon-ref-v107 .seat-card.viewer-seat { width:188px; min-height:148px; border-color:rgba(50,205,255,.62); box-shadow:0 0 0 1px rgba(47,203,255,.15),0 0 34px rgba(50,105,255,.23),0 14px 34px rgba(0,0,0,.46); }
.neon-ref-v107 .viewer-seat .player-cards { min-height:90px; margin:-73px 0 8px; gap:8px; }
.neon-ref-v107 .viewer-seat .player-cards .card { width:65px; height:91px; }
.neon-ref-v107 .viewer-seat .avatar-wrap,.neon-ref-v107 .viewer-seat .player-avatar { width:64px; height:64px; }
.neon-ref-v107 .viewer-seat .player-avatar { font-size:20px; }
.neon-ref-v107 .viewer-seat .seat-name { font-size:16px; }
.neon-ref-v107 .viewer-seat .seat-stack { font-size:16px; }
.neon-ref-v107 .viewer-seat .dealer-button { right:-31px; bottom:29px; }

/* Desktop timer and action tray exactly below the table. */
.neon-ref-v107.local-player-active .sidebar .action-panel {
  position:fixed; z-index:500; left:50%; bottom:14px; transform:translateX(-50%);
  width:min(1120px,calc(100vw - 56px)); padding:15px 18px 16px; margin:0;
  border:1px solid rgba(99,102,255,.46); border-radius:26px;
  background:linear-gradient(180deg,rgba(5,9,23,.97),rgba(2,5,15,.995));
  box-shadow:0 0 0 1px rgba(42,203,255,.09),0 -12px 55px rgba(0,0,0,.62),0 0 35px rgba(101,50,255,.10);
}
.neon-ref-v107.local-player-active .action-panel .panel-kicker,
.neon-ref-v107.local-player-active .action-panel h2,
.neon-ref-v107.local-player-active .action-panel .hint { display:none; }
.neon-ref-v107.local-player-active .turn-meta {
  position:absolute; right:calc(100% + 16px); bottom:6px; width:150px; height:auto; margin:0; display:grid; gap:8px;
}
.neon-ref-v107 .action-timer {
  min-height:76px; border-radius:15px; display:grid; place-items:center; padding:24px 10px 8px;
  font-size:27px; line-height:1; background:rgba(5,8,21,.95); border:1px solid rgba(226,65,255,.53); color:#f0adff;
  box-shadow:0 0 22px rgba(221,51,255,.16);
}
.neon-ref-v107 .action-timer::before { content:"ВРЕМЯ НА ХОД"; position:absolute; margin-top:-39px; font-size:9px; letter-spacing:.08em; color:#aab4ce; }
.neon-ref-v107 .preaction-status { border-radius:13px; background:rgba(4,8,19,.95); border:1px solid rgba(61,143,255,.35); padding:10px; text-align:center; font-size:12px; color:#b9caff; }
.neon-ref-v107 .preaction-status::before { content:"ВЫБРАНО"; display:block; margin-bottom:3px; color:#99a5c0; font-size:8px; letter-spacing:.09em; }
.neon-ref-v107 .queue-clear { font-size:9px; padding:6px 8px; }
.neon-ref-v107.local-player-active .action-grid { grid-template-columns:repeat(5,minmax(110px,1fr)); gap:12px; }
.neon-ref-v107 .action-grid button {
  min-height:68px; border-radius:14px; padding:10px 8px; white-space:pre-line; line-height:1.2;
  font-size:16px; font-weight:900; text-transform:uppercase; border:1px solid rgba(49,166,255,.64);
  background:linear-gradient(180deg,rgba(8,28,61,.96),rgba(4,15,34,.99)); color:#eefaff;
  box-shadow:0 0 18px rgba(26,141,255,.12),inset 0 1px 0 rgba(130,210,255,.07);
}
.neon-ref-v107 .action-grid button.primary { border-color:rgba(42,202,255,.76); background:linear-gradient(180deg,rgba(11,48,96,.96),rgba(5,22,53,.99)); }
.neon-ref-v107 .action-grid button.queued { border-color:#ed45ff !important; background:linear-gradient(180deg,rgba(78,14,103,.96),rgba(36,6,53,.99)); box-shadow:0 0 0 1px rgba(239,54,255,.18),0 0 28px rgba(235,50,255,.28); }
.neon-ref-v107 .action-grid button.all-in { border-color:rgba(255,137,44,.82); background:linear-gradient(180deg,rgba(79,32,8,.97),rgba(38,14,4,.995)); color:#ffe5bc; box-shadow:0 0 20px rgba(255,112,26,.16); }
.neon-ref-v107 .action-grid button.fold { border-color:rgba(255,75,132,.60); background:linear-gradient(180deg,rgba(49,11,28,.96),rgba(24,5,15,.99)); }
.neon-ref-v107.local-player-active .sizing-wrap { display:grid; grid-template-columns:1fr 245px; column-gap:18px; row-gap:10px; margin-top:11px; padding-top:10px; }
.neon-ref-v107.local-player-active .sizing-wrap > label { display:none; }
.neon-ref-v107.local-player-active .quick-sizes { grid-column:1; grid-row:1; display:grid; grid-template-columns:repeat(4,1fr); gap:10px; margin:0; }
.neon-ref-v107 .quick-sizes button { min-height:45px; border-radius:12px; font-size:14px; font-weight:850; border:1px solid rgba(69,138,255,.45); color:#d8cfff; background:rgba(5,13,31,.96); }
.neon-ref-v107.local-player-active .amount-row { grid-column:2; grid-row:1; display:grid; grid-template-columns:46px 1fr 46px auto; gap:8px; margin:0; }
.neon-ref-v107 .amount-step { height:45px; border-radius:12px; border-color:rgba(241,63,255,.56); color:#f4aaff; background:rgba(18,8,31,.95); }
.neon-ref-v107 .amount-row input { height:45px; font-size:21px; font-weight:900; color:#e9c6ff; border-color:rgba(144,68,255,.28); }
.neon-ref-v107 .bet-slider-row { grid-column:1 / -1; margin-top:0; }

/* =========================================================
   Mobile approved vertical reference
   ========================================================= */
@media (max-width:780px) {
  .neon-ref-v107 .room-ambience {
    background:
      linear-gradient(180deg,rgba(1,3,10,.12) 0%,rgba(2,5,14,.30) 24%,rgba(1,4,12,.88) 61%,#01030a 100%),
      url('/static/assets/neon-room-mobile.webp') center top / cover no-repeat;
  }
  .neon-ref-v107::before { background:linear-gradient(180deg,rgba(1,3,10,.05),rgba(1,4,12,.30) 30%,rgba(1,3,10,.80) 100%); }
  .neon-ref-v107 .app-shell { padding:0 0 318px; min-height:100dvh; }
  .neon-ref-v107 .topbar { position:fixed; z-index:700; height:74px; padding:17px 22px; }
  .neon-ref-v107 .brand-wrap { display:block !important; }
  .neon-ref-v107 .brand-wrap > div:not(.brand-mark) { display:none !important; }
  .neon-ref-v107 .brand-mark {
    display:grid !important; width:48px; height:48px; border-radius:14px; border:1px solid rgba(70,171,255,.48);
    background:rgba(3,8,20,.88); box-shadow:0 0 18px rgba(43,132,255,.14); font-size:0;
  }
  .neon-ref-v107 .brand-mark::after { content:"☰"; font-size:27px; line-height:1; color:#fff; }
  .neon-ref-v107.local-player-active .top-actions { display:flex; margin-left:auto; }
  .neon-ref-v107 #abortHand { padding:12px 17px; font-size:12px; border-radius:13px; }

  .neon-ref-v107 .layout,.neon-ref-v107 .left-column { min-height:100dvh; }
  .neon-ref-v107 .table-frame {
    height:calc(100dvh - 305px); min-height:570px; padding:76px 7px 0; overflow:visible;
  }
  .neon-ref-v107 .felt {
    width:100%; height:100%; min-height:0; border-width:7px; outline-width:1px; border-radius:47% / 43%;
    box-shadow:inset 0 0 80px rgba(0,0,0,.73),0 0 21px rgba(23,184,255,.25),0 0 34px rgba(197,43,255,.11);
  }
  .neon-ref-v107 .table-center { top:48%; width:76%; transform:translate(-50%,-50%); display:flex; flex-direction:column; align-items:center; }
  .neon-ref-v107 .street-badge {
    position:fixed; z-index:720; top:24px; left:50%; transform:translateX(-50%); min-width:154px; height:46px;
    display:flex; align-items:center; justify-content:center; gap:8px; padding:0 16px; font-size:13px; pointer-events:none;
  }
  .neon-ref-v107 .street-badge::after { margin-left:5px; letter-spacing:6px; font-size:11px; color:#243255; }
  .neon-ref-v107[data-street="preflop"] .street-badge::after { content:"● ○ ○ ○"; color:#387aff; }
  .neon-ref-v107[data-street="flop"] .street-badge::after { content:"● ● ○ ○"; color:#42d8ff; }
  .neon-ref-v107[data-street="turn"] .street-badge::after { content:"● ● ● ○"; color:#b56cff; }
  .neon-ref-v107[data-street="river"] .street-badge::after, .neon-ref-v107[data-street="showdown"] .street-badge::after { content:"● ● ● ●"; color:#f044ff; }

  /* mobile order: pot first, then chips, then board */
  .neon-ref-v107 .pot-total { order:1; margin-top:0; padding:0; background:transparent; border:0; display:flex; flex-direction:column; }
  .neon-ref-v107 .pot-total-label { font-size:12px; color:#91a3bf; }
  .neon-ref-v107 .pot-total strong { font-size:27px; line-height:1.02; }
  .neon-ref-v107 .pot-chips { order:2; height:58px; min-width:160px; margin-top:8px; }
  .neon-ref-v107 .board-cards { order:3; gap:8px; min-height:98px; margin:19px 0 0; }
  .neon-ref-v107 .board-cards .card { width:58px; height:84px; border-radius:9px; }
  .neon-ref-v107 .board-cards .card-rank { font-size:15px; }
  .neon-ref-v107 .board-cards .card-suit { font-size:27px; }
  .neon-ref-v107 .result-text { display:none; }

  /* compact mobile player boxes exactly around the vertical oval */
  .neon-ref-v107 .seat { width:111px; min-height:104px; }
  .neon-ref-v107 .seat-0 { left:50%; top:88%; }
  .neon-ref-v107 .seat-1 { left:19%; top:75%; }
  .neon-ref-v107 .seat-2 { left:8%; top:48%; }
  .neon-ref-v107 .seat-3 { left:23%; top:18%; }
  .neon-ref-v107 .seat-4 { left:77%; top:18%; }
  .neon-ref-v107 .seat-5 { left:92%; top:48%; }
  .neon-ref-v107 .seat-6 { left:81%; top:75%; }
  .neon-ref-v107 .seat-card { min-height:98px; padding:5px 5px 7px; border-radius:15px; background:linear-gradient(180deg,rgba(4,10,24,.84),rgba(3,8,18,.92)); }
  .neon-ref-v107 .avatar-wrap { width:45px; height:45px; margin:-22px auto 2px; }
  .neon-ref-v107 .player-avatar { width:45px; height:45px; font-size:12px; }
  .neon-ref-v107 .seat-name { max-width:75px; font-size:12px; }
  .neon-ref-v107 .seat-stack { font-size:12px; }
  .neon-ref-v107 .position-chip { font-size:7px; padding:1px 4px; }
  .neon-ref-v107 .player-cards { min-height:46px; margin-top:5px; gap:3px; }
  .neon-ref-v107 .player-cards .card { width:35px; height:48px; }

  /* hero exactly above timer/actions */
  .neon-ref-v107 .seat-card.viewer-seat { width:146px; min-height:124px; padding:3px 6px 8px; }
  .neon-ref-v107 .viewer-seat .player-cards { min-height:78px; margin:-67px 0 5px; gap:5px; }
  .neon-ref-v107 .viewer-seat .player-cards .card { width:51px; height:73px; }
  .neon-ref-v107 .viewer-seat .avatar-wrap,.neon-ref-v107 .viewer-seat .player-avatar { width:51px; height:51px; }
  .neon-ref-v107 .viewer-seat .player-avatar { font-size:15px; }
  .neon-ref-v107 .viewer-seat .seat-name { font-size:14px; }
  .neon-ref-v107 .viewer-seat .seat-stack { font-size:15px; }
  .neon-ref-v107 .dealer-button,.neon-ref-v107 .viewer-seat .dealer-button { right:-21px; left:auto; bottom:26px; width:25px; height:25px; font-size:11px; }
  .neon-ref-v107 .bet-marker span { font-size:8px; }

  /* Hide all non-game panels; the approved screen is table + controls only. */
  .neon-ref-v107 .history-card,
  .neon-ref-v107 .solver-panel,
  .neon-ref-v107 .stats-panel,
  .neon-ref-v107 .saved-tables-panel,
  .neon-ref-v107 .format-panel,
  .neon-ref-v107 .mobile-dock,
  .neon-ref-v107 .mobile-turn-tools { display:none !important; }
  .neon-ref-v107 .sidebar { display:block; margin:0; }

  /* Timer and selected pre-action float either side of hero, just like reference. */
  .neon-ref-v107.local-player-active .turn-meta {
    position:fixed; z-index:735; left:16px; right:16px; bottom:304px; width:auto; height:96px; margin:0;
    display:grid; grid-template-columns:112px 1fr 150px; align-items:end; gap:8px; pointer-events:none;
  }
  .neon-ref-v107.local-player-active .action-timer {
    grid-column:1; min-width:0; min-height:88px; padding:29px 8px 9px; border-radius:17px; font-size:25px; pointer-events:auto;
  }
  .neon-ref-v107.local-player-active .preaction-status {
    grid-column:3; min-height:88px; display:grid; place-items:center; padding:28px 8px 9px; border-radius:17px; font-size:14px; font-weight:900; color:#c0a6ff; pointer-events:auto;
  }
  .neon-ref-v107.local-player-active .preaction-status::before { position:absolute; margin-top:-45px; }
  .neon-ref-v107.local-player-active .queue-clear { position:absolute; right:4px; bottom:-24px; font-size:8px; pointer-events:auto; }

  /* Bottom control stack mirrors the approved mobile screenshot. */
  .neon-ref-v107.local-player-active .sidebar .action-panel {
    display:block; position:fixed; z-index:730; left:10px; right:10px; bottom:calc(8px + env(safe-area-inset-bottom));
    transform:none; width:auto; margin:0; padding:11px 10px 12px; border-radius:22px;
    border:1px solid rgba(78,92,189,.45); background:linear-gradient(180deg,rgba(4,8,21,.985),rgba(2,5,14,.998));
    box-shadow:0 -10px 38px rgba(0,0,0,.56),0 0 26px rgba(87,54,255,.10);
  }
  .neon-ref-v107.local-player-active .action-panel .panel-kicker,
  .neon-ref-v107.local-player-active .action-panel h2,
  .neon-ref-v107.local-player-active .action-panel .hint { display:none; }
  .neon-ref-v107.local-player-active .action-grid { grid-template-columns:repeat(4,minmax(0,1fr)); gap:7px; }
  .neon-ref-v107 .action-grid button { min-width:0; min-height:62px; padding:8px 4px; border-radius:14px; font-size:14px; white-space:pre-line; }
  .neon-ref-v107 .action-grid button.queued::after { top:4px; right:5px; font-size:7px; }
  .neon-ref-v107.local-player-active .sizing-wrap { display:grid; grid-template-columns:1fr; row-gap:8px; margin-top:9px; padding-top:9px; }
  .neon-ref-v107.local-player-active .quick-sizes { grid-column:1; grid-row:1; grid-template-columns:repeat(4,1fr); gap:7px; }
  .neon-ref-v107 .quick-sizes button { min-height:45px; font-size:13px; border-radius:12px; }
  .neon-ref-v107.local-player-active .amount-row { grid-column:1; grid-row:2; display:grid; grid-template-columns:48px 1fr 48px auto; gap:8px; }
  .neon-ref-v107 .amount-step { height:48px; font-size:23px; }
  .neon-ref-v107 .amount-row input { height:48px; font-size:23px; }
  .neon-ref-v107 .bet-slider-row { grid-column:1; grid-row:3; margin-top:3px; }
  .neon-ref-v107 #amountSlider { height:22px; }
}

@media (max-width:430px) {
  .neon-ref-v107 .app-shell { padding-bottom:302px; }
  .neon-ref-v107 .table-frame { height:calc(100dvh - 292px); min-height:555px; padding-top:72px; }
  .neon-ref-v107 .seat { width:101px; }
  .neon-ref-v107 .seat-0 { top:87%; }
  .neon-ref-v107 .seat-1 { left:19%; top:74%; }
  .neon-ref-v107 .seat-2 { left:7%; top:47%; }
  .neon-ref-v107 .seat-3 { left:23%; top:17%; }
  .neon-ref-v107 .seat-4 { left:77%; top:17%; }
  .neon-ref-v107 .seat-5 { left:93%; top:47%; }
  .neon-ref-v107 .seat-6 { left:81%; top:74%; }
  .neon-ref-v107 .seat-name,.neon-ref-v107 .seat-stack { font-size:10px; }
  .neon-ref-v107 .player-cards .card { width:32px; height:44px; }
  .neon-ref-v107 .viewer-seat .player-cards .card { width:48px; height:69px; }
  .neon-ref-v107 .board-cards .card { width:53px; height:77px; }
  .neon-ref-v107 .pot-total strong { font-size:24px; }
  .neon-ref-v107.local-player-active .turn-meta { bottom:291px; grid-template-columns:103px 1fr 132px; }
  .neon-ref-v107.local-player-active .action-timer { font-size:22px; min-height:82px; }
  .neon-ref-v107.local-player-active .preaction-status { min-height:82px; font-size:12px; }
  .neon-ref-v107.local-player-active .sidebar .action-panel { left:7px; right:7px; padding:9px 8px 10px; }
  .neon-ref-v107 .action-grid button { min-height:58px; font-size:12px; }
  .neon-ref-v107 .quick-sizes button { min-height:42px; font-size:12px; }
}

@media (max-width:370px) {
  .neon-ref-v107 .app-shell { padding-bottom:286px; }
  .neon-ref-v107 .table-frame { height:calc(100dvh - 276px); min-height:525px; }
  .neon-ref-v107 .seat { width:91px; }
  .neon-ref-v107 .seat-name,.neon-ref-v107 .seat-stack { font-size:9px; }
  .neon-ref-v107 .player-cards .card { width:29px; height:40px; }
  .neon-ref-v107 .viewer-seat .player-cards .card { width:44px; height:64px; }
  .neon-ref-v107 .board-cards .card { width:47px; height:69px; }
  .neon-ref-v107.local-player-active .turn-meta { bottom:277px; grid-template-columns:94px 1fr 122px; }
  .neon-ref-v107 .action-grid button { min-height:54px; font-size:11px; }
  .neon-ref-v107 .quick-sizes button { min-height:38px; font-size:11px; }
}

/* v0.10.7 final alignment fixes after viewport mock validation */
.neon-ref-v107.local-player-active .topbar { background:transparent !important; border:0 !important; box-shadow:none !important; }
.neon-ref-v107 .seat-identity { width:100% !important; max-width:none !important; min-width:0 !important; }
.neon-ref-v107 .seat-name { max-width:104px !important; }
.neon-ref-v107 .deck-anchor { opacity:.28; }
.neon-ref-v107.local-player-active .deck-anchor { display:none; }

@media (max-width:780px) {
  .neon-ref-v107 .table-center {
    position:absolute; inset:0; top:0; left:0; width:100%; height:100%; transform:none;
    display:block; pointer-events:none;
  }
  .neon-ref-v107 .street-badge {
    position:fixed; top:22px; left:50%; transform:translateX(-50%); z-index:720;
  }
  .neon-ref-v107 .pot-total {
    position:absolute; top:34%; left:50%; transform:translateX(-50%); width:180px; text-align:center;
  }
  .neon-ref-v107 .pot-chips {
    position:absolute; top:42%; left:50%; transform:translateX(-50%); width:180px;
  }
  .neon-ref-v107 .board-cards {
    position:absolute; top:53%; left:50%; transform:translateX(-50%); margin:0;
  }
  .neon-ref-v107 .result-text { display:none !important; }
  .neon-ref-v107 .seat-identity { width:100% !important; max-width:none !important; }
  .neon-ref-v107 .seat-name { max-width:76px !important; }
  .neon-ref-v107.local-player-active .queue-clear {
    position:absolute !important; right:4px !important; top:4px !important; bottom:auto !important;
    width:22px; height:22px; min-width:22px; padding:0; border:0; background:transparent;
    color:#8593ae; font-size:0; border-radius:50%; pointer-events:auto;
  }
  .neon-ref-v107.local-player-active .queue-clear::after { content:"×"; font-size:15px; line-height:22px; }
  .neon-ref-v107.local-player-active .preaction-status { position:relative; overflow:hidden; }
}

/* v0.10.7 final reference fidelity pass */
.neon-ref-v107 .room-ambience { z-index:0 !important; }
.neon-ref-v107 .app-shell { position:relative; z-index:1; }
.neon-ref-v107 .seat-card { display:flex !important; flex-direction:column; align-items:center; justify-content:flex-start; gap:0; }
.neon-ref-v107 .avatar-wrap { grid-row:auto !important; align-self:center !important; }
.neon-ref-v107 .seat-identity { flex:0 0 auto; }
.neon-ref-v107 .player-cards { flex:0 0 auto; }

@media (max-width:780px) {
  .neon-ref-v107 .pot-total { top:28%; }
  .neon-ref-v107 .pot-chips { top:36%; }
  .neon-ref-v107 .board-cards { top:45%; }
  .neon-ref-v107 .seat-1 { top:66%; }
  .neon-ref-v107 .seat-2 { top:42%; }
  .neon-ref-v107 .seat-5 { top:42%; }
  .neon-ref-v107 .seat-6 { top:66%; }
  .neon-ref-v107.local-player-active .turn-meta { align-items:end; }
  .neon-ref-v107.local-player-active .preaction-status {
    position:relative !important; inset:auto !important; align-self:end !important;
    min-height:82px; margin:0 !important;
  }
  .neon-ref-v107.local-player-active .queue-clear {
    right:4px !important; top:4px !important; bottom:auto !important; left:auto !important;
  }
  .neon-ref-v107.local-player-active .amount-row { position:relative; padding-top:12px; }
  .neon-ref-v107.local-player-active .amount-row::before {
    content:"СУММА СТАВКИ"; position:absolute; top:-6px; left:50%; transform:translateX(-50%);
    color:#8f9ab4; font-size:9px; letter-spacing:.08em; white-space:nowrap;
  }
}

/* Hero separation from the control tray */
@media (min-width:781px) {
  .neon-ref-v107 .seat-0 { top:84%; }
  .neon-ref-v107 .viewer-seat .dealer-button { right:-24px; bottom:42px; }
}
@media (max-width:780px) {
  .neon-ref-v107 .viewer-seat .dealer-button { right:-14px; bottom:44px; }
}
