:root {
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic", system-ui, sans-serif;
  color: #f6f2e8;
  background: #061d13;
  --felt: #0b5d35;
  --felt-dark: #063a23;
  --panel: #10281d;
  --line: rgba(255,255,255,.14);
  --gold: #d7b35a;
  --red: #b83a35;
  --green: #198754;
  --cream: #f7f1e3;
  --ink: #152016;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100svh; background: radial-gradient(circle at top, #12482f, #061d13 60%); }
button, input { font: inherit; }
button { cursor: pointer; }
.app-shell { min-height: 100svh; max-width: 760px; margin: 0 auto; padding-bottom: env(safe-area-inset-bottom); }
.topbar { min-height: 64px; display:flex; align-items:center; justify-content:space-between; padding: 12px 16px; border-bottom: 1px solid var(--line); background: rgba(5,25,17,.86); position: sticky; top:0; z-index:10; backdrop-filter: blur(12px); }
.brand { font-family: Georgia, serif; letter-spacing:.08em; font-weight:700; }
.subbrand { font-size:12px; opacity:.65; margin-top:2px; }
.icon-btn { width:42px; height:42px; border-radius:50%; border:1px solid var(--line); color:white; background:#153b2a; }
.view { padding: 14px; }
.hidden { display:none !important; }
.panel, .private-panel { background: rgba(11,34,24,.96); border:1px solid var(--line); border-radius:18px; box-shadow: 0 12px 40px rgba(0,0,0,.28); }
.panel { padding:20px; }
h1,h2,p { margin-top:0; }
h1 { font-family: Georgia, serif; font-size:30px; }
.muted { color:rgba(255,255,255,.68); line-height:1.65; }
.field-label { display:block; font-weight:700; margin:20px 0 8px; }
.segmented { display:grid; grid-template-columns: repeat(5,1fr); gap:8px; }
.segmented button, .preset-grid button, .stepper-grid button { border:1px solid var(--line); color:#fff; background:#173d2c; border-radius:12px; min-height:44px; }
.segmented button.active { background:var(--gold); color:#15130d; border-color:var(--gold); font-weight:800; }
.name-grid { display:grid; gap:10px; }
.name-grid input { width:100%; min-height:46px; border-radius:12px; border:1px solid var(--line); padding:0 12px; color:#fff; background:#0d2d20; }
.settings-row { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.static-value { background:#0d2d20; border:1px solid var(--line); border-radius:12px; padding:14px; font-weight:800; }
.switch-row { margin-top:18px; display:flex; align-items:center; justify-content:space-between; gap:16px; padding:14px 0; border-top:1px solid var(--line); }
.switch-row input { width:24px; height:24px; accent-color:var(--gold); }
.primary-btn,.secondary-btn { width:100%; min-height:52px; border-radius:14px; font-weight:800; border:1px solid transparent; margin-top:10px; }
.primary-btn { background:var(--gold); color:#17140d; }
.secondary-btn { background:#183b2b; border-color:var(--line); color:#fff; }
.danger { color:#ffd9d6; border-color:rgba(232,95,86,.35); }
.status-strip { display:flex; justify-content:space-between; font-size:12px; color:rgba(255,255,255,.75); margin:0 2px 8px; }
.table-felt { background: linear-gradient(145deg, var(--felt), var(--felt-dark)); border:8px solid #5c341d; box-shadow: inset 0 0 0 3px #2b180d, 0 12px 35px rgba(0,0,0,.38); border-radius:34px; padding:14px; min-height:54svh; position:relative; overflow:hidden; }
.table-felt:before { content:""; position:absolute; inset:0; opacity:.12; background-image: radial-gradient(rgba(255,255,255,.25) .6px, transparent .6px); background-size:5px 5px; pointer-events:none; }
.deck-area { position:relative; z-index:1; display:flex; align-items:center; justify-content:center; gap:24px; min-height:58px; }
.deck-stack { width:38px; height:52px; border-radius:6px; border:2px solid #efe7d3; background: repeating-linear-gradient(45deg,#7d1d1d 0 4px,#b84e3d 4px 8px); box-shadow:4px 3px 0 rgba(247,241,227,.45); }
.burn-area { display:flex; align-items:center; gap:8px; }
.burn-label { font-size:11px; opacity:.65; }
.burn-slots { display:flex; gap:4px; }
.burn-slots span { width:20px; height:28px; border-radius:4px; border:1px dashed rgba(255,255,255,.3); }
.board-area { position:relative; z-index:1; text-align:center; margin:12px 0; }
.board-cards { display:flex; justify-content:center; gap:6px; }
.board-slot { width:46px; aspect-ratio: .72; border-radius:7px; border:1px solid rgba(255,255,255,.25); background:rgba(255,255,255,.05); }
.pot-box { display:inline-block; margin-top:10px; padding:6px 12px; background:rgba(0,0,0,.24); border-radius:999px; font-size:13px; }
.players-grid { position:relative; z-index:1; display:grid; grid-template-columns:repeat(2,1fr); gap:8px; margin-top:14px; }
.player-chip { border:1px solid var(--line); border-radius:14px; padding:10px; background:rgba(5,37,22,.58); min-height:74px; }
.player-chip.current { outline:2px solid var(--gold); }
.player-chip.folded { opacity:.45; }
.player-row { display:flex; justify-content:space-between; align-items:center; gap:6px; }
.player-name { font-weight:800; }
.badges { display:flex; gap:4px; flex-wrap:wrap; margin-top:6px; }
.badge { font-size:10px; padding:2px 6px; border-radius:999px; background:rgba(255,255,255,.12); }
.badge.gold { background:var(--gold); color:#17140d; }
.stack { font-variant-numeric: tabular-nums; opacity:.9; }
.action-log { position:relative; z-index:1; margin-top:10px; padding:8px 10px; border-top:1px solid rgba(255,255,255,.12); }
.log-title { font-size:10px; opacity:.55; margin-bottom:4px; }
.log-lines { min-height:36px; display:grid; gap:2px; font-size:12px; color:rgba(255,255,255,.78); }
.private-panel { margin-top:12px; padding:16px; min-height:245px; }
.private-state { min-height:210px; }
.eyebrow { font-size:11px; letter-spacing:.14em; color:var(--gold); margin-bottom:6px; }
.hole-cards { display:flex; gap:10px; justify-content:center; margin:14px 0; }
.playing-card { width:88px; aspect-ratio:.72; background:var(--cream); color:#111; border-radius:10px; border:1px solid #cfc4ac; padding:8px; font-family:Georgia,serif; font-weight:800; font-size:26px; display:flex; flex-direction:column; justify-content:space-between; box-shadow:0 6px 14px rgba(0,0,0,.25); }
.playing-card.red { color:#b11f25; }
.playing-card .suit { align-self:flex-end; font-size:32px; }
.hole-cards.small .playing-card { width:64px; font-size:20px; padding:6px; }
.hole-cards.small .playing-card .suit { font-size:24px; }
.action-head { display:flex; align-items:flex-start; justify-content:space-between; gap:10px; }
.action-summary { display:grid; gap:2px; text-align:right; font-size:11px; opacity:.8; }
.primary-actions { display:grid; grid-template-columns:repeat(3,1fr); gap:8px; }
.primary-actions button { min-height:56px; border-radius:14px; border:0; font-weight:900; }
.action-fold { background:#8f2f2b; color:#fff; }
.action-call { background:#ece8da; color:#172017; }
.action-raise { background:var(--gold); color:#17140d; }
.text-btn { border:0; background:transparent; color:#fff; text-decoration:underline; }
.preset-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:8px; }
.preset-grid button { padding:8px; min-height:50px; font-size:12px; }
.amount-box { margin-top:12px; padding:14px; border:1px solid var(--line); border-radius:14px; background:#0d2d20; }
.amount-label { text-align:center; font-size:11px; opacity:.6; }
.amount-value { text-align:center; font-size:36px; font-weight:900; font-variant-numeric:tabular-nums; margin:5px 0 12px; }
.stepper-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:7px; }
.menu-dialog { width:min(92vw,440px); color:#fff; background:#10281d; border:1px solid var(--line); border-radius:18px; padding:20px; }
.menu-dialog::backdrop { background:rgba(0,0,0,.62); backdrop-filter:blur(3px); }
.dialog-actions { display:grid; grid-template-columns:1fr 1fr; gap:8px; }
@media (min-width:620px) {
  .players-grid { grid-template-columns:repeat(3,1fr); }
}

/* v0.2 additions */
.table-totals { display:flex; justify-content:center; gap:8px; flex-wrap:wrap; }
.board-card-wrap { width:46px; }
.board-card-wrap .playing-card.tiny-card { width:46px; min-width:46px; font-size:15px; padding:4px; border-radius:7px; }
.board-card-wrap .playing-card.tiny-card .suit { font-size:18px; }
.tiny-card { width:38px !important; min-width:38px; font-size:12px !important; padding:3px !important; border-radius:6px !important; }
.tiny-card .suit { font-size:15px !important; }
.card-back { background: repeating-linear-gradient(45deg,#7d1d1d 0 4px,#b84e3d 4px 8px) !important; border:2px solid #efe7d3 !important; }
.burn-card-filled { background: repeating-linear-gradient(45deg,#7d1d1d 0 3px,#b84e3d 3px 6px); border:1px solid #efe7d3 !important; box-shadow:1px 1px 0 rgba(255,255,255,.25); }
.bet-line { font-size:11px; opacity:.65; }
.card-backs-text { font-size:11px; opacity:.7; letter-spacing:-2px; }
.public-hole { display:flex; gap:2px; justify-content:flex-end; max-width:84px; }
.public-hole .playing-card { box-shadow:none; }
.player-chip.out { opacity:.28; filter:grayscale(.7); }
.badge.allin { background:#a21d18; color:#fff; }
.center-state { text-align:center; display:flex; flex-direction:column; justify-content:center; }
.mini-link-btn { background:transparent; color:var(--gold); border:0; padding:6px 0 0; font-size:12px; text-decoration:underline; }
.history-lines { display:grid; gap:7px; max-height:55vh; overflow:auto; font-size:13px; line-height:1.5; }
.history-lines span { opacity:.55; display:inline-block; width:24px; }
.showdown-list { display:grid; gap:10px; margin-top:12px; }
.showdown-row { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:10px; border:1px solid var(--line); border-radius:12px; background:#0d2d20; }
.showdown-row.waiting { opacity:.5; }
.showdown-cards { display:flex; gap:5px; margin-top:7px; }
.hand-name { color:var(--gold); font-weight:800; font-size:13px; }
.best-five { outline:3px solid var(--gold); box-shadow:0 0 0 2px rgba(0,0,0,.25),0 0 18px rgba(218,174,83,.45) !important; transform:translateY(-2px); }
.result-box { border:1px solid var(--line); border-radius:14px; padding:12px; margin-top:10px; background:#0d2d20; display:grid; gap:9px; }
.result-line { display:flex; justify-content:space-between; align-items:flex-start; gap:10px; border-bottom:1px solid rgba(255,255,255,.08); padding-bottom:8px; }
.result-line:last-child { border-bottom:0; padding-bottom:0; }
.result-line span { text-align:right; font-size:13px; line-height:1.45; }
.best-five-row { border-top:1px solid rgba(255,255,255,.12); padding-top:10px; }
.best-five-cards { display:flex; flex-wrap:wrap; gap:4px; margin-top:7px; }
.winner-stack { font-size:28px; font-weight:900; color:var(--gold); margin:8px 0 18px; }
.reveal-card { animation:cardReveal .18s ease-out both; transform-origin:center; }
@keyframes cardReveal { from { opacity:0; transform:translateY(-8px) scale(.96) rotateY(75deg); } to { opacity:1; transform:none; } }
@media (max-width:390px) {
  .view { padding:10px; }
  .table-felt { padding:10px; border-width:6px; border-radius:28px; }
  .player-chip { padding:8px; min-height:68px; }
  .playing-card { width:78px; }
  .hole-cards.small .playing-card { width:58px; }
}
