/* V25 — Phone-first homepage book. No scrolling inside iframe. */
html.embedded-reader,html.embedded-reader body{min-height:0;height:auto;overflow-x:hidden;overflow-y:visible}
.embedded-reader .app:not(:fullscreen):not(.focus-mode){min-height:0;height:auto;padding:12px 12px 19px;overflow:visible;max-width:none}
.embedded-reader .app:not(:fullscreen):not(.focus-mode) .intro{display:none}
.embedded-reader .app:not(:fullscreen):not(.focus-mode) .topbar{gap:6px}
.embedded-reader .app:not(:fullscreen):not(.focus-mode) .brand{font-size:clamp(16px,3vw,25px);letter-spacing:-.8px}
.embedded-reader .app:not(:fullscreen):not(.focus-mode) .branding small{font-size:8px;letter-spacing:.7px}
.embedded-reader .app:not(:fullscreen):not(.focus-mode) .top-actions{flex-shrink:0;gap:8px}
.embedded-reader .app:not(:fullscreen):not(.focus-mode) .stage{width:100%;height:auto;min-height:0;flex:0 0 auto;gap:0;margin-top:15px;padding:0 0 58px;align-items:center}
.embedded-reader .app:not(:fullscreen):not(.focus-mode) .book,
.embedded-reader .app:not(:fullscreen):not(.focus-mode) .book[data-layout="solo"],
.embedded-reader .app:not(:fullscreen):not(.focus-mode) .book[data-layout="single"]{width:min(100%,100vw - 25px,740px);max-width:100%;height:auto;aspect-ratio:var(--page-ratio);flex-shrink:1;filter:drop-shadow(0 9px 11px #61788739)}
.embedded-reader .app:not(:fullscreen):not(.focus-mode) .arrow{position:absolute;top:auto;bottom:3px;transform:none;width:48px;height:42px;border-radius:15px;background:#fffdf9;box-shadow:0 3px 12px #55778920}
.embedded-reader .app:not(:fullscreen):not(.focus-mode) .arrow:hover{transform:none}
.embedded-reader .app:not(:fullscreen):not(.focus-mode) .arrow-prev{left:calc(50% - 88px)}
.embedded-reader .app:not(:fullscreen):not(.focus-mode) .arrow-next{right:calc(50% - 88px)}
.embedded-reader .app:not(:fullscreen):not(.focus-mode) .arrow svg{width:25px;height:25px}
.embedded-reader .app:not(:fullscreen):not(.focus-mode) .footer{width:100%;margin:7px auto 0;padding:0 3px}
.embedded-reader .app:not(:fullscreen):not(.focus-mode) .reading-row{font-size:13px;margin-bottom:8px}
.embedded-reader .app:not(:fullscreen):not(.focus-mode) .bottom-row{margin-top:14px;gap:12px}
.embedded-reader .app:not(:fullscreen):not(.focus-mode) .minor{font-size:13px;padding:8px 4px}
.embedded-reader .app:not(:fullscreen):not(.focus-mode) .help-panel{font-size:13px}
.embedded-reader .app:not(:fullscreen):not(.focus-mode) .error{font-size:13px}
@media(max-width:700px){
 .embedded-reader .app:not(:fullscreen):not(.focus-mode){padding:12px 9px 17px}
 .embedded-reader .app:not(:fullscreen):not(.focus-mode) .branding small{display:none}
 .embedded-reader .app:not(:fullscreen):not(.focus-mode) .brand{font-size:19px}
 .embedded-reader .app:not(:fullscreen):not(.focus-mode) .header-button{width:43px;height:42px;padding:0;border-radius:13px}
 .embedded-reader .app:not(:fullscreen):not(.focus-mode) .header-button svg{width:20px;height:20px}
 .embedded-reader .app:not(:fullscreen):not(.focus-mode) .header-button.primary-button{width:auto;padding:0 12px}
 .embedded-reader .app:not(:fullscreen):not(.focus-mode) .header-button.primary-button #fullLabel{font-size:11px}
 .embedded-reader .app:not(:fullscreen):not(.focus-mode) .stage{margin-top:12px;padding-bottom:56px}
 .embedded-reader .app:not(:fullscreen):not(.focus-mode) .book,
 .embedded-reader .app:not(:fullscreen):not(.focus-mode) .book[data-layout="solo"],
 .embedded-reader .app:not(:fullscreen):not(.focus-mode) .book[data-layout="single"]{width:100%;max-width:100%}
 .embedded-reader .app:not(:fullscreen):not(.focus-mode) .bottom-row{justify-content:space-between}
 .embedded-reader .app:not(:fullscreen):not(.focus-mode) #readerHelp{display:none}
}
/* CSS fullscreen fallback on iPhone / browsers without the Fullscreen API. */
html.reader-focus,html.reader-focus body{height:100%;overflow:hidden}
.app.focus-mode{height:100dvh!important;min-height:100dvh!important;width:100vw!important;max-width:none!important;position:relative!important}
.app.focus-mode .stage{height:100dvh!important;max-height:100dvh!important}
.app.focus-mode .topbar{padding-top:env(safe-area-inset-top)}
.app.focus-mode .footer{bottom:max(8px,env(safe-area-inset-bottom))}
.app.focus-mode .exit-link{display:inline-flex!important}
.app.focus-mode .top-actions .header-button:not(.primary-button){display:none}
.app.focus-mode .top-actions .exit-link{height:38px;padding:0 12px}
.app.focus-mode .top-actions .header-button.primary-button{height:38px;padding:0 12px}
@media(max-width:700px){.app.focus-mode .footer{width:76vw!important;bottom:max(12px,env(safe-area-inset-bottom))}.app.focus-mode .arrow{top:48%}}
@media(min-width:901px){
 .embedded-reader .app:not(:fullscreen):not(.focus-mode) .book[data-layout="spread"]{width:min(94%,1460px);aspect-ratio:calc(2*var(--page-ratio))}
 .embedded-reader .app:not(:fullscreen):not(.focus-mode) .book[data-layout="solo"],
 .embedded-reader .app:not(:fullscreen):not(.focus-mode) .book[data-layout="single"]{width:min(55%,740px);aspect-ratio:var(--page-ratio)}
}
