:root{--orange:#ee7321;--char:#33383d;--grey:#6c757d;--line:#d9dddf;color:var(--char);font-family:Arial,Helvetica,sans-serif;font-synthesis:none}
*{box-sizing:border-box}body{margin:0;background:#e9ebed;height:100vh;height:100dvh;display:flex;flex-direction:column;overflow:hidden}button,input{font:inherit}button{cursor:pointer;color:inherit;border:0;background:transparent;min-width:44px;min-height:44px;border-radius:7px;transition:background .15s}button:hover{background:#e9edf0}button:disabled{opacity:.3;cursor:default}button:focus-visible,input:focus-visible{outline:3px solid var(--orange);outline-offset:3px}header{display:flex;align-items:center;gap:24px;padding:12px 24px;background:white;border-bottom:1px solid var(--line);z-index:3;flex-shrink:0}.logo{width:142px;height:48px;object-fit:contain}.title{border-left:1px solid var(--line);padding-left:24px;font-size:14px;line-height:1.6}.title span{display:block;font-size:9px;letter-spacing:1.4px;color:var(--grey)}.title i{display:inline-block;width:3px;height:3px;background:var(--orange);margin:0 7px 2px}nav{margin-left:auto;display:flex;gap:3px}nav button{display:flex;align-items:center;justify-content:center;flex-direction:column;gap:5px;padding:6px 11px;font-size:10px}nav svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}#help{font-size:18px;font-weight:bold}#stage{position:relative;flex:1;min-height:0;display:flex;justify-content:center;align-items:center;overflow:hidden;background:radial-gradient(ellipse at 50% 30%,#fafbfc 0,#e8eaec 65%,#dde1e4 100%)}.stage-note{position:absolute;top:17px;font-size:9px;letter-spacing:2.4px;color:#717980;pointer-events:none}.dot{display:inline-block;width:5px;height:5px;background:var(--orange);margin-right:8px;vertical-align:middle}#book-shell{position:relative;filter:drop-shadow(0 14px 18px #1c283032)}#book{touch-action:pan-y}.page{background:#fff;overflow:hidden}.page img{display:block;width:100%;height:100%;object-fit:contain;user-select:none;-webkit-user-drag:none}.page::after{content:"";position:absolute;inset:0;pointer-events:none;box-shadow:inset 0 0 1px #3335}.page.--left::after{background:linear-gradient(90deg,transparent 94%,#00000014)}.page.--right::after{background:linear-gradient(90deg,#00000014,transparent 6%)}.arrow{position:absolute;top:50%;transform:translateY(-50%);border:1px solid #cfd4d7;border-radius:50%;background:#ffffffa8;font-size:23px;width:46px;height:46px;z-index:2}#previous{left:22px}#next{right:22px}.hint{position:absolute;bottom:10px;font-size:11px;color:#68727a;margin:0}.hint span{margin:0 12px;color:#ee7321}footer{display:flex;align-items:center;gap:12px;padding:10px 24px;background:#fff;border-top:1px solid var(--line);z-index:3;flex-shrink:0}#progress{flex:1;min-width:25px;accent-color:var(--orange);cursor:pointer;height:24px}#jump{display:flex;align-items:center;gap:7px;font-size:12px;white-space:nowrap}#page-number{width:51px;height:34px;border:1px solid var(--line);border-radius:5px;text-align:center;padding:4px;appearance:textfield}#page-number::-webkit-inner-spin-button{appearance:none}#jump button{min-width:34px;font-weight:bold}#total{color:var(--grey)}#spread-label{font-size:11px;border-left:1px solid var(--line);padding-left:16px;min-width:115px;color:var(--grey)}dialog{border:1px solid var(--line);border-radius:14px;padding:24px;color:var(--char);box-shadow:0 24px 100px #0005;width:min(580px,94vw);max-height:90dvh}dialog::backdrop{background:#172129a8;backdrop-filter:blur(5px)}.dialog-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:16px}.dialog-head h2{font-size:22px;margin:0}.dialog-head small{display:block;font-size:9px;letter-spacing:2px;color:var(--grey);margin-bottom:8px}.dialog-head button{background:#eef0f2}.dialog-head button:hover{background:#dce0e3}dialog p{font-size:14px;line-height:1.6}#pages-dialog{width:min(1100px,94vw)}#thumb-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(120px,1fr));gap:20px}#thumb-grid button{padding:6px;text-align:left;border:2px solid transparent}#thumb-grid button[aria-current=true]{border-color:var(--orange);background:#fff3e9}#thumb-grid img{width:100%;aspect-ratio:595.5/842.25;display:block;box-shadow:0 3px 10px #0002;margin-bottom:8px}#thumb-grid span{font-size:12px}#zoom-dialog{width:96vw;height:94dvh;max-height:94dvh;padding:16px;overflow:hidden}#zoom-dialog .dialog-head{height:44px}.zoom-controls{display:flex;align-items:center;gap:6px}#zoom-value{min-width:50px;text-align:center;font-size:12px}#zoom-scroll{height:calc(100% - 60px);overflow:auto;background:#dfe3e6;cursor:grab;touch-action:pan-x pan-y}#zoom-scroll.dragging{cursor:grabbing}#zoom-image{display:block;max-width:none;margin:16px auto;user-select:none;-webkit-user-drag:none}#share-url{width:100%;padding:12px;border:1px solid var(--line);border-radius:6px}.dialog-actions{display:flex;gap:10px;margin-top:12px}.dialog-actions button{background:var(--char);color:white;padding:0 18px}#share-note{font-size:12px;color:var(--grey)}dl{font-size:13px;line-height:1.6}dt{font-weight:bold}dd{margin:0 0 12px;color:var(--grey)}#toast{position:fixed;bottom:85px;left:50%;transform:translateX(-50%);padding:12px 20px;border-radius:9px;background:var(--char);color:white;z-index:100;font-size:13px;pointer-events:none;opacity:0;max-width:90vw}#toast.show{opacity:1}.no-js{position:fixed;inset:40%;background:white;padding:20px}
@media(max-width:1100px){.title{font-size:12px;padding-left:16px}header{gap:16px;padding:10px 16px}nav button{padding:6px 8px}.logo{width:120px}}
@media(max-width:850px){.title{display:none}header{gap:4px}nav{gap:0}nav button{padding:4px 7px}.logo{width:112px}.stage-note{font-size:8px;letter-spacing:1.5px}footer{gap:6px;padding:7px 12px}#spread-label{display:none}.arrow{width:38px;min-width:38px;height:38px;min-height:38px}#previous{left:8px}#next{right:8px}}
@media(max-width:540px){header{padding:7px 10px}.logo{width:102px;height:37px}nav button{min-width:36px;padding:4px 7px}nav span{display:none}nav svg{width:18px;height:18px}#help{min-width:30px}.hint{font-size:10px;bottom:12px}.hint span{margin:0 5px}.hint{font-size:0}.hint:after{content:'Swipe or drag a corner to turn · Tap Zoom for detail';font-size:10px}.arrow{top:auto;bottom:38px;transform:none;background:#fff9}#previous{left:15px}#next{right:15px}.dialog-head h2{font-size:17px}.zoom-controls{gap:2px}.zoom-controls button{min-width:34px}#zoom-dialog{padding:10px}#zoom-value{min-width:42px}#jump label{display:none}footer{padding:6px 9px}footer>button{min-width:34px}dialog{padding:16px}}
@media(max-height:520px){.stage-note,.hint{display:none}header{padding:3px 14px}.logo{height:32px}nav button{min-height:36px}nav span{display:none}footer{padding:2px 14px}.arrow{top:50%;bottom:auto;transform:translateY(-50%)}}
@media(prefers-reduced-motion:reduce){*{transition:none!important}}
@media(max-width:360px){.logo{width:85px}nav button{min-width:32px;padding:4px 5px}#help{min-width:26px}}

/* Revision: replace full-width footer with unobtrusive floating page indicator. */
footer{display:none!important}
#page-widget{position:fixed;bottom:17px;left:50%;transform:translateX(-50%);display:flex;align-items:center;gap:2px;padding:3px;background:#ffffffeb;border:1px solid #d6d9db;border-radius:40px;box-shadow:0 5px 25px #26334224;z-index:4;backdrop-filter:blur(8px)}
#page-widget button{min-width:35px;min-height:32px;height:32px;padding:0 8px;border-radius:30px;font-size:14px}
#page-widget #page-display{min-width:110px;font-size:11px;font-weight:600;letter-spacing:.1px;white-space:nowrap}
#toast{bottom:65px}
#stage{width:100%;min-width:0}
#book-shell{flex:none;max-width:none}
body:fullscreen,html:fullscreen{width:100vw;height:100vh}
@media(max-width:540px){#page-widget{bottom:12px}#page-widget button{min-height:30px;height:30px} .hint{display:none}.arrow{bottom:50px}}
@media(max-height:540px){#page-widget{bottom:5px}#page-widget button{min-height:27px;height:27px}}
