/* A bounded reading stage: only the text scrolls; all controls stay visible. */
body.reading-mode{height:100dvh;overflow:hidden;background:#e9eddf}
.reading-mode>.site-header,.reading-mode>.site-footer{display:none}
.reading-mode main{height:100dvh;min-height:0;max-width:1500px;padding:16px 32px max(16px,env(safe-area-inset-bottom));display:grid;grid-template-rows:auto auto minmax(0,1fr) auto;gap:12px}
.reading-mode .reader-top{margin:0;min-height:44px}
.reading-mode .back-link{min-height:44px;align-items:center}
.reading-mode .reader-heading{margin:0}
.reading-mode .reader-heading h1{font-size:clamp(23px,2.5vw,32px);margin:3px 0}
.reading-mode .reader-heading .eyebrow{display:none}
.reading-mode .reading-layout{min-height:0;grid-template-columns:minmax(0,1.2fr) minmax(0,1fr);border-radius:20px}
.reading-mode .illustration-column{min-height:0;padding:20px;overflow:hidden}
.reading-mode .illustration-frame{min-height:0;flex:1;display:flex;align-items:center;justify-content:center;background:transparent;box-shadow:none}
.reading-mode .illustration-frame img{max-height:100%;width:100%;height:100%;object-fit:contain;aspect-ratio:auto;border-radius:12px}
.reading-mode .page-thumbs{flex-shrink:0;margin-top:12px}
.reading-mode .illustration-note,.reading-mode .keyboard-tip{display:none}
.reading-mode .text-column{min-height:0;padding:18px 24px;overflow:hidden}
.reading-mode .reading-hint{flex-shrink:0;margin:0;padding-bottom:10px;min-height:44px}
.reading-mode .sentences{min-height:0;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;padding:4px 8px 16px 0;scroll-padding:12px}
.reading-mode .sentence-en{font-size:clamp(22px,2vw,28px);line-height:1.65}
.reading-mode .reader-dock{display:flex;align-items:center;gap:24px;background:#fffefa;border:1px solid #d8e0cb;border-radius:18px;padding:12px 20px;box-shadow:0 5px 22px #233c3208}
.reading-mode .audio-panel{flex:1;min-width:0;margin:0;padding:0;border:0;background:none}
.reading-mode .audio-title{margin:0 0 5px;font-size:9px}
.reading-mode .audio-options{margin-top:3px;padding-top:0;border:0}
.reading-mode .audio-status{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.reading-mode .reader-pagination{flex:0 0 310px;margin:0;gap:14px;max-width:none}
.reading-mode .reader-pagination button{min-height:46px;padding:10px 18px}
.reading-mode .audio-slider{height:20px;margin:0;min-width:0}
.reading-mode .audio-time{font-size:9px}
.reading-mode .sentence-translate{min-height:36px}
@media(max-width:760px){
 .reading-mode main{padding:8px 12px max(8px,env(safe-area-inset-bottom));gap:7px}
 .reading-mode .reader-top{min-height:40px}.reading-mode .save-book{min-height:40px;padding:5px 12px}
 .reading-mode .reader-heading h1{font-size:21px;line-height:1.15;margin:0}.reading-mode .reader-heading p{font-size:10px;margin-top:3px}
 .reading-mode .reading-layout{grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(90px,38%) minmax(0,1fr);border-radius:14px}
 .reading-mode .illustration-column{padding:8px 10px 4px;position:relative}
 .reading-mode .illustration-frame img{border-radius:8px}
 .reading-mode .page-thumbs{margin-top:0;gap:0;height:27px}
 .reading-mode .page-thumb{height:27px;min-height:27px;width:34px;max-width:34px;border:0;padding:0;display:grid;place-items:center;opacity:1}
 .reading-mode .page-thumb img{display:none}.reading-mode .page-thumb span{display:block;font-size:10px;width:19px;height:19px;border-radius:50%;line-height:19px;color:#7d8c6c}
 .reading-mode .page-thumb.active span{background:#214b3e;color:#fff}
 .reading-mode .text-column{padding:4px 14px 0}.reading-mode .reading-hint{padding:0;min-height:35px;font-size:9px;gap:5px;flex-wrap:nowrap}
 .reading-mode .translation-toggle{font-size:10px;min-height:32px;padding:4px 7px}
 .reading-mode .sentence-en{font-size:21px;line-height:1.55}.reading-mode .sentence{padding:8px 0}.reading-mode .sentence-zh{font-size:13px;padding:7px 10px;line-height:1.7}.reading-mode .sentences{padding-bottom:12px}
 .reading-mode .reader-dock{display:grid;grid-template-columns:minmax(0,1fr);gap:5px;padding:8px 12px;border-radius:14px}
 .reading-mode .audio-title{display:none}.reading-mode .player-row{gap:9px}.reading-mode .play-button{width:40px;height:40px;min-height:40px}
 .reading-mode .audio-options{margin:0;min-height:28px}.reading-mode .auto-label,.reading-mode .replay{min-height:28px;font-size:10px}
 .reading-mode .reader-pagination{border-top:1px solid #e8ecdf;padding-top:6px;gap:10px}.reading-mode .reader-pagination button{min-height:40px;padding:7px 18px;font-size:12px}.reading-mode .page-counter strong{font-size:16px}
}
@media(max-height:550px) and (min-width:600px){
 .reading-mode main{gap:5px;padding:5px 16px}.reading-mode .reader-heading{position:absolute;top:10px;left:24%;right:24%;pointer-events:none}.reading-mode .reader-heading h1{font-size:17px}.reading-mode .reader-heading p{display:none}
 .reading-mode main{grid-template-rows:40px minmax(0,1fr) auto}.reading-mode .reading-layout{grid-template-columns:minmax(0,1fr) minmax(0,1fr);grid-template-rows:minmax(0,1fr)}
 .reading-mode .reader-dock{display:flex;padding:6px 12px;gap:14px}.reading-mode .reader-pagination{flex-basis:245px;border:0;padding:0}.reading-mode .reader-pagination button{padding:7px 10px}.reading-mode .sentence-en{font-size:19px}
}
