.speak-button{display:inline-flex!important;vertical-align:middle;align-items:center;justify-content:center;min-width:36px;min-height:36px;border:1px solid #c6d9cc;border-radius:50%;padding:6px!important;margin:0 .2em;background:#fff9df;color:#146443;cursor:pointer;font:16px/1.2 Arial,sans-serif!important;flex-shrink:0}
.speak-button.is-speaking,.sound-active{background:#ffe577!important;box-shadow:0 0 0 2px #d2a329;color:#233d32!important}
.speech-status{position:fixed;bottom:12px;left:50%;transform:translateX(-50%);z-index:100;background:#163e2c;color:white;border-radius:12px;padding:10px 14px;max-width:92vw;width:max-content;font:14px/1.5 Arial,sans-serif;box-shadow:0 4px 18px #0003}
.speech-status[hidden]{display:none}.speech-status button{border:1px solid #bcd1bd;border-radius:8px;color:white;background:transparent;min-height:32px;margin-left:10px;padding:4px 10px}
.word-blend{background:#f2f7ed;border:1px solid #c9dcc8;border-radius:16px;padding:14px;margin-top:14px;text-align:center;color:#244f38}
.word-blend .completed-word{font:700 clamp(26px,4vw,40px)/1.4 Arial,sans-serif;overflow-wrap:anywhere}
.completed-parts{display:flex;flex-wrap:wrap;gap:6px;align-items:center;justify-content:center;margin:14px 0}
.word-blend button{font:inherit;color:#175536;background:white;border:1px solid #bed2bd;border-radius:10px;padding:8px;min-height:40px;cursor:pointer}
.word-blend .completed-parts button{font:700 26px/1.2 Arial,sans-serif;min-width:40px}.completed-parts small{font:14px/1.5 Arial,sans-serif;display:block;color:#59715f}
.blend-instruction,.blend-message{font-size:14px;line-height:1.6;margin:10px 0}.blend-actions{display:flex;gap:8px;flex-wrap:wrap;justify-content:center}.blend-actions button{font-size:14px}
.question-feedback:empty{display:none}.build-question .word-blend{grid-column:1/-1}.sound-check-letter{font:700 clamp(64px,15cqw,112px)/1.4 Arial,sans-serif;text-align:center;color:#146443}
.sound-check-actions{display:flex;flex-wrap:wrap;justify-content:center;gap:12px;margin:18px 0}.sound-check-actions button{min-height:44px}
.sound-check-report{margin-top:20px;font-size:14px;line-height:1.6}.sound-check-report table{width:100%;border-collapse:collapse;text-align:left}.sound-check-report td,.sound-check-report th{padding:6px;border-bottom:1px solid #dbe5d6}
.story-source{font-size:14px;line-height:1.5;color:#6e785f;text-align:center}.sound-check-note{font-size:15px;line-height:1.7;text-align:center}
@media print{.speak-button,.speech-status,.blend-actions,.word-blend button{display:none!important}}

#book.reading-active{aspect-ratio:auto;overflow:visible}#book.reading-active .reader-page{height:auto;min-height:0}.story-page .scene{height:auto;aspect-ratio:1.5}.story-page .sentence{position:static;width:auto;margin:0;padding:20px 4.17% 14px;font-size:clamp(20px,4.45cqw,40px);line-height:1.5}.story-page .credit,#book.reading-active .exercise .credit{position:static;margin:12px 4.17% 0;padding-bottom:14px}#book.reading-active .exercise .note{position:static;margin-top:24px;width:auto}.routine-word-help{font-size:15px;line-height:1.6;margin:18px 0}.routine-tabs>span{display:flex;align-items:center;gap:4px;background:white;padding:6px;border-radius:8px;font-size:clamp(16px,3cqw,26px)}

.cover h1.long-cover-title{font-size:3.3cqw;line-height:1.2}

/* Screen pages follow their contents. Navigation stays in the viewport. */
@media screen {
 .reader-body{padding-bottom:calc(88px + env(safe-area-inset-bottom));}
 .reader-body .reader-tools{padding:10px 16px;min-height:44px;}
 #book{width:min(900px,calc(100% - 24px));}
 #book:not(.reading-active):not(.routine-active){width:min(900px,calc(100% - 24px),calc((100dvh - 136px)*1.16129));}
 #book.reading-active,#book.routine-active{min-height:0;aspect-ratio:auto;}
 #book .routine-page,#book.reading-active .reader-page{min-height:0;height:auto;}
 .story-page .scene{height:auto;max-height:max(160px,calc(100dvh - 245px));aspect-ratio:1.5;object-fit:contain;}
 .story-page .sentence{padding:12px 4%;font-size:clamp(22px,4.45cqw,36px);line-height:1.3;}
 .story-page .credit,#book.reading-active .exercise .credit{margin:8px 0 0;padding:0 4% 10px;}
 #book.reading-active .exercise{padding:clamp(16px,3vw,28px);}
 #book.reading-active .exercise .sub{margin-bottom:18px;font-size:clamp(13px,2cqw,17px);}
 #book.reading-active .exercise .note{margin:12px 0 0;font-size:clamp(12px,1.8cqw,16px);}
 .reader-body .turn{position:fixed;z-index:60;left:50%;transform:translateX(-50%);bottom:0;width:100%;max-width:940px;margin:0;padding:10px 14px calc(10px + env(safe-area-inset-bottom));gap:12px;justify-content:space-between;background:#f8faf4f5;border-top:1px solid #d7dfd3;box-shadow:0 -4px 18px #203b2810;}
 .turn button{min-height:44px;white-space:nowrap;}
 .reader-actions{margin:14px 12px 0;}
 .lesson-layout{align-items:start;}
 .lesson-shell .lesson-page{height:auto;min-height:0;}
 .lesson-shell{padding-bottom:90px;}
 .lesson-paper .page-navigation{position:fixed;z-index:60;bottom:0;left:50%;transform:translateX(-50%);width:100%;max-width:960px;background:#f8faf4f5;padding:10px 16px calc(10px + env(safe-area-inset-bottom));border-top:1px solid #d7dfd3;}
 .lesson-done:empty,.lesson-done:not(:has(button)):has(span:empty),.routine-status:empty,.inline-status:empty{display:none;}
 .routine-status:empty{min-height:0;margin:0;}
 .speech-status{bottom:calc(78px + env(safe-area-inset-bottom));}
}
.sight-card{display:flex;flex-direction:column;justify-content:center;gap:8px;padding:18px 12px;}
.sight-card>div{font-size:clamp(25px,4cqw,38px);}
.sight-meaning{display:block;font:400 clamp(13px,1.9cqw,17px)/1.4 ReaderKorean,Arial,sans-serif;color:#687568;}
.sight-grid{gap:12px;}
.book-pick-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;}
.book-pick-card{padding:14px;background:#fff;border:1px solid #d9e3d5;border-radius:14px;min-width:0;}
.pick-prompt{display:flex;align-items:center;justify-content:center;gap:8px;}
.letter-slot{font:700 clamp(25px,4cqw,38px)/1.4 ReaderBody,Arial,sans-serif;color:#234b35;background:transparent;border:0;border-radius:10px;min-height:48px;padding:6px;cursor:pointer;}
.letter-slot:disabled{opacity:1;color:#146443;cursor:default;}
.slot-empty{display:inline-block;min-width:1.2em;border:2px dashed #92b598;border-radius:8px;color:#87a68b;margin:0 2px;}
.letter-slot.is-ready .slot-empty{background:#fff5b8;border-color:#c49716;}
.letter-slot.is-over{background:#dfefda;outline:3px solid #146443;}
.letter-bank{display:flex;justify-content:center;align-items:center;flex-wrap:wrap;gap:10px;margin:12px 0 0;}
.letter-option{display:flex;flex-direction:column;align-items:center;gap:4px;}
.letter-tile,.routine-page .letter-tile{touch-action:none;user-select:none;-webkit-user-select:none;min-width:48px;min-height:48px;padding:8px 12px;font:700 clamp(22px,4cqw,30px)/1.2 ReaderBody,Arial,sans-serif;border:1px solid #92b598;background:#fffdf1;border-radius:12px;color:#195338;cursor:grab;}
.letter-tile[aria-pressed=true]{background:#ffe779;outline:2px solid #ad7e00;}
.letter-drag-ghost{position:fixed;z-index:500;pointer-events:none;transform:translate(-50%,-65%);padding:10px 18px;border:2px solid #146443;border-radius:12px;background:#ffe779;color:#194d34;font:700 32px/1.2 Arial,sans-serif;box-shadow:0 6px 18px #0003;}
.pick-feedback{font:14px/1.5 ReaderKorean,Arial,sans-serif;color:#146443;}
.pick-feedback:not(:empty){margin-top:10px;}
.book-pick-card .word-blend{padding:10px;margin-top:0;}
.book-pick-card .completed-word{font-size:28px;}
.build-question .letter-bank{grid-column:1/-1;}
.build-question .word-blank.letter-slot{font-size:30px;}
.routine-choices.letter-bank{margin:12px 0;}
@media(max-width:600px){.book-pick-grid{grid-template-columns:1fr;}.helper-grid.sight-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;}.sight-card{padding:14px 4px;}.sight-card>div{font-size:23px;}.sight-card .speak-button{display:flex!important;margin:6px auto 0;}.reader-body .turn button{font-size:14px;padding:10px 12px;}}
@media print{.letter-option .speak-button{display:none!important;}.letter-drag-ghost{display:none!important;}}
.word-order-page .order-progress{font:14px/1.4 ReaderKorean,Arial,sans-serif;text-align:right;color:#6a7e6d;margin:0 0 12px;}
.order-listen{text-align:center;margin:12px 0 20px;}
.order-listen-button,.order-actions button{border:1px solid #9fbb9e;border-radius:12px;background:#fff;color:#146443;padding:12px 20px;min-height:44px;font:700 16px/1.4 ReaderKorean,Arial,sans-serif;}
.order-listen-button{background:#146443;color:white;}
.order-slots{display:flex;justify-content:center;gap:12px;flex-wrap:wrap;}
.order-slots>div{min-width:100px;flex:1;text-align:center;}
.order-slots small{display:block;font:14px/1.5 Arial,sans-serif;color:#749277;margin-bottom:6px;}
.order-slot{border:2px dashed #9fbb9e;background:#f6faef;width:100%;min-height:66px;font-size:clamp(21px,3.5cqw,32px);}
.order-slot .slot-empty{border:0;}
.order-slot:disabled{border-style:solid;background:#e4f3df;}
.order-bank{margin-top:24px;gap:14px;}
.order-bank .letter-tile{font-size:clamp(22px,3.5cqw,32px);min-width:90px;}
.order-status{font:15px/1.5 ReaderKorean,Arial,sans-serif;color:#146443;text-align:center;margin:20px 0 12px;}
.order-actions{display:flex;justify-content:center;gap:12px;}
.daily-book-scene{margin:12px 0 16px;border:1px solid #dce5d6;border-radius:14px;overflow:hidden;background:white;}
.daily-book-scene img{display:block;width:100%;height:auto;aspect-ratio:1.5;max-height:clamp(180px,38dvh,370px);object-fit:contain;}
.daily-book-sentence{padding:12px 16px;text-align:center;font:700 clamp(23px,4cqw,36px)/1.5 ReaderBody,Arial,sans-serif;}
.routine-player[hidden],.save-options[hidden]{display:none;}
#routine-record-status:empty{min-height:0;margin:0;}
.save-options{background:#fff;border:1px solid #d7e3d0;border-radius:12px;padding:14px;margin-top:12px;font:15px/1.5 ReaderKorean,Arial,sans-serif;}
.save-options button{margin:4px;min-height:44px;}
.save-note{font-size:13px;color:#617568;margin:8px 0 0;}
@media(max-width:600px){.order-slots{gap:8px;}.order-slots>div{min-width:90px;}.daily-book-sentence{font-size:24px;padding:10px;}.routine-record-controls button{font-size:14px;min-height:44px;padding:8px 12px;}}

/* Completed choices and end-only reader controls. */
.reader-actions[hidden],.routine-choices[hidden],[data-r-reveal][hidden]{display:none!important;}

/* Only show recording actions when they are available. */
.routine-record-controls button:disabled{display:none;}
.routine-record-controls:empty{display:none;}

.book-pick-card .letter-bank[hidden]{display:none!important;}
