/* PRISM AUTO REDIRECT: charcoal instrument shell, fine hairlines, tabular data,
   tactile green table. Native controls preserve keyboard and reduced-motion behavior. */
:root{--bg:#141618;--panel:#1c1f22;--panel2:#25292c;--border:#41474a;--text:#f2f3f3;--muted:#b8c1c4;--gold:#e5c382;--mint:#a7e3be;--radius:9px;font-variant-numeric:tabular-nums}
body{background:var(--bg)}
h1,h2{font-family:inherit;font-weight:500;letter-spacing:-.025em}
.brand-mark{transform:none;border-radius:6px}
.nav button.active{border-radius:0;color:var(--text);border-bottom-color:var(--mint)}
button:not(:disabled):active{transform:translateY(1px)}
.data-table th,.data-table td{word-break:normal;overflow-wrap:break-word;vertical-align:top}
.data-table th:first-child{min-width:170px}
.metric strong{overflow-wrap:normal;word-break:normal}
.content-card{min-width:0}
.segmented,.rail-tabs{display:flex;gap:0;border:1px solid var(--border);border-radius:7px;overflow:hidden;flex-wrap:wrap}
.segmented button,.rail-tabs button{border-radius:0;border-right:1px solid var(--border);flex:1;min-height:36px;font-weight:650;font-size:12px}
.segmented button[aria-pressed=true],.rail-tabs button[aria-pressed=true]{background:#34453e;color:var(--mint)}
.chart-toolbar{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin:10px 0}
.chart-toolbar .segmented{flex:1}
.chart-viewport{max-width:100%;overflow:auto;max-height:55vh;border:1px solid var(--border);border-radius:7px}
.strategy-chart{border-collapse:separate;border-spacing:0;width:100%;font-size:12px;min-width:620px}
.strategy-chart th,.strategy-chart td{padding:3px;border:0;border-bottom:1px solid var(--border);text-align:center}
.strategy-chart thead{position:sticky;top:0;z-index:3;background:var(--panel2)}
.strategy-chart th:first-child{position:sticky;left:0;background:var(--panel2);min-width:100px;text-align:left;z-index:2}
.strategy-chart th button{width:100%;text-align:left}
.strategy-cell{min-width:40px;min-height:34px;width:100%;padding:3px;border-radius:4px;font-size:11px;font-weight:700;border:1px solid #ffffff22;background:var(--panel2)}
.strategy-cell[data-action=hit]{background:#39492d}.strategy-cell[data-action=stand]{background:#542f35}.strategy-cell[data-action=double]{background:#24475d}.strategy-cell[data-action=split]{background:#3d395b}.strategy-cell[data-action=surrender]{background:#5e4a2d}
.strategy-cell[aria-pressed=true]{outline:2px solid var(--gold);outline-offset:-2px}
.chart-legend{display:flex;flex-wrap:wrap;gap:10px;font-size:12px;color:var(--muted)}
.chart-explanation,.exercise-panel{padding:12px;margin-top:10px;background:#141719;border:1px solid var(--border);border-radius:8px}
.exercise-panel .cards{margin:10px 0}.exercise-panel .choice-button{min-width:90px}
.answer-grid{display:flex;flex-wrap:wrap;gap:6px}
.row-answer{display:grid;grid-template-columns:repeat(auto-fit,minmax(72px,1fr));gap:8px}
.row-answer label{font-size:12px}
.deviation-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,210px),1fr));gap:8px}
.deviation-card{border:1px solid var(--border);padding:10px;border-radius:8px;background:var(--panel)}
.deviation-card h3{font-size:14px}.deviation-card p{font-size:12px}
.video-frame{width:100%;aspect-ratio:16/9;border:0}
.local-reference{max-height:50vh;overflow:auto;background:#161819}
.local-reference img{max-width:none;display:block}
.rail-tabs{display:none}
.count-strip{display:flex;gap:6px;grid-area:count}
.count-strip .metric{flex:1;padding:5px 8px;background:var(--panel);border-radius:5px;min-width:0}
.count-strip .metric strong{font-size:16px;white-space:nowrap}
.count-strip .small{font-size:10px;white-space:nowrap;color:var(--muted)}
.cockpit-rail{border:1px solid var(--border);border-radius:7px;background:var(--panel);padding:10px;min-width:0}
.cockpit-rail h3{font-size:13px;margin:0 0 3px;font-weight:650}
.rail-caption{font-size:10px;color:var(--muted);margin:0 0 6px}
.rail-row{display:grid;grid-template-columns:54px minmax(0,1fr) 44px;gap:5px;align-items:center;font-size:12px;min-height:20px}
.rail-row strong{text-align:right;font-weight:600}
.rail-row strong{grid-column:3}
.rail-row meter{width:100%;height:8px;accent-color:var(--mint)}
.cockpit-rail .metric{padding:6px;margin-top:5px;border-radius:4px}
.cockpit-rail .metric strong{font-size:15px}
#stats-rail{grid-area:stats}#dealer-rail{grid-area:dealer}
.ev-strip{display:flex;gap:5px;flex-wrap:wrap;margin:4px 0}
.ev-cell{border:1px solid var(--border);padding:4px 7px;border-radius:5px;display:grid;flex:1;font-size:11px;min-width:72px}
.ev-cell strong{font-size:14px}.ev-cell small{color:var(--muted)}
.ev-cell.recommended{border-color:var(--mint)}
.rails-private #stats-rail,.rails-private #dealer-rail,.rails-private .rail-tabs{display:none!important}
.rails-private .play-layout{grid-template-columns:minmax(0,1fr);grid-template-areas:"count" "table" "coach"}
.tool-disclosure summary{font-size:11px;color:var(--muted);cursor:pointer}
.tool-disclosure .play-tools{margin-top:3px}
.reveal-controls{display:flex;align-items:center;gap:5px;flex-wrap:wrap}
.reveal-controls>button{min-height:26px;font-size:11px;padding:2px 6px}
.reveal-controls .tool-disclosure{flex:1}
.reveal-controls .tool-disclosure[open]{flex-basis:100%}
.rails-private:not([data-mode=blind]) .play-layout{grid-template-columns:minmax(152px,1fr) minmax(0,3.4fr) minmax(152px,1fr);grid-template-areas:"count count count" "stats table dealer" "coach coach coach"}
body[data-page=play] .topbar{padding:5px 16px;max-width:1500px}
body[data-page=play] .brand-mark{width:32px;height:32px;font-size:21px}
body[data-page=play] .nav{max-width:1500px}
body[data-page=play] .nav button{padding:5px 13px;min-height:34px}
body[data-page=play] main{max-width:1500px;padding:6px 12px 8px}
body[data-page=play] .page-head{margin:0 0 6px}
body[data-page=play] .page-head .eyebrow,body[data-page=play] .page-head h1{display:none}
body[data-page=play] .page-head .subtle{font-size:11px}
body[data-page=play] .page-head button{min-height:30px;padding:4px 9px}
body[data-page=play] footer,body[data-page=play] .rules{display:none}
.play-layout{grid-template-columns:minmax(152px,1fr) minmax(0,3.4fr) minmax(152px,1fr);grid-template-areas:"count count count" "stats table dealer" "coach coach coach";gap:7px;align-items:start}
.table-column{grid-area:table;min-width:0}
.coach{grid-area:coach;min-width:0}
.coach-toggle{min-height:30px;font-size:12px;padding:4px 10px}
#coach-content{max-height:clamp(82px,16vh,140px);overflow:auto;scrollbar-width:thin}
#coach-body{padding:7px 10px}
#coach-body p{margin-bottom:4px;font-size:12px}
#coach-body .coach-cue{font-size:14px;line-height:1.25;margin-bottom:4px}
#coach-body .coach-metrics{display:none}
#coach-body details{margin:4px 0}
#coach-body details summary{font-size:11px}
#coach-body .secondary{min-height:30px;font-size:11px;padding:4px 8px}
.felt{min-height:240px;padding:5px 14px 0;border-width:5px;border-radius:12px}
.felt:before{inset:36px 20px 39px}
.felt-logo{position:absolute;inset:auto 0 48% 0;pointer-events:none;z-index:-1;margin:0;font-size:12px;opacity:.7}
.felt-logo span{font-size:17px}
.felt-logo small{font-size:7px;margin:2px 0 0}
.felt .table-top .eyebrow{font-size:9px}
.shoe-info{font-size:10px}
.discard-tray{height:35px;width:30px}
.discard-tray i{max-height:27px;width:20px}
.discard-tray b{width:24px}
.dealer-zone{min-height:62px;padding:2px 0}
.cards{gap:4px;min-height:53px}
.playing-card{width:40px;height:55px;padding:3px 4px}
.card-top,.card-bottom{font-size:12px}
.card-suit{font-size:20px}
.other-seats{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:3px;margin:0}
.other-seat,.other-seat .cards{min-width:0}.other-seat .cards{gap:2px}
.other-seat .playing-card{width:22px;height:31px;padding:2px}
.other-seat .card-top,.other-seat .card-bottom{font-size:8px}
.other-seat .card-suit{font-size:12px}
.hand-area{min-height:65px;gap:3px;display:flex;align-items:center;flex-wrap:wrap}
.hand{min-width:0;flex:0 1 auto;padding:2px;border-radius:4px}
.hand-area:has(.hand:nth-child(3)) .playing-card{width:28px;height:39px}
.hand-area:has(.hand:nth-child(3)) .card-suit{font-size:14px}
.hand-area:has(.hand:nth-child(3)) .card-top,.hand-area:has(.hand:nth-child(3)) .card-bottom{font-size:9px}
.seat-title{font-size:9px;margin-bottom:2px;line-height:1.2;gap:4px}
.hand .seat-title:last-child{margin-top:2px;margin-bottom:0}
.hand-total{font-size:10px;padding:1px 4px}
.table-message{font-size:11px;min-height:18px;margin:2px 0}
.table-footer{margin:0 -14px;padding:4px 14px;line-height:1.15}
.table-footer span{font-size:8px;margin-bottom:2px}.table-footer strong{font-size:14px}
.controls{padding:5px 7px;margin:5px 0 0;position:static;box-shadow:none}
.control-head{gap:4px}
.controls .eyebrow{font-size:9px;margin:0}
.controls .small{font-size:10px;margin:0}
.controls .wager-entry input{min-height:30px;max-width:100px;padding:4px}
.controls .chip-controls{margin:3px 0;gap:3px}
.controls .chip-controls button{min-height:29px;padding:3px 7px;font-size:12px}
.controls .chip-controls .chip{min-width:31px;width:31px;height:31px;border-width:3px;padding:0;font-size:10px}
.controls .primary,.controls .action-button{min-height:36px;padding:4px 8px}
.controls .action-controls{grid-template-columns:repeat(auto-fit,minmax(76px,1fr));gap:3px}
.controls .confidence-controls{margin:0 0 3px}
.controls .confidence-controls select{min-height:30px;padding:4px}
.controls .confidence-controls label{font-size:11px}
#coach-content{overflow-anchor:none}
.cockpit-rail .metric{padding:4px;line-height:1.15}
.cockpit-rail .metric strong{margin-top:3px}
.cockpit-rail .metric .small{font-size:10px}
body[data-page=play] .page-head .subtle{white-space:nowrap}
body[data-page=play] .page-head button{white-space:nowrap}
body[data-page=play] .topbar{min-height:0}
body[data-page=play] .top-right button{min-height:32px;padding:2px 6px}
body[data-page=play] .nav button{min-height:30px;padding-block:3px}
body[data-page=play] .page-head button{min-height:27px}
body[data-page=play] .count-strip .metric{padding:3px 7px}
body[data-page=play] .count-strip .metric strong{font-size:15px}
body[data-page=play] .count-strip .metric .small{font-size:10px}
.controls .wager-entry input{height:32px;min-height:32px;font-size:16px}
.controls #observe-button{min-height:32px;font-size:12px;padding:3px 5px;border:1px solid var(--border)}
@media(min-width:821px){
 #bet-controls{display:grid;grid-template-columns:minmax(100px,1.1fr) auto minmax(100px,1fr) auto;gap:6px;align-items:center}
 #bet-controls .control-head{display:flex;align-items:center;flex-wrap:wrap;gap:2px}
 #bet-controls .control-head .small{display:none}
 #bet-controls .wager-entry input{width:75px}
 #bet-controls .chip-controls{gap:4px;flex-wrap:nowrap}
 #bet-controls .chip-controls .quiet{font-size:10px;padding:1px 4px}
 #bet-controls .wide{width:100%}
}
@media (min-width:821px) and (min-height:840px){.felt{min-height:365px}.playing-card{width:49px;height:67px}.dealer-zone{min-height:90px}.hand-area{min-height:100px}.other-seat .playing-card{width:29px;height:40px}.other-seats{grid-template-columns:repeat(6,minmax(0,1fr))}}
@media (max-width:820px){
 .play-layout,.rails-private .play-layout,.rails-private:not([data-mode=blind]) .play-layout{display:flex;flex-direction:column;gap:4px}
 .table-column{order:0;width:100%}.coach{order:1;width:100%}
 .rail-tabs{display:flex;order:2;width:100%;flex-shrink:0}
 .count-strip,.cockpit-rail{order:3;width:100%}
 .count-strip{display:none!important}
 body[data-rail=count] .count-strip{display:grid!important;grid-template-columns:repeat(3,1fr);gap:3px}
 .rails-private .count-strip{display:flex!important;order:0}
 .cockpit-rail{display:none;padding:5px 8px;grid-template-columns:repeat(2,minmax(0,1fr));gap:1px 4px;align-items:center}
 body[data-rail=stats] #stats-rail,body[data-rail=dealer] #dealer-rail{display:grid}
 .cockpit-rail h3,.cockpit-rail .rail-caption,.cockpit-rail>p{grid-column:1/-1}
 .rail-row{display:grid;width:auto;grid-template-columns:37px minmax(0,1fr) 38px;gap:3px;padding-right:3px;font-size:10px;min-height:15px;line-height:1.15}
 .cockpit-rail .metric{display:block;width:auto;margin:0;padding:3px}
 .cockpit-rail .metric strong{font-size:12px;display:inline;margin-left:4px}
 .cockpit-rail .metric .small{font-size:10px;display:inline}
 .cockpit-rail h3{font-size:11px;margin:0}.rail-caption{font-size:9px;margin:0}
 body[data-page=play] main{padding:3px 5px}
 body[data-page=play] .topbar{padding:3px 8px}
 body[data-page=play] .nav button{min-height:32px;padding:4px 9px}
 body[data-page=play] .practice-label{display:none}
 body[data-page=play] .page-head .subtle{font-size:10px}
 .felt{min-height:205px;border-width:4px;padding:4px 7px 0}
 .felt-logo{font-size:10px}
 .felt-logo small{font-size:7px}
 .table-footer{margin:0 -7px;padding:2px 7px}
 .table-message{font-size:10px;min-height:17px}
 .dealer-zone{min-height:59px}
 .hand-area{min-height:66px}
 .other-seats{grid-template-columns:repeat(6,minmax(0,1fr));gap:2px}
 .other-seat .seat-title{font-size:7px;letter-spacing:0;white-space:nowrap}
 .other-seat .cards{min-height:0}
 .other-seat .playing-card{width:20px;height:28px}
 .playing-card{width:33px;height:46px}
 .cards{min-height:46px}
 .coach-toggle{min-height:25px;font-size:11px;padding:1px 7px}
 #coach-content{max-height:78px}
 #coach-body{padding:4px 7px}
 #coach-body .coach-cue{font-size:12px}
 #coach-body p{font-size:11px}
 .nav{scrollbar-width:none}
 .controls{padding:4px}
 .controls .action-button{min-height:40px}
 #bet-controls{display:grid;grid-template-columns:1fr 1fr;gap:4px;align-items:center}
 #bet-controls .control-head{grid-column:1/-1}
 #bet-controls .chip-controls{grid-column:1/-1;margin:0}
 #bet-controls .primary{grid-column:1}
 #bet-controls .primary:has(+[hidden]){grid-column:1/-1}
 .controls .chip-controls .chip{width:33px;height:33px}
 .controls .chip-controls .quiet{min-height:29px}
 .controls .wager-entry input{width:75px;font-size:15px;height:30px}
 .controls .confidence-controls label{font-size:10px}
 .rail-tabs button{min-height:31px}
 .data-table th:first-child{min-width:115px}
}
@media(max-width:480px) and (max-height:760px){
 .felt{min-height:185px}
 .felt-logo{margin:0}.felt-logo span{font-size:12px}.felt-logo small{font-size:6px}
 .dealer-zone{min-height:54px}
 .hand-area{min-height:58px}
 .other-seat .playing-card{width:18px;height:25px}
 .other-seat .card-top,.other-seat .card-bottom{font-size:7px}
 .other-seat .card-suit{font-size:10px}
 .card-suit{font-size:17px}
 .playing-card{width:30px;height:41px}
 .cards{min-height:41px}
 #coach-content{max-height:66px}
 .controls .chip-controls .chip{width:30px;height:30px}
 .controls .primary{min-height:33px}
 .rail-row{min-height:15px}
}
@media(max-width:480px){
 .key-value-table tr{display:grid;grid-template-columns:minmax(0,1fr);border-bottom:1px solid var(--border);padding:5px 0}
 .key-value-table th,.key-value-table td{border:none;padding:2px 4px;min-width:0;overflow-wrap:anywhere}
}
@media (prefers-reduced-motion:reduce){button{transition:none!important;transform:none!important}}
.tutorial-board{background:#173d30;border:1px solid #647f6d;border-radius:9px;padding:10px;color:#e8f1e9;text-align:center}
.academy-neighbors{display:grid;grid-template-columns:repeat(auto-fit,minmax(80px,1fr));gap:5px}
.academy-neighbors .playing-card{width:25px;height:34px}
.academy-hand{display:inline-block;vertical-align:top;padding:6px;border:1px solid transparent;border-radius:5px;margin:3px}
.academy-hand.active{border-color:var(--gold);background:#0e3027}
.tutorial-board .eyebrow{margin:4px 0}
.coach #coach-content{padding:0}
.reveal-controls>button:disabled{display:none}
.other-seats:has(.other-seat:only-child){grid-template-columns:1fr}
@media (min-width:821px) and (max-height:780px){
 body[data-page=play] .topbar{padding-block:3px}
 body[data-page=play] .page-head{margin-bottom:3px}
 body[data-page=play] main{padding-block:4px}
 .play-layout{gap:5px}
 .felt{min-height:220px}
 .discard-tray{height:29px}
 .discard-tray i{max-height:21px}
 .dealer-zone{min-height:54px}
 .hand-area{min-height:58px}
 .playing-card{width:37px;height:50px}
 .cards{min-height:49px}
 .controls .action-button{min-height:36px;padding:3px 6px;line-height:1.1}
 #coach-content{max-height:108px}
 body[data-mode=blind] #coach-content{max-height:80px}
}
@media(max-width:480px) and (max-height:760px){
 body[data-page=play] .topbar{padding-block:1px}
 body[data-page=play] .nav button{min-height:29px;padding-block:2px}
 body[data-page=play] .page-head{margin-bottom:3px}
 .rail-tabs button{min-height:28px}
 .rail-row{min-height:14px;font-size:10px;grid-template-columns:44px minmax(0,1fr) 35px}
 .rail-row>span{white-space:nowrap}
 .cockpit-rail{padding:3px 6px;gap:0 4px}
 .cockpit-rail .metric{padding:2px;line-height:1.05}
 .discard-tray{height:29px}
 .discard-tray i{max-height:21px}
}
/* Reserve enough vertical room for long/split hands without hiding cards.
   Only the coach's optional detail region scrolls, not the game controls. */
@media(max-width:820px) and (max-height:900px){
 .hand-area{gap:2px;min-height:56px}
 .hand-area:has(.hand:nth-child(2)) .playing-card{width:27px;height:38px}
 .hand-area:has(.hand:nth-child(2)) .cards{min-height:38px;gap:1px}
 .hand-area:has(.hand:nth-child(2)) .hand{padding:1px}
 .hand-area:has(.hand:nth-child(2)) .card-suit{font-size:13px}
 .hand-area:has(.hand:nth-child(2)) .card-top,.hand-area:has(.hand:nth-child(2)) .card-bottom{font-size:8px}
 .felt{min-height:185px}
 .dealer-zone{min-height:53px}
 #coach-content{max-height:62px}
 .controls{margin-top:3px}
}
@media(max-width:820px) and (max-height:900px){
 .other-seat .cards{flex-wrap:nowrap;overflow-x:auto;scrollbar-width:thin}
 .other-seat .playing-card{flex:0 0 17px;width:17px;height:24px}
 .other-seat .card-top,.other-seat .card-bottom{font-size:7px}
 .other-seat .card-suit{font-size:9px}
 .rail-row>span{white-space:nowrap}
 .rail-row{grid-template-columns:46px minmax(0,1fr) 34px;min-height:14px}
 .cockpit-rail{padding:3px 5px;gap:0 3px}
 .cockpit-rail .metric{padding:2px}
}
