:root {
  --bg: #0e1013; --surface: #15181e; --surface-2: #1c2028; --surface-3: #242935;
  --line: rgba(255,255,255,.07); --line-2: rgba(255,255,255,.14);
  --text: #eceef2; --muted: #8b919c; --faint: #5c626d;
  --accent: #e6b84a; --accent-2: #f3cf6e; --accent-ink: #1a1405;
  --pos: #44c37f; --neg: #ef5f5f; --warn: #f2a33a; --info: #4f9de0;
  --felt: #1f6b45; --felt-2: #175636; --felt-edge: #3a2a1a;
  --radius: 16px; --radius-s: 10px;
  --shadow: 0 10px 30px rgba(0,0,0,.35);
  --sat: env(safe-area-inset-top); --sab: env(safe-area-inset-bottom);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { height: 100%; }
body { margin: 0; min-height: 100%; background: var(--bg); color: var(--text); font: 15px/1.45 Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; -webkit-font-smoothing: antialiased; overscroll-behavior-y: none; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
button:disabled { cursor: default; opacity: .45; }
svg.lucide { width: 20px; height: 20px; stroke-width: 2; flex: none; }
.num { font-variant-numeric: tabular-nums; }
.pos { color: var(--pos); } .neg { color: var(--neg); } .muted { color: var(--muted); } .accent { color: var(--accent); }
.hide { display: none !important; }

#app { min-height: 100vh; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 10px; padding: calc(10px + var(--sat)) 16px 10px; background: rgba(14,16,19,.85); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.topbar .brand { display: flex; align-items: center; gap: 9px; font-weight: 800; letter-spacing: .02em; font-size: 17px; }
.topbar .brand img { width: 26px; height: 26px; border-radius: 7px; }
.topbar .spacer { flex: 1; }
.topbar .back { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 10px; color: var(--muted); }
.topbar .title { font-weight: 700; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.main { width: 100%; max-width: 920px; margin: 0 auto; padding: 18px 16px calc(40px + var(--sab)); flex: 1; animation: fadeup .25s ease-out; }
@keyframes fadeup { from { opacity: 0; transform: translateY(6px); } }
.lb tbody tr { animation: fadeup .3s ease-out both; }
.lb tbody tr:nth-child(2) { animation-delay: .04s; } .lb tbody tr:nth-child(3) { animation-delay: .08s; } .lb tbody tr:nth-child(4) { animation-delay: .12s; } .lb tbody tr:nth-child(5) { animation-delay: .16s; } .lb tbody tr:nth-child(n+6) { animation-delay: .2s; }
.tile { animation: fadeup .3s ease-out both; }
.medal { animation: pop .3s both; }
@media (prefers-reduced-motion: reduce) { *:not(.ring .fg), *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }
.main.narrow { max-width: 480px; }

.avatar { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; font-weight: 700; font-size: 13px; color: #fff; background: var(--surface-3); flex: none; letter-spacing: .02em; text-shadow: 0 1px 2px rgba(0,0,0,.3); }
.avatar.sm { width: 28px; height: 28px; font-size: 11px; }
.avatar.lg { width: 64px; height: 64px; font-size: 22px; }
.avatar.xl { width: 84px; height: 84px; font-size: 28px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 18px; border-radius: 12px; font-weight: 600; background: var(--surface-2); border: 1px solid var(--line-2); transition: background .15s, transform .05s; white-space: nowrap; }
.btn:active { transform: translateY(1px); background: var(--surface-3); }
.btn.primary:active { background: var(--accent-2); }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.btn.danger { color: var(--neg); border-color: rgba(239,95,95,.35); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.sm { height: 36px; padding: 0 12px; font-size: 14px; border-radius: 10px; }
.btn.sm svg.lucide { width: 17px; height: 17px; }
.btn.icon { width: 44px; padding: 0; }
.btn.icon.sm { width: 36px; }
.btn.block { width: 100%; }
.btn.lg { height: 52px; font-size: 16px; border-radius: 14px; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.card.pad0 { padding: 0; overflow: hidden; }
.card + .card { margin-top: 12px; }
.section { margin: 26px 0 10px; display: flex; align-items: center; gap: 10px; }
.section h2 { margin: 0; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.section .spacer { flex: 1; }
.row { display: flex; align-items: center; gap: 12px; }
.row.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
@media (max-width: 520px) { .grid3 { grid-template-columns: repeat(3, 1fr); gap: 8px; } }

.tile { display: flex; align-items: center; gap: 14px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); transition: border-color .15s, background .15s; }
.tile + .tile { margin-top: 10px; }
button.tile { text-align: left; width: 100%; }
.grid2 .tile + .tile { margin-top: 0; }
.tile .ico { width: 44px; height: 44px; border-radius: 13px; display: flex; align-items: center; justify-content: center; background: var(--surface-3); color: var(--accent); flex: none; }
.tile .ico.green { background: rgba(31,107,69,.35); color: #6fd49f; }
.tile .ico.blue { background: rgba(79,157,224,.18); color: #7fb8ec; }
.tile h3 { margin: 0; font-size: 15px; font-weight: 700; }
.tile .sub { color: var(--muted); font-size: 13px; margin-top: 2px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.tile .sub span { display: inline-flex; align-items: center; gap: 4px; }
.tile .sub svg.lucide { width: 14px; height: 14px; }
.tile .chev { color: var(--faint); }

.empty { text-align: center; color: var(--muted); padding: 36px 16px; }
.empty svg.lucide { width: 40px; height: 40px; color: var(--faint); margin-bottom: 10px; stroke-width: 1.5; }
.empty p { margin: 4px 0 14px; }

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.input, select.input { height: 46px; padding: 0 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line-2); outline: none; width: 100%; transition: border-color .15s; }
.input:focus { border-color: var(--accent); }
textarea.input { height: auto; padding: 10px 14px; resize: vertical; }
select.input { appearance: none; -webkit-appearance: none; }
.input.num { text-align: right; font-variant-numeric: tabular-nums; }
.hint { font-size: 12px; color: var(--muted); }
.switch { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.switch:first-child { border-top: 0; }
.switch .lbl { font-weight: 600; }
.switch .hint { margin-top: 2px; }
.toggle { position: relative; width: 46px; height: 28px; border-radius: 14px; background: var(--surface-3); border: 1px solid var(--line-2); transition: background .15s; flex: none; }
.toggle::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .15s; }
.toggle.on { background: var(--accent); border-color: transparent; }
.toggle.on::after { transform: translateX(18px); }
.seg { display: inline-flex; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 3px; gap: 2px; }
.seg button { height: 34px; padding: 0 14px; border-radius: 9px; font-weight: 600; color: var(--muted); font-size: 14px; }
.seg button.on { background: var(--surface-3); color: var(--text); }
.seg.block { display: flex; } .seg.block button { flex: 1; }

.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin: 6px 0 16px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a, .tabs button { display: inline-flex; align-items: center; gap: 7px; padding: 10px 14px; color: var(--muted); font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs .on { color: var(--text); border-bottom-color: var(--accent); }
.tabs svg.lucide { width: 17px; height: 17px; }

.lb { width: 100%; border-collapse: collapse; }
.lb th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.lb td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.lb tr:last-child td { border-bottom: 0; }
.lb tr.me td { background: rgba(230,184,74,.06); }
.lb .r { text-align: right; }
.lb .rank { width: 34px; font-weight: 800; color: var(--muted); font-size: 14px; }
.medal { display: inline-flex; width: 26px; height: 26px; border-radius: 50%; align-items: center; justify-content: center; font-weight: 800; font-size: 12px; color: #1a1405; }
.medal.g { background: linear-gradient(135deg,#f6d57a,#c9961c); } .medal.s { background: linear-gradient(135deg,#e6e8ee,#a6acb8); } .medal.b { background: linear-gradient(135deg,#e2a06f,#a3622f); }
.pts { font-weight: 800; font-size: 16px; }
.form { display: inline-flex; gap: 3px; }
.form i { width: 7px; height: 7px; border-radius: 50%; background: var(--faint); display: inline-block; }
.form i.w { background: var(--pos); } .form i.l { background: var(--neg); }
.name { font-weight: 600; display: flex; align-items: center; gap: 10px; min-width: 0; }
.name .n { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.name .tag { font-size: 10px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); border: 1px solid var(--line-2); border-radius: 6px; padding: 1px 5px; }
.lb .c2 { display: none; }
@media (min-width: 640px) { .lb .c2 { display: table-cell; } }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.stat .k { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; display: flex; align-items: center; gap: 5px; }
.stat .k svg.lucide { width: 13px; height: 13px; }
.stat .v { font-size: 20px; font-weight: 800; margin-top: 4px; }

.chart { width: 100%; height: 190px; display: block; }
.chart .grid line { stroke: var(--line-2); stroke-width: 1; }
.chart text { fill: var(--muted); font-size: 10px; }
.chart path { fill: none; stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: var(--muted); margin-top: 8px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 3px; border-radius: 2px; display: inline-block; }

.ev { display: flex; align-items: center; gap: 14px; padding: 14px 16px; }
.ev .date { width: 48px; text-align: center; flex: none; }
.ev .date b { display: block; font-size: 20px; font-weight: 800; line-height: 1; }
.ev .date small { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.ev .meta { color: var(--muted); font-size: 13px; display: flex; gap: 12px; flex-wrap: wrap; margin-top: 2px; }
.ev .meta span { display: inline-flex; align-items: center; gap: 4px; }
.ev .meta svg.lucide { width: 14px; height: 14px; }
.pill { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px; border-radius: 12px; font-size: 12px; font-weight: 600; background: var(--surface-3); color: var(--muted); }
.pill.live { background: rgba(68,195,127,.15); color: var(--pos); }
.pill.gold { background: rgba(230,184,74,.15); color: var(--accent); }
.pill.red { background: rgba(239,95,95,.15); color: var(--neg); }
.pill svg.lucide { width: 13px; height: 13px; }

.rsvp { display: flex; gap: 8px; }
.rsvp button { flex: 1; height: 44px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--surface-2); font-weight: 600; display: inline-flex; align-items: center; justify-content: center; gap: 6px; color: var(--muted); }
.rsvp button.on.yes { background: rgba(68,195,127,.15); color: var(--pos); border-color: rgba(68,195,127,.4); }
.rsvp button.on.maybe { background: rgba(242,163,58,.15); color: var(--warn); border-color: rgba(242,163,58,.4); }
.rsvp button.on.no { background: rgba(239,95,95,.15); color: var(--neg); border-color: rgba(239,95,95,.4); }
.people { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px 0 3px; border-radius: 15px; background: var(--surface-2); border: 1px solid var(--line); font-size: 13px; font-weight: 500; }
.chip .avatar { width: 24px; height: 24px; font-size: 10px; }
.chip.dim { opacity: .5; }

.res { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.res:first-child { border-top: 0; }
.res .stepper { display: inline-flex; align-items: center; border: 1px solid var(--line-2); border-radius: 10px; overflow: hidden; height: 38px; background: var(--surface-2); }
.res .stepper button { width: 34px; height: 100%; display: inline-flex; align-items: center; justify-content: center; color: var(--muted); }
.res .stepper b { min-width: 28px; text-align: center; font-size: 14px; }
.res .stepper svg.lucide { width: 16px; height: 16px; }
.res input { width: 92px; height: 38px; border-radius: 10px; }
.res .net { font-size: 12px; margin-top: 2px; }
.balance { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); margin-top: 12px; font-size: 14px; }
.balance.ok { color: var(--pos); } .balance.bad { color: var(--warn); }

.sheet-bg { position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 50; display: flex; align-items: flex-end; justify-content: center; animation: fade .15s; }
.sheet { width: 100%; max-width: 520px; background: var(--surface); border: 1px solid var(--line-2); border-radius: 20px 20px 0 0; padding: 18px 18px calc(18px + var(--sab)); max-height: 92vh; overflow: auto; animation: up .2s; }
@media (min-width: 640px) { .sheet-bg { align-items: center; } .sheet { border-radius: 20px; animation: pop .15s; } }
.sheet h2 { margin: 0 0 16px; font-size: 18px; display: flex; align-items: center; gap: 10px; }
.sheet .actions { display: flex; gap: 10px; margin-top: 18px; }
.sheet .actions .btn { flex: 1; }
@keyframes up { from { transform: translateY(30px); opacity: 0; } }
@keyframes pop { from { transform: scale(.96); opacity: 0; } }
@keyframes fade { from { opacity: 0; } }

#toasts { position: fixed; left: 50%; bottom: calc(24px + var(--sab)); transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; z-index: 100; pointer-events: none; width: min(92vw, 420px); }
.toast { background: var(--surface-3); border: 1px solid var(--line-2); color: var(--text); padding: 12px 16px; border-radius: 12px; box-shadow: var(--shadow); font-weight: 500; display: flex; gap: 10px; align-items: center; animation: up .2s; }
.toast.err { border-color: rgba(239,95,95,.5); } .toast.err svg.lucide { color: var(--neg); }
.toast.ok svg.lucide { color: var(--pos); }

.auth { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px 16px; }
.auth .logo { width: 72px; height: 72px; border-radius: 20px; margin-bottom: 14px; }
.auth h1 { margin: 0 0 4px; font-size: 28px; letter-spacing: .02em; }
.auth .tag { color: var(--muted); margin-bottom: 26px; }
.auth form { width: 100%; max-width: 360px; }
.auth .alt { margin-top: 18px; color: var(--muted); font-size: 14px; text-align: center; }
.auth .alt a { color: var(--accent); font-weight: 600; }

.code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-weight: 700; letter-spacing: .18em; font-size: 22px; }
.invite { display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: var(--surface-2); border-radius: 14px; border: 1px dashed var(--line-2); }
.menu { position: absolute; right: 0; top: 44px; background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 12px; box-shadow: var(--shadow); min-width: 200px; padding: 6px; z-index: 30; }
.menu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border-radius: 8px; font-weight: 500; text-align: left; }
.menu button.danger { color: var(--neg); }
.menu svg.lucide { width: 17px; height: 17px; }
.rel { position: relative; }
.colors { display: flex; flex-wrap: wrap; gap: 10px; }
.colors button { width: 34px; height: 34px; border-radius: 50%; border: 3px solid transparent; }
.colors button.on { border-color: #fff; }
.fab { position: fixed; right: 18px; bottom: calc(18px + var(--sab)); z-index: 25; height: 54px; padding: 0 20px 0 16px; border-radius: 27px; background: var(--accent); color: var(--accent-ink); font-weight: 700; display: inline-flex; align-items: center; gap: 8px; box-shadow: 0 8px 24px rgba(230,184,74,.35); }

/* ===== Poker table ===== */
.ptable { position: fixed; inset: 0; display: flex; flex-direction: column; background: radial-gradient(1200px 700px at 50% 30%, #1a1e26 0%, var(--bg) 70%); overflow: hidden; }
.ptable .bar { display: flex; align-items: center; gap: 10px; padding: calc(8px + var(--sat)) 12px 8px; z-index: 5; }
.ptable .bar .t { font-weight: 700; font-size: 15px; } .ptable .bar .b { color: var(--muted); font-size: 12px; }
.ptable .bar .ib { width: 38px; height: 38px; border-radius: 11px; display: inline-flex; align-items: center; justify-content: center; color: var(--muted); background: rgba(255,255,255,.04); }
.ptable .bar .ib.on { color: var(--accent); }
.ptable .felt-wrap { flex: 1; position: relative; min-height: 0; }
.felt { position: absolute; left: 50%; top: calc(50% - 10px); transform: translate(-50%,-50%); width: min(88vw, 820px); height: calc(100% - 180px); max-height: 470px; border-radius: 50% / 50%; border: 14px solid transparent;
  background: radial-gradient(ellipse at 50% 38%, #2c8a5c 0%, #1f6b45 48%, #15513a 100%) padding-box, linear-gradient(160deg, #6e4a2c 0%, #3d2614 40%, #5a3a21 70%, #2d1a0d 100%) border-box;
  box-shadow: inset 0 0 0 2px rgba(0,0,0,.35), inset 0 0 70px rgba(0,0,0,.45), 0 0 0 2px #1a110a, 0 24px 70px rgba(0,0,0,.65); }
.felt::before { content: ''; position: absolute; inset: 0; border-radius: inherit; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .5 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); opacity: .25; mix-blend-mode: overlay; pointer-events: none; }
.felt::after { content: ''; position: absolute; inset: 22px; border-radius: inherit; border: 1.5px solid rgba(255,230,160,.14); pointer-events: none; }
@media (max-width: 640px) { .felt { width: 64vw; height: calc(100% - 190px); top: calc(50% - 14px); } }
.felt .logo { position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%); opacity: .08; font-size: 30px; font-weight: 900; letter-spacing: .22em; pointer-events: none; }
.center { position: absolute; left: 50%; top: 47%; transform: translate(-50%,-50%); display: flex; flex-direction: column; align-items: center; gap: 10px; width: max-content; }
.pot { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 12px; border-radius: 14px; background: rgba(0,0,0,.35); color: #ffe8a3; font-weight: 700; font-size: 14px; }
.pot svg.lucide { width: 15px; height: 15px; }
.pot.side { font-size: 11px; height: 22px; opacity: .8; }
.board { display: flex; gap: 6px; min-height: 64px; }
@keyframes deal { from { transform: translateY(-26px) rotateY(80deg) scale(.9); opacity: 0; } }

.phase { font-size: 11px; text-transform: uppercase; letter-spacing: .14em; color: rgba(255,255,255,.55); font-weight: 600; }
.cardx { position: relative; width: 44px; height: 62px; border-radius: 6px; background: linear-gradient(160deg, #ffffff 0%, #f7f4ea 100%); color: #1a1a1a; box-shadow: 0 2px 6px rgba(0,0,0,.45), inset 0 0 0 1px rgba(0,0,0,.06); flex: none; font-weight: 800; line-height: 1; overflow: hidden; backface-visibility: hidden; }
.cardx .r { position: absolute; top: 4px; left: 5px; display: flex; flex-direction: column; align-items: center; font-size: 15px; letter-spacing: -.02em; }
.cardx .r small { font-size: 11px; font-weight: 700; margin-top: 1px; }
.cardx .c { position: absolute; right: 4px; bottom: 2px; font-size: 26px; opacity: .9; }
.cardx.red { color: #d2252c; }
.cardx.back { background: linear-gradient(135deg, #2f4a8a, #1f3366); border: 3px solid #ece8da; }
.cardx.back i { position: absolute; inset: 3px; border-radius: 3px; background: repeating-linear-gradient(45deg, rgba(255,255,255,.14) 0 3px, transparent 3px 7px), repeating-linear-gradient(-45deg, rgba(255,255,255,.14) 0 3px, transparent 3px 7px); border: 1px solid rgba(255,255,255,.35); }
.cardx.sm { width: 30px; height: 42px; border-radius: 4px; } .cardx.sm .r { top: 3px; left: 3px; font-size: 11px; } .cardx.sm .r small { font-size: 8px; } .cardx.sm .c { font-size: 15px; right: 2px; bottom: 1px; }
.cardx.lg { width: 62px; height: 88px; border-radius: 8px; } .cardx.lg .r { font-size: 22px; } .cardx.lg .c { font-size: 38px; }
.cardx.dim { opacity: .4; }
.cardx.win { box-shadow: 0 0 0 2px var(--accent), 0 0 18px rgba(230,184,74,.6); }
.hole.dealing .cardx { animation: dealTo .55s cubic-bezier(.2,.75,.25,1) both; }
.hole.dealing .cardx:nth-child(1) { animation-delay: var(--d1); } .hole.dealing .cardx:nth-child(2) { animation-delay: var(--d2); }
@keyframes dealTo { 0% { transform: translate(var(--dx), var(--dy)) rotate(-25deg) scale(.55); opacity: 0; } 25% { opacity: 1; } 100% { transform: none; opacity: 1; } }
.hole.flip .cardx { animation: flipIn .5s ease-out both; }
.hole.flip .cardx:nth-child(2) { animation-delay: .12s; }
@keyframes flipIn { 0% { transform: rotateY(90deg) translateY(-6px); } 100% { transform: none; } }
.board .cardx { animation: dealBoard .6s cubic-bezier(.2,.75,.25,1) both; }
.board .cardx.old { animation: none; }
@keyframes dealBoard { 0% { transform: translate(var(--dx), var(--dy)) rotateY(90deg) scale(.7); opacity: 0; } 30% { opacity: 1; } 60% { transform: translate(0, -8px) rotateY(90deg) scale(1); } 100% { transform: none; } }
.flycard { position: absolute; z-index: 6; transform: translate(-50%,-50%) rotate(12deg); transition: left .6s ease-in, top .6s ease-in, opacity .6s; pointer-events: none; }
/* chips */
.cstack { position: relative; height: 56px; }
.cstack .ccol { position: absolute; bottom: 14px; width: 26px; height: 40px; }
.cstack .amt { position: absolute; left: 50%; bottom: -2px; transform: translateX(-50%); font-size: 11px; font-weight: 800; color: #ffe8a3; background: rgba(0,0,0,.5); padding: 1px 6px; border-radius: 8px; white-space: nowrap; }
.chip { position: absolute; left: 0; width: 26px; height: 26px; border-radius: 50%; transform: scaleY(.55); transform-origin: 50% 100%;
  background: radial-gradient(circle, var(--c) 0 52%, transparent 53%), repeating-conic-gradient(from 10deg, #f6f2e6 0 22deg, var(--c) 22deg 60deg);
  box-shadow: 0 3px 0 var(--d), 0 4px 3px rgba(0,0,0,.45), inset 0 0 0 1px rgba(0,0,0,.25); }
.chip::after { content: ''; position: absolute; inset: 7px; border-radius: 50%; border: 1px dashed rgba(255,255,255,.55); }
.chip.d1 { --c: #e9e6dc; --d: #9c9890; } .chip.d5 { --c: #d83a3a; --d: #8c1f1f; } .chip.d25 { --c: #2e9a5a; --d: #1b5e36; } .chip.d100 { --c: #2b2b33; --d: #0e0e12; }
.chip.d500 { --c: #7d4fc9; --d: #4a2a80; } .chip.d1000 { --c: #e3b23c; --d: #956f16; } .chip.d5000 { --c: #e8732e; --d: #9a4512; }
.betpos { position: absolute; transform: translate(-50%,-100%); pointer-events: none; }
.betpos .cstack { animation: slideIn .45s cubic-bezier(.2,.75,.25,1) both; }
.betpos.old .cstack { animation: none; }
@keyframes slideIn { 0% { transform: translate(var(--dx), var(--dy)) scale(.7); opacity: 0; } 100% { transform: none; opacity: 1; } }
.potwrap { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.potwrap .cstack { height: 48px; animation: pop .3s both; }
.potwrap.old .cstack { animation: none; }
.fly { position: absolute; z-index: 6; transform: translate(-50%,-50%); transition: left .9s cubic-bezier(.3,.7,.3,1), top .9s cubic-bezier(.3,.7,.3,1), opacity .5s; pointer-events: none; }
.fly .cstack { height: 48px; }
.seat { position: absolute; width: 0; height: 0; }
.seat .inner { position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%); display: flex; flex-direction: column; align-items: center; gap: 4px; width: 104px; }
.seat .empty-seat { width: 52px; height: 52px; border-radius: 50%; border: 2px dashed rgba(255,255,255,.25); display: flex; align-items: center; justify-content: center; color: rgba(255,255,255,.5); background: rgba(0,0,0,.2); transition: all .15s; }
.seat .empty-seat svg.lucide { width: 22px; height: 22px; }
.seat .av { position: relative; width: 56px; height: 56px; }
.seat .av .avatar { width: 56px; height: 56px; font-size: 18px; border: 2px solid rgba(0,0,0,.4); }
.seat .av .ring { position: absolute; inset: -8px; width: 72px; height: 72px; }
.seat .av .ring circle { fill: none; stroke-width: 4; }
.seat .av .tleft { position: absolute; left: 50%; bottom: -14px; transform: translateX(-50%); background: var(--accent); color: var(--accent-ink); font-size: 11px; font-weight: 800; min-width: 22px; text-align: center; padding: 1px 5px; border-radius: 8px; z-index: 3; font-variant-numeric: tabular-nums; }
.seat .av .ring .bgc { stroke: rgba(255,255,255,.15); }
.seat .av .ring .fg { stroke: var(--accent); stroke-linecap: round; transform: rotate(-90deg); transform-origin: 50% 50%; animation: ring 20s linear forwards; }
@keyframes ring { 0% { stroke-dashoffset: 0; stroke: var(--accent); } 65% { stroke: var(--accent); } 80% { stroke: var(--neg); } 100% { stroke-dashoffset: 207.3; stroke: var(--neg); } }
.seat .plate { background: rgba(10,12,16,.9); border: 1px solid rgba(255,255,255,.1); border-radius: 10px; padding: 4px 8px; text-align: center; min-width: 84px; max-width: 110px; }
.seat .plate .nm { font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.seat .plate .st { font-size: 13px; font-weight: 800; color: #ffe8a3; }
.seat.active .plate { border-color: var(--accent); animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 10px rgba(230,184,74,.25); } 50% { box-shadow: 0 0 22px rgba(230,184,74,.7); } }

.seat.folded .av, .seat.folded .plate { opacity: .45; }
.seat.out .plate .nm::after { content: ' · zz'; color: var(--muted); font-weight: 500; }
.seat.winner .plate { border-color: var(--pos); animation: winpulse 1s ease-in-out 3; }
@keyframes winpulse { 0%, 100% { box-shadow: 0 0 10px rgba(68,195,127,.3); } 50% { box-shadow: 0 0 26px rgba(68,195,127,.9); } }
.seat .plate .st.up { animation: flashup .9s; } .seat .plate .st.down { animation: flashdown .9s; }
@keyframes flashup { 0% { color: var(--pos); transform: scale(1.15); } 100% { color: #ffe8a3; transform: none; } }
@keyframes flashdown { 0% { color: var(--neg); transform: scale(.95); } 100% { color: #ffe8a3; transform: none; } }
.seat .hole .cardx { transition: opacity .35s; }
.seat .act { animation: pop .2s; }
.seat .hn { animation: pop .25s; }
.seat .hole { display: flex; gap: 3px; position: absolute; top: -18px; left: 50%; transform: translateX(-50%); z-index: -1; }
.seat .hole .cardx.sm:nth-child(1) { transform: rotate(-7deg); } .seat .hole .cardx.sm:nth-child(2) { transform: rotate(7deg); }
.seat .hole.shown { top: -30px; z-index: 2; }
.seat .hn { position: absolute; top: -46px; left: 50%; transform: translateX(-50%); background: var(--accent); color: var(--accent-ink); font-size: 10px; font-weight: 800; padding: 2px 7px; border-radius: 6px; white-space: nowrap; z-index: 3; }
.seat .act { position: absolute; bottom: -22px; left: 50%; transform: translateX(-50%); font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; padding: 2px 7px; border-radius: 6px; background: rgba(0,0,0,.5); color: rgba(255,255,255,.75); white-space: nowrap; }
.seat .act.fold { color: var(--neg); } .seat .act.raise, .seat .act.bet, .seat .act.allin { color: var(--accent); } .seat .act.call, .seat .act.check { color: var(--pos); }
.seat .dealer { position: absolute; width: 20px; height: 20px; border-radius: 50%; background: #fff; color: #111; font-size: 10px; font-weight: 900; display: flex; align-items: center; justify-content: center; box-shadow: 0 1px 3px rgba(0,0,0,.5); top: 0; right: -6px; }
.seat .offline { position: absolute; top: 0; left: -6px; width: 20px; height: 20px; border-radius: 50%; background: var(--surface-3); color: var(--muted); display: flex; align-items: center; justify-content: center; }
.seat .offline svg.lucide { width: 12px; height: 12px; }
.hand-me { position: absolute; left: 50%; bottom: 6px; transform: translateX(-50%); display: flex; gap: 6px; z-index: 4; }
 .hand-me .cardx:nth-child(2) { animation-delay: .08s; }
.hand-me .cardx.lg { box-shadow: 0 6px 18px rgba(0,0,0,.6); }
.hand-me .myname { position: absolute; left: 50%; bottom: -18px; transform: translateX(-50%); font-size: 11px; color: var(--accent); font-weight: 700; white-space: nowrap; }

.actionbar { padding: 10px 12px calc(10px + var(--sab)); background: rgba(14,16,19,.9); border-top: 1px solid var(--line); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); z-index: 6; min-height: 72px; }
.actionbar .inner { max-width: 640px; margin: 0 auto; display: flex; flex-direction: column; gap: 10px; min-height: 192px; justify-content: center; }
@media (max-width: 640px) { .actionbar .inner { min-height: 206px; } }
.abtns { display: flex; gap: 8px; }
.abtn { flex: 1; height: 54px; border-radius: 14px; font-weight: 800; font-size: 15px; display: inline-flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.15; background: var(--surface-2); border: 1px solid var(--line-2); transition: transform .05s, background .15s; }
.abtn:active { transform: translateY(1px); }
.abtn small { font-weight: 600; font-size: 11px; opacity: .75; }
.abtn.fold { color: var(--neg); } .abtn.call { color: var(--pos); } .abtn.raise { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.sizer { display: flex; flex-direction: column; gap: 8px; }
.sizer .sl { display: flex; align-items: center; gap: 10px; }
.sizer .presets { display: flex; gap: 6px; }
.sizer .presets button { flex: 1; white-space: nowrap; }
.sizer .presets button { height: 32px; padding: 0 10px; border-radius: 9px; background: var(--surface-2); border: 1px solid var(--line); font-size: 12px; font-weight: 700; color: var(--muted); }
.sizer input[type=range] { flex: 1; accent-color: var(--accent); min-width: 60px; }
.sizer input[type=number] { width: 96px; height: 36px; border-radius: 10px; text-align: right; }
.waitmsg { text-align: center; color: var(--muted); font-size: 14px; display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; }
.waitmsg .btn { margin-left: 6px; }
.sidebtns { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }

.drawer { position: absolute; top: 0; right: 0; bottom: 0; width: min(88vw, 340px); background: rgba(14,16,19,.96); border-left: 1px solid var(--line); z-index: 8; display: flex; flex-direction: column; transform: translateX(100%); transition: transform .2s; }
.drawer.open { transform: none; }
.drawer .dh { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--line); font-weight: 700; }
.drawer .dl { flex: 1; overflow: auto; padding: 10px 14px; font-size: 13px; display: flex; flex-direction: column; gap: 6px; }
.drawer .dl div { color: var(--muted); } .drawer .dl div.chat { color: var(--text); } .drawer .dl div.hand_end { color: var(--accent); } .drawer .dl div.hand_start { border-top: 1px solid var(--line); padding-top: 6px; color: var(--faint); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }
.drawer form { display: flex; gap: 6px; padding: 10px 12px calc(10px + var(--sab)); border-top: 1px solid var(--line); }
.drawer form input { flex: 1; height: 40px; }
.drawer .people { padding: 10px 14px; border-bottom: 1px solid var(--line); }

.resultbanner { position: absolute; left: 50%; top: 14%; transform: translateX(-50%); background: rgba(10,12,16,.92); border: 1px solid rgba(230,184,74,.5); border-radius: 16px; padding: 12px 18px; text-align: center; z-index: 7; animation: pop .25s; box-shadow: 0 10px 40px rgba(0,0,0,.6); max-width: 90vw; }
.resultbanner b { color: var(--accent); font-size: 16px; }
.resultbanner div { font-size: 13px; color: var(--muted); margin-top: 2px; }
.countdown { font-size: 11px; color: var(--faint); margin-top: 4px; }

.chartbox { width: 100%; }
.chart text { font-size: 11px; }
.lb .c1 { display: block; }
@media (min-width: 640px) { .lb .c1 { display: none; } }
@media (max-width: 480px) { .tabs a, .tabs button { padding: 10px 9px; font-size: 14px; gap: 5px; } .tabs svg.lucide { width: 16px; height: 16px; } }

.seat.me .hn { top: -94px; }
.center .result { background: rgba(10,12,16,.85); border: 1px solid rgba(230,184,74,.45); border-radius: 14px; padding: 8px 16px; text-align: center; animation: pop .35s both; }
.center .result b { color: var(--accent); font-size: 15px; display: block; }
.center .result span { font-size: 12px; color: var(--muted); }
.center .result .countdown { margin-top: 2px; }
.seat.folded .hole { opacity: .45; }
@media (max-width: 640px) {
  .center { top: 43%; gap: 8px; }
  .board .cardx { width: 38px; height: 54px; } .board .cardx .r { font-size: 13px; } .board .cardx .c { font-size: 20px; }
  .center .result { padding: 6px 12px; } .center .result b { font-size: 14px; }
  .seat.me .hole.shown { top: -66px !important; }
  .seat.me .hn { top: -86px; }
  .pot { height: 24px; font-size: 13px; }
}
.seat .hn.soft { background: rgba(10,12,16,.85); color: var(--accent); border: 1px solid rgba(230,184,74,.4); }
.seat .offline.bot { background: rgba(230,184,74,.9); color: var(--accent-ink); }
.replay { display: flex; flex-direction: column; gap: 10px; }
.replay .rbtns { display: flex; justify-content: center; gap: 8px; }
.replay .rbar { display: flex; align-items: center; gap: 10px; }
.replay .rbar input[type=range] { flex: 1; accent-color: var(--accent); }
.replay .seg button { height: 28px; padding: 0 9px; font-size: 12px; }
.hl { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-top: 1px solid var(--line); }
.hl:first-child { border-top: 0; }
.hl .cards { display: flex; gap: 3px; }
.hl .cards .cardx.sm { width: 26px; height: 36px; } .hl .cards .cardx.sm .r { font-size: 10px; } .hl .cards .cardx.sm .c { font-size: 12px; }
.hl .cards .cardx.sm.dim { opacity: .35; }
.hl b { display: block; } .hl .hint { margin-top: 1px; }
.hl .cat { font-weight: 800; color: var(--accent); font-size: 13px; white-space: nowrap; }
.hl .cat.top { color: #ff7a7a; }

@media (hover: hover) {
  .topbar .back:hover { background: var(--surface-2); color: var(--text); }
  .btn:hover { background: var(--surface-3); }
  .btn.primary:hover { background: var(--accent-2); }
  .btn.ghost:hover { color: var(--text); background: var(--surface-2); }
  .tile:hover { border-color: var(--line-2); background: var(--surface-2); }
  .lb tr.click { cursor: pointer; } .lb tr.click:hover td { background: var(--surface-2); }
  .res .stepper button:hover { color: var(--text); background: var(--surface-3); }
  .menu button:hover { background: var(--surface-3); }
  .ptable .bar .ib:hover { color: var(--text); background: rgba(255,255,255,.08); }
  .seat .empty-seat:hover { border-color: var(--accent); color: var(--accent); background: rgba(0,0,0,.35); }
  .sizer .presets button:hover { color: var(--text); }
}
.conn { position: absolute; left: 50%; top: calc(8px + var(--sat)); transform: translateX(-50%); z-index: 9; }
@media (hover: none) { .abtn small.key { display: none; } }
.preacts { display: flex; gap: 8px; justify-content: center; }
.preacts button { height: 36px; padding: 0 14px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line-2); font-weight: 600; font-size: 13px; color: var(--muted); }
.preacts button.on { background: rgba(230,184,74,.18); color: var(--accent); border-color: rgba(230,184,74,.5); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn:focus:not(:focus-visible), button:focus:not(:focus-visible) { outline: none; }
.tile .mine { font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 8px; background: var(--surface-3); white-space: nowrap; }
.seat .hole.old .cardx, .seat .hn.old, .seat .act.old, .center .result.old { animation: none !important; }
.seat .hole .muck { font-size: 10px; text-transform: uppercase; letter-spacing: .08em; color: rgba(255,255,255,.55); background: rgba(0,0,0,.45); padding: 3px 7px; border-radius: 6px; white-space: nowrap; }
.volpop { position: absolute; right: 0; top: 44px; z-index: 30; display: flex; align-items: center; gap: 10px; padding: 8px 12px; background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 12px; box-shadow: var(--shadow); animation: pop .15s; }
.volpop input[type=range] { width: 140px; accent-color: var(--accent); }
.volpop .num { min-width: 26px; text-align: right; font-size: 13px; color: var(--muted); }
