:root{color-scheme:dark;--ink:#fff;--muted:#c8b9ca;--accent:#d865bd;--surface:#211022;--line:#ffffff20;font-family:Arial,Helvetica,sans-serif}
*{box-sizing:border-box}body{margin:0;background:radial-gradient(ellipse at 50% 40%,#57304f 0,#321a33 48%,#170d1b 100%);color:var(--ink);min-height:100dvh}button,a,select{-webkit-tap-highlight-color:transparent}button,select{font:inherit}button{color:inherit;cursor:pointer}button:disabled{opacity:.25;cursor:default}button:focus-visible,a:focus-visible,select:focus-visible{outline:3px solid #efabdf;outline-offset:5px}a{color:inherit}.topbar{height:76px;padding:16px 32px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--line);gap:20px}.topbar a{display:flex}.topbar img{object-fit:contain}.book-title{font-size:16px;letter-spacing:.04em;color:#f5eaf5}.header-actions,.zoom-actions{display:flex;align-items:center;gap:8px}.tool{display:inline-flex;align-items:center;justify-content:center;gap:9px;border:1px solid transparent;border-radius:100px;padding:10px 16px;background:transparent;min-height:44px;font-size:14px;white-space:nowrap}.tool:hover{background:#ffffff10;border-color:#ffffff22}.icon{display:inline-flex;width:21px;height:21px;flex-shrink:0}.icon svg{height:100%;width:100%;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.icon-only{width:44px;padding:10px}.scene{height:calc(100dvh - 164px);min-height:300px;position:relative;display:flex;align-items:center;justify-content:center;padding:18px 76px 8px;overflow:hidden}.book-shell{position:relative;filter:drop-shadow(0 22px 20px #0005)}#book{height:100%;width:100%;transition:transform .6s cubic-bezier(.2,.7,.2,1)}.book-shell.is-cover:not(.portrait) #book{transform:translateX(-25%)}.book-shell.is-back:not(.portrait) #book{transform:translateX(25%)}.page{background:#f8f3ec;overflow:hidden;position:relative}.page>img{position:absolute;inset:0;width:100%;height:100%;object-fit:fill;pointer-events:none;user-select:none;-webkit-user-drag:none}.page::after{content:"";position:absolute;inset:0;pointer-events:none;box-shadow:inset 0 0 1px #0007}.hotspot{position:absolute;display:block;z-index:3;background:transparent;border:0;padding:0;cursor:pointer}.hotspot:focus-visible{outline:3px solid #4b1a49;outline-offset:-3px;background:#ffffff35}.page-nav{position:absolute;top:50%;transform:translateY(-50%);border:1px solid #ffffff35;background:#ffffff0b;border-radius:50%;width:48px;height:48px;display:grid;place-items:center;z-index:20}.page-nav:hover:not(:disabled){background:#ffffff20}.previous{left:22px}.next{right:22px}.reader-controls{height:56px;margin:auto;max-width:740px;display:flex;align-items:center;justify-content:space-between;gap:16px;padding:0 24px}.page-counter{display:flex;gap:7px;align-items:center;white-space:nowrap;color:var(--muted);font-size:14px}select{background:#ffffff0b;border:1px solid #ffffff24;border-radius:8px;padding:8px;color:white;min-height:40px;cursor:pointer}option{background:#281529}.reading-hint{text-align:center;font-size:12px;color:#c8b9ca;margin:0;padding:3px 15px 12px;min-height:32px}#loading{position:absolute;background:#281529f2;padding:18px 24px;border-radius:30px;pointer-events:none;font-size:14px}#loading[hidden]{display:none}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}dialog{border:1px solid #ffffff25;background:#211523;color:white;border-radius:18px;padding:0;box-shadow:0 30px 100px #0008;max-height:90dvh}dialog::backdrop{background:#08030bc9;backdrop-filter:blur(8px)}.dialog-header{padding:15px 20px;display:flex;align-items:center;justify-content:space-between;gap:20px;border-bottom:1px solid #ffffff20}.dialog-header h2{font-size:20px;margin:0}.thumbnails{display:grid;grid-template-columns:repeat(4,minmax(110px,1fr));gap:22px;padding:24px;max-width:860px}.thumbnail{background:none;border:0;text-align:left;min-width:0;padding:0;font-size:14px}.thumbnail img{display:block;aspect-ratio:3/4;width:100%;border-radius:3px;box-shadow:0 5px 18px #0005;transition:transform .2s}.thumbnail:hover img{transform:translateY(-5px)}.thumbnail span{display:block;line-height:1.45;margin-top:9px;color:#e3d7e5}.thumbnail.active img{outline:3px solid var(--accent);outline-offset:4px}#zoom-dialog{height:94dvh;max-height:94dvh;width:min(96vw,1200px)}#zoom-dialog .dialog-header{height:72px}#zoom-label{font-size:14px}.zoom-scroll{height:calc(100% - 72px);overflow:auto;background:#160e19;overscroll-behavior:contain;padding:20px;text-align:center;touch-action:pan-x pan-y pinch-zoom}.zoom-scroll img{display:block;width:max(100%,min(1000px,180vw));max-width:none;height:auto;margin:auto}.error{max-width:500px;text-align:center;line-height:1.6}.error a{display:block;margin-top:12px}
@media(max-width:760px){.topbar{height:66px;padding:12px 16px;gap:8px}.topbar img{width:90px;height:31px}.book-title{font-size:14px}.header-actions{gap:0}.tool{padding:9px 12px}.header-actions .tool{padding:9px}.header-actions #sound-label{display:none}.scene{height:calc(100dvh - 165px);padding:12px 16px;min-height:250px}.page-nav{width:36px;height:42px;border-radius:10px;background:#211022b3;top:auto;bottom:0;transform:none}.previous{left:18px}.next{right:18px}.reader-controls{padding:0 12px;gap:6px;height:60px}.reading-hint{font-size:12px;padding-bottom:15px;min-height:39px}.reader-controls .tool{font-size:14px;gap:6px;padding:8px}.thumbnails{grid-template-columns:repeat(2,minmax(110px,1fr));gap:20px;overflow:auto;max-height:72dvh}.dialog-header{padding:10px 14px;gap:10px}.zoom-actions{gap:0}.zoom-scroll{padding:8px}.book-shell{filter:drop-shadow(0 12px 13px #0007)}}
@media(prefers-reduced-motion:reduce){#book{transition:none}.thumbnail img{transition:none}}
