/* Continuous illustrated poem card. Keep all reading text on opaque paper. */
#overlay { --reading-paper:#fff; }
.study-head { flex-basis:56px; padding:0 18px; gap:12px; border-bottom:0; background:var(--reading-paper); }
.study-head button { min-width:66px; padding:0; text-align:left; font-size:14px; }
.study-head button span { font-size:26px; vertical-align:-2px; margin-right:3px; }
#lessonHeading { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:13px; color:#617365; letter-spacing:.12em; }
.pinyin-toggle { flex-shrink:0; gap:6px; font-size:13px; padding:0; }
.pinyin-toggle input { width:18px; height:18px; }
.study-body { min-height:0; padding:0 0 24px; overscroll-behavior:contain; scroll-behavior:auto; }
.poem-surface { min-height:100%; display:flex; flex-direction:column; background:var(--reading-paper); }
.poem-reading { flex:0 0 auto; position:relative; z-index:1; display:flex; flex-direction:column; justify-content:flex-start; padding:22px 16px 8px; background:var(--reading-paper); }
.poem-reading h1 { margin:0; font-family:'Songti SC','STSong',serif; font-size:1.875rem; line-height:1.4; letter-spacing:.12em; color:#294b3c; overflow-wrap:anywhere; }
.poem-reading .author { margin:7px 0 0; font-size:.8125rem; line-height:1.6; color:#596f60; }
.poem-lines { margin-top:20px; }
.poem-line { font-size:1.75rem; line-height:1.7; margin:8px 0; letter-spacing:.015em; color:#294b3c; white-space:normal; overflow-wrap:anywhere; }
rt { font-size:.75rem; color:#516959; font-weight:400; line-height:1.6; letter-spacing:0; }
ruby { min-width:1.35em; }
.poem-scene { flex:1 0 auto; position:relative; height:auto; min-height:220px; margin:-1px 0 0; border-radius:0; background-position:center bottom; background-size:cover; }
.poem-scene::before { content:''; position:absolute; inset:0; background:linear-gradient(to bottom,var(--reading-paper),#fffffff5 10%,#ffffff80 30%,#ffffff00 62%); pointer-events:none; }
.poem-scene.art-missing { min-height:180px; background:var(--reading-paper); }
.poem-scene.art-missing p { position:relative; margin:50px 20px 20px; color:#647764; font-size:.8125rem; }
.reading-scroll { flex:0 0 auto; display:flex; align-items:center; justify-content:center; gap:8px; min-height:40px; margin:0; padding:7px 12px; font:inherit; font-size:.75rem; color:#526c58; background:var(--reading-paper); border:0; border-radius:0; }
.reading-scroll span { font-size:18px; }
.practice-card { margin:24px 20px 16px; padding:19px; background:#eef4e9; border:1px solid #dce7d6; border-radius:20px; }
.practice-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.practice-heading h2 { font-size:18px; margin:0; color:#355a42; }
.practice-mark { display:grid; place-items:center; width:32px; height:32px; border-radius:50%; color:#527a5a; background:#dce8d4; }
.practice-card p { margin:9px 0 13px; color:#536b59; line-height:1.75; font-size:13px; }
.practice-card .complete-practice { width:100%; margin:0; border-radius:14px; box-shadow:none; font-size:15px; }
.practice-card .completion-note { margin:10px 0 0; font-size:11px; }
.practice-card.completed { background:#f0f6e9; }
.practice-card.completed .practice-mark { background:#42724f; color:#fff; }
.practice-card.completed .complete-practice { background:#e0edda; color:#31543a; }
.practice-map { display:block; width:100%; margin:10px 0 0; padding:8px; min-height:44px; border:0; border-radius:10px; background:transparent; color:#426448; font:inherit; font-size:14px; }
.translation { margin:26px 20px 20px; }
.translation h2 { margin:0 0 16px; font-size:21px; color:#294b3c; }
.translation div { margin:10px 0; border:1px solid #e8e7de; border-radius:15px; background:#fff; padding:14px 16px; }
.translation h3 { font-size:16px; font-weight:600; line-height:1.7; margin:0 0 5px; }
.translation p { font-size:15px; line-height:1.85; color:#5b6d60; }
.reflection { margin:18px 20px 0; padding:0 16px; border-radius:16px; background:#f4f7f4; border-color:#e1e8e1; }
.reflection summary { list-style:none; display:flex; justify-content:space-between; gap:12px; min-height:56px; color:#775c47; font-size:14px; }
.reflection summary::-webkit-details-marker { display:none; }
.reflection summary::after { content:'＋'; font-size:20px; font-weight:400; }
.reflection[open] summary::after { content:'−'; }
.reflection summary small { margin-left:auto; font-size:11px; font-weight:400; }
.reflection p { color:#6e6659; }
.lesson-notes { margin:22px 20px 4px; color:#667769; font-size:12px; line-height:1.8; }
.lesson-notes summary { min-height:44px; cursor:pointer; }
.lesson-notes p { margin:8px 0; }
.reading-bar { display:block; flex-shrink:0; padding:10px 16px calc(9px + env(safe-area-inset-bottom)); background:#fff; border-top:1px solid #e4e9df; box-shadow:0 -7px 22px #4c695908; }
.reading-controls { display:grid; grid-template-columns:1fr 1.1fr 1fr; gap:8px; }
.reading-bar button { min-width:0; min-height:86px; width:100%; padding:0 3px; gap:4px; font-size:14px; }
.reading-bar .control-icon { width:46px; height:46px; border-radius:16px; background:#edf2e7; border:1px solid #dae5d2; }
.control-icon svg { width:23px; height:23px; stroke:currentColor; stroke-width:1.65; stroke-linecap:round; stroke-linejoin:round; fill:none; }
#recordBtn .control-icon { width:52px; height:52px; margin-top:-6px; background:#ac6045; border-color:#a0543b; box-shadow:0 4px 9px #8c4e3224; }
.control-label { font-weight:600; }
.reading-bar small { color:#677a6b; font-size:10px; line-height:1.4; }
.reading-bar button.unavailable .control-icon { background:#f3f3ed; border-style:dashed; color:#738273; }
.reading-bar button:disabled { color:#8b938b; }
.reading-bar button:disabled .control-icon { background:#f0f1eb; color:#929b91; border-color:#e4e7de; }
.reading-bar button.playing .control-icon { background:#416f51; border-color:#416f51; color:white; }
.stop-icon { display:none; }
#recordBtn.recording .microphone-icon { display:none; }
#recordBtn.recording .stop-icon { display:block; fill:currentColor; stroke:none; }
#recordBtn.recording .control-icon { background:#b34e4f; border-color:#a13d40; }
#recordBtn.recording small { color:#9c3d41; font-variant-numeric:tabular-nums; }
.reading-hint { margin:7px 0 0; font-size:10px; line-height:1.5; color:#71816f; text-align:center; }
.reading-bar .app-status { position:static; margin:9px 0 0; padding:9px 12px; font-size:12px; line-height:1.65; color:#35563f; background:#edf3e7; border:1px solid #dce6d5; border-radius:12px; pointer-events:auto; }
.compact-reading .poem-scene { min-height:190px; height:auto; }
.compact-reading .poem-reading { padding:18px 12px 8px; }
.compact-reading .poem-reading h1 { font-size:1.625rem; }
.compact-reading .poem-reading .author { margin-top:5px; font-size:.8125rem; }
.compact-reading .poem-lines { margin-top:15px; }
.compact-reading .poem-line { font-size:1.5rem; line-height:1.7; margin:8px 0; }
.compact-reading rt { font-size:.6875rem; }
.compact-reading .reading-scroll { min-height:40px; }
@media(max-height:650px) {
 .study-head { flex-basis:50px; }
 .reading-bar { padding:8px 12px calc(7px + env(safe-area-inset-bottom)); }
 .reading-bar button { min-height:76px; font-size:13px; gap:3px; }
 .reading-bar .control-icon { width:38px; height:38px; border-radius:13px; }
 #recordBtn .control-icon { width:44px; height:44px; margin-top:-6px; border-radius:15px; }
 .reading-bar small { font-size:9px; }
 .reading-hint { margin-top:5px; }
 .practice-card { margin:20px 16px 12px; padding:16px; }
 .translation,.reflection,.lesson-notes { margin-left:16px; margin-right:16px; }
}
@media(prefers-reduced-motion:reduce) { .study-body { scroll-behavior:auto; } }

/* Supplemental listening shares the existing single player; missing clips stay explicit. */
.translation .explanation-block { display:flow-root; }
.translation .section-audio-note { font-size:13px; line-height:1.7; color:#637463; }
.section-listen { display:flex; align-items:center; gap:7px; min-height:44px; margin:10px 0 0 auto; padding:7px 10px; border:1px solid #dbe5d6; border-radius:12px; background:#edf4e9; color:#3d6448; font:inherit; font-size:12px; }
.section-listen svg { width:20px; height:20px; fill:none; stroke:currentColor; stroke-width:1.7; stroke-linecap:round; stroke-linejoin:round; }
.section-listen:disabled { color:#687668; background:#f1f2ec; border-style:dashed; cursor:default; }
.section-listen.playing { color:#fff; background:#416f51; }
.trial-audio-note { display:block; margin:14px 0; font-size:12px; line-height:1.6; color:#607462; font-weight:400; }
.course-inventory summary { min-height:44px; display:flex; align-items:center; cursor:pointer; font-size:15px; font-weight:650; }
.inventory-table-wrap { overflow-x:auto; }
.course-inventory table { width:100%; border-collapse:collapse; font-size:12px; line-height:1.7; }
.course-inventory caption { text-align:left; padding:10px 0; color:#536b59; }
.course-inventory th,.course-inventory td { padding:9px 7px; text-align:left; vertical-align:top; border-bottom:1px solid #dfe6d9; }
.course-inventory th:first-child { white-space:nowrap; }

/* Neutral white surfaces throughout Guwen; preserve the existing illustration and accents. */
.app,.overlay,.study-body,.header,.nav,.today-card,.today-copy,.reward-section,.confirm-dialog { background:#fff; }
.translation div { border-color:#e3e8e3; }
.jiangnan-art { background-image:url('./assets/jiangnan-home-085b9fe67481.png'); }
.catalog-entry-link { margin:0 24px 22px; padding:12px 18px; border:1px solid #dae5dc; border-radius:14px; background:#fff; color:#355a42; font:inherit; min-height:44px; }
.catalog-filters { display:grid; grid-template-columns:1fr 1fr; gap:12px; margin:18px 0; }
.catalog-filters label { display:grid; gap:6px; color:#45634d; font-size:13px; }
.catalog-filters select,.catalog-filters input { width:100%; min-width:0; min-height:44px; padding:8px 10px; border:1px solid #cbd9ce; border-radius:10px; background:#fff; color:#294b3c; font:inherit; }
.catalog-search { grid-column:1/-1; }
.catalog-entry { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:16px 0; border-bottom:1px solid #e3e8e3; }
.catalog-entry div { min-width:0; }
.catalog-entry h4 { margin:0; font-size:16px; overflow-wrap:anywhere; }
.catalog-entry p { margin:5px 0; font-size:12px; }
.catalog-entry small { display:block; color:#667a6c; font-size:11px; line-height:1.6; }
.catalog-entry button,.catalog-pending { flex-shrink:0; font-size:12px; }
.catalog-pending { color:#69786d; }
.catalog-sources { margin-top:20px; }
.catalog-sources a,.lesson-notes a { color:#365f45; text-underline-offset:3px; }
.reading-beat { padding:10px 12px; border-left:3px solid #c7d9ca; background:#f4f8f5; }
.long-poem .poem-reading { padding-top:14px; padding-bottom:0; }
.long-poem .poem-reading h1 { font-size:1.625rem; }
.long-poem .poem-lines { margin-top:14px; }
.long-poem .poem-line { font-size:1.5rem; line-height:1.45; margin:5px 0; }
.long-poem rt { font-size:.6875rem; line-height:1.5; }

/* Poem typography stays in normal flow: artwork and player messages cannot resize it. */
.poem-surface { display:block; }
.poem-reading,.long-poem .poem-reading { padding:22px 16px 8px; }
.poem-reading h1,.long-poem .poem-reading h1 { font-size:1.875rem; }
.poem-lines,.long-poem .poem-lines { margin-top:20px; }
.poem-line,.long-poem .poem-line { font-size:1.75rem; line-height:1.7; margin:8px 0; }
.poem-reading rt,.long-poem rt { font-size:.75rem; line-height:1.6; }
.poem-scene { height:clamp(220px,38svh,380px);min-height:220px; }
.poem-line[data-reading="true"],.poem-line[data-reading="true"] rt { color:#b94d0c; }

.reading-settings {display:flex;justify-content:center;align-items:center;gap:8px;flex-wrap:wrap;margin:0 0 18px;font-family:inherit;}
.reading-settings button {border:1px solid #d8e5e8;border-radius:99px;padding:8px 12px;background:#fff;color:#506e78;font-size:12px;line-height:1.4;max-width:100%;}
.reading-settings #speedSettingsBtn {color:#b94d0c;white-space:nowrap;}
.poem-scene.landscape-art {background-image:linear-gradient(#ffffff00,#fff),url('./assets/jiangnan-scene.png');opacity:.75;}
#readingSettingsDialog {width:min(440px,calc(100vw - 32px));box-sizing:border-box;border:0;border-radius:22px;padding:24px;color:#203e4c;}
#readingSettingsDialog::backdrop {background:#17384955;}
.settings-heading {display:flex;align-items:center;justify-content:space-between;gap:12px;}
.settings-heading h2 {margin:0 0 24px;font-size:22px;}
.settings-heading button {background:none;border:0;font-size:26px;align-self:flex-start;}
.speed-control {display:flex;justify-content:space-between;font-weight:700;}
#readingRate {width:100%;margin:18px 0;accent-color:#b94d0c;}
.speed-endpoints {display:flex;justify-content:space-between;font-size:12px;color:#657b82;}
.settings-label {display:block;margin:26px 0 10px;}
#narrationVoice {width:100%;padding:10px;border:1px solid #d8e5e8;background:#fff;border-radius:10px;}
#readingSettingsDialog p {font-size:13px;line-height:1.7;color:#617985;}
.poem-surface.prose .poem-lines {text-align:left;}
.poem-surface.prose .poem-line {font-size:1.35rem;line-height:2.35;overflow-wrap:anywhere;}


/* A quiet home card and one consistent hand-drawn line-icon family. */
#homeView .home-content { height:100%; padding:12px 18px 20px; }
.today-card { height:100%; display:flex; flex-direction:column; border:1px solid #e2eae5; border-radius:26px; box-shadow:0 8px 28px #254b3510; }
.today-illustration { flex:1 1 auto; height:auto; min-height:200px; background-position:left center; }
.today-illustration.jiangnan-art { background-position:center; }
.today-copy { flex:0 0 auto; padding:20px 22px 22px; background:#fff; }
.today-copy h1 { margin:0 0 17px; font-family:'Songti SC','STSong',serif; font-size:30px; line-height:1.3; font-weight:600; text-align:center; letter-spacing:.14em; }
.start-reading { display:flex; align-items:center; justify-content:center; gap:12px; min-height:52px; margin:0; padding:12px 18px; border-radius:16px; background:#365f4e; font-size:16px; font-weight:550; }
.start-reading svg { width:20px; height:20px; stroke:currentColor; stroke-width:1.6; fill:none; stroke-linecap:round; stroke-linejoin:round; }
#primaryNav { border-color:#e8eeea; }
#primaryNav button { gap:4px; color:#73857b; font-size:12px; font-weight:500; }
#primaryNav .nav-icon { display:grid; place-items:center; width:50px; height:34px; border-radius:13px; }
#primaryNav svg { width:26px; height:26px; fill:none; stroke:currentColor; stroke-width:1.65; stroke-linecap:round; stroke-linejoin:round; }
#primaryNav button.selected { color:#365f4e; font-weight:650; }
#primaryNav button.selected .nav-icon { background:#edf4ef; }
#primaryNav .map-trail { stroke-width:1.4; }
.reading-settings { justify-content:flex-end; margin:0 0 12px; }
.reading-settings #speedSettingsBtn { color:#6c8176; border-color:#e6ece7; background:#fff; padding:7px 12px; }
.reading-bar { padding:9px 18px calc(10px + env(safe-area-inset-bottom)); border-color:#e8eeea; box-shadow:0 -6px 24px #254b3505; }
.reading-controls { grid-template-columns:repeat(3,1fr); gap:12px; }
.reading-bar button { min-height:78px; gap:7px; color:#365f4e; }
.reading-bar .control-icon,#recordBtn .control-icon { width:48px; height:48px; margin:0; border:0; border-radius:50%; background:#eff5f0; box-shadow:none; color:#476d58; }
.reading-bar .control-icon svg { width:29px; height:29px; stroke-width:1.55; }
#recordBtn .control-icon { background:#fbefe8; color:#a6654a; }
.reading-bar .control-label { font-size:13px; font-weight:550; letter-spacing:.02em; }
.reading-bar button:disabled { color:#9ca99f; }
.reading-bar button:disabled .control-icon { background:#f7f9f7; color:#a8b4aa; }
.reading-bar button.playing .control-icon { background:#dfeee4; color:#2f6247; }
#recordBtn.recording .control-icon { background:#b4554c; color:#fff; }
@media(max-height:650px) { #homeView .home-content { padding:8px 16px 14px; } .today-illustration { min-height:160px; } .today-copy { padding:15px 20px 18px; } .today-copy h1 { margin-bottom:12px; font-size:27px; } }

/* Illustration frames the poem in the first screen; it has no separate scroll block. */
.poem-surface { position:relative; isolation:isolate; display:flex; flex-direction:column; min-height:100%; padding:34px 0 12px; overflow:hidden; }
.poem-scene,.compact-reading .poem-scene { position:absolute; inset:0; height:100%; min-height:0; margin:0; z-index:-1; background-size:cover; background-position:center; }
.poem-scene::before { background:linear-gradient(to bottom,#ffffff10,#ffffff00 15%,#ffffff00 85%,#fff); }
.poem-reading,.long-poem .poem-reading { margin:0 30px; padding:10px 8px 12px; background:transparent; box-shadow:none; isolation:isolate; }
.poem-reading h1,.long-poem .poem-reading h1 { font-size:1.75rem; }
.poem-lines,.long-poem .poem-lines { margin-top:18px; }
.long-poem .poem-line { font-size:1.5rem; line-height:1.35; margin:3px 0; }
.long-poem rt { font-size:.625rem; line-height:1.3; }
.reading-settings { margin-bottom:8px; }
.reading-scroll { position:relative; margin-top:auto; padding-top:20px; background:transparent; }
.poem-heading[data-reading="true"] h1,.poem-heading[data-reading="true"] .author { color:#b94d0c; }
.poem-surface.prose .poem-reading { margin:0 20px; }
.poem-surface.prose .poem-line { font-size:1.35rem; line-height:2.35; margin:8px 0; }

.poem-surface { padding-top:64px; }
.poem-surface > .reading-settings { position:absolute; top:12px; right:18px; z-index:2; margin:0; }
.poem-reading,.long-poem .poem-reading { margin:0 42px; }
.reading-scroll { min-height:36px; padding:8px 12px 3px; z-index:2; }

/* A soft, curved wash protects the text without exposing a rectangular paper edge. */
.poem-reading::before { content:''; position:absolute; inset:-6px -2px; z-index:-1; pointer-events:none; background:#fff; border-radius:43% 47% 42% 46% / 12% 15% 14% 17%; box-shadow:0 0 26px 20px #fff; filter:blur(16px); }

/* Dedicated art for every readable poem, visible in the first screen without a separate image block. */
.poem-scene.dedicated-art { background-image:none; opacity:1; }
.poem-scene.dedicated-art::before { background:none; }
.poem-art-image { display:block; position:absolute; top:0; left:0; width:100%; height:auto; max-width:none; mask-image:linear-gradient(to bottom,#000 88%,transparent 100%); -webkit-mask-image:linear-gradient(to bottom,#000 88%,transparent 100%); }
.poem-reading::before { inset:-6px 0; box-shadow:0 0 14px 8px #fff; filter:blur(8px); }
#retryRecordingSave { width:100%; min-height:44px; margin-top:8px; }

/* Approved Jiangnan pilot. Other poems keep their existing reading layout. */
#overlay.picturebook-reading { --reading-paper:#fdfcf6; }
.head-speed { display:none; }
.study-head .back-label { font-size:14px; vertical-align:0; margin:0; }
.picturebook-reading .study-head { flex-basis:56px; padding:0 16px; gap:10px; background:var(--reading-paper); }
.picturebook-reading #backBtn { min-width:44px; width:44px; min-height:44px; margin-right:auto; }
.picturebook-reading #backBtn > span:first-child { font-size:36px; font-weight:300; }
.picturebook-reading .back-label,.picturebook-reading #lessonHeading { display:none; }
.picturebook-reading .pinyin-toggle { flex-direction:row-reverse; min-height:44px; padding:6px 12px; gap:8px; border:1px solid #e1e4db; border-radius:24px; font-size:14px; }
.picturebook-reading .pinyin-toggle input { appearance:none; -webkit-appearance:none; margin:0; width:30px; height:19px; border-radius:20px; background-color:#a2afa1; background-image:radial-gradient(circle at 9px 50%,#fff 6px,transparent 7px); cursor:pointer; }
.picturebook-reading .pinyin-toggle input:checked { background-color:#527a54; background-image:radial-gradient(circle at 21px 50%,#fff 6px,transparent 7px); }
.picturebook-reading .head-speed { display:block; min-width:74px; min-height:44px; width:auto; padding:6px 12px; text-align:center; font-size:14px; border:1px solid #e1e4db; border-radius:24px; }
.head-speed::after { content:'⌄'; margin-left:7px; }
.picturebook-reading .study-body { padding-bottom:24px; background:var(--reading-paper); }
.picturebook-reading .poem-surface { padding:16px 0 10px; min-height:100%; }
.picturebook-reading .reading-settings { display:none; }
.picturebook-reading .poem-reading { margin:0 38px; padding:0 0 20px; }
.picturebook-reading .poem-reading::before { display:none; }
.picturebook-reading .poem-reading h1 { font-family:'Kaiti SC','STKaiti','KaiTi','Songti SC',serif; font-size:44px; font-weight:500; line-height:1.25; letter-spacing:.16em; text-indent:.16em; color:#263c31; }
.picturebook-reading .poem-reading .author { margin:4px 0 0; font-family:'Kaiti SC','STKaiti','KaiTi','Songti SC',serif; font-size:16px; line-height:1.5; letter-spacing:.18em; color:#344e3c; }
.picturebook-reading .poem-lines { display:grid; gap:7px; margin-top:16px; }
.picturebook-reading .poem-line { margin:0; font-family:'Kaiti SC','STKaiti','KaiTi','Songti SC',serif; font-size:28px; line-height:1; letter-spacing:0; color:#263c31; white-space:nowrap; }
.picturebook-reading .poem-line ruby { min-width:1.25em; line-height:1; }
.picturebook-reading rt { font-family:system-ui,-apple-system,sans-serif; font-size:11px; line-height:1.15; color:#354d40; }
.picturebook-reading .poem-art-image { height:100%; object-fit:cover; object-position:center center; mask-image:none; -webkit-mask-image:none; }
.picturebook-reading .reading-scroll { align-self:center; min-height:44px; padding:9px 14px; margin-bottom:3px; border-radius:24px; background:#fdfcf6ed; color:#385a43; }
.picturebook-reading .reading-bar { padding:10px 16px calc(8px + env(safe-area-inset-bottom)); box-shadow:none; }
.picturebook-reading .reading-controls { grid-template-columns:repeat(3,1fr); gap:0; }
.picturebook-reading .reading-controls > button { position:relative; min-height:84px; gap:5px; }
.picturebook-reading .reading-controls > button + button::before { content:''; position:absolute; left:0; top:24px; height:25px; width:1px; background:#e4e9e1; }
.picturebook-reading .control-icon,.picturebook-reading #recordBtn .control-icon { width:48px; height:48px; border:0; }
.picturebook-reading #originalBtn .control-icon { background:#588462; color:#fff; }
.picturebook-reading #recordBtn .control-icon { background:#e78365; color:#fff; }
.picturebook-reading #replayBtn .control-icon { background:#deebe0; color:#51705b; }
.picturebook-reading #replayBtn:disabled .control-icon { background:#e4e9e3; color:#789080; }
.picturebook-reading #originalBtn.playing .control-icon { background:#3f6b4e; }
.picturebook-reading #recordBtn.recording .control-icon { background:#b4554c; }
.picturebook-reading .control-label { font-size:14px; font-weight:500; color:#344e3c; }
.picturebook-reading .play-icon { display:block; fill:currentColor; stroke:none; }
.picturebook-reading #originalBtn .book-icon,.picturebook-reading #replayBtn .headphones-icon { display:none; }
.picturebook-reading #replayBtn .waveform-icon { display:block; }
.play-icon,.waveform-icon { display:none; }
@media(max-height:740px) {
 .picturebook-reading .poem-surface { padding-top:10px; }
 .picturebook-reading .poem-reading h1 { font-size:36px; }
 .picturebook-reading .poem-lines { margin-top:12px; gap:4px; }
 .picturebook-reading .poem-line { font-size:25px; }
 .picturebook-reading .reading-controls > button { min-height:76px; }
}
@media(min-width:600px) and (min-height:900px) {
 .picturebook-reading .poem-surface { padding-top:22px; }
 .picturebook-reading .poem-reading h1 { font-size:48px; }
 .picturebook-reading .poem-lines { margin-top:30px; gap:17px; }
 .picturebook-reading .poem-line { font-size:32px; }
 .picturebook-reading rt { font-size:12px; }
}
@media(forced-colors:active) {
 .picturebook-reading .pinyin-toggle input { appearance:auto; -webkit-appearance:auto; }
}

.picturebook-reading .poem-heading[data-reading="true"] h1,.picturebook-reading .poem-heading[data-reading="true"] .author,.picturebook-reading .poem-line[data-reading="true"],.picturebook-reading .poem-line[data-reading="true"] rt { color:#b94d0c; }
.pause-icon { display:none; }
.picturebook-reading #originalBtn[aria-label="暂停原文"] .play-icon { display:none; }
.picturebook-reading #originalBtn[aria-label="暂停原文"] .pause-icon { display:block; }

@media(min-width:600px) {
 .app:has(> #overlay.picturebook-reading:not([hidden])) { width:min(640px,100vw); height:min(1120px,100dvh); }
}

@media(max-height:740px) {
 .picturebook-reading .poem-art-image { object-position:center top; }
}

/* Approved cartoon illustration layers; live text and media behavior are retained. */
.cartoon-scene .poem-art-image { height:100%; object-fit:cover; object-position:center center; mask-image:none; -webkit-mask-image:none; }

.cartoon-scene .reading-scroll { align-self:center; min-height:44px; padding:9px 14px; border-radius:24px; background:#fffffff0; }

/* Continuous canvas for completed cartoon frames. Keep controls above the art. */
.reading-stage { position:relative; isolation:isolate; display:flex; flex-direction:column; flex:1 1 auto; min-height:0; overflow:hidden; }
.reading-backdrop { position:absolute; inset:0; z-index:0; pointer-events:none; overflow:hidden; }
.reading-backdrop img { display:block; width:100%; height:100%; object-fit:cover; object-position:center 40%; }
.reading-stage > .study-head,.reading-stage > .study-body { position:relative; z-index:1; }
.reading-stage > .study-body { min-height:0; }
.cartoon-reading .study-head { background:transparent; border-bottom:0; }
.cartoon-reading .study-head button,.cartoon-reading .pinyin-toggle { background:#ffffffd9; border-radius:24px; }
.cartoon-reading #backBtn { padding:0 8px; }
.cartoon-reading #lessonHeading { color:#314d3e; text-shadow:0 0 3px #fff; }
.cartoon-reading .study-body { padding-bottom:0; background:transparent; }
.cartoon-reading .poem-surface { background:transparent; }
.cartoon-reading .poem-scene { opacity:0; pointer-events:none; }
/* The PNG already provides central reading paper; don't paint over corner characters. */
.cartoon-reading .poem-reading::before { display:none; }
.cartoon-reading .poem-reading h1,.cartoon-reading .poem-reading .author,.cartoon-reading .poem-line,.cartoon-reading rt { text-shadow:0 0 3px #ffffffe8,0 1px 2px #fff; }
.cartoon-reading .translation,.cartoon-reading .reflection,.cartoon-reading .lesson-notes { background:#fff; }
@media(min-width:600px) {
 .app:has(> #overlay.cartoon-reading:not([hidden])) { width:min(640px,100vw); height:min(1120px,100dvh); }
}

.cartoon-reading[data-art-key="f2ee5d8573ca"] .poem-surface { padding-top:42px; }
@media(max-height:700px) {
 .cartoon-reading:not(.picturebook-reading) .long-poem { padding-top:42px; }
 .cartoon-reading:not(.picturebook-reading) .long-poem .poem-line { font-size:1.3rem; line-height:1.3; margin:2px 0; }
}

/* One continuous reading sheet after the illustration: shared edges and clear type roles. */
.lesson-content { position:relative; width:100%; min-width:0; padding:32px 24px 40px; background:#fff; color:#41594a; }
.lesson-content > .translation { margin:0; padding:0; border:0; border-radius:0; background:transparent; min-width:0; }
.lesson-content > .translation + .translation { margin-top:32px; padding-top:28px; border-top:1px solid #e7ece8; }
.lesson-content .section-heading,.lesson-content .entry-heading { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:12px; min-width:0; }
.lesson-content h2 { margin:0; font-size:22px; line-height:1.45; font-weight:700; color:#284b37; letter-spacing:.02em; overflow-wrap:anywhere; min-width:0; }
.lesson-content h3 { margin:0; font-size:18px; line-height:1.55; font-weight:600; color:#314d3c; overflow-wrap:anywhere; min-width:0; }
.lesson-content p { margin:12px 0 0; font-size:16px; line-height:1.9; font-weight:400; color:#41594a; overflow-wrap:anywhere; }
.lesson-content .section-audio-note,.lesson-content .completion-note { font-size:13px; line-height:1.75; color:#647568; }
.lesson-content .section-audio-note { margin-top:10px; }
.lesson-content .explanation-entry { margin:22px 0 0; padding:0; border:0; border-radius:0; background:transparent; }
.lesson-content .explanation-entry + .explanation-entry { margin-top:22px; padding-top:22px; border-top:1px solid #edf1ed; }
.lesson-content .section-listen { margin:0; padding:8px 12px; min-height:44px; max-width:100%; border:1px solid #dce7dd; border-radius:24px; background:#f3f7f3; font-size:13px; line-height:1.4; color:#355842; white-space:nowrap; }
.lesson-content .section-listen svg { flex:0 0 18px; width:18px; height:18px; }
.lesson-content .section-listen:disabled { color:#647568; background:#f6f7f5; border-style:dashed; }
.lesson-content .section-listen.playing { color:#fff; background:#416f51; }
.lesson-content .reading-beat { margin-top:10px; }
.lesson-content .practice-card { margin:34px 0 0; padding:28px 0 0; border:0; border-top:1px solid #e7ece8; border-radius:0; background:transparent; }
.lesson-content .practice-heading { gap:12px; min-width:0; }
.lesson-content .practice-heading h2 { min-width:0; }
.lesson-content .practice-mark { flex:0 0 32px; }
.lesson-content .complete-practice { width:100%; margin:18px 0 0; min-height:48px; border-radius:14px; font-size:16px; }
.lesson-content .completion-note { margin-top:12px; }
.lesson-content > .reflection,.lesson-content > .lesson-notes { margin:28px 0 0; padding:0; border:0; border-top:1px solid #e7ece8; border-radius:0; background:transparent; }
.lesson-content summary { min-height:56px; padding:14px 0; gap:12px; font-size:16px; line-height:1.6; color:#355842; overflow-wrap:anywhere; }
.lesson-content .reflection summary small { font-size:12px; line-height:1.6; color:#647568; }
.lesson-content .reflection p,.lesson-content .lesson-notes p { margin:0 0 14px; font-size:14px; line-height:1.85; color:#647568; }
.lesson-content .lesson-notes a { overflow-wrap:anywhere; }
@media(min-width:600px) {
 .lesson-content { padding:36px 36px 48px; }
 .lesson-content p { font-size:17px; line-height:1.95; }
 .lesson-content > .translation + .translation { margin-top:36px; padding-top:32px; }
}

.lesson-content .reflection-listen { margin:0 0 14px; }
