/* Practice-only dark palette. Black room with separated table and control surfaces. */
html[data-pg-theme=dark] body.ac-training,
html[data-pg-theme=dark] body.practice-route{
 --pr-bg:#000000;--pr-panel:#111111;--pr-raised:#1c1c1c;--pr-art:#080808;
 --pr-line:#2b2b2b;--pr-text:#f5f5f5;--pr-muted:#bcbcbc;--pr-accent:#c5aafa;
 --ac-bg:var(--pr-bg);--ac-surface:var(--pr-panel);--ac-raised:var(--pr-raised);
 --ac-line:var(--pr-line);--ac-text:var(--pr-text);--ac-muted:var(--pr-muted);
 background:var(--pr-bg)!important;color:var(--pr-text)!important;color-scheme:dark;
}
/* Lobby: black page, near-black cards, readable labels in every tab. */
html[data-pg-theme=dark] body.ac-training>.pg-site-header{background:#000000!important;border-bottom:1px solid #252525!important;color:var(--pr-text)}
html[data-pg-theme=dark] body.ac-training .training-page{background:var(--pr-bg)}
html[data-pg-theme=dark] body.ac-training .practice-intro h1{color:var(--pr-text)}
html[data-pg-theme=dark] body.ac-training .practice-tabs{background:#111;border-color:#292929}
html[data-pg-theme=dark] body.ac-training .practice-tabs button{color:#dedede}
html[data-pg-theme=dark] body.ac-training .practice-tabs button[aria-pressed=true]{background:#f1f1f1;color:#111;box-shadow:none}
html[data-pg-theme=dark] body.ac-training .practice-stage-nav a{background:transparent;border-color:#333;color:#ddd}
html[data-pg-theme=dark] body.ac-training .curr-unit{background:var(--pr-panel);border-color:#2b2b2b;box-shadow:0 3px 9px #00000010}
html[data-pg-theme=dark] body.ac-training .browse-unit .curr-art{background:var(--pr-art)}
html[data-pg-theme=dark] body.ac-training .browse-unit .curr-unit-copy{background:var(--pr-panel);border-top:1px solid #242424}
html[data-pg-theme=dark] body.ac-training .curr-unit-copy strong{color:#f5f5f5}
html[data-pg-theme=dark] body.ac-training .curr-unit-copy small,
html[data-pg-theme=dark] body.ac-training .toc-action{color:#bcbcbc}
html[data-pg-theme=dark] body.ac-training .browse-unit .toc-number{color:#aaa}
html[data-pg-theme=dark] body.ac-training .curr-progress{background:#2b2b2b}
html[data-pg-theme=dark] body.ac-training .curr-progress::-webkit-progress-bar{background:#2b2b2b}
html[data-pg-theme=dark] body.ac-training .curr-progress::-webkit-progress-value{background:#bba0f3}
html[data-pg-theme=dark] body.ac-training .curr-progress::-moz-progress-bar{background:#bba0f3}
html[data-pg-theme=dark] body.ac-training .practice-resume a{background:#111;border:1px solid #333}
html[data-pg-theme=dark] body.ac-training .practice-resume span{color:#d1d1d1}
html[data-pg-theme=dark] body.ac-training .saved-drill{background:#111111;border-color:#2b2b2b}
html[data-pg-theme=dark] body.ac-training .saved-drill small{color:#c5aafa}
html[data-pg-theme=dark] body.ac-training .practice-empty{background:#111111;border-color:#555555;color:#d1d1d1}
html[data-pg-theme=dark] body.ac-training .practice-account{color:#bcbcbc}
html[data-pg-theme=dark] body.ac-training .curr-play{background:#bda2f2;color:#241b35!important}
html[data-pg-theme=dark] body.ac-training>.pg-bottom-nav.pg-bottom-nav{background:rgba(15,15,15,.96)!important;border-color:#737a854d!important;box-shadow:0 4px 20px #0004!important}
html[data-pg-theme=dark] body.ac-training>.pg-bottom-nav.pg-bottom-nav>a{color:#d4d8df!important}

/* Black table room with distinct seat plates and semantic action colors. */
html[data-pg-theme=dark] body.ac-training.table-focus .ht-room.is-playing{background:#000000;color:#f5f5f5}
html[data-pg-theme=dark] body.ac-training.table-focus .ht-heading{border-color:#2b2b2b}
html[data-pg-theme=dark] body.ac-training.table-focus .ht-heading button{background:#202020;border-color:#666e79;color:#f3f4f6}
html[data-pg-theme=dark] body.ac-training.table-focus .ring-replay-bar strong{color:#c8cdd4}
html[data-pg-theme=dark] body.ac-training.table-focus .ht-game-meta{color:#bac0c9}
html[data-pg-theme=dark] body.ac-training.table-focus .ht-game-meta strong{color:#e2e5ea}
html[data-pg-theme=dark] body.ac-training.table-focus .ht-rail{border-color:#41484b;background:radial-gradient(ellipse at 50% 35%,#448365,#2e634c 72%,#285a43);box-shadow:0 0 0 2px #202426,0 0 0 4px #717879,0 8px 18px #0003,inset 0 0 0 1px #a2c5ae40}
html[data-pg-theme=dark] body.ac-training.table-focus .ht-seat,
html[data-pg-theme=dark] body.ac-training.table-focus .ht-room .ht-villain{background:#222222;border-color:#7d8792;box-shadow:0 3px 6px #0003}
html[data-pg-theme=dark] body.ac-training.table-focus .ht-seat span,
html[data-pg-theme=dark] body.ac-training.table-focus .ht-villain>span:first-child{color:#d6dce3}
html[data-pg-theme=dark] body.ac-training.table-focus .ring-seat{background:#202020;border-color:#75808c;color:#edf0f4;opacity:1}
html[data-pg-theme=dark] body.ac-training.table-focus .ring-seat>span{color:#cbd2dc}
html[data-pg-theme=dark] body.ac-training.table-focus .ring-seat.is-folded{opacity:.48}
html[data-pg-theme=dark] body.ac-training.table-focus .ht-table[data-phase=decision] .ht-seat{background:#26212d;border-color:#c9a4f0;box-shadow:0 0 0 2px #c9a4f033}
html[data-pg-theme=dark] body.ac-training.table-focus .ht-sizing{background:#181818;border-color:#5c6570}
html[data-pg-theme=dark] body.ac-training.table-focus .ht-sizing button{background:#262626;border-color:#79838f;color:#f5f6f8}
html[data-pg-theme=dark] body.ac-training.table-focus .ht-size-entry,
html[data-pg-theme=dark] body.ac-training.table-focus .ht-size-entry output{color:#ced4dc}
html[data-pg-theme=dark] body.ac-training.table-focus .ht-size-entry input{background:#101010;border-color:#828b96;color:#fff}
html[data-pg-theme=dark] body.ac-training.table-focus .ht-actions #tableFold{background:#292929;border-color:#7e8996;color:#fff}
html[data-pg-theme=dark] body.ac-training.table-focus .ht-actions #tableCall{background:#36754f;border-color:#71ac86;color:#fff}
html[data-pg-theme=dark] body.ac-training.table-focus .ht-actions #tableRaise{background:#b74453;border-color:#df8490;color:#fff}
html[data-pg-theme=dark] body.ac-training.table-focus .ht-actions button:disabled{opacity:.45}
html[data-pg-theme=dark] body.ac-training.table-focus .table-turn{color:#c6cdd5}
html[data-pg-theme=dark] body.ac-training.table-focus .table-turn[data-phase=decision]{color:#c9a4f0}
/* Dialogs remain visibly above the table, without blacking out the entire room. */
html[data-pg-theme=dark] body.ac-training .game-options,
html[data-pg-theme=dark] body.ac-training .table-panel{background:#131313;color:#f5f5f5;border-color:#7a828d;box-shadow:0 0 0 100vmax #14171a8c,0 14px 40px #0004}
html[data-pg-theme=dark] body.ac-training .game-options .pt-hands button{background:#262626;border-color:#75808d;color:#f3f5f8;box-shadow:0 2px #262c31}
html[data-pg-theme=dark] body.ac-training .game-options .pt-hands button[aria-pressed=true]{background:#c9a4f0;border-color:#e5cff9;color:#241c30}
html[data-pg-theme=dark] body.ac-training .game-options .pt-family-head strong,
html[data-pg-theme=dark] body.ac-training .game-options .pt-family-head button,
html[data-pg-theme=dark] body.ac-training .game-options #rangeBuilder>p,
html[data-pg-theme=dark] body.ac-training .game-options>small,
html[data-pg-theme=dark] body.ac-training .game-speed>strong{color:#cdd3db}
html[data-pg-theme=dark] body.ac-training .game-speed button{background:#262626;border-color:#75808b;color:#f1f3f5}
html[data-pg-theme=dark] body.ac-training .game-speed button[aria-pressed=true]{background:#c9a4f0;color:#241c30}
/* Range-building and concept lessons share the same practice surfaces. */
html[data-pg-theme=dark] body.practice-route .spot-setup{background:#111111;border-color:#59616a}
html[data-pg-theme=dark] body.practice-route .format-buttons button,
html[data-pg-theme=dark] body.practice-route .stack-buttons button{background:#222222;border-color:#6e7884;color:#f1f3f6}
html[data-pg-theme=dark] body.practice-route .format-buttons button[aria-pressed=true],
html[data-pg-theme=dark] body.practice-route .stack-buttons button[aria-pressed=true]{background:#c9a4f0;border-color:#c9a4f0;color:#241c30}
html[data-pg-theme=dark] body.practice-route #positionButtons button{background:#262626;color:#f1f4f6;border-color:#7f8a96}
html[data-pg-theme=dark] body.practice-route #positionButtons button[aria-pressed=true]{background:#c9a4f0;color:#241c30;border-color:#e7d4fb}
html[data-pg-theme=dark] body.practice-route .open-matrix button{background:#3b4149;color:#e4e8ed;border-color:#626e7a}
html[data-pg-theme=dark] body.practice-route .open-matrix button.pair{background:#565163}
html[data-pg-theme=dark] body.practice-route .open-matrix button.suited{background:#454254}
html[data-pg-theme=dark] body.practice-route .range-spot{background:#171717;color:#dedede}
html[data-pg-theme=dark] body.practice-route .range-build-head p,
html[data-pg-theme=dark] body.practice-route .range-disclaimer,
html[data-pg-theme=dark] body.practice-route .range-shell>header>span,
html[data-pg-theme=dark] body.practice-route .stack-heading span{color:#bcbcbc}
html[data-pg-theme=dark] body.practice-route .range-tools button,
html[data-pg-theme=dark] body.practice-route .drill-top button,
html[data-pg-theme=dark] body.practice-route .lesson-shell>header>button{background:#222222;border-color:#727d88;color:#f0f3f6}
html[data-pg-theme=dark] body.practice-route #rangeSave{background:#333333;color:#fff}
html[data-pg-theme=dark] body.practice-route .drill-actions button{background:#333333;color:#fff}
html[data-pg-theme=dark] body.practice-route #drillOpen{background:#b74453;color:#fff}
html[data-pg-theme=dark] body.practice-route .lesson-choice{background:#202020;border-color:#69747f;color:#f4f5f6;box-shadow:0 2px #242a2f}
html[data-pg-theme=dark] body.practice-route .lesson-choice.correct{background:#34563f;border-color:#9acbaa;color:#f0f9f1}
html[data-pg-theme=dark] body.practice-route .lesson-choice.wrong{background:#65413f;border-color:#dc9b8f;color:#fff0ec}
html[data-pg-theme=dark] body.practice-route #lessonFeedback,
html[data-pg-theme=dark] body.practice-route #lessonGuide{background:#181818;color:#f1f1f1;border-color:#a186bd}
html[data-pg-theme=dark] body.practice-route .lesson-scenario ol,
html[data-pg-theme=dark] body.practice-route .lesson-top,
html[data-pg-theme=dark] body.practice-route #lessonResultText,
html[data-pg-theme=dark] body.practice-route .lesson-footnote,
html[data-pg-theme=dark] body.practice-route #lessonGuide>p,
html[data-pg-theme=dark] body.practice-route #lessonSaveStatus{color:#c4cad0}
html[data-pg-theme=dark] body.practice-route #lessonReview article{background:#151515;border-color:#606b76}
@media(hover:hover){
 html[data-pg-theme=dark] body.ac-training .curr-unit:hover,
 html[data-pg-theme=dark] body.ac-training .saved-drill:hover{border-color:#666}
 html[data-pg-theme=dark] body.practice-route .lesson-choice:hover:not(:disabled){background:#262626;border-color:#c9a4f0}
}
html[data-pg-theme=dark] body.ac-training :is(.practice-tabs button,.practice-stage-nav a,.curr-unit-summary,.saved-drill):focus-visible,
html[data-pg-theme=dark] body.practice-route :is(button,a):focus-visible{outline:3px solid #c9a4f0;outline-offset:3px}
/* Shared menus and the optional lower practice sections follow the same palette. */
html[data-pg-theme=dark] body.ac-training .accountpop{background:#151515!important;border-color:#68727d!important;color:#f2f4f7!important;box-shadow:0 12px 32px #0005!important}
html[data-pg-theme=dark] body.ac-training .accountpop a{color:#e4e8ee!important}
html[data-pg-theme=dark] body.ac-training .curr-unit-copy small{color:#bcbcbc!important}
html[data-pg-theme=dark] body.ac-training .browse-unit .toc-number{color:#aaa!important}
html[data-pg-theme=dark] body.ac-training .ct-character-card,
html[data-pg-theme=dark] body.ac-training .ct-stage,
html[data-pg-theme=dark] body.ac-training .ct-empty{background:#111111;border-color:#2b2b2b}
html[data-pg-theme=dark] body.ac-training .ct-shell button,
html[data-pg-theme=dark] body.ac-training .ct-feedback{background:#222222;color:#f1f3f6;border-color:#737d89}
html[data-pg-theme=dark] body.ac-training .ct-lesson-actions button:not(:disabled){background:#7652b9;border-color:#b59ae8}
html[data-pg-theme=dark] body.ac-training .ct-lesson,
html[data-pg-theme=dark] body.ac-training .ct-history-item,
html[data-pg-theme=dark] body.ac-training .chapter-free{border-color:#2b2b2b}
html[data-pg-theme=dark] body.ac-training .tr-mode{background:#151515;color:#f3f3f3;border:1px solid #333333}
html[data-pg-theme=dark] body.ac-training .tr-quiz{background:#151515;border-color:#76678a}
html[data-pg-theme=dark] body.ac-training .tr-review{background:#151515;border-color:#657380}

body.ac-training .practice-intro{margin:0 0 14px;gap:10px}
body.ac-training .practice-intro .practice-tabs{padding:3px;border-radius:10px}
body.ac-training .practice-intro .practice-tabs button{min-height:40px;padding:10px 13px;border-radius:7px}
body.ac-training .practice-stage-nav{margin-bottom:14px}
body.ac-training .practice-stage-nav a{min-height:36px;display:inline-flex;align-items:center;justify-content:center;padding:7px 15px;box-sizing:border-box}
body.ac-training .browse-unit{border-radius:14px;box-shadow:none}
body.ac-training .browse-unit .curr-unit-copy{padding:14px 18px 17px}
body.ac-training .browse-unit .curr-unit-copy strong{margin-top:4px;font-size:19px;line-height:1.35;letter-spacing:-.55px}
body.ac-training .browse-unit .toc-state{margin:7px 0 12px;font-size:11px}
body.ac-training .browse-unit .curr-progress{height:3px}
html:not([data-pg-theme=dark]) body.ac-training .browse-unit .curr-art{background:#fff}
html:not([data-pg-theme=dark]) body.ac-training .practice-tabs button[aria-pressed=true]{background:#202020;color:#fff}
body.ac-training .practice-resume a{min-height:44px;box-sizing:border-box}
body.ac-training .practice-resume a:focus-visible,body.ac-training .saved-drill:focus-visible{outline:2px solid #b99ae9;outline-offset:3px}
@media(max-width:600px){body.ac-training .training-page{padding-top:12px!important}body.ac-training .browse-unit .curr-art{aspect-ratio:1.95}body.ac-training .browse-unit .curr-unit-copy{padding:13px 16px 16px}body.ac-training .practice-browse .curr-path{gap:16px}}
@media(max-width:360px){body.ac-training .practice-intro .practice-tabs button{padding:9px 8px;font-size:11px}}
@media(prefers-reduced-motion:reduce){body.ac-training .curr-unit,body.ac-training .curr-unit-summary{transition:none;transform:none!important}}

/* Compact lobby controls: one view row, one street row, no repeated heading. */
html body.ac-training:not(.table-focus) .training-page{padding-top:10px!important}
body.ac-training .practice-intro{gap:12px;margin:0 0 8px;min-height:40px}
body.ac-training .practice-intro h1{font-size:22px!important;margin:0!important}
body.ac-training .practice-intro .practice-tabs{margin:0;padding:2px;border-radius:9px;gap:2px}
body.ac-training .practice-intro .practice-tabs button{min-height:36px;padding:7px 11px;font-size:12px;line-height:1.3;border-radius:6px}
body.ac-training .practice-browse .practice-stage-nav{display:flex;align-items:center;gap:6px;border-bottom:1px solid var(--ac-line);padding:0 0 7px;margin:0 0 12px}
body.ac-training .practice-stage-nav button{display:inline-flex;align-items:center;justify-content:center;min-height:36px;padding:6px 14px;border:0;border-radius:7px;background:transparent;color:var(--ac-muted);font:650 12px system-ui;cursor:pointer}
body.ac-training .practice-stage-nav button[aria-pressed=true]{background:#202020;color:#fff}
html[data-pg-theme=dark] body.ac-training .practice-stage-nav button[aria-pressed=true]{background:#f1f1f1;color:#111}
body.ac-training .practice-stage-nav button:focus-visible{outline:2px solid #a78ad1;outline-offset:2px}
body.ac-training .practice-browse .curr-stage>.toc-heading{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;margin:0!important}
body.ac-training .practice-resume a{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:9px;min-height:44px;padding:8px 11px;margin:0 0 8px;border-radius:8px}
body.ac-training .practice-resume small{grid-column:auto;font-size:9px;white-space:nowrap;color:var(--ac-muted)}
body.ac-training .practice-resume strong{font-size:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
body.ac-training .practice-resume span{font-size:10px;white-space:nowrap}
body.ac-training .practice-browse .curr-stage{margin-bottom:14px}
@media(max-width:600px){body.ac-training:not(.table-focus)>.pg-site-header{min-height:56px;height:56px}body.ac-training .practice-intro{gap:8px}body.ac-training .practice-intro .practice-tabs button{font-size:11px;padding:8px 10px}body.ac-training .practice-browse .curr-path{gap:12px}body.ac-training .browse-unit .curr-unit-copy{padding:11px 15px 13px}body.ac-training .browse-unit .curr-unit-copy strong{font-size:18px}body.ac-training .browse-unit .toc-state{margin:5px 0 9px}}
@media(max-width:360px){body.ac-training .practice-intro h1{font-size:20px!important}body.ac-training .practice-intro .practice-tabs button{padding:8px;font-size:10px}body.ac-training .practice-resume small{font-size:8px}}
