/* PokerSports mobile client — premium dark casino look
 * Palette (from PokerStars-class references + generated hero):
 *   graphite #0b0f0d, panels #161b18/#1d2420, emerald felt #1c6b42 -> #12512f,
 *   gold #d8b45a / #f0d792, stacks green #7ef0a8, danger #e2574c.
 */
:root {
  --bg0: #0b0f0d;
  --bg1: #121714;
  --bg2: #1a201c;
  --glass: rgba(20, 26, 22, 0.72);
  --line: rgba(255, 255, 255, 0.09);
  --felt: #1c6b42;
  --felt-hi: #2c8a58;
  --felt-lo: #12512f;
  --gold: #d8b45a;
  --gold-hi: #f0d792;
  --gold-lo: #a8863c;
  --green: #35d07c;
  --green-hi: #7ef0a8;
  --danger: #e2574c;
  --text: #f4f1e8;
  --muted: #97a49a;
  --radius: 16px;
  --shadow: 0 10px 34px rgba(0, 0, 0, 0.55);
  --sat: env(safe-area-inset-top, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(1100px 620px at 50% -12%, rgba(44, 138, 88, 0.20), transparent 62%),
    radial-gradient(900px 520px at 50% 112%, rgba(216, 180, 90, 0.06), transparent 60%),
    var(--bg0);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 0.8rem; }
.center { text-align: center; }
.view { min-height: 100dvh; display: flex; flex-direction: column; }

/* ---------- buttons ---------- */
.btn {
  font: inherit;
  border: 1px solid rgba(216, 180, 90, 0.30);
  border-radius: 12px;
  padding: 12px 16px;
  background: linear-gradient(180deg, rgba(216, 180, 90, 0.14), rgba(216, 180, 90, 0.04));
  color: var(--text);
  cursor: pointer;
  transition: transform 0.08s ease, filter 0.15s ease, box-shadow 0.15s ease;
  user-select: none;
  letter-spacing: 0.2px;
}
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.45; }
.btn-primary {
  background: linear-gradient(180deg, var(--gold-hi), var(--gold-lo));
  color: #241703;
  font-weight: 800;
  border-color: var(--gold-hi);
  box-shadow: 0 4px 14px rgba(216, 180, 90, 0.25);
}
.btn-danger {
  background: linear-gradient(180deg, #e2574c, #a83a31);
  color: #fff;
  border-color: #ef7a70;
}
.btn-call {
  background: linear-gradient(180deg, #3ddb85, #1d9a54);
  color: #05140b;
  font-weight: 800;
  border-color: #7ef0a8;
  box-shadow: 0 4px 14px rgba(53, 208, 124, 0.25);
}
.btn-ghost { background: transparent; border-color: var(--line); }
.btn-sm { padding: 8px 12px; font-size: 0.85rem; border-radius: 10px; }
.btn-block { width: 100%; }

/* ---------- login ---------- */
#view-login {
  align-items: center; justify-content: flex-end;
  padding: 0 20px calc(26px + var(--sab));
  position: relative; overflow: hidden;
  background:
    linear-gradient(180deg, rgba(11, 15, 13, 0.25) 0%, rgba(11, 15, 13, 0.82) 72%),
    url('/hero.webp') center 30% / cover no-repeat;
}
.login-wrap { width: 100%; max-width: 420px; position: relative; z-index: 2; }
.brand { text-align: center; margin-bottom: 22px; }
.brand h1 {
  margin: 0; font-size: 2.1rem; letter-spacing: 1px; font-weight: 800;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.8);
}
.brand .tagline { color: var(--gold-hi); font-size: 0.85rem; letter-spacing: 3px; text-transform: uppercase; margin-top: 6px; }
.brand-mark {
  width: 64px; height: 64px; margin: 0 auto 12px; border-radius: 18px;
  background: linear-gradient(145deg, var(--gold-hi), var(--gold-lo));
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem; color: #241703; box-shadow: var(--shadow);
}
.brand-mark.small { width: 34px; height: 34px; border-radius: 10px; font-size: 1.1rem; margin: 0; }
.form-card {
  padding: 20px;
  display: flex; flex-direction: column; gap: 10px;
  background: linear-gradient(180deg, rgba(26, 32, 28, 0.92), rgba(18, 23, 20, 0.94));
  border: 1px solid var(--line) !important;
  border-top: 2px solid rgba(216, 180, 90, 0.55) !important;
  backdrop-filter: blur(14px);
}
.card {
  background: linear-gradient(180deg, var(--bg2), var(--bg1));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
label { font-size: 0.82rem; color: var(--muted); display: block; margin-top: 6px; letter-spacing: 0.3px; }
input[type="text"], input[type="password"], input[type="number"], input[type="search"] {
  font: inherit;
  width: 100%;
  padding: 13px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(0, 0, 0, 0.38);
  color: var(--text);
  outline: none;
}
input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(216, 180, 90, 0.12); }
.error-text { color: var(--danger); font-size: 0.85rem; text-align: center; }

/* ---------- topbar ---------- */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px;
  padding: calc(10px + var(--sat)) 14px 10px;
  background: linear-gradient(180deg, rgba(16, 21, 18, 0.96), rgba(16, 21, 18, 0.80));
  border-bottom: 1px solid rgba(216, 180, 90, 0.18);
  backdrop-filter: blur(10px);
  position: sticky; top: 0; z-index: 30;
}
.topbar-brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.topbar-title { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.topbar-title strong { font-size: 1.02rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.center-col { align-items: center; text-align: center; flex: 1; }
.topbar-actions { display: flex; gap: 8px; }

/* ---------- lobby ---------- */
.lobby-main {
  flex: 1; padding: 14px 14px calc(20px + var(--sab));
  max-width: 760px; width: 100%; margin: 0 auto;
}
.lobby-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.lobby-head h2 { margin: 0; font-size: 1.25rem; letter-spacing: 0.4px; }
.pill {
  font-size: 0.72rem; padding: 5px 11px; border-radius: 999px;
  background: rgba(216, 180, 90, 0.12); color: var(--gold);
  border: 1px solid rgba(216, 180, 90, 0.35);
  letter-spacing: 0.4px; text-transform: uppercase;
}
.pill.on { color: var(--green-hi); border-color: rgba(53, 208, 124, 0.45); background: rgba(53, 208, 124, 0.10); }
.table-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }

.table-card {
  display: flex; align-items: center; gap: 14px;
  padding: 14px;
  position: relative; overflow: hidden;
}
.table-card::before {
  /* mini felt table */
  content: "";
  position: absolute; left: -26px; top: 50%;
  width: 74px; height: 46px; transform: translateY(-50%);
  border-radius: 50% / 46%;
  background:
    radial-gradient(ellipse at 42% 35%, rgba(255, 255, 255, 0.14), transparent 55%),
    radial-gradient(ellipse at 50% 50%, var(--felt-hi), var(--felt) 65%, var(--felt-lo) 100%);
  border: 2px solid var(--gold-lo);
  box-shadow: inset 0 0 0 3px rgba(0, 0, 0, 0.35), 0 4px 10px rgba(0, 0, 0, 0.4);
  opacity: 0.9;
}
.table-card .tc-main { flex: 1; min-width: 0; padding-left: 56px; }
.table-card .tc-name { font-weight: 800; font-size: 1.02rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tc-badges { display: flex; gap: 5px; margin: 6px 0 5px; flex-wrap: wrap; }
.tc-badge {
  font-size: 0.66rem; font-weight: 700; letter-spacing: 0.3px;
  padding: 3px 8px; border-radius: 6px;
  background: rgba(255, 255, 255, 0.07); border: 1px solid var(--line);
  color: var(--muted);
}
.tc-badge.game { color: var(--gold-hi); border-color: rgba(216, 180, 90, 0.35); background: rgba(216, 180, 90, 0.08); }
.tc-badge.blind { color: var(--green-hi); border-color: rgba(53, 208, 124, 0.35); background: rgba(53, 208, 124, 0.07); }
.tc-meta { font-size: 0.8rem; color: var(--muted); display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.tc-seats { display: flex; align-items: center; gap: 6px; }
.seat-dots { display: inline-flex; gap: 3px; }
.seat-dots i {
  width: 7px; height: 7px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
}
.seat-dots i.filled { background: var(--green); border-color: var(--green-hi); }
.tc-action { display: flex; flex-direction: column; align-items: stretch; gap: 6px; }
.tc-action .btn { border-radius: 10px; }
.badge-wait {
  font-size: 0.66rem; text-align: center; color: var(--muted);
  border: 1px dashed rgba(255, 255, 255, 0.22); border-radius: 8px; padding: 2px 6px;
}
.empty-card { padding: 40px 16px; }

/* ---------- table stage ---------- */
#view-table {
  position: fixed; inset: 0; z-index: 10;
  background:
    radial-gradient(120% 85% at 50% 0%, #16301f 0%, #0a0f0c 68%);
}
.table-topbar { position: relative; }
.table-stage {
  flex: 1; display: flex; align-items: center; justify-content: center;
  padding: 6px 4px 0; min-height: 0;
  touch-action: manipulation;
}
.table-surface {
  position: relative;
  width: min(100vw, 122vh);
  aspect-ratio: 16 / 10;
  max-height: 100%;
  border-radius: 50% / 46%;
  background:
    radial-gradient(ellipse at 50% 30%, rgba(255, 255, 255, 0.13), transparent 52%),
    radial-gradient(ellipse at 50% 55%, rgba(255, 255, 255, 0.05), transparent 60%),
    radial-gradient(ellipse at 50% 50%, var(--felt-hi) 0%, var(--felt) 58%, var(--felt-lo) 100%);
  box-shadow:
    inset 0 0 0 clamp(7px, 1.6vw, 18px) #2b2118,
    inset 0 0 0 clamp(9px, 2.0vw, 22px) #4a3826,
    inset 0 0 clamp(26px, 4.5vw, 70px) rgba(0, 0, 0, 0.55),
    0 14px 60px rgba(0, 0, 0, 0.7);
  border: 2px solid rgba(216, 180, 90, 0.5);
}
.table-surface::after {
  content: "POKERSPORTS";
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%) rotate(-9deg);
  font-size: clamp(1.1rem, 4vw, 2rem); letter-spacing: 0.4em; font-weight: 800;
  color: rgba(255, 255, 255, 0.05); pointer-events: none; white-space: nowrap;
}
.seats { position: absolute; inset: 0; }

.seat {
  position: absolute; transform: translate(-50%, -50%);
  width: clamp(72px, 19vw, 128px);
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  z-index: 3;
}
.seat .avatar-wrap { position: relative; }
.seat .avatar {
  width: clamp(38px, 10vw, 66px); height: clamp(38px, 10vw, 66px);
  border-radius: 50%;
  background:
    radial-gradient(circle at 34% 28%, rgba(255, 255, 255, 0.18), transparent 48%),
    linear-gradient(150deg, #46584d, #232d27);
  border: 2px solid rgba(216, 180, 90, 0.6);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: clamp(0.85rem, 2.6vw, 1.3rem);
  color: var(--gold-hi); overflow: hidden;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.55);
}
.seat.mine .avatar { border-color: #fff; box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.25), 0 4px 14px rgba(0, 0, 0, 0.55); }
.seat.acting .avatar { animation: pulse 1.1s ease-in-out infinite; border-color: var(--green-hi); }
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(126, 240, 168, 0.75); }
  50% { box-shadow: 0 0 0 9px rgba(126, 240, 168, 0); }
}
.seat .nameplate {
  display: flex; flex-direction: column; align-items: center;
  min-width: 76%; padding: 3px 10px 4px;
  background: linear-gradient(180deg, rgba(8, 10, 9, 0.88), rgba(13, 16, 14, 0.88));
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 9px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.45);
}
.seat .pname {
  max-width: 100%; font-size: clamp(0.58rem, 1.9vw, 0.8rem); font-weight: 700;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #fff;
}
.seat .stack { font-size: clamp(0.62rem, 1.9vw, 0.85rem); font-weight: 800; color: var(--green-hi); }
.seat .action-tag {
  font-size: clamp(0.5rem, 1.6vw, 0.68rem); font-weight: 700;
  background: rgba(0, 0, 0, 0.72); color: var(--gold-hi);
  padding: 1px 8px; border-radius: 999px; border: 1px solid rgba(216, 180, 90, 0.3);
  max-width: 100%; white-space: nowrap; overflow: hidden;
}
.seat .timer {
  width: 66%; height: 3px; border-radius: 3px; background: rgba(0, 0, 0, 0.55);
  overflow: hidden; margin-top: 1px;
}
.seat .timer i { display: block; height: 100%; background: linear-gradient(90deg, var(--green-hi), var(--gold), var(--danger)); }
.seat .cards { display: flex; gap: 2px; margin-top: 2px; justify-content: center; }
.seat.empty .avatar {
  border-style: dashed; background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.35); font-size: 1.3rem;
}
.seat.empty .nameplate { min-width: 60%; opacity: 0.75; }
.seat.empty { cursor: pointer; }

/* cards */
.card-face {
  position: relative;
  width: clamp(28px, 7.6vw, 50px);
  aspect-ratio: 0.72;
  border-radius: 12%;
  background: linear-gradient(160deg, #ffffff, #e9e7e0 85%);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.5), inset 0 0 0 1px rgba(0, 0, 0, 0.18);
  display: flex; align-items: center; justify-content: center;
  color: #191919; overflow: hidden;
}
.card-face .pip-big { font-size: clamp(0.9rem, 3.2vw, 1.7rem); line-height: 1; margin-top: 4%; }
.card-face .corner {
  position: absolute; line-height: 1; font-weight: 800;
  display: flex; flex-direction: column; align-items: center;
}
.card-face .corner .r { font-size: clamp(0.5rem, 1.9vw, 0.95rem); }
.card-face .corner .s { font-size: clamp(0.45rem, 1.6vw, 0.8rem); margin-top: -1px; }
.card-face .corner.tl { top: 5%; left: 9%; }
.card-face .corner.br { bottom: 5%; right: 9%; transform: rotate(180deg); }
.card-face.red { color: #c62828; }
.card-back {
  background:
    repeating-linear-gradient(48deg, rgba(255, 255, 255, 0.10) 0 3px, transparent 3px 7px),
    linear-gradient(160deg, #8e1f24, #6c1118 70%);
  border: 2px solid rgba(255, 255, 255, 0.75);
}
.card-face.mini { width: clamp(20px, 5.6vw, 36px); }
.card-fan { display: flex; position: absolute; z-index: 2; }
.card-fan .card-back { margin-left: -34%; }
.card-fan .card-back:first-child { margin-left: 0; transform: rotate(-8deg) translateY(1px); }
.card-fan .card-back:last-child { transform: rotate(8deg); }
.card-placeholder {
  border: 1px dashed rgba(255, 255, 255, 0.32); background: rgba(0, 0, 0, 0.22); color: transparent;
}
.dealer-btn {
  position: absolute; z-index: 4;
  width: clamp(16px, 4.2vw, 28px); aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle at 34% 30%, #fff6dc, #e8c86e 55%, #a8863c 100%);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.6), inset 0 0 0 1px rgba(122, 92, 30, 0.6);
  display: flex; align-items: center; justify-content: center;
  font-size: clamp(0.5rem, 1.5vw, 0.75rem); font-weight: 900; color: #3a2c10;
  transform: translate(-50%, -50%);
}

/* board + pot */
.board {
  position: absolute; left: 50%; top: 38%; transform: translate(-50%, -50%);
  display: flex; gap: clamp(2px, 0.9vw, 7px); z-index: 2;
}
.board .card-face { border-radius: 8%; }
.pot-label {
  position: absolute; left: 50%; top: 61%; transform: translate(-50%, -50%);
  font-size: clamp(0.68rem, 2.1vw, 0.95rem); font-weight: 800; color: var(--green-hi);
  background: rgba(7, 10, 8, 0.78);
  border: 1px solid rgba(126, 240, 168, 0.35);
  padding: 3px 14px; border-radius: 999px; z-index: 2;
  text-shadow: 0 1px 2px #000; letter-spacing: 0.4px;
}
.table-msg {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  font-size: clamp(0.64rem, 2.1vw, 0.9rem); color: rgba(255, 255, 255, 0.88);
  background: rgba(0, 0, 0, 0.5); padding: 3px 14px; border-radius: 999px;
  z-index: 2; white-space: nowrap;
}
.bet-chip {
  position: absolute; z-index: 3; transform: translate(-50%, 50%);
  display: flex; flex-direction: column; align-items: center; gap: 1px;
}
.bet-chip .chips { display: flex; flex-direction: column-reverse; align-items: center; }
.chip {
  width: clamp(14px, 3.6vw, 24px); aspect-ratio: 1; border-radius: 50%;
  border: clamp(2px, 0.6vw, 3px) dashed rgba(0, 0, 0, 0.30);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.55), inset 0 0 0 1px rgba(255, 255, 255, 0.25);
  position: relative;
}
.chip + .chip { margin-top: -55%; }
.chip.c1 { background: radial-gradient(circle at 35% 30%, #f0d792, #c59a3f 70%); }
.chip.c2 { background: radial-gradient(circle at 35% 30%, #ef6a5e, #a83a31 70%); }
.chip.c3 { background: radial-gradient(circle at 35% 30%, #7ec1ef, #2f6f9f 70%); }
.chip.c4 { background: radial-gradient(circle at 35% 30%, #6fdc9a, #2f8a55 70%); }
.chip.c5 { background: radial-gradient(circle at 35% 30%, #b59af0, #6d4f9e 70%); }
.bet-chip .betamt { font-size: clamp(0.62rem, 1.9vw, 0.85rem); font-weight: 800; color: var(--green-hi); text-shadow: 0 1px 2px #000; }

/* ---------- action dock ---------- */
.action-dock {
  padding: 8px 10px calc(10px + var(--sab));
  background: linear-gradient(180deg, rgba(8, 11, 9, 0.5), rgba(8, 11, 9, 0.95));
  border-top: 1px solid rgba(216, 180, 90, 0.22);
  display: flex; flex-direction: column; gap: 8px;
}
.raise-bar { display: flex; flex-direction: column; gap: 6px; }
.raise-row { display: flex; align-items: center; gap: 8px; }
.raise-input { flex: 0 0 84px; text-align: center; padding: 9px 6px !important; }
.raise-slider { flex: 1; accent-color: var(--gold); height: 34px; }
.quick-bets { display: flex; gap: 6px; }
.quick-bets .btn {
  flex: 1; padding: 8px 2px; font-size: 0.74rem; font-weight: 700;
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(216, 180, 90, 0.22), rgba(216, 180, 90, 0.08));
  border-color: rgba(216, 180, 90, 0.4); color: var(--gold-hi);
}
.action-buttons { display: flex; gap: 8px; }
.action-buttons .btn { flex: 1; padding: 15px 6px; font-size: 1rem; font-weight: 800; letter-spacing: 0.3px; }
.action-buttons .btn-fold {
  background: linear-gradient(180deg, #3a3f3c, #232724);
  color: #f2b6ac; border-color: rgba(226, 87, 76, 0.5);
}
.action-buttons .btn-neutral {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.10), rgba(255, 255, 255, 0.03));
  color: var(--text); border-color: rgba(255, 255, 255, 0.18);
}

/* ---------- sheets / chat / toast / menu ---------- */
.sheet {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(0, 0, 0, 0.6);
  display: flex; align-items: flex-end; justify-content: center;
}
.sheet-card {
  width: 100%; max-width: 480px; padding: 18px;
  border-radius: 22px 22px 0 0; margin-bottom: 0;
  padding-bottom: calc(18px + var(--sab));
  animation: rise 0.18s ease;
  border-top: 2px solid rgba(216, 180, 90, 0.5) !important;
}
@keyframes rise { from { transform: translateY(30px); opacity: 0.4; } to { transform: none; opacity: 1; } }
.sheet h3 { margin: 0 0 6px; }
.buyin-opts { display: flex; gap: 8px; margin: 12px 0; flex-wrap: wrap; }
.radio-pill input { display: none; }
.radio-pill span {
  display: inline-block; padding: 10px 18px; border-radius: 999px;
  border: 1px solid var(--line); color: var(--muted); cursor: pointer;
  font-weight: 700;
}
.radio-pill input:checked + span {
  background: linear-gradient(180deg, var(--gold-hi), var(--gold-lo));
  color: #241703; border-color: var(--gold-hi);
}
.buyin-other { margin-top: 4px; }
.checkbox-row { display: flex; align-items: center; gap: 8px; margin: 8px 0 14px; color: var(--text); }
.checkbox-row input { width: 20px; height: 20px; accent-color: var(--gold); }
.sheet-actions { display: flex; gap: 10px; }
.sheet-actions .btn { flex: 1; }

.chat-panel {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 55;
  max-height: 55dvh; display: flex; flex-direction: column;
  background: linear-gradient(180deg, rgba(14, 18, 15, 0.98), rgba(8, 11, 9, 0.99));
  border-top: 1px solid rgba(216, 180, 90, 0.4);
  border-radius: 18px 18px 0 0;
}
.chat-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.chat-log { flex: 1; overflow-y: auto; padding: 10px 14px; font-size: 0.9rem; display: flex; flex-direction: column; gap: 6px; }
.chat-line .who { font-weight: 800; color: var(--gold-hi); }
.chat-line.dealer { color: var(--muted); font-style: italic; }
.chat-input-row { display: flex; gap: 8px; padding: 8px 12px calc(10px + var(--sab)); }

.toast {
  position: fixed; left: 50%; top: calc(58px + var(--sat)); transform: translateX(-50%);
  background: rgba(8, 11, 9, 0.95); border: 1px solid rgba(216, 180, 90, 0.4);
  color: var(--text); padding: 10px 18px; border-radius: 999px;
  z-index: 90; box-shadow: var(--shadow); font-size: 0.9rem; max-width: 86vw; text-align: center;
}
.table-menu-pop {
  position: fixed; right: 12px; top: calc(54px + var(--sat)); z-index: 70;
  background: var(--bg2); border: 1px solid rgba(216, 180, 90, 0.25);
  border-radius: 14px; box-shadow: var(--shadow); overflow: hidden; min-width: 210px;
}
.table-menu-pop button {
  display: block; width: 100%; text-align: left; padding: 13px 16px;
  background: transparent; color: var(--text); border: 0;
  border-bottom: 1px solid var(--line);
  font: inherit; font-size: 0.92rem; cursor: pointer;
}
.table-menu-pop button:active { background: rgba(255, 255, 255, 0.06); }

/* landscape / wider screens */
@media (min-aspect-ratio: 4/3) {
  .table-stage { padding: 2px 2px 0; }
  .table-surface { aspect-ratio: 2 / 1; width: min(97vw, 168vh); }
  .seat { width: clamp(64px, 15vw, 120px); }
  .seat .avatar { width: clamp(36px, 7.5vw, 68px); height: clamp(36px, 7.5vw, 68px); }
  .seat .nameplate { min-width: 68%; }
  .board { top: 36%; }
  .pot-label { top: 57%; }
}
@media (min-width: 720px) {
  .table-grid { grid-template-columns: 1fr 1fr; }
}

/* ===================================================================
   PokerSports real-asset theme (table graphic, deck, chips, avatars)
   =================================================================== */

/* the real 700x510 table: red felt + wood rail + floor */
.table-surface {
  aspect-ratio: 700 / 510;
  width: min(100vw, 128vh);
  border-radius: 18px;
  background: url('/assets/pm/table.png') center / 100% 100% no-repeat;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.8), 0 2px 0 rgba(216, 180, 90, 0.25);
  border: 1px solid rgba(216, 180, 90, 0.35);
}
.table-surface::after {
  content: "";
  position: absolute; inset: 0;
  border-radius: 18px;
  pointer-events: none;
  box-shadow: inset 0 0 90px rgba(0, 0, 0, 0.55);
}
/* real cards */
.pm-card {
  border-radius: 9%;
  background: #fff;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.5), inset 0 0 0 1px rgba(0, 0, 0, 0.14);
  flex: 0 0 auto;
}
.pm-card-empty {
  background: rgba(255, 255, 255, 0.10);
  border: 1px dashed rgba(255, 255, 255, 0.35);
  box-shadow: none;
}
/* big centered hole cards for the player */
.seat.mine .cards.big-cards { margin-top: 3px; }
.seat .cards { position: relative; z-index: 5; }
/* card fans for opponents */
.card-fan { position: absolute; z-index: 4; display: flex; }
.card-fan .pm-card { margin-left: -38%; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5); }
.card-fan .pm-card:first-child { margin-left: 0; transform: rotate(-7deg); }
.card-fan .pm-card:last-child { transform: rotate(7deg); }
/* avatars from the site sheet */
.pm-avatar {
  border-radius: 50%;
  border: 2px solid rgba(216, 180, 90, 0.65);
  background: linear-gradient(150deg, #46584d, #232d27);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: clamp(0.8rem, 2.4vw, 1.2rem);
  color: var(--gold-hi);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.55);
  overflow: hidden;
}
.seat.mine .pm-avatar { border-color: #fff; box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.25), 0 4px 14px rgba(0, 0, 0, 0.55); }
.seat.acting .pm-avatar { animation: pulse 1.1s ease-in-out infinite; border-color: var(--green-hi); }
.seat.empty .pm-avatar { border-style: dashed; background: rgba(255, 255, 255, 0.05); color: rgba(255, 255, 255, 0.4); }
/* bet stacks with real chips */
.pm-betstack { display: flex; flex-direction: column-reverse; align-items: center; }
.pm-chip { filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.55)); }
.pm-chip + .pm-chip { margin-top: -52%; }
.pm-betamt {
  font-size: clamp(0.6rem, 1.9vw, 0.85rem); font-weight: 800; color: #fff;
  text-shadow: 0 1px 3px #000; background: rgba(0, 0, 0, 0.55);
  padding: 0 7px; border-radius: 999px; margin-top: 1px;
}
/* board/pot placement on the graphic */
.board { top: 38.5%; gap: clamp(2px, 1vw, 8px); }
.pot-label { top: 54.5%; background: rgba(8, 6, 4, 0.85); border-color: rgba(216, 180, 90, 0.5); color: #ffe3a1; }
.table-msg { top: 24%; }
/* lobby filters */
.filter-row { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 10px; margin: -4px 0 6px; }
.filter-chip {
  flex: 0 0 auto; font: inherit; font-size: 0.76rem; font-weight: 700;
  padding: 7px 13px; border-radius: 999px; cursor: pointer;
  background: rgba(255, 255, 255, 0.05); color: var(--muted);
  border: 1px solid var(--line); letter-spacing: 0.3px;
}
.filter-chip.on { background: linear-gradient(180deg, var(--gold-hi), var(--gold-lo)); color: #241703; border-color: var(--gold-hi); }
/* sheets: head rows, timer, captions, bet dialog */
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.sheet-head h3 { flex: 1; }
.timer-pill { color: #ffd9d2; background: rgba(226, 87, 76, 0.18); border-color: rgba(226, 87, 76, 0.45); }
.buyin-captions { display: flex; gap: 6px; flex-wrap: wrap; margin: 8px 0 2px; }
.buyin-other { margin: 2px 0 4px; }
.bet-amount-row { display: flex; align-items: center; gap: 8px; margin: 12px 0 8px; }
.bet-amount {
  flex: 1; font-size: 1.7rem; font-weight: 800; text-align: center;
  padding: 12px !important;
}
.bet-currency { font-size: 1.3rem; font-weight: 800; }
.bet-slider-row { display: flex; align-items: center; gap: 8px; margin: 6px 0 4px; }
.bet-slider-row span { min-width: 52px; white-space: nowrap; font-size: 0.74rem; }
#bet-quick { margin: 10px 0 4px; }
/* landscape table */
@media (min-aspect-ratio: 4/3) {
  .table-surface { width: min(97vw, 176vh); }
  .board { top: 40%; }
}
