/* Zifor Poker — UI */
:root {
  --bg: #0a0d10;
  --panel: #11161b;
  --panel-2: #161d24;
  --line: #222b34;
  --line-2: #2c3742;
  --text: #e7eaee;
  --muted: #8b97a4;
  --dim: #5c6773;
  --green: #16a34a;
  --green-2: #22c55e;
  --gold: #fbbf24;
  --red: #dc2626;
  --amber: #f59e0b;
  --radius: 14px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  min-height: 100vh;
  background: radial-gradient(1400px 700px at 50% 30%, #12202a 0%, var(--bg) 65%) fixed, var(--bg);
  color: var(--text);
  font: 14px/1.45 var(--font);
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: tabular-nums;
}
[hidden] { display: none !important; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 700; letter-spacing: -.01em; }
.muted { color: var(--muted); }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--green); color: #fff; padding: 8px 12px; border-radius: 8px; }
.skip-link:focus { left: 8px; }
main { outline: none; }
:focus-visible { outline: 2px solid var(--green-2); outline-offset: 2px; }

/* ---------- buttons & forms ---------- */
.btn, .button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 16px; border-radius: 9px; border: 1px solid transparent;
  font: 600 14px/1 var(--font); color: var(--text); background: var(--panel-2);
  cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background .15s, border-color .15s, opacity .15s, transform .05s;
}
.btn:active:not(:disabled), .button:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled, .button:disabled { opacity: .45; cursor: not-allowed; }
.btn-primary { background: var(--green); color: #fff; }
.btn-primary:hover:not(:disabled) { background: #15803d; }
.btn-secondary, .button { background: var(--panel-2); border-color: var(--line-2); }
.btn-secondary:hover:not(:disabled), .button:hover:not(:disabled) { background: #1d262f; }
.btn-ghost { background: transparent; border-color: var(--line-2); color: var(--muted); }
.btn-ghost:hover:not(:disabled) { color: var(--text); border-color: #3a4652; }
.btn-sm, .button.small { height: 32px; padding: 0 12px; font-size: 13px; border-radius: 8px; }
.btn-lg { height: 46px; font-size: 15px; }
.btn-block { width: 100%; }
.icon-btn { width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--line-2); background: transparent; color: var(--muted); font-size: 20px; line-height: 1; cursor: pointer; }
.icon-btn:hover { color: var(--text); }

.form { display: grid; gap: 14px; }
.field { display: grid; gap: 6px; min-width: 0; }
.field > span, #modal-fields label { font-size: 12px; font-weight: 600; color: var(--muted); }
.field em { font-style: normal; color: var(--dim); font-weight: 500; }
.field-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.field-row.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
input, select {
  width: 100%; height: 40px; padding: 0 12px; border-radius: 9px;
  border: 1px solid var(--line-2); background: #0c1116; color: var(--text);
  font: 500 14px var(--font); font-variant-numeric: tabular-nums;
}
input:focus, select:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(22, 163, 74, .2); }
input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--green); }
input[type=range] { height: 24px; padding: 0; border: 0; background: none; accent-color: var(--amber); }
#modal-fields label { display: grid; gap: 6px; }
.check { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; cursor: pointer; user-select: none; }
.form-error { margin: 0; color: #fca5a5; font-size: 13px; }

.status { font-size: 12px; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--dim); }
.status.online::before, .status.connected::before { background: var(--green-2); box-shadow: 0 0 8px var(--green-2); }
.status.offline::before { background: var(--red); }
.pill { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 20px; padding: 0 7px; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--line-2); color: var(--muted); font-size: 12px; font-weight: 600; vertical-align: 2px; }

.chip-icon { display: inline-block; width: 16px; height: 16px; border-radius: 50%; flex: none;
  background: radial-gradient(circle, var(--gold) 0 38%, #b45309 39% 46%, var(--gold) 47%);
  box-shadow: 0 0 0 2px rgba(0,0,0,.35); }
.chip-icon.lg { width: 22px; height: 22px; }

.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px; }
.panel-head h2 { font-size: 16px; }

/* ---------- top bar ---------- */
.topbar { height: 58px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 20px; border-bottom: 1px solid var(--line); background: rgba(10, 13, 16, .85); backdrop-filter: blur(8px); position: sticky; top: 0; z-index: 20; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-logo { width: 30px; height: 30px; }
.brand-word { font-weight: 800; letter-spacing: .08em; font-size: 15px; }
.brand-word b { font-weight: 800; color: var(--green-2); margin-left: 4px; }
.account { display: flex; align-items: center; gap: 12px; min-width: 0; }
.wallet { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--line-2); font-weight: 700; }
.account-name { color: var(--muted); font-weight: 600; max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- loading ---------- */
.loading-view { min-height: calc(100vh - 58px); display: grid; place-content: center; justify-items: center; gap: 14px; }
.spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--line-2); border-top-color: var(--green-2); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- auth ---------- */
.auth-screen { min-height: calc(100vh - 58px); display: grid; place-items: center; padding: 32px 16px; position: relative; overflow: hidden; }
.auth-screen::before { content: ""; position: absolute; width: 900px; height: 460px; left: 50%; top: 50%; transform: translate(-50%, -50%); border-radius: 50%;
  background: radial-gradient(ellipse, rgba(22, 163, 74, .22), transparent 65%); pointer-events: none; }
.auth-card { position: relative; width: min(380px, 100%); padding: 28px; border-radius: 18px; background: rgba(17, 22, 27, .92); border: 1px solid var(--line); box-shadow: 0 30px 80px rgba(0, 0, 0, .45); display: grid; gap: 20px; }
.auth-head { text-align: center; display: grid; justify-items: center; gap: 6px; }
.auth-logo { width: 52px; height: 52px; margin-bottom: 6px; }
.auth-head h1 { font-size: 22px; }
.auth-head p { margin: 0; font-size: 13px; }
.segmented { display: grid; grid-template-columns: 1fr 1fr; padding: 4px; background: #0c1116; border: 1px solid var(--line); border-radius: 10px; }
.segmented button { height: 34px; border: 0; border-radius: 7px; background: transparent; color: var(--muted); font: 600 13px var(--font); cursor: pointer; }
.segmented button[aria-selected=true] { background: var(--panel-2); color: var(--text); box-shadow: 0 1px 0 rgba(255,255,255,.04), 0 2px 6px rgba(0,0,0,.3); }

/* ---------- lobby ---------- */
.lobby { max-width: 1180px; margin: 0 auto; padding: 24px 20px 40px; display: grid; gap: 20px; }
.lobby-grid { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 20px; align-items: start; }
.tables-card { overflow: hidden; }
.lobby-cols, .lobby-row { display: grid; grid-template-columns: minmax(0, 2.2fr) 1fr 1.1fr 1.2fr 150px; align-items: center; gap: 12px; padding: 0 18px; }
.lobby-cols { height: 34px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--dim); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: #0e1318; }
.lobby-row { min-height: 62px; border-bottom: 1px solid var(--line); transition: background .12s; }
.lobby-row:hover { background: #141b21; }
.lobby-row:last-child { border-bottom: 0; }
.lobby-name { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-width: 0; padding: 10px 0; }
.lobby-name .lock, .lobby-name .my-seat-label { align-self: flex-start; }
.table-title { font-weight: 700; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.lock, .my-seat-label { font-size: 11px; font-weight: 600; padding: 2px 7px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--muted); }
.my-seat-label { color: var(--green-2); border-color: rgba(34, 197, 94, .35); }
.lobby-cell { font-weight: 600; display: flex; align-items: center; gap: 10px; }
.seat-fill { position: relative; width: 56px; height: 5px; border-radius: 99px; background: var(--line-2); overflow: hidden; }
.seat-fill::after { content: ""; position: absolute; inset: 0 auto 0 0; width: calc(var(--fill, 0) * 100%); background: var(--green-2); border-radius: 99px; }
.table-row-actions { display: flex; gap: 8px; justify-content: flex-end; }
.empty { margin: 0; padding: 48px 18px; text-align: center; color: var(--muted); }

.lobby-side { display: grid; gap: 20px; }
.balance-card { padding: 18px; display: grid; gap: 10px; }
.balance-card .label { font-size: 12px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.balance-row { display: flex; align-items: center; gap: 10px; }
.balance-value { font-size: 28px; font-weight: 800; letter-spacing: -.02em; }
.balance-card .btn { justify-self: start; }
.create-card { padding: 18px; display: grid; gap: 14px; }
.create-card h2 { font-size: 16px; }

.admin-card > summary { padding: 16px 18px; cursor: pointer; font-weight: 700; list-style: none; display: flex; align-items: center; justify-content: space-between; }
.admin-card > summary::after { content: "›"; color: var(--muted); font-size: 20px; transition: transform .15s; }
.admin-card[open] > summary::after { transform: rotate(90deg); }
.admin-body { padding: 0 18px 18px; display: grid; gap: 14px; }
.inline-form { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.invite-result { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.invite-result output { font: 700 16px ui-monospace, "Cascadia Mono", Consolas, monospace; padding: 8px 12px; border-radius: 8px; background: #0c1116; border: 1px dashed var(--line-2); letter-spacing: .05em; user-select: all; }
.admin-users-head { display: flex; align-items: center; justify-content: space-between; }
.admin-users-head h3 { font-size: 14px; }
.table-scroll { overflow-x: auto; }
.users-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.users-table th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--dim); font-weight: 700; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.users-table td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.user-admin { margin-left: 8px; font-size: 11px; color: var(--gold); }
.credit-form { display: flex; gap: 8px; }
.credit-form input { height: 32px; width: 110px; }

/* ---------- table view ---------- */
.table-view { padding: 12px 20px 24px; max-width: 1500px; margin: 0 auto; }
.table-bar { display: flex; align-items: center; gap: 16px; margin-bottom: 10px; }
.back { text-decoration: none; color: var(--muted); font-weight: 600; padding: 6px 10px; border-radius: 8px; border: 1px solid var(--line-2); }
.back:hover { color: var(--text); }
.table-title { display: flex; align-items: baseline; gap: 12px; min-width: 0; flex: 1; }
.table-title h1 { font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.table-title .muted { font-size: 13px; white-space: nowrap; }

.game { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; align-items: start; }
.game-main { min-width: 0; display: grid; gap: 12px; }

.stage { position: relative; width: 100%; aspect-ratio: 16 / 9.4; max-height: calc(100vh - 250px); min-height: 380px; margin: 0 auto; }
.rail { position: absolute; inset: 9% 7.5%; border-radius: 999px; padding: clamp(10px, 1.5vw, 18px);
  background: linear-gradient(180deg, #3b2b20 0%, #2a1d15 45%, #170f0a 100%);
  box-shadow: 0 40px 90px rgba(0, 0, 0, .65), 0 0 0 1px #0b0806, inset 0 2px 1px rgba(255, 255, 255, .1), inset 0 -4px 8px rgba(0, 0, 0, .6); }
.felt { position: relative; width: 100%; height: 100%; border-radius: 999px; overflow: hidden;
  background: radial-gradient(ellipse at 50% 42%, #1f8552 0%, #15693f 42%, #0d4d2d 78%, #0a3d24 100%);
  box-shadow: inset 0 0 70px rgba(0, 0, 0, .55), inset 0 0 0 2px rgba(0, 0, 0, .35); }
.felt::after { content: ""; position: absolute; inset: 6%; border-radius: 999px; border: 2px solid rgba(255, 255, 255, .055); }
.felt-logo { position: absolute; left: 50%; top: 70%; transform: translateX(-50%); font-weight: 900; letter-spacing: .45em; font-size: clamp(16px, 2.2vw, 30px); color: rgba(255, 255, 255, .07); padding-left: .45em; }

.center { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: grid; justify-items: center; gap: 8px; z-index: 2; }
.street { font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: rgba(255, 255, 255, .45); min-height: 14px; }
.board { display: flex; gap: 6px; --cw: clamp(40px, 4.6vw, 64px); }
.pot-wrap { display: inline-flex; align-items: center; gap: 8px; height: 30px; padding: 0 14px; border-radius: 999px; background: rgba(0, 0, 0, .38); border: 1px solid rgba(255, 255, 255, .06); font-size: 15px; }
.stage:not(.has-pot) .pot-wrap { visibility: hidden; }
.pot { font-weight: 800; }
.hand-no { font-size: 11px; color: rgba(255, 255, 255, .3); }

/* ---------- cards ---------- */
.card { --cw: inherit; position: relative; flex: none; width: var(--cw, 48px); height: calc(var(--cw, 48px) * 1.4); border-radius: calc(var(--cw, 48px) * .1);
  background: linear-gradient(180deg, #ffffff, #eef0f2); color: #16181b; box-shadow: 0 2px 0 rgba(0, 0, 0, .15), 0 6px 14px rgba(0, 0, 0, .35); overflow: hidden; }
.card.red { color: #d0202f; }
.card-rank { position: absolute; left: 9%; top: 5%; font-weight: 800; font-size: calc(var(--cw, 48px) * .44); line-height: 1; letter-spacing: -.06em; }
.card-suit { position: absolute; right: 7%; bottom: 3%; font-size: calc(var(--cw, 48px) * .62); line-height: 1; }
.card-corner { display: none; }
.card.back { background: #1e3a8a; border: 2px solid #f3f4f6;
  background-image: repeating-linear-gradient(45deg, rgba(255, 255, 255, .13) 0 2px, transparent 2px 7px), repeating-linear-gradient(-45deg, rgba(255, 255, 255, .13) 0 2px, transparent 2px 7px); }
.card.placeholder { background: rgba(0, 0, 0, .12); border: 1px dashed rgba(255, 255, 255, .14); box-shadow: none; }
.board .card:not(.placeholder) { animation: deal .25s ease-out both; }
@keyframes deal { from { transform: translateY(-8px) scale(.94); opacity: 0; } }

/* ---------- seats ---------- */
.seat-layer, .bet-layer { position: absolute; inset: 0; pointer-events: none; }
.seat { position: absolute; transform: translate(-50%, -50%); pointer-events: auto; z-index: 3; }
.pod { position: relative; display: grid; justify-items: center; width: 132px; }
.seat-cards { position: absolute; bottom: calc(100% - 30px); left: 50%; transform: translateX(-50%); display: flex; z-index: 0; --cw: 44px; }
.seat-cards .card:first-child { transform: rotate(-7deg) translateX(5px); }
.seat-cards .card:last-child { transform: rotate(7deg) translateX(-5px); }
.seat.me .seat-cards { --cw: 58px; bottom: calc(100% - 22px); }
.avatar { position: relative; z-index: 1; width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(circle at 35% 30%, hsl(var(--hue, 200) 55% 52%), hsl(var(--hue, 200) 50% 28%)); border: 3px solid #0b0f13; box-shadow: 0 6px 16px rgba(0, 0, 0, .5); }
.avatar-letter { font-weight: 800; font-size: 26px; color: rgba(255, 255, 255, .92); text-shadow: 0 1px 2px rgba(0, 0, 0, .4); }
.turn-ring { position: absolute; inset: -7px; border-radius: 50%; display: none;
  background: conic-gradient(var(--ring, var(--green-2)) calc(var(--t, 1) * 360deg), rgba(255, 255, 255, .08) 0);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 3.5px)); mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 3.5px)); }
.seat.acting .turn-ring { display: block; }
.seat.urgent { --ring: var(--red); }
.plate { position: relative; z-index: 2; margin-top: -12px; min-width: 112px; max-width: 132px; padding: 5px 12px 6px; border-radius: 10px; text-align: center;
  background: rgba(9, 12, 15, .94); border: 1px solid rgba(255, 255, 255, .08); box-shadow: 0 6px 16px rgba(0, 0, 0, .45); }
.seat-name { font-size: 12px; font-weight: 600; color: #c9d1d9; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.seat-stack { font-size: 14px; font-weight: 800; color: var(--gold); }
.seat.me .plate { border-color: rgba(34, 197, 94, .35); }
.seat.acting .plate { border-color: var(--green-2); box-shadow: 0 0 0 1px var(--green-2), 0 0 22px rgba(34, 197, 94, .35); }
.seat.urgent .plate { border-color: var(--red); box-shadow: 0 0 0 1px var(--red), 0 0 22px rgba(220, 38, 38, .35); }
.seat.winner .plate { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold), 0 0 26px rgba(251, 191, 36, .45); animation: win 1.2s ease-in-out infinite alternate; }
@keyframes win { to { box-shadow: 0 0 0 1px var(--gold), 0 0 40px rgba(251, 191, 36, .7); } }
.seat.folded .avatar, .seat.folded .plate { opacity: .45; filter: saturate(.4); }
.dealer { position: absolute; z-index: 3; top: 4px; right: 18px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center;
  background: #f8fafc; color: #111; font-size: 11px; font-weight: 900; box-shadow: 0 2px 6px rgba(0, 0, 0, .5), inset 0 -2px 0 #cbd5e1; }
.seat-action { position: absolute; z-index: 3; top: calc(100% + 4px); left: 50%; transform: translateX(-50%); font-size: 10px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
  padding: 2px 8px; border-radius: 999px; background: rgba(0, 0, 0, .55); color: #e5e7eb; white-space: nowrap; }
.seat-action:empty { display: none; }
.seat.all-in .seat-action { background: var(--red); color: #fff; }
.seat-badges { position: absolute; z-index: 3; top: -4px; left: 14px; display: flex; gap: 4px; }
.seat-badge { font-size: 10px; font-weight: 700; padding: 1px 6px; border-radius: 999px; background: #374151; color: #e5e7eb; }

.empty-seat { width: 64px; height: 64px; border-radius: 50%; border: 2px dashed rgba(255, 255, 255, .22); background: rgba(0, 0, 0, .28); color: rgba(255, 255, 255, .7);
  font: 700 11px var(--font); cursor: pointer; transition: border-color .15s, color .15s, background .15s; }
.empty-seat:hover:not(:disabled) { border-color: var(--green-2); color: #fff; background: rgba(22, 163, 74, .25); }
.empty-seat:disabled { cursor: default; opacity: .5; border-style: dashed; border-color: rgba(255, 255, 255, .16); background: rgba(0, 0, 0, .2); }
.empty-seat:disabled span { display: none; }

.bet-chip { position: absolute; transform: translate(-50%, -50%); display: inline-flex; align-items: center; gap: 6px; z-index: 2; }
.chip-stack { position: relative; width: 18px; height: 22px; }
.chip-stack i { position: absolute; left: 0; width: 18px; height: 18px; border-radius: 50%; background: #dc2626; border: 2px dashed rgba(255, 255, 255, .85); box-shadow: 0 2px 0 #7f1d1d; }
.chip-stack i:nth-child(1) { bottom: 0; }
.chip-stack i:nth-child(2) { bottom: 3px; background: #2563eb; box-shadow: 0 2px 0 #1e3a8a; }
.chip-stack i:nth-child(3) { bottom: 6px; }
.bet-amount { font-weight: 800; font-size: 13px; padding: 2px 8px; border-radius: 999px; background: rgba(0, 0, 0, .5); }

.results { position: absolute; left: 50%; top: 73%; transform: translateX(-50%); z-index: 4; display: grid; gap: 4px; justify-items: center; pointer-events: none; }
.results p { margin: 0; padding: 6px 14px; border-radius: 999px; background: rgba(0, 0, 0, .72); border: 1px solid rgba(251, 191, 36, .45); font-size: 13px; white-space: nowrap; animation: deal .3s ease-out both; }
.results strong { color: var(--gold); }

/* ---------- dock & actions ---------- */
.dock { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; min-height: 64px; }
.dock-left { display: grid; gap: 10px; min-width: 0; }
.notice { margin: 0; color: var(--muted); font-size: 13px; }
.seat-controls { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.actions { width: min(520px, 100%); margin-left: auto; padding: 12px; border-radius: var(--radius); background: rgba(14, 18, 23, .96); border: 1px solid var(--line-2); box-shadow: 0 20px 50px rgba(0, 0, 0, .45); display: grid; gap: 10px; }
.raise { display: grid; gap: 8px; }
.presets { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.btn-preset { height: 30px; border-radius: 7px; border: 1px solid var(--line-2); background: #0c1116; color: #cbd5e1; font: 600 12px var(--font); cursor: pointer; }
.btn-preset:hover:not(:disabled) { border-color: var(--amber); color: #fff; }
.btn-preset:disabled { opacity: .4; }
.raise-line { display: grid; grid-template-columns: 1fr 104px; gap: 10px; align-items: center; }
.raise-input { height: 36px; text-align: center; font-weight: 700; }
.action-buttons { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.actions:has(#raise-controls[hidden]) .action-buttons { grid-template-columns: repeat(2, 1fr); }
.actions:has(#raise-controls[hidden]) #raise-submit { display: none; }
.btn-act { display: flex; align-items: center; justify-content: center; height: 54px; border-radius: 10px; border: 0; color: #fff; font: 800 15px var(--font); cursor: pointer; letter-spacing: .01em; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18), 0 4px 12px rgba(0, 0, 0, .35); transition: filter .12s, transform .05s; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 8px; }
.btn-act:hover:not(:disabled) { filter: brightness(1.1); }
.btn-act:active:not(:disabled) { transform: translateY(1px); }
.btn-act:disabled { opacity: .45; cursor: not-allowed; }
.btn-act.fold { background: linear-gradient(180deg, #c2343a, #8f1d22); }
.btn-act.call { background: linear-gradient(180deg, #1fa353, #13703a); }
.btn-act.raise { background: linear-gradient(180deg, #f5a524, #c0700c); color: #1c1003; }

/* ---------- side panel ---------- */
.side { position: sticky; top: 72px; overflow: hidden; }
.side > summary { padding: 14px 16px; cursor: pointer; font-weight: 700; list-style: none; border-bottom: 1px solid var(--line); }
.side > summary::-webkit-details-marker, .admin-card > summary::-webkit-details-marker { display: none; }
.side-body { display: grid; grid-template-rows: minmax(0, 1fr) minmax(0, 1fr); height: min(640px, calc(100vh - 160px)); }
.side-section { display: flex; flex-direction: column; min-height: 0; padding: 12px 14px; }
.side-section + .side-section { border-top: 1px solid var(--line); }
.side-section h2 { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--dim); margin-bottom: 8px; }
.feed { list-style: none; margin: 0; padding: 0; overflow-y: auto; flex: 1; min-height: 0; display: grid; align-content: start; gap: 3px; font-size: 12.5px; }
.feed li { color: #c3cbd3; word-break: break-word; }
.message-time { color: var(--dim); font-size: 11px; margin-right: 6px; }
.chat-name { color: var(--green-2); font-weight: 700; margin-right: 4px; }
.empty-note { margin: 0; color: var(--dim); font-size: 12px; }
.chat-form { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin-top: 8px; }
.chat-form input { height: 34px; }

/* ---------- modal & toasts ---------- */
.modal { width: min(420px, calc(100vw - 32px)); padding: 22px; border-radius: 16px; border: 1px solid var(--line-2); background: var(--panel); color: var(--text); box-shadow: 0 30px 90px rgba(0, 0, 0, .6); }
.modal::backdrop { background: rgba(3, 5, 7, .7); backdrop-filter: blur(3px); }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.modal-head h2 { font-size: 18px; }
.modal p { margin: 0; font-size: 13px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; }
.toasts { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 60; display: grid; gap: 8px; width: min(440px, calc(100vw - 32px)); }
.toast { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 14px; border-radius: 10px; background: #1b232b; border: 1px solid var(--line-2); box-shadow: 0 12px 30px rgba(0, 0, 0, .45); font-size: 13px; animation: deal .2s ease-out both; }
.toast.error { border-color: rgba(220, 38, 38, .6); background: #2a1517; }
.toast button { border: 0; background: none; color: var(--muted); font-size: 18px; cursor: pointer; }
.noscript { text-align: center; padding: 40px; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .game { grid-template-columns: 1fr; }
  .side { position: static; }
  .side-body { grid-template-rows: auto auto; height: auto; }
  .feed { max-height: 220px; }
}
@media (max-width: 900px) {
  .lobby-grid { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  body { font-size: 13px; }
  .topbar { padding: 0 12px; height: 52px; }
  .brand-word { font-size: 13px; }
  .account-name { display: none; }
  .lobby { padding: 16px 12px 32px; gap: 14px; }
  .lobby-cols { display: none; }
  .lobby-row { grid-template-columns: 1fr 1fr 1fr; gap: 8px 10px; padding: 14px; }
  .lobby-name { grid-column: 1 / -1; }
  .lobby-cell { flex-direction: column; align-items: flex-start; gap: 4px; font-size: 13px; }
  .lobby-cell::before { content: attr(data-label); font-size: 10px; text-transform: uppercase; letter-spacing: .06em; color: var(--dim); font-weight: 700; }
  .table-row-actions { grid-column: 1 / -1; justify-content: stretch; }
  .table-row-actions .btn { flex: 1; }

  .table-view { padding: 8px 8px 20px; }
  .table-title .muted { display: none; }
  .stage { aspect-ratio: 3 / 4.1; max-height: none; min-height: 0; }
  .rail { inset: 7% 9%; padding: 9px; }
  .felt-logo, .hand-no { display: none; }
  .board { --cw: 13vw; gap: 4px; }
  .pod { width: 86px; }
  .avatar { width: 44px; height: 44px; border-width: 2px; }
  .avatar-letter { font-size: 18px; }
  .turn-ring { inset: -5px; }
  .plate { min-width: 78px; max-width: 90px; padding: 3px 6px 4px; margin-top: -9px; border-radius: 8px; }
  .seat-name { font-size: 10.5px; }
  .seat-stack { font-size: 12px; }
  .seat-cards { --cw: 30px; bottom: calc(100% - 20px); }
  .seat.me .seat-cards { --cw: 44px; bottom: calc(100% - 14px); }
  .dealer { width: 18px; height: 18px; font-size: 9px; right: 8px; top: 0; }
  .empty-seat { width: 44px; height: 44px; font-size: 10px; }
  .bet-amount { font-size: 11px; padding: 1px 6px; }
  .chip-stack, .chip-stack i { width: 14px; }
  .chip-stack i { height: 14px; border-width: 1.5px; }
  .results { top: 70%; }
  .results p { font-size: 12px; white-space: normal; text-align: center; border-radius: 12px; }
  .dock { flex-direction: column-reverse; align-items: stretch; }
  .actions { width: 100%; position: sticky; bottom: 8px; z-index: 10; }
  .btn-act { height: 50px; font-size: 14px; }
}
