/* v4.4 长篇童话绘本阅读器 */
.reader-card{width:min(96vw,1120px);max-height:94vh;padding:22px 26px 26px;background:linear-gradient(145deg,#fffaf0,#f7f0ff 62%,#eef9f4);border:1px solid rgba(117,91,142,.14);font-family:"Comic Sans MS","Noto Sans SC","Microsoft YaHei",sans-serif}
.reader-card::before{content:"";position:absolute;inset:8px;border:1px dashed rgba(182,139,95,.25);border-radius:25px;pointer-events:none}
.reader-card>h2{margin:2px 60px 12px;color:#574568;font-size:clamp(22px,3vw,34px);letter-spacing:.04em}
.reader-card>img{max-height:34vh;min-height:220px;object-fit:contain;background:linear-gradient(145deg,#eadff0,#fff4db);box-shadow:0 14px 34px rgba(72,54,92,.14);transition:opacity .25s ease,transform .35s ease}
.reader-scene-title{margin:12px auto 4px;color:#765e87;font-size:13px;font-weight:1000;letter-spacing:.12em}
.reader-ruby-text{display:block;margin:6px auto 8px;max-width:920px;min-height:112px;padding:15px 20px;border-radius:22px;background:rgba(255,255,255,.72);color:#41394a;font-family:"Comic Sans MS","Noto Sans SC","Microsoft YaHei",sans-serif;font-size:clamp(18px,2.1vw,24px);font-weight:800;line-height:2.05;text-align:left;letter-spacing:.025em;box-shadow:inset 0 0 0 1px rgba(127,97,146,.08)}
.reader-ruby-text ruby{display:inline-ruby;ruby-align:center;margin:0 .025em}.reader-ruby-text rt{color:#9b70aa;font-family:"Noto Sans SC","Microsoft YaHei",sans-serif;font-size:.47em;font-weight:800;letter-spacing:0;line-height:1.2}
.reader-paragraph{display:inline;border-radius:8px;transition:background .2s,color .2s}.reader-paragraph::after{content:" ";white-space:pre}.reader-paragraph.reading{background:linear-gradient(transparent 52%,rgba(255,213,109,.54) 52%);color:#30243b}.reader-ruby-text.is-reading{box-shadow:inset 0 0 0 2px rgba(235,177,88,.35),0 10px 24px rgba(112,80,128,.09)}
.book-reader.hide-pinyin rt{display:none}.book-reader.hide-pinyin .reader-ruby-text{line-height:1.8}
.reader-status{min-height:24px;margin:5px 0 8px;color:#6f6280;font-size:12px;font-weight:900}
.reader-advanced-controls{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:8px;margin:12px 0 4px;padding:10px;border-radius:19px;background:rgba(105,81,127,.07)}
.reader-advanced-controls button{min-height:48px;padding:10px 15px;border:0;border-radius:999px;background:#fff;box-shadow:0 5px 12px rgba(69,51,82,.1);color:#594867;font-size:12px;font-weight:1000;cursor:pointer}.reader-advanced-controls button.active{background:linear-gradient(135deg,#755f93,#9a7db1);color:#fff}.reader-advanced-controls button.needs-retry{background:#ffe5c0;color:#9b5d25}.reader-advanced-controls button:disabled{opacity:.45;cursor:default}
.reader-controls{position:relative;z-index:2}.reader-controls button{min-width:120px}.reader-controls #readerPlay{min-width:255px;background:linear-gradient(135deg,#f3c96e,#efa78a);color:#513d4e;box-shadow:0 7px 16px rgba(188,130,81,.22)}
.reader-mosaic{grid-auto-rows:82px;gap:10px;padding:8px;border-radius:19px;background:rgba(255,255,255,.5)}.reader-mosaic button{box-shadow:0 5px 12px rgba(61,48,72,.1);transition:transform .2s,border-color .2s}.reader-mosaic button:hover{transform:translateY(-2px)}.reader-mosaic button.current{border-color:#efb95b;box-shadow:0 0 0 3px rgba(239,185,91,.18)}
@media(max-width:760px){.reader-card{padding:16px 12px}.reader-card>img{min-height:160px;max-height:29vh}.reader-ruby-text{padding:12px;font-size:18px;line-height:2.05}.reader-advanced-controls{gap:6px}.reader-advanced-controls button{flex:1 1 42%;padding:9px 8px}.reader-controls button{min-width:0}.reader-mosaic{grid-auto-rows:62px}}
@media(max-height:720px) and (orientation:landscape){.reader-card{display:grid;grid-template-columns:minmax(280px,.9fr) minmax(420px,1.35fr);grid-template-areas:"title title" "image story" "nav story" "mosaic tools";gap:8px;align-items:start}.reader-card>h2{grid-area:title;margin:0}.reader-card>img{grid-area:image;width:100%;height:34vh;min-height:0}.reader-card>.reader-controls:first-of-type{grid-area:nav}.reader-scene-title,.reader-status,.reader-ruby-text{grid-column:2}.reader-mosaic{grid-area:mosaic;margin:0;grid-auto-rows:48px}.reader-advanced-controls{grid-area:tools;margin:0}.reader-card>.reader-controls:last-of-type{grid-area:tools;align-self:end}.reader-classroom-path{grid-column:1/3}}

#generationTalk,#generationTalkV4{display:none!important}

/* v4.7 有声四宫格阅读页 */
.reader-panel-stage{width:min(920px,100%);margin:0 auto;border-radius:24px;overflow:hidden;background:linear-gradient(145deg,#eadff0,#fff4db);box-shadow:0 14px 34px rgba(72,54,92,.14)}.reader-panel-stage img{display:block;width:100%;height:min(41vh,520px);object-fit:contain}.reader-panel-captions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;width:min(920px,100%);margin:10px auto}.reader-panel-captions.three-panel article:first-child{grid-row:span 2}.reader-panel-captions article{position:relative;min-height:70px;padding:10px 12px 10px 40px;border-radius:15px;background:#fff9eb;color:#4f4257;text-align:left;box-shadow:inset 0 0 0 1px #e8d9bf}.reader-panel-captions article>span{position:absolute;left:10px;top:10px;display:grid;place-items:center;width:23px;height:23px;border-radius:50%;background:#efb95b;color:#fff;font-size:11px;font-weight:1000}.reader-panel-captions b{display:block;font-size:13px}.reader-panel-captions p{margin:5px 0 0;color:#866a7b;font-size:12px;font-weight:800}.book-reader.hide-reader-text .reader-panel-captions,.book-reader.hide-reader-text .reader-ruby-text{display:none}.book-reader.hide-reader-text .reader-panel-stage img{height:min(68vh,700px)}@media(max-width:700px){.reader-panel-captions{grid-template-columns:1fr}.reader-panel-captions.three-panel article:first-child{grid-row:auto}.reader-panel-stage img{height:33vh}}

/* v4.8 单页有声绘本 */
.reader-panel-stage{position:relative}.reader-cover-title{position:absolute;left:7%;right:7%;bottom:8%;padding:18px 22px;border-radius:24px;background:linear-gradient(135deg,rgba(35,28,59,.88),rgba(104,67,112,.82));color:#fff;text-align:center;font:1000 clamp(24px,4vw,48px)/1.2 "Noto Serif CJK SC","Microsoft YaHei";text-shadow:0 2px 6px #0006;box-shadow:0 12px 35px #1d163b55}.reader-page-summary{display:block!important;margin:12px 0;padding:0!important;background:transparent!important}.reader-page-summary article{padding:14px 18px;border-radius:18px;background:linear-gradient(135deg,#fff4d3,#f8e3d2);color:#57485f}.reader-page-summary b{display:block;font-size:16px;line-height:1.65}.reader-page-summary p{margin:5px 0 0;font-size:12px;color:#877582}.reader-panel-stage img{aspect-ratio:4/3;object-fit:cover}.hide-reader-text .reader-page-summary{display:none!important}


/* v4.9：四/六宫格绘本主画面与清晰缩略导航 */
.reader-card{display:block!important;width:min(96vw,1180px)!important;max-height:94vh!important;overflow-y:auto!important;padding:20px 24px 26px!important;scrollbar-gutter:stable}
.reader-panel-stage{display:block!important;width:min(100%,980px)!important;min-height:320px;margin:8px auto 0!important;border:8px solid #fff!important;border-radius:28px!important;background:#efe8f2!important;overflow:hidden!important;box-shadow:0 16px 38px #3f31502b!important}
.reader-panel-stage img{display:block!important;width:100%!important;height:auto!important;min-height:320px!important;max-height:56vh!important;aspect-ratio:4/3!important;object-fit:contain!important;background:#f5efe8!important;border-radius:19px!important}
.reader-story-overlay{position:absolute;z-index:4;left:4%;right:4%;bottom:3%;display:flex;align-items:center;justify-content:center;gap:10px;flex-wrap:wrap;padding:10px 16px;border:3px solid #fff9;border-radius:18px;background:linear-gradient(135deg,rgba(255,250,231,.96),rgba(250,226,239,.94));color:#4d4057;box-shadow:0 8px 22px #3526412e;pointer-events:none}
.reader-story-overlay b{font-size:clamp(14px,1.8vw,20px);line-height:1.45}.reader-story-overlay span{padding:5px 9px;border-radius:12px;background:#fff;color:#8b5570;font-size:clamp(12px,1.45vw,17px);font-weight:900}
.reader-cover-title{z-index:5;bottom:6%!important;left:10%!important;right:10%!important;padding:14px 20px!important;font-size:clamp(22px,3.5vw,43px)!important}
.reader-scene-title{font-size:16px!important;margin:10px auto 5px!important}.reader-status{margin:3px 0 8px!important}.reader-page-summary{width:min(100%,980px);margin:8px auto!important}.reader-page-summary article{padding:9px 14px!important}.reader-page-summary p{display:none}
.reader-ruby-text{width:min(100%,980px);max-height:210px;min-height:92px;overflow-y:auto;margin:8px auto!important;padding:13px 18px!important;font-size:clamp(16px,1.7vw,21px)!important;line-height:1.8!important}
.reader-mosaic{display:flex!important;grid-template:none!important;grid-auto-rows:unset!important;width:min(100%,980px);margin:10px auto!important;padding:9px!important;gap:9px!important;overflow-x:auto!important;overflow-y:hidden!important;scroll-snap-type:x proximity;background:#ffffffb8!important}
.reader-mosaic button,.reader-mosaic button:nth-child(n){display:block!important;flex:0 0 126px!important;width:126px!important;height:86px!important;grid-column:auto!important;grid-row:auto!important;border:3px solid transparent!important;border-radius:14px!important;scroll-snap-align:start;overflow:hidden!important}
.reader-mosaic button.current{border-color:#efb95b!important;box-shadow:0 0 0 3px #efb95b30!important}.reader-mosaic img{width:100%!important;height:100%!important;object-fit:cover!important;border-radius:10px!important}.reader-mosaic span{z-index:3}
.reader-advanced-controls{width:min(100%,980px);margin:10px auto 4px!important;padding:8px!important}.reader-controls{margin:8px auto!important}
.generation-cells{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:10px!important;overflow:hidden!important}.generation-cells span{width:100%!important;min-width:0!important;transform:none!important}
@media(max-width:700px){.reader-card{padding:14px 10px 20px!important}.reader-panel-stage{min-height:210px!important;border-width:5px!important}.reader-panel-stage img{min-height:210px!important;max-height:43vh!important}.reader-story-overlay{left:3%;right:3%;padding:7px 10px}.reader-story-overlay span{display:none}.reader-ruby-text{max-height:175px}.reader-mosaic button,.reader-mosaic button:nth-child(n){flex-basis:100px!important;width:100px!important;height:68px!important}.generation-cells{grid-template-columns:repeat(2,minmax(0,1fr))!important}}
