
body.academy-home-view #academyHomeLanding{display:none!important}
body .stage1n-studio:not([hidden]){display:flex!important;flex-direction:column;gap:10px;margin:0 0 12px;background:#fff;border:1px solid #d9e5f1;padding:12px;border-radius:18px;box-shadow:0 3px 10px #20375612}
body .stage1n-studio[hidden]{display:none!important}
.stage1n-heading{display:flex;align-items:center;justify-content:space-between;gap:7px;color:#274567}.stage1n-heading strong{font-size:16px}.stage1n-heading small{font-size:10px;color:#637b91}
.stage1n-engine-choices{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}.stage1n-studio button{cursor:pointer;border:1px solid #c6d7e7;background:#fff;border-radius:9px;padding:7px 8px;color:#274568;font-size:12px;font-weight:800}.stage1n-studio button.is-active{background:#e7f4ef;border-color:#54a783;color:#126c54}
.stage1n-metrics{background:#f2f8ff;border:1px solid #dce8f6;border-radius:11px;padding:9px;display:flex;gap:7px;align-items:center;flex-wrap:wrap}.stage1n-metrics strong{color:#0b746a;font-size:22px}.stage1n-metrics span{font-size:11px;color:#576f82}.stage1n-metrics #stage1nState{font-size:11px}.stage1n-metrics #stage1nState:empty{display:none}
.stage1n-engine-row{display:flex;align-items:center;justify-content:space-between;gap:5px;flex-wrap:wrap;font-size:12px;font-weight:750}.stage1n-engine-row>div{display:flex;gap:4px}
.stage1n-lines{display:grid;gap:7px;max-height:230px;overflow-y:auto}.stage1n-line{border:1px solid #dce6f1;border-radius:9px;background:#f9fbff;padding:8px 9px;font-size:12px;line-height:1.5;overflow-wrap:anywhere}.stage1n-line-header{display:flex;justify-content:space-between;color:#567188;font-size:11px;min-width:25px;gap:8px}.stage1n-line-num{font-weight:800;color:#61718c}.stage1n-san{font-size:13px;line-height:1.65;font-weight:550;word-spacing:2px;overflow-wrap:normal;word-break:normal}.stage1n-line strong{color:#263e5b}
.stage1n-notation-heading{border-top:1px solid #e1eaf5;padding-top:8px}#stage1nMoveDock .r23f125-home-movebar>small,#stage1nMoveDock #homeMoveCounter{display:none!important}
body.academy-home-view #stage1nMoveDock .r23f125-home-movebar{display:block!important;max-height:180px;overflow:auto}
body.academy-home-view #stage1nMoveDock .r23f125-home-moves{max-height:144px;overflow:auto}
/* Stage 1S: compact Home navigation, one row; keep all functions except redundant Undo */
#stage1nToolsDock .r23f125-home-actions{display:flex;flex-wrap:nowrap;gap:3px;align-items:center;width:100%;overflow-x:auto;scrollbar-width:thin}
#stage1nToolsDock .r23f125-home-actions button{white-space:nowrap;flex:0 1 auto;min-width:0;font-size:10px;padding:4px 5px;min-height:28px}
#stage1nToolsDock #homeUndo{display:none!important}
#stage1nToolsDock #homeFlip{white-space:nowrap}
#stage1nToolsDock .r23f125-home-actions{display:flex;flex-wrap:wrap;gap:5px}
#stage1nToolsDock .r23f125-home-actions button{font-size:11px;min-height:30px;padding:5px 6px}
body.academy-home-view #r23f125HomeToolbar{background:none;border:0;box-shadow:none;margin:0;padding:0;display:block}
body.academy-home-view #r23f125HomeToolbar>.r23f125-home-heading{display:none}
body.academy-home-view #r23f125HomeStockfishDock,body.academy-home-view #r23f125HomeStockfishDock:not([hidden]){display:none!important}
body.academy-home-view #boardCaption{display:none!important}
body.academy-home-view .academy-activity-column>.practice-station{display:none!important}
body.academy-home-view #stage1nStudio{min-width:0}
@media(max-width:900px){.stage1n-studio{max-width:100%}}
.stage1p-count{display:flex;align-items:center;gap:5px!important}.stage1p-count button{min-width:28px;padding:5px!important}.stage1p-count strong{min-width:14px;text-align:center}.stage1p-status{font-size:11px;color:#9a4e32}.stage1p-status:empty{display:none}.stage1n-line{display:flex;align-items:baseline;gap:10px;flex-wrap:wrap;padding:7px 9px}.stage1n-line-header{min-width:44px;justify-content:flex-start}.stage1n-san{flex:1;min-width:180px}.stage1n-metrics{display:none!important}.stage1q-engine-title{font-weight:800;color:#2d4966;font-size:12px;padding:3px 1px}.stage1q-engine-title:not(:first-child){border-top:1px solid #dce6f1;margin-top:6px;padding-top:9px}.stage1q-engine-wait{font-size:11px;color:#688097;padding:4px 2px}.stage1q-engine-error{font-size:11px;color:#9a4e32;padding:4px 2px}
#stage1nToolsDock .r23f125-home-actions{flex-wrap:nowrap!important;gap:3px!important}
#stage1nToolsDock .r23f125-home-actions button{font-size:10px!important;padding:4px 4px!important;min-height:28px!important}



.approved-board-frame.r62-eval-active{grid-template-columns:43px minmax(0,1fr) 42px!important;column-gap:0!important}
#r62EvalBar{grid-column:3;grid-row:1;align-self:stretch;position:relative;margin-left:6px;border:1px solid #666;border-radius:5px;overflow:hidden;background:#292929;min-height:0;box-sizing:border-box;}
#r62EvalBar[hidden]{display:none!important}
.r62-eval-white{position:absolute;left:0;right:0;background:#f5f5f5;transition:height .18s ease;pointer-events:none}
.r62-eval-number{position:absolute;left:0;right:0;text-align:center;font:800 14px/1.5 system-ui,Arial,sans-serif;white-space:nowrap;pointer-events:none}
#stage1nStudio .stage1n-line strong{font-size:19px!important;font-weight:850!important;font-variant-numeric:tabular-nums}
#stage1nStudio .stage1n-san{font-size:16px!important;line-height:1.55!important;min-width:0!important;overflow-wrap:anywhere}
@media(max-width:550px){.approved-board-frame.r62-eval-active{grid-template-columns:29px minmax(0,1fr) 34px!important}#r62EvalBar{margin-left:3px}.r62-eval-number{font-size:11px}#stage1nStudio .stage1n-san{font-size:15px!important}}

/* R11B: bridge the original controls to the existing game-study board. */
#r11bAnalysisControls{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:8px;margin:9px auto;max-width:860px}#r11bAnalysisControls button[hidden],#analysisPromotionWrap[hidden],#analysisLine[hidden]{display:none!important}#analysisStart{background:#176d70;color:white;border-color:#176d70}#analysisReturn{background:#395591;color:white}#analysisLine{flex-basis:100%;text-align:center;font-size:13px;color:#365575}#board[data-analysis=true] .square{cursor:pointer}#board[data-analysis=true] .square.analysis-selected{outline:3px solid #7f68b5;outline-offset:-3px}#board[data-analysis=true] .square.analysis-target:after{content:"";position:absolute;left:42%;top:42%;width:16%;height:16%;border-radius:100%;background:#586a7a70;pointer-events:none}#board .square{position:relative}#stage1nStudio .stage1n-engine-choices{grid-template-columns:1fr}#stage1nStudio .stage1n-engine-choices [hidden]{display:none!important}#stage1nStudio a{font-size:11px}#play .approved-board-frame.r62-eval-active{grid-template-columns:32px minmax(0,1fr) 30px!important}#play .practice-station{min-width:0;max-width:100%}#play .clock-actions{flex-wrap:wrap}#play .clock-ring{background:conic-gradient(from -90deg,#8a81e2 var(--clock-progress),#d9e2f2 0)}#play .clock-face output{font-variant-numeric:tabular-nums}#play .clock-mode-button{white-space:normal}@media(max-width:550px){#play .approved-board-frame.r62-eval-active{grid-template-columns:23px minmax(0,1fr) 23px!important}}

/* Original lesson title hierarchy; presentation only. */
#play .toolbar{align-items:center;gap:16px}#play .r11b-game-heading{min-width:0;flex:1}#play .r11b-game-kicker{display:block;color:#7154b4;font-size:10px;font-weight:850;letter-spacing:.08em;line-height:1.4}#gameName{font-size:clamp(24px,3vw,34px);line-height:1.12;color:#274567;margin:4px 0 5px;overflow-wrap:anywhere}#gameThemeHeading{font-size:15px;line-height:1.4;font-weight:650;color:#486781;margin:0 0 5px;overflow-wrap:anywhere}#play .r11b-game-heading #gameMeta{font-size:12px;line-height:1.4}#play .r11b-side-heading{margin:0 0 12px}#play .r11b-side-heading #gameTitleSide{font-size:clamp(20px,1.8vw,25px);line-height:1.2;margin:5px 0;color:#274567;overflow-wrap:anywhere}#play .r11b-side-heading #gameTheme{font-size:14px;line-height:1.4;font-weight:650;margin:4px 0 8px;color:#486781;overflow-wrap:anywhere}#play .r11b-side-heading #gameDetails{font-size:12px;color:#64778c}#play .r11b-side-heading #openingTitle{font-size:13px;margin:8px 0;color:#274567}#board[data-analysis=true] .square img{pointer-events:auto}#r11bAnalysisControls:has(> [hidden]):not(:has(> :not([hidden]))){display:none}#play .practice-station{grid-template-columns:minmax(80px,110px) minmax(0,1fr);gap:10px}#play .practice-station .clock-ring{width:100%;max-width:110px;height:auto;aspect-ratio:1}#play .practice-station .clock-face{width:82%;height:82%}#play .practice-station .clock-face output{font-size:20px}#play .clock-heading{font-size:14px}#play .clock-options{min-width:0}#play .clock-ticks{font-size:9px}@media(max-width:480px){#play .toolbar{align-items:flex-start;gap:10px}#play .r11b-game-heading{flex-basis:100%}}

#board[data-analysis=true]{touch-action:none;user-select:none}#board[data-analysis=true] .approved-piece{-webkit-user-drag:none;pointer-events:none}#board[data-analysis=true] .square.being-dragged .approved-piece{opacity:.36}

/* Approved R94B2 promotion dialog (copied from the current Puzzles module). */
dialog#promotionBox:not([open]){display:none!important}dialog#promotionBox[open]{position:fixed!important;inset:0!important;margin:auto!important;width:min(480px,90vw)!important;max-height:90vh;overflow:auto;display:flex!important;flex-wrap:wrap;justify-content:center;gap:12px;padding:22px!important;color:#173e60;background:#fffdf4;border:2px solid #55609f;border-radius:16px;box-shadow:0 10px 40px #0005}dialog#promotionBox::backdrop{background:rgba(0,0,0,.35)}#promotionBox strong{flex-basis:100%;text-align:center;font-size:22px}#promotionBox button{min-height:48px;min-width:125px}#r94CancelPromotion{flex-basis:100%}
#promotionBox [data-promote]{display:flex;align-items:center;justify-content:center;gap:8px;font-weight:750;background:white;border:1px solid #cbd5e6;border-radius:10px;padding:8px}#promotionBox [data-promote]:hover,#promotionBox [data-promote]:focus-visible{border-color:#7861bd;background:#f1e9ff}#promotionBox .promotion-piece{width:42px;height:42px;object-fit:contain;pointer-events:none}#r94CancelPromotion{border-radius:9px;background:#edf2fa;border:1px solid #b4c5df;color:#274567;font-weight:700}@media(max-width:380px){#promotionBox [data-promote]{min-width:105px!important;padding:5px;gap:4px}#promotionBox .promotion-piece{width:32px;height:32px}}

#r23f96MoveHistory{border:1px solid #d7e1f3;background:#f7faff;border-radius:12px;margin-top:11px;padding:0 10px 9px;color:#294768}
#r23f96MoveHistory[hidden]{display:none!important}
#r23f96MoveHistory summary{cursor:pointer;list-style:none;font-size:13px;font-weight:850;padding:11px 3px;display:flex;align-items:center;justify-content:space-between;gap:9px}
#r23f96MoveHistory summary::-webkit-details-marker{display:none}
#r23f96MoveCount{font-size:11px;color:#61748e;font-weight:650}
.r23f96-move-list{max-height:125px;overflow-y:auto;overscroll-behavior:contain;display:grid;grid-template-columns:35px 1fr 1fr;gap:4px 6px;padding:6px;background:#fff;border:1px solid #d7e1ed;border-radius:8px}
.r23f96-move-list .r23f96-number{font-size:12px;color:#74849a;padding:7px 1px}
.r23f96-move-list button{min-height:30px;padding:5px 6px!important;text-align:left;background:#f3f6fb;color:#253e60;border:1px solid transparent;border-radius:7px;font-size:12px;font-weight:700;cursor:pointer}
.r23f96-move-list button.current{background:#e1ddff;border-color:#7460d6;color:#342781}
.r23f96-move-list button:hover{border-color:#8071d6}
.r23f96-move-list .empty{grid-column:1/-1;font-size:12px;color:#63768c;padding:7px}
.r23f96-notation-nav{display:flex;gap:8px;align-items:center;justify-content:center;margin-top:8px}
.r23f96-notation-nav button{min-width:44px;min-height:34px;border:1px solid #c3d3ea;border-radius:9px;background:white;color:#244b70;cursor:pointer;font-size:15px}
.r23f96-notation-nav button:disabled{opacity:.38;cursor:default}
.r23f96-notation-nav button.r23f97-jump{min-width:32px;min-height:30px;font-size:12px;background:#f5f7fc}
.r23f96-notation-nav button:focus-visible,.r23f96-move-list button:focus-visible{outline:3px solid #8a77db;outline-offset:2px}
#r23f96MovePosition{font-size:12px;font-weight:750;color:#536c89;min-width:62px;text-align:center}
.r23f103-pv-controls{display:flex;gap:8px;align-items:center;justify-content:center;margin:7px 0}.r23f103-pv-controls button{border:1px solid #cbd6ed;border-radius:8px;min-width:36px;min-height:30px;background:#fff;font-weight:800;cursor:pointer}.r23f103-pv-controls button:disabled{opacity:.4;cursor:default}.r23f103-pv-row{display:flex;flex-direction:column;gap:3px;margin:5px 0;padding:7px;background:#f6f7ff;border:1px solid #e1e5f0;border-radius:8px;font-size:12px;overflow-wrap:anywhere}.r23f103-pv-row strong{color:#353d79}.r23f103-mainline{background:#f8f9ff;border:1px solid #ccd8ef;border-radius:10px;margin:7px 0;padding:8px}.r23f103-mainline h4{font-size:12px;margin:0 0 5px}.r23f103-mainmoves{max-height:145px;overflow:auto}.r23f103-mainrow{display:grid;grid-template-columns:30px 1fr 1fr;gap:4px;margin-bottom:3px;align-items:center;font-size:12px}.r23f103-mainrow button{background:#fff;border:1px solid #e1e4ed;border-radius:5px;padding:4px;text-align:left;cursor:pointer}.r23f103-mainrow button:hover{background:#eae7ff}
.r23f103-mainrow button.r23f103-branch-return{background:#fff0c9!important;color:#704600!important;border:2px solid #d59c22!important;font-weight:850!important;box-shadow:inset 0 0 0 1px #fff9e7}
.r23f103-mainrow button.r23f103-current-move{background:#e4f2ef!important;color:#086c58!important;border:2px solid #269977!important;font-weight:800!important}
.r23f103-mainrow button.r23f103-branch-return:hover{background:#ffe5a1!important}
/* R11F website layout adapter, original R94 styling retained. */
#play .r11b-side-heading #gamePlayers{font-size:clamp(23px,2.2vw,30px);line-height:1.16;margin:5px 0 8px;color:#274567;overflow-wrap:anywhere}
#play .r11b-side-heading #gameTitleSide{font-size:17px;line-height:1.3;margin:12px 0 4px;border-top:1px solid #e1e7f1;padding-top:10px}
#play #gameDetails{font-size:14px!important;font-weight:700;color:#365575!important}#play #openingTitle{font-size:15px!important}
#play .chessie-dialog{display:flex;align-items:center;gap:11px;background:linear-gradient(135deg,#fff9ed,#fdf0f7);border:1px solid #ffd39a;border-radius:14px;padding:10px}
#play .chessie-dialog img{width:92px;height:92px;max-width:38%;object-fit:cover;border:3px solid white;border-radius:18px;box-shadow:0 3px 9px #73563522;flex-shrink:0}#play .chessie-dialog strong{font-size:15px;color:#8052ad}#play #studyTip{font-size:14px;font-weight:650;line-height:1.4}
#play #gameReviewDetails{font-size:11px;color:#66758b;margin-top:8px}#play #gameReviewDetails summary{cursor:pointer}
#play .r11f-analysis-original .game-moves{max-height:145px}#history button.r23f103-branch-return{background:#fff0c9!important;color:#704600!important;border:2px solid #d59c22!important}
#play .r23f96-move-list{max-height:170px}#r23f96MoveHistory{padding:10px}#r23f96MoveHistory summary{display:flex;justify-content:space-between;flex-wrap:wrap;gap:5px}#r23f96MoveHistory[hidden]{display:none!important}
#stage1nStudio .stage1n-engine-choices{grid-template-columns:repeat(3,minmax(0,1fr))}#stage1nStudio .stage1n-engine-choices button{min-width:0;font-size:11px;padding:7px 3px}#r92Lab select{max-width:100%}#r92Lab summary{font-size:12px}#r92Lab #r92Status{font-size:12px;color:#375574}
#r62EvalBar .r62-eval-number{font-size:11px;letter-spacing:-.04em;line-height:1.3}

#board{position:relative}.chessie-teacher-overlay{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;z-index:5}
#play .chessie-mark-bar{max-width:860px;margin:9px auto;padding:9px 11px;display:flex;align-items:center;flex-wrap:wrap;gap:9px;border:1px solid #bcd9e4;background:#f1f9fc;border-radius:10px}#play .mark-heading{display:flex;align-items:center;gap:8px;flex-wrap:wrap}#play .mark-heading strong{font-size:13px}#play .mark-heading span{font-size:11px;color:#56708b}#play .mark-actions{display:flex;align-items:center;gap:7px;flex-wrap:wrap;font-size:12px}#play .mark-actions button,#play .mark-actions select{font-size:12px;padding:6px 9px;border:1px solid #c3d3e4;border-radius:7px;background:white;color:#274567;cursor:pointer}

/* R11G compact sidebar: preserve R11F chess logic and board. */
#play aside{gap:8px;min-width:0}
#play aside > .chessie-box,#play aside > .move-box,#play aside > #stage1nStudio,#play aside > #r23f96MoveHistory{margin:0!important;min-width:0;max-width:100%;padding:11px 12px;border-radius:13px}
#play #stage1nStudio:not([hidden]){gap:6px}
#play .r11b-side-heading{margin-bottom:8px}
#play #originalHistoryHeading{margin:0 0 6px;font-size:14px;line-height:1.3}
#play #originalGamePanel .game-moves{max-height:145px;gap:3px;padding:2px}
#play #originalGamePanel .game-moves button{padding:5px 6px;min-height:29px}
#play #originalGamePanel #gameResult{margin:5px 0 0}
#play #r23f96MoveHistory summary{padding:2px 1px 7px;gap:5px}
#play .r23f96-move-list{max-height:145px;padding:4px;gap:3px 5px}
#play .r23f96-notation-nav{margin-top:6px;gap:6px}
#play .r23f96-notation-nav button{min-height:32px}
#play #r92Lab{margin:0;padding:9px 11px;border:1px solid #b7d0e4;border-radius:12px;background:#f4f8fc;min-width:0;max-width:100%;font-size:13px}
#play #r92Lab summary{cursor:pointer;font-size:13px;font-weight:800;line-height:1.4;color:#294768}
#play #r92Lab .r11g-lab-controls{display:grid;gap:7px;margin-top:8px}
#play #r92Lab:not([open]) .r11g-lab-controls{display:none}
#play #r92Lab button{font-size:12px;min-height:30px;padding:5px 7px;border:1px solid #c6d7e7;background:#fff;border-radius:8px;color:#274568;font-weight:750;cursor:pointer}
#play #r92Lab button:disabled{opacity:.5;cursor:default}
#play #r92Lab select{min-width:0;max-width:100%}
#play #r92Lab input[type=range]{display:block;margin:4px 0 0}
#play .chessie-board-settings{margin:3px auto 5px;padding:5px 8px;gap:5px 8px}
#play .replay-controls{margin:4px auto 6px;gap:6px}
#play #r11bAnalysisControls{margin:6px auto;gap:6px}
#play .chessie-mark-bar{margin:6px auto;padding:7px 9px;gap:6px}
@media(max-width:550px){#play aside{gap:8px}#play #r92Lab button{min-height:36px}#play .replay-controls button{min-height:36px}}
