html,body{height:100%;overflow:hidden}
body{margin:0;background:#111426;color:#fff9f0}
[hidden]{display:none!important}
.reader-shell{height:100dvh;display:grid;grid-template-rows:auto minmax(0,1fr);grid-template-columns:minmax(0,1fr)}
.reader-shell>*{min-width:0}
.reader-header{padding:12px 24px 10px;background:#191c34;border-bottom:1px solid #d7b89155;color:#f5ebdc;font:16px/1.4 Body,system-ui,sans-serif}
.reader-header-top{display:flex;align-items:center;justify-content:space-between;gap:18px;max-width:1100px;margin:auto}
.reader-header a{color:#f0d39d;text-decoration:none}.reader-book-title{font-family:Heading,system-ui,sans-serif;font-size:18px}
.reader-controls{display:flex;justify-content:center;align-items:center;gap:12px;max-width:1100px;margin:10px auto 0}
.reader-controls button,.reader-controls select{font:inherit;min-height:44px;border:1px solid #aaa0d877;border-radius:8px;color:#f5ebdc;background:#27253b;padding:8px 12px}
.reader-controls select{max-width:min(46vw,390px);min-width:0;flex:1}.reader-controls option{background:#191c34}
.reader-controls button{cursor:pointer}.reader-controls button:disabled{opacity:.35;cursor:default}
#guide-count{font-variant-numeric:tabular-nums;min-width:58px;text-align:center;color:#d7b891;white-space:nowrap}
.reader-hint{font:13px/1.4 Body,system-ui,sans-serif;text-align:center;color:#c3bfd7;margin:8px 0 0}
main.reader-stage{width:100%;max-width:1120px;min-height:0;height:100%;margin:0 auto;padding:18px 24px 24px;overflow:hidden;touch-action:pan-y}
.reader-stage>.guide-page{height:100%;min-height:0;margin:0;border-radius:12px;overflow:auto;overflow-x:hidden;overscroll-behavior:contain;scrollbar-gutter:stable;overflow-wrap:break-word;box-shadow:0 16px 40px #0003;cursor:pointer}
.page-enter{animation:page-sideways .2s ease-out}
@keyframes page-sideways{from{opacity:.7;transform:translateX(calc(var(--turn-direction,1)*5%))}to{opacity:1;transform:translateX(0)}}
.bedtime .guide-page.has-art{display:grid;grid-template-columns:minmax(220px,.85fr) minmax(0,1.25fr);align-content:center;align-items:center}
.bedtime .guide-page>img{width:100%;height:auto;max-height:100%;object-fit:contain;min-height:0}
.bedtime .guide-page>.copy,.bedtime .guide-page>.covertext{padding:24px;min-width:0}
.bedtime .guide-page:not(.has-art){padding:36px;max-width:780px;margin:auto}
.bedtime .guide-page h1{font-size:38px}.bedtime .guide-page h2{font-size:30px}.bedtime .guide-page h3{font-size:22px}
.bedtime .guide-page p{font-size:19px;line-height:1.48}.bedtime .guide-page .caption{font-size:12px;line-height:1.4}
.bedtime .guide-page aside{margin-top:18px}.bedtime .guide-page aside h3{margin-top:0}
.tantrums .guide-page{padding:30px 36px 24px;max-width:1000px;margin:auto;color:#191c34}
.tantrums .guide-page.dark{background:#191c34;color:#fff9f3}
.tantrums .guide-page>.art,.tantrums .guide-page>.cover{float:left;width:38%;max-width:340px;height:auto;max-height:65dvh;object-fit:contain;margin:0 28px 20px 0}
.tantrums .guide-page h1{font-size:38px}.tantrums .guide-page h2{font-size:30px}.tantrums .guide-page p{font-size:19px;line-height:1.5}
.tantrums .guide-page .eyebrow{font-size:12px;margin-bottom:20px}.tantrums .guide-page footer{clear:both;font-size:12px}
.tantrums .guide-page .cta{clear:both;min-height:48px}
.guide-page a:focus-visible,.reader-header :focus-visible{outline:3px solid #e8c68b;outline-offset:3px}
@media(max-width:760px){
 .reader-header-top{display:grid;grid-template-columns:1fr 1fr}.reader-book-title{grid-column:1/-1;grid-row:1;text-align:center}.reader-header-top>a:last-child{text-align:right}
 .reader-header{padding:10px 12px}.reader-book-title{font-size:15px}.reader-header-top{gap:12px}.reader-header-top>a{font-size:14px;white-space:nowrap}
 .reader-controls{gap:6px;margin-top:8px}.reader-controls button{font-size:14px;padding:6px 9px}.reader-controls select{font-size:14px;padding:6px;max-width:none}.reader-hint{font-size:12px;margin-top:6px}#guide-count{min-width:43px;font-size:14px}
 main.reader-stage{padding:8px 8px 12px}
 .reader-stage>.guide-page{border-radius:8px;scrollbar-gutter:auto}
 .bedtime .guide-page.has-art{display:block}
 .bedtime .guide-page>img{width:100%;height:24dvh;max-height:230px;object-fit:contain}
 .bedtime .guide-page>.copy,.bedtime .guide-page>.covertext{padding:12px 18px 24px}
 .bedtime .guide-page:not(.has-art){padding:22px}
 .bedtime .guide-page h1{font-size:30px}.bedtime .guide-page h2{font-size:27px}.bedtime .guide-page p{font-size:18px;line-height:1.5}
 .bedtime .guide-page .caption{font-size:12px}.bedtime .guide-page aside{padding:15px}
 .tantrums .guide-page{padding:22px 20px 18px}
 .tantrums .guide-page>.art,.tantrums .guide-page>.cover{float:none;width:auto;max-width:100%;height:25dvh;max-height:240px;margin:0 auto 18px}
 .tantrums .guide-page h1{font-size:31px}.tantrums .guide-page h2{font-size:25px}.tantrums .guide-page p{font-size:18px;line-height:1.5}
}
@media(prefers-reduced-motion:reduce){.page-enter{animation:none}}
