/* Spin Poker - client styles.
   Sections: tokens, base, controls, top bar, lobby, table, overlays, action bar, chat, dialogs, responsive. */

/* ------------------------------------------------------------------ tokens */
:root {
  --bg: #0b0d12;
  --bg-2: #151923;
  --panel: #151922;
  --panel-2: #1c212c;
  --panel-3: #252b38;
  --line: #2a3140;
  --text: #eef1f6;
  --muted: #8d96a9;
  --accent: #ff7a1a;
  --accent-2: #ffa94d;
  --gold: #ffd166;
  --green: #1fc88a;
  --green-2: #129a68;
  --red: #f0506a;
  --blue: #4d8dff;
  --felt-1: #12705a;
  --felt-2: #06392f;
  --back-1: #c0283d;
  --back-2: #7d1224;
  --radius: 14px;
  --topbar-h: 58px;
  --font: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: dark;
}

/* -------------------------------------------------------------------- base */
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  background: radial-gradient(120% 80% at 50% 0%, var(--bg-2), var(--bg) 70%) fixed var(--bg);
  color: var(--text);
  font: 15px/1.45 var(--font);
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow: hidden;
  overscroll-behavior: none;
}
[hidden] { display: none !important; }
h1, h2, h3, h4, p { margin: 0; }
h4 { margin: 20px 0 10px; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; padding: 0; touch-action: manipulation; }
button:disabled { cursor: not-allowed; opacity: .5; }
input { font: inherit; color: inherit; }
small { font-size: .8em; color: var(--muted); }
:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--panel-3); border-radius: 10px; border: 2px solid transparent; background-clip: padding-box; }
* { scrollbar-width: thin; scrollbar-color: var(--panel-3) transparent; }

.pos { color: var(--green); }
.neg { color: var(--red); }
.icon { display: inline-flex; font-size: 1.25em; line-height: 0; }
.hint { color: var(--muted); font-size: 13px; margin: 10px 0; }
.lobby-note { text-align: center; margin-top: 22px; }
.noscript { color: #fff; text-align: center; padding: 40px; }
.notice { background: rgba(240, 80, 106, .12); border: 1px solid rgba(240, 80, 106, .4); color: #ffc2cc; padding: 10px 12px; border-radius: 10px; margin-bottom: 14px; font-size: 14px; }
.empty { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 34px 16px; color: var(--muted); text-align: center; }

.spinner { width: 14px; height: 14px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .2); border-top-color: var(--accent); animation: spin .8s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }

.badge { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--red); color: #fff; font: 700 11px/18px var(--font); font-style: normal; text-align: center; }

/* ---------------------------------------------------------------- controls */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 20px; border-radius: 11px; font-weight: 700; letter-spacing: .01em; transition: transform .08s, filter .15s, background .15s; white-space: nowrap; }
.btn:active:not(:disabled) { transform: translateY(1px) scale(.99); }
.btn-primary { background: linear-gradient(180deg, var(--accent-2), var(--accent)); color: #1a0d02; box-shadow: 0 6px 18px -8px var(--accent), inset 0 1px 0 rgba(255, 255, 255, .35); }
.btn-primary:hover:not(:disabled) { filter: brightness(1.08); }
.btn-ghost { background: var(--panel-2); border: 1px solid var(--line); color: var(--text); }
.btn-ghost:hover:not(:disabled) { background: var(--panel-3); }
.btn-sm { height: 34px; padding: 0 12px; font-size: 13px; border-radius: 9px; }
.btn-block { width: 100%; }

.icon-btn { position: relative; display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; color: var(--muted); background: var(--panel-2); border: 1px solid var(--line); flex: none; transition: color .15s, background .15s; }
.icon-btn:hover:not(:disabled) { color: var(--text); background: var(--panel-3); }
.icon-btn .badge { position: absolute; top: -6px; right: -6px; }

.segmented { display: inline-flex; padding: 4px; gap: 2px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.segmented::-webkit-scrollbar { display: none; }
.segmented button { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; border-radius: 9px; font-weight: 600; font-size: 14px; color: var(--muted); white-space: nowrap; transition: background .15s, color .15s; }
.segmented button:hover { color: var(--text); }
.segmented button.active { background: var(--panel-3); color: var(--text); box-shadow: inset 0 -2px 0 var(--accent); }
.seg-sm button { height: 28px; padding: 0 10px; font-size: 12.5px; }

.range { -webkit-appearance: none; appearance: none; width: 100%; height: 28px; background: transparent; --fill: 50%; cursor: pointer; }
.range::-webkit-slider-runnable-track { height: 8px; border-radius: 8px; background: linear-gradient(90deg, var(--accent) var(--fill), var(--panel-3) var(--fill)); }
.range::-moz-range-track { height: 8px; border-radius: 8px; background: var(--panel-3); }
.range::-moz-range-progress { height: 8px; border-radius: 8px; background: var(--accent); }
.range::-webkit-slider-thumb { -webkit-appearance: none; width: 24px; height: 24px; margin-top: -8px; border-radius: 50%; background: #fff; border: 5px solid var(--accent); box-shadow: 0 2px 8px rgba(0, 0, 0, .5); }
.range::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 5px solid var(--accent); }

.avatar { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: radial-gradient(circle at 30% 25%, var(--a1), var(--a2)); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .14); flex: none; font-size: 19px; line-height: 1; overflow: hidden; }
.avatar-glyph { transform: translateY(1px); }

.place-badge { display: inline-grid; place-items: center; min-width: 40px; height: 26px; padding: 0 8px; border-radius: 8px; font-weight: 800; font-size: 12.5px; background: var(--panel-3); color: var(--muted); flex: none; }
.place-badge.place-1 { background: linear-gradient(180deg, #ffe08a, #e6a700); color: #2b1d00; }
.place-badge.place-2 { background: linear-gradient(180deg, #e5e9f0, #9aa4b5); color: #1a2030; }

.mult-chip { display: inline-block; padding: 1px 8px; border-radius: 7px; background: rgba(77, 141, 255, .16); color: #9cc0ff; font-weight: 700; font-size: .9em; }
.mult-chip.hot { background: rgba(255, 209, 102, .16); color: var(--gold); }

/* -------------------------------------------------------------------- boot */
.boot { position: fixed; inset: 0; display: grid; place-content: center; gap: 22px; justify-items: center; }
.boot-logo { display: flex; align-items: center; gap: 12px; font-size: 30px; font-weight: 800; letter-spacing: .14em; }
.boot-logo b { color: var(--accent); font-weight: 800; }
.boot-logo i, .brand-mark { width: 30px; height: 30px; border-radius: 50%; border: 6px dashed var(--accent); background: radial-gradient(circle, var(--gold) 42%, transparent 46%); animation: spin 6s linear infinite; flex: none; }
.boot-bar { width: 220px; height: 4px; border-radius: 4px; background: var(--panel-3); overflow: hidden; }
.boot-bar i { display: block; width: 40%; height: 100%; background: var(--accent); border-radius: 4px; animation: boot 1.1s ease-in-out infinite alternate; }
@keyframes boot { from { transform: translateX(-60%); } to { transform: translateX(210%); } }

/* ----------------------------------------------------------------- top bar */
#app { display: flex; flex-direction: column; height: 100dvh; }
.topbar { display: flex; align-items: center; gap: 14px; height: var(--topbar-h); padding: 0 max(14px, env(safe-area-inset-right)) 0 max(14px, env(safe-area-inset-left)); background: rgba(13, 16, 22, .86); border-bottom: 1px solid var(--line); backdrop-filter: blur(10px); flex: none; z-index: 30; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: .12em; font-size: 16px; flex: none; }
.brand b { color: var(--accent); font-weight: 800; }
.brand-mark { width: 24px; height: 24px; border-width: 5px; animation-duration: 14s; }

.table-tabs { display: flex; gap: 8px; flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; padding: 2px; }
.table-tabs::-webkit-scrollbar { display: none; }
.table-tab { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px; border-radius: 10px; background: var(--panel-2); border: 1px solid var(--line); flex: none; text-align: left; color: var(--muted); }
.table-tab > span:last-child { display: grid; line-height: 1.15; }
.table-tab b { font-size: 13px; color: var(--text); }
.table-tab small { font-size: 11px; }
.table-tab.active { border-color: var(--accent); background: rgba(255, 122, 26, .12); color: var(--accent-2); }
.table-tab.needs { animation: needs 1s ease-in-out infinite; border-color: var(--green); color: var(--green); }
.table-tab.done { opacity: .7; }
.table-tab.waiting { cursor: default; }
@keyframes needs { 50% { box-shadow: 0 0 0 3px rgba(31, 200, 138, .35); } }

.top-right { display: flex; align-items: center; gap: 8px; margin-left: auto; flex: none; }
.online { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); margin-right: 4px; }
.online i { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px rgba(31, 200, 138, .2); }
.online b { color: var(--text); }
.wallet { display: flex; align-items: center; gap: 6px; height: 38px; padding: 0 4px 0 14px; border-radius: 10px; background: var(--panel-2); border: 1px solid var(--line); }
.wallet b { font-size: 15px; }
.wallet em { font-style: normal; font-size: 12px; color: var(--muted); }
.wallet-plus { display: grid; place-items: center; width: 30px; height: 30px; margin-left: 6px; border-radius: 8px; background: linear-gradient(180deg, var(--accent-2), var(--accent)); color: #1a0d02; font-weight: 800; font-size: 18px; }
.profile-btn { display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 12px 0 3px; border-radius: 20px; background: var(--panel-2); border: 1px solid var(--line); font-weight: 600; font-size: 14px; max-width: 170px; }
.profile-btn .avatar { width: 30px; height: 30px; font-size: 16px; }
.profile-btn > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body[data-view="table"] .lobby-only { display: none; }

.offline { position: fixed; top: calc(var(--topbar-h) + 8px); left: 50%; transform: translateX(-50%); z-index: 60; padding: 8px 16px; border-radius: 10px; background: #5a1522; border: 1px solid var(--red); font-weight: 600; font-size: 14px; box-shadow: 0 10px 30px rgba(0, 0, 0, .5); }

/* ------------------------------------------------------------------- lobby */
.lobby { flex: 1; overflow-y: auto; padding: 22px max(18px, env(safe-area-inset-right)) 40px max(18px, env(safe-area-inset-left)); }
.lobby > * { max-width: 1320px; margin-left: auto; margin-right: auto; }

.lobby-hero { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 26px 28px; border-radius: 20px; border: 1px solid var(--line); overflow: hidden; background: radial-gradient(60% 140% at 100% 0%, rgba(255, 122, 26, .28), transparent 60%), radial-gradient(50% 120% at 0% 100%, rgba(31, 200, 138, .16), transparent 60%), var(--panel); }
.hero-text h1 { font-size: clamp(22px, 3vw, 34px); line-height: 1.12; font-weight: 800; letter-spacing: -.01em; }
.hero-text h1 em { font-style: normal; color: var(--gold); white-space: nowrap; }
.hero-text p { margin-top: 8px; color: var(--muted); max-width: 520px; }
.hero-mults { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; max-width: 360px; flex: none; }
.hero-mults span { padding: 6px 12px; border-radius: 10px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .08); font-weight: 800; color: #c9d2e3; }
.hero-mults span.hot { color: var(--gold); border-color: rgba(255, 209, 102, .4); background: rgba(255, 209, 102, .1); }

.lobby-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 22px; margin-top: 22px; align-items: start; }
.lobby-main { min-width: 0; }
.lobby-tabs { margin-bottom: 18px; }

.play-filters { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.stepper { display: flex; align-items: center; gap: 4px; height: 44px; padding: 0 6px 0 14px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; }
.stepper-label { font-size: 13px; color: var(--muted); margin-right: 6px; }
.stepper b { min-width: 24px; text-align: center; font-size: 16px; }
.stepper button { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; background: var(--panel-3); }
.stepper button:hover:not(:disabled) { background: var(--line); }

.game-block { margin-top: 20px; }
.game-block h3 { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; font-size: 18px; margin-bottom: 12px; }
.game-block h3 small { font-weight: 500; font-size: 13px; }
.buyin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }

.buyin-card { position: relative; display: flex; flex-direction: column; gap: 12px; padding: 16px; border-radius: var(--radius); background: linear-gradient(180deg, var(--panel-2), var(--panel)); border: 1px solid var(--line); overflow: hidden; transition: transform .15s, border-color .15s; }
.buyin-card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: linear-gradient(90deg, var(--accent), var(--gold)); }
.buyin-card.game-omaha::before { background: linear-gradient(90deg, #7c5cff, #4d8dff); }
.buyin-card:hover { transform: translateY(-2px); border-color: #3a4356; }
.buyin-card.is-waiting { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 14px 30px -18px var(--accent); }
.bc-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.bc-game { display: grid; font-weight: 700; font-size: 13px; line-height: 1.2; }
.seat-dots { display: flex; gap: 4px; }
.seat-dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--panel-3); border: 1px solid var(--line); }
.seat-dots i.on { background: var(--green); border-color: var(--green); box-shadow: 0 0 6px var(--green); }
.bc-buyin { display: flex; align-items: baseline; gap: 6px; }
.bc-buyin small { width: 100%; position: absolute; }
.bc-buyin { position: relative; padding-top: 16px; }
.bc-buyin b { font-size: 34px; line-height: 1; font-weight: 800; letter-spacing: -.02em; }
.bc-buyin em { font-style: normal; color: var(--muted); font-weight: 600; }
.bc-buyin small { top: 0; left: 0; }
.bc-prize { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 9px 11px; border-radius: 10px; background: rgba(255, 209, 102, .08); border: 1px dashed rgba(255, 209, 102, .28); }
.bc-prize b { color: var(--gold); font-size: 15px; white-space: nowrap; }
.bc-waiting { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 44px; }
.bc-wait-text { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--accent-2); }

.stat-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat { padding: 14px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line); display: grid; gap: 4px; }
.stat b { font-size: 18px; }
.stat.pos b { color: var(--green); }
.stat.neg b { color: var(--red); }

.history-list { display: grid; gap: 8px; }
.history-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); text-align: left; transition: background .15s; }
.history-row:hover { background: var(--panel-2); }
.hr-main { display: grid; flex: 1; min-width: 0; }
.hr-main b, .hr-main small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hr-mult { font-weight: 800; color: #9cc0ff; }
.hr-prize { min-width: 70px; text-align: right; font-weight: 800; color: var(--muted); }
.hr-prize.pos { color: var(--green); }
.history-row .icon { color: var(--muted); }

.lead { color: #c5ccd9; margin-bottom: 14px; }
.table-scroll { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--line); }
.data-table { width: 100%; border-collapse: collapse; background: var(--panel); font-size: 14px; }
.data-table th, .data-table td { padding: 11px 14px; text-align: right; white-space: nowrap; }
.data-table th:first-child, .data-table td:first-child { text-align: left; }
.data-table th { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; background: var(--panel-2); }
.data-table tr + tr td { border-top: 1px solid var(--line); }

.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.step { display: flex; gap: 12px; padding: 16px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line); }
.step > span { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: linear-gradient(180deg, var(--accent-2), var(--accent)); color: #1a0d02; font-weight: 800; flex: none; }
.step p { color: var(--muted); font-size: 13.5px; margin-top: 4px; }
.facts { list-style: none; margin: 0; padding: 0; border-radius: var(--radius); border: 1px solid var(--line); background: var(--panel); }
.facts li { display: flex; justify-content: space-between; gap: 16px; padding: 10px 14px; }
.facts li + li { border-top: 1px solid var(--line); }
.facts span { color: var(--muted); }
.facts b { text-align: right; }
.blind-strip { display: flex; flex-wrap: wrap; gap: 6px; }
.blind-strip span { display: grid; justify-items: center; padding: 6px 10px; border-radius: 9px; background: var(--panel); border: 1px solid var(--line); font-weight: 700; font-size: 13px; }
.blind-strip span.now { border-color: var(--accent); background: rgba(255, 122, 26, .14); }
.blind-strip span.past { opacity: .45; }

.wins-panel { position: sticky; top: 0; padding: 16px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line); min-width: 0; }
.wins-panel h3 { font-size: 16px; margin-bottom: 10px; }
.month-top { display: grid; gap: 2px; padding: 14px; margin-bottom: 16px; border-radius: 12px; background: linear-gradient(135deg, rgba(255, 209, 102, .2), rgba(255, 122, 26, .1)); border: 1px solid rgba(255, 209, 102, .35); }
.month-top small { display: flex; align-items: center; gap: 6px; color: var(--gold); font-weight: 600; }
.month-top b { font-size: 26px; font-weight: 800; }
.month-top span { font-size: 13px; color: #cfd6e4; }
.wins-list { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 6px; max-height: 520px; overflow-y: auto; }
.wins-list li { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 11px; background: var(--panel-2); border: 1px solid transparent; }
.wins-list li.top-1 { border-color: rgba(255, 209, 102, .5); background: linear-gradient(90deg, rgba(255, 209, 102, .14), var(--panel-2)); }
.wins-list li.top-2 { border-color: rgba(200, 208, 222, .3); }
.wins-list li.top-3 { border-color: rgba(205, 127, 50, .4); }
.win-who, .win-what { display: grid; line-height: 1.25; min-width: 0; }
.win-who { flex: 1; }
.win-who b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.win-what { text-align: right; flex: none; }
.win-what b { color: var(--gold); }

/* hand history */
.hands { display: grid; gap: 8px; }
.hand { border-radius: 12px; background: var(--panel-2); border: 1px solid var(--line); }
.hand summary { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 10px 14px; cursor: pointer; list-style: none; }
.hand summary::-webkit-details-marker { display: none; }
.hand-winner { flex: 1; text-align: right; font-size: 13px; color: var(--muted); }
.hand-delta { min-width: 52px; text-align: right; font-weight: 800; }
.hand-body { padding: 4px 14px 14px; border-top: 1px solid var(--line); }
.hand-players { display: flex; flex-wrap: wrap; gap: 8px 20px; padding: 12px 0; }
.hand-players > div { display: flex; align-items: center; gap: 8px; }
.hand-lines { margin: 0; padding-left: 26px; color: #c5ccd9; font-size: 13.5px; line-height: 1.7; }
.mini-cards { display: inline-flex; gap: 3px; --cw: 24px; }

/* ------------------------------------------------------------------- cards */
.card { position: relative; width: var(--cw); height: calc(var(--cw) * 1.4); border-radius: calc(var(--cw) * .11); background: linear-gradient(180deg, #ffffff, #e9edf3); color: #171a21; box-shadow: 0 calc(var(--cw) * .04) calc(var(--cw) * .12) rgba(0, 0, 0, .45); flex: none; font-weight: 800; user-select: none; transition: transform .25s, filter .25s, box-shadow .25s; overflow: hidden; }
.card-rank { position: absolute; top: calc(var(--cw) * .04); left: calc(var(--cw) * .1); font-size: calc(var(--cw) * .46); line-height: 1; letter-spacing: -.06em; }
.card-suit { position: absolute; top: calc(var(--cw) * .5); left: calc(var(--cw) * .1); font-size: calc(var(--cw) * .3); line-height: 1; }
.card-pip { position: absolute; right: calc(var(--cw) * .07); bottom: calc(var(--cw) * .02); font-size: calc(var(--cw) * .66); line-height: 1; }
.card.suit-h, .card.suit-d { color: #d42a41; }
.deck-4 .card.suit-d { color: #1c6fe3; }
.deck-4 .card.suit-c { color: #17964a; }
.face-solid .card:not(.card-back) { color: #fff; background: linear-gradient(180deg, #3b4252, #1f2430); }
.face-solid .card.suit-h, .face-solid .card.suit-d { background: linear-gradient(180deg, #e2445a, #b01f35); }
.face-solid.deck-4 .card.suit-d { background: linear-gradient(180deg, #3d86f0, #1b55b8); }
.face-solid.deck-4 .card.suit-c { background: linear-gradient(180deg, #2bb463, #147a3c); }
.card-back { background: repeating-linear-gradient(45deg, rgba(255, 255, 255, .1) 0 calc(var(--cw) * .06), transparent calc(var(--cw) * .06) calc(var(--cw) * .14)), linear-gradient(135deg, var(--back-1), var(--back-2)); box-shadow: inset 0 0 0 calc(var(--cw) * .07) rgba(255, 255, 255, .85), inset 0 0 0 calc(var(--cw) * .11) var(--back-2), 0 calc(var(--cw) * .04) calc(var(--cw) * .12) rgba(0, 0, 0, .45); }
.card-in { animation: card-in .32s cubic-bezier(.2, .8, .3, 1.2) backwards; }
@keyframes card-in { from { opacity: 0; transform: translateY(calc(var(--cw) * -.6)) scale(.7) rotate(-8deg); } }
.card.hl { transform: translateY(calc(var(--cw) * -.14)); box-shadow: 0 0 0 calc(var(--cw) * .05) var(--gold), 0 0 calc(var(--cw) * .4) rgba(255, 209, 102, .7); }
.card.dim { filter: brightness(.42) saturate(.6); }
.no-anim .card-in, .no-anim .seat-win, .no-anim .seat-emote.pop { animation: none; }

/* ------------------------------------------------------------------- table */
.table-view { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.table-hud { display: flex; align-items: center; gap: 10px; padding: 10px max(14px, env(safe-area-inset-right)) 0 max(14px, env(safe-area-inset-left)); flex: none; }
.hud-info { display: flex; align-items: stretch; gap: 8px; flex: 1; min-width: 0; justify-content: center; overflow-x: auto; scrollbar-width: none; }
.hud-info::-webkit-scrollbar { display: none; }
.hud-prize, .hud-item { display: grid; align-content: center; padding: 5px 12px; border-radius: 10px; background: var(--panel); border: 1px solid var(--line); line-height: 1.2; white-space: nowrap; flex: none; }
.hud-prize { border-color: rgba(255, 209, 102, .4); background: rgba(255, 209, 102, .08); }
.hud-prize b { color: var(--gold); }
.hud-prize em { font-style: normal; margin-left: 6px; padding: 0 6px; border-radius: 6px; background: rgba(255, 209, 102, .18); font-size: .85em; }
.hud-buttons { display: flex; gap: 8px; flex: none; }
.hud-back { min-width: 38px; height: 38px; flex: none; }

.table-area { flex: 1; min-height: 0; display: grid; place-items: center; padding: 6px 8px; overflow: hidden; }
.stage { position: relative; --u: 10px; font-size: calc(var(--u) * 1.5); }

.rail { position: absolute; left: 5%; right: 5%; top: 13%; bottom: 15%; padding: calc(var(--u) * 1.5); border-radius: 999px; background: linear-gradient(180deg, #343b4a, #171b24); box-shadow: 0 calc(var(--u) * 2.5) calc(var(--u) * 5) rgba(0, 0, 0, .6), inset 0 calc(var(--u) * .2) 0 rgba(255, 255, 255, .14), inset 0 calc(var(--u) * -.3) calc(var(--u) * .6) rgba(0, 0, 0, .6); }
.felt { position: relative; width: 100%; height: 100%; border-radius: inherit; background: radial-gradient(ellipse at 50% 38%, var(--felt-1), var(--felt-2) 92%); box-shadow: inset 0 0 calc(var(--u) * 7) rgba(0, 0, 0, .55), inset 0 0 0 calc(var(--u) * .25) rgba(0, 0, 0, .35); }
.felt::after { content: ""; position: absolute; inset: calc(var(--u) * 2.2); border-radius: inherit; border: calc(var(--u) * .16) solid rgba(255, 255, 255, .1); }

.pot { position: absolute; left: 50%; top: 24.500%; transform: translate(-50%, -50%); display: flex; align-items: baseline; gap: calc(var(--u) * .8); padding: calc(var(--u) * .45) calc(var(--u) * 1.6); border-radius: 999px; background: rgba(0, 0, 0, .42); border: 1px solid rgba(255, 255, 255, .1); white-space: nowrap; z-index: 3; }
.pot small { font-size: calc(var(--u) * 1.25); text-transform: uppercase; letter-spacing: .1em; color: rgba(255, 255, 255, .65); }
.pot b { font-size: calc(var(--u) * 1.9); color: var(--gold); }
.board { position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%); display: flex; gap: calc(var(--u) * .7); --cw: calc(var(--u) * 6.6); z-index: 3; }

.seat { position: absolute; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; z-index: 4; }
.seat.pos-0 { left: 50%; top: 86%; }
.seat.pos-1 { left: 15%; top: 30%; }
.seat.pos-2 { left: 85%; top: 30%; }
.seat-cards { display: flex; justify-content: center; gap: calc(var(--u) * .4); --cw: calc(var(--u) * 4.3); height: calc(var(--cw) * 1.4); margin-bottom: calc(var(--u) * -1.2); transition: opacity .2s; }
.seat.pos-0 .seat-cards { --cw: calc(var(--u) * 6.4); }
.seat:not(.pos-0) .seat-cards:has(.card:not(.card-back)) { --cw: calc(var(--u) * 5.2); }
.seat:not(.pos-0) .seat-cards.many .card + .card { margin-left: calc(var(--cw) * -.45); }
.seat:not(.pos-0) .seat-cards.many .card:not(.card-back) + .card { margin-left: calc(var(--cw) * -.2); }
.seat-pod { position: relative; z-index: 2; display: flex; align-items: center; gap: calc(var(--u) * .9); min-width: calc(var(--u) * 15); padding: calc(var(--u) * .45) calc(var(--u) * 1.7) calc(var(--u) * .45) calc(var(--u) * .45); border-radius: 999px; background: linear-gradient(180deg, #232936, #12151c); border: calc(var(--u) * .16) solid #3a4254; box-shadow: 0 calc(var(--u) * .6) calc(var(--u) * 1.6) rgba(0, 0, 0, .55); transition: border-color .2s, box-shadow .2s, opacity .2s; }
.seat-avatar .avatar { width: calc(var(--u) * 5.600); height: calc(var(--u) * 5.600); font-size: calc(var(--u) * 3); }
.seat-plate { display: grid; min-width: 0; padding-bottom: calc(var(--u) * .4); line-height: 1.2; }
.seat-name { display: flex; align-items: center; gap: calc(var(--u) * .5); font-size: calc(var(--u) * 1.3); color: #aab3c5; max-width: calc(var(--u) * 13); white-space: nowrap; }
.seat-name > span { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.seat-name > em { flex: none; }
.bot-tag { font-style: normal; font-size: .72em; font-weight: 700; padding: 0 .45em; border-radius: .4em; background: rgba(255, 255, 255, .1); color: #c5ccd9; letter-spacing: .05em; }
.seat-stack { font-size: calc(var(--u) * 1.75); font-weight: 800; white-space: nowrap; }
.seat-timer { position: absolute; left: calc(var(--u) * 7); right: calc(var(--u) * 1.8); bottom: calc(var(--u) * .5); height: calc(var(--u) * .4); border-radius: 99px; background: rgba(255, 255, 255, .08); overflow: hidden; opacity: 0; }
.seat-timer i { display: block; height: 100%; border-radius: 99px; background: var(--green); transform-origin: left; transform: scaleX(0); }
.seat-timer i.low { background: var(--red); }
.seat.bank .seat-timer i { background: var(--gold); }
.seat.acting .seat-timer { opacity: 1; }
.seat.acting .seat-pod { border-color: var(--accent); box-shadow: 0 0 0 calc(var(--u) * .3) rgba(255, 122, 26, .3), 0 0 calc(var(--u) * 2.4) rgba(255, 122, 26, .5); }
.seat.winner .seat-pod { border-color: var(--gold); box-shadow: 0 0 0 calc(var(--u) * .3) rgba(255, 209, 102, .35), 0 0 calc(var(--u) * 3) rgba(255, 209, 102, .6); }
.seat.folded .seat-pod { opacity: .55; }
.seat.folded .seat-cards { opacity: .4; }
.seat.out .seat-pod { opacity: .4; filter: grayscale(1); }
.seat.away .avatar, .seat.is-offline .avatar { filter: grayscale(1) brightness(.7); }

.seat-badge { position: absolute; top: 100%; margin-top: calc(var(--u) * .5); padding: calc(var(--u) * .2) calc(var(--u) * 1); border-radius: 99px; font-size: calc(var(--u) * 1.2); font-weight: 800; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; background: #2a3140; color: #d7dde9; z-index: 5; }
.seat.pos-0 .seat-badge { top: auto; bottom: calc(var(--u) * 2); left: 100%; margin: 0 0 0 calc(var(--u) * .8); }
.seat-badge.a-fold { background: #3a2029; color: #ff9aaa; }
.seat-badge.a-check { background: #1d3a34; color: #7ff0c4; }
.seat-badge.a-call { background: #14493a; color: #8ff7cf; }
.seat-badge.a-bet, .seat-badge.a-raise { background: #5a3210; color: #ffc48a; }
.seat-badge.a-allin { background: linear-gradient(90deg, #d42a41, #ff7a1a); color: #fff; }
.seat-badge.desc { background: rgba(0, 0, 0, .7); color: var(--gold); text-transform: none; letter-spacing: 0; border: 1px solid rgba(255, 209, 102, .4); }

.seat-win { position: absolute; top: calc(var(--u) * -3.6); font-size: calc(var(--u) * 2.2); font-weight: 800; color: var(--gold); text-shadow: 0 2px 8px rgba(0, 0, 0, .8); white-space: nowrap; animation: win-rise .6s cubic-bezier(.2, .8, .3, 1.3) backwards; z-index: 6; }
@keyframes win-rise { from { opacity: 0; transform: translateY(calc(var(--u) * 2)) scale(.6); } }
.seat-emote { position: absolute; top: calc(var(--u) * -1); right: calc(var(--u) * -3.500); display: grid; place-items: center; min-width: calc(var(--u) * 5.600); height: calc(var(--u) * 5.600); padding: 0 calc(var(--u) * .8); border-radius: calc(var(--u) * 1.8); background: #fff; color: #171a21; font-size: calc(var(--u) * 3); font-weight: 800; box-shadow: 0 6px 20px rgba(0, 0, 0, .5); z-index: 8; }
.seat-emote.pop { animation: emote 2.6s ease both; }
@keyframes emote { 0% { transform: scale(0); } 8% { transform: scale(1.15); } 14%, 85% { transform: scale(1); opacity: 1; } 100% { transform: scale(.8); opacity: 0; } }

.bet { position: absolute; transform: translate(-50%, -50%); display: flex; align-items: center; gap: calc(var(--u) * .6); padding: calc(var(--u) * .3) calc(var(--u) * 1.1) calc(var(--u) * .3) calc(var(--u) * .4); border-radius: 99px; background: rgba(0, 0, 0, .5); font-size: calc(var(--u) * 1.6); font-weight: 800; white-space: nowrap; z-index: 3; animation: bet-in .2s ease-out; }
@keyframes bet-in { from { opacity: 0; transform: translate(-50%, -50%) scale(.6); } }
.bet-0 { left: 50%; top: 61%; }
.bet-1 { left: 27%; top: 51%; }
.bet-2 { left: 73%; top: 51%; }
.chip-icon { width: calc(var(--u) * 2); height: calc(var(--u) * 2); border-radius: 50%; background: radial-gradient(circle, #fff 30%, var(--accent) 34%); border: calc(var(--u) * .28) dashed #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .6); }

.dealer-btn { position: absolute; transform: translate(-50%, -50%); display: grid; place-items: center; width: calc(var(--u) * 2.800); height: calc(var(--u) * 2.800); border-radius: 50%; background: linear-gradient(180deg, #fff, #cfd6e4); color: #171a21; font-size: calc(var(--u) * 1.5); font-weight: 800; box-shadow: 0 calc(var(--u) * .3) calc(var(--u) * .8) rgba(0, 0, 0, .6); z-index: 5; transition: left .4s ease, top .4s ease; }
.dealer-0 { left: 40%; top: 77%; }
.dealer-1 { left: 26%; top: 33%; }
.dealer-2 { left: 74%; top: 33%; }

/* portrait arrangement (phones) */
.stage.portrait .rail { left: 3%; right: 3%; top: 9%; bottom: 11%; border-radius: calc(var(--u) * 16); }
.stage.portrait .pot { top: 35%; }
.stage.portrait .board { top: 47.500%; --cw: calc(var(--u) * 8.6); }
.stage.portrait .seat.pos-0 { top: 85%; }
.stage.portrait .seat.pos-1 { left: 22%; top: 17%; }
.stage.portrait .seat.pos-2 { left: 78%; top: 17%; }
.stage.portrait .seat.pos-0 .seat-cards { --cw: calc(var(--u) * 9); }
.stage.portrait .seat.pos-0 .seat-cards.many { --cw: calc(var(--u) * 7.600); }
.stage.portrait .seat.pos-0 .seat-badge { bottom: calc(var(--u) * 8); left: 50%; transform: translateX(calc(var(--u) * 9)); margin: 0; }
.stage.portrait .bet-0 { top: 66%; }
.stage.portrait .bet-1 { left: 26%; top: 33%; }
.stage.portrait .bet-2 { left: 74%; top: 33%; }
.stage.portrait .dealer-0 { left: 27%; top: 79%; }
.stage.portrait .dealer-1 { left: 40%; top: 19%; }
.stage.portrait .dealer-2 { left: 60%; top: 19%; }

/* ---------------------------------------------------------------- overlays */
.overlay { position: fixed; inset: var(--topbar-h) 0 0 0; z-index: 20; display: grid; place-items: center; padding: 12px; overflow-y: auto; background: rgba(6, 8, 12, .8); backdrop-filter: blur(4px); font-size: clamp(12px, calc(var(--u) * 1.6), 19px); animation: fade .25s ease; }
@keyframes fade { from { opacity: 0; } }
.spin-card, .finish-card { display: grid; justify-items: center; gap: 1em; width: min(100%, 30em); padding: 1.6em; border-radius: 1.2em; background: linear-gradient(180deg, #1e2430, #12151c); border: 1px solid var(--line); box-shadow: 0 30px 80px rgba(0, 0, 0, .7); text-align: center; }
.spin-title { font-size: .9em; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); font-weight: 700; }
.spin-players { display: flex; justify-content: center; gap: 1.4em; }
.spin-players div { display: grid; justify-items: center; gap: .3em; font-size: .85em; font-weight: 600; max-width: 7em; }
.spin-players span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.spin-players .avatar { width: 3.2em; height: 3.2em; font-size: 1.5em; }
.reel { position: relative; --reel-h: 1.7em; font-size: 2.6em; font-weight: 800; width: min(100%, 6em); border-radius: .3em; background: #07090d; border: 2px solid var(--accent); box-shadow: inset 0 0 1em rgba(0, 0, 0, .9), 0 0 1.2em rgba(255, 122, 26, .35); }
.reel-window { height: var(--reel-h); overflow: hidden; -webkit-mask-image: linear-gradient(180deg, transparent, #000 30%, #000 70%, transparent); mask-image: linear-gradient(180deg, transparent, #000 30%, #000 70%, transparent); }
.reel-strip { display: grid; will-change: transform; }
.reel-strip span { height: var(--reel-h); line-height: var(--reel-h); color: #dbe2ef; }
.reel-strip span.hot { color: var(--gold); }
.reel-mark { position: absolute; top: 50%; left: -.28em; right: -.28em; height: 0; }
.reel-mark::before, .reel-mark::after { content: ""; position: absolute; top: -.18em; border: .18em solid transparent; }
.reel-mark::before { left: 0; border-left-color: var(--accent); }
.reel-mark::after { right: 0; border-right-color: var(--accent); }
.spin-result { display: grid; gap: .3em; justify-items: center; opacity: 0; transform: translateY(.6em); transition: opacity .35s, transform .35s; }
.spin-result > b { font-size: 2em; color: var(--gold); line-height: 1.1; }
.spin-payouts { display: flex; gap: 1.6em; margin-top: .3em; font-weight: 700; }
.spin-payouts span { display: grid; }
.spin-overlay.landed .spin-result { opacity: 1; transform: none; }
.spin-overlay.landed .reel { animation: land .5s ease; }
.spin-overlay.landed .reel-window { -webkit-mask-image: none; mask-image: none; }
.spin-overlay.big .reel { border-color: var(--gold); box-shadow: 0 0 2em rgba(255, 209, 102, .8); animation: land .5s ease, glow 1s ease-in-out infinite alternate; }
@keyframes land { 0% { transform: scale(1); } 40% { transform: scale(1.14); } 100% { transform: scale(1); } }
@keyframes glow { to { box-shadow: 0 0 3.5em rgba(255, 209, 102, 1); } }

.finish-place { display: grid; place-items: center; width: 4.6em; height: 4.6em; border-radius: 50%; background: var(--panel-3); font-size: 1.5em; font-weight: 800; line-height: 1; align-content: center; }
.finish-place small { font-size: .42em; text-transform: uppercase; letter-spacing: .12em; }
.place-1 .finish-place { background: radial-gradient(circle at 30% 25%, #fff0b8, #e6a700); color: #2b1d00; box-shadow: 0 0 2em rgba(255, 209, 102, .6); }
.place-1 .finish-place small { color: #5c4300; }
.place-2 .finish-place { background: radial-gradient(circle at 30% 25%, #f4f6fa, #9aa4b5); color: #1a2030; }
.place-2 .finish-place small { color: #3c475c; }
.finish-card h2 { font-size: 1.5em; }
.finish-prize { font-size: 1.25em; font-weight: 800; color: var(--muted); }
.finish-prize.pos { color: var(--green); font-size: 1.7em; }
.finish-list { list-style: none; margin: 0; padding: 0; width: 100%; display: grid; gap: .4em; }
.finish-list li { display: flex; align-items: center; gap: .7em; padding: .5em .7em; border-radius: .7em; background: rgba(255, 255, 255, .04); text-align: left; }
.finish-list li.me { background: rgba(255, 122, 26, .14); box-shadow: inset 0 0 0 1px rgba(255, 122, 26, .5); }
.finish-list b { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.finish-list .avatar { width: 2em; height: 2em; font-size: 1.1em; }
.finish-actions { display: flex; flex-wrap: wrap; gap: .7em; width: 100%; }
.finish-actions .btn { flex: 1; padding: 0 12px; }
.finish-note { color: var(--muted); font-size: .9em; }

/* -------------------------------------------------------------- action bar */
.action-bar { position: relative; flex: none; height: 156px; display: flex; flex-direction: column; justify-content: flex-end; padding: 8px max(12px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left)); }
.action-inner { display: grid; gap: 8px; width: min(100%, 760px); margin: 0 auto; }
.action-inner.sent { opacity: .6; pointer-events: none; }
.hand-strength { align-self: center; margin-bottom: 6px; padding: 2px 12px; border-radius: 99px; background: rgba(0, 0, 0, .55); border: 1px solid rgba(255, 209, 102, .35); color: var(--gold); font-size: 13px; font-weight: 700; white-space: nowrap; pointer-events: none; z-index: 6; }
.act-row { display: flex; gap: 8px; }
.act { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; height: 56px; border-radius: 13px; font-weight: 800; font-size: 16px; line-height: 1.15; letter-spacing: .02em; transition: transform .08s, filter .15s; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2), 0 8px 18px -10px rgba(0, 0, 0, .8); }
.act b { font-size: 14px; font-weight: 700; opacity: .9; }
.act:active { transform: translateY(1px) scale(.99); }
.act:hover { filter: brightness(1.1); }
.act-fold { background: linear-gradient(180deg, #4a2530, #33161f); color: #ffb3bf; border: 1px solid #6b2f3d; }
.act-check, .act-call { background: linear-gradient(180deg, var(--green), var(--green-2)); color: #03241a; }
.act-raise { background: linear-gradient(180deg, var(--accent-2), var(--accent)); color: #1a0d02; }

.size-row { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 10px; }
.presets { display: flex; gap: 6px; }
.preset { height: 36px; min-width: 52px; padding: 0 10px; border-radius: 9px; background: var(--panel-2); border: 1px solid var(--line); font-weight: 700; font-size: 13px; }
.preset:hover { background: var(--panel-3); border-color: var(--accent); }
.slider-row { display: flex; align-items: center; gap: 8px; min-width: 0; }
.slider-row .icon-btn { width: 36px; height: 36px; }
.bet-input { width: 84px; height: 36px; padding: 0 8px; border-radius: 9px; background: #0c0f14; border: 1px solid var(--line); font-weight: 700; text-align: center; flex: none; -moz-appearance: textfield; appearance: textfield; }
.bet-input::-webkit-outer-spin-button, .bet-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.bet-input:focus { outline: none; border-color: var(--accent); }

.pre-row { display: flex; gap: 8px; justify-content: center; }
.pre { flex: 1; max-width: 220px; display: flex; align-items: center; justify-content: center; gap: 8px; height: 46px; border-radius: 12px; background: var(--panel-2); border: 1px solid var(--line); font-weight: 600; font-size: 14px; color: #c5ccd9; }
.pre i { width: 16px; height: 16px; border-radius: 5px; border: 2px solid #56607a; flex: none; }
.pre.on { border-color: var(--green); color: var(--text); background: rgba(31, 200, 138, .12); }
.pre.on i { background: var(--green); border-color: var(--green); box-shadow: inset 0 0 0 2px #0f2a22; }
.away-row { display: flex; align-items: center; justify-content: center; gap: 14px; color: var(--muted); font-size: 14px; }
.away-row .act { flex: none; width: 180px; height: 48px; }
.idle-row { text-align: center; color: var(--muted); font-size: 14px; min-height: 46px; display: grid; place-items: center; }

/* -------------------------------------------------------------------- chat */
.chat-panel { position: fixed; left: 0; top: var(--topbar-h); bottom: 0; width: 330px; z-index: 40; display: flex; flex-direction: column; background: rgba(15, 18, 25, .97); border-right: 1px solid var(--line); box-shadow: 20px 0 50px rgba(0, 0, 0, .5); animation: slide-in .2s ease; }
@keyframes slide-in { from { transform: translateX(-30px); opacity: 0; } }
.chat-panel header { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px; border-bottom: 1px solid var(--line); }
.chat-list { flex: 1; overflow-y: auto; padding: 12px 10px; display: flex; flex-direction: column; gap: 8px; }
.chat-line { display: flex; gap: 8px; align-items: flex-start; }
.chat-line .avatar { width: 28px; height: 28px; font-size: 15px; }
.chat-line > div { min-width: 0; padding: 6px 10px; border-radius: 4px 12px 12px 12px; background: var(--panel-2); }
.chat-line.mine > div { background: rgba(255, 122, 26, .16); }
.chat-line b { font-size: 12.5px; margin-right: 6px; }
.chat-line time { font-size: 11px; color: var(--muted); }
.chat-line p { font-size: 14px; overflow-wrap: anywhere; }
.chat-line.dealer { justify-content: space-between; gap: 10px; padding: 3px 8px; border-left: 2px solid var(--panel-3); color: var(--muted); font-size: 12.5px; }
.chat-emotes { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; padding: 8px 10px; border-top: 1px solid var(--line); }
.chat-emotes button { height: 38px; border-radius: 9px; background: var(--panel-2); font-size: 19px; font-weight: 800; }
.chat-emotes button:hover { background: var(--panel-3); }
.chat-form { display: flex; gap: 8px; padding: 10px; padding-bottom: max(10px, env(safe-area-inset-bottom)); border-top: 1px solid var(--line); }
.chat-form input { flex: 1; min-width: 0; height: 38px; padding: 0 12px; border-radius: 10px; background: #0c0f14; border: 1px solid var(--line); }
.chat-form input:focus { outline: none; border-color: var(--accent); }
.chat-send { color: var(--accent-2); }

/* ----------------------------------------------------------------- dialogs */
.modal-backdrop { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(4, 6, 9, .72); backdrop-filter: blur(3px); animation: fade .15s ease; }
.modal { display: flex; flex-direction: column; width: min(100%, 460px); max-height: min(calc(100dvh - 32px), 760px); border-radius: 18px; background: var(--panel); border: 1px solid var(--line); box-shadow: 0 40px 100px rgba(0, 0, 0, .7); animation: pop .2s cubic-bezier(.2, .8, .3, 1.1); }
@keyframes pop { from { transform: translateY(12px) scale(.97); opacity: 0; } }
.modal-wide { width: min(100%, 760px); }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 14px 14px 20px; border-bottom: 1px solid var(--line); }
.modal-head h2 { font-size: 17px; }
.modal-body { padding: 18px 20px; overflow-y: auto; min-height: 0; }
.modal-body > h4:first-child { margin-top: 0; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 20px; border-top: 1px solid var(--line); }

.settings-tabs { margin-bottom: 16px; }
.settings-content { min-height: 340px; }
.settings-panel { display: grid; gap: 4px; }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid rgba(255, 255, 255, .05); cursor: pointer; }
.switch-row > .range { max-width: 260px; }
.switch-text { display: grid; min-width: 0; }
.switch-text b { font-weight: 600; }
.switch { position: relative; width: 46px; height: 26px; flex: none; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.switch i { position: absolute; inset: 0; border-radius: 99px; background: var(--panel-3); transition: background .15s; pointer-events: none; }
.switch i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .15s; }
.switch input:checked + i { background: var(--accent); }
.switch input:checked + i::after { transform: translateX(20px); }
.switch input:focus-visible + i { outline: 2px solid var(--accent-2); outline-offset: 2px; }
.toggle-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 28px; }
.field { display: grid; gap: 6px; font-size: 13px; color: var(--muted); }
.field-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.field-input { display: flex; align-items: center; gap: 6px; height: 42px; padding: 0 12px; border-radius: 10px; background: #0c0f14; border: 1px solid var(--line); color: var(--text); }
.field-input:focus-within { border-color: var(--accent); }
.field-input input { flex: 1; min-width: 0; width: 100%; height: 100%; background: none; border: 0; outline: none; font-weight: 700; }
.field-input em { font-style: normal; color: var(--muted); font-size: 12px; white-space: nowrap; }
.field-input.fixed { font-weight: 700; color: var(--muted); background: var(--panel-2); }
.swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.swatch { display: grid; justify-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.swatch::before { content: ""; width: 54px; height: 54px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, var(--c1), var(--c2)); border: 3px solid var(--panel-3); transition: border-color .15s, transform .15s; }
.swatch.active { color: var(--text); }
.swatch.active::before { border-color: var(--accent); transform: scale(1.06); box-shadow: 0 0 0 3px rgba(255, 122, 26, .25); }

.wallet-balance { display: flex; align-items: baseline; gap: 8px; }
.wallet-balance small { width: 100%; }
.wallet-balance { flex-wrap: wrap; }
.wallet-balance b { font-size: 34px; font-weight: 800; line-height: 1.1; }
.wallet-balance em { font-style: normal; color: var(--muted); font-weight: 600; }
.ledger { list-style: none; margin: 0; padding: 0; display: grid; }
.ledger li { display: grid; grid-template-columns: minmax(0, 1fr) auto 80px; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px solid rgba(255, 255, 255, .05); }
.ledger li > span:first-child { display: grid; }
.ledger li > span:nth-child(2) { font-weight: 700; }
.ledger li > small { text-align: right; }
.avatar-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.avatar-grid button { display: grid; place-items: center; aspect-ratio: 1; border-radius: 14px; background: var(--panel-2); border: 2px solid transparent; }
.avatar-grid button.active { border-color: var(--accent); background: rgba(255, 122, 26, .12); }
.avatar-grid .avatar { width: 70%; height: 70%; font-size: 26px; }

.toasts { position: fixed; top: calc(var(--topbar-h) + 12px); right: 14px; z-index: 200; display: grid; gap: 8px; justify-items: end; pointer-events: none; max-width: calc(100vw - 28px); }
.toast { padding: 10px 16px; border-radius: 11px; background: var(--panel-3); border: 1px solid var(--line); border-left: 4px solid var(--blue); box-shadow: 0 14px 34px rgba(0, 0, 0, .5); font-size: 14px; font-weight: 600; animation: toast-in .2s ease; transition: opacity .3s, transform .3s; }
.toast-error { border-left-color: var(--red); }
.toast-warn { border-left-color: var(--gold); }
.toast-ok { border-left-color: var(--green); }
.toast-out { opacity: 0; transform: translateX(20px); }
@keyframes toast-in { from { opacity: 0; transform: translateX(20px); } }

/* --------------------------------------------------- casino look (buttons) */
/* Raised, pressable buttons: a darker "edge" under each button sinks when it is pressed. */
.btn { border-radius: 13px; }
.btn-primary { background: linear-gradient(180deg, #ffd27a 0%, #ff9a2e 48%, #f0700d 100%); color: #2a1400; text-shadow: 0 1px 0 rgba(255, 255, 255, .35); box-shadow: 0 4px 0 #9a4300, 0 14px 24px -12px rgba(255, 122, 26, .8), inset 0 1px 0 rgba(255, 255, 255, .6), inset 0 -2px 0 rgba(120, 50, 0, .25); }
.btn-primary:active:not(:disabled) { transform: translateY(4px); box-shadow: 0 0 0 #9a4300, inset 0 2px 6px rgba(120, 50, 0, .45); }
.btn-ghost { background: linear-gradient(180deg, #2c3342, #1a1f29); border-color: #394256; box-shadow: 0 3px 0 #0a0c11, inset 0 1px 0 rgba(255, 255, 255, .08); }
.btn-ghost:hover:not(:disabled) { background: linear-gradient(180deg, #353d4f, #202632); }
.btn-ghost:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 0 0 #0a0c11, inset 0 2px 5px rgba(0, 0, 0, .5); }
.btn-sm { box-shadow: 0 2px 0 #0a0c11, inset 0 1px 0 rgba(255, 255, 255, .08); }
.icon-btn { background: linear-gradient(180deg, #2a3140, #1a1f29); border-color: #394256; box-shadow: 0 2px 0 #0a0c11, inset 0 1px 0 rgba(255, 255, 255, .08); }
.icon-btn:active:not(:disabled) { transform: translateY(2px); box-shadow: inset 0 2px 4px rgba(0, 0, 0, .5); }
.wallet-plus { box-shadow: 0 2px 0 #9a4300, inset 0 1px 0 rgba(255, 255, 255, .5); }
.buyin-card { box-shadow: 0 10px 24px -16px rgba(0, 0, 0, .9), inset 0 1px 0 rgba(255, 255, 255, .05); }

/* logo woven into the felt */
.felt-logo { position: absolute; left: 50%; top: 50%; width: calc(var(--u) * 36); max-width: 62%; transform: translate(-50%, -50%); opacity: .13; filter: saturate(.85); pointer-events: none; user-select: none; }
.stage.portrait .felt-logo { top: 52%; width: calc(var(--u) * 34); max-width: 70%; }

/* chips: a small stack seen from above, coloured by the size of the bet */
.bet { --chip: #3f7fe8; --chip-d: #1d4aa3; gap: calc(var(--u) * .8); padding: calc(var(--u) * .35) calc(var(--u) * 1.2) calc(var(--u) * .55) calc(var(--u) * .5); background: rgba(0, 0, 0, .55); border: 1px solid rgba(255, 255, 255, .1); }
.bet.chips-2 { --chip: #e0445c; --chip-d: #8f1c30; }
.bet.chips-3 { --chip: #22b477; --chip-d: #0e6b44; }
.bet.chips-4 { --chip: #2a2f3b; --chip-d: #090b10; }
.chip-icon, .pot::before { width: calc(var(--u) * 2.2); height: calc(var(--u) * 2.2); border-radius: 50%; background: radial-gradient(circle, #fff 0 26%, var(--chip) 29% 100%); border: calc(var(--u) * .3) dashed rgba(255, 255, 255, .92); box-shadow: 0 calc(var(--u) * .28) 0 var(--chip-d), 0 calc(var(--u) * .56) 0 var(--chip), 0 calc(var(--u) * .84) 0 var(--chip-d), 0 calc(var(--u) * 1.1) calc(var(--u) * .6) rgba(0, 0, 0, .7); flex: none; }
.bet.chips-4 .chip-icon { border-color: var(--gold); }
.pot { --chip: #f0a51e; --chip-d: #8a5a00; align-items: center; padding: calc(var(--u) * .4) calc(var(--u) * 1.7) calc(var(--u) * .6) calc(var(--u) * .6); background: linear-gradient(180deg, rgba(0, 0, 0, .6), rgba(0, 0, 0, .4)); border-color: rgba(255, 209, 102, .35); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08); }
.pot::before { content: ""; margin-right: calc(var(--u) * .3); }
.dealer-btn { background: radial-gradient(circle at 35% 30%, #fff, #d9dfeb 60%, #aab3c6); border: calc(var(--u) * .22) solid var(--gold); box-shadow: 0 calc(var(--u) * .35) 0 #7a5a12, 0 calc(var(--u) * .7) calc(var(--u) * 1) rgba(0, 0, 0, .65); }

/* action console */
.action-bar { height: 188px; }
.action-inner:has(.act-row, .pre-row, .away-row) { padding: 12px; border-radius: 22px; background: linear-gradient(180deg, rgba(34, 40, 53, .92), rgba(13, 16, 22, .96)); border: 1px solid #343c4e; box-shadow: 0 -10px 40px -20px rgba(0, 0, 0, .9), inset 0 1px 0 rgba(255, 255, 255, .07); }
.act-row { gap: 10px; }
.act { flex-direction: row; gap: 12px; height: 60px; padding: 0 14px; border-radius: 16px; text-transform: uppercase; letter-spacing: .09em; font-size: 15px; transition: transform .07s, box-shadow .07s, filter .15s; }
.act-icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: rgba(0, 0, 0, .2); box-shadow: inset 0 1px 3px rgba(0, 0, 0, .35), 0 1px 0 rgba(255, 255, 255, .25); font-size: 14px; flex: none; }
.act-icon .icon svg { stroke-width: 2.8; }
.act-text { display: grid; justify-items: start; line-height: 1.1; text-align: left; }
.act-text b { font-size: 19px; letter-spacing: 0; opacity: 1; font-weight: 800; }
.act-fold { background: linear-gradient(180deg, #f0677c 0%, #cf3350 50%, #a81d38 100%); color: #fff; border: 0; text-shadow: 0 1px 2px rgba(80, 0, 15, .6); box-shadow: 0 5px 0 #660f21, 0 16px 24px -14px rgba(207, 51, 80, .9), inset 0 1px 0 rgba(255, 255, 255, .45); }
.act-check, .act-call { background: linear-gradient(180deg, #5df0b8 0%, #1fc88a 50%, #0f9a67 100%); color: #03271b; text-shadow: 0 1px 0 rgba(255, 255, 255, .35); box-shadow: 0 5px 0 #06573a, 0 16px 24px -14px rgba(31, 200, 138, .9), inset 0 1px 0 rgba(255, 255, 255, .6); }
.act-raise { background: linear-gradient(180deg, #ffe08a 0%, #ffb629 50%, #ea8f00 100%); color: #2b1900; text-shadow: 0 1px 0 rgba(255, 255, 255, .4); box-shadow: 0 5px 0 #875200, 0 16px 24px -14px rgba(255, 182, 41, .9), inset 0 1px 0 rgba(255, 255, 255, .65); }
.act:active { transform: translateY(5px); box-shadow: 0 0 0 transparent, inset 0 3px 8px rgba(0, 0, 0, .35); }
.action-inner.sent .act { transform: translateY(5px); box-shadow: inset 0 3px 8px rgba(0, 0, 0, .35); }

.size-row { gap: 12px; padding: 0 2px 2px; }
.presets { gap: 8px; }
.preset { height: 38px; min-width: 58px; padding: 0 12px; border-radius: 99px; background: radial-gradient(circle at 50% 30%, #333b4d, #1a1f29); border: 2px dashed rgba(255, 255, 255, .28); font-weight: 800; font-size: 13px; color: #e6ebf5; box-shadow: 0 3px 0 #0a0c11; transition: transform .07s, box-shadow .07s, border-color .15s, color .15s; }
.preset:hover { background: radial-gradient(circle at 50% 30%, #3b4458, #1f2531); border-color: var(--gold); color: var(--gold); }
.preset:active { transform: translateY(3px); box-shadow: 0 0 0 #0a0c11; }
.slider-row .icon-btn { border-radius: 50%; }
.range::-webkit-slider-runnable-track { height: 10px; border-radius: 10px; background: linear-gradient(90deg, var(--gold) 0, var(--accent) var(--fill), #0a0c11 var(--fill)); box-shadow: inset 0 1px 3px rgba(0, 0, 0, .7), 0 1px 0 rgba(255, 255, 255, .07); }
.range::-moz-range-track { height: 10px; border-radius: 10px; background: #0a0c11; }
.range::-moz-range-progress { height: 10px; border-radius: 10px; background: linear-gradient(90deg, var(--gold), var(--accent)); }
.range::-webkit-slider-thumb { width: 28px; height: 28px; margin-top: -9px; background: radial-gradient(circle, #fff 0 30%, var(--accent) 33% 100%); border: 3px dashed #fff; box-shadow: 0 3px 0 #9a4300, 0 6px 10px rgba(0, 0, 0, .6); }
.range::-moz-range-thumb { width: 22px; height: 22px; background: radial-gradient(circle, #fff 0 30%, var(--accent) 33% 100%); border: 3px dashed #fff; }
.bet-input { width: 92px; height: 38px; border-radius: 11px; background: #07090d; border: 1px solid #394256; color: var(--gold); font-size: 16px; font-weight: 800; box-shadow: inset 0 2px 5px rgba(0, 0, 0, .7); }

.pre-row { gap: 10px; }
.pre { height: 50px; border-radius: 14px; background: linear-gradient(180deg, #2c3342, #1a1f29); border: 1px solid #394256; box-shadow: 0 4px 0 #0a0c11, inset 0 1px 0 rgba(255, 255, 255, .08); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; font-size: 13px; transition: transform .07s, box-shadow .07s; }
.pre i { width: 18px; height: 18px; border-radius: 50%; border: 2px dashed #6b7691; }
.pre.on { transform: translateY(3px); background: linear-gradient(180deg, #17503d, #0f3327); border-color: var(--green); box-shadow: 0 1px 0 #06251b, inset 0 2px 6px rgba(0, 0, 0, .4); }
.pre.on i { background: radial-gradient(circle, #fff 0 28%, var(--green) 32% 100%); border: 2px dashed #fff; box-shadow: none; }
.away-row .act { width: 200px; height: 52px; }
.hand-strength { padding: 3px 14px; background: linear-gradient(180deg, rgba(0, 0, 0, .7), rgba(0, 0, 0, .5)); border-color: rgba(255, 209, 102, .5); letter-spacing: .02em; }

/* ------------------------------------------------- table cloth and rail */
/* The table is built from layers, all drawn in CSS so every felt colour gets the same treatment:
   rail  = padded leather (grain + stitching), then a thin metal inlay,
   felt  = base colour, a woven speed-cloth pattern, fibre noise, lamp light and a soft vignette. */
:root {
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .9 -.15'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --grain-dark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.7' numOctaves='4' seed='7' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1.1 -.25'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --leather: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='turbulence' baseFrequency='.35' numOctaves='2' seed='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .5 -.12'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.rail { padding: calc(var(--u) * 2.3); background: var(--leather), linear-gradient(180deg, #454d5e 0%, #2a303c 18%, #191d26 60%, #0e1117 100%); background-blend-mode: soft-light, normal; box-shadow: 0 calc(var(--u) * 3) calc(var(--u) * 6) rgba(0, 0, 0, .7), 0 calc(var(--u) * .6) calc(var(--u) * 1.2) rgba(0, 0, 0, .6), inset 0 calc(var(--u) * .35) calc(var(--u) * .5) rgba(255, 255, 255, .2), inset 0 calc(var(--u) * -.9) calc(var(--u) * 1.4) rgba(0, 0, 0, .75), inset 0 0 0 1px rgba(0, 0, 0, .6); }
/* stitching along the middle of the padding */
.rail::before { content: ""; position: absolute; inset: calc(var(--u) * .95); border-radius: inherit; border: calc(var(--u) * .12) dashed rgba(255, 255, 255, .2); pointer-events: none; }

.felt { background: radial-gradient(ellipse 85% 75% at 50% 42%, var(--felt-1) 0%, color-mix(in srgb, var(--felt-1) 55%, var(--felt-2)) 55%, var(--felt-2) 100%); box-shadow: 0 0 0 calc(var(--u) * .16) #07090c, 0 0 0 calc(var(--u) * .42) #b99a55, 0 0 0 calc(var(--u) * .58) #5d4a1e, 0 0 0 calc(var(--u) * .72) #07090c, inset 0 calc(var(--u) * 1.2) calc(var(--u) * 2.4) rgba(0, 0, 0, .65), inset 0 0 calc(var(--u) * 9) rgba(0, 0, 0, .6); overflow: hidden; }
/* weave + fibres */
.felt::before { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; background-image: var(--grain), var(--grain-dark), repeating-linear-gradient(45deg, rgba(255, 255, 255, .05) 0 1px, transparent 1px 3px), repeating-linear-gradient(-45deg, rgba(0, 0, 0, .1) 0 1px, transparent 1px 3px); background-size: 240px 240px, 240px 240px, auto, auto; mix-blend-mode: soft-light; opacity: .95; }
/* betting line, lamp light from above and vignette */
.felt::after { inset: 0; border: 0; background: radial-gradient(ellipse 58% 46% at 50% 30%, rgba(255, 255, 255, .15), transparent 72%), radial-gradient(ellipse 100% 100% at 50% 50%, transparent 55%, rgba(0, 0, 0, .38) 100%); pointer-events: none; }
.felt-line { position: absolute; inset: calc(var(--u) * 2.4); border-radius: inherit; border: calc(var(--u) * .16) solid rgba(255, 255, 255, .13); box-shadow: 0 0 calc(var(--u) * .4) rgba(0, 0, 0, .35), inset 0 0 calc(var(--u) * .4) rgba(0, 0, 0, .25); pointer-events: none; }
.felt-logo { opacity: .2; filter: drop-shadow(0 1px 0 rgba(0, 0, 0, .35)); z-index: 1; }
.stage.portrait .rail { padding: calc(var(--u) * 1.9); }

/* ------------------------------------------------ royal theme (purple + gold) */
/* The look of the whole client: deep violet night, gold accents, glowing table rail.
   It overrides the neutral tokens and components defined above. */
:root {
  --panel: #150f2e;
  --panel-2: #1d1540;
  --panel-3: #2b2058;
  --line: #382b6b;
  --text: #f4f1ff;
  --muted: #a69fc9;
  --accent: #ff9d0a;
  --accent-2: #ffc53d;
  --gold: #ffd24a;
  --glow: rgba(124, 77, 255, .45);
}
body { background: radial-gradient(90% 70% at 12% 0%, rgba(111, 66, 255, .35), transparent 60%), radial-gradient(70% 60% at 100% 100%, rgba(255, 140, 20, .16), transparent 60%), radial-gradient(120% 90% at 50% 0%, var(--bg-2), var(--bg) 72%) fixed var(--bg); }
::-webkit-scrollbar-thumb { background-color: #3a2d6e; }

/* portraits */
.avatar { background: #0d0a1c; box-shadow: 0 2px 8px rgba(0, 0, 0, .6); overflow: hidden; }
.avatar img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* top bar */
.topbar { height: var(--topbar-h); background: linear-gradient(180deg, rgba(20, 13, 48, .95), rgba(10, 7, 26, .9)); border-bottom: 1px solid #2f2360; box-shadow: 0 10px 30px -18px #000; }
.brand img { display: block; height: 46px; width: auto; filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .6)); }
.online { height: 38px; padding: 0 14px; border-radius: 99px; background: rgba(0, 0, 0, .35); border: 1px solid var(--line); text-transform: uppercase; letter-spacing: .06em; font-size: 12px; font-weight: 700; }
.online b { color: var(--green); }
.wallet { height: 40px; padding: 0 4px 0 8px; border-radius: 99px; background: rgba(0, 0, 0, .4); border: 1px solid var(--line); gap: 8px; }
.wallet::before { content: ""; width: 24px; height: 24px; border-radius: 50%; background: radial-gradient(circle, #ffe9a6 0 28%, #f0a51e 31% 62%, #b97300 65% 100%); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .35), 0 2px 6px rgba(0, 0, 0, .5); flex: none; }
.wallet b { font-size: 16px; }
.wallet-plus { border-radius: 50%; width: 30px; height: 30px; margin-left: 2px; }
.profile-btn { height: 42px; padding: 0 14px 0 3px; border-radius: 99px; background: rgba(0, 0, 0, .4); border: 1px solid var(--line); }
.profile-btn .avatar { width: 36px; height: 36px; }
.icon-btn { background: linear-gradient(180deg, #2a2056, #171033); border-color: #3d2f78; box-shadow: 0 2px 0 #07051a, inset 0 1px 0 rgba(255, 255, 255, .1); color: #c9c2ea; border-radius: 12px; }
.icon-btn:hover:not(:disabled) { background: linear-gradient(180deg, #35296c, #1d1540); color: #fff; }
.btn-ghost { background: linear-gradient(180deg, #2c2159, #191138); border-color: #3d2f78; box-shadow: 0 3px 0 #07051a, inset 0 1px 0 rgba(255, 255, 255, .1); }
.btn-ghost:hover:not(:disabled) { background: linear-gradient(180deg, #382b70, #201746); }
.btn-ghost:active:not(:disabled), .btn-sm:active:not(:disabled) { box-shadow: 0 0 0 #07051a, inset 0 2px 5px rgba(0, 0, 0, .5); }
.btn-sm { box-shadow: 0 2px 0 #07051a, inset 0 1px 0 rgba(255, 255, 255, .1); }
.btn-primary { background: linear-gradient(180deg, #ffe07a 0%, #ffb21f 48%, #f08a00 100%); box-shadow: 0 4px 0 #8f4c00, 0 14px 26px -12px rgba(255, 160, 20, .85), inset 0 1px 0 rgba(255, 255, 255, .65), inset 0 -2px 0 rgba(120, 60, 0, .25); }
.btn-primary:active:not(:disabled) { box-shadow: 0 0 0 #8f4c00, inset 0 2px 6px rgba(120, 60, 0, .45); }
.btn-lg { height: 56px; padding: 0 32px; border-radius: 99px; font-size: 18px; gap: 10px; }
.segmented { background: rgba(0, 0, 0, .35); border-color: var(--line); }
.segmented button.active { background: linear-gradient(180deg, #ffd35a, #f59a00); color: #2a1500; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5); }
.table-tab { background: rgba(0, 0, 0, .35); border-color: var(--line); border-radius: 99px; padding: 0 16px 0 12px; }
.table-tab.active { border-color: var(--gold); background: rgba(255, 180, 30, .12); color: var(--gold); box-shadow: 0 0 14px -4px rgba(255, 180, 30, .7); }

/* lobby: side menu | content | quick games + winners */
.lobby { padding-top: 18px; }
.lobby > * { max-width: 1560px; }
.lobby-shell { display: grid; grid-template-columns: 228px minmax(0, 1fr) 330px; gap: 20px; align-items: start; }
.lobby-center { min-width: 0; display: grid; gap: 18px; }
.lobby-right { display: grid; gap: 18px; position: sticky; top: 0; min-width: 0; }
.lobby-side { display: grid; gap: 16px; position: sticky; top: 0; }
.lobby-tabs { display: none; }
.lobby-note { margin: 0; text-align: center; }

.side-nav { display: grid; gap: 4px; padding: 10px; border-radius: 18px; background: linear-gradient(180deg, rgba(29, 21, 64, .9), rgba(15, 10, 34, .9)); border: 1px solid var(--line); }
.side-nav button { display: flex; align-items: center; gap: 14px; height: 48px; padding: 0 14px; border-radius: 13px; color: #cfc8ee; font-weight: 600; text-align: left; transition: background .15s, color .15s; }
.side-nav button .icon { font-size: 20px; color: #8f85bd; }
.side-nav button:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.side-nav button.active { background: linear-gradient(180deg, #ffd35a, #f59a00); color: #2a1500; font-weight: 800; box-shadow: 0 3px 0 #8f4c00, 0 10px 22px -10px rgba(255, 160, 20, .9), inset 0 1px 0 rgba(255, 255, 255, .6); }
.side-nav button.active .icon { color: #2a1500; }
.side-promo { display: grid; justify-items: center; gap: 6px; padding: 16px 14px; border-radius: 18px; text-align: center; background: radial-gradient(120% 80% at 50% 0%, rgba(255, 150, 20, .28), transparent 65%), linear-gradient(180deg, #221748, #120c2a); border: 1px solid rgba(255, 190, 60, .35); }
.side-promo img { width: 82%; height: auto; filter: drop-shadow(0 8px 14px rgba(0, 0, 0, .6)); }
.side-promo b { font-size: 16px; }
.side-promo .btn { margin-top: 6px; }

.lobby-hero { min-height: 250px; padding: 30px 34px; border-radius: 24px; border: 1px solid #45358a; background: radial-gradient(60% 120% at 78% 50%, rgba(255, 160, 30, .34), transparent 62%), radial-gradient(70% 130% at 0% 0%, rgba(124, 77, 255, .55), transparent 60%), repeating-conic-gradient(from 0deg at 78% 50%, rgba(255, 255, 255, .035) 0 6deg, transparent 6deg 14deg), linear-gradient(120deg, #1b1242, #0d0920); box-shadow: 0 24px 50px -30px #000, inset 0 1px 0 rgba(255, 255, 255, .08); }
.hero-text { position: relative; z-index: 1; display: grid; gap: 14px; justify-items: start; }
.hero-text h1 { font-size: clamp(30px, 4.2vw, 58px); font-style: italic; font-weight: 900; text-transform: uppercase; letter-spacing: -.01em; line-height: 1; color: #fff; text-shadow: 0 4px 0 rgba(0, 0, 0, .35); }
.hero-text h1 em { background: linear-gradient(180deg, #fff3b0, #ffb21f 55%, #f07a00); -webkit-background-clip: text; background-clip: text; color: transparent; text-shadow: none; padding-right: .12em; }
.hero-text p { margin: 0; color: #d6cff5; max-width: 460px; font-size: 16px; }
.hero-logo { height: clamp(170px, 20vw, 270px); width: auto; flex: none; margin: -20px 0; filter: drop-shadow(0 18px 30px rgba(0, 0, 0, .65)) drop-shadow(0 0 40px rgba(255, 160, 30, .35)); animation: hero-float 5s ease-in-out infinite; }
@keyframes hero-float { 50% { transform: translateY(-8px); } }

.quick-panel, .wins-panel { position: static; padding: 18px; border-radius: 20px; background: linear-gradient(180deg, rgba(29, 21, 64, .92), rgba(15, 10, 34, .92)); border: 1px solid var(--line); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06); }
.quick-panel h3, .wins-panel h3 { display: flex; align-items: center; gap: 8px; font-size: 17px; margin-bottom: 14px; }
.quick-panel h3 .icon { color: var(--gold); }
.quick-panel h3 small { margin-left: auto; font-weight: 600; }
.wins-panel h3::before { content: ""; width: 20px; height: 20px; background: var(--gold); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 3h10v2h4v3a5 5 0 0 1-4.600 5A5 5 0 0 1 13 16.900V19h3v2H8v-2h3v-2.100A5 5 0 0 1 7.600 13 5 5 0 0 1 3 8V5h4zm0 4H5v1a3 3 0 0 0 2 2.800zm10 0v3.800A3 3 0 0 0 19 8V7z'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 3h10v2h4v3a5 5 0 0 1-4.600 5A5 5 0 0 1 13 16.900V19h3v2H8v-2h3v-2.100A5 5 0 0 1 7.600 13 5 5 0 0 1 3 8V5h4zm0 4H5v1a3 3 0 0 0 2 2.800zm10 0v3.800A3 3 0 0 0 19 8V7z'/%3E%3C/svg%3E") center / contain no-repeat; }
.quick-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.quick { display: flex; align-items: baseline; justify-content: center; gap: 5px; height: 46px; border-radius: 99px; background: linear-gradient(180deg, #2c2159, #191138); border: 1px solid #45358a; box-shadow: 0 3px 0 #07051a, inset 0 1px 0 rgba(255, 255, 255, .1); transition: transform .07s, box-shadow .07s, border-color .15s; }
.quick b { font-size: 17px; }
.quick em { font-style: normal; font-size: 11px; color: var(--muted); font-weight: 700; }
.quick:hover { border-color: var(--gold); }
.quick:active { transform: translateY(3px); box-shadow: 0 0 0 #07051a; }
.quick.on { align-items: center; background: linear-gradient(180deg, #ffd35a, #f59a00); border-color: #ffe9a6; color: #2a1500; box-shadow: 0 3px 0 #8f4c00, 0 0 18px -4px rgba(255, 170, 30, .9); }
.quick.on em { color: #5c3500; }
.quick.on .spinner { border-color: rgba(60, 30, 0, .25); border-top-color: #2a1500; }
.lobby-main.is-leaders .wins-list { max-height: none; }
.month-top { background: linear-gradient(135deg, rgba(255, 190, 50, .22), rgba(124, 77, 255, .18)); }
.wins-list li { background: rgba(0, 0, 0, .28); }
.wins-list .avatar { width: 40px; height: 40px; }

.buyin-card { background: linear-gradient(180deg, #221849, #140e2e); border-color: #3d2f78; border-radius: 18px; box-shadow: 0 14px 30px -20px #000, inset 0 1px 0 rgba(255, 255, 255, .07); }
.buyin-card::before { height: 4px; background: linear-gradient(90deg, #ff8a00, #ffd24a); }
.buyin-card.game-omaha::before { background: linear-gradient(90deg, #7c4dff, #c084fc); }
.buyin-card:hover { border-color: #6a55c9; box-shadow: 0 18px 36px -18px var(--glow), inset 0 1px 0 rgba(255, 255, 255, .07); }
.buyin-card.is-waiting { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold), 0 0 26px -6px rgba(255, 180, 30, .8); }
.bc-prize { background: rgba(255, 190, 50, .09); border-color: rgba(255, 200, 80, .35); }
.stat, .history-row, .step, .facts, .data-table, .blind-strip span, .stepper { background: rgba(21, 15, 46, .9); }
.data-table th { background: #1d1540; }
.modal { background: linear-gradient(180deg, #1d1540, #120c2a); border-color: #45358a; }
.field-input, .chat-form input, .bet-input { background: #090617; }
.chat-panel { background: rgba(14, 9, 34, .98); }
.toast { background: #241a4d; }
.avatar-grid { grid-template-columns: repeat(5, 1fr); gap: 8px; }
.avatar-grid button { background: rgba(0, 0, 0, .3); border-radius: 50%; padding: 4px; }
.avatar-grid button.active { border-color: var(--gold); background: rgba(255, 180, 30, .15); box-shadow: 0 0 16px -2px rgba(255, 180, 30, .8); }
.avatar-grid .avatar { width: 100%; height: 100%; }
.boot-logo { width: min(70vw, 360px); height: auto; filter: drop-shadow(0 16px 30px rgba(0, 0, 0, .6)); animation: hero-float 3s ease-in-out infinite; }
.boot-bar { background: #2b2058; }

/* table: night room, glowing gold rail */
.table-view { background: radial-gradient(60% 55% at 50% 48%, rgba(124, 77, 255, .22), transparent 70%); }
.hud-prize, .hud-item { background: rgba(14, 9, 34, .8); border-color: var(--line); }
.hud-prize { border-color: rgba(255, 200, 80, .5); background: rgba(255, 180, 30, .1); }
.rail { background: var(--leather), linear-gradient(180deg, #3a2f66 0%, #231a47 20%, #130d2b 62%, #080514 100%); box-shadow: 0 0 0 calc(var(--u) * .22) #ffb21f, 0 0 calc(var(--u) * 1.2) rgba(255, 170, 30, .9), 0 0 calc(var(--u) * 5) rgba(255, 150, 20, .45), 0 calc(var(--u) * 3) calc(var(--u) * 6) rgba(0, 0, 0, .75), inset 0 calc(var(--u) * .35) calc(var(--u) * .5) rgba(255, 255, 255, .22), inset 0 calc(var(--u) * -.9) calc(var(--u) * 1.4) rgba(0, 0, 0, .8); }
.felt-logo { width: calc(var(--u) * 26); max-width: 46%; top: 53%; opacity: .2; filter: saturate(.55) brightness(1.15) drop-shadow(0 2px 2px rgba(0, 0, 0, .4)); }
.stage.portrait .felt-logo { width: calc(var(--u) * 30); max-width: 62%; top: 55%; }
.seat-pod { background: linear-gradient(180deg, #2a2056, #110b28); border-color: #5140a0; padding: calc(var(--u) * .3) calc(var(--u) * 1.9) calc(var(--u) * .3) calc(var(--u) * .3); min-width: calc(var(--u) * 16.500); }
.seat-avatar { margin: calc(var(--u) * -1) 0 calc(var(--u) * -1) calc(var(--u) * -.8); }
.seat-avatar .avatar { width: calc(var(--u) * 7.400); height: calc(var(--u) * 7.400); box-shadow: 0 calc(var(--u) * .4) calc(var(--u) * 1) rgba(0, 0, 0, .7); }
.seat-name { color: #cfc8ee; font-size: calc(var(--u) * 1.400); }
.seat-stack { display: flex; align-items: center; gap: calc(var(--u) * .6); font-size: calc(var(--u) * 1.800); }
.seat-stack::before { content: ""; width: calc(var(--u) * 1.600); height: calc(var(--u) * 1.600); border-radius: 50%; background: radial-gradient(circle, #fff 0 26%, #3f7fe8 30% 100%); border: calc(var(--u) * .22) dashed #fff; flex: none; }
.seat.out .seat-stack::before { display: none; }
.seat-timer { left: calc(var(--u) * 8); }
.seat.acting .seat-pod { border-color: var(--gold); box-shadow: 0 0 0 calc(var(--u) * .3) rgba(255, 190, 40, .3), 0 0 calc(var(--u) * 2.6) rgba(255, 180, 30, .7); }
.seat.acting .seat-avatar .avatar { box-shadow: 0 0 0 calc(var(--u) * .3) var(--gold), 0 0 calc(var(--u) * 2) rgba(255, 180, 30, .9); }
.seat-badge { background: #2b2058; }
.spin-card, .finish-card { background: linear-gradient(180deg, #241a4d, #110b28); border-color: #5140a0; box-shadow: 0 30px 80px rgba(0, 0, 0, .7), 0 0 60px -20px var(--glow); }
.spin-players .avatar { width: 3.6em; height: 3.6em; }
.finish-list .avatar { width: 2.2em; height: 2.2em; }
.reel { border-color: var(--gold); box-shadow: inset 0 0 1em rgba(0, 0, 0, .9), 0 0 1.2em rgba(255, 180, 30, .5); }
.reel-mark::before { border-left-color: var(--gold); }
.reel-mark::after { border-right-color: var(--gold); }

/* action console in the royal palette */
.action-inner:has(.act-row, .pre-row, .away-row) { background: linear-gradient(180deg, rgba(42, 32, 86, .95), rgba(14, 9, 34, .97)); border-color: #5140a0; box-shadow: 0 -10px 40px -20px #000, 0 0 40px -18px var(--glow), inset 0 1px 0 rgba(255, 255, 255, .1); }
.preset { background: radial-gradient(circle at 50% 30%, #35296c, #191138); box-shadow: 0 3px 0 #07051a; border-style: solid; border-width: 1px; border-color: #5140a0; }
.preset:hover { background: radial-gradient(circle at 50% 30%, #40327f, #1f1646); }
.preset:active { box-shadow: 0 0 0 #07051a; }
.pre { background: linear-gradient(180deg, #2c2159, #191138); border-color: #45358a; box-shadow: 0 4px 0 #07051a, inset 0 1px 0 rgba(255, 255, 255, .1); }
.bet-input { border-color: #45358a; }
.range::-webkit-slider-runnable-track { background: linear-gradient(90deg, var(--gold) 0, var(--accent) var(--fill), #090617 var(--fill)); }

/* wide screens: the console moves to the right of the table, with tall square buttons */
@media (min-width: 1100px) and (min-height: 600px) {
  .table-view { display: grid; grid-template-columns: minmax(0, 1fr) 380px; grid-template-rows: auto minmax(0, 1fr); }
  .table-hud { grid-column: 1 / -1; }
  .table-area { grid-column: 1; grid-row: 2; }
  .action-bar { grid-column: 2; grid-row: 2; height: auto; align-self: end; justify-content: flex-end; padding: 0 20px 26px 4px; }
  .action-inner { width: 100%; gap: 12px; }
  .action-inner:has(.act-row, .pre-row, .away-row) { padding: 16px; border-radius: 26px; }
  .hand-strength { margin-bottom: 10px; font-size: 14px; }
  .size-row { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .presets { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
  .preset { min-width: 0; height: 44px; border-radius: 14px; font-size: 15px; }
  .slider-row { padding: 6px; border-radius: 16px; background: rgba(0, 0, 0, .35); border: 1px solid #45358a; }
  .slider-row .icon-btn { width: 42px; height: 42px; border-radius: 12px; }
  .bet-input { width: 78px; height: 42px; border: 0; background: none; box-shadow: none; font-size: 20px; }
  .act-row { gap: 10px; }
  .act { flex-direction: column; height: 122px; padding: 12px 6px; gap: 10px; border-radius: 20px; font-size: 14px; }
  .act-icon { width: 40px; height: 40px; font-size: 16px; }
  .act-text { justify-items: center; text-align: center; gap: 2px; }
  .act-text b { font-size: 22px; }
  .pre-row { flex-direction: column; }
  .pre { flex: none; max-width: none; height: 54px; justify-content: flex-start; padding: 0 18px; }
  .away-row { flex-direction: column; text-align: center; }
  .away-row .act { width: 100%; height: 64px; flex-direction: row; }
  .idle-row { min-height: 0; padding-bottom: 8px; }
}

/* ------------------------------------------------ owner artwork and numerals */
/* Amounts use a narrow, technical numeral face that every platform ships. */
:root { --font-num: "Bahnschrift", "DIN Alternate", "Avenir Next Condensed", "Roboto Condensed", sans-serif-condensed, "Arial Narrow", var(--font); }
#balance, .bc-buyin b, .bc-prize b, .pot b, .seat-stack, .bet, .hud-prize b, .hud-item b, .act-text b, .quick b, .wallet-balance b,
.spin-result > b, .spin-payouts, .finish-prize, .win-what b, .month-top b, .stat b, .bet-input, .hr-prize, .table-tab b, .reel, .seat-win, .ledger li > span:nth-child(2) { font-family: var(--font-num); font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.wallet b { font-size: 20px; font-weight: 700; line-height: 1; background: linear-gradient(180deg, #fff6c9, #ffc93d 60%, #f59a00); -webkit-background-clip: text; background-clip: text; color: transparent; }
.wallet em { font-family: var(--font-num); font-size: 12px; font-weight: 700; letter-spacing: .08em; color: #c9b27a; }
.wallet::before { width: 28px; height: 28px; border-radius: 0; background: url("../img/art/coin-spade.webp") center / contain no-repeat; box-shadow: none; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .6)); }
.bc-buyin b { font-size: 40px; font-weight: 700; }

/* online counter: lives in the lobby banner, the top bar shows it only on wide screens */
.online { height: auto; padding: 0; border: 0; background: none; gap: 7px; font-size: 12px; letter-spacing: .08em; color: #9fe8c6; }
.online i, .hero-online i { position: relative; width: 8px; height: 8px; border-radius: 50%; background: #2ff59b; box-shadow: 0 0 8px #2ff59b; flex: none; }
.online i::after, .hero-online i::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid #2ff59b; opacity: 0; animation: ping 1.8s ease-out infinite; }
@keyframes ping { 0% { transform: scale(.4); opacity: .9; } 100% { transform: scale(1.6); opacity: 0; } }
.online b { font-family: var(--font-num); font-size: 15px; color: #fff; }
.hero-online { position: absolute; top: 14px; right: 16px; z-index: 2; display: flex; align-items: center; gap: 8px; padding: 6px 12px 6px 10px; border-radius: 99px; background: rgba(5, 3, 14, .6); border: 1px solid rgba(47, 245, 155, .35); font-size: 12px; font-weight: 600; color: #b8f5da; backdrop-filter: blur(4px); }
.hero-online b { font-family: var(--font-num); font-size: 15px; color: #fff; }

/* "my table" button in the top bar */
.table-tab { height: 44px; gap: 10px; padding: 0 16px 0 5px; border-radius: 99px; background: linear-gradient(180deg, #2c2159, #150e30); border: 1px solid #5140a0; box-shadow: 0 3px 0 #07051a, inset 0 1px 0 rgba(255, 255, 255, .12); color: var(--muted); transition: transform .07s, box-shadow .07s; }
.table-tab:active { transform: translateY(3px); box-shadow: 0 0 0 #07051a; }
.tab-chip { width: 34px; height: 34px; object-fit: contain; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .6)); flex: none; }
.table-tab > span:last-child { display: grid; line-height: 1.05; }
.table-tab small { font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #a69fc9; }
.table-tab b { font-size: 16px; font-weight: 700; color: #fff; }
.table-tab.active { border-color: var(--gold); background: linear-gradient(180deg, #3a2a1a, #1c1230); box-shadow: 0 3px 0 #07051a, 0 0 16px -4px rgba(255, 180, 30, .8), inset 0 1px 0 rgba(255, 220, 120, .3); }
.table-tab.active b { color: var(--gold); }
.table-tab.needs { border-color: var(--green); animation: needs 1s ease-in-out infinite; }
.table-tab.needs small { color: var(--green); }
.table-tab.needs .tab-chip { animation: spin 2.4s linear infinite; }
.table-tab.waiting { padding-left: 14px; }

/* artwork accents */
.h-art { width: 22px; height: 26px; object-fit: contain; }
.wins-panel h3::before { width: 28px; height: 28px; -webkit-mask: none; mask: none; background: url("../img/art/trophy.webp") center / contain no-repeat; }
.month-top { position: relative; padding-right: 96px; overflow: hidden; }
.month-top::after { content: ""; position: absolute; right: 8px; top: 50%; width: 84px; height: 56px; transform: translateY(-50%) rotate(8deg); background: url("../img/art/crown.webp") center / contain no-repeat; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .5)); }
.lobby-hero::before, .lobby-hero::after { content: ""; position: absolute; background: center / contain no-repeat; pointer-events: none; filter: drop-shadow(0 10px 14px rgba(0, 0, 0, .55)); }
.lobby-hero::before { left: 44%; bottom: -22px; width: 92px; height: 92px; background-image: url("../img/art/chip-purple.webp"); animation: hero-float 6s ease-in-out infinite reverse; }
.lobby-hero::after { left: 36%; top: 16px; width: 52px; height: 52px; background-image: url("../img/art/coin.webp"); animation: hero-float 4.5s ease-in-out infinite; }
.buyin-card::after { content: ""; position: absolute; right: -22px; top: 44px; width: 104px; height: 104px; background: url("../img/art/chip-gold.webp") center / contain no-repeat; opacity: .13; transform: rotate(-14deg); pointer-events: none; }
.buyin-card.game-omaha::after { background-image: url("../img/art/chip-purple.webp"); opacity: .18; }
.buyin-card > * { position: relative; z-index: 1; }
.side-promo { position: relative; overflow: hidden; }
.side-promo::after { content: ""; position: absolute; left: -26px; bottom: -22px; width: 110px; height: 70px; background: url("../img/art/chips.webp") center / contain no-repeat; opacity: .35; pointer-events: none; }
.side-promo > * { position: relative; z-index: 1; }
.empty-art { flex-direction: column; gap: 14px; }
.empty-art img { width: 150px; height: auto; opacity: .9; filter: drop-shadow(0 10px 16px rgba(0, 0, 0, .5)); }
.lead-art { display: flex; align-items: center; gap: 14px; }
.lead-art img { width: 58px; height: auto; flex: none; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .5)); }
.pot::before { width: calc(var(--u) * 3.6); height: calc(var(--u) * 2.2); border: 0; border-radius: 0; box-shadow: none; background: url("../img/art/chips.webp") center / contain no-repeat; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .6)); }
.finish-art { width: 7.5em; height: auto; margin-bottom: -.6em; filter: drop-shadow(0 .6em 1.2em rgba(0, 0, 0, .6)) drop-shadow(0 0 1.5em rgba(255, 190, 40, .45)); animation: hero-float 3.5s ease-in-out infinite; }
.finish-art + .finish-place { width: auto; height: auto; padding: .15em .9em; border-radius: 99px; font-size: 1.1em; display: flex; gap: .4em; align-items: baseline; box-shadow: none; }
.finish-art + .finish-place small { font-size: .7em; }
.spin-art { width: 3.6em; height: auto; margin-bottom: .2em; filter: drop-shadow(0 0 1em rgba(80, 170, 255, .9)); animation: hero-float 2s ease-in-out infinite; }

/* -------------------------------------------------------------- responsive */
@media (max-width: 1040px) {
  .lobby-shell { grid-template-columns: minmax(0, 1fr); }
  .lobby-side { display: none; }
  .lobby-tabs { display: inline-flex; }
  .lobby-right { position: static; }
  .hero-logo { height: clamp(120px, 26vw, 200px); }
  .wins-panel { position: static; }
  .wins-list { max-height: none; }
  .hero-mults { display: none; }
}

@media (max-width: 760px) {
  :root { --topbar-h: 52px; }
  .topbar { gap: 8px; }
  .online > span, .profile-btn > span:last-child, .wide-only { display: none; }
  .online { padding: 0 10px; }
  .profile-btn { padding: 0 3px; }
  .online { margin: 0; }
  .wallet { padding-left: 10px; }
  .wallet em { display: none; }
  .table-tab { padding: 0 9px; }
  .table-tab .icon { display: none; }
  .lobby { padding: 14px 12px 30px; }
  .lobby-hero { padding: 20px 18px; border-radius: 18px; min-height: 0; gap: 8px; }
  .hero-text p { font-size: 14px; }
  .hero-logo { height: 112px; margin: 0 -8px 0 0; }
  .btn-lg { height: 48px; padding: 0 22px; font-size: 16px; }
  .brand img { height: 38px; }
  .wallet::before { width: 24px; height: 24px; }
  .wallet b { font-size: 18px; }
  .topbar .online { display: none; }
  .hero-online { top: 10px; right: 10px; padding: 4px 10px 4px 8px; font-size: 11px; }
  .lobby-hero::before, .lobby-hero::after, .buyin-card::after { display: none; }
  .table-tab { height: 40px; padding: 0 12px 0 4px; gap: 7px; }
  .tab-chip { width: 30px; height: 30px; }
  .table-tab b { font-size: 14px; }
  .bc-buyin b { font-size: 32px; }
  .quick-grid { gap: 8px; }
  .buyin-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .buyin-card { padding: 13px; gap: 10px; }
  .bc-buyin b { font-size: 28px; }
  .bc-prize { flex-direction: column; gap: 0; align-items: flex-start; }
  .bc-waiting { flex-direction: column; align-items: stretch; }
  .stat-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps { grid-template-columns: minmax(0, 1fr); }
  .history-row .icon, .hr-mult { display: none; }
  .hud-hand, .hud-back > span:not(.icon) { display: none; }
  .table-hud { gap: 6px; padding-top: 8px; }
  .hud-prize, .hud-item { padding: 4px 9px; font-size: 13px; }
  .table-area { padding: 4px; }
  .action-bar { height: 212px; }
  .size-row { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .presets { display: grid; grid-template-columns: repeat(4, 1fr); }
  .preset { min-width: 0; height: 32px; }
  .slider-row .icon-btn { display: none; }
  .act { height: 56px; font-size: 13px; gap: 8px; padding: 0 8px; }
  .act-icon { width: 28px; height: 28px; font-size: 12px; }
  .act-text b { font-size: 16px; }
  .action-inner:has(.act-row, .pre-row, .away-row) { padding: 10px; border-radius: 18px; }
  .pre { font-size: 11.5px; letter-spacing: .03em; }
  .chat-panel { width: 100%; top: auto; height: min(70dvh, 520px); border-right: 0; border-top: 1px solid var(--line); border-radius: 18px 18px 0 0; box-shadow: 0 -20px 50px rgba(0, 0, 0, .6); animation-name: slide-up; }
  .modal-backdrop { padding: 0; align-items: flex-end; }
  .modal, .modal-wide { width: 100%; max-height: 92dvh; border-radius: 18px 18px 0 0; }
  .field-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .toggle-grid { grid-template-columns: minmax(0, 1fr); }
  .toasts { left: 14px; justify-items: stretch; }
}
@keyframes slide-up { from { transform: translateY(30px); opacity: 0; } }

@media (max-width: 380px) {
  .online { display: none; }
  .wallet-plus { width: 26px; height: 26px; }
}

/* short landscape screens (phones turned sideways) */
@media (max-height: 520px) and (orientation: landscape) {
  :root { --topbar-h: 44px; }
  .online > span, .profile-btn > span:last-child { display: none; }
  .brand img { height: 34px; }
  .table-hud { position: absolute; top: calc(var(--topbar-h) + 4px); left: 0; right: 0; z-index: 10; padding-top: 0; pointer-events: none; }
  .table-hud > * { pointer-events: auto; }
  .hud-hand, .hud-back > span:not(.icon) { display: none; }
  .hud-prize, .hud-item { padding: 2px 8px; font-size: 12px; }
  .table-view { position: relative; flex-direction: row; }
  .table-area { padding: 2px; }
  .action-bar { width: 250px; height: auto; justify-content: center; padding: 6px; }
  .size-row { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .presets { display: grid; grid-template-columns: repeat(4, 1fr); }
  .preset { min-width: 0; height: 30px; padding: 0 4px; }
  .slider-row .icon-btn { display: none; }
  .act-row, .pre-row { flex-direction: column; }
  .act { flex: none; height: 42px; gap: 8px; }
  .act-icon { width: 26px; height: 26px; }
  .act-text { display: flex; align-items: baseline; gap: 6px; }
  .pre { max-width: none; flex: none; height: 40px; }
  .away-row { flex-direction: column; text-align: center; }

}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ------------------------------------------- hand tray, oval table, phone fixes */
/* This block comes last on purpose: it settles the final layout on every screen size. */

/* best-five tray: five slots that fill with the player's hand, with its name beside them */
.hand-strength { display: none; }
.combo { display: flex; align-items: center; justify-content: center; gap: 12px; width: min(100%, 760px); margin: 0 auto 8px; padding: 6px 12px; border-radius: 14px; background: rgba(5, 3, 14, .5); border: 1px solid #382b6b; }
.combo-cards { display: flex; gap: 5px; --cw: 30px; flex: none; }
.combo-slot { width: var(--cw); height: calc(var(--cw) * 1.4); border-radius: 4px; border: 1.5px dashed rgba(255, 255, 255, .22); background: rgba(255, 255, 255, .04); flex: none; }
.combo .card { box-shadow: 0 2px 5px rgba(0, 0, 0, .5); }
.combo .card.made { box-shadow: 0 0 0 1.5px var(--gold), 0 0 10px rgba(255, 200, 60, .55); }
.combo .card.kick { filter: brightness(.6) saturate(.7); }
.combo-name { min-width: 0; font-size: 14px; font-weight: 700; line-height: 1.2; color: var(--muted); }
.combo.has-hand { border-color: rgba(255, 200, 60, .5); background: rgba(40, 26, 6, .55); }
.combo.has-hand .combo-name { color: var(--gold); }
.action-bar { height: 244px; }

/* the heads-up display never clips its first item */
.hud-info { justify-content: safe center; }

/* sitting out: one clear button */
.away-row { flex-direction: column; gap: 6px; }
.away-row small { font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.away-row .act { width: min(100%, 320px); height: 56px; flex-direction: row; }

/* Burjnco mark woven into the cloth, just below the board */
.felt-logo { width: calc(var(--u) * 27); max-width: 44%; top: 62%; opacity: .2; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .4)); }

/* portrait table: a real oval instead of a rounded box */
.stage.portrait .rail { left: 5%; right: 5%; top: 8.5%; bottom: 10.5%; border-radius: 50% / 31%; padding: calc(var(--u) * 2); }
.stage.portrait .felt-logo { width: calc(var(--u) * 26); max-width: 56%; top: 61%; }
.stage.portrait .seat.pos-1 { left: 23%; top: 18.5%; }
.stage.portrait .seat.pos-2 { left: 77%; top: 18.5%; }
.stage.portrait .dealer-1 { left: 41%; top: 22%; }
.stage.portrait .dealer-2 { left: 59%; top: 22%; }
.stage.portrait .bet-1 { left: 27%; top: 34%; }
.stage.portrait .bet-2 { left: 73%; top: 34%; }
.stage.portrait .pot { top: 36.5%; }
.stage.portrait .seat-pod { min-width: calc(var(--u) * 15.5); }

@media (min-width: 1100px) and (min-height: 600px) {
  .action-bar { height: auto; }
  .combo { margin-bottom: 12px; padding: 10px 14px; border-radius: 18px; }
  .combo-cards { --cw: 36px; }
  .combo-name { font-size: 15px; }
  .away-row .act { width: 100%; }
}

@media (max-width: 760px) {
  /* top bar: logo steps aside at the table, tables become round chip buttons, sound lives in Settings */
  #btnSound { display: none; }
  body[data-view="table"] .brand { display: none; }
  .table-tabs { gap: 6px; }
  .table-tab, .table-tab.waiting { width: 40px; height: 40px; padding: 0; justify-content: center; border-radius: 50%; }
  .table-tab > span:last-child { display: none; }
  .tab-chip { width: 32px; height: 32px; }

  /* heads-up display: everything visible on one line */
  .table-hud { gap: 8px; }
  .hud-history { display: none; }
  .hud-info { gap: 6px; }
  .hud-prize, .hud-item { padding: 3px 8px; font-size: 12.5px; border-radius: 9px; }
  .hud-prize em { margin-left: 4px; padding: 0 4px; }
  .hud-next small { display: none; }
  .hud-next::before { content: "Next"; font-size: .8em; color: var(--muted); line-height: 1.2; }

  /* action area */
  .action-bar { height: 236px; }
  .combo { gap: 10px; margin-bottom: 6px; padding: 5px 10px; }
  .combo-cards { --cw: 26px; gap: 4px; }
  .combo-name { font-size: 13px; }
  .pre-row { gap: 6px; }
  .pre { height: 48px; gap: 6px; padding: 0 6px; font-size: 11px; letter-spacing: .02em; white-space: nowrap; }
  .pre i { width: 14px; height: 14px; }
  .act-text { white-space: nowrap; }
}

@media (max-width: 380px) {
  .hud-level small { display: none; }
  .pre { font-size: 10.5px; }
}

@media (max-height: 520px) and (orientation: landscape) {
  .action-bar { height: auto; }
  .combo { flex-direction: column; gap: 4px; padding: 4px 8px; }
  .combo-cards { --cw: 24px; }
  .combo-name { font-size: 12px; text-align: center; }
}
.stage.portrait .seat.pos-0 .seat-badge { bottom: calc(var(--u) * 2); left: 100%; transform: none; margin: 0 0 0 calc(var(--u) * .8); }

/* ------------------------------------------- lobby: lively buy-in cards, phone menu */
.lobby-nav { display: none; }

/* section headings */
.game-block { margin-top: 26px; }
.game-block h3 { position: relative; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; padding-left: 34px; margin-bottom: 14px; font-size: 24px; font-weight: 900; font-style: italic; text-transform: uppercase; letter-spacing: .02em; line-height: 1.1; }
.game-block h3::before { content: ""; position: absolute; left: 0; top: -2px; width: 26px; height: 28px; background: url("../img/art/spade.webp") center / contain no-repeat; filter: drop-shadow(0 3px 5px rgba(0, 0, 0, .5)); }
.game-block h3 small { font-size: 12px; font-weight: 600; font-style: normal; text-transform: none; letter-spacing: 0; color: var(--muted); }

/* buy-in cards: one accent colour per level, a chip carrying the price, a shining prize ribbon */
.buyin-grid { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; }
.buyin-card { --t: #4d8dff; gap: 12px; padding: 14px 14px 16px; border-radius: 24px; border: 1px solid color-mix(in srgb, var(--t) 50%, #2b2058); background: radial-gradient(90% 70% at 100% 0%, color-mix(in srgb, var(--t) 38%, transparent), transparent 70%), repeating-linear-gradient(135deg, rgba(255, 255, 255, .025) 0 10px, transparent 10px 22px), linear-gradient(170deg, #2a1e5c, #120b2c 75%); box-shadow: 0 16px 30px -20px #000, 0 0 24px -14px var(--t), inset 0 1px 0 rgba(255, 255, 255, .12); transition: transform .18s cubic-bezier(.2, .8, .3, 1.3), box-shadow .18s, border-color .18s; }
.buyin-card.tier-1 { --t: #1fd89a; }
.buyin-card.tier-2 { --t: #ffc12e; }
.buyin-card.tier-3 { --t: #ff8a1f; }
.buyin-card.tier-4 { --t: #ff4f73; }
.buyin-card.tier-5 { --t: #c77dff; }
.buyin-card::before { height: 5px; background: linear-gradient(90deg, transparent, var(--t), transparent); }
.buyin-card.game-omaha::before { background: linear-gradient(90deg, transparent, var(--t), transparent); }
.buyin-card::after { display: none; }
.buyin-card:hover { transform: translateY(-5px) rotate(-.4deg); border-color: var(--t); box-shadow: 0 22px 36px -18px #000, 0 0 34px -8px var(--t), inset 0 1px 0 rgba(255, 255, 255, .16); }
.buyin-card.is-waiting { border-color: var(--gold); box-shadow: 0 0 0 2px var(--gold), 0 0 30px -4px rgba(255, 190, 40, .9); animation: card-wait 1.6s ease-in-out infinite; }
@keyframes card-wait { 50% { box-shadow: 0 0 0 2px var(--gold), 0 0 44px 0 rgba(255, 190, 40, .9); } }
.bc-game { font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: color-mix(in srgb, var(--t) 70%, #fff); }
.bc-game small { font-size: 10px; letter-spacing: .06em; color: var(--muted); }
.bc-chip { display: flex; align-items: center; gap: 10px; }
.bc-chip img { width: 62px; height: 62px; object-fit: contain; flex: none; filter: drop-shadow(0 6px 8px rgba(0, 0, 0, .55)) drop-shadow(0 0 12px color-mix(in srgb, var(--t) 70%, transparent)); transition: transform .5s cubic-bezier(.2, .8, .3, 1.2); }
.buyin-card:hover .bc-chip img { transform: rotate(200deg) scale(1.08); }
.bc-buyin { position: static; display: flex; align-items: baseline; gap: 6px; padding: 0; }
.bc-buyin b { font-size: 46px; font-weight: 700; line-height: .9; color: #fff; text-shadow: 0 3px 0 rgba(0, 0, 0, .35), 0 0 18px color-mix(in srgb, var(--t) 60%, transparent); }
.bc-buyin em { font-family: var(--font-num); font-size: 14px; font-weight: 700; letter-spacing: .1em; color: color-mix(in srgb, var(--t) 60%, #fff); }
.bc-prize { position: relative; display: grid; justify-items: center; gap: 0; padding: 8px 10px 9px; border-radius: 14px; border: 0; overflow: hidden; background: linear-gradient(180deg, rgba(255, 200, 60, .2), rgba(255, 140, 20, .08)); box-shadow: inset 0 0 0 1px rgba(255, 205, 90, .4); }
.bc-prize::after { content: ""; position: absolute; top: 0; bottom: 0; left: -60%; width: 40%; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .28), transparent); transform: skewX(-18deg); animation: shine 3.6s ease-in-out infinite; }
@keyframes shine { 0%, 55% { left: -60%; } 100% { left: 130%; } }
.bc-prize small { font-size: 10px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #e8cf95; }
.bc-prize > span { display: flex; align-items: baseline; gap: 5px; }
.bc-prize b { font-size: 24px; font-weight: 700; line-height: 1.1; white-space: nowrap; background: linear-gradient(180deg, #fff6c9, #ffc93d 55%, #f59a00); -webkit-background-clip: text; background-clip: text; color: transparent; }
.bc-prize em { font-family: var(--font-num); font-style: normal; font-size: 12px; font-weight: 700; letter-spacing: .1em; color: #e8cf95; }
.buyin-card .btn-primary { height: 46px; border-radius: 99px; font-size: 16px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.seat-dots i { width: 10px; height: 10px; background: rgba(0, 0, 0, .4); border-color: rgba(255, 255, 255, .22); }
.bc-wait-text { color: var(--gold); }
.play-filters { margin-bottom: 0; }

/* the top bar always keeps room for one table button */
.table-tabs:not(:empty) { min-width: 44px; }

@media (max-width: 1040px) {
  /* bottom menu, like an app */
  .lobby-tabs { display: none; }
  .lobby { padding-bottom: calc(92px + env(safe-area-inset-bottom)); }
  .lobby-nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 25; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); background: linear-gradient(180deg, rgba(27, 19, 60, .97), rgba(9, 6, 24, .99)); border-top: 1px solid #45358a; box-shadow: 0 -14px 30px -14px #000; backdrop-filter: blur(10px); }
  .lobby-nav button { display: grid; justify-items: center; gap: 3px; padding: 7px 2px 5px; border-radius: 14px; color: #a69fc9; font-size: 11px; font-weight: 700; letter-spacing: .02em; white-space: nowrap; transition: color .15s, background .15s, transform .1s; }
  .lobby-nav button .icon { font-size: 23px; }
  .lobby-nav button:active { transform: scale(.94); }
  .lobby-nav button.active { color: #2a1500; background: linear-gradient(180deg, #ffd35a, #f59a00); box-shadow: 0 3px 0 #8f4c00, 0 0 18px -4px rgba(255, 170, 30, .9), inset 0 1px 0 rgba(255, 255, 255, .6); }
}

@media (max-width: 760px) {
  /* chat becomes a floating button above the menu, which frees the top bar */
  .topbar { gap: 7px; }
  #btnLobbyChat { position: absolute; left: 12px; top: calc(100dvh - 142px - env(safe-area-inset-bottom)); width: 50px; height: 50px; border-radius: 50%; font-size: 18px; color: #2a1500; background: linear-gradient(180deg, #ffd35a, #f59a00); border: 0; box-shadow: 0 4px 0 #8f4c00, 0 12px 22px -6px rgba(0, 0, 0, .8); z-index: 26; }
  .brand img { height: 36px; }
  .game-block h3 { font-size: 21px; }
  .buyin-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .buyin-card { padding: 12px 10px 14px; gap: 10px; border-radius: 20px; }
  .bc-chip { gap: 6px; }
  .bc-chip img { width: 46px; height: 46px; }
  .bc-buyin b { font-size: 36px; }
  .bc-buyin em { font-size: 12px; }
  .bc-prize { flex-direction: unset; align-items: unset; padding: 6px 6px 7px; }
  .bc-prize b { font-size: 20px; }
  .buyin-card .btn-primary { height: 42px; font-size: 14px; }
  .bc-waiting { gap: 6px; }
  .bc-wait-text { font-size: 12px; }
}

@media (max-width: 370px) {
  .brand img { height: 30px; }
  .wallet { padding-left: 6px; gap: 5px; }
  .bc-buyin b { font-size: 31px; }
  .bc-chip img { width: 40px; height: 40px; }
}
.bc-prize { justify-content: stretch; text-align: center; }
.bc-prize > span { justify-content: center; }

/* ------------------------------------------------------------ typeface: Rubik */
/* Bundled (SIL Open Font License, see fonts/Rubik-LICENSE.txt) so every device shows the same letters. */
@font-face { font-family: "Rubik"; font-style: normal; font-weight: 300 900; font-display: swap; src: url("../fonts/rubik-latin-wght-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Rubik"; font-style: italic; font-weight: 300 900; font-display: swap; src: url("../fonts/rubik-latin-wght-italic.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Rubik"; font-style: normal; font-weight: 300 900; font-display: swap; src: url("../fonts/rubik-latin-ext-wght-normal.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Rubik"; font-style: italic; font-weight: 300 900; font-display: swap; src: url("../fonts/rubik-latin-ext-wght-italic.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
:root {
  --font: "Rubik", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-num: "Rubik", "Segoe UI", system-ui, sans-serif;
}
body, button, input { font-family: var(--font); }
.bc-buyin b, .wallet b, .bc-prize b, .pot b, .seat-stack, .act-text b, .quick b { letter-spacing: 0; }
.bc-buyin b { font-weight: 800; }
.wallet b { font-weight: 800; }

/* quick games: amounts sit in the middle of their pill */
.quick { align-items: center; line-height: 1; }
.quick b, .quick em { line-height: 1; }
.quick em { transform: translateY(1px); }

/* option groups in settings wrap under their label instead of being cut off */
.switch-row { flex-wrap: wrap; }
.switch-row > .segmented { flex: none; }

/* ------------------------------------------------------------ radial turn clock */
/* A ring around the portrait empties as the time runs out; the seconds sit in the middle. */
.seat-timer { display: none; }
.seat-face { position: relative; flex: none; margin: calc(var(--u) * -1) 0 calc(var(--u) * -1) calc(var(--u) * -.8); }
.seat-face .seat-avatar { margin: 0; }
.seat-clock { --p: 1; --c1: #7dffb0; --c2: #12c97a; position: absolute; inset: calc(var(--u) * -.55); border-radius: 50%; display: grid; place-items: center; pointer-events: none; z-index: 3; }
.seat-clock i { position: absolute; inset: 0; border-radius: 50%; background: conic-gradient(from 0deg, var(--c1), var(--c2) calc(var(--p) * 360deg), rgba(255, 255, 255, .14) calc(var(--p) * 360deg)); -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - var(--u) * .78), #000 calc(100% - var(--u) * .72)); mask: radial-gradient(farthest-side, transparent calc(100% - var(--u) * .78), #000 calc(100% - var(--u) * .72)); filter: drop-shadow(0 0 calc(var(--u) * .5) var(--c2)); }
.seat-clock::before { content: ""; position: absolute; inset: calc(var(--u) * .78); border-radius: 50%; background: radial-gradient(circle, rgba(8, 5, 20, .9) 0 42%, rgba(8, 5, 20, .55) 62%, transparent 78%); }
.seat-clock b { position: relative; font-family: var(--font-num); font-size: calc(var(--u) * 3.3); font-weight: 800; line-height: 1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; background: linear-gradient(180deg, #fff, var(--c1) 55%, var(--c2)); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 calc(var(--u) * .15) calc(var(--u) * .2) rgba(0, 0, 0, .8)); }
.seat-clock.beat b { animation: clock-beat .35s ease-out; }
@keyframes clock-beat { 0% { transform: scale(1.35); } 100% { transform: scale(1); } }
.seat-clock.bank { --c1: #fff0a8; --c2: #ffb21f; }
.seat-clock.low { --c1: #ffb0bd; --c2: #ff3b5f; }
.seat-clock.low i { animation: clock-alarm .5s ease-in-out infinite alternate; }
@keyframes clock-alarm { to { filter: drop-shadow(0 0 calc(var(--u) * 1.2) var(--c2)); } }
.seat.acting .seat-avatar .avatar { box-shadow: 0 calc(var(--u) * .4) calc(var(--u) * 1) rgba(0, 0, 0, .7); }
.no-anim .seat-clock.beat b, .no-anim .seat-clock.low i { animation: none; }

/* buy-in card hover: the card lifts and the chip grows with a soft bounce (no spinning) */
.buyin-card:hover { transform: none; }
.bc-chip img { transition: transform .35s cubic-bezier(.3, 1.6, .5, 1), filter .35s; }
.buyin-card:hover .bc-chip img { transform: none; }
@media (hover: hover) {
  .buyin-card:hover { transform: translateY(-5px) scale(1.02); }
  .buyin-card:hover .bc-chip img { transform: scale(1.18); filter: drop-shadow(0 8px 10px rgba(0, 0, 0, .55)) drop-shadow(0 0 18px var(--t)); animation: chip-breathe 1.4s ease-in-out .35s infinite; }
}
@keyframes chip-breathe { 0%, 100% { transform: scale(1.18); } 50% { transform: scale(1.1); } }
.no-anim .buyin-card:hover .bc-chip img { animation: none; }

/* settings dialog: all four tabs always fit, the volume slider uses the full row */
.settings-tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); width: 100%; overflow: visible; }
.settings-tabs button { justify-content: center; min-width: 0; padding: 0 6px; overflow: hidden; text-overflow: ellipsis; }
.switch-row > .range { flex: 1 1 220px; max-width: none; min-width: 0; }
@media (max-width: 480px) {
  .settings-tabs button { font-size: 13px; padding: 0 2px; }
  .modal-body { padding: 16px; }
}
@media (max-width: 360px) {
  .settings-tabs button { font-size: 12px; }
}

/* --------------------------------------- bigger cards, clock fix, new levels, phones */

/* countdown number: plain colour (clipped gradient text left a thin light line above the digits) */
.seat-clock b { background: none; -webkit-background-clip: border-box; background-clip: border-box; color: var(--c1); filter: none; text-shadow: 0 calc(var(--u) * .15) calc(var(--u) * .3) rgba(0, 0, 0, .9), 0 0 calc(var(--u) * .8) var(--c2); padding: 0; }

/* larger cards everywhere */
.board { --cw: calc(var(--u) * 7.4); gap: calc(var(--u) * .6); }
.seat-cards { --cw: calc(var(--u) * 4.9); }
.seat.pos-0 .seat-cards { --cw: calc(var(--u) * 7.6); }
.seat.pos-0 .seat-cards.many { --cw: calc(var(--u) * 6.8); }
.seat:not(.pos-0) .seat-cards:has(.card:not(.card-back)) { --cw: calc(var(--u) * 6); }
.stage.portrait .board { --cw: calc(var(--u) * 9.3); gap: calc(var(--u) * .45); }
.stage.portrait .seat-cards { --cw: calc(var(--u) * 5.4); }
.stage.portrait .seat.pos-0 .seat-cards { --cw: calc(var(--u) * 11.2); }
.stage.portrait .seat.pos-0 .seat-cards.many { --cw: calc(var(--u) * 8.8); }
.stage.portrait .seat:not(.pos-0) .seat-cards:has(.card:not(.card-back)) { --cw: calc(var(--u) * 6.8); }
.stage.portrait .seat.pos-0 { top: 86%; }
.stage.portrait .bet-0 { top: 63.5%; }
.stage.portrait .felt-logo { top: 58.5%; }

/* cards that a player chose to show are never dimmed */
.seat.shown .seat-cards { opacity: 1; }
.show-row { justify-content: center; }
.show-row .act { max-width: 360px; }

/* sit-out button at the end of the hand tray */
.combo-sit { width: 34px; height: 34px; margin-left: auto; border-radius: 50%; flex: none; font-size: 13px; }
.combo-name { flex: 1; }

/* colours of the higher buy-in levels */
.buyin-card.tier-6 { --t: #4de1ff; }
.buyin-card.tier-7 { --t: #7dff7a; }
.buyin-card.tier-8 { --t: #ffe066; }
.buyin-card.tier-9 { --t: #ff7ad9; }
.buyin-card.tier-10 { --t: #ffffff; }
.buyin-card.tier-9 .bc-buyin b, .buyin-card.tier-10 .bc-buyin b { font-size: 40px; }
.quick b { font-size: 16px; }

@media (max-width: 760px) {
  .buyin-card.tier-9 .bc-buyin b, .buyin-card.tier-10 .bc-buyin b { font-size: 29px; }
  .buyin-card.tier-6 .bc-buyin b, .buyin-card.tier-7 .bc-buyin b, .buyin-card.tier-8 .bc-buyin b { font-size: 32px; }
  .bc-prize b { font-size: 18px; }
  .quick b { font-size: 15px; }
  .quick em { font-size: 10px; }
  .combo-sit { width: 30px; height: 30px; }
}

/* a phone held sideways: the table is vertical only, so ask to turn the phone back */
@media (max-height: 520px) and (orientation: landscape) and (max-width: 950px) {
  .table-view::after { content: "Rotate your phone upright to play"; position: fixed; inset: var(--topbar-h) 0 0 0; z-index: 50; display: grid; place-items: center; padding: 20px; text-align: center; font-size: 18px; font-weight: 800; color: var(--gold); background: radial-gradient(circle at 50% 40%, #241552, #0a0719 75%); }
}

/* chat: reactions and emoji picker */
.chat-picker { display: grid; gap: 8px; padding: 10px; border-top: 1px solid var(--line); max-height: 46%; overflow-y: auto; }
.chat-picker small { font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.chat-reactions { display: grid; gap: 8px; }
.chat-picker .chat-emotes { padding: 0; border: 0; }
.chat-emotes button, .chat-emoji button { background: rgba(255, 255, 255, .06); border-radius: 10px; transition: transform .1s, background .15s; }
.chat-emoji { display: grid; grid-template-columns: repeat(8, 1fr); gap: 4px; }
.chat-emoji button { aspect-ratio: 1; font-size: 20px; line-height: 1; }
.chat-emotes button:hover, .chat-emoji button:hover { background: rgba(255, 255, 255, .14); transform: scale(1.12); }
.chat-line p { font-size: 15px; }

/* the chat sheet always sits above the lobby menu and the floating chat button */
.chat-panel { z-index: 45; }

/* ----------------------------------------------- game tabs, cash tables, six seats */

/* Hold'em | Omaha | Spin Poker */
.game-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.game-tabs button { display: flex; align-items: center; justify-content: center; gap: 10px; height: 62px; border-radius: 18px; background: linear-gradient(180deg, #2c2159, #150e30); border: 1px solid #45358a; box-shadow: 0 4px 0 #07051a, inset 0 1px 0 rgba(255, 255, 255, .12); font-size: 18px; font-weight: 800; font-style: italic; text-transform: uppercase; letter-spacing: .03em; color: #cfc8ee; transition: transform .08s, box-shadow .08s, color .15s; }
.game-tabs button img { width: 34px; height: 34px; object-fit: contain; filter: drop-shadow(0 3px 5px rgba(0, 0, 0, .6)); }
.game-tabs button:active { transform: translateY(4px); box-shadow: 0 0 0 #07051a; }
.game-tabs button.active { color: #2a1500; background: linear-gradient(180deg, #ffe07a, #ffb21f 50%, #f08a00); border-color: #ffe9a6; box-shadow: 0 4px 0 #8f4c00, 0 0 26px -6px rgba(255, 170, 30, .9), inset 0 1px 0 rgba(255, 255, 255, .65); }
.spin-section { margin-top: 18px; }

/* cash table cards reuse the buy-in card */
.cash-card .bc-buyin b { font-size: 34px; }
.cash-card.is-seated { border-color: var(--green); box-shadow: 0 0 0 2px var(--green), 0 0 26px -6px rgba(31, 200, 138, .8); }
.bc-facts { display: grid; grid-template-columns: 1fr auto; gap: 8px; padding: 8px 12px; border-radius: 14px; background: rgba(0, 0, 0, .28); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08); }
.bc-facts span { display: grid; }
.bc-facts span:last-child { text-align: right; }
.bc-facts small { font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.bc-facts b { font-family: var(--font-num); font-size: 16px; white-space: nowrap; }
.buyin-pick { display: grid; gap: 6px; justify-items: stretch; text-align: center; }
.buyin-pick > b { font-size: 34px; font-weight: 800; color: var(--gold); }
.buyin-range { display: flex; justify-content: space-between; }

/* table: seats that are free or not in the hand, rabbit cards, extra buttons */
.seat.empty .seat-pod { min-width: 0; padding: calc(var(--u) * .5) calc(var(--u) * 1.4); background: rgba(0, 0, 0, .28); border: calc(var(--u) * .14) dashed rgba(255, 255, 255, .25); box-shadow: none; }
.seat.empty .seat-face, .seat.empty .seat-stack { display: none; }
.seat.empty .seat-cards { visibility: hidden; }
.seat.empty .seat-name { color: rgba(255, 255, 255, .45); font-size: calc(var(--u) * 1.2); }
.seat.idle .seat-pod { opacity: .6; }
.card.ghost { opacity: .62; filter: saturate(.5); box-shadow: 0 0 0 calc(var(--cw) * .04) rgba(255, 255, 255, .5); transform: translateY(calc(var(--cw) * .08)); }
.act-rabbit { background: linear-gradient(180deg, #b79bff 0%, #7c4dff 50%, #5a2fd6 100%); color: #fff; text-shadow: 0 1px 2px rgba(20, 0, 60, .6); box-shadow: 0 5px 0 #33158a, 0 16px 24px -14px rgba(124, 77, 255, .9), inset 0 1px 0 rgba(255, 255, 255, .45); }
.show-row .act { max-width: 300px; }
.hud-leave { color: #ff9aaa; }
.bet-output { display: grid; place-items: center; width: auto; min-width: 96px; padding: 0 10px; }
.presets { flex-wrap: nowrap; }

/* six seats, landscape */
.stage.six .seat-pod { min-width: calc(var(--u) * 13.5); }
.stage.six .seat-avatar .avatar { width: calc(var(--u) * 6.2); height: calc(var(--u) * 6.2); }
.stage.six .seat-cards { --cw: calc(var(--u) * 4.2); }
.stage.six .seat.pos-0 .seat-cards { --cw: calc(var(--u) * 7); }
.stage.six .seat.pos-0 .seat-cards.many { --cw: calc(var(--u) * 6.2); }
.stage.six .seat:not(.pos-0) .seat-cards:has(.card:not(.card-back)) { --cw: calc(var(--u) * 5.2); }
.stage.six .board { top: 46%; --cw: calc(var(--u) * 6.9); }
.stage.six .pot { top: 31.5%; }
.stage.six .felt-logo { top: 65%; }
.stage.six .seat.pos-1 { left: 15.5%; top: 68%; }
.stage.six .seat.pos-2 { left: 15.5%; top: 28%; }
.stage.six .seat.pos-3 { left: 50%; top: 14%; flex-direction: column-reverse; }
.stage.six .seat.pos-3 .seat-cards { margin: calc(var(--u) * -1.2) 0 0; }
.stage.six .seat.pos-4 { left: 84.5%; top: 28%; }
.stage.six .seat.pos-5 { left: 84.5%; top: 68%; }
.stage.six .bet-0 { left: 50%; top: 63%; }
.stage.six .bet-1 { left: 30%; top: 63%; }
.stage.six .bet-2 { left: 30%; top: 37%; }
.stage.six .bet-3 { left: 62%; top: 24%; }
.stage.six .bet-4 { left: 70%; top: 37%; }
.stage.six .bet-5 { left: 70%; top: 63%; }
.stage.six .dealer-0 { left: 40%; top: 77%; }
.stage.six .dealer-1 { left: 27%; top: 73%; }
.stage.six .dealer-2 { left: 27%; top: 25%; }
.stage.six .dealer-3 { left: 40%; top: 11%; }
.stage.six .dealer-4 { left: 73%; top: 25%; }
.stage.six .dealer-5 { left: 73%; top: 73%; }

/* six seats, portrait (phones) */
.stage.six.portrait .seat-pod { min-width: calc(var(--u) * 12.5); padding-right: calc(var(--u) * 1.2); gap: calc(var(--u) * .6); }
.stage.six.portrait .seat-avatar .avatar { width: calc(var(--u) * 5.6); height: calc(var(--u) * 5.6); }
.stage.six.portrait .seat-name { font-size: calc(var(--u) * 1.25); max-width: calc(var(--u) * 7.5); }
.stage.six.portrait .seat:not(.pos-0) .seat-stack { font-size: calc(var(--u) * 1.55); }
.stage.six.portrait .seat:not(.pos-0) .seat-stack::before { display: none; }
.stage.six.portrait .seat-cards { --cw: calc(var(--u) * 4.4); }
.stage.six.portrait .seat.pos-0 .seat-cards { --cw: calc(var(--u) * 10.4); }
.stage.six.portrait .seat.pos-0 .seat-cards.many { --cw: calc(var(--u) * 8.2); }
.stage.six.portrait .seat:not(.pos-0) .seat-cards:has(.card:not(.card-back)) { --cw: calc(var(--u) * 5.2); }
.stage.six.portrait .board { top: 47.5%; --cw: calc(var(--u) * 8.6); }
.stage.six.portrait .pot { top: 35%; }
.stage.six.portrait .felt-logo { top: 59%; }
.stage.six.portrait .seat.pos-0 { top: 87%; }
.stage.six.portrait .seat.pos-1 { left: 15%; top: 66.5%; }
.stage.six.portrait .seat.pos-2 { left: 15%; top: 28%; }
.stage.six.portrait .seat.pos-3 { left: 50%; top: 9.5%; }
.stage.six.portrait .seat.pos-4 { left: 85%; top: 28%; }
.stage.six.portrait .seat.pos-5 { left: 85%; top: 66.5%; }
.stage.six.portrait .bet-0 { top: 66%; }
.stage.six.portrait .bet-1 { left: 31%; top: 62%; }
.stage.six.portrait .bet-2 { left: 31%; top: 35%; }
.stage.six.portrait .bet-3 { left: 50%; top: 27.5%; }
.stage.six.portrait .bet-4 { left: 69%; top: 35%; }
.stage.six.portrait .bet-5 { left: 69%; top: 62%; }
.stage.six.portrait .dealer-0 { left: 27%; top: 81%; }
.stage.six.portrait .dealer-1 { left: 29%; top: 70.5%; }
.stage.six.portrait .dealer-2 { left: 29%; top: 24.5%; }
.stage.six.portrait .dealer-3 { left: 34%; top: 7%; }
.stage.six.portrait .dealer-4 { left: 71%; top: 24.5%; }
.stage.six.portrait .dealer-5 { left: 71%; top: 70.5%; }

@media (max-width: 760px) {
  .game-tabs { gap: 6px; }
  .game-tabs button { height: 52px; gap: 6px; font-size: 13px; border-radius: 14px; }
  .game-tabs button img { width: 24px; height: 24px; }
  .cash-card .bc-buyin b { font-size: 26px; }
  .bc-facts { padding: 6px 8px; }
  .bc-facts b { font-size: 13px; }
  .presets { grid-template-columns: repeat(5, 1fr); gap: 5px; }
  .preset { padding: 0 2px; font-size: 12px; }

  /* the info line floats over the top of the table instead of taking a row of its own */
  .table-view { position: relative; }
  .table-hud { position: absolute; top: 0; left: 0; right: 0; z-index: 7; padding-top: 6px; pointer-events: none; }
  .table-hud > * { pointer-events: auto; }
  .table-area { padding-top: 18px; }
  .table-area:has(.stage.six) { padding-top: 50px; }
}

/* short phones (iPhone 7 / 8 / SE): a tighter action area leaves more room for the table */
@media (max-width: 760px) and (max-height: 720px) {
  .action-bar { height: 188px; padding-top: 4px; padding-bottom: max(8px, env(safe-area-inset-bottom)); }
  .action-inner { gap: 6px; }
  .action-inner:has(.act-row, .pre-row, .away-row) { padding: 8px; border-radius: 16px; }
  .combo { margin-bottom: 4px; padding: 3px 8px; }
  .combo-cards { --cw: 22px; }
  .combo-name { font-size: 12px; }
  .combo-sit { width: 26px; height: 26px; }
  .size-row { gap: 5px; }
  .preset { height: 27px; }
  .slider-row .range { height: 22px; }
  .bet-input { height: 30px; font-size: 14px; }
  .act { height: 46px; }
  .act-icon { width: 24px; height: 24px; }
  .pre { height: 42px; }
  .away-row .act { height: 46px; }
  .idle-row { min-height: 36px; }
}

@media (min-width: 1100px) and (min-height: 600px) {
  .presets { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
  .preset { font-size: 13px; padding: 0 2px; }
  .show-row { flex-direction: column; }
  .show-row .act { max-width: none; height: 64px; flex-direction: row; }
}

/* phones: chat lives in the bottom menu (six items), game tabs stay on one line */
@media (max-width: 1040px) {
  .lobby-nav { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  #btnLobbyChat { display: none; }
  .lobby-nav button { font-size: 10px; padding: 7px 0 5px; }
  .game-tabs button { font-size: 12px; white-space: nowrap; gap: 5px; padding: 0 4px; }
  .game-tabs button img { width: 20px; height: 20px; }
  .bc-game { font-size: 11px; letter-spacing: .06em; }
}

/* cash cards on phones: the stakes and the currency always fit */
@media (max-width: 760px) {
  .cash-card .bc-chip img { width: 36px; height: 36px; }
  .cash-card .bc-buyin { min-width: 0; gap: 4px; }
  .cash-card .bc-buyin b { font-size: 21px; white-space: nowrap; }
  .cash-card .bc-buyin em { font-size: 10px; }
}

/* round turn clock: always a circle, whatever the shape of the box around the portrait */
.seat-clock { inset: auto; left: 50%; top: 50%; width: calc(100% + var(--u) * 1.1); height: auto; aspect-ratio: 1; transform: translate(-50%, -50%); }

/* top seat: the cards hang clear below the name plate instead of hiding behind the portrait */
.stage.six .seat.pos-3 .seat-cards { margin: calc(var(--u) * .35) 0 0; }
.stage.six .seat.pos-3 { top: 15%; }
.stage.six.portrait .seat.pos-3 { top: 10.5%; }

/* watching a cash table, free chairs, add chips */
.seat.empty.can-sit .seat-pod { cursor: pointer; border-color: rgba(255, 200, 70, .75); background: rgba(40, 24, 4, .55); animation: sit-pulse 1.8s ease-in-out infinite; }
.seat.empty.can-sit .seat-name { color: var(--gold); font-weight: 700; }
.seat.empty.can-sit .seat-pod:hover { background: rgba(90, 56, 8, .7); }
@keyframes sit-pulse { 50% { box-shadow: 0 0 calc(var(--u) * 1.6) rgba(255, 190, 40, .45); } }
.no-anim .seat.empty.can-sit .seat-pod { animation: none; }
.seat-add { position: absolute; right: calc(var(--u) * -1.5); top: 50%; transform: translateY(-50%); width: calc(var(--u) * 3); height: calc(var(--u) * 3); padding: 0; display: grid; place-items: center; border: 0; border-radius: 50%; cursor: pointer; color: #2a1500; background: linear-gradient(180deg, #ffe08a, #ffb21f 55%, #e08a00); box-shadow: 0 calc(var(--u) * .25) 0 #8a5200, 0 calc(var(--u) * .5) calc(var(--u) * 1) rgba(0, 0, 0, .5); transition: transform .15s; }
.seat-add:hover { transform: translateY(-50%) scale(1.12); }
.seat-add[hidden] { display: none; }
.seat-add svg { width: 62%; height: 62%; }
.stage.portrait .seat-add { width: calc(var(--u) * 4.2); height: calc(var(--u) * 4.2); right: calc(var(--u) * -2.2); }
.bc-actions { display: grid; grid-template-columns: 1fr 1.4fr; gap: 8px; }
.bc-actions .btn { min-width: 0; padding-left: 6px; padding-right: 6px; }
.facts + .buyin-pick { margin-top: 14px; }

/* ---------------------------------------------------------------- six-seat tables: portrait seats
   Every opponent is a round portrait with a name plate under it, so the left and the right side
   of the table mirror each other exactly. */
.stage.six .seat.mini.mini .seat-pod { flex-direction: column; align-items: center; min-width: 0; padding: 0; gap: 0; background: none; border: 0; border-radius: 0; box-shadow: none; }
.stage.six .seat.mini.mini .seat-face { margin: 0; }
.stage.six .seat.mini.mini .seat-avatar .avatar { width: calc(var(--u) * 7.4); height: calc(var(--u) * 7.4); box-shadow: 0 0 0 calc(var(--u) * .22) #5140a0, 0 calc(var(--u) * .5) calc(var(--u) * 1.2) rgba(0, 0, 0, .7); transition: box-shadow .25s; }
.stage.six .seat.mini.mini .seat-plate { position: relative; z-index: 4; justify-items: center; width: calc(var(--u) * 11.6); margin-top: calc(var(--u) * -1.5); padding: calc(var(--u) * .3) calc(var(--u) * .7) calc(var(--u) * .4); text-align: center; border-radius: calc(var(--u) * 1.3); background: linear-gradient(180deg, #2c2160, #120b2b); border: calc(var(--u) * .16) solid #5a47b4; box-shadow: 0 calc(var(--u) * .5) calc(var(--u) * 1.2) rgba(0, 0, 0, .6); transition: border-color .25s, box-shadow .25s; }
.stage.six .seat.mini.mini .seat-name { justify-content: center; max-width: 100%; font-size: calc(var(--u) * 1.3); }
.stage.six .seat.mini.mini .seat-stack { justify-content: center; font-size: calc(var(--u) * 1.65); }
.stage.six .seat.mini.mini .seat-stack::before { display: none; }
.stage.six .seat.mini.mini .seat-add { display: none; }
.stage.six.portrait .seat.mini.mini .seat-avatar .avatar { width: calc(var(--u) * 8.4); height: calc(var(--u) * 8.4); }
.stage.six.portrait .seat.mini.mini .seat-plate { width: calc(var(--u) * 13.4); margin-top: calc(var(--u) * -1.7); }
.stage.six.portrait .seat.mini.mini .seat-name { font-size: calc(var(--u) * 1.55); }
.stage.six.portrait .seat.mini.mini .seat-stack { font-size: calc(var(--u) * 1.95); }

/* whose turn, who won */
.stage.six .seat.mini.mini.acting .seat-pod, .stage.six .seat.mini.mini.winner .seat-pod { box-shadow: none; }
.stage.six .seat.mini.mini.acting .seat-plate { border-color: var(--gold); box-shadow: 0 0 calc(var(--u) * 1.6) rgba(255, 180, 30, .7); }
.stage.six .seat.mini.mini.winner .seat-plate { border-color: var(--gold); background: linear-gradient(180deg, #6a4a08, #2a1a02); box-shadow: 0 0 calc(var(--u) * 2) rgba(255, 200, 60, .8); }
.stage.six .seat.mini.mini.winner .seat-avatar .avatar { box-shadow: 0 0 0 calc(var(--u) * .35) var(--gold), 0 0 calc(var(--u) * 3) rgba(255, 200, 60, .95); animation: win-halo 1.1s ease-in-out infinite alternate; }
@keyframes win-halo { to { box-shadow: 0 0 0 calc(var(--u) * .5) #fff0a8, 0 0 calc(var(--u) * 4.6) rgba(255, 210, 80, 1); } }
.no-anim .stage.six .seat.mini.mini.winner .seat-avatar .avatar { animation: none; }
.stage.six .seat.mini.mini .seat-win { top: calc(var(--u) * -3); }

/* cards of the opponents: two small backs leaning on the portrait, mirrored on the right side */
.stage.six .seat.mini.mini { flex-direction: column; }
.stage.six .seat.mini.mini .seat-cards { position: absolute; z-index: 3; left: 50%; top: calc(var(--u) * 2.3); height: auto; margin: 0 0 0 calc(var(--u) * 1.5); gap: 0; --cw: calc(var(--u) * 3.1); transform: rotate(9deg); transform-origin: 0 100%; }
.stage.six .seat.mini.mini .seat-cards .card + .card { margin-left: calc(var(--cw) * -.42); }
.stage.six .seat.mini.mini.pos-4 .seat-cards, .stage.six .seat.mini.mini.pos-5 .seat-cards { left: auto; right: 50%; margin: 0 calc(var(--u) * 1.5) 0 0; transform: rotate(-9deg); transform-origin: 100% 100%; }
.stage.six.portrait .seat.mini.mini .seat-cards { top: calc(var(--u) * 2.7); --cw: calc(var(--u) * 3.5); }
/* cards turned face up: laid over the portrait, big enough to read */
.stage.six .seat.mini.mini .seat-cards:has(.card:not(.card-back)) { left: 50%; right: auto; top: calc(var(--u) * -.6); margin: 0; gap: calc(var(--u) * .25); --cw: calc(var(--u) * 4.6); transform: translateX(-50%); z-index: 5; }
.stage.six .seat.mini.mini .seat-cards:has(.card:not(.card-back)) .card + .card { margin-left: 0; }
.stage.six .seat.mini.mini .seat-cards.many:has(.card:not(.card-back)) { --cw: calc(var(--u) * 3.6); }
.stage.six .seat.mini.mini .seat-cards.many:has(.card:not(.card-back)) .card + .card { margin-left: calc(var(--cw) * -.3); }
.stage.six.portrait .seat.mini.mini .seat-cards:has(.card:not(.card-back)) { --cw: calc(var(--u) * 5.4); }
.stage.six.portrait .seat.mini.mini .seat-cards.many:has(.card:not(.card-back)) { --cw: calc(var(--u) * 4.3); }

/* free chairs: a quiet ring; for somebody who watches, a golden button with a chair */
.stage.six .seat.empty.empty.empty .seat-pod { display: grid; place-items: center; width: calc(var(--u) * 6.4); height: calc(var(--u) * 6.4); min-width: 0; padding: 0; border-radius: 50%; background: rgba(0, 0, 0, .3); border: calc(var(--u) * .16) dashed rgba(255, 255, 255, .22); box-shadow: none; animation: none; }
.stage.six .seat.empty.empty.empty .seat-plate { width: auto; margin: 0; padding: 0; background: none; border: 0; box-shadow: none; }
.stage.six .seat.empty.empty.empty .seat-name { max-width: none; }
.stage.six .seat.empty.can-sit.can-sit.can-sit .seat-pod { cursor: pointer; border: 0; color: #2a1500; background: radial-gradient(circle at 50% 30%, #fff3b0, #ffb21f 55%, #d97a00); box-shadow: 0 0 0 calc(var(--u) * .3) rgba(20, 10, 50, .9), 0 0 0 calc(var(--u) * .5) #ffcf4a, 0 calc(var(--u) * .6) calc(var(--u) * 1.4) rgba(0, 0, 0, .6); animation: sit-beat 1.8s ease-in-out infinite; transition: transform .15s; }
.stage.six .seat.empty.can-sit.can-sit.can-sit .seat-pod:hover { transform: scale(1.1); background: radial-gradient(circle at 50% 30%, #fff8cf, #ffc23f 55%, #e88a00); }
.stage.six .seat.empty.can-sit .seat-name { color: #2a1500; }
.stage.six .seat.empty.can-sit .seat-name svg { width: calc(var(--u) * 3.4); height: calc(var(--u) * 3.4); stroke-width: 2.2; }
@keyframes sit-beat { 50% { box-shadow: 0 0 0 calc(var(--u) * .3) rgba(20, 10, 50, .9), 0 0 0 calc(var(--u) * .5) #ffcf4a, 0 0 calc(var(--u) * 2.6) rgba(255, 190, 40, .9); } }
.no-anim .stage.six .seat.empty.can-sit.can-sit.can-sit .seat-pod { animation: none; }
.stage.six.portrait .seat.empty.empty.empty .seat-pod { width: calc(var(--u) * 8); height: calc(var(--u) * 8); }
.stage.six.portrait .seat.empty.can-sit .seat-name svg { width: calc(var(--u) * 4.2); height: calc(var(--u) * 4.2); }

/* seat positions: on the rail, mirrored left and right */
.stage.six .seat.pos-1 { left: 13%; top: 66%; }
.stage.six .seat.pos-2 { left: 13%; top: 30%; }
.stage.six .seat.pos-3 { left: 50%; top: 13.5%; flex-direction: column; }
.stage.six .seat.pos-4 { left: 87%; top: 30%; }
.stage.six .seat.pos-5 { left: 87%; top: 66%; }
.stage.six .seat.mini.pos-0 { top: 86%; }
.stage.six .bet-1 { left: 27%; top: 62%; }
.stage.six .bet-2 { left: 27%; top: 36%; }
.stage.six .bet-3 { left: 50%; top: 27.5%; }
.stage.six .bet-4 { left: 73%; top: 36%; }
.stage.six .bet-5 { left: 73%; top: 62%; }
.stage.six .pot { top: 35.5%; }
.stage.six .board { top: 49%; }
.stage.six .dealer-1 { left: 21.5%; top: 72%; }
.stage.six .dealer-2 { left: 21.5%; top: 24%; }
.stage.six .dealer-3 { left: 57.5%; top: 12%; }
.stage.six .dealer-4 { left: 78.5%; top: 24%; }
.stage.six .dealer-5 { left: 78.5%; top: 72%; }
.stage.six.portrait .seat.pos-1 { left: 13.5%; top: 66%; }
.stage.six.portrait .seat.pos-2 { left: 13.5%; top: 30%; }
.stage.six.portrait .seat.pos-3 { left: 50%; top: 8.5%; }
.stage.six.portrait .seat.pos-4 { left: 86.5%; top: 30%; }
.stage.six.portrait .seat.pos-5 { left: 86.5%; top: 66%; }
.stage.six.portrait .seat.mini.pos-0 { top: 90.5%; }
.stage.six.portrait .bet-1 { left: 31%; top: 64.5%; }
.stage.six.portrait .bet-2 { left: 31%; top: 34%; }
.stage.six.portrait .bet-3 { left: 62%; top: 21%; }
.stage.six.portrait .bet-4 { left: 69%; top: 34%; }
.stage.six.portrait .bet-5 { left: 69%; top: 64.5%; }
.stage.six.portrait .pot { top: 36.5%; }
.stage.six.portrait .dealer-1 { left: 27%; top: 59.5%; }
.stage.six.portrait .dealer-2 { left: 27%; top: 23.5%; }
.stage.six.portrait .dealer-3 { left: 64%; top: 8%; }
.stage.six.portrait .dealer-4 { left: 73%; top: 23.5%; }
.stage.six.portrait .dealer-5 { left: 73%; top: 59.5%; }
.stage.six.portrait .rail { border-radius: calc(var(--u) * 26); }

/* watching: the table takes the whole screen, the chairs themselves are the buttons */
.table-view.watching .action-bar { display: none; }
@media (max-width: 760px) and (max-height: 640px) {
  body[data-view="table"] .topbar { display: none; }
}

/* ---------------------------------------------------------------- lobby: cash table cards */
.cash-card { background: radial-gradient(120% 80% at 50% 0%, color-mix(in srgb, var(--t) 26%, transparent), transparent 70%), linear-gradient(170deg, #241a52, #100a27 78%); }
.buyin-card.tier-6 { --t: #4de1ff; }
.buyin-card.tier-7 { --t: #ff7ad9; }
.mini-table { position: relative; height: 132px; margin: 2px 0; }
.mini-felt { position: absolute; inset: 22px 30px; display: grid; place-content: center; justify-items: center; gap: 1px; border-radius: 999px; background: radial-gradient(ellipse at 50% 35%, #2a8a6a, #0d4a3a 75%, #06281f); border: 4px solid #1a1238; box-shadow: 0 0 0 2px color-mix(in srgb, var(--t) 75%, #fff), 0 0 22px -4px var(--t), inset 0 0 22px rgba(0, 0, 0, .6); }
.game-omaha .mini-felt { background: radial-gradient(ellipse at 50% 35%, #6a3fc0, #33186e 75%, #180a38); }
.mini-felt b { font-family: var(--font-num); font-size: 24px; font-weight: 800; line-height: 1; color: #fff; white-space: nowrap; text-shadow: 0 2px 0 rgba(0, 0, 0, .45); }
.mini-felt em { font-family: var(--font-num); font-style: normal; font-size: 11px; font-weight: 700; letter-spacing: .14em; color: color-mix(in srgb, var(--t) 55%, #fff); }
.mini-seat { position: absolute; width: 34px; height: 34px; margin: -17px 0 0 -17px; border-radius: 50%; display: grid; place-items: center; background: rgba(8, 5, 20, .85); border: 2px dashed rgba(255, 255, 255, .22); }
.mini-seat.on { border: 2px solid var(--gold); box-shadow: 0 0 10px rgba(255, 190, 40, .6); }
.mini-seat .avatar { width: 100%; height: 100%; }
.ms-0 { left: 50%; top: calc(100% - 15px); }
.ms-1 { left: 22px; top: 72%; }
.ms-2 { left: 22px; top: 28%; }
.ms-3 { left: 50%; top: 15px; }
.ms-4 { left: calc(100% - 22px); top: 28%; }
.ms-5 { left: calc(100% - 22px); top: 72%; }
@media (max-width: 760px) {
  .mini-table { height: 112px; }
  .mini-felt { inset: 19px 22px; border-width: 3px; }
  .mini-felt b { font-size: 17px; }
  .mini-felt em { font-size: 9px; }
  .mini-seat { width: 28px; height: 28px; margin: -14px 0 0 -14px; }
  .ms-0 { top: calc(100% - 12px); }
  .ms-3 { top: 12px; }
  .ms-1, .ms-2 { left: 16px; }
  .ms-4, .ms-5 { left: calc(100% - 16px); }
}

/* own seat at a six-seat table on a phone: as readable as the others */
.stage.six.portrait .seat.pos-0:not(.mini) .seat-pod { min-width: calc(var(--u) * 17); }
.stage.six.portrait .seat.pos-0:not(.mini) .seat-avatar .avatar { width: calc(var(--u) * 7); height: calc(var(--u) * 7); }
.stage.six.portrait .seat.pos-0:not(.mini) .seat-name { font-size: calc(var(--u) * 1.55); max-width: calc(var(--u) * 10); }
.stage.six.portrait .seat.pos-0:not(.mini) .seat-stack { font-size: calc(var(--u) * 2); }
