:root{--ink:#25343e;--muted:#62727c;--paper:#fff;--surface:#f5f7f8;--rule:#dce3e7;--blue:#446699;--teal:#64b0bc;--selection:#d7e9ed;--highlight:#fce4b7;--left:58%;--ui:-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif;--reading:Georgia,"Noto Serif","Songti SC",serif}
*{box-sizing:border-box}body{margin:0;background:var(--surface);color:var(--ink);font-family:var(--ui);font-size:16px}button,input,select{font:inherit}button,a,label.primary-button{-webkit-tap-highlight-color:transparent}button{cursor:pointer}button:disabled{cursor:wait;opacity:.55}button,a,input,select,[contenteditable],[tabindex]{outline-offset:4px}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,[contenteditable]:focus-visible,[tabindex]:focus-visible{outline:2px solid var(--blue)}::selection{background:var(--selection);color:var(--ink)}[hidden]{display:none!important}button{color:inherit}a{color:var(--blue);text-underline-offset:3px}button.quiet,a.quiet{border:0;background:transparent;padding:8px 10px;font-size:14px;line-height:1.35;border-radius:5px;text-decoration:none;white-space:nowrap}button.quiet:hover,a.quiet:hover{background:#e9eef1}button.quiet.active{background:#e5edf5;color:#304e77}.masthead{height:66px;display:flex;align-items:center;justify-content:space-between;padding:0 28px;border-bottom:1px solid var(--rule);background:var(--paper)}.brand{border:0;background:none;padding:0;font-size:22px;font-weight:750;letter-spacing:-.7px;color:#345572}.brand span{margin-left:17px;font-size:14px;font-weight:400;color:var(--muted);letter-spacing:1px}.header-actions{display:flex;gap:12px}.workspace{height:calc(100dvh - 66px);display:grid;grid-template-columns:minmax(0,var(--left)) 7px minmax(0,1fr);overflow:hidden}.paper-pane,.notes-pane{min-width:0;min-height:0;display:flex;flex-direction:column;background:var(--paper)}.notes-pane{background:#fbfcfd}.pane-bar{height:55px;min-height:55px;display:flex;align-items:center;justify-content:space-between;padding:0 22px;gap:8px;border-bottom:1px solid var(--rule);background:inherit}.pane-bar>div{display:flex;align-items:center;gap:12px;min-width:0}.tiny-label{font-size:13px;letter-spacing:.08em;color:var(--muted);white-space:nowrap}.paper-location{flex:1}.paper-location select{border:0;background:transparent;color:var(--ink);font-size:13px;max-width:100%;min-width:0;text-overflow:ellipsis;padding:4px 20px 4px 0}.paper-controls{gap:0!important}.splitter{background:#eef2f4;cursor:col-resize;border-left:1px solid var(--rule);border-right:1px solid var(--rule);touch-action:none}.splitter:hover,.splitter:focus{background:var(--teal)}.paper-scroll{flex:1;overflow:auto;scroll-behavior:smooth;scrollbar-gutter:stable}.paper-content{max-width:780px;margin:auto;padding:32px 45px 64px}.source-title{font-family:var(--reading);font-weight:700;font-size:31px;line-height:1.25;letter-spacing:-.025em;margin:15px 0 24px}.source-author{display:inline-block;font-family:var(--ui);font-size:12px;line-height:1.55;color:var(--muted);width:48%;vertical-align:top;margin:0 0 10px;padding-right:14px}.source-heading{font-family:var(--ui);font-size:19px;line-height:1.5;font-weight:650;margin:34px 0 14px;scroll-margin-top:20px}.source-paragraph,.source-caption,.source-footnote{font-family:var(--reading);font-size:17px;line-height:1.78;margin:0 0 17px;overflow-wrap:break-word}.source-caption{font-size:14px;line-height:1.65;color:#4e616d;margin-top:12px}.source-footnote{font-size:13px;line-height:1.65;color:var(--muted)}.source-text{position:relative;scroll-margin-top:35px}.source-text mark{background:var(--highlight);color:inherit;border-radius:2px;cursor:pointer;padding:1px 0}.source-text mark:focus-visible{outline:2px solid var(--blue)}.page-marker{display:flex;align-items:center;gap:14px;margin:32px 0 24px;font-size:12px;color:var(--muted);font-family:var(--ui)}.page-marker:first-child{margin-top:0}.page-marker::after{content:"";height:1px;flex:1;background:var(--rule)}.page-marker a{color:var(--muted);text-decoration:none;white-space:nowrap}.source-figure{margin:25px 0;scroll-margin-top:24px}.source-figure img{display:block;max-width:100%;height:auto;margin:0 auto}.source-figure figcaption{display:flex;align-items:center;justify-content:space-between;font-size:12px;color:var(--muted);margin-top:8px;gap:16px}.figure-equation{margin:22px 0}.figure-equation img{max-height:120px;width:auto;max-width:100%;object-fit:contain}.paper-footer,.notes-footer{min-height:38px;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:8px 22px;border-top:1px solid var(--rule);font-size:12px;color:var(--muted)}.paper-footer span:last-child{font-size:11px}.note-heading{padding:32px 32px 17px}.note-heading h1{font-size:23px;line-height:1.4;letter-spacing:-.02em;font-weight:600;margin:0 0 9px}.note-heading p{font-size:13px;color:var(--muted);line-height:1.6;margin:0}.save-status{font-size:12px;color:var(--muted)}.save-status.error{color:#9a342a}.note-toolbar{display:flex;align-items:center;gap:4px;padding:4px 24px 12px;flex-wrap:wrap}.note-toolbar button{font-size:12px;border:0;background:transparent;padding:7px 8px;border-radius:4px;min-height:30px}.note-toolbar button:hover{background:#e9eff3}.toolbar-spacer{flex:1}.note-scroll{overflow:auto;flex:1;min-height:0;scroll-behavior:smooth;scrollbar-gutter:stable}.note-editor{padding:7px 32px 65px;min-height:100%;font-size:16px;line-height:1.9;overflow-wrap:anywhere;caret-color:var(--blue);outline:none!important;white-space:pre-wrap}.note-editor p,.note-editor div{margin:0 0 16px}.note-editor h2{font-size:20px;margin:28px 0 12px}.note-editor h3{font-size:17px;margin:24px 0 10px}.note-editor:empty::before{content:attr(data-placeholder);display:block;color:#71818b;white-space:pre-line;font-size:14px;line-height:2;pointer-events:none}.note-editor[contenteditable=false]:empty::before{content:"这篇文章尚未公开笔记。"}.note-editor blockquote[data-citation]{margin:18px 0;background:#edf3f5;border:1px solid #d6e3e7;padding:13px 15px;font-family:var(--reading);font-size:14px;line-height:1.8;cursor:pointer;white-space:normal;border-radius:5px}.note-editor blockquote[data-citation]::after{content:attr(data-source-label);display:block;font-family:var(--ui);font-size:11px;color:#4b687d;margin-top:7px}.note-editor blockquote[data-citation]:hover{background:#e4edf1}.note-editor blockquote[data-citation]:focus{outline:2px solid var(--blue)}.text-button{border:0;background:none;font-size:12px;color:var(--blue);padding:0}.mobile-tabs{display:none}.search-bar{display:flex;align-items:center;padding:9px 22px;gap:10px;border-bottom:1px solid var(--rule);background:var(--surface)}.search-bar input{min-width:70px;flex:1;font-size:14px;padding:7px 10px;border:1px solid var(--rule);border-radius:4px}.search-bar span{font-size:12px;white-space:nowrap}.search-match{background:#d8e9ee!important}.search-current{background:#fbc063!important}.toc{position:absolute;z-index:15;top:120px;left:20px;width:290px;max-height:65vh;overflow:auto;background:white;border:1px solid var(--rule);box-shadow:0 8px 25px #25343e16;padding:12px;border-radius:6px}.toc button{display:block;width:100%;text-align:left;background:transparent;border:0;font-size:13px;line-height:1.55;padding:8px}.toc button:hover{background:var(--surface)}.library{position:fixed;top:66px;bottom:0;left:0;width:min(430px,100vw);background:white;z-index:40;border-right:1px solid var(--rule);box-shadow:12px 8px 35px #25343e19;overflow:auto;padding:25px}.drawer-heading,.dialog-heading{display:flex;align-items:center;justify-content:space-between;gap:15px;margin-bottom:22px}.drawer-heading h2,.dialog-heading h2{font-size:22px;font-weight:600;margin:0}.library-actions{display:flex;gap:10px;margin-bottom:20px}.primary-button,.secondary-button{border:1px solid var(--blue);background:var(--blue);color:#fff;padding:10px 15px;border-radius:5px;font-size:14px;line-height:1.4;display:inline-block;text-align:center;cursor:pointer}.secondary-button{background:white;color:var(--blue);border-color:#b6c7d5}.primary-button:hover{background:#36567f}.secondary-button:hover{background:#edf3f8}.library-search{width:100%;padding:11px 12px;border:1px solid var(--rule);border-radius:5px;font-size:14px;margin-bottom:14px}.library-item{display:block;text-align:left;width:100%;padding:17px 0;background:none;border:0;border-bottom:1px solid var(--rule)}.library-item:hover{color:var(--blue)}.library-item.active{color:var(--blue)}.library-item strong{font-family:var(--reading);font-size:18px;font-weight:500;line-height:1.4;display:block}.library-item small{font-size:12px;color:var(--muted);display:block;margin-top:8px;line-height:1.6}.muted{color:var(--muted);font-size:14px;line-height:1.8}.selection-tools{position:fixed;z-index:50;background:#294b66;color:white;display:flex;padding:4px;border-radius:6px;box-shadow:0 5px 20px #25343e25;gap:2px}.selection-tools button{border:0;background:transparent;color:white;font-size:13px;padding:9px 12px;border-radius:3px}.selection-tools button:hover{background:#3c617e}.highlight-menu{position:fixed;z-index:55;max-width:320px;background:#fff;border:1px solid var(--rule);border-radius:6px;box-shadow:0 6px 24px #25343e23;padding:8px}.highlight-menu button{display:block;width:100%;text-align:left;border:0;background:none;padding:10px;font-size:13px;line-height:1.5}.highlight-menu button:hover{background:var(--surface)}.toast{position:fixed;bottom:30px;left:50%;transform:translateX(-50%);background:#294b66;color:white;z-index:100;padding:13px 20px;border-radius:6px;max-width:min(650px,90vw);font-size:14px;line-height:1.6;box-shadow:0 5px 20px #25343e20}.dialog{border:1px solid var(--rule);border-radius:9px;padding:28px;width:420px;max-width:calc(100vw - 32px);color:var(--ink);box-shadow:0 15px 70px #25343e22}.dialog::backdrop{background:#263b4b66}.dialog.wide{width:640px}.dialog label{display:block;font-size:14px;margin:18px 0}.dialog input{display:block;width:100%;border:1px solid #cbd6dd;border-radius:4px;padding:11px;margin-top:8px;min-height:44px}.dialog form>.primary-button{width:100%;margin-top:12px}.dialog-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:20px}.error{color:#9a342a;font-size:13px;line-height:1.65}.history-entry{padding:16px 0;border-top:1px solid var(--rule)}.history-entry .preview{font-size:14px;line-height:1.7;max-height:160px;overflow:auto;margin:12px 0;white-space:pre-wrap}.history-entry button{margin-right:8px}.empty-state{margin:30px 0;padding:30px 0}.empty-state h2{font-size:25px;font-weight:500;line-height:1.4}.empty-state p{font-size:15px;line-height:1.8;color:var(--muted)}.jump-flash{animation:jump-flash 1.7s ease-out}@keyframes jump-flash{0%,30%{background:#d8eaf0;box-shadow:0 0 0 8px #d8eaf0}100%{box-shadow:0 0 0 0 transparent}}body.focus-mode .masthead{height:48px}body.focus-mode .workspace{height:calc(100dvh - 48px)}body.focus-mode .note-toolbar,body.focus-mode .note-heading p,body.focus-mode .paper-footer span:last-child{display:none}body.focus-mode .source-paragraph{font-size:19px}body.focus-mode .library{top:48px}body.focus-mode .toc{top:104px}*{scrollbar-width:thin;scrollbar-color:#c5d0d7 transparent}button,input,select{touch-action:manipulation}@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;animation:none!important}}
@media(min-width:1550px){.paper-content{padding-top:40px;padding-bottom:80px}.source-paragraph{font-size:18px}.note-editor{padding-left:42px;padding-right:42px}.note-heading{padding-left:42px;padding-right:42px}}
@media(max-width:1050px){.pane-bar{padding:0 14px}.paper-content{padding:22px 26px 50px}.paper-controls button,.paper-controls a{padding:7px;font-size:12px}.source-paragraph{font-size:16px}.note-heading{padding:25px 22px 14px}.note-editor{padding:8px 22px 50px}.note-toolbar{padding:4px 15px 10px}.source-title{font-size:27px}.paper-footer{padding:8px 14px}.paper-footer span:last-child{display:none}.paper-location select{font-size:12px}.note-heading h1{font-size:21px}}
@media(max-width:760px){.masthead{height:58px;padding:0 17px}.brand{font-size:22px}.brand span{display:none}.header-actions{gap:4px}.mobile-tabs{display:flex;gap:0;height:44px;background:white;border-bottom:1px solid var(--rule)}.mobile-tabs button{width:50%;border:0;background:none;color:var(--muted);font-size:14px;border-bottom:2px solid transparent}.mobile-tabs button.active{color:var(--blue);border-bottom-color:var(--blue)}.workspace{height:calc(100dvh - 102px);display:block}.paper-pane,.notes-pane{height:100%}.workspace[data-pane=paper] .notes-pane,.workspace[data-pane=notes] .paper-pane{display:none}.splitter{display:none}.paper-content{padding:18px 23px 45px}.source-title{font-size:28px}.source-paragraph{font-size:17px;line-height:1.85}.source-author{font-size:11px}.pane-bar{height:48px;min-height:48px}.paper-controls button,.paper-controls a{padding:7px 6px;font-size:12px}.paper-location select{font-size:12px;max-width:35vw}.pane-bar .tiny-label{display:none}.note-heading{padding:24px 24px 15px}.note-editor{padding:8px 24px 50px;font-size:16px}.note-toolbar{padding:2px 17px 12px}.note-toolbar button{min-height:38px;font-size:12px}.library{top:58px;padding:24px}.toc{top:151px;left:12px;width:calc(100vw - 24px)}.search-bar{padding:8px 12px;gap:6px}.search-bar .quiet{padding:6px;font-size:12px}.paper-footer,.notes-footer{padding-bottom:max(9px,env(safe-area-inset-bottom))}.dialog{padding:23px}.dialog input{font-size:16px}body.focus-mode .workspace{height:calc(100dvh - 92px)}body.focus-mode .library{top:48px}body.focus-mode .toc{top:141px}.selection-tools button{min-height:40px}.note-editor blockquote[data-citation]{font-size:14px}.source-heading{font-size:19px}.note-heading h1{font-size:22px}}
