:root{--ink:#172e35;--paper:#fff9eb;--red:#a3293c;--gold:#e7c38b}*{box-sizing:border-box}body{margin:0;background:var(--paper);color:var(--ink);font:16px/1.6 system-ui,sans-serif}header{display:flex;justify-content:space-between;gap:20px;padding:20px 5%;border-bottom:1px solid #172e3525}a{color:inherit;text-underline-offset:4px}main{max-width:1150px;margin:auto;padding:30px 24px 60px}h1,h2{font-family:Georgia,serif;font-weight:normal;line-height:1.1}h1{font-size:clamp(42px,6vw,68px);margin:12px 0}h1 em{color:var(--red)}h2{font-size:30px}.eyebrow{font-size:11px;font-weight:750;letter-spacing:2px;text-transform:uppercase}.small{font-size:13px;color:#526669}.panel{padding:26px;border:1px solid #172e3525;background:#fffcf5;border-radius:10px;margin:24px 0}.intro{max-width:700px}.primary,button,input,select{font:inherit;border-radius:6px}button{cursor:pointer;border:1px solid #c5bda9;background:#fff9eb;color:var(--ink);padding:11px 18px;min-height:46px}button:disabled{opacity:.4;cursor:default}.primary{background:var(--red);border-color:var(--red);color:white;font-weight:700;margin-top:12px}input,select{padding:10px;border:1px solid #a8b0a6;max-width:100%;min-height:46px;background:white;color:var(--ink)}label{display:block;font-size:14px;font-weight:700;margin:12px 0}label select{display:block;margin:8px 0}details{margin:20px 0}summary{cursor:pointer}.scorebar{display:grid;grid-template-columns:repeat(4,1fr);gap:15px;padding:18px 4px}.scorebar small{display:block;font-size:10px;letter-spacing:1px}.scorebar strong{font-size:23px}.felt{padding:24px;border:9px solid #252a2d;border-radius:25px 25px 70px 70px;background:radial-gradient(ellipse at top,#b23b52,#64152c);color:#fff4dc;box-shadow:0 5px 0 #d0b484;min-height:470px}.felt-top{display:flex;justify-content:space-between;gap:15px;font-size:10px;letter-spacing:1px}.dealer{text-align:center;margin:25px auto}.cards{display:flex;gap:7px;justify-content:center;flex-wrap:wrap}.card{display:grid;place-content:center;width:52px;height:73px;border-radius:5px;background:#fffcf5;color:#172e35;font:bold 23px Georgia;box-shadow:0 3px 5px #0003}.card.red{color:#b02c40}.card.back{background:repeating-linear-gradient(45deg,#173746,#173746 4px,#36535e 4px,#36535e 6px);border:3px solid #fff0d0;color:#e8c58c}.felt-brand{text-align:center;font:22px Georgia;letter-spacing:3px;color:#edc98c}.felt-brand i{display:block;font-size:15px;letter-spacing:0}.seats{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:8px;margin:26px 0}.seat{border:1px solid #edc98c66;border-radius:10px;padding:12px 6px;text-align:center;font-size:11px;min-width:0}.seat strong{display:block;font-size:20px}.seat.you{background:#ffffff16;border:2px solid #edc98c}.seat.first{box-shadow:0 -4px #edc98c}.seat .wager{display:block;color:#ffe1ad;min-height:22px}.seat span{display:block}.your-hands{display:flex;flex-wrap:wrap;justify-content:center;gap:15px;margin:20px 0}.hand{padding:15px;border:1px solid #edc98c55;border-radius:8px;text-align:center;max-width:100%}.hand.active{border:2px solid #ffe1ad;background:#fff1}.hand p{font-size:12px;margin:8px 0}.hand .chip-stack{margin:auto}.controls #status{font-weight:650}.chip-buttons,#moves{display:flex;flex-wrap:wrap;gap:10px;margin:14px 0}#bet{width:160px}#error{color:#a3293c}.scroll-table{overflow:auto}table{width:100%;border-collapse:collapse;text-align:left;font-size:14px}th,td{padding:10px;border-bottom:1px solid #172e3520}.is-you{font-weight:750;color:var(--red)}.text-button{border:0;padding:0;min-height:0;text-decoration:underline;background:none;font-size:inherit}#between-actions{display:flex;gap:15px;flex-wrap:wrap}#podium p{padding:14px;background:#efeadd;border-radius:6px}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid #c88b1d;outline-offset:4px}[hidden]{display:none!important}@media(max-width:700px){main{padding:20px 12px 40px}header{font-size:13px}.scorebar{grid-template-columns:1fr 1fr}.seats{grid-template-columns:repeat(4,minmax(0,1fr));gap:7px}.seat{padding:8px 4px}.felt{padding:16px 10px;border-width:6px;border-radius:18px 18px 42px 42px}.panel{padding:20px}.felt-top{font-size:9px}.card{width:44px;height:63px;font-size:21px}.hand{padding:12px 8px}#moves button{flex:1 1 40%}.seat strong{font-size:18px}}

.seat-cards{margin-top:7px}.seat-cards .cards{gap:3px;margin:5px 0}.seat-cards .card{width:25px;height:36px;font-size:13px}.seat-cards span.card{display:grid}@media(max-width:700px){.seat-cards .card{width:22px;height:32px;font-size:12px}}

/* Keep the dealer, player's hand and controls together while a table is open. */
body:has(#game:not([hidden])) .intro{display:none}
body:has(#game:not([hidden])) header{padding:10px 5%}
body:has(#game:not([hidden])) main{padding-top:6px}
#game{max-width:900px;margin:auto}
#game .scorebar{grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;padding:8px 4px;line-height:1.3}
#game .scorebar strong{font-size:18px}
#game .scorebar small{font-size:9px;letter-spacing:0}
#game .felt{min-height:0;padding:10px 14px;border-width:5px;border-radius:16px 16px 30px 30px}
#game .dealer{margin:5px auto}
#game .dealer .eyebrow{margin:3px 0}
#game .felt-brand{font-size:12px;margin:5px 0;letter-spacing:2px}
#game .felt-brand i{display:inline;font-size:12px;letter-spacing:0}
#game .your-hands{gap:8px;margin:6px 0 0}
#game .hand{padding:6px 10px;flex:1;max-width:420px}
#game .hand p{margin:3px 0;font-size:11px;line-height:1.3}
#game .hand .standard-stack{display:none}
#game .card{width:38px;height:51px;font-size:19px}
#game .cards{gap:4px}
#game .controls{position:sticky;bottom:0;z-index:5;margin:10px 0 0;padding:10px 14px calc(10px + env(safe-area-inset-bottom));box-shadow:0 -4px 16px #172e3514}
#game #status{font-size:13px;line-height:1.35;margin:0 0 8px}
#game #bet-controls{display:grid;grid-template-columns:auto 100px 1fr;gap:6px 10px;align-items:center}
#game #bet-controls label{margin:0;font-size:13px}
#game #bet{width:100%;padding:6px;min-height:44px}
#game .chip-buttons{grid-column:1/-1;display:flex;gap:6px;margin:0}
#game button{padding:8px 10px;min-height:44px}
#game .chip-buttons button{flex:1;padding:6px;font-size:13px}
#game #place-bet{grid-column:3;grid-row:1;margin:0}
#game #bet-note{grid-column:1/-1;font-size:11px;margin:0;line-height:1.3}
#game #moves{gap:6px;margin:0;display:grid;grid-template-columns:repeat(4,1fr)}
#game #next{width:100%;margin:0}
#game #error:empty{display:none}
#game #error{font-size:13px;margin:6px 0 0}
#game #double-controls{display:grid;grid-template-columns:100px 1fr auto;gap:6px;align-items:center}
#game #double-controls label{grid-column:1/-1;margin:0;font-size:13px}
#game #double-controls input{width:100%;min-height:44px;padding:6px}
#game #double-controls button{margin:0;font-size:13px}
#game .table-details{margin:12px 0;padding:12px 16px}
#game .table-details summary{font-weight:650;font-size:14px;min-height:32px}
#game .table-details .seats{color:var(--ink);margin:12px 0}
#game .table-details .seat{border-color:#c5bda9}
#game .table-details .seat.you{background:#edc98c33;border-color:var(--red)}
#game .table-details .wager{color:#526669}
@media(max-width:500px){
 body:has(#game:not([hidden])) main{padding:4px 8px 20px}
 #game .scorebar strong{font-size:15px}
 #game .felt-top{font-size:8px;letter-spacing:0}
 #game .controls{padding:8px 10px calc(8px + env(safe-area-inset-bottom))}
 #game #bet-controls{grid-template-columns:auto 78px 1fr;gap:6px}
 #game #bet-controls label{font-size:12px}
 #game #place-bet{font-size:12px;padding:6px}
 #game .felt{padding:7px 8px}
 #game .hand{padding:5px}
 #game .card{width:34px;height:46px;font-size:17px}
 #game #moves button{font-size:14px;padding:8px 4px}
}
