:root{--bg:#f6f5f0;--paper:#fff;--ink:#223e35;--muted:#7a837c;--line:#e7e8df;--green:#255b45;--pale:#edf2e8;--accent:#c48153;--font:18px;--sidebar:282px}
*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;background:var(--bg);color:var(--ink);font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif;line-height:1.6}button,input,a{-webkit-tap-highlight-color:transparent}button,input{font:inherit}button{cursor:pointer}button,a{touch-action:manipulation}button{color:inherit}button:disabled{cursor:default;opacity:.35}button:focus-visible,a:focus-visible,input:focus-visible{outline:3px solid #b7cbb5;outline-offset:3px}button{border:0;background:none}a{color:inherit;text-decoration:none}svg.icon{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0}button svg{pointer-events:none}.icon-button{width:40px;height:40px;display:inline-grid;place-items:center;border-radius:10px}.icon-button:hover{background:var(--pale)}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}.skip{position:fixed;left:15px;top:-100px;z-index:100;background:white;padding:12px}.skip:focus{top:10px}
.sidebar{position:fixed;inset:0 auto 0 0;width:var(--sidebar);z-index:40;background:#fafbf7;border-right:1px solid var(--line);display:flex;flex-direction:column}.brand{padding:32px 25px 23px;display:flex;align-items:center;gap:12px}.brand-mark{width:40px;height:43px;background:var(--green);border-radius:5px 12px 5px 5px;color:white;font-family:serif;font-size:29px;display:grid;place-items:center;box-shadow:3px 3px 0 #dce4d7}.brand-name{font-size:21px;font-weight:750;letter-spacing:2px}.brand small{display:block;color:var(--muted);font-size:10px;letter-spacing:1.5px}.close-sidebar{display:none;margin-left:auto}.sidebar-tools{padding:0 19px 16px}.search{display:flex;align-items:center;gap:8px;border:1px solid #e1e5dc;background:white;padding:10px 12px;border-radius:9px;color:#8b958c}.search input{width:100%;min-width:0;font-size:13px;border:0;outline:none;background:none;color:var(--ink)}.search:focus-within{border-color:#70927c;box-shadow:0 0 0 3px #e6ede2}.search input:focus-visible{outline:0}.search kbd{font-size:11px;border:1px solid var(--line);padding:0 5px;border-radius:3px}.library-tabs{display:flex;gap:2px;margin-top:14px;background:#eff1eb;border-radius:7px;padding:3px}.library-tabs button{flex:1;padding:6px 0;font-size:12px;border-radius:5px;color:var(--muted)}.library-tabs button.active{background:white;box-shadow:0 1px 3px #172d3510;color:var(--green);font-weight:650}.toc-scroll{overflow:auto;flex:1;padding:0 13px 22px;scrollbar-width:thin;scrollbar-color:#d4dbcf transparent}.toc-subject{font-size:12px;font-weight:700;letter-spacing:1px;margin:18px 11px 9px;display:flex;justify-content:space-between;align-items:center}.toc-subject span{font-weight:400;font-size:10px;color:var(--muted);letter-spacing:0}.toc-group{margin-bottom:5px}.toc-group summary{list-style:none;display:flex;align-items:center;gap:7px;font-size:12px;color:#788174;cursor:pointer;padding:9px 11px}.toc-group summary::-webkit-details-marker{display:none}.toc-group summary .icon{width:12px;height:12px;transition:transform .15s}.toc-group[open] summary .icon{transform:rotate(90deg)}.topic-link{display:flex;align-items:center;gap:9px;width:100%;text-align:left;padding:10px 12px;border-radius:7px;font-size:12px;line-height:1.5;border-left:2px solid transparent;margin:2px 0}.topic-link:hover{background:#eff2e9}.topic-link.active{background:#e4ecdf;color:#26573e;border-left-color:#487553;font-weight:650}.topic-num{font-size:10px;font-variant-numeric:tabular-nums;color:#99a18f;flex:0 0 25px}.topic-link.active .topic-num{color:#4e7953}.topic-label{flex:1}.topic-state{width:13px;height:13px;color:#70946c}.sidebar-footer{border-top:1px solid var(--line);padding:18px 23px;background:#fafbf7}.progress-caption{display:flex;justify-content:space-between;font-size:11px;color:var(--muted)}.track{height:4px;background:#e4e9dd;border-radius:9px;overflow:hidden;margin:8px 0}.fill{height:100%;background:#5c8054;transition:width .3s}.sidebar-footer small{font-size:10px;color:#a1a89d}.empty-nav{padding:25px 12px;color:var(--muted);font-size:13px;line-height:1.9}
.workspace{margin-left:var(--sidebar);min-height:100vh}.topbar{height:76px;padding:0 44px;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;gap:15px;background:var(--bg)}.topbar-left,.topbar-right{display:flex;align-items:center;gap:14px}.topbar-title{font-size:13px;letter-spacing:.5px}.topbar-title span{color:#a6aea2;margin:0 12px}.edition{border:1px solid #dce2d6;border-radius:5px;font-size:10px;padding:3px 7px;letter-spacing:.5px;color:#7d8a75}.local-note{font-size:11px;color:#899281;display:flex;align-items:center;gap:7px}.local-note:before{content:'';width:5px;height:5px;border-radius:50%;background:#89a67b}.menu-button{display:none}.page{max-width:1320px;margin:auto;padding:34px 44px 24px}.intro{display:flex;justify-content:space-between;gap:28px;align-items:center;margin-bottom:32px}.eyebrow{font-size:10px;letter-spacing:2px;color:#9b886c;display:flex;align-items:center;gap:8px}.eyebrow:before{content:'';width:20px;height:1px;background:#b69770}.intro h1{font-family:"Noto Serif CJK SC","Songti SC",STSong,serif;font-size:31px;font-weight:600;letter-spacing:1px;margin:9px 0 8px}.intro p{font-size:12px;color:#8b9186;margin:0}.hero-meta{display:flex;gap:29px;margin-right:7px}.hero-meta div{border-left:1px solid #dedfd5;padding-left:22px}.hero-meta strong{font-size:29px;font-weight:450;font-family:Georgia,serif;line-height:1.3}.hero-meta small{display:block;font-size:10px;color:#94988a;letter-spacing:1px;margin-top:3px}.subject-strip{display:flex;gap:8px;margin:0 0 25px;flex-wrap:wrap}.subject-strip button{display:flex;align-items:center;gap:8px;padding:9px 17px;border:1px solid #e0e4d9;background:#fbfcf9;border-radius:7px;font-size:12px;transition:.15s}.subject-strip button.active{background:var(--green);border-color:var(--green);color:white;box-shadow:0 4px 9px #255b4510}.subject-strip button span{font-size:10px;opacity:.55}.study-grid{display:grid;grid-template-columns:minmax(0,1fr) 225px;gap:24px;align-items:start}.reading-column{min-width:0}.reader{background:var(--paper);border:1px solid #e3e6db;border-radius:13px;box-shadow:0 4px 25px #2c402c03;overflow:hidden;scroll-margin-top:18px}.reader-header{padding:27px 30px 20px;border-bottom:1px solid #eef0e9}.topic-meta{display:flex;justify-content:space-between;align-items:center;gap:8px;color:#8a9586;font-size:10px;letter-spacing:1px}.topic-meta .index{font-family:monospace;color:#54764e;letter-spacing:2px}.reader h2{font-size:23px;line-height:1.6;letter-spacing:.3px;font-weight:650;margin:11px 0 8px;overflow-wrap:anywhere}.topic-crumb{font-size:11px;color:#9ba192;display:flex;gap:8px;flex-wrap:wrap}.reader-toolbar{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:12px 26px;border-bottom:1px solid #f0f1ec;background:#fdfefa}.view-tabs{display:flex;gap:4px}.view-tabs button{font-size:11px;padding:6px 11px;color:#8c9687;border-radius:5px}.view-tabs button.active{background:#edf2e8;color:var(--green);font-weight:600}.size-controls{display:flex;align-items:center;gap:9px;font-size:10px;color:#8b9586}.size-controls button{width:30px;height:30px;border:1px solid #e5e9df;border-radius:6px;font-family:Georgia,serif;background:white;font-size:15px}.size-controls button:last-child{font-size:19px}.reading-content{padding:30px;min-height:170px;overflow-wrap:anywhere;font-size:var(--font);line-height:1.95;color:#444}.reading-content p{margin:0 0 12px}.reading-content p:last-child{margin:0}.inline-symbol{width:1.05em;height:1.05em;vertical-align:-.12em;display:inline-block;margin:0 .12em 0 0}.reading-content figure{margin:15px 0}.diagram{display:block;width:100%;height:auto}.continuation{height:1px;background:#edf0e7;margin:26px 0}.original-fragment{margin:0 0 22px;overflow:auto}.original-fragment svg{display:block;max-width:none;height:auto}.original-fragment small{font-size:10px;color:var(--muted);display:block;margin-bottom:10px}.reader-footer{display:flex;justify-content:space-between;align-items:center;gap:14px;padding:16px 30px;background:#fcfdf9;border-top:1px dashed #e5e8de;color:#9ba28e;font-size:10px}.reader-footer span{display:flex;align-items:center;gap:6px}.reader-footer .icon{width:13px;height:13px}.reader-footer a:hover{color:var(--green)}.page-nav{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin:18px 0}.page-nav button{text-align:left;display:flex;align-items:center;gap:12px;border:1px solid #e4e7dc;background:#fafbf7;padding:16px;border-radius:9px;min-width:0}.page-nav button:hover:not(:disabled){background:#edf2e8;border-color:#cad9c1}.page-nav button:last-child{text-align:right;justify-content:flex-end}.page-nav button div{min-width:0}.page-nav small{display:block;font-size:10px;color:#9aa08f;margin-bottom:3px}.page-nav strong{font-size:12px;font-weight:500;display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.page-nav .icon{width:17px;height:17px;color:#74916a}.keyboard-hint{text-align:center;font-size:10px;color:#adb3a5;margin-top:14px}.keyboard-hint kbd{border:1px solid #e0e4d8;border-radius:3px;padding:0 4px}
.study-aside{display:flex;flex-direction:column;gap:17px}.study-panel{background:#eff3e9;border:1px solid #dfe7d7;border-radius:11px;padding:22px 19px}.panel-kicker{font-size:10px;letter-spacing:1.8px;color:#8a9c7a}.study-panel h3{font-family:"Songti SC",STSong,serif;font-size:18px;margin:5px 0 20px;font-weight:500;letter-spacing:1px}.study-actions{display:grid;gap:9px}.primary-button{background:var(--green);color:white;border-radius:7px;padding:11px 12px;font-size:12px;display:flex;align-items:center;justify-content:center;gap:8px}.primary-button:hover{background:#194a35}.primary-button.is-done{background:#dae6d1;color:#37603c}.secondary-button{display:flex;align-items:center;justify-content:center;gap:8px;background:#f9fbf5;border:1px solid #d9e3d0;border-radius:7px;padding:10px;font-size:12px;color:#748068}.secondary-button.active{color:#9c6f3d;background:#fff8e9;border-color:#e8d9ba}.study-actions .icon{width:16px;height:16px}.chapter-progress{border-top:1px solid #dfe6d7;margin-top:21px;padding-top:17px}.chapter-progress p{font-size:11px;margin:0 0 10px;color:#8a967c}.chapter-progress strong{font-size:22px;font-family:Georgia,serif;font-weight:500}.chapter-progress strong span{font-family:system-ui;font-size:11px;color:#8d9a7e;font-weight:400}.chapter-progress .track{background:#dfe6d8}.chapter-caption{font-size:10px;color:#8d9a7e;margin-top:9px}.tip-card{padding:20px 18px;border:1px solid #e4e3d7;border-radius:10px;background:#faf9f2}.tip-card .icon{color:#ab936a;width:18px;height:18px}.tip-card h3{font-size:12px;font-weight:550;margin:9px 0}.tip-card p{font-size:11px;line-height:1.9;color:#969583;margin:0}.tip-lines{display:flex;gap:5px;margin-top:15px}.tip-lines i{display:block;width:23px;height:3px;border-radius:5px;background:#be775d}.tip-lines i:nth-child(2){background:#7d8fa4}.tip-lines i:nth-child(3){background:#95a47b}.aside-bottom{font-size:10px;color:#a1a78f;text-align:center;line-height:1.9}.mobile-actions{display:none}.footer{margin:35px 0 3px;display:flex;justify-content:space-between;font-size:10px;letter-spacing:.5px;color:#a8ae9c}.footer a:hover{color:#587c49}.scrim{position:fixed;inset:0;background:#20372855;z-index:39;backdrop-filter:blur(3px);display:none}.toast{position:fixed;bottom:30px;left:calc(50% + 130px);transform:translate(-50%,20px);background:#284c39;color:white;padding:11px 20px;border-radius:9px;font-size:12px;box-shadow:0 5px 20px #0002;opacity:0;pointer-events:none;transition:.2s;z-index:100}.toast.visible{opacity:1;transform:translate(-50%,0)}.loading{color:#929b8a;font-size:13px;padding:20px 0}.error{line-height:1.9;font-size:14px;color:#94684e}.error button{display:block;margin-top:14px}.reading-content[aria-busy=true]{opacity:.6}
@media(min-width:1600px){:root{--sidebar:304px}.page{padding-top:46px}.intro{margin-bottom:36px}.reading-content{padding:36px 40px}.study-grid{grid-template-columns:minmax(0,1fr) 245px;gap:28px}}
@media(max-width:1190px){:root{--sidebar:254px}.topbar{padding:0 28px}.page{padding:28px}.study-grid{grid-template-columns:minmax(0,1fr)}.study-aside{display:none}.mobile-actions{display:flex;gap:9px;align-items:center;margin:16px 0}.mobile-actions .primary-button{flex:1}.mobile-actions .secondary-button{min-width:100px}.intro h1{font-size:28px}.hero-meta{gap:20px}.hero-meta div{padding-left:15px}.hero-meta div:last-child{display:none}}
@media(max-width:900px){:root{--sidebar:280px}.workspace{margin-left:0}.sidebar{transform:translateX(-100%);transition:transform .22s}.sidebar.open{transform:translateX(0);box-shadow:12px 0 40px #10271920}.sidebar.open+.scrim{display:block}.close-sidebar,.menu-button{display:inline-grid}.topbar{height:65px;padding:0 24px}.page{max-width:820px;padding:28px 28px 22px}.toast{left:50%}.brand{padding:24px 18px}.brand-name{font-size:19px}.topbar-title{font-size:12px}.edition{display:none}.intro{margin-bottom:26px}.topbar-left{gap:6px}.sidebar-footer{padding-bottom:max(18px,env(safe-area-inset-bottom))}.keyboard-hint{display:none}}
@media(max-width:560px){:root{--font:17px}.topbar{height:59px;padding:0 14px}.topbar-title span{margin:0 6px}.topbar-right .local-note{display:none}.page{padding:23px 16px 110px}.intro{gap:10px;align-items:flex-start;margin-bottom:22px}.eyebrow{font-size:8px;letter-spacing:1.4px}.intro h1{font-size:25px;margin-top:9px}.intro p{font-size:10px;max-width:230px;line-height:1.9}.hero-meta{gap:0;margin:15px 0 0}.hero-meta div{padding-left:12px}.hero-meta strong{font-size:25px}.hero-meta small{font-size:9px;letter-spacing:0}.subject-strip{gap:7px;margin-bottom:20px}.subject-strip button{padding:8px 13px;font-size:11px}.reader{border-radius:10px}.reader-header{padding:21px 21px 18px}.reader h2{font-size:21px;margin-top:10px}.topic-meta{font-size:9px;letter-spacing:.5px}.topic-crumb{font-size:10px}.reader-toolbar{padding:10px 17px}.size-controls{gap:6px}.size-controls span{display:none}.reading-content{padding:23px 21px;line-height:1.95}.reader-footer{padding:14px 20px;font-size:9px}.reader-footer span{gap:4px}.reader-footer a{white-space:nowrap}.mobile-actions{margin:14px 0}.page-nav{position:fixed;bottom:0;left:0;right:0;margin:0;padding:10px 16px max(12px,env(safe-area-inset-bottom));background:#f9faf5f5;backdrop-filter:blur(15px);border-top:1px solid #e2e7d9;z-index:20;gap:10px}.page-nav button{padding:9px 11px;gap:8px;border:1px solid #e1e7d8;background:white;border-radius:7px}.page-nav small{font-size:9px;margin-bottom:2px}.page-nav strong{font-size:11px}.footer{font-size:9px;margin:23px 0 0;gap:8px}.toast{bottom:96px;max-width:90%;white-space:nowrap}.reading-content figure{overflow:auto}.diagram{min-width:0}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;transition:none!important}}

/* Reading controls stay usable on narrow screens and with keyboard navigation. */
.brand-home{display:flex;align-items:center;gap:12px;min-width:0}.brand-home>div:last-child{min-width:0}.brand small{font-size:9px;letter-spacing:1.1px}.topic-meta,.topic-crumb,.reader-footer,.reader-footer a,.size-controls,.view-tabs button{color:#6e7d67}.view-tabs button.active{color:var(--green)}.chapter-progress p,.chapter-caption,.chapter-progress strong span{color:#6e7d60}.figure-link{display:block}.figure-caption{text-align:center;font-size:10px;color:#78846e;margin:9px 0 0}.reading-content figure .figure-caption{font-size:10px;margin-top:9px}
@media(max-width:560px){.subject-strip{flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none;padding-bottom:2px}.subject-strip::-webkit-scrollbar{display:none}.subject-strip button{flex-shrink:0;padding:8px 11px}.hero-meta div{padding-left:10px}.brand small{font-size:8px;letter-spacing:.9px}}
