.explorer{max-width:1200px;margin:auto;padding:28px 24px 70px}.explorer-intro{margin-bottom:25px}.explorer-intro>p:last-child,.study-heading p:not(.eyebrow){color:#b8c8bd;margin:8px 0}.explorer-layout{display:grid;grid-template-columns:minmax(270px,330px) minmax(0,680px);gap:32px;align-items:start}.opening-library,.explanation,.moves-panel{background:#1b2523;border:1px solid #415247;border-radius:14px;padding:18px}.library-top,.study-heading{display:flex;justify-content:space-between;align-items:start;gap:12px}.library-top span,.level-note{font-size:11px;color:#acbfb2}.search-label{display:block;margin-top:15px;font-size:12px;font-weight:700}.search-label input{display:block;width:100%;margin-top:5px;min-height:44px;padding:9px;border:1px solid #60766a;border-radius:8px;background:#111c19;color:#f1f3ef;font:16px system-ui}.filters{display:flex;flex-wrap:wrap;gap:6px;margin-top:12px}.filters button{border:1px solid #52685c;border-radius:20px;background:transparent;color:#c9d8ce;padding:8px 10px;font-size:11px;font-weight:700}.filters button[aria-pressed=true]{background:#a8dfbf;color:#14241a}.opening-list{display:grid;gap:6px;max-height:550px;overflow:auto}.opening-item{width:100%;text-align:left;padding:10px;border:1px solid transparent;border-radius:8px;background:#ffffff08;color:#f1f3ef}.opening-item.active{border-color:#87b79a;background:#304b3c}.opening-item strong,.opening-item small{display:block}.opening-item small{color:#aec3b4;font-size:11px}.study{min-width:0}.study-heading h2{font:500 clamp(25px,3vw,36px) Georgia,serif}.study-heading button,.study-controls button{min-height:44px;padding:8px 12px;border-radius:8px;font-weight:700}.study-controls{display:flex;gap:8px;margin-top:12px}.study-controls #next{margin-left:auto}.study-controls button:disabled{opacity:.45}.board-feedback{margin:10px 0 0}.explanation,.moves-panel{margin-top:14px}.explanation h3,.moves-panel h3{margin:0;font-size:15px}.explanation p:last-child{color:#c4d6c8;font-size:13px;margin:6px 0 0}.move-list{display:flex;flex-wrap:wrap;gap:6px;margin-top:12px}.move-list button{min-width:44px;min-height:40px;background:#ffffff0b;border:1px solid #ffffff20;color:#dfece2;border-radius:6px}.move-list button.current{background:#a8dfbf;color:#14241a}.opening-empty{font-size:12px;color:#bccbc0}#explorer-soundscape{margin-top:14px}@media(max-width:800px){.explorer{padding:20px 16px 50px}.explorer-layout{grid-template-columns:1fr;gap:18px}.opening-list{max-height:225px}.study-heading h2{font-size:27px}}@media(max-width:400px){.study-controls button{font-size:12px;padding:8px}.study-heading{gap:6px}}

.study-jump{display:none;color:#bce6c5;font-size:12px;font-weight:700;margin-top:10px}#study{scroll-margin-top:12px}@media(max-width:800px){.study-jump{display:inline-flex;min-height:36px;align-items:center}}

.lesson-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:12px 0}.lesson-actions button{min-height:44px;padding:9px 13px;border-radius:8px;font-weight:700}.lesson-actions span{font-size:12px;color:#c6d9cb}.lesson-actions [hidden],#moves-panel[hidden]{display:none}

/* Keep the position and its explanation together on wide screens. */
.study-workspace{display:grid;grid-template-columns:minmax(0,1fr);gap:16px;align-items:start}.study-board-column,.study-detail{min-width:0}.study-detail .explanation,.study-detail .moves-panel{margin-top:0}.study-detail .moves-panel{margin-top:12px}.library-return{display:inline-flex;align-items:center;min-height:44px;margin-top:14px;font-size:12px;font-weight:700;color:#c3e9ce}.opening-item{min-height:49px}.opening-item:hover{border-color:#87b79a}.opening-item:focus-visible,.library-return:focus-visible,.search-label input:focus-visible{outline:3px solid #f0c575;outline-offset:2px}
@media(min-width:1050px){.explorer{max-width:1370px}.explorer-layout{grid-template-columns:minmax(240px,280px) minmax(0,1fr);gap:24px}.opening-library{position:sticky;top:16px}.opening-list{max-height:min(54vh,550px)}.study-workspace{grid-template-columns:minmax(0,1fr) minmax(235px,290px);gap:18px}.study-board-column .board-wrap{max-width:680px}.study-detail{position:sticky;top:16px}.library-return{display:none}}
@media(max-width:800px){.opening-list{max-height:175px}.explorer-intro{margin-bottom:18px}.study-workspace{gap:12px}.study-detail .explanation{margin-top:0}.library-return{margin-top:8px}}

.study-board-column .study-controls{margin:0 0 10px}.study-board-column .study-controls button{flex:0 1 auto}.study-board-column .study-controls #next{margin-left:auto}

.line-navigation{display:flex;gap:8px;flex-wrap:wrap;margin:12px 0}.line-navigation button{min-height:44px;padding:8px 12px;border-radius:8px;font-size:12px;font-weight:700}.line-navigation button:disabled{opacity:.45;cursor:not-allowed}

/* The library becomes an explicit drawer at phone and tablet widths. */
.study-mobile-bar,.library-close,.library-backdrop{display:none}.library-backdrop[hidden],.opening-library[hidden],.library-close[hidden],#library-toggle[hidden]{display:none!important}
@media(max-width:800px){.study-mobile-bar{display:flex;margin:0 0 12px}.study-mobile-bar button,.library-close{min-height:44px;padding:8px 12px;border-radius:9px;font-weight:700}.library-close{display:block;position:absolute;top:14px;right:14px}.library-backdrop:not([hidden]){display:block;position:fixed;inset:0;border:0;background:#000a;z-index:1000}.opening-library:not([hidden]){position:fixed;inset:0 auto 0 0;z-index:1001;width:min(88vw,380px);max-height:100dvh;overflow-y:auto;border-radius:0 16px 16px 0;padding:20px}.opening-library .library-top{padding-right:48px}.opening-library .opening-list{max-height:min(48dvh,440px)}body.study-drawer-open{overflow:hidden}.study-jump,.library-return{display:none!important}.explorer-intro{margin-bottom:14px}.explorer{padding-top:18px}.study-heading h2{font-size:25px}.line-navigation{margin:8px 0}.lesson-actions{margin:8px 0}}

@media(max-width:800px){.study > .line-navigation,.study > .lesson-actions{display:inline-flex;vertical-align:middle}.study > .lesson-actions{margin-left:6px}}

.mobile-guidance{display:none}.mobile-guidance[hidden]{display:none!important}@media(max-width:800px){.mobile-guidance:not([hidden]){display:block;margin:0 0 10px;padding:10px 12px;border-left:3px solid #a8dfbf;border-radius:6px;background:#20352c;color:#e0f1e4;font-size:12px;line-height:1.4}}

/* The lesson or position is the main heading; keep library chrome compact. */
.explorer-intro{display:flex;align-items:baseline;justify-content:space-between;flex-wrap:wrap;gap:4px 16px;margin-bottom:16px}
.explorer-intro h1{font-size:clamp(24px,3vw,32px);margin:0}
.explorer-intro>p:last-child{margin:0;font-size:12px}
.opening-library .library-top h2{font-size:18px;line-height:1.3}
.filters button{min-height:44px;min-width:44px}
.opening-list{scrollbar-width:thin;scrollbar-color:#65846e transparent;overscroll-behavior:contain}
.opening-item strong{line-height:1.35}.opening-item small{margin-top:3px;line-height:1.4}
.search-label input{scroll-margin-block:16px}
@media(max-width:800px){.explorer-intro>p:last-child{display:none}.explorer-intro{margin-bottom:10px}.study-mobile-bar{margin-bottom:10px}}
