/* ═══════════════════════════════════════════════════════════════════
   Pokerkit
   ═══════════════════════════════════════════════════════════════════ */
:root {
  --bg: #0b0e13;
  --bg-2: #0f131a;
  --surface: #141922;
  --surface-2: #1a2029;
  --surface-3: #212833;
  --line: rgba(255, 255, 255, 0.07);
  --line-2: rgba(255, 255, 255, 0.12);
  --line-3: rgba(255, 255, 255, 0.2);
  --text: #eef1f5;
  --text-2: #b9c1cc;
  --muted: #7f8898;
  --dim: #545d6b;
  --accent: #f2b53b;
  --accent-2: #d99a1e;
  --accent-ink: #1b1405;
  --accent-soft: rgba(242, 181, 59, 0.14);
  --accent-line: rgba(242, 181, 59, 0.45);
  --green: #35c07a;
  --green-soft: rgba(53, 192, 122, 0.14);
  --red: #ef5350;
  --red-soft: rgba(239, 83, 80, 0.14);
  --felt: #1b5e45;
  --felt-2: #124232;
  --felt-3: #0c2e23;
  --rail: #1b2028;
  --card-w: 50px;
  --r-sm: 10px; --r-md: 14px; --r-lg: 20px; --r-xl: 26px;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4), 0 4px 12px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 30px 70px rgba(0, 0, 0, 0.6);
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --font: 'Plus Jakarta Sans', 'SF Pro Text', 'Segoe UI', system-ui, sans-serif;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--text); font-family: var(--font); font-size: 14px; line-height: 1.5; -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; overscroll-behavior: none; font-variant-numeric: tabular-nums; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
button:disabled { cursor: not-allowed; opacity: 0.4; }
a { color: var(--accent); text-decoration: none; }
[hidden] { display: none !important; }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
svg.i { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
#app { position: relative; z-index: 1; min-height: 100%; }
body::before { content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 0; background: radial-gradient(80% 50% at 50% -10%, rgba(27, 94, 69, 0.22), transparent 60%); }

/* ───────── primitives ───────── */
h1, h2, h3 { margin: 0; font-weight: 700; letter-spacing: -0.02em; }
h2 { font-size: 22px; line-height: 1.2; }
h3 { font-size: 16px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 16px; border-radius: var(--r-sm); background: var(--surface-2); color: var(--text); font-weight: 600; font-size: 14px; border: 1px solid var(--line-2); transition: background 0.15s, border-color 0.15s, transform 0.08s; user-select: none; white-space: nowrap; }
.btn:hover:not(:disabled) { background: var(--surface-3); border-color: var(--line-3); }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.btn.primary:hover:not(:disabled) { background: #f7c258; }
.btn.danger { background: var(--red-soft); color: #ff8a87; border-color: rgba(239, 83, 80, 0.3); }
.btn.danger:hover:not(:disabled) { background: rgba(239, 83, 80, 0.24); }
.btn.ghost { background: transparent; border-color: var(--line-2); color: var(--text-2); }
.btn.sm { min-height: 34px; padding: 0 12px; font-size: 13px; border-radius: 9px; }
.btn.lg { min-height: 50px; font-size: 15px; border-radius: 12px; padding: 0 22px; }
.btn.block { width: 100%; }
.btn.icon { width: 38px; min-height: 38px; padding: 0; border-radius: 10px; position: relative; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 12px; font-weight: 600; color: var(--muted); }
.input { width: 100%; min-height: 44px; padding: 0 14px; border-radius: var(--r-sm); background: var(--bg-2); border: 1px solid var(--line-2); color: var(--text); outline: none; transition: border-color 0.15s, box-shadow 0.15s; font-size: 15px; }
.input::placeholder { color: var(--dim); }
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.input.money { font-size: 18px; font-weight: 700; letter-spacing: -0.01em; }
.input-wrap { position: relative; }
.input-wrap .prefix { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); font-weight: 600; pointer-events: none; }
.input-wrap .input { padding-left: 30px; }
select.input { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%237f8898' stroke-width='1.6' fill='none'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; }
.row { display: flex; gap: 10px; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.grow { flex: 1; }
.muted { color: var(--muted); }
.dim { color: var(--dim); }
.small { font-size: 13px; }
.tiny { font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; font-weight: 700; }
.money { font-weight: 700; letter-spacing: -0.01em; }
.pos { color: var(--green); }
.neg { color: #ff8a87; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip-btn { min-height: 34px; padding: 0 12px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line-2); color: var(--text-2); font-weight: 600; font-size: 13px; transition: all 0.15s; }
.chip-btn.active, .chip-btn:hover { border-color: var(--accent-line); color: var(--accent); background: var(--accent-soft); }
.seg { display: flex; gap: 4px; background: var(--bg-2); border: 1px solid var(--line-2); border-radius: var(--r-sm); padding: 4px; }
.seg .chip-btn { flex: 1; border-radius: 7px; border-color: transparent; background: transparent; min-height: 34px; padding: 0 6px; font-size: 13px; white-space: nowrap; }
.seg .chip-btn.active { background: var(--surface-3); color: var(--text); }
.switch { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 0; border-top: 1px solid var(--line); cursor: pointer; }
.switch .toggle { width: 42px; height: 24px; border-radius: 999px; background: var(--surface-3); position: relative; flex: none; transition: background 0.2s; }
.switch .toggle::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--text-2); transition: transform 0.2s var(--ease); }
.switch input { display: none; }
.switch input:checked + .toggle { background: var(--accent); }
.switch input:checked + .toggle::after { transform: translateX(18px); background: var(--accent-ink); }
.switch .lbl { flex: 1; font-weight: 600; font-size: 14px; }
.switch .lbl small { display: block; color: var(--muted); font-size: 12px; font-weight: 400; }
.divider { height: 1px; background: var(--line); margin: 14px 0; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* toasts */
#toasts { position: fixed; top: calc(12px + var(--safe-t)); left: 50%; transform: translateX(-50%); z-index: 90; display: flex; flex-direction: column; gap: 8px; pointer-events: none; width: min(92vw, 400px); }
.toast { background: var(--surface-2); border: 1px solid var(--line-2); border-radius: var(--r-sm); padding: 10px 14px; box-shadow: var(--shadow-md); font-size: 13px; font-weight: 500; animation: toast-in 0.25s var(--ease); text-align: center; }
.toast.error { border-color: rgba(239, 83, 80, 0.4); color: #ffb3b1; }
.toast.out { animation: toast-out 0.2s ease forwards; }
@keyframes toast-in { from { opacity: 0; transform: translateY(-8px); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(-8px); } }

/* modals */
.modal-back { position: fixed; inset: 0; z-index: 80; background: rgba(4, 6, 9, 0.7); backdrop-filter: blur(6px); display: flex; align-items: flex-end; justify-content: center; animation: fade-in 0.2s ease; }
.modal { width: 100%; max-width: 420px; background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-xl) var(--r-xl) 0 0; padding: 24px 20px calc(22px + var(--safe-b)); box-shadow: var(--shadow-lg); animation: sheet-in 0.3s var(--ease); max-height: 92vh; overflow: auto; }
.modal h2 { margin-bottom: 4px; }
.modal .sub { color: var(--muted); margin-bottom: 18px; font-size: 13px; }
.modal .stack { display: flex; flex-direction: column; gap: 14px; }
.modal .foot { display: flex; gap: 10px; margin-top: 20px; }
.modal .foot .btn { flex: 1; }
@keyframes sheet-in { from { transform: translateY(30px); opacity: 0; } }
@keyframes fade-in { from { opacity: 0; } }
@media (min-width: 640px) { .modal-back { align-items: center; padding: 20px; } .modal { border-radius: var(--r-lg); padding: 26px; animation: pop-in 0.22s var(--ease); } @keyframes pop-in { from { transform: scale(0.97) translateY(6px); opacity: 0; } } }

/* ═════════════════════════ LANDING ═════════════════════════ */
.landing { min-height: 100vh; padding: 0 20px calc(40px + var(--safe-b)); position: relative; overflow: hidden; }
.landing::after { content: ''; position: absolute; inset: 0; pointer-events: none; background-image: radial-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px); background-size: 28px 28px; mask-image: radial-gradient(70% 50% at 50% 30%, #000, transparent 75%); -webkit-mask-image: radial-gradient(70% 50% at 50% 30%, #000, transparent 75%); z-index: 0; }
.lnav, .landing-inner, .features, .footnote { position: relative; z-index: 1; }
.lnav { max-width: 1120px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; padding: 22px 0; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 18px; letter-spacing: -0.03em; color: var(--text); }
.brand .mark { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); }
.brand .mark svg { width: 16px; height: 16px; fill: currentColor; }
.lnav .meta { font-size: 13px; color: var(--muted); display: flex; gap: 18px; font-weight: 500; }
.landing-inner { max-width: 1120px; margin: 0 auto; display: grid; gap: 44px; align-items: center; grid-template-columns: 1fr; padding-top: 28px; }
@media (min-width: 960px) { .landing-inner { grid-template-columns: 1.15fr 0.85fr; gap: 80px; padding-top: 48px; min-height: calc(100vh - 120px); } }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); padding: 6px 12px; border-radius: 999px; background: var(--accent-soft); border: 1px solid var(--accent-line); }
.hero h1 { font-size: clamp(42px, 6.4vw, 76px); line-height: 1.02; margin: 22px 0 20px; font-weight: 800; letter-spacing: -0.045em; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero p { font-size: 17px; color: var(--text-2); max-width: 520px; margin: 0 0 28px; line-height: 1.6; }
.steps { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 40px; }
.step { display: flex; align-items: center; gap: 10px; color: var(--text-2); font-size: 13px; font-weight: 600; padding: 8px 14px 8px 8px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); }
.step b { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; color: var(--accent-ink); background: var(--accent); }
.hero-visual { position: relative; height: 230px; max-width: 540px; }
.hero-visual .felt { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 78%; height: 150px; }
.hero-visual .mini-board { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -32%); display: flex; gap: 5px; --card-w: 38px; }
.hero-visual .mini-pot { position: absolute; left: 50%; top: 27%; transform: translateX(-50%); }
.mini-seat { position: absolute; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.mini-seat .av { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; color: #fff; background: linear-gradient(135deg, #3b4656, #232b36); border: 2px solid var(--surface-3); font-size: 14px; box-shadow: var(--shadow-sm); }
.mini-seat.acting .av { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft), var(--shadow-sm); }
.mini-seat .nameplate { background: var(--surface); border: 1px solid var(--line-2); border-radius: 8px; padding: 3px 10px; text-align: center; line-height: 1.2; box-shadow: var(--shadow-sm); }
.mini-seat .nameplate span { display: block; font-size: 11px; color: var(--text-2); font-weight: 500; }
.mini-seat .nameplate b { display: block; font-size: 12px; font-weight: 700; }
.mini-seat .cards { display: flex; gap: 2px; --card-w: 22px; margin-bottom: -10px; }
.mini-seat.s1 { left: 2%; bottom: 4%; } .mini-seat.s2 { right: 2%; bottom: 4%; } .mini-seat.s3 { left: 50%; top: -6%; transform: translateX(-50%); }
.card-panel { background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-xl); padding: 28px 24px; box-shadow: var(--shadow-lg); position: relative; }
.card-panel .stack { display: flex; flex-direction: column; gap: 18px; }
.card-panel h2 { font-size: 22px; }
.card-panel h2 small { display: block; font-size: 13px; color: var(--muted); font-weight: 500; letter-spacing: 0; margin-top: 4px; }
.features { max-width: 1120px; margin: 72px auto 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; }
.feature { padding: 22px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); }
.feature .ic { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); margin-bottom: 16px; }
.feature .ic svg { width: 18px; height: 18px; }
.feature b { display: block; font-size: 15px; font-weight: 700; margin-bottom: 4px; letter-spacing: -0.01em; }
.feature span { color: var(--muted); font-size: 13px; line-height: 1.55; }
.footnote { color: var(--dim); font-size: 12px; text-align: center; margin-top: 44px; }

/* ═════════════════════════ TABLE ═════════════════════════ */
.table-page { height: 100vh; height: 100dvh; display: grid; grid-template-rows: auto 1fr auto; overflow: hidden; }
.topbar { display: flex; flex-direction: column; gap: 6px; padding: calc(10px + var(--safe-t)) 0 6px; position: relative; z-index: 7; }
.topbar-row { display: flex; align-items: center; gap: 8px; padding: 0 14px; }
.topbar .title { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.topbar .title b { font-weight: 700; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: -0.02em; }
.topbar .title span { font-size: 12px; color: var(--muted); display: flex; gap: 8px; align-items: center; font-weight: 500; }
.topbar .btn.icon { background: var(--surface); }
.topbar .btn.share { background: var(--surface); }
.topbar .btn.share span { display: none; }
@media (min-width: 560px) { .topbar .btn.share span { display: inline; } }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 2px 8px; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--line); font-size: 10.5px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-2); }
.pill.live { color: #5fd69a; border-color: rgba(53, 192, 122, 0.35); background: var(--green-soft); }
.pill.live::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--green); animation: pulse 1.6s infinite; }
.pill.paused { color: var(--accent); border-color: var(--accent-line); background: var(--accent-soft); }
.pill.ended { color: var(--muted); }
@keyframes pulse { 50% { opacity: 0.35; } }
.badge { position: absolute; top: -5px; right: -5px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-size: 11px; font-weight: 700; display: grid; place-items: center; border: 2px solid var(--bg); }
.topbar .btn.icon.oncall { background: var(--green-soft); border-color: rgba(53, 192, 122, 0.4); color: #5fd69a; }
.callbar { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 0 14px; }
.callbar .btn { min-height: 34px; padding: 0 12px; border-radius: 999px; font-size: 13px; gap: 6px; }
.callbar .btn.off { background: var(--red-soft); color: #ff8a87; border-color: rgba(239, 83, 80, 0.3); }
.callbar .btn.hang { background: var(--red); color: #fff; border-color: transparent; }
.callbar .who { font-size: 12px; color: var(--muted); font-weight: 500; }

/* stage & table */
.stage { position: relative; overflow: hidden; }
.felt { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); border-radius: 999px; background: var(--rail); box-shadow: 0 30px 60px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 0 0 1px rgba(0, 0, 0, 0.5); }
.felt::before { content: ''; position: absolute; inset: 14px; border-radius: inherit; background: radial-gradient(60% 55% at 50% 40%, var(--felt), var(--felt-2) 65%, var(--felt-3) 100%); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06), inset 0 8px 24px rgba(0, 0, 0, 0.35), inset 0 0 90px rgba(0, 0, 0, 0.35); }
.felt::after { content: ''; position: absolute; inset: 42px; border-radius: inherit; border: 1px solid rgba(255, 255, 255, 0.06); pointer-events: none; }
.felt .logo { display: none; }
.center { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; gap: 10px; width: max-content; z-index: 2; }
.pot { display: flex; align-items: center; gap: 7px; padding: 5px 12px 5px 7px; border-radius: 999px; background: rgba(6, 10, 14, 0.55); border: 1px solid rgba(255, 255, 255, 0.1); font-size: 12px; color: var(--text-2); font-weight: 600; backdrop-filter: blur(6px); transition: opacity 0.3s; }
.pot b { font-size: 14px; color: var(--text); font-weight: 700; }
.pot .side { font-size: 11px; color: var(--muted); }
.pot.empty { opacity: 0; }
.chip { width: 18px; height: 18px; flex: none; display: inline-grid; place-items: center; }
.chip svg, .chip-svg { width: 100%; height: 100%; display: block; }
.chip.sm { width: 14px; height: 14px; }
.board { display: flex; gap: 6px; min-height: calc(var(--card-w) * 1.4); align-items: center; }
.center .status { font-size: 13px; color: var(--text-2); text-align: center; background: rgba(6, 10, 14, 0.55); padding: 8px 14px; border-radius: 12px; max-width: 280px; border: 1px solid var(--line); backdrop-filter: blur(6px); font-weight: 500; }
.center .status b { color: var(--accent); }
.center .result { font-size: 16px; font-weight: 700; color: var(--text); text-align: center; background: rgba(6, 10, 14, 0.8); padding: 10px 18px; border-radius: 14px; border: 1px solid var(--accent-line); animation: result-in 0.4s var(--ease); max-width: 320px; box-shadow: var(--shadow-md); backdrop-filter: blur(6px); letter-spacing: -0.01em; }
.center .result small { display: block; font-size: 12px; font-weight: 500; color: var(--accent); margin-top: 2px; }
@keyframes result-in { from { transform: scale(0.9); opacity: 0; } }

/* cards */
.card { position: relative; width: var(--card-w); height: calc(var(--card-w) * 1.4); border-radius: calc(var(--card-w) * 0.12); background: #fff; color: #1f2937; flex: none; overflow: hidden; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.12), 0 4px 10px rgba(0, 0, 0, 0.4); font-weight: 800; transform-style: preserve-3d; }
.card .idx { position: absolute; top: 6%; left: 9%; display: flex; flex-direction: column; align-items: center; line-height: 1; gap: calc(var(--card-w) * 0.02); }
.card .idx .r { font-size: calc(var(--card-w) * 0.36); letter-spacing: -0.06em; }
.card .idx svg { width: calc(var(--card-w) * 0.24); height: calc(var(--card-w) * 0.24); fill: currentColor; }
.card .pip { position: absolute; right: 7%; bottom: 6%; width: calc(var(--card-w) * 0.5); height: calc(var(--card-w) * 0.5); }
.card .pip svg { width: 100%; height: 100%; fill: currentColor; }
.card.h, .card.d { color: #e0453a; }
.card.s, .card.c { color: #1f2937; }
.card.back { background: #1d4ed8; background-image: linear-gradient(135deg, #2563eb, #1e3a8a); box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.4), 0 4px 10px rgba(0, 0, 0, 0.4); }
.card.back::before { content: ''; position: absolute; inset: 8%; border-radius: calc(var(--card-w) * 0.07); border: 1.5px solid rgba(255, 255, 255, 0.55); background: repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.12) 0 1.5px, transparent 1.5px 6px), repeating-linear-gradient(-45deg, rgba(255, 255, 255, 0.12) 0 1.5px, transparent 1.5px 6px); }
.card.dealt { animation: deal 0.45s var(--ease) backwards; }
@keyframes deal { from { transform: translate(var(--dx, 0px), var(--dy, -20px)) rotate(-6deg) scale(0.5); opacity: 0; } 60% { opacity: 1; } }
.card.flip { animation: flip 0.4s ease; }
@keyframes flip { 0% { transform: rotateY(90deg); } 100% { transform: rotateY(0); } }
.card.win { box-shadow: 0 0 0 2px var(--accent), 0 0 20px rgba(242, 181, 59, 0.6), 0 4px 10px rgba(0, 0, 0, 0.4); transform: translateY(-3px); }
.card.dull { filter: brightness(0.5) saturate(0.4); }

/* seats */
.seat { position: absolute; width: 0; height: 0; z-index: 3; }
.seat .inner { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; width: 96px; }
.seat .cards { display: flex; gap: 3px; --card-w: 34px; position: relative; z-index: 1; margin-bottom: -14px; min-height: calc(var(--card-w) * 1.4); align-items: flex-end; }
.seat .cards .card:nth-child(1) { transform: rotate(-6deg); }
.seat .cards .card:nth-child(2) { transform: rotate(6deg) translateY(1px); }
.seat.you .inner { width: 200px; }
.seat.you .cards { --card-w: 68px; margin-bottom: -22px; gap: 6px; }
.seat.you .cards .card.win { transform: translateY(-5px); }
.seat .avatar { position: relative; z-index: 2; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 16px; color: #fff; background: linear-gradient(135deg, #3b4656, #232b36); border: 2px solid var(--surface-3); box-shadow: var(--shadow-sm); transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s var(--ease); }
.seat .avatar svg.ring-svg { position: absolute; inset: -6px; width: calc(100% + 12px); height: calc(100% + 12px); transform: rotate(-90deg); pointer-events: none; }
.seat .avatar circle { fill: none; stroke-width: 3; stroke-linecap: round; }
.seat .avatar .track { stroke: transparent; }
.seat .avatar .ring { stroke: var(--accent); }
.seat .avatar .ring.late { stroke: var(--red); }
.seat.acting .avatar { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft), 0 0 24px rgba(242, 181, 59, 0.35); transform: scale(1.06); }
.seat.acting .avatar .track { stroke: rgba(255, 255, 255, 0.1); }
.seat.you .avatar { width: 52px; height: 52px; font-size: 18px; }
.seat .nameplate { position: relative; z-index: 3; margin-top: -8px; background: var(--surface); border: 1px solid var(--line-2); border-radius: 9px; padding: 4px 10px; text-align: center; line-height: 1.2; box-shadow: var(--shadow-sm); min-width: 76px; max-width: 100%; transition: border-color 0.2s; }
.seat.acting .nameplate { border-color: var(--accent-line); }
.seat .name { display: block; font-size: 11px; color: var(--text-2); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.seat .stack { display: block; font-size: 13px; font-weight: 700; color: var(--text); white-space: nowrap; }
.seat.you .nameplate { min-width: 110px; padding: 5px 14px; }
.seat.you .name { font-size: 12px; }
.seat.you .stack { font-size: 15px; }
.seat.folded .avatar, .seat.folded .nameplate, .seat.out .avatar, .seat.out .nameplate { opacity: 0.45; }
.seat.folded .cards { opacity: 0.6; }
.seat .stack.zero { color: var(--muted); }
.seat.winner .avatar { border-color: var(--accent); animation: win-glow 1.2s ease 2; }
.seat.winner .nameplate { border-color: var(--accent-line); }
.seat .tag { position: absolute; top: 100%; margin-top: 4px; left: 50%; transform: translateX(-50%); font-size: 10px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; padding: 3px 8px; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--line-2); color: var(--muted); white-space: nowrap; z-index: 3; }
.seat .tag.allin { color: var(--accent); border-color: var(--accent-line); background: var(--accent-soft); }
.seat .tag.hand { color: var(--text); border-color: var(--accent-line); font-size: 11px; text-transform: none; letter-spacing: 0; font-weight: 600; background: var(--surface); }
.seat .bubble { position: absolute; bottom: 100%; margin-bottom: 4px; left: 50%; transform: translateX(-50%); font-size: 12px; font-weight: 700; padding: 5px 10px; border-radius: 8px; background: var(--text); color: var(--bg); white-space: nowrap; animation: bubble 1.8s ease forwards; z-index: 5; box-shadow: var(--shadow-sm); }
.seat .bubble.raise, .seat .bubble.bet { background: var(--accent); color: var(--accent-ink); }
.seat .bubble.fold { background: var(--surface-3); color: var(--text-2); }
.seat .bubble.chat { font-weight: 500; white-space: normal; max-width: 180px; text-align: center; border-radius: 12px; padding: 7px 11px; animation: chat-bubble 4.5s ease forwards; }
@keyframes bubble { 0% { opacity: 0; transform: translate(-50%, 6px); } 12% { opacity: 1; transform: translate(-50%, 0); } 80% { opacity: 1; } 100% { opacity: 0; } }
@keyframes chat-bubble { 0% { opacity: 0; transform: translate(-50%, 6px); } 6% { opacity: 1; transform: translate(-50%, 0); } 88% { opacity: 1; } 100% { opacity: 0; } }
.seat.empty .inner { width: auto; }
.seat .empty-seat { width: 34px; height: 34px; border-radius: 50%; border: 1px dashed var(--line-3); color: var(--muted); display: grid; place-items: center; transition: all 0.15s; background: rgba(6, 10, 14, 0.3); }
.seat .empty-seat svg { width: 14px; height: 14px; }
.seat .empty-seat:hover { border-style: solid; border-color: var(--accent); color: var(--accent); background: var(--accent-soft); transform: scale(1.1); }
.seat.empty.static .empty-seat { opacity: 0.25; pointer-events: none; }
.seat .offline { position: absolute; right: -1px; top: -1px; width: 10px; height: 10px; border-radius: 50%; background: var(--red); border: 2px solid var(--surface); z-index: 3; }
.seat .host { position: absolute; left: -4px; top: -4px; width: 16px; height: 16px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; z-index: 3; border: 2px solid var(--surface); }
.seat .host svg { width: 8px; height: 8px; fill: currentColor; }
.seat .avatar video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 50%; background: transparent; }
.seat .avatar.mirror video { transform: scaleX(-1); }
.seat.video .avatar { width: 66px; height: 66px; }
.seat.you.video .avatar { width: 80px; height: 80px; }
.seat .avatar .mic { position: absolute; right: -4px; bottom: -4px; width: 18px; height: 18px; border-radius: 50%; background: var(--surface-2); border: 2px solid var(--surface); display: grid; place-items: center; z-index: 3; color: var(--text-2); }
.seat .avatar .mic svg { width: 9px; height: 9px; }
.seat .avatar .mic.muted { background: var(--red); color: #fff; }
.seat.speaking .avatar { border-color: var(--green); box-shadow: 0 0 0 4px var(--green-soft); }
.bet { position: absolute; z-index: 2; transform: translate(-50%, -50%); display: flex; align-items: center; gap: 5px; padding: 3px 9px 3px 4px; border-radius: 999px; background: rgba(6, 10, 14, 0.6); border: 1px solid rgba(255, 255, 255, 0.1); font-weight: 700; font-size: 12px; color: var(--text); animation: bet-in 0.3s var(--ease); white-space: nowrap; backdrop-filter: blur(4px); }
@keyframes bet-in { from { transform: translate(-50%, -50%) scale(0.5); opacity: 0; } }
.dealer { position: absolute; z-index: 4; transform: translate(-50%, -50%); width: 20px; height: 20px; border-radius: 50%; background: #fff; color: #111; font-weight: 800; font-size: 11px; display: grid; place-items: center; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5); transition: left 0.5s var(--ease), top 0.5s var(--ease); }
.fly { position: absolute; z-index: 6; pointer-events: none; transform: translate(-50%, -50%); }

/* dock */
.dock { padding: 6px 14px calc(12px + var(--safe-b)); display: flex; justify-content: center; position: relative; z-index: 6; }
.dock-inner { width: 100%; max-width: 620px; display: flex; flex-direction: column; gap: 8px; position: relative; }
.actions { display: grid; grid-template-columns: 1fr 1.15fr 1.15fr; gap: 8px; }
.actions .btn { min-height: 56px; border-radius: 14px; flex-direction: column; gap: 1px; line-height: 1.1; font-size: 15px; min-width: 0; padding: 0 6px; background: var(--surface); }
.actions .btn small { font-size: 12px; font-weight: 600; opacity: 0.65; }
.actions .btn.fold { color: #ff8a87; }
.actions .btn.fold:hover:not(:disabled) { background: var(--red-soft); border-color: rgba(239, 83, 80, 0.35); }
.actions .btn.call { background: var(--surface-3); border-color: var(--line-3); }
.actions .btn.raise { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.actions .btn.raise:hover:not(:disabled) { background: #f7c258; }
.actions.pre .btn { min-height: 46px; font-size: 13px; }
.actions.pre .btn.on { border-color: var(--accent-line); color: var(--accent); background: var(--accent-soft); }
.raise-panel { position: absolute; left: 0; right: 0; bottom: calc(100% + 8px); z-index: 8; background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-lg); padding: 12px; display: flex; flex-direction: column; gap: 10px; animation: sheet-in 0.22s var(--ease); box-shadow: var(--shadow-lg); }
.raise-panel .quick { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.raise-panel .quick .btn { min-height: 34px; padding: 0 4px; font-size: 12px; border-radius: 8px; }
.raise-panel .amount-row { display: flex; align-items: center; gap: 8px; }
.raise-panel .amount-row .input { flex: 1; text-align: center; }
.raise-panel .stepper { width: 44px; min-height: 44px; padding: 0; border-radius: 10px; font-size: 18px; }
input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 28px; background: transparent; margin: 0; }
input[type=range]::-webkit-slider-runnable-track { height: 6px; border-radius: 3px; background: linear-gradient(90deg, var(--accent) var(--pct, 0%), var(--surface-3) var(--pct, 0%)); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 24px; height: 24px; border-radius: 50%; background: #fff; margin-top: -9px; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5); border: 0; }
input[type=range]::-moz-range-track { height: 6px; border-radius: 3px; background: var(--surface-3); }
input[type=range]::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 0; }
.dock .hint { text-align: center; color: var(--muted); font-size: 13px; padding: 4px; font-weight: 500; }
.dock .hint b { color: var(--text); }
.dock .cta { display: flex; gap: 10px; }
.dock .cta .btn { flex: 1; }

/* banners */
.banner { position: absolute; top: 8px; left: 50%; transform: translateX(-50%); z-index: 6; width: min(94%, 440px); display: flex; flex-direction: column; gap: 6px; }
.request { display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--accent-line); border-radius: var(--r-md); padding: 8px 8px 8px 14px; box-shadow: var(--shadow-md); animation: toast-in 0.25s ease; font-size: 13px; }
.request .grow b { color: var(--accent); }

/* drawer */
.drawer-back { position: fixed; inset: 0; z-index: 70; background: rgba(4, 6, 9, 0.55); animation: fade-in 0.2s; }
.drawer { position: fixed; z-index: 71; background: var(--surface); border: 1px solid var(--line-2); box-shadow: var(--shadow-lg); display: flex; flex-direction: column; overflow: hidden; }
.drawer .head { display: flex; align-items: center; gap: 8px; padding: 16px 18px 10px; }
.drawer .head h3 { flex: 1; font-size: 18px; }
.drawer .body { overflow: auto; padding: 14px 18px calc(16px + var(--safe-b)); flex: 1; }
.drawer .tabs { display: flex; gap: 4px; padding: 0 14px; border-bottom: 1px solid var(--line); }
.drawer .tabs .btn { flex: 1; min-height: 38px; border-radius: 0; font-size: 13px; background: transparent; border: 0; border-bottom: 2px solid transparent; color: var(--muted); margin-bottom: -1px; }
.drawer .tabs .btn.on { color: var(--text); border-bottom-color: var(--accent); }
@media (max-width: 719px) { .drawer { left: 0; right: 0; bottom: 0; max-height: 84vh; border-radius: var(--r-xl) var(--r-xl) 0 0; animation: sheet-in 0.3s var(--ease); } }
@media (min-width: 720px) { .drawer { top: 12px; right: 12px; bottom: 12px; width: 380px; border-radius: var(--r-lg); animation: slide-in 0.28s var(--ease); } }
@keyframes slide-in { from { transform: translateX(30px); opacity: 0; } }
.ledger { width: 100%; border-collapse: collapse; font-size: 13px; }
.ledger th { text-align: right; font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); padding: 6px 4px; border-bottom: 1px solid var(--line-2); font-weight: 700; }
.ledger th:first-child, .ledger td:first-child { text-align: left; }
.ledger td { padding: 10px 4px; text-align: right; border-bottom: 1px solid var(--line); font-weight: 700; font-size: 14px; }
.ledger td:first-child { font-weight: 600; font-size: 13px; }
.ledger td .sub { display: block; font-weight: 400; font-size: 11px; color: var(--muted); }
.settle { display: flex; flex-direction: column; gap: 8px; }
.settle .t { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-sm); font-weight: 500; }
.settle .t .arrow { color: var(--muted); }
.settle .t b { margin-left: auto; color: var(--accent); font-size: 15px; }
.log { display: flex; flex-direction: column; gap: 2px; font-size: 13px; }
.log .h { margin: 12px 0 4px; color: var(--accent); font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; }
.log .l { color: var(--text-2); padding: 4px 0; border-bottom: 1px solid var(--line); }
.log .l.win { color: var(--text); font-weight: 600; }
.history .item { padding: 10px 0; border-bottom: 1px solid var(--line); display: flex; gap: 10px; align-items: center; }
.history .item .n { color: var(--muted); font-size: 12px; width: 34px; flex: none; font-weight: 600; }
.history .item .b { display: flex; gap: 3px; --card-w: 24px; }
.history .item .w { flex: 1; font-size: 13px; min-width: 0; }
.history .item .w b { color: var(--accent); }
.menu-list { display: flex; flex-direction: column; }
.menu-list .btn { justify-content: flex-start; border-radius: 10px; border-color: transparent; background: transparent; min-height: 46px; font-weight: 500; gap: 12px; padding: 0 10px; }
.menu-list .btn:hover:not(:disabled) { background: var(--surface-2); }
.menu-list .btn .ic { width: 20px; display: grid; place-items: center; color: var(--muted); }
.menu-list .btn.danger { color: #ff8a87; }
.menu-list .btn.danger .ic { color: #ff8a87; }
.share-link { display: flex; gap: 8px; align-items: center; background: var(--bg-2); border: 1px solid var(--line-2); border-radius: var(--r-sm); padding: 6px 6px 6px 12px; }
.share-link code { flex: 1; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.code-big { font-size: 40px; font-weight: 800; letter-spacing: 0.18em; text-align: center; color: var(--text); margin: 6px 0 4px; }

/* chat */
.chat-pane { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.chat-list { flex: 1; overflow: auto; display: flex; flex-direction: column; gap: 10px; padding-bottom: 10px; min-height: 200px; }
.chat-msg { display: flex; flex-direction: column; gap: 3px; max-width: 88%; }
.chat-msg .meta { font-size: 11px; color: var(--muted); display: flex; gap: 6px; }
.chat-msg .meta b { color: var(--text-2); }
.chat-msg .txt { background: var(--surface-2); border: 1px solid var(--line); border-radius: 4px 14px 14px 14px; padding: 8px 12px; font-size: 14px; overflow-wrap: anywhere; }
.chat-msg.me { align-self: flex-end; align-items: flex-end; }
.chat-msg.me .txt { background: var(--accent-soft); border-color: var(--accent-line); border-radius: 14px 4px 14px 14px; }
.chat-form { display: flex; gap: 8px; padding-top: 10px; border-top: 1px solid var(--line); position: sticky; bottom: 0; background: var(--surface); }
.chat-form .input { min-height: 42px; }
.chat-form .btn { min-height: 42px; }
.chat-empty { color: var(--muted); text-align: center; padding: 30px 10px; font-size: 13px; }
.quick-emoji { display: flex; gap: 6px; padding-top: 8px; }
.quick-emoji .btn { min-height: 32px; padding: 0 10px; border-radius: 999px; font-size: 15px; }

/* motion */
.fade { animation: fade-in 0.3s ease; }
.shake { animation: shake 0.4s ease; }
@keyframes shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
@keyframes win-glow { 50% { box-shadow: 0 0 0 4px var(--accent-soft), 0 0 30px rgba(242, 181, 59, 0.7); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; } }

/* responsive */
@media (max-width: 599px) {
  .lnav .meta { display: none; }
  .lnav { padding: 16px 0; }
  .steps { gap: 8px; margin-bottom: 28px; }
  .mini-seat .cards { display: none; }
  .seat .inner { width: 84px; }
  .seat .cards { --card-w: 30px; }
  .seat .avatar { width: 40px; height: 40px; font-size: 14px; }
  .seat .nameplate { min-width: 64px; padding: 3px 8px; }
  .seat.you .cards { --card-w: 56px; }
  .seat.you .inner { width: 170px; }
  .felt::after { inset: 32px; }
  .seat.empty.static .empty-seat { opacity: 0.15; }
}
@media (max-height: 520px) { :root { --card-w: 40px; } .seat .avatar { width: 38px; height: 38px; } .topbar { padding-top: 4px; padding-bottom: 2px; } .actions .btn { min-height: 44px; } }
@media (min-width: 900px) { :root { --card-w: 60px; } .seat .cards { --card-w: 40px; } .seat.you .cards { --card-w: 76px; } .seat .inner { width: 110px; } .seat .nameplate { min-width: 88px; } }
@media (max-width: 359px) { .actions { gap: 6px; } .actions .btn { font-size: 13px; min-height: 50px; } .actions .btn small { font-size: 11px; } .topbar-row { gap: 6px; } .topbar .btn.icon { width: 34px; min-height: 34px; } }

/* polish */
.mini-seat { gap: 0; }
.mini-seat .nameplate { margin-top: -6px; position: relative; z-index: 2; }
.mini-seat .av { position: relative; z-index: 1; }
.seat.you .cards { margin-bottom: -14px; }
.hero-visual .felt { width: 84%; height: 160px; }

/* amounts with chip icon */
.amt { display: inline-flex; align-items: center; gap: 4px; }
.amt .chip-svg { width: 0.95em; height: 0.95em; flex: none; }
.input-wrap .prefix .chip-svg { width: 16px; height: 16px; display: block; }
.input-wrap .prefix { display: grid; place-items: center; }
.actions .btn small .amt .chip-svg { width: 11px; height: 11px; }
.field input[type=range] { margin-top: 2px; }
.topbar .btn.icon.on { border-color: var(--accent-line); color: var(--accent); background: var(--accent-soft); }

/* persistent chat panel */
.table-page { grid-template-columns: 1fr; grid-template-rows: 1fr; }
.table-main { display: grid; grid-template-rows: auto 1fr auto; min-height: 0; height: 100%; }
.chatside { display: none; flex-direction: column; background: var(--surface); border-left: 1px solid var(--line-2); min-height: 0; }
.chatside-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px 10px 16px; border-bottom: 1px solid var(--line); font-size: 14px; }
.chatside-head .btn.icon.sm { width: 30px; min-height: 30px; }
.chatside-body { flex: 1; min-height: 0; display: flex; flex-direction: column; padding: 12px 14px calc(12px + var(--safe-b)); overflow: hidden; }
.chatside-body .chat-pane { flex: 1; min-height: 0; }
.chatside-body .chat-list { min-height: 0; }
.chatside-body .chat-form { background: var(--surface); }
.chatside-back { position: fixed; inset: 0; z-index: 60; background: rgba(4, 6, 9, 0.55); animation: fade-in 0.2s; }
@media (min-width: 1000px) {
  body.chat-open .table-page { grid-template-columns: 1fr 340px; }
  body.chat-open .chatside { display: flex; }
}
@media (max-width: 999px) {
  body.chat-open .chatside { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 61; height: 70vh; border-radius: var(--r-xl) var(--r-xl) 0 0; border: 1px solid var(--line-2); box-shadow: var(--shadow-lg); animation: sheet-in 0.3s var(--ease); }
}
