:root { color-scheme: light; --bg: #F4F7FB; --ink: #09294B; --border: #d7e0e9; --font: Arial, Helvetica, sans-serif; }
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { padding: 0; background: var(--bg); color: var(--ink); font-family: var(--font); }
.reader { display: flex; flex-direction: column; padding: 14px; width: 100%; height: 100dvh; min-height: 355px; gap: 12px; border-radius: 14px; background: var(--bg); outline-offset: -3px; }
.stage { position: relative; display: flex; flex: 1; min-height: 0; overflow: hidden; align-items: center; justify-content: center; width: 100%; }
.book { position: relative; width: 100%; height: 100%; }
.book[hidden], .launch[hidden], .state[hidden], .retry-button[hidden], .progress-track[hidden] { display: none !important; }
.launch { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; }
.cover { display: block; max-width: 100%; max-height: min(85%, 800px); width: auto; height: auto; object-fit: contain; border-radius: 2px; box-shadow: 0 11px 28px rgba(10,28,48,.18), 0 1px 4px rgba(10,28,48,.12); }
.launch-button { cursor: pointer; font: 700 14px var(--font); padding: 12px 20px; border: 1px solid #09294B; background: #09294B; color: white; border-radius: 9px; box-shadow: 0 2px 7px rgba(9,41,75,.12); transition: transform .15s, background .15s; }
.launch-button:hover { background: #153F6B; transform: translateY(-1px); }
.launch-button:focus-visible, .page-button:focus-visible, .retry-button:focus-visible, .pdf-link:focus-visible { outline: 3px solid #3c8de1; outline-offset: 3px; }
.state { position: absolute; inset: 0; z-index: 5; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 9px; padding: 22px; background: var(--bg); text-align: center; }
.state strong { font-size: 19px; }
.state p { max-width: 350px; margin: 0; font-size: 13px; line-height: 1.5; opacity: .78; }
.progress-track { background: #dce4ec; width: 180px; height: 5px; border-radius: 30px; overflow: hidden; }
.progress-bar { height: 100%; width: 0%; background: var(--ink); transition: width .18s; }
.retry-button { border: 1px solid var(--ink); background: white; color: var(--ink); font: 700 13px var(--font); border-radius: 7px; padding: 9px 16px; cursor: pointer; }
.controls { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 10px 20px; flex-shrink: 0; min-height: 44px; }
.pager { display: flex; align-items: center; gap: 10px; }
.page-label { font-size: 13px; font-weight: 600; min-width: 142px; text-align: center; }
.page-button { appearance: none; border: 1px solid var(--border); background: #fff; color: var(--ink); width: 42px; height: 42px; border-radius: 10px; font-size: 28px; line-height: 36px; cursor: pointer; font-family: var(--font); flex-shrink: 0; }
.page-button:disabled { opacity: .35; cursor: default; }
.pdf-link { color: var(--ink); font-size: 13px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 600px) { .reader { padding: 8px; gap: 9px; border-radius: 0; min-height: 310px; } .launch { gap: 12px; } .cover { max-height: 76%; } .launch-button { font-size: 12px; padding: 11px 15px; } .page-label { min-width: 120px; font-size: 12px; } .page-button { width: 38px; height: 38px; } .pdf-link { font-size: 12px; } }
@media (prefers-reduced-motion: reduce) { .launch-button { transition: none; } }
