/* 知文岛小说工作台展示层。创作引擎与原版交互：Jace novel-generator。 */
:root {
  --color-primary: #3565df; --color-secondary: #5680ea; --color-accent: #b88740;
  --color-background: #f6f7fa; --color-foreground: #263249; --color-muted: #eef1f7;
  --color-muted-fg: #738097; --color-border: #dce2ef; --color-border-subtle: #e8ecf3;
  --color-ring: #3565df; --color-surface: #fff; --color-success: #2a8e78;
  --font-ui: "PingFang SC", "Microsoft YaHei", -apple-system, sans-serif;
  --font-mono: "Cascadia Code", Consolas, monospace;
  --shadow-sm: 0 1px 3px #26324905; --shadow-md: 0 5px 24px #26324905;
  --shadow-lg: 0 20px 70px #26324913; --header-h: 72px; --dock-w: 208px;
  --intel-w: min(330px, 31vw); --radius: 14px; --radius-lg: 18px;
}
body { font-size: 14px; letter-spacing: .015em; background: var(--color-background); }
[hidden] { display: none !important; }
.app-bg { display: none; }
.hud-header { background: #fff; backdrop-filter: none; padding: 0 28px; box-shadow: none; border-bottom: 1px solid var(--color-border-subtle); }
.hud-logo-mark { background: #edf2ff; color: var(--color-primary); border-radius: 12px; width: 42px; height: 42px; font-family: Georgia, serif; font-size: 25px; }
.hud-logo { font-size: 18px; font-weight: 650; letter-spacing: .07em; }
.hud-tagline { color: #8993a5; font-size: 12px; margin-top: 2px; }
.hud-pill { border: 0; background: #f5f7fb; font-size: 12px; padding: 5px 10px; }
.hud-pill-dim { display: none; }
.hud-btn { font-size: 13px; font-weight: 500; background: #fff; border: 1px solid #e5e9f1; padding: 8px 15px; border-radius: 9px; }
.dock { background: #fff; backdrop-filter: none; top: var(--header-h); height: calc(100vh - var(--header-h) - 46px); }
.dock-section { padding: 26px 16px; }
.dock-label { color: #8993a5; font-size: 12px; letter-spacing: .12em; margin: 0 3px 15px; }
.dock-new { border: 1px solid #dce5ff; color: #3565df; background: #f0f4ff; padding: 12px; font-size: 13px; border-radius: 10px; box-shadow: none; }
.dock-new:hover { background: #e8eeff; }
.dock-new-icon { font-size: 19px; }
.dock-empty { padding: 20px 4px; color: #8d97a9; font-size: 12px; line-height: 1.9; }
.dock-footer { border-top: 1px solid var(--line); padding: 12px 16px; }
.dock-link { font-size: 12px; color: #7b879b; }
.book-row, .dock-item { border-radius: 10px; }
.ops-main { background: #f6f7fa; }
.view-command { padding: 26px 32px 36px; max-width: 1200px; width: 100%; margin: 0 auto; }
.cmd-nav { gap: 26px; margin-bottom: 22px; border-bottom: 1px solid #e3e7ef; }
.cmd-nav-item { color: #8792a4; font-size: 13px; padding: 8px 0 12px; border-radius: 0; background: transparent; }
.cmd-nav-item.sel { color: #3565df; border-bottom: 2px solid #3565df; background: transparent; }
.hud-panel { border: 1px solid #e6eaf2; box-shadow: 0 4px 20px #26324903; background: #fff; }
.cmd-hero { padding: 36px 38px 28px; position: relative; overflow: hidden; border-radius: 16px; background: #fff; }
.cmd-hero::before { display: block; content: ""; position: absolute; top: 0; left: 0; width: 4px; height: 100%; background: #3565df; }
.cmd-hero-top { margin-bottom: 17px; }
.cmd-badge { color: #3565df; background: #f0f4ff; border: 0; font-size: 11px; letter-spacing: .08em; padding: 5px 10px; }
.cmd-coord { font-family: var(--font-ui); font-size: 11px; color: #97a0b0; }
.cmd-title { font-family: "Songti SC", "STSong", "SimSun", Georgia, serif; font-size: clamp(28px, 3.2vw, 41px); line-height: 1.4; font-weight: 700; color: #273249; letter-spacing: .06em; margin: 0 0 13px; }
.cmd-desc { max-width: 630px; font-size: 13px; line-height: 1.95; color: #7b879b; }
.cmd-metrics { border-top: 1px solid #edf0f6; margin-top: 23px; padding-top: 20px; gap: 44px; }
.cmd-metric { gap: 8px; }
.cmd-metric-val { font-family: Georgia, serif; font-size: 24px; color: #3a4b6b; font-weight: 400; }
.cmd-metric-lbl { font-size: 11px; color: #8a94a6; }
.cmd-bento { gap: 17px; margin-top: 19px; }
.module-card { min-height: 144px; padding: 24px 26px; border-radius: 14px; transition: border-color .18s, box-shadow .18s, transform .18s; }
.module-card:hover { border-color: #b8caf7; transform: translateY(-2px); box-shadow: 0 8px 24px #3565df0b; }
.module-card h3 { font-size: 18px; margin: 12px 0 9px; color: #34425e; font-weight: 600; letter-spacing: .04em; }
.module-card p { font-size: 12px; line-height: 1.85; color: #8490a4; max-width: 390px; }
.module-primary { background: #fff; border-color: #dbe4f8; }
.module-secondary { background: #fff; border-color: #e5e4df; }
.module-icon { background: #3565df; border: 0; color: #3565df; width: 41px; height: 41px; border-radius: 11px; }
.module-icon-script { background: #ad8446; color: #ad8446; }
.module-tag { background: #f1f5ff; color: #5074c8; border: none; font-size: 10px; }
.module-secondary .module-tag { background: #f8f3e9; color: #ad8446; }
.module-action { font-size: 12px; color: #3565df; padding-top: 16px; }
.module-wide { min-height: 123px; }
.module-wide h3 { font-size: 14px; margin-top: 0; }
.module-wide .module-action { padding-top: 10px; }
.cmd-alert { border: 1px solid #eddfc8; background: #fffaf0; border-radius: 10px; box-shadow: none; color: #8d7044; font-size: 12px; margin-bottom: 17px; }
.view-ops { padding: 25px; }
.ops-title { color: #2c3b55; font-size: 24px; }
.ops-label, .intel-label { color: #8995a8; font-family: var(--font-ui); font-size: 11px; letter-spacing: .08em; }
.ops-grid { gap: 22px; }
.task-line { background: #edf3ff; border: 1px solid #dce7ff; color: #5270a8; font-size: 13px; padding: 14px 17px; border-radius: 11px; }
.chap-row { background: #fff; border: 1px solid #e6eaf2; border-radius: 12px; padding: 18px 20px; margin-bottom: 11px; box-shadow: none; }
.chap-row:hover { border-color: #b9caf3; background: #fdfdff; }
.cr-title { color: #36455f; font-size: 14px; font-weight: 600; }
.cr-preview { color: #8a94a6; font-size: 12px; line-height: 1.8; }
.cr-status { font-size: 11px; border: none; border-radius: 5px; }
.reader { padding: 35px 38px; background: #fffefa; border-color: #ece8e0; }
.reader .body, .confirm-preview { color: #384052; font-family: "Songti SC", "SimSun", serif; font-size: 17px; line-height: 2.15; letter-spacing: .03em; }
.intel-panel { background: #fff; border: 1px solid #e6eaf2; border-radius: 13px; box-shadow: none; }
.intel-head { background: #fafbfe; padding: 15px 17px; }
.intel-tabs { border-color: #e9edf4; }
.intel-tab { font-size: 12px; }
.ref-block { border: 1px solid #e9edf4; border-radius: 10px; box-shadow: none; }
.ref-block-head { align-items: center; gap: 10px; padding: 8px 10px; }
.ref-block-head h4 { color: #52637d; font-size: 13px; line-height: 1.55; }
.ref-block-head .card-edit { flex: 0 0 auto; }
.ref-body, .ref-body .mdbox { font-size: 12px; line-height: 1.85; }
.backlink { color: #7a8aaa; font-size: 12px; margin-bottom: 17px; }
.cd-title { font-size: 23px; color: #30405b; }
.stage { background: #f0f4fd; border: 1px solid #e0e8f8; color: #60779b; font-size: 12px; line-height: 1.55; border-radius: 10px; padding: 12px 14px; }
#stage:empty { display: none; background: transparent; border-color: transparent; margin: 0; padding: 0; }
.stage .genprog-meta { line-height: 1.6; overflow-wrap: anywhere; }
.stage .genprog-bar { margin-top: 10px; }
.stage .genprog-rem { margin-top: 10px; line-height: 1.6; }
#btn-pause:not(.hidden) {
  position: fixed;
  z-index: 30;
  left: calc(var(--dock-w) + 57px);
  bottom: max(18px, env(safe-area-inset-bottom));
  min-height: 42px;
  margin: 0;
  padding: 0 18px;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 8px 24px #26324920;
}
.ops-center:has(#btn-pause:not(.hidden)) { padding-bottom: 112px; }
.tab { font-size: 12px; border-color: #dfe5f0; border-radius: 8px; background: #fff; color: #65758e; }
.tab.sel { color: #3565df; background: #edf2ff; border-color: #cad8fa; }
button.primary { background: #3565df; border-color: #3565df; color: #fff; box-shadow: 0 3px 8px #3565df15; border-radius: 9px; }
button { font-family: var(--font-ui); font-size: 13px; }
input, textarea, select { font-family: var(--font-ui); font-size: 14px; color: #3d4a60; border: 1px solid #dde3ef; border-radius: 9px; background: #fff; }
input:focus, textarea:focus, select:focus { border-color: #8eacee; box-shadow: 0 0 0 3px #3565df0a; }
textarea { line-height: 1.85; }
label { font-size: 12px; color: #6c7b91; }
.scrim { background: #1e2b4660; backdrop-filter: blur(5px); padding: 24px; }
.modal { border-radius: 18px; border: 1px solid #e5eaf5; box-shadow: 0 24px 90px #1c2c4833; padding: 28px 30px; }
.modal-head h2 { color: #34425d; font-size: 19px; font-weight: 600; }
.modal-desc, .hint, .sec-d { color: #8995a8; font-size: 12px; line-height: 1.85; }
.modal-hub { padding: 0; max-width: 1000px; }
.hub-head { background: #fff; border-bottom: 1px solid #e9edf4; padding: 19px 25px; }
.hub-head h2 { font-size: 18px; color: #34425d; }
.hub-nav { background: #f9faff; border-color: #e9edf4; padding: 15px 12px; }
.hub-navi { font-size: 13px; padding: 12px 15px; border-radius: 9px; color: #78869c; }
.hub-navi.sel { background: #eaf0ff; color: #3565df; }
.hub-content { padding: 24px 27px; }
.sec-t { color: #41516c; font-size: 17px; }
.mdl-card { border: 1px solid #e6eaf2; background: #fff; border-radius: 10px; box-shadow: none; }
.mdl-act[hidden], .eye-btn[hidden], button[hidden] { display: none !important; }
.zd-loop-note { padding: 12px 15px; color: #60779b; border: 1px solid #dee7f9; background: #f5f8ff; border-radius: 9px; font-size: 12px; line-height: 1.9; }
.zd-attribution { position: relative; z-index: 2; min-height: 46px; padding: 12px 22px; border-top: 1px solid #e8ecf3; color: #697c9c; background: #fff; font-size: 12px; text-align: center; }
.zd-attribution a { color: #50678f; text-decoration: none; }
.zd-attribution a:hover { color: #3565df; text-decoration: underline; }
.zd-attribution button { font-size: 10px; margin-left: 15px; background: #f5f7fc; color: #7586a4; padding: 4px 9px; border: 0; border-radius: 5px; }
#zd-diagnostics { width: min(740px, 92vw); max-height: 80vh; overflow: auto; border: 1px solid #e1e7f3; border-radius: 16px; padding: 27px; color: #34425d; box-shadow: 0 25px 90px #18294b33; }
#zd-diagnostics::backdrop { background: #1e2b4660; backdrop-filter: blur(4px); }
#zd-diagnostics h2 { font-size: 19px; margin-top: 0; }
#zd-diagnostics p { font-size: 13px; color: #8390a6; line-height: 1.9; }
.zd-diagnostic-download { display: inline-block; margin: 10px 0 20px; color: #3565df; font-size: 13px; }
.zd-backup-row { padding: 14px 0; border-top: 1px solid #e8ecf3; display: flex; align-items: center; gap: 15px; font-size: 12px; }
.zd-backup-row span { flex: 1; overflow-wrap: anywhere; }
.zd-backup-row button { flex-shrink: 0; }
#zd-backups { margin-bottom: 20px; font-size: 13px; color: #6a7890; }
@media (max-width: 1000px) { :root { --dock-w: 180px; } .view-command { padding: 22px; } .cmd-hero { padding: 28px; } .cmd-coord { display: none; } .ops-grid { grid-template-columns: minmax(0,1fr); } .intel-panel { position: static; max-height: none; } .reader { padding: 28px; } }
@media (max-width: 720px) { .hud-header { padding: 0 17px; gap: 10px; } .hud-status-bar { display: none; } .hud-actions { gap: 6px; } .hud-tagline { font-size: 10px; } .hud-btn { padding: 7px 10px; font-size: 11px; } .view-command { padding: 18px; } .cmd-hero { padding: 25px; } .cmd-metrics { gap: 24px; } .cmd-title { font-size: 27px; } .cmd-bento { grid-template-columns: 1fr; } .module-card { padding: 23px; } .module-wide { min-height: 125px; } .dock { display: flex; position: static; height: auto; flex: 0 0 auto; width: 100%; border-right: 0; border-bottom: 1px solid #e8ecf3; } .dock-section { padding: 12px 18px; } .dock-label, .dock-empty, .dock-footer { display: none; } .dock-new { width: auto; padding: 8px 15px; } .dock-list { display: flex; gap: 7px; overflow-x: auto; max-width: 100%; } .dock-list .book-row { min-width: 140px; } .ops-shell { flex-direction: column; } .modal { padding: 23px; } .modal-hub { padding: 0; } .hub-content { padding: 20px; } .hub-nav { flex-direction: row; gap: 5px; flex-wrap: wrap; } .hub-navi { padding: 8px 12px; } .zd-attribution { line-height: 1.9; font-size: 9px; padding: 10px 14px; } .reader { padding: 23px; } .reader .body { font-size: 16px; } .view-ops { padding: 18px; } #btn-pause:not(.hidden) { left: 34px; bottom: max(12px, env(safe-area-inset-bottom)); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }

/* Host-managed prompts, confirmations and the chapter Markdown editor. */
.zd-native-dialog,.zd-chapter-editor-dialog{max-width:none;max-height:none;margin:auto;padding:0;border:1px solid #dbe3ef;border-radius:16px;background:#fff;color:#263650;box-shadow:0 28px 90px #1d2e4d38}
.zd-native-dialog{width:min(480px,calc(100vw - 32px));padding:25px 25px 19px}
.zd-native-dialog::backdrop,.zd-chapter-editor-dialog::backdrop{background:#1f2d43a8;backdrop-filter:blur(3px)}
.zd-native-dialog-title{margin:0 0 10px;color:#243550;font-size:17px;line-height:1.45}
.zd-native-dialog-message{margin:0;color:#63738b;font-size:13px;line-height:1.8;white-space:pre-wrap;overflow-wrap:anywhere}
.zd-native-dialog-input{display:block;width:100%;min-height:42px;margin:16px 0 0;padding:10px 12px;border:1px solid #dce4f0;border-radius:9px;background:#fbfcfe;color:#263650;font:inherit;font-size:13px;line-height:1.7;outline:none;resize:vertical}
.zd-native-dialog-input:focus{border-color:#8ba9ec;box-shadow:0 0 0 3px #376be01a}
.zd-native-dialog-input:is(textarea){min-height:142px}
.zd-native-dialog-actions{display:flex;justify-content:flex-end;gap:9px;margin-top:22px}
.zd-native-dialog-actions button{min-height:38px;padding:0 15px;border:1px solid #dce4ef;border-radius:9px;background:#fff;color:#596b84;font:inherit;font-size:12px;font-weight:650;cursor:pointer}
.zd-native-dialog-actions button:hover{background:#f5f8fd}
.zd-native-dialog-actions .zd-dialog-accept{border-color:#376be0;background:#376be0;color:#fff}
.zd-native-dialog-actions .zd-dialog-accept:hover{border-color:#2858c7;background:#2858c7}
.zd-native-dialog-actions .zd-dialog-accept.is-danger{border-color:#c65349;background:#c65349}
.zd-native-dialog-actions .zd-dialog-accept.is-danger:hover{border-color:#a9433a;background:#a9433a}
.zd-chapter-editor-dialog{width:min(1260px,calc(100vw - 48px));height:min(900px,calc(100dvh - 48px));overflow:hidden;background:#f4f6fa}
.zd-chapter-editor-dialog iframe{display:block;width:100%;height:100%;border:0;background:#f4f6fa}
.zd-toast-region{position:fixed;z-index:1000;right:24px;bottom:24px;display:grid;gap:9px;width:min(390px,calc(100vw - 32px));pointer-events:none}
.zd-toast{padding:12px 15px;border:1px solid #f0ddd2;border-radius:11px;background:#fffaf7;box-shadow:0 12px 34px #2632491c;color:#765340;font-size:12px;line-height:1.65;overflow-wrap:anywhere;opacity:0;transform:translateY(8px);transition:opacity .18s,transform .18s}
.zd-toast.is-visible{opacity:1;transform:translateY(0)}
@media(max-width:650px){.zd-native-dialog{padding:21px 19px 16px;border-radius:14px}.zd-chapter-editor-dialog{width:100vw;height:100dvh;border:0;border-radius:0}.zd-toast-region{right:12px;bottom:max(12px,env(safe-area-inset-bottom));width:calc(100vw - 24px)}}
@media(prefers-reduced-motion:reduce){.zd-toast{transition:none}}

/* Selected editorial-desk homepage: the host owns global navigation; this dock owns books only. */
:root { --dock-w: 196px; }
.dock { background: #fff; }
.dock-section { display: flex; flex-direction: column; min-height: 0; padding: 25px 15px 18px; }
.dock-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin: 0 3px 14px; }
.dock-label { margin: 0; color: #52627d; font-size: 13px; font-weight: 650; letter-spacing: .02em; }
.dock-local-note { color: #a0a9b8; font-size: 10px; white-space: nowrap; }
.dock-new { flex: 0 0 auto; justify-content: center; min-height: 42px; padding: 9px 12px; border-color: #3565df; background: #3565df; color: #fff; font-weight: 600; }
.dock-new:hover { border-color: #2858c7; background: #2858c7; color: #fff; }
.dock-new-icon { line-height: 1; }
.dock-list { flex: 1 1 auto; min-height: 0; overflow-y: auto; margin-top: 15px; padding: 0 1px 8px; scrollbar-width: thin; }
.dock-empty { margin: 0; }
.dock-footer { display: none; }
.book-row { margin: 5px 0; }
.book-item { padding: 10px 10px 11px; }
.bk-kind { color: #8b96a8; font-size: 10px; }
.bk-title { color: #37445c; font-size: 12px; line-height: 1.55; }
.bk-meta { color: #8d99ad; font-size: 10px; line-height: 1.55; }
.book-item.active { border-color: #e0e8fb; background: #f6f8ff; }
.ops-main { background: #f8f9fc; }
.view-command { max-width: 1320px; padding: 25px clamp(22px, 3vw, 42px) 44px; }
.cmd-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, 31%); align-items: center; gap: 14px; min-height: 248px; padding: 31px 36px; border-color: #edf0f6; background: linear-gradient(110deg, #fff 0%, #fff 61%, #f8faff 100%); }
.cmd-hero::before { display: none; }
.cmd-hero-copy { position: relative; z-index: 1; }
.cmd-hero-top { align-items: center; margin-bottom: 11px; }
.cmd-badge { background: #f2f5fd; color: #6d7c99; font-size: 10px; letter-spacing: .06em; }
.cmd-coord { color: #9aa4b4; }
.cmd-title { margin-bottom: 7px; font-size: clamp(29px, 3.2vw, 39px); letter-spacing: .045em; }
.cmd-desc { max-width: 670px; margin-bottom: 0; line-height: 1.85; }
.cmd-metrics { flex-wrap: wrap; gap: clamp(18px, 3vw, 40px); margin-top: 21px; padding-top: 17px; }
.cmd-metric { flex-direction: row; align-items: center; gap: 10px; }
.cmd-metric-val { display: grid; place-items: center; width: 37px; height: 37px; border-radius: 50%; background: #f0f4ff; color: #3565df; font-family: var(--font-ui); font-size: 16px; font-weight: 700; }
.cmd-metric-copy { display: grid; gap: 3px; }
.cmd-metric-copy strong { color: #485a78; font-size: 11px; font-weight: 650; }
.cmd-metric-copy small { color: #98a2b2; font-size: 10px; }
.cmd-hero-art { position: relative; display: grid; align-self: stretch; min-height: 170px; place-items: center; overflow: hidden; }
.cmd-hero-art svg { width: min(100%, 330px); height: auto; opacity: .96; }
.cmd-hero-art > span { position: absolute; top: 14%; right: 8%; color: #879bc4; font-family: "Songti SC", "STSong", serif; font-size: 15px; line-height: 1.7; letter-spacing: .14em; transform: rotate(8deg); }
.cmd-bento { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; margin-top: 16px; }
.module-card { display: flex; flex-direction: column; min-height: 229px; padding: 22px 24px 20px; border-top-width: 1px; }
.module-primary { border-color: #d9e4ff; }
.module-secondary { border-color: #e7e5df; }
.module-icon { width: 40px; height: 40px; margin-bottom: 12px; border-radius: 11px; }
.module-primary .module-icon { background-color: #3565df; background-image: linear-gradient(135deg,#edf3ff,#e5edff); }
.module-secondary .module-icon { background-color: #aa7d38; background-image: linear-gradient(135deg,#fcf5e9,#f7edda); }
.module-tag { position: absolute; top: 25px; right: 23px; margin: 0; padding: 5px 9px; background: #f2f5fd; color: #7b8bab; font-size: 10px; font-weight: 550; }
.module-secondary .module-tag { background: #f9f4eb; color: #a17a41; }
.module-card h3 { margin: 0 0 8px; color: #2f3d58; font-family: "Songti SC", "STSong", "SimSun", serif; font-size: 20px; letter-spacing: .025em; }
.module-card p { margin: 0; max-width: 470px; color: #7f8ba0; font-size: 12px; line-height: 1.8; }
.module-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.module-chips span { padding: 4px 8px; border-radius: 99px; background: #f3f6fc; color: #7f8eaa; font-size: 10px; line-height: 1.3; }
.module-secondary .module-chips span { background: #faf6ef; color: #9c896b; }
.module-action { justify-content: space-between; margin-top: auto; padding-top: 15px; color: #3565df; }
.module-action-label { font-weight: 600; }
.module-action span:last-child { font-size: 17px; }
.home-recent, .home-workflow { margin-top: 25px; }
.home-section-head { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 12px; }
.home-section-head h2 { margin: 0; color: #2f3d58; font-size: 16px; font-weight: 650; letter-spacing: .02em; }
.home-section-head p { margin: 4px 0 0; color: #97a1b2; font-size: 11px; }
.home-section-hint { color: #a0aabb; font-size: 10px; }
.home-recent-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 11px; }
.recent-book { display: flex; align-items: center; gap: 12px; width: 100%; min-width: 0; min-height: 110px; padding: 14px; border: 1px solid #e8ecf4; border-radius: 13px; background: #fff; text-align: left; box-shadow: 0 3px 12px #26324904; transition: border-color .18s, box-shadow .18s, transform .18s; }
.recent-book:hover { transform: translateY(-1px); border-color: #cbd8f4; background: #fff; box-shadow: 0 7px 20px #2632490b; }
.recent-book-mark { display: grid; flex: 0 0 48px; width: 48px; height: 66px; place-items: center; border: 1px solid #dfe7f8; border-radius: 8px; background: linear-gradient(145deg,#f7f9fe,#e9effc); color: #7990bf; }
.recent-book:nth-child(3n + 2) .recent-book-mark { border-color: #eee5d4; background: linear-gradient(145deg,#fcfaf5,#f1e9d9); color: #a58b5b; }
.recent-book:nth-child(3n) .recent-book-mark { border-color: #dcebe8; background: linear-gradient(145deg,#f4faf8,#e5f1ef); color: #719a90; }
.recent-book-mark span { font-family: "Songti SC", "STSong", serif; font-size: 23px; }
.recent-book-content { display: grid; flex: 1; min-width: 0; gap: 6px; }
.recent-book-title { overflow: hidden; color: #34425e; font-size: 12px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.recent-book-tags { display: flex; gap: 5px; overflow: hidden; }
.recent-book-tags span { flex: 0 0 auto; padding: 2px 7px; border-radius: 99px; background: #f1f5fd; color: #7588ad; font-size: 9px; }
.recent-book-meta { overflow: hidden; color: #97a1b2; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.recent-book-arrow { align-self: flex-start; color: #8b9dc3; font-size: 14px; }
.recent-empty { display: flex; grid-column: 1 / -1; align-items: center; gap: 12px; min-height: 74px; padding: 14px 17px; border: 1px dashed #dfe5ef; border-radius: 12px; background: #fff; }
.recent-empty-mark { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 50%; background: #f1f5ff; color: #6c8add; }
.recent-empty strong, .recent-empty small { display: block; }
.recent-empty strong { color: #51617c; font-size: 12px; }
.recent-empty small { margin-top: 4px; color: #98a2b1; font-size: 10px; }
.home-workflow { padding: 17px 19px 15px; border: 1px solid #e8ecf3; border-radius: 14px; background: #fff; }
.home-workflow-head { margin-bottom: 13px; }
.home-flow-link { flex: 0 0 auto; padding: 5px 0 5px 8px; border: 0; background: transparent; color: #5376c7; font-size: 11px; }
.home-flow-link:hover { border: 0; background: transparent; color: #3565df; }
.home-flow-link span { margin-left: 4px; }
.home-workflow-track { display: grid; grid-template-columns: minmax(0,1fr) auto minmax(0,1fr) auto minmax(0,1fr) auto minmax(0,1fr); align-items: center; gap: 8px; }
.home-workflow-track > i { color: #a1afca; font-size: 14px; font-style: normal; text-align: center; }
.home-workflow-step { display: flex; align-items: center; gap: 9px; min-width: 0; padding: 10px; border: 1px solid #edf0f6; border-radius: 10px; background: #fcfdff; }
.home-workflow-step > b { display: grid; flex: 0 0 30px; width: 30px; height: 30px; place-items: center; border-radius: 50%; background: #eff4ff; color: #4671d2; font-family: Georgia,serif; font-size: 13px; }
.home-workflow-step > span { display: grid; min-width: 0; gap: 4px; }
.home-workflow-step strong { overflow: hidden; color: #465773; font-size: 10px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.home-workflow-step small { overflow: hidden; color: #99a3b2; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 1150px) {
  .cmd-hero { grid-template-columns: minmax(0,1fr) 220px; padding: 27px; }
  .cmd-hero-art > span { right: 2%; font-size: 12px; }
  .home-workflow-track { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .home-workflow-track > i { display: none; }
}
@media (max-width: 850px) {
  .cmd-hero { grid-template-columns: minmax(0,1fr) 170px; gap: 4px; }
  .cmd-metrics { gap: 13px; }
  .cmd-metric-copy small { display: none; }
  .home-recent-grid { grid-template-columns: 1fr; }
  .recent-book { min-height: 82px; }
  .recent-book-mark { flex-basis: 40px; width: 40px; height: 54px; }
}
@media (max-width: 720px) {
  .dock-section { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 8px 12px; padding: 10px 14px 8px; }
  .dock-heading { margin: 0; }
  .dock-label { display: block; }
  .dock-local-note { display: none; }
  .dock-new { width: auto; min-height: 36px; justify-self: end; padding: 7px 11px; }
  .dock-list { grid-column: 1 / -1; display: flex; gap: 7px; max-height: 61px; margin-top: 0; overflow-x: auto; overflow-y: hidden; padding: 0 0 2px; }
  .dock-list .book-row { min-width: 140px; }
  .view-command { padding: 16px 14px 32px; }
  .cmd-hero { grid-template-columns: minmax(0,1fr); min-height: 0; padding: 24px 21px 19px; }
  .cmd-hero-art { position: absolute; right: 3px; bottom: -12px; width: 130px; min-height: 95px; opacity: .48; }
  .cmd-hero-art > span { display: none; }
  .cmd-hero-copy { padding-right: 0; }
  .cmd-title { max-width: 390px; font-size: 27px; }
  .cmd-desc { max-width: 440px; padding-right: 14px; font-size: 12px; }
  .cmd-metrics { gap: 12px; margin-top: 15px; padding-top: 13px; }
  .cmd-metric { gap: 6px; }
  .cmd-metric-val { width: 29px; height: 29px; font-size: 13px; }
  .cmd-metric-copy strong { font-size: 9px; }
  .cmd-bento { grid-template-columns: 1fr; gap: 10px; }
  .module-card { min-height: 205px; padding: 19px; }
  .module-tag { top: 20px; right: 18px; }
  .home-section-hint { display: none; }
  .home-workflow { padding: 15px 13px; }
  .home-workflow-track { grid-template-columns: 1fr; gap: 7px; }
  .home-workflow-step { padding: 8px 10px; }
  .home-flow-link { font-size: 10px; }
}
/* Approved reference: exec-99c63b8d. Artwork is reused, not approximated with shapes. */
:root { --dock-w: 184px; --header-h: 0px; --color-primary: #2863f5; }
body { background: #fbfcff; }
.hud-header { position: absolute; top: 13px; right: 28px; left: auto; width: auto; height: 32px; padding: 0; gap: 12px; border: 0; background: transparent; z-index: 20; }
.hud-brand { display: none; }
.hud-btn { padding: 6px 10px; font-size: 11px; }
.hud-status-bar { margin: 0; }
.hud-pill { font-size: 10px; }
.ops-shell { min-height: 100dvh; }
.dock { position: sticky; top: 0; height: 100dvh; flex-basis: var(--dock-w); border-color: #e9eef8; }
.dock-section { padding: 24px 14px; }
.dock-heading { display: block; margin: 0 0 19px; }
.dock-label { color: #172442; font-size: 15px; }
.dock-local-note { display: block; margin-top: 6px; color: #8b9abc; font-size: 10px; letter-spacing: .04em; }
.dock-new { min-height: 42px; margin: 0 0 14px; background: #2863f5; border: 1px solid #2863f5; border-radius: 9px; font-size: 13px; box-shadow: 0 4px 12px #2863f512; }
.zd-book-search { display: flex; align-items: center; gap: 6px; padding: 0 9px; min-height: 33px; border: 1px solid #e7edf7; border-radius: 7px; color: #8495b7; }
.zd-book-search > span { font-size: 21px; }
.zd-book-search input { width: 100%; min-width: 0; margin: 0; padding: 6px 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; font-size: 11px; }
.zd-book-search input::placeholder { color: #9aa8bf; }
#zd-book-search-empty { color: #8292ad; font-size: 12px; padding: 16px 3px; }
.dock-list { margin-top: 13px; }
.book-row { margin: 0 0 10px; }
.book-item { position: relative; min-height: 76px; padding: 8px 20px 8px 50px; border: 1px solid transparent; border-radius: 9px; }
.book-item::before { content: ''; position: absolute; top: 10px; left: 3px; width: 36px; height: 56px; border-radius: 4px; background: url('/assets/novel-editorial/cover-1.webp') center / cover; box-shadow: 0 3px 6px #1a31541a; }
.book-row:nth-child(5n+2) .book-item::before { background-image: url('/assets/novel-editorial/cover-2.webp'); }
.book-row:nth-child(5n+3) .book-item::before { background-image: url('/assets/novel-editorial/cover-3.webp'); }
.book-row:nth-child(5n+4) .book-item::before { background-image: url('/assets/novel-editorial/cover-4.webp'); }
.book-row:nth-child(5n) .book-item::before { background-image: url('/assets/novel-editorial/cover-5.webp'); }
.bk-kind { order: 2; font-size: 10px; color: #8492aa; }
.bk-title { order: 1; color: #1d2b46; font-size: 11px; font-weight: 650; line-height: 1.5; }
.bk-meta { order: 3; font-size: 10px; color: #8e9ab0; }
.bk-meta::before { content: ''; display: inline-block; width: 5px; height: 5px; margin: 0 4px 1px 0; border-radius: 50%; background: #7fa2f4; }
.book-menu-btn { right: 0; top: 9px; width: 20px; color: #8d9bb4; }
.ops-main { background: radial-gradient(ellipse at 74% 12%, #f4f8ff70, transparent 48%), #fcfdff; }
.view-command { position: relative; width: 100%; max-width: 1440px; padding: 49px 28px 28px; }
.cmd-nav { position: absolute; top: 10px; left: 28px; gap: 18px; margin: 0; border: 0; }
.cmd-nav-item { padding: 7px 0; font-size: 11px; }
.cmd-hero { position: relative; display: block; min-height: 225px; padding: 15px 22px 26px; overflow: visible; border: 0; border-radius: 0; box-shadow: none; background: transparent; }
.cmd-hero-copy { max-width: calc(100% - 290px); }
.cmd-hero-top { margin: 0 0 13px; }
.cmd-badge { padding: 0; border: 0; border-radius: 0; background: transparent; color: #9baaca; font-size: 11px; font-weight: 600; letter-spacing: .15em; }
.cmd-title { margin: 0 0 10px; color: #0f1b35; font-family: 'STZhongsong', 'Noto Serif SC', 'SimSun', serif; font-size: clamp(34px,3.4vw,54px); font-weight: 900; line-height: 1.35; letter-spacing: .055em; white-space: nowrap; }
.cmd-desc { max-width: none; padding: 0; margin: 0; color: #8392af; font-size: 15px; line-height: 1.85; }
.cmd-metrics { flex-wrap: nowrap; gap: clamp(15px,2.8vw,44px); margin: 26px 0 0; padding: 0; border: 0; }
.cmd-metric { flex: 0 1 auto; flex-direction: row; align-items: center; gap: 10px; }
.cmd-metric-val { flex: 0 0 43px; width: 43px; height: 43px; background: #eaf1ff; color: #2863f5; font-size: 27px; font-weight: 500; }
.cmd-metric-copy { display: grid; gap: 5px; }
.cmd-metric-copy strong { color: #263755; font-size: 13px; font-weight: 650; white-space: nowrap; }
.cmd-metric-copy small { display: block; color: #8b9abd; font-size: 11px; white-space: nowrap; }
.cmd-hero-art { position: absolute; right: 0; bottom: 0; width: 330px; min-height: 0; height: auto; overflow: visible; pointer-events: none; }
.cmd-hero-art img { display: block; width: 100%; height: auto; mix-blend-mode: multiply; }
.cmd-bento { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 15px; margin: 0; }
.module-card { position: relative; min-height: 246px; padding: 27px 24px 24px 112px; border-radius: 13px; border: 1px solid #e6ebf5; background: #fff; overflow: hidden; box-shadow: 0 4px 12px #26324904; }
.module-primary { border-color: #9bb7ff; background: #f8faff; }
.module-icon { position: absolute; top: 28px; left: 28px; width: 60px; height: 66px; margin: 0; border-radius: 16px; background: #edf3ff !important; mask: none; -webkit-mask: none; }
.module-icon::before { content: ''; position: absolute; inset: 17px; background: #2863f5; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Crect x='4' y='2' width='16' height='20' rx='1'/%3E%3Cpath d='M4 17h16'/%3E%3C/svg%3E") center/contain no-repeat; }
.module-secondary .module-icon { background: #faf4ea !important; }
.module-secondary .module-icon::before { background: #a97426; mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Crect x='3' y='2' width='18' height='20' rx='1'/%3E%3Cpath d='M7 7h10M7 11h10M7 15h6'/%3E%3C/svg%3E"); }
.module-card h3 { position: relative; z-index: 1; margin: 4px 0 9px; color: #12213b; font-size: 26px; font-weight: 800; }
.module-card p { position: relative; z-index: 1; max-width: 260px; margin: 0; color: #8998b5; font-size: 13px; line-height: 1.75; }
.module-art { position: absolute; right: 11px; top: 33px; width: 155px; height: 162px; object-fit: contain; mix-blend-mode: multiply; pointer-events: none; }
.module-secondary .module-art { top: 34px; width: 163px; }
.module-action { order: 2; display: flex; justify-content: center; align-items: center; gap: 12px; align-self: flex-start; min-height: 39px; margin: 15px 0 0; padding: 0 22px; border: 1px solid #2863f5; border-radius: 7px; background: #2863f5; color: #fff; font-size: 12px; box-shadow: 0 3px 7px #2863f512; }
.module-secondary .module-action { background: #fff; color: #283d65; border-color: #9bb8ff; box-shadow: none; }
.module-chips { position: relative; z-index: 1; order: 3; flex-wrap: wrap; gap: 6px; margin-top: 18px; }
.module-chips span { padding: 5px 10px; background: #edf3ff; color: #8b9bb9; font-size: 10px; }
.module-secondary .module-chips span { background: #f4f6fa; color: #8e99ab; }
.home-recent { margin-top: 28px; }
.home-section-head { margin-bottom: 13px; }
.home-section-head h2 { color: #18263e; font-size: 17px; }
.home-recent-grid { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 13px; }
.recent-book:nth-child(n+4) { display: none; }
.recent-book { min-height: 150px; gap: 13px; padding: 17px; border-radius: 13px; }
.recent-book-mark { flex: 0 0 70px; width: 70px; height: 108px; border: 0; border-radius: 5px; background: url('/assets/novel-editorial/cover-1.webp') center/cover; box-shadow: 0 3px 8px #26324917; }
.recent-book-mark span { display: none; }
.recent-book:nth-child(3n+2) .recent-book-mark { background: url('/assets/novel-editorial/cover-2.webp') center/cover; border: 0; }
.recent-book:nth-child(3n) .recent-book-mark { background: url('/assets/novel-editorial/cover-3.webp') center/cover; border: 0; }
.recent-book-content { gap: 10px; }
.recent-book-title { font-size: 12px; color: #283a59; }
.recent-book-meta { font-size: 10px; color: #94a3be; }
.recent-book-tags span { font-size: 10px; }
.recent-empty { min-height: 123px; border: 1px dashed #dbe5f6; background: #fff; padding: 24px; }
.recent-empty-mark { width: 45px; height: 45px; }
.home-workflow { margin-top: 21px; padding: 17px 19px; border-radius: 13px; }
.home-workflow-head > div { display: flex; align-items: center; gap: 12px; }
.home-workflow-head p { margin: 0; color: #94a1ba; font-size: 11px; }
.home-flow-link { color: #5780db; font-size: 11px; }
.home-workflow-track { grid-template-columns: minmax(0,1fr) auto minmax(0,1fr) auto minmax(0,1fr) auto minmax(0,1fr) auto minmax(0,1fr); gap: 8px; }
.home-workflow-step { padding: 12px 10px; gap: 8px; background: #fff; }
.home-workflow-step > b { width: 34px; height: 34px; flex-basis: 34px; color: #2863f5; font-family: var(--font-ui); font-size: 15px; }
.home-workflow-step strong { color: #32425e; font-size: 10px; }
.home-workflow-step small { color: #9ba7bc; font-size: 9px; }
.zd-attribution { font-size: 10px; }
@media(max-width:1250px) {
  .cmd-title { font-size: 42px; }
  .cmd-hero-copy { max-width: calc(100% - 240px); }
  .cmd-hero-art { width: 275px; }
  .cmd-metric-copy small { font-size: 10px; }
  .cmd-metrics { gap: 20px; }
  .module-card { padding-left: 92px; }
  .module-icon { left: 20px; width: 54px; height: 58px; }
  .module-art { width: 125px; right: 3px; opacity: .8; }
  .module-card p { max-width: calc(100% - 65px); font-size: 12px; }
  .module-chips { margin-left: -64px; }
  .home-workflow-track { grid-template-columns: repeat(5,minmax(0,1fr)); gap: 7px; }
  .home-workflow-track > i { display: none; }
  .home-workflow-step { padding: 10px 7px; gap: 5px; }
  .home-workflow-step small { white-space: normal; }
}
@media(max-width:1050px) {
  :root { --dock-w: 166px; }
  .view-command { padding: 52px 20px 24px; }
  .cmd-hero { padding: 12px 5px 24px; }
  .cmd-title { font-size: 35px; }
  .cmd-hero-copy { max-width: 100%; }
  .cmd-desc { max-width: 75%; font-size: 13px; }
  .cmd-hero-art { width: 210px; opacity: .7; }
  .cmd-metrics { position: relative; z-index: 1; gap: 15px; }
  .cmd-metric-copy strong { font-size: 11px; }
  .cmd-metric-copy small { display: none; }
  .cmd-bento { grid-template-columns: 1fr; }
  .module-card { min-height: 218px; padding-left: 112px; }
  .module-icon { left: 28px; width: 60px; height: 66px; }
  .module-art { width: 180px; right: 24px; opacity: 1; }
  .module-card p { max-width: 65%; }
  .module-chips { margin-left: 0; }
  .home-recent-grid { grid-template-columns: 1fr; }
  .recent-book { min-height: 124px; }
  .recent-book-mark { width: 56px; height: 88px; flex-basis: 56px; }
  .home-workflow-track { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .home-workflow-head p { display: none; }
}
@media(max-width:720px) {
  .hud-header { top: 11px; right: 14px; }
  .hud-status-bar { display: none; }
  .dock { position: relative; top: 0; width: 100%; height: auto; flex-basis: auto; padding-top: 45px; }
  .dock-section { display: grid; grid-template-columns: minmax(0,1fr) auto; padding: 12px 16px; }
  .dock-heading { margin: 0; }
  .dock-local-note { display: block; }
  .dock-new { margin: 0; min-height: 38px; }
  .zd-book-search { grid-column: 1/-1; }
  .dock-list { grid-column: 1/-1; max-height: 85px; margin: 3px 0 0; }
  .dock-list .book-row { min-width: 168px; margin: 0; }
  .view-command { padding: 45px 16px 24px; }
  .cmd-nav { top: 8px; left: 16px; }
  .cmd-hero { min-height: 0; padding: 12px 0 26px; }
  .cmd-title { max-width: 100%; font-size: clamp(26px,5.8vw,38px); letter-spacing: .02em; white-space: normal; }
  .cmd-desc { max-width: 100%; padding-right: 0; font-size: 12px; }
  .cmd-hero-art { position: relative; right: auto; bottom: auto; width: 75%; max-width: 300px; margin: 8px auto -15px; opacity: 1; }
  .cmd-metrics { flex-wrap: wrap; gap: 12px; margin-top: 20px; }
  .cmd-metric { gap: 5px; }
  .cmd-metric-val { width: 31px; height: 31px; flex-basis: 31px; font-size: 21px; }
  .cmd-metric-copy strong { font-size: 10px; }
  .module-card { min-height: 245px; padding: 23px 19px 22px 82px; }
  .module-icon { left: 17px; top: 23px; width: 48px; height: 53px; border-radius: 12px; }
  .module-icon::before { inset: 13px; }
  .module-card h3 { font-size: 23px; }
  .module-card p { max-width: 90%; font-size: 12px; }
  .module-art { width: 115px; right: 4px; top: 65px; opacity: .45; }
  .module-secondary .module-art { width: 120px; top: 65px; }
  .module-chips { gap: 5px; margin-left: -60px; margin-top: 20px; }
  .module-chips span { font-size: 9px; padding: 5px 7px; }
  .module-action { position: relative; z-index: 1; }
  .home-workflow { padding: 16px 12px; }
  .home-workflow-track { grid-template-columns: 1fr; }
  .home-workflow-step small { white-space: nowrap; }
  .home-section-head h2 { font-size: 16px; }
  .home-flow-link { font-size: 10px; }
}
/* Comparison pass: keep fact icons beside their labels, feather reused artwork edges. */
.cmd-metric { display: flex; }
.cmd-metric-val svg { width: 25px; height: 25px; }
.cmd-hero-art img, .module-art { mask-image: linear-gradient(90deg,transparent,#000 7%,#000 94%,transparent), linear-gradient(transparent,#000 7%,#000 94%,transparent); mask-composite: intersect; }
.cmd-hero-art { width: 370px; }
.module-card h3 { font-size: 27px; }
.module-card p { font-size: 14px; line-height: 1.75; }
.module-secondary .module-art { width: 180px; }
@media(max-width:1250px) { .cmd-hero-art { width: 290px; } .module-card p { font-size: 12px; } }
@media(max-width:1050px) { .cmd-hero-art { width: 220px; } .module-card p { font-size: 13px; } }
@media(max-width:720px) { .cmd-hero-art { width: 75%; } .module-secondary .module-art { width: 120px; } .module-card h3 { font-size: 23px; } .module-card p { font-size: 12px; } }
/* Populated-state QA: reserve the menu and illustration widths; clamp long real titles. */
.dock { display: flex; }
.book-row { position: relative; }
.book-item { display: flex; flex-direction: column; gap: 3px; min-height: 82px; }
.bk-title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.bk-meta { white-space: nowrap; }
.book-menu-btn { position: absolute; top: 8px; right: 0; }
.module-card p { max-width: min(240px,calc(100% - 170px)); }
@media(max-width:1050px) { .module-card p { max-width: calc(100% - 170px); } }
@media(max-width:720px) { .module-card p { max-width: 100%; } .module-art, .module-secondary .module-art { opacity: .25; } }
/* Match reference copy width while preserving the right-hand illustration column. */
.module-card p { max-width: 260px; font-size: 13px; }
.module-secondary .module-art { width: 175px; right: 0; }
@media(max-width:1350px) { .module-art { width: 120px; right: -7px; } .module-secondary .module-art { width: 140px; right: -7px; } .module-card p { max-width: 260px; } }
@media(max-width:1050px) { .module-art { width: 155px; right: 12px; } .module-secondary .module-art { width: 175px; right: 8px; } .module-card p { max-width: calc(100% - 155px); } }
@media(max-width:720px) { .module-art { width: 115px; right: 4px; } .module-secondary .module-art { width: 120px; right: 4px; } .module-card p { max-width: 100%; font-size: 12px; } }
/* Workspace pages keep their original controls clear of the compact module toolbar. */
.view-ops { padding-top: 62px; }
/* Scale reference typography by the available novel canvas, not the whole host window. */
.ops-main { container-type: inline-size; }
.module-card p { max-width: 280px; font-size: 14px; }
.module-art { right: -12px; }
.module-secondary .module-art { right: -12px; }
.home-workflow-step strong { font-size: 11px; }
.home-workflow-step small { font-size: 10px; }
@container(min-width:1320px) {
  .cmd-title { font-size: 60px; }
  .cmd-hero-art { width: 416px; }
  .cmd-metric-copy strong { font-size: 15px; }
  .cmd-metric-copy small { font-size: 13px; }
  .module-card { padding-left: 128px; min-height: 250px; }
  .module-icon { width: 66px; height: 66px; left: 32px; }
  .module-card h3 { font-size: 28px; }
  .module-card p { max-width: 300px; font-size: 15px; }
  .module-art { width: 165px; right: 15px; }
  .module-secondary .module-art { width: 190px; right: 15px; }
  .module-action { min-height: 42px; padding-inline: 27px; font-size: 13px; }
  .module-chips span { font-size: 11px; }
  .recent-book-title { font-size: 14px; }
  .recent-book-tags span, .recent-book-meta { font-size: 11px; }
  .home-workflow-step strong { font-size: 12px; }
  .home-workflow-step small { font-size: 11px; }
}
@media(max-width:1350px) { .module-card p { max-width: 260px; font-size: 13px; } }
@media(max-width:1050px) { .module-card p { max-width: calc(100% - 155px); } }
@media(max-width:720px) { .module-card p { max-width: 100%; font-size: 12px; } }
/* Local examples, workflow help and independently saved book covers. */
.view-command { padding-top: 34px; }
.cmd-nav[hidden] { display: none !important; }
.zd-recent-actions { display: flex; gap: 12px; align-items: center; }
.zd-example-book { display: flex !important; min-height: 156px; }
.zd-example-label { color: #a17a3f !important; background: #fbf5e8 !important; }
.zd-example-description { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: #8b9ab4; font-size: 11px; line-height: 1.7; }
.zd-recent-wrapper { position: relative; min-width: 0; }
.zd-recent-wrapper .recent-book { width: 100%; height: 100%; }
.zd-cover-edit { position: absolute; z-index: 2; left: 5px; top: 48px; width: 28px; min-height: 24px; padding: 0; border: 1px solid #dce5f5; border-radius: 5px; background: #fffffff2; color: #3565df; opacity: 0; font-size: 14px; cursor: pointer; }
.book-row:hover .zd-cover-edit, .book-row:focus-within .zd-cover-edit, .zd-recent-wrapper:hover .zd-cover-edit, .zd-recent-wrapper:focus-within .zd-cover-edit { opacity: 1; }
.zd-recent-wrapper > .zd-cover-edit { left: 31px; top: 98px; }
.book-item[style*="--zd-cover"]::before { background-image: var(--zd-cover) !important; }
.zd-library-dialog { width: min(800px,calc(100vw - 40px)); max-height: 86dvh; padding: 25px 28px; border: 1px solid #e0e7f4; border-radius: 16px; color: #253753; background: #fff; box-shadow: 0 22px 80px #26324930; overflow-y: auto; }
.zd-library-dialog::backdrop { background: #1d2d4960; backdrop-filter: blur(4px); }
.zd-library-head { display: flex; justify-content: space-between; gap: 15px; align-items: center; margin-bottom: 20px; }
.zd-library-head h2 { margin: 0; color: #1d2d48; font-size: 20px; line-height: 1.5; }
.zd-library-close { flex: 0 0 30px; width: 30px; height: 30px; padding: 0; border: 0; border-radius: 6px; color: #8190aa; background: #f3f6fc; font-size: 20px; }
.zd-example-intro { display: flex; gap: 20px; align-items: center; padding: 16px; margin-bottom: 20px; border-radius: 12px; background: #f8faff; }
.zd-example-cover { width: 74px; height: 110px; object-fit: cover; border-radius: 5px; box-shadow: 0 4px 10px #24385716; }
.zd-example-intro p { margin: 10px 0; line-height: 1.8; color: #526783; font-size: 14px; }
.zd-example-intro small { color: #95a3ba; }
.zd-example-intro .zd-example-label { display: inline-block; padding: 4px 8px; border-radius: 5px; font-size: 11px; }
.zd-example-select { width: 100%; min-height: 38px; margin-bottom: 14px; padding: 8px 12px; }
.zd-example-prose { max-height: 38dvh; overflow-y: auto; padding: 24px 26px; border: 1px solid #ece8df; border-radius: 10px; background: #fffefa; color: #39455a; font-family: 'SimSun',serif; font-size: 16px; line-height: 2; white-space: pre-wrap; overflow-wrap: anywhere; }
.zd-example-use { min-height: 40px; margin-top: 20px; padding: 0 18px; }
.zd-library-note { margin: 13px 0 0; color: #8c9ab0; font-size: 12px; line-height: 1.8; }
.zd-example-gallery { display: grid; gap: 12px; }
.zd-example-gallery .recent-book-mark { background-size: cover; }
#zd-flow-guide .pipeline { padding: 12px 0; border: 0; box-shadow: none; }
#zd-cover-editor { width: min(430px,calc(100vw - 40px)); }
.zd-cover-preview { width: 144px; height: 210px; margin: 0 auto 22px; border-radius: 7px; background-size: cover; background-position: center; box-shadow: 0 6px 20px #26324920; }
.zd-cover-upload { display: block; padding: 12px 16px; border-radius: 8px; background: #edf3ff; color: #3565df; font-size: 13px; }
.zd-cover-upload input { display: block; width: 100%; margin-top: 10px; padding: 6px; font-size: 11px; }
.zd-cover-reset { margin-top: 15px; padding: 8px 12px; border-radius: 7px; border: 1px solid #e0e7f4; background: #fff; color: #7a8ba7; font-size: 12px; }
@media(max-width:720px) {
  .view-command { padding-top: 20px; }
  .zd-library-dialog { width: calc(100vw - 24px); padding: 20px 16px; }
  .zd-example-intro { gap: 12px; padding: 12px; }
  .zd-example-prose { padding: 18px 16px; font-size: 15px; }
  .zd-cover-edit { opacity: 1; }
  .zd-recent-wrapper > .zd-cover-edit { left: 25px; top: 74px; }
  .zd-recent-actions { gap: 5px; }
}
/* Keep secondary labels readable without changing the editorial heading scale. */
.module-chips span, .recent-book-tags span, .zd-example-intro .zd-example-label { font-size: 12px; line-height: 1.5; }
.recent-book-meta, .zd-example-description { font-size: 12px; line-height: 1.7; }
.bk-kind, .bk-meta, .dock-local-note { font-size: 11px; line-height: 1.6; }
.home-workflow-step strong { font-size: 12px; }
.home-workflow-step small, .home-flow-link { font-size: 12px; }
.module-chips, .recent-book-tags { flex-wrap: wrap; row-gap: 6px; }
/* Reading and editing surfaces: consistent text sizes and breathing room. */
.view-ops .ops-label, .intel-label, .cr-status { font-size: 13px; line-height: 1.6; }
.cr-title { font-size: 15px; line-height: 1.7; }
.cr-preview { font-size: 14px; line-height: 1.85; margin-top: 8px; }
.chap-row { padding: 20px 22px; }
.intel-tab, .tab, .backlink { font-size: 13px; line-height: 1.6; }
.intel-tab, .tab { padding: 10px 13px; }
.ref-block-head { padding: 12px 14px; }
.ref-block-head h4 { font-size: 14px; line-height: 1.7; margin: 0; }
.ref-body, .ref-body .mdbox { font-size: 14px; line-height: 1.9; }
.ref-body .mdbox { padding: 12px 16px 18px; }
.ref-body details summary { padding: 12px 14px; line-height: 1.7; }
.stage { padding: 16px 18px; font-size: 13px; line-height: 1.8; }
.genprog-meta, .genprog-rem, .genprog .past { font-size: 13px; line-height: 1.8; }
.modal label { font-size: 14px; line-height: 1.7; margin-top: 16px; margin-bottom: 8px; }
.modal input:not([type=checkbox]):not([type=radio]), .modal select, .modal textarea { padding: 11px 13px; line-height: 1.7; }
.modal-desc, .hint, .sec-d, .sec-block, .zd-loop-note { font-size: 13px; line-height: 1.9; }
.sec-block { padding: 16px 18px; }
.foundation section > h4 { padding: 14px 18px; line-height: 1.7; }
.foundation .mdbox { padding: 16px 18px 22px; line-height: 1.9; }
.modal .toolbar { gap: 10px; margin-top: 20px; padding-bottom: 4px; flex-wrap: wrap; }
.hub-content { padding-bottom: 32px; }
.hub-navi, .loop-mode-tab { font-size: 14px; line-height: 1.7; }
.loop-item { padding: 15px 16px; }
.sk-list .sk-item { padding: 13px 14px; font-size: 14px; line-height: 1.7; }
.zd-sidebar-example { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; margin-top: 18px; padding: 12px 10px; width: 100%; text-align: left; border: 1px solid #e5eaf5; border-radius: 10px; background: #fafbff; color: #37445c; }
.zd-sidebar-example img { width: 32px; height: 48px; object-fit: cover; border-radius: 4px; }
.zd-sidebar-example span { min-width: 0; }
.zd-sidebar-example strong { display: block; font-size: 13px; line-height: 1.7; overflow-wrap: anywhere; }
.zd-sidebar-example small { display: block; margin-top: 4px; font-size: 12px; line-height: 1.7; color: #8190a8; }
.zd-sidebar-example:hover { border-color: #b8caf5; background: #f1f5ff; }
@media(max-width:720px) {
  .zd-sidebar-example { grid-column: 1/-1; margin-top: 8px; }
  .chap-row { padding: 17px 16px; }
  .ref-body .mdbox { padding: 12px 14px 18px; }
  .view-ops { padding: 56px 16px 24px; }
}
.loop-item .loop-desc, .loop-item .loop-ord { font-size: 13px; line-height: 1.8; }
.loop-item .loop-acts button { font-size: 12px; min-height: 32px; padding: 6px 9px; }
.field-hint { font-size: 13px; line-height: 1.8; margin-bottom: 8px; }
@media(max-width:720px) { .loop-item { flex-wrap: wrap; } .sk-grid { grid-template-columns: minmax(0,1fr); } }
/* Novel-only library rail: stable cover column and uncompressed work labels. */
@media(min-width:721px) {
  :root { --dock-w: 232px; }
  .dock { width: var(--dock-w); min-width: var(--dock-w); flex: 0 0 var(--dock-w); }
  .dock-section { padding: 24px 16px 18px; }
}
.book-item { min-height: 84px; padding: 11px 24px 11px 54px; gap: 4px; }
.book-item::before { left: 2px; top: 12px; width: 36px; height: 56px; }
.bk-title { display: block; -webkit-line-clamp: unset; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 13px; line-height: 1.6; }
.bk-kind, .bk-meta { font-size: 12px; line-height: 1.6; }
.book-menu-btn { top: 13px; right: 1px; }
.zd-sidebar-example { position: relative; gap: 14px; min-height: 84px; padding: 11px 4px; margin-top: 18px; border-color: transparent; border-radius: 8px; background: #fff; }
.zd-sidebar-example img { flex: 0 0 36px; width: 36px; height: 56px; box-shadow: 0 2px 6px #26324918; }
.zd-sidebar-example span { flex: 1; overflow: hidden; }
.zd-sidebar-example strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 13px; line-height: 1.6; }
.zd-sidebar-example small { margin-top: 3px; white-space: nowrap; font-size: 12px; line-height: 1.6; }
.zd-sidebar-example .zd-example-state { color: #4e83ed; }
.zd-example-state::before { content: ''; display: inline-block; width: 6px; height: 6px; margin-right: 5px; border-radius: 50%; background: currentColor; }
@media(max-width:720px) { .zd-sidebar-example { margin-top: 8px; } }
@media(min-width:721px) { :root { --dock-w: 248px; } .dock { width: var(--dock-w); min-width: var(--dock-w); flex-basis: var(--dock-w); } }
.book-menu-btn { position: absolute !important; z-index: 5; top: 20px !important; right: 4px !important; display: grid !important; place-items: center; width: 30px !important; height: 30px; padding: 0; border: 1px solid #e8edf5 !important; border-radius: 7px !important; background: #fff !important; color: #71819a !important; font-size: 18px !important; opacity: 1 !important; }
.book-menu-btn:hover, .book-row.menu-open .book-menu-btn { border-color: #d6e1f8 !important; background: #f3f6fd !important; color: #2863f5 !important; }
.book-menu-pop { z-index: 20 !important; right: 3px !important; top: 54px !important; }
.zd-sidebar-more { position: absolute; top: 13px; right: 1px; display: grid; place-items: center; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 6px; background: transparent; color: #71819a; font-size: 19px; line-height: 1; }
.zd-sidebar-more:hover, .zd-sidebar-more[aria-expanded="true"] { background: #edf2fb; color: #2863f5; }
.zd-sidebar-menu { position: absolute; z-index: 25; top: 42px; right: 0; display: grid; min-width: 148px; padding: 5px; border: 1px solid #e3e9f3; border-radius: 9px; background: #fff; box-shadow: 0 10px 28px #24365320; }
.zd-sidebar-menu button { padding: 9px 10px; border: 0; border-radius: 6px; background: #fff; color: #42536e; text-align: left; font-size: 13px; }
.zd-sidebar-menu button:hover { background: #f3f6fc; color: #2863f5; }
@media(max-width:720px) { :root { --dock-w: 166px; } .book-menu-btn { top: 10px !important; width: 27px !important; height: 27px; } }
/* Compact navigation above the user's library, matching the supplied rail reference. */
.zd-novel-shortcuts { display: grid; gap: 3px; flex: 0 0 auto; padding: 0 0 12px; margin: 0 0 14px; border-bottom: 1px solid #edf0f6; }
.zd-shortcut { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 33px; padding: 5px 10px; border: 0; border-radius: 7px; background: transparent; color: #62738e; text-align: left; text-decoration: none; font: 500 13px/1.5 var(--font-ui); cursor: pointer; }
.zd-shortcut:hover { background: #f5f7fc; color: #2863f5; }
.zd-shortcut.is-current { background: #edf3ff; color: #2863f5; font-weight: 650; }
.zd-shortcut-icon { display: grid; place-items: center; width: 18px; flex: 0 0 18px; font-size: 16px; line-height: 1; }
.dock-section > .dock-heading { margin-bottom: 12px; }
.dock-section > .dock-new { margin-bottom: 10px; }
.dock-section > .zd-book-search { min-height: 32px; }
@media(max-width:720px) {
  .zd-novel-shortcuts { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 3px; padding-bottom: 8px; margin-bottom: 9px; }
  .zd-shortcut { justify-content: center; gap: 5px; min-height: 32px; padding: 4px; font-size: 12px; }
  .zd-shortcut-icon { width: 15px; flex-basis: 15px; font-size: 14px; }
}
/* Refined icon navigation: consistent line weight, alignment and active state. */
.zd-novel-shortcuts { gap: 3px; padding: 2px 0 13px; margin-bottom: 15px; }
.zd-shortcut { min-height: 38px; gap: 11px; padding: 5px 9px; border-radius: 8px; color: #5c6d88; font-size: 13px; font-weight: 550; }
.zd-shortcut-icon { width: 28px; height: 28px; flex-basis: 28px; border-radius: 7px; background: #f4f6fa; color: #667893; }
.zd-shortcut-icon svg { display: block; width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.zd-shortcut:hover { background: #f7f9fd; color: #315fce; }
.zd-shortcut.is-current { background: #edf3ff; color: #2863f5; font-weight: 650; }
.zd-shortcut.is-current .zd-shortcut-icon { background: #fff; color: #2863f5; box-shadow: 0 1px 3px #244b9210; }
.zd-shortcut-settings { margin-top: 3px; border-top: 1px solid #eff2f7; border-radius: 0 0 8px 8px; padding-top: 8px; }
@media(max-width:720px) {
 .zd-novel-shortcuts { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 4px; padding: 0 0 9px; margin-bottom: 10px; }
 .zd-shortcut { justify-content: flex-start; min-height: 35px; gap: 7px; padding: 4px 6px; font-size: 12px; }
 .zd-shortcut-icon { width: 25px; height: 25px; flex-basis: 25px; }
 .zd-shortcut-icon svg { width: 15px; height: 15px; }
 .zd-shortcut-settings { margin-top: 0; border-top: 0; padding-top: 4px; }
}
/* Follow the compact four-link rail from the latest user reference. */
@media(min-width:721px) { :root { --dock-w: 224px; } .dock { width: var(--dock-w); min-width: var(--dock-w); flex-basis: var(--dock-w); } }
.zd-novel-shortcuts { gap: 2px; padding: 0 0 13px; margin: 0 0 14px; border-bottom: 1px solid #e9edf4; }
.zd-shortcut { min-height: 36px; gap: 9px; padding: 5px 9px; border-radius: 7px; color: #61728d; font-size: 13px; font-weight: 550; }
.zd-shortcut-icon { width: 22px; height: 22px; flex-basis: 22px; border-radius: 0; background: transparent; color: #697d9c; }
.zd-shortcut-icon svg { width: 17px; height: 17px; stroke-width: 1.9; }
.zd-shortcut:hover { background: #f6f8fc; color: #2863f5; }
.zd-shortcut.is-current { background: #edf3ff; color: #2863f5; font-weight: 650; }
.zd-shortcut.is-current .zd-shortcut-icon { background: transparent; color: #2863f5; box-shadow: none; }
.dock-section > .dock-heading { margin: 0 0 10px; }
.dock-section > .dock-heading .dock-local-note { display: none; }
.dock-section > .dock-new { min-height: 40px; margin-bottom: 10px; }
.zd-sidebar-example { margin-top: 14px; }
@media(max-width:720px) {
 .zd-novel-shortcuts { grid-template-columns: 1fr; gap: 2px; padding-bottom: 10px; margin-bottom: 11px; }
 .zd-shortcut { justify-content: flex-start; min-height: 35px; gap: 9px; padding: 4px 8px; font-size: 12px; }
 .zd-shortcut-icon { width: 20px; height: 20px; flex-basis: 20px; }
 .zd-shortcut-icon svg { width: 16px; height: 16px; }
}
/* Search stays tucked beside the library title until requested. */
.dock-section > .dock-heading { display: flex; align-items: center; flex-wrap: wrap; gap: 0 8px; }
.dock-heading > .dock-label { margin-right: auto; }
.zd-search-toggle { display: grid; place-items: center; flex: 0 0 30px; width: 30px; height: 30px; padding: 0; border: 1px solid transparent; border-radius: 7px; background: transparent; color: #7b89a0; cursor: pointer; }
.zd-search-toggle:hover, .zd-search-toggle[aria-expanded="true"] { border-color: #e6ebf3; background: #f6f8fc; color: #2863f5; }
.zd-search-toggle svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.dock-section > .zd-book-search { flex: 0 0 100%; width: 100%; margin: 8px 0 1px; }
.dock-section > .zd-book-search[hidden] { display: none !important; }
#book-list > .dock-empty { padding: 12px 3px; color: #8492a8; font-size: 12px; line-height: 1.7; }
.dock-section > .zd-book-search { flex: 0 0 auto; align-self: stretch; }
/* Novel-specific destinations and vertically centered search control. */
.zd-shortcut { min-height: 41px; gap: 10px; padding: 6px 10px; font-size: 14px; }
.zd-shortcut-icon { width: 24px; height: 24px; flex-basis: 24px; }
.zd-shortcut-icon svg { width: 18px; height: 18px; }
.zd-book-search { min-height: 36px; gap: 8px; }
.zd-book-search > span { display: grid; place-items: center; flex: 0 0 16px; width: 16px; height: 18px; font-size: 0; line-height: 1; }
.zd-book-search > span svg { display: block; width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; }
.zd-book-search input { height: 28px; padding: 0; line-height: 1.4; font-size: 12px; }
@media(max-width:720px) { .zd-shortcut { min-height: 38px; font-size: 13px; } }
.zd-works-create { min-height: 40px; margin: 0 0 14px; padding-inline: 16px; }
.zd-works-list { display: grid; gap: 9px; }
.zd-works-row { display: grid; grid-template-columns: 40px minmax(100px,1fr); align-items: center; gap: 12px; padding: 11px; border: 1px solid #e8edf5; border-radius: 10px; background: #fff; }
.zd-works-cover { width: 40px; height: 60px; border-radius: 5px; background: url('/assets/novel-editorial/cover-1.webp') center/cover; box-shadow: 0 2px 6px #26324918; }
.zd-works-copy { display: grid; gap: 5px; min-width: 0; }
.zd-works-copy strong { overflow: hidden; color: #2c3d59; font-size: 14px; line-height: 1.6; text-overflow: ellipsis; white-space: nowrap; }
.zd-works-copy small { color: #8492a8; font-size: 12px; line-height: 1.6; }
.zd-works-actions { grid-column: 2; display: flex; flex-wrap: wrap; gap: 6px; }
.zd-works-actions button { min-height: 30px; padding: 4px 9px; border: 1px solid #e6ebf3; border-radius: 6px; background: #fff; color: #60718b; font-size: 12px; }
.zd-works-actions button:hover { border-color: #cfdbf3; background: #f5f8ff; color: #2863f5; }
.zd-works-actions button.is-danger { color: #b65d63; }
.zd-works-actions button.is-danger:hover { border-color: #f0d6d7; background: #fff7f7; color: #a74349; }
.hud-actions button[onclick="openLogs()"] { display: none !important; }
