:root{color-scheme:dark;--ink:#eeeae1;--muted:#9c9d9d;--line:#34393b}*{box-sizing:border-box}body{margin:0;background:#14191b;color:var(--ink);font-family:Arial,'Hiragino Kaku Gothic ProN',sans-serif}button,select{font:inherit;color:inherit;background:transparent;border:1px solid var(--line);border-radius:3px;padding:10px 16px;cursor:pointer}button:hover:not(:disabled),select:hover{background:#2b3436}button:disabled{opacity:.3;cursor:default}:focus-visible{outline:2px solid #bcd9d0;outline-offset:4px}header{height:74px;margin:0 4vw;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--line)}.brand{font-size:13px;letter-spacing:.18em;color:inherit;text-decoration:none}.brand span{font-size:9px;color:var(--muted);margin-left:16px}main{max-width:1250px;margin:auto;padding:28px 24px 10px}.heading{display:flex;justify-content:space-between;align-items:end;margin-bottom:18px}.eyebrow{font-size:9px;letter-spacing:.2em;color:var(--muted);margin:0 0 8px}h1{font-size:clamp(22px,3vw,34px);font-weight:400;letter-spacing:.12em;margin:0}.edition{font-size:11px;color:var(--muted)}.stage{display:flex;align-items:center;justify-content:center;height:calc(100svh - 310px);min-height:260px;max-height:1000px;perspective:1800px;background:radial-gradient(ellipse,#273033 0%,#14191b 70%)}.book{position:relative;flex:none;filter:drop-shadow(0 16px 25px #0008);touch-action:none;user-select:none;-webkit-user-select:none}.book .page{background:#fff;overflow:hidden}.book .page img{display:block;width:100%;height:100%;object-fit:fill;pointer-events:none;-webkit-user-drag:none}.book .page::after{content:"";position:absolute;inset:0;pointer-events:none;box-shadow:inset 0 0 0 1px #0001}.book .page.--left::after{background:linear-gradient(to left,#0002,transparent 4%)}.book .page.--right::after{background:linear-gradient(to right,#0002,transparent 4%)}.book[data-dragging="true"]{cursor:grabbing}.book[data-edge="true"]{cursor:grab}.stage{overflow:hidden}.book .stf__wrapper{height:100%}#enlarge{padding:5px 10px;font-size:10px;margin-left:6px}nav{display:flex;align-items:center;justify-content:center;gap:26px;margin-top:22px}.position{display:flex;gap:10px;align-items:center;font-size:11px;color:var(--muted)}select{padding:8px;color:var(--ink);background:#14191b}#status{min-width:72px}.hint{text-align:center;color:var(--muted);font-size:10px;letter-spacing:.04em;margin:18px 0}footer{display:flex;justify-content:space-between;margin:10px 4vw 0;padding:18px 0;border-top:1px solid var(--line);color:var(--muted);font-size:9px;letter-spacing:.12em}#error{color:#f7bba5;text-align:center}dialog{width:96vw;max-width:none;height:94svh;border:1px solid var(--line);background:#14191b;padding:60px 16px 16px;overflow:auto}dialog::backdrop{background:#000d}#closeZoom{position:fixed;right:4vw;top:5svh;background:#14191b;z-index:2}#zoomPages{display:flex;justify-content:center;align-items:start;min-width:100%;gap:2px}#zoomPages img{width: min(100%,1100px);height:auto;max-width:none}#zoomPages:has(img:nth-child(2)){width:2200px;justify-content:start}#zoomPages:has(img:nth-child(2)) img{width:1100px}@media(max-width:700px){header{height:60px}.brand span{display:none}main{padding:20px 14px 6px}.stage{height:calc(100svh - 300px);min-height:240px}.book img{max-width:100%}nav{gap:12px}nav button{padding:10px 12px}.position label{display:none}.hint{font-size:9px;line-height:1.8}.hint span{display:none}footer{letter-spacing:0;font-size:8px}.edition{font-size:10px}}@media(prefers-reduced-motion:reduce){.book{transition:none}}
nav button{white-space:nowrap;flex-shrink:0}@media(max-width:420px){nav{gap:8px}.position{gap:6px}#status{min-width:52px}nav button{padding:10px 9px}select{max-width:105px}}
/* The book receives focus for arrow-key input; do not paint a frame around the paper. */
#book:focus{outline:none}

.bookshelf{color:var(--ink);text-decoration:none;letter-spacing:.1em}.bookshelf:hover{text-decoration:underline}
#readerControls{display:none}
/* Use the visible Safari viewport, respecting the notch and home indicator. */
body.immersive{overflow:hidden}
.immersive main{margin:0;padding:0;max-width:none}
.immersive .stage{position:fixed;left:0;top:var(--reader-top,0px);width:100%;height:var(--reader-height,100dvh);min-height:0;max-height:none;padding:env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);background:#14191b;z-index:10}
.immersive .heading,.immersive .hint,.immersive #error{display:none}
.immersive header,.immersive footer,.immersive nav{visibility:hidden;pointer-events:none;position:fixed;z-index:20;background:#14191beF;border:0;margin:0}
.immersive header{top:var(--reader-top,0px);left:0;right:0;height:48px;padding:6px calc(env(safe-area-inset-right) + 14px) 6px calc(env(safe-area-inset-left) + 14px)}
.immersive footer{bottom:env(safe-area-inset-bottom);left:calc(env(safe-area-inset-left) + 12px);padding:12px;font-size:10px}
.immersive footer>span{display:none}
.immersive nav{bottom:calc(env(safe-area-inset-bottom) + 8px);left:50%;transform:translateX(-50%);padding:5px 10px;border-radius:4px;gap:12px;white-space:nowrap}
.immersive.ui-visible header,.immersive.ui-visible footer,.immersive.ui-visible nav{visibility:visible;pointer-events:auto}
.immersive #readerControls{display:block;position:fixed;z-index:21;right:calc(env(safe-area-inset-right) + 12px);bottom:calc(env(safe-area-inset-bottom) + 12px);background:#14191bba;font-size:10px;padding:8px 12px}
.immersive:not(.ui-visible) #readerControls{opacity:.35}
.immersive dialog{z-index:30}
@media(max-width:600px){.immersive footer{bottom:52px}}
/* Keep iOS from turning a diagonal page drag into document scrolling. */
#book{touch-action:none}
.immersive:not(.ui-visible) #readerControls{visibility:hidden;pointer-events:none}
footer{gap:12px;flex-wrap:wrap}

/* Only visible while a required image is pending or has failed. */
.stage{position:relative}
.image-loading{position:absolute;z-index:25;bottom:12px;left:50%;transform:translateX(-50%);background:#14191bef;color:#eeeae1;padding:9px 14px;font-size:12px;white-space:nowrap;border-radius:3px}
.image-loading[hidden]{display:none}.image-loading button{font-size:11px;padding:5px 8px;margin-left:10px}
#book[data-awaiting-visible="true"]{visibility:hidden}

.book{transform-origin:center center}.inline-zoom-reset{position:absolute;right:14px;bottom:14px;z-index:26;font-size:11px;background:#14191bef}.inline-zoom-reset[hidden]{display:none}
