@import url('https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@400;500;600;700;800&display=swap');
:root{--bg:#101513;--panel:#181f1b;--panel2:#1d2621;--line:#2d3931;--text:#f0f2eb;--muted:#9ba79d;--green:#1c644b;--green2:#287a5b;--gold:#d7b66b;--red:#dc7772;--mono:'DM Mono',monospace;--sans:'DM Sans',sans-serif;--display:'Manrope',sans-serif}
*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--text);font-family:var(--sans);font-size:14px;line-height:1.5}button,input,select{font:inherit}button{cursor:pointer}.topbar{height:74px;padding:0 clamp(20px,5vw,76px);border-bottom:1px solid #27312b;display:flex;align-items:center;justify-content:space-between;background:#121815}.brand{display:flex;gap:12px;align-items:center;color:var(--text);text-decoration:none;font-size:11px;letter-spacing:.13em;font-weight:700}.brand-mark{display:grid;place-items:center;width:38px;height:38px;border:1px solid var(--gold);color:var(--gold);font-family:var(--display);font-weight:800;letter-spacing:-.08em;font-size:15px}.brand small{display:block;color:var(--muted);font-size:10px;letter-spacing:.02em;font-weight:400;margin-top:2px}.local-tag,.eyebrow,.section-kicker,.shoe-label,.hand-label,.felt-footer,.bet-control>label,.stat>span,.footer{font-family:var(--mono);font-size:10px;letter-spacing:.12em}.local-tag{color:#b7c4b8}.local-tag i,.shoe-dot{display:inline-block;width:6px;height:6px;background:#75bd8b;border-radius:50%;margin-right:7px}.shell{max-width:1450px;margin:auto;padding:45px clamp(18px,4.5vw,66px) 24px}.intro{display:flex;justify-content:space-between;align-items:flex-end;gap:35px;margin-bottom:32px}.eyebrow,.section-kicker{color:var(--gold);margin:0 0 9px}.intro h1{font-family:var(--display);font-size:clamp(34px,4.2vw,54px);line-height:1.08;letter-spacing:-.055em;margin:0;font-weight:700}.intro h1 em{font-style:normal;color:var(--gold)}.lede{color:#aab5ac;max-width:590px;margin:16px 0 0;font-size:15px}.intro-note{max-width:300px;min-width:230px;display:flex;gap:12px;padding:17px;border:1px solid var(--line);background:#161d19;border-radius:9px}.note-icon{color:var(--gold);font-size:21px}.intro-note strong{font-size:12px}.intro-note p{margin:4px 0 0;color:var(--muted);font-size:11px}.workspace{display:grid;grid-template-columns:minmax(0,1.65fr) minmax(290px,.85fr);gap:18px;align-items:start}.panel{background:var(--panel);border:1px solid var(--line);border-radius:11px;overflow:hidden}.table-panel{padding:22px}.panel-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:17px}.panel-heading h2{font-family:var(--display);font-size:19px;letter-spacing:-.03em;margin:0;font-weight:700}.section-kicker{font-size:9px;display:block;margin-bottom:3px}.shoe-label{color:#c1ccc2;font-size:9px;letter-spacing:.04em}.felt{position:relative;overflow:hidden;min-height:420px;padding:26px clamp(14px,3vw,32px) 50px;border:1px solid #3b745b;border-radius:46% 46% 15px 15px / 12% 12% 15px 15px;background:radial-gradient(ellipse at 50% 45%,#216448 0%,#164c38 48%,#103b2d 100%);box-shadow:inset 0 0 0 5px rgba(5,26,18,.28),inset 0 0 40px rgba(0,0,0,.22)}.felt:before{content:"";position:absolute;inset:13px;border:1px solid rgba(218,188,117,.25);border-radius:46% 46% 12px 12px / 12% 12% 12px 12px;pointer-events:none}.dealer-zone,.player-zone,.table-center,.felt-footer{position:relative;z-index:1}.hand-label{display:flex;justify-content:space-between;align-items:center;color:#d4e1d5;font-size:10px}.hand-total{color:#f6d88c;font-size:14px}.cards{display:flex;gap:7px;min-height:93px;align-items:center;flex-wrap:wrap;padding-top:10px}.playing-card{height:83px;width:57px;border-radius:6px;background:#f6f3e9;color:#1b2821;box-shadow:0 3px 8px #071c13aa;display:flex;flex-direction:column;justify-content:space-between;padding:5px 6px;font-family:Georgia,serif;font-weight:bold;line-height:1}.playing-card.red{color:#b6373c}.playing-card .rank{font-size:17px}.playing-card .suit{font-size:18px;align-self:flex-end}.playing-card .center-suit{font-size:25px;text-align:center}.playing-card.back{background:repeating-linear-gradient(45deg,#243c64,#243c64 4px,#d9c48d 4px,#d9c48d 6px);border:4px solid #f6f3e9}.empty-hand{font-size:11px;color:#c1d5c7;opacity:.75;font-style:italic}.table-center{display:flex;align-items:center;justify-content:center;gap:12px;margin:13px 0 16px;color:#c9ddcf;font-family:var(--mono);font-size:9px;letter-spacing:.08em;text-align:center}.table-rule{white-space:nowrap}.table-rule b{color:#f3d38b}.table-divider{height:1px;width:30px;background:#9ebba6;opacity:.5}.player-hands{display:flex;gap:12px;align-items:flex-start;flex-wrap:wrap;padding-top:10px;min-height:108px}.player-hand{min-width:120px;max-width:100%;padding:7px;border:1px solid transparent;border-radius:7px}.player-hand.active{border-color:#e2c47a;background:#fff1b40c}.player-hand .hand-label{font-size:9px}.player-hand .cards{min-height:85px;padding-top:6px}.player-hand .playing-card{width:48px;height:70px}.player-hand .playing-card .rank{font-size:15px}.player-hand .playing-card .suit{font-size:15px}.felt-footer{position:absolute;bottom:16px;left:26px;right:26px;display:flex;justify-content:space-between;color:#b7d0c0;font-size:8px}.felt-footer b{color:#f3d38b;font-weight:400}.controls{display:flex;justify-content:space-between;gap:20px;align-items:flex-end;padding:20px 0 5px}.bet-control>label{display:block;color:var(--muted);font-size:9px;margin-bottom:7px}.bet-input{display:flex;align-items:center;gap:4px}.bet-input button{width:28px;height:31px;background:#26342b;border:1px solid #3a4a3e;color:#d9e1d9;border-radius:5px}.bet-input input{width:62px;text-align:center;color:var(--text);background:#101612;border:1px solid #39463d;border-radius:5px;height:31px}.muted{color:var(--muted);font-size:10px}.bet-control .muted{display:block;margin-top:7px}.muted b{color:#e0c57f;font-weight:500}.action-buttons{display:flex;gap:7px;flex-wrap:wrap;justify-content:flex-end}.btn{background:#27342c;border:1px solid #3b4a3e;color:#e7ece5;border-radius:6px;padding:10px 13px;font-size:11px;font-weight:600;transition:background .15s,border-color .15s}.btn:hover:not(:disabled){background:#35463a;border-color:#71816f}.btn:disabled{opacity:.35;cursor:not-allowed}.btn-primary{background:var(--gold);border-color:var(--gold);color:#1a211b;padding:10px 15px}.btn-primary:hover:not(:disabled){background:#e6cb89;border-color:#e6cb89}.btn-primary span{padding-left:8px}.btn-outline{background:transparent;border-color:#506e5a;color:#d6e2d7}.btn-full{width:100%;margin-top:17px}.status-message{border-top:1px solid var(--line);padding-top:13px;margin-top:13px;color:#b8c4b9;font-size:11px}.side-column{display:grid;gap:18px}.stats-panel,.rules-panel,.review-panel,.roadmap-panel{padding:21px}.text-button{background:none;border:0;color:var(--gold);font-size:10px}.stats-grid{display:grid;grid-template-columns:1fr 1fr;gap:9px}.stat{padding:13px;background:#111714;border:1px solid #27332b;border-radius:7px}.stat>span{display:block;color:var(--muted);font-size:8px}.stat strong{display:block;font-family:var(--display);font-size:25px;letter-spacing:-.05em;margin-top:5px}.stat small{font-size:9px;color:var(--muted)}.small-note,.rules-footnote{color:#829087;font-size:10px;margin:12px 0 0}.settings-icon,.review-mark{color:var(--gold);font-size:19px}.rules-intro{font-size:11px;color:var(--muted);margin:-6px 0 17px}.field-label{display:block;font-size:10px;color:#cbd5cc;margin:13px 0 6px}.rules-panel select{width:100%;padding:10px 11px;border:1px solid #344238;background:#111713;color:#e7ece5;border-radius:5px;font-size:11px}.toggle-row{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:12px 0;border-bottom:1px solid #29342c}.toggle-row strong,.toggle-row small{display:block}.toggle-row strong{font-size:11px;font-weight:500}.toggle-row small{font-size:9px;color:var(--muted);margin-top:2px}.toggle-row input{accent-color:var(--gold);width:16px;height:16px}.bottom-grid{display:grid;grid-template-columns:1fr 1fr;gap:18px;margin-top:18px}.review-content{border-top:1px solid var(--line);padding-top:13px;color:#aeb9b0;font-size:12px}.review-content strong{color:#f0d58d}.review-content .result-title{font-family:var(--display);font-size:18px;color:var(--text);margin-bottom:6px}.roadmap{list-style:none;padding:0;margin:0}.roadmap li{display:flex;align-items:center;gap:11px;padding:11px 0;border-bottom:1px solid #29342c}.roadmap li:last-child{border-bottom:0}.roadmap li>span{font-family:var(--mono);font-size:10px;color:#849187}.roadmap li div{flex:1}.roadmap strong,.roadmap small{display:block}.roadmap strong{font-size:11px;font-weight:600}.roadmap small{font-size:9px;color:var(--muted);margin-top:2px}.roadmap li>b{font-family:var(--mono);font-size:8px;color:#8e9c91;font-weight:400;white-space:nowrap}.roadmap .roadmap-current>b{color:var(--gold)}.footer{display:flex;justify-content:space-between;gap:15px;color:#77847a;font-size:8px;padding:25px 3px 0;letter-spacing:.07em}.footer-sep{color:var(--gold);padding:0 6px}
@media(max-width:1050px){.workspace{grid-template-columns:minmax(0,1.3fr) minmax(260px,.8fr)}.controls{align-items:flex-start;flex-direction:column}.action-buttons{justify-content:flex-start}.felt{min-height:405px}.intro-note{max-width:260px}}
@media(max-width:760px){.topbar{height:65px;padding:0 17px}.local-tag{font-size:8px}.shell{padding-top:28px}.intro{align-items:flex-start;flex-direction:column;gap:20px}.intro-note{max-width:none;width:100%}.workspace,.bottom-grid{grid-template-columns:1fr}.table-panel{padding:15px}.felt{min-height:400px;padding:24px 14px 50px}.playing-card{width:48px;height:72px}.cards{gap:5px}.controls{gap:14px}.action-buttons{gap:6px}.btn{padding:10px}.stats-panel,.rules-panel,.review-panel,.roadmap-panel{padding:17px}.footer{flex-direction:column}.brand{font-size:9px}}
@media(max-width:390px){.local-tag{display:none}.intro h1{font-size:35px}.felt{min-height:385px}.playing-card{width:42px;height:67px;padding:4px}.playing-card .rank{font-size:15px}.player-hand .playing-card{width:39px;height:60px}.action-buttons{display:grid;grid-template-columns:repeat(3,1fr);width:100%}.action-buttons .btn-primary{grid-column:span 3}}

/* Workspace modes and the next presentation pass */
.view-switch{display:flex;align-items:center;gap:14px;margin:0 0 24px;padding:10px 12px;border:1px solid var(--line);border-radius:9px;background:#151c17}
.view-switch-label,.audio-heading{font-family:var(--mono);font-size:9px;letter-spacing:.1em;color:var(--gold);white-space:nowrap}
.view-switch-buttons{display:flex;gap:5px}
.view-btn{padding:8px 12px;border:1px solid #354238;border-radius:5px;background:transparent;color:#b9c5ba;font-size:11px}
.view-btn[aria-pressed="true"]{background:#d7b66b;color:#1a211b;border-color:#d7b66b;font-weight:700}
.view-mode-hint{font-size:10px;color:var(--muted);margin-left:auto}
.audio-settings{display:flex;align-items:center;gap:17px;flex-wrap:wrap;padding-top:13px;margin-top:12px;border-top:1px solid var(--line)}
.audio-option{display:flex;align-items:center;gap:7px;font-size:10px;color:#c4d0c5;cursor:pointer}
.audio-option input{accent-color:var(--gold);width:14px;height:14px}
.audio-note{font-size:9px;color:#819087;margin-left:auto}
.card-arrive{animation:cardArrive .22s cubic-bezier(.2,.75,.25,1) both}
@keyframes cardArrive{from{opacity:0;transform:translateY(-12px) rotate(-4deg) scale(.94)}to{opacity:1;transform:translateY(0) rotate(0) scale(1)}}
.player-hand .hand-label .hand-total{font-family:var(--mono)}
body .table-mode .view-switch{margin-bottom:15px}
.table-mode .side-column,.table-mode .bottom-grid{display:none}
.table-mode .workspace{grid-template-columns:minmax(0,1fr);max-width:1050px;margin:0 auto}
.table-mode .table-panel{padding:clamp(15px,3vw,28px)}
.table-mode .felt{min-height:450px}
.table-mode .table-panel .panel-heading h2{font-size:21px}
@media(max-width:760px){.view-switch{flex-wrap:wrap;gap:9px}.view-mode-hint{width:100%;margin-left:0}.table-mode .felt{min-height:420px}.audio-note{margin-left:0}}
@media(prefers-reduced-motion:reduce){.card-arrive{animation:none!important}}

/* House-edge reference panel: visible in Laboratory mode only. */
.table-mode .house-edge-panel{display:none}.house-edge-panel{padding:22px;margin-top:18px}.reference-pill{border:1px solid #526b58;border-radius:20px;padding:6px 10px;color:#c9d7cb;font:9px var(--mono);white-space:nowrap}.edge-intro,.edge-method,.edge-note{font-size:11px;color:#9eaca1;max-width:900px}.edge-result{display:flex;justify-content:space-between;align-items:center;gap:20px;padding:20px;background:#111714;border:1px solid #2b3b30;border-radius:8px;margin-top:16px}.edge-number{font-family:var(--display);font-size:clamp(34px,5vw,48px);letter-spacing:-.05em;color:#f0d58d;line-height:1.1}.edge-number span{font-size:.55em;margin-left:3px}.edge-result p{margin:6px 0 0;color:#9eaca1;font-size:11px}.edge-status{font-size:10px;color:#a8d7b2;text-align:right}.edge-note{margin-top:10px}.edge-comparisons{margin-top:22px}.edge-comparisons h3{font-family:var(--display);font-size:15px;margin:0 0 8px}.edge-comparison{display:flex;justify-content:space-between;gap:18px;padding:12px 2px;border-bottom:1px solid #29342c}.edge-comparison:last-child{border-bottom:0}.edge-comparison .name{font-size:11px;font-weight:600}.edge-comparison .detail,.edge-comparison .delta{font-size:9px;color:#8e9c91;margin-top:3px}.edge-comparison .value{font-family:var(--display);font-size:17px;text-align:right;color:#e9d28e}.edge-comparison .delta{text-align:right}.edge-method{border-top:1px solid #29342c;padding-top:14px;margin-top:15px}.doubling-note{color:#a6b3a8;font-size:9px;margin:7px 0 0}

/* Stage 7: align the rule workshop with the table and place its reference directly below. */
.workspace{grid-template-columns:minmax(0,1.65fr) minmax(290px,.85fr);grid-template-areas:"table rules" "edge .";align-items:stretch}
.table-panel{grid-area:table;min-width:0}
.rules-panel{grid-area:rules;min-width:0}
.house-edge-panel{grid-area:edge;min-width:0;margin-top:0;align-self:start}
.table-mode .workspace{grid-template-areas:"table";grid-template-columns:minmax(0,1fr)}
.table-mode .rules-panel,.table-mode .house-edge-panel{display:none}
.edge-method{border-top:1px solid #29342c;padding-top:14px;margin-top:15px}
@media(max-width:1050px){.workspace{grid-template-columns:minmax(0,1fr);grid-template-areas:"table" "rules" "edge"}.house-edge-panel{margin-top:0}.rules-panel{height:auto}}
@media(max-width:760px){.workspace{grid-template-columns:minmax(0,1fr);grid-template-areas:"table" "rules" "edge"}}

/* Stage 8: compact house-edge reference and published strategy-card viewer */
.house-edge-panel{padding:14px 18px}.edge-compact{display:flex;align-items:center;justify-content:space-between;gap:18px}.edge-compact strong{font-size:12px;font-weight:600}.edge-mini-value{font-family:var(--display);font-size:28px;white-space:nowrap;color:#f0d58d;font-weight:700}.edge-mini-value span{font-size:15px}.edge-mini-note,.edge-mini-status{color:var(--muted);font-size:9px}.edge-mini-status{display:block;margin-top:4px}.strategy-workspace{margin-top:18px;padding:21px}.strategy-subtitle{font-size:11px;color:#aab8ac;margin:-4px 0 14px}.strategy-toolbar,.strategy-tabs{display:flex;gap:7px;align-items:center;flex-wrap:wrap}.strategy-toolbar{min-width:0}.strategy-tabs[hidden],.strategy-quick-rules[hidden]{display:none}.strategy-tab,#strategyToggle{border:1px solid #6f957c;border-radius:6px;background:#203c30;color:#f0e5c7;padding:9px 13px;font-size:11px}.strategy-tab.active{background:var(--gold);border-color:var(--gold);color:#1b211c;font-weight:700}.strategy-scroll{overflow-x:auto;border:1px solid #354338;border-radius:8px}.strategy-table{width:100%;border-collapse:collapse;text-align:center;min-width:510px;font-size:11px}.strategy-table caption{text-align:left;padding:9px 12px;color:#e2c985;font-weight:700}.strategy-table th,.strategy-table td{padding:8px 6px;border:1px solid #2e4034}.strategy-table th{background:#25382c;color:#e8eddf}.strategy-table tbody th{text-align:left;white-space:nowrap;padding-left:13px}.strategy-table td{font-weight:700;font-family:var(--mono)}.strategy-table td[data-action="H"]{background:#3d2b20;color:#f3ba89}.strategy-table td[data-action="S"]{background:#203e2d;color:#a8d9ad}.strategy-table td[data-action="D"]{background:#183b48;color:#a9e3f4}.strategy-table td[data-action="P"]{background:#49303d;color:#efbfd2}.strategy-table td[data-action="R"]{background:#514022;color:#f3d38b}.strategy-legend,.strategy-caution,.strategy-notice{font-size:11px;color:#b8c5b9}.strategy-caution{border-top:1px solid #2e3c31;padding-top:11px}.strategy-notice{margin:9px 0;color:#d7b66b}.table-mode .strategy-workspace{display:none}@media(max-width:760px){.strategy-workspace{padding:14px}}

/* Stage 9: full chart view with readable vertical spacing. */
.strategy-tables{display:grid;gap:18px}.strategy-tables .strategy-scroll{width:100%}.strategy-tables .strategy-table caption{font-size:13px;padding:12px 13px}.strategy-tables .strategy-table{min-width:560px}

.strategy-notice{line-height:1.6;font-weight:600;}

/* Stage 14: live strategy controls, mirroring the existing table rule inputs. */
.strategy-control-bar{display:flex;align-items:flex-start;justify-content:space-between;gap:10px 18px;flex-wrap:wrap}
.strategy-quick-rules{display:flex;justify-content:flex-end;align-items:end;gap:9px;flex-wrap:wrap}
#strategyViewer{margin-top:12px}
.strategy-quick-rules label{display:flex;flex-direction:column;gap:4px;color:#b7c5b9;font-size:10px;white-space:nowrap}
.strategy-quick-rules select{background:#111713;border:1px solid #465b4c;border-radius:5px;color:#f0f2eb;padding:8px 7px;font-size:11px;min-width:65px}
@media(max-width:760px){.strategy-control-bar{gap:12px}.strategy-quick-rules{justify-content:flex-start}}

/* I1: on-demand, live-hand EV display */
.controls .analyse-button{flex:0 0 auto;white-space:nowrap;align-self:center;margin-left:auto}.controls .action-buttons{margin-left:0}
.hand-analysis{position:absolute;right:18px;bottom:43px;width:min(245px,43%);z-index:5;background:#10271feF;border:1px solid #b9a36c;border-radius:9px;padding:11px 12px;box-shadow:0 9px 24px #071c13aa;color:#f4f0e4;font-size:11px}
.hand-analysis[hidden]{display:none}.analysis-heading{display:flex;justify-content:space-between;gap:6px;align-items:center;border-bottom:1px solid #5c745e;padding-bottom:7px;margin-bottom:5px}.analysis-heading strong{color:#f2d58e}.analysis-heading span{font-size:9px;color:#c9d7c9}.analysis-row{display:flex;justify-content:space-between;gap:10px;padding:4px 0}.analysis-row:first-child{color:#f4d98e;font-weight:700}.analysis-row span:last-child{font-family:var(--mono);font-variant-numeric:tabular-nums}.analysis-note{color:#c5d2c7;font-size:9px;margin-top:6px;line-height:1.4}
@media(max-width:760px){.controls .analyse-button{margin-left:0}.hand-analysis{width:min(240px,55%);right:9px;bottom:38px;padding:9px}}
@media(max-width:450px){.hand-analysis{position:relative;right:auto;bottom:auto;width:100%;margin-top:12px}.felt{overflow:visible}}

/* I2: centred cards, neutral disabled-button cursor, compact strategy fallback. */
.btn:disabled,button:disabled{cursor:default}
.dealer-zone > .cards{justify-content:center}
.player-hands{justify-content:center}
.dealer-zone > .hand-label,.player-zone > .hand-label{max-width:420px;margin-inline:auto}
@media(max-width:760px){.dealer-zone > .hand-label,.player-zone > .hand-label{max-width:100%}}

/* I3: optional strategy coaching and unapplied-rule reminder */
.warning-toggle-row{display:flex;justify-content:center;margin:0 0 13px;color:#dce7dc;font-size:11px}
.warning-toggle-row label{display:flex;align-items:center;gap:9px;cursor:pointer}
.warning-toggle-row input{accent-color:var(--gold);width:16px;height:16px}
.pending-rules-hint{padding:10px 12px;margin:15px 0 0;border-left:3px solid var(--gold);border-radius:4px;background:#332d1c;color:#efdfb8;font-size:11px;line-height:1.5}
.decision-warning{margin-top:14px;padding:14px 16px;border:1px solid #9d8351;border-radius:8px;background:#292719;color:#f1e9d4}
.decision-warning strong{font-size:13px}.decision-warning p{font-size:12px;margin:8px 0 12px}
.decision-warning-actions{display:flex;gap:8px;flex-wrap:wrap}
.decision-warning-actions .btn{font-size:11px}
/* Explicit hidden override: display rules must not override the hidden attribute. */
.decision-warning[hidden],.pending-rules-hint[hidden]{display:none!important}

/* I4: compact shoe controls beneath the live shoe counter */
.shoe-settings{display:flex;flex-direction:column;align-items:flex-end;gap:4px;min-width:180px}
.shoe-setting-label{font-size:9px;color:var(--muted);align-self:flex-end}
.shoe-settings select{width:185px;max-width:100%;padding:5px 7px;background:#111713;border:1px solid #344238;border-radius:5px;color:#e7ece5;font-size:10px}
.shoe-settings #cutCardControl{text-align:right}
.shoe-settings [hidden],#queuedRuleNote[hidden]{display:none!important}
#queuedRuleNote{color:var(--gold)}
@media(max-width:520px){.shoe-settings{min-width:135px}.shoe-settings select{width:145px}.table-panel .panel-heading{align-items:flex-start}}

.shoe-setting-note{color:var(--gold);font-size:10px;text-align:right}
.shoe-setting-note[hidden]{display:none!important}

/* I4.3: matched, independent table overlays. */
.felt .decision-warning{position:absolute;left:15px;bottom:43px;z-index:6;width:min(263px,46%);margin:0;padding:11px 12px;background:#10271fef;border:1px solid #b9a36c;border-radius:9px;box-shadow:0 9px 24px #071c13aa;color:#f4f0e4;font-size:11px;line-height:1.45}
.felt .decision-warning>strong{display:block;font-size:11px;color:#f2d58e;border-bottom:1px solid #5c745e;padding-bottom:7px;font-weight:700}
.felt .decision-warning p{font-size:10px;margin:8px 0 10px;line-height:1.6;color:#e2ece2}
.felt .decision-warning .decision-highlight{color:#f2d58e;font-size:inherit}
.felt .decision-warning-actions{display:flex;gap:6px;flex-wrap:nowrap}
.felt .decision-warning-actions .btn{min-width:0;flex:1;padding:7px 5px;font-size:9px;white-space:nowrap}
.felt .decision-warning-actions #changeDecision{background:#d7b66b;color:#19271e;border-color:#d7b66b}
.felt .decision-warning-actions #changeDecision:hover{background:#e6cb89}
.felt .hand-analysis{width:min(245px,43%)}
/* Bring audio alongside betting and actions, with no standalone divider. */
.controls{gap:12px;flex-wrap:wrap;align-items:center;padding:15px 0 3px}
.controls .audio-settings{display:flex;gap:11px;align-items:center;flex-wrap:wrap;border:0;padding:0;margin:9px auto 0 0}
.controls .audio-option{font-size:9px;white-space:nowrap}
.controls .analyse-button{margin-left:0}
.status-message{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;padding:0;margin:0;border:0}
.table-panel{position:relative}
/* Keep table top-left and rules top-right; edge under table, aligned to rules bottom. */
@media(min-width:1051px){
.workspace{grid-template-areas:'table rules' 'edge rules';grid-template-rows:auto auto;align-items:stretch;row-gap:12px}
.table-panel{align-self:start}
.rules-panel{align-self:stretch}
.house-edge-panel{align-self:end}
}
.house-edge-panel{padding:12px 17px}
.edge-compact strong{font-size:12px}
.edge-mini-value{font-size:26px}
.edge-mini-status[hidden]{display:none!important}
.strategy-workspace{margin-top:12px;padding:17px 21px}
.strategy-workspace .panel-heading{margin-bottom:10px}
.strategy-legend{margin:12px 0 0}
.strategy-notice:empty{display:none}
@media(max-width:760px){.controls{align-items:flex-start}.controls .audio-settings{margin:2px 0}.felt .decision-warning{left:9px;bottom:38px;width:min(250px,52%);padding:9px}.felt .hand-analysis{right:9px;width:min(240px,45%)}}
@media(max-width:600px){.felt .decision-warning{position:relative;left:auto;bottom:auto;width:100%;margin:12px 0 0}.felt .hand-analysis{position:relative;right:auto;bottom:auto;width:100%;margin:12px 0 0}.felt{overflow:visible}.felt .decision-warning-actions .btn{font-size:10px}}

/* I4.3.1: restore play controls directly below the felt, with audio beneath Analyse. */
.controls{display:grid;grid-template-columns:max-content max-content minmax(0,1fr);align-items:start;column-gap:clamp(9px,1.2vw,17px);row-gap:9px;flex-wrap:nowrap;padding:13px 0 3px}
.controls .bet-control{grid-column:1;grid-row:1;min-width:0}
.controls .analyse-audio-group{grid-column:2;grid-row:1;display:flex;flex-direction:column;align-items:flex-start;gap:8px;min-width:0}
.controls .analyse-button{align-self:flex-start;margin:0;white-space:nowrap}
.controls .analyse-audio-group .audio-settings{display:flex;align-items:center;gap:9px;flex-wrap:wrap;border:0;padding:0;margin:0;max-width:215px}
.controls .audio-option{font-size:9px;gap:4px;white-space:nowrap}
.controls .audio-option input{width:13px;height:13px;margin:0}
.controls .action-buttons{grid-column:3;grid-row:1;display:flex;justify-content:flex-end;align-self:start;align-items:center;flex-wrap:nowrap;gap:clamp(3px,.5vw,7px);margin:0;padding:0}
.controls .action-buttons .btn{padding:10px clamp(6px,.65vw,13px);white-space:nowrap;min-width:0}
.controls .action-buttons .btn-primary{padding:10px clamp(8px,.8vw,15px)}
@media(max-width:1250px){
 .controls{grid-template-columns:max-content minmax(110px,1fr);column-gap:12px}
 .controls .bet-control{grid-column:1;grid-row:1}
 .controls .analyse-audio-group{grid-column:2;grid-row:1}
 .controls .action-buttons{grid-column:1/-1;grid-row:2;justify-content:flex-end;flex-wrap:wrap}
}
@media(max-width:760px){
 .controls{grid-template-columns:max-content minmax(0,1fr);gap:12px}
 .controls .action-buttons{grid-column:1/-1;grid-row:2;justify-content:flex-start;flex-wrap:wrap}
 .controls .analyse-audio-group .audio-settings{margin:0}
}
@media(max-width:390px){
 .controls .action-buttons{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));width:100%}
 .controls .action-buttons .btn-primary{grid-column:span 3}
}

/* I4.3.2: park Analyse immediately beside Deal, not beside the bet selector.
   The flexible space belongs between betting and analysis, never between
   analysis and the playing actions. */
@media (min-width: 901px) {
  .controls {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr) max-content max-content;
    column-gap: 9px;
    align-items: start;
  }
  .controls .bet-control { grid-column: 1; grid-row: 1; }
  .controls .analyse-audio-group { grid-column: 3; grid-row: 1; }
  .controls .action-buttons {
    grid-column: 4;
    grid-row: 1;
    justify-content: flex-start;
    flex-wrap: nowrap;
  }
}
@media (min-width: 901px) and (max-width: 1080px) {
  .controls { column-gap: 6px; }
  .controls .action-buttons { gap: 3px; }
  .controls .action-buttons .btn { padding-left: 6px; padding-right: 6px; }
}
@media (min-width: 761px) and (max-width: 900px) {
  .controls { grid-template-columns: max-content minmax(0,1fr) max-content; }
  .controls .bet-control { grid-column: 1; grid-row: 1; }
  .controls .analyse-audio-group { grid-column: 3; grid-row: 1; }
  .controls .action-buttons { grid-column: 1/-1; grid-row: 2; justify-content: flex-end; }
}

/* I4.4: leave the baize uncluttered; preserve card/hand layout. */
.table-center .table-divider,.table-center #roundMessage,.hand-total,.hand-result,.status-message{display:none!important}

/* I4.4.2: optional post-round card recall directly below Deal. */
.controls .deal-stack{display:flex;flex-direction:column;align-items:stretch;gap:5px;flex:0 0 auto}
.controls .deal-stack #dealBtn{white-space:nowrap}
.controls .restore-hand-button{font:inherit;font-size:9px;line-height:1.2;white-space:nowrap;color:#d6e2d7;background:transparent;border:1px solid #506e5a;border-radius:5px;padding:5px 4px;cursor:pointer}
.controls .restore-hand-button:hover{background:#35463a;border-color:#71816f}
.controls .restore-hand-button[hidden]{display:none!important}

/* I5.0: a compact two-button cockpit, with Analyse still next to Deal. */
.controls .lab-tools{display:flex;flex-direction:column;gap:5px;align-items:stretch;grid-column:3;grid-row:1}
.controls .lab-tools .btn{font-size:10px;padding:7px 9px;white-space:nowrap}
.controls .lab-tools #explorerBtn:disabled{opacity:.48;cursor:not-allowed}
.trainer-flag{position:absolute;top:10px;left:50%;transform:translateX(-50%);z-index:2;color:#e9d29a;border:1px solid #8b7a4b;background:#1d382a;padding:4px 11px;border-radius:20px;font-size:10px;letter-spacing:1.5px;white-space:nowrap}
.trainer-panel{margin-top:9px;border:1px solid #456450;background:#1c3329;border-radius:9px;padding:12px 14px;color:#f0f3e9}
.trainer-panel[hidden],.trainer-flag[hidden]{display:none!important}
.trainer-heading,.trainer-settings{display:flex;align-items:center;gap:12px;flex-wrap:wrap}
.trainer-heading{justify-content:space-between;margin-bottom:9px}
.trainer-heading strong{color:#e3cf95}.trainer-heading span{font-size:11px;color:#b9d3c0}
.trainer-settings label,.trainer-feedback{font-size:11px}.trainer-settings select{background:#203a2e;color:#f0f3e9;border:1px solid #637d67;border-radius:5px;padding:6px}
.trainer-settings .btn{padding:7px 11px;font-size:11px}.trainer-auto{display:flex;gap:5px;align-items:center}
.trainer-feedback{margin-top:10px;color:#d7e5d9;line-height:1.5;min-height:17px}
@media(min-width:901px){.controls{grid-template-columns:max-content minmax(0,1fr) max-content max-content max-content;column-gap:7px}.controls .bet-control{grid-column:1}.controls .lab-tools{grid-column:3}.controls .analyse-audio-group{grid-column:4}.controls .action-buttons{grid-column:5}}
@media(min-width:761px) and (max-width:900px){.controls .lab-tools{grid-column:2;grid-row:1}.controls .analyse-audio-group{grid-column:3;grid-row:1}}
@media(max-width:760px){.controls .lab-tools{grid-column:2;grid-row:1;justify-self:end}.controls .analyse-audio-group{grid-column:1/-1;grid-row:2}.controls .action-buttons{grid-column:1/-1;grid-row:3}}

/* I5.0.3: integrated decision trainer, aligned hand captions. */
.dealer-zone > .hand-label,.player-zone > .hand-label{justify-content:center;text-align:center;max-width:none}
.player-zone > .hand-label{margin-top:3px}
.felt .trainer-panel{position:absolute;left:15px;bottom:43px;z-index:5;width:min(280px,46%);margin:0;padding:11px 12px;background:#10271fef;border:1px solid #b9a36c;border-radius:9px;box-shadow:0 9px 24px #071c13aa;color:#f4f0e4;font-size:11px;line-height:1.45}
.felt .trainer-heading{gap:7px;margin-bottom:8px;padding-bottom:7px;border-bottom:1px solid #5c745e}
.felt .trainer-heading strong{font-size:11px;color:#f2d58e}
.felt .trainer-heading span{font-size:9px;white-space:nowrap}
.felt .trainer-settings{display:flex;gap:6px;align-items:center;flex-wrap:wrap}
.felt .trainer-settings > label[for="trainerLevel"]{font-size:9px;color:#d9e4d8}
.felt .trainer-settings select{max-width:106px;min-width:0;font-size:10px;padding:5px 4px}
.felt .trainer-settings .btn{padding:6px 7px;font-size:10px}
.felt .trainer-auto{font-size:9px;gap:4px;white-space:nowrap}
.felt .trainer-auto input{width:13px;height:13px;margin:0}
.felt .trainer-feedback{border-top:1px solid #5c745e;margin-top:9px;padding-top:8px;font-size:10px;line-height:1.5;min-height:0}
@media(max-width:760px){.felt .trainer-panel{left:9px;bottom:38px;width:min(260px,52%);padding:9px}}
@media(max-width:600px){.felt .trainer-panel{position:relative;left:auto;bottom:auto;width:100%;margin:12px 0 0}.felt{overflow:visible}}

/* I5.0.4: running totals live in fixed headings, never alongside moving cards. */
.dealer-zone > .hand-label,.player-zone > .hand-label{gap:6px}
.fixed-running-total,.player-hand .hand-total{color:#f3d38b;font-family:var(--mono);font-size:10px;letter-spacing:.035em;white-space:nowrap}
.fixed-running-total:empty,.player-hand .hand-total:empty{display:none}
.player-hand .hand-label{gap:8px;justify-content:space-between}

/* I5.1: shared inset for left-hand instruments; keep split totals visible. */
.felt .trainer-panel,.felt .decision-warning{left:19px}
.player-hand .hand-total{display:inline!important}
.felt .explorer-panel{position:absolute;left:19px;bottom:43px;z-index:5;width:min(280px,46%);max-height:calc(100% - 60px);overflow:auto;margin:0;padding:11px 12px;background:#10271fef;border:1px solid #b9a36c;border-radius:9px;box-shadow:0 9px 24px #071c13aa;color:#f4f0e4;font-size:11px;line-height:1.45}
.explorer-panel[hidden]{display:none!important}.explorer-heading{display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid #5c745e;padding-bottom:7px;margin-bottom:8px;gap:8px}.explorer-heading strong{color:#f2d58e}.explorer-heading span{color:#a8bca9;font-size:8px;letter-spacing:.09em}
.explorer-fields{display:grid;grid-template-columns:1fr 1fr;gap:8px}.explorer-fields label{display:block;color:#d8e4d7;font-size:10px}.explorer-fields select{display:block;width:100%;margin-top:3px;padding:6px;background:#152c22;border:1px solid #65826b;border-radius:5px;color:#f4f0e4;font-size:11px}.explorer-buttons{display:flex;gap:5px;flex-wrap:wrap;margin-top:10px}.explorer-buttons .btn{font-size:9px;padding:6px 8px}.explorer-message{color:#b8cebd;font-size:9px;margin-top:9px}.explorer-error{color:#ffc1ad}
@media(max-width:760px){.felt .explorer-panel{left:13px;bottom:38px;width:min(260px,52%);padding:9px}}
@media(max-width:600px){.felt .explorer-panel{position:relative;left:auto;bottom:auto;width:100%;max-height:none;margin:12px 0 0}.felt{overflow:visible}}
/* I5.2: persistent decision-quality instrument above the referee. */
.felt .running-edge-panel{position:absolute;top:18px;left:19px;z-index:4;width:min(230px,39%);padding:11px 12px;background:#10271ff2;border:1px solid #b9a36c;border-radius:9px;box-shadow:0 9px 24px #071c13aa;color:#f4f0e4;font-size:11px;line-height:1.45}
.running-edge-heading{border-bottom:1px solid #5c745e;padding-bottom:6px;margin-bottom:7px}.running-edge-heading strong{color:#f2d58e;font-size:11px}.running-edge-sub,.running-edge-grid span,.running-edge-note{color:#aec5b2;font-size:9px}.running-edge-main{font-family:Georgia,serif;font-size:29px;color:#f2d58e;line-height:1.35;margin:2px 0 9px}.running-edge-grid{display:grid;grid-template-columns:1fr 1fr;gap:9px;border-top:1px solid #405c49;padding-top:8px}.running-edge-grid span,.running-edge-grid strong{display:block}.running-edge-grid strong{font-size:14px;margin-top:3px;font-weight:600}.running-edge-foot{display:flex;align-items:center;justify-content:space-between;gap:5px;margin-top:10px;color:#d2e0d2;font-size:9px}.running-edge-foot .btn{font-size:9px;padding:5px 8px}.running-edge-note{margin-top:8px;font-style:italic}
@media(max-width:760px){.felt .running-edge-panel{top:12px;left:13px;width:min(210px,41%);padding:9px}}
@media(max-width:600px){.felt .running-edge-panel{position:relative;top:auto;left:auto;width:100%;margin-bottom:12px}.felt .running-edge-main{font-size:24px}}

.felt .running-edge-panel{left:23px;top:22px}
.running-edge-panel[hidden]{display:none!important}
.running-edge-mistake{color:#f0b3a2;font-size:10px;margin-top:6px}
@media(max-width:760px){.felt .running-edge-panel{left:16px;top:15px}}
@media(max-width:600px){.felt .running-edge-panel{left:auto;top:auto}}

/* I5.2.2 — paired instruments, unobstructed dealer cards and compact cockpit. */
.edge-rule-notice{margin:0 0 9px;padding:9px 12px;border:1px solid #8f7950;border-radius:6px;background:#332c1e;color:#f1d995;font-size:11px}
.edge-rule-notice[hidden]{display:none!important}
.felt .running-edge-panel{top:auto;bottom:19px;left:19px;z-index:4;width:min(230px,39%)}
.felt .hand-analysis{bottom:19px;right:19px}
.felt .decision-warning{bottom:calc(19px + var(--edge-stack-height, 0px));}
.felt:has(.running-edge-panel:not([hidden])) .decision-warning{bottom:calc(19px + var(--edge-stack-height, 240px))}
.felt:has(.running-edge-panel:not([hidden])) .trainer-panel{bottom:calc(19px + var(--edge-stack-height, 240px))}
/* The referee is the decision warning; it stacks over Player Edge. */
.controls{display:grid;grid-template-columns:max-content minmax(0,1fr) max-content;column-gap:clamp(6px,.7vw,12px);align-items:start}
.controls .bet-control{grid-column:1;grid-row:1}
.controls .cockpit-modes{grid-column:2;grid-row:1;min-width:0;display:flex;flex-direction:column;gap:7px}
.controls .cockpit-top,.controls .cockpit-bottom{display:flex;gap:5px;align-items:center;min-width:0}
.controls .cockpit-top .btn{flex:1 1 0;min-width:0;padding:8px 5px;font-size:10px;white-space:nowrap}
.controls .cockpit-bottom #trainerBtn{min-width:76px;padding:7px 8px;font-size:10px}
.controls .cockpit-bottom .audio-settings{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:0}
.controls .cockpit-bottom .audio-option{font-size:9px;gap:3px;white-space:nowrap}
.controls .cockpit-bottom .audio-option input{width:12px;height:12px;margin:0}
.controls .action-buttons{grid-column:3;grid-row:1;display:flex;flex-wrap:nowrap;justify-content:flex-end;gap:4px;min-width:0}
.controls .action-buttons .btn{padding:10px 7px;font-size:10px;white-space:nowrap}
.controls .action-buttons .btn-primary{padding:10px 8px}
.controls .action-buttons .btn-primary span{padding-left:3px}
@media(max-width:1100px){.controls{grid-template-columns:max-content minmax(0,1fr);row-gap:10px}.controls .cockpit-modes{grid-column:2}.controls .action-buttons{grid-column:1/-1;grid-row:2;justify-content:flex-end;flex-wrap:wrap}}
@media(max-width:600px){.felt .running-edge-panel{position:relative;left:auto;bottom:auto;top:auto;width:100%;margin:12px 0}.felt .decision-warning,.felt .trainer-panel{position:relative;left:auto;bottom:auto!important;width:100%;margin:12px 0}.felt .hand-analysis{position:relative;right:auto;bottom:auto;width:100%;margin:12px 0}.controls{grid-template-columns:1fr}.controls .bet-control,.controls .cockpit-modes,.controls .action-buttons{grid-column:1;grid-row:auto}.controls .action-buttons{justify-content:flex-start}}

/* I5.2.4: compact, temporary rule-change confirmation. */
.edge-rule-notice{display:table;width:max-content;max-width:100%;box-sizing:border-box;margin:0 0 9px;padding:8px 12px;border-color:#748c6a;background:#152e25;color:#f2d58e;line-height:1.45;white-space:normal}
.edge-rule-notice[hidden]{display:none!important}

/* I5.2.5: Rule-change notice overlays the table heading instead of
   participating in document flow (prevents the page jumping). */
.table-panel{position:relative}
.table-panel .edge-rule-notice{
  position:absolute;
  z-index:30;
  top:108px;
  left:24px;
  margin:0;
  width:max-content;
  max-width:calc(100% - 48px);
  box-shadow:0 5px 16px rgba(0,0,0,.22);
}
@media(max-width:600px){.table-panel .edge-rule-notice{top:104px;left:14px;max-width:calc(100% - 28px)}}

/* I5.2.6: stable Player Edge height; reserve mistake space, remove technical footer. */
.running-edge-mistake{min-height:16px;line-height:16px;margin-top:6px;white-space:nowrap;font-size:9px}

/* I5.2.7: compact Laboratory-mode overlays and cockpit; full Table mode unchanged. */
.shell:not(.table-mode) .felt .running-edge-panel{width:min(174px,34%);padding:9px 9px;box-sizing:border-box}
.shell:not(.table-mode) .running-edge-grid{grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:5px}
.shell:not(.table-mode) .running-edge-grid > div{min-width:0;overflow-wrap:anywhere}
.shell:not(.table-mode) .running-edge-grid strong{font-size:12px}
.shell:not(.table-mode) .running-edge-foot{flex-wrap:wrap;gap:5px}
.shell:not(.table-mode) .running-edge-mistake{white-space:normal;min-height:16px;height:auto}
.shell:not(.table-mode) .felt .explorer-panel{width:min(210px,38%);padding:9px;box-sizing:border-box}
.shell:not(.table-mode) .explorer-fields{min-width:0}
.shell:not(.table-mode) .explorer-fields select{min-width:0;max-width:100%;width:100%;box-sizing:border-box}
.shell:not(.table-mode) .explorer-buttons{flex-wrap:wrap}
.shell:not(.table-mode) .controls .cockpit-top .btn{white-space:normal;overflow-wrap:normal;line-height:1.2;min-width:0}
@media(max-width:600px){
 .shell:not(.table-mode) .felt .running-edge-panel,
 .shell:not(.table-mode) .felt .explorer-panel{width:100%;max-width:none}
}

/* I5.2.8: keep the shared introduction stationary across view switches. */
body .table-mode .view-switch{margin-bottom:24px}

/* Responsive player hands: cards remain inside their hand outline at narrower widths.
   Preserve normal card dimensions where space permits; wrap rather than clip. */
.player-zone,.player-hands{min-width:0;max-width:100%}
.player-hands{width:100%;align-content:flex-start}
.player-hand{box-sizing:border-box;min-width:0;max-width:100%;width:fit-content}
.player-hand .cards{display:flex;flex-wrap:wrap;max-width:100%;min-width:0;gap:6px}
.player-hand .playing-card{box-sizing:border-box;flex:0 1 48px;min-width:35px;max-width:48px}
@media(max-width:760px){
 .player-hands{gap:7px}
 .player-hand{padding:5px}
 .player-hand .cards{gap:4px}
 .player-hand .playing-card{flex-basis:44px;max-width:44px;min-width:32px}
}
@media(max-width:390px){
 .player-hand .playing-card{flex-basis:39px;max-width:39px;min-width:30px}
}

/* I5.2.9 — casino felt, restrained responsive card geometry. */
.felt .table-center{position:relative;margin:2px auto 12px;max-width:480px;width:100%;height:104px;pointer-events:none}
.felt-arc{width:100%;height:100%;overflow:visible}
.felt-arc text{font-family:Georgia,serif;fill:#d9be7e;font-size:13px;letter-spacing:1.2px;font-weight:600}
.felt-arc text:nth-of-type(2),.felt-arc text:nth-of-type(3){font-size:10px;letter-spacing:.8px;font-weight:400}
.felt-arc tspan{fill:#f7d88c}
/* Shared card geometry: keep indices and corner marks within the card at every size. */
.playing-card,.player-hand .playing-card{position:relative;box-sizing:border-box;width:57px;height:83px;min-width:0;max-width:none;flex:0 0 57px;padding:0;overflow:hidden;display:block;line-height:1}
.playing-card .rank,.player-hand .playing-card .rank{position:absolute;top:7px;left:7px;font-size:17px;line-height:1.02}
.playing-card .center-suit,.player-hand .playing-card .center-suit{position:absolute;left:50%;top:52%;transform:translate(-50%,-50%);font-size:26px;line-height:1}
.playing-card .suit,.player-hand .playing-card .suit{position:absolute;right:7px;bottom:7px;font-size:17px;line-height:1}
.playing-card.back{padding:0}
.player-hand{padding:2px 3px;border:0;background:transparent;max-width:100%;min-width:0;width:auto}
.player-hand.active{border:0;background:transparent}
.player-hand .hand-label{justify-content:center;min-height:0}
.player-hand .hand-name:empty{display:none}
.player-hand .cards{gap:6px;flex-wrap:nowrap;min-height:83px;padding-top:0;max-width:100%;width:auto;justify-content:center}
.player-hands{justify-content:center;align-items:flex-start;gap:10px;min-height:95px;padding-top:0}
.player-zone{min-height:108px}
.dealer-zone>.hand-label,.player-zone>.hand-label{min-height:17px}
.dealer-zone>.cards{padding-top:3px;min-height:86px}
.empty-hand:empty{display:none}
/* Long hands retain normal-size cards, with overlap only when space is tight. */
.player-hand .cards:has(.playing-card:nth-child(5)) .playing-card{margin-right:-9px}
.player-hand .cards:has(.playing-card:nth-child(7)) .playing-card{margin-right:-17px}
.player-hand .cards .playing-card:last-child{margin-right:0}
@media(max-width:760px){
 .player-hand .playing-card{width:52px;height:76px;flex-basis:52px}
 .player-hand .cards{min-height:76px;gap:4px}
 .player-hand .playing-card .rank{top:6px;left:6px;font-size:16px}
 .player-hand .playing-card .suit{right:6px;bottom:6px;font-size:16px}
 .player-hand .playing-card .center-suit{font-size:24px}
}
@media(max-width:390px){
 .player-hand .playing-card{width:46px;height:69px;flex-basis:46px}
 .player-hand .cards{min-height:69px}
 .player-hand .playing-card .rank,.player-hand .playing-card .suit{font-size:14px}
}
/* Laboratory overlays: compact, with readable controls and no wasted labels. */
.shell:not(.table-mode) .felt .hand-analysis{width:min(182px,34%);padding:9px}
.shell:not(.table-mode) .felt .explorer-panel{width:min(188px,35%)}
.shell:not(.table-mode) .explorer-fields{gap:5px}
.shell:not(.table-mode) .explorer-fields select{padding:5px 2px;font-size:10px}
.explorer-heading span:empty{display:none}
.explorer-message:empty{display:none}
@media(max-width:600px){.shell:not(.table-mode) .felt .hand-analysis,.shell:not(.table-mode) .felt .explorer-panel{width:100%}}

/* I5.3.0: casino wagering additions. */
.felt .trainer-flag{display:none!important}
.betting-spot{position:relative;z-index:2;width:70px;height:70px;margin:4px auto 0;border:2px solid #d7bd7a99;border-radius:50%;display:flex;align-items:center;justify-content:center;flex-direction:column;color:#f2d89d;background:#0a342b55;pointer-events:none}
.betting-spot-caption{font:9px var(--mono);letter-spacing:.12em;opacity:.75}.betting-spot strong{font-size:19px;font-family:var(--display)}
.insurance-chip{position:absolute;top:8px;left:calc(100% + 8px);min-width:52px;padding:6px;border:2px dashed #e4d09d;border-radius:22px;background:#2b3d64;color:#fff;font-size:10px;white-space:nowrap}
.chip-rail{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin:13px 0 0;padding:8px 10px;border:1px solid #35463c;border-radius:9px;background:#14221b}
.chip-rail-label{font:10px var(--mono);color:#d6bf82;letter-spacing:.1em}.chip-rail-items{display:flex;gap:7px;flex-wrap:wrap}
.casino-chip{width:37px;height:37px;border-radius:50%;border:4px dashed #f4e7ca;box-shadow:0 2px 5px #0008,inset 0 0 0 2px #fff4;color:#fff;font-weight:700;font-size:11px;text-shadow:0 1px 2px #0008;transition:transform .12s}
.casino-chip:hover:not(:disabled){transform:translateY(-3px)}.casino-chip:disabled{opacity:.45;cursor:default}
.chip-1{background:#e9e7dc;color:#232b28;text-shadow:none}.chip-5{background:#b83838}.chip-10{background:#2e62ac}.chip-25{background:#24774d}.chip-100{background:#22272d}.chip-500{background:#7b4f9b}
.chip-rail #clearBet{font-size:10px;padding:6px 9px;margin-left:auto}
.insurance-offer[hidden]{display:none!important}.insurance-offer{position:absolute;z-index:20;top:43%;left:50%;transform:translate(-50%,-50%);display:flex;flex-direction:column;gap:10px;min-width:min(280px,85%);padding:20px;border:1px solid #d7bd7a;border-radius:12px;background:#14261f;color:#f6e9cb;box-shadow:0 12px 45px #000b;text-align:center}
.insurance-offer strong{font-family:var(--display);font-size:23px}.insurance-offer>div{display:flex;justify-content:center;gap:10px}
.table-panel{position:relative}
@media(max-width:760px){.chip-rail{gap:7px}.casino-chip{width:33px;height:33px}.betting-spot{width:59px;height:59px}}


/* I6.0.2: active split-hand pointer, deliberately independent of card animations. */
.player-hand{position:relative}
.live-hand-arrow{display:none;position:absolute;left:50%;top:-24px;transform:translateX(-50%);color:#f3d38b;font-size:19px;line-height:1;z-index:4;pointer-events:none;animation:live-hand-bounce .8s ease-in-out infinite alternate}
.player-hands:has(>.player-hand:nth-child(2)) .player-hand.active .live-hand-arrow{display:block}
@keyframes live-hand-bounce{from{translate:0 -4px}to{translate:0 4px}}
@media(prefers-reduced-motion:reduce){.live-hand-arrow{animation:none}}
.explorer-split-option{display:flex;align-items:center;gap:8px;margin:10px 0;color:#d6e2d7;font-size:11px}
.explorer-split-option input{accent-color:var(--gold)}

/* I6.0.16: optional thousand-value chip; wager chips use matching rack colours. */
.chip-1000{background:#c17b24;color:#fff;}

/* I6.0.19: independent split-hand exploration, compact controls. */
.explorer-hand-picker{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:3px;margin-bottom:8px}
.explorer-hand-picker[hidden]{display:none!important}
.explorer-hand-choice{min-width:0;padding:5px 1px;background:#152c22;color:#d6e2d7;border:1px solid #536f59;border-radius:5px;font-size:9px;white-space:nowrap}
.explorer-hand-choice.is-selected{background:#46564a;border-color:#e0c47b;color:#fff2c7}
.explorer-fields{grid-template-columns:repeat(2,minmax(0,1fr));gap:5px}
.explorer-fields label{min-width:0;font-size:9px}
.explorer-fields select{min-width:0;padding:5px 2px;font-size:10px}
.explorer-fields select:disabled{opacity:.65}
.player-hand.split-preview{min-width:0;flex:1 1 0;padding:4px 2px}
.player-hand.split-preview .cards{flex-wrap:nowrap;overflow:visible;min-height:77px;gap:0}
.player-hand.split-preview .playing-card{flex:0 0 42px;width:42px;margin-right:-12px}
.player-hand.split-preview .playing-card:last-child{margin-right:0}
.player-hands:has(>.player-hand.split-preview){gap:5px;flex-wrap:nowrap}
.player-hand.split-preview.active{border-color:#e2c47a;background:#fff1b40c}
@media(max-width:760px){.player-hand.split-preview .playing-card{flex-basis:35px;width:35px;margin-right:-16px}.player-hand.split-preview{padding:3px 1px}}


/* I6.0.20 — Reserve a hand-display lane to the RIGHT of the Explorer.
   The overlay itself is unchanged; normal gameplay and dealer layout are unchanged.
   Reserve exactly its responsive width, its left offset, and a small clear gap.
   The selector works in both Table and Laboratory layouts. */
@media (min-width: 601px) {
  .felt:has(> #explorerPanel:not([hidden])) .player-zone {
    margin-left: calc(min(280px, 46%) + 32px);
    width: auto;
    max-width: none;
  }
  .shell:not(.table-mode) .felt:has(> #explorerPanel:not([hidden])) .player-zone {
    margin-left: calc(min(188px, 35%) + 32px);
  }
  /* Distribute two-to-four independent hands within the clear lane, not
     across the entire felt. Their centres stay away from the Explorer. */
  .felt:has(> #explorerPanel:not([hidden])) .player-hands:has(>.split-preview) {
    display: flex;
    width: 100%;
    justify-content: space-evenly;
    flex-wrap: nowrap;
    gap: 3px;
  }
  .felt:has(> #explorerPanel:not([hidden])) .player-hands > .split-preview {
    min-width: 0;
    flex: 1 1 0;
    overflow: visible;
  }
  .felt:has(> #explorerPanel:not([hidden])) .player-hands > .split-preview .cards {
    justify-content: center;
  }
}
/* At phone width the Explorer is already in document flow (below the hand),
   so retaining the full width is preferable to forcing an extremely thin lane. */
@media (max-width: 600px) {
  .felt:has(> #explorerPanel:not([hidden])) .player-zone {
    margin-left: 0;
    width: 100%;
  }
}


/* I6.0.21 — Explorer/Rankings are stable instruments, not expanding accordions.
   Only the inner selector and ranking lists scroll; the table and cards do not move. */
.felt .explorer-panel:not([hidden]) {
  height: 296px;
  box-sizing: border-box;
  overflow: hidden;
}
.felt .explorer-panel .explorer-fields {
  height: 78px;
  min-height: 78px;
  overflow-y: auto;
  overflow-x: hidden;
  align-content: start;
  scrollbar-width: thin;
}
.felt .explorer-panel .explorer-buttons {
  min-height: 58px;
  align-content: flex-start;
}
.felt .explorer-panel .explorer-message:not(:empty) {
  max-height: 28px;
  overflow-y: auto;
}
.felt:has(> #explorerPanel:not([hidden])) .hand-analysis:not([hidden]) {
  height: 112px;
  box-sizing: border-box;
  overflow: hidden;
}
.felt:has(> #explorerPanel:not([hidden])) .hand-analysis #analysisResults {
  max-height: 71px;
  overflow-y: auto;
  scrollbar-width: thin;
}
.felt:has(> #explorerPanel:not([hidden])) .hand-analysis .analysis-note:empty {
  display: none;
}
@media (max-width: 600px) {
  .felt .explorer-panel:not([hidden]) {
    height: 296px;
    max-height: none;
  }
}


/* I6.0.22 — no inner scrollbars: give Explorer the available upper-left felt.
   Its footprint and the lower controls stay stable across 1–12 selectors. */
@media (min-width: 601px) {
  /* Do not force the felt taller when Explorer opens. */
  .felt .explorer-panel:not([hidden]) {
    top: 20px;
    bottom: 22px;
    height: auto;
    max-height: none;
    overflow: visible;
    display: block;
  }
  .felt .explorer-panel .explorer-fields {
    height: auto;
    min-height: 0;
    max-height: none;
    overflow: visible;
    grid-auto-rows: 34px;
    gap: 3px 5px;
    align-content: start;
  }
  .felt .explorer-panel .explorer-fields label {
    line-height: 11px;
    font-size: 9px;
    overflow: hidden;
  }
  .felt .explorer-panel .explorer-fields select {
    height: 21px;
    min-height: 21px;
    margin-top: 1px;
    padding: 1px 3px;
    line-height: 18px;
  }
  .felt .explorer-panel .explorer-hand-picker {
    height: 28px;
    margin-bottom: 5px;
  }
  .felt .explorer-panel .explorer-hand-picker[hidden] {
    display: grid!important;
    visibility: hidden;
    pointer-events: none;
  }
  .felt .explorer-panel .explorer-buttons {
    position: absolute;
    bottom: 57px;
    left: 12px;
    right: 12px;
    margin: 0;
    min-height: 0;
    max-height: 54px;
    align-content: end;
    gap: 4px;
  }
  .felt .explorer-panel .explorer-buttons .btn {
    padding: 5px 6px;
    font-size: 9px;
  }
  .felt .explorer-panel .explorer-footer {
    position: absolute;
    bottom: 13px;
    left: 12px;
    right: 12px;
    margin: 0;
    min-height: 22px;
  }
  .felt .explorer-panel .explorer-message { display: none; }
}

/* Five ranked EV actions fit in the same compact panel without scrolling. */
.felt:has(> #explorerPanel:not([hidden])) .hand-analysis:not([hidden]) {
  height: 108px;
  padding: 7px 10px;
  overflow: visible;
}
.felt:has(> #explorerPanel:not([hidden])) .hand-analysis .analysis-heading {
  margin-bottom: 3px;
  padding-bottom: 4px;
}
.felt:has(> #explorerPanel:not([hidden])) .hand-analysis #analysisResults {
  max-height: none;
  overflow: visible;
}
.felt:has(> #explorerPanel:not([hidden])) .hand-analysis .analysis-row {
  padding: 0;
  margin: 0;
  line-height: 14px;
  min-height: 14px;
  font-size: 10px;
}
.felt:has(> #explorerPanel:not([hidden])) .hand-analysis .analysis-note:empty { display: none; }

/* Long hypothetical split hands overlap progressively within each hand lane;
   do not resize the cards or allow a single hand to claim the whole row. */
.felt:has(> #explorerPanel:not([hidden])) .split-preview .cards:has(>.playing-card:nth-child(5)) .playing-card { margin-right: -23px; }
.felt:has(> #explorerPanel:not([hidden])) .split-preview .cards:has(>.playing-card:nth-child(7)) .playing-card { margin-right: -29px; }
.felt:has(> #explorerPanel:not([hidden])) .split-preview .cards .playing-card:last-child { margin-right: 0!important; }

/* Mobile: natural document flow, no inner scrollers; the whole page can scroll. */
@media (max-width: 600px) {
  .felt .explorer-panel:not([hidden]) {
    height: auto;
    min-height: 340px;
    max-height: none;
    overflow: visible;
  }
  .felt .explorer-panel .explorer-fields {
    height: auto;
    min-height: 0;
    max-height: none;
    overflow: visible;
    gap: 5px;
  }
  .felt .explorer-panel .explorer-buttons { min-height: 0; }
  .felt:has(> #explorerPanel:not([hidden])) .hand-analysis:not([hidden]) {
    height: auto;
    min-height: 112px;
  }
}


/* I6.0.23 — three compact selectors per row; keep Explorer inside the felt.
   With ten cards and the dealer this is only four rows, even in split mode. */
@media (min-width: 601px) {
  .felt .explorer-panel:not([hidden]) {
    top: 11px;
    bottom: 14px;
    height: auto;
    max-height: none;
    overflow: hidden;
    box-sizing: border-box;
  }
  .felt .explorer-panel .explorer-fields {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-auto-rows: 36px;
    gap: 4px 4px;
    align-content: start;
    height: auto;
    max-height: none;
    overflow: visible;
  }
  .felt .explorer-panel .explorer-fields label {
    min-width: 0;
    white-space: nowrap;
    font-size: 9px;
    line-height: 12px;
  }
  .felt .explorer-panel .explorer-fields select {
    width: 100%;
    min-width: 0;
    height: 23px;
    min-height: 23px;
    padding: 1px 3px;
    font-size: 10px;
    box-sizing: border-box;
  }
  /* The narrower Lab panel still fits three useful controls. */
  .shell:not(.table-mode) .felt .explorer-panel:not([hidden]) {
    width: min(240px, 41%);
  }
  .shell:not(.table-mode) .felt:has(> #explorerPanel:not([hidden])) .player-zone {
    margin-left: calc(min(240px, 41%) + 32px);
  }
}
/* The fallback phrase should fit on one line beside Basic strategy, without
   ever allowing the Rankings box to change dimensions. */
.felt:has(> #explorerPanel:not([hidden])) .hand-analysis .analysis-row {
  gap: 5px;
  font-size: 10px;
}
.felt:has(> #explorerPanel:not([hidden])) .hand-analysis .analysis-row span {
  white-space: nowrap;
}
@media (max-width: 600px) {
  .felt .explorer-panel .explorer-fields {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 5px 4px;
    overflow: visible;
  }
  .felt .explorer-panel .explorer-fields select { min-width: 0; width: 100%; }
}

/* I6.0.24 — lower Explorer into the felt instead of projecting above its
   curved upper-left edge.  The three-column selector area uses the available
   space above the anchored controls; no internal scrolling is introduced. */
@media (min-width: 601px) {
  .felt .explorer-panel:not([hidden]) {
    top: 68px;
    bottom: 19px;
    height: auto;
    max-height: none;
  }
  .felt .explorer-panel:not([hidden]) .explorer-fields {
    margin-top: 4px;
  }
}

.hand-analysis .analysis-row.analysis-waiting {
  display: block;
  white-space: normal;
  overflow-wrap: anywhere;
}

/* Running Edge report trial. Both views share the compact panel. */
.shell .felt .running-edge-panel {
  width: min(174px, 34%);
  padding: 9px;
  box-sizing: border-box;
}
.shell .running-edge-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 5px; }
.shell .running-edge-grid > div { min-width: 0; overflow-wrap: anywhere; }
.shell .running-edge-grid strong { font-size: 12px; }
.shell .running-edge-foot { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
#runningEdgeCount { grid-column: 1 / -1; }
#runningEdgeReset { grid-column: 1; grid-row: 2; justify-self: start; }
#runningEdgeResults { grid-column: 2; grid-row: 2; justify-self: end; }
.shell .running-edge-mistake { white-space: normal; min-height: 16px; height: auto; }
.edge-report {
  position: absolute;
  right: 19px;
  bottom: 19px;
  width: min(300px, 36%);
  max-height: calc(100% - 90px);
  overflow-y: auto;
  z-index: 8;
  padding: 14px;
  color: #f4f0e4;
  background: #10271ff5;
  border: 1px solid #b9a36c;
  border-radius: 9px;
  box-shadow: 0 9px 24px #071c13aa;
  font-size: 12px;
  scrollbar-width: thin;
}
.edge-report[hidden], .edge-report [hidden] { display: none !important; }
.edge-report-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; border-bottom: 1px solid #5c745e; padding-bottom: 8px; margin-bottom: 10px; }
.edge-report-heading strong { color: #f2d58e; }
.edge-report .btn { font-size: 10px; padding: 6px 8px; }
#edgeReportFigures { display: grid; grid-template-columns: 1fr auto; gap: 12px 8px; margin: 14px 0; }
#edgeReportFigures dt { color: #aec5b2; }
#edgeReportFigures dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.edge-report-note { font-size: 10px; color: #aec5b2; line-height: 1.5; }
.edge-report-note:empty { display: none; }
.edge-mistake { padding: 10px 0; border-bottom: 1px solid #405c49; }
.edge-mistake:first-child { padding-top: 0; }
.edge-mistake strong { color: #f2d58e; }
.edge-mistake p { margin: 4px 0; font-size: 11px; line-height: 1.5; }
@media (max-width: 600px) {
  .shell .felt .running-edge-panel { width: 100%; max-width: none; }
  .edge-report { position: relative; right: auto; bottom: auto; width: 100%; max-height: 360px; margin: 12px 0; }
}

.session-stats-toggle { display: flex; justify-content: flex-end; margin-top: 8px; }
.session-stats-panel { display: flex; flex-direction: column; }
.session-stats-panel .edge-report-heading, .session-stats-actions { flex-shrink: 0; }
.session-stats-content { min-height: 0; overflow-y: auto; scrollbar-width: thin; }
.session-stats-content > p { margin: 8px 0; color: #aec5b2; }
.session-stats-figures { display: grid; gap: 6px; margin: 4px 0 10px; }
.session-stats-figures > div { display: grid; grid-template-columns: minmax(0, 1fr) fit-content(65%); gap: 8px; }
.session-stats-figures dt { color: #aec5b2; }
.session-stats-figures dd { margin: 0; font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }
.session-stats-actions { display: flex; flex-wrap: wrap; gap: 5px; padding-top: 8px; }
@media (min-width: 601px) {
  .session-stats-panel { height: calc(100% - 85px); }
}
.session-stats-content { padding-inline-end: 5px; }
.session-stats-actions { margin-top: auto; }
#sessionStatsReset { margin-inline-start: auto; }
.session-stats-verdict { color: #f2d58e; font-size: 14px; }
.edge-mistake .session-stats-rules { margin: 0 0 8px; color: #aec5b2; }


/* Running Edge panel typography and spacing */
#runningEdgePanel {
  padding: 14px;
  font-size: 12px;
}

@media (min-width: 601px) {
  #runningEdgePanel {
    width: min(280px, 34%);
  }
}

#runningEdgePanel .running-edge-heading strong,
#runningEdgePanel .running-edge-sub,
#runningEdgePanel .running-edge-grid span,
#runningEdgePanel .running-edge-foot,
#runningEdgePanel .running-edge-foot .btn,
#runningEdgePanel .running-edge-mistake {
  font-size: 12px;
}

#runningEdgePanel .running-edge-grid {
  gap: 8px;
}

#runningEdgePanel .running-edge-grid strong {
  font-size: 15px;
}

#runningEdgePanel .running-edge-main {
  font-size: 32px;
}

/* Compact Running Edge and Session Stats in desktop Lab mode */

@media (min-width: 761px) {
  #mainShell:not(.table-mode) #runningEdgePanel {
    width: min(174px, 34%);
    padding: 9px;
    font-size: 11px;
  }

  #mainShell:not(.table-mode) #runningEdgePanel .running-edge-heading strong {
    font-size: 11px;
  }

  #mainShell:not(.table-mode) #runningEdgePanel .running-edge-main {
    font-size: 29px;
  }

  #mainShell:not(.table-mode) #runningEdgePanel .running-edge-grid strong {
    font-size: 12px;
  }

  #mainShell:not(.table-mode) #runningEdgePanel :is(
    .running-edge-sub, .running-edge-grid span, .running-edge-foot,
    .running-edge-foot .btn, .running-edge-mistake
  ) {
    font-size: 9px;
  }

  #mainShell:not(.table-mode) #sessionStatsPanel {
    width: min(240px, 29%);
    height: calc((100% - 85px) * 0.85);
    padding: 10px;
    font-size: 10px;
  }

  #mainShell:not(.table-mode) #sessionStatsPanel .btn {
    font-size: 9px;
    padding: 4px 6px;
  }

  #mainShell:not(.table-mode) #sessionStatsPanel .session-stats-figures {
    gap: 4px;
  }

  #mainShell:not(.table-mode) #sessionStatsPanel .session-stats-verdict {
    font-size: 11px;
  }
}


/* Narrow the desktop Table-mode Running Edge panel from the right. */
@media (min-width: 761px) {
  #mainShell.table-mode #runningEdgePanel {
    width: min(254px, 34%);
  }

  #mainShell.table-mode #runningEdgePanel .running-edge-grid {
    grid-template-columns: minmax(0, 1.16fr) minmax(0, 1fr);
  }
}

/* Close buttons match the Session Stats panel. */
#runningEdgePanel .running-edge-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.felt .table-panel-close {
  font-size: 10px;
  padding: 6px 8px;
}

.explorer-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 10px 0;
}

.explorer-footer .explorer-split-option {
  margin: 0;
}

/* House edge readout below the Lab rules. */
.rules-house-edge {
  margin-top: 18px;
}

@media (min-width: 1051px) {
  .shell:not(.table-mode) .workspace {
    grid-template-areas: "table rules";
    grid-template-rows: auto;
  }

  .shell:not(.table-mode) .workspace > .table-panel {
    align-self: stretch;
  }
}

@media (max-width: 1050px) {
  .shell:not(.table-mode) .workspace {
    grid-template-areas: "table" "rules";
    grid-template-rows: auto auto;
  }
}

/* Trainer controls and history. */
.trainer-close, .trainer-footer .btn {
  font-size: 10px;
  padding: 6px 8px;
}
.trainer-footer {
  display: flex;
  justify-content: flex-end;
  margin-top: 8px;
}
#trainerReport {
  display: flex;
  flex-direction: column;
  max-height: calc(100% - 60px);
}
#trainerReport[hidden] { display: none; }
#trainerReport .edge-report-heading,
#trainerReport .session-stats-actions { flex-shrink: 0; }
#trainerReport .session-stats-actions { margin-top: auto; }
#trainerReport .session-stats-content { overflow-y: auto; }

@media (min-width: 601px) {
  .shell.table-mode .felt #trainerPanel {
    width: min(350px, 43%);
    left: 19px;
    bottom: 19px;
    padding: 14px;
    font-size: 12px;
  }
  .table-mode #trainerPanel .trainer-heading strong,
  .table-mode #trainerPanel .trainer-settings label,
  .table-mode #trainerPanel .trainer-settings select,
  .table-mode #trainerPanel .trainer-feedback {
    font-size: 12px;
  }
  .table-mode #trainerPanel .trainer-settings .btn {
    font-size: 11px;
  }
  .shell.table-mode .felt #handAnalysis {
    width: min(306px, 43%);
    height: auto;
    max-height: calc(100% - 60px);
    overflow-y: auto;
    right: 19px;
    bottom: 19px;
    padding: 14px;
    font-size: 12px;
  }
  .table-mode #handAnalysis .analysis-row {
    font-size: 12px;
    padding-block: 6px;
  }
  .table-mode #handAnalysis .analysis-heading strong {
    font-size: 12px;
  }
}


/* PANEL SIZE CONTROLS — desktop and tablet (both builds).
   Trainer widths: Table 270px, Lab 240px.
   Details clearance: 110px; increase it to lower the panel's top.
   Lab Analyse width: 225px.
*/
@media (min-width: 601px) {
  .shell.table-mode .felt #trainerPanel {
    width: min(270px, 43%);
  }
  .shell:not(.table-mode) .felt #trainerPanel {
    width: min(240px, 43%);
    left: 19px;
    bottom: 19px;
  }
  .shell .felt #trainerReport {
    box-sizing: border-box;
    max-height: calc(100% - 110px);
  }
  .shell:not(.table-mode) .felt:where(:not(:has(> #explorerPanel:not([hidden])))) #handAnalysis {
    width: min(225px, 40%);
    height: auto;
    padding: 12px;
    font-size: 12px;
  }
  .shell:not(.table-mode) .felt:where(:not(:has(> #explorerPanel:not([hidden])))) #handAnalysis .analysis-heading strong {
    font-size: 12px;
  }
  .shell:not(.table-mode) .felt:where(:not(:has(> #explorerPanel:not([hidden])))) #handAnalysis .analysis-row {
    font-size: 12px;
    line-height: 17px;
    min-height: 17px;
    padding-block: 5px;
  }
}

/* Chameleon palette is set by chameleonColour in blackjack.js. */
#simulatorTableView.chameleon-felt {
  background: radial-gradient(ellipse at 50% 45%, var(--chameleon-colour), color-mix(in srgb, var(--chameleon-colour), black 35%));
}
.chameleon-toggle[aria-pressed="true"] {
  border-color: #e3c784;
  box-shadow: inset 0 0 0 1px #e3c784;
}

#queuedShoeNote { display: none !important; }
/* Reserve both shoe-only rows so changing Shuffling keeps the felt in place. */
.shoe-settings #cutCardControl[hidden] {
  display: block !important;
  visibility: hidden;
}
.shoe-settings #handAnalysisControl[hidden] {
  display: grid !important;
  visibility: hidden;
}
#handAnalysisControl { display: grid; justify-items: end; gap: 3px; margin-top: 4px; }

/* Hi-Lo readouts */
.count-toggle[hidden], .count-readout[hidden] { display: none !important; }
.session-stats-toggle .count-toggle { padding-inline: 9px; white-space: nowrap; }
.session-stats-toggle .count-toggle[aria-expanded="true"] { border-color: #e3c784; }
.count-readout {
  display: inline-grid;
  place-content: center;
  justify-items: center;
  gap: 2px;
  min-width: 100px;
  height: 55px;
  padding: 6px 9px;
  background: #10271ff5;
  color: #f4f0e4;
  border: 1px solid #b9a36c;
  border-radius: 9px;
  font-size: 10px;
}
.count-readout strong {
  color: #f2d58e;
  font-size: 20px;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
@media (min-width: 601px) {
  #simulatorTableView {
    --count-top: 68px;
    --count-clearance: calc(var(--count-top) + 65px);
  }
  #simulatorTableView > .count-readout {
    position: absolute;
    top: var(--count-top);
    z-index: 6;
  }
  #trueCountPanel { left: 19px; }
  #runningCountPanel { right: 19px; }
  #simulatorTableView:has(> #trueCountPanel:not([hidden])) > #explorerPanel {
    top: var(--count-clearance);
    overflow-y: auto;
  }
  #simulatorTableView:has(> #runningCountPanel:not([hidden])) > .edge-report {
    max-height: calc(100% - var(--count-clearance) - 19px);
  }
}
@media (max-width: 600px) {
  .count-readout { margin: 8px 8px 0 0; }
}
