:root{--ink:#26292a;--muted:#838784;--paper:#f0f1ee;--accent:#b99262;--bar:#fff;--page-ratio:0.70707}*{box-sizing:border-box}body{margin:0;background:var(--paper);color:var(--ink);font:14px/1.5 -apple-system,BlinkMacSystemFont,"Segoe UI","Microsoft YaHei",sans-serif;overflow:hidden;height:100vh;height:100dvh;display:flex;flex-direction:column}button,a,input{-webkit-tap-highlight-color:transparent}button{font:inherit;color:inherit;border:0;background:none;cursor:pointer}button:disabled{opacity:.25;cursor:default}button:hover:not(:disabled){background:#e9eae6}button:focus-visible,a:focus-visible,input:focus-visible{outline:2px solid var(--accent);outline-offset:3px}a{color:inherit}.topbar{height:76px;flex-shrink:0;padding:0 32px;display:flex;align-items:center;justify-content:space-between;background:var(--bar);border-bottom:1px solid #dfe1da;gap:15px}.brand{font-size:19px;font-weight:750;text-decoration:none;letter-spacing:1.5px;line-height:1.05}.brand span{font-weight:350}.brand small{display:block;font-size:8px;letter-spacing:3px;margin-top:7px;font-weight:500;color:#777}.book-title{font-size:12px;letter-spacing:2px;font-weight:600}.book-title span{margin-left:12px;color:var(--accent)}.download{border:1px solid #d4d6d0;padding:9px 17px;border-radius:3px;font-size:13px;white-space:nowrap}.viewer{flex:1;min-height:0;position:relative;padding:24px 58px;display:flex;align-items:center;justify-content:center;background:radial-gradient(ellipse at center,#f9f9f6 0,#edeee9 80%)}.viewport{width:100%;height:100%;overflow:auto;display:flex;align-items:flex-start;justify-content:flex-start;touch-action:pan-x pan-y;overscroll-behavior:contain;scrollbar-width:thin}.book{display:flex;margin:auto;position:relative;flex-shrink:0;isolation:isolate;box-shadow:0 12px 36px #242a2424,0 2px 5px #242a2430;background:#fff}.sheet{height:100%;position:relative;overflow:hidden;background:#fff;flex:1;min-width:0}.sheet img{width:100%;height:100%;display:block;object-fit:contain}.sheet+ .sheet:before{content:"";position:absolute;inset:0 auto 0 0;width:14px;background:linear-gradient(90deg,#0002,transparent);pointer-events:none;z-index:1}.sheet:first-child:not(:last-child):after{content:"";position:absolute;inset:0 0 0 auto;width:10px;background:linear-gradient(270deg,#0001,transparent);pointer-events:none}.edge{position:absolute;top:calc(50% - 25px);width:36px;height:50px;border-radius:4px;color:#6e746f;background:#ffffff91;font-size:36px;line-height:1;z-index:3}.prev{left:12px}.next{right:12px}.toolbar{height:66px;background:var(--bar);border-top:1px solid #dfe1da;display:flex;justify-content:center;gap:50px;align-items:center;flex-shrink:0;padding:8px 20px;padding-bottom:max(8px,env(safe-area-inset-bottom));z-index:5}.toolgroup{display:flex;align-items:center;gap:4px}.toolgroup button{width:36px;height:36px;font-size:23px;border-radius:4px;line-height:1}.toolgroup .zoomlabel{width:55px;font-size:12px;font-variant-numeric:tabular-nums}.page-input{display:flex;align-items:center;gap:5px;color:#899087;font-size:12px}.page-input input{width:42px;padding:5px 2px;text-align:center;border:1px solid #dfe1da;border-radius:3px;font-size:14px;font-family:inherit;color:var(--ink);background:#fafbf8;-moz-appearance:textfield}.page-input input::-webkit-inner-spin-button{display:none}.panel{position:fixed;left:0;top:76px;bottom:66px;width:330px;max-width:90vw;background:#fff;z-index:6;box-shadow:8px 0 30px #0002;overflow:auto}.panel-head{display:flex;align-items:center;justify-content:space-between;padding:18px 22px;border-bottom:1px solid #eee;position:sticky;top:0;background:white;z-index:1}.panel-head h2{font-size:16px;margin:0;font-weight:600}.panel-head button{font-size:26px}.chapter{width:100%;display:flex;justify-content:space-between;align-items:center;text-align:left;padding:15px 22px;border-bottom:1px solid #f0f0ec;font-size:13px;gap:15px}.chapter span:last-child{color:#999;white-space:nowrap;font-size:11px}.thumb-grid{padding:18px;display:grid;grid-template-columns:1fr 1fr;gap:18px}.thumb{padding:5px;border:1px solid #e8e9e3;border-radius:2px;font-size:11px}.thumb.active{border:2px solid var(--accent)}.thumb img{width:100%;aspect-ratio:595/842;display:block;object-fit:contain;margin-bottom:6px}.searchbox{padding:18px}.searchbox input{width:100%;border:1px solid #d3d5cd;padding:10px;font:inherit;border-radius:4px}.hint{color:#92968e;padding:0 20px;font-size:12px}.result{display:block;width:100%;text-align:left;padding:15px 22px;border-bottom:1px solid #eee}.result small{color:#858a80;display:block;margin-top:6px;font-size:12px}dialog{border:0;border-radius:10px;padding:38px;max-width:440px;width:calc(100% - 40px);box-shadow:0 20px 100px #0003;color:var(--ink)}dialog::backdrop{background:#16201980}dialog h2{font-size:23px;font-weight:600;margin:12px 0}dialog p{color:#737970;line-height:1.8}dialog .eyebrow{font-size:10px;letter-spacing:2px;color:var(--accent)}.close-dialog{position:absolute;right:15px;top:9px;font-size:28px}.primary{display:inline-block;text-decoration:none;background:#333b31;color:white;padding:12px 20px;border-radius:4px;font-size:13px;margin-top:15px}.primary:hover{background:#465041!important}[hidden]{display:none!important}.sr-only{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}.turn{position:absolute;pointer-events:none;z-index:2;perspective:1800px}.turn-leaf{position:absolute;top:0;width:50%;height:100%;transform-style:preserve-3d;animation:flip-right .5s cubic-bezier(.3,.05,.25,1) forwards}.turn-leaf img{width:100%;height:100%;object-fit:contain;background:white;box-shadow:0 4px 15px #0003;backface-visibility:hidden}.turn-leaf.forward{left:50%;transform-origin:left}.turn-leaf.backward{left:0;transform-origin:right;animation-name:flip-left}@keyframes flip-right{from{transform:rotateY(0)}to{transform:rotateY(-180deg)}}@keyframes flip-left{from{transform:rotateY(0)}to{transform:rotateY(180deg)}}@media(max-width:700px){.topbar{height:62px;padding:0 16px}.brand{font-size:15px}.brand small{font-size:7px;letter-spacing:2px}.book-title{display:none}.download{padding:7px 10px;font-size:12px}.viewer{padding:18px 35px}.edge{width:25px;height:40px;font-size:29px;top:calc(50% - 20px)}.prev{left:4px}.next{right:4px}.toolbar{height:62px;gap:8px;padding:5px 7px;justify-content:space-between}.toolgroup{gap:0}.toolgroup button{width:29px;height:34px;font-size:21px}.toolgroup .zoomlabel{display:none}.page-input{gap:3px;font-size:10px}.page-input input{width:30px;font-size:12px}.pagination #first,.pagination #last{display:none}.panel{top:62px;bottom:62px}.panel-head{padding:15px 20px}}@media(max-width:360px){#fullscreen{display:none}.toolbar{gap:0}.toolgroup button{width:26px}}@media(prefers-reduced-motion:reduce){.turn{display:none}}
/* Keep animated page layers inside the reader, including after screen rotation. */
.viewer{overflow:hidden;min-width:0}

.toolgroup svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;vertical-align:middle}

.brand{display:flex;align-items:center;min-width:0;height:48px;max-width:235px}
.brand img{display:block;width:220px;max-width:100%;max-height:45px;object-fit:contain;object-position:left center}
.brand #brand-fallback{font-size:18px;font-weight:650;letter-spacing:1.2px}
a.download{text-decoration:none;display:inline-flex;align-items:center;gap:5px}
@media(max-width:700px){.brand{max-width:165px;height:40px}.brand img{width:165px;max-height:38px}.brand #brand-fallback{font-size:15px;letter-spacing:.6px}.download{font-size:12px}}
@media(max-width:360px){.brand{max-width:140px}.brand img{width:140px}.topbar{gap:8px;padding:0 12px}.download{padding:7px 8px}}

#print-pages{display:none}
.print-options{border:0;padding:5px 0;margin:15px 0}
.print-options legend{font-weight:600;margin-bottom:10px}
.print-options label{display:flex;align-items:center;gap:9px;padding:8px 0;cursor:pointer}
.print-options input{accent-color:#333b31}
#print-dialog #print-status{font-size:13px}
@media screen and (max-width:700px){#print{display:none}}
@page{size:A4 portrait;margin:10mm}
@media print{
 html,body{display:block!important;height:auto!important;overflow:visible!important;background:white!important;margin:0!important;padding:0!important}
 body>*:not(#print-pages){display:none!important}
 #print-pages{display:block!important;margin:0!important;padding:0!important}
 .print-sheet{display:block;width:190mm;height:277mm;break-inside:avoid;page-break-inside:avoid;break-after:page;page-break-after:always;margin:0;padding:0}
 .print-sheet:last-child{break-after:auto;page-break-after:auto}
 .print-sheet img{display:block;width:100%;height:100%;object-fit:contain}
}
