/* =========================================================================
   The Inner Circle Poker: clean & minimal design system
   ========================================================================= */
:root {
  /* surfaces */
  --bg: #0d0f12;
  --bg-2: #111418;          /* inputs, inner wells */
  --panel: #15181d;         /* cards */
  --panel-2: #1b1f25;       /* hover / raised */
  --panel-3: #232830;
  --line: rgba(255, 255, 255, .07);
  --line-2: rgba(255, 255, 255, .12);
  /* text */
  --text: #eceef1;
  --muted: #8b929c;
  --faint: #5d646d;
  /* one accent, plus status colours */
  --accent: #23c17b;
  --accent-hover: #34d38c;
  --accent-soft: rgba(35, 193, 123, .12);
  --on-accent: #03140b;
  --gold: #e3b553;          /* chip amounts only */
  --gold-2: #e9c26a;
  --red: #ef5b60;
  --red-soft: rgba(239, 91, 96, .12);
  --blue: #5c9cf6;
  --blue-soft: rgba(92, 156, 246, .14);
  --green: var(--accent);
  --danger: var(--red);
  /* table */
  --felt-hi: #24825b;
  --felt: #1b6a4a;
  --felt-dark: #124733;
  --rail: #0a0c0f;
  --card: #f7f7f4;
  --card-red: #d22f3a;
  --card-black: #16181c;
  /* shape */
  --radius: 12px;
  --radius-lg: 16px;
  --seat-w: 136px;
  --card-w: 46px;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 14px;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); min-height: 100dvh; -webkit-tap-highlight-color: transparent; line-height: 1.45; }
button { font: inherit; color: inherit; cursor: pointer; }
input, select, textarea { font: inherit; }
[hidden] { display: none !important; }
.off { display: none !important; }
.muted { color: var(--muted); }
.small-text { font-size: 12.5px; }
.ok { color: var(--accent); font-weight: 600; }
.bad { color: var(--red); font-weight: 600; }
.spacer { flex: 1; }
h2, h3, h4 { letter-spacing: -.01em; }

/* icons */
.i { width: 18px; height: 18px; flex: none; vertical-align: -4px; }
.i.sm { width: 14px; height: 14px; vertical-align: -2px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  border: 1px solid var(--line-2); background: var(--panel-2); color: var(--text);
  padding: 9px 16px; border-radius: 10px; font-weight: 600; font-size: 14px; line-height: 1.2;
  transition: background .15s, border-color .15s, color .15s, transform .06s;
}
.btn:hover { background: var(--panel-3); }
.btn:active { transform: scale(.97); filter: brightness(.92); }
.btn:disabled { opacity: .4; cursor: not-allowed; }
/* Pressed action button: stays bright with a little spinner while the server confirms */
.btn.pressed, .btn.pressed:disabled { opacity: 1; transform: scale(.97); filter: brightness(.9); }
.btn.pressed::after { content: ''; width: 12px; height: 12px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .6s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
/* Taps register immediately on phones (no double-tap-to-zoom wait) */
html, button, a, input, select, label, .plate, .seat, .swatch { touch-action: manipulation; }
.btn.small { padding: 6px 12px; font-size: 13px; border-radius: 8px; }
.btn.big { padding: 13px 18px; font-size: 15px; width: 100%; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.ghost:hover { background: var(--panel-2); color: var(--text); }
.btn.icon-btn { padding: 7px; }
.btn.icon-btn .i { width: 18px; height: 18px; }
/* primary (kept as .gold so existing markup works) */
.btn.gold { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn.gold:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn.red { background: transparent; border-color: rgba(239, 91, 96, .4); color: #ff8a8e; }
.btn.red:hover { background: var(--red-soft); }
.btn.green { background: var(--panel-3); border-color: var(--line-2); color: var(--text); }
.btn.green:hover { background: #2b313a; }
.btn-row { display: flex; gap: 8px; }
.btn-row .btn { flex: 1; }

/* ---------- inputs ---------- */
input[type=text], input[type=email], input[type=number], input[type=password], input[type=search], input:not([type]), select, textarea {
  background: var(--bg-2); border: 1px solid var(--line-2); color: var(--text);
  padding: 10px 12px; border-radius: 10px; width: 100%; outline: none; transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
textarea { resize: vertical; }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 16px) 52%, calc(100% - 11px) 52%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 30px; }
label { display: grid; gap: 6px; font-size: 12.5px; color: var(--muted); font-weight: 500; }
input[type=range] { accent-color: var(--accent); }
.error { color: #ff8a8e; min-height: 1.2em; font-size: 13.5px; margin: 10px 0 0; }
.form { display: grid; gap: 14px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.hint { font-size: 12.5px; color: var(--muted); margin: 0; text-align: center; line-height: 1.5; }

/* switch */
.switch { position: relative; width: 40px; height: 22px; display: inline-block; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; background: var(--panel-3); border-radius: 999px; transition: .2s; cursor: pointer; }
.switch span::before { content: ''; position: absolute; width: 16px; height: 16px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .2s; }
.switch input:checked + span { background: var(--accent); }
.switch input:checked + span::before { transform: translateX(18px); }
.check-row { display: flex; flex-direction: row; align-items: center; gap: 8px; color: var(--text); font-size: 13px; margin: 4px 0 10px; }
.check-row input { width: auto; accent-color: var(--accent); }

/* tags & badges */
.tag-small, .game-tag, .bot-tag, .status-tag {
  display: inline-flex; align-items: center; font-size: 10.5px; font-weight: 600; letter-spacing: .02em;
  padding: 2px 7px; border-radius: 6px; vertical-align: 1px; text-transform: none; line-height: 1.4;
}
.tag-small { background: var(--accent-soft); color: var(--accent); }
.game-tag { background: var(--panel-3); color: var(--muted); }
.game-tag.plo { background: var(--blue-soft); color: var(--blue); }
.bot-tag { margin-left: 6px; background: var(--blue-soft); color: var(--blue); }
.status-tag { margin-left: 6px; }
.bad-tag { background: var(--red-soft); color: #ff8a8e; }
.ice-tag { background: var(--blue-soft); color: var(--blue); }
.badge, .nav-badge {
  background: var(--red); color: #fff; font-size: 10.5px; font-weight: 700; min-width: 17px; height: 17px; padding: 0 5px;
  border-radius: 999px; display: inline-grid; place-items: center; line-height: 1;
}
.badge { margin-left: 4px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11.5px; word-break: break-all; background: var(--bg-2); border: 1px solid var(--line); padding: 8px 10px; border-radius: 8px; color: var(--muted); }
.kbd { display: inline-flex; align-items: center; border: 1px solid var(--line-2); border-radius: 6px; padding: 1px 5px; background: var(--panel-2); }

/* =========================================================================
   Login
   ========================================================================= */
.lobby { min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; }
/* Welcome screen for logged-out visitors: the Inner Circle hero video, with Log in / Sign up on top
   (tappable from the first second). */
.welcome { min-height: 100dvh; background: #0d0f12; display: flex; align-items: center; justify-content: center; }
.hero { position: relative; width: 100%; height: 100vh; height: 100svh; min-height: 560px; overflow: hidden; background: #0d0f12; }
.hero-video, .hero-poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hero-nav { position: absolute; top: 0; left: 0; right: 0; z-index: 2; display: flex; justify-content: flex-end; gap: 12px;
  padding: max(20px, env(safe-area-inset-top)) clamp(16px, 4vw, 48px) 0; }
.hbtn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 48px; padding: 0 24px; border-radius: 999px;
  font: 600 16px/1 inherit; font-family: inherit; cursor: pointer; border: 0; transition: transform .15s, background .2s, box-shadow .2s; }
.hbtn:active { transform: scale(.96); }
.hbtn:focus-visible { outline: 3px solid #23c17b; outline-offset: 3px; }
.hbtn-ghost { color: #0d0f12; background: rgba(255, 255, 255, .75); border: 1px solid rgba(13, 15, 18, .14); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.hbtn-ghost:hover { background: #fff; }
.hbtn-solid { color: #0d0f12; background: #23c17b; box-shadow: 0 10px 30px -10px rgba(35, 193, 123, .8); }
.hbtn-solid:hover { background: #2fd68b; }
@media (orientation: portrait) {
  /* keep the whole 9:16 frame visible on narrow phones (no side cropping) */
  .hero { height: auto; min-height: 0; aspect-ratio: 9 / 16; max-height: 100svh; }
  .hbtn { height: 44px; padding: 0 18px; font-size: 15px; }
  /* Phones: dark strip under the status bar, then the video pinned to the top, and the spare space below it
     filled with the video's own grey so there are no black bands. Log in / Sign up sit in a bottom bar,
     in thumb reach and clear of the "Invite-only" tag baked into the top of the video. */
  .welcome { position: relative; align-items: flex-start; padding-top: env(safe-area-inset-top);
    background: linear-gradient(#0d0f12 0 env(safe-area-inset-top), #e2e4e8 env(safe-area-inset-top), #dbdee3 100%); }
  .hero { max-height: calc(100svh - env(safe-area-inset-top)); }
  .hero-nav { position: fixed; top: auto; bottom: 0; z-index: 3; flex-wrap: wrap; gap: 10px; justify-content: stretch;
    padding: 28px 16px calc(14px + env(safe-area-inset-bottom));
    background: linear-gradient(rgba(219, 222, 227, 0), rgba(219, 222, 227, .92) 30%, #dbdee3); }
  .hero-nav .hbtn { flex: 1 1 0; height: 52px; font-size: 16px; }
  .hero-nav .hbtn-solid { color: #0d0f12; }
  .hero-nav .hero-fine { display: block; flex-basis: 100%; margin: 0; text-align: center; font-size: 12px; color: rgba(13, 15, 18, .55); letter-spacing: .01em; }
}
.hero-fine { display: none; }
/* Join / Log in panel over the welcome felt: a bottom sheet on phones, a centred panel on bigger screens */
#auth { position: fixed; inset: 0; z-index: 60; min-height: 0; padding: 0; display: grid; place-items: center;
  background: rgba(0, 0, 0, 0); transition: background .3s ease; }
#auth.open { background: rgba(0, 0, 0, .5); }
#auth .lobby-card { position: relative; max-height: 92dvh; overflow-y: auto; opacity: 0; transform: translateY(24px) scale(.98);
  transition: transform .3s cubic-bezier(.2, .8, .2, 1), opacity .25s ease; }
#auth.open .lobby-card { opacity: 1; transform: none; }
#auth .brand-big, #auth .tagline, #auth .tabs { display: none; }
.sheet-handle { display: none; }
.sheet-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.sheet-head h2 { margin: 0; font-size: 22px; font-weight: 700; letter-spacing: -.01em; }
.sheet-head p { margin: 4px 0 0; color: var(--muted); font-size: 13.5px; }
.sheet-close { flex: none; background: var(--panel-2); border: 1px solid var(--line); border-radius: 50%; width: 34px; height: 34px; display: grid; place-items: center; color: var(--muted); }
.sheet-close:hover { color: var(--text); background: var(--panel-3); }
.auth-switch { margin: 14px 0 0; text-align: center; color: var(--muted); font-size: 13.5px; }
.auth-switch button { background: none; border: 0; padding: 0; color: var(--accent); font-weight: 600; }
.auth-switch button:hover { text-decoration: underline; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--accent); font: inherit; font-weight: 600; cursor: pointer; }
.linkbtn:hover { text-decoration: underline; }
.linkbtn:disabled { opacity: .5; cursor: default; text-decoration: none; }
.otp-input { font-size: 24px !important; letter-spacing: .4em; text-align: center; font-variant-numeric: tabular-nums; }
@media (max-width: 600px) {
  #auth { place-items: end stretch; }
  #auth .lobby-card { max-width: none; border-radius: 22px 22px 0 0; border-bottom: 0; opacity: 1; transform: translateY(100%);
    padding: 10px 20px calc(22px + env(safe-area-inset-bottom)); }
  .sheet-handle { display: block; width: 40px; height: 4px; border-radius: 2px; background: var(--line-2); margin: 0 auto 14px; }
}
@media (prefers-reduced-motion: reduce) { #auth, #auth .lobby-card { transition: none; } }
.lobby-card { width: 100%; max-width: 400px; background: var(--panel); border: 1px solid var(--line); border-radius: 20px; padding: 32px 28px 26px; }
.brand-big { display: flex; flex-direction: column; align-items: center; gap: 14px; font-size: 26px; font-weight: 700; letter-spacing: -.02em; text-align: center; line-height: 1.15; }
.brand-big .logo-card { height: 52px; margin: 0; }
.tagline { text-align: center; color: var(--muted); margin: 8px 0 24px; font-size: 14px; }
.tabs { display: grid; grid-template-columns: 1fr 1fr; background: var(--bg-2); border-radius: 10px; padding: 3px; margin-bottom: 20px; }
.tab { background: none; border: 0; padding: 9px; border-radius: 8px; color: var(--muted); font-weight: 600; font-size: 13.5px; }
.tab.active { background: var(--panel-3); color: var(--text); }
.code-input { text-transform: uppercase; letter-spacing: 6px; font-weight: 700; text-align: center; font-size: 20px !important; }

/* logo */
.logo-card { height: 1.25em; width: auto; vertical-align: -0.28em; margin-right: .45em; }
.brand { display: flex; align-items: center; font-weight: 700; font-size: 16px; letter-spacing: -.01em; white-space: nowrap; }
.brand .logo-card { height: 26px; }

/* =========================================================================
   Top bar (lobby and table)
   ========================================================================= */
.topbar {
  display: flex; align-items: center; gap: 10px; padding: 10px 20px; min-height: 58px;
  border-bottom: 1px solid var(--line); background: rgba(13, 15, 18, .86); backdrop-filter: blur(10px); position: relative; z-index: 5;
}
.me-chip { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14px; }
.wallet-chip { display: flex; align-items: center; gap: 7px; background: var(--panel-2); border-radius: 999px; padding: 5px 12px; font-size: 13.5px; font-weight: 600; color: var(--text); }
.wallet-chip .coin, .chip { width: 14px; height: 14px; border-radius: 50%; background: var(--gold); border: 2.5px dotted rgba(255, 255, 255, .85); flex: none; }
.code-chip { display: flex; align-items: center; gap: 8px; background: var(--panel-2); border: 0; border-radius: 999px; padding: 6px 12px; font-size: 13px; }
.code-chip strong { letter-spacing: 1.5px; color: var(--text); }
.code-chip .copy { font-size: 12px; color: var(--accent); }
.code-chip:hover { background: var(--panel-3); }
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; padding: 5px 11px; border-radius: 999px; background: var(--panel-2); color: var(--muted); white-space: nowrap; }
.pill .live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--faint); }
.pill.live { color: var(--text); }
.pill.live .live-dot { background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.panel-toggle { display: none; }

/* =========================================================================
   Lobby pages
   ========================================================================= */
.home { min-height: 100dvh; display: flex; flex-direction: column; }
.lobby-nav {
  position: sticky; top: 0; z-index: 4; display: flex; justify-content: center; gap: 2px;
  background: rgba(13, 15, 18, .92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); padding: 0 12px;
}
.lobby-nav button {
  position: relative; display: flex; align-items: center; gap: 8px; background: none; border: 0; color: var(--muted);
  font-weight: 600; font-size: 13.5px; padding: 14px 14px 13px; border-bottom: 2px solid transparent;
}
.lobby-nav button:hover { color: var(--text); }
.lobby-nav button.active { color: var(--text); border-bottom-color: var(--accent); }
.lobby-nav .ico { display: inline-flex; }
.lobby-nav .ico .i { width: 17px; height: 17px; }
.home-main { width: 100%; max-width: 820px; margin: 0 auto; padding: 28px 20px 56px; display: grid; gap: 16px; }

.home-section { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 20px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.section-head h2 { margin: 0; font-size: 16px; font-weight: 600; }
.section-head > div h2 { margin-bottom: 2px; }
h3.sub { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--faint); margin: 24px 0 10px; }
.empty-note { color: var(--muted); font-size: 13.5px; text-align: center; padding: 18px 12px; }

/* balance */
.balance-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 22px 20px; text-align: left; display: grid; gap: 2px; }
.balance-card .muted { font-size: 13px; }
.balance { font-size: 34px; font-weight: 700; letter-spacing: -.02em; color: var(--text); }
.balance::before { content: ''; display: inline-block; width: 18px; height: 18px; border-radius: 50%; background: var(--gold); border: 3px dotted rgba(255, 255, 255, .85); margin-right: 10px; vertical-align: 1px; }

/* create forms */
.create-table, .create-tourney { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; align-items: end; margin-bottom: 16px; padding: 16px; background: var(--bg-2); border-radius: var(--radius); }
.create-table .btn, .create-tourney .btn { grid-column: 1 / -1; }

/* table / tournament lists: rows divided by lines, not boxes */
.table-list { display: grid; }
.table-row { display: flex; align-items: center; gap: 14px; padding: 14px 4px; border-top: 1px solid var(--line); }
.table-row:first-child { border-top: 0; }
.table-row .code { min-width: 62px; font-weight: 700; letter-spacing: 1.5px; font-size: 13px; color: var(--text); }
.table-row .row-ico { min-width: 0; width: 36px; height: 36px; border-radius: 10px; background: var(--panel-2); display: grid; place-items: center; color: var(--muted); letter-spacing: 0; }
.table-row .info { flex: 1; min-width: 0; display: grid; gap: 3px; }
.table-row .info > div:first-child { font-size: 14px; }
.table-row .who { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.table-row .btns { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.lock-ico { color: var(--muted); }
.tourney-row.finished { opacity: .7; }
.place-badge { display: inline-grid; place-items: center; min-width: 28px; height: 20px; padding: 0 6px; border-radius: 6px; font-size: 11px; font-weight: 700; background: var(--panel-3); color: var(--text); }
.place-badge.p1 { background: rgba(227, 181, 83, .18); color: var(--gold-2); }
.place-badge.p2 { background: rgba(200, 205, 215, .14); color: #d7dbe2; }
.place-badge.p3 { background: rgba(205, 140, 90, .16); color: #e1a57a; }
.place-badge.sm { height: 18px; font-size: 10.5px; }

.practice-section .section-head h2 { display: flex; align-items: center; gap: 8px; }
.practice-row .code, .tourney-row .code { letter-spacing: 0; }
.install-tip { display: flex; align-items: center; gap: 14px; padding: 14px 16px; }
.install-tip .tip-ico { width: 38px; height: 38px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; }
.install-tip .tip-text { flex: 1; display: grid; gap: 2px; min-width: 0; }
.pending-note { text-align: center; }
.pending-note h2 { margin: 0 0 6px; font-size: 16px; }
.pending-note p { margin: 0; color: var(--muted); }

/* admin: accounts */
.search-row { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.search-row input { flex: 1; }
.account-list { display: grid; }
.acct { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; align-items: center; padding: 14px 2px; border-top: 1px solid var(--line); }
.account-list .acct:first-child { border-top: 0; }
.acct .who { display: flex; align-items: center; gap: 8px; min-width: 0; flex-wrap: wrap; }
.acct .who strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.acct .dot, .conv-item .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--faint); flex: none; }
.acct .dot.on, .conv-item .dot.on { background: var(--accent); }
.acct .bal { font-weight: 700; text-align: right; }
.acct .where { font-size: 12px; color: var(--muted); }
.acct .stats { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 12.5px; color: var(--muted); }
.acct .stats b { color: var(--text); font-weight: 600; }
.acct .ctrl { grid-column: 1 / -1; display: flex; gap: 6px; flex-wrap: wrap; }
.acct .ctrl input { width: 120px; flex: 1 1 110px; padding: 6px 10px; }
.acct.pending { padding: 12px 14px; border: 1px solid rgba(227, 181, 83, .3); border-radius: var(--radius); background: rgba(227, 181, 83, .05); margin-bottom: 8px; }
.pending-box { margin-bottom: 18px; padding-bottom: 6px; }
.ledger { display: grid; gap: 6px; font-size: 13px; max-height: 280px; overflow-y: auto; }
.ledger div { color: var(--muted); }
.ledger b { color: var(--text); font-weight: 600; }

/* messages */
.msgs { display: grid; grid-template-columns: 220px 1fr; height: 440px; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--bg-2); }
.conv-list { border-right: 1px solid var(--line); overflow-y: auto; padding: 8px; }
.conv-item { display: flex; align-items: center; gap: 10px; width: 100%; background: none; border: 0; padding: 9px 10px; border-radius: 8px; text-align: left; font-size: 13.5px; color: var(--muted); }
.conv-item:hover { background: var(--panel-2); color: var(--text); }
.conv-item.active { background: var(--panel-2); color: var(--text); }
.conv-name { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conv-icon { width: 7px; text-align: center; color: var(--accent); font-weight: 700; }
.unread-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: none; }
.conv-sep { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--faint); padding: 12px 10px 4px; }
.conv { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--panel); }
.conv-head { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
#oConvBack { display: none; }
.conv-log { flex: 1; overflow-y: auto; padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; }
.bubble { max-width: 76%; align-self: flex-start; background: var(--panel-2); border-radius: 14px 14px 14px 4px; padding: 8px 12px; font-size: 13.5px; overflow-wrap: anywhere; }
.bubble.mine { align-self: flex-end; background: var(--accent-soft); border-radius: 14px 14px 4px 14px; }
.bubble .from { font-size: 12px; font-weight: 600; color: var(--accent); margin-bottom: 2px; }
.bubble .time { font-size: 10.5px; color: var(--faint); text-align: right; margin-top: 3px; }
.chat-form { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--line); }
.chat-form input { padding: 9px 12px; }

/* owner panel */
.otabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin: 0 -20px 18px; padding: 0 14px; overflow-x: auto; }
.otab { display: inline-flex; align-items: center; gap: 6px; background: none; border: 0; padding: 10px 10px 11px; color: var(--muted); font-weight: 600; font-size: 13.5px; white-space: nowrap; border-bottom: 2px solid transparent; }
.otab:hover { color: var(--text); }
.otab.active { color: var(--text); border-bottom-color: var(--accent); }
.check-banner { display: flex; align-items: center; gap: 8px; border-radius: var(--radius); padding: 12px 14px; font-weight: 600; margin-bottom: 10px; font-size: 13.5px; }
.check-banner.is-ok { background: var(--accent-soft); color: var(--accent); }
.check-banner.is-bad { background: var(--red-soft); color: #ff8a8e; }
.ohands { display: grid; gap: 10px; }
.ohand { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; display: grid; gap: 10px; margin-bottom: 10px; }
.ohand.bad-hand { border-color: rgba(239, 91, 96, .5); }
.ohand .hist-top { flex-wrap: wrap; justify-content: flex-start; gap: 6px 12px; }
.ohand .mini { display: flex; gap: 3px; }
.ohand .mini .card { --card-w: 26px; box-shadow: none; }
.ohand .rp-players { margin: 0; }
.sec-block { margin-bottom: 22px; }
.flag { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; margin-bottom: 8px; display: grid; gap: 8px; }
.flag.resolved { opacity: .55; }
.flag-top { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
.flag .sev { font-size: 10.5px; font-weight: 600; padding: 2px 7px; border-radius: 6px; background: var(--panel-3); color: var(--muted); }
.flag.sev-high .sev { background: var(--red-soft); color: #ff8a8e; }
.flag.sev-medium .sev { background: rgba(227, 181, 83, .14); color: var(--gold-2); }
.flag.sev-low .sev { background: var(--blue-soft); color: var(--blue); }
.flag-btns { display: flex; flex-wrap: wrap; gap: 6px; }
.sec-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.allow-form { display: flex; gap: 8px; align-items: center; margin-top: 10px; }
.allow-form select { flex: 1; padding: 8px 30px 8px 10px; }

/* =========================================================================
   Game screen
   ========================================================================= */
.game { height: 100dvh; display: flex; flex-direction: column; }
.layout { flex: 1; display: grid; grid-template-columns: 1fr 340px; min-height: 0; }
.table-area { display: flex; flex-direction: column; min-height: 0; min-width: 0; padding: 14px 20px 16px; position: relative; }

/* owner-only card peek */
.peek {
  position: absolute; left: 16px; bottom: 96px; z-index: 30; width: 176px; max-height: 46vh; overflow: auto;
  background: rgba(12, 16, 20, .92); border: 1px solid rgba(231, 183, 74, .45); border-radius: 10px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .45); backdrop-filter: blur(6px); padding: 6px;
}
.peek-head { display: flex; align-items: center; justify-content: space-between; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--gold); padding: 2px 4px 6px; }
.peek-head button { background: none; border: 0; color: inherit; font-size: 13px; cursor: pointer; line-height: 1; padding: 2px; }
.peek-body { display: flex; flex-direction: column; gap: 2px; }
.peek-board { display: flex; gap: 2px; justify-content: center; padding: 2px 0 5px; }
.peek-sub { font-size: 9px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); text-align: center; padding-top: 3px; }
.peek .card.ghost { filter: grayscale(1) brightness(.5); opacity: .5; outline: 1px dashed rgba(255, 255, 255, .4); outline-offset: 1px; }
.peek-row { display: flex; align-items: center; justify-content: space-between; gap: 5px; min-width: 0; padding: 3px 4px; border-radius: 6px; position: relative; isolation: isolate; }
.peek-row::before { content: ''; position: absolute; inset: 0 auto 0 0; width: var(--eq, 0%); background: rgba(231, 183, 74, .16); border-radius: 6px; z-index: -1; transition: width .25s ease; }
.peek-eq { font-size: 9.5px; font-weight: 700; color: var(--gold); flex: 0 0 auto; min-width: 44px; text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.peek-row:nth-child(odd) { background: rgba(255, 255, 255, .04); }
.peek-row.folded { opacity: .45; }
.peek-name { font-size: 11px; color: #e8e4da; flex: 1 1 auto; min-width: 30px; max-width: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.peek-cards { display: flex; gap: 2px; flex: 0 0 auto; }
.peek .card { --card-w: 17px; border-radius: 3px; box-shadow: none; }
.peek .card .r, .peek .card .s { font-size: 9px; }
.tourney-bar { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: center; justify-content: center; font-size: 13px; color: var(--muted); background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 9px 14px; margin-bottom: 4px; }
.tourney-bar b { color: var(--text); font-weight: 600; }
.tourney-bar .t-name { display: inline-flex; align-items: center; gap: 6px; color: var(--text); font-weight: 600; }

/* the table */
.table-wrap { position: relative; flex: 1; min-height: 300px; margin: 36px calc(var(--seat-w) / 2 + 6px) 52px; }
.felt {
  position: absolute; inset: 0; border-radius: 999px;
  background: radial-gradient(ellipse at 50% 38%, var(--felt-hi) 0%, var(--felt) 50%, var(--felt-dark) 100%);
  box-shadow: 0 0 0 10px var(--rail), 0 0 0 11px rgba(255, 255, 255, .06), 0 30px 60px rgba(0, 0, 0, .55), inset 0 0 50px rgba(0, 0, 0, .35);
}
.felt::before { content: ''; position: absolute; inset: 18px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .07); }
.felt-inner { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 0 12%; text-align: center; }
.board { display: flex; gap: 7px; min-height: calc(var(--card-w) * 1.4); }
.board .slot { width: var(--card-w); height: calc(var(--card-w) * 1.4); border-radius: 6px; border: 1px dashed rgba(255, 255, 255, .14); }
.board2 { margin-top: -4px; }
.board.run1::before, .board2::before { font-size: 9.5px; font-weight: 700; letter-spacing: .08em; color: rgba(255, 255, 255, .55); writing-mode: vertical-rl; transform: rotate(180deg); align-self: center; margin-right: 2px; }
.board.run1::before { content: 'RUN 1'; }
.board2::before { content: 'RUN 2'; }
.pot { font-weight: 600; font-size: 14px; background: rgba(0, 0, 0, .3); padding: 4px 14px; border-radius: 999px; }
.pot:empty { display: none; }
.center-msg { font-size: 13.5px; color: rgba(255, 255, 255, .85); max-width: 100%; min-height: 1.3em; }
.center-msg strong { color: #fff; font-weight: 600; }
.hand-tag { font-size: 11px; font-weight: 600; color: var(--on-accent); background: var(--gold); padding: 3px 9px; border-radius: 6px; }

/* cards */
.card {
  width: var(--card-w); height: calc(var(--card-w) * 1.4); border-radius: 6px; background: var(--card);
  color: var(--card-black); position: relative; box-shadow: 0 2px 6px rgba(0, 0, 0, .35); flex: none;
  display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; user-select: none;
}
.card.red { color: var(--card-red); }
.card .r { font-weight: 700; font-size: calc(var(--card-w) * .4); letter-spacing: -.04em; }
.card .s { font-size: calc(var(--card-w) * .4); margin-top: 1px; }
.card.back { background: repeating-linear-gradient(135deg, #8d2330 0 5px, #a12b3a 5px 10px); border: 2.5px solid #f4f1ea; }
.card.win { box-shadow: 0 0 0 2.5px var(--gold), 0 6px 16px rgba(0, 0, 0, .4); transform: translateY(-4px); }
.card.dim { filter: brightness(.55) saturate(.6); }
.card.rabbit { opacity: .55; outline: 1.5px dashed rgba(255, 255, 255, .55); outline-offset: 2px; }
.card.new { animation: deal .28s ease-out; }
@keyframes deal { from { transform: translateY(-12px) scale(.9); opacity: 0; } to { transform: none; opacity: 1; } }
body.fourcolor .card.s-d { color: #2a6fdb; }
body.fourcolor .card.s-c { color: #17924a; }
body[data-back="blue"] .card.back { background: repeating-linear-gradient(135deg, #1f4f92 0 5px, #2a62ad 5px 10px); }
body[data-back="green"] .card.back { background: repeating-linear-gradient(135deg, #1c6a3b 0 5px, #268148 5px 10px); }
body[data-back="black"] .card.back { background: repeating-linear-gradient(135deg, #1a1a1a 0 5px, #2c2c2c 5px 10px); }
body[data-felt="blue"] { --felt-hi: #2a77b0; --felt: #1d5a87; --felt-dark: #123a59; }
body[data-felt="red"] { --felt-hi: #9e3540; --felt: #7a222c; --felt-dark: #4a1219; }
body[data-felt="purple"] { --felt-hi: #683f9c; --felt: #4e2c78; --felt-dark: #2f1949; }
body[data-felt="grey"] { --felt-hi: #4b545e; --felt: #353c44; --felt-dark: #1f2328; }

/* seats */
.seat { position: absolute; left: var(--x); top: var(--y); transform: translate(-50%, -50%); width: var(--seat-w); display: flex; flex-direction: column; align-items: center; z-index: 2; }
.seat .hole { display: flex; gap: 3px; height: calc(var(--card-w) * 1.4 * .82); margin-bottom: -10px; position: relative; z-index: 0; }
.seat .hole .card { --card-w: 38px; justify-content: flex-start; padding-top: 4px; }
.seat.me .hole .card { --card-w: 48px; }
.seat.me .hole { height: calc(48px * 1.4 * .82); }
body.plo .seat .hole .card { margin-left: -14px; }
body.plo .seat .hole .card:first-child { margin-left: 0; }
body.plo .seat.me .hole .card { margin-left: -18px; }
body.plo .seat.me .hole .card:first-child { margin-left: 0; }
.plate {
  position: relative; z-index: 1; width: 100%; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 8px;
  background: #121519; border: 1px solid var(--line-2); border-radius: 14px; padding: 6px 10px 7px 6px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, .35); overflow: hidden; text-align: left;
}
.plate .pinfo { min-width: 0; }
.plate .name { display: flex; align-items: center; gap: 4px; font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text); }
.plate .chips { font-size: 13px; font-weight: 700; color: var(--gold-2); }
.plate .host-star { color: var(--gold); display: inline-flex; }
.plate .host-star .i { width: 12px; height: 12px; }
.plate .timer { position: absolute; left: 0; bottom: 0; height: 2.5px; background: var(--accent); width: 0; }
.plate .timer.low { background: var(--red); }
.plate .timer.bank { background: var(--gold); }
.plate .take-seat { grid-column: 1 / -1; font-size: 11px; font-weight: 600; color: var(--on-accent); background: var(--accent); border-radius: 6px; padding: 3px 6px; text-align: center; }
.plate.clickable { cursor: pointer; }
.plate.clickable:hover { border-color: rgba(255, 255, 255, .22); }
.av-circle { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--panel-3); color: var(--text); font-weight: 700; font-size: 13px; flex: none; }
.av-circle.emoji { font-size: 16px; background: var(--panel-2); }
.av-circle.bot { color: var(--blue); background: var(--blue-soft); }
.av-circle.bot .i { width: 16px; height: 16px; }
.seat.me .plate { border-color: rgba(35, 193, 123, .45); }
.seat.turn .plate { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft), 0 6px 18px rgba(0, 0, 0, .35); }
.seat.folded .plate, .seat.folded .hole { opacity: .42; }
.seat.out .plate { opacity: .5; }
.seat.winner .plate { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(227, 181, 83, .22), 0 6px 18px rgba(0, 0, 0, .35); }
.seat.offline .name::after { content: ' · offline'; color: var(--muted); font-weight: 400; font-size: 11px; }
.seat.reserved .plate { border-color: var(--accent); border-style: dashed; }
.seat .action-tag {
  position: absolute; right: 3px; bottom: 3px; z-index: 4; white-space: nowrap;
  font-size: 8.5px; font-weight: 700; padding: 1px 5px; border-radius: 4px; background: var(--panel-3); color: var(--text); border: 1px solid var(--line-2);
}
.action-tag.fold { color: var(--muted); }
.action-tag.all-in { background: var(--red); border-color: var(--red); color: #fff; }
.action-tag.raise, .action-tag.bet { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.seat .hand-name { font-size: 11px; font-weight: 600; color: #fff; margin-top: 5px; text-align: center; white-space: nowrap; text-shadow: 0 1px 3px rgba(0, 0, 0, .8); }
.seat.empty .plate { display: block; background: rgba(0, 0, 0, .18); border: 1px dashed rgba(255, 255, 255, .14); box-shadow: none; text-align: center; padding: 4px; }
.seat.empty button { background: none; border: 0; color: rgba(255, 255, 255, .55); font-size: 12.5px; padding: 6px 0; width: 100%; }
.seat.empty button:hover { color: #fff; }
.note-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; flex: none; }
.c-none { background: var(--muted); }
.c-red { background: #e5484d; } .c-orange { background: #f08a24; } .c-yellow { background: #e9c73c; }
.c-green { background: #30a46c; } .c-blue { background: #3e8ef7; } .c-purple { background: #9d5bd2; }

.bet { position: absolute; left: var(--x); top: var(--y); transform: translate(-50%, calc(-50% + var(--dir, 0) * 1px)); z-index: 1; display: flex; align-items: center; gap: 5px; font-weight: 600; font-size: 12.5px; background: rgba(0, 0, 0, .4); padding: 2px 8px 2px 3px; border-radius: 999px; font-size: 11.5px; }
.dealer { position: absolute; left: var(--x); top: var(--y); transform: translate(-50%, -50%); z-index: 1; width: 22px; height: 22px; border-radius: 50%; background: #fff; color: #111; font-weight: 700; font-size: 11px; display: grid; place-items: center; box-shadow: 0 2px 6px rgba(0, 0, 0, .45); transition: left .4s, top .4s; }
.chip-fly { position: absolute; width: 14px; height: 14px; border-radius: 50%; background: var(--gold); border: 2.5px dotted rgba(255, 255, 255, .85); transform: translate(-50%, -50%); z-index: 4; pointer-events: none; transition: left .45s cubic-bezier(.3, .7, .4, 1), top .45s cubic-bezier(.3, .7, .4, 1), opacity .45s ease-in; }

/* reactions */
.react-wrap { position: absolute; left: -6px; bottom: -44px; z-index: 6; }
.react-btn { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line-2); background: var(--panel); color: var(--muted); display: grid; place-items: center; }
.react-btn:hover { color: var(--text); background: var(--panel-2); }
.react-palette { position: absolute; bottom: 46px; left: 0; display: grid; grid-template-columns: repeat(5, 40px); gap: 4px; background: var(--panel); border: 1px solid var(--line-2); border-radius: 12px; padding: 6px; box-shadow: 0 12px 30px rgba(0, 0, 0, .5); }
.react-palette button { font-size: 21px; height: 40px; border-radius: 8px; background: none; border: 0; }
.react-palette button:hover { background: var(--panel-2); }
.react-bubble { position: absolute; transform: translateX(-50%); font-size: 32px; z-index: 5; pointer-events: none; animation: reactPop 2.6s ease-out forwards; filter: drop-shadow(0 4px 8px rgba(0, 0, 0, .5)); }
@keyframes reactPop { 0% { transform: translate(-50%, 10px) scale(.3); opacity: 0; } 12% { transform: translate(-50%, -6px) scale(1.15); opacity: 1; } 25% { transform: translate(-50%, -10px) scale(1); } 80% { opacity: 1; } 100% { transform: translate(-50%, -40px) scale(.9); opacity: 0; } }

/* action bar */
.action-bar { min-height: 72px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 12px 14px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: center; }
.action-bar .status { color: var(--muted); font-size: 14px; text-align: center; width: 100%; }
.action-bar .status strong { color: var(--text); font-weight: 600; }
.act-main { display: flex; gap: 8px; flex: 1 1 320px; }
.act-main .btn { flex: 1; padding: 13px 10px; font-size: 15px; border-radius: 12px; }
.raise-box { display: flex; flex-direction: column; gap: 8px; flex: 1 1 340px; }
.presets { display: flex; gap: 6px; }
.presets .btn { flex: 1; padding: 6px 4px; font-size: 12px; background: var(--bg-2); border-color: var(--line); }
.raise-row { display: flex; gap: 10px; align-items: center; }
.raise-row input[type=range] { flex: 1; }
.raise-row input[type=number] { width: 96px; padding: 8px; text-align: center; font-weight: 600; }
.your-turn { width: 100%; text-align: center; font-size: 12.5px; color: var(--accent); font-weight: 600; }
.pre-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; width: 100%; }
.pre { display: inline-flex; align-items: center; gap: 8px; background: var(--bg-2); border: 1px solid var(--line-2); color: var(--text); padding: 8px 14px; border-radius: 10px; font-weight: 500; font-size: 13.5px; }
.pre .box { width: 15px; height: 15px; border-radius: 4px; border: 1.5px solid var(--muted); display: inline-grid; place-items: center; }
.pre.on { border-color: var(--accent); background: var(--accent-soft); }
.pre.on .box { border-color: var(--accent); background: var(--accent); }
.pre.on .box::after { content: '\2713'; color: var(--on-accent); font-size: 11px; font-weight: 900; line-height: 1; }
.bank-note { width: 100%; text-align: center; font-size: 12px; color: var(--faint); }
.after-hand { display: flex; gap: 8px; justify-content: center; width: 100%; }

/* side panel */
.panel { border-left: 1px solid var(--line); background: var(--panel); display: flex; flex-direction: column; min-height: 0; }
.panel-tabs { display: flex; border-bottom: 1px solid var(--line); padding: 0 8px; }
.ptab { flex: 1; background: none; border: 0; padding: 13px 6px 12px; color: var(--muted); font-weight: 600; font-size: 13px; border-bottom: 2px solid transparent; }
.ptab:hover { color: var(--text); }
.ptab.active { color: var(--text); border-bottom-color: var(--accent); }
.ptab.close-panel { display: none; flex: 0 0 44px; }
.ppane { flex: 1; overflow-y: auto; padding: 16px; min-height: 0; }
.ppane[data-ppane=chat] { display: flex; flex-direction: column; padding: 0; }
.chat-log { flex: 1; overflow-y: auto; padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; }
.chat-log .sys { color: var(--faint); font-size: 12.5px; }
.chat-log .msg b { color: var(--accent); font-weight: 600; }
.section { margin-bottom: 22px; }
.section h4 { margin: 0 0 10px; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--faint); }
.section p { font-size: 13px; color: var(--muted); margin: 0 0 10px; line-height: 1.5; }
.host-players { display: grid; gap: 8px; }
.hp-row { background: var(--bg-2); border-radius: 10px; padding: 10px 12px; display: grid; gap: 8px; }
.hp-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.hp-top .n { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hp-top .c { font-weight: 700; white-space: nowrap; }
.hp-top .pend { font-size: 11px; color: var(--muted); }
.hp-ctrl { display: flex; gap: 6px; flex-wrap: wrap; }
.hp-ctrl input { padding: 6px 8px; min-width: 0; flex: 1 1 80px; }
.hp-ctrl .btn { white-space: nowrap; }
.settings-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 10px; }
.settings-grid input { padding: 8px; }
.setup-grid { display: grid; gap: 6px; margin-bottom: 8px; }
.setup-row { display: grid; grid-template-columns: 1fr repeat(var(--n, 2), 46px); gap: 6px; align-items: center; font-size: 13px; }
.setup-row input, .board-inputs input { padding: 6px; text-align: center; text-transform: none; }
.board-inputs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin-bottom: 8px; }
.setup-note { font-size: 12.5px; color: var(--muted); background: var(--bg-2); border-left: 3px solid var(--gold); border-radius: 6px; padding: 9px 12px; margin-bottom: 8px; line-height: 1.5; }
.history-list { display: grid; gap: 8px; }
.hist { background: var(--bg-2); border-radius: 10px; padding: 10px 12px; display: grid; gap: 7px; font-size: 13px; }
.hist-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.hist-btns { display: flex; gap: 4px; }
.hist .mini { display: flex; gap: 3px; }
.hist .mini .card { --card-w: 24px; box-shadow: none; }

/* =========================================================================
   Modals, toasts, settings
   ========================================================================= */
.modal { position: fixed; inset: 0; background: rgba(0, 0, 0, .6); backdrop-filter: blur(3px); display: grid; place-items: center; z-index: 50; padding: 16px; }
.modal-card { width: 100%; max-width: 520px; max-height: 90dvh; overflow-y: auto; background: var(--panel); border: 1px solid var(--line-2); border-radius: 18px; padding: 20px 22px 22px; box-shadow: 0 30px 80px rgba(0, 0, 0, .5); }
.modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.modal-head h3 { margin: 0; font-size: 17px; font-weight: 600; }
.rp-board { display: flex; gap: 6px; justify-content: center; min-height: 64px; padding: 14px; background: radial-gradient(ellipse, var(--felt), var(--felt-dark)); border-radius: var(--radius); margin-bottom: 12px; align-items: center; }
.rp-board .card { --card-w: 40px; }
.rp-event { text-align: center; font-weight: 600; margin-bottom: 12px; min-height: 1.4em; }
.rp-players { display: grid; gap: 6px; margin-bottom: 14px; }
.rp-p { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: center; background: var(--bg-2); padding: 7px 10px; border-radius: 8px; font-size: 13px; }
.rp-p.folded { opacity: .45; }
.rp-p .mini { display: flex; gap: 3px; }
.rp-p .mini .card { --card-w: 26px; box-shadow: none; }
.rp-ctrl { display: flex; gap: 8px; align-items: center; }
.rp-ctrl input { flex: 1; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--panel-3); border: 1px solid var(--line-2); padding: 11px 16px; border-radius: 12px; z-index: 60; font-size: 13.5px; box-shadow: 0 12px 30px rgba(0, 0, 0, .45); max-width: calc(100% - 32px); }
.toast.err { border-color: rgba(239, 91, 96, .5); color: #ffb3b6; }
.prefs { display: grid; gap: 16px; }
.pref-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.pref-row input[type=range] { width: 50%; }
.pref-preview { display: flex; gap: 6px; justify-content: center; }
.pref-preview .card { --card-w: 36px; }
.color-row { display: flex; gap: 8px; flex-wrap: wrap; }
.swatch { width: 30px; height: 30px; border-radius: 50%; border: 2px solid transparent; color: var(--muted); font-weight: 700; }
.swatch.c-none { background: var(--bg-2); border-color: var(--line-2); }
.swatch.on { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--accent); }
.avatar-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(42px, 1fr)); gap: 6px; }
.av { font-size: 21px; height: 42px; border-radius: 10px; background: var(--bg-2); border: 1px solid var(--line); color: var(--muted); }
.av.on { border-color: var(--accent); background: var(--accent-soft); }
.t-result { text-align: center; display: grid; gap: 6px; justify-items: center; }
.t-result .medal .place-badge { min-width: 64px; height: 40px; font-size: 18px; border-radius: 12px; }
.t-result p { margin: 4px 0; }
.ios-steps { margin: 0; padding-left: 20px; display: grid; gap: 10px; line-height: 1.5; }
.report-link { justify-self: start; }
#buyInForm .presets, #topUpForm .presets { display: flex; gap: 8px; }

/* =========================================================================
   Responsive
   ========================================================================= */
@media (max-width: 1100px) {
  .layout { grid-template-columns: 1fr; }
  .panel-toggle { display: inline-flex; }
  .panel { position: fixed; right: 0; top: 0; bottom: 0; width: min(380px, 100%); z-index: 40; transform: translateX(100%); transition: transform .2s ease; box-shadow: -20px 0 60px rgba(0, 0, 0, .5); }
  .panel.open { transform: none; }
  .ptab.close-panel { display: block; }
}
@media (max-width: 900px) {
  .create-table, .create-tourney { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 700px) {
  :root { --seat-w: 92px; --card-w: 34px; }
  .topbar { gap: 8px; padding: 8px 12px; min-height: 52px; flex-wrap: wrap; row-gap: 6px; position: sticky; top: 0; }
  .topbar .btn.small { white-space: nowrap; }
  #game .topbar .spacer { flex-basis: 100%; height: 0; }
  #game .brand, .code-chip .muted, .code-chip .copy { display: none; }
  .code-chip, .pill { padding: 5px 10px; font-size: 12px; }
  .topbar .btn.small { padding: 5px 9px; font-size: 12px; }
  .game { height: auto; min-height: 100dvh; }
  .table-area { padding: 8px 10px 12px; }
  .table-wrap { flex: none; height: max(330px, calc(100dvh - 330px)); min-height: 0; margin: 40px calc(var(--seat-w) / 2 - 4px) 48px; }
  .felt { border-radius: 46% / 40%; box-shadow: 0 0 0 7px var(--rail), 0 0 0 8px rgba(255, 255, 255, .06), 0 20px 50px rgba(0, 0, 0, .55), inset 0 0 40px rgba(0, 0, 0, .35); }
  .felt::before { inset: 10px; border-radius: 46% / 40%; }
  .felt-inner { padding: 0 8%; gap: 6px; }
  .board { gap: 4px; }
  .seat .hole .card { --card-w: 28px; }
  .seat.me .hole .card { --card-w: 40px; }
  .seat.me .hole { height: calc(40px * 1.4 * .82); }
  .plate { grid-template-columns: 1fr; padding: 5px 6px 6px; gap: 0; text-align: center; border-radius: 12px; }
  .plate .av-circle { display: none; }
  .plate .name { justify-content: center; font-size: 11.5px; }
  .plate .chips { font-size: 12px; }
  .bet { font-size: 11px; }
  .chip { width: 11px; height: 11px; border-width: 2px; }
  .seat .hand-name { font-size: 10px; white-space: normal; }
  .center-msg { font-size: 12.5px; }
  .act-main .btn { padding: 12px 6px; font-size: 14px; }
  .action-bar { padding: 10px; gap: 8px; }
  .react-wrap { left: -4px; bottom: -46px; }
  .react-btn { width: 34px; height: 34px; }
  /* lobby: bottom tab bar */
  .lobby-nav { position: fixed; top: auto; bottom: 0; left: 0; right: 0; justify-content: space-around; gap: 0; padding: 2px 4px calc(2px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); border-bottom: 0; }
  .lobby-nav button { flex-direction: column; gap: 3px; padding: 8px 4px 7px; font-size: 10.5px; flex: 1; min-width: 0; border-bottom: 0; border-top: 2px solid transparent; }
  .lobby-nav button.active { border-top-color: var(--accent); }
  .lobby-nav .ico .i { width: 21px; height: 21px; }
  .lobby-nav .nav-badge { position: absolute; top: 4px; left: calc(50% + 6px); }
  #lobby .home-main { padding: 16px 12px 96px; }
  #lobby .me-chip #meName { max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  #lobby .brand { font-size: 14px; }
  #lobby .brand .logo-card { height: 22px; }
  .otabs { margin: 0 -20px 16px; }
}
@media (max-width: 600px) {
  .home-section { padding: 16px; border-radius: 14px; }
  .balance { font-size: 30px; }
  .table-row { flex-wrap: wrap; }
  .table-row .info { flex-basis: calc(100% - 90px); }
  .table-row .btns { width: 100%; justify-content: stretch; }
  .table-row .btns .btn { flex: 1; padding: 9px; }
  .create-table, .create-tourney { grid-template-columns: 1fr 1fr; padding: 12px; }
  .msgs { grid-template-columns: 1fr; }
  .msgs .conv { display: none; }
  .msgs.open .conv-list { display: none; }
  .msgs.open .conv { display: flex; }
  #oConvBack { display: inline-flex; }
  .tourney-bar { font-size: 12px; gap: 4px 12px; }
  .lobby-card { padding: 26px 20px 22px; }
}
@media (max-width: 420px) { .brand-big { font-size: 23px; } .brand-big .logo-card { height: 46px; } }
@media (prefers-reduced-motion: reduce) { .card.new, .react-bubble { animation: none; } .chip-fly { display: none; } }

/* Installed app on phones: keep content clear of the status bar / notch */
.topbar { padding-top: calc(10px + env(safe-area-inset-top)); padding-left: max(20px, env(safe-area-inset-left)); padding-right: max(20px, env(safe-area-inset-right)); }
.lobby { padding-top: calc(24px + env(safe-area-inset-top)); }
.modal { padding-top: calc(16px + env(safe-area-inset-top)); }
@media (max-width: 1100px) { .panel { padding-top: env(safe-area-inset-top); } }
@media (max-width: 700px) {
  .topbar { padding-top: calc(8px + env(safe-area-inset-top)); padding-left: max(12px, env(safe-area-inset-left)); padding-right: max(12px, env(safe-area-inset-right)); }
  /* lobby header: one row, logo only */
  #lobby .topbar { flex-wrap: nowrap; gap: 4px; }
  #lobby .brand { font-size: 0; }
  #lobby .brand .logo-card { height: 28px; margin: 0; }
  #lobby .wallet-chip { margin-right: 4px; }
  #lobby .me-chip { font-size: 13px; gap: 6px; min-width: 0; }
  #lobby .me-chip #meName { max-width: 80px; }
  #lobby .topbar .icon-btn { padding: 6px; }
  .toast { bottom: calc(84px + env(safe-area-inset-bottom)); }
}

/* Phone table: everything fits on one screen (no scrolling to reach the buttons) */
@media (max-width: 700px) {
  .peek { left: 8px; right: 8px; bottom: auto; top: 58px; width: auto; max-width: none; max-height: 42vh; }
  .peek .card { --card-w: 16px; }
  .peek-name { max-width: none; font-size: 12px; }
  .peek-eq { min-width: 42px; font-size: 9px; }
  .game { height: 100dvh; min-height: 0; }
  .table-area { flex: 1; min-height: 0; padding: 6px 10px calc(8px + env(safe-area-inset-bottom)); }
  .table-wrap { flex: 1 1 auto; height: auto; min-height: 230px; margin: 42px calc(var(--seat-w) / 2 - 4px) 46px; }
  #game .topbar { gap: 6px; row-gap: 4px; padding-bottom: 6px; }
  #game .topbar .btn.small { padding: 5px 8px; }
  .action-bar { flex: none; min-height: 0; padding: 8px; gap: 6px; border-radius: 14px; }
  .action-bar .status, .your-turn { font-size: 12.5px; }
  .act-main { flex-basis: 100%; }
  .act-main .btn { padding: 11px 6px; }
  .raise-box { flex-basis: 100%; gap: 6px; }
  .presets { flex-wrap: wrap; }
  .presets .btn { padding: 5px 2px; font-size: 11.5px; flex: 1 1 calc(25% - 6px); white-space: nowrap; }
  .raise-row input[type=number] { width: 76px; padding: 6px; }
  .bank-note { display: none; }
  /* your own cards: Omaha's 4 cards fit across your seat */
  .seat.me { width: 112px; }
  body.plo .seat.me .hole .card { --card-w: 34px; margin-left: -9px; }
  body.plo .seat.me .hole .card:first-child { margin-left: 0; }
  body.plo .seat.me .hole { height: calc(34px * 1.4 * .82); }
  body.plo .seat .hole .card { --card-w: 24px; margin-left: -10px; }
  body.plo .seat .hole .card:first-child { margin-left: 0; }
}

/* owner scripted hand */
.script-label { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 8px 0 4px; }
.script-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.script-chip { font-size: 11.5px; padding: 4px 7px; border-radius: 6px; border: 1px solid var(--line); background: var(--panel); color: var(--text); cursor: pointer; }
.script-chip.on { border-color: var(--gold); color: var(--on-accent); background: var(--gold); font-weight: 600; }
.script-presets { display: flex; flex-direction: column; gap: 3px; max-height: 210px; overflow: auto; }
.script-presets .script-chip { text-align: left; }
.script-sev { font-size: 10px; text-transform: uppercase; letter-spacing: .1em; color: var(--faint, var(--muted)); margin: 6px 0 2px; }
.script-armed p { margin: 0 0 6px; }
.script-preview { display: flex; flex-direction: column; gap: 3px; margin-bottom: 8px; }
.script-row { display: flex; align-items: center; justify-content: space-between; gap: 6px; font-size: 12px; }
.script-cards { display: flex; gap: 2px; }
.script-row .card { --card-w: 18px; }

/* =========================================================================
   Emerald theme: deep green glow, glass cards, glowing felt, pill buttons
   ========================================================================= */
:root {
  --bg: #06120d;
  --bg-2: #0b1813;
  --panel: #0e1a15;
  --panel-2: #14231c;
  --panel-3: #1b2d25;
  --line: rgba(255, 255, 255, .07);
  --line-2: rgba(255, 255, 255, .11);
  --text: #f1f5f3;
  --muted: #8fa39a;
  --faint: #5f746b;
  --accent: #2fd59b;
  --accent-hover: #4ae3ad;
  --accent-soft: rgba(47, 213, 155, .13);
  --on-accent: #032117;
  --felt-hi: #25a676;
  --felt: #168058;
  --felt-dark: #0c5038;
  --rail: #08110d;
  --glass: linear-gradient(180deg, rgba(255, 255, 255, .055), rgba(255, 255, 255, .02));
  --glass-line: rgba(255, 255, 255, .085);
  --glow: 0 0 28px rgba(47, 213, 155, .35);
}
html { background: #06120d; }
body {
  background:
    radial-gradient(120% 60% at 50% -10%, rgba(38, 160, 110, .38), transparent 60%),
    radial-gradient(80% 50% at 50% 110%, rgba(20, 110, 75, .22), transparent 70%),
    linear-gradient(180deg, #0a2219 0%, #06120d 55%, #040c09 100%);
  background-attachment: fixed;
}

/* ---- buttons: soft pills ---- */
.btn { border-radius: 999px; padding: 10px 18px; background: rgba(255, 255, 255, .05); border-color: var(--glass-line); }
.btn:hover { background: rgba(255, 255, 255, .09); }
.btn.small { border-radius: 999px; padding: 7px 14px; }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.gold { background: linear-gradient(180deg, #45e5ac, #22c98b); border-color: transparent; color: var(--on-accent); box-shadow: 0 6px 22px rgba(47, 213, 155, .32), inset 0 1px 0 rgba(255, 255, 255, .35); }
.btn.gold:hover { background: linear-gradient(180deg, #5bedb9, #2fd59b); }
input[type=text], input[type=email], input[type=number], input[type=password], input[type=search], select, textarea { background-color: rgba(0, 0, 0, .28); border-color: var(--glass-line); border-radius: 12px; }

/* ---- top bars & nav: frosted glass ---- */
.topbar { background: rgba(6, 18, 13, .55); border-bottom-color: rgba(255, 255, 255, .06); backdrop-filter: blur(16px) saturate(1.3); -webkit-backdrop-filter: blur(16px) saturate(1.3); }
.wallet-chip, .code-chip, .pill { background: rgba(255, 255, 255, .06); border: 1px solid var(--glass-line); }
.lobby-nav { background: rgba(6, 18, 13, .6); backdrop-filter: blur(16px) saturate(1.3); -webkit-backdrop-filter: blur(16px) saturate(1.3); border-color: rgba(255, 255, 255, .06); }
.lobby-nav button.active { color: var(--accent); }

/* ---- lobby: glass cards ---- */
.home-section, .balance-card {
  background: var(--glass); border: 1px solid var(--glass-line); border-radius: 24px;
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05), 0 18px 40px rgba(0, 0, 0, .25);
}
.section-head h2 { font-size: 18px; font-weight: 700; letter-spacing: -.02em; }
.balance-card { position: relative; overflow: hidden; padding: 22px 22px 24px; gap: 6px; }
.balance-card > .muted:first-child { text-transform: uppercase; letter-spacing: .16em; font-size: 12px; font-weight: 600; color: rgba(255, 255, 255, .62); }
.balance { font-size: 52px; font-weight: 700; letter-spacing: -.035em; line-height: 1.05; }
.balance-card::after { content: ''; position: absolute; right: -60px; top: -60px; width: 200px; height: 200px; border-radius: 50%; background: radial-gradient(circle, rgba(47, 213, 155, .18), transparent 70%); pointer-events: none; }
.table-list { gap: 10px; }
.table-row { background: rgba(255, 255, 255, .035); border: 1px solid rgba(255, 255, 255, .06); border-radius: 18px; padding: 14px; }
.table-row:first-child { border-top: 1px solid rgba(255, 255, 255, .06); }
.table-row .row-ico { border-radius: 50%; background: var(--accent-soft); color: var(--accent); box-shadow: inset 0 0 0 1.5px rgba(47, 213, 155, .35); }
.game-tag { border-radius: 999px; }
.install-tip .tip-ico { border-radius: 50%; }
.create-table, .create-tourney { background: rgba(0, 0, 0, .22); border-radius: 18px; }
.modal-card, .lobby-card { background: linear-gradient(180deg, #11231b, #0b1712); border: 1px solid var(--glass-line); }
.panel { background: rgba(8, 20, 15, .92); }

/* ---- table header: "Table 07 / No-Limit Hold'em · 50/100 / ● Live · 7" ---- */
#statusPill { display: none; }
.table-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 2px 4px 0; }
.th-title { font-size: 26px; font-weight: 700; letter-spacing: -.03em; line-height: 1.1; display: flex; align-items: center; gap: 6px; }
.th-sub { font-size: 13px; color: rgba(255, 255, 255, .6); margin-top: 3px; }
.th-live { flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px; font-size: 12.5px; font-weight: 600; color: var(--muted); background: rgba(0, 0, 0, .25); border: 1px solid var(--glass-line); margin-top: 4px; }
.th-live .live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--faint); }
.th-live.live { color: var(--accent); border-color: rgba(47, 213, 155, .45); background: rgba(47, 213, 155, .08); }
.th-live.live .live-dot { background: var(--accent); box-shadow: 0 0 8px var(--accent); }

/* ---- the felt: lit from the middle, thin glowing rim ---- */
.felt {
  background: radial-gradient(ellipse at 50% 42%, var(--felt-hi) 0%, var(--felt) 48%, var(--felt-dark) 100%);
  box-shadow:
    0 0 0 2px rgba(90, 240, 180, .55),
    0 0 18px 2px rgba(47, 213, 155, .35),
    0 0 0 10px var(--rail),
    0 0 0 11px rgba(90, 240, 180, .14),
    0 30px 70px rgba(0, 0, 0, .6),
    inset 0 0 60px rgba(0, 0, 0, .38);
}
.felt::before { border-color: rgba(255, 255, 255, .09); }
/* the faint chip mark near the top of the felt */
.felt::after { content: ''; position: absolute; left: 50%; top: 13%; width: 38px; height: 38px; transform: translateX(-50%); border-radius: 50%; border: 2px solid rgba(255, 255, 255, .12); background: radial-gradient(circle, rgba(255, 255, 255, .14) 0 4px, transparent 5px); pointer-events: none; }
.felt-inner { gap: 8px; }
.pot { order: -1; background: none; padding: 0; display: flex; flex-direction: column; align-items: center; line-height: 1; }
.pot-lbl { font-size: 11px; font-weight: 600; letter-spacing: .22em; text-transform: uppercase; color: rgba(255, 255, 255, .7); margin-bottom: 4px; }
.pot-amt { font-size: 32px; font-weight: 700; letter-spacing: -.03em; color: #fff; text-shadow: 0 2px 12px rgba(0, 0, 0, .25); }
.center-msg { font-size: 12.5px; color: rgba(255, 255, 255, .75); }
.to-call { position: absolute; left: 50%; bottom: 7%; transform: translateX(-50%); z-index: 1; white-space: nowrap; font-size: 11.5px; font-weight: 700; color: #fff; background: rgba(4, 16, 11, .72); padding: 4px 10px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .08); }

.board .slot { border-radius: calc(var(--card-w) * .16); border: 1.5px solid rgba(90, 240, 180, .35); background: rgba(4, 30, 20, .55) radial-gradient(circle, transparent 0 calc(var(--card-w) * .2), rgba(255, 255, 255, .5) calc(var(--card-w) * .2 + .5px) calc(var(--card-w) * .2 + 2px), transparent calc(var(--card-w) * .2 + 2.5px)); }

/* ---- seats: round initials avatar, name and stack underneath ---- */
.plate {
  display: flex; flex-direction: column; align-items: center; gap: 1px; text-align: center;
  background: none; border: 0; box-shadow: none; padding: 0 2px 6px; overflow: visible; border-radius: 0;
}
.plate .pinfo { display: grid; gap: 0; justify-items: center; max-width: 100%; }
.plate .name { justify-content: center; font-size: 12.5px; font-weight: 700; text-shadow: 0 1px 4px rgba(0, 0, 0, .6); max-width: 100%; }
.plate .chips { font-size: 12px; }
.plate .bot-tag { display: none; }
.av-circle {
  width: 46px; height: 46px; font-size: 15px; font-weight: 700; letter-spacing: -.02em; color: #0d2a1e;
  box-shadow: 0 0 0 3px rgba(6, 18, 13, .9), 0 0 0 4.5px rgba(255, 255, 255, .28), 0 8px 18px rgba(0, 0, 0, .45);
  margin-bottom: 6px; transition: box-shadow .2s;
}
.av-circle.mint { background: radial-gradient(circle at 35% 30%, #8ff2cb, #3fd29e); color: #06301f; }
.av-circle.light { background: radial-gradient(circle at 35% 30%, #ffffff, #d5dbd8); color: #2b3a33; }
.av-circle.emoji { background: radial-gradient(circle at 35% 30%, #23362d, #13221b); font-size: 22px; }
.plate .timer { left: 12%; right: auto; bottom: 0; height: 3px; border-radius: 3px; max-width: 76%; box-shadow: 0 0 8px currentColor; color: var(--accent); }
.plate .timer.low { color: var(--red); }
.plate .timer.bank { color: var(--gold); }
.plate .take-seat { border-radius: 999px; margin-top: 4px; padding: 3px 10px; }
.plate.clickable:hover .av-circle { box-shadow: 0 0 0 3px rgba(6, 18, 13, .9), 0 0 0 4.5px rgba(255, 255, 255, .5), 0 8px 18px rgba(0, 0, 0, .45); }
.seat.me .plate, .seat.turn .plate, .seat.winner .plate, .seat.reserved .plate { border: 0; box-shadow: none; }
.seat.turn .av-circle { box-shadow: 0 0 0 3px rgba(6, 18, 13, .9), 0 0 0 5px var(--accent), 0 0 24px 4px rgba(47, 213, 155, .55); }
.seat.winner .av-circle { box-shadow: 0 0 0 3px rgba(6, 18, 13, .9), 0 0 0 5px var(--gold), 0 0 24px 4px rgba(227, 181, 83, .5); }
.seat.reserved .av-circle { box-shadow: 0 0 0 3px rgba(6, 18, 13, .9), 0 0 0 4.5px var(--accent); }
.seat.folded .plate, .seat.folded .hole { opacity: .45; }
.seat .action-tag { position: static; order: 9; margin-top: 3px; font-size: 9.5px; padding: 2px 7px; border-radius: 999px; }
.action-tag.raise, .action-tag.bet { box-shadow: 0 0 12px rgba(47, 213, 155, .4); }
.seat.empty .plate { width: auto; padding: 5px 12px; border-radius: 999px; background: rgba(0, 0, 0, .28); border: 1.5px dashed rgba(255, 255, 255, .2); }
.seat.empty .plate button, .seat.empty .plate .muted { font-size: 11px !important; padding: 0; white-space: nowrap; }
/* your own seat: the cards stand in for the avatar */
.seat.me .hole { margin-bottom: 4px; }
.seat.me .hole { height: calc(48px * 1.4); }
@media (max-width: 700px) { .seat.me .hole { height: calc(40px * 1.4); } body.plo .seat.me .hole { height: calc(34px * 1.4); } }
.seat.me .av-circle { display: none; }
.bet { background: rgba(4, 16, 11, .7); border: 1px solid rgba(255, 255, 255, .08); }
.dealer { background: linear-gradient(180deg, #fff, #dfe5e2); color: #0d2a1e; }

/* ---- action bar: floating pills ---- */
.action-bar { background: none; border: 0; padding: 8px 0 0; }
.your-turn { display: grid; grid-template-columns: auto 1fr; grid-template-areas: "hand time" "bar bar"; align-items: center; gap: 6px 10px; color: rgba(255, 255, 255, .6); font-weight: 500; text-align: left; }
.your-turn .yt-hand { grid-area: hand; }
.your-turn .yt-hand b { color: var(--accent); font-weight: 600; }
.your-turn .yt-time { grid-area: time; justify-self: end; font-size: 12px; }
.your-turn .yt-bar { grid-area: bar; height: 3px; border-radius: 3px; background: rgba(255, 255, 255, .1); overflow: hidden; }
.your-turn .yt-bar i { display: block; height: 100%; width: 100%; border-radius: 3px; background: linear-gradient(90deg, #1fae7a, #5ff0bd); box-shadow: 0 0 10px rgba(47, 213, 155, .7); transition: width .2s linear; }
.your-turn .yt-bar i.low { background: var(--red); box-shadow: 0 0 10px rgba(239, 91, 96, .7); }
.act-main { gap: 10px; }
.act-main .btn { min-height: 58px; border-radius: 999px; flex-direction: column; gap: 1px; padding: 8px 10px; font-size: 16px; font-weight: 700; }
.act-main .btn .sub { font-size: 11.5px; font-weight: 500; opacity: .62; }
.act-main .btn.red, .act-main .btn.green { background: #17201c; border: 1px solid rgba(255, 255, 255, .06); color: #fff; box-shadow: 0 8px 20px rgba(0, 0, 0, .35); }
.act-main .btn.red:hover, .act-main .btn.green:hover { background: #1e2a24; }
.act-main .btn.gold { box-shadow: 0 0 30px rgba(47, 213, 155, .45), 0 8px 20px rgba(0, 0, 0, .3), inset 0 1px 0 rgba(255, 255, 255, .4); }
.act-main .btn.gold .sub { opacity: .7; }
.act-main .btn.pressed::after { display: none; }
.presets .btn { background: rgba(255, 255, 255, .04); border-color: rgba(255, 255, 255, .07); border-radius: 999px; }
.pre { border-radius: 999px; background: rgba(255, 255, 255, .04); }
.action-bar .status { background: rgba(255, 255, 255, .035); border: 1px solid rgba(255, 255, 255, .06); border-radius: 18px; padding: 12px 14px; }
.react-btn { background: rgba(6, 18, 13, .7); }

@media (max-width: 700px) {
  .balance { font-size: 44px; }
  .home-section, .balance-card { border-radius: 22px; }
  .table-head { padding: 0 2px; }
  .th-title { font-size: 21px; }
  .th-sub { font-size: 12px; }
  .pot-amt { font-size: 25px; }
  .pot-lbl { font-size: 9.5px; }
  .felt::after { width: 28px; height: 28px; top: 10%; }
  .felt { border-radius: 46% / 40%; }
  .plate .av-circle { display: grid; width: 38px; height: 38px; font-size: 13px; margin-bottom: 5px; }
  .plate .name { font-size: 11.5px; }
  .seat.me .av-circle { display: none; }
  .act-main .btn { min-height: 52px; padding: 6px; font-size: 15px; }
  .to-call { font-size: 10.5px; padding: 3px 9px; bottom: 6%; }
}

/* Logo goes home; wallet chip links to the admin on Telegram to buy chips */
a.brand { color: inherit; text-decoration: none; cursor: pointer; }
a.wallet-chip { text-decoration: none; cursor: pointer; transition: filter .15s; }
a.wallet-chip:hover { filter: brightness(1.2); }
.wallet-add { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--gold); color: #111; font-weight: 800; font-size: 14px; line-height: 1; margin-left: 2px; }
.wallet-add-lbl { font-size: 12.5px; color: var(--gold); }
@media (max-width: 640px) { .wallet-add-lbl { display: none; } }
.email-list { width: 100%; box-sizing: border-box; margin: 10px 0; font: 13px/1.5 ui-monospace, monospace; background: var(--panel-2); color: var(--text); border: 1px solid rgba(255, 255, 255, .08); border-radius: 10px; padding: 10px; resize: vertical; }

/* House fee (rake) */
.rake-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; margin: 12px 0; }
.rake-stats > div { background: var(--panel-2); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; }
.rake-stats b { font-size: 20px; }
.rake-table { border-top: 1px solid rgba(255, 255, 255, .06); }
.rake-table summary { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 4px; cursor: pointer; list-style: none; }
.rake-table summary::-webkit-details-marker { display: none; }
.rake-table summary::before { content: '▸'; color: var(--muted, #888); margin-right: 6px; transition: transform .15s; }
.rake-table[open] summary::before { transform: rotate(90deg); }
.rake-table summary > span { flex: 1; min-width: 0; }
.rake-fees { max-height: 320px; overflow-y: auto; padding: 0 4px 12px 22px; }
.rake-fees > div { display: flex; justify-content: space-between; padding: 6px 0; font-size: 13.5px; border-bottom: 1px dashed rgba(255, 255, 255, .06); }
.rake-fees b { color: var(--gold); }

/* Table time countdown */
.table-clock { font-variant-numeric: tabular-nums; }
.table-clock.soon { color: var(--gold); font-weight: 600; }
#tableClock { font-variant-numeric: tabular-nums; color: var(--text); }
#tableClock.soon { color: var(--gold); }
