/* Original storybook edition, ages 0–5. style.css is the preserved source. */
.ui-icon{display:inline-block;width:1.4em;height:1.4em;vertical-align:middle;flex-shrink:0;pointer-events:none}
[hidden]{display:none!important}
.back,.continue,.bigbutton{display:inline-flex;align-items:center;justify-content:center;gap:10px}
.navicon{display:inline-flex;align-items:center}.navlabel{display:inline}
@media(max-width:740px){.navlabel{display:none}.top nav button{width:48px;height:48px;padding:10px}.navicon{font-size:20px}}
.reading-shell{height:100vh;height:100dvh;min-height:0;padding:16px max(16px,env(safe-area-inset-right)) max(10px,env(safe-area-inset-bottom)) max(16px,env(safe-area-inset-left));overflow:hidden}
.reading-frame{height:100%;min-height:0;display:grid;grid-template-rows:auto minmax(0,1fr) auto;gap:12px;max-width:1280px}
.reading-frame>.top{margin:0;gap:16px;flex-wrap:nowrap}
.reading-frame .wordmark{font-size:27px;line-height:1.03;padding:0}
.reading-frame .top nav{gap:10px;flex-wrap:nowrap}
.reading-frame .top nav button{min-height:45px;padding:10px 15px;font-size:13px;box-shadow:0 3px 0 #b98b86}
.reading-frame>.reader{width:100%;max-width:1180px;min-width:0;min-height:0;height:100%;display:grid;grid-template-rows:auto minmax(0,1fr) auto;gap:14px;margin:0 auto}
.booktop{margin:0;gap:16px;min-height:46px;font-size:14px}
.booktop .back{min-height:44px;padding:10px 16px;font-size:14px}
.bookcount{color:#efdfef;font-size:13px;line-height:1.4;white-space:nowrap}
.storybook{min-height:0!important;height:100%;min-width:0;grid-template-columns:43% minmax(0,57%);grid-template-rows:minmax(0,1fr);border-width:6px;border-radius:23px;overflow:hidden}
.storybook.text-only{grid-template-columns:minmax(0,1fr);max-width:100%}
.storyillustration.page-scene{position:relative;min-height:0!important;height:100%;overflow:hidden}
.storyillustration.page-scene .page-art{position:absolute;inset:0;width:100%;height:100%!important;min-height:0!important;max-height:100%;object-fit:cover}
.storypaper,.storybook.text-only .storypaper{min-height:0!important;min-width:0;max-height:100%;padding:clamp(22px,3vw,42px);display:flex;flex-direction:column;justify-content:center;gap:16px;overflow:hidden}
.storypaper .bookeyebrow{font-size:10px;line-height:1.4;letter-spacing:1.5px;flex-shrink:0}
.storypaper h2{font-size:clamp(23px,2.5vw,34px);line-height:1.2;margin:0;flex-shrink:0;overflow-wrap:anywhere}
.storypaper .storytext{min-height:0;min-width:0;max-height:100%;font-size:clamp(24px,2.5vw,34px);line-height:1.55;overflow:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;scrollbar-width:thin;scrollbar-color:#c5a0c9 transparent;overflow-wrap:break-word;margin:0;padding-right:5px;flex:0 1 auto}
.reader[data-density=short] .storytext{font-size:clamp(29px,3vw,40px)}
.reader[data-density=long] .storytext{font-size:clamp(22px,2vw,29px);line-height:1.55}
.text-only .storytext{max-width:48ch}
.reader-dock{position:relative;min-width:0;display:grid;gap:12px;padding:0 4px}
.readingtimebar{display:flex;align-items:center;justify-content:center;flex-wrap:nowrap;gap:10px;margin:0;max-width:none;color:#eadcec;min-height:34px;font-size:12px;line-height:1.4;font-weight:500}
.readingtimebar .clock-icon{display:flex;align-items:center;color:#e8c688}
.readingtimebar .clock-icon .ui-icon{width:17px;height:17px}
.readingtimebar [data-clock-label]{padding:0;min-width:0;line-height:1.4}
.readingtimebar .back{min-height:34px;padding:7px 10px;border-radius:12px;border-width:1px;font-size:12px;background:#fff3d8;white-space:nowrap}
.readingtimebar .back .ui-icon{width:17px;height:17px}
.pagecontrols{display:grid;grid-template-columns:minmax(100px,1fr) minmax(80px,1.3fr) minmax(100px,1fr);align-items:center;gap:16px;width:min(100%,640px);max-width:640px;margin:0 auto;padding:0}
.pagecontrols button{display:inline-flex;align-items:center;justify-content:center;gap:10px;min-width:0;min-height:54px;padding:12px 18px;border-width:2px;border-radius:16px;font-size:18px;line-height:1.3;box-shadow:0 3px 0 #a97c91}
.pagecontrols button .ui-icon{width:23px;height:23px}
.pagecontrols button:disabled{opacity:.4;cursor:default}
.page-location{display:grid;place-items:center;gap:9px;min-width:0;color:#f6e8f2;font-size:12px;line-height:1.3}
.dots{display:flex;gap:7px;justify-content:center}
.dots span{width:6px;height:6px}
.dots span.active{transform:none;background:#f1d095}
.reading-frame>.syncstatus{padding:0;min-height:16px;font-size:10px;line-height:1.5;color:#cfbcd8}
.quiz{margin:0 auto 28px}
.quizpaper{padding:clamp(24px,4vw,42px)}
.quiztop{gap:18px;line-height:1.6;font-size:14px}
.questionline{gap:20px;margin:28px 0}
.questionline h1{font-size:clamp(26px,3.5vw,38px);line-height:1.3;margin:0;flex:1}
.speaker{display:grid;place-items:center;min-width:56px;min-height:56px;width:56px;height:56px;border-width:2px;border-radius:17px;flex-shrink:0}
.speaker .ui-icon{width:26px;height:26px}
.answers{gap:18px}
.answerline{gap:14px}
.answer{min-height:64px;padding:20px 22px;border-width:2px;border-radius:17px;font-size:clamp(20px,2.5vw,26px);line-height:1.5;font-weight:700}
.answerline .smallspeaker{flex-basis:56px;min-width:56px;min-height:64px;width:56px;height:auto}
@media(max-width:1000px){}
@media(max-width:740px){.shell:not(.reading-shell){padding:20px max(16px,env(safe-area-inset-right)) 28px max(16px,env(safe-area-inset-left))}
.master-global,.master-reader{padding:24px}
.master-reader .setting{gap:16px}
.master-reader select{width:auto;max-width:58%;min-width:0}
.reading-shell{padding:10px max(12px,env(safe-area-inset-right)) max(8px,env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left))}
.reading-frame{grid-template-rows:minmax(0,1fr) auto;gap:8px}
.reading-frame>.top{display:none}
.reading-frame>.reader{gap:12px}
.booktop{min-height:42px;gap:12px}
.booktop .back{padding:9px 12px;min-height:42px;font-size:13px}
.bookcount{font-size:12px}
.storybook{grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(72px,24%) minmax(0,1fr);border-width:4px;border-radius:21px}
.storybook.text-only{grid-template-rows:minmax(0,1fr)}
.storypaper,.storybook.text-only .storypaper{padding:20px 22px;gap:12px}
.storypaper .bookeyebrow{font-size:9px;letter-spacing:1.3px}
.storypaper h2{font-size:25px;line-height:1.22}
.storypaper .storytext{font-size:25px;line-height:1.5;max-width:none}
.reader[data-density=short] .storytext{font-size:32px;line-height:1.5}
.reader[data-density=long] .storytext{font-size:23px;line-height:1.5}
.readingtimebar{gap:8px;justify-content:center;min-height:33px}
.readingtimebar .clock-icon{display:none}
.readingtimebar .back{font-size:11px;padding:7px 8px;gap:6px;min-height:33px}
.readingtimebar [data-clock-label]{font-size:11px}
.pagecontrols{gap:16px;grid-template-columns:minmax(88px,1fr) minmax(75px,1fr) minmax(88px,1fr)}
.pagecontrols button{min-height:52px;padding:12px 14px;font-size:17px;gap:7px}
.page-location{font-size:11px;gap:8px}
.dots{gap:5px}
.dots span{width:5px;height:5px}
.reader-dock{gap:10px;padding:0 2px}
.reading-frame>.syncstatus{font-size:9px;min-height:14px}}
@media(max-width:480px){.master-global,.master-reader,.voice-controls{padding:24px 20px}
.master-reader .setting{flex-direction:column;align-items:flex-start;margin:24px 0}
.master-reader select{width:100%;max-width:100%}
.master-reader .setting:has(input[type=checkbox]){flex-direction:row;justify-content:space-between;align-items:center}
.reader-summary{gap:18px;align-items:center}
.reader-summary img{width:64px;height:78px}
.reader-summary h2{font-size:25px}
.quizpaper{padding:26px 20px}
.questionline{gap:16px;margin:26px 0}
.questionline h1{font-size:26px}
.answer{font-size:21px;padding:18px 16px}
.answerline{gap:12px}
.answerline .smallspeaker{min-width:50px;width:50px;flex-basis:50px}
.speaker{min-width:50px;width:50px;height:52px;min-height:52px}
.speaker .ui-icon{width:24px;height:24px}
.reading-frame>.reader{gap:10px}
.booktop .back{font-size:12px;padding:9px 10px;gap:6px}
.booktop .back>.ui-icon{width:17px;height:17px}
.bookcount{font-size:11px}
.storybook{border-radius:18px}
.storypaper,.storybook.text-only .storypaper{padding:18px 20px;gap:12px}
.storypaper h2{font-size:24px}
.storypaper .storytext{font-size:24px}
.reader[data-density=short] .storytext{font-size:31px}
.reader[data-density=long] .storytext{font-size:22px}
.readingtimebar{flex-wrap:wrap;justify-content:space-between;gap:6px}
.readingtimebar [data-clock-label]{flex:1 1 165px;font-size:10px}
.readingtimebar .back{font-size:10px;padding:6px 8px;min-height:30px}
.readingtimebar .back .ui-icon{width:14px;height:14px}
.readingtimebar #wake-reading:not([hidden]){flex-basis:100%;order:3}
.pagecontrols{grid-template-columns:minmax(82px,1fr) minmax(70px,1fr) minmax(82px,1fr);gap:12px}
.pagecontrols button{min-height:50px;padding:11px 12px;font-size:16px;gap:6px}
.pagecontrols button>.ui-icon{width:20px;height:20px}
.page-location{font-size:10px;gap:8px}
.reader-dock{gap:10px}
.reading-frame>.syncstatus{font-size:9px}}
@media(max-width:360px){.shell:not(.reading-shell){padding-inline:14px}
.reading-shell{padding-inline:10px}
.storypaper,.storybook.text-only .storypaper{padding-inline:16px}
.storypaper h2{font-size:22px}
.reader[data-density=short] .storytext{font-size:29px}
.pagecontrols{gap:9px;grid-template-columns:minmax(76px,1fr) minmax(66px,1fr) minmax(76px,1fr)}
.pagecontrols button{font-size:15px;padding:10px}
.readingtimebar [data-clock-label]{flex-basis:140px}}
@media(max-height:620px) and (min-width:741px){.reading-frame>.top{display:none}
.reading-frame{grid-template-rows:minmax(0,1fr) auto}
.storypaper,.storybook.text-only .storypaper{padding:20px 26px;gap:12px}
.storypaper h2{font-size:25px}
.storypaper .storytext{font-size:24px}
.reader[data-density=short] .storytext{font-size:29px}
.reader[data-density=long] .storytext{font-size:22px}}
@media(max-height:520px) and (orientation:landscape){.reading-shell{padding:8px max(14px,env(safe-area-inset-right)) max(6px,env(safe-area-inset-bottom)) max(14px,env(safe-area-inset-left))}
.reading-frame{grid-template-rows:minmax(0,1fr) auto;gap:4px}
.reading-frame>.top{display:none}
.reading-frame>.reader{gap:8px}
.booktop{min-height:36px}
.booktop .back{min-height:36px;padding:7px 12px}
.storybook{grid-template-columns:34% minmax(0,66%);grid-template-rows:minmax(0,1fr);border-width:3px}
.storybook.text-only{grid-template-columns:minmax(0,1fr)}
.storypaper,.storybook.text-only .storypaper{padding:15px 22px;gap:9px}
.storypaper .bookeyebrow{display:none}
.storypaper h2{font-size:22px}
.storypaper .storytext{font-size:22px;line-height:1.45}
.reader[data-density=short] .storytext{font-size:27px}
.reader[data-density=long] .storytext{font-size:21px}
.reader-dock{display:grid;grid-template-columns:minmax(180px,1fr) minmax(290px,1.4fr);gap:20px;align-items:center}
.readingtimebar{flex-wrap:wrap;justify-content:flex-start;font-size:10px;gap:7px}
.readingtimebar [data-clock-label]{flex-basis:100%}
.readingtimebar .back{min-height:29px}
.pagecontrols{gap:12px}
.pagecontrols button{min-height:44px;font-size:15px;padding:9px 12px}
.page-location{font-size:10px}
.reading-frame>.syncstatus{font-size:8px;min-height:12px}}
@media(prefers-reduced-motion:reduce){}
/* Override the original fixed three-row story grid in both editions. */
.reading-frame .reader .storypaper{display:flex!important;flex-direction:column;justify-content:center;grid-template-rows:none;padding:clamp(22px,3vw,40px)!important;gap:14px}
.reading-frame .reader .storypaper h2{margin:0!important;min-height:0!important;align-self:auto;flex:0 0 auto}
.reading-frame .reader .storypaper .storytext{align-self:stretch;min-height:0;flex:0 1 auto}
@media(max-width:740px){.reading-frame .reader .storypaper{padding:18px 20px!important;gap:12px}}
@media(max-height:520px) and (orientation:landscape){.reading-frame .reader .storypaper{padding:12px 18px!important;gap:10px}.reading-frame .reader .storypaper .bookeyebrow{display:none!important}}

.action-block{display:grid;justify-items:start;gap:24px;margin:32px 0 0}.action-block>button,.action-block>.note{margin:0!important}.action-block>.note{line-height:1.7}.settings-actions{display:flex;flex-wrap:wrap;align-items:center;gap:18px}.settings-actions>button{margin:0!important}.home-level{display:inline-flex;align-items:center;gap:8px;margin-top:22px;padding:10px 16px;border-radius:14px;background:#fff3d8;color:#573369;font-weight:700}

@media(max-width:640px){.tilegrid,.bookgrid{grid-template-columns:minmax(0,1fr);gap:22px}.adventure img{height:clamp(190px,55vw,280px)}}
