html,body{height:100%;margin:0;background:#f4f5f7}body{display:flex;flex-direction:column;overflow:hidden;font-family:Inter,Arial,sans-serif}#chapter-header{flex:none;position:relative;z-index:30;min-height:56px}.chapter-host{flex:1;min-height:0;display:flex}#chapter-reader{display:block;border:0;width:100%;height:100%;flex:1;min-width:0;background:#f4f5f7}.chapter-skip{position:fixed;top:-60px;left:16px;z-index:100;background:white;color:var(--brand-primary);padding:10px 14px;border-radius:8px}.chapter-skip:focus{top:8px}
.chapter-controls{position:relative;z-index:20;flex:none;height:0}.chapter-library{position:absolute;top:16px;left:32px;display:inline-flex;align-items:center;gap:7px;padding:9px 14px;border:1px solid #e3e7ec;background:white;color:var(--brand-secondary);font:600 15px Inter,Arial,sans-serif;text-decoration:none;border-radius:10px;transition:background .18s}.chapter-library svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.chapter-library:hover{background:var(--brand-light)}.chapter-feedback{position:absolute;top:16px;right:max(20px,calc((100% - 1000px)/2))}.chapter-feedback .feedback-trigger{display:inline-flex;align-items:center;gap:7px;border:1px solid #e3e7ec;background:white;color:var(--brand-secondary);font:600 15px Inter,Arial,sans-serif;padding:9px 14px;border-radius:10px;cursor:pointer;transition:background .18s,color .18s}.chapter-feedback .feedback-trigger:hover{background:color-mix(in srgb, var(--brand-light) 45%, white);color:var(--brand-secondary)}@media(max-width:1280px){.chapter-controls{height:48px}.chapter-library{top:8px;left:20px;padding:7px 12px}.chapter-feedback{top:8px;right:20px}.chapter-feedback .feedback-trigger{padding:7px 12px}}@media(max-width:600px){.chapter-library{left:10px;font-size:14px}.chapter-feedback{right:10px}.chapter-feedback .feedback-trigger{font-size:14px}}

.chapter-feedback .feedback-trigger svg{width:17px;height:17px}

/* Keep unstyled iframe content and unsettled controls out of the loading transition. */
#chapter-reader[hidden],.chapter-loading[hidden]{display:none}
.chapter-pending #chapter-reader,.chapter-pending .chapter-controls{visibility:hidden}
.chapter-loading{position:fixed;inset:56px 0 0;z-index:25;background:#f4f5f7;display:flex;flex-direction:column;align-items:center;justify-content:flex-start;gap:22px;padding:clamp(100px,24dvh,260px) 24px 40px;box-sizing:border-box;text-align:center;color:var(--brand-primary)}
.chapter-loading .prepito-loading-text{font-size:clamp(21px,2.2vw,27px);max-width:32ch;line-height:1.6}
.chapter-loading-book{width:62px;height:62px;flex-shrink:0;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;animation:chapter-book-open 1.8s ease-in-out infinite}
.chapter-book-spark{stroke:var(--brand-accent)}
.chapter-ready #chapter-reader{animation:chapter-reveal .24s ease-out both}
.chapter-gate{max-width:560px;margin:clamp(90px,22dvh,240px) auto 24px;padding:0 24px;text-align:center;align-self:flex-start;color:var(--brand-primary)}
.chapter-gate h1{font:600 clamp(24px,3vw,30px)/1.3 BDO,Inter,sans-serif}.chapter-gate p{font:16px/1.7 Inter,Arial,sans-serif;color:#64748b}.chapter-gate a{display:block;margin-top:18px;color:var(--brand-secondary)}
@keyframes chapter-book-open{0%,100%{transform:translateY(0) scaleX(1);opacity:1}50%{transform:translateY(-4px) scaleX(.94);opacity:.8}}
@keyframes chapter-reveal{from{opacity:0;transform:translateY(4px)}to{opacity:1;transform:none}}
@media(prefers-reduced-motion:reduce){.chapter-loading-book,.chapter-ready #chapter-reader{animation:none}}
