:root{color-scheme:light;--paper:#f7f5ef;--desk:#e8e5dd;--ink:#283327;--green:#425d3b;--muted:#67715e;--line:#d3d5ca;--header:76px;--footer:109px}
*{box-sizing:border-box}html{height:100%;-webkit-text-size-adjust:100%;text-size-adjust:100%}body{margin:0;background:var(--desk);color:var(--ink);font-family:-apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei",sans-serif;font-size:15px;overflow:hidden}button,input,a{-webkit-tap-highlight-color:transparent}button,input{font:inherit}button,a{touch-action:manipulation}button{cursor:pointer;color:inherit;border:0;background:transparent}button:disabled{opacity:.32;cursor:default}a{color:inherit}button:focus-visible,a:focus-visible,input:focus-visible{outline:3px solid #809675;outline-offset:3px}button svg,svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}.svg-defs{position:absolute;width:0;height:0;overflow:hidden}[hidden]{display:none!important}
.topbar{height:calc(var(--header) + env(safe-area-inset-top));padding:env(safe-area-inset-top) max(24px,env(safe-area-inset-right)) 0 max(24px,env(safe-area-inset-left));background:var(--paper);border-bottom:1px solid var(--line);display:flex;align-items:center;gap:24px;position:fixed;left:0;right:0;top:0;z-index:10}.brand{display:flex;align-items:center;flex:0 0 auto}.brand img{width:150px;height:50px;object-fit:contain}.book-heading{flex:1;min-width:0}.book-heading h1{font-family:"Songti SC","STSong","SimSun",serif;font-size:22px;letter-spacing:1px;line-height:1.3;font-weight:600;margin:0 0 5px}.book-heading span{font-size:12px;color:var(--muted)}.icon-button{display:flex;align-items:center;justify-content:center;gap:6px;min-width:44px;min-height:44px;border-radius:8px}.icon-button:hover,.tool-button:hover{background:#e4e9dc}.icon-button span{font-size:13px}
.stage{position:fixed;top:calc(var(--header) + env(safe-area-inset-top));bottom:calc(var(--footer) + env(safe-area-inset-bottom));left:0;right:0;overflow:auto;overscroll-behavior:contain;touch-action:pan-y pinch-zoom;scrollbar-color:#a2ad94 transparent;padding:20px 16px 0;outline:none}.single-page{width:max-content;max-width:100%;margin:0 auto;text-align:center}.single-page img{display:block;max-width:100%;width:auto;height:auto;max-height:calc(100vh - var(--header) - var(--footer) - 58px - env(safe-area-inset-top) - env(safe-area-inset-bottom));max-height:calc(100dvh - var(--header) - var(--footer) - 58px - env(safe-area-inset-top) - env(safe-area-inset-bottom));object-fit:contain;background:var(--paper);box-shadow:0 4px 20px #373a2d14;cursor:zoom-in;user-select:none}.single-page figcaption{font-size:11px;color:var(--muted);line-height:30px;letter-spacing:1px}.loading{position:absolute;left:50%;top:45%;transform:translate(-50%,-50%);background:var(--paper);padding:14px 20px;border:1px solid var(--line);border-radius:4px;z-index:2;white-space:nowrap}.page-error{text-align:center;padding:60px 20px}.reader-controls{height:calc(var(--footer) + env(safe-area-inset-bottom));padding:12px 24px calc(8px + env(safe-area-inset-bottom));position:fixed;bottom:0;left:0;right:0;z-index:10;border-top:1px solid var(--line);background:var(--paper)}.progress-row{max-width:750px;margin:0 auto;display:flex;align-items:center;gap:16px;font-size:12px;color:var(--muted);height:23px}.progress-row>span{white-space:nowrap;min-width:69px}.progress-row>span:last-child{min-width:32px;text-align:right}.progress-row input{min-width:0;flex:1;accent-color:var(--green);height:22px;cursor:pointer}.toolbar{display:flex;align-items:center;justify-content:center;gap:25px;max-width:780px;margin:4px auto 0;height:54px}.tool-button{min-width:56px;min-height:48px;display:flex;align-items:center;justify-content:center;gap:7px;border-radius:8px;font-size:13px}.page-button{min-height:48px;min-width:114px;display:flex;align-items:center;justify-content:center;gap:10px;border:1px solid var(--line);border-radius:28px;font-size:14px}.page-button:not(:disabled):hover{border-color:var(--green);background:#e9eddf}.page-number{min-height:44px;min-width:64px;font-size:12px;color:var(--muted);display:flex;align-items:center;gap:6px;justify-content:center}.page-number b{font-size:20px;color:var(--green);font-weight:600;font-variant-numeric:tabular-nums}
.modal{position:fixed;inset:0;background:#1a241b70;z-index:30;display:flex;align-items:center;justify-content:center;padding:20px}.modal-panel{background:var(--paper);border:1px solid var(--line);border-radius:12px;width:460px;max-width:100%;max-height:calc(100vh - 40px);max-height:calc(100dvh - 40px);padding:24px;overflow:auto;box-shadow:0 12px 64px #18251733}.modal-heading{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-bottom:20px}.modal-heading h2{font-size:20px;font-weight:600;margin:0;line-height:1.5}.modal-heading p{color:var(--muted);font-size:12px;margin:0 0 6px}.modal-heading .icon-button{flex:none;margin-right:-8px}.contents-panel{padding-bottom:0}.contents-list{border-top:1px solid var(--line)}.contents-item{width:100%;display:flex;align-items:center;justify-content:space-between;text-align:left;gap:15px;padding:15px 0;border-bottom:1px solid var(--line);min-height:52px}.contents-item:hover,.contents-item.active{color:var(--green)}.contents-item.active>span:first-child{font-weight:600}.contents-item small{font-size:12px;color:var(--muted);display:block;margin-top:6px;font-weight:400}.contents-item .chapter-page{font-size:12px;color:var(--muted);flex:none}.reading-options{padding:20px 0}.reading-options button{display:flex;align-items:center;justify-content:center;gap:8px;border:1px solid var(--green);border-radius:24px;min-height:44px;width:100%;font-size:14px}.reading-options p{text-align:center;color:var(--muted);font-size:12px;line-height:1.6;margin:15px 0 0}.jump-panel label{font-size:13px;color:var(--muted);display:block;margin-bottom:15px}.jump-panel input{border:1px solid var(--line);border-radius:6px;width:100%;padding:14px;font-size:24px;color:var(--green);background:#fff;outline-offset:2px}.error-text{font-size:13px;color:#963f36;min-height:20px}.primary-button,.secondary-button{width:100%;min-height:48px;border-radius:26px;font-size:15px;display:flex;align-items:center;justify-content:center;text-decoration:none;padding:10px 20px}.primary-button{background:var(--green);color:white;border:1px solid var(--green)}.secondary-button{border:1px solid var(--line);margin-top:12px}.share-panel{text-align:center}.share-panel .modal-heading{text-align:left}.muted{color:var(--muted);font-size:13px;line-height:1.7}.qr-image{width:220px;height:220px;max-width:75%;object-fit:contain;display:block;margin:18px auto;background:white}.share-panel strong{font-family:"Songti SC","SimSun",serif;font-size:25px;letter-spacing:1px}.share-subtitle{font-size:12px;color:var(--muted);margin:9px 0 22px}.small-note{font-size:11px;color:var(--muted);margin:14px 0 0}
.zoom-modal{padding:0;background:#efede6}.zoom-panel{display:flex;flex-direction:column;width:100%;height:100vh;height:100dvh;max-height:var(--visual-height,100dvh);padding-top:env(safe-area-inset-top)}.zoom-heading{min-height:64px;flex:none;padding:8px max(16px,env(safe-area-inset-right)) 8px max(16px,env(safe-area-inset-left));display:flex;align-items:center;justify-content:space-between;gap:10px;border-bottom:1px solid var(--line);background:var(--paper)}.zoom-heading h2{font-size:14px;margin:0;white-space:nowrap}.zoom-heading>div{display:flex;align-items:center;gap:2px}.zoom-heading button{min-width:44px;min-height:44px;font-size:19px}.zoom-heading #zoom-fit{font-size:13px}.zoom-heading span{font-size:12px;min-width:35px;text-align:center;color:var(--muted)}.zoom-scroll{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;touch-action:pan-x pan-y pinch-zoom}.zoom-scroll img{display:block;width:180%;height:auto;max-width:none;min-width:100%;margin:0;user-select:none}.zoom-note{padding:8px 10px calc(8px + env(safe-area-inset-bottom));background:var(--paper);margin:0;text-align:center;font-size:11px;color:var(--muted)}.toast{position:fixed;left:50%;bottom:calc(var(--footer) + 18px + env(safe-area-inset-bottom));transform:translateX(-50%);border-radius:6px;background:#283327ee;color:white;font-size:13px;line-height:1.6;padding:12px 18px;max-width:90%;width:max-content;z-index:50;text-align:center}.continuous-pages{width:720px;max-width:100%;margin:0 auto}.continuous-page{width:100%;margin:0 0 26px;text-align:center}.continuous-page img{display:block;width:100%;height:auto;background:var(--paper);cursor:zoom-in;box-shadow:0 3px 15px #373a2d0b}.continuous-page figcaption{font-size:11px;color:var(--muted);line-height:30px}.noscript{position:fixed;inset:100px 20px auto;padding:20px;background:white;z-index:20}.stage.continuous{padding-bottom:8px}
@media(max-width:600px){:root{--header:62px;--footer:104px}.topbar{gap:14px;padding-left:max(14px,env(safe-area-inset-left));padding-right:max(10px,env(safe-area-inset-right))}.brand img{width:100px;height:36px}.book-heading h1{font-size:18px;margin-bottom:3px}.book-heading span{font-size:10px}.icon-button span{display:none}.stage{padding:12px 8px 0}.single-page img{max-height:calc(100vh - var(--header) - var(--footer) - 42px - env(safe-area-inset-top) - env(safe-area-inset-bottom));max-height:calc(100dvh - var(--header) - var(--footer) - 42px - env(safe-area-inset-top) - env(safe-area-inset-bottom))}.single-page figcaption{line-height:28px}.reader-controls{padding-top:9px;padding-left:12px;padding-right:12px}.progress-row{gap:9px;font-size:11px}.progress-row>span{min-width:64px}.toolbar{gap:5px;justify-content:space-between;height:56px;margin-top:2px}.tool-button{min-width:45px;gap:3px;flex-direction:column;font-size:10px}.tool-button svg{width:20px;height:20px}.page-button{min-width:80px;gap:3px;font-size:12px;min-height:44px}.page-button svg{width:17px;height:17px}.page-number{min-width:51px;gap:3px;font-size:10px}.page-number b{font-size:18px}.modal{padding:12px;align-items:flex-end}.modal-panel{width:100%;max-height:calc(var(--visual-height,100dvh) - 24px);border-radius:16px 16px 10px 10px;padding:20px 20px calc(20px + env(safe-area-inset-bottom))}.contents-panel{padding-bottom:0}.modal-heading{margin-bottom:14px}.share-panel .modal-heading h2{font-size:18px}.qr-image{width:180px;height:180px;margin:10px auto}.share-subtitle{margin-bottom:16px}.zoom-modal{padding:0}.zoom-heading{padding-left:12px;padding-right:4px;gap:4px;min-height:56px}.zoom-heading button{min-width:38px;min-height:44px}.zoom-heading h2{font-size:12px}.zoom-heading span{font-size:11px}.zoom-heading #zoom-fit{font-size:12px}}
@media(max-width:345px){.brand img{width:83px;height:32px}.topbar{gap:9px}.book-heading h1{font-size:16px}.page-button{min-width:68px}.tool-button{min-width:40px}.toolbar{gap:2px}.modal-heading h2{font-size:18px}.zoom-heading h2{max-width:72px;overflow:hidden;text-overflow:ellipsis}}
@media(max-height:480px) and (orientation:landscape){:root{--header:48px;--footer:86px}.topbar .brand img{width:100px;height:36px}.book-heading h1{font-size:17px;margin:0}.book-heading span{display:none}.reader-controls{padding-top:4px;padding-bottom:4px}.toolbar{height:48px;margin-top:0}.tool-button{flex-direction:row;font-size:12px}.stage{padding-top:8px}.single-page img{max-height:none;width:470px}.modal{align-items:center}.modal-panel{max-height:calc(var(--visual-height,100dvh) - 24px)}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important}}
.topbar-actions{display:flex;align-items:center;gap:5px;flex:none}.music-button{position:relative;padding:0 10px;flex:none}.music-button.is-playing{color:var(--green);background:#e4e9dc}.music-button.is-playing::after{content:"";position:absolute;right:7px;top:7px;width:5px;height:5px;border-radius:50%;background:var(--green)}.music-button.is-loading{color:var(--muted)}.music-credit{padding:0 0 22px;text-align:center;line-height:1.8;color:var(--muted)}.music-credit p{font-size:12px;margin:0 0 8px}.music-credit small{font-size:10px;display:block;overflow-wrap:anywhere}.music-credit a{text-underline-offset:3px}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
@media(max-width:600px){.topbar{gap:10px}.topbar-actions{gap:2px}.music-button{flex-direction:column;gap:0;padding:3px 0;min-width:44px}.music-button svg{width:20px;height:20px}.music-button span{display:block;font-size:9px;line-height:15px}.music-credit{padding-bottom:24px}}
@media(max-width:345px){.topbar{gap:8px;padding-left:max(10px,env(safe-area-inset-left));padding-right:max(8px,env(safe-area-inset-right))}.book-heading h1{font-size:15px}.book-heading span{font-size:9px}}
/* Native horizontal pages keep touch scrolling and font reflow independent. */
.reading-continuation{ text-indent:0!important }.photo-caption{font-size:.8em;line-height:1.7;color:var(--muted);margin:10px 0 20px;text-indent:0}.reading-quote{margin:20px 0;padding:14px 0 14px 14px;border-left:2px solid #a5b49c;font-size:.95em;line-height:1.85;color:#506149;text-indent:0;box-decoration-break:clone;-webkit-box-decoration-break:clone}
:root{--footer:125px}
.stage{padding:0;overflow:hidden;touch-action:pan-x pinch-zoom;left:max(0px,calc((100vw - 780px)/2));right:max(0px,calc((100vw - 780px)/2))}
.page-lane,.reflow-reader{width:100%;height:100%;overflow-x:auto;overflow-y:hidden;scroll-snap-type:x mandatory;overscroll-behavior-x:contain;touch-action:pan-x pinch-zoom;scrollbar-width:none;-webkit-overflow-scrolling:touch}
.page-lane::-webkit-scrollbar,.reflow-reader::-webkit-scrollbar{display:none}
.page-lane{display:flex}.original-sheet{flex:0 0 100%;min-width:0;margin:0;padding:16px 10px 0;height:100%;display:flex;flex-direction:column;align-items:center;justify-content:flex-start;scroll-snap-align:start;scroll-snap-stop:always}
.original-sheet picture{height:calc(100% - 32px);max-width:100%;display:flex;justify-content:center;align-items:flex-start}.original-sheet img{display:block;max-width:100%;width:auto;height:auto;max-height:100%;object-fit:contain;background:var(--paper);box-shadow:0 4px 20px #373a2d14;user-select:none;-webkit-user-drag:none}.original-sheet figcaption{font-size:11px;line-height:28px;color:var(--muted)}
.text-track{position:relative;min-width:100%;height:100%}.reflow-reader{background:var(--paper)}.reflow-book{margin:24px;width:calc(100% - 48px);height:calc(100% - 48px);column-fill:auto;column-gap:48px;column-width:342px;font-family:"Songti SC","STSong","SimSun",serif;font-size:20px;line-height:1.85;color:#2a3028;letter-spacing:.01em;overflow:visible}
.source-section{break-before:column;-webkit-column-break-before:always}.source-section:first-child{break-before:auto;-webkit-column-break-before:auto}.source-caption{font-family:-apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei",sans-serif;font-size:10px;line-height:22px;color:#7b826f;letter-spacing:0;margin:0 0 14px;break-after:avoid-column;-webkit-column-break-after:avoid}
.reading-heading{font-size:1.25em;line-height:1.6;font-weight:600;margin:0 0 20px;break-after:avoid-column;letter-spacing:.03em}.reading-paragraph{margin:0 0 .85em;text-indent:2em;orphans:2;widows:2;overflow-wrap:break-word}
.inline-photo{margin:12px 0 18px;break-inside:avoid-column;-webkit-column-break-inside:avoid;display:block}.inline-photo img{display:block;width:100%;height:auto;max-height:calc(var(--sheet-height) * .55);object-fit:contain;background:var(--paper)}.art-section{break-inside:avoid-column;-webkit-column-break-inside:avoid}.art-page{display:block;width:100%;height:auto;max-height:calc(var(--sheet-height) - 42px);object-fit:contain;background:var(--paper)}
.snap-marker{position:absolute;top:0;height:1px;scroll-snap-align:start;scroll-snap-stop:always;pointer-events:none}.toolbar{justify-content:space-between;gap:15px;max-width:530px;height:48px}.page-number{min-width:86px}.type-icon{font-family:Georgia,"Times New Roman",serif;font-size:21px;font-weight:500;line-height:22px}.swipe-hint{margin:2px 0 0;text-align:center;font-size:10px;line-height:18px;letter-spacing:1px;color:#748068}
.font-preview{font-family:"Songti SC","STSong","SimSun",serif;line-height:1.85;font-size:20px;padding:20px 14px;margin:0 0 15px;text-align:center;background:#e9ecdf;border-radius:8px;color:var(--green)}.font-controls{display:flex;align-items:center;gap:12px}.font-controls button{min-height:48px;min-width:48px;border:1px solid var(--line);border-radius:50%;font-family:Georgia,serif;font-size:19px}.font-controls input{min-width:0;flex:1;accent-color:var(--green);height:44px}.font-value{text-align:center;font-size:12px;color:var(--muted);margin:6px 0 16px}.font-panel>.muted{text-align:center;margin-bottom:20px}
@media(max-width:600px){:root{--footer:115px}.toolbar{gap:8px;height:49px}.stage{padding:0}.original-sheet{padding:12px 8px 0}.original-sheet picture{height:calc(100% - 28px)}.tool-button{min-width:44px}.page-number{min-width:80px}.swipe-hint{margin:0;line-height:17px}.reader-controls{padding-bottom:calc(5px + env(safe-area-inset-bottom))}}
@media(max-height:480px) and (orientation:landscape){:root{--footer:100px}.reflow-book{margin-top:16px;margin-bottom:16px}.original-sheet{padding-top:6px}}
