/* Approved generated bookshelf scenery, with real accessible HTML controls. */
.bookshelf-library{padding:10px 0 0}
.book-scene{position:relative;overflow:hidden;isolation:isolate}
.book-scene>img{position:absolute;left:0;width:100%;max-width:none;pointer-events:none;user-select:none}
.book-scene-wide{aspect-ratio:1536/676}
.book-scene-wide>img{top:-39.394%}
.book-hit{position:absolute;display:block;border-radius:4px;background:transparent;transition:background .15s,box-shadow .15s}
.book-hit:hover{background:#fff5;box-shadow:inset 0 0 0 2px #72592d66}
.book-hit:active{background:#624c2530}
.book-hit:focus-visible{outline:4px solid #255d47;outline-offset:-4px;background:#fff3}
.book-label{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.book-scene-phone,.web-phone-shelves{display:none}
.book-scene-web-phone>img{top:-39.394%}
.bookshelf-foot{display:flex;justify-content:space-between;gap:20px;padding:10px 20px;color:#60513c;font-size:14px}
.bookshelf-foot a{display:flex;align-items:center;min-height:44px}
.app-shell[data-view=grades]{max-width:1440px}
.app-shell[data-view=grades] .brand-mark{display:none}
.app-shell[data-view=grades] .brand{font-family:inherit;font-size:30px;color:#372915;white-space:nowrap}
.app-shell[data-view=grades] .app-header{height:auto;min-height:92px;flex-wrap:wrap}
.app-shell[data-view=grades] #navigation{position:static;transform:none;inset:auto;margin-left:auto;background:transparent;border:0;box-shadow:none;backdrop-filter:none;display:flex;gap:8px}
.app-shell[data-view=grades] #navigation .nav-item{flex-direction:column;min-width:60px;min-height:54px}
.app-shell[data-view=grades] .app-footer{margin-top:4px}
.study-scene{position:relative;background:#f9f1e1;border:1px solid #d3c1a3;border-radius:10px;overflow:hidden;box-shadow:0 8px 30px #6b4c1b0c}
.study-shelf-art{height:clamp(60px,12vw,145px);background:url('./assets/bookshelf/study-tablet.webp') center top/100% auto no-repeat;border-bottom:3px solid #a6814f}
.study-scene .study-board{margin:0;padding:30px;background:transparent;border:0;border-radius:0;box-shadow:none}
.study-scene .lesson-character,.study-scene .writing-canvas{background-color:#fffbf2;border:1px solid #cabb9e;border-radius:8px}
.study-scene .answer{border:1px solid #c8b797;border-radius:14px;background:#fffbf2;color:#302a20}
.study-scene .answer.correct{background:#e4efdc;border-color:#497845}
.study-scene .answer.wrong{background:#fff0e8;border-color:#b26849}
.study-scene .write-counter{background:#eee5d4;border-radius:8px}
.study-scene .writing-modes,.study-scene .writing-tools button{background:#eee5d4}
.study-scene .writing-buddy{display:none}
.study-scene .quiz-layout{max-width:none;display:grid;grid-template-columns:minmax(0,.85fr) minmax(0,1.15fr);column-gap:40px;align-items:center}
.study-scene .quiz-layout h1{grid-column:2;grid-row:1;text-align:left}
.study-scene .quiz-character{grid-column:1;grid-row:1/4;align-self:center;font-size:clamp(110px,16vw,220px);margin:0}
.study-scene .quiz-meaning{grid-column:1;grid-row:4;margin:0;text-align:center}
.study-scene .answers{grid-column:2;grid-row:2;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.study-scene .answer{justify-content:center;min-height:80px;padding:14px}
.study-scene .answer-index{display:none}
.study-scene #answer-feedback{grid-column:2;grid-row:3;min-height:44px}
.study-scene #after-answer{grid-column:2;grid-row:4;width:100%}
.single-book-home{display:block;min-height:0;background:transparent;border-radius:0;overflow:visible}
.single-book-scene{position:relative;overflow:hidden;aspect-ratio:1536/738}
.single-book-scene picture{display:block}
.single-book-scene img{position:absolute;top:-31%;left:0;width:100%;max-width:none;pointer-events:none}
.single-book-hit.primary{position:absolute;left:35.9%;top:5%;width:28%;height:77%;margin:0;padding:0;background:transparent;color:transparent;border:0;border-radius:8px;box-shadow:none;min-height:44px}
.single-book-hit.primary svg{display:none}
.single-book-hit.primary:hover:enabled,.single-book-hit.primary:focus-visible{background:#fff2;box-shadow:inset 0 0 0 3px #47715c}
.single-book-home .hero-content{padding:12px 20px;max-width:none;text-align:center;background:transparent}
.single-book-home .hero-content h1{font-size:24px;line-height:1.5}
.single-book-home .hero-content .eyebrow,.single-book-home .hero-sub{display:none}
.hero-current-glyph{position:absolute;inset:0 3% 0 40%;display:grid;place-items:center;font-family:'Noto Serif CJK KR',Batang,serif;font-size:220px;color:#3b3a30;pointer-events:none}
.app-shell[data-view=home]:has(.single-book-home) #app>section:not(.single-book-home){display:none}
.single-book-home{min-height:360px;height:calc(100svh - 190px);display:grid;align-items:center}
.single-book-home .hero-content{display:none}
.single-book-scene{width:100%;max-width:1100px;margin:auto}
@media(min-width:621px) and (orientation:landscape){.study-scene .writing-canvas{width:min(100%,calc(100svh - 430px));min-width:180px;margin:auto}.study-scene .writing-layout{grid-template-columns:minmax(190px,.65fr) minmax(0,1fr);gap:30px}.study-scene .writing-surface{width:100%}}
@media(max-width:900px){.app-shell[data-view=grades] .brand{font-size:26px}.app-shell[data-view=grades] #navigation{gap:0}.app-shell[data-view=grades] #navigation .nav-item{min-width:50px;padding:8px}}
@media(max-width:620px){
 .book-scene-wide{display:none}.book-scene-phone{display:block;aspect-ratio:1024/1098}.book-scene-phone>img{top:-24.4755%}
 .web-phone-shelves{display:grid;gap:12px}
 .app-shell[data-view=grades] .app-header{min-height:70px;gap:5px;padding:16px 4px 4px}.app-shell[data-view=grades] .brand{font-size:24px}
 .app-shell[data-view=grades] #navigation{order:3;width:100%;justify-content:space-around;margin:0}.app-shell[data-view=grades] #navigation .nav-item{min-width:52px;min-height:48px;font-size:13px}.app-shell[data-view=grades] .app-exit{margin-left:auto}
 .bookshelf-foot{font-size:13px;padding:8px 12px;gap:12px}.bookshelf-library{padding:0}.app-shell[data-view=grades] .app-footer{padding-bottom:24px}
 .study-shelf-art{height:64px;background-image:url('./assets/bookshelf/study-phone.webp');background-size:100% auto;background-position:center 4%}
 .study-scene .study-board{padding:20px 16px}.study-scene .quiz-layout{display:flex;flex-direction:column;gap:10px}.study-scene .quiz-layout h1{font-size:20px;text-align:center;order:2;margin:0}.study-scene .quiz-character{order:0;font-size:100px;line-height:1.3}.study-scene .quiz-meaning{order:1}.study-scene .answers{order:3;width:100%;gap:10px}.study-scene .answer{min-height:62px;font-size:23px}.study-scene #answer-feedback{order:4;margin:0;min-height:34px}.study-scene #after-answer{order:5}
 .study-scene .writing-layout{display:flex;flex-direction:column;gap:16px}.study-scene .writing-info{width:100%;display:grid;grid-template-columns:1fr 1fr;gap:10px;align-items:center}.study-scene .writing-info h1{font-size:18px;margin:0}.study-scene .word-reading{font-size:24px;margin:0}.study-scene .write-counter{grid-column:1;margin:0;padding:10px}.study-scene .write-counter strong{font-size:22px;margin:4px 0}.study-scene .write-dots{display:none}.study-scene .writing-modes{grid-column:2;margin:0}.study-scene .writing-tools{grid-column:1/-1;display:flex;gap:6px}.study-scene .writing-tools button{flex:1;font-size:12px;padding:8px 4px;min-height:44px}.study-scene .writing-surface{width:100%;max-width:420px}.study-scene .writing-canvas{width:100%;min-width:0}.study-scene .writing-topline{font-size:12px}.study-scene .feedback{min-height:32px}
 .single-book-scene{aspect-ratio:1024/1000}.single-book-scene img{top:-31%}.single-book-hit.primary{left:23.5%;top:6%;width:53%;height:78%}.single-book-home .hero-content h1{font-size:21px}
}
@media(forced-colors:active){.book-hit{border:2px solid LinkText}.book-label{position:static;width:auto;height:auto;clip-path:none;white-space:normal;background:Canvas;color:LinkText}.single-book-hit.primary{color:ButtonText;background:ButtonFace;border:2px solid ButtonText}}
.ad-removal-card{grid-column:1/-1}
.ad-removal-dialog{width:min(500px,calc(100vw - 36px));max-height:calc(100svh - 48px);overflow:auto;padding:28px;border:1px solid #c8b795;border-radius:16px;background:#fffbf2;color:#302a20;word-break:keep-all;overflow-wrap:break-word}
.ad-removal-dialog::backdrop{background:#241f1966}
.ad-removal-dialog p{font-size:16px;line-height:1.75;margin:16px 0}
.ad-removal-dialog h2{font-size:23px;margin:0 0 20px}
.ad-removal-dialog .ad-removal-price{font-size:14px;color:#6c5c44}
.ad-removal-actions{display:flex;align-items:center;flex-wrap:wrap;gap:12px}
.ad-removal-dialog .ad-removal-actions>button{flex:1;min-height:48px}
@media(max-width:620px){
 .study-scene .writing-info h1{grid-column:1;grid-row:1}
 .study-scene .writing-info .word-reading{grid-column:2;grid-row:1;font-size:20px;line-height:1.4;margin:0}
 .study-scene .write-counter{grid-column:1;grid-row:2}
 .study-scene .writing-modes{grid-column:2;grid-row:2}
 .study-scene .writing-tools{grid-column:1/-1;grid-row:3}
 .hero-current-glyph{left:60%;right:4%;font-size:100px}
 .hero:has(.hero-current-glyph) .hero-content{width:62%;padding:26px 20px}
.hero:has(.hero-current-glyph) .hero-content h1{font-size:28px}
.single-book-home{height:calc(100svh - 175px);min-height:340px}
}

/* Keep scenery in its own row: text must never cross a painted shelf. */
.app-shell #app>.hero:not(.single-book-home){display:grid;grid-template-columns:minmax(0,1fr) clamp(90px,28%,200px);min-height:0;background:#fffbf2;border:1px solid #d3c1a3;border-radius:20px;overflow:hidden}
.app-shell #app>.hero:not(.single-book-home)>picture{grid-column:1/-1;grid-row:1;display:block;height:76px;overflow:hidden;border-bottom:1px solid #d3c1a3}
.app-shell #app>.hero:not(.single-book-home) .hero-art{position:static;display:block;width:100%;height:100%;object-fit:cover;object-position:center 12%}
.app-shell #app>.hero:not(.single-book-home) .hero-content{grid-column:1;grid-row:2;position:static;width:100%;min-width:0;padding:24px;gap:14px;background:#fffbf2}
.app-shell #app>.hero:not(.single-book-home) .hero-content h1{max-width:none;font-size:32px;line-height:1.35;letter-spacing:-1px;overflow-wrap:anywhere}
.app-shell #app>.hero:not(.single-book-home) .hero-sub{max-width:none;line-height:1.6}
.app-shell #app>.hero:not(.single-book-home) .primary{max-width:100%;white-space:normal}
.app-shell #app>.hero:not(.single-book-home) .hero-current-glyph{position:static;inset:auto;grid-column:2;grid-row:2;font-size:clamp(76px,15vw,150px);line-height:1;min-width:0;padding:12px 8px;background:#fffbf2}
.app-shell #app>.hero:not(.single-book-home):not(:has(.hero-current-glyph:not(:empty))) .hero-content{grid-column:1/-1}
.app-shell #app>.hero:not(.single-book-home) .hero-current-glyph:empty{display:none}
.app-shell[data-view=result] .result-content{background:#fffbf2}
@media(max-width:620px){
 .app-shell #app>.hero:not(.single-book-home)>picture{height:58px}
 .app-shell #app>.hero:not(.single-book-home) .hero-content{padding:18px 16px;gap:12px}
 .app-shell #app>.hero:not(.single-book-home) .hero-content h1{font-size:28px}
 .app-shell #app>.hero:not(.single-book-home) .hero-sub{font-size:14px}
.app-shell #app>.hero:not(.single-book-home) .primary{padding:12px 14px;font-size:14px}
}
@media(min-width:621px) and (max-height:520px){
 .app-shell[data-view=home] .app-header{height:48px;min-height:48px;flex-wrap:nowrap;padding:0;gap:12px}
 .app-shell[data-view=home] .brand{font-size:16px}
 .app-shell[data-view=home] #navigation{margin:0 0 0 auto;gap:0;flex-wrap:nowrap}
 .app-shell[data-view=home] .nav-item{font-size:12px;padding:8px}
 .app-shell[data-view=home] .course-bar{margin:0 0 4px}
 .app-shell #app>.hero:not(.single-book-home)>picture{height:28px}
 .app-shell #app>.hero:not(.single-book-home) .hero-content{padding:12px 16px;gap:6px}
 .app-shell #app>.hero:has(.hero-current-glyph:not(:empty)) .hero-content{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);column-gap:18px;align-items:center}
 .app-shell #app>.hero:has(.hero-current-glyph:not(:empty)) .hero-content .eyebrow{grid-column:1;grid-row:1}
 .app-shell #app>.hero:has(.hero-current-glyph:not(:empty)) .hero-content h1{grid-column:1;grid-row:2;font-size:24px}
 .app-shell #app>.hero:has(.hero-current-glyph:not(:empty)) .hero-sub{grid-column:2;grid-row:1;font-size:12px}
 .app-shell #app>.hero:has(.hero-current-glyph:not(:empty)) .primary{grid-column:2;grid-row:2;margin:0;min-height:44px;padding:10px;font-size:13px}
 .app-shell #app>.hero:not(.single-book-home) .hero-current-glyph{font-size:90px}
}
