:root{font-family:-apple-system,BlinkMacSystemFont,"SF Pro Text","PingFang SC","Microsoft YaHei",sans-serif;color:#25272b;background:#fafaf9;font-synthesis:none;--blue:#2563eb;--line:#e5e6e8;--muted:#7c8088;--surface:#fff;--radius:12px}*{box-sizing:border-box}body{margin:0;-webkit-tap-highlight-color:transparent}button,input,textarea,select{font:inherit}button{color:inherit;border:1px solid var(--line);background:#fff;border-radius:8px;min-height:36px;padding:7px 12px;cursor:pointer;white-space:nowrap}button:hover{background:#f4f5f7}button:active{background:#e9ebef}button:disabled{opacity:.35;cursor:default}button:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible{outline:3px solid #2563eb66;outline-offset:2px}button.primary{background:#25272b;color:white;border-color:#25272b;font-weight:600}button.primary:hover{background:#41444b}.secondary{background:white}.text-button{border:0;background:none;color:var(--blue)}input,textarea,select{border:1px solid #dcdee3;border-radius:8px;padding:10px 12px;background:#fff;color:inherit}textarea{resize:vertical;line-height:1.65}input[type=checkbox]{accent-color:var(--blue);width:16px;height:16px}input[type=search]{min-width:0}.icon-button{border:0;background:transparent;padding:8px;display:inline-flex;align-items:center;justify-content:center;width:40px;height:40px;flex-shrink:0}.icon-button svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}.icon-button[aria-pressed=true]{background:#e9eefb;color:var(--blue)}[hidden]{display:none!important}#boot{display:grid;place-items:center;height:100dvh;color:var(--muted)}.app-header{height:76px;display:flex;align-items:center;gap:10px;padding:12px max(20px,env(safe-area-inset-right)) 12px max(24px,env(safe-area-inset-left));border-bottom:1px solid var(--line);background:#fff}.brand{border:0;background:none;display:flex;align-items:center;gap:10px;font-size:15px;padding:0}.brand img{width:43px;height:43px}.brand b{font-family:Georgia,serif;font-size:22px;margin-right:4px}.status{margin-left:auto;font-size:12px;color:var(--muted)}.status.unsaved{color:#b45309}.save-warning{display:flex;align-items:center;gap:10px;background:#fff3d9;padding:9px 22px;font-size:13px}.save-warning span{margin-right:auto}#library{max-width:1200px;margin:auto;padding:46px 38px 20px}.library-heading{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:28px}.eyebrow{font-size:10px;letter-spacing:2.5px;color:#969ba5;font-weight:600}h1{font-size:26px;line-height:1.3;margin:10px 0}h1 small{font-size:14px;color:var(--muted);font-weight:400;vertical-align:middle;margin-left:8px}.library-actions{display:flex;gap:10px}.library-actions input{max-width:235px}.papers{display:flex;flex-direction:column;gap:12px}.paper-card{display:flex;align-items:center;background:white;border:1px solid var(--line);border-radius:14px;padding:18px 14px 18px 20px;gap:12px}.paper-open{border:0;background:transparent;padding:0;display:flex;align-items:center;text-align:left;min-width:0;flex:1;gap:18px;white-space:normal}.paper-open:hover{background:transparent}.paper-glyph{width:57px;height:72px;background:#f5f5f5;border-radius:9px;display:grid;place-items:center;flex-shrink:0;color:#92979f}.paper-glyph svg{width:27px;height:32px;fill:none;stroke:currentColor;stroke-width:1.3}.paper-text{min-width:0}.paper-title{font-size:16px;font-weight:600;line-height:1.5;overflow-wrap:anywhere}.paper-meta{display:flex;flex-wrap:wrap;gap:5px 13px;font-size:12px;color:var(--muted);line-height:1.6;margin-top:8px}.translated-tag{color:#2b8a54}.paper-actions{display:flex;align-items:center;gap:2px}.starred{color:#d5a231}.library-footer{display:flex;justify-content:space-between;font-size:11px;color:#9a9ea6;padding-top:25px}.welcome{text-align:center;padding:58px 10px 80px}.welcome img{width:85px;height:85px}.welcome h2{font-size:25px;font-weight:600;margin:20px 0 12px}.welcome p{color:var(--muted);font-size:14px;line-height:1.7;max-width:410px;margin:0 auto 24px}.welcome .primary{display:block;margin:0 auto 9px}.welcome .subtle{font-size:11px;margin-top:25px}.empty{text-align:center;color:var(--muted);padding:60px 10px}.subtle{font-size:12px;color:var(--muted);line-height:1.65}.error-text{font-size:13px;line-height:1.5;color:#b64232;white-space:pre-wrap}.error-text:empty{display:none}#reader{height:calc(100dvh - 76px);display:flex;flex-direction:column;min-height:380px}.reader-heading{display:flex;align-items:center;gap:6px;padding:8px 16px;background:#fff;border-bottom:1px solid var(--line);min-height:60px}.reader-heading h1{font-size:13px;font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1;color:#777;margin-right:10px}.segmented{display:flex;border:1px solid #dedfe2;border-radius:8px;background:#f3f3f4;flex-shrink:0}.segmented button{border:0;background:none;min-width:56px;padding:6px 10px;min-height:32px}.segmented button[aria-pressed=true]{background:white;box-shadow:0 1px 4px #0002}.tool-bar{display:flex;gap:8px;align-items:center;min-height:58px;background:#fff;padding:6px 18px;border-bottom:1px solid var(--line);overflow-x:auto;flex-shrink:0}.tool-group,.color-group{display:flex;gap:4px;align-items:center}.tool-bar .icon-button{width:36px;height:36px}.tool-separator{width:1px;height:25px;background:var(--line);margin:0 5px;flex-shrink:0}.color-button{border:0;width:27px;height:27px;min-height:27px;border-radius:50%;padding:0;margin:0 3px;box-shadow:inset 0 0 0 1px #0001;flex-shrink:0}.color-button[aria-pressed=true]{outline:1.8px solid #43464c;outline-offset:3px}.tool-bar select{padding:5px 7px;max-width:68px;min-height:33px;font-size:13px}.finger-option{display:flex;align-items:center;gap:5px;white-space:nowrap;font-size:12px;color:var(--muted);margin-left:6px}.toolbar-space{flex:1}#reading-body{display:flex;flex:1;min-height:0;position:relative}#panes{display:flex;flex:1;min-width:0;min-height:0;--split:50%}.pdf-pane{min-width:0;display:flex;flex-direction:column;flex:1;position:relative;overflow:hidden}.pane-caption{height:29px;padding:6px 13px;font-size:11px;line-height:17px;color:#969aa1;background:#fafafa;border-bottom:1px solid #ebebec;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex-shrink:0}.pdf-scroll{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;background:#f0f0ef;padding:18px;position:relative}.pdf-page{position:relative;box-shadow:0 1px 7px #0002;background:white;margin:0 auto 12px;flex-shrink:0}.pdf-page canvas{display:block;position:absolute;left:0;top:0}.paper-canvas{position:relative!important}.mark-canvas{pointer-events:none}.gesture-canvas{touch-action:none;cursor:crosshair}.pdf-message{color:var(--muted);font-size:14px;text-align:center;padding:70px 20px;line-height:1.8;white-space:pre-line}.pdf-message:empty{display:none}#split-handle{width:10px;background:#fafafa;border-left:1px solid #e5e5e5;border-right:1px solid #e5e5e5;cursor:col-resize;touch-action:none;flex-shrink:0;position:relative}#split-handle:after{content:'';width:2px;height:32px;background:#c7cad0;position:absolute;top:50%;left:3px;border-radius:2px}#panes.split #original-pane{flex:0 0 calc(var(--split) - 5px)}#panes.reversed{flex-direction:row-reverse}.reader-footer{min-height:52px;display:flex;align-items:center;gap:4px;padding:6px 14px max(6px,env(safe-area-inset-bottom));border-top:1px solid var(--line);background:#fff;overflow-x:auto;font-size:12px;flex-shrink:0}.reader-footer button{border:0;background:transparent;min-height:34px;font-size:12px;padding:5px 8px}.reader-footer .icon-button{width:30px;height:34px}.page-navigation{display:flex;align-items:center;gap:4px;margin:0 6px;white-space:nowrap;font-variant-numeric:tabular-nums}.page-navigation button{font-size:26px;line-height:20px}.page-navigation input{width:42px;border:0;padding:5px 2px;text-align:right;background:transparent;font-size:14px}.page-navigation span{color:var(--muted);min-width:32px}.reader-footer select{max-width:155px;font-size:11px;padding:5px}#notes-panel{width:270px;overflow-y:auto;border-left:1px solid var(--line);background:white;flex-shrink:0}.aside-heading{display:flex;align-items:center;justify-content:space-between;padding:5px 12px;border-bottom:1px solid var(--line);font-size:13px}.note-item{padding:12px;border-bottom:1px solid #eceef0;font-size:12px}.note-item .note-top{display:flex;align-items:center;justify-content:space-between;color:var(--muted);margin-bottom:5px}.note-item .note-body{border:0;white-space:normal;text-align:left;display:block;width:100%;padding:4px 0;line-height:1.6;overflow-wrap:anywhere}.note-item .icon-button{width:28px;height:28px;padding:4px}.note-item .icon-button svg{width:16px}.conflict{color:#b7791f;font-size:11px}dialog{border:1px solid #dedfe3;border-radius:16px;padding:23px;max-width:520px;width:calc(100% - 36px);box-shadow:0 16px 70px #0003;max-height:85dvh;overflow-y:auto}dialog::backdrop{background:#20253455}.dialog-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:16px}.dialog-heading h2{font-size:19px;margin:0;font-weight:600}.dialog-heading .icon-button{font-size:24px;width:30px;height:30px}dialog label{display:block;font-size:12px;font-weight:500;margin:14px 0 8px}dialog input:not([type=checkbox]),dialog textarea{width:100%}dialog p{font-size:13px;line-height:1.7;color:var(--muted)}.dialog-actions{display:flex;gap:8px;margin-top:15px}.settings-actions{display:flex;flex-wrap:wrap;gap:8px;border-top:1px solid var(--line);padding-top:18px;margin-top:23px}.settings-actions button{font-size:12px}.dialog-list{display:flex;flex-direction:column;gap:4px}.dialog-list button{white-space:normal;text-align:left;border:0;line-height:1.6}.dialog-list button small{color:var(--muted)}.find-row{display:flex;gap:9px}.find-row input{min-width:0}.find-result{display:block;text-align:left;width:100%;white-space:normal;line-height:1.6;border:0;margin-bottom:7px}.toast{position:fixed;z-index:50;left:50%;transform:translateX(-50%);bottom:max(25px,env(safe-area-inset-bottom));padding:13px 20px;border:1px solid #dedfe3;background:#fff;box-shadow:0 6px 30px #0002;border-radius:10px;font-size:13px;max-width:min(620px,90vw);line-height:1.5}.update-app{position:fixed;z-index:60;right:16px;bottom:20px;background:#25272b;color:white;border-color:#25272b;font-size:12px}.page-text{width:100%;min-height:230px;font:14px/1.8 system-ui}.muted{color:var(--muted)}
@media(max-width:850px){.reader-heading h1{display:none}.reader-heading{gap:3px;padding:7px 8px}.reader-heading .segmented{margin-right:auto}.tool-bar{padding:6px 8px;gap:5px}.tool-group{gap:1px}.tool-bar .icon-button{width:32px}.color-button{width:23px;height:23px;min-height:23px;margin:0 2px}.finger-option{font-size:11px}.reader-footer{padding-inline:6px}.reader-footer select{max-width:110px}#notes-panel{position:absolute;right:0;top:0;bottom:0;z-index:5;box-shadow:-5px 0 20px #0001}#library{padding:30px 22px}.library-heading{align-items:flex-start}.library-actions{flex-direction:column}.library-actions input{max-width:200px}}
@media(max-width:540px){.app-header{height:65px;padding:9px 12px}.brand span{font-size:12px}.brand b{font-size:19px}.brand img{width:35px;height:35px}.status{font-size:10px}.app-header .icon-button{width:32px}#reader{height:calc(100dvh - 65px)}#library{padding:27px 14px}.library-heading{gap:10px}.library-heading h1{font-size:22px}.eyebrow{font-size:8px;letter-spacing:1.6px}.library-actions input{width:145px}.library-actions button{font-size:12px}.paper-card{padding:14px 8px 14px 13px;gap:5px}.paper-open{gap:12px}.paper-glyph{width:40px;height:57px}.paper-title{font-size:14px}.paper-meta{font-size:10px;gap:3px 8px}.paper-actions .open-explicit{display:none}.paper-actions .icon-button{width:30px}.finger-option{display:none}.reader-footer #translation-version{display:none}.reader-heading .icon-button{width:33px}.tool-bar{min-height:52px}.tool-group .icon-button{width:31px}.tool-separator{margin:0 2px}.pdf-scroll{padding:12px}.reader-footer #zoom-fit{font-size:10px}.tool-bar .toolbar-space{min-width:0}.welcome{padding-top:40px}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;animation:none!important;transition:none!important}}
