:root{--paper:#faf7ef;--ink:#202936;--muted:#656c76;--lavender:#e8e2f1;--line:#d7d2c7;--side:240px;--font:-apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei",sans-serif}*{box-sizing:border-box}body.notes-shell{margin:0;background:var(--paper);color:var(--ink);font:16px/1.6 var(--font);height:100dvh;overflow:hidden}button,input{font:inherit;color:inherit}button{cursor:pointer}button:focus-visible,a:focus-visible,input:focus-visible,summary:focus-visible{outline:3px solid #766493;outline-offset:3px}[hidden]{display:none!important}button{background:none;border:0;min-height:44px}.skip{position:fixed;top:-100px;z-index:100;background:var(--paper);padding:12px}.skip:focus{top:5px}.sr-only{position:absolute;clip:rect(0,0,0,0);width:1px;height:1px;overflow:hidden}#sidebar{position:fixed;inset:0 auto 0 0;width:var(--side);background:#f4f0e7;border-right:2px solid var(--ink);display:flex;flex-direction:column;z-index:40;padding:16px 12px}.brand-row{display:flex;align-items:center;margin-bottom:20px}.brand{display:flex;align-items:center;gap:10px;padding:4px 8px;white-space:nowrap;font-size:21px;font-weight:800}.brand svg{width:23px;height:23px;fill:none;stroke:currentColor;stroke-width:1.8}.close-side{display:none}.module-wrap{position:relative;margin:0 4px 22px}#module{width:100%;display:flex;align-items:center;gap:10px;padding:8px 12px;border:2px solid var(--ink);border-radius:8px;background:var(--lavender);box-shadow:3px 3px var(--ink);font-weight:700}.module-icon{font-size:22px}.chevron{margin-left:auto}.side-nav{overflow:auto;min-height:0}.nav-item{width:100%;display:flex;align-items:center;gap:12px;text-align:left;padding:10px 13px;border-radius:7px;margin:3px 0}.nav-item b{font-size:16px;font-weight:600;white-space:nowrap}.nav-icon{width:20px;text-align:center;font-size:23px;flex-shrink:0}.nav-item:hover,.subnav button:hover{background:#ede7df}.nav-item.active,.subnav button.active{background:var(--lavender);box-shadow:inset 3px 0 var(--ink)}.subnav{margin:0 0 14px 23px;border-left:1px solid #c8c3b9;padding:2px 0}.subnav button{font-size:14px;display:block;text-align:left;width:100%;padding:10px 12px 10px 19px;border-radius:0 6px 6px 0;line-height:1.4}.side-bottom{margin-top:auto;padding-top:16px}.side-bottom .nav-item{border-top:1px solid var(--line);border-radius:0}#workspace{margin-left:var(--side);height:100dvh;display:flex;flex-direction:column;min-width:0}.topbar{height:64px;min-height:64px;display:flex;align-items:center;padding:8px 24px;gap:16px;border-bottom:2px solid var(--ink);background:var(--paper)}.icon-button{display:grid;place-items:center;width:44px;padding:8px;border-radius:7px}.icon-button:hover{background:#eee9df}.icon-button svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:1.7}.breadcrumb{display:flex;align-items:center;gap:12px;min-width:0;font-size:14px}.breadcrumb>span{color:#a29c92}.breadcrumb button{color:var(--muted);padding:0}.breadcrumb strong{font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.account-wrap{position:relative;margin-left:auto;flex-shrink:0}#account{padding:6px 14px;border:2px solid var(--ink);border-radius:7px;box-shadow:3px 3px var(--ink);font-size:14px;font-weight:700;display:flex;align-items:center;gap:20px}.popup{position:absolute;top:calc(100% + 10px);right:0;min-width:185px;padding:6px;border:2px solid var(--ink);border-radius:8px;background:var(--paper);box-shadow:4px 4px var(--ink);z-index:60}.popup button{display:block;width:100%;text-align:left;padding:8px 12px;border-radius:5px}.popup button:hover{background:var(--lavender)}.popup p{font-size:12px;color:var(--muted);margin:8px 10px}.popup#modules{right:0;left:0}#main{flex:1;min-height:0;position:relative}#map-view{display:flex;flex-direction:column;width:100%;height:100%;min-height:0}#map-view .layout{flex:1;min-height:0}body.folded{--side:68px}.folded #sidebar{padding:16px 7px}.folded .brand b,.folded .nav-item b,.folded .module-text,.folded .chevron,.folded .subnav{display:none}.folded .brand{padding:4px 12px}.folded .module-wrap{margin:0 1px 22px}.folded #module{padding:8px 12px}.folded .nav-item{padding:10px 15px}.folded .popup#modules{left:58px;right:auto;top:0}.shade{position:fixed;inset:0;background:#20293655;z-index:35;border:0}#directory-view,#reader-view{height:100%;overflow:auto;padding:28px 32px}.view-head{display:flex;gap:24px;align-items:center;justify-content:space-between;margin-bottom:24px}.view-head h1{font-size:28px;margin:0 0 6px}.view-head p{font-size:14px;color:var(--muted);margin:0}input{min-height:44px;border:1px solid #8b8790;border-radius:7px;padding:9px 12px;background:#fffdf7;max-width:100%}#note-count{font-size:13px;color:var(--muted);margin-bottom:16px}#note-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}#note-grid button{padding:18px;text-align:left;border:1px solid var(--ink);border-radius:8px;background:#fffdf7;line-height:1.6}#note-grid button:hover{background:var(--lavender)}#note-grid small{display:block;color:var(--muted);margin-top:8px}.reader-actions{display:flex;align-items:center;gap:20px;border-bottom:1px solid var(--line);margin-bottom:28px;padding-bottom:14px;font-size:13px;color:var(--muted)}.reader-actions button{font-size:14px;color:var(--ink)}.reading-layout{display:grid;grid-template-columns:minmax(0,780px) 180px;gap:32px;justify-content:center}.article{font-size:16px;line-height:1.85;min-width:0;overflow-wrap:anywhere}.article h1{font-size:30px;line-height:1.5;margin-top:0}.article h2{font-size:23px;margin-top:38px;scroll-margin:20px}.article h3{font-size:19px;scroll-margin:20px}.article pre{max-width:100%;overflow:auto;padding:20px;border-radius:8px;background:#eee9df}.article img{max-width:100%;height:auto}.article math{max-width:100%;overflow:auto}.article table{max-width:100%;display:block;overflow:auto;border-collapse:collapse}.article td,.article th{border:1px solid var(--line);padding:8px}.article a{color:#655481}.omitted-image{display:block;padding:16px;border:1px dashed #a8a19a;border-radius:6px;color:var(--muted);font-size:13px}#toc{position:sticky;top:0;align-self:start;max-height:80dvh;overflow:auto;font-size:12px}#toc h2{font-size:14px}#toc a{display:block;padding:7px 0 7px 12px;border-left:1px solid var(--line);color:var(--muted);text-decoration:none}dialog{width:min(450px,calc(100% - 32px));padding:28px;background:var(--paper);color:var(--ink);border:2px solid var(--ink);border-radius:10px;box-shadow:5px 5px var(--ink)}dialog::backdrop{background:#20293665}dialog h2{font-size:22px;margin-top:0}.outlined{padding:8px 18px;border:2px solid var(--ink);border-radius:7px;box-shadow:3px 3px var(--ink)}@media(max-width:1050px){.reading-layout{grid-template-columns:minmax(0,1fr)}#toc{display:none}}@media(max-width:760px){body,body.folded{--side:0px}#sidebar{width:280px;transform:translateX(-100%);padding:16px 12px}.drawer #sidebar{transform:none}.close-side{display:grid;margin-left:auto;font-size:28px}.brand{font-size:20px}.topbar{padding:8px 12px;gap:8px}.breadcrumb{gap:8px;font-size:13px}.breadcrumb strong{max-width:110px}#account{padding:6px 10px;gap:8px;font-size:13px}.brand-row{margin-bottom:16px}#directory-view,#reader-view{padding:20px 16px}.view-head{display:block}.view-head input{width:100%;margin-top:16px}#note-grid{grid-template-columns:1fr}.article h1{font-size:26px}.reader-actions{gap:10px;flex-wrap:wrap}.folded #sidebar .brand b,.folded #sidebar .nav-item b,.folded #sidebar .module-text,.folded #sidebar .chevron{display:initial}.folded #sidebar .subnav{display:block}.folded #sidebar .module-wrap{margin:0 4px 22px}}@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important}}

.nav-icon svg,.module-icon svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.7;vertical-align:middle}.chevron svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.7;vertical-align:middle}

@media(min-width:761px){.close-side{display:none}}

.brand,.nav-item,.popup a{color:inherit;text-decoration:none}.popup a{display:block;padding:8px 12px;min-height:44px}.popup a:hover{background:var(--lavender)}#map-view .layout{height:auto}#map-view .map-toolbar>div:first-child:not(.seg):not(.search){display:none}#map-view .map-toolbar{display:flex}#map-view .ov-wrap{min-height:0}#real-account-menu{z-index:100}body.notes-shell>footer{display:none}

.map-license{display:block;font-size:11px;color:var(--muted);padding:8px 12px}.folded .map-license{font-size:0}.folded .map-license:after{content:"MIT";font-size:10px}

#map-view .zoom-ctl button{background:var(--paper);border:1px solid var(--ink);border-radius:6px;min-width:44px;min-height:44px;box-shadow:2px 2px var(--ink)}
