@media (max-width:1024px), (pointer:coarse){
  .navwrap .sound-toggle,.course-controls button,.oe-controls button,.pr-controls button,.imp-controls button,.lesson-article .action,.lesson-article .outline{min-height:44px}
  .navwrap .sound-toggle{min-width:44px}
  main select,main input,main textarea,.oe-picker select{font-size:max(16px,1em)}
  .word-preview button{min-width:32px;min-height:32px}
}
@media (max-width:360px){
  .oe-picker{grid-template-columns:minmax(0,1fr)}
}
.focus-board,.exit-board{font:600 .85rem var(--sans);color:var(--forest);border:1px solid #b9c8b9;border-radius:8px;background:var(--panel);padding:8px 12px;min-height:40px;white-space:nowrap}
.exit-board{display:none}
.board-focused .exit-board{display:block;margin:6px auto 4px;min-height:36px}
.board-focused :is(.masthead,footer,.course-heading,.breadcrumb,.course-reading,.course-bottom,.first-moves,.replay-head,.replay-players,.imp-aside>.reviewlink,.imp-aside>.imp-change,.imp-aside>.imp-moments,.imp-aside>h3,.imp-aside>.imp-score,.imp-aside>.imp-controls){display:none!important}
.board-focused main,.board-focused .lesson-article,.board-focused .course-layout,.board-focused .replay-room{margin-block:0;padding-block:0}
.board-focused .course-layout,.board-focused .replay-room{display:block}
.board-focused .course-example,.board-focused .replay-stage,.board-focused .imp-aside{display:block;margin-inline:auto;width:min(100%,max(210px,calc(100svh - 213px)),510px);max-width:none}
.board-focused .first-moves{display:none}
.board-focused .course-example .boardframe{width:100%}
.board-focused .imp-aside{margin-top:8px}
.board-focused .course-example .boardtop,.board-focused .course-caption{margin-top:0}
@media(min-width:620px) and (max-height:550px){
.board-focused .replay-room,.board-focused .course-example:not(.first-moves){display:grid;width:100%;grid-template-columns:minmax(190px,min(44%,calc(100svh - 90px))) 1fr;gap:7px 18px;align-content:start}
.board-focused .replay-stage{display:contents}
.board-focused .course-example .boardframe{grid-row:1/5}
.board-focused .course-example>:not(.boardframe){grid-column:2}
.board-focused .imp-aside{width:100%}
}
.replay-explanation summary{font-size:.82rem;color:var(--sub);padding-block:5px;cursor:pointer}
@media(max-width:720px) and (orientation:portrait){
.replay-room,.board-focused .replay-room{display:flex;flex-direction:column;gap:8px}
.replay-room .imp-aside,.board-focused .replay-room .imp-aside{display:contents}
.replay-room .replay-explanation{order:-2;width:100%;padding:7px 12px;box-sizing:border-box}
.replay-explanation h2{font:600 .85rem/1.25 var(--sans)}
.replay-room .replay-stage{order:-1;width:min(100%,max(188px,calc(100svh - 350px)))}
.board-focused .replay-room .replay-stage{width:min(100%,max(196px,calc(100svh - 214px)))}
.replay-explanation .word-hint{display:none}
.replay-explanation .imp-note{line-height:1.4}
.replay-explanation .board-word,.replay-explanation .square-reference{text-decoration:underline dotted;text-underline-offset:3px}
}
@media(max-width:720px) and (orientation:portrait){
.replay-room .replay-stage,.board-focused .replay-room .replay-stage{width:100%}
.replay-stage .boardframe{width:min(100%,max(188px,calc(100svh - 355px)))}
.board-focused .replay-stage .boardframe{width:min(100%,max(188px,calc(100svh - 245px)))}
.replay-stage .replay-nav{gap:5px}.replay-nav button{white-space:nowrap;padding-inline:6px}
}
@media(max-width:370px) and (max-height:560px){
body:has(.replay-room) .navwrap .brand,body:has(.replay-room) .navwrap .sound-toggle{display:none}
body:has(.replay-room) .navwrap{padding-top:0}
.replay-head{gap:4px}.replay-head h1{font-size:1.25rem}
.replay-head .focus-board{font-size:.78rem;padding-inline:6px}
}
@media(max-width:370px) and (max-height:560px){
body:has(.replay-room) .navwrap{display:flex;gap:3px;align-items:center;padding-inline:6px}
body:has(.replay-room) .navwrap nav{flex:1;gap:4px;min-width:0}
body:has(.replay-room) .navwrap .sound-toggle{position:static;display:grid;min-width:30px;width:30px;height:30px;min-height:30px;margin:0}
}
@media(max-width:380px) and (orientation:portrait){
.replay-explanation h2{font-size:.78rem;line-height:1.1}
.replay-explanation summary{padding-block:2px}
.replay-room .replay-explanation{padding:5px 8px}
.replay-stage .boardframe{width:min(100%,max(177px,calc(100svh - 380px)))}
.board-focused .replay-stage .boardframe{width:min(100%,max(177px,calc(100svh - 270px)))}
.replay-head .focus-board{min-height:34px;padding-block:4px}
.replay-head{padding-block:2px}
}

.course-example .course-controls{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:8px 0}
.course-controls button{min-width:0;white-space:normal;line-height:1.2}
@media (orientation:portrait){
.board-focused .course-example:not(.first-moves){width:min(100%,510px)}
.board-focused .course-example .boardframe{width:min(100%,max(160px,calc(100svh - 9rem - 75px)));margin-inline:auto}
.board-focused .course-controls{margin-bottom:10px}
}
.course-example .boardframe .course-controls{background:#24463b;margin:0;padding:5px;gap:5px}
.course-example .boardframe .course-controls button{border:0;border-radius:6px;margin:0;font:600 .94rem/1.15 var(--sans);padding:8px;color:#fff;background:#365c4d}
.course-example .boardframe .course-controls [data-course-next]{background:#edf1df;color:#193d30}
.course-example .boardframe .course-controls button:disabled{opacity:.55}
.board-focused .course-example .boardframe{width:100%}
.board-focused [data-course-diagram]{background:var(--paper,#f4f5ee)}
.board-focused [data-course-diagram] .board{width:min(100%,var(--focus-board-size,100%));margin-inline:auto}
.boardframe :is(.pr-replay,.replay-nav,#study-board-actions),.oe-frame .oe-controls{margin:0;display:flex;align-items:stretch;gap:4px;padding:5px;flex-wrap:wrap;background:#24463b}
.boardframe :is(.pr-replay,.replay-nav,#study-board-actions) button,.oe-frame .oe-controls button{flex:1 1 auto;border:0;border-radius:6px;min-width:0;min-height:44px;color:#fff;background:#365c4d;padding:6px 9px;white-space:normal}
.boardframe :is([data-to="next"],[data-replay="next"],#study-board-actions .action),.oe-frame .oe-controls #oe-next{background:#edf1df;color:#193d30}
.replay-nav small,.oe-controls span{align-self:center;color:#edf1df;padding-inline:2px}
@media(max-width:720px) and (orientation:portrait){
.replay-stage .boardframe,.board-focused .replay-stage .boardframe{width:100%}
.replay-stage .board{width:min(100%,max(177px,calc(100svh - 380px)));margin-inline:auto}
.board-focused .replay-stage .board{width:min(100%,max(177px,calc(100svh - 270px)))}
}
.board-focused .boardframe .boardtop:has(.exit-board){position:relative;min-height:44px;padding-left:48px}
.board-focused .boardframe .exit-board{position:absolute;left:1px;top:50%;transform:translateY(-50%);display:grid;place-items:center;width:44px;height:44px;margin:0;padding:0;border:0;border-radius:6px;color:#fff;background:transparent;font:500 1.3rem/1 var(--sans)}
.board-focused .boardframe .exit-board:hover,.board-focused .boardframe .exit-board:focus-visible{background:#365c4d}
button.focus-board{display:inline-flex;align-items:center;gap:.45em;border-color:#cad5c5;background:#edf1e7;color:#24463b;padding:5px 11px;min-height:44px;font:500 1.05rem/1.1 var(--serif)}
.focus-board .board-icon{width:1em;height:1em;flex:none;border:1px solid #66816a;border-radius:2px;background:repeating-conic-gradient(#789477 0% 25%,#eef2e6 0% 50%) 0 0 / 50% 50%}
.study-focus{margin-left:auto}
.board-focused main:has(#board)>.collection,.board-focused main:has(#board)>.mobiletitle,.board-focused main:has(#board)>.mobileprompt,.board-focused main:has(#board)>.word-hint,.board-focused .room .side>:not(#coach){display:none}
.board-focused .room{display:block;max-width:510px;margin:0 auto;padding:0}
.board-focused .room #board{width:min(100%,var(--focus-board-size,100%));margin:auto}
.board-focused .room .side{padding:0}
.course-example .course-line-picker{background:#284c40;color:#fff9e8;border:1px solid #658174;border-radius:6px;width:100%;max-width:100%;padding:5px 6px;font:inherit;min-height:36px}
.course-line-picker option{background:#faf8ef;color:#24463b}
.board-focused .course-caption{padding:8px 0 4px}
@media(max-width:680px) and (orientation:portrait){
.board-focused [data-course-diagram] .board{width:min(100%,var(--focus-board-size,100%),max(165px,calc(100svh - 15rem)));margin-inline:auto}
}
.course-example .boardframe .course-controls{grid-template-columns:1fr auto 1fr}
.course-example [data-course-reset]{font-size:.85rem!important}
.course-try{font-size:.86rem;color:var(--sub);margin:7px 0 2px}
.course-correct{color:#357449}
.course-target:after{content:"";position:absolute;inset:38%;border-radius:50%;background:#344c3f70;pointer-events:none}
