Spaces:
Running
Running
Download ui-src/src/styles.css from Ethscriptions/xiaoshuo: direct link, hf CLI and curl.
- Browser
- Download file 167 kB
-
https://huggingface.co/spaces/Ethscriptions/xiaoshuo/resolve/main/ui-src/src/styles.css
- Command line
-
hf download hf://spaces/Ethscriptions/xiaoshuo/ui-src/src/styles.css
-
curl -L -o styles.css https://huggingface.co/spaces/Ethscriptions/xiaoshuo/resolve/main/ui-src/src/styles.css
167 kB
/* ============================================================
小说写作台 · 稿纸主题
============================================================ */
:root {
--bg: #f3efe6;
--bg-2: #ebe5d8;
--surface: #fbf9f4;
--paper: #fffdf8;
--raised: #ffffff;
--ink: #2a2622;
--ink-2: #4f4842;
--ink-3: #766e65;
--ink-4: #aaa196;
--line: #e2dbcd;
--line-2: #d4ccbc;
--accent: #b8432f;
--accent-2: #9c3624;
--accent-soft: #f4e2dc;
--accent-ink: #fff;
--ok: #4f7a4a;
--ok-soft: #e3eddc;
--warn: #b07a1c;
--warn-soft: #f6ead0;
--err: #b23a2e;
--err-soft: #f6dcd8;
--blue: #3c6488;
--blue-soft: #dee8f1;
--shadow-s: 0 1px 2px rgba(60, 45, 30, .06), 0 1px 1px rgba(60, 45, 30, .04);
--shadow: 0 2px 6px rgba(60, 45, 30, .06), 0 10px 30px -12px rgba(60, 45, 30, .18);
--shadow-l: 0 24px 60px -20px rgba(40, 30, 20, .35), 0 4px 14px rgba(40, 30, 20, .08);
--paper-shadow: 0 1px 0 rgba(0, 0, 0, .02), 0 12px 40px -18px rgba(70, 50, 30, .28);
--r: 10px;
--r-s: 7px;
--r-l: 14px;
--sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", "Segoe UI", sans-serif;
--serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong", "SimSun", Georgia, serif;
--mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
--rail-w: 72px;
color-scheme: light;
}
[data-theme="night"] {
--bg: #1a1917;
--bg-2: #22201d;
--surface: #201f1c;
--paper: #252320;
--raised: #2b2925;
--ink: #e8e2d6;
--ink-2: #bdb5a8;
--ink-3: #8b8479;
--ink-4: #615b52;
--line: #34312c;
--line-2: #433f39;
--accent: #e07a5f;
--accent-2: #f08f74;
--accent-soft: #3a2621;
--accent-ink: #1a1917;
--ok: #8fbf86;
--ok-soft: #233022;
--warn: #e0b45c;
--warn-soft: #352c1a;
--err: #ec8576;
--err-soft: #3b2220;
--blue: #8db4d8;
--blue-soft: #1f2a35;
--shadow-s: 0 1px 2px rgba(0, 0, 0, .3);
--shadow: 0 2px 8px rgba(0, 0, 0, .3), 0 12px 30px -12px rgba(0, 0, 0, .5);
--shadow-l: 0 24px 60px -20px rgba(0, 0, 0, .7);
--paper-shadow: 0 0 0 1px rgba(255, 255, 255, .03), 0 18px 40px -20px rgba(0, 0, 0, .6);
color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html, body, #root { height: 100%; }
body {
margin: 0; background: var(--bg); color: var(--ink);
font: 14px/1.6 var(--sans); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
button:disabled { cursor: not-allowed; opacity: .55; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; line-height: 1.35; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
::selection { background: color-mix(in srgb, var(--accent) 24%, transparent); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 10px; border: 3px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background-color: var(--ink-4); }
::-webkit-scrollbar-track { background: transparent; }
.serif { font-family: var(--serif); }
.muted { color: var(--ink-3); }
.small-note { font-size: 12px; line-height: 1.6; }
.nowrap { white-space: nowrap; }
.push { margin-left: auto; }
.grow { flex: 1; min-width: 0; }
.wrap { flex-wrap: wrap; }
.row { display: flex; align-items: center; }
.row.gap { gap: 10px; }
.row.gap-s, .gap-s { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.row.between { justify-content: space-between; gap: 10px; }
.row.end { justify-content: flex-end; }
.divider { height: 1px; background: var(--line); margin: 14px 0; }
.ok-text { color: var(--ok); }
.warn-text { color: var(--warn); }
.accent-text { color: var(--accent); }
.dim { opacity: .55; transition: opacity .2s; }
.eyebrow { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; letter-spacing: .12em; color: var(--accent); font-weight: 600; margin-bottom: 6px; }
.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--ink-4); flex: none; }
.dot.ok { background: var(--ok); }
.dot.warn { background: var(--warn); }
/* ---------- 按钮 / 表单 ---------- */
.btn {
display: inline-flex; align-items: center; justify-content: center; gap: 6px;
height: 36px; padding: 0 16px; border-radius: var(--r-s); font-weight: 500; white-space: nowrap;
border: 1px solid transparent; transition: background .15s, border-color .15s, color .15s, box-shadow .15s;
}
.btn.small { height: 30px; padding: 0 12px; font-size: 13px; }
.btn.block { width: 100%; }
.btn.primary { background: var(--accent); color: var(--accent-ink); box-shadow: var(--shadow-s); }
.btn.primary:hover:not(:disabled) { background: var(--accent-2); }
.btn.ghost { border-color: var(--line-2); background: var(--surface); color: var(--ink); }
.btn.ghost:hover:not(:disabled) { border-color: var(--ink-4); background: var(--raised); }
.btn.ghost.on { border-color: color-mix(in srgb, var(--accent) 45%, transparent); color: var(--accent); background: var(--accent-soft); }
.btn.danger { background: var(--err); color: #fff; }
.btn.danger.ghost, .btn.ghost.danger { background: transparent; color: var(--err); border-color: color-mix(in srgb, var(--err) 35%, transparent); }
.btn.danger.ghost:hover:not(:disabled), .btn.ghost.danger:hover:not(:disabled) { background: var(--err-soft); }
.icon-btn {
display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: var(--r-s);
color: var(--ink-2); transition: background .15s, color .15s; flex: none;
}
.icon-btn:hover:not(:disabled) { background: var(--bg-2); color: var(--ink); text-decoration: none; }
.icon-btn.sm { width: 28px; height: 28px; font-size: 13px; }
.icon-btn.on { color: var(--accent); background: var(--accent-soft); }
.icon-btn.danger:hover:not(:disabled) { color: var(--err); background: var(--err-soft); }
.link-btn { display: inline-flex; align-items: center; gap: 3px; color: var(--accent); font-size: 13px; font-weight: 500; }
.link-btn:hover { text-decoration: underline; }
.link-btn.muted { color: var(--ink-3); }
.link-btn.back { margin-bottom: 14px; }
.input, .textarea {
width: 100%; border: 1px solid var(--line-2); background: var(--paper); border-radius: var(--r-s);
padding: 7px 11px; outline: none; transition: border-color .15s, box-shadow .15s; min-height: 36px;
}
.input:focus, .textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 16%, transparent); }
.input::placeholder, .textarea::placeholder { color: var(--ink-4); }
.input.bare { border: 0; background: transparent; box-shadow: none; padding: 0; min-height: 0; }
.input.mini { width: auto; min-height: 28px; height: 28px; padding: 2px 8px; font-size: 12px; }
.input.auto { width: auto; }
select.input { appearance: none; padding-right: 28px; background-image: linear-gradient(45deg, transparent 50%, var(--ink-3) 50%), linear-gradient(135deg, var(--ink-3) 50%, transparent 50%); background-position: calc(100% - 15px) 52%, calc(100% - 10px) 52%; background-size: 5px 5px; background-repeat: no-repeat; }
.textarea { resize: vertical; line-height: 1.7; }
.textarea.auto-text { overflow-y: auto; }
.textarea.one { line-height: 1.55; min-height: 36px; }
.textarea.bare { border: 0; background: transparent; box-shadow: none; padding: 2px 0; min-height: 0; }
.textarea.bare:focus { box-shadow: none; }
.serif-input { font-family: var(--serif); font-size: 15px; line-height: 1.85; }
.title-input { font-family: var(--serif); font-size: 18px; font-weight: 600; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field + .field { margin-top: 14px; }
.form-grid .field + .field { margin-top: 0; }
.field-label, .field > span:first-child { font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.field-hint { font-size: 12px; color: var(--ink-3); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.form-grid.tight { gap: 10px 12px; }
.span2 { grid-column: span 2; }
.check { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--ink-2); cursor: pointer; user-select: none; }
.check input { accent-color: var(--accent); width: 15px; height: 15px; }
.search-row { flex: none; display: flex; align-items: center; gap: 8px; border: 1px solid var(--line-2); background: var(--paper); border-radius: var(--r-s); padding: 0 10px; height: 36px; color: var(--ink-3); }
.search-row:focus-within { border-color: var(--accent); }
.search-row .input { color: var(--ink); }
.search-row.slim { height: 32px; margin: 0 12px 8px; }
/* chips / tags */
.chip {
display: inline-flex; align-items: center; gap: 5px; height: 28px; padding: 0 11px; border-radius: 99px;
border: 1px solid var(--line-2); background: var(--surface); font-size: 12.5px; color: var(--ink-2); transition: all .15s; white-space: nowrap;
}
.chip:hover { border-color: var(--ink-4); color: var(--ink); }
.chip em { font-style: normal; font-size: 11px; color: var(--ink-3); }
.chip.on { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.chip.on em { color: color-mix(in srgb, var(--bg) 70%, transparent); }
.chips-row { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.tag {
display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border-radius: 5px; font-size: 12px; line-height: 20px;
background: var(--bg-2); color: var(--ink-2); white-space: nowrap;
}
.tag.clickable { cursor: pointer; }
.tag.clickable:hover, .tag.on { background: var(--ink); color: var(--bg); }
.tag-accent { background: var(--accent-soft); color: var(--accent); }
.tag-warn { background: var(--warn-soft); color: var(--warn); }
.tag-ok { background: var(--ok-soft); color: var(--ok); }
.tag-err { background: var(--err-soft); color: var(--err); }
.mini-tag { font-size: 12px; color: var(--ink-3); }
.stars { display: inline-flex; gap: 2px; }
.stars i { width: 6px; height: 6px; border-radius: 50%; background: var(--line-2); }
.stars i.on { background: var(--accent); }
/* tabs / segmented */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
display: inline-flex; align-items: center; gap: 6px; padding: 10px 14px; margin-bottom: -1px; color: var(--ink-3); font-weight: 500;
border-bottom: 2px solid transparent; white-space: nowrap; transition: color .15s;
}
.tab:hover { color: var(--ink); }
.tab.on { color: var(--ink); border-bottom-color: var(--accent); }
.tab-count { font-size: 11px; padding: 0 6px; border-radius: 99px; background: var(--bg-2); color: var(--ink-3); line-height: 18px; }
.seg { display: inline-flex; padding: 3px; background: var(--bg-2); border-radius: 9px; gap: 2px; flex-wrap: wrap; }
.seg button { padding: 4px 12px; border-radius: 7px; font-size: 13px; color: var(--ink-3); white-space: nowrap; }
.seg button.on { background: var(--raised); color: var(--ink); box-shadow: var(--shadow-s); font-weight: 500; }
.seg.big { margin: 6px 0 18px; }
.seg.big button { padding: 7px 22px; font-size: 14px; }
/* states */
.spinner { display: inline-flex; align-items: center; gap: 8px; color: var(--ink-3); font-size: 13px; }
.spin { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading { display: flex; justify-content: center; padding: 48px 0; }
.boot { height: 100%; display: grid; place-items: center; }
.error-note { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: var(--r-s); background: var(--err-soft); color: var(--err); font-size: 13px; margin: 10px 0; }
.error-note span { flex: 1; }
.empty { text-align: center; padding: 48px 20px; color: var(--ink-3); }
.empty-icon { display: inline-grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: var(--bg-2); color: var(--ink-3); margin-bottom: 12px; }
.empty-title { font-family: var(--serif); font-size: 17px; color: var(--ink-2); font-weight: 600; margin-bottom: 6px; }
.empty-body { font-size: 13px; max-width: 420px; margin: 0 auto; line-height: 1.8; }
.banner { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 9px 14px; border-radius: var(--r-s); background: var(--warn-soft); color: var(--warn); font-size: 13px; margin: 10px 0; }
.banner span { flex: 1; color: var(--ink-2); }
.banner.warn { border: 1px solid color-mix(in srgb, var(--warn) 25%, transparent); }
.callout { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 14px; border-radius: var(--r-s); background: var(--blue-soft); color: var(--ink-2); font-size: 13px; margin-bottom: 14px; }
.pager { display: flex; justify-content: center; align-items: center; gap: 14px; padding: 22px 0 6px; }
.pager-info { font-size: 13px; color: var(--ink-3); }
/* toasts */
.toasts { position: fixed; z-index: 200; left: 50%; bottom: 26px; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { padding: 9px 18px; border-radius: 99px; background: var(--ink); color: var(--bg); font-size: 13px; box-shadow: var(--shadow-l); animation: rise .2s ease-out; max-width: 80vw; }
.toast-ok { background: var(--ok); color: #fff; }
.toast-err { background: var(--err); color: #fff; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
/* overlay / modal / drawer */
.overlay { position: fixed; inset: 0; z-index: 100; background: rgba(30, 24, 18, .38); backdrop-filter: blur(2px); display: grid; place-items: center; padding: 20px; animation: fade .15s; }
[data-theme="night"] .overlay { background: rgba(0, 0, 0, .55); }
@keyframes fade { from { opacity: 0; } }
.modal { width: 100%; max-height: calc(100vh - 40px); max-height: calc(100dvh - 40px); display: flex; flex-direction: column; background: var(--surface); border-radius: var(--r-l); box-shadow: var(--shadow-l); animation: pop .18s ease-out; border: 1px solid var(--line); }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.98); } }
.modal-head { display: flex; align-items: center; gap: 10px; padding: 16px 18px 6px 22px; }
.modal-head > :first-child { flex: 1; font-family: var(--serif); font-size: 18px; font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.modal-body { padding: 12px 22px 20px; overflow: auto; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 22px; border-top: 1px solid var(--line); }
.confirm-body { color: var(--ink-2); line-height: 1.8; margin-bottom: 12px; }
.overlay-drawer { display: flex; justify-content: flex-end; align-items: stretch; padding: 0; }
.drawer { height: 100%; max-height: 100vh; max-height: 100dvh; display: flex; min-height: 0; flex-direction: column; background: var(--surface); box-shadow: var(--shadow-l); animation: slide .2s ease-out; border-left: 1px solid var(--line); }
@keyframes slide { from { transform: translateX(30px); opacity: 0; } }
.drawer-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px 14px 22px; border-bottom: 1px solid var(--line); }
.drawer-title { flex: 1; min-width: 0; font-weight: 600; }
.drawer-body { flex: 1; overflow: auto; padding: 20px 22px; }
.drawer-foot { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; padding: 12px 18px; border-top: 1px solid var(--line); background: var(--bg); }
.popover { position: absolute; z-index: 50; background: var(--raised); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-l); padding: 14px; animation: pop .15s ease-out; }
.pop-title { font-weight: 600; margin-bottom: 10px; }
.pop-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; }
/* list editor */
.list-editor { display: flex; flex-direction: column; gap: 10px; }
.le-item { border: 1px solid var(--line); border-radius: var(--r); background: var(--paper); padding: 10px 12px 12px; }
.le-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.le-index { font-family: var(--serif); color: var(--accent); font-weight: 600; font-size: 13px; min-width: 18px; }
.le-title { flex: 1; font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.le-actions { display: flex; gap: 2px; opacity: .45; transition: opacity .15s; }
.le-item:hover .le-actions, .le-item:focus-within .le-actions { opacity: 1; }
.le-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px 10px; }
.le-field { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--ink-3); }
.le-field.long { grid-column: 1 / -1; }
.le-field .textarea { font-size: 13.5px; }
.add-btn { align-self: flex-start; border-style: dashed; }
.string-list { display: flex; flex-direction: column; gap: 2px; }
.sl-row { display: flex; align-items: center; gap: 8px; padding: 4px 6px; border-radius: 6px; border-bottom: 1px dashed var(--line); }
.sl-row:hover { background: var(--bg-2); }
.sl-dot { color: var(--accent); font-weight: 700; }
.sl-row .input, .sl-row .textarea { flex: 1; font-family: var(--serif); font-size: 14.5px; }
.sl-row .sl-dot, .sl-row .icon-btn { align-self: flex-start; margin-top: 2px; }
.string-list .add-btn { margin-top: 8px; }
/* ============================================================
壳:左侧导航栏
============================================================ */
.shell { display: flex; height: 100%; }
.rail {
width: var(--rail-w); flex: none; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 0 12px;
background: var(--bg-2); border-right: 1px solid var(--line);
}
.rail-brand { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 11px; background: var(--accent); color: var(--accent-ink); margin-bottom: 14px; box-shadow: var(--shadow); }
.rail-items, .rail-foot { display: flex; flex-direction: column; gap: 4px; align-items: center; }
.rail-foot { margin-top: auto; }
.rail-item { width: 58px; padding: 8px 0 6px; border-radius: 10px; display: flex; flex-direction: column; align-items: center; gap: 3px; color: var(--ink-3); font-size: 11px; transition: background .15s, color .15s; }
.rail-item:hover { background: color-mix(in srgb, var(--ink) 6%, transparent); color: var(--ink); }
.rail-item.on { background: var(--surface); color: var(--accent); box-shadow: var(--shadow-s); }
.stage { flex: 1; min-width: 0; height: 100%; overflow: auto; position: relative; }
/* lock */
.lock { height: 100%; display: grid; place-items: center; padding: 20px; background:
radial-gradient(circle at 20% 10%, color-mix(in srgb, var(--accent) 10%, transparent), transparent 40%),
repeating-linear-gradient(0deg, transparent 0 31px, color-mix(in srgb, var(--line) 60%, transparent) 31px 32px), var(--bg); }
.lock-card { width: 100%; max-width: 360px; padding: 40px 34px 28px; text-align: center; background: var(--paper); border-radius: 18px; box-shadow: var(--shadow-l); border: 1px solid var(--line); }
.lock-seal { width: 56px; height: 56px; margin: 0 auto 16px; display: grid; place-items: center; font-family: var(--serif); font-size: 28px; color: #fff; background: var(--accent); border-radius: 12px; transform: rotate(-4deg); box-shadow: var(--shadow); }
.lock h1 { font-family: var(--serif); font-size: 24px; letter-spacing: .08em; }
.lock-sub { color: var(--ink-3); margin: 6px 0 24px; }
.lock-input { height: 44px; text-align: center; font-size: 15px; margin-bottom: 12px; letter-spacing: .1em; }
.lock-err { color: var(--err); font-size: 13px; margin-bottom: 10px; }
.lock .btn { height: 42px; }
.lock-foot { margin-top: 18px; font-size: 12px; color: var(--ink-3); }
/* ============================================================
通用页面
============================================================ */
.page { max-width: 1040px; margin: 0 auto; padding: 36px 40px 80px; }
.page.narrow { max-width: 780px; }
.page.wide { max-width: 1180px; }
.page-head { display: flex; align-items: flex-end; gap: 20px; justify-content: space-between; margin-bottom: 26px; }
.page-title { font-family: var(--serif); font-size: 28px; font-weight: 700; letter-spacing: .02em; }
.page-sub { color: var(--ink-3); margin-top: 6px; max-width: 640px; line-height: 1.8; }
.h2 { font-size: 20px; margin: 34px 0 14px; }
.sheet { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); padding: 20px 22px; margin-top: 18px; box-shadow: var(--shadow-s); }
.sheet-title { display: flex; align-items: center; gap: 10px; font-size: 16px; margin-bottom: 14px; }
.sheet-note { color: var(--ink-3); font-size: 13px; margin: -8px 0 12px; }
.sheet-actions { display: flex; justify-content: flex-end; margin-top: 16px; }
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin: 20px 0; }
.stat { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); text-align: left; }
.stat b { font-family: var(--serif); font-size: 22px; font-weight: 700; }
.stat span { color: var(--ink-3); font-size: 12.5px; }
.stat.clickable:hover { border-color: var(--ink-4); }
.panel-stack { display: flex; flex-direction: column; gap: 14px; }
.panel-h { font-size: 13px; font-weight: 600; }
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 14px 0; }
.bar { height: 4px; border-radius: 4px; background: var(--bg-2); overflow: hidden; margin-top: 8px; }
.bar i { display: block; height: 100%; background: var(--accent); border-radius: 4px; }
/* ============================================================
书房(书架)
============================================================ */
.shelf .page-head { margin-bottom: 30px; }
.bookshelf { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 34px 26px; align-items: end; }
.book { text-align: left; display: flex; flex-direction: column; gap: 10px; }
.book-cover {
position: relative; aspect-ratio: 3 / 4.2; border-radius: 3px 8px 8px 3px; padding: 22px 16px 16px 24px;
background: linear-gradient(110deg, rgba(0,0,0,.18) 0 6px, rgba(255,255,255,.12) 7px, transparent 14px), var(--cover, #7a4b3a);
color: #fdf8ef; box-shadow: 0 1px 0 rgba(0,0,0,.08), 0 14px 26px -12px rgba(40, 25, 10, .55), inset 0 0 0 1px rgba(255,255,255,.06);
display: flex; flex-direction: column; transition: transform .2s, box-shadow .2s; overflow: hidden;
}
.book:hover .book-cover { transform: translateY(-5px) rotate(-.6deg); box-shadow: 0 24px 36px -14px rgba(40, 25, 10, .6); }
.book-spine { position: absolute; left: 0; top: 0; bottom: 0; width: 8px; background: rgba(0,0,0,.18); }
.book-title { font-family: var(--serif); font-size: 19px; font-weight: 700; line-height: 1.35; writing-mode: horizontal-tb; letter-spacing: .04em; text-shadow: 0 1px 0 rgba(0,0,0,.2); display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.book-genre { margin-top: 8px; font-size: 12px; opacity: .78; }
.book-seal { margin-top: auto; align-self: flex-end; font-family: var(--serif); font-size: 12px; padding: 2px 7px; border: 1px solid rgba(255,255,255,.55); border-radius: 3px; transform: rotate(-3deg); }
.book-meta-title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.book-meta-sub { font-size: 12px; color: var(--ink-3); }
.book-new { aspect-ratio: 3 / 4.2; border: 1.5px dashed var(--line-2); border-radius: 3px 8px 8px 3px; color: var(--ink-3); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; transition: all .15s; margin-bottom: 52px; }
.book-new:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.shelf-board { height: 14px; margin: 6px -10px 0; border-radius: 3px; background: linear-gradient(var(--line-2), var(--bg-2)); box-shadow: 0 8px 14px -8px rgba(60, 40, 20, .35); }
.shelf-extras { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; margin-top: 40px; }
.note-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-l); padding: 18px 20px; box-shadow: var(--shadow-s); display: flex; flex-direction: column; gap: 10px; }
.note-card-head { display: flex; align-items: center; gap: 8px; font-weight: 600; color: var(--ink-2); }
.steps-mini { padding-left: 18px; color: var(--ink-2); line-height: 2; font-size: 13.5px; }
.spark { background: linear-gradient(var(--paper), var(--paper)) padding-box, repeating-linear-gradient(0deg, transparent 0 27px, color-mix(in srgb, var(--line) 50%, transparent) 27px 28px); }
.spark-hook { font-family: var(--serif); font-size: 17px; line-height: 1.75; }
.spark-line { color: var(--ink-2); font-size: 13.5px; }
.spark-meta { font-size: 12px; color: var(--ink-3); }
/* ============================================================
作品:目录 + 主区
============================================================ */
.book-room { display: flex; height: 100%; position: relative; }
.binder { width: 260px; flex: none; display: flex; flex-direction: column; background: var(--surface); border-right: 1px solid var(--line); height: 100%; overflow: hidden; }
.binder-top { display: flex; align-items: center; justify-content: space-between; padding: 10px 10px 6px 12px; }
.binder-back { display: inline-flex; align-items: center; gap: 4px; color: var(--ink-3); font-size: 13px; padding: 4px 6px; border-radius: 6px; }
.binder-back:hover { color: var(--ink); background: var(--bg-2); }
.binder-book { margin: 4px 10px 8px; padding: 12px 14px; border-radius: var(--r); text-align: left; background: var(--paper); border: 1px solid var(--line); }
.binder-book.on, .binder-book:hover { border-color: var(--line-2); box-shadow: var(--shadow-s); }
.binder-book-title { font-family: var(--serif); font-weight: 700; font-size: 16px; line-height: 1.4; }
.binder-book-sub { font-size: 12px; color: var(--ink-3); margin-top: 2px; }
.binder-section { padding: 6px 8px; }
.binder-section.grow { flex: 1; overflow: auto; display: flex; flex-direction: column; }
.binder-label { display: flex; align-items: center; gap: 6px; padding: 6px 8px 4px; font-size: 11.5px; letter-spacing: .1em; color: var(--ink-3); font-weight: 600; }
.binder-link, .binder-ch { width: 100%; display: flex; align-items: center; gap: 9px; padding: 6px 10px; border-radius: 7px; color: var(--ink-2); text-align: left; font-size: 13.5px; }
.binder-link:hover, .binder-ch:hover { background: var(--bg-2); color: var(--ink); }
.binder-link.on, .binder-ch.on { background: var(--accent-soft); color: var(--accent); font-weight: 500; }
.binder-link span { flex: 1; }
.binder-link em { font-style: normal; font-size: 11.5px; color: var(--ink-3); }
.binder-tree { display: flex; flex-direction: column; gap: 6px; }
.binder-vol-name { font-family: var(--serif); font-size: 12.5px; color: var(--ink-3); padding: 6px 10px 2px; }
.ch-num { font-family: var(--serif); font-size: 12px; color: var(--ink-3); min-width: 20px; text-align: right; }
.binder-ch.on .ch-num { color: var(--accent); }
.ch-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ch-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ink-4); flex: none; }
.ch-dot.st-planned { background: transparent; box-shadow: inset 0 0 0 1.5px var(--ink-4); }
.ch-dot.st-draft { background: var(--warn); }
.ch-dot.st-revising { background: var(--blue); }
.ch-dot.st-done { background: var(--ok); }
.ch-dot.st-rolled_back { background: var(--err); }
.binder-empty { margin: 8px; padding: 14px; border: 1.5px dashed var(--line-2); border-radius: var(--r); color: var(--ink-3); display: flex; align-items: center; gap: 6px; justify-content: center; }
.binder-empty:hover { color: var(--accent); border-color: var(--accent); }
.binder-foot { display: flex; justify-content: space-between; padding: 10px 16px; font-size: 11.5px; color: var(--ink-3); border-top: 1px solid var(--line); }
.binder-peek { position: absolute; z-index: 20; left: 10px; top: 10px; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 8px; background: var(--surface); border: 1px solid var(--line); color: var(--ink-2); box-shadow: var(--shadow-s); }
.binder-peek:hover { color: var(--ink); }
.book-main { flex: 1; min-width: 0; height: 100%; overflow: auto; }
/* reader 通读 */
.ch-wc { font-size: 10.5px; color: var(--ink-3); opacity: .8; flex: none; font-variant-numeric: tabular-nums; }
.binder-ch.on .ch-wc { color: var(--accent); opacity: .7; }
.toc-wc { font-size: 12px; color: var(--ink-3); flex: none; font-variant-numeric: tabular-nums; }
.about-read { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 14px; }
.about-goal { flex: 1; min-width: 180px; height: 8px; border-radius: 99px; background: var(--bg-2); position: relative; }
.about-goal i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 99px; background: var(--accent); }
.about-goal span { position: absolute; right: 0; top: 12px; font-size: 11.5px; color: var(--ink-3); }
.reader { height: 100%; display: flex; flex-direction: column; background: var(--paper); position: relative; }
.reader-bar { flex: none; display: flex; align-items: center; gap: 10px; padding: 8px 14px; border-bottom: 1px solid var(--line); background: var(--surface); position: relative; z-index: 5; }
.reader-where { flex: 1; min-width: 0; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 6px 10px; border-radius: 8px; color: var(--ink-2); font-family: var(--serif); font-size: 14.5px; }
.reader-where:hover { background: var(--bg-2); color: var(--ink); }
.reader-where .rw-t { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reader-where em { font-style: normal; font-family: var(--sans); font-size: 11.5px; color: var(--ink-3); flex: none; }
.reader-tools { display: flex; align-items: center; gap: 4px; flex: none; }
.fs-val { font-size: 12px; color: var(--ink-3); min-width: 20px; text-align: center; font-variant-numeric: tabular-nums; }
.reader-progress { position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--accent); transform-origin: left; transition: transform .1s linear; pointer-events: none; }
.reader-scroll { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.reader-page { max-width: 720px; margin: 0 auto; padding: 48px 28px 80px; font-family: var(--serif); color: var(--ink); }
.reader-vol { text-align: center; font-size: 13px; letter-spacing: .3em; color: var(--accent); margin-bottom: 18px; }
.reader-num { text-align: center; font-size: 13px; letter-spacing: .25em; color: var(--ink-3); }
.reader-title { text-align: center; font-size: calc(var(--rfs) * 1.45); font-weight: 700; margin: 8px 0 6px; line-height: 1.4; }
.reader-meta { text-align: center; font-family: var(--sans); font-size: 12px; color: var(--ink-3); margin-bottom: 34px; }
.reader-body p { font-size: var(--rfs); line-height: 1.95; text-indent: 2em; margin: 0 0 .9em; text-align: justify; word-break: break-word; }
.reader-loading { display: flex; justify-content: center; padding: 80px 0; color: var(--ink-3); }
.reader-nav { display: flex; justify-content: space-between; gap: 10px; margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line); font-family: var(--sans); }
.reader-nav .btn { flex: 1; justify-content: center; }
.reader-next-hint { text-align: center; font-family: var(--sans); font-size: 12px; color: var(--ink-3); margin-top: 14px; }
.reader-toc { position: absolute; z-index: 30; top: 52px; left: 50%; transform: translateX(-50%); width: min(420px, calc(100% - 20px)); max-height: min(70vh, calc(100% - 70px)); display: flex; flex-direction: column; background: var(--raised); border: 1px solid var(--line); border-radius: var(--r-l); box-shadow: var(--shadow-l); }
.reader-toc-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.reader-toc-list { overflow-y: auto; padding: 6px; }
.reader-toc-vol { font-family: var(--serif); font-size: 12.5px; color: var(--accent); padding: 10px 10px 4px; }
.reader-toc-item { width: 100%; display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 7px; text-align: left; font-size: 13.5px; color: var(--ink-2); }
.reader-toc-item:hover { background: var(--bg-2); color: var(--ink); }
.reader-toc-item.on { background: var(--accent-soft); color: var(--accent); }
.reader-toc-item.empty { opacity: .5; }
.reader-toc-item .n { font-family: var(--serif); font-size: 12px; color: var(--ink-3); min-width: 22px; text-align: right; }
.reader-toc-item .t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reader-toc-item em { font-style: normal; font-size: 11px; color: var(--ink-3); }
@media (max-width: 760px) {
.hide-sm { display: none; }
.reader-bar { padding: 6px 8px; gap: 4px; }
.reader-page { padding: 30px 18px 60px; }
.reader-nav { flex-wrap: wrap; }
}
/* about */
.about-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; margin: 20px 0 6px; }
.about-stats > div { background: var(--surface); padding: 12px 14px; display: flex; flex-direction: column; }
.about-stats b { font-family: var(--serif); font-size: 19px; }
.about-stats span { font-size: 12px; color: var(--ink-3); }
.toc { list-style: none; display: flex; flex-direction: column; }
.toc li { padding: 8px 4px; border-bottom: 1px dashed var(--line); }
.toc li > button, .toc li > div { display: flex; align-items: baseline; gap: 10px; width: 100%; text-align: left; }
.toc-num { font-family: var(--serif); color: var(--ink-3); flex: none; font-size: 13px; }
.toc-title { font-family: var(--serif); font-size: 15px; }
.toc li:hover .toc-title { color: var(--accent); }
.toc-dots { flex: 1; border-bottom: 1px dotted var(--line-2); transform: translateY(-4px); }
.toc-st { font-size: 12px; color: var(--ink-3); }
.toc-goal { font-size: 12.5px; color: var(--ink-3); margin: 2px 0 0 56px; }
.quick-links { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.quick-links button { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 12px; text-align: left; padding: 12px 14px; border-radius: var(--r); border: 1px solid var(--line); background: var(--paper); align-items: center; }
.quick-links button:hover { border-color: var(--accent); }
.quick-links button svg { grid-row: span 2; color: var(--accent); }
.quick-links button span { font-size: 12px; color: var(--ink-3); }
.danger-zone { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 20px; margin-top: 30px; border: 1px solid color-mix(in srgb, var(--err) 25%, transparent); border-radius: var(--r-l); }
.danger-zone > div { display: flex; flex-direction: column; }
.danger-zone span { font-size: 12.5px; color: var(--ink-3); }
/* ============================================================
稿纸编辑器
============================================================ */
.editor { display: flex; height: 100%; }
.manuscript-scroll { flex: 1; min-width: 0; height: 100%; overflow: auto; background: var(--bg); position: relative; container: ms / inline-size; scroll-padding-top: 64px; }
.editor-bar {
position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 10px;
height: 52px; padding: 0 14px 0 56px; background: color-mix(in srgb, var(--bg) 84%, transparent); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px);
border-bottom: 1px solid transparent; transition: border-color .2s, box-shadow .2s;
}
.manuscript-scroll:hover .editor-bar { border-bottom-color: var(--line); }
.eb-left { flex: 1 1 auto; display: flex; align-items: center; gap: 10px; min-width: 0; overflow: hidden; }
.eb-crumb { flex: 0 1 auto; min-width: 0; font-size: 13px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.eb-crumb i { font-style: normal; margin: 0 6px; color: var(--ink-4); }
.eb-state {
flex: 0 1 auto; min-width: 0; display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px 0 8px; border-radius: 99px;
font-size: 12px; color: var(--ink-3); background: color-mix(in srgb, var(--ink) 5%, transparent); white-space: nowrap; overflow: hidden; cursor: default;
}
.eb-state > span { overflow: hidden; text-overflow: ellipsis; }
.eb-dot { flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--ink-4); }
.eb-state.st-ok .eb-dot { background: var(--ok); }
.eb-state.st-dirty { color: var(--warn); background: var(--warn-soft); }
.eb-state.st-dirty .eb-dot { background: var(--warn); box-shadow: 0 0 0 3px color-mix(in srgb, var(--warn) 22%, transparent); animation: breathe 2.4s ease-in-out infinite; }
.eb-state.st-saving { color: var(--accent); background: var(--accent-soft); }
@keyframes breathe { 50% { box-shadow: 0 0 0 1px color-mix(in srgb, var(--warn) 10%, transparent); } }
.eb-short { display: none; }
.eb-right { display: flex; align-items: center; gap: 2px; flex: none; }
.eb-count { font-size: 12.5px; color: var(--ink-3); margin-right: 6px; font-variant-numeric: tabular-nums; white-space: nowrap; display: inline-flex; align-items: center; }
.eb-count b { font-weight: 600; color: var(--ink-2); margin-right: 3px; }
.eb-count em { font-style: normal; margin-left: 6px; font-size: 11px; padding: 0 5px; border-radius: 4px; line-height: 17px; }
.eb-count em.up { color: var(--ok); background: var(--ok-soft); }
.eb-count em.down { color: var(--err); background: var(--err-soft); }
.editor-bar .btn.small { height: 32px; padding: 0 11px; }
@container ms (max-width: 820px) {
.eb-crumb { display: none; }
}
@container ms (max-width: 640px) {
.eb-full { display: none; }
.eb-short { display: inline; }
.review-toggle .eb-lbl { display: none; }
.review-toggle { padding: 0 9px; }
.eb-count em { display: none; }
.paper, .paper.w-narrow, .paper.w-wide { padding: 40px 30px 36px; margin: 10px 10px 100px; }
}
@container ms (max-width: 500px) {
.eb-state { padding: 0; width: 24px; justify-content: center; background: transparent; }
.eb-state > span { display: none; }
.save-wrap .eb-lbl { display: none; }
.save-wrap .btn { width: 34px; padding: 0; }
.eb-count { margin-right: 2px; }
.paper, .paper.w-narrow, .paper.w-wide { padding: 30px 20px 28px; margin: 6px 6px 90px; }
}
@container ms (max-width: 360px) {
.eb-count { display: none; }
}
.save-wrap, .menu-wrap { position: relative; margin-left: 4px; flex: none; }
.menu-wrap { margin-left: 0; }
.save-pop { right: 0; top: calc(100% + 8px); width: 320px; }
.layout-pop { right: 0; top: calc(100% + 8px); width: 260px; display: flex; flex-direction: column; gap: 12px; }
.layout-pop .row { gap: 8px; }
.fs-val { min-width: 42px; text-align: center; font-variant-numeric: tabular-nums; }
.manuscript-scroll > .banner { max-width: 760px; margin: 12px auto 0; }
.paper {
--fs: 18px;
max-width: 760px; margin: 18px auto 120px; padding: 64px 76px 56px; background: var(--paper); border-radius: 4px;
box-shadow: var(--paper-shadow); border: 1px solid color-mix(in srgb, var(--line) 70%, transparent); min-height: calc(100vh - 140px);
display: flex; flex-direction: column;
}
.paper.w-narrow { max-width: 640px; padding-inline: 60px; }
.paper.w-wide { max-width: 940px; }
.paper-chapter { font-family: var(--serif); text-align: center; color: var(--accent); letter-spacing: .3em; font-size: 13px; }
.paper-title { font-family: var(--serif); text-align: center; font-size: calc(var(--fs) * 1.45); font-weight: 700; border: 0; background: transparent; outline: none; margin: 10px 0 8px; padding: 4px 0; letter-spacing: .05em; color: var(--ink); width: 100%; }
.paper-title::placeholder { color: var(--ink-4); }
.paper-goal { margin: 4px auto 18px; max-width: 520px; text-align: center; font-size: 12.5px; color: var(--ink-3); line-height: 1.7; }
.paper-goal span { display: inline-block; margin-right: 8px; padding: 0 6px; border: 1px solid var(--line-2); border-radius: 4px; font-size: 11px; }
.paper-text {
flex: 1 0 auto; width: 100%; border: 0; outline: none; resize: none; background: transparent; overflow: hidden;
font-family: var(--serif); font-size: var(--fs); line-height: 2.05; color: var(--ink); letter-spacing: .02em; padding: 18px 0 0;
min-height: 60vh; caret-color: var(--accent);
}
.paper-text::placeholder { color: var(--ink-4); }
.paper-end { text-align: center; font-family: var(--serif); color: var(--ink-4); font-size: 12.5px; letter-spacing: .2em; margin-top: 30px; min-height: 20px; }
.is-focus .editor-bar { opacity: .15; transition: opacity .3s; }
.is-focus .editor-bar:hover, .is-focus .editor-bar:focus-within { opacity: 1; }
.is-focus .paper { box-shadow: none; border-color: transparent; background: transparent; margin-top: 4vh; }
.is-focus .manuscript-scroll { background: var(--paper); }
/* inspector */
.inspector { width: 380px; flex: none; height: 100%; display: flex; flex-direction: column; background: var(--surface); border-left: 1px solid var(--line); }
.inspector-tabs { padding: 4px 8px 0; flex: none; }
.inspector-tabs .tab { padding: 10px 6px; font-size: 12.5px; gap: 3px; flex: 1 0 auto; justify-content: center; }
.inspector-body { flex: 1; overflow: auto; padding: 16px 16px 30px; }
.inspector .field + .field { margin-top: 12px; }
.sticky-actions { position: sticky; bottom: -30px; margin: 16px -16px -30px; padding: 12px 16px 16px; background: linear-gradient(transparent, var(--surface) 30%); display: flex; gap: 8px; justify-content: flex-end; }
.quote-box { border-left: 3px solid var(--line-2); padding: 8px 12px; background: var(--bg); border-radius: 0 6px 6px 0; font-size: 13px; color: var(--ink-2); line-height: 1.8; }
.quote-label { font-size: 11.5px; color: var(--ink-3); margin-bottom: 4px; font-weight: 600; }
.timeline.vt { list-style: none; position: relative; display: flex; flex-direction: column; margin: 0; padding: 0; border: 0; gap: 0; }
.timeline.vt::before { content: ""; position: absolute; left: 7px; top: 14px; bottom: 14px; width: 1px; background: var(--line-2); }
.timeline.vt li { position: relative; display: flex; gap: 12px; padding: 8px 0; }
.timeline.vt li::before { content: none; }
.tl-check { position: relative; z-index: 1; width: 15px; height: 15px; flex: none; margin-top: 3px; border-radius: 50%; background: var(--surface); border: 2px solid var(--line-2); display: grid; place-items: center; }
.tl-check input { position: absolute; inset: 0; opacity: 0; cursor: pointer; margin: 0; }
.timeline.vt li.current .tl-check { border-color: var(--accent); background: var(--accent); }
.tl-check:has(input:checked) { border-color: var(--blue); background: var(--blue); }
.tl-body { flex: 1; min-width: 0; }
.tl-head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 13px; font-weight: 600; }
.tl-sub { font-size: 12px; color: var(--ink-3); }
.tl-summary { font-size: 12.5px; color: var(--ink-2); margin-top: 2px; }
.tl-actions { display: flex; gap: 10px; margin-top: 4px; opacity: .7; }
.timeline.vt li:hover .tl-actions { opacity: 1; }
.version-meta { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; font-size: 12.5px; color: var(--ink-3); margin-bottom: 14px; }
.reader-text { font-family: var(--serif); font-size: 15.5px; line-height: 2; white-space: pre-wrap; word-break: break-word; color: var(--ink); }
.diff-legend { display: flex; gap: 14px; font-size: 12px; color: var(--ink-3); margin-bottom: 10px; }
.diff-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; }
.diff-legend i.del { background: var(--err-soft); border: 1px solid var(--err); }
.diff-legend i.add { background: var(--ok-soft); border: 1px solid var(--ok); }
.diff-body { display: flex; flex-direction: column; gap: 2px; font-family: var(--serif); font-size: 14.5px; line-height: 1.9; }
.diff-row { padding: 4px 10px; border-radius: 4px; white-space: pre-wrap; word-break: break-word; }
.diff-row.same { color: var(--ink-3); }
.diff-row.add { background: var(--ok-soft); border-left: 3px solid var(--ok); }
.diff-row.del { background: var(--err-soft); border-left: 3px solid var(--err); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--err) 50%, transparent); }
.mini-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.mini-stats > div { padding: 10px; background: var(--paper); border: 1px solid var(--line); border-radius: 8px; display: flex; flex-direction: column; }
.mini-stats b { font-family: var(--serif); font-size: 18px; }
.mini-stats span { font-size: 11.5px; color: var(--ink-3); }
.hints { list-style: none; display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.hints li { padding: 7px 10px; border-radius: 7px; background: var(--ok-soft); color: var(--ink-2); }
.hints li.warn { background: var(--warn-soft); }
.check-result { border-radius: var(--r); padding: 12px 14px; border: 1px solid var(--line); }
.cr-pass { background: var(--ok-soft); border-color: color-mix(in srgb, var(--ok) 30%, transparent); }
.cr-warning { background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 30%, transparent); }
.cr-error { background: var(--err-soft); border-color: color-mix(in srgb, var(--err) 30%, transparent); }
.cr-head { display: flex; align-items: center; gap: 8px; font-weight: 600; margin-bottom: 6px; }
.issues { list-style: none; display: flex; flex-direction: column; gap: 5px; font-size: 13px; margin: 6px 0; }
.issues li { padding-left: 14px; position: relative; }
.issues li::before { content: ""; position: absolute; left: 0; top: 9px; width: 6px; height: 6px; border-radius: 50%; background: var(--ink-4); }
.issues li.error::before { background: var(--err); }
.issues li.warning::before { background: var(--warn); }
.dims { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.ref-card { border: 1px solid var(--line); border-radius: var(--r); padding: 10px 12px; background: var(--paper); display: flex; flex-direction: column; gap: 5px; }
.ref-sum { font-weight: 600; font-size: 13.5px; line-height: 1.55; }
.ref-meta { font-size: 11.5px; color: var(--ink-3); }
.ref-hook { font-family: var(--serif); font-size: 13px; color: var(--ink-2); }
.ref-text { font-size: 12.5px; color: var(--ink-3); display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.task-list { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.task { text-align: left; padding: 9px 11px; border-radius: 8px; border: 1px solid var(--line); background: var(--paper); font-size: 13px; display: flex; flex-direction: column; gap: 2px; }
.task span, .task small { font-size: 11.5px; color: var(--ink-3); }
.task:hover { border-color: var(--ink-4); }
.task.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.prompt-box { border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: var(--paper); }
.prompt-head { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-bottom: 1px solid var(--line); font-size: 12.5px; color: var(--ink-3); background: var(--bg); }
.prompt-box .pre, .pre { margin: 0; padding: 12px; max-height: 320px; overflow: auto; font-family: var(--mono); font-size: 12px; line-height: 1.7; white-space: pre-wrap; word-break: break-word; color: var(--ink-2); }
.req { padding: 9px 11px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); font-size: 13px; }
.req + .req { margin-top: 6px; }
.req-head { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-3); margin-bottom: 3px; }
.req-st { margin-left: auto; color: var(--warn); }
/* ============================================================
作品圣经 / 大纲 / 参考素材
============================================================ */
.page.doc { max-width: 900px; }
.doc-head { margin-bottom: 18px; }
.doc-head .row { margin-top: 14px; }
.doc-tabs { margin-bottom: 4px; }
.doc-body { padding-bottom: 60px; }
.savebar {
position: sticky; bottom: 16px; z-index: 15; display: flex; align-items: center; gap: 10px; margin: 26px auto 0; width: fit-content; min-width: 320px;
padding: 8px 8px 8px 18px; background: var(--raised); border: 1px solid var(--line); border-radius: 99px; box-shadow: var(--shadow);
}
.savebar.dirty { border-color: color-mix(in srgb, var(--accent) 40%, transparent); }
.savebar-state { flex: 1; font-size: 13px; color: var(--ink-2); }
.savebar.dirty .savebar-state { color: var(--accent); }
.savebar .btn { border-radius: 99px; }
.fs-summary { display: flex; gap: 16px; font-size: 13px; color: var(--ink-3); margin-bottom: 12px; }
.fs-summary b { color: var(--ink); font-family: var(--serif); }
.ref-slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: 14px; margin-top: 18px; }
.ref-slot { position: relative; min-width: 0; min-height: 220px; border-radius: 4px 10px 10px 4px; padding: 18px 16px 14px; background: var(--paper); border: 1px solid var(--line); box-shadow: var(--paper-shadow); display: flex; flex-direction: column; gap: 8px; }
.ref-slot.empty { border: 1.5px dashed var(--line-2); box-shadow: none; background: transparent; align-items: center; justify-content: center; color: var(--ink-4); }
.slot-n { font-family: var(--serif); font-size: 26px; color: var(--accent); line-height: 1; }
.ref-slot.empty .slot-n { color: var(--ink-4); }
.slot-head { display: flex; align-items: center; gap: 6px; }
.slot-sum { font-family: var(--serif); font-weight: 600; font-size: 15px; line-height: 1.6; }
.slot-text { font-size: 12.5px; color: var(--ink-3); line-height: 1.7; display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
.slot-foot { margin-top: auto; display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-3); }
.mat-grid.compact { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.mini-mat { border: 1px solid var(--line); background: var(--paper); border-radius: var(--r); padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; }
.mm-meta { font-size: 11.5px; color: var(--ink-3); display: flex; gap: 6px; }
.mm-sum { font-weight: 600; font-size: 13.5px; line-height: 1.55; }
.mm-hook { font-family: var(--serif); font-size: 13px; color: var(--ink-2); }
.mm-actions { display: flex; gap: 8px; margin-top: auto; padding-top: 4px; }
/* ============================================================
素材馆
============================================================ */
.room { max-width: 1280px; margin: 0 auto; padding: 30px 36px 70px; }
.room-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.room-title { font-size: 26px; font-weight: 700; }
.room-tabs { margin-bottom: 20px; }
.basket-btn { position: relative; display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 16px; border-radius: 99px; border: 1px solid var(--line-2); background: var(--surface); font-weight: 500; }
.basket-btn:hover { border-color: var(--ink-4); }
.basket-btn.has { border-color: var(--accent); color: var(--accent); }
.basket-btn b { min-width: 20px; height: 20px; border-radius: 10px; background: var(--accent); color: var(--accent-ink); font-size: 11.5px; display: grid; place-items: center; padding: 0 5px; }
.mat-layout { display: grid; grid-template-columns: 260px 1fr; gap: 26px; align-items: start; }
.mat-layout:has(.filters.collapsed) { grid-template-columns: 1fr; }
.filters { position: sticky; top: 16px; display: flex; flex-direction: column; gap: 14px; padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); max-height: calc(100vh - 32px); overflow: auto; }
.filters.collapsed { display: none; }
.filters-head .seg { width: 100%; }
.filters-head .seg button { flex: 1; }
.filters-foot { font-size: 12px; border-top: 1px solid var(--line); padding-top: 10px; }
.fgroup { display: flex; flex-direction: column; gap: 7px; }
.fgroup-label { font-size: 11.5px; letter-spacing: .08em; color: var(--ink-3); font-weight: 600; }
.fgroup-body { display: flex; flex-wrap: wrap; gap: 5px; }
.fgroup-body .check { width: 100%; }
.mat-main { min-width: 0; }
.mat-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.mat-count { color: var(--ink-3); font-size: 13px; }
.lucky { padding: 16px; margin-bottom: 20px; border-radius: var(--r-l); background: var(--accent-soft); }
.lucky .mat-grid { margin-top: 12px; }
.mat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; transition: opacity .2s; }
.mat-card {
display: flex; flex-direction: column; gap: 8px; padding: 16px 16px 12px; background: var(--paper); border: 1px solid var(--line);
border-radius: 4px var(--r) var(--r) 4px; cursor: pointer; transition: transform .15s, box-shadow .15s, border-color .15s; position: relative;
}
.mat-card::before { content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 3px; border-radius: 0 3px 3px 0; background: var(--line-2); }
.mat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--line-2); }
.mat-card:hover::before { background: var(--accent); }
.mc-meta { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--ink-3); }
.mc-genre { color: var(--accent); font-weight: 600; }
.mc-kind { padding: 0 6px; border-radius: 4px; background: var(--bg-2); }
.mc-meta .stars { margin-left: auto; }
.mc-title { font-family: var(--serif); font-size: 15.5px; font-weight: 600; line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.mc-hook { font-family: var(--serif); font-size: 13.5px; color: var(--ink-2); line-height: 1.75; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.mc-excerpt { font-size: 12.5px; color: var(--ink-3); line-height: 1.75; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.mc-foot { margin-top: auto; display: flex; align-items: center; gap: 6px; font-size: 12px; padding-top: 4px; border-top: 1px dashed var(--line); }
.mat-detail { display: flex; flex-direction: column; gap: 14px; }
.md-title { font-size: 21px; line-height: 1.55; }
.md-sum { color: var(--ink-2); line-height: 1.8; }
.md-src { font-size: 12.5px; }
.breakdown { display: flex; flex-direction: column; gap: 16px; padding: 18px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-l); }
.bd-hook { display: flex; gap: 10px; font-family: var(--serif); font-size: 16px; line-height: 1.8; color: var(--ink); padding: 4px 0 4px; }
.bd-hook svg { color: var(--accent); flex: none; margin-top: 6px; }
.bd-block h4, .mcard-block h4, .md-text h4, .genre h4, .rl-block h4 { font-size: 12px; letter-spacing: .08em; color: var(--ink-3); margin-bottom: 7px; font-weight: 600; }
.beats { padding-left: 0; list-style: none; counter-reset: b; display: flex; flex-direction: column; gap: 6px; }
.beats li { counter-increment: b; position: relative; padding-left: 28px; line-height: 1.75; font-size: 13.5px; }
.beats li::before { content: counter(b); position: absolute; left: 0; top: 2px; width: 19px; height: 19px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-size: 11px; font-weight: 700; display: grid; place-items: center; }
.people { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px; }
.person { padding: 9px 11px; border-radius: 8px; background: var(--bg); font-size: 13px; line-height: 1.65; }
.person b { display: block; margin-bottom: 2px; }
.person.wide { grid-column: 1 / -1; }
.arc { font-size: 13.5px; color: var(--ink-2); }
.scene { font-size: 14.5px; line-height: 1.9; padding: 10px 14px; border-left: 3px solid var(--accent); background: var(--bg); border-radius: 0 8px 8px 0; }
.details { list-style: none; display: flex; flex-direction: column; gap: 5px; }
.details li { position: relative; padding-left: 14px; font-size: 13.5px; line-height: 1.7; }
.details li::before { content: "·"; position: absolute; left: 2px; color: var(--accent); font-weight: 700; }
.details.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 5px 18px; }
.bd-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.md-text { border-top: 1px solid var(--line); padding-top: 14px; }
.md-text .reader-text { padding: 16px 20px; background: var(--paper); border-radius: var(--r); border: 1px solid var(--line); margin-top: 6px; }
.edits { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; font-size: 13px; }
.edit-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.edit-row .del, .edit-row del { background: var(--err-soft); padding: 4px 8px; border-radius: 5px; text-decoration: line-through; color: var(--ink-2); }
.edit-row .ins, .edit-row ins { background: var(--ok-soft); padding: 4px 8px; border-radius: 5px; text-decoration: none; }
.pick-list { display: flex; flex-direction: column; gap: 6px; }
.pick-item { display: flex; align-items: baseline; gap: 10px; padding: 10px 14px; border-radius: 8px; border: 1px solid var(--line); text-align: left; }
.pick-item:hover:not(:disabled) { border-color: var(--accent); background: var(--accent-soft); }
.basket-list { display: flex; flex-direction: column; gap: 10px; }
.basket-item { padding: 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--paper); }
.bi-top { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.bi-sum { text-align: left; margin-top: 6px; font-family: var(--serif); font-size: 14.5px; line-height: 1.65; }
.bi-sum:hover { color: var(--accent); }
/* motifs */
.motifs .page-sub { margin: 0 0 20px; }
.motif-group { margin-bottom: 28px; }
.mg-title { font-size: 17px; margin-bottom: 12px; display: flex; align-items: center; gap: 10px; }
.mg-title::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.motif-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.motif-tile { text-align: left; padding: 14px 16px; border-radius: var(--r); border: 1px solid var(--line); background: var(--paper); display: flex; flex-direction: column; gap: 4px; transition: all .15s; }
.motif-tile:hover { border-color: var(--accent); transform: translateY(-1px); box-shadow: var(--shadow-s); }
.motif-tile b { font-family: var(--serif); font-size: 16px; }
.motif-tile span { font-size: 12px; color: var(--ink-3); }
.pairs { display: flex; flex-wrap: wrap; gap: 8px; }
.pair { padding: 6px 12px; border-radius: 99px; border: 1px solid var(--line-2); font-size: 13px; background: var(--surface); }
.pair:hover { border-color: var(--accent); color: var(--accent); }
.pair em { font-style: normal; color: var(--ink-3); font-size: 11.5px; margin-left: 4px; }
.md-head { margin-bottom: 18px; display: flex; flex-direction: column; gap: 6px; }
.md-head .row { margin-top: 8px; }
.motif-card { display: flex; flex-direction: column; gap: 20px; padding: 24px 26px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-l); box-shadow: var(--paper-shadow); margin-bottom: 26px; }
.mcard-summary { font-size: 16.5px; line-height: 1.9; }
.mcard-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.mcard-block.avoid { padding: 12px 14px; border-radius: 8px; background: var(--err-soft); }
.variant-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.variant { padding: 10px 12px; border-radius: 8px; background: var(--bg); font-size: 13px; line-height: 1.7; }
.variant b { display: block; margin-bottom: 2px; }
.hook-list { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.hook-list li { font-family: var(--serif); font-size: 14px; line-height: 1.75; padding-left: 12px; border-left: 2px solid var(--accent); }
/* compose */
.compose { display: flex; flex-direction: column; gap: 18px; max-width: 1080px; }
.compose-input { margin-top: 0; display: flex; flex-direction: column; gap: 12px; }
.idea { font-size: 17px; }
.motif-chips { display: flex; flex-direction: column; gap: 8px; }
.mchip-row { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.mchip-grp { width: 42px; font-size: 12px; color: var(--ink-3); flex: none; }
.compose-result { display: flex; flex-direction: column; gap: 14px; }
.mcard-mini { padding: 14px 16px; border-radius: var(--r); background: var(--paper); border: 1px solid var(--line); }
.mcard-mini p { color: var(--ink-2); font-size: 13.5px; margin-top: 4px; }
.skeleton { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 10px; }
.skeleton span { font-size: 12px; padding: 3px 9px; background: var(--bg); border-radius: 5px; position: relative; }
.skeleton span + span::before { content: "→"; margin-right: 6px; color: var(--ink-4); }
.role-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.role-slot { border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); overflow: hidden; display: flex; flex-direction: column; }
.rs-head { display: flex; align-items: baseline; gap: 8px; padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--bg); font-size: 12.5px; }
.rs-head b { font-size: 14px; }
.rs-body { padding: 12px 14px; cursor: pointer; display: flex; flex-direction: column; gap: 6px; flex: 1; background: var(--paper); }
.rs-body:hover .rs-sum { color: var(--accent); }
.rs-body.empty { cursor: default; font-size: 13px; }
.rs-sum { font-family: var(--serif); font-size: 14.5px; font-weight: 600; line-height: 1.65; }
.rs-note { font-size: 12.5px; color: var(--ink-2); }
.cands { border-top: 1px dashed var(--line); padding: 8px; display: flex; flex-direction: column; gap: 4px; background: var(--surface); }
.cand { text-align: left; padding: 7px 9px; border-radius: 6px; font-size: 12.5px; line-height: 1.55; }
.cand:hover { background: var(--accent-soft); }
/* batches */
.batches { display: flex; flex-direction: column; gap: 16px; }
.batch-intro { display: flex; gap: 20px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 18px 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); }
.bi-text { flex: 1; min-width: 260px; color: var(--ink-2); line-height: 1.8; }
.bi-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.batch-table { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: var(--paper); }
.batch-row { display: flex; align-items: center; gap: 14px; padding: 8px 14px; font-size: 13px; border-bottom: 1px solid var(--line); }
.batch-row:last-child { border-bottom: 0; }
.batch-row:hover { background: var(--bg); }
.br-n { font-family: var(--serif); font-weight: 600; min-width: 64px; }
.br-range { color: var(--ink-2); }
.br-uid { font-family: var(--mono); font-size: 11.5px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; min-width: 0; }
/* ============================================================
采集
============================================================ */
.sources { display: flex; height: 100%; }
.src-side { width: 270px; flex: none; display: flex; flex-direction: column; border-right: 1px solid var(--line); background: var(--surface); height: 100%; }
.src-side-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 12px 8px 14px; }
.src-home { display: inline-flex; align-items: center; gap: 7px; font-weight: 700; font-family: var(--serif); font-size: 16px; }
.src-special { display: flex; flex-direction: column; padding: 0 8px 10px; border-bottom: 1px solid var(--line); margin-bottom: 10px; }
.src-link { display: flex; align-items: center; gap: 9px; padding: 7px 10px; border-radius: 7px; font-size: 13.5px; color: var(--ink-2); text-align: left; }
.src-link:hover { background: var(--bg-2); color: var(--ink); }
.src-link.on { background: var(--accent-soft); color: var(--accent); }
.src-list { flex: 1; overflow: auto; padding: 0 8px 12px; display: flex; flex-direction: column; gap: 1px; }
.src-item { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 8px; text-align: left; }
.src-item:hover { background: var(--bg-2); }
.src-item.on { background: var(--accent-soft); }
.si-text { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.35; }
.si-text b { font-size: 13.5px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.si-text span { font-size: 11.5px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.src-item.on b { color: var(--accent); }
.si-flag { color: var(--warn); flex: none; }
.avatar { border-radius: 50%; object-fit: cover; flex: none; background: var(--bg-2); }
.avatar.ph { display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font-weight: 700; font-family: var(--serif); }
.src-main { flex: 1; min-width: 0; height: 100%; overflow: auto; }
.ch-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; }
.ch-card { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r); background: var(--paper); text-align: left; }
.ch-card:hover { border-color: var(--accent); }
.cc-text { min-width: 0; display: flex; flex-direction: column; }
.cc-text b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cc-text span { font-size: 12px; color: var(--ink-3); }
.ch-head { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 16px; }
.ch-head-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.ch-head .page-title { font-size: 24px; }
.ch-head .muted a { color: var(--ink-3); }
.ch-desc { font-size: 13px; color: var(--ink-2); line-height: 1.7; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; cursor: pointer; white-space: pre-wrap; max-width: 680px; }
.ch-desc.open { -webkit-line-clamp: unset; }
.ch-actions { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.post-list { display: flex; flex-direction: column; gap: 12px; transition: opacity .2s; }
.post { padding: 16px 20px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); display: flex; flex-direction: column; gap: 8px; }
.post-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 12px; }
.post-meta .muted { display: inline-flex; align-items: center; gap: 3px; }
.post-tools { margin-left: auto; display: flex; gap: 2px; opacity: .5; transition: opacity .15s; }
.post:hover .post-tools { opacity: 1; }
.post-text { font-family: var(--serif); font-size: 15px; line-height: 1.95; white-space: pre-wrap; word-break: break-word; }
.post-text.clamp { display: -webkit-box; -webkit-line-clamp: 7; -webkit-box-orient: vertical; overflow: hidden; }
.reactions { display: flex; gap: 10px; font-size: 12px; color: var(--ink-3); }
.btn.block.ghost { margin-top: 14px; }
.score { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; font-weight: 700; font-size: 12px; background: var(--bg-2); color: var(--ink-2); font-family: var(--serif); }
.score.s5 { background: var(--accent); color: var(--accent-ink); }
.score.s4 { background: var(--accent-soft); color: var(--accent); }
.logline { font-size: 15px; font-weight: 600; padding: 8px 12px; border-left: 3px solid var(--accent); background: var(--bg); border-radius: 0 6px 6px 0; line-height: 1.7; }
.detail-quote { font-size: 13px; color: var(--ink-2); font-family: var(--serif); }
.inspo-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding-top: 6px; border-top: 1px dashed var(--line); }
.saved-note { font-size: 12.5px; color: var(--ink-2); padding: 6px 10px; background: var(--warn-soft); border-radius: 6px; }
.note-edit { display: flex; gap: 8px; }
.filled { fill: currentColor; }
.presets { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 16px 0 12px; }
.preset { text-align: left; padding: 12px 14px; border-radius: var(--r); border: 1px solid var(--line); background: var(--surface); display: flex; flex-direction: column; gap: 2px; }
.preset span { font-size: 12px; color: var(--ink-3); }
.preset:hover { border-color: var(--ink-4); }
.preset.on { border-color: var(--accent); background: var(--accent-soft); }
.preset.on b { color: var(--accent); }
.inspo-filters { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.fline { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.flabel { width: 48px; flex: none; font-size: 12px; color: var(--ink-3); font-weight: 600; }
.score-dist { display: inline-flex; align-items: flex-end; gap: 2px; height: 22px; margin-left: 10px; }
.score-dist i { width: 8px; background: var(--accent); opacity: .5; border-radius: 2px 2px 0 0; }
.funnel { display: flex; gap: 0; margin: 14px 0 0; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: var(--surface); }
.funnel-step { flex: 1; padding: 10px 14px; display: flex; flex-direction: column; position: relative; min-width: 0; }
.funnel-step + .funnel-step { border-left: 1px solid var(--line); }
.funnel-step b { font-family: var(--serif); font-size: 17px; }
.funnel-step span { font-size: 11.5px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.funnel-step:last-child b { color: var(--accent); }
.bars { display: flex; flex-direction: column; gap: 7px; }
.bar-row { display: grid; grid-template-columns: 110px 1fr 50px 110px; gap: 10px; align-items: center; font-size: 13px; }
.bar-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-row .bar { margin: 0; height: 8px; }
.bar-n { text-align: right; font-variant-numeric: tabular-nums; }
.bar-sub { font-size: 12px; }
.spark-bars { display: flex; align-items: flex-end; gap: 2px; height: 90px; }
.spark-bars i { flex: 1; background: var(--accent); opacity: .65; border-radius: 2px 2px 0 0; min-height: 2px; }
.spark-bars i:hover { opacity: 1; }
.emojis { display: flex; flex-wrap: wrap; gap: 8px; }
.emojis span { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 99px; background: var(--bg); font-size: 13px; }
.emojis b { font-size: 16px; }
.disc-list { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.disc-item { padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r); background: var(--paper); display: flex; flex-direction: column; gap: 6px; }
.disc-item.ignored { opacity: .6; }
.disc-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.score-badge { width: 36px; height: 36px; border-radius: 9px; display: grid; place-items: center; font-family: var(--serif); font-weight: 700; background: var(--bg-2); color: var(--ink-3); flex: none; }
.score-badge.good { background: var(--ok-soft); color: var(--ok); }
.disc-title { display: flex; flex-direction: column; min-width: 0; line-height: 1.4; }
.disc-title a { font-size: 12px; }
.disc-tags { display: flex; gap: 5px; flex-wrap: wrap; }
.disc-actions { margin-left: auto; display: flex; gap: 4px; align-items: center; }
.disc-stats { font-size: 12px; }
.samples { display: flex; flex-direction: column; gap: 6px; }
.sample { font-size: 13px; line-height: 1.75; padding: 8px 12px; background: var(--bg); border-radius: 6px; white-space: pre-wrap; color: var(--ink-2); }
.progress-big { position: relative; height: 26px; background: var(--bg-2); border-radius: 99px; overflow: hidden; margin: 20px 0 4px; }
.progress-big i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--accent) 70%, var(--warn))); border-radius: 99px; transition: width .4s; }
.progress-big span { position: absolute; inset: 0; display: grid; place-items: center; font-size: 12.5px; font-weight: 600; color: var(--ink); mix-blend-mode: normal; }
.progress-big.slim { height: 18px; }
.acct-status { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: var(--r); background: var(--bg); }
.acct-status.ok svg { color: var(--ok); }
.acct-status.off svg { color: var(--ink-4); }
.acct-status > div { min-width: 0; }
/* ============================================================
写作手册
============================================================ */
.guide { display: flex; height: 100%; }
.guide-toc { width: 220px; flex: none; padding: 26px 14px; border-right: 1px solid var(--line); background: var(--surface); display: flex; flex-direction: column; gap: 10px; overflow: auto; }
.guide-toc .eyebrow { padding: 0 10px; }
.guide-toc nav { display: flex; flex-direction: column; gap: 2px; }
.toc-link { display: flex; align-items: center; gap: 9px; padding: 8px 10px; border-radius: 7px; color: var(--ink-2); text-align: left; }
.toc-link:hover { background: var(--bg-2); color: var(--ink); }
.toc-link.on { background: var(--accent-soft); color: var(--accent); font-weight: 500; }
.guide-toc .small-note { padding: 10px; margin-top: auto; }
.guide-body { flex: 1; min-width: 0; height: 100%; overflow: auto; margin: 0; max-width: none; padding-inline: max(40px, calc((100% - 900px) / 2)); }
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; margin-top: 20px; }
.fact { padding: 16px 18px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); display: flex; flex-direction: column; gap: 4px; }
.fact-k { font-size: 12px; color: var(--ink-3); }
.fact-v { font-size: 19px; color: var(--accent); }
.fact p { font-size: 13px; color: var(--ink-2); line-height: 1.75; }
.src-refs { display: inline-flex; gap: 4px; margin-left: 4px; vertical-align: 1px; }
.src-ref { font-size: 10.5px; padding: 0 5px; border-radius: 3px; background: var(--bg-2); color: var(--ink-3); line-height: 17px; }
.src-ref.official { background: var(--blue-soft); color: var(--blue); }
.src-ref:hover { text-decoration: none; color: var(--accent); }
.roadmap { list-style: none; display: flex; flex-direction: column; position: relative; }
.roadmap::before { content: ""; position: absolute; left: 44px; top: 10px; bottom: 10px; width: 1px; background: var(--line-2); }
.roadmap li { display: flex; gap: 22px; padding: 10px 0; position: relative; }
.rm-w { width: 90px; flex: none; text-align: right; font-size: 12.5px; color: var(--accent); font-weight: 600; padding-top: 2px; position: relative; background: var(--bg); z-index: 1; padding-right: 10px; margin-right: -10px; }
.rm-body { flex: 1; padding: 0 0 6px; }
.rm-body b { font-family: var(--serif); font-size: 16px; }
.rm-body p { color: var(--ink-2); font-size: 13.5px; line-height: 1.8; margin: 2px 0 4px; }
.genre-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.genre { padding: 16px 18px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); display: flex; flex-direction: column; gap: 8px; }
.genre.pick { border-color: color-mix(in srgb, var(--accent) 40%, transparent); }
.genre-head { display: flex; align-items: center; gap: 8px; }
.genre-head b { font-family: var(--serif); font-size: 15.5px; }
.genre-meter { display: flex; gap: 14px; font-size: 12px; color: var(--ink-2); flex-wrap: wrap; }
.dots { display: inline-flex; gap: 2px; margin-left: 4px; vertical-align: 1px; }
.dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--line-2); }
.dots i.on { background: var(--ok); }
.genre p { font-size: 13px; color: var(--ink-2); line-height: 1.75; }
.genre h4 { margin: 4px 0 0; }
.bullets { list-style: none; display: flex; flex-direction: column; gap: 4px; }
.bullets li { position: relative; padding-left: 14px; font-size: 13px; line-height: 1.7; color: var(--ink-2); }
.bullets li::before { content: ""; position: absolute; left: 2px; top: 9px; width: 5px; height: 5px; border-radius: 50%; background: var(--ok); }
.bullets.warn li::before { background: var(--err); }
.flow { list-style: none; display: flex; flex-direction: column; gap: 14px; margin-top: 18px; }
.flow-step { display: flex; gap: 16px; }
.flow-n { width: 38px; height: 38px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); font-weight: 700; font-size: 17px; }
.flow-body { flex: 1; min-width: 0; padding: 14px 18px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); }
.flow-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.flow-head b { font-family: var(--serif); font-size: 16px; }
.flow-items { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.flow-items li { display: flex; gap: 8px; font-size: 13.5px; line-height: 1.75; color: var(--ink-2); }
.flow-items li svg { flex: none; margin-top: 5px; color: var(--ok); }
.flow-items li.warn svg { color: var(--warn); }
.flow-items li.warn { color: var(--ink); }
.exp { flex: none; font-size: 10.5px; padding: 0 5px; height: 17px; line-height: 17px; margin-top: 4px; border-radius: 3px; background: var(--blue-soft); color: var(--blue); }
.redlines { display: flex; flex-direction: column; gap: 12px; margin-top: 10px; }
.redline { padding: 16px 20px; background: var(--paper); border: 1px solid var(--line); border-left-width: 4px; border-radius: 4px var(--r) var(--r) 4px; display: flex; flex-direction: column; gap: 10px; }
.redline.risk-ban { border-left-color: var(--err); }
.redline.risk-down { border-left-color: var(--accent); }
.redline.risk-limit { border-left-color: var(--warn); }
.redline.risk-reject { border-left-color: var(--blue); }
.redline > p { font-size: 13.5px; line-height: 1.8; color: var(--ink-2); }
.rl-head { display: flex; align-items: center; gap: 10px; }
.rl-head h3 { flex: 1; font-size: 16px; }
.rl-cat { font-size: 18px; }
.risk-badge { font-size: 11.5px; padding: 1px 8px; border-radius: 99px; font-weight: 600; white-space: nowrap; }
.risk-badge.risk-ban { background: var(--err-soft); color: var(--err); }
.risk-badge.risk-down { background: var(--accent-soft); color: var(--accent); }
.risk-badge.risk-limit { background: var(--warn-soft); color: var(--warn); }
.risk-badge.risk-reject { background: var(--blue-soft); color: var(--blue); }
.rl-block.safe { padding: 10px 12px; background: var(--ok-soft); border-radius: 7px; }
.rl-block.safe p { font-size: 13px; line-height: 1.75; }
.rl-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12px; }
.checklist { list-style: none; display: flex; flex-direction: column; }
.checklist li { border-bottom: 1px dashed var(--line); }
.checklist li:last-child { border-bottom: 0; }
.checklist label { display: flex; gap: 10px; padding: 9px 2px; cursor: pointer; align-items: flex-start; font-size: 14px; line-height: 1.7; }
.checklist input { margin-top: 5px; accent-color: var(--ok); width: 16px; height: 16px; flex: none; }
.checklist em { display: block; font-style: normal; font-size: 12px; }
.checklist li.done span { color: var(--ink-3); text-decoration: line-through; text-decoration-color: var(--ink-4); }
.beats-line { display: flex; flex-direction: column; gap: 10px; }
.beat-card { padding: 14px 18px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); display: flex; flex-direction: column; gap: 6px; }
.beat-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.beat-n { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font-weight: 700; flex: none; }
.beat-top b { font-family: var(--serif); font-size: 15.5px; }
.beat-card p { font-size: 13.5px; color: var(--ink-2); line-height: 1.75; }
.beat-card blockquote, .vol blockquote { margin: 2px 0 0; padding: 8px 12px; border-left: 3px solid var(--accent); background: var(--bg); border-radius: 0 6px 6px 0; font-size: 14px; line-height: 1.8; }
.vol-list .sheet:first-child { margin-top: 0; }
.vol p { color: var(--ink-2); font-size: 13.5px; line-height: 1.8; margin-bottom: 10px; }
.vol-beats { padding-left: 20px; display: flex; flex-direction: column; gap: 4px; font-size: 13.5px; line-height: 1.7; }
.frame-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.frame-table th, .frame-table td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; line-height: 1.7; }
.frame-table th { font-family: var(--serif); white-space: nowrap; font-weight: 600; }
.frame-table thead th { font-family: var(--sans); font-size: 12px; color: var(--ink-3); }
.frame-table tr:last-child th, .frame-table tr:last-child td { border-bottom: 0; }
.guide-body > .frame-table { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); border-collapse: separate; border-spacing: 0; overflow: hidden; }
.ai-steps { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 10px; }
.ai-step { display: flex; gap: 12px; padding: 14px 16px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); }
.ai-n { font-size: 15px; color: var(--accent); font-weight: 700; white-space: nowrap; }
.ai-step b { font-size: 14.5px; }
.ai-step p { font-size: 13px; color: var(--ink-2); line-height: 1.75; margin-top: 4px; }
.role-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; margin-bottom: 20px; }
.role-card { padding: 14px 16px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); }
.rc-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.rc-head b { font-family: var(--serif); font-size: 15.5px; }
.rc-i { font-size: 18px; }
.role-card dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; font-size: 13px; line-height: 1.7; }
.role-card dt { color: var(--ink-3); font-size: 12px; padding-top: 1px; }
.role-card dd { margin: 0; color: var(--ink-2); }
.src-list-doc { list-style: none; display: flex; flex-direction: column; }
.src-list-doc li { display: flex; gap: 12px; justify-content: space-between; padding: 8px 0; border-bottom: 1px dashed var(--line); font-size: 13.5px; }
.src-list-doc li:last-child { border-bottom: 0; }
.src-list-doc .muted { white-space: nowrap; font-size: 12px; }
/* ============================================================
响应式
============================================================ */
@media (max-width: 1180px) {
.inspector { width: 340px; }
}
@container ms (max-width: 900px) and (min-width: 641px) {
.paper, .paper.w-narrow { padding: 54px 52px 48px; }
}
@media (max-width: 1000px) {
.editor.with-inspector .inspector { position: absolute; right: 0; top: 0; bottom: 0; z-index: 30; box-shadow: var(--shadow-l); }
.binder { position: absolute; left: 0; top: 0; bottom: 0; z-index: 40; box-shadow: var(--shadow-l); }
.mat-layout { grid-template-columns: 1fr; }
.filters { position: static; max-height: none; }
.src-side { width: 230px; }
.guide-toc { width: 180px; }
.mcard-cols { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
:root { --rail-w: 0px; }
.shell { flex-direction: column-reverse; }
.rail { width: 100%; height: 58px; flex-direction: row; padding: 0 6px; border-right: 0; border-top: 1px solid var(--line); justify-content: space-around; gap: 0; }
.rail-brand { display: none; }
.rail-items, .rail-foot { flex-direction: row; margin: 0; gap: 0; }
.rail { padding: 0 2px env(safe-area-inset-bottom); height: calc(58px + env(safe-area-inset-bottom)); }
.rail-items { flex: 6 1 0; min-width: 0; justify-content: space-around; }
.rail-foot { flex: 2 1 0; min-width: 0; justify-content: space-around; }
.rail-item { width: auto; flex: 1 1 0; min-width: 0; padding: 6px 0 4px; font-size: 10.5px; }
.rail-item span { white-space: nowrap; }
.stage { height: calc(100% - 58px); }
.page, .room { padding: 22px 16px 70px; }
.page-title { font-size: 23px; }
.page-head, .room-head { flex-direction: column; align-items: flex-start; }
.form-grid { grid-template-columns: 1fr; }
.span2 { grid-column: auto; }
.paper, .paper.w-narrow { padding: 34px 22px 30px; margin: 8px 8px 80px; }
.editor-bar { padding: 0 8px 0 50px; }
.eb-crumb { display: none; }
.inspector { width: 100% !important; }
.about-stats { grid-template-columns: 1fr 1fr; }
.quick-links { grid-template-columns: 1fr; }
.ref-slots { grid-template-columns: 1fr; }
.sources, .guide { flex-direction: column; }
.src-side { width: 100%; height: auto; max-height: 40vh; border-right: 0; border-bottom: 1px solid var(--line); }
.src-main { height: auto; overflow: visible; }
.sources { height: auto; min-height: 100%; }
.guide { height: auto; }
.guide-toc { width: 100%; padding: 12px; border-right: 0; border-bottom: 1px solid var(--line); }
.guide-toc nav { flex-direction: row; overflow-x: auto; }
.guide-toc .small-note { display: none; }
.toc-link { white-space: nowrap; }
.guide-body { height: auto; overflow: visible; padding-inline: 16px; }
.presets { grid-template-columns: 1fr; }
.bar-row { grid-template-columns: 80px 1fr 40px; }
.bar-sub { display: none; }
.funnel { flex-wrap: wrap; }
.ch-head { flex-wrap: wrap; }
.details.cols { grid-template-columns: 1fr; }
.roadmap::before { left: 30px; }
.rm-w { width: 60px; }
.task-list { grid-template-columns: 1fr; }
}
@media print {
.rail, .binder, .editor-bar, .inspector, .binder-peek { display: none !important; }
.paper { box-shadow: none; border: 0; margin: 0; max-width: none; }
}
/* ===== 手册 v2:条目卡片 / AI 规范 / 对照表 ===== */
.toc-badge { margin-left: auto; font-style: normal; font-size: 10.5px; padding: 0 6px; border-radius: 99px; background: var(--blue-soft); color: var(--blue); line-height: 18px; }
.meta-row { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 12px; font-size: 12.5px; color: var(--ink-3); }
.meta-row span + span::before { content: '·'; margin-right: 16px; color: var(--ink-4); }
.three-docs { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin: 22px 0 6px; }
.doc-card { display: flex; flex-direction: column; gap: 6px; padding: 18px; text-align: left; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); color: var(--ink-2); transition: border-color .15s, transform .15s; }
.doc-card svg { color: var(--accent); }
.doc-card b { font-family: var(--serif); font-size: 17px; color: var(--ink); }
.doc-card span { font-size: 13px; line-height: 1.7; }
.doc-card:hover { border-color: var(--accent); transform: translateY(-1px); }
.timeline.gt { list-style: none; margin: 10px 0 0; padding: 0 0 0 14px; border-left: 2px solid var(--line); display: flex; flex-direction: column; gap: 14px; }
.timeline.gt li { position: relative; display: grid; grid-template-columns: 96px 1fr; gap: 12px; padding: 0; }
.timeline.gt li::before { content: ''; position: absolute; left: -21px; top: 5px; width: 12px; height: 12px; box-sizing: border-box; border-radius: 50%; background: var(--paper); border: 2px solid var(--accent); }
.tl-date { font-family: var(--mono); font-size: 12px; color: var(--ink-3); padding-top: 2px; }
.timeline.gt b { font-size: 14px; }
.timeline.gt p { font-size: 13px; line-height: 1.75; color: var(--ink-2); margin-top: 2px; }
.rule-group { margin-top: 8px; }
.rules { display: flex; flex-direction: column; gap: 12px; margin-top: 10px; }
.rule { padding: 16px 20px; background: var(--paper); border: 1px solid var(--line); border-left: 4px solid var(--line-2); border-radius: 4px var(--r) var(--r) 4px; display: flex; flex-direction: column; gap: 10px; scroll-margin: 80px; transition: box-shadow .3s, background .3s; }
.rule.risk-ban { border-left-color: var(--err); }
.rule.risk-down { border-left-color: var(--accent); }
.rule.risk-limit { border-left-color: var(--warn); }
.rule.risk-reject { border-left-color: var(--blue); }
.rule.ai-rule { border-left-color: var(--blue); }
.rule.ai-rule.hard { border-left-color: var(--err); }
.rule.flash { box-shadow: 0 0 0 3px var(--accent-soft); background: var(--surface); }
.rule-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.rule-head h3 { font-size: 16px; line-height: 1.5; flex: 1 1 260px; min-width: 0; }
.rule-head .push { margin-left: auto; }
.rule-id { font-family: var(--mono); font-size: 11.5px; padding: 1px 7px; border-radius: 4px; background: var(--bg-2); color: var(--ink-2); white-space: nowrap; flex: none; }
.rule-id.ai { background: var(--blue-soft); color: var(--blue); }
.rule-id.link { cursor: pointer; border: 0; }
.rule-id.link:hover { background: var(--accent-soft); color: var(--accent); }
.rule-d { font-size: 13.5px; line-height: 1.85; color: var(--ink-2); white-space: pre-line; }
.rule-quote { margin: 0; display: flex; gap: 8px; padding: 10px 12px; background: var(--surface); border-radius: 7px; font-size: 13px; line-height: 1.8; color: var(--ink-2); font-family: var(--serif); }
.rule-quote svg { flex: none; margin-top: 4px; color: var(--ink-4); }
.rule-foot { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; border-top: 1px dashed var(--line); padding-top: 9px; }
.rule-foot .push { flex: 1; }
.ai-chips { display: inline-flex; gap: 4px; flex-wrap: wrap; }
.ai-chip { display: inline-flex; align-items: center; gap: 3px; font-family: var(--mono); font-size: 11px; padding: 1px 7px; border-radius: 99px; background: var(--blue-soft); color: var(--blue); border: 0; cursor: pointer; }
.ai-chip:hover { background: var(--blue); color: var(--paper); }
.ai-chip.na { font-family: var(--sans); background: var(--bg-2); color: var(--ink-3); cursor: help; }
.ai-actions { margin-top: 14px; }
.ai-role .bullets li { font-size: 13.5px; line-height: 1.8; }
.dodont { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.dodont > div { padding: 10px 12px; border-radius: 7px; font-size: 13px; line-height: 1.75; }
.dodont h4 { display: flex; align-items: center; gap: 5px; font-size: 12px; margin-bottom: 4px; }
.dodont ul { margin: 0; padding-left: 18px; }
.dodont .do { background: var(--ok-soft); } .dodont .do h4 { color: var(--ok); }
.dodont .dont { background: var(--err-soft); } .dodont .dont h4 { color: var(--err); }
.ai-check { display: flex; gap: 7px; font-size: 13px; line-height: 1.75; color: var(--ink-2); }
.ai-check svg { flex: none; margin-top: 4px; color: var(--blue); }
.pre-block { margin: 0; padding: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 7px; font-family: var(--mono); font-size: 12px; line-height: 1.75; white-space: pre-wrap; word-break: break-word; color: var(--ink-2); max-height: 420px; overflow: auto; }
.warn-note { display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px; background: var(--warn-soft); color: var(--warn); border-radius: 7px; font-size: 13px; }
.chip-sep { width: 1px; align-self: stretch; background: var(--line); margin: 0 4px; }
.map-table-wrap { overflow-x: auto; margin-top: 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--paper); }
.map-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.map-table th { text-align: left; font-size: 12px; color: var(--ink-3); font-weight: 600; padding: 10px 14px; background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; }
.map-table td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: top; line-height: 1.7; }
.map-table td:first-child { width: 36%; }
.map-table tr:last-child td { border-bottom: 0; }
.map-ai + .map-ai { margin-top: 6px; }
.ck-refs { display: flex; gap: 4px; padding: 0 0 9px 30px; flex-wrap: wrap; }
.link-btn.inline { margin-left: 6px; font-family: var(--mono); font-size: 11px; }
@media (max-width: 760px) {
.dodont { grid-template-columns: 1fr; }
.timeline.gt li { grid-template-columns: 1fr; gap: 2px; }
.map-table td:first-child { width: auto; }
.rule { padding: 14px; }
}
@media print { .guide-toc, .ai-actions, .toolbar, .chips-row { display: none !important; } .rule { break-inside: avoid; } }
/* ---------- 母题库 v2 ---------- */
.m2 .chips-row.tight { margin: 4px 0; gap: 5px; }
.m2-grp { font-size: 13px; color: var(--ink-3); margin: 18px 0 8px; font-weight: 600; letter-spacing: .06em; }
.m2-role-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; }
.m2-role-grid .motif-tile { display: flex; flex-direction: column; gap: 2px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); text-align: left; }
.m2-role-grid .motif-tile:hover { border-color: var(--accent); }
.m2-role-grid .motif-tile span { font-size: 12px; color: var(--ink-3); }
.m2-role-title { font-size: 24px; display: flex; align-items: baseline; gap: 12px; margin-bottom: 10px; }
.m2-role-title span { font-size: 13px; font-family: inherit; }
.m2-filters { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.m2-fr { display: flex; gap: 10px; align-items: flex-start; }
.m2-fl { flex: 0 0 92px; font-size: 12px; color: var(--ink-3); padding-top: 8px; }
.m2-acts { list-style: none; padding: 0; margin: 12px 0; display: flex; flex-direction: column; gap: 6px; }
.m2-acts li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-s); cursor: pointer; line-height: 1.7; }
.m2-acts li:hover { border-color: var(--accent); }
.m2-act-meta { display: flex; gap: 4px; align-items: center; flex-shrink: 0; font-size: 12px; flex-wrap: wrap; justify-content: flex-end; max-width: 40%; }
.m2-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; margin: 12px 0; }
.m2-card { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); cursor: pointer; }
.m2-card:hover { border-color: var(--accent); box-shadow: var(--shadow-s); }
.m2-card-head { display: flex; gap: 5px; align-items: center; flex-wrap: wrap; }
.m2-log { line-height: 1.75; font-size: 14px; }
.m2-log.big { font-size: 16px; margin: 12px 0; }
.m2-tie { font-size: 12.5px; color: var(--ink-2); display: flex; flex-direction: column; gap: 1px; padding-left: 8px; border-left: 2px solid var(--accent-soft); margin-top: 4px; }
.m2-tags { display: flex; gap: 4px; flex-wrap: wrap; }
.m2-mot { display: inline-block; font-size: 11.5px; padding: 1px 7px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); margin-right: 6px; }
.m2-person { padding: 6px 0; border-bottom: 1px dashed var(--line); }
.m2-ev { padding-left: 20px; display: flex; flex-direction: column; gap: 6px; line-height: 1.7; }
.m2-c { display: flex; gap: 6px; align-items: flex-start; font-size: 13px; line-height: 1.7; padding: 2px 0; }
.m2-c svg { margin-top: 4px; flex-shrink: 0; }
.m2-c.fact { color: var(--ok); }
.m2-c.need { color: var(--warn); }
.m2-c.open { color: var(--ink-3); }
.m2-src { margin-top: 18px; }
.m2-src-text { white-space: pre-wrap; font-family: inherit; font-size: 13px; line-height: 1.8; background: var(--bg); padding: 12px; border-radius: var(--r-s); margin-top: 8px; color: var(--ink-2); max-height: 50vh; overflow: auto; }
.m2-sheet { margin-top: 12px; }
.m2-selects { display: flex; flex-wrap: wrap; gap: 10px 14px; margin: 12px 0 6px; }
.m2-sel { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--ink-3); }
.m2-cast { display: flex; flex-direction: column; gap: 8px; margin-bottom: 8px; align-items: flex-start; }
.m2-cast-row { display: flex; gap: 8px; align-items: center; }
.m2-compose .sheet-title { margin-top: 18px; }
.m2-compose .sheet-title:first-child { margin-top: 0; }
.m2-outline ol { padding-left: 22px; display: flex; flex-direction: column; gap: 8px; line-height: 1.75; }
.m2-outline li b { margin-right: 8px; }
.m2-outline li .link-btn { margin-left: 8px; font-size: 12px; }
.m2-slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; margin-top: 18px; }
.m2-slot h4 { font-size: 14px; margin-bottom: 8px; }
.m2-slot .m2-card { margin-bottom: 8px; }
.m2-slot-act { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 4px; cursor: default; }
.m2-slot-act .btn.on { border-color: var(--accent); color: var(--accent); }
.m2-warn { display: flex; gap: 4px; align-items: center; width: 100%; font-size: 12px; color: var(--warn); }
.m2-rej summary { cursor: pointer; font-weight: 500; }
.m2-rej-row { display: flex; flex-direction: column; gap: 2px; padding: 8px 0; border-bottom: 1px dashed var(--line); cursor: pointer; font-size: 13px; }
@media (max-width: 720px) { .m2-fr { flex-direction: column; gap: 2px; } .m2-fl { padding-top: 0; } .m2-acts li { flex-direction: column; } .m2-act-meta { max-width: none; justify-content: flex-start; } }
/* ---------- 番茄热榜 ---------- */
.rk .room-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; }
.rk-scrape { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; min-width: 180px; flex-shrink: 0; }
.rk-prog { width: 220px; }
.rk-bar { margin: 4px 0 6px; flex-wrap: wrap; }
.rk-mt { margin-top: 14px; }
.rk-sort { font-size: 12px; color: var(--ink-3); margin-bottom: 10px; }
.rk-table-wrap { overflow-x: auto; }
.rk-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.rk-table th { text-align: left; font-weight: 500; color: var(--ink-3); font-size: 12px; padding: 6px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.rk-table td { padding: 7px 8px; border-bottom: 1px dashed var(--line); vertical-align: middle; white-space: nowrap; }
.rk-table td.rk-top { white-space: normal; max-width: 220px; }
.rk-table b.ok { color: var(--ok); } .rk-table b.warn { color: var(--warn); }
.rk-sharecell { min-width: 120px; font-variant-numeric: tabular-nums; }
.rk-share { height: 6px; background: var(--bg-2); border-radius: 3px; overflow: hidden; margin-bottom: 3px; }
.rk-share i { display: block; height: 100%; background: var(--accent); }
.rk-share.fresh i { background: var(--ok); }
.rk-trend { display: inline-flex; align-items: center; font-size: 11px; margin-left: 6px; }
.rk-trend.up { color: var(--ok); } .rk-trend.down { color: var(--err, #c44); }
.rk-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.rk-tagrow { grid-template-columns: 90px 1fr 44px 50px; }
.rk-rise { display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.rk-rise-row { display: grid; grid-template-columns: 1fr auto 52px; gap: 10px; padding: 3px 0; border-bottom: 1px dashed var(--line); }
.rk-rise-row .ok, .ok { color: var(--ok); }
.rk-fresh-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.rk-fresh { padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--bg); font-size: 13px; display: flex; flex-direction: column; gap: 4px; }
.rk-fresh-b { display: flex; gap: 6px; align-items: baseline; cursor: pointer; }
.rk-fresh-b:hover .rk-ft { color: var(--accent); }
.rk-ft { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rk-no { display: inline-block; min-width: 18px; color: var(--ink-3); font-variant-numeric: tabular-nums; font-size: 12px; }
.rk-ai { background: var(--surface); border: 1px solid var(--accent-soft); border-left: 3px solid var(--accent); border-radius: var(--r-l); padding: 16px 20px; margin: 6px 0 14px; }
.rk-ai.empty { display: flex; gap: 10px; align-items: flex-start; border-left-color: var(--line); }
.rk-ai-sum { font-size: 15.5px; line-height: 1.85; margin: 8px 0 10px; }
.rk-ai-secs { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.rk-ai-sec h4, .rk-ideas h4 { font-size: 13.5px; margin-bottom: 4px; }
.rk-ai-sec p { font-size: 13px; line-height: 1.75; color: var(--ink-2); margin: 2px 0; }
.rk-ideas { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.rk-idea { padding: 8px 12px; background: var(--bg); border-radius: var(--r-s); display: flex; flex-direction: column; gap: 3px; line-height: 1.7; }
.rk-idea .tag { margin-left: 4px; }
.rk-tagf { align-items: center; }
.rk-books { display: flex; flex-direction: column; gap: 6px; }
.rk-book { display: flex; gap: 12px; padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); cursor: pointer; }
.rk-book:hover { border-color: var(--accent); }
.rk-pos { flex: 0 0 30px; font-size: 18px; font-weight: 600; color: var(--ink-3); text-align: center; font-variant-numeric: tabular-nums; }
.rk-pos.top { color: var(--accent); }
.rk-book-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.rk-abs { font-size: 13px; color: var(--ink-2); line-height: 1.65; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rk-book-num { flex: 0 0 110px; display: flex; flex-direction: column; align-items: flex-end; font-size: 12px; gap: 1px; }
.rk-book-num b { font-size: 15px; }
.rk-bd { display: flex; flex-direction: column; gap: 10px; }
.rk-bd-abs { white-space: pre-wrap; line-height: 1.85; font-size: 14px; }
.rk-seen { display: flex; flex-wrap: wrap; gap: 6px; }
.rk-catcard { margin-top: 6px; padding: 8px 12px; background: var(--bg); border-radius: var(--r-s); }
.rk-pack { margin-top: 12px; } .rk-pack summary { cursor: pointer; font-size: 13px; color: var(--ink-3); }
.rk-pack .pre { max-height: 420px; }
.rk-plans { display: grid; grid-template-columns: 260px 1fr; gap: 18px; align-items: start; }
.rk-plan-list { display: flex; flex-direction: column; gap: 6px; position: sticky; top: 12px; }
.rk-plan-item { display: flex; flex-direction: column; gap: 2px; text-align: left; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.rk-plan-item.on { border-color: var(--accent); box-shadow: var(--shadow-s); }
.rk-plan-main { min-width: 0; }
.rk-res-title { font-size: 26px; }
.rk-logline { font-size: 16px; line-height: 1.8; margin: 12px 0 8px; }
.rk-blurb { white-space: pre-wrap; line-height: 1.85; font-size: 14px; color: var(--ink-2); background: var(--bg); padding: 12px 14px; border-radius: var(--r-s); }
.rk-ul { padding-left: 18px; display: flex; flex-direction: column; gap: 5px; line-height: 1.75; font-size: 13.5px; }
.rk-kv { display: grid; grid-template-columns: 70px 1fr; gap: 10px; padding: 6px 0; border-bottom: 1px dashed var(--line); }
.rk-kv span { color: var(--ink-3); font-size: 12.5px; padding-top: 3px; }
.rk-kv p { line-height: 1.8; font-size: 14px; margin: 0; }
.rk-chars { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.rk-char { padding: 10px 12px; background: var(--bg); border-radius: var(--r-s); line-height: 1.7; }
.rk-acts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.rk-act { padding: 10px 12px; background: var(--bg); border-radius: var(--r-s); line-height: 1.7; display: flex; flex-direction: column; gap: 2px; }
.rk-vols { padding-left: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; line-height: 1.75; font-size: 14px; }
.rk-vols li { padding-left: 12px; border-left: 2px solid var(--accent-soft); }
.rk-chs { display: flex; flex-direction: column; gap: 6px; }
.rk-ch { display: flex; gap: 10px; padding: 6px 0; border-bottom: 1px dashed var(--line); line-height: 1.7; }
.rk-ch.gold .rk-no { color: var(--accent); font-weight: 600; }
.rk-hook { color: var(--accent); }
@media (max-width: 860px) { .rk-grid2, .rk-plans, .rk-acts { grid-template-columns: 1fr; } .rk .room-head { flex-direction: column; } .rk-scrape { align-items: flex-start; } .rk-plan-list { position: static; } }
@media (max-width: 600px) { .rk-book-num { flex-basis: 70px; } .rk-abs { -webkit-line-clamp: 3; } }
/* ---------- 热榜 · AI 灵感 ---------- */
.rk-insp { display: flex; flex-direction: column; gap: 10px; }
.rk-insp-intro { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); line-height: 1.7; }
.rk-insp-intro svg { color: var(--accent); flex-shrink: 0; margin-top: 2px; }
.rk-insp-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 18px; align-items: start; }
.rk-insp-side { position: sticky; top: 12px; }
.rk-insp-btns { display: flex; flex-direction: column; gap: 6px; margin: 8px 0; }
.rk-insp-pre { max-height: 460px; overflow: auto; white-space: pre-wrap; font-size: 12px; margin-top: 8px; }
.rk-insp-cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.rk-insp-cat { text-align: left; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); display: flex; flex-direction: column; gap: 4px; cursor: pointer; font: inherit; color: inherit; }
.rk-insp-cat:hover { border-color: var(--accent); }
.rk-insp-verdict { font-size: 13px; line-height: 1.7; color: var(--ink-2); }
.rk-insp-card { display: flex; flex-direction: column; gap: 12px; }
.rk-insp-two { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.rk-insp-block { padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.rk-insp-block h4 { font-size: 13.5px; margin-bottom: 4px; }
.rk-insp-block ul { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; }
.rk-insp-block li { font-size: 13px; line-height: 1.75; color: var(--ink-2); }
.rk-ideas h4 svg { vertical-align: -2px; }
@media (max-width: 900px) { .rk-insp-grid { grid-template-columns: 1fr; } .rk-insp-side { position: static; } }
.insp-pick { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; border: 1px dashed var(--line); border-radius: var(--r); }
.insp-pick label { align-items: center; font-size: 13px; cursor: pointer; }
.insp-pick select { width: 100%; }
.rk-feed-opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px 18px; }
.rk-feed-opts .input { width: 100%; }
/* ---------- 批阅 / 批注 ---------- */
.review-toggle { position: relative; }
.review-toggle .badge { font-style: normal; font-size: 11px; min-width: 17px; height: 17px; line-height: 17px; padding: 0 4px; border-radius: 9px; background: var(--accent); color: var(--accent-ink); text-align: center; margin-left: 2px; }
.review-tip { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; color: var(--ink-2); background: var(--warn-soft); border-radius: var(--r-s); padding: 8px 12px; margin: 6px 0 16px; font-family: var(--sans); }
.review-wrap { position: relative; }
.review-text { white-space: pre-wrap; word-break: break-word; font-family: var(--serif); font-size: var(--fs, 19px); line-height: 2.05; letter-spacing: .02em; color: var(--ink); min-height: 50vh; cursor: text; padding-top: 6px; }
.review-text::selection, .review-text *::selection { background: color-mix(in srgb, var(--accent) 30%, transparent); }
mark.nm { color: inherit; background: color-mix(in srgb, var(--warn) 26%, transparent); border-bottom: 2px solid var(--warn); border-radius: 2px; cursor: pointer; padding: 0 1px; transition: background .2s; }
mark.nm.sev-must { background: color-mix(in srgb, var(--err) 18%, transparent); border-bottom-color: var(--err); }
mark.nm.sev-maybe { background: color-mix(in srgb, var(--blue) 14%, transparent); border-bottom: 2px dashed var(--blue); }
mark.nm.praise { background: color-mix(in srgb, var(--ok) 18%, transparent); border-bottom-color: var(--ok); }
mark.nm.done { background: transparent; border-bottom-style: dotted; }
mark.nm.on { outline: 2px solid var(--accent); outline-offset: 1px; }
mark.nm.flash { animation: nmflash 1.2s ease-out; }
@keyframes nmflash { 0%, 40% { background: color-mix(in srgb, var(--accent) 45%, transparent); } }
.note-form { display: flex; flex-direction: column; gap: 8px; padding: 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--raised); font-family: var(--sans); font-size: 13px; }
.note-form.floating { position: absolute; z-index: 40; width: 340px; max-width: 92vw; box-shadow: var(--shadow-l); animation: pop .15s ease-out; }
.nf-head { display: flex; align-items: center; justify-content: space-between; }
.nf-quote { color: var(--ink-2); background: var(--bg-2); border-radius: var(--r-s); padding: 6px 8px; font-family: var(--serif); line-height: 1.6; }
.chip-row { display: flex; flex-wrap: wrap; gap: 5px; }
.chip-row .chip { padding: 3px 9px; font-size: 12px; }
.chip.good.on { background: var(--ok); border-color: var(--ok); }
.callout.tight { padding: 9px 11px; font-size: 12.5px; margin-bottom: 0; align-items: flex-start; line-height: 1.6; }
.note-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.note { border: 1px solid var(--line); border-left: 3px solid var(--warn); border-radius: var(--r-s); padding: 10px 11px; background: var(--surface); display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.note.sev-must { border-left-color: var(--err); }
.note.sev-maybe { border-left-color: var(--blue); }
.note.praise { border-left-color: var(--ok); }
.note.on { box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 45%, transparent); }
.note.done { opacity: .62; }
.note-head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 12px; }
.note-no { font-family: var(--mono); color: var(--ink-3); }
.sev { font-size: 11px; padding: 1px 6px; border-radius: 9px; background: var(--warn-soft); color: var(--warn); }
.sev.must { background: var(--err-soft); color: var(--err); }
.sev.maybe { background: var(--blue-soft); color: var(--blue); }
.note-st { font-size: 11px; color: var(--ink-3); }
.note-st.fixed { color: var(--ok); }
.note-st.open { color: var(--accent); }
.note-head .muted { margin-left: auto; }
.note-quote { text-align: left; background: var(--bg-2); border: 0; border-radius: 5px; padding: 5px 8px; font-family: var(--serif); color: var(--ink-2); line-height: 1.6; cursor: pointer; font-size: 13px; }
.note-quote:hover { background: var(--accent-soft); }
.note-quote.general { cursor: default; font-family: var(--sans); font-size: 12px; color: var(--ink-3); }
.note-quote em { display: block; font-style: normal; font-size: 11px; color: var(--err); font-family: var(--sans); }
.note-body { color: var(--ink); line-height: 1.65; white-space: pre-wrap; }
.note-sug, .note-reply { line-height: 1.6; white-space: pre-wrap; color: var(--ink-2); }
.note-sug span, .note-reply span { display: inline-block; font-size: 11px; padding: 0 6px; margin-right: 6px; border-radius: 4px; background: var(--blue-soft); color: var(--blue); }
.note-reply span { background: var(--ok-soft); color: var(--ok); }
.note-reply { background: color-mix(in srgb, var(--ok-soft) 50%, transparent); border-radius: 5px; padding: 5px 8px; font-size: 12.5px; }
.note-actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.link-btn.danger { color: var(--err); margin-left: auto; }
.score-grid { display: flex; flex-direction: column; gap: 6px; }
.score-row { display: grid; grid-template-columns: 84px 1fr 56px; align-items: center; font-size: 13px; gap: 8px; }
.score-row em { font-style: normal; font-size: 12px; text-align: right; color: var(--ink-2); }
.score-pick { display: inline-flex; gap: 4px; }
.score-pick button { width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--line-2); background: transparent; cursor: pointer; padding: 0; }
.score-pick button.on { background: var(--accent); border-color: var(--accent); }
.review-history { font-size: 12.5px; color: var(--ink-2); }
.review-history summary { cursor: pointer; color: var(--ink-3); }
.rh-item { border-top: 1px dashed var(--line); padding: 7px 0; display: flex; flex-direction: column; gap: 3px; line-height: 1.55; }
.note-warn { font-size: 12.5px; padding: 8px 10px; border-radius: 8px; background: var(--warn-soft); color: var(--warn); }
.panel-stack .chip-row .tag { padding: 4px 10px; font-size: 12.5px; }
/* ============================================================
精修层 v2:统一手感、焦点、动效、移动端
============================================================ */
:root {
--ease: cubic-bezier(.2, .7, .2, 1);
--ring: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent);
--hair: color-mix(in srgb, var(--ink) 7%, transparent);
}
body { font-feature-settings: "kern"; text-size-adjust: 100%; -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
h1, h2, h3, .page-title, .room-title { text-wrap: balance; }
.page-sub, .empty-body, .confirm-body { text-wrap: pretty; }
@supports (-moz-appearance: none) { * { scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; } }
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb { background-color: color-mix(in srgb, var(--ink) 16%, transparent); }
::-webkit-scrollbar-thumb:hover { background-color: color-mix(in srgb, var(--ink) 30%, transparent); }
/* 焦点:键盘可见的柔和光环 */
:focus-visible { outline: 2px solid color-mix(in srgb, var(--accent) 70%, transparent); outline-offset: 2px; }
.btn:focus-visible, .icon-btn:focus-visible, .chip:focus-visible, .seg button:focus-visible, .tab:focus-visible, .task:focus-visible, .rail-item:focus-visible, .binder-ch:focus-visible, .binder-link:focus-visible {
outline: none; box-shadow: var(--ring);
}
/* 按钮 */
.btn, .icon-btn, .chip, .seg button, .task, .basket-btn, .pair, .motif-tile, .quick-links button, .binder-ch, .binder-link, .rail-item {
transition: background-color .18s var(--ease), border-color .18s var(--ease), color .18s var(--ease), box-shadow .18s var(--ease), transform .12s var(--ease), opacity .18s;
}
.btn:active:not(:disabled), .icon-btn:active:not(:disabled), .chip:active, .basket-btn:active { transform: translateY(1px) scale(.985); }
.btn.primary { background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 92%, #fff), var(--accent)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16), 0 1px 2px color-mix(in srgb, var(--accent) 35%, transparent), 0 4px 12px -6px color-mix(in srgb, var(--accent) 60%, transparent); border-color: color-mix(in srgb, var(--accent-2) 60%, transparent); }
.btn.primary:hover:not(:disabled) { background: linear-gradient(180deg, var(--accent), var(--accent-2)); }
[data-theme="night"] .btn.primary { background: var(--accent); border-color: transparent; box-shadow: 0 4px 14px -6px color-mix(in srgb, var(--accent) 60%, transparent); }
[data-theme="night"] .btn.primary:hover:not(:disabled) { background: var(--accent-2); }
.btn.ghost { box-shadow: 0 1px 0 var(--hair); }
.btn.ghost:hover:not(:disabled) { box-shadow: 0 1px 2px var(--hair), 0 2px 6px -3px var(--hair); }
.btn svg, .icon-btn svg { flex: none; }
.icon-btn.on:hover:not(:disabled) { color: var(--accent); background: color-mix(in srgb, var(--accent) 16%, transparent); }
/* 输入 */
.input, .textarea { background-color: var(--paper); }
.input:hover:not(:focus):not(:disabled):not(.bare), .textarea:hover:not(:focus):not(:disabled) { border-color: var(--ink-4); }
.input:focus, .textarea:focus { box-shadow: var(--ring); }
.input:disabled, .textarea:disabled { opacity: .6; cursor: not-allowed; }
.input[type=number]::-webkit-inner-spin-button { opacity: .5; }
.search-row { transition: border-color .18s, box-shadow .18s; }
.search-row:hover { border-color: var(--ink-4); }
.search-row:focus-within { box-shadow: var(--ring); }
.search-row .input.bare { height: 100%; align-self: stretch; }
.search-row svg { flex: none; }
/* 复选框:自绘 */
.check input, input[type=checkbox].ck {
appearance: none; -webkit-appearance: none; width: 16px; height: 16px; margin: 0; flex: none; border-radius: 4.5px;
border: 1.5px solid var(--line-2); background: var(--paper) center / 11px 11px no-repeat; cursor: pointer;
transition: background-color .15s, border-color .15s, box-shadow .15s;
}
.check:hover input:not(:checked) { border-color: var(--ink-4); }
.check input:checked, input[type=checkbox].ck:checked {
background-color: var(--accent); border-color: var(--accent);
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2.5 6.2l2.3 2.3 4.7-5'/%3E%3C/svg%3E");
}
.check input:focus-visible { outline: none; box-shadow: var(--ring); }
/* 标签页:下划线动画 */
.tab { position: relative; border-bottom-color: transparent !important; }
.tab::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: 0; height: 2px; border-radius: 2px; background: var(--accent); transform: scaleX(0); transition: transform .22s var(--ease); }
.tab.on::after { transform: scaleX(1); }
.tab.on .tab-count { background: var(--accent-soft); color: var(--accent); }
.seg { box-shadow: inset 0 0 0 1px var(--hair); }
.seg button:hover:not(.on) { color: var(--ink); }
/* 侧栏标签:窄时只留文字 */
.inspector { container: insp / inline-size; }
.inspector-tabs { gap: 0; }
.inspector-tabs .tab { flex: 1 1 auto; min-width: 0; padding: 11px 4px 10px; }
.inspector-tabs .tab::after { left: 6px; right: 6px; }
@container insp (max-width: 372px) {
.inspector-tabs .tab > svg { display: none; }
}
/* 小标签 / 筹码 */
.chip.on { box-shadow: 0 2px 8px -4px color-mix(in srgb, var(--ink) 60%, transparent); }
.tag { border-radius: 6px; }
/* 提示条 */
.toasts { bottom: calc(26px + env(safe-area-inset-bottom)); }
.toast { padding: 10px 18px; font-weight: 500; letter-spacing: .01em; backdrop-filter: blur(8px); box-shadow: 0 10px 30px -10px rgba(0, 0, 0, .35), 0 0 0 1px rgba(255, 255, 255, .06) inset; animation: toast-in .32s var(--ease); }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px) scale(.96); } }
/* 弹窗 / 抽屉 / 浮层 */
.overlay { background: rgba(32, 24, 16, .32); backdrop-filter: blur(5px) saturate(1.1); -webkit-backdrop-filter: blur(5px) saturate(1.1); }
.modal { border-radius: 16px; animation: pop .24s var(--ease); }
.modal-head { padding: 18px 16px 6px 22px; }
.modal-foot { background: color-mix(in srgb, var(--bg) 50%, var(--surface)); border-radius: 0 0 16px 16px; }
.drawer { animation: slide .28s var(--ease); }
.popover { border-radius: 12px; animation: pop .18s var(--ease); }
@media (max-width: 600px) {
.overlay:not(.overlay-drawer) { align-items: end; padding: 0; place-items: end stretch; }
.modal { max-width: none !important; border-radius: 18px 18px 0 0; max-height: 92dvh; animation: sheet .3s var(--ease); padding-bottom: env(safe-area-inset-bottom); }
.modal::before { content: ""; display: block; width: 38px; height: 4px; border-radius: 4px; background: var(--line-2); margin: 8px auto -4px; flex: none; }
.modal-foot { border-radius: 0; flex-wrap: wrap; }
.modal-foot .btn { flex: 1 1 auto; }
}
@keyframes sheet { from { transform: translateY(40px); opacity: 0; } }
/* 导航栏 */
.rail-item { position: relative; }
.rail-item.on::before { content: ""; position: absolute; left: -7px; top: 12px; bottom: 12px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent); }
.rail-brand { transition: transform .2s var(--ease); }
.rail-brand:hover { transform: rotate(-6deg) scale(1.04); }
/* 卡片:统一的轻微抬起 */
.note-card, .sheet, .stat { transition: border-color .18s, box-shadow .18s, transform .18s var(--ease); }
.stat.clickable:hover, .quick-links button:hover { transform: translateY(-1px); box-shadow: var(--shadow-s); }
.task { transition: border-color .15s, background-color .15s, box-shadow .15s; }
.task.on { box-shadow: 0 0 0 1px var(--accent) inset; }
/* 目录栏 */
.binder-ch, .binder-link { min-height: 32px; }
.binder-ch.on, .binder-link.on { box-shadow: inset 2px 0 0 var(--accent); }
.binder-peek { transition: color .15s, box-shadow .15s, transform .12s; }
.binder-peek:hover { box-shadow: var(--shadow); }
/* 保存条 */
.savebar { backdrop-filter: blur(10px); background: color-mix(in srgb, var(--raised) 88%, transparent); max-width: calc(100% - 8px); }
/* 移动端点按目标 */
@media (max-width: 760px) {
.check input { width: 19px; height: 19px; background-size: 13px 13px; }
.check { min-height: 30px; }
.search-row { height: 40px; }
.banner .link-btn, .callout .link-btn, .error-note .link-btn { min-height: 30px; padding: 0 4px; }
.icon-btn.sm { width: 32px; height: 32px; }
.btn.small { height: 34px; }
.rail-item.on::before { left: 22%; right: 22%; top: -1px; bottom: auto; width: auto; height: 2px; border-radius: 0 0 2px 2px; }
.savebar { min-width: 0; width: calc(100% - 8px); }
}
@media (prefers-reduced-motion: reduce) {
*, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
.tabs[data-edge="r"] { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 36px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 36px), transparent); }
.tabs[data-edge="l"] { -webkit-mask-image: linear-gradient(90deg, transparent, #000 36px); mask-image: linear-gradient(90deg, transparent, #000 36px); }
.tabs[data-edge="both"] { -webkit-mask-image: linear-gradient(90deg, transparent, #000 36px, #000 calc(100% - 36px), transparent); mask-image: linear-gradient(90deg, transparent, #000 36px, #000 calc(100% - 36px), transparent); }
.tabs { scroll-behavior: smooth; overscroll-behavior-x: contain; }
.score-pick button { transition: background-color .15s, border-color .15s, transform .12s var(--ease); }
.score-pick button:hover { border-color: var(--accent); transform: scale(1.12); }
@media (max-width: 760px) {
.score-pick { gap: 6px; }
.score-pick button { width: 26px; height: 26px; }
.link-btn { min-height: 28px; }
}
/* 平板/手机:侧栏浮层 + 遮罩 */
.panel-scrim { display: none; }
@media (max-width: 1000px) {
.panel-scrim { display: block; position: absolute; inset: 0; background: rgba(30, 22, 14, .22); animation: fade .2s; }
.binder-scrim { z-index: 35; }
.insp-scrim { z-index: 25; }
[data-theme="night"] .panel-scrim { background: rgba(0, 0, 0, .45); }
.binder { animation: slide-l .26s var(--ease); }
.editor.with-inspector .inspector { animation: slide .26s var(--ease); }
}
@keyframes slide-l { from { transform: translateX(-24px); opacity: 0; } }
@media (max-width: 1100px) { .doc-tabs .tab { padding-inline: 10px; } }
/* 列表项与卡片的统一手感 */
.src-item, .src-link, .toc-link, .reader-toc-item, .pick-item, .cand, .ch-card, .preset, .motif-tile, .mini-mat, .ref-card, .basket-item, .post, .disc-item, .genre, .fact, .beat-card, .mat-card, .role-slot, .le-item {
transition: background-color .18s var(--ease), border-color .18s var(--ease), box-shadow .18s var(--ease), transform .18s var(--ease), color .18s;
}
.ch-card:hover, .preset:hover, .mini-mat:hover, .ref-card:hover { box-shadow: var(--shadow-s); }
.le-item:focus-within { border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 8%, transparent); }
.checklist input {
appearance: none; -webkit-appearance: none; border-radius: 50%; border: 1.5px solid var(--line-2); background: var(--paper) center / 11px 11px no-repeat; cursor: pointer; transition: background-color .15s, border-color .15s;
}
.checklist input:checked {
background-color: var(--ok); border-color: var(--ok);
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2.5 6.2l2.3 2.3 4.7-5'/%3E%3C/svg%3E");
}
.checklist label:hover input:not(:checked) { border-color: var(--ok); }
.progress-big i, .bar i, .about-goal i { transition: width .6s var(--ease); }
.loading { color: var(--ink-3); }
.empty-icon { box-shadow: inset 0 0 0 1px var(--hair); }
.empty-title { letter-spacing: .02em; }
kbd { font-family: var(--mono); font-size: 11px; padding: 1px 5px; border-radius: 4px; border: 1px solid var(--line-2); border-bottom-width: 2px; background: var(--paper); color: var(--ink-2); }
.editor-bar .icon-btn { width: 32px; height: 32px; }
/* ---------- 采集室门禁 ---------- */
.vault-wrap { min-height: 100%; display: grid; place-items: center; padding: 28px 18px; }
.vault-card { width: 100%; max-width: 480px; padding: 30px 30px 24px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-l); box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 8px; }
.vault-ico { width: 50px; height: 50px; display: grid; place-items: center; border-radius: 14px; background: var(--err-soft); color: var(--err); margin-bottom: 4px; }
.vault-card h2 { font-family: var(--serif); font-size: 21px; }
.vault-lead { color: var(--ink-2); line-height: 1.75; font-size: 14px; }
.vault-points { margin: 4px 0 8px; padding-left: 18px; color: var(--ink-2); font-size: 13px; line-height: 1.75; }
.vault-points li { margin: 3px 0; }
.vault-label { font-size: 12.5px; color: var(--ink-3); margin-top: 4px; }
.vault-check { display: flex; gap: 8px; align-items: flex-start; font-size: 12.5px; color: var(--ink-3); margin: 6px 0 4px; line-height: 1.5; }
.vault-check input { margin-top: 3px; }
.vault-card .btn { height: 42px; margin-top: 6px; }
.src-link.warn { color: var(--err); }
.vault-log { display: flex; flex-direction: column; max-height: 60vh; overflow: auto; border: 1px solid var(--line); border-radius: var(--r); margin-top: 10px; }
.vl-row { display: grid; grid-template-columns: 96px 1fr auto auto; gap: 10px; align-items: center; padding: 7px 12px; font-size: 12.5px; border-bottom: 1px solid var(--line); }
.vl-row:last-child { border-bottom: 0; }
.vl-ev { display: inline-flex; gap: 5px; align-items: center; font-weight: 600; color: var(--ok); }
.vl-row.ev-denied .vl-ev { color: var(--err); }
.vl-row.ev-setup .vl-ev, .vl-row.ev-change .vl-ev { color: var(--blue); }
.vl-path { font-family: var(--mono); font-size: 11.5px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vl-kind, .vl-t { color: var(--ink-3); white-space: nowrap; }
@media (max-width: 640px) { .vl-row { grid-template-columns: 1fr auto; } .vl-path { grid-column: 1 / -1; order: 3; } .vl-kind { display: none; } }
/* ---------- Markdown 排版(AI 守则 / 热榜原文 / 审查回复) ---------- */
.md { font-size: 14px; line-height: 1.85; color: var(--ink-2); overflow-wrap: anywhere; }
.md > :first-child { margin-top: 0; }
.md h2 { font-family: var(--serif); font-size: 22px; color: var(--ink); margin: 6px 0 12px; }
.md h3 { font-family: var(--serif); font-size: 17px; color: var(--ink); margin: 26px 0 10px; padding-top: 16px; border-top: 1px solid var(--line); }
.md h4 { font-size: 14.5px; color: var(--ink); margin: 18px 0 6px; }
.md h5 { font-size: 13.5px; color: var(--ink); margin: 14px 0 4px; }
.md p { margin: 8px 0; }
.md ul, .md ol { margin: 6px 0 10px; padding-left: 22px; }
.md li { margin: 4px 0; }
.md li > ul { margin: 4px 0; }
.md b { color: var(--ink); }
.md code { font-family: var(--mono); font-size: 12px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 5px; padding: 0 5px; color: var(--ink); word-break: break-all; }
.md blockquote { margin: 10px 0; padding: 10px 14px; border-left: 3px solid var(--accent); background: var(--accent-soft); border-radius: 0 var(--r-s) var(--r-s) 0; color: var(--ink); }
.md hr { border: 0; border-top: 1px dashed var(--line-2); margin: 18px 0; }
.md pre { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r-s); padding: 10px 12px; font-size: 12px; overflow: auto; white-space: pre-wrap; }
.md-table { overflow-x: auto; margin: 10px 0; border: 1px solid var(--line); border-radius: var(--r); }
.md table { border-collapse: collapse; width: 100%; font-size: 13px; }
.md th, .md td { padding: 8px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.md th { background: var(--bg-2); color: var(--ink); font-weight: 600; white-space: nowrap; }
.md tr:last-child td { border-bottom: 0; }
.sheet.doc { padding: 26px 30px; }
.sheet.tight { padding: 16px 18px; }
@media (max-width: 640px) { .sheet.doc { padding: 18px 16px; } }
/* ---------- AI 协作 ---------- */
.stack { display: flex; flex-direction: column; gap: 14px; }
.stack .field + .field { margin-top: 0; }
.agent-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.agent-grid.wide-right { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); }
.agent-grid > .sheet { margin-top: 0; }
@media (max-width: 960px) { .agent-grid, .agent-grid.wide-right { grid-template-columns: 1fr; } }
.bullets.num { list-style: decimal; padding-left: 20px; gap: 8px; }
.bullets.num li { padding-left: 2px; font-size: 13.5px; }
.bullets.num li::before { display: none; }
.textarea.mono { font-family: var(--mono); font-size: 12px; }
.say-ai { display: flex; align-items: center; gap: 10px; padding: 10px 12px; margin: 10px 0; border: 1px dashed color-mix(in srgb, var(--accent) 45%, transparent); background: var(--accent-soft); border-radius: var(--r); color: var(--accent); }
.say-ai > svg { flex: none; }
.say-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.say-label { font-size: 11.5px; letter-spacing: .06em; font-weight: 600; }
.say-body q { color: var(--ink); font-size: 13.5px; line-height: 1.6; quotes: "「" "」"; overflow-wrap: anywhere; }
.say-ai .btn { flex: none; }
.res-badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; background: var(--bg-2); color: var(--ink-3); }
.res-badge.sm { padding: 1px 6px; font-size: 11px; }
.res-pass { background: var(--ok-soft); color: var(--ok); }
.res-warn { background: var(--warn-soft); color: var(--warn); }
.res-fail { background: var(--err-soft); color: var(--err); }
.t-err { color: var(--err); } .t-warn { color: var(--warn); }
.audit-list { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.audit { border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); overflow: hidden; }
.audit.st-fail { border-left: 3px solid var(--err); } .audit.st-warn { border-left: 3px solid var(--warn); } .audit.st-pass { border-left: 3px solid var(--ok); }
.audit-head { width: 100%; display: flex; align-items: center; gap: 10px; padding: 11px 14px; text-align: left; color: var(--ink-3); }
.audit-head:hover { background: var(--bg-2); }
.audit-title { color: var(--ink); font-size: 14px; flex: 1; min-width: 0; }
.audit-meta { display: inline-flex; gap: 10px; align-items: center; font-size: 12px; flex-wrap: wrap; justify-content: flex-end; }
.audit-meta em { font-style: normal; }
.audit-body { padding: 4px 16px 14px; border-top: 1px solid var(--line); }
.audit-sum { margin: 10px 0; font-size: 13.5px; }
.audit-items { list-style: none; display: flex; flex-direction: column; gap: 8px; margin: 8px 0; padding: 0; }
.audit-items li { padding: 10px 12px; border-radius: var(--r-s); background: var(--bg-2); }
.audit-items li.ai-fail { background: var(--err-soft); } .audit-items li.ai-warn { background: var(--warn-soft); }
.ai-top { display: flex; align-items: flex-start; gap: 8px; }
.ai-t { font-size: 13.5px; color: var(--ink); line-height: 1.6; }
.ai-t code { font-family: var(--mono); font-size: 11px; color: var(--ink-3); margin-right: 6px; }
.ai-note, .ai-fix { margin: 6px 0 0; font-size: 13px; line-height: 1.7; color: var(--ink-2); }
.ai-quote { margin: 6px 0 0; padding: 4px 10px; border-left: 2px solid var(--line-2); font-family: var(--serif); font-size: 13px; color: var(--ink-2); }
.audit-foot { margin-top: 8px; }
@media (max-width: 640px) { .audit-head { flex-wrap: wrap; } .audit-meta { width: 100%; justify-content: flex-start; } }
.token-box { display: flex; flex-direction: column; gap: 8px; padding: 14px; margin: 12px 0 18px; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--paper); }
.tb-label { display: inline-flex; gap: 6px; align-items: center; font-weight: 600; font-size: 13px; color: var(--ink); }
.token-box .row.gap .input { flex: 1; min-width: 0; }
@media (max-width: 520px) { .token-box .row.gap { flex-direction: column; align-items: stretch; } }
.ask-log { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.ask { border: 1px solid var(--line); border-radius: var(--r); padding: 4px 14px 12px; background: var(--paper); }
.ask.bad { border-color: color-mix(in srgb, var(--err) 35%, transparent); }
.ask-head { width: 100%; display: flex; align-items: center; gap: 8px; padding: 8px 0 4px; text-align: left; color: var(--ink-3); }
.ask-topic { font-weight: 600; color: var(--ink); flex: none; }
.ask-meta { margin-left: auto; font-size: 12px; white-space: nowrap; }
.ask-q { font-size: 13px; color: var(--ink-2); line-height: 1.7; margin: 2px 0 6px; white-space: pre-wrap; }
.ask-reply, .ask-resp { margin-top: 10px; padding: 12px 14px; background: var(--bg-2); border-radius: var(--r-s); }
.ask-resp { background: var(--ok-soft); }
.ask-label { font-size: 11.5px; font-weight: 600; letter-spacing: .05em; color: var(--ink-3); margin-bottom: 4px; }
.text-locked { display: flex; gap: 8px; align-items: center; padding: 12px 14px; border-radius: var(--r); background: var(--bg-2); color: var(--ink-3); font-size: 13px; line-height: 1.6; }
.ck-sum { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 14px; margin: 12px 0; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); font-size: 13.5px; color: var(--ink-2); }
.ck-n { display: inline-flex; gap: 12px; margin-left: auto; font-size: 12.5px; }
.ck-n em { font-style: normal; }
.checklist.ai li { padding: 9px 2px; }
.ck-row { display: flex; gap: 10px; align-items: flex-start; }
.ck-row .res-badge { margin-top: 3px; flex: none; min-width: 58px; justify-content: center; }
.ck-t { flex: 1; font-size: 14px; line-height: 1.7; color: var(--ink); }
.ck-ai { margin: 6px 0 2px 68px; padding: 8px 12px; border-radius: var(--r-s); background: var(--bg-2); font-size: 13px; line-height: 1.7; color: var(--ink-2); }
.ck-ai p { margin: 2px 0; }
.ck-ai blockquote { margin: 4px 0; padding-left: 10px; border-left: 2px solid var(--line-2); font-family: var(--serif); }
.checklist.ai li.ck-fail .ck-ai { background: var(--err-soft); }
.checklist.ai li.ck-warn .ck-ai { background: var(--warn-soft); }
@media (max-width: 640px) { .ck-ai { margin-left: 0; } .ck-n { margin-left: 0; } }
.agent-status { display: flex; flex-direction: column; gap: 8px; padding: 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--paper); }
.rk-insp-md { max-height: 72vh; overflow: auto; margin-top: 8px; padding-right: 6px; }
.rk-insp-md .md { font-size: 13.5px; }
.rk-insp-md .md ol li { margin: 6px 0; line-height: 1.75; }
.rk-insp-md .md ol li::marker { color: var(--accent); font-weight: 700; }
/* 窄屏:页签可横向滑动,不挤压 */
@media (max-width: 640px) {
.room-tabs { max-width: 100%; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.room-tabs::-webkit-scrollbar { display: none; }
.room-tabs > * { flex: 0 0 auto; white-space: nowrap; }
}
/* 协作 AI */
.howto { margin: 2px 0 4px; padding-left: 20px; font-size: 12.5px; line-height: 1.8; color: var(--ink-2); }
.howto code { font-size: 11.5px; padding: 1px 5px; border-radius: 4px; background: var(--bg-2); word-break: break-all; }
.chk-ok { display: flex; gap: 8px; align-items: flex-start; font-size: 12.5px; line-height: 1.6; color: var(--ok); padding: 8px 10px; border-radius: var(--r-s); background: var(--ok-soft); }
.chk-ok svg { flex: none; margin-top: 3px; }
.ask.running { border-color: color-mix(in srgb, var(--accent) 40%, transparent); }
.ask-live { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; margin-top: 6px; }
.ask-partial { margin: 0; font-size: 12.5px; line-height: 1.7; color: var(--ink-3); white-space: pre-wrap; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.ask-foot { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 10px; font-size: 12px; color: var(--ink-3); }
.ask-foot a { display: inline-flex; align-items: center; gap: 4px; color: var(--accent); }
.ask-head .tag .spinner, .ask-head .tag svg { vertical-align: -2px; }
/* 协作 AI:服务器自动续期状态 */
.keep-box { border: 1px solid var(--line); border-radius: var(--r-s); padding: 8px 10px; display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.keep-box.bad { border-color: rgba(220, 90, 60, .45); }
.keep-head { display: flex; align-items: flex-start; gap: 8px; flex-wrap: wrap; line-height: 1.6; }
.keep-meta { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
/* 章节旁栏:与协作 AI 的分歧 */
.peer-panel .small-note svg { vertical-align: -2px; }
.peer-sum { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; font-size: 13px; }
.peer-group { display: flex; flex-direction: column; gap: 8px; }
.peer-gtitle { display: flex; align-items: center; gap: 4px; background: none; border: 0; padding: 4px 0; font-size: 13px; font-weight: 600; color: var(--ink-2); cursor: pointer; text-align: left; }
.peer-gtitle em { font-style: normal; font-weight: 400; color: var(--ink-3); margin-left: 4px; }
.peer-card { border: 1px solid var(--line); border-left-width: 3px; border-radius: var(--r-s); padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; font-size: 13px; line-height: 1.7; }
.peer-card.v-disagree { border-left-color: var(--err); }
.peer-card.v-partial { border-left-color: var(--warn); }
.peer-card.v-agree { border-left-color: var(--ok); }
.peer-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.peer-topic { font-size: 13px; }
.peer-row { display: grid; grid-template-columns: 64px 1fr; gap: 8px; }
.peer-row p { margin: 0; white-space: pre-wrap; }
.peer-who { font-size: 12px; color: var(--ink-3); padding-top: 2px; }
.peer-row.mine .peer-who, .peer-row.final .peer-who { color: var(--accent); }
.peer-row.final p { font-weight: 500; }
.peer-foot { font-size: 11.5px; }
@media (max-width: 640px) { .peer-row { grid-template-columns: 1fr; gap: 2px; } }
/* ---------- 通读:隐藏侧边栏 ---------- */
.shell.reading .rail { display: none !important; }
.shell.reading .stage { height: 100%; }
.reader { background: var(--rbg, var(--paper)); color: var(--rink, var(--ink)); }
.reader.themed .reader-bar { background: color-mix(in srgb, var(--rbg) 92%, var(--rink) 8%); border-bottom-color: color-mix(in srgb, var(--rink) 14%, transparent); color: var(--rink); }
.reader.themed .reader-bar .btn.ghost, .reader.themed .reader-where, .reader.themed .reader-where em { color: color-mix(in srgb, var(--rink) 80%, transparent); }
.reader.themed .reader-page, .reader.themed .reader-title { color: var(--rink); }
.reader.themed .reader-num, .reader.themed .reader-meta, .reader.themed .reader-next-hint { color: color-mix(in srgb, var(--rink) 55%, transparent); }
.reader.themed .reader-nav { border-top-color: color-mix(in srgb, var(--rink) 14%, transparent); }
.reader.themed .reader-nav .btn.ghost { color: var(--rink); border-color: color-mix(in srgb, var(--rink) 20%, transparent); background: transparent; }
.reader.dark .reader-toc, .reader.dark .reader-pop { color-scheme: dark; }
.reader-page { position: relative; font-family: var(--rff, var(--serif)); }
.reader-title { font-family: var(--rff, var(--serif)); }
.reader-body p { line-height: var(--rlh, 1.95); }
.reader-page.reviewing .reader-body { cursor: text; }
.reader-page .review-tip { font-family: var(--sans); margin: -14px 0 22px; }
.reader-bar .btn.on { background: var(--bg-2); }
.reader-bar .badge { margin-left: 4px; }
.reader-pop { position: absolute; z-index: 30; top: 52px; right: 12px; width: min(380px, calc(100% - 20px)); background: var(--raised); color: var(--ink); border: 1px solid var(--line); border-radius: var(--r-l); box-shadow: var(--shadow-l); }
.rs-row { display: grid; grid-template-columns: 44px 1fr; align-items: center; gap: 10px; padding: 10px 14px; font-size: 13px; }
.rs-row > span { color: var(--ink-3); }
.rs-ctl { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.rs-swatch { min-width: 52px; padding: 6px 8px; border-radius: 8px; border: 1px solid var(--line); font-size: 12px; }
.rs-swatch.auto { background: var(--paper); color: var(--ink); }
.rs-swatch.on { outline: 2px solid var(--accent); outline-offset: 1px; }
.rt-read { font-size: 11px; color: var(--accent); flex: none; }
.rt-read.done { color: var(--ink-4); }
.reader-note-pop { width: 330px; font-family: var(--sans); font-size: 13px; line-height: 1.7; }
.reader-note-pop .rnp-p { margin: 0; white-space: pre-wrap; display: block; }
.reader-note-pop .nf-head b { display: inline-flex; align-items: center; gap: 4px; }
.reader-body mark.nm, .reader-body mark.dm { cursor: pointer; }
.dm-legend mark { font-size: inherit; }
/* ---------- 分歧标注(只在屏幕上显示,复制 / 发布不带) ---------- */
mark.dm { color: inherit; background: color-mix(in srgb, #f2c230 34%, transparent); border-radius: 2px; padding: 0; }
mark.nm.dm { box-shadow: inset 0 -0.5em 0 color-mix(in srgb, #f2c230 30%, transparent); }
mark.dispute-demo { background: color-mix(in srgb, #f2c230 34%, transparent); color: inherit; border-radius: 2px; padding: 0 2px; }
.paper-text-wrap { position: relative; flex: 1 0 auto; display: flex; flex-direction: column; }
.paper-text-wrap .paper-text { position: relative; z-index: 1; }
.paper-mirror {
position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden;
white-space: pre-wrap; overflow-wrap: break-word; word-wrap: break-word;
font-family: var(--serif); font-size: var(--fs); line-height: 2.05; letter-spacing: .02em; padding: 18px 0 0; color: transparent;
}
.paper-mirror mark.dm { color: transparent; }
.dispute-tip { margin-top: 14px; font-size: 12px; color: var(--ink-3); text-align: center; font-family: var(--sans); }
.dispute-tip .link-btn { margin-left: 6px; }
/* ---------- 稿纸看到哪儿 ---------- */
.eb-progress { position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; pointer-events: none; }
.eb-progress i { display: block; height: 100%; background: color-mix(in srgb, var(--accent) 70%, transparent); transition: width .1s linear; }
/* ---------- 分歧:作者拍板 ---------- */
.peer-state { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; padding: 1px 8px; border-radius: 999px; margin-left: auto; }
.peer-state.todo { background: color-mix(in srgb, var(--warn) 16%, transparent); color: var(--warn); font-weight: 600; }
.peer-state.wait { background: var(--bg-2); color: var(--ink-3); }
.peer-quote { font-family: var(--serif); font-size: 13px; padding: 6px 10px; border-radius: 6px; background: color-mix(in srgb, #f2c230 18%, transparent); color: var(--ink-2); }
.peer-author { border-top: 1px dashed var(--line); padding-top: 8px; }
.peer-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 12.5px; }
.peer-actions .muted:first-child { margin-right: 2px; }
.peer-row.author .peer-who { color: var(--warn); }
.peer-card.decided { background: color-mix(in srgb, var(--bg-2) 50%, transparent); }
details.older summary { cursor: pointer; padding: 4px 0; }
details.older[open] { display: flex; flex-direction: column; gap: 8px; }
/* 阅读进度:接着看 / 目录里每章看到哪儿 / 回到原处提示 */
.continue-card { display: flex; flex-direction: column; gap: 2px; margin: 0 10px 8px; padding: 9px 12px 10px; border-radius: var(--r); text-align: left; background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent); position: relative; overflow: hidden; }
.continue-card:hover { border-color: var(--accent); }
.continue-card .cc-k { font-size: 11.5px; color: var(--accent); font-weight: 600; display: flex; gap: 8px; align-items: baseline; }
.continue-card .cc-k em { font-style: normal; font-weight: 400; color: var(--ink-3); margin-left: auto; }
.continue-card .cc-t { font-family: var(--serif); font-size: 14px; color: var(--ink); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.continue-card .cc-m { font-size: 11.5px; color: var(--ink-3); }
.continue-card .cc-bar { display: block; height: 3px; border-radius: 99px; background: color-mix(in srgb, var(--accent) 15%, transparent); margin-top: 6px; overflow: hidden; }
.continue-card .cc-bar b { display: block; height: 100%; background: var(--accent); border-radius: 99px; }
.continue-card.big { margin: 0; min-width: 240px; flex: 1; max-width: 420px; padding: 12px 16px 13px; }
.continue-card.big .cc-t { font-size: 16px; }
.binder-ch.has-rp { position: relative; }
.binder-ch.has-rp::after { content: ''; position: absolute; left: 30px; bottom: 2px; height: 2px; width: calc(100% - 40px); background: linear-gradient(to right, color-mix(in srgb, var(--accent) 45%, transparent) var(--rp), transparent var(--rp)); border-radius: 99px; pointer-events: none; }
.binder-ch.rp-done .ch-title { color: var(--ink-3); }
.binder-ch.rp-done.on .ch-title { color: var(--accent); }
.binder-ch.rp-done .ch-num::after { content: '✓'; margin-left: 2px; font-size: 9px; color: var(--accent); opacity: .8; }
.resume-pill { position: sticky; top: 60px; z-index: 6; margin: 0 auto -38px; width: max-content; max-width: calc(100% - 24px); display: flex; align-items: center; gap: 10px; padding: 7px 8px 7px 14px; border-radius: 99px; background: var(--ink); color: var(--paper); font-size: 12.5px; box-shadow: var(--shadow-m, 0 6px 20px rgba(0,0,0,.18)); animation: pill-in .25s var(--ease); }
.resume-pill button { color: inherit; opacity: .85; padding: 3px 9px; border-radius: 99px; background: rgba(255,255,255,.14); font-size: 12px; }
.resume-pill button:hover { opacity: 1; background: rgba(255,255,255,.24); }
@keyframes pill-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.paper-next { display: flex; justify-content: center; margin: 18px 0 40px; }
.paper-next .btn { gap: 8px; }
.reader-mark { box-shadow: inset 3px 0 0 var(--accent); background: color-mix(in srgb, var(--accent) 7%, transparent); transition: background 2s, box-shadow 2s; }
.reader-resume { position: absolute; top: 58px; left: 50%; transform: translateX(-50%); margin: 0; animation: none; }
/* ---------- 批阅汇总 / 修改记录 ---------- */
.hub-title { font-family: var(--serif); font-size: 26px; margin: 2px 0 6px; }
.hub-lead { margin: 0 0 16px; font-size: 13.5px; line-height: 1.7; }
.hub-body { margin-top: 18px; display: flex; flex-direction: column; gap: 18px; }
.hub-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.hub-group { display: flex; flex-direction: column; gap: 10px; }
.hub-sub { font-size: 12px; letter-spacing: .08em; color: var(--ink-3); font-weight: 600; }
.hub-ch { display: inline-flex; align-items: center; gap: 8px; background: none; border: 0; padding: 0; font: inherit; font-weight: 600; font-size: 15px; color: var(--ink); cursor: pointer; text-align: left; }
.hub-ch .muted { font-weight: 400; font-size: 12.5px; }
.hub-ch:hover { color: var(--accent); }
.hub-ch.inline { font-size: 14px; }
.hub-note { cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.hub-note:hover, .hub-note:focus-visible { box-shadow: var(--shadow-s); border-color: var(--accent); outline: none; }
.hub-note .note-quote { cursor: pointer; }
.hub-go { margin-left: auto; display: inline-flex; align-items: center; gap: 3px; font-size: 12px; color: var(--accent); opacity: .75; }
.hub-note:hover .hub-go { opacity: 1; }
.change-card { border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.change-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 12.5px; }
.change-hunk { display: flex; flex-direction: column; gap: 2px; font-family: var(--serif); font-size: 14px; line-height: 1.8; }
.change-para { font-family: var(--sans); font-size: 11.5px; color: var(--ink-3); }
/* ---------- 工具栏方形图标按钮(与目录展开按钮同款) ---------- */
.tb-btn { position: relative; flex: none; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 8px; background: var(--surface); border: 1px solid var(--line); color: var(--ink-2); box-shadow: var(--shadow-s); transition: color .15s, background-color .15s, border-color .15s, box-shadow .15s; }
.tb-btn:hover:not(:disabled) { color: var(--ink); box-shadow: var(--shadow); }
.tb-btn.on { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 45%, transparent); background: var(--accent-soft); }
.tb-btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.tb-btn.primary:hover:not(:disabled) { background: var(--accent-2); color: var(--accent-ink); }
.tb-btn:disabled { opacity: .5; cursor: default; }
.tb-badge { position: absolute; top: -6px; right: -6px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; font-style: normal; font-size: 10px; font-weight: 600; line-height: 16px; text-align: center; background: var(--accent); color: var(--accent-ink); box-shadow: 0 0 0 2px var(--bg); }
.tb-btn.on .tb-badge { background: var(--err); color: #fff; }
.tb-dot { position: absolute; top: 4px; right: 4px; width: 7px; height: 7px; border-radius: 50%; background: var(--warn); box-shadow: 0 0 0 2px var(--surface); }
.tb-btn.primary .tb-dot { background: #fff; box-shadow: none; }
.tb-group { display: flex; align-items: center; gap: 6px; flex: none; }
.tb-sep { width: 1px; height: 18px; background: var(--line); margin: 0 2px; flex: none; }
@media (hover: hover) {
.tb-btn[data-tip]::after { content: attr(data-tip); position: absolute; top: calc(100% + 7px); left: 50%; transform: translateX(-50%) translateY(-2px); padding: 4px 8px; border-radius: 6px; background: var(--ink); color: var(--bg); font-size: 12px; line-height: 1.4; white-space: nowrap; pointer-events: none; opacity: 0; transition: opacity .12s, transform .12s; z-index: 50; box-shadow: var(--shadow); }
.tb-btn[data-tip]:hover::after { opacity: 1; transform: translateX(-50%) translateY(0); transition-delay: .25s; }
.tb-end .tb-btn[data-tip]::after, .tb-btn.tip-r[data-tip]::after { left: auto; right: 0; transform: translateY(-2px); }
.tb-end .tb-btn[data-tip]:hover::after, .tb-btn.tip-r[data-tip]:hover::after { transform: none; }
.tb-btn.tip-l[data-tip]::after { left: 0; transform: translateY(-2px); }
.tb-btn.tip-l[data-tip]:hover::after { transform: none; }
.binder-peek[data-tip]::after { content: attr(data-tip); position: absolute; top: calc(100% + 7px); left: 0; padding: 4px 8px; border-radius: 6px; background: var(--ink); color: var(--bg); font-size: 12px; white-space: nowrap; pointer-events: none; opacity: 0; transition: opacity .12s; z-index: 50; }
.binder-peek[data-tip]:hover::after { opacity: 1; transition-delay: .25s; }
}
/* ---------- 侧栏顶部「返回正文」(平板、手机侧栏盖住正文时) ---------- */
.insp-head { display: none; }
@media (max-width: 1000px) {
.insp-head { display: flex; align-items: center; gap: 10px; flex: none; height: 50px; padding: 0 12px 0 6px; border-bottom: 1px solid var(--line); background: var(--surface); }
.insp-back { display: inline-flex; align-items: center; gap: 2px; height: 36px; padding: 0 10px 0 4px; border-radius: 8px; font-size: 14.5px; font-weight: 600; color: var(--accent); flex: none; }
.insp-back:active { background: var(--accent-soft); }
.insp-where { min-width: 0; font-size: 13px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
}
@media (max-width: 760px) {
.editor.with-inspector .inspector { position: fixed; inset: 0; z-index: 90; width: 100% !important; border-left: 0; box-shadow: none; padding-bottom: env(safe-area-inset-bottom); animation: sheet-r .24s var(--ease); }
.insp-head { padding-top: env(safe-area-inset-top); height: calc(50px + env(safe-area-inset-top)); }
.inspector-tabs { overflow-x: auto; scrollbar-width: none; }
.inspector-tabs::-webkit-scrollbar { display: none; }
.inspector-tabs .tab { flex: 0 0 auto; padding-inline: 10px; font-size: 13px; }
.inspector-body { padding: 14px 14px 40px; -webkit-overflow-scrolling: touch; }
.insp-scrim { display: none !important; }
/* 在一章里时收起底部导航,正文占满屏幕;回书房走目录里的「书房」 */
.shell.in-chapter .rail { display: none; }
.shell.in-chapter .stage { height: 100%; }
.binder { width: min(86vw, 320px); }
.binder-ch, .binder-link { min-height: 40px; }
.editor-bar { height: 50px; gap: 6px; padding: 0 8px 0 50px; }
.tb-group { gap: 5px; }
.tb-btn { width: 34px; height: 34px; }
.binder-peek { width: 34px; height: 34px; top: 8px; left: 8px; }
.paper-text, .review-text { -webkit-user-select: text; user-select: text; }
/* 批注表单在手机上做成底部弹层,不被键盘和屏幕边缘挤掉 */
.note-form.floating { position: fixed !important; left: 0 !important; right: 0; top: auto !important; bottom: 0; width: auto; max-width: none; border-radius: 16px 16px 0 0; z-index: 120; max-height: 75dvh; overflow: auto; padding: 14px 14px calc(14px + env(safe-area-inset-bottom)); box-shadow: 0 -10px 30px rgba(0,0,0,.18); animation: sheet .24s var(--ease); }
}
@keyframes sheet-r { from { transform: translateX(30px); opacity: 0; } }
.pick-pill { position: fixed; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 110; display: flex; align-items: center; gap: 10px; max-width: calc(100vw - 24px); padding: 6px 6px 6px 14px; border-radius: 99px; background: var(--raised); border: 1px solid var(--line); box-shadow: var(--shadow-l); font-size: 13px; color: var(--ink-2); animation: sheet .2s var(--ease); }
.pick-pill span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.pick-pill .btn { border-radius: 99px; flex: none; height: 34px; }
.reader-tools.tb-group { gap: 6px; }
.reader.themed .tb-btn:not(.on):not(.primary) { background: transparent; border-color: color-mix(in srgb, var(--rink) 20%, transparent); color: color-mix(in srgb, var(--rink) 80%, transparent); box-shadow: none; }
.peer-row.evid p { font-size: 12.5px; color: var(--ink-2); background: var(--bg-2); border-radius: 6px; padding: 4px 8px; }
/* ---------- 发布台 ---------- */
.callout.warn { background: var(--warn-soft); color: var(--warn); align-items: flex-start; line-height: 1.6; }
.callout.warn svg { flex: none; margin-top: 2px; }
.pub-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 4px 0 16px; }
.pub-stats > div { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.pub-stats b { font-family: var(--serif); font-size: 22px; line-height: 1.1; }
.pub-stats span { font-size: 12px; color: var(--ink-3); }
.pub-stats .hot { border-color: color-mix(in srgb, var(--ok) 40%, transparent); background: var(--ok-soft); }
.pub-stats .hot b { color: var(--ok); }
.pub-next { border: 1px solid var(--line-2); border-left: 4px solid var(--ok); background: var(--paper); border-radius: 12px; padding: 14px 16px; display: flex; flex-direction: column; gap: 12px; box-shadow: var(--shadow-s); margin-bottom: 20px; }
.pub-next.warn { border-left-color: var(--warn); }
.pub-next.block { border-left-color: var(--err); }
.pub-next-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.pub-next-head b { font-family: var(--serif); font-size: 18px; }
.pub-next-label { font-size: 11.5px; font-weight: 600; letter-spacing: .06em; color: var(--ink-3); }
.pub-steps { display: flex; flex-direction: column; gap: 8px; }
.pub-step { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 13.5px; }
.pub-step em { font-style: normal; width: 22px; height: 22px; border-radius: 50%; background: var(--bg-2); color: var(--ink-2); font-size: 12px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.pub-step span { flex: 1 1 auto; min-width: 0; color: var(--ink-2); }
.pub-links { display: flex; gap: 14px; flex-wrap: wrap; }
.pub-ok { display: flex; align-items: center; gap: 6px; color: var(--ok); font-size: 13px; }
.pub-issues { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.pub-issues li { display: flex; gap: 7px; align-items: flex-start; font-size: 13px; line-height: 1.55; }
.pub-issues li svg { flex: none; margin-top: 3px; }
.pub-issues li.block { color: var(--err); }
.pub-issues li.warn { color: var(--warn); }
.pub-issues li.info { color: var(--ink-3); }
.pub-bar { margin-bottom: 10px; }
.pub-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.pub-row { border: 1px solid var(--line); background: var(--surface); border-radius: 10px; overflow: hidden; }
.pub-row.open { border-color: var(--line-2); box-shadow: var(--shadow-s); }
.pub-row-head { width: 100%; display: flex; align-items: center; gap: 10px; padding: 11px 12px; background: none; border: 0; font: inherit; color: var(--ink); cursor: pointer; text-align: left; flex-wrap: wrap; }
.pub-row-head:hover { background: var(--raised); }
.pub-row-head > svg { margin-left: auto; color: var(--ink-4); flex: none; }
.pub-row-title { font-weight: 600; font-size: 14.5px; }
.pub-row-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 12.5px; color: var(--ink-3); }
.pub-dot { width: 9px; height: 9px; border-radius: 50%; flex: none; background: var(--ink-4); }
.pub-dot.ok { background: var(--ok); } .pub-dot.warn { background: var(--warn); } .pub-dot.block { background: var(--err); }
.pub-dot.pub { background: var(--blue); }
.pub-row-body { padding: 4px 14px 14px 31px; display: flex; flex-direction: column; gap: 12px; }
.pub-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.btn.ok { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.pub-batch { margin-top: 28px; padding-top: 16px; border-top: 1px dashed var(--line-2); display: flex; flex-direction: column; gap: 10px; }
.pub-batch-row { display: flex; align-items: center; gap: 8px; font-size: 13.5px; }
@media (max-width: 760px) {
.pub-stats { grid-template-columns: repeat(2, 1fr); }
.pub-step { align-items: stretch; }
.pub-step span { flex-basis: calc(100% - 32px); }
.pub-step .btn { flex: 1 1 100%; justify-content: center; height: 42px; }
.pub-row-body { padding-left: 14px; }
.pub-actions .btn { flex: 1 1 calc(50% - 4px); justify-content: center; height: 40px; }
.pub-row-meta { flex-basis: 100%; padding-left: 19px; }
.pub-row-head > svg { position: absolute; right: 12px; }
.pub-row { position: relative; }
}
.wlock { display: flex; align-items: center; gap: 8px; padding: 7px 14px 7px 52px; font-size: 12.5px; background: var(--blue-soft); color: var(--blue); border-bottom: 1px solid color-mix(in srgb, var(--blue) 20%, transparent); }
.wlock span { flex: 1; min-width: 0; line-height: 1.5; }
.wlock svg { flex: none; }
/* ---------- 目录:顶部压缩,给章节列表留出空间 ---------- */
.binder-top { gap: 4px; padding: 8px 8px 6px 8px; }
.binder-back { flex: none; }
.binder-title { flex: 1; min-width: 0; font-family: var(--serif); font-weight: 700; font-size: 14.5px; color: var(--ink); text-align: left; padding: 4px 6px; border-radius: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.binder-title:hover { background: var(--bg-2); }
.binder-title.on { color: var(--accent); }
.binder .continue-card { padding: 6px 10px 7px; gap: 0; margin-bottom: 4px; }
.binder .continue-card .cc-m { display: none; }
.binder .continue-card .cc-t { font-size: 13.5px; }
.binder .continue-card .cc-bar { margin-top: 4px; }
.binder-section.tools { padding: 2px 8px 4px; }
.binder-label.toggle { width: 100%; background: none; border: 0; cursor: pointer; font: inherit; font-size: 11.5px; letter-spacing: .1em; color: var(--ink-3); font-weight: 600; }
.binder-label.toggle:hover { color: var(--ink); }
.bl-caret { transition: transform .15s; }
.bl-caret.closed { transform: rotate(-90deg); }
.bl-badge { margin-left: auto; font-style: normal; letter-spacing: 0; font-weight: 500; color: var(--accent); }
.binder-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2px; padding: 0 2px; }
.binder-tile { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; height: 46px; border-radius: 8px; color: var(--ink-2); font-size: 11.5px; }
.binder-tile:hover { background: var(--bg-2); color: var(--ink); }
.binder-tile.on { background: var(--accent-soft); color: var(--accent); font-weight: 500; }
.binder-tile em { position: absolute; top: 3px; right: calc(50% - 20px); min-width: 15px; height: 15px; padding: 0 4px; border-radius: 99px; background: var(--accent); color: var(--accent-ink); font-style: normal; font-size: 10px; line-height: 15px; text-align: center; }
.binder-section.grow { border-top: 1px solid var(--line); margin-top: 2px; }
@media (max-width: 760px) {
.binder-foot { display: none; }
.binder-tile { height: 48px; }
}
/* 书房:书本锁 */
.focus-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 11px 14px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); margin: 0 0 18px; color: var(--ink-3); font-size: 13px; }
.focus-bar.on { background: var(--blue-soft); border-color: color-mix(in srgb, var(--blue) 25%, transparent); color: var(--blue); }
.focus-bar > svg { flex: none; }
.focus-text { flex: 1 1 260px; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.focus-text b { color: var(--ink); font-weight: 600; }
.focus-text span { color: var(--ink-3); font-size: 12.5px; line-height: 1.55; }
.book-ai { position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%); display: inline-flex; align-items: center; gap: 3px; padding: 2px 7px; border-radius: 99px; background: rgba(255,255,255,.9); color: var(--blue); font-size: 10.5px; font-weight: 600; white-space: nowrap; }
/* 整本书:导出 / 封存 / 导入 */
.book-keep .bk-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; border-top: 1px solid var(--line); }
.book-keep .bk-row:first-of-type { border-top: 0; }
.book-keep .bk-row > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.book-keep .bk-row span { font-size: 12.5px; color: var(--ink-3); line-height: 1.6; }
.book-keep .bk-row .btn { flex: none; }
.head-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.bf { display: flex; flex-direction: column; gap: 14px; }
.bf-lead { margin: 0; font-size: 13.5px; line-height: 1.75; color: var(--ink-2); }
.bf-step { display: flex; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: var(--r); }
.bf-step.done { border-color: color-mix(in srgb, var(--ok, #2f8a57) 35%, transparent); }
.bf-num { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--blue-soft); color: var(--blue); font-weight: 600; font-size: 13px; }
.bf-step.done .bf-num { background: transparent; color: var(--ok, #2f8a57); }
.bf-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.bf-body > span { font-size: 12.5px; color: var(--ink-3); line-height: 1.6; }
.bf-result { font-size: 13px; padding: 9px 11px; border-radius: var(--r-s); line-height: 1.6; word-break: break-all; }
.bf-result.ok { background: color-mix(in srgb, var(--ok, #2f8a57) 10%, transparent); color: var(--ink-2); }
.bf-result.bad { background: color-mix(in srgb, var(--err) 10%, transparent); color: var(--err); }
.bf-result em { display: block; font-style: normal; color: var(--ink-3); font-size: 12px; }
.bf-check { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; line-height: 1.55; color: var(--ink-2); cursor: pointer; }
.bf-check input { margin-top: 3px; flex: none; }
.bf-check.muted { color: var(--ink-3); font-size: 12.5px; }
@media (max-width: 720px) {
.book-keep .bk-row { flex-direction: column; align-items: stretch; }
.page-head .head-actions { width: 100%; }
.page-head .head-actions .btn { flex: 1; }
}
/* 字数不在本书范围 */
.wc-low, .wc-high { color: var(--warn, #b7791f) !important; opacity: 1 !important; font-weight: 600; }
.pub-stats { grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); }
.pub-stats .warnish { border-color: color-mix(in srgb, var(--warn, #b7791f) 40%, transparent); }
.pub-stats .warnish b { color: var(--warn, #b7791f); }
.wc-range { align-items: center; flex-wrap: nowrap; }
.wc-range .input { min-width: 0; width: 100%; }
/* ============================================================
小说写作台 · 稿纸主题
============================================================ */
:root {
--bg: #f3efe6;
--bg-2: #ebe5d8;
--surface: #fbf9f4;
--paper: #fffdf8;
--raised: #ffffff;
--ink: #2a2622;
--ink-2: #4f4842;
--ink-3: #766e65;
--ink-4: #aaa196;
--line: #e2dbcd;
--line-2: #d4ccbc;
--accent: #b8432f;
--accent-2: #9c3624;
--accent-soft: #f4e2dc;
--accent-ink: #fff;
--ok: #4f7a4a;
--ok-soft: #e3eddc;
--warn: #b07a1c;
--warn-soft: #f6ead0;
--err: #b23a2e;
--err-soft: #f6dcd8;
--blue: #3c6488;
--blue-soft: #dee8f1;
--shadow-s: 0 1px 2px rgba(60, 45, 30, .06), 0 1px 1px rgba(60, 45, 30, .04);
--shadow: 0 2px 6px rgba(60, 45, 30, .06), 0 10px 30px -12px rgba(60, 45, 30, .18);
--shadow-l: 0 24px 60px -20px rgba(40, 30, 20, .35), 0 4px 14px rgba(40, 30, 20, .08);
--paper-shadow: 0 1px 0 rgba(0, 0, 0, .02), 0 12px 40px -18px rgba(70, 50, 30, .28);
--r: 10px;
--r-s: 7px;
--r-l: 14px;
--sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", "Segoe UI", sans-serif;
--serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong", "SimSun", Georgia, serif;
--mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
--rail-w: 72px;
color-scheme: light;
}
[data-theme="night"] {
--bg: #1a1917;
--bg-2: #22201d;
--surface: #201f1c;
--paper: #252320;
--raised: #2b2925;
--ink: #e8e2d6;
--ink-2: #bdb5a8;
--ink-3: #8b8479;
--ink-4: #615b52;
--line: #34312c;
--line-2: #433f39;
--accent: #e07a5f;
--accent-2: #f08f74;
--accent-soft: #3a2621;
--accent-ink: #1a1917;
--ok: #8fbf86;
--ok-soft: #233022;
--warn: #e0b45c;
--warn-soft: #352c1a;
--err: #ec8576;
--err-soft: #3b2220;
--blue: #8db4d8;
--blue-soft: #1f2a35;
--shadow-s: 0 1px 2px rgba(0, 0, 0, .3);
--shadow: 0 2px 8px rgba(0, 0, 0, .3), 0 12px 30px -12px rgba(0, 0, 0, .5);
--shadow-l: 0 24px 60px -20px rgba(0, 0, 0, .7);
--paper-shadow: 0 0 0 1px rgba(255, 255, 255, .03), 0 18px 40px -20px rgba(0, 0, 0, .6);
color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html, body, #root { height: 100%; }
body {
margin: 0; background: var(--bg); color: var(--ink);
font: 14px/1.6 var(--sans); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
button:disabled { cursor: not-allowed; opacity: .55; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; line-height: 1.35; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
::selection { background: color-mix(in srgb, var(--accent) 24%, transparent); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 10px; border: 3px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background-color: var(--ink-4); }
::-webkit-scrollbar-track { background: transparent; }
.serif { font-family: var(--serif); }
.muted { color: var(--ink-3); }
.small-note { font-size: 12px; line-height: 1.6; }
.nowrap { white-space: nowrap; }
.push { margin-left: auto; }
.grow { flex: 1; min-width: 0; }
.wrap { flex-wrap: wrap; }
.row { display: flex; align-items: center; }