/* Shared presentation only: never changes seat count, game state or bet controls.
 * Loaded last by legacy practice and street lessons. Keep the legacy nine-seat
 * anchors and the lesson six-seat anchors; unify their physical badge/card scale.
 */
html {
 --practice-seat-w:60px; --practice-seat-h:40px;
 --practice-card-w:36px; --practice-rail-radius:112px / 98px;
 --sr-bg:#dce3e5; --sr-ink:#253740; --sr-muted:#526772;
 --sr-felt-hi:#438b80; --sr-felt-mid:#33796f; --sr-felt-low:#28675f;
 --sr-rail:#435a60; --sr-accent:#286d60; --sr-surface:#eef3f4;
}
html[data-table-variant=blue] {
 --sr-bg:#dae5ee; --sr-ink:#263c50; --sr-muted:#506b81;
 --sr-felt-hi:#638dac; --sr-felt-mid:#4d789a; --sr-felt-low:#3d6587;
 --sr-rail:#4b6179; --sr-accent:#365f83; --sr-surface:#edf3f8;
}
html[data-pg-theme=dark] {--sr-bg:#35434d;--sr-ink:#edf3f5;--sr-muted:#c1d0d6;--sr-surface:#41535e}
html[data-pg-theme=dark][data-table-variant=blue] {--sr-bg:#3c4e60;--sr-ink:#f0f5fa;--sr-muted:#cad8e5;--sr-surface:#485e73}

/* Existing street layout consumes the same dimensions without changing anchors. */
html body.street-table-mode .sr-seat,
html body.street-table-mode .sr-seat.is-hero,
html body.street-table-mode .sr-seat.is-folded {
 width:var(--practice-seat-w);min-width:var(--practice-seat-w);max-width:var(--practice-seat-w);
 height:var(--practice-seat-h);min-height:var(--practice-seat-h);
}
html body.street-table-mode #lessonBoard,
html body.street-table-mode #lessonHand {--deck-w:var(--practice-card-w)!important}

/* Scope to an active legacy exercise: the lobby and PR #4 home are untouched. */
html[data-pg-theme] body.ac-training.training-game.table-focus {
 --pr-bg:var(--sr-bg);--pr-panel:var(--sr-surface);--pr-raised:var(--sr-surface);
 --pr-text:var(--sr-ink);--pr-muted:var(--sr-muted);--pr-line:#8fa9b5;
 background:var(--sr-bg)!important;color:var(--sr-ink)!important;
}
html body.ac-training.training-game.table-focus .training-page,
html body.ac-training.training-game.table-focus .ht-room.is-playing,
html body.ac-training.training-game.table-focus .ht-console {background:transparent!important;color:var(--sr-ink)!important}
html body.ac-training.training-game.table-focus .ht-room #tableSurface {
 --deck-w:var(--practice-card-w);border:0;background:none;box-shadow:none;
 width:calc(100% - 76px);max-width:584px;height:362px;min-height:362px;
 margin:30px auto 45px;border-radius:var(--practice-rail-radius);
}
html body.ac-training.training-game.table-focus #tableSurface .ht-rail {
 inset:0;border:8px solid var(--sr-rail);border-radius:var(--practice-rail-radius);
 background:radial-gradient(ellipse at 48% 28%,var(--sr-felt-hi),var(--sr-felt-mid) 55%,var(--sr-felt-low));
 box-shadow:0 0 0 1px #a3b7c077,inset 0 0 0 2px #bbd6cc45,inset 0 6px 13px #153b3c26,0 12px 22px #152c3c2b;
}
html body.ac-training.training-game.table-focus #tableSurface .ht-rail:after {inset:8px;border:1px solid #c2d9d24a;border-radius:96px / 82px;background:none}
html body.ac-training.training-game.table-focus #tableSurface :is(.ring-seat,.ht-villain,.ht-seat) {
 box-sizing:border-box;width:var(--practice-seat-w);min-width:var(--practice-seat-w);max-width:var(--practice-seat-w);
 height:var(--practice-seat-h);min-height:var(--practice-seat-h);padding:4px 6px;
 display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1px;
 border-radius:7px;background:rgba(21,39,48,.88);color:#f1f6f6;border:1px solid #d5e8ed35;
 box-shadow:0 2px 6px #09252f26;line-height:1.25;opacity:1;
}
/* Preserve replay visibility: the duplicate player seats must never appear live. */
html body.ac-training.training-game.table-focus #tableSurface .ring-seat.is-player {display:none}
html body.ac-training.training-game.table-focus .ring-replaying #tableSurface .ring-seat.is-player {display:flex}
html body.ac-training.training-game.table-focus #tableSurface .ring-seat.is-folded {background:rgba(24,42,51,.72);border-color:#d5e8ed20;box-shadow:none}
html body.ac-training.training-game.table-focus #tableSurface :is(.ht-seat span,.ht-villain>span:first-child,.ring-seat strong) {font-size:10px;line-height:1.25;font-weight:500;color:#c7d9dc;white-space:nowrap}
html body.ac-training.training-game.table-focus #tableSurface :is(.ht-seat strong,.ht-villain>strong,.ring-seat>span) {font-size:12px;line-height:1.25;color:#f1f6f6;white-space:nowrap}
html body.ac-training.training-game.table-focus #tableSurface .ht-hero {
 width:var(--practice-seat-w);height:var(--practice-seat-h);min-width:0;
 transform:translate(-50%,-50%);display:block;
}
html body.ac-training.training-game.table-focus #tableSurface .ht-hero .ht-seat {border-color:#8bc5b3;background:rgba(22,43,49,.94)}
html body.ac-training.training-game.table-focus #tableSurface .ht-seat:after {display:none}
html body.ac-training.training-game.table-focus #tableSurface .ht-hero .ht-cards {position:absolute;left:50%;bottom:calc(100% + 7px);transform:translateX(-50%);width:max-content;margin:0}
html body.ac-training.training-game.table-focus #tableSurface .ht-action-tag {position:absolute;top:calc(100% + 4px);left:50%;transform:translateX(-50%);font-size:9px;line-height:1.2;color:#e4f1ef;background:#203840ed;border-radius:5px;padding:3px 6px;z-index:9}
html body.ac-training.training-game.table-focus #tableSurface .ht-action-tag:empty {display:none}
html body.ac-training.training-game.table-focus #tableSurface .ht-villain {translate:none}
html body.ac-training.training-game.table-focus #tableSurface :is(#heroCards,#tableBoard) {--deck-w:var(--practice-card-w)!important;gap:4px!important}
html body.ac-training.training-game.table-focus #tableSurface :is(#heroCards,#tableBoard) .pg-deck-card {transform:none!important;rotate:none!important;margin:0!important;box-shadow:0 2px 4px #10261b33!important}
html body.ac-training.training-game.table-focus #tableSurface .ht-center {left:50%;top:47%;position:absolute;transform:translate(-50%,-50%);width:max-content;max-width:90%}
html body.ac-training.training-game.table-focus #tableSurface .ht-center>strong {background:#173f44e6;border-color:#b9d2d555;font-size:13px;color:#f1f5ef}
html body.ac-training.training-game.table-focus :is(.ht-heading,.ring-replay-bar,.ht-game-meta,.table-brief,.table-study,.table-decision-context,#tableStatus) {color:var(--sr-ink)!important}
html body.ac-training.training-game.table-focus .ht-sizing,
html body.ac-training.training-game.table-focus .table-bet-options>summary {background:var(--sr-surface)!important;color:var(--sr-ink)!important;border-color:#8fa9b5}
html body.ac-training.training-game.table-focus .ht-actions button {min-height:48px}
html body.ac-training.training-game.table-focus #replaySkip {background:var(--sr-accent);color:#fff}
@media(max-width:600px) {
 html {--practice-card-w:32px;--practice-rail-radius:88px / 94px}
 html body.ac-training.training-game.table-focus .ht-room #tableSurface {width:calc(100% - 60px);max-width:none;height:344px;min-height:344px;margin:30px auto 40px}
 html body.ac-training.training-game.table-focus #tableSurface .ht-rail {border-width:7px}
 html body.ac-training.training-game.table-focus #tableSurface .ht-rail:after {inset:7px;border-radius:74px / 80px}
 html body.ac-training.training-game.table-focus .table-brief-label {color:var(--sr-ink)!important}
}
@media(max-width:600px) and (max-height:750px) {html{--practice-card-w:30px}}
@media(prefers-reduced-motion:reduce) {html body.table-focus #tableSurface * {animation:none!important;transition:none!important}}
/* Turn indication must survive the shared neutral badge palette. */
html body.ac-training.training-game.table-focus #tableSurface .ring-seat.is-acting,
html body.ac-training.training-game.table-focus #tableSurface[data-turn=hero] .ht-seat,
html body.ac-training.training-game.table-focus #tableSurface[data-turn=villain] .ht-villain {border-color:#8bc5b3;box-shadow:0 0 0 2px #99cdb95c,0 2px 6px #09252f26}
/* Keep hero offsets aligned with the existing wager collision model: unlike
 * villainCards, heroCards must not acquire a centering transform. */
html body.ac-training.training-game.table-focus #tableSurface .ht-hero .ht-cards {left:calc(50% - var(--practice-card-w) - 2px);transform:none}
/* Legacy children used fixed white text; inherit the shared light/dark ink. */
html body.ac-training.training-game.table-focus :is(#activeTopicLabel,#replayStatus,.ht-game-meta strong,.table-decision-context dd,.table-study summary strong) {color:var(--sr-ink)!important}
html body.ac-training.training-game.table-focus :is(.table-decision-context dt,.ht-size-entry label,.ht-size-entry>span,#tableSizeValue,.table-sizing-help,.table-study summary small) {color:var(--sr-muted)!important}
html body.ac-training.training-game.table-focus .ht-heading button {background:var(--sr-surface)!important;color:var(--sr-ink)!important;border-color:#8fa9b5}
html body.ac-training.training-game.table-focus #tableMission {color:var(--sr-ink)!important;background:var(--sr-surface)!important;border-color:#8fa9b5!important;opacity:1}
html body.ac-training.training-game.table-focus #tableTurn {color:var(--sr-muted)!important;opacity:1}
