:root {
  --green: #0b3d2e;
  --green-2: #0e4d3a;
  --felt: #14532d;
  --gold: #d4af37;
  --text: #e8f0ec;
  --muted: #9db8ac;
  --danger: #c0392b;
  --primary: #1f8a5f;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  background: radial-gradient(circle at 50% 0%, #0e4d3a 0%, #07271d 70%);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  min-height: 100vh;
}
.hidden { display: none !important; }
.screen { max-width: 560px; margin: 0 auto; padding: 16px; }
h1 { text-align: center; font-weight: 600; letter-spacing: 1px; }
.card {
  background: rgba(0,0,0,0.25);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  padding: 16px;
  margin-top: 12px;
}
input {
  width: 100%; padding: 12px; margin: 6px 0; font-size: 16px;
  background: #0a241b; color: var(--text); border: 1px solid #1f5a44; border-radius: 8px;
}
input:focus { outline: 1px solid var(--gold); }
.row { display: flex; gap: 8px; margin-top: 8px; }
button {
  flex: 1; padding: 12px; font-size: 16px; font-weight: 600; border-radius: 8px;
  border: 1px solid transparent; color: #fff; cursor: pointer;
}
button.primary { background: var(--primary); }
button.ghost { background: rgba(255,255,255,0.08); border-color: #2a5c48; }
button.danger { background: var(--danger); }
button:active { transform: scale(0.97); }
.msg { color: var(--muted); min-height: 18px; text-align: center; margin: 8px 0 0; font-size: 14px; }
.me { color: var(--muted); font-size: 13px; text-align: center; }
.game-list { list-style: none; padding: 0; margin: 12px 0 0; }
.game-list li {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px; margin: 6px 0; background: rgba(0,0,0,0.25); border-radius: 8px; cursor: pointer;
}
.game-list li .sub { color: var(--muted); font-size: 12px; }
.game-list li.joined { border: 1px solid var(--gold); }

/* Table */
.table-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.pill { background: var(--gold); color: #222; font-size: 12px; padding: 4px 10px; border-radius: 999px; font-weight: 700; }
#felt {
  background: var(--felt);
  border-radius: 50%/6%;
  border: 6px solid #3a2516;
  min-height: 300px; position: relative; padding: 12px;
  box-shadow: inset 0 0 60px rgba(0,0,0,0.5);
}
.board { display: flex; gap: 6px; justify-content: center; min-height: 52px; margin: 8px 0 4px; flex-wrap: wrap; }
.board .card {
  width: 40px; height: 56px; background: #fff; color: #111; border-radius: 5px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-weight: 700; font-size: 18px; line-height: 1; border: 1px solid #999;
}
.card.s { color: #111; } .card.h, .card.d { color: #c0392b; }
.card .suit { font-size: 18px; }
.pot { text-align: center; color: var(--gold); font-weight: 700; margin: 6px 0; }
.seats { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 8px; }
.seat {
  flex: 1 1 30%; min-width: 130px; background: rgba(0,0,0,0.3); border-radius: 10px; padding: 8px;
  font-size: 12px; border: 2px solid transparent; position: relative;
}
.seat.turn { border-color: var(--gold); }
.seat.folded { opacity: 0.45; }
.seat .who { font-weight: 700; }
.seat .stack { color: var(--muted); }
.seat .badge { color: var(--gold); font-weight: 700; }
.seat .cards { letter-spacing: 2px; font-weight: 700; }
.seat .act { color: var(--muted); font-style: italic; }

.my-area {
  display: flex; justify-content: space-between; align-items: center;
  background: rgba(0,0,0,0.25); border-radius: 10px; padding: 12px; margin-top: 10px;
}
.label { display: block; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: 1px; }
#my-hole { font-size: 22px; font-weight: 700; letter-spacing: 3px; }
.my-stack { text-align: right; }
#my-stack { font-size: 20px; font-weight: 700; color: var(--gold); }

.controls { display: flex; gap: 6px; margin-top: 10px; }
.controls button { flex: 1; font-size: 15px; padding: 14px 6px; }
.raise-row { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.raise-row .quick { flex: 0 0 auto; padding: 10px 12px; font-size: 13px; background: rgba(255,255,255,0.08); }
.raise-row input { flex: 1; min-width: 90px; margin: 0; }
.raise-row #act-confirm { flex: 0 0 auto; background: var(--gold); color: #222; padding: 10px 18px; }

.log {
  margin-top: 10px; font-size: 12px; color: var(--muted); max-height: 120px; overflow-y: auto;
  background: rgba(0,0,0,0.2); border-radius: 8px; padding: 8px; white-space: pre-wrap;
}
.result {
  margin-top: 10px; background: var(--gold); color: #222; font-weight: 700; text-align: center;
  padding: 10px; border-radius: 8px;
}
