@import url("https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800&display=swap");

:root {
  --bg: #070b10;
  --bg-2: #0e1620;
  --card: #121c28;
  --line: rgba(255, 255, 255, 0.08);
  --text: #f3f6fb;
  --muted: #93a0b5;
  --accent: #2ee59d;
  --accent-2: #f5c451;
  --danger: #ff5d6c;
  --admin: #7db4ff;
  --manager: #2ee59d;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  --radius: 16px;
  --font: "Outfit", "Segoe UI", system-ui, sans-serif;
  font-family: var(--font);
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--text); font-family: var(--font); }
html:has(.table-body), body.table-body {
  height: 100%;
  height: var(--app-height, 100dvh);
  max-height: var(--app-height, 100dvh);
  overflow: hidden;
  overscroll-behavior: none;
}
body { line-height: 1.45; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: none; filter: brightness(1.08); }
code { background: rgba(0, 0, 0, 0.35); padding: 0.12rem 0.4rem; border-radius: 6px; font-size: 0.9em; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 1.25rem; }
.muted { color: var(--muted); }

.topbar, .page-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.topbar {
  padding: 0.85rem 1.25rem;
  background: rgba(10, 16, 24, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 20;
}
.topbar.compact { padding: 0.7rem 1rem; }
.topbar nav { display: flex; gap: 1rem; }
.topbar nav a { color: var(--muted); font-weight: 600; }
.topbar nav a:hover { color: var(--text); }
.brand { font-weight: 800; color: var(--text); letter-spacing: 0.02em; font-size: 1.05rem; }
.top-actions, .row { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
.gap { gap: 1rem; margin: 1rem 0; }

.app-body { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.player-shell { display: block; min-height: 100vh; background:
  radial-gradient(900px 420px at 10% -10%, rgba(46, 229, 157, 0.12), transparent 60%),
  radial-gradient(700px 380px at 100% 0%, rgba(245, 196, 81, 0.08), transparent 55%),
  var(--bg); }
.lobby-shell {
  background:
    radial-gradient(ellipse 70% 45% at 50% -5%, rgba(26, 122, 69, 0.28), transparent 55%),
    radial-gradient(ellipse 50% 35% at 90% 20%, rgba(245, 196, 81, 0.08), transparent 50%),
    radial-gradient(ellipse 40% 30% at 10% 70%, rgba(20, 168, 159, 0.08), transparent 45%),
    linear-gradient(180deg, #08110c 0%, #070b10 45%, #06090e 100%);
}
.lobby-topbar {
  background: rgba(6, 12, 10, 0.78);
  border-bottom-color: rgba(46, 229, 157, 0.12);
}
.lobby-wrap { max-width: 1180px; padding: 1.5rem 1.25rem 3rem; }
.lobby-pill {
  background: linear-gradient(135deg, rgba(245, 196, 81, 0.18), rgba(46, 229, 157, 0.12));
  border: 1px solid rgba(245, 196, 81, 0.28);
  color: #f5c451;
}
.sidebar { background: #0b1220; border-right: 1px solid var(--line); padding: 1.2rem; display: flex; flex-direction: column; gap: 1rem; }
.sidebar .brand { font-size: 1.15rem; }
.sidebar nav { display: flex; flex-direction: column; gap: 0.35rem; }
.sidebar nav a { color: var(--text); padding: 0.6rem 0.75rem; border-radius: 10px; font-weight: 600; }
.sidebar nav a:hover { background: rgba(255, 255, 255, 0.05); }
.sidebar nav a.is-active {
  background: rgba(46, 229, 157, 0.14);
  color: #d9ffe9;
}
.theme-admin .sidebar nav a.is-active {
  background: rgba(125, 180, 255, 0.16);
  color: #d5e8ff;
}
.sidebar-logout { margin-top: auto; }
.sidebar-cache { margin: 0.5rem 0 0; }
.sidebar-cache .btn { width: 100%; font-size: 0.78rem; }
.sidebar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}
.mobile-close-btn {
  display: none;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255,255,255,.06);
  color: var(--text);
  font-size: 1rem;
  cursor: pointer;
}
.mobile-bar,
.nav-backdrop,
.bottom-nav { display: none; }
.main { padding: 1.25rem 1.5rem 2rem; min-width: 0; }
.theme-admin .sidebar .brand { color: var(--admin); }
.theme-manager .sidebar .brand { color: var(--manager); }

.hero { padding: 4.5rem 0 3rem; max-width: 720px; }
.hero h1 { font-size: clamp(2rem, 4vw, 3rem); margin: 0 0 0.7rem; letter-spacing: -0.03em; }
.hero p { color: var(--muted); font-size: 1.08rem; }

.btn {
  appearance: none;
  border: 1px solid var(--line);
  background: #1a2535;
  color: var(--text);
  border-radius: 12px;
  padding: 0.62rem 1rem;
  cursor: pointer;
  font-weight: 700;
  font-family: inherit;
  transition: transform 0.12s ease, filter 0.12s ease, box-shadow 0.12s ease;
}
.btn:hover { filter: brightness(1.08); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn.primary { background: linear-gradient(180deg, #3ef0ad, #1ecf88); color: #042416; border-color: transparent; box-shadow: 0 8px 20px rgba(30, 207, 136, 0.25); }
.btn.danger { background: linear-gradient(180deg, #ff7a86, #e04857); color: #fff; border-color: transparent; }
.btn.ghost { background: transparent; }
.btn.small { padding: 0.35rem 0.65rem; font-size: 0.85rem; }
.btn.gold { background: linear-gradient(180deg, #ffd978, #e2ad2e); color: #2a1d00; border: 0; }
.btn.wide { width: 100%; }

.auth-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at top, rgba(46, 229, 157, 0.18), transparent 42%),
    linear-gradient(180deg, #0b1220, #070b10);
}
.auth-card {
  width: min(440px, 92vw);
  background: rgba(18, 28, 40, 0.96);
  padding: 1.7rem;
  border-radius: 20px;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
}
.auth-card.wide { width: min(640px, 94vw); }
.auth-card h1 { margin-top: 0; }
.stack { display: grid; gap: 0.85rem; }
label { display: grid; gap: 0.35rem; font-size: 0.92rem; color: var(--muted); font-weight: 600; }
input, select {
  width: 100%;
  padding: 0.7rem 0.8rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #0b1220;
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;
}
input:focus, select:focus { outline: 2px solid rgba(46, 229, 157, 0.35); border-color: transparent; }

.alert { padding: 0.8rem 1rem; border-radius: 12px; margin: 0.7rem 0; font-weight: 600; }
.alert.error { background: rgba(255, 93, 108, 0.15); color: #ffd0d5; border: 1px solid rgba(255, 93, 108, 0.25); }
.alert.success { background: rgba(46, 229, 157, 0.12); color: #c9f5dc; border: 1px solid rgba(46, 229, 157, 0.2); }
.alert.info { background: rgba(125, 180, 255, 0.12); color: #d5e8ff; border: 1px solid rgba(125, 180, 255, 0.2); }

.grid.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; margin: 1rem 0; }
.grid.two { display: grid; grid-template-columns: 1fr 1fr; gap: 0.8rem; }
.card {
  background: linear-gradient(180deg, rgba(24, 36, 52, 0.95), rgba(14, 22, 32, 0.95));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.05rem;
  box-shadow: var(--shadow);
}
.stat { font-size: 1.85rem; font-weight: 800; margin: 0.3rem 0; letter-spacing: -0.03em; }
.table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: 14px; }
table { width: 100%; border-collapse: collapse; background: var(--card); }
th, td { padding: 0.75rem 0.85rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { color: var(--muted); font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.04em; }
.actions { display: flex; gap: 0.35rem; flex-wrap: wrap; }
.badge { display: inline-block; padding: 0.18rem 0.55rem; border-radius: 999px; font-size: 0.78rem; font-weight: 700; background: #243044; }
.badge.ok { background: rgba(46, 229, 157, 0.16); color: #b7f0d0; }
.badge.off { background: rgba(245, 196, 81, 0.14); color: #f0d0b7; }
.pill { background: rgba(46, 229, 157, 0.14); color: #d9ffe9; padding: 0.38rem 0.75rem; border-radius: 999px; font-weight: 700; }
.form-card { max-width: 720px; background: var(--card); padding: 1.1rem; border-radius: var(--radius); border: 1px solid var(--line); }

.balance-panel { margin: 1.25rem 0 2rem; }
.balance-panel h2 { margin: 0 0 0.75rem; font-size: 1.25rem; }
.balance-table th { white-space: nowrap; }
.balance-table td { vertical-align: middle; }
.inline-credit-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  min-width: 220px;
}
.inline-credit-form .credit-amount {
  width: 96px;
  min-width: 96px;
  max-width: 110px;
  padding: 0.4rem 0.5rem;
  font-size: 0.85rem;
  border-radius: 8px;
}
.inline-credit-form .btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  transform: none;
}
.credit-bulk-form {
  margin: 1.25rem 0;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
}
.credit-bulk-form summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--muted);
}
.credit-bulk-form summary:hover { color: var(--text); }

.money-action-form {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 200px;
  max-width: 280px;
}
.money-action-form .credit-amount {
  width: 100%;
  max-width: 140px;
  padding: 0.4rem 0.5rem;
  font-size: 0.85rem;
  border-radius: 8px;
}
.money-action-form .credit-note {
  width: 100%;
  padding: 0.35rem 0.5rem;
  font-size: 0.78rem;
  border-radius: 8px;
}
.money-btns { display: flex; flex-wrap: wrap; gap: 0.3rem; }
.cashout-check {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  color: var(--muted);
  font-weight: 600;
  margin: 0;
}
.cashout-check input { width: auto; margin: 0; }

.report-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.report-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: flex-end;
}
.report-filters label {
  margin: 0;
  min-width: 140px;
}
.report-range { margin: 0; font-weight: 600; }
.commission-box {
  background: linear-gradient(135deg, rgba(46, 229, 157, 0.08), rgba(125, 180, 255, 0.06));
  border: 1px solid rgba(46, 229, 157, 0.2);
  border-radius: 16px;
  padding: 1rem 1.15rem;
  margin: 0 0 1.25rem;
}
.commission-box h3 { margin: 0 0 0.5rem; font-size: 1rem; }
.commission-box ol { margin: 0; padding-left: 1.2rem; color: var(--muted); }
.commission-box li { margin: 0.25rem 0; }
.commission-box strong { color: var(--text); }
.report-kpis .kpi-you .stat { color: var(--accent); }
.report-kpis .kpi-plat .stat { color: var(--admin); }
.report-kpis .kpi-rake .stat { color: var(--accent-2); }
.report-section { margin: 1.75rem 0; }
.report-section h2 { margin: 0 0 0.75rem; font-size: 1.15rem; }
.report-table tfoot td {
  border-top: 2px solid var(--line);
  background: rgba(255,255,255,0.02);
}
.report-table .pos { color: #b7f0d0; }
.report-table .neg { color: #ff8a96; }
.stat.positive { color: #2ee59d; }
.stat.negative { color: #ff8a96; }

.lobby-head h1 { margin: 0 0 0.35rem; font-size: 1.85rem; }
.lobby-head p { margin: 0 0 1.2rem; }
.table-card { display: flex; flex-direction: column; gap: 0.35rem; min-height: 230px; }
.table-card h3 { margin: 0 0 0.2rem; font-size: 1.2rem; }
.table-card .btn { margin-top: auto; }
.seat-meter { height: 8px; background: #0b1220; border-radius: 99px; overflow: hidden; margin: 0.35rem 0 0.55rem; }
.seat-meter span { display: block; height: 100%; background: linear-gradient(90deg, #1ecf88, #f5c451); }

/* ===== Poker room lobby ===== */
.lobby { animation: lobbyIn 0.55s ease; }
@keyframes lobbyIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
.lobby-hero {
  text-align: center;
  padding: 2.2rem 0.5rem 1.6rem;
  position: relative;
}
.lobby-hero::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 55%;
  width: min(520px, 90vw);
  height: 160px;
  transform: translate(-50%, -50%);
  background: radial-gradient(ellipse, rgba(30, 140, 75, 0.22), transparent 70%);
  pointer-events: none;
  z-index: 0;
}
.lobby-kicker {
  position: relative;
  z-index: 1;
  margin: 0 0 0.45rem;
  color: #f5c451;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.lobby-brand {
  position: relative;
  z-index: 1;
  margin: 0 0 0.55rem;
  font-size: clamp(2.2rem, 5.5vw, 3.4rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.05;
  background: linear-gradient(180deg, #fff 20%, #c8f5dc 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.lobby-lead {
  position: relative;
  z-index: 1;
  margin: 0 auto;
  max-width: 480px;
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.5;
}
.lobby-credit {
  position: relative;
  z-index: 1;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  margin-top: 1.15rem;
  padding: 0.65rem 1.35rem;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(245, 196, 81, 0.14), rgba(20, 168, 159, 0.1));
  border: 1px solid rgba(245, 196, 81, 0.28);
  backdrop-filter: blur(8px);
}
.lobby-credit-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(245, 196, 81, 0.75);
}
.lobby-credit strong {
  font-size: 1.45rem;
  font-weight: 800;
  color: #f5c451;
  letter-spacing: -0.02em;
}
.lobby-section-head {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0.5rem 0 1rem;
}
.lobby-section-head h2 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.lobby-live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #2ee59d;
  box-shadow: 0 0 0 0 rgba(46, 229, 157, 0.55);
  animation: livePulse 1.8s ease-out infinite;
}
@keyframes livePulse {
  0% { box-shadow: 0 0 0 0 rgba(46, 229, 157, 0.5); }
  70% { box-shadow: 0 0 0 8px rgba(46, 229, 157, 0); }
  100% { box-shadow: 0 0 0 0 rgba(46, 229, 157, 0); }
}

.lobby-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.15rem;
}

.poker-table-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  padding: 1rem 1.05rem 1.1rem;
  border-radius: 22px;
  background:
    linear-gradient(165deg, rgba(18, 32, 26, 0.95), rgba(10, 16, 20, 0.98));
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow:
    0 18px 40px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  overflow: hidden;
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}
.poker-table-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, #1a7a45, #2ee59d, #f5c451);
  opacity: 0.85;
}
.poker-table-card.is-private::before {
  background: linear-gradient(90deg, #c9a227, #f5c451, #e2ad2e);
}
.poker-table-card:hover {
  transform: translateY(-4px);
  border-color: rgba(46, 229, 157, 0.28);
  box-shadow:
    0 24px 48px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(46, 229, 157, 0.12);
}
.poker-table-card.is-paused {
  opacity: 0.78;
  filter: saturate(0.85);
}
.ptc-top {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}
.ptc-badge {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.ptc-badge.public {
  background: rgba(46, 229, 157, 0.14);
  color: #b7f0d0;
  border: 1px solid rgba(46, 229, 157, 0.22);
}
.ptc-badge.private {
  background: rgba(245, 196, 81, 0.14);
  color: #f0d8a0;
  border: 1px solid rgba(245, 196, 81, 0.25);
}
.ptc-badge.paused {
  background: rgba(255, 93, 108, 0.12);
  color: #ffb3bc;
  border: 1px solid rgba(255, 93, 108, 0.2);
}
.ptc-players {
  margin-left: auto;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--muted);
}
.ptc-players strong { color: #fff; font-size: 0.95rem; }

.ptc-felt {
  position: relative;
  height: 118px;
  margin: 0.15rem 0 0.2rem;
  display: grid;
  place-items: center;
}
.ptc-rail {
  position: absolute;
  width: 86%;
  height: 78%;
  border-radius: 999px;
  background: linear-gradient(180deg, #2a2a2a, #141414);
  box-shadow:
    0 8px 20px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
}
.ptc-felt-inner {
  position: relative;
  width: 78%;
  height: 64%;
  border-radius: 999px;
  background:
    radial-gradient(ellipse 90% 70% at 50% 35%, rgba(255, 255, 255, 0.08), transparent 55%),
    radial-gradient(circle at 50% 40%, #2a9d5c 0%, #1a7a45 45%, #0f5c32 100%);
  border: 2px solid rgba(0, 0, 0, 0.35);
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.35);
  z-index: 1;
}
.ptc-pot-chip {
  position: absolute;
  left: 50%;
  top: 48%;
  width: 18px;
  height: 18px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ffd978, #c9a227 70%);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.25), 0 2px 6px rgba(0, 0, 0, 0.35);
  z-index: 2;
}
.ptc-seat {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 11px;
  height: 11px;
  margin: -5.5px 0 0 -5.5px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  border: 1.5px dashed rgba(255, 255, 255, 0.35);
  transform: rotate(var(--a)) translateY(-38px) rotate(calc(-1 * var(--a)));
  z-index: 2;
  transition: background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.ptc-seat.filled {
  background: linear-gradient(180deg, #3ef0ad, #1ecf88);
  border: 1.5px solid rgba(255, 255, 255, 0.45);
  box-shadow: 0 0 8px rgba(46, 229, 157, 0.55);
}
.ptc-blinds-chip {
  position: absolute;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(245, 196, 81, 0.35);
  color: #f5c451;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  backdrop-filter: blur(4px);
}

.ptc-name {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-align: center;
}
.ptc-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem;
}
.ptc-meta-item {
  padding: 0.45rem 0.55rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  text-align: center;
}
.ptc-meta-label {
  display: block;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.15rem;
}
.ptc-meta-item strong {
  font-size: 0.82rem;
  font-weight: 800;
  color: #fff;
}

.ptc-meter {
  height: 6px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 99px;
  overflow: hidden;
  margin: 0;
}
.ptc-meter span {
  display: block;
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, #1a7a45, #2ee59d);
  transition: width 0.35s ease;
}
.ptc-meter.active span {
  background: linear-gradient(90deg, #1ecf88, #f5c451);
}
.ptc-meter.hot span {
  background: linear-gradient(90deg, #e8941a, #ff5d6c);
}
.ptc-cta {
  width: 100%;
  text-align: center;
  margin-top: 0.15rem;
  padding: 0.78rem 1rem;
  font-size: 0.92rem;
  border-radius: 14px;
}

.lobby-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 3rem 1rem;
  color: var(--muted);
}
.lobby-empty-felt {
  width: 120px;
  height: 70px;
  margin: 0 auto 1rem;
  border-radius: 999px;
  background: radial-gradient(circle at 50% 40%, #1a7a45, #0a4528);
  border: 6px solid #1c1c1c;
  opacity: 0.55;
}

@media (max-width: 640px) {
  .lobby-hero { padding: 1rem 0 0.85rem; }
  .lobby-grid { grid-template-columns: 1fr; gap: 0.85rem; }
  .ptc-felt { height: 100px; }
  .lobby-wrap { padding: 0.85rem 0.85rem 2rem; }
  .lobby-brand { font-size: clamp(1.7rem, 8vw, 2.4rem); }
  .lobby-lead { font-size: 0.92rem; }
  .lobby-credit { width: 100%; max-width: 280px; margin-top: 0.85rem; padding: 0.55rem 1rem; }
  .lobby-credit strong { font-size: 1.25rem; }
  .poker-table-card { padding: 0.85rem; border-radius: 18px; }
  .ptc-cta { min-height: 48px; font-size: 1rem; }
  .lobby-topbar {
    padding: 0.65rem 0.75rem;
    gap: 0.5rem;
  }
  .lobby-brand-link {
    font-size: 0.95rem;
    max-width: 42vw;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .lobby-actions { gap: 0.4rem; }
  .lobby-user-name { display: none; }
  .lobby-pill {
    padding: 0.32rem 0.55rem;
    font-size: 0.78rem;
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    line-height: 1.15;
  }
  .lobby-pill-label {
    font-size: 0.58rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    opacity: 0.75;
    font-weight: 700;
  }
  .lobby-login-btn { min-height: 40px; padding: 0.45rem 0.9rem; }
  .lobby-logout-form .btn { min-height: 36px; }
}

/* ===== Poker table (mobile reference) ===== */
.table-body {
  height: 100vh;
  height: var(--app-height, 100dvh);
  max-height: var(--app-height, 100dvh);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  touch-action: manipulation;
  background:
    radial-gradient(ellipse 80% 50% at 50% 100%, rgba(46, 229, 157, 0.06), transparent 60%),
    radial-gradient(ellipse 60% 40% at 50% 0%, rgba(245, 196, 81, 0.04), transparent 50%),
    #0a0e14;
  font-size: 13px;
}
.table-shell {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
  overflow: hidden;
  position: relative;
}
.table-stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  position: relative;
}
.table-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.45rem 0.75rem;
  padding-top: calc(0.45rem + env(safe-area-inset-top, 0px));
  z-index: 40;
  flex: 0 0 auto;
  background: linear-gradient(180deg, rgba(10, 14, 20, 0.95), rgba(10, 14, 20, 0.7));
  backdrop-filter: blur(8px);
}
.round-btn {
  width: 38px; height: 38px; border-radius: 50%; border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.06); color: #fff; display: grid; place-items: center;
  font-size: 1rem; cursor: pointer; flex: 0 0 auto; font-weight: 700;
  transition: background .15s ease, transform .12s ease;
}
.round-btn:hover { background: rgba(255,255,255,.12); transform: scale(1.04); }
.back-arrow-btn {
  width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.1);
  background: rgba(255,255,255,.06);
  color: #fff;
  display: grid; place-items: center;
  cursor: pointer; flex: 0 0 auto; padding: 0;
  transition: background .15s ease, transform .12s ease, border-color .15s ease;
}
.back-arrow-btn:hover {
  background: rgba(255,255,255,.12);
  border-color: rgba(255,255,255,.2);
  transform: scale(1.04);
}
.back-arrow-btn:active { transform: scale(0.96); }

.leave-modal {
  position: fixed; inset: 0; z-index: 200;
  display: grid; place-items: center;
  padding: 1.25rem;
  padding-bottom: calc(1.25rem + env(safe-area-inset-bottom, 0px));
}
.leave-modal[hidden] { display: none !important; }
.leave-modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(4, 8, 14, 0.72);
  backdrop-filter: blur(8px);
  animation: leaveFade 0.2s ease;
}
.leave-modal-card {
  position: relative;
  width: min(100%, 360px);
  background: linear-gradient(165deg, #1a2230 0%, #121820 100%);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 18px;
  padding: 1.35rem 1.25rem 1.15rem;
  box-shadow: 0 24px 60px rgba(0,0,0,.55);
  animation: leaveUp 0.28s cubic-bezier(0.22, 1, 0.36, 1);
  text-align: center;
}
.leave-modal-icon {
  width: 44px; height: 44px; margin: 0 auto 0.75rem;
  border-radius: 12px;
  display: grid; place-items: center;
  background: rgba(231, 76, 60, 0.15);
  color: #ff8a80;
  font-size: 1.25rem; font-weight: 700;
}
.leave-modal-card h2 {
  margin: 0 0 0.55rem;
  font-size: 1.15rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.01em;
}
.leave-modal-text {
  margin: 0 0 0.55rem;
  font-size: 0.86rem;
  line-height: 1.45;
  color: rgba(255,255,255,.78);
}
.leave-modal-text strong { color: #f5c451; font-weight: 800; }
.leave-modal-note {
  margin: 0 0 1.1rem;
  font-size: 0.75rem;
  color: rgba(255,255,255,.5);
  line-height: 1.4;
}
.leave-modal-actions {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.leave-modal-actions .btn.wide { width: 100%; justify-content: center; }
.leave-modal-extra {
  margin-top: 0.85rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255,255,255,.08);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.leave-modal-extra .linkish {
  background: none; border: 0; color: rgba(255,255,255,.55);
  font-size: 0.78rem; font-weight: 600; cursor: pointer; padding: 0.25rem;
}
.leave-modal-extra .linkish:hover { color: #2ee59d; }
@keyframes leaveFade {
  from { opacity: 0; } to { opacity: 1; }
}
@keyframes leaveUp {
  from { opacity: 0; transform: translateY(16px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.top-right-tools { display: flex; flex-direction: row; align-items: center; gap: 0.3rem; }
.wallet-badge {
  display: flex; align-items: center; gap: 0.35rem;
  background: linear-gradient(135deg, rgba(245, 196, 81, 0.18), rgba(201, 162, 39, 0.12));
  border: 1px solid rgba(245, 196, 81, 0.35);
  border-radius: 999px; padding: 0.28rem 0.65rem 0.28rem 0.5rem;
  font-size: 0.78rem; font-weight: 800; color: #f5c451;
  letter-spacing: 0.01em;
}
.money-badges {
  display: flex;
  align-items: center;
  gap: 0.22rem;
  flex-wrap: nowrap;
}
.wallet-badge.compact {
  gap: 0.2rem;
  padding: 0.12rem 0.38rem 0.12rem 0.32rem;
  font-size: 0.62rem;
  border-radius: 999px;
  line-height: 1.1;
  white-space: nowrap;
}
.wallet-badge.compact .wallet-label {
  font-size: 0.48rem;
  letter-spacing: 0.04em;
  opacity: 0.75;
}
.wallet-badge .wallet-label {
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.85;
}
.wallet-badge.is-wallet {
  background: linear-gradient(135deg, rgba(46, 229, 157, 0.2), rgba(20, 168, 159, 0.12));
  border-color: rgba(46, 229, 157, 0.45);
  color: #2ee59d;
}
.wallet-badge.is-credit {
  background: linear-gradient(135deg, rgba(46, 229, 157, 0.2), rgba(20, 168, 159, 0.12));
  border-color: rgba(46, 229, 157, 0.45);
  color: #2ee59d;
}
.wallet-badge.is-credit.is-playing {
  background: linear-gradient(135deg, rgba(245, 196, 81, 0.22), rgba(201, 162, 39, 0.14));
  border-color: rgba(245, 196, 81, 0.45);
  color: #f5c451;
}
.wallet-badge.is-credit.is-zero,
.wallet-badge.is-wallet.is-zero,
.wallet-badge.is-stack.is-zero {
  opacity: 0.5;
}
.wallet-badge .wallet-unit {
  font-size: 0.58rem;
  font-weight: 700;
  opacity: 0.75;
  text-transform: lowercase;
}
.wallet-badge.is-stack {
  background: linear-gradient(135deg, rgba(245, 196, 81, 0.18), rgba(201, 162, 39, 0.12));
  border-color: rgba(245, 196, 81, 0.35);
  color: #f5c451;
}
.wallet-badge.is-stack.is-zero {
  color: #a8945a;
  border-color: rgba(245, 196, 81, 0.2);
}
.seat.you .dealer-btn,
.seat.you .blind-btn {
  display: none !important;
}
.sit-hint { margin: 0.35rem 0 0; padding: 0 0.15rem; }
.sit-dock {
  width: 100%;
  box-sizing: border-box;
  margin: 0;
  padding: 0.6rem 0.65rem 0.55rem;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(22, 28, 38, 0.97), rgba(12, 16, 24, 0.99));
  border: 1px solid rgba(46, 229, 157, 0.28);
  box-shadow: 0 8px 24px rgba(0,0,0,.35);
}
.sit-buyin-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}
.sit-buyin-title {
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #fff;
}
.sit-buyin-range {
  font-size: 0.66rem;
  font-weight: 700;
  color: rgba(46, 229, 157, 0.95);
  white-space: nowrap;
}
.sit-row-buyin {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) auto auto;
  gap: 0.4rem;
  align-items: end;
  width: 100%;
}
.sit-amount-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  min-width: 0;
}
.sit-amount-label {
  font-size: 0.52rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255,255,255,.45);
}
.sit-row-buyin #buyinInput {
  width: 100%;
  max-width: none;
  min-width: 0;
  box-sizing: border-box;
  padding: 0.55rem 0.6rem;
  font-size: 1rem;
  font-weight: 800;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.45);
  color: #f5c451;
  text-align: center;
}
.sit-row-buyin .chip {
  align-self: end;
  min-height: 42px;
  padding: 0 0.7rem;
  border-radius: 10px;
  font-weight: 800;
}
.sit-row-buyin .sit-go {
  grid-column: 1 / -1;
  align-self: stretch;
  min-height: 48px;
  width: 100%;
  border-radius: 12px;
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: 0.05em;
  box-shadow: 0 8px 22px rgba(46, 229, 157, 0.32);
  margin-top: 0.1rem;
}
.sit-dock .sit-hint {
  margin: 0.4rem 0 0;
  text-align: center;
  color: rgba(255,255,255,.5);
  font-size: 0.68rem;
}
.wallet-icon {
  width: 14px; height: 14px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ffd978, #c9a227 70%);
  color: transparent; font-size: 0; flex-shrink: 0;
  box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.4);
}
.gold-coin {
  min-width: 28px; height: 18px; border-radius: 999px;
  background: linear-gradient(180deg, #f6d365, #c9a227);
  color: #3a2a00; font-size: 0.55rem; font-weight: 800;
  display: grid; place-items: center; padding: 0 0.3rem;
  max-width: 64px; overflow: hidden;
}
.table-menu {
  position: absolute; top: 56px; left: 12px; z-index: 50;
  background: rgba(22, 28, 38, 0.98); border: 1px solid rgba(255,255,255,.1);
  border-radius: 14px; box-shadow: 0 12px 40px rgba(0,0,0,.5);
  padding: 0.45rem; display: grid; gap: 0.2rem; min-width: 180px;
}
.table-menu[hidden] { display: none !important; }
.table-menu a, .table-menu button {
  background: transparent; border: 0; color: #fff; text-align: left;
  padding: 0.55rem 0.7rem; border-radius: 10px; font: inherit; font-weight: 600; cursor: pointer;
  transition: background .12s ease;
}
.table-menu a:hover, .table-menu button:hover { background: rgba(255,255,255,.08); }

.table-app { position: relative; flex: 1; display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.felt-wrap {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  padding: 0.2rem 0.35rem 0.15rem;
  overflow: hidden;
  gap: 0.12rem;
  position: relative;
}
.side-feed {
  position: absolute;
  left: 0.35rem;
  top: 0.2rem;
  z-index: 20;
  width: min(42vw, 11.5rem);
  max-height: 28%;
  overflow: hidden;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 0.12rem;
  mask-image: linear-gradient(180deg, transparent 0%, #000 18%, #000 100%);
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 18%, #000 100%);
}
.side-feed[hidden] { display: none !important; }
.side-feed-line {
  font-size: 0.62rem;
  font-weight: 700;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: transparent;
  background: linear-gradient(90deg, rgba(255,255,255,0.55) 0%, rgba(200, 220, 230, 0.72) 45%, rgba(245, 196, 81, 0.55) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  text-shadow: none;
  opacity: 0.72;
  transform: translateX(-10px);
  animation: sideFeedSlide 0.38s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.side-feed-line.is-latest {
  opacity: 0.95;
  background: linear-gradient(90deg, rgba(46, 229, 157, 0.85) 0%, rgba(245, 196, 81, 0.9) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  font-weight: 800;
}
@keyframes sideFeedSlide {
  from { opacity: 0; transform: translateX(-14px); }
  to { opacity: 0.72; transform: translateX(0); }
}
.side-feed-line.is-latest {
  animation-name: sideFeedSlideLatest;
}
@keyframes sideFeedSlideLatest {
  from { opacity: 0; transform: translateX(-16px); }
  to { opacity: 0.95; transform: translateX(0); }
}
.felt {
  position: relative;
  width: 100%;
  max-width: none;
  height: auto;
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  align-self: stretch;
  margin: 0 auto;
  border-radius: 999px;
  background:
    radial-gradient(ellipse 90% 70% at 50% 35%, rgba(255,255,255,.06), transparent 55%),
    radial-gradient(circle at 50% 40%, #2a9d5c 0%, #1a7a45 38%, #0f5c32 72%, #0a4528 100%);
  border: 8px solid #1c1c1c;
  box-shadow:
    inset 0 2px 0 rgba(255,255,255,.12),
    inset 0 -4px 14px rgba(0,0,0,.4),
    0 0 0 2px #111,
    0 8px 32px rgba(0,0,0,.45);
  overflow: visible;
}
.pot-area {
  position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%);
  width: 88%; text-align: center; z-index: 2; pointer-events: none;
  display: flex; flex-direction: column; align-items: center; gap: 0.35rem;
}
.pot-chip-row {
  display: inline-flex; align-items: baseline; gap: 0.35rem;
  background: rgba(0,0,0,.35); border-radius: 999px;
  padding: 0.22rem 0.75rem; backdrop-filter: blur(4px);
  border: 1px solid rgba(255,255,255,.08);
  order: 0;
}
.pot-label {
  color: rgba(255,255,255,.65); font-size: 0.68rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.06em;
}
.pot-value, .total-pot strong {
  color: #fff; font-size: 1.15rem; font-weight: 800; letter-spacing: -0.02em;
}
.total-pot { color: #fff; font-size: 1.05rem; font-weight: 700; }
.community {
  display: flex; justify-content: center; align-items: center;
  gap: 0.32rem; margin: 0.15rem 0 0; min-height: 58px;
  perspective: 520px; order: 1;
}
.community .pcard {
  width: 42px; height: 60px; border-radius: 7px;
  box-shadow: 0 6px 16px rgba(0,0,0,.4), 0 0 0 1px rgba(255,255,255,.1);
}
.table-info-row {
  display: flex; align-items: center; justify-content: center; gap: 0.3rem;
  flex-wrap: wrap; margin-top: 0.15rem; order: 2;
}
.table-badge {
  display: inline-block; padding: 0.12rem 0.45rem; border-radius: 999px;
  font-size: 0.62rem; font-weight: 700; letter-spacing: 0.03em;
  background: rgba(0,0,0,.3); color: rgba(255,255,255,.85);
  border: 1px solid rgba(255,255,255,.1);
}
.table-badge.blinds { color: #f5c451; border-color: rgba(245,196,81,.25); }
.table-badge.practice { display: none !important; }
.stage-pill {
  display: inline-block; padding: 0.14rem 0.55rem; border-radius: 999px;
  font-size: 0.68rem; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase;
  background: rgba(46, 229, 157, 0.16); color: #2ee59d;
  border: 1px solid rgba(46, 229, 157, 0.35);
}
.stage-pill.stage-showdown { background: rgba(232, 197, 71, 0.16); color: #e8c547; border-color: rgba(232, 197, 71, 0.35); }
.stage-pill.stage-runout, .stage-pill.stage-flop, .stage-pill.stage-turn, .stage-pill.stage-river {
  background: rgba(129, 212, 250, 0.14); color: #81d4fa; border-color: rgba(129, 212, 250, 0.32);
}
.action-log { display: none !important; }
.status-banner { display: none !important; }
.hand-msg { display: none !important; }
.pcard.win-card {
  box-shadow: 0 0 0 2px #f5c451, 0 0 14px rgba(245, 196, 81, 0.55), 0 4px 12px rgba(0,0,0,.3);
  transform: translateY(-2px);
}
.seat-mini-face.win-card {
  box-shadow: 0 0 0 1.5px #f5c451, 0 0 8px rgba(245, 196, 81, 0.45);
}
.winner-reveal {
  display: none;
  margin: 0.25rem auto 0;
  width: 100%;
  max-width: 100%;
  z-index: 12;
  pointer-events: none;
  animation: winnerRevealIn 0.35s ease;
}
.winner-reveal.is-visible,
.winner-reveal:not([hidden]) {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.55rem;
}
.winner-reveal[hidden] { display: none !important; }
.winner-reveal-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.18rem;
  padding: 0.4rem 0.55rem 0.45rem;
  border-radius: 12px;
  background: rgba(8, 10, 14, 0.88);
  border: 1.5px solid rgba(245, 196, 81, 0.65);
  box-shadow: 0 0 0 1px rgba(245, 196, 81, 0.2), 0 10px 28px rgba(0,0,0,.45);
}
.winner-reveal-cards {
  display: flex;
  gap: 0.2rem;
  margin: 0 0 0.05rem;
  order: 0;
}
.winner-reveal-badge {
  order: 1;
  font-size: 0.58rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  color: #1a1200;
  background: linear-gradient(180deg, #ffe08a, #f5c451);
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  box-shadow: 0 2px 8px rgba(245, 196, 81, 0.35);
  margin-top: 0.12rem;
}
.seat-mini-face.reveal-face,
.seat-mini-face.seat-face-lg {
  width: 28px;
  height: 38px;
  border-radius: 4px;
  font-size: 0.62rem;
}
.seat-mini-face.reveal-face b,
.seat-mini-face.seat-face-lg b { font-size: 0.72rem; }
.seat-mini-face.reveal-face i,
.seat-mini-face.seat-face-lg i { font-size: 0.62rem; }
.seat-mini-face.reveal-face {
  width: 34px;
  height: 46px;
  border-radius: 5px;
  box-shadow: 0 4px 12px rgba(0,0,0,.4);
}
.seat-mini-face.reveal-face b { font-size: 0.82rem; }
.seat-mini-face.reveal-face i { font-size: 0.72rem; }
.winner-reveal-name {
  order: 2;
  margin-top: 0.06rem;
  font-size: 0.72rem;
  font-weight: 800;
  color: #fff;
  max-width: 9rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.winner-reveal-hand {
  order: 3;
  font-size: 0.58rem;
  font-weight: 700;
  color: #f5c451;
  max-width: 10rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.winner-reveal-amt {
  order: 4;
  font-size: 0.7rem;
  font-weight: 900;
  color: #2ee59d;
}
@keyframes winnerRevealIn {
  from { opacity: 0; transform: translateY(6px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.pot-area.pot-flying .pot-value {
  opacity: 0.35;
  transition: opacity 0.25s ease;
}
.seat.winner .seat-avatar-wrap {
  box-shadow: 0 0 0 2px #f5c451, 0 0 16px rgba(245, 196, 81, 0.55);
  border-radius: 50%;
}
.seat.winner .seat-avatar {
  box-shadow: inset 0 0 0 2px rgba(245, 196, 81, 0.85);
}
.seat-status.winner-tag {
  background: linear-gradient(180deg, #ffe08a, #f5c451);
  color: #1a1200;
  font-weight: 900;
  letter-spacing: 0.06em;
  border: 0;
  animation: winnerPulse 1.2s ease-in-out infinite;
}
@keyframes winnerPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}
.seat-hand-rank {
  margin-top: 0.08rem; font-size: 0.52rem; font-weight: 700; color: #e8c547;
  max-width: 78px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.seat-hand-delta {
  margin-top: 0.06rem; font-size: 0.62rem; font-weight: 800;
}
.seat-hand-delta.won { color: #2ee59d; }
.seat-hand-delta.lost { color: #ff5d6c; }
.pot-fly-chip {
  position: absolute; z-index: 30; pointer-events: none;
  padding: 0.12rem 0.38rem; border-radius: 999px;
  background: radial-gradient(circle at 35% 30%, #ff7a7a, #c0392b 70%);
  color: #fff; font-size: 0.62rem; font-weight: 800;
  box-shadow: inset 0 0 0 2px #fff, 0 4px 12px rgba(0,0,0,.45);
  transform: translate(-50%, -50%);
  animation: potFly 1.1s ease-out forwards;
}
@keyframes potFly {
  0% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  70% { opacity: 1; transform: translate(calc(-50% + var(--tx)), calc(-50% + var(--ty))) scale(0.92); }
  100% { opacity: 0; transform: translate(calc(-50% + var(--tx)), calc(-50% + var(--ty))) scale(0.6); }
}
.table-meta { margin-top: 1.6rem; color: #fff; font-size: 0.78rem; font-weight: 700; }
.table-practice { display: none !important; }

.status-banner {
  margin-top: 0.4rem;
  max-width: 92%;
  margin-left: auto;
  margin-right: auto;
  padding: 0.4rem 0.65rem;
  border-radius: 10px;
  background: rgba(8, 12, 18, 0.82);
  border: 1px solid rgba(255,255,255,.12);
  text-align: center;
  animation: msgFade 0.35s ease;
}
.status-banner strong {
  display: block;
  font-size: 0.78rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.01em;
}
.status-banner span {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.62rem;
  font-weight: 600;
  color: rgba(255,255,255,.72);
  line-height: 1.35;
}
.status-banner.tone-you {
  border-color: rgba(46, 229, 157, 0.55);
  box-shadow: 0 0 0 1px rgba(46, 229, 157, 0.2), 0 8px 24px rgba(0,0,0,.35);
}
.status-banner.tone-you strong { color: #2ee59d; }
.status-banner.tone-turn strong { color: #f5c451; }
.status-banner.tone-waitbb strong { color: #81d4fa; }
.status-banner.tone-afk strong { color: #ff8a80; }
.status-banner.tone-showdown strong { color: #e8c547; }
.status-banner.tone-runout strong { color: #81d4fa; }
.turn-hint.runout { color: #81d4fa; }
.turn-hint.showdown-wait { color: #e8c547; }

.turn-hint {
  width: 100%;
  text-align: center;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  padding: 0.35rem 0.5rem;
  margin-bottom: 0.35rem;
  border-radius: 10px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1);
  color: #f5c451;
}
.turn-hint.is-you {
  color: #0b1a14;
  background: linear-gradient(135deg, #2ee59d, #14a89f);
  border-color: transparent;
  animation: turnHintPulse 1.2s ease-in-out infinite;
}
.turn-hint.waitbb { color: #81d4fa; }
@keyframes turnHintPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.02); }
}

.pot-value.pot-pulse {
  animation: potPulse 0.55s ease;
}
@keyframes potPulse {
  0% { transform: scale(1); color: #fff; }
  40% { transform: scale(1.18); color: #f5c451; }
  100% { transform: scale(1); }
}

.seats { position: absolute; inset: 0; z-index: 4; }
.seat { position: absolute; width: 72px; transform: translate(-50%, -50%); text-align: center; z-index: 5; }
.seat.empty { cursor: pointer; transition: transform .15s ease; }
.seat.empty:hover { transform: translate(-50%, -50%) scale(1.06); }
.seat.empty.picked .seat-avatar {
  border-color: var(--accent); color: var(--accent);
  box-shadow: 0 0 12px rgba(46, 229, 157, .35);
}
.seat-avatar-wrap { position: relative; width: 48px; height: 48px; margin: 0 auto; }
.seat.you .seat-avatar-wrap { width: 52px; height: 52px; }
.seat-timer {
  position: absolute;
  inset: -11px;
  width: calc(100% + 22px);
  height: calc(100% + 22px);
  z-index: 2;
  pointer-events: none;
  overflow: visible;
}
.seat-timer[hidden] { display: none !important; }
.seat-timer-track {
  fill: none;
  stroke: rgba(0, 0, 0, .55);
  stroke-width: 4.2;
}
.seat-timer-arc {
  fill: none;
  stroke: #2ee59d;
  stroke-width: 4.2;
  stroke-linecap: round;
  transition: stroke 0.2s linear;
  filter: drop-shadow(0 0 5px rgba(46, 229, 157, .55));
}
.seat-timer.warn .seat-timer-arc {
  filter: drop-shadow(0 0 6px rgba(245, 196, 81, .55));
}
.seat-timer.urgent .seat-timer-arc {
  stroke: #e74c3c !important;
  filter: drop-shadow(0 0 9px rgba(231, 76, 60, .75));
  animation: timerPulse 0.75s ease-in-out infinite;
}
@keyframes timerPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
}
.seat-timer-num {
  position: absolute;
  left: 50%;
  top: -11px;
  transform: translateX(-50%);
  min-width: 20px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: rgba(0,0,0,.75);
  color: #fff;
  font-size: 0.62rem;
  font-weight: 800;
  display: grid;
  place-items: center;
  z-index: 4;
  box-shadow: 0 0 0 2px #2ee59d;
  line-height: 1;
  transition: box-shadow 0.25s ease, color 0.25s ease;
}
.seat-timer-num[hidden] { display: none !important; }
.seat.active .seat-avatar {
  box-shadow: 0 0 0 2px #0d0d0d, 0 0 14px rgba(46, 229, 157, .55);
}
.seat.active.warn .seat-avatar {
  box-shadow: 0 0 0 2px #0d0d0d, 0 0 14px rgba(245, 196, 81, .5);
}
.seat.active.urgent .seat-avatar {
  box-shadow: 0 0 0 2px #0d0d0d, 0 0 16px rgba(231, 76, 60, .65);
  animation: avatarUrgent 0.85s ease-in-out infinite;
}
@keyframes avatarUrgent {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.03); }
}
.seat-hole-mark {
  position: absolute; left: -2px; top: -1px; width: 15px; height: 20px;
  background: linear-gradient(180deg, #ff9db4, #e85a7a);
  border-radius: 3px; transform: rotate(-22deg); z-index: 0;
  box-shadow: 0 1px 2px rgba(0,0,0,.35);
}
.seat-avatar {
  width: 48px; height: 48px; border-radius: 50%;
  display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 0.72rem;
  position: relative; z-index: 1;
  box-shadow: 0 0 0 2px #0d0d0d, 0 3px 8px rgba(0,0,0,.4);
}
.seat.folded .seat-avatar { filter: brightness(.45) grayscale(.2); }
.seat.sitout .seat-avatar { filter: brightness(.55) saturate(.5); opacity: .85; }
.seat.sitout .seat-name::after { content: " · jashtë"; color: rgba(245,196,81,.75); font-weight: 600; }
.seat-status {
  position: absolute; left: 50%; top: -2px; transform: translateX(-50%);
  font-size: 0.48rem; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase;
  white-space: nowrap; padding: 0.08rem 0.28rem; border-radius: 4px; z-index: 6;
  background: rgba(0,0,0,.75); color: #f5c451; border: 1px solid rgba(245,196,81,.35);
}
.seat-status.afk { color: #ff8a80; border-color: rgba(255,138,128,.4); }
.seat-status.waitbb { color: #81d4fa; border-color: rgba(129,212,250,.4); }
.seat-status.turn {
  color: #0b1a14;
  background: #2ee59d;
  border-color: #2ee59d;
  animation: turnHintPulse 1s ease-in-out infinite;
}

.seat-cards {
  position: absolute;
  left: 50%;
  bottom: -2px;
  transform: translateX(-50%);
  display: flex;
  gap: 2px;
  z-index: 3;
  pointer-events: none;
}
.seat-mini-card {
  display: block;
  width: 14px;
  height: 20px;
  border-radius: 2px;
  background: repeating-linear-gradient(135deg, #1e3a8a, #1e3a8a 3px, #152a68 3px, #152a68 6px);
  box-shadow: 0 2px 6px rgba(0,0,0,.45), 0 0 0 1px rgba(255,255,255,.15);
}
.seat-cards.dealing .seat-mini-card.deal-a {
  animation: seatDealA 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.seat-cards.dealing .seat-mini-card.deal-b {
  animation: seatDealB 0.45s 0.1s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes seatDealA {
  0% { opacity: 0; transform: translate(-40px, -50px) rotate(-25deg) scale(0.4); }
  100% { opacity: 1; transform: translate(0, 0) rotate(-6deg) scale(1); }
}
@keyframes seatDealB {
  0% { opacity: 0; transform: translate(40px, -50px) rotate(25deg) scale(0.4); }
  100% { opacity: 1; transform: translate(0, 0) rotate(6deg) scale(1); }
}
.seat-mini-card:first-child { transform: rotate(-6deg); }
.seat-mini-card:last-child { transform: rotate(6deg); }

.seat-bet.chip-pop {
  animation: chipPop 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes chipPop {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) translate(var(--dx, 0), calc(var(--dy, -40px) + 14px)) scale(0.55);
  }
  55% {
    opacity: 1;
    transform: translate(-50%, -50%) translate(var(--dx, 0), calc(var(--dy, -40px) - 4px)) scale(1.15);
  }
  100% {
    opacity: 1;
    transform: translate(-50%, -50%) translate(var(--dx, 0), var(--dy, -40px)) scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .seat-cards.dealing .seat-mini-card,
  .seat-bet.chip-pop,
  .turn-hint.is-you,
  .pot-value.pot-pulse {
    animation: none !important;
  }
}
.seat.empty .seat-avatar {
  background: rgba(0,0,0,.25) !important;
  border: 1.5px dashed rgba(255,255,255,.22);
  box-shadow: none; color: rgba(255,255,255,.4);
  font-size: 0.95rem; transition: border-color .15s ease, color .15s ease, box-shadow .15s ease;
}
.seat.empty .seat-name { display: none !important; }
.seat-tag {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  border-radius: 999px; padding: 0.08rem 0.42rem; z-index: 3;
  font-size: 0.6rem; font-weight: 800; color: #fff; white-space: nowrap;
}
.seat-tag.fold { background: #c0392b; }
.seat-tag.call, .seat-tag.check { background: #1aa05a; }
.seat-tag.raise, .seat-tag.bet, .seat-tag.allin { background: #0e8a8a; }
.seat-name {
  margin: 0.22rem auto 0;
  background: rgba(0, 0, 0, 0.78);
  color: #fff;
  font-weight: 800;
  font-size: 0.68rem;
  border-radius: 7px;
  padding: 0.18rem 0.42rem;
  max-width: 92px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  border: 1px solid rgba(255,255,255,.14);
  line-height: 1.2;
  text-shadow: 0 1px 2px rgba(0,0,0,.55);
  box-shadow: 0 2px 8px rgba(0,0,0,.28);
}
.seat-stack-row {
  margin-top: 0.18rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  position: relative;
  z-index: 2;
}
.seat-stack {
  background: rgba(8, 10, 14, 0.92);
  color: #f5c451;
  font-weight: 900;
  font-size: 0.7rem;
  border-radius: 7px;
  padding: 0.16rem 0.42rem;
  border: 1px solid rgba(245, 196, 81, 0.35);
  letter-spacing: 0.01em;
  text-shadow: 0 1px 2px rgba(0,0,0,.45);
  box-shadow: 0 2px 8px rgba(0,0,0,.3);
}
.seat-stack.stack-up { color: #2ee59d; background: rgba(8, 20, 16, 0.92); border-color: rgba(46, 229, 157, 0.4); }
.seat-stack.stack-down { color: #f5c451; background: rgba(8, 10, 14, 0.92); border-color: rgba(245, 196, 81, 0.35); }
.seat-stack.stack-critical { color: #ff8a94; background: rgba(28, 8, 12, 0.92); border-color: rgba(255, 93, 108, 0.45); }
.money-wallet {
  color: #2ee59d !important;
  font-weight: 800;
}
.money-stack {
  color: #f5c451 !important;
  font-weight: 700;
}
.withdrawable-hint {
  font-size: 0.72rem;
  color: var(--muted);
  margin: 0.35rem 0 0.75rem;
}
.seat-bet {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 4px);
  top: auto;
  transform: translateX(-50%);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 900;
  z-index: 8;
  display: inline-flex;
  align-items: center;
  gap: 0.22rem;
  padding: 0.14rem 0.4rem 0.14rem 0.28rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.82);
  border: 1px solid rgba(255,255,255,.18);
  box-shadow: 0 4px 12px rgba(0,0,0,.4);
  white-space: nowrap;
  text-shadow: none;
  pointer-events: none;
}
.seat-bet::before {
  content: "";
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex: 0 0 12px;
  background: radial-gradient(circle at 35% 30%, #ff7a7a, #c0392b 70%);
  box-shadow: inset 0 0 0 1.5px #fff;
}
.dealer-btn {
  position: absolute;
  right: -5px;
  top: -6px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #e74c3c;
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 0.52rem;
  font-weight: 900;
  z-index: 7;
  box-shadow: 0 1px 4px rgba(0,0,0,.45);
  border: 1px solid rgba(255,255,255,.2);
}
.blind-btn {
  position: absolute;
  left: -5px;
  top: -5px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.48rem;
  font-weight: 900;
  z-index: 7;
  box-shadow: 0 1px 4px rgba(0,0,0,.45);
  border: 1px solid rgba(255,255,255,.15);
}
.blind-btn.sb { background: #5b8def; color: #fff; }
.blind-btn.bb { background: #f0c14b; color: #2a1c00; left: auto; right: -5px; bottom: -4px; top: auto; }

.seat.you { width: 92px; z-index: 14; transform: translate(-50%, calc(-50% - 26px)); }
.seat.you .seat-avatar { width: 52px; height: 52px; }

.seat-chat-bubble {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 6px);
  transform: translateX(-50%) translateY(6px) scale(0.92);
  min-width: 72px;
  max-width: 118px;
  padding: 0.35rem 0.5rem;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(20, 168, 159, 0.82), rgba(46, 229, 157, 0.55));
  border: 1px solid rgba(255,255,255,.22);
  backdrop-filter: blur(8px);
  box-shadow: 0 6px 18px rgba(0,0,0,.35);
  z-index: 12;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.seat-chat-bubble.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0) scale(1);
}
.seat-chat-bubble.fade-out {
  opacity: 0;
  transform: translateX(-50%) translateY(-4px) scale(0.95);
}
.seat-chat-bubble::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -5px;
  transform: translateX(-50%) rotate(45deg);
  width: 8px;
  height: 8px;
  background: rgba(20, 168, 159, 0.75);
  border-right: 1px solid rgba(255,255,255,.15);
  border-bottom: 1px solid rgba(255,255,255,.15);
}
.seat.you .seat-chat-bubble {
  background: linear-gradient(135deg, rgba(245, 196, 81, 0.85), rgba(255, 217, 120, 0.55));
}
.seat.you .seat-chat-bubble::after {
  background: rgba(245, 196, 81, 0.75);
}
.seat-chat-name {
  display: block;
  font-size: 0.52rem;
  font-weight: 800;
  color: rgba(255,255,255,.85);
  margin-bottom: 0.1rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.seat-chat-text {
  display: block;
  font-size: 0.62rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.25;
  word-break: break-word;
}

.chat-panel {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  flex-direction: column;
  pointer-events: auto;
  animation: chatPanelIn 0.22s ease-out;
}
.chat-panel[hidden] { display: none !important; }
.chat-panel-scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      165deg,
      rgba(6, 12, 22, 0.55) 0%,
      rgba(8, 16, 28, 0.62) 40%,
      rgba(4, 10, 18, 0.7) 100%
    );
  backdrop-filter: blur(12px) saturate(1.1);
  -webkit-backdrop-filter: blur(12px) saturate(1.1);
}
.chat-panel-sheet {
  position: relative;
  z-index: 1;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  margin: 0;
  padding:
    calc(0.55rem + env(safe-area-inset-top, 0px))
    0.85rem
    calc(0.55rem + env(safe-area-inset-bottom, 0px))
    0.85rem;
  background: transparent;
}
.chat-panel::before { display: none; }
@keyframes chatPanelIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
.chat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.35rem 0.1rem 0.55rem;
  border-bottom: 1px solid rgba(255,255,255,.12);
  flex: 0 0 auto;
}
.chat-head strong {
  font-size: 1.12rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #fff;
  text-shadow: 0 2px 12px rgba(0,0,0,.55);
}
.chat-close-btn {
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.22);
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1;
  display: grid;
  place-items: center;
  cursor: pointer;
  padding: 0;
  box-shadow: 0 4px 14px rgba(0,0,0,.35);
}
.chat-close-btn:active {
  transform: scale(0.96);
  background: rgba(255,255,255,.1);
}
.chat-log {
  flex: 1;
  min-height: 0;
  max-height: none;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0.65rem 0.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
/* Push few messages to the bottom so open view shows latest, not empty space */
.chat-log::before {
  content: "";
  flex: 1 1 0;
  min-height: 0;
}
.chat-row {
  padding: 0.55rem 0.75rem;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.42);
  border: 1px solid rgba(255,255,255,.12);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 4px 14px rgba(0,0,0,.25);
}
.chat-row.you {
  background: rgba(20, 168, 159, 0.38);
  border-color: rgba(46, 229, 157, 0.35);
}
.chat-row-name {
  display: block;
  font-size: 0.7rem;
  font-weight: 800;
  color: #f5c451;
  margin-bottom: 0.12rem;
  text-shadow: 0 1px 3px rgba(0,0,0,.45);
}
.chat-row.you .chat-row-name { color: #9af0e8; }
.chat-row-text {
  display: block;
  font-size: 0.95rem;
  color: #fff;
  line-height: 1.4;
  word-break: break-word;
  text-shadow: 0 1px 3px rgba(0,0,0,.4);
}
.chat-compose {
  display: flex;
  gap: 0.45rem;
  padding: 0.55rem 0.1rem 0.15rem;
  border-top: 1px solid rgba(255,255,255,.12);
  flex: 0 0 auto;
  background: transparent;
}
.chat-compose input {
  flex: 1;
  min-width: 0;
  padding: 0.78rem 0.9rem;
  font-size: 16px; /* avoid iOS zoom on focus */
  border-radius: 14px;
  background: rgba(0,0,0,.5);
  border: 1px solid rgba(255,255,255,.16);
  color: #fff;
}
.chat-compose input::placeholder { color: rgba(255,255,255,.45); }
.chat-compose .btn {
  min-height: 48px;
  padding: 0 1.1rem;
  border-radius: 14px;
  font-weight: 800;
}
.chat-login-hint { padding: 0.75rem 0.25rem; margin: 0; color: rgba(255,255,255,.75); }
/* legacy fab — keep hidden if any cached markup */
.chat-close-fab { display: none !important; }
.table-app.chat-open .chat-float-btn {
  opacity: 0.35;
}
.sq-btn.on {
  background: rgba(20, 168, 159, 0.25);
  border-color: rgba(46, 229, 157, 0.45);
  color: #7eede6;
}

.hole-strip {
  display: none !important;
}
.hole-strip.is-peekable {
  cursor: default;
}
.hole-strip.is-face {
  cursor: default;
}
.hero-hole-bar {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 0;
  width: 100%;
  max-width: none;
  align-self: stretch;
  min-height: 0;
  height: auto;
  margin-top: 0;
  padding: 0.1rem 0.35rem 0.05rem;
  z-index: 12;
  overflow: visible;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}
.hero-hole-bar.is-peeking {
  z-index: 45;
}
.hero-hole-bar[hidden] { display: none !important; }
.hero-hole-stack {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 150px;
  height: 48px;
  flex: 0 0 48px;
  line-height: 0;
  overflow: visible;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-user-drag: none;
  touch-action: none;
}
.hero-hole-stack.is-peeking {
  z-index: 45;
}
.peek-cards-btn {
  appearance: none;
  -webkit-appearance: none;
  position: relative;
  left: auto;
  top: auto;
  transform: none;
  z-index: 6;
  border: 1px solid rgba(245, 196, 81, 0.6);
  background: rgba(10, 14, 20, 0.96);
  color: #f5c451;
  font-weight: 800;
  font-size: 0.78rem;
  letter-spacing: 0.03em;
  border-radius: 999px;
  padding: 0.62rem 1.25rem;
  min-width: 8.2rem;
  min-height: 2.55rem;
  cursor: pointer;
  pointer-events: auto;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-user-drag: none;
  white-space: nowrap;
  box-shadow: 0 6px 18px rgba(0,0,0,.45);
  transition: opacity .14s ease, transform .14s ease, border-color .14s ease, background .14s ease;
}
.peek-cards-btn:focus {
  outline: none;
}
.peek-cards-btn:focus-visible {
  outline: 2px solid rgba(245, 196, 81, 0.55);
  outline-offset: 2px;
}
.peek-cards-btn.is-holding,
.peek-cards-btn.is-open {
  opacity: 0.55;
  transform: scale(0.98);
  border-color: rgba(245, 196, 81, 0.35);
  background: rgba(10, 14, 20, 0.78);
}
.peek-cards-btn[hidden] { display: none !important; }
.hole-strip {
  display: none !important;
}
.hole-strip.revealed { opacity: 1; }
.hole-strip .pcard { pointer-events: none; }
.hole-strip[hidden] { display: none !important; }
.hole-strip .pcard {
  width: 42px; height: 60px; border-radius: 7px;
}
/* Face cards rise from the button straight up */
.hole-peek {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 120;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 0.34rem;
  margin: 0;
  padding: 0;
  width: max-content;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transform: translate3d(-50%, 8px, 0) scale(0.7);
  transform-origin: center bottom;
  filter: drop-shadow(0 16px 28px rgba(0,0,0,.55));
  transition:
    transform 0.3s cubic-bezier(0.16, 0.92, 0.24, 1),
    opacity 0.16s ease,
    visibility 0s linear 0.3s;
  will-change: transform, opacity;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}
.hole-peek.is-ready {
  visibility: hidden;
}
.hole-peek.is-up {
  opacity: 1;
  visibility: visible;
  transform: translate3d(-50%, calc(-100% - 12px), 0) scale(1.35);
  transition:
    transform 0.3s cubic-bezier(0.16, 0.92, 0.24, 1),
    opacity 0.14s ease,
    visibility 0s linear 0s;
}
.hole-peek .pcard {
  width: 52px;
  height: 74px;
  border-radius: 8px;
  pointer-events: none;
  box-shadow:
    0 18px 34px rgba(0,0,0,.58),
    0 0 0 1px rgba(255,255,255,.14);
  transform: translateY(12px);
  transition: transform 0.3s cubic-bezier(0.16, 0.92, 0.24, 1);
  transition-delay: calc(var(--peek-i, 0) * 28ms);
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}
.hole-peek.is-up .pcard {
  transform: translateY(0);
}
body.is-peek-holding,
body.is-peek-holding * {
  -webkit-user-select: none !important;
  user-select: none !important;
  -webkit-touch-callout: none !important;
}
body.is-peek-holding {
  -webkit-tap-highlight-color: transparent;
}
@media (prefers-reduced-motion: reduce) {
  .hole-peek,
  .hole-peek .pcard {
    transition: none !important;
  }
}
/* legacy lifted strip — unused */
.hole-strip.is-lifted {
  display: none !important;
}
.hole-strip:not(.dim):not(.is-lifted) .pcard:hover { transform: none; }
.hole-strip.dim { opacity: .9; }
.seat.you .seat-cards { display: none !important; }
.seat.you.winner .seat-cards.showdown-cards {
  display: flex !important;
}
.seat.you {
  z-index: 14;
}
.seat.you .seat-stack-row,
.seat.you .seat-name,
.seat.you .seat-hand-delta,
.seat.you .seat-hand-rank {
  position: relative;
  z-index: 15;
}

.seat-mini-face {
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center;
  width: 14px; height: 18px; border-radius: 3px; background: #f7f3ea; color: #161616;
  font-size: 0.45rem; font-weight: 800; line-height: 1; box-shadow: 0 1px 3px rgba(0,0,0,.35);
}
.seat-mini-face.red { color: #c0392b; }
.seat-mini-face b { font-size: 0.48rem; }
.seat-mini-face i { font-style: normal; font-size: 0.42rem; }
.seat-cards.showdown-cards { gap: 1px; }

.pcard {
  width: 40px; height: 56px; border-radius: 6px; background: #f7f3ea; color: #161616;
  box-shadow: 0 4px 12px rgba(0,0,0,.3), 0 0 0 1px rgba(0,0,0,.08);
  display: flex; flex-direction: column;
  justify-content: space-between; padding: 0.1rem 0.15rem 0.08rem; font-weight: 800; position: relative;
  overflow: hidden;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}
.pcard.red { color: #c0392b; }
.pcard-rank { font-size: 1.05rem; line-height: 1; letter-spacing: -0.02em; }
.pcard-suit { font-size: 0.95rem; line-height: 1; }
.pcard-suit.big {
  position: absolute; left: 50%; top: 54%;
  transform: translate(-50%, -50%);
  font-size: 1.55rem; line-height: 1; opacity: 0.92;
  right: auto; bottom: auto;
}
.community .pcard-rank { font-size: 1.05rem; }
.community .pcard-suit { font-size: 0.95rem; }
.community .pcard-suit.big { font-size: 1.55rem; }
.hole-strip .pcard-rank { font-size: 1.25rem; }
.hole-strip .pcard-suit { font-size: 1.1rem; }
.hole-strip .pcard-suit.big { font-size: 2rem; }
.pcard.back {
  background: repeating-linear-gradient(135deg, #1e3a8a, #1e3a8a 5px, #152a68 5px, #152a68 10px);
  color: #fff; align-items: center; justify-content: center;
}

/* Deal / reveal animations (size unchanged) */
.pcard-deal-in {
  animation: pcardDealIn 0.42s cubic-bezier(0.22, 1, 0.36, 1) both;
  transform-origin: center bottom;
}
.pcard-flip-in {
  animation: pcardFlipIn 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
  transform-origin: center center;
}
@keyframes pcardDealIn {
  0% {
    opacity: 0;
    transform: translateY(-28px) scale(0.72) rotate(-8deg);
  }
  60% {
    opacity: 1;
    transform: translateY(3px) scale(1.04) rotate(1deg);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1) rotate(0deg);
  }
}
@keyframes pcardFlipIn {
  0% {
    opacity: 0;
    transform: translateY(-18px) rotateY(88deg) scale(0.85);
    filter: brightness(1.35);
  }
  45% {
    opacity: 1;
    transform: translateY(2px) rotateY(-12deg) scale(1.06);
    filter: brightness(1.08);
  }
  100% {
    opacity: 1;
    transform: translateY(0) rotateY(0deg) scale(1);
    filter: none;
  }
}
.community .pcard-flip-in,
.community .pcard-deal-in {
  animation-duration: 0.48s;
}
.hole-strip .pcard-flip-in {
  animation-duration: 0.58s;
}
.hole-strip:not(.dim) .pcard.pcard-flip-in:hover,
.hole-strip:not(.dim) .pcard.pcard-deal-in:hover {
  transform: translateY(-4px);
}

@media (prefers-reduced-motion: reduce) {
  .pcard-deal-in,
  .pcard-flip-in {
    animation: none !important;
  }
}

.table-dock {
  flex: 0 0 auto;
  z-index: 30;
  position: relative;
  padding: 0.35rem 0.4rem calc(0.35rem + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(0deg, rgba(10, 14, 20, 0.98) 55%, rgba(14, 20, 30, 0.92));
  border-top: 1px solid rgba(255,255,255,.06);
  backdrop-filter: blur(12px);
}
.chat-float-btn {
  position: relative;
  right: auto;
  top: auto;
  z-index: 2;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(18, 24, 34, 0.96);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,.35);
  padding: 0;
  flex: 0 0 auto;
}
.dock-rail .chat-float-btn {
  margin: 0;
}
.chat-float-btn .chat-float-ico { font-size: 1.15rem; line-height: 1; }
.chat-float-btn.on {
  border-color: rgba(46, 229, 157, 0.45);
  box-shadow: 0 0 0 1px rgba(46, 229, 157, 0.25), 0 8px 22px rgba(0,0,0,.4);
}
.chat-float-btn.has-unread {
  border-color: rgba(245, 196, 81, 0.55);
}
.chat-notify {
  position: absolute;
  top: -3px;
  right: -3px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px 5px;
  border-radius: 999px;
  background: #e74c3c;
  box-shadow: 0 0 0 2px rgba(10, 14, 20, 0.95);
  pointer-events: none;
}
.chat-notify[hidden] { display: none !important; }
.chat-notify i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #fff;
  display: block;
  animation: chatDotPulse 1.1s ease-in-out infinite;
}
.chat-notify i:nth-child(2) { animation-delay: 0.2s; }
@keyframes chatDotPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.85); }
}
.table-dock::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #c0392b 0%, #e8941a 25%, #14a89f 60%, #2ee59d 100%);
  opacity: 0.95;
}
.dock-inner {
  width: 100%;
  max-width: none;
  margin: 0;
  position: relative;
}
.dock-inner.has-raise .dock-row { visibility: hidden; height: 0; overflow: hidden; margin: 0; }
.dock-inner.is-sitout .action-dock,
.dock-inner.is-sitout .more-round {
  display: none !important;
}
.dock-inner.is-sitout .dock-row {
  grid-template-columns: minmax(0, 1fr) 40px;
}
/* Joining / buy-in: hide chat rail completely — sit panel full width */
.dock-inner.is-joining .dock-rail {
  display: none !important;
}
.dock-inner.is-joining .dock-row {
  grid-template-columns: 1fr;
  gap: 0;
}
.dock-inner.is-joining .dock-main {
  width: 100%;
}
.dock-inner.is-joining .sit-dock {
  width: 100%;
  max-width: none;
  margin: 0;
  border-radius: 12px;
}
.dock-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 40px;
  gap: 0.35rem;
  align-items: end;
  width: 100%;
}
.dock-main { min-width: 0; }
.dock-rail {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 0.4rem;
  width: 40px;
  min-height: 50px;
}
.sq-btn {
  width: 40px; height: 40px; border: 1px solid rgba(255,255,255,.08); border-radius: 12px;
  background: rgba(255,255,255,.06); color: #eee; cursor: pointer; font-size: 0.95rem;
  display: grid; place-items: center; padding: 0; flex: 0 0 auto;
  transition: background .12s ease, transform .1s ease;
}
.sq-btn:hover { background: rgba(255,255,255,.12); transform: scale(1.04); }
.action-dock[hidden], .sit-dock[hidden], .return-dock[hidden], .action-main[hidden], .raise-panel[hidden] { display: none !important; }
.return-dock {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  width: 100%;
  margin: 0;
  padding: 0.45rem 0.5rem 0.5rem;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(46, 229, 157, 0.28);
  box-sizing: border-box;
}
.return-dock .btn.wide {
  width: 100%;
  max-width: none;
  justify-content: center;
  min-height: 48px;
  font-weight: 800;
  border-radius: 12px;
  margin: 0;
}
.return-dock .sit-hint {
  margin: 0;
  padding: 0 0.1rem;
  text-align: center;
  line-height: 1.35;
}
.dock-inner:not(.has-actions) .more-round { visibility: hidden; pointer-events: none; }
.action-main {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0.35rem;
  align-items: center;
  width: 100%;
}
.action-main .btn {
  height: 50px;
  min-height: 50px;
  border: 0 !important;
  border-radius: 14px;
  color: #fff !important;
  font-weight: 800;
  letter-spacing: .04em;
  font-size: 0.84rem;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 0.25rem;
  line-height: 1.1;
  text-align: center;
  white-space: pre-line;
  box-shadow: 0 4px 12px rgba(0,0,0,.25);
  transition: transform .12s ease, filter .12s ease, box-shadow .12s ease;
}
.action-main .btn:not(:disabled):hover { transform: translateY(-2px); filter: brightness(1.08); }
.action-main .btn:not(:disabled):active { transform: translateY(0); }
.action-main .btn:disabled { opacity: .32; pointer-events: none; transform: none; box-shadow: none; }
.action-dock.is-turn .action-main .btn:not(:disabled) {
  animation: actionPulse 2.5s ease-in-out infinite;
}
@keyframes actionPulse {
  0%, 100% { box-shadow: 0 4px 12px rgba(0,0,0,.25); }
  50% { box-shadow: 0 4px 18px rgba(46, 229, 157, .2); }
}
.act-fold { background: linear-gradient(180deg, #c0392b, #962d22) !important; }
.act-check, .act-call { background: linear-gradient(180deg, #e8941a, #c4740f) !important; }
.act-bet, .act-raise { background: linear-gradient(180deg, #14a89f, #0a7a74) !important; }
.more-round {
  width: 40px; height: 40px; border-radius: 50%; border: 0;
  background: linear-gradient(180deg, #14a89f, #0a7a74);
  color: #fff; font-size: 0.95rem; font-weight: 800; cursor: pointer;
  display: grid; place-items: center; padding: 0; justify-self: center;
  box-shadow: 0 4px 12px rgba(10, 122, 116, .35);
  transition: transform .12s ease, filter .12s ease;
}
.more-round:not(:disabled):hover { transform: scale(1.06); filter: brightness(1.08); }
.more-round:disabled { opacity: .32; pointer-events: none; box-shadow: none; }
.dock-card {
  width: 100%;
  box-sizing: border-box;
  background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08);
  border-radius: 14px; padding: 0.55rem;
}
.sit-row { display: flex; gap: 0.3rem; flex-wrap: wrap; align-items: center; justify-content: center; }
.sit-row select { display: none !important; }
.sit-row input, #betAmount {
  width: auto; min-width: 78px; max-width: 120px; padding: 0.35rem 0.45rem; font-size: 0.78rem; border-radius: 8px;
}
.dock-error { margin: 0.25rem 0 0; }
.chip {
  border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.06); color: #fff;
  border-radius: 999px; padding: 0.32rem 0.6rem; font-weight: 700; cursor: pointer;
  font-family: inherit; font-size: 0.72rem;
  transition: background .12s ease, border-color .12s ease, transform .1s ease;
}
.chip:hover { background: rgba(255,255,255,.1); transform: translateY(-1px); }
.chip.on { background: rgba(20, 168, 159, .25); border-color: rgba(20, 168, 159, .5); color: #7eede6; }
.raise-panel {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  width: 100%;
  margin: 0;
  z-index: 55;
  background: rgba(16, 22, 32, .98);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 16px;
  padding: 0.75rem 0.85rem 0.85rem;
  box-shadow: 0 -8px 40px rgba(0, 0, 0, .5);
  backdrop-filter: blur(16px);
  animation: raiseSlideUp .22s ease-out;
  overflow: hidden;
}
.raise-panel::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #14a89f, #2ee59d, #f5c451);
}
@keyframes raiseSlideUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
.raise-head { display: flex; align-items: flex-start; gap: 0.5rem; margin-bottom: 0.15rem; }
.raise-head-text { flex: 1; min-width: 0; }
.raise-head strong { font-size: 0.92rem; display: block; }
.raise-range { display: block; color: var(--muted); font-size: 0.68rem; font-weight: 600; margin-top: 0.1rem; }
.raise-amount-wrap { text-align: center; margin: 0.15rem 0 0.35rem; }
.raise-amount {
  font-size: 1.65rem; font-weight: 800; color: #f5c451;
  letter-spacing: -0.03em; line-height: 1.1;
}
.slider-wrap { padding: 0.35rem 0 0.45rem; }
.slider-track {
  position: relative;
  height: 32px;
  display: flex;
  align-items: center;
}
.slider-track::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  height: 10px;
  background: rgba(255,255,255,.1);
  border-radius: 999px;
  z-index: 0;
  box-shadow: inset 0 1px 3px rgba(0,0,0,.25);
}
.slider-fill {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  height: 10px;
  width: 0%;
  background: linear-gradient(90deg, #0a7a74, #14a89f, #2ee59d 70%, #f5c451);
  border-radius: 999px;
  pointer-events: none;
  z-index: 1;
  transition: width 0.06s ease;
  box-shadow: 0 0 10px rgba(46, 229, 157, .35);
}
#raiseSlider {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 32px;
  margin: 0;
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  outline: none;
  cursor: pointer;
}
#raiseSlider::-webkit-slider-runnable-track {
  height: 10px;
  background: transparent;
  border: 0;
}
#raiseSlider::-moz-range-track {
  height: 10px;
  background: transparent;
  border: 0;
}
#raiseSlider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 26px;
  height: 26px;
  margin-top: -8px;
  border-radius: 50%;
  background: linear-gradient(180deg, #ffd978, #f5c451);
  box-shadow: 0 2px 10px rgba(245, 196, 81, .5), 0 0 0 3px rgba(46, 229, 157, .35);
  border: 2px solid #fff;
  cursor: grab;
}
#raiseSlider:active::-webkit-slider-thumb { cursor: grabbing; }
#raiseSlider::-moz-range-thumb {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid #fff;
  background: linear-gradient(180deg, #ffd978, #f5c451);
  box-shadow: 0 2px 10px rgba(245, 196, 81, .5), 0 0 0 3px rgba(46, 229, 157, .35);
  cursor: grab;
}
#raiseSlider:active::-moz-range-thumb { cursor: grabbing; }
.raise-presets { display: flex; gap: 0.35rem; flex-wrap: wrap; margin: 0.45rem 0 0.55rem; justify-content: center; }
.raise-confirm-row { display: flex; gap: 0.4rem; align-items: stretch; }
.raise-confirm-row input {
  flex: 0 0 90px; text-align: center; font-weight: 700; font-size: 0.85rem;
  background: rgba(0,0,0,.35); border: 1px solid rgba(255,255,255,.1); border-radius: 10px;
}
.raise-confirm-row .btn {
  flex: 1; min-height: 44px; font-size: 0.88rem; border-radius: 12px;
  box-shadow: 0 4px 14px rgba(10, 122, 116, .35);
}
.icon-btn.tiny {
  width: 30px; height: 30px; flex-shrink: 0; border: 0; border-radius: 8px;
  background: rgba(255,255,255,.08); color: #fff; cursor: pointer;
  transition: background .12s ease;
}
.icon-btn.tiny:hover { background: rgba(255,255,255,.15); }
.mini { color: #9aa; font-size: 0.72rem; }

/* ===== Admin / Manager mobile shell ===== */
.mobile-bar {
  position: sticky;
  top: 0;
  z-index: 40;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 0.75rem;
  padding-top: max(0.55rem, env(safe-area-inset-top));
  background: rgba(11, 18, 32, 0.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}
.mobile-bar .brand { font-size: 0.95rem; flex: 0 0 auto; }
.mobile-bar-title {
  flex: 1;
  min-width: 0;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: right;
}
.mobile-menu-btn {
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255,255,255,.06);
  color: var(--text);
  font-size: 1.15rem;
  cursor: pointer;
  flex: 0 0 auto;
}
.nav-backdrop {
  position: fixed;
  inset: 0;
  z-index: 45;
  background: rgba(0, 0, 0, 0.55);
  border: 0;
  padding: 0;
  margin: 0;
}
.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 35;
  display: none;
  grid-template-columns: repeat(5, 1fr);
  gap: 0;
  padding: 0.35rem 0.25rem;
  padding-bottom: max(0.35rem, env(safe-area-inset-bottom));
  background: rgba(8, 12, 20, 0.96);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(12px);
}
.bn-item {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.12rem;
  min-height: 52px;
  padding: 0.25rem 0.15rem;
  font-family: inherit;
  font-size: 0.62rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  border-radius: 10px;
}
.bn-item .bn-ico { font-size: 1.05rem; line-height: 1; }
.bn-item.is-active { color: var(--accent); background: rgba(46, 229, 157, 0.08); }
.theme-admin .bn-item.is-active { color: var(--admin); background: rgba(125, 180, 255, 0.1); }
.theme-admin .bottom-nav { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 860px) {
  .app-body {
    grid-template-columns: 1fr;
    min-height: 100dvh;
  }
  .app-body.has-bottom-nav .main {
    padding: 0.85rem 0.85rem calc(4.6rem + env(safe-area-inset-bottom));
  }
  .desktop-only { display: none !important; }
  .mobile-bar { display: flex; }
  .bottom-nav { display: grid; }
  .mobile-close-btn { display: grid; place-items: center; }
  .nav-backdrop[hidden] { display: none !important; }
  .nav-backdrop:not([hidden]) { display: block; }

  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(300px, 86vw);
    z-index: 50;
    border-right: 1px solid var(--line);
    border-bottom: 0;
    transform: translateX(-105%);
    transition: transform 0.22s ease;
    padding-top: max(1rem, env(safe-area-inset-top));
    padding-bottom: max(1rem, env(safe-area-inset-bottom));
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  body.nav-open { overflow: hidden; }
  body.nav-open .sidebar { transform: translateX(0); box-shadow: 24px 0 48px rgba(0,0,0,.45); }

  .sidebar nav a {
    padding: 0.85rem 0.9rem;
    font-size: 1rem;
    min-height: 48px;
    display: flex;
    align-items: center;
  }

  .page-head {
    flex-direction: column;
    align-items: stretch;
    gap: 0.65rem;
  }
  .page-head h1 { font-size: 1.25rem; margin: 0; }
  .grid.two { grid-template-columns: 1fr; }
  .grid.cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
  }
  .card { padding: 0.85rem; border-radius: 14px; }
  .stat { font-size: 1.35rem; }
  .form-card {
    max-width: none;
    padding: 0.9rem;
  }
  .btn {
    min-height: 44px;
    padding: 0.7rem 1rem;
  }
  .btn.small { min-height: 40px; }
  input, select {
    min-height: 46px;
    font-size: 16px;
  }

  .table-wrap {
    margin: 0 -0.15rem;
    border-radius: 12px;
    -webkit-overflow-scrolling: touch;
  }
  .table-wrap table {
    min-width: 560px;
  }
  .balance-table .money-action-form,
  .money-action-form {
    min-width: 0;
    max-width: none;
    width: 100%;
  }
  .money-action-form .credit-amount,
  .inline-credit-form .credit-amount {
    max-width: none;
    width: 100%;
    min-height: 44px;
  }
  .money-btns .btn { flex: 1; min-width: 0; }
  .report-toolbar { flex-direction: column; align-items: stretch; }
  .report-filters { width: 100%; }
  .report-filters label { min-width: 0; flex: 1 1 140px; }
  .commission-box { padding: 0.85rem; font-size: 0.9rem; }
  .alert { font-size: 0.9rem; word-break: break-word; }
  .actions { gap: 0.45rem; }
  .actions .btn, .actions form .btn { flex: 1 1 auto; }
  .main > p {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  .main > p .btn { flex: 1 1 auto; justify-content: center; text-align: center; }
}

@media (max-width: 420px) {
  .grid.cards { grid-template-columns: 1fr; }
  .bn-item span:not(.bn-ico) { font-size: 0.58rem; }
}

@media (min-width: 861px) {
  .mobile-bar,
  .nav-backdrop,
  .bottom-nav,
  .mobile-close-btn { display: none !important; }
  body.nav-open { overflow: auto; }
}

@media (orientation: landscape) {
  html:not(.orient-portrait-lock) .felt-wrap,
  html:not(.is-device-landscape) .felt-wrap {
    padding: 0.2rem 0.45rem 0.15rem;
    align-items: stretch;
    justify-content: flex-start;
  }
  html:not(.orient-portrait-lock) .felt,
  html:not(.is-device-landscape) .felt {
    width: 100%;
    max-width: none;
    height: auto;
    max-height: none;
    align-self: stretch;
    border-radius: 999px;
  }
  html:not(.orient-portrait-lock) .hero-hole-bar,
  html:not(.is-device-landscape) .hero-hole-bar {
    min-height: 0;
    max-width: none;
    padding: 0.05rem 0.35rem 0;
  }
  html:not(.orient-portrait-lock) .hole-strip .pcard,
  html:not(.is-device-landscape) .hole-strip .pcard { width: 40px; height: 56px; }
  html:not(.orient-portrait-lock) .table-dock,
  html:not(.is-device-landscape) .table-dock { padding: 0.3rem 0.35rem calc(0.3rem + env(safe-area-inset-bottom, 0px)); }
  html:not(.orient-portrait-lock) .action-main .btn,
  html:not(.is-device-landscape) .action-main .btn { height: 46px; min-height: 46px; font-size: 0.8rem; }
  html:not(.orient-portrait-lock) .more-round,
  html:not(.is-device-landscape) .more-round { width: 40px; height: 40px; }
  html:not(.orient-portrait-lock) .dock-inner,
  html:not(.is-device-landscape) .dock-inner { max-width: none; }
  html:not(.orient-portrait-lock) .raise-panel,
  html:not(.is-device-landscape) .raise-panel { border-radius: 16px; }
}

/* Fullscreen (Android Fullscreen API + iPhone CSS fallback) */
html.is-fs,
html:fullscreen,
html:-webkit-full-screen {
  background: #0a0e14;
}
html.is-fs,
html.is-fs body.table-body {
  position: fixed;
  inset: 0;
  width: 100%;
  height: var(--app-height, 100dvh);
  max-height: var(--app-height, 100dvh);
  overflow: hidden;
  overscroll-behavior: none;
  background: #0a0e14;
}
html.is-fs body.table-body .table-shell,
html.is-fs body.table-body .table-stage {
  height: 100%;
}

/* Keep the table in portrait on phones even if the device is turned */
html.orient-portrait-lock.is-device-landscape body.table-body .table-shell {
  position: relative;
  width: var(--app-width, 100dvw);
  height: var(--app-height, 100dvh);
  overflow: hidden;
}
html.orient-portrait-lock.is-device-landscape body.table-body .table-stage {
  position: absolute;
  top: 50%;
  left: 50%;
  width: var(--app-height, 100dvh);
  height: var(--app-width, 100dvw);
  max-width: none;
  margin-left: calc(var(--app-height, 100dvh) / -2);
  margin-top: calc(var(--app-width, 100dvw) / -2);
  flex: none;
  overflow: hidden;
  transform-origin: center center;
}
html.orient-portrait-lock.is-device-landscape.is-land-90 body.table-body .table-stage {
  transform: rotate(-90deg);
}
html.orient-portrait-lock.is-device-landscape.is-land-270 body.table-body .table-stage {
  transform: rotate(90deg);
}
