:root { color-scheme: dark; --bg: #14161a; --bg-soft: #181b20; --bg-card: #1c2027; --line: #2a2f38; --accent: #6ea8fe; --accent-bright: #9cc2ff; --text: #dfe4ec; --text-dim: #8b94a3; --green: #3fb96f; --danger: #d9534f; --titlebar-start: #171b26; --titlebar-end: #12141c; --hover-bg: rgba(255,255,255,0.08); --hover-bg-soft: rgba(255,255,255,0.05); --accent-soft: rgba(110,168,254,0.14); --accent-faint: rgba(110,168,254,0.08); --on-accent: #0d1420; --doc-bg: #101216; --doc-overlay: rgba(16,18,22,0.92); --error-text: #ffb4b1; --warn-text: #ffcf8b; --warn-line: #6b5320; --input-bg: rgba(255,255,255,0.06); --floating-shadow: rgba(0,0,0,0.5); --scrollbar: #2a2f38; --scrollbar-hover: #3a4150; } :root[data-ui-theme="light"] { color-scheme: light; --bg: #edf1f6; --bg-soft: #f7f9fc; --bg-card: #ffffff; --line: #d4dbe6; --accent: #397bd3; --accent-bright: #245fae; --text: #1f2937; --text-dim: #667386; --green: #268a50; --danger: #c2413b; --titlebar-start: #ffffff; --titlebar-end: #edf2f8; --hover-bg: rgba(31,48,70,0.09); --hover-bg-soft: rgba(31,48,70,0.055); --accent-soft: rgba(57,123,211,0.14); --accent-faint: rgba(57,123,211,0.08); --on-accent: #ffffff; --doc-bg: #e7ecf2; --doc-overlay: rgba(255,255,255,0.92); --error-text: #b42318; --warn-text: #8a4b08; --warn-line: #d7a55a; --input-bg: #ffffff; --floating-shadow: rgba(42,55,76,0.18); --scrollbar: #c1c9d5; --scrollbar-hover: #a7b2c1; } * { box-sizing: border-box; margin: 0; padding: 0; } body { font-family: "Microsoft YaHei", "PingFang SC", -apple-system, "Segoe UI", sans-serif; background: var(--bg); color: var(--text); height: 100vh; overflow: hidden; display: flex; flex-direction: column; } .hidden { display: none !important; } .spacer { flex: 1; } button, select, input[type="range"], input[type="color"], .titlebar, .doctabs, .annotation-toolbar, .pane-head, .pane-tabs, .pane-toolbar, .statusbar, .sel-bar, .modal-title, .modal-actions { -webkit-user-select: none; user-select: none; } /* 标题栏 */ .titlebar { height: 44px; background: linear-gradient(135deg, var(--titlebar-start), var(--titlebar-end)); display: flex; align-items: center; padding: 0 8px 0 16px; -webkit-app-region: drag; border-bottom: 1px solid var(--line); flex-shrink: 0; } .titlebar-left { display: flex; align-items: center; gap: 10px; min-width: 0; } .brand { display: flex; align-items: center; gap: 7px; flex-shrink: 0; font-size: 15px; font-weight: 700; color: var(--accent-bright); letter-spacing: 0.5px; } .brand-logo { width: 25px; height: 25px; border-radius: 6px; object-fit: contain; } .brand-logo-light { display: none; } :root[data-ui-theme="light"] .brand-logo-dark { display: none; } :root[data-ui-theme="light"] .brand-logo-light { display: block; } .brand-sub { color: var(--text-dim); font-weight: 400; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .titlebar-spacer { flex: 1; } .titlebar-controls { display: flex; gap: 2px; -webkit-app-region: no-drag; flex-shrink: 0; } .win-btn { display: flex; align-items: center; justify-content: center; width: 40px; height: 30px; background: transparent; border: none; border-radius: 6px; color: var(--text-dim); font-size: 14px; cursor: pointer; } .win-btn:hover { background: var(--hover-bg); color: var(--text); } .win-close:hover { background: var(--danger); color: #fff; } .ui-theme-btn { margin-right: 6px; } :root[data-ui-theme="light"] .ui-theme-sun, :root:not([data-ui-theme="light"]) .ui-theme-moon { display: none; } /* 文档 tab 条 */ .doctabs { height: 36px; flex-shrink: 0; display: flex; align-items: stretch; background: var(--bg-soft); border-bottom: 1px solid var(--line); padding: 0 6px; } .doctabs-list { display: flex; align-items: stretch; gap: 4px; overflow-x: auto; overflow-y: hidden; flex: 1; } .doctabs-list::-webkit-scrollbar { height: 0; } .doctab { display: flex; align-items: center; gap: 8px; max-width: 220px; padding: 0 8px 0 14px; margin: 4px 0; background: transparent; border: 1px solid transparent; border-radius: 8px; color: var(--text-dim); font-size: 13px; cursor: pointer; flex-shrink: 0; } .doctab:hover { background: var(--hover-bg-soft); color: var(--text); } .doctab.active { background: var(--bg-card); border-color: var(--line); color: var(--text); } .doctab-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .doctab.active .doctab-name { color: var(--accent-bright); font-weight: 600; } .doctab-fmt { font-size: 10px; padding: 0 5px; border-radius: 5px; flex-shrink: 0; border: 1px solid var(--line); color: var(--text-dim); text-transform: uppercase; } .doctab-close { width: 18px; height: 18px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; background: transparent; border: none; border-radius: 5px; color: var(--text-dim); font-size: 11px; cursor: pointer; } .doctab-close:hover { background: var(--danger); color: #fff; } .doctab-add { align-self: center; width: 28px; height: 26px; flex-shrink: 0; background: transparent; border: 1px solid var(--line); border-radius: 8px; color: var(--text-dim); font-size: 14px; cursor: pointer; } .doctab-add:hover { color: var(--accent); border-color: var(--accent); } /* PDF 批注工具栏 */ .annotation-toolbar { min-height: 42px; flex-shrink: 0; display: flex; align-items: center; gap: 8px; padding: 6px 10px; background: var(--bg-soft); border-bottom: 1px solid var(--line); overflow-x: auto; overflow-y: hidden; } .annotation-toolbar::-webkit-scrollbar { height: 4px; } .annotation-title { color: var(--accent-bright); font-size: 12px; font-weight: 700; white-space: nowrap; } .annotation-tools { display: flex; align-items: center; gap: 3px; } .toolbar-icon { width: 16px; height: 16px; flex: none; pointer-events: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; } .annotation-tool { width: 28px; height: 28px; padding: 0; display: inline-flex; align-items: center; justify-content: center; background: transparent; border: 1px solid transparent; border-radius: 6px; color: var(--text-dim); font: inherit; cursor: pointer; } .annotation-tool:hover { color: var(--text); border-color: var(--line); } .annotation-tool.active { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-bright); } .annotation-divider { width: 1px; height: 22px; flex: none; background: var(--line); } .annotation-color, .annotation-width { display: flex; align-items: center; gap: 5px; color: var(--text-dim); font-size: 11px; white-space: nowrap; } .annotation-color input { width: 28px; height: 24px; padding: 2px; background: var(--bg-card); border: 1px solid var(--line); border-radius: 6px; cursor: pointer; } .annotation-width .toolbar-icon { width: 14px; height: 14px; } .annotation-width .mini-select { width: 42px; padding: 0 3px; } .annotation-icon-btn, .annotation-toggle-btn { width: 28px; padding: 0; display: inline-flex; align-items: center; justify-content: center; } .annotation-status { margin-left: auto; color: var(--text-dim); font-size: 11px; white-space: nowrap; } /* 主体三栏 */ .reader-body { flex: 1; min-height: 0; display: flex; } .side-pane { width: 250px; flex-shrink: 0; background: var(--bg-soft); display: flex; flex-direction: column; min-height: 0; } .side-left { border-right: 1px solid var(--line); } .side-right { width: 320px; border-left: 1px solid var(--line); } .side-pane.collapsed { display: none; } .pane-head { height: 34px; flex-shrink: 0; display: flex; align-items: center; gap: 8px; padding: 0 6px 0 14px; border-bottom: 1px solid var(--line); } .pane-head-title { font-size: 13px; font-weight: 600; color: var(--text); flex: 1; } .icon-btn { width: 22px; height: 22px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; background: transparent; border: none; border-radius: 5px; color: var(--text-dim); font-size: 11px; cursor: pointer; } .icon-btn:hover { background: var(--hover-bg); color: var(--text); } .pane-tabs { height: 34px; flex-shrink: 0; display: flex; align-items: center; gap: 2px; padding: 0 6px; border-bottom: 1px solid var(--line); } .pane-tab { height: 24px; padding: 0 12px; background: transparent; border: none; border-radius: 6px; color: var(--text-dim); font-size: 13px; cursor: pointer; } .pane-tab:hover { color: var(--text); background: var(--hover-bg-soft); } .pane-tab.active { color: var(--on-accent); background: var(--accent); font-weight: 600; } .pane-tabs-close { margin-left: auto; } .pane-body { flex: 1; min-height: 0; overflow-y: auto; padding: 10px 12px; } .pane-toolbar { margin-bottom: 10px; } .note-pane-toolbar { display: flex; align-items: center; gap: 6px; } .note-pane-toolbar .mini-select { flex: 1; min-width: 0; } /* 目录 */ .toc-item { display: block; width: 100%; text-align: left; padding: 6px 8px; margin-bottom: 2px; background: transparent; border: none; border-radius: 6px; color: var(--text-dim); font-size: 12px; line-height: 1.5; cursor: pointer; font-family: inherit; } .toc-item:hover { background: var(--hover-bg); color: var(--text); } .toc-item.current { color: var(--accent-bright); background: var(--accent-soft); } /* 正文区 */ .doc-area { flex: 1; min-width: 0; position: relative; overflow: hidden; background: var(--doc-bg); } .doc-view { position: absolute; inset: 0; touch-action: pan-x pan-y; } .doc-view.inactive { display: none; } .doc-view[data-theme="light"] { background: #f3f3f3; } .doc-view[data-theme="sepia"] { background: #e8dcc4; } .doc-view[data-theme="dark"] { background: #1b1b1b; } .host-pdf { position: absolute; inset: 0; } .epub-scroll { position: absolute; inset: 0; overflow-y: auto; } .host-epub { max-width: 46em; margin: 0 auto; padding: 20px 24px 60px; } .pinch-preview { will-change: transform; } /* 正文列有 max-width,两侧留白会露出容器底色,需与适配器内的主题色一致 */ .doc-view[data-theme="light"] .epub-scroll { background: #ffffff; } .doc-view[data-theme="sepia"] .epub-scroll { background: #f6ecd9; } .doc-view[data-theme="dark"] .epub-scroll { background: #15171c; } .doc-empty { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; color: var(--text-dim); } .doc-empty-title { font-size: 16px; color: var(--text); } .doc-empty-sub { font-size: 13px; } .doc-empty .tb-btn { margin-top: 8px; } .doc-overlay { position: absolute; inset: 0; z-index: 4; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; background: var(--doc-overlay); color: var(--text-dim); font-size: 13px; text-align: center; padding: 24px; } .doc-overlay.err { color: var(--error-text); } .doc-overlay-title { font-size: 15px; color: var(--text); } .doc-overlay-msg { max-width: 460px; line-height: 1.7; word-break: break-word; } .prog-track { width: 220px; height: 4px; background: var(--line); border-radius: 3px; overflow: hidden; } .prog-fill { height: 100%; width: 0; background: var(--accent); transition: width 0.15s; } /* 底部状态栏 */ .statusbar { height: 40px; flex-shrink: 0; display: flex; align-items: center; gap: 10px; padding: 0 12px; background: var(--bg-soft); border-top: 1px solid var(--line); } .statusbar-group { display: flex; align-items: center; gap: 4px; } .pdf-view-controls { gap: 7px; } .pdf-view-controls label { display: flex; align-items: center; gap: 4px; color: var(--text-dim); font-size: 11px; white-space: nowrap; } .status-text { font-size: 12px; color: var(--text); white-space: nowrap; } .status-text.dim { color: var(--text-dim); } #statusMsg { overflow: hidden; text-overflow: ellipsis; max-width: 320px; } #posLabel { max-width: 220px; overflow: hidden; text-overflow: ellipsis; } #zoomLabel { min-width: 44px; text-align: center; } .fit-width-btn { width: 28px; padding: 0; display: inline-flex; align-items: center; justify-content: center; } .progress-range { width: 140px; accent-color: var(--accent); cursor: pointer; } .mini-select { height: 24px; padding: 0 6px; background: var(--bg-card); color: var(--text); border: 1px solid var(--line); border-radius: 6px; font-size: 12px; cursor: pointer; outline: none; } @media (max-width: 1050px) { .statusbar { gap: 6px; padding-inline: 8px; } #statusMsg { display: none; } #posLabel { max-width: 90px; } .progress-range { width: auto; min-width: 50px; max-width: 100px; flex: 1; } } @media (max-width: 850px) { .pdf-view-controls label > span, #pctLabel { display: none; } .pdf-view-controls { gap: 4px; } .pdf-view-controls .mini-select { width: 52px; padding-inline: 3px; } } /* 按钮(沿用主窗口风格) */ .tb-btn { height: 28px; padding: 0 14px; background: var(--accent); color: var(--on-accent); border: none; border-radius: 8px; font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap; font-family: inherit; } .tb-btn:hover { background: var(--accent-bright); } .tb-btn.ghost { background: transparent; color: var(--text-dim); border: 1px solid var(--line); } .tb-btn.ghost:hover { color: var(--text); border-color: var(--accent); } .tb-btn.danger { background: transparent; color: var(--danger); border: 1px solid var(--danger); } .tb-btn.danger:hover { background: var(--danger); color: #fff; } .tb-btn.sm { height: 24px; padding: 0 10px; font-size: 12px; font-weight: 500; } .tb-btn:disabled { opacity: 0.4; cursor: not-allowed; } /* 列表(书签 / 笔记) */ .list { display: flex; flex-direction: column; gap: 8px; } .list-item { background: var(--bg-card); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; } .list-item-head { display: flex; align-items: center; gap: 8px; } .list-item-label { flex: 1; min-width: 0; background: transparent; border: none; padding: 0; text-align: left; color: var(--accent-bright); font-size: 12px; font-weight: 600; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: inherit; } .list-item-label:hover { text-decoration: underline; } .list-item-del { width: 20px; height: 20px; flex-shrink: 0; background: transparent; border: none; border-radius: 5px; color: var(--text-dim); font-size: 12px; cursor: pointer; } .list-item-del:hover { background: var(--danger); color: #fff; } .list-item-edit { width: 20px; height: 20px; flex-shrink: 0; background: transparent; border: none; border-radius: 5px; color: var(--text-dim); font-size: 12px; cursor: pointer; } .list-item-edit:hover { background: var(--hover-bg); color: var(--text); } .list-item-text { margin-top: 6px; font-size: 12px; line-height: 1.6; color: var(--text-dim); white-space: pre-wrap; word-break: break-word; max-height: 9.6em; overflow: hidden; } .rich-note-content { white-space: normal; } .rich-note-content > :first-child { margin-top: 0; } .rich-note-content > :last-child { margin-bottom: 0; } .rich-note-content p, .rich-note-content h2, .rich-note-content h3, .rich-note-content blockquote, .rich-note-content pre, .rich-note-content ul, .rich-note-content ol { margin: 0.4em 0; } .rich-note-content h2 { font-size: 1.3em; } .rich-note-content h3 { font-size: 1.12em; } .rich-note-content blockquote { padding: 6px 8px; background: var(--accent-faint); border-left: 3px solid var(--accent); color: var(--text-dim); } .rich-note-content pre, .rich-note-content code { font-family: Consolas, "Cascadia Mono", monospace; } .rich-note-content pre { overflow-x: auto; padding: 7px 8px; background: var(--input-bg); border-radius: 6px; white-space: pre-wrap; } .rich-note-content ul, .rich-note-content ol { padding-left: 1.5em; } .rich-note-image { position: relative; width: fit-content; max-width: 100%; margin: 8px 0; } .rich-note-image img { display: block; max-width: 100%; max-height: 420px; border: 1px solid var(--line); border-radius: 7px; object-fit: contain; } .list-item-quote { margin-top: 6px; padding-left: 8px; border-left: 2px solid var(--line); font-size: 11px; line-height: 1.6; color: var(--text-dim); word-break: break-word; max-height: 4.8em; overflow: hidden; } .list-item-time { margin-top: 6px; font-size: 11px; color: var(--text-dim); } .list-item-tags { margin-top: 6px; color: var(--accent); font-size: 11px; word-break: break-word; } .list-item-kind { display: inline-block; padding: 0 6px; margin-left: 6px; font-size: 10px; border-radius: 8px; background: var(--accent-soft); color: var(--accent); } .list-empty { color: var(--text-dim); font-size: 12px; line-height: 1.8; text-align: center; padding: 30px 6px; white-space: pre-line; } /* AI 面板 */ .ai-pane { display: flex; flex-direction: column; gap: 10px; overflow: hidden; } .ai-status { font-size: 11px; line-height: 1.6; color: var(--text-dim); background: var(--bg-card); border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; word-break: break-word; flex-shrink: 0; } .ai-status.warn { color: var(--warn-text); border-color: var(--warn-line); } .ai-scope { display: flex; align-items: center; gap: 6px; flex-shrink: 0; } .ai-scope-label { font-size: 11px; color: var(--text-dim); flex: none; } .ai-scope-select { background: var(--bg-card); border: 1px solid var(--line); color: var(--text); border-radius: 6px; padding: 3px 6px; font-size: 11px; } .ai-cost { font-size: 11px; color: var(--text-dim); margin-left: auto; text-align: right; } .ai-visual-card { display: grid; grid-template-columns: 68px minmax(0, 1fr); gap: 8px; padding: 8px; border: 1px solid var(--accent); border-radius: 8px; background: var(--bg-card); flex-shrink: 0; } .ai-visual-card img { width: 68px; height: 76px; object-fit: contain; border: 1px solid var(--line); border-radius: 5px; background: #fff; } .ai-visual-body { min-width: 0; display: flex; flex-direction: column; gap: 3px; font-size: 11px; color: var(--text-dim); } .ai-visual-body strong { color: var(--text); font-size: 12px; } .ai-visual-body span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .ai-visual-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 5px; } .ai-visual-actions .tb-btn { flex: 1 1 auto; } .ai-quick { display: flex; flex-wrap: wrap; gap: 6px; flex-shrink: 0; } .ai-quote { flex-shrink: 0; padding-left: 8px; border-left: 2px solid var(--accent); font-size: 11px; line-height: 1.6; color: var(--text-dim); max-height: 4.8em; overflow-y: auto; word-break: break-word; } .ai-output { flex: 1; min-height: 120px; overflow-y: auto; background: var(--bg-card); border: 1px solid var(--line); border-radius: 8px; padding: 10px; font-size: 13px; line-height: 1.75; white-space: normal; overflow-wrap: anywhere; } .ai-output.ai-output-plain { white-space: pre-wrap; } .ai-output:empty::before { content: "AI 回复会显示在这里"; color: var(--text-dim); font-size: 12px; } .ai-output.streaming { border-color: var(--accent); } .ai-output > :first-child { margin-top: 0; } .ai-output > :last-child { margin-bottom: 0; } .ai-output p, .ai-output ul, .ai-output ol, .ai-output blockquote, .ai-output pre, .ai-output table, .ai-output hr { margin: 0.65em 0; } .ai-output h1, .ai-output h2, .ai-output h3, .ai-output h4, .ai-output h5, .ai-output h6 { margin: 0.9em 0 0.45em; color: var(--text); line-height: 1.35; } .ai-output h1 { font-size: 1.5em; } .ai-output h2 { font-size: 1.32em; } .ai-output h3 { font-size: 1.16em; } .ai-output h4, .ai-output h5, .ai-output h6 { font-size: 1em; } .ai-output ul, .ai-output ol { padding-left: 1.7em; } .ai-output li + li { margin-top: 0.2em; } .ai-output blockquote { padding: 0.35em 0.75em; border-left: 3px solid var(--accent); background: var(--accent-faint); color: var(--text-dim); } .ai-output code { padding: 0.12em 0.35em; border-radius: 4px; background: var(--input-bg); font-family: Consolas, "Cascadia Mono", monospace; font-size: 0.92em; } .ai-output pre { max-width: 100%; overflow: auto; padding: 9px 10px; border: 1px solid var(--line); border-radius: 7px; background: var(--input-bg); white-space: pre; overflow-wrap: normal; } .ai-output pre code { padding: 0; background: transparent; white-space: inherit; } .ai-output table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; } .ai-output th, .ai-output td { padding: 5px 8px; border: 1px solid var(--line); text-align: left; white-space: nowrap; } .ai-output th { background: var(--accent-faint); } .ai-output hr { border: 0; border-top: 1px solid var(--line); } .ai-output a { color: var(--accent-bright); text-decoration: underline; cursor: pointer; } .ai-output .ai-md-link-blocked { color: var(--text-dim); cursor: not-allowed; text-decoration-style: dotted; } .ai-md-image-placeholder { color: var(--text-dim); font-style: italic; } .ai-error { flex-shrink: 0; font-size: 12px; line-height: 1.6; color: var(--error-text); word-break: break-word; } .ai-out-actions { display: flex; gap: 6px; flex-shrink: 0; flex-wrap: wrap; } .ai-input { display: flex; gap: 6px; align-items: flex-end; flex-shrink: 0; } .ai-input textarea { flex: 1; resize: none; background: var(--input-bg); color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; font-size: 12px; line-height: 1.6; outline: none; font-family: inherit; } .ai-input textarea:focus { border-color: var(--accent); } .visual-select-overlay { position: absolute; inset: 0; z-index: 45; overflow: hidden; cursor: crosshair; touch-action: none; -webkit-user-select: none; user-select: none; } .visual-select-overlay.visual-select-capturing { opacity: 0; pointer-events: none; } .visual-select-hint { position: absolute; top: 12px; left: 50%; z-index: 3; transform: translateX(-50%); max-width: calc(100% - 24px); padding: 7px 11px; border: 1px solid rgba(255,255,255,0.3); border-radius: 7px; background: rgba(20,20,20,0.9); color: #fff; font-size: 12px; white-space: nowrap; pointer-events: none; } .visual-select-box { position: absolute; z-index: 2; box-sizing: border-box; border: 2px solid #4ca3ff; background: rgba(76,163,255,0.08); box-shadow: 0 0 0 9999px rgba(0,0,0,0.52); cursor: move; } .visual-select-handle { position: absolute; width: 12px; height: 12px; border: 2px solid #fff; border-radius: 50%; background: #1687ff; } .handle-nw { left: -7px; top: -7px; cursor: nwse-resize; } .handle-ne { right: -7px; top: -7px; cursor: nesw-resize; } .handle-se { right: -7px; bottom: -7px; cursor: nwse-resize; } .handle-sw { left: -7px; bottom: -7px; cursor: nesw-resize; } .visual-select-actions { position: absolute; left: 50%; bottom: 14px; z-index: 4; transform: translateX(-50%); display: flex; gap: 6px; padding: 6px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg-card); box-shadow: 0 8px 28px rgba(0,0,0,0.45); cursor: default; } /* 划选浮动工具条 */ .sel-bar { position: fixed; z-index: 40; display: flex; gap: 2px; padding: 4px; background: var(--bg-card); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 6px 20px var(--floating-shadow); } .sel-btn { height: 24px; padding: 0 10px; background: transparent; border: none; border-radius: 6px; color: var(--text); font-size: 12px; cursor: pointer; font-family: inherit; } .sel-btn:hover { background: var(--accent); color: var(--on-accent); } /* 提示条 */ .toast { position: fixed; left: 50%; bottom: 58px; transform: translateX(-50%); z-index: 60; max-width: 70vw; padding: 8px 16px; background: var(--bg-card); border: 1px solid var(--line); border-radius: 20px; color: var(--text); font-size: 12px; line-height: 1.5; box-shadow: 0 6px 20px var(--floating-shadow); word-break: break-word; } .toast.err { border-color: var(--danger); color: var(--error-text); } /* 书库选择弹窗 */ .modal { position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,0.6); display: flex; align-items: center; justify-content: center; } .modal-box { width: 460px; max-width: 90vw; background: var(--bg-card); border: 1px solid var(--line); border-radius: 14px; padding: 18px; box-shadow: 0 18px 60px rgba(0,0,0,0.45); } .modal-title { font-size: 15px; font-weight: 700; margin-bottom: 12px; } .modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 14px; } .ai-confirm-box { width: 480px; } .ai-confirm-summary { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 8px; margin-bottom: 12px; } .ai-confirm-summary > div { min-width: 0; padding: 10px 12px; background: var(--accent-faint); border: 1px solid var(--line); border-radius: 9px; } .ai-confirm-label { display: block; margin-bottom: 4px; color: var(--text-dim); font-size: 11px; } .ai-confirm-summary strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--accent-bright); font-size: 13px; } .ai-confirm-notice { color: var(--text-dim); font-size: 12px; line-height: 1.7; } .pick-list { max-height: 48vh; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; } .pick-item { display: flex; align-items: center; gap: 8px; width: 100%; padding: 8px 10px; text-align: left; background: transparent; border: 1px solid var(--line); border-radius: 8px; color: var(--text); font-size: 13px; cursor: pointer; font-family: inherit; } .pick-item:hover { border-color: var(--accent); background: var(--accent-faint); } .pick-item:disabled { opacity: 0.45; cursor: not-allowed; } .pick-item-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .note-editor-box { display: flex; width: 760px; max-height: 92vh; flex-direction: column; } .note-editor-fields { display: flex; flex-direction: column; gap: 10px; } .note-type-chooser { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; } .note-type-choice { display: flex; min-height: 128px; padding: 18px; flex-direction: column; gap: 7px; background: var(--input-bg); border: 1px solid var(--line); border-radius: 11px; color: var(--text); cursor: pointer; font: inherit; text-align: left; } .note-type-choice:hover, .note-type-choice:focus-visible { background: var(--accent-faint); border-color: var(--accent); outline: none; } .note-type-choice-title { font-size: 15px; font-weight: 700; } .note-type-choice-desc { color: var(--text-dim); font-size: 12px; line-height: 1.55; } .canvas-note-modal .note-editor-box { height: 94vh; width: min(1180px, 96vw); max-width: 96vw; max-height: 94vh; padding: 16px; } .canvas-note-modal .note-editor-fields { display: grid; min-height: 0; flex: 1; grid-template-columns: minmax(0, 1fr) minmax(220px, 0.55fr); grid-template-rows: auto minmax(0, 1fr) auto; gap: 8px 10px; overflow: hidden; } .canvas-note-modal .modal-title, .canvas-note-modal .modal-actions { flex: 0 0 auto; } .canvas-note-modal #noteRichEditor { display: flex; min-height: 0; grid-column: 1 / -1; flex-direction: column; } .canvas-note-modal #noteRichEditor .mixed-note-editor, .canvas-note-modal #noteRichEditor .mixed-note-canvas { min-height: 0; flex: 1; } .canvas-note-modal .note-editor-quote { max-height: 3.2em; grid-column: 1 / -1; overflow: hidden; } .canvas-note-modal .note-editor-row { min-width: 0; } .canvas-note-modal .note-editor-pin { align-self: end; justify-self: end; white-space: nowrap; } @media (max-width: 680px) { .canvas-note-modal .note-editor-box { height: 98vh; max-height: 98vh; } .canvas-note-modal .note-editor-fields { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto minmax(0, 1fr) auto auto; } .canvas-note-modal #noteRichEditor { grid-column: 1; } .canvas-note-modal .note-editor-pin { justify-self: start; } } .note-editor-association { padding: 7px 9px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); color: var(--text-dim); font-size: 12px; } .note-editor-input { width: 100%; padding: 8px 10px; background: var(--input-bg); color: var(--text); border: 1px solid var(--line); border-radius: 8px; outline: none; font: inherit; font-size: 12px; line-height: 1.6; } textarea.note-editor-input { resize: vertical; min-height: 110px; } .note-editor-input:focus { border-color: var(--accent); } .rich-note-editor { overflow: hidden; background: var(--input-bg); border: 1px solid var(--line); border-radius: 9px; } .rich-note-editor:focus-within { border-color: var(--accent); } .rich-note-toolbar { display: flex; align-items: center; gap: 4px; padding: 6px; background: var(--panel); border-bottom: 1px solid var(--line); flex-wrap: wrap; } .rich-note-style, .rich-note-tool { height: 28px; background: var(--bg-card); border: 1px solid var(--line); border-radius: 6px; color: var(--text); font: inherit; } .rich-note-style { padding: 0 7px; } .rich-note-tool { min-width: 29px; padding: 0 7px; cursor: pointer; } .rich-note-tool:hover { border-color: var(--accent); color: var(--accent-bright); } .rich-note-tool-bold { font-weight: 700; } .rich-note-tool-italic { font-style: italic; } .rich-note-tool-underline { text-decoration: underline; } .rich-note-tool-strikeThrough { text-decoration: line-through; } .rich-note-surface { min-height: 220px; max-height: 42vh; padding: 12px 14px; overflow-y: auto; color: var(--text); font-size: 13px; line-height: 1.7; outline: none; } .rich-note-surface:empty::before { color: var(--text-dim); content: attr(data-placeholder); pointer-events: none; } .rich-note-surface .rich-note-image { cursor: default; } .rich-note-image-remove { position: absolute; top: 6px; right: 6px; width: 26px; height: 26px; padding: 0; background: rgba(20,20,20,0.78); border: 1px solid rgba(255,255,255,0.35); border-radius: 50%; color: #fff; cursor: pointer; font-size: 18px; line-height: 22px; } .rich-note-image-remove:hover { background: var(--danger); } .note-editor-quote { max-height: 120px; overflow-y: auto; padding: 8px 10px; border-left: 3px solid var(--accent); background: var(--accent-faint); color: var(--text-dim); font-size: 12px; line-height: 1.6; white-space: pre-wrap; } .note-editor-row { display: flex; align-items: flex-end; gap: 10px; } .note-editor-row label { display: flex; flex-direction: column; gap: 5px; color: var(--text-dim); font-size: 11px; } .note-editor-row .mini-select { min-width: 140px; } .note-editor-tags { flex: 1; } .note-editor-pin { color: var(--text-dim); font-size: 12px; } /* 滚动条 */ ::-webkit-scrollbar { width: 10px; height: 10px; } ::-webkit-scrollbar-track { background: transparent; } ::-webkit-scrollbar-thumb { background: var(--scrollbar); border-radius: 6px; } ::-webkit-scrollbar-thumb:hover { background: var(--scrollbar-hover); }