:root {
  --bg: #0d1f17;
  --felt: #1a5c3a;
  --felt-dark: #0f3d28;
  --gold: #d4a017;
  --card: #f5f2ea;
  --text: #e8f0ea;
  --muted: #8aa896;
  --danger: #c44;
  --accent: #3d9a6a;
  --seat: #143d2a;
  --border: #2a6b4a;
}
* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100%;
}
a { color: var(--gold); }
button, input, select {
  font: inherit;
  border-radius: 8px;
  border: 1px solid var(--border);
  padding: 0.55rem 0.8rem;
  background: var(--seat);
  color: var(--text);
}
button {
  background: var(--accent);
  border: none;
  font-weight: 600;
  cursor: pointer;
}
button:disabled { opacity: 0.45; cursor: not-allowed; }
button.secondary { background: #2a4a3a; }
button.danger { background: var(--danger); }
button.ghost { background: transparent; border: 1px solid var(--border); }
input { width: 100%; max-width: 280px; }
.wrap { max-width: 960px; margin: 0 auto; padding: 1rem; }
.topbar {
  display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center;
  justify-content: space-between; margin-bottom: 0.75rem;
}
.badge {
  display: inline-block; padding: 0.2rem 0.5rem; border-radius: 999px;
  background: var(--seat); color: var(--gold); font-size: 0.85rem;
}
.table {
  position: relative;
  background: radial-gradient(ellipse at center, var(--felt) 0%, var(--felt-dark) 70%);
  border: 6px solid #6b4a1e;
  border-radius: 50% / 40%;
  min-height: 340px;
  margin: 1rem 0;
  padding: 1.5rem 1rem 2.5rem;
}
.board {
  display: flex; gap: 0.4rem; justify-content: center; align-items: center;
  min-height: 64px; margin: 0.5rem 0;
}
.pot {
  text-align: center; font-weight: 700; color: var(--gold); margin: 0.25rem 0 0.75rem;
}
.seats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.5rem;
}
.seat {
  background: var(--seat);
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 0.5rem;
  min-height: 88px;
  position: relative;
}
.seat.empty { opacity: 0.55; border-style: dashed; }
.seat.to-act { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(212,160,23,0.35); }
.seat.folded { opacity: 0.4; }
.seat .name { font-weight: 700; font-size: 0.95rem; }
.seat .stack { color: var(--gold); font-size: 0.9rem; }
.seat .bet { color: #9fd; font-size: 0.8rem; }
.seat .tags { font-size: 0.7rem; color: var(--muted); margin-top: 0.2rem; }
.cards { display: flex; gap: 0.25rem; margin-top: 0.35rem; }
.card {
  width: 42px; height: 60px; border-radius: 6px;
  background: var(--card); color: #111;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 0.95rem;
  box-shadow: 0 2px 4px rgba(0,0,0,0.35);
}
.card.red { color: #b00; }
.card.back {
  background: repeating-linear-gradient(45deg, #1e3a8a, #1e3a8a 4px, #2547a8 4px, #2547a8 8px);
  color: transparent;
}
.actions {
  display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0.75rem 0;
  align-items: center;
}
.actions input[type=number] { width: 100px; }
.panel {
  background: #12261c; border: 1px solid var(--border);
  border-radius: 12px; padding: 0.75rem; margin: 0.75rem 0;
}
.panel h3 { margin: 0 0 0.5rem; font-size: 0.95rem; color: var(--gold); }
.ledger { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.ledger th, .ledger td { text-align: left; padding: 0.3rem 0.4rem; border-bottom: 1px solid #1e3a2c; }
.msg { color: var(--muted); min-height: 1.2em; margin: 0.25rem 0; }
.timer { font-variant-numeric: tabular-nums; color: var(--gold); }
.home-card {
  background: #12261c; border: 1px solid var(--border);
  border-radius: 16px; padding: 1.25rem; margin: 1rem 0; max-width: 420px;
}
.home-card h2 { margin-top: 0; }
.row { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0.5rem 0; align-items: end; }
.row label { display: flex; flex-direction: column; gap: 0.25rem; font-size: 0.85rem; color: var(--muted); }
.err { color: #f88; }
@media (max-width: 600px) {
  .table { border-radius: 24px; min-height: 280px; }
  .card { width: 36px; height: 52px; font-size: 0.85rem; }
}
