/* Site-only reader chrome. The approved book pages and page-turn engine are preserved. */
body.site-preview{margin:0!important;overflow:hidden!important}
.site-reader{position:fixed;top:0;left:0;right:0;z-index:200;height:66px;padding:10px 24px;display:flex;gap:20px;align-items:center;justify-content:space-between;background:#f8f4edf5;border-bottom:1px solid #dcd3cb;font:15px/1.4 Arial,sans-serif;color:#342738;box-sizing:border-box}
.site-reader a{color:inherit;text-decoration:none;min-height:44px;display:flex;align-items:center;padding:10px 13px;box-sizing:border-box;border-radius:5px}
.site-reader a:focus-visible{outline:3px solid #a84c3c;outline-offset:2px}
.site-reader a:hover{background:#ece2d7}.site-reader .reader-back{padding-left:0;white-space:nowrap}
.reader-books{display:flex;align-items:center;gap:6px}.reader-books a[aria-current=page]{background:#342738;color:#fff}
.site-reader .reader-order{background:#342738;color:#fff;font-size:14px}
body.site-preview .stage{position:fixed!important;top:80px!important;bottom:80px!important;left:24px!important;right:24px!important;width:auto!important;height:auto!important;min-height:0!important;max-height:none!important;margin:0!important}
body.site-preview .nav{position:fixed!important;bottom:10px!important;left:0!important;right:0!important;height:54px!important;display:flex!important;justify-content:center!important;align-items:center!important;margin:0!important;background:transparent!important}
body.site-preview .page-nav{font-size:14px;min-height:46px;min-width:100px;box-shadow:none}
body.site-preview .counter{font-size:12px}
body.site-preview .toast{top:72px!important}
@media(max-width:650px){.site-reader{height:64px;padding:8px 12px;gap:8px;font-size:14px}.site-reader .reader-order{display:none}.site-reader a{padding:9px 10px}.reader-books{gap:3px}body.site-preview .stage{top:auto!important;left:18px!important;right:18px!important;bottom:80px!important;height:min(calc(100dvh - 160px),calc((100vw - 36px)*1.5))!important}body.site-preview .nav{bottom:12px!important}.site-reader .reader-back{padding-right:4px}}
@media(max-width:370px){.site-reader{padding:8px;font-size:13px}.site-reader a{padding:9px 7px}.reader-books{gap:2px}body.site-preview .page-nav{min-width:88px;font-size:13px}}

/* Embedded reading fills the same viewport without duplicate site controls. */
html.reader-embedded .site-reader{display:none!important}
html.reader-embedded body.site-preview .stage{top:12px!important;bottom:76px!important}
html.reader-embedded body.site-preview .toast{top:8px!important}
html.reader-booting #book,html.reader-booting .nav{visibility:hidden}
#readerStartup{position:fixed;inset:66px 0 0;display:grid;place-items:center;font:16px Arial,sans-serif;color:#342738}
html.reader-embedded #readerStartup{inset:0}
html.reader-suspended .celebration-background,html.reader-suspended .celebration-background *{animation-play-state:paused!important}
@media(max-width:650px){html.reader-embedded body.site-preview .stage{top:auto!important;bottom:calc(74px + env(safe-area-inset-bottom,0px))!important;height:min(calc(100dvh - 92px - env(safe-area-inset-bottom,0px)),calc((100vw - 36px)*1.5))!important}html.reader-embedded body.site-preview .nav{bottom:calc(10px + env(safe-area-inset-bottom,0px))!important}}

@media(max-width:900px){.site-reader .reader-order{display:none}}

/* A visible spine on every open desktop spread, including pages 1–2. */
#book[data-spread="open"] .leaf.--left::after,
#book[data-spread="open"] .leaf.--right::after{content:"";position:absolute;top:0;bottom:0;width:18px;pointer-events:none;z-index:5}
#book[data-spread="open"] .leaf.--left::after{right:0;border-right:1px solid #49385866;background:linear-gradient(90deg,transparent,#34273812)}
#book[data-spread="open"] .leaf.--right::after{left:0;border-left:1px solid #49385833;background:linear-gradient(90deg,#3427380c,transparent)}
