*{box-sizing:border-box}body{margin:0;background:#080e19;color:#f3ead9;font:16px/1.5 system-ui,sans-serif}a{color:#e2cda8}header{display:flex;align-items:center;gap:20px;padding:16px 24px;border-bottom:1px solid #d7b67a40}h1{font:24px Georgia,serif;flex:1;margin:0}h1 small{display:block;font:14px system-ui,sans-serif;margin-top:4px}button,select{font:inherit;background:#142031;color:#f3ead9;border:1px solid #d7b67a66;border-radius:4px;min-height:44px;padding:8px 12px}button{cursor:pointer}button:disabled{opacity:.4;cursor:default}:focus-visible{outline:3px solid #d7b67a;outline-offset:2px}.controls{position:sticky;top:0;z-index:2;background:#080e19f5;padding:10px 12px;display:flex;align-items:center;justify-content:center;gap:8px;flex-wrap:wrap;border-bottom:1px solid #d7b67a40}.pages{width:min(calc(100% - 24px),960px);margin:24px auto}figure{margin:0 0 24px;scroll-margin-top:130px}img{display:block;width:100%;height:auto}footer{padding:35px 20px;text-align:center}footer h2{font:28px Georgia,serif}@media(max-width:600px){header{padding:12px;gap:12px}header a{font-size:14px}h1{font-size:21px}.controls{gap:6px}button,select{font-size:14px;padding:8px}label{font-size:14px}.pages{margin-top:12px}}[hidden]{display:none!important}.reader-status{margin:12px;text-align:center}.reader-status:empty{display:none}#bookViewport{width:100%;overflow:auto;padding:20px 12px}#bookStage{margin:0 auto;display:flex;justify-content:center;min-width:0}#flipBook{margin:auto}.book-page{background:#eee6d5;box-shadow:inset 0 0 8px #0003;overflow:hidden}.book-page img{width:100%;height:100%;object-fit:contain}.bottom-controls{display:flex;align-items:center;justify-content:center;gap:20px;padding:16px 12px;position:sticky;bottom:0;background:#080e19f5;z-index:3;border-top:1px solid #d7b67a40}.bottom-controls span{min-width:105px;text-align:center;font-size:14px}.retry-image{position:absolute;top:45%;left:10%;width:80%;white-space:normal;background:#142031}figure{position:relative}.controls{background:#080e19}body{overflow-x:auto}footer{padding-bottom:40px}@media(max-width:600px){#bookViewport{padding:12px 6px}.bottom-controls{gap:12px}.controls label{font-size:14px}}
#flipBook{transition:transform 700ms ease-in-out}#zoomDialog{position:fixed;inset:0;margin:0;padding:0;width:100vw;height:100dvh;max-width:none;max-height:none;border:0;background:#080e19;color:#f3ead9;overflow:hidden}#zoomDialog[open]{display:flex;flex-direction:column}#zoomDialog::backdrop{background:#080e19}.zoom-toolbar{display:flex;align-items:center;justify-content:center;gap:8px;padding:10px 12px;flex-wrap:wrap;border-bottom:1px solid #d7b67a40}.zoom-toolbar strong{margin-right:auto;font-size:16px}.zoom-help{text-align:center;margin:6px 0;font-size:14px;color:#d6c9b3}#zoomViewport{position:relative;display:flex;align-items:center;justify-content:center;flex:1;min-height:0;width:100%;overflow:hidden;touch-action:none;cursor:grab;user-select:none;overscroll-behavior:contain}#zoomViewport:active{cursor:grabbing}#zoomImage{flex:none;max-width:none;max-height:none;object-fit:contain;transform-origin:center;will-change:transform;pointer-events:none}.zoom-toolbar span{min-width:45px;text-align:center}@media(prefers-reduced-motion:reduce){#flipBook{transition:none}}@media(max-width:420px){.zoom-toolbar{gap:6px;padding:8px}.zoom-toolbar strong{width:100%;text-align:center}}
#resumeNotice{padding:12px;display:flex;align-items:center;justify-content:center;gap:12px;flex-wrap:wrap}#pageThumbnails{display:grid;grid-template-columns:repeat(auto-fill,minmax(110px,1fr));gap:12px;padding:16px;max-height:55dvh;overflow:auto}#pageThumbnails button{padding:6px}#pageThumbnails img{height:145px;object-fit:contain}#pageThumbnails span{display:block;font-size:14px;margin-top:6px}#pageThumbnails [aria-current=true]{outline:2px solid #d7b67a}.reader-exits{position:fixed;right:12px;top:10px;z-index:10;display:flex;gap:8px}.reader-exits:has(button:not([hidden])){padding:4px;background:#080e19;border-radius:4px}.reader-focused>header,.reader-focused>footer,.reader-clean>header,.reader-clean>.controls,.reader-clean>footer,.reader-clean>#resumeNotice{display:none}.reader-focused .controls{padding-right:170px}.reader-clean #bookViewport{padding-top:65px}.reader-fullscreen{position:fixed;inset:0;height:100dvh;overflow:auto}.reader-focused #bookViewport{min-height:calc(100dvh - 185px)}.reader-clean .bottom-controls{background:#080e19e8}.reader-clean .reader-exits{max-width:calc(100% - 24px);flex-wrap:wrap}@media(max-width:600px){.reader-focused .controls{padding-top:62px;padding-right:12px}#pageThumbnails{grid-template-columns:repeat(3,minmax(0,1fr))}}
