/* The 2026 writer layout. Loaded after style.css; components styled there
   (tag picker, image frame, bookmarks, trash, progress) keep their rules. */
@font-face{font-family:'Zhuque Fangsong';src:url('vendor/ZhuqueFangsong-Regular.ttf') format('truetype');font-display:swap}
:root{--page:#f6f5f9;--panel:#fff;--line:#ebe8f1;--ink:#292731;--soft:#f3f0fb;--quiet:#8d879b;--chip:#fbfafd;--chipline:#e6e1f0;--paper:#fff;--paper-ink:#34313a}
body{background:var(--page)}
body[data-view="editor"] .topbar,body[data-view="editor"] footer{display:none}
body[data-view="editor"]{padding-bottom:64px}
body[data-view="editor"] .workspace{max-width:none;padding:0 84px}
.ghost{border:0;background:transparent;color:#7a7590;padding:7px 10px;border-radius:8px;font-size:13px;cursor:pointer}
.ghost:hover,.ghost[aria-expanded="true"]{background:var(--soft);color:var(--accent)}
.pop{background:var(--panel);border:1px solid var(--line);border-radius:12px;box-shadow:0 14px 34px #3c2f5528;z-index:60}
@keyframes writer-rise{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}
@keyframes writer-rise-centered{from{opacity:0;transform:translate(-50%,6px)}to{opacity:1;transform:translate(-50%,0)}}

/* Top bar of the open chapter: back, book and chapter, ambience, save state. */
.wtop{position:sticky;top:0;z-index:40;display:flex;align-items:center;gap:12px;height:50px;margin:0 -84px;padding:0 22px;background:var(--panel);border-bottom:1px solid var(--line)}
.wtop-space{flex:1}
.wcenter{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);display:flex;flex-direction:column;align-items:center}
.bookname{border:0;background:transparent;font-size:15px;font-weight:700;color:var(--ink);padding:3px 12px 3px 26px;border-radius:8px;cursor:pointer;max-width:46vw;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.bookname .go{display:inline-block;width:8px;margin-left:6px;color:#b9b2cc;font-weight:400;font-size:13px;text-align:center;transition:transform .15s,color .15s}
.bookname:hover{background:var(--soft)}.bookname:hover .go{color:var(--accent);transform:translateX(2px)}
.chapbtn{display:flex;align-items:center;gap:4px;border:0;background:transparent;color:var(--quiet);font-size:12px;padding:2px 8px 3px 20px;border-radius:6px;cursor:pointer;max-width:46vw}
.chapbtn span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.chapbtn[data-count]:not([data-count=""])::after{content:attr(data-count);order:2;margin-left:6px;color:#b0a9c2;font-weight:400}
.chapbtn i{order:3;flex:none;width:8px;text-align:center;font-style:normal;font-size:10px;color:#a79fc6;transition:transform .15s}
.chapbtn:hover,.chapbtn[aria-expanded="true"]{background:var(--soft);color:var(--accent)}
.chapbtn[aria-expanded="true"] i{transform:rotate(180deg)}
.wcenter:has(.chapbtn[aria-expanded="true"]) .bookname:hover{background:transparent}
/* 保存状态定宽（用户 2026-11-18）：宽度按最长的"保存失败"留够，图标位固定 10px，文字从同一条线开始；
   "已保存 / 保存中"切换时右边的按钮不跳。不画边框。切换逻辑见 shell.js 的 mirror()。 */
.top-save{display:flex;align-items:center;gap:6px;flex:none;width:76px;font-size:12px;color:#8f8a9c;white-space:nowrap;overflow:hidden}
.top-save i{flex:none;width:7px;height:7px;margin:0 1.5px;border-radius:50%;background:#b1a8ce}
.top-save[data-state="saving"] i{width:8px;height:8px;margin:0 1px;background:none;border:1.5px solid #b1a8ce;border-top-color:transparent;box-sizing:border-box;animation:top-save-spin .8s linear infinite}
@keyframes top-save-spin{to{transform:rotate(360deg)}}
@media (prefers-reduced-motion:reduce){.top-save[data-state="saving"] i{animation:none}}
.top-save[data-state="saved"] i{background:#64b893}.top-save[data-state="error"] i{background:#e17c78}
html.toolbox-native-header .top-save{display:none}
html.toolbox-native-header .wtop{top:0}
.ambient-slot{position:relative}
.ambient-toggle[aria-pressed="true"]{background:var(--soft);color:var(--accent);font-weight:600}
.ambient-toggle .eq{display:inline-flex;align-items:flex-end;gap:2px;height:11px;margin-right:6px;vertical-align:-1px}
.ambient-toggle .eq i{width:2px;background:currentColor;border-radius:1px;animation:writer-eq 1s ease-in-out infinite}
.ambient-toggle .eq i:nth-child(2){animation-delay:.25s}.ambient-toggle .eq i:nth-child(3){animation-delay:.5s}
@keyframes writer-eq{0%,100%{height:3px}50%{height:11px}}
@media (prefers-reduced-motion:reduce){.ambient-toggle .eq i{animation:none;height:8px}}
.ambient-pop.ambient-panel{position:absolute;right:0;top:44px;width:300px;margin:0;animation:writer-rise .18s}

/* Chapter list under the chapter name. */
.chappop{position:absolute;top:52px;left:50%;margin-left:-170px;width:340px;max-height:min(460px,70vh);overflow:auto;padding:8px;animation:writer-rise .18s}
.chappop .chapter-list{display:flex;flex-direction:column;gap:2px;padding:0;overflow:visible}
.crow{display:flex;align-items:center;gap:4px;border-radius:8px}
.crow:hover{background:#f7f5fc}
.crow[aria-current="true"]{background:var(--soft)}
.crow .cl{flex:1;min-width:0;display:flex;align-items:center;gap:8px;border:0;background:transparent;padding:8px 10px;text-align:left;color:#4c475b;font-size:13px;cursor:pointer;border-radius:8px}
.crow[aria-current="true"] .cl{color:var(--accent);font-weight:650}
.crow .cl span{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.crow .cl small{font-size:11px;color:#aaa4b5;font-weight:400}
/* 对齐测评第 3 条：style.css 里旧章节条的 ".chapter-list button{max-width:200px; flex:0 0 auto}" 也套到了这里，
   章节名那一项被卡在 200px，"0 字 ⋯"停在行中间、右边空出 90px。这里解除，让章节名吃掉剩余宽度，⋯ 贴到行右边
   （和下面"添加序章"的右边对齐）。⋯ 改成竖直居中的三点图标（以前是文字字符，落在基线上，看着比"第1章"低）。 */
.chappop .chapter-list .crow button{max-width:none}
.crow .more{flex:none;display:grid;place-items:center;border:0;background:transparent;color:#a39db0;width:28px;height:28px;padding:0;border-radius:6px;cursor:pointer}
.crow .more svg{width:16px;height:16px;fill:currentColor}
.crow .more:hover{background:#ebe7f5;color:var(--accent)}
.chap-new{display:flex;gap:6px;margin-top:6px}
.chap-new button,.chap-undo{flex:1;border:1px dashed #d8d0ec;background:transparent;color:#7a6db4;border-radius:8px;padding:8px;font-size:13px;cursor:pointer}
.chap-new button:hover,.chap-undo:hover{background:var(--soft)}
.chap-undo{display:block;width:100%;margin-top:6px;border-style:solid}
.cmenu{position:fixed;min-width:170px;padding:5px;animation:writer-rise .15s}
.cmenu button{display:block;width:100%;text-align:left;border:0;background:transparent;padding:7px 10px;border-radius:7px;font-size:12.5px;color:#4c475b;cursor:pointer}
.cmenu button:hover{background:#f4f1fb;color:var(--accent)}.cmenu .danger{color:#b2555f}

/* Format bar on its own band above the paper; the page scrolls beneath it. */
/* 底板透明（用户 2026-11-22：稿纸上方压着一条白色长条很丑），只留中间的圆角按钮条自己的底色和阴影；
   pointer-events 只给按钮条，两边空白处点得到下面的正文。收起时只往上滑到顶栏底下（顶栏层级更高会盖住它），
   不再同时变透明——以前滑到一半是半透明的，下面的字透出来很脏。滑动用带阻尼的弹簧曲线。 */
.fmtband{position:sticky;top:50px;z-index:35;margin:0 -84px;padding:10px 0 8px;background:transparent;pointer-events:none;transition:transform .42s cubic-bezier(.34,1.18,.64,1)}
.fmtband>*{pointer-events:auto}
/* While writing further down the page the format bar slides away; it comes back on scrolling up or moving to the top. */
body.fmt-away .fmtband{transform:translateY(-110%)}
body.fmt-away .fmtband>*{pointer-events:none}
html.toolbox-native-header .fmtband{top:44px}
.fmtband .fmt.toolbar{display:flex;align-items:center;gap:2px;flex-wrap:nowrap;width:max-content;max-width:calc(100vw - 32px);margin:0 auto;min-height:0;padding:3px;background:var(--panel);border:1px solid var(--line);border-radius:10px;box-shadow:0 4px 14px #3c2f5512;transition:opacity .35s}
.fmtband .fmt.dim{opacity:.12}.fmtband .fmt.dim:hover{opacity:1}
.fmtband .fmt button{display:inline-grid;place-items:center;border:0;background:transparent;color:#6e687c;min-width:32px;height:30px;padding:0 6px;border-radius:7px;font-size:14px;cursor:pointer}
.fmtband .fmt button:hover,.fmtband .fmt button[aria-pressed="true"]{background:#eeeaf8;color:var(--accent)}
.fmtband .fmt button svg{width:17px;height:15px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round}
.fmtband .fmt .icon-tool svg{width:18px;height:15px}
/* 对齐测评第 9 条：按"看起来一样重"统一，不按框统一。以前四个对齐图标的线只占 viewBox 的 2.5–13.6，画出来才 10px 高，
   图片 13px、书签 12px，A 却有 19px。对齐图标放大到 17px 高，量出来看得见的部分：对齐 13.4、图片 13.9、书签 13.8，A 收小一号（11px 字形）。 */
.fmtband .fmt button[data-command^="justify"] svg{width:19px;height:17px}
.fmtband .fmt #insertImage svg{width:17px;height:14px}
.fmtband .fmt #addBookmarkButton svg{width:13px;height:15px}
.fmtband .fmt .aa span{font-size:15px}
.fmtband .fmt .toolbar-line{width:1px;height:18px;margin:0 4px;background:#e6e3ed}
.fmtband .fmt .aa{min-width:38px}.fmtband .fmt .aa span{font-family:Georgia,"Times New Roman",serif;font-size:16px;font-weight:600;line-height:1}
.fmtband .fmt .aa[aria-expanded="true"]{background:#eeeaf8;color:var(--accent)}

/* Layout panel (A). */
.layoutpop{position:absolute;top:54px;left:50%;margin-left:-210px;width:420px;overflow:auto;padding:14px 16px 16px;display:flex;flex-direction:column;gap:12px;animation:writer-rise .18s;text-align:left}
.layoutpop h4{margin:0;font-size:14px;font-weight:650;color:var(--ink)}
.plabel{font-size:12px;color:#8a8596;margin-bottom:6px}
.plabel small{margin-left:6px;color:#b0aabb;font-size:11px}
.opts{display:grid;gap:6px}.opts.two{grid-template-columns:repeat(2,1fr)}.opts.three{grid-template-columns:repeat(3,1fr)}.opts.four{grid-template-columns:repeat(4,1fr)}
.opts button,.paperrow button{display:flex;flex-direction:column;align-items:center;gap:4px;border:1px solid var(--chipline);background:var(--chip);border-radius:9px;padding:7px 4px;font:inherit;font-size:12.5px;font-weight:500;line-height:1.2;color:#4c475b;cursor:pointer}
.opts button:hover,.paperrow button:hover{border-color:#cfc5e8}
.opts button[aria-checked="true"],.paperrow button[aria-checked="true"]{border-color:var(--accent);background:#f4f1fc;color:var(--accent);box-shadow:0 0 0 1px var(--accent) inset}
.paperrow{display:grid;grid-template-columns:repeat(6,1fr);gap:6px}
.paperrow small{font-size:10.5px;color:#aaa4b5;padding-left:2px}
/* 对齐测评第 2 条：以前白纸左边多 8px 把"纯色/仿真"隔开，结果白纸比别的格子窄 8px、和头上的"仿真"错开。
   整个面板按 12 栏排（宽 386、间距 6）：纸张 6 格各 2 栏、字体 4 张各 3 栏、外观 3 个各 4 栏。 */
.sw{display:block;width:100%;height:16px;border-radius:4px;border:1px solid #0000001a}
.sw-none{background:linear-gradient(135deg,#fff 0 50%,#2a292f 50% 100%)}.sw-sepia{background:#f7f1e1}.sw-green{background:#e3eedc}.sw-lavender{background:#e8e0f4}
.sw-white{background:#fdfcfa url('paper/paper-white.jpg');background-size:160px}.sw-dark{background:#1d1d1f url('paper/paper-dark.jpg');background-size:120px}
.fs{font-size:18px;line-height:1}.font-song{font-family:"Songti SC","STSong","SimSun",serif}.font-kai{font-family:"LXGW WenKai",KaiTi,serif}.font-lead{font-family:"Zhuque Fangsong",FangSong,serif}
/* 段落间距 + 首行缩进各占 6 栏、中间用同样的 6px 栏间距：间距三个按钮各 2 栏，缩进两个各 3 栏（和字体卡片同宽同起点）。
   以前 3fr 2fr + 12px 间距，两排的右半组各起各的。 */
.twocol{display:grid;grid-template-columns:1fr 1fr;gap:6px}

/* The paper. */
#editorView .document{max-width:760px;margin:4px auto 0;padding:28px 56px 30px;background:var(--paper);border:1px solid var(--line);border-radius:14px;box-shadow:0 6px 28px #3c2f5510;overflow:visible}
#editorView .chapter-current{display:flex;align-items:baseline;gap:14px;padding:0 0 18px;margin:0}
#editorView .chapter-auto{flex:none;font-size:24px;font-weight:700;color:var(--paper-ink);white-space:nowrap}
#editorView .chapter-current input{flex:1;min-width:0;width:100%;border:0;background:transparent;padding:0;font-size:24px;font-weight:700;color:var(--paper-ink);outline:none;box-shadow:none}
#editorView .chapter-current input::placeholder{color:#cdc8d6;font-weight:600}
#editorView .numbered-chapter-fields{flex:1;min-width:0;display:flex}
#editorView .editor{max-width:none;margin:0;padding:0;min-height:52vh;color:var(--paper-ink);background:transparent;box-shadow:none;border:0}
#editorView .editor:empty{text-indent:0}
#editorView .editor:empty:before{content:attr(data-placeholder);color:#c5c1ce}
html[data-writer-gap="compact"] #editorView .editor :is(p,div){margin-bottom:.2em}
html[data-writer-gap="loose"] #editorView .editor :is(p,div){margin-bottom:1.6em}
html[data-writer-indent="0"] #editorView .editor{text-indent:0}
html[data-writer-paper] #editorView .document{border-color:var(--line)}
html[data-writer-paper] #editorView .editor{margin:0;padding:0;border-radius:0;box-shadow:none;background:transparent}
html[data-writer-paper="sepia"]{--paper:#f7f1e1;--paper-ink:#4a3828}
html[data-writer-paper="green"]{--paper:#e3eedc;--paper-ink:#2e3d2a}
html[data-writer-paper="lavender"]{--paper:#e8e0f4;--paper-ink:#3a3150}
html[data-writer-paper="white"]{--paper:#fdfcfa;--paper-ink:#2b2622}
html[data-writer-paper="dark"]{--paper:#1d1d1f;--paper-ink:#ebe5d8}
html[data-writer-paper="white"] #editorView .document{background:#fdfcfa url('paper/paper-white.jpg') repeat;background-size:440px auto}
html[data-writer-paper="dark"] #editorView .document{background:#1d1d1f url('paper/paper-dark.jpg') repeat;background-size:300px;border-color:#38353d}
html[data-writer-paper="sepia"] #editorView .document{border-color:#e6dcc2}
html[data-writer-paper="green"] #editorView .document{border-color:#cfe0c6}
html[data-writer-paper="lavender"] #editorView .document{border-color:#d4c8ec}
html[data-writer-paper="dark"] #editorView .editor{caret-color:#e7dcff}
html[data-writer-paper="dark"] #editorView .chapter-current input::placeholder,html[data-writer-paper="dark"] #editorView .editor:empty:before{color:#6f6a76}
html[data-writer-paper="sepia"] #editorView .chapter-current input::placeholder{color:#bfae8f}
html[data-writer-paper="green"] #editorView .chapter-current input::placeholder{color:#9fb197}
html[data-writer-paper="lavender"] #editorView .chapter-current input::placeholder{color:#a99cc4}

/* Bottom: next chapter above, word count and word frequency below. */
.nextrow,.wfoot{position:fixed;left:0;right:0;z-index:30;display:flex;justify-content:center;background:var(--page)}
.nextrow{bottom:44px;height:46px;align-items:flex-end;pointer-events:none}
.nextrow button{pointer-events:auto;border:1px solid #d6cdea;background:#fbfaff;color:#7a6db4;border-radius:20px;padding:6px 14px;font-size:12.5px;cursor:pointer}
.nextrow button.create{border-style:dashed}
.nextrow button:hover{background:var(--soft);border-style:solid}
.wfoot{bottom:0;height:44px;display:grid;grid-template-columns:1fr auto 1fr;gap:10px;align-items:center;font-size:12px}
.wfoot .count{justify-self:end}.wfoot .freq{justify-self:start}
.wfoot button{border:0;background:transparent;color:#8f8a9c;font-size:12px;padding:6px 8px;border-radius:6px;cursor:pointer}
.wfoot .freq{color:#8b7fc0}
.wfoot button:hover,.wfoot .count[aria-expanded="true"]{background:#ebe8f3;color:var(--accent)}
.dot-sep{color:#b4adbe}
.wcpop{position:fixed;bottom:44px;left:50%;margin-left:-240px;width:230px;padding:6px;animation:writer-rise .18s}
.seg2{display:flex;background:#f3f1f8;border-radius:8px;padding:2px;margin:4px 4px 6px}
.seg2 button{flex:1;border:0;background:transparent;border-radius:6px;padding:5px;font-size:12px;color:#7d778c;cursor:pointer}
.seg2 button[aria-pressed="true"]{background:#fff;color:var(--accent);font-weight:650;box-shadow:0 1px 3px #0001}
/* 字数两行（纯字数 / 含标点）。数字列定宽 46px，两个名字左边对齐。
   "含标点"那行的"推荐 · 番茄小说字数规则"是凹口标签（notched label，用户 2026-11-22 定）：压在这行的底边框上，
   底色上半截 = 行的颜色、下半截 = 弹层的颜色（硬切渐变），看起来只是边框断开一截，不出现一整块白底。
   所以行的底色走变量 --wc-row，选中/悬停时改变量，凹口跟着变。 */
.wcrow{--wc-row:var(--panel);position:relative;display:grid;grid-template-columns:46px 1fr;align-items:baseline;width:100%;padding:8px 10px;border:1px solid transparent;background:var(--wc-row);text-align:left;font:inherit;font-size:13.5px;color:#4c475b;border-radius:7px;cursor:pointer}
.wcrow b{font-size:15px;color:var(--ink);font-variant-numeric:tabular-nums}
.wcrow.rec{margin:4px 0 6px;border-color:#dcd8e4}
.wcrow:hover{--wc-row:#faf9fc}
.wcrow[aria-checked="true"]{--wc-row:#f4f1fc;color:var(--accent);border-color:var(--accent)}
.wc-notch{position:absolute;right:10px;bottom:-7px;padding:0 4px;font-size:11px;line-height:13px;color:#a49fab;white-space:nowrap;background:linear-gradient(to bottom,var(--wc-row) 0 50%,var(--panel) 50% 100%)}
.wcrow[aria-checked="true"] .wc-notch{color:var(--accent)}

/* Find and replace. */
.findbar{position:fixed;top:104px;right:24px;width:390px;padding:10px 12px;font-size:13px;color:#4c475b;animation:writer-rise .2s}
.frow{display:flex;gap:6px;align-items:center}.frow+.frow{margin-top:8px}
.findbar input[type="text"]{flex:1;min-width:0;border:1px solid #e3deee;border-radius:8px;padding:7px 9px;font-size:13px;outline:0;background:#fff;color:inherit}
.findbar input[type="text"]:focus{border-color:#b3a7dc}
.fcount{min-width:62px;text-align:center;color:#8d879b;font-size:12px}
.ib{border:0;background:#f3f0fa;color:#5e4e9e;border-radius:7px;height:30px;min-width:30px;padding:0 8px;font-size:12px;cursor:pointer}
.ib:hover{background:#e8e2f6}.ib.primary-ib{background:var(--accent);color:#fff}.ib.x{background:transparent;color:#aaa5b5;font-size:16px}
.fopts{color:#7d778c;font-size:12px;flex-wrap:wrap;gap:12px}
.fopts label{display:flex;gap:4px;align-items:center;cursor:pointer}.fopts input{accent-color:var(--accent)}
.fopts select{border:1px solid #e3deee;border-radius:6px;padding:3px 6px;font-size:12px;color:#5d5770;background:#fff}
.findbook{margin-top:8px;max-height:200px;overflow:auto;border-top:1px solid #f0edf5;padding-top:6px}
.findbook p{margin:6px 2px;color:#a6a0b2;font-size:12px}
.findrow{display:flex;justify-content:space-between;gap:8px;width:100%;border:0;background:transparent;padding:6px 8px;border-radius:7px;font-size:12.5px;color:#4c475b;cursor:pointer;text-align:left}
.findrow:hover,.findrow[aria-current="true"]{background:var(--soft);color:var(--accent)}
.findrow small{color:#aaa4b5}
::highlight(writer-find){background:#fbe7a6}
::highlight(writer-find-current){background:#f0b54f;color:#2b2333}

/* Hints. */
.suggest{position:fixed;left:50%;top:104px;transform:translateX(-50%);display:flex;align-items:center;gap:12px;padding:10px 12px 10px 16px;font-size:13px;color:#4c475b;white-space:nowrap;animation:writer-rise-centered .25s ease;z-index:70}
.suggest .go{border:0;background:var(--accent);color:#fff;border-radius:8px;padding:6px 12px;font-size:12.5px;cursor:pointer}
.suggest label{display:flex;align-items:center;gap:4px;font-size:12px;color:#8d879b;cursor:pointer}
.suggest input{accent-color:var(--accent)}
.suggest .x{border:0;background:transparent;color:#aaa5b5;font-size:16px;padding:0 2px;cursor:pointer}
/* .wtoast 已删除：底部提示统一由 dialog.js 的 .wd-snack 负责 */
.line-insert{position:fixed;z-index:25;display:grid;place-items:center;width:28px;height:28px;padding:0;border:1px dashed #d6cdea;background:#fff;color:#8a7fc0;border-radius:8px;cursor:pointer;animation:writer-rise .25s}
.line-insert svg{width:16px;height:13px}
.line-insert:hover{background:var(--soft);border-style:solid;color:var(--accent)}

/* Bookmark rail stays at the right edge, clear of the paper. */
/* 对齐测评第 8 条：以前 right:14px，悬浮条右边比顶栏"环境音"的右边线（窗口右边 22px）多伸出 8px。对齐到 22px */
.writer-rail{right:22px}
#editorView .writer-bookmark{margin:0 5px 0 3px}

/* The book page slides over the chapter. */
.drawer-shade{position:fixed;inset:0;z-index:90;background:#2a254033;animation:writer-fade .2s}
@keyframes writer-fade{from{opacity:0}}
#bookView.drawer{position:fixed;top:0;right:0;bottom:0;z-index:91;width:min(400px,100vw);overflow:auto;padding:18px 22px 28px;background:var(--panel);border-left:1px solid var(--line);box-shadow:-12px 0 30px #3c2f5520;display:flex;flex-direction:column;gap:16px;animation:writer-slide .22s ease}
@keyframes writer-slide{from{transform:translateX(30px);opacity:0}}
.drawer-head{display:flex;align-items:center;justify-content:space-between}
.drawer-head h2{margin:0;font-size:17px;color:var(--ink)}
.drawer-head .ghost{font-size:20px;line-height:1;padding:4px 10px}
#bookView .book-settings{display:flex;flex-direction:row;align-items:flex-start;gap:16px;padding:0;background:transparent;border:0;box-shadow:none}
#bookView .book-cover-area{width:92px}
/* 对齐测评第 7 条：封面以前 86 宽、在 92 宽的那一列里居中，左边比"这本书"标题缩进 3px，也比下面两个按钮窄。改成和按钮同宽 */
#bookView .book-cover-preview{width:100%;font-size:24px;border-radius:9px}
#bookView .cover-upload{min-height:30px;font-size:12px;padding:0 8px}
#bookView .book-fields{gap:6px}
#bookView .book-fields label{margin-top:2px;font-size:12px;font-weight:500;color:#8a8596}
/* 测评第 6 条："选择标签"从胶囊堆里挪到"标签"这行小标题的右端（文字按钮，和"选择章节"一样） */
#bookView .tag-label-row{display:flex;align-items:baseline;justify-content:space-between;gap:10px;margin-top:2px}
#bookView .tag-label-row label{margin-top:0}
#bookView .tag-label-row .tag-choose{padding:0;font-size:12px}
#bookView .book-fields input,#bookView .book-fields textarea{padding:8px 10px;font-size:14px}
#bookView .export-card{margin:0;padding:14px 0 0;background:transparent;border:0;border-top:1px solid #f0edf5;border-radius:0;box-shadow:none}
#bookView .export-scope{padding:0 0 8px}
#bookView .export-controls{gap:8px}
#bookView .export-controls select{flex:1 1 100%;min-width:0}
/* 对齐测评第 7 条：同一列里"导出这本书""分享这本书"按字宽、"备份这本书"却满宽，右边线参差。三个大按钮统一满宽；
   "整本书"单选圈去掉浏览器默认的左外边距，贴住左边线 */
#bookView .export-controls button,#bookView .share-actions button{flex:1 1 100%;width:100%}
#bookView .share-actions{display:flex}
#bookView .export-scope input[type=radio]{margin-left:0}
#bookView .export-note{font-size:11px;color:#a6a0b2;margin:8px 0 0}
.drawer-actions{display:flex;flex-direction:column;align-items:stretch;gap:8px;border-top:1px solid #f0edf5;padding-top:14px}
.drawer-actions .danger-link{align-self:flex-start;padding:4px 0}

/* Bookshelf: covers. */
/* 对齐测评第 10 条：以前左右各 2px 内边距，"我的书架"大标题比下面的书封多缩 2px（三端都有） */
.shelf-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:36px 0 20px}
.shelf-head h1{margin:0;font-size:24px;color:var(--ink)}
.shelf-menu-wrap{position:relative}
.shelf-menu{position:absolute;right:0;top:40px;min-width:200px;padding:6px;animation:writer-rise .18s}
.shelf-menu .action-buttons{display:flex;flex-direction:column;gap:2px}
.shelf-menu .action-buttons button{display:block;width:100%;text-align:left;border:0;background:transparent;padding:8px 10px;border-radius:7px;font-size:13px;color:#4c475b;min-height:0;font-weight:500}
.shelf-menu .action-buttons button:hover{background:#f4f1fb;color:var(--accent)}
.shelf-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:22px;align-items:start}
.shelf-grid .bookshelf{display:contents}
.shelf-grid .book-card{display:flex;flex-direction:column;align-items:stretch;gap:8px;min-height:0;padding:0;border:0;background:transparent;box-shadow:none;text-align:left;align-self:start}
.shelf-grid .book-card:hover{transform:none}
.shelf-grid .book-card-cover{width:100%;aspect-ratio:2/3;border-radius:10px;box-shadow:0 6px 16px #74639722;font-size:26px;transition:transform .15s}
.shelf-grid .book-card:hover .book-card-cover{transform:translateY(-3px)}
.shelf-grid .book-card-title{display:block;font-size:14px;font-weight:650}
.shelf-grid .book-card-description,.shelf-grid .book-card-tags{display:none}
.shelf-grid .book-card-meta{display:block;font-size:12px;margin-top:3px;color:var(--quiet)}
.shelf-grid .book-card-empty{display:none}
.book-new{display:flex;flex-direction:column;align-items:stretch;gap:8px;border:0;background:transparent;padding:0;text-align:left;color:var(--ink);font-size:14px;font-weight:650;cursor:pointer;align-self:start}
.book-new-cover{display:grid;place-items:center;aspect-ratio:2/3;border:1.5px dashed #cfc6e6;border-radius:10px;color:#b3a9d6;font-size:28px;font-weight:400}
.book-new:hover .book-new-cover{background:var(--soft)}
.safe-line{margin:34px 0 30px;text-align:center;font-size:11.5px;color:#aaa4b5}
html.toolbox-native-header .shelf-grid{grid-template-columns:repeat(auto-fill,minmax(170px,1fr))}

/* Dark appearance follows the system or the choice in the layout panel (set natively). */
@media (prefers-color-scheme:dark){
  :root{--page:#1c1c1e;--panel:#25242a;--line:#3a3840;--ink:#ece8f2;--soft:#2f2c3a;--quiet:#a9a3b6;--chip:#1f1e24;--chipline:#3a3840;--paper:#25242a;--paper-ink:#e3dfe9}
  .ghost{color:#b9b4c4}
  .crow:hover{background:#2e2c35}.crow .cl{color:#d7d2e0}.crow .more:hover{background:#38344a}
  .cmenu button,.shelf-menu .action-buttons button,.wcrow{color:#d7d2e0}.cmenu button:hover,.shelf-menu .action-buttons button:hover{background:#33304a}
  .chap-new button,.chap-undo{border-color:#4a4556;color:#c2b8ec}
  .fmtband .fmt.toolbar{box-shadow:none}.fmtband .fmt button{color:#cfc9d8}.fmtband .fmt button:hover,.fmtband .fmt button[aria-pressed="true"],.fmtband .fmt .aa[aria-expanded="true"]{background:#34313d;color:#d5ccff}.fmtband .fmt .toolbar-line{background:#3a3840}
  .opts button,.paperrow button{color:#d7d2e0}
  .opts button[aria-checked="true"],.paperrow button[aria-checked="true"]{background:#2c2840;border-color:#a99be6;color:#d5ccff;box-shadow:0 0 0 1px #a99be6 inset}
  #editorView .document{box-shadow:none}
  #editorView .chapter-current input::placeholder,#editorView .editor:empty:before{color:#6c6776}
  .nextrow button{background:#22212a;border-color:#4a4556;color:#c2b8ec}
  .wfoot button{color:#8f899c}.wfoot .freq{color:#b3a8e8}
  .seg2{background:#1f1e24}.seg2 button[aria-pressed="true"]{background:#33304a;color:#d5ccff}.wcrow:hover{--wc-row:#26242c}.wcrow.rec{border-color:#45424f}.wcrow[aria-checked="true"]{--wc-row:#2c2840;color:#d5ccff;border-color:#a99be6}.wcrow[aria-checked="true"] .wc-notch{color:#d5ccff}.wcrow b{color:#ece8f2}
  .findbar,.suggest{color:#ddd8e6}.findbar input[type="text"],.fopts select{background:#1f1e24;border-color:#3a3840;color:#e3dfe9}.ib{background:#2f2c3a;color:#d5ccff}
  .line-insert{background:#25242a;border-color:#4a4556;color:#c2b8ec}
  .drawer-actions,#bookView .export-card{border-color:#34323a}
  .book-new-cover{border-color:#4a4556;color:#8f86b8}
}
@media (max-width:760px){body[data-view="editor"] .workspace{padding:0 14px}.wtop,.fmtband{margin:0 -14px}#editorView .document{padding:28px 22px}.layoutpop{width:calc(100vw - 28px);margin-left:calc(-50vw + 14px)}.findbar{left:14px;right:14px;width:auto}}

/* Inside the Mac toolbox: the window behind is the toolbox's own, so the
   bands use its colour, and the older Mac bookshelf rules do not apply. */
html.toolbox-native-header{--page:#fff}
html.toolbox-native-header body{background:transparent}
/* 对齐测评第 8 条：Mac 顶栏以前 44px 高，书名 + "第1章"两行塞满，书名字顶离栏顶只有 1.5px。加高到 48px，上下各留约 4px */
html.toolbox-native-header .wtop{background:var(--page);border-bottom-color:var(--line);height:48px}
html.toolbox-native-header .fmtband{top:48px;padding-top:8px}
html.toolbox-native-header #editorView .document{box-shadow:0 2px 14px #3c2f550d}
html.toolbox-native-header .shelf-head{padding-top:18px}
html.toolbox-native-header .wcenter .bookname{font-size:14px;padding-top:1px;padding-bottom:1px}
html.toolbox-native-header .shelf-grid{grid-template-columns:repeat(auto-fill,minmax(150px,180px));gap:26px}
html.toolbox-native-header .shelf-grid .book-card{min-height:0;padding:0;gap:8px}
html.toolbox-native-header .shelf-grid .book-card-cover{width:100%}
html.toolbox-native-header .shelf-grid .book-card-title{font-size:14px}
html.toolbox-native-header .shelf-grid .book-card-meta{font-size:12px}
/* 界面外观=深色 only makes this web view dark (NovelWritingView sets webView.appearance);
   the toolbox window behind stays light, so the transparent body showed white on both
   sides of the paper. In dark, paint the page ourselves (same colour as the dark window). */
@media (prefers-color-scheme:dark){html.toolbox-native-header{--page:#1e1e1e;background:var(--page)}html.toolbox-native-header body{background:var(--page)}}

/* One bottom row: word count · next chapter · word frequency. */
.wfoot{grid-template-columns:1fr auto 1fr}
.wfoot .nextch{border:1px solid #d6cdea;background:#fbfaff;color:#7a6db4;border-radius:16px;padding:3px 12px;font-size:12px}
.wfoot .nextch.create{border-style:dashed}
.wfoot .nextch:hover{background:var(--soft);border-style:solid;color:var(--accent)}
@media (prefers-color-scheme:dark){.wfoot .nextch{background:#22212a;border-color:#4a4556;color:#c2b8ec}}

.wfoot .selcount{color:var(--accent)}

.app-version{margin:6px 10px 2px;font-size:11px;color:#9b97a6;letter-spacing:.02em}
.app-version[hidden]{display:none}

/* Default covers: five styles picked from the title, the title written on the cover. */
.default-cover{position:relative;container-type:inline-size;display:block!important;overflow:hidden}
.default-cover-art{position:absolute;inset:0;width:100%;height:100%}
.default-cover-title{position:absolute;left:10%;right:10%;top:13%;font-family:"Songti SC","STSong","Noto Serif CJK SC","Source Han Serif SC",serif;font-weight:700;font-size:13px;font-size:clamp(9px,13cqw,26px);line-height:1.3;letter-spacing:.06em;text-align:center;overflow-wrap:anywhere;text-wrap:balance;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.default-cover-title::after{content:"";display:block;width:22%;height:1px;margin:.55em auto 0;background:currentColor;opacity:.45}
.default-cover[data-cover="mist"]{background:linear-gradient(160deg,#e9e3f8,#cfc3e8)!important;color:#4e4380}
.default-cover[data-cover="bamboo"]{background:linear-gradient(160deg,#e4f0e8,#c5ddd0)!important;color:#2f5a45}
.default-cover[data-cover="night"]{background:linear-gradient(160deg,#33355c,#1e2040)!important;color:#ece6ff}
.default-cover[data-cover="sun"]{background:linear-gradient(160deg,#fdeadd,#f7cdb4)!important;color:#8a4127}
.default-cover[data-cover="ink"]{background:linear-gradient(160deg,#f4efe5,#e4dccb)!important;color:#2e2a27}

/* Picking a default cover in the book drawer. */
.cover-styles{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:8px}
.cover-styles button{display:flex;flex-direction:column;align-items:center;gap:5px;border:0;background:transparent;padding:0;font:inherit;color:inherit;cursor:pointer}
.cover-styles small{font-size:11.5px;color:#8a8596}
.cover-style-swatch{display:block;width:100%;aspect-ratio:2/3;border-radius:6px;box-shadow:0 2px 6px #3c2f5522;outline:2px solid transparent;outline-offset:2px;transition:outline-color .15s,transform .15s}
.cover-style-swatch .default-cover-title{font-size:clamp(6px,13cqw,12px)}
.cover-style-swatch .default-cover-title::after{display:none}
.cover-styles button:hover .cover-style-swatch{transform:translateY(-2px)}
.cover-styles button[aria-checked="true"] .cover-style-swatch{outline-color:var(--accent,#7163aa)}
.cover-styles button[aria-checked="true"] small{color:var(--accent,#7163aa);font-weight:600}
#coverStyleBlock[hidden]{display:none}

/* 云端备份 dialog (cloud-backup.js). */
.cloud-shade{position:fixed;inset:0;z-index:120;background:#1d1a2633;display:grid;place-items:center;padding:16px}
.cloud-shade[hidden]{display:none}
.cloud-box{width:min(480px,100%);max-height:calc(100vh - 32px);overflow:auto;background:var(--panel);color:var(--ink);border:1px solid var(--line);border-radius:16px;box-shadow:0 20px 60px #3c2f5540;padding:18px 20px 16px;animation:writer-rise .18s}
.cloud-head{display:flex;align-items:center;justify-content:space-between}
.cloud-head h2{margin:0;font-size:17px}
.cloud-head .ghost{font-size:20px;line-height:1}
.cloud-intro,.cloud-note,.cloud-who{font-size:12.5px;color:var(--quiet);line-height:1.6;margin:6px 0 12px}
.cloud-box label{display:block;font-size:12px;color:#8a8596;margin:10px 0 4px}
.cloud-box input{width:100%;box-sizing:border-box;border:1px solid var(--chipline);border-radius:9px;padding:9px 10px;font:inherit;font-size:14px;background:var(--chip);color:inherit}
.cloud-howto{margin-top:10px;font-size:12.5px}
.cloud-steps{margin:8px 0 0;padding-left:20px;font-size:12.5px;line-height:1.7;color:var(--ink)}
.cloud-steps .cloud-limits{list-style:none;margin-left:-20px;color:var(--quiet)}
.cloud-actions{display:flex;gap:8px;margin-top:14px;flex-wrap:wrap}
.cloud-actions.end{justify-content:flex-end}
.cloud-list{display:flex;flex-direction:column;gap:6px;margin-top:6px}
.cloud-row{display:flex;align-items:center;gap:8px;padding:8px 10px;border:1px solid var(--line);border-radius:10px}
.cloud-file{flex:1;min-width:0;display:flex;flex-direction:column}
.cloud-file strong{font-size:13.5px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.cloud-file small{font-size:11.5px;color:var(--quiet)}
.cloud-empty{font-size:12.5px;color:var(--quiet)}
.cloud-message{min-height:18px;font-size:12.5px;color:var(--accent);margin:10px 0 0}
/* 对齐测评第 5 条：没有提示时这一行以前也占着 28px（18 高 + 10 间距），弹窗下面的留白是上面的 2 倍。空着就不占位 */
.cloud-message:empty{min-height:0;margin:0}
/* 同一条：底部内边距 16 → 22，量出来标题上方 23px、最后一个按钮下方 23px，上下相等 */
.cloud-box{padding-bottom:22px}

/* 分享码（share-ui.js）：作者在"这本书"里的分享卡片、书架下的"朋友分享的书"、只读阅读页。 */
.share-card{border-top:1px solid var(--line);padding:16px 0 4px;margin-top:8px}
/* Mac v2.42.8 测评第 7 条："这本书"抽屉每个分区都用同一种分隔：实线，线上 16px（抽屉的 gap）、线下 16px。
   以前"章节编号""默认封面"上面没有线（离"停止分享"空了 60px），导出、备份是线下 14px，Mac 的"小说项目"是虚线。 */
#bookView>.share-card,#bookView>.drawer-block,#bookView>.export-card,#bookView>.drawer-actions{margin-top:0;padding-top:16px;border-top:1px solid #f0edf5}
#bookView>.share-card{padding-bottom:0}
#nativeUpdateControls{border-top-style:solid!important}
/* 测评第 8 条：红色文字按钮统一居中（上面的按钮都是满宽、字居中；以前"停止分享"居中、"删除这本书"靠左） */
.drawer-actions .danger-link{align-self:center!important}
/* 测评第 13 条：单选、勾选统一用主题紫（以前 Mac 真机抽屉里是系统灰，词频页是紫色） */
input[type=radio],input[type=checkbox]{accent-color:var(--accent,#7163aa)}
.share-note,.share-message,.share-warning{font-size:12.5px;line-height:1.6;color:var(--quiet);margin:6px 0}
.share-warning{color:#b5603f}
.share-message{color:var(--accent);min-height:18px}
.share-scope{display:flex;align-items:center;gap:10px;font-size:13px;margin:8px 0}
.share-chapters{display:flex;flex-direction:column;gap:4px;max-height:220px;overflow:auto;border:1px solid var(--line);border-radius:10px;padding:8px 10px;font-size:13px}
.share-chapters[hidden]{display:none}
.share-chapters label{display:flex;gap:8px;align-items:center}
.share-actions{display:flex;gap:10px;align-items:center;margin-top:10px;flex-wrap:wrap}
.share-code-row{display:flex;gap:8px;margin:6px 0}
.share-code{flex:1;min-width:0;border:1px solid var(--chipline);border-radius:9px;padding:8px 10px;font:13px ui-monospace,Menlo,Consolas,monospace;background:var(--chip);color:inherit}
.shared-shelf{margin:28px 0 8px}
.shared-shelf[hidden]{display:none}
.shared-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}
.shared-head h2{font-size:15px;margin:0}
.shared-empty{font-size:12.5px;color:var(--quiet);margin:0}
.shared-badge{align-self:flex-start;font-size:11px;color:#fff;background:#d9534f;border-radius:10px;padding:1px 8px}
.shared-badge.off{background:#8f899c}
#cloudShade input#shareCodeInput,.cloud-box #shareCodeInput{font-family:ui-monospace,Menlo,Consolas,monospace}
.shared-view{max-width:980px;margin:0 auto;padding:0 0 40px}
.shared-view[hidden]{display:none}
.shared-top{position:sticky;top:0;z-index:5;display:grid;grid-template-columns:minmax(max-content,1fr) minmax(0,auto) minmax(max-content,1fr);align-items:center;gap:10px;padding:8px 4px;background:var(--page);border-bottom:1px solid var(--line)}
.shared-title{display:flex;flex-direction:column;align-items:center;min-width:0}
.shared-title strong{font-size:14px;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.shared-title select{border:0;background:transparent;color:var(--quiet);font-size:12px;min-height:0;padding:0 4px;max-width:260px}
.shared-menu{display:flex;justify-content:flex-end;gap:4px}
.shared-notice{margin:12px 0 0;padding:9px 12px;border-radius:10px;background:var(--soft);font-size:12.5px;display:flex;gap:10px;align-items:center;flex-wrap:wrap}
.shared-notice[hidden]{display:none}
.shared-doc{margin-top:16px}
.shared-page{-webkit-user-select:none;user-select:none;-webkit-touch-callout:none;cursor:default;min-height:50vh}
.shared-page img{pointer-events:none}
.shared-chapter-title{font-size:22px;text-indent:0;margin:0 0 1em}
.shared-nav{display:flex;justify-content:space-between;margin-top:18px}
html[data-writer-gap="compact"] .shared-page :is(p,div){margin-bottom:.2em}
html[data-writer-gap="loose"] .shared-page :is(p,div){margin-bottom:1.6em}
html[data-writer-indent="0"] .shared-page{text-indent:0}

/* 禁用状态要看得出来（朋友界面测评第 1 条）：以前禁用的按钮和正常的一模一样，悬停还会变色，
   用户只会觉得"点了没反应"。这里变淡、鼠标显示禁止符号、悬停不再变色。 */
.primary:disabled,.secondary:disabled{opacity:.45;cursor:not-allowed;box-shadow:none}
.primary:disabled:hover{background:#7163aa}
.secondary:disabled:hover{background:#fff}
@media (prefers-color-scheme:dark){.secondary:disabled:hover{background:#302d36}}
/* 按钮"加载中"（视频里六种状态之一；等待超过约 1 秒就要告诉用户"正在处理"）。
   用法：button.setAttribute('aria-busy','true')，或 WriterDialog.busy(button, async () => …)。
   文字只是变透明、仍占位，所以转圈出现时按钮宽度不变；不变淡，因为它不是"不能点"而是"正在处理"；
   这期间点击无效（pointer-events:none），防止重复提交。 */
.primary[aria-busy="true"],.secondary[aria-busy="true"]{position:relative;color:transparent!important;pointer-events:none}
.primary[aria-busy="true"]::after,.secondary[aria-busy="true"]::after{content:"";position:absolute;left:50%;top:50%;width:14px;height:14px;margin:-7px 0 0 -7px;border-radius:50%;border:2px solid currentColor;border-top-color:transparent;animation:btn-busy-spin .8s linear infinite}
.primary[aria-busy="true"]::after{border-color:#fff;border-top-color:transparent}
.secondary[aria-busy="true"]::after{border-color:#7468a8;border-top-color:transparent}
@keyframes btn-busy-spin{to{transform:rotate(360deg)}}
/* 按下：缩到 0.96，松手稍微冲过头再回来（cubic-bezier 的 1.6 就是"冲过头"）。 */
.primary,.secondary{transition:transform .28s cubic-bezier(.34,1.6,.64,1)}
.primary:active:not(:disabled),.secondary:active:not(:disabled){transform:scale(.96);transition-duration:.1s}
@media (prefers-reduced-motion:reduce){.primary,.secondary{transition:none}.primary:active,.secondary:active{transform:none}.primary[aria-busy="true"]::after,.secondary[aria-busy="true"]::after{animation:none}}
/* "随明暗"小色块：以前是斜着切一刀的白/黑，在又宽又矮的色块上看起来像歪掉的楔子；
   改成左右各半（左浅右深），一眼能看出"浅色/深色两种"。 */
/* 注意 border-box：色块有 1px 边框，渐变默认从边框内侧起画并且平铺，右端的深色会在左边框底下
   再露出一条（用户 2026-11-18 截图里"最左边还有黑色"）。让渐变从边框外沿画起、不平铺就没有了。 */
.sw-none{background:linear-gradient(90deg,#fbfaf7 0 50%,#2a292f 50% 100%) border-box no-repeat}
/* 深色模式下色块右半的深色和按钮底色几乎一样，看起来像只剩半截；描一圈浅边把整块的轮廓勾出来。 */
@media (prefers-color-scheme:dark){.sw{border-color:#ffffff2e}}

/* "顶部 / 书签"：用户 2026-11-19 决定保持浮动显示（窄窗口时浮在卡片右侧，起提醒作用），
   不再像 2026-11-18 那样收进底栏。 */
/* 说明文字太小太淡（测评第 4 条）：最小 12px，颜色加深到对比度 4.5 以上。
   "作品只保存在这台设备上……记得备份"是最重要的提醒，做成有底色的提示条，不再混在页脚。 */
.safe-line{display:table;margin:30px auto 26px;padding:8px 14px;border-radius:10px;background:#f1eef8;font-size:12.5px;line-height:1.6;color:#57516a}
footer{font-size:12px;color:#77718a}
.brand small{font-size:9.5px;color:#7c7690}
.wfoot button{color:#6b6580;font-size:12.5px}
.wfoot .freq{color:#6a5daa}
.writer-rail small{font-size:11px}
@media (prefers-color-scheme:dark){
  .safe-line{background:#2b2833;color:#c9c2d6}
  footer{color:#a39db1}
  .brand small{color:#a39db1}
  .wfoot button{color:#b3adc0}.wfoot .freq{color:#c4b8f2}
}
/* 书架卡片的键盘选中框（用户 2026-11-19 截图：框"歪了"、压住"4 章"）：卡片没有内边距，封面和书名贴着边，
   以前选中框沿用卡片 18px 大圆角、只往外让 2px，圆角就从左下角的文字上划过。改成往外让 6px、圆角 14px，
   框和封面、文字之间都留出一圈空。 */
.shelf-grid .book-card:focus-visible{outline-offset:6px;border-radius:14px}
/* 触屏上点书不该出现这个框（它是给键盘用的）。安卓从阅读器返回时焦点还留在刚点的卡片上，浏览器内核会把它画出来。 */
@media (hover:none) and (pointer:coarse){.shelf-grid .book-card:focus-visible{outline:none}}

/* 对齐测评第 4 条：没有框的按钮（.ghost）平时只看得到字，却按看不见的框贴边，字离边线差 10–12px。
   贴在行尾的那个用负外边距抵掉右内边距：点击范围不变，看得见的字/×正好落在内容右边线上。 */
#shelfMenuButton{margin-right:-10px}
.drawer-head .ghost,.cloud-head .ghost,.cm-head .ghost{margin-right:-10px}
.cloud-head .ghost,.cm-head .ghost{padding:4px 10px}

/* Mac v2.42.8 测评第 14 条（深色模式）：12px 灰色小标签 #8a8596 在 #25242a 上对比度 4.31，不到 4.5。提亮到 #9690a3（约 5:1）；
   "黑纸"色块和面板底色几乎一样，描一圈更亮的边 */
@media (prefers-color-scheme:dark){
  .plabel,#bookView .book-fields label,.cover-styles small,.cloud-box label{color:#9690a3}
  .sw-dark{border-color:#ffffff59!important}
}
/* 测评第 10 条：书名后的 › 和章节后的 ▾ 改成 SVG（以前是文字字符，三角只有 3×3px、比文字中线低 1–1.5px） */
.bookname .go svg{display:block;width:6px;height:10px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.bookname .go{display:inline-flex;vertical-align:middle;height:10px;position:relative;top:-1px}
.chapbtn i svg{display:block;width:8px;height:5px;fill:currentColor}
.chapbtn i{display:flex;align-items:center;color:#a49cbd}
/* 测评第 11 条：B / I / U 的字墨迹只有 10px，旁边图标约 14px。字号 14 → 18，量出来墨迹约 12.7px（字母比线条图标"重"，不用到 14）；I 加粗一点 */
.fmtband .fmt button[data-command=bold],.fmtband .fmt button[data-command=italic],.fmtband .fmt button[data-command=underline]{font-size:18px}
.fmtband .fmt button[data-command=italic] i{font-weight:650}
/* Mac v2.42.8 测评第 4 条：抽屉的"导出格式"下拉框用系统外观时，Mac 的网页引擎不认 min-height 和圆角，只有 21pt 高，
   夹在 40pt 的按钮中间。改成词频页那套：自己画外观和箭头、40px 高、10px 圆角（Windows/安卓看起来不变） */
#bookView select{-webkit-appearance:none;appearance:none;min-height:40px;padding:0 34px 0 12px;border:1px solid #e5e1ec;border-radius:10px;background-color:#fbfafd;color:#302c38;font-weight:500;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23888593' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat:no-repeat;background-position:right 13px center;background-size:12px 8px}
@media (prefers-color-scheme:dark){#bookView select{background-color:#211f28;border-color:#42404a;color:#eceaf1;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23aaa5b6' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")}}

/* ===== Windows v1.7.8 测评（2026-11-20）===== */
/* 第 3 条：Windows 的滚动条占 15px。以前顶栏边距按整个窗口宽（100vw）算，内容却在扣掉滚动条后的宽度里居中，
   一出滚动条两边就错开 7.7px，窗口高矮不同内容还会横着跳。现在：始终给滚动条留位置（scrollbar-gutter），
   顶栏边距改按 100%（扣掉滚动条后的宽度）算（style.css 第 2 行 .topbar）。Mac / 安卓的滚动条浮在内容上，没影响。 */
html{scrollbar-gutter:stable}
/* 第 2 条：写作页顶栏左右不对称："‹ 书架"字左边离窗口 32，"已保存"字右边离窗口 46（定宽 76 的框里文字靠左）。
   文字改靠右、并留出和左边按钮内边距一样的 10px，右边也是 32 */
.top-save{justify-content:flex-end;margin-right:10px}
/* 第 7 条：抽屉里控件高度统一。输入框 40（书名以前 38.3）；小按钮统一 32（以前 30 / 30.3） */
#bookView .book-fields input{min-height:40px}
#bookView #numberingChoices button{min-height:32px}
/* 第 8 条：抽屉一屏里有 8 个描边框（"一堆小框很扣分"）。换封面 / 用阅读器看改成文字按钮；输入框、标签区只留底色，
   获得焦点时才显示描边 */
#bookView .book-cover-area .secondary{border-color:transparent;background:transparent;box-shadow:none;min-height:32px;color:var(--accent)}
#bookView .book-cover-area .secondary:hover{background:var(--soft)}
#bookView .book-fields input,#bookView .book-fields textarea,#bookView .share-author,#bookView .share-code,#bookView select,#bookView .tag-summary{border-color:transparent!important;background-color:#f4f2f8!important}
#bookView .book-fields input:focus,#bookView .book-fields textarea:focus,#bookView .share-author:focus,#bookView select:focus{border-color:#b9addf!important;background-color:#fff!important;outline:none}
@media (prefers-color-scheme:dark){
  #bookView .book-fields input,#bookView .book-fields textarea,#bookView .share-author,#bookView .share-code,#bookView select,#bookView .tag-summary{background-color:#2c2a33!important}
  #bookView .book-fields input:focus,#bookView .book-fields textarea:focus,#bookView .share-author:focus,#bookView select:focus{border-color:#6f63a8!important;background-color:#211f28!important}
  /* 第 13 条：深色模式下分区线还是浅色的 #f0edf5，在深底上成了亮白线 */
  #bookView>.share-card,#bookView>.drawer-block,#bookView>.export-card,#bookView>.drawer-actions{border-top-color:#3a3846}
}
/* 第 12 条：抽屉、弹窗右上角的 × 墨迹比按钮中线低 2.4px（字符 × 的字形本身偏下）。往上挪 2px */
.drawer-head .ghost,.cloud-head .ghost,.cm-head .ghost{position:relative;top:-2px}
/* 第 11 条：浅色模式下大量说明文字对比度只有 2.2–3.6（要 4.5）。只改浅色模式；深色本来就都合格。
   次要文字 #8a8596 / #8d879b / #8f8a9c → #6b6679（白底约 5.6，浅灰底约 5.2）；最浅的那档 → #7a7590 */
@media (prefers-color-scheme:light){
  :root{--quiet:#6b6679}
  .plabel,#bookView .book-fields label,.cover-styles small,.cloud-box label,.share-author-row span,.top-save,.wfoot button,.ghost,.account-note{color:#6b6679}
  /* 10.5–11px 的小字也要 4.5：#7a7590 在白底只有 4.4，统一用 #6b6679。加 #bookView 前缀是因为 tag-picker.js、share.css
     里同样权重的规则排在后面，会盖掉这里 */
  .paperrow small,.plabel small,#bookView .tag-summary .tag-none,#bookView .share-author-row span,#bookView .export-note{color:#6b6679}
  .wfoot .nextch{color:#5f52a0}
  .private-tag{color:#6b6679}   /* 11px 小字、浅紫底：#7a7590 只有 4.07，再深一档 */
  .book-new-cover{color:#8f86b8;border-color:#bfb4e0}
}

/* ===== Windows v1.7.10 测评（2026-11-20）===== */
/* w-005：写作页没有滚动条时，scrollbar-gutter:stable 仍留 15px，顶栏白底只铺到 1170.7，窗口右边露出一条灰缝，
   "已保存"离窗口边 47.3（左边是 32）。写作页的顶栏是 sticky 白条，本来就不会和下面内容错开，不需要预留位置；
   只在书架 / 词频页这种"顶栏和内容要对齐"的页面留。Mac / 安卓滚动条浮在内容上，这条没影响。 */
html:has(#editorView:not([hidden])){scrollbar-gutter:auto}
/* 抽屉回弹：弹簧冲过头 1%（约 4px）时，抽屉右边离开窗口边，露出后面压暗的页面，看着像抽屉被"截断"了一截。
   用一层同色、不模糊的影子往右多铺 40px 把这条缝补上（影子不受抽屉自己的 overflow 裁切）。停稳后它在窗口外，看不见。 */
#bookView.drawer{box-shadow:-12px 0 30px #3c2f5520,40px 0 0 var(--panel)}
/* w-009：浅色模式还剩 4 处对比度 4.29–4.46（要 4.5），各加深一档，算下来 5.2–5.5。标语 9.5px 太小，提到 11px */
@media (prefers-color-scheme:light){
  .fmtband .fmt .aa[aria-expanded="true"]{color:#63559e}
  .brand small{color:#6b6680;font-size:11px;letter-spacing:.12em}
  footer{color:#6a647d}
  .cloud-box .secondary{color:#66599c}
}

/* 输入分享码弹窗：输入框和右边的"粘贴"按钮一行（2026-11-21） */
.cloud-box .share-code-row{display:flex;gap:8px;align-items:stretch}
.cloud-box .share-code-row input{flex:1;min-width:0}
.cloud-box .share-paste{flex:none;min-height:40px;padding:0 14px}

/* 管理员工具（share-admin.js，只有管理员账号看得见） */
.admin-box{max-width:460px}
.admin-section{margin-top:18px;padding-top:14px;border-top:1px solid var(--line)}
.admin-section:first-child{margin-top:0;padding-top:0;border-top:0}
.admin-section h3{margin:0 0 8px;font-size:14px}
.admin-list{display:flex;flex-direction:column;gap:2px;max-height:50vh;overflow:auto}
.admin-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:8px 0;border-bottom:1px solid var(--line)}
.admin-row:last-child{border-bottom:0}
.admin-row-meta{display:flex;flex-direction:column;gap:2px;min-width:0}
.admin-row-id{font-family:ui-monospace,Menlo,Consolas,monospace;font-size:13px}
.admin-row button{flex:none;min-height:30px;padding:0 12px}
/* 管理员 · 账号列表和详情（share-admin.js） */
.admin-accounts{max-height:320px;overflow:auto;margin:0 -6px}
.admin-account{display:grid;grid-template-columns:30px minmax(0,1fr) auto 12px;align-items:center;gap:10px;width:100%;padding:8px 6px;border:0;border-radius:9px;background:transparent;text-align:left;font:inherit;color:inherit;cursor:pointer}
.admin-account:hover{background:var(--soft)}
.admin-account-main{display:flex;flex-direction:column;min-width:0}
.admin-account-main .account-note{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.admin-account-name{font-size:14px;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.admin-account-seen{font-size:12px;color:var(--quiet);white-space:nowrap}
.admin-account-go{color:var(--quiet);font-size:16px}
.admin-tag{margin-left:6px;padding:1px 6px;border-radius:5px;background:var(--soft);color:var(--accent);font-size:11px;font-weight:600;vertical-align:1px}
.admin-back{border:0;background:transparent;padding:4px 0;margin-bottom:8px;color:var(--accent);font:inherit;font-size:13px;cursor:pointer}
.admin-person{display:grid;grid-template-columns:44px minmax(0,1fr);gap:12px;align-items:center;margin-bottom:12px}
.admin-person-name{font-size:16px;font-weight:650}
.admin-detail{display:grid;grid-template-columns:84px minmax(0,1fr);gap:8px 12px;margin:0;font-size:13px}
.admin-detail dt{color:var(--quiet)}
.admin-detail dd{margin:0;overflow-wrap:anywhere}
.admin-detail code{font-family:ui-monospace,Menlo,Consolas,monospace;font-size:12px}
.admin-emails{display:flex;flex-direction:column;gap:2px;align-items:flex-start}
.admin-reveal{border:0;background:transparent;padding:2px 0;color:var(--accent);font:inherit;font-size:12.5px;cursor:pointer}
textarea.admin-priv{width:100%;resize:none;font-family:ui-monospace,Menlo,Consolas,monospace;font-size:12px;line-height:1.5;word-break:break-all}
.admin-over{z-index:220}
/* 输入分享码（2026-11-21）：输入框占满整行，粘贴图标在框里右侧；报错用 notch（压在左上边线上），框不变形 */
.cloud-box .share-code-field{position:relative;margin:6px 0}
.cloud-box .share-code-field input{width:100%;box-sizing:border-box;min-height:44px;padding-right:46px}
.cloud-box .share-paste{position:absolute;right:4px;top:50%;transform:translateY(-50%);width:36px;height:36px;display:flex;align-items:center;justify-content:center;padding:0;border:0;border-radius:8px;background:transparent;color:var(--accent);cursor:pointer;transition:background .15s,transform .3s cubic-bezier(.2,.9,.3,1.4)}
.cloud-box .share-paste:hover{background:var(--soft)}
.cloud-box .share-paste:active{transform:translateY(-50%) scale(.86);transition-duration:.08s}
.cloud-box .share-paste svg{display:block}
/* 朋友书卡上的"头像 作者 章数"（2026-11-21 用户截图：头像和字没对齐，"·"也不要）：一行弹性排列，头像和字按中线对齐，几段之间固定 10px */
.shelf-grid .book-card-meta{display:flex;align-items:center;gap:10px;min-width:0}
.shelf-grid .book-card-meta > span{white-space:nowrap}
.shelf-grid .book-card-meta > span:first-of-type{overflow:hidden;text-overflow:ellipsis;min-width:0}
.shelf-grid .book-card-meta .author-avatar{margin-right:-4px}
/* ai-file.js：Test 专用“给 AI 看”的路径说明 */
.ai-file-path{margin:6px 2px 0;font-size:11px;line-height:1.5;color:#a49fab;overflow-wrap:anywhere;user-select:text}
/* 写作页的红色提示条（#notice）原来粘顶 top:12px，滚动后钻到顶栏（.wtop，层级更高）底下，只露出下半截、
   关闭按钮也被盖住；出现时还把正文整体往下挤（用户 2026-11-22 截图和录屏）。
   写作页里改成浮在顶栏下面（position:fixed，不占正文位置、不挤动正文），宽度和稿纸一样；
   格式栏（.fmtband）显示时停在格式栏下面，滚动收起格式栏（body.fmt-away）时贴回顶栏下面。 */
body[data-view="editor"] .alert:not([hidden]){position:fixed;left:50%;transform:translateX(-50%);width:min(760px,calc(100vw - 32px));top:116px;z-index:36;margin:0;box-shadow:0 8px 24px #3c2f5522;transition:top .42s cubic-bezier(.34,1.32,.64,1)}
body[data-view="editor"].fmt-away .alert:not([hidden]){top:58px}
html.toolbox-native-header body[data-view="editor"] .alert:not([hidden]){top:104px}
html.toolbox-native-header body[data-view="editor"].fmt-away .alert:not([hidden]){top:56px}
/* 查找框跟着格式栏上下走（用户 2026-11-22 截图：格式栏收起后查找框上面空出一截，格式栏出来时又贴得太紧）。
   格式栏显示 → 停在格式栏下面；收起（body.fmt-away）→ 贴回顶栏下面。移动带阻尼：
   cubic-bezier(.34,1.32,.64,1) 约等于阻尼 0.8 的弹簧，到位时轻轻过冲一点再停（和红色提示条同一条曲线）。
   用 top 做动画而不是 transform，避免和查找框打开时的 writer-rise（transform）动画打架。 */
body[data-view="editor"] .findbar{top:114px;transition:top .42s cubic-bezier(.34,1.32,.64,1)}
body[data-view="editor"].fmt-away .findbar{top:58px}
html.toolbox-native-header body[data-view="editor"] .findbar{top:106px}
html.toolbox-native-header body[data-view="editor"].fmt-away .findbar{top:56px}
@media (prefers-reduced-motion:reduce){body[data-view="editor"] .findbar,body[data-view="editor"] .alert:not([hidden]){transition:none}}
/* 朱雀 AI 检测（zhuque.js）。入口是格式栏里的"AI"按钮，面板浮在右侧，跟查找框一样随格式栏上下走、带阻尼。 */
.fmt .zq-tool span{display:inline-grid;place-items:center;min-width:24px;height:18px;padding:0 4px;border:1.6px solid currentColor;border-radius:5px;font:800 10.5px/1 system-ui,-apple-system,sans-serif;letter-spacing:.02em}
.fmt .zq-tool[aria-expanded="true"]{background:#eeeaf8;color:var(--accent)}
.zq-panel{position:fixed;right:24px;top:114px;width:340px;max-height:calc(100vh - 190px);overflow:auto;padding:0;font-size:13px;color:#4c475b;animation:writer-rise .2s;transition:top .42s cubic-bezier(.34,1.32,.64,1)}
body.fmt-away .zq-panel{top:58px}
html.toolbox-native-header .zq-panel{top:106px}
html.toolbox-native-header body.fmt-away .zq-panel{top:56px}
.zq-panel[hidden]{display:none}
.zq-head{position:sticky;top:0;z-index:1;display:flex;align-items:center;justify-content:space-between;padding:12px 12px 8px 16px;background:var(--panel)}
.zq-head h4{margin:0;font-size:14px;color:var(--ink)}
.zq-x{border:0;background:transparent;font-size:20px;line-height:1;color:#9a94a6;width:28px;height:28px;border-radius:7px}
.zq-x:hover{background:#f3f0f8}
.zq-body{padding:0 16px 14px}
.zq-body p{margin:8px 0;line-height:1.6}
.zq-muted{color:#8f899c;font-size:12px}
.zq-why{padding:8px 10px;border-radius:8px;background:var(--soft);color:#5d5480;font-size:12.5px}
.zq-error{padding:8px 10px;border-radius:8px;background:#fff1ee;color:#a2463a}
.zq-keyrow{display:flex;gap:8px;margin:12px 0 6px}
.zq-field{position:relative;flex:1;min-width:0}
.zq-field input{width:100%;height:36px;padding:0 40px 0 10px;border:1px solid #e3deee;border-radius:9px;background:#fff;color:inherit;font-size:13px;outline:0}
.zq-field input:focus{border-color:#b3a7dc}
.zq-paste{position:absolute;right:3px;top:50%;transform:translateY(-50%);width:30px;height:30px;display:flex;align-items:center;justify-content:center;padding:0;border:0;border-radius:7px;background:transparent;color:var(--accent);cursor:pointer;transition:background .15s,transform .3s cubic-bezier(.2,.9,.3,1.4)}
.zq-paste:hover{background:var(--soft)}
.zq-paste:active{transform:translateY(-50%) scale(.86);transition-duration:.08s}
.zq-paste svg{display:block;width:18px;height:18px}
.zq-paste.loading svg{display:none}
.zq-paste.loading::after{content:"";width:15px;height:15px;border:2px solid #d8d2e8;border-top-color:var(--accent);border-radius:50%;animation:zq-spin .8s linear infinite}
.zq-paste.done{color:#3f9a68}
.zq-field input:disabled{background:#faf9fc}
.zq-field input.zq-ok{border-color:#8cc3a1;background:#f2faf5}
.zq-field input.zq-ok::placeholder{color:#3f8a5f}
.zq-keyrow .primary,.zq-actions .primary,.zq-actions .secondary,.zq-body>.secondary{min-height:36px;padding:0 14px;border-radius:9px;font-size:13px}
.zq-link{border:0;background:transparent;padding:4px 0;color:var(--accent);font-size:12.5px;cursor:pointer}
.zq-link:hover{text-decoration:underline;text-underline-offset:3px}
.zq-link.danger{color:#b4544a}
.zq-sep{height:1px;background:var(--line);margin:12px 0}
.zq-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:4px 0 10px}
.zq-progress{display:flex;align-items:center;gap:8px;margin:4px 0 10px;color:#6e687c}
.zq-progress .zq-link{margin-left:auto}
.zq-spin{width:14px;height:14px;border:2px solid #d8d2e8;border-top-color:var(--accent);border-radius:50%;animation:zq-spin .8s linear infinite}
@keyframes zq-spin{to{transform:rotate(360deg)}}
.zq-card{margin:10px 0;padding:12px;border:1px solid var(--line);border-radius:10px}
.zq-card-title{display:flex;align-items:baseline;justify-content:space-between;gap:8px;margin-bottom:8px;font-weight:650;color:var(--ink)}
.zq-card-title b{font-size:15px}
.zq-card-title small{font-weight:400;color:#9a94a6;font-size:11.5px}
.zq-bar{display:flex;height:8px;border-radius:4px;overflow:hidden;background:#eeebf3}
.zq-bar i{display:block;height:100%}
.zq-bar .human{background:#8cc3a1}.zq-bar .maybe{background:#e8bd62}.zq-bar .ai{background:#e07d6c}
.zq-legend{display:flex;gap:12px;margin-top:6px;font-size:11.5px;color:#8f899c}
.zq-legend span:before{content:"";display:inline-block;width:8px;height:8px;margin-right:4px;border-radius:2px;vertical-align:0}
.zq-legend .human:before{background:#8cc3a1}.zq-legend .maybe:before{background:#e8bd62}.zq-legend .ai:before{background:#e07d6c}
.zq-check{display:flex;align-items:center;gap:6px;font-size:12.5px;color:#6e687c;cursor:pointer}
.zq-list{display:grid;gap:2px}
.zq-row{display:grid;grid-template-columns:minmax(0,1fr) 72px 58px;align-items:center;gap:8px;width:100%;padding:7px 8px;border:0;border-radius:7px;background:transparent;text-align:left;font:inherit;font-size:12.5px;color:inherit;cursor:pointer}
.zq-row:hover{background:#f6f4fa}
.zq-row[aria-current="true"]{background:#f1edfb}
.zq-row-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.zq-row small{text-align:right;color:#8f899c;font-variant-numeric:tabular-nums}
.zq-row .zq-row-err{grid-column:2/4;text-align:left;color:#b4544a}
.zq-row .zq-row-wait{text-align:left;color:#9a94a6}
.zq-note{margin-top:12px}
.zq-foot{display:flex;gap:14px;padding-top:8px;border-top:1px solid var(--line)}
.zq-foot .danger{margin-left:auto}
/* 稿纸上的标记：浅色底 + 左边一条色带 + 左侧页边写"AI 87% / 疑似 64%"。只是显示，保存前会去掉。 */
#editorView .editor [data-zq]{position:relative}
#editorView .editor [data-zq="ai"]{--zq-ink:#d0695b}
#editorView .editor [data-zq="maybe"]{--zq-ink:#c49a3a}
/* 只留左边页边一条细色带和一个小字百分比（用户嫌整块底色丑）；不改正文本身的样子。 */
#editorView .editor [data-zq]::before{content:attr(data-zq-label);position:absolute;right:calc(100% + 14px);top:.45em;white-space:nowrap;text-indent:0;font:600 10px/1.5 system-ui,-apple-system,sans-serif;color:var(--zq-ink);opacity:.85;pointer-events:none;user-select:none}
#editorView .editor [data-zq]::after{content:"";position:absolute;left:-8px;top:.35em;bottom:.35em;width:2px;border-radius:1px;background:var(--zq-ink);opacity:.7}
@media (prefers-color-scheme:dark){html:not([data-writer-theme="light"]) #editorView .editor [data-zq="ai"]{--zq-bg:#4a2d2a;--zq-ink:#f0a090}html:not([data-writer-theme="light"]) #editorView .editor [data-zq="maybe"]{--zq-bg:#45391f;--zq-ink:#f0cf80}}
html[data-writer-theme="dark"] #editorView .editor [data-zq="ai"]{--zq-bg:#4a2d2a;--zq-ink:#f0a090}
html[data-writer-theme="dark"] #editorView .editor [data-zq="maybe"]{--zq-bg:#45391f;--zq-ink:#f0cf80}
/* 跳到书签、查找等用浏览器自带滚动定位时，留出顶栏 + 格式栏的高度，目标不会停在格式栏底下。 */
html:has(body[data-view="editor"]){scroll-padding-top:120px}
/* 文字颜色按钮 + 色板（shell.js COLORS）。按钮是"A"下面一条色条，色条显示上次用的颜色。 */
.fmtband .fmt.toolbar{position:relative}
.fmtband .fmt .color-tool{position:relative;display:inline-grid;place-items:center;align-content:center;gap:1px}
.fmtband .fmt .color-tool .ct-a{font:700 15px/1 Georgia,"Times New Roman",serif}
.fmtband .fmt .color-tool .ct-bar{display:block;width:15px;height:3px;border-radius:2px;background:var(--ct,currentColor)}
.fmtband .fmt .color-tool[aria-expanded="true"]{background:#eeeaf8;color:var(--accent)}
.colorpop{position:absolute;top:calc(100% + 8px);left:50%;transform:translateX(-50%);display:grid;grid-template-columns:repeat(7,40px);gap:2px;padding:8px;animation:writer-rise-centered .18s}
.colorpop[hidden]{display:none}
.cswatch{display:flex;flex-direction:column;align-items:center;gap:4px;padding:6px 0 4px;border:0;border-radius:8px;background:transparent;color:#6e687c;cursor:pointer}
.cswatch:hover{background:#f3f0f8}
.cswatch i{display:block;width:20px;height:20px;border-radius:50%;box-shadow:inset 0 0 0 1px #0000001a}
.cswatch.none i{background:linear-gradient(135deg,transparent 45%,#c8463b 45%,#c8463b 55%,transparent 55%),#fff;box-shadow:inset 0 0 0 1px #d9d4e3}
.cswatch small{font-size:11px;line-height:1}
/* 深色模式：6 种预设色换成调亮的同色，黑纸上也看得清（只换显示，存的还是原色，导出照原色）。 */
@media (prefers-color-scheme:dark){html:not([data-writer-theme="light"]) :is(#editorView .editor,.shared-page) [style*="color: rgb(200, 70, 59)"]{color:#f08a7f!important}html:not([data-writer-theme="light"]) :is(#editorView .editor,.shared-page) [style*="color: rgb(199, 116, 26)"]{color:#f0a95c!important}html:not([data-writer-theme="light"]) :is(#editorView .editor,.shared-page) [style*="color: rgb(61, 139, 87)"]{color:#7fc797!important}html:not([data-writer-theme="light"]) :is(#editorView .editor,.shared-page) [style*="color: rgb(58, 109, 176)"]{color:#8ab4ef!important}html:not([data-writer-theme="light"]) :is(#editorView .editor,.shared-page) [style*="color: rgb(122, 88, 194)"]{color:#b9a0f2!important}html:not([data-writer-theme="light"]) :is(#editorView .editor,.shared-page) [style*="color: rgb(139, 133, 151)"]{color:#b3aec0!important}}
html[data-writer-theme="dark"] :is(#editorView .editor,.shared-page) [style*="color: rgb(200, 70, 59)"]{color:#f08a7f!important}
html[data-writer-theme="dark"] :is(#editorView .editor,.shared-page) [style*="color: rgb(199, 116, 26)"]{color:#f0a95c!important}
html[data-writer-theme="dark"] :is(#editorView .editor,.shared-page) [style*="color: rgb(61, 139, 87)"]{color:#7fc797!important}
html[data-writer-theme="dark"] :is(#editorView .editor,.shared-page) [style*="color: rgb(58, 109, 176)"]{color:#8ab4ef!important}
html[data-writer-theme="dark"] :is(#editorView .editor,.shared-page) [style*="color: rgb(122, 88, 194)"]{color:#b9a0f2!important}
html[data-writer-theme="dark"] :is(#editorView .editor,.shared-page) [style*="color: rgb(139, 133, 151)"]{color:#b3aec0!important}
/* 分享链接 + 二维码（share-ui.js / share-qr.js） */
.share-card .share-code-row .share-link{flex:1;min-width:0;font-size:12.5px;color:#6e687c}
.share-card .share-code-row .primary.share-copy{flex:none;min-height:36px;padding:0 14px;white-space:nowrap}
.share-qr-button{flex:none;width:38px;min-height:36px;padding:0;display:grid;place-items:center}
.share-qr-icon svg{display:block}
.share-code-more{margin:8px 0 4px;font-size:12.5px;color:var(--quiet)}
.share-code-more summary{cursor:pointer;list-style:none;color:var(--accent)}
.share-code-more summary::-webkit-details-marker{display:none}
.share-code-more summary::after{content:" ›";display:inline-block;transition:transform .2s}
.share-code-more[open] summary::after{transform:rotate(90deg)}
.share-qr-box{max-width:320px;text-align:center}
.share-qr-art{width:220px;height:220px;margin:6px auto 4px;border-radius:12px;overflow:hidden;box-shadow:0 0 0 1px var(--line)}
.share-qr-art svg{display:block;width:100%;height:100%}
.share-qr-art{position:relative}
.share-qr-logo{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:20%;aspect-ratio:3/4;pointer-events:none}
.share-qr-cover{position:relative;width:100%;height:100%;box-sizing:border-box;border:3px solid #fff;border-radius:6px;overflow:hidden;background:#fff;box-shadow:0 0 0 1px #0000001a}
.share-qr-cover img{width:100%;height:100%;object-fit:cover;display:block}
.share-qr-badge{position:absolute;right:-30%;bottom:-12%;width:48%;aspect-ratio:1;border-radius:24%;border:2px solid #fff;background:#fff;box-shadow:0 1px 3px #0000002a}
.share-qr-logo:not(:has(.share-qr-cover)) .share-qr-badge{position:static;width:100%;border-radius:22%}
.share-qr-box .cloud-intro{margin:8px 0 2px;font-weight:650;color:var(--ink)}
.top-share{display:inline-flex;align-items:center;gap:5px;margin-right:4px}
.top-share svg{display:block}
@keyframes share-flash{0%,100%{box-shadow:0 0 0 0 transparent}30%{box-shadow:0 0 0 3px #b9aef0}}
.share-card.flash{animation:share-flash 1.4s ease-out 2;border-radius:12px}
/* 读取分享码时的转圈和"重试"（share-ui.js addByCode） */
.share-spin{display:inline-block;width:13px;height:13px;margin-right:7px;vertical-align:-2px;border:2px solid #d8d2e8;border-top-color:var(--accent);border-radius:50%;animation:zq-spin .8s linear infinite}
.share-retry{margin-left:8px;font-weight:600}
