:root {
  --bg: #15171c;
  --panel: #1f232b;
  --panel-2: #282d37;
  --line: #343a46;
  --text: #eef1f5;
  --muted: #9aa3b2;
  --felt: #1f6b4a;
  --felt-dark: #17543a;
  --felt-edge: #0f3b29;
  --accent: #3fb37f;
  --accent-2: #2f8f64;
  --warn: #e0a23a;
  --danger: #e05252;
  --gold: #f2c94c;
  --card-bg: #ffffff;
  --spade: #1b1b1f;
  --heart: #d63a3a;
  --diamond: #d63a3a;
  --club: #1b1b1f;
  --radius: 12px;
}
body.four-colour { --diamond: #2a6fdb; --club: #1f9a4f; }

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif; }
body { min-height: 100vh; -webkit-font-smoothing: antialiased; }
button { font: inherit; }
input, select { font: inherit; color: var(--text); background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; }
a { color: var(--accent); }

.btn { background: var(--panel-2); color: var(--text); border: 1px solid var(--line); border-radius: 10px; padding: 10px 16px; font-weight: 600; cursor: pointer; transition: transform .05s, background .15s; }
.btn:hover:not(:disabled) { background: #333a46; }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #07140e; }
.btn.primary:hover:not(:disabled) { background: #4cc78f; }
.btn.danger { background: transparent; border-color: var(--danger); color: var(--danger); }
.btn.small { padding: 5px 10px; font-size: 13px; border-radius: 8px; }
.btn.big { padding: 14px 22px; font-size: 18px; }

/* ---------- Landing ---------- */
.landing { max-width: 440px; margin: 8vh auto; padding: 0 16px; }
.landing h1 { font-size: 34px; font-weight: 800; margin: 0 0 6px; letter-spacing: -0.5px; }
.landing p { color: var(--muted); margin: 0 0 24px; line-height: 1.5; }
.landing .box { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; display: grid; gap: 12px; }
.landing label { font-size: 13px; color: var(--muted); font-weight: 600; }
.landing input { width: 100%; padding: 12px; font-size: 16px; }
.landing .or { text-align: center; color: var(--muted); font-size: 13px; }
.landing .row { display: flex; gap: 8px; }
.landing .row input { flex: 1; }
.hero-cards { display: flex; gap: 8px; margin-bottom: 20px; }

/* ---------- Layout ---------- */
.topbar { display: flex; align-items: center; gap: 12px; padding: 10px 16px; border-bottom: 1px solid var(--line); background: var(--panel); flex-wrap: wrap; }
.topbar .title { font-weight: 800; font-size: 18px; }
.topbar .spacer { flex: 1; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.pill.live::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.pill.off::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--danger); }
.share { display: flex; gap: 6px; align-items: center; }
.share input { width: 260px; font-size: 13px; padding: 6px 8px; }

.main { display: grid; grid-template-columns: 1fr 320px; gap: 16px; padding: 16px; max-width: 1400px; margin: 0 auto; }
.main.player { grid-template-columns: 1fr; max-width: 1100px; }
.main > div { min-width: 0; }
@media (max-width: 900px) { .main { grid-template-columns: 1fr; padding: 10px; } .share input { width: 160px; } }

/* ---------- Table ---------- */
.felt { position: relative; background: radial-gradient(ellipse at 50% 30%, var(--felt) 0%, var(--felt-dark) 70%); border: 10px solid var(--felt-edge); border-radius: 160px 160px 40px 40px / 120px 120px 40px 40px; padding: 18px 16px 20px; min-height: 480px; box-shadow: inset 0 0 60px rgba(0,0,0,.35), 0 10px 30px rgba(0,0,0,.4); }
@media (max-width: 700px) { .felt { border-radius: 40px; border-width: 6px; padding: 12px 8px; } }
.dealer { text-align: center; padding-bottom: 12px; }
.dealer .label { font-size: 12px; text-transform: uppercase; letter-spacing: 2px; color: rgba(255,255,255,.65); font-weight: 700; }
.felt-text { text-align: center; color: rgba(255,255,255,.35); font-size: 12px; letter-spacing: 1.5px; text-transform: uppercase; font-weight: 700; margin: 6px 0 14px; }
.status { text-align: center; margin: 4px auto 14px; font-weight: 700; font-size: 15px; background: rgba(0,0,0,.25); padding: 6px 14px; border-radius: 999px; display: table; }
.shoe-info { position: absolute; top: 14px; right: 22px; font-size: 12px; color: rgba(255,255,255,.6); text-align: right; }
@media (max-width: 700px) { .shoe-info { position: static; text-align: center; margin-bottom: 6px; } }

.seats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; align-items: start; }
@media (max-width: 1000px) { .seats { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px) { .seats { grid-template-columns: repeat(2, 1fr); gap: 8px; } }
.seat { background: rgba(0,0,0,.22); border: 2px solid rgba(255,255,255,.08); border-radius: 14px; padding: 8px; min-height: 160px; display: flex; flex-direction: column; gap: 6px; }
.seat.me { border-color: rgba(242,201,76,.6); }
.seat.turn { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(242,201,76,.25), 0 0 20px rgba(242,201,76,.25); }
.seat.away { opacity: .55; }
.seat.empty { align-items: center; justify-content: center; border-style: dashed; color: rgba(255,255,255,.5); font-size: 13px; }
.seat .who { display: flex; justify-content: space-between; align-items: baseline; gap: 6px; }
.seat .name { font-weight: 700; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.seat .chips { font-size: 13px; color: var(--gold); font-weight: 700; }
.seat .bets { display: flex; flex-wrap: wrap; gap: 4px; }
.chip-tag { font-size: 11px; font-weight: 700; padding: 2px 6px; border-radius: 6px; background: rgba(255,255,255,.12); }
.chip-tag.main { background: var(--gold); color: #2a2000; }
.hand { background: rgba(0,0,0,.15); border-radius: 10px; padding: 6px; border: 1px solid transparent; }
.hand.active { border-color: var(--gold); }
.hand .meta { display: flex; justify-content: space-between; font-size: 12px; margin-top: 4px; gap: 4px; flex-wrap: wrap; }
.total { font-weight: 800; background: rgba(0,0,0,.45); padding: 1px 7px; border-radius: 6px; }
.result { font-weight: 800; padding: 1px 7px; border-radius: 6px; }
.result.win, .result.blackjack { background: var(--accent); color: #062014; }
.result.lose, .result.bust { background: var(--danger); color: #fff; }
.result.push, .result.surrender { background: #6b7280; color: #fff; }
.net { font-weight: 800; font-size: 13px; text-align: center; }
.net.up { color: #7ef0b6; } .net.down { color: #ff9b9b; }
.side-results { display: grid; gap: 2px; }
.side-res { font-size: 11px; display: flex; justify-content: space-between; gap: 4px; padding: 2px 5px; border-radius: 5px; background: rgba(0,0,0,.25); }
.side-res.win { background: rgba(63,179,127,.35); }
.ready-tag { font-size: 11px; color: #7ef0b6; font-weight: 700; }

/* ---------- Cards ---------- */
.cards { display: flex; flex-wrap: wrap; gap: 4px; min-height: 64px; }
.dealer .cards { justify-content: center; min-height: 100px; }
.card { width: 46px; height: 64px; background: var(--card-bg); border-radius: 7px; box-shadow: 0 2px 6px rgba(0,0,0,.35); position: relative; color: var(--spade); display: flex; flex-direction: column; justify-content: space-between; padding: 3px 5px; user-select: none; flex: none; }
.card .rk { font-size: 22px; font-weight: 800; line-height: 1; letter-spacing: -1px; }
.card .st { font-size: 22px; line-height: 1; align-self: flex-end; }
.card.big { width: 66px; height: 92px; border-radius: 9px; padding: 5px 7px; }
.card.big .rk { font-size: 32px; } .card.big .st { font-size: 32px; }
.card.s-h { color: var(--heart); } .card.s-d { color: var(--diamond); } .card.s-c { color: var(--club); } .card.s-s { color: var(--spade); }
.card.back { background: repeating-linear-gradient(45deg, #2b4c8c 0 6px, #24407a 6px 12px); border: 3px solid #fff; }
.card.new { animation: deal .28s ease-out; }
@keyframes deal { from { transform: translateY(-30px) scale(.9); opacity: 0; } to { transform: none; opacity: 1; } }
@media (max-width: 560px) { .card { width: 36px; height: 52px; padding: 2px 4px; } .card .rk, .card .st { font-size: 17px; } .card.big { width: 52px; height: 74px; } .card.big .rk, .card.big .st { font-size: 25px; } }

/* ---------- Panels ---------- */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.panel h3 { margin: 0 0 10px; font-size: 14px; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); }
.side { display: grid; gap: 14px; align-content: start; }
.controls { margin-top: 14px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.actions .btn { min-width: 96px; }
.kbd { font-size: 11px; opacity: .6; margin-left: 4px; }

.bet-area { display: grid; grid-template-columns: 1fr 1.3fr; gap: 14px; }
@media (max-width: 800px) { .bet-area { grid-template-columns: 1fr; } }
.chip-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.chip { width: 50px; height: 50px; border-radius: 50%; border: 4px dashed rgba(255,255,255,.7); font-weight: 800; font-size: 13px; cursor: pointer; color: #fff; display: grid; place-items: center; box-shadow: 0 2px 6px rgba(0,0,0,.4); }
.chip.sel { outline: 3px solid var(--gold); outline-offset: 2px; }
.chip.v1 { background: #8a8f99; } .chip.v5 { background: #c0392b; } .chip.v25 { background: #1f8a4c; } .chip.v100 { background: #222; } .chip.v500 { background: #6c3fb5; }
.main-spot { border: 2px dashed var(--gold); border-radius: 14px; padding: 14px; text-align: center; cursor: pointer; background: rgba(242,201,76,.06); }
.main-spot .amt { font-size: 28px; font-weight: 800; color: var(--gold); }
.main-spot small { color: var(--muted); }
.side-list { display: grid; gap: 6px; }
.side-row { display: grid; grid-template-columns: 1fr auto auto auto; gap: 6px; align-items: center; background: var(--panel-2); border-radius: 8px; padding: 6px 8px; }
.side-row .nm { font-weight: 600; font-size: 13px; }
.side-row .nm small { display: block; color: var(--muted); font-weight: 400; font-size: 11px; }
.side-row .amt { font-weight: 800; min-width: 36px; text-align: right; color: var(--gold); }
.bet-buttons { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }

.player-list { display: grid; gap: 6px; }
.player-row { display: grid; grid-template-columns: 1fr auto; gap: 6px; align-items: center; background: var(--panel-2); padding: 8px; border-radius: 8px; font-size: 13px; }
.player-row .tools { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.player-row input { width: 70px; padding: 4px 6px; font-size: 13px; }
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 10px; font-size: 13px; }
.settings-grid label { display: grid; gap: 4px; color: var(--muted); font-weight: 600; }
.settings-grid .full { grid-column: 1 / -1; }
.settings-grid input[type=range] { padding: 0; }
.check { display: flex !important; align-items: center; gap: 8px; grid-template-columns: none; }
.log { font-size: 12px; color: var(--muted); display: grid; gap: 3px; max-height: 180px; overflow: auto; }
.hint { font-size: 12px; color: var(--muted); }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: #111; border: 1px solid var(--line); padding: 10px 16px; border-radius: 10px; z-index: 50; font-weight: 600; max-width: 90vw; }
dialog { background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: var(--radius); max-width: 640px; width: calc(100% - 32px); }
dialog::backdrop { background: rgba(0,0,0,.6); }
.paytable { display: grid; gap: 12px; max-height: 70vh; overflow: auto; margin-bottom: 12px; }
.paytable table { width: 100%; border-collapse: collapse; font-size: 13px; }
.paytable td { padding: 3px 0; border-bottom: 1px solid var(--line); }
.paytable td:last-child { text-align: right; font-weight: 700; color: var(--gold); }
.paytable h4 { margin: 0 0 2px; } .paytable p { margin: 0 0 4px; color: var(--muted); font-size: 13px; }
.center-msg { text-align: center; padding: 60px 16px; color: var(--muted); }

/* Keep every panel inside the page width. */
.settings-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.settings-grid input:not([type=checkbox]), .settings-grid select { width: 100%; min-width: 0; }
.side { min-width: 0; }
body { overflow-x: hidden; }
.timer { margin-left: 8px; padding: 1px 8px; border-radius: 999px; background: rgba(255,255,255,.15); font-variant-numeric: tabular-nums; }
.timer.urgent { background: var(--danger); }

/* ================= Live casino look ================= */
:root { --bg: #0b0e13; --panel: #151a22; --panel-2: #1d2430; --line: #2a3342; --gold: #e8c46a; --felt: #13654a; --felt-dark: #0b4733; --felt-edge: #3b2414; }
body { background: radial-gradient(ellipse at 50% -10%, #1b2330 0%, var(--bg) 60%) fixed; }
.btn.gold { background: transparent; border-color: var(--gold); color: var(--gold); }

.felt {
  border: none; overflow: hidden;
  border-radius: 28px 28px 50% 50% / 28px 28px 34% 34%;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(255,255,255,.10), transparent 55%),
    radial-gradient(ellipse at 50% 40%, var(--felt) 0%, var(--felt-dark) 75%);
  box-shadow: 0 0 0 10px #2a190e, 0 0 0 12px #6b4524, 0 18px 50px rgba(0,0,0,.6), inset 0 0 80px rgba(0,0,0,.45);
  padding: 16px 16px 70px; min-height: 560px; margin: 12px 12px 0;
}
.felt::before { content: ''; position: absolute; inset: 14px; border: 2px solid rgba(232,196,106,.35); border-radius: 20px 20px 50% 50% / 20px 20px 34% 34%; pointer-events: none; }
@media (max-width: 700px) { .felt { margin: 6px 4px 0; padding: 10px 6px 40px; border-radius: 18px 18px 46% 46% / 18px 18px 22% 22%; min-height: 0; } .felt::before { inset: 8px; border-radius: 14px 14px 46% 46% / 14px 14px 22% 22%; } }

.dealer { position: relative; z-index: 1; }
.dealer-name { font-size: 12px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: rgba(255,255,255,.8); display: flex; gap: 8px; justify-content: center; align-items: center; flex-wrap: wrap; margin-bottom: 6px; }
.dealer-name .chips { color: var(--gold); }
.dealer-total { min-height: 22px; margin-top: 4px; }
.arc-text { text-align: center; color: rgba(232,196,106,.55); font-size: 13px; letter-spacing: 3px; text-transform: uppercase; font-weight: 800; margin-top: 8px; }
.arc-text.small { font-size: 10px; letter-spacing: 2px; margin-top: 2px; color: rgba(255,255,255,.35); }
.status { background: rgba(0,0,0,.4); border: 1px solid rgba(232,196,106,.3); }

/* Shoe */
.shoe-box { position: absolute; top: 22px; right: 26px; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; z-index: 2; }
.shoe { position: relative; width: 74px; height: 58px; background: linear-gradient(160deg, #2b2f36, #111418); border-radius: 8px 22px 8px 8px; box-shadow: 0 6px 14px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,255,255,.12); transform: perspective(200px) rotateX(18deg) rotate(-8deg); }
.shoe-cards { position: absolute; left: 8px; top: 8px; width: 46px; height: 34px; border-radius: 4px; background: repeating-linear-gradient(90deg, #f3f3f3 0 2px, #cfcfcf 2px 3px); box-shadow: inset 0 0 0 2px #b03030; }
.shoe-fill { position: absolute; left: 6px; right: 6px; bottom: 5px; height: 4px; border-radius: 2px; background: linear-gradient(90deg, var(--gold) var(--fill), rgba(255,255,255,.15) var(--fill)); }
.shoe-box .shoe-info { position: static; font-size: 11px; max-width: 180px; text-align: right; }
@media (max-width: 700px) { .shoe-box { top: 10px; right: 10px; } .shoe { width: 50px; height: 40px; } .shoe-cards { width: 30px; height: 22px; } .shoe-box .shoe-info { display: none; } }

/* Cards */
.card.pending { opacity: 0; }
.card.flip { animation: flip .45s ease-out; }
@keyframes flip { 0% { transform: rotateY(90deg); } 100% { transform: none; } }
.card.new { animation: none; }
.cards.fan { justify-content: center; }
.cards.fan .card + .card { margin-left: -22px; }
.cards.fan .card { box-shadow: -2px 2px 6px rgba(0,0,0,.4); }
.dealer .cards .card + .card { margin-left: -10px; }

/* Seats along the curved edge */
.seats { grid-template-columns: 1fr 1fr 1.35fr 1fr 1fr; gap: 6px; align-items: start; margin-top: 8px; }
.seat { background: transparent; border: none; min-height: 0; align-items: center; padding: 4px; gap: 4px; }
.seat.pos0, .seat.pos4 { margin-top: 0; }
.seat.pos1, .seat.pos3 { margin-top: 46px; }
.seat.pos2 { margin-top: 70px; }
.seat.pos0 { transform: rotate(7deg); } .seat.pos1 { transform: rotate(3deg); }
.seat.pos3 { transform: rotate(-3deg); } .seat.pos4 { transform: rotate(-7deg); }
.seat.me, .seat.turn { border: none; box-shadow: none; }
.seat.empty { border: none; justify-content: flex-start; }
.seat .who { flex-direction: column; align-items: center; background: rgba(0,0,0,.45); border-radius: 10px; padding: 4px 10px; gap: 0; border: 1px solid rgba(255,255,255,.08); max-width: 100%; }
.seat.me .who { border-color: var(--gold); }
.seat.turn .who { background: var(--gold); color: #1b1300; } .seat.turn .who .chips { color: #1b1300; }
.seat .name { font-size: 13px; max-width: 100%; }
.seat .chips { font-size: 12px; }
.hand { background: transparent; padding: 2px; }
.hand.active { border-color: transparent; }
.hand.active .cards { filter: drop-shadow(0 0 8px rgba(232,196,106,.8)); }
.hand .meta { justify-content: center; }
.side-results { width: 100%; }
@media (max-width: 700px) {
  .seats { grid-template-columns: 1fr 1fr 1.7fr 1fr 1fr; gap: 2px; }
  .seat.pos1, .seat.pos3 { margin-top: 26px; } .seat.pos2 { margin-top: 40px; }
  .seat:not(.pos2) .card { width: 26px; height: 38px; padding: 1px 2px; } .seat:not(.pos2) .card .rk, .seat:not(.pos2) .card .st { font-size: 12px; }
  .seat:not(.pos2) .cards.fan .card + .card { margin-left: -14px; }
  .seat:not(.pos2) .side-results, .seat:not(.pos2) .net { display: none; }
  .seat .name { font-size: 11px; } .seat .who { padding: 2px 5px; }
  .seat.pos0, .seat.pos1, .seat.pos3, .seat.pos4 { transform: none; }
}

/* Betting circle with side bets around it */
.spot-area { position: relative; width: 150px; height: 150px; flex: none; }
.seat:not(.pos2) .spot-area { transform: scale(.72); margin: -21px; }
@media (max-width: 700px) { .seat.pos2 .spot-area { transform: scale(.8); margin: -15px; } .seat:not(.pos2) .spot-area { transform: scale(.42); margin: -43px; } }
.spot { position: absolute; left: 50%; top: 50%; width: 66px; height: 66px; transform: translate(-50%, -50%); border-radius: 50%; border: 2px solid rgba(232,196,106,.75); background: rgba(0,0,0,.18); display: grid; place-items: center; }
.spot-amt { position: absolute; bottom: -8px; left: 50%; transform: translateX(-50%); background: rgba(0,0,0,.75); color: var(--gold); font-weight: 800; font-size: 12px; padding: 0 6px; border-radius: 8px; white-space: nowrap; }
.spot-amt:empty { display: none; }
.sb { position: absolute; left: 50%; top: 50%; width: 34px; height: 34px; margin: -17px 0 0 -17px; border-radius: 50%; border: 1.5px solid rgba(255,255,255,.35); background: rgba(0,0,0,.2); color: rgba(255,255,255,.75); font: inherit; padding: 0; display: grid; place-items: center; align-content: center; transform: rotate(var(--a)) translate(58px) rotate(calc(-1 * var(--a))); }
.sb-name { font-size: 8.5px; font-weight: 800; line-height: 1; }
.sb-amt { font-size: 9px; font-weight: 800; color: #1b1300; background: var(--gold); border-radius: 6px; padding: 0 3px; margin-top: 1px; line-height: 12px; }
.sb.on { border-color: var(--gold); background: rgba(232,196,106,.18); }
.sb.won { border-color: #5ff0a8; background: rgba(63,179,127,.5); box-shadow: 0 0 10px rgba(95,240,168,.7); }
.sb.lost { opacity: .45; }
button.sb { cursor: pointer; }
button.sb:hover { border-color: var(--gold); background: rgba(232,196,106,.25); }
.spot-area.live .spot { border-style: dashed; animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 6px rgba(232,196,106,.15); } }
.ins-tag { position: absolute; left: 50%; bottom: -14px; transform: translateX(-50%); font-size: 10px; font-weight: 700; background: rgba(0,0,0,.6); padding: 1px 6px; border-radius: 6px; white-space: nowrap; }

/* Chips */
.chipv { --c: #888; position: relative; width: 58px; height: 58px; border-radius: 50%; border: none; padding: 0; cursor: pointer; color: #fff; font: inherit; font-weight: 800; font-size: 14px;
  background:
    radial-gradient(circle, var(--c) 0 52%, transparent 53%),
    repeating-conic-gradient(#fff 0 12deg, var(--c) 12deg 45deg);
  box-shadow: 0 3px 8px rgba(0,0,0,.55), inset 0 0 0 3px rgba(0,0,0,.25);
  display: grid; place-items: center; transition: transform .12s; }
.chipv span { width: 62%; height: 62%; border-radius: 50%; border: 2px dashed rgba(255,255,255,.55); display: grid; place-items: center; text-shadow: 0 1px 2px rgba(0,0,0,.6); }
.chipv:hover { transform: translateY(-3px); }
.chipv.sel { transform: translateY(-6px); box-shadow: 0 0 0 3px var(--gold), 0 8px 16px rgba(0,0,0,.6); }
.cv1 { --c: #9aa1ab; } .cv5 { --c: #c62f2f; } .cv25 { --c: #1d8a4a; } .cv100 { --c: #23262d; } .cv500 { --c: #6d3cc0; }
.chipv.sm { width: 34px; height: 34px; position: absolute; left: 50%; top: 50%; margin: -17px 0 0 -17px; transform: translateY(calc(var(--i) * -3px)); cursor: default; box-shadow: 0 2px 2px rgba(0,0,0,.5), inset 0 0 0 2px rgba(0,0,0,.25); }
.stack { position: absolute; inset: 0; }
.chipv.fly { position: fixed; z-index: 100; pointer-events: none; margin: 0; }

/* Tray in the middle under the table */
.tray { max-width: 760px; margin: 18px auto 0; background: linear-gradient(180deg, #1a212c, #121820); border: 1px solid var(--line); border-radius: 18px; padding: 14px; display: grid; gap: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.4); }
.tray:empty { display: none; }
.tray-row { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; }
.chip-rack { display: flex; gap: 10px; justify-content: center; }
.balance { display: grid; text-align: center; } .balance small { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: 1px; } .balance b { color: var(--gold); font-size: 20px; }
.tray-msg { text-align: center; color: var(--muted); }
.tray-hint { text-align: center; }
@media (max-width: 560px) {
  .tray { margin: 12px 4px 0; padding: 10px; }
  .tray-row { grid-template-columns: 1fr 1fr; } .chip-rack { grid-column: 1 / -1; order: -1; gap: 6px; }
  .chipv { width: 50px; height: 50px; font-size: 12px; }
}
.actions.play { gap: 12px; }
.round-btn { width: 74px; height: 74px; border-radius: 50%; border: 2px solid rgba(255,255,255,.2); background: #222a36; color: #fff; font: inherit; cursor: pointer; display: grid; place-items: center; align-content: center; gap: 2px; box-shadow: 0 4px 10px rgba(0,0,0,.4); }
.round-btn b { font-size: 13px; } .round-btn .kbd { margin: 0; }
.round-btn.hit { background: #1f8a4c; border-color: #4fd18a; } .round-btn.stand { background: #b93838; border-color: #ff7b7b; }
.round-btn.double { background: #8a6a1f; border-color: var(--gold); } .round-btn.split { background: #2f5fb0; border-color: #7aa8ff; }
.round-btn:disabled { opacity: .3; cursor: not-allowed; }
.round-btn:not(:disabled):hover { transform: translateY(-2px); }
@media (max-width: 560px) { .round-btn { width: 60px; height: 60px; } .actions.play { gap: 6px; } }
.controls[hidden] { display: none; }

/* Clean full width page with a menu */
.main.player { max-width: 1280px; }
.topbar { position: sticky; top: 0; z-index: 20; background: rgba(11,14,19,.85); backdrop-filter: blur(8px); border-bottom: 1px solid rgba(255,255,255,.06); }
.topbar .title { letter-spacing: 3px; text-transform: uppercase; font-size: 15px; color: var(--gold); }
.menu-wrap { position: relative; }
.hamburger { width: 40px; height: 36px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel-2); display: grid; place-content: center; gap: 4px; cursor: pointer; padding: 0; }
.hamburger span { display: block; width: 18px; height: 2px; background: var(--text); border-radius: 2px; }
.menu { display: none; position: absolute; right: 0; top: 100%; padding-top: 8px; width: 380px; max-width: calc(100vw - 24px); }
.menu-wrap:hover .menu, .menu-wrap.open .menu, .menu-wrap:focus-within .menu { display: block; }
.menu > .menu-sec:first-child { border-radius: 14px 14px 0 0; }
.menu > .menu-sec:last-child { border-radius: 0 0 14px 14px; }
.menu-sec { background: var(--panel); border: 1px solid var(--line); border-top: none; padding: 12px 14px; }
.menu > .menu-sec:first-child { border-top: 1px solid var(--line); }
.menu { max-height: calc(100vh - 70px); overflow-y: auto; filter: drop-shadow(0 16px 30px rgba(0,0,0,.6)); }
.menu-title { font-size: 11px; text-transform: uppercase; letter-spacing: 1.5px; color: var(--muted); font-weight: 700; margin-bottom: 8px; }
.menu .share input { flex: 1; width: auto; }
.menu-items { display: grid; gap: 2px; padding: 6px; }
.menu-item { text-align: left; background: transparent; border: none; color: var(--text); padding: 9px 10px; border-radius: 8px; cursor: pointer; font: inherit; font-weight: 600; }
.menu-item:hover { background: var(--panel-2); }
.menu .actions { justify-content: flex-start; }
.menu .actions .btn { min-width: 0; padding: 8px 12px; font-size: 13px; }
.seats { grid-template-columns: minmax(0,1fr) minmax(0,1fr) minmax(0,1.35fr) minmax(0,1fr) minmax(0,1fr); }
.seat { min-width: 0; }
@media (max-width: 700px) {
  .seats { grid-template-columns: minmax(0,1fr) minmax(0,1fr) minmax(0,1.7fr) minmax(0,1fr) minmax(0,1fr); }
  .seat:not(.pos2) .spot-area { transform: scale(.38); margin: -46px; }
  .topbar { flex-wrap: nowrap; padding: 8px 10px; gap: 8px; }
  .topbar .title { font-size: 13px; letter-spacing: 2px; }
  .topbar .pill { font-size: 11px; padding: 3px 8px; }
  .arc-text { font-size: 10px; letter-spacing: 1.5px; } .arc-text.small { display: none; }
  .dealer-name { font-size: 10px; }
}
.vote-pop { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; background: rgba(0,0,0,.45); padding: 16px; }
.vote-card { background: var(--panel); border: 1px solid var(--gold); border-radius: 16px; padding: 18px; max-width: 380px; width: 100%; text-align: center; box-shadow: 0 20px 50px rgba(0,0,0,.6); }
.vote-title { font-weight: 800; font-size: 18px; margin-bottom: 6px; }
.vote-card p { color: var(--muted); margin: 0 0 12px; }
.vote-card .actions .btn { min-width: 110px; }
.vote-bar { height: 4px; border-radius: 2px; background: rgba(255,255,255,.1); margin-top: 14px; overflow: hidden; }
.vote-bar span { display: block; height: 100%; background: var(--gold); transition: width .2s linear; }
.spot[data-act] { cursor: pointer; }
.spot[data-act]:hover { box-shadow: 0 0 0 4px rgba(232,196,106,.3); }
.chip-rack { align-items: center; }
.icon-btn { width: 64px; height: 64px; border-radius: 50%; border: 2px solid var(--gold); background: rgba(232,196,106,.08); color: var(--gold); font: inherit; font-size: 11px; font-weight: 700; cursor: pointer; display: grid; place-items: center; align-content: center; gap: 0; }
.icon-btn .ico { font-size: 22px; line-height: 1; }
.icon-btn:hover:not(:disabled) { background: rgba(232,196,106,.2); }
.icon-btn:disabled { opacity: .3; cursor: not-allowed; }
@media (max-width: 560px) { .icon-btn { width: 50px; height: 50px; font-size: 10px; } .icon-btn .ico { font-size: 18px; } .chip-rack { gap: 4px; } .chipv { width: 44px; height: 44px; } }
.result-pop { position: fixed; left: 50%; top: 42%; transform: translate(-50%, -50%); z-index: 70; pointer-events: none; text-align: center; padding: 18px 46px; border-radius: 18px; background: rgba(8,10,14,.82); border: 2px solid var(--gold); box-shadow: 0 20px 60px rgba(0,0,0,.6); }
.result-pop small { display: block; font-size: 16px; letter-spacing: 4px; text-transform: uppercase; font-weight: 800; color: var(--muted); }
.result-pop b { display: block; font-size: 64px; font-weight: 800; line-height: 1.05; }
.result-pop.win b { color: var(--gold); text-shadow: 0 0 30px rgba(232,196,106,.6); } .result-pop.win small { color: #7ef0b6; }
.result-pop.lose { border-color: var(--danger); } .result-pop.lose b { color: #ff8a8a; }
.result-pop.push b { color: #fff; }
@media (max-width: 560px) { .result-pop { padding: 12px 28px; } .result-pop b { font-size: 44px; } }
@media (max-width: 700px) { .dealer-name { padding-right: 56px; padding-left: 4px; justify-content: flex-start; } .topbar .btn.small { padding: 5px 8px; } }
.deal-me-in { display: flex; justify-content: center; align-items: center; gap: 10px; margin: -4px 0 6px; position: relative; z-index: 3; }
.deal-btn { font: inherit; font-weight: 800; font-size: 20px; letter-spacing: 2px; text-transform: uppercase; color: #1b1300; background: linear-gradient(180deg, #f6dc8f, #d9a93e); border: none; border-radius: 999px; padding: 14px 38px; cursor: pointer; box-shadow: 0 8px 24px rgba(0,0,0,.5), 0 0 0 4px rgba(232,196,106,.25); animation: glow 1.6s ease-in-out infinite; }
.deal-btn:hover { transform: translateY(-2px); }
@keyframes glow { 50% { box-shadow: 0 8px 24px rgba(0,0,0,.5), 0 0 0 10px rgba(232,196,106,.12); } }
.deal-me-in.waiting span { background: rgba(0,0,0,.5); padding: 8px 16px; border-radius: 999px; font-weight: 700; color: #7ef0b6; }
@media (max-width: 560px) { .deal-btn { font-size: 16px; padding: 10px 26px; } }
.result-pop { background: rgba(8,10,14,.96); }
.pill, .topbar .btn { white-space: nowrap; }
