/* 21 Card Poker — Modern UI */
:root {
  --bg-0: #06080f;
  --bg-1: #0b0f1a;
  --bg-2: #11172a;
  --surface: rgba(255, 255, 255, 0.04);
  --surface-2: rgba(255, 255, 255, 0.07);
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.18);
  --text: #eaf0ff;
  --text-dim: #97a2bd;
  --accent: #7c5cff;
  --accent-2: #22d3ee;
  --gold: #f5c451;
  --green: #22c55e;
  --red: #ef4444;
  --danger: #f43f5e;
  --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.55);
  --shadow-card: 0 12px 30px rgba(0, 0, 0, 0.45);
  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --card-w: 76px;
  --card-h: 108px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; padding: 0; height: 100%; }
body {
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  background:
    radial-gradient(1200px 800px at 50% -10%, #1a2347 0%, transparent 60%),
    radial-gradient(900px 700px at 110% 110%, #0e2a3e 0%, transparent 55%),
    linear-gradient(180deg, var(--bg-1), var(--bg-0));
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

.app {
  position: relative;
  height: 100dvh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 0;
}

/* Ambient blurred orbs */
.bg-orbs { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.bg-orbs span {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.45;
  animation: float 18s ease-in-out infinite;
}
.bg-orbs span:nth-child(1) {
  width: 480px; height: 480px;
  background: radial-gradient(circle, #7c5cff, transparent 70%);
  top: -120px; left: -80px;
}
.bg-orbs span:nth-child(2) {
  width: 520px; height: 520px;
  background: radial-gradient(circle, #22d3ee, transparent 70%);
  bottom: -180px; right: -120px;
  animation-delay: -6s;
}
.bg-orbs span:nth-child(3) {
  width: 360px; height: 360px;
  background: radial-gradient(circle, #f5c451, transparent 70%);
  top: 40%; left: 40%;
  opacity: 0.18;
  animation-delay: -12s;
}
@keyframes float {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50% { transform: translate3d(30px, -20px, 0); }
}

/* Top bar */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 22px;
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(20px) saturate(140%);
  background: rgba(7, 10, 19, 0.6);
  z-index: 5;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark {
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  font-size: 20px;
  box-shadow: 0 8px 24px rgba(124, 92, 255, 0.4);
}
.brand-name {
  font-family: "Playfair Display", serif;
  font-weight: 800;
  font-size: 20px;
  letter-spacing: 0.3px;
}
.topbar-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.topbar-actions .role-pill {
  white-space: nowrap;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.4px;
}

/* Buttons */
.ghost-btn, .primary-btn {
  font: inherit;
  font-weight: 600;
  border-radius: 10px;
  padding: 10px 16px;
  cursor: pointer;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
  transition: transform 0.08s ease, background 0.15s, border-color 0.15s, box-shadow 0.15s;
}
.ghost-btn:hover { background: var(--surface-2); border-color: rgba(255,255,255,0.28); }
.ghost-btn:active { transform: translateY(1px); }
.primary-btn {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border: none;
  color: white;
  box-shadow: 0 10px 30px rgba(124, 92, 255, 0.35);
}
.primary-btn:hover { filter: brightness(1.08); }
.primary-btn:disabled, .ghost-btn:disabled {
  opacity: 0.5; cursor: not-allowed; transform: none;
}

/* Table */
.table {
  position: relative;
  display: grid;
  grid-template-columns: 1fr minmax(0, 300px);
  grid-template-rows: auto 1fr auto;
  align-items: stretch;
  padding: 14px 18px;
  z-index: 2;
  min-height: 0;
  overflow: hidden;
  gap: 10px 16px;
}
.table > .seat.opponent { grid-column: 1; grid-row: 1; }
.table > .center      { grid-column: 1; grid-row: 2; }
.table > .seat.player { grid-column: 1; grid-row: 3; }
.table > .side-panel  { grid-column: 2; grid-row: 1 / -1; }

/* Seats */
.seat { display: flex; flex-direction: column; gap: 6px; align-items: center; }
.seat.opponent { justify-self: center; }
.seat.player { justify-self: center; }
.seat-head {
  display: flex; align-items: center; gap: 12px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  backdrop-filter: blur(14px);
  min-width: 260px;
}
.seat-head.bottom { order: 2; }
.avatar {
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #2b3766, #1a2247);
  font-weight: 800; font-size: 11px;
  border: 1px solid var(--border-strong);
  letter-spacing: 0.5px;
}
.avatar.you {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #0a0f1f;
}
.seat-info { flex: 1; }
.seat-name { font-weight: 600; display: flex; align-items: center; gap: 8px; }
.seat-chips { color: var(--text-dim); font-size: 13px; margin-top: 2px; }
.seat-chips span { color: var(--gold); font-weight: 700; font-size: 14px; }
.seat-chips em { font-style: normal; }
.seat-bet {
  min-width: 56px;
  text-align: center;
  font-weight: 700;
  font-size: 13px;
  padding: 6px 10px;
  border-radius: 8px;
  background: rgba(245, 196, 81, 0.12);
  color: var(--gold);
  border: 1px solid rgba(245, 196, 81, 0.25);
}
.role-pill {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(124, 92, 255, 0.18);
  color: #c5b6ff;
  border: 1px solid rgba(124, 92, 255, 0.35);
}

/* Hands */
.hand {
  display: flex; gap: 10px; flex-wrap: nowrap;
  justify-content: center;
  min-height: var(--card-h);
  padding: 4px;
}
.opponent-hand { perspective: 1000px; }

/* Card */
.card {
  position: relative;
  width: var(--card-w);
  height: var(--card-h);
  border-radius: 12px;
  background: linear-gradient(160deg, #ffffff, #f3f6ff);
  color: #1a1f3a;
  box-shadow: var(--shadow-card);
  border: 1px solid rgba(255, 255, 255, 0.6);
  display: flex; flex-direction: column;
  padding: 8px 10px;
  font-weight: 800;
  user-select: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
  flex: 0 0 auto;
}
.card.red { color: #d2153a; }
.card.black { color: #1a1f3a; }
.card.joker {
  color: #6b21a8;
  background:
    linear-gradient(135deg, #fff7ff 0%, #f0e6ff 100%);
}
.card .rank-tl { font-size: 18px; line-height: 1; }
.card .suit-tl { font-size: 14px; line-height: 1; margin-top: 2px; }
.card .center-suit {
  font-size: 38px; line-height: 1;
  margin: auto;
  opacity: 0.85;
}
.card .rank-br {
  font-size: 18px; line-height: 1;
  align-self: flex-end;
  transform: rotate(180deg);
}
.card.is-clickable { cursor: pointer; }
.card.is-clickable:hover { transform: translateY(-6px); box-shadow: 0 18px 38px rgba(0,0,0,0.5); }
.card.selected {
  transform: translateY(-12px);
  outline: 2px solid var(--accent);
  box-shadow: 0 18px 38px rgba(124, 92, 255, 0.5);
}
.card.selected::after {
  content: "✕";
  position: absolute;
  top: -10px; right: -10px;
  width: 26px; height: 26px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: var(--danger);
  color: white;
  font-weight: 800;
  font-size: 13px;
  box-shadow: 0 4px 12px rgba(244, 63, 94, 0.6);
}

/* Card back (opponent) */
.card.back {
  background:
    repeating-linear-gradient(45deg, #1c2452 0 8px, #232c63 8px 16px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  position: relative;
  overflow: hidden;
}
.card.back::before {
  content: "";
  position: absolute; inset: 6px;
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 50%, rgba(124, 92, 255, 0.45), transparent 70%),
    linear-gradient(135deg, #2a3580, #14193d);
  border: 1px solid rgba(255, 255, 255, 0.12);
}
.card.back::after {
  content: "♠";
  position: absolute; inset: 0;
  display: grid; place-items: center;
  font-size: 36px;
  color: rgba(255, 255, 255, 0.85);
  text-shadow: 0 0 24px rgba(124, 92, 255, 0.6);
}

/* Reveal animation */
@keyframes deal-in {
  from { opacity: 0; transform: translateY(-30px) rotateY(180deg) scale(0.85); }
  to { opacity: 1; transform: none; }
}
.card.dealt { animation: deal-in 0.45s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
@keyframes flip-in {
  from { transform: rotateY(180deg); opacity: 0.4; }
  to { transform: none; opacity: 1; }
}
.card.flipped { animation: flip-in 0.5s ease both; }

/* Center area */
.center {
  display: flex; flex-direction: column; align-items: center;
  gap: 8px;
  padding: 4px 0;
}
.pot-wrap {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.pot-label {
  font-size: 10px;
  letter-spacing: 4px;
  color: var(--text-dim);
  font-weight: 700;
}
.pot-value {
  font-family: "Playfair Display", serif;
  font-size: 36px;
  font-weight: 900;
  color: var(--gold);
  text-shadow: 0 4px 24px rgba(245, 196, 81, 0.35);
  line-height: 1;
}
.pot-value em {
  font-style: normal; font-size: 18px;
  margin-left: 4px; color: rgba(245, 196, 81, 0.7);
  font-family: "Inter", sans-serif;
  font-weight: 600;
}
.round-pill {
  font-size: 11px;
  letter-spacing: 1px;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-dim);
  text-transform: uppercase;
  font-weight: 700;
}

.status-msg {
  text-align: center;
  font-size: 14px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 10px 18px;
  border-radius: 999px;
  backdrop-filter: blur(10px);
  max-width: 540px;
  min-height: 38px;
  display: grid; place-items: center;
}

.log {
  max-height: 44px;
  overflow-y: auto;
  width: min(640px, 90vw);
  font-size: 11px;
  color: var(--text-dim);
  text-align: center;
  display: flex; flex-direction: column-reverse; gap: 2px;
  scrollbar-width: thin;
}
.log .entry { opacity: 0; animation: log-in 0.3s ease forwards; }
@keyframes log-in {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: none; }
}

/* Action bar */
.actionbar {
  z-index: 5;
  padding: 10px 14px;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.5));
  border-top: 1px solid var(--border);
  backdrop-filter: blur(12px);
}
.actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.action-btn {
  font: inherit; font-weight: 700;
  padding: 12px 22px;
  border-radius: 12px;
  border: 1px solid var(--border-strong);
  background: var(--surface-2);
  color: var(--text);
  cursor: pointer;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  font-size: 13px;
  min-width: 110px;
  transition: transform 0.08s ease, filter 0.15s, background 0.15s;
}
.action-btn:hover { filter: brightness(1.15); }
.action-btn:active { transform: translateY(1px); }
.action-btn[data-act="Fold"] {
  background: linear-gradient(135deg, #5b1e2e, #2b0e16);
  border-color: rgba(244, 63, 94, 0.5);
  color: #ffd6dc;
}
.action-btn[data-act="Check"], .action-btn[data-act="Call"] {
  background: linear-gradient(135deg, #133a2c, #0c2a1f);
  border-color: rgba(34, 197, 94, 0.45);
  color: #c8f7d8;
}
.action-btn[data-act="Raise"] {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border: none;
  color: #0a0f1f;
}

.raise-controls, .discard-controls {
  display: flex; align-items: center; gap: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 10px 14px;
  border-radius: 14px;
  backdrop-filter: blur(8px);
}
.raise-controls input[type="range"] {
  width: 240px;
  accent-color: var(--accent);
}
.raise-value {
  min-width: 80px;
  text-align: center;
  font-family: "Playfair Display", serif;
  font-weight: 900;
  font-size: 26px;
  color: var(--gold);
}
.raise-value em { font-style: normal; font-size: 14px; margin-left: 2px; opacity: 0.7; font-family: "Inter", sans-serif; }
.discard-controls .hint { color: var(--text-dim); font-size: 13px; }

/* Modal */
.modal {
  position: fixed; inset: 0;
  display: grid; place-items: center;
  background: rgba(3, 6, 16, 0.7);
  backdrop-filter: blur(8px);
  z-index: 50;
  animation: fade-in 0.2s ease;
}
.modal.hidden { display: none; }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
.modal-card {
  background: linear-gradient(180deg, #131933, #0c1024);
  border: 1px solid var(--border-strong);
  border-radius: 18px;
  padding: 28px;
  width: min(460px, 92vw);
  box-shadow: var(--shadow-lg);
  animation: rise 0.3s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.modal-card.wide { width: min(640px, 92vw); }
@keyframes rise {
  from { opacity: 0; transform: translateY(20px) scale(0.96); }
  to { opacity: 1; transform: none; }
}
.modal h2 {
  margin: 0 0 12px;
  font-family: "Playfair Display", serif;
  font-size: 28px;
}
.modal-body { color: var(--text); line-height: 1.55; }
.modal-body.small { font-size: 14px; color: var(--text-dim); }
.modal-body p { margin: 8px 0; }
.modal-body b { color: var(--text); }
.modal-actions { margin-top: 20px; display: flex; justify-content: flex-end; gap: 10px; }

.showdown-hands {
  display: grid; gap: 14px; margin: 14px 0;
}
.showdown-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 12px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--border);
}
.showdown-row .who { font-weight: 700; }
.showdown-row .what { color: var(--gold); font-weight: 700; }
.showdown-row .mini-cards { display: flex; gap: 4px; }
.mini-card {
  width: 28px; height: 38px; border-radius: 5px;
  background: white; color: #1a1f3a;
  display: grid; place-items: center;
  font-size: 11px; font-weight: 800;
  box-shadow: 0 2px 6px rgba(0,0,0,0.35);
  line-height: 1;
}
.mini-card.red { color: #d2153a; }
.mini-card.joker { color: #6b21a8; background: #f6efff; }

/* Result colors */
.result-win { color: var(--green); }
.result-lose { color: var(--red); }
.result-tie { color: var(--gold); }

/* App hidden state */
.app.hidden { display: none; }

/* ── Main / start screen ─────────────────────────────────────── */
.main-screen {
  position: fixed; inset: 0;
  display: grid; place-items: center;
  z-index: 30;
  padding: 24px;
  overflow-y: auto;
}
.main-screen.hidden { display: none; }
.hero {
  width: min(560px, 100%);
  text-align: center;
  display: flex; flex-direction: column; align-items: center;
  gap: 14px;
  padding: 18px 0;
}
.hero-mark {
  font-size: 28px;
  letter-spacing: 14px;
  color: var(--text-dim);
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-weight: 800;
}
.hero-title {
  font-family: "Playfair Display", serif;
  font-weight: 900;
  font-size: clamp(40px, 8vw, 72px);
  line-height: 1;
  margin: 0;
  background: linear-gradient(180deg, #fff 0%, #b9c2e6 90%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 10px 60px rgba(124, 92, 255, 0.25);
}
.hero-tagline { color: var(--text-dim); margin: 0 0 6px; font-size: 15px; }
.hero-footer { color: var(--text-dim); font-size: 11px; margin-top: 10px; opacity: 0.7; }

.menu-card {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 20px;
  padding: 22px;
  backdrop-filter: blur(18px) saturate(140%);
  box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column; gap: 18px;
  text-align: left;
  margin-top: 8px;
  animation: rise 0.45s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.menu-section { display: flex; flex-direction: column; gap: 8px; }
.menu-section.row { flex-direction: row; align-items: center; justify-content: space-between; }
.menu-label {
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-dim);
  font-weight: 700;
}
.menu-actions {
  display: flex; gap: 10px; justify-content: center; margin-top: 4px;
}
.primary-btn.xl { padding: 14px 26px; font-size: 15px; flex: 1; max-width: 240px; }

/* Segmented control */
.seg {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  background: rgba(0,0,0,0.25);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 6px;
}
.seg-btn {
  font: inherit;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 9px;
  color: var(--text-dim);
  padding: 10px 8px;
  cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.seg-btn:hover { color: var(--text); background: rgba(255,255,255,0.04); }
.seg-btn.active {
  background: linear-gradient(135deg, rgba(124,92,255,0.25), rgba(34,211,238,0.18));
  border-color: rgba(124,92,255,0.5);
  color: var(--text);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.04), 0 6px 20px rgba(124,92,255,0.18);
}
.seg-title { font-weight: 700; font-size: 14px; }
.seg-sub { font-size: 10px; opacity: 0.7; text-align: center; line-height: 1.25; }

/* Toggle switch */
.toggle { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; }
.toggle input { position: absolute; opacity: 0; pointer-events: none; }
.toggle-track {
  width: 42px; height: 24px;
  border-radius: 999px;
  background: rgba(255,255,255,0.1);
  border: 1px solid var(--border-strong);
  position: relative;
  transition: background 0.18s;
}
.toggle-thumb {
  position: absolute; top: 2px; left: 2px;
  width: 18px; height: 18px;
  background: white; border-radius: 50%;
  transition: transform 0.18s, background 0.18s;
}
.toggle input:checked + .toggle-track {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-color: transparent;
}
.toggle input:checked + .toggle-track .toggle-thumb { transform: translateX(18px); }
.toggle-label { font-weight: 600; font-size: 14px; }
.toggle-hint { font-size: 11px; color: var(--text-dim); flex: 1; text-align: right; padding-left: 12px; }

/* Difficulty seg has 4 buttons; let it auto-fit */
#difficulty-seg { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 520px) {
  #difficulty-seg { grid-template-columns: repeat(2, 1fr); }
}

/* Advice banner (shown to the human player when "Show advice" is on) */
.advice-banner {
  padding: 10px 14px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(34,211,238,0.16), rgba(124,92,255,0.16));
  border: 1px solid rgba(34,211,238,0.35);
  color: #d8f6fe;
  font-size: 13px;
  text-align: left;
  line-height: 1.4;
}
.advice-banner b { color: #fff; }

/* Highlight the cards the advice recommends discarding */
.card.advice-suggest {
  outline: 2px dashed rgba(245, 196, 81, 0.85);
  outline-offset: 2px;
  filter: drop-shadow(0 0 12px rgba(245, 196, 81, 0.45));
}

/* Side panel hosting advice banner + CFR reasoning */
.side-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  overflow-y: auto;
  padding: 4px 4px 4px 0;
  scrollbar-width: thin;
}
.side-panel-empty {
  font-size: 12px;
  color: var(--text-dim);
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: 12px;
  padding: 14px;
  line-height: 1.5;
  text-align: center;
}
.side-panel-empty b { color: var(--text); }
.side-panel:has(.advice-banner:not([hidden])) .side-panel-empty,
.side-panel:has(.cfr-panel:not([hidden])) .side-panel-empty { display: none; }

/* CFR reasoning panel */
.cfr-panel {
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(11, 15, 26, 0.65);
  border: 1px solid rgba(124,92,255,0.45);
  color: var(--text);
  font-size: 12px;
  backdrop-filter: blur(10px);
}
.cfr-panel-head {
  display: flex; justify-content: space-between; align-items: center;
  font-weight: 700; font-size: 12px; letter-spacing: 0.5px;
  margin-bottom: 8px;
  gap: 10px;
}
.cfr-source { font-weight: 500; color: var(--text-dim); font-size: 11px; }
.cfr-bars { display: flex; flex-direction: column; gap: 4px; }
.cfr-row {
  display: grid;
  grid-template-columns: 90px 1fr 44px;
  align-items: center;
  gap: 6px;
}
.cfr-row .lbl { font-weight: 600; font-size: 12px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cfr-row .lbl.pick { color: var(--gold); }
.cfr-row .bar {
  height: 8px;
  background: rgba(255,255,255,0.06);
  border-radius: 999px;
  overflow: hidden;
}
.cfr-row .bar > span {
  display: block; height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  border-radius: 999px;
}
.cfr-row .pct { font-variant-numeric: tabular-nums; font-size: 11px; color: var(--text-dim); text-align: right; }
.cfr-meta { margin-top: 6px; color: var(--text-dim); font-size: 11px; }

.icon-btn { padding: 8px 12px; font-size: 16px; line-height: 1; }

/* Responsive */
@media (max-width: 960px) {
  .table {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto 1fr auto;
  }
  .table > .seat.opponent { grid-column: 1; grid-row: 1; }
  .table > .center        { grid-column: 1; grid-row: 2; }
  .table > .side-panel    { grid-column: 1; grid-row: 3; max-height: 220px; }
  .table > .seat.player   { grid-column: 1; grid-row: 4; }
  .side-panel-empty { display: none; }
}
@media (max-width: 720px) {
  :root { --card-w: 64px; --card-h: 90px; }
  .topbar { padding: 10px 14px; }
  .brand-name { font-size: 16px; }
  .seat-head { min-width: 0; padding: 8px 12px; gap: 10px; }
  .seat-bet { min-width: 44px; font-size: 12px; }
  .pot-value { font-size: 32px; }
  .action-btn { padding: 10px 14px; min-width: 88px; font-size: 12px; }
  .raise-controls input[type="range"] { width: 140px; }
  .card .center-suit { font-size: 26px; }
  .card .rank-tl, .card .rank-br { font-size: 14px; }
  .hand { gap: 6px; }
  .log { display: none; }
}
