* { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --primary: #1a1a1a;
  --primary-hover: #333;
  --text-1: #1a1a1a;
  --text-2: #555;
  --text-3: #888;
  --border: #e6e6e6;
  --bg: #f5f5f5;
  --card-bg: #fff;
  --surface: #fff;
  --surface-hover: #f0f0f0;
  --surface-alt: #fafafa;
  --surface-code: #f6f8fa;
  --shadow: rgba(0,0,0,0.12);
}

[data-theme="dark"] {
  --primary: #e0e0e0;
  --primary-hover: #ccc;
  --text-1: #e8e8e8;
  --text-2: #aaa;
  --text-3: #777;
  --border: #333;
  --bg: #141414;
  --card-bg: #1e1e1e;
  --surface: #1e1e1e;
  --surface-hover: #2a2a2a;
  --surface-alt: #252525;
  --surface-code: #252525;
  --shadow: rgba(0,0,0,0.4);
}
body { font-family: -apple-system, 'Noto Sans SC', 'PingFang SC', sans-serif;
  color: var(--text-1); background: var(--bg); transition: background .3s, color .3s; }

/* ── Topbar ── */
#topbar { height: 52px; display: flex; align-items: center; padding: 0 20px;
  background: var(--surface); border-bottom: 1px solid var(--border); gap: 24px;
  transition: background .3s; }
.logo { font-weight: 700; color: var(--text-1); text-decoration: none; font-size: 16px; }
.topbar-nav { display: flex; gap: 4px; margin-left: 16px; }
.nav-item { padding: 6px 14px; border-radius: 6px; text-decoration: none;
  color: var(--text-2); font-size: 14px; font-weight: 500; transition: all .15s; }
.nav-item:hover { background: var(--surface-hover); color: var(--text-1); }
.nav-item.active { background: var(--primary); color: #fff; }

/* ── Toast ── */
#toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(80px);
  padding: 10px 20px; border-radius: 8px; font-size: 13px; font-weight: 500;
  background: #333; color: #fff; opacity: 0; transition: all .3s; z-index: 9999;
  pointer-events: none; white-space: nowrap; }
#toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }
#toast.toast-error { background: #d32f2f; }
#toast.toast-success { background: #2e7d32; }
#toast.toast-warning { background: #ed6c02; }

/* ── Page ── */
.page { max-width: 960px; margin: 32px auto; padding: 0 20px; }
.page h1 { font-size: 22px; margin-bottom: 20px; }
.page-header { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 24px; }
.page-desc { color: var(--text-3); font-size: 14px; margin-top: 4px; }
.page-actions { margin-top: 24px; text-align: right; }
.empty { color: #888; }

/* ── Grid / Cards ── */
.list-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.list-header h1 { font-size: 22px; margin: 0; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.card-wrap { position: relative; }
.card { display: block; background: var(--card-bg); border: 1px solid var(--border); border-radius: 10px;
  padding: 16px; text-decoration: none; color: inherit; transition: border-color .2s, background .3s; }
.card:hover { border-color: #999; }
.card h3 { font-size: 15px; margin-bottom: 10px; }
.card .meta { display: flex; justify-content: space-between; font-size: 12px; color: #888; }
.card-del { position: absolute; top: 8px; right: 8px; width: 24px; height: 24px;
  border: none; border-radius: 50%; background: transparent; color: #bbb;
  font-size: 16px; line-height: 1; cursor: pointer; display: flex; align-items: center;
  justify-content: center; opacity: 0; transition: all .15s; }
.card-wrap:hover .card-del { opacity: 1; }
.card-del:hover { background: #fee2e2; color: #dc2626; }
[data-theme="dark"] .card-del:hover { background: #3d1f1f; color: #f87171; }

/* ── Board (两摞看板：进行中 / 已提交) ── */
.board { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
.board-col { background: var(--surface-alt); border: 1px solid var(--border); border-radius: 12px;
  padding: 14px; transition: background .15s, border-color .15s; }
.board-col.drag-over { border-color: var(--primary); background: var(--surface-hover); }
.col-head { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; padding: 0 2px;
  font-size: 14px; font-weight: 600; color: var(--text-2); }
.col-count { display: inline-flex; align-items: center; justify-content: center;
  min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px;
  background: var(--surface-hover); color: var(--text-3); font-size: 12px; font-weight: 600; }
.col-body { display: flex; flex-direction: column; gap: 10px; min-height: 64px; }
.col-empty { color: var(--text-3); font-size: 13px; text-align: center; padding: 22px 12px;
  border: 1px dashed var(--border); border-radius: 8px; }
.card-wrap[draggable="true"] { cursor: grab; }
.card-wrap[draggable="true"]:active { cursor: grabbing; }
.card-wrap.dragging { opacity: .45; }
.card .meta .sub { color: var(--text-3); }

@media (max-width: 680px) {
  .board { grid-template-columns: 1fr; }
}

/* ── Empty State ── */
.empty-state { text-align: center; padding: 80px 0; }
.empty-text { color: #888; font-size: 16px; margin-bottom: 20px; }

/* ── Dialog (lightweight modal) ── */
.dialog-overlay { position: fixed; inset: 0; z-index: 10000; background: rgba(0,0,0,0.3);
  display: flex; align-items: center; justify-content: center;
  animation: dialog-fade-in .15s ease; }
.dialog { background: var(--card-bg); border-radius: 14px; padding: 24px; width: 380px; max-width: 90vw;
  box-shadow: 0 16px 48px var(--shadow); }
.dialog-header { font-size: 17px; font-weight: 600; margin-bottom: 16px; }
.dialog-body { margin-bottom: 20px; }
.dialog-body p { margin: 6px 0; font-size: 14px; color: var(--text-2); }
.dialog-hint { color: #888 !important; font-size: 13px !important; }
.dialog-footer { display: flex; justify-content: flex-end; gap: 10px; }
.btn-danger { padding: 9px 20px; background: #dc2626; color: #fff; border: none;
  border-radius: 8px; font-size: 14px; font-weight: 500; cursor: pointer; transition: background .2s; }
.btn-danger:hover { background: #b91c1c; }
.btn-danger:disabled { opacity: .5; cursor: not-allowed; }
@keyframes dialog-fade-in { from { opacity: 0; } to { opacity: 1; } }

/* ── Settings ── */
.settings-page h1 { margin-bottom: 4px; }
.settings-card { background: var(--card-bg); border: 1px solid var(--border); border-radius: 12px;
  padding: 24px; margin-bottom: 20px; }
.card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.card-header h2 { font-size: 16px; font-weight: 600; }
.card-desc { color: var(--text-3); font-size: 13px; margin-bottom: 16px; }

/* Status Badge */
.status-badge { font-size: 12px; padding: 3px 10px; border-radius: 20px;
  background: var(--surface-hover); color: var(--text-3); font-weight: 500; }
.status-badge.status-ok { background: #e8f5e9; color: #2e7d32; }
.status-badge.status-error { background: #fbe9e7; color: #d32f2f; }

/* Form */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 13px; font-weight: 500; color: var(--text-2); margin-bottom: 6px; }
.input { width: 100%; padding: 9px 12px; border: 1px solid var(--border); border-radius: 8px;
  font-size: 14px; outline: none; transition: border-color .2s; background: var(--card-bg); color: var(--text-1); }
.input:focus { border-color: #999; }
.input[readonly] { background: var(--surface-alt); color: var(--text-3); }

.input-with-action { display: flex; gap: 8px; align-items: center; }
.input-with-action .input { flex: 1; }
.btn-icon { background: none; border: 1px solid var(--border); border-radius: 8px;
  padding: 8px 10px; cursor: pointer; font-size: 14px; }
.btn-icon:hover { background: var(--surface-hover); }

/* Radio Group */
.radio-group { display: flex; gap: 8px; flex-wrap: wrap; }
.radio-item { display: flex; align-items: center; gap: 6px; padding: 8px 14px;
  border: 1px solid var(--border); border-radius: 8px; cursor: pointer;
  font-size: 13px; transition: all .15s; }
.radio-item:hover { border-color: #999; }
.radio-item.active { border-color: var(--primary); background: var(--surface-alt); font-weight: 500; }
.radio-item input { display: none; }

/* Test Row */
.test-row { display: flex; align-items: center; gap: 12px; margin-top: 12px; }
.test-result { font-size: 13px; color: var(--text-3); }
.test-result.ok { color: #2e7d32; }
.test-result.fail { color: #d32f2f; }

/* Buttons */
.btn-primary { padding: 9px 20px; background: var(--primary); color: #fff; border: none;
  border-radius: 8px; font-size: 14px; font-weight: 500; cursor: pointer; transition: background .2s; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-primary:disabled { opacity: .5; cursor: not-allowed; }
.btn-secondary { padding: 9px 20px; background: var(--card-bg); color: var(--text-1);
  border: 1px solid var(--border); border-radius: 8px; font-size: 14px;
  font-weight: 500; cursor: pointer; transition: all .2s; }
.btn-secondary:hover { border-color: #999; background: var(--surface-alt); }
.btn-secondary:disabled { opacity: .5; cursor: not-allowed; }

/* Current Model */
.current-model { font-size: 13px; padding: 4px 10px; background: var(--surface-hover);
  border-radius: 6px; color: var(--text-2); font-family: monospace; }

/* Model Catalog */
.model-group { margin-bottom: 20px; }
.model-group-title { font-size: 14px; font-weight: 600; color: var(--text-1); margin-bottom: 10px;
  padding-bottom: 6px; border-bottom: 1px solid var(--border); }
.model-category { margin-bottom: 14px; margin-left: 8px; }
.model-category-title { font-size: 12px; color: var(--text-3); margin-bottom: 6px; font-weight: 500; }
.model-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.model-pill { padding: 5px 12px; border: 1px solid var(--border); border-radius: 20px;
  font-size: 12px; background: var(--card-bg); cursor: pointer; transition: all .15s;
  display: inline-flex; align-items: center; gap: 4px; color: var(--text-1); }
.model-pill:hover { border-color: #999; background: var(--surface-alt); }
.model-pill.selected { border-color: var(--primary); background: var(--primary); color: #fff; }
.cap-badge { font-size: 10px; }

/* ── Workbench (Doc view) ── */
.wb { display: flex; min-height: calc(100vh - 52px); }
.side { width: 220px; background: var(--surface); border-right: 1px solid var(--border);
  padding: 18px; position: sticky; top: 52px; height: calc(100vh - 52px); overflow: auto;
  transition: background .3s; }
.back { color: var(--text-2); text-decoration: none; font-size: 13px; }
.side .title { font-weight: 700; margin: 14px 0; font-size: 14px; }
.side .exp { display: inline-block; margin: 8px 0 4px; font-size: 13px; color: var(--text-1);
  border: 1px solid var(--text-1); border-radius: 6px; padding: 5px 10px; text-decoration: none; }
.side .exp:hover { background: var(--text-1); color: var(--bg); }
.side ul { list-style: none; }
.side li a { display: block; padding: 7px 0; color: var(--text-2); text-decoration: none; font-size: 13px; }
.side li a:hover { color: var(--text-1); }

/* ── Doc Container: 1:1 mirror of disclosure HTML styles ── */
/* --ppc = 像素/厘米：正文列宽 = Word 版心 14.65cm；图片按厘米封顶，与导出 docx 完全对齐 */
.doc { flex: 1; --ppc: 52.15; max-width: calc(14.65 * var(--ppc) * 1px + 56px); margin: 0 auto; background: var(--card-bg); padding: 48px 28px 96px;
  line-height: 1.85; font-size: 15.5px; color: var(--text-1);
  font-family: -apple-system, BlinkMacSystemFont, 'Noto Sans SC', 'PingFang SC', sans-serif;
  transition: background .3s, color .3s; }

/* L1 章节标题 */
.doc h1 { font-size: 23px; text-align: center; border-bottom: 2px solid var(--text-1);
  padding-bottom: 14px; margin-bottom: 8px; }
.doc .subtitle { text-align: center; color: var(--text-3); font-size: 13px; margin-bottom: 28px; }

/* L1 h2 章节 */
.doc h2 { font-size: 18px; margin-top: 44px; margin-bottom: 12px;
  border-left: 4px solid #1f6feb; padding-left: 10px; border-bottom: none; padding-bottom: 0; }

/* L2 子章节 */
.doc h3 { font-size: 16px; margin-top: 30px; margin-bottom: 10px; color: var(--text-1); }

/* ── 章节模块标题：工作台在每个 .sec 顶部注入（源文里本无），进模块一眼知道在哪一章 ── */
.doc h2.sec-title {
  font-size: 20px; font-weight: 700; color: var(--text-1); line-height: 1.4;
  margin: 56px 0 18px; padding: 0 0 10px; border-left: none;
  border-bottom: 2px solid var(--text-1);
}
.doc .sec:first-of-type .sec-title { margin-top: 24px; }

/* ── 小节标题：前端从正文里认出的"A. xxx / 步骤 Sx"，明显大于正文、颜色实、蓝标记 ── */
.doc .sub-h {
  font-size: 17px; font-weight: 700; color: var(--text-1); line-height: 1.5;
  margin: 30px 0 8px; padding-left: 11px; border-left: 3px solid #1f6feb;
}
.doc .sec-content > .sub-h:first-child { margin-top: 6px; }

/* L3 段落标题 */
.doc h4 { font-size: 15px; font-weight: 700; margin-top: 22px; margin-bottom: 6px; color: var(--text-2); }
.doc h4.step { background: var(--surface-code); border: 1px solid var(--border); border-left: 3px solid #1f6feb;
  padding: 8px 12px; border-radius: 4px; margin-top: 28px; }
.doc h4.term-layer { font-size: 15px; font-weight: 700; margin-top: 24px; margin-bottom: 6px;
  background: none; border: none; padding: 0; border-left: none; }

/* L4 子环节 */
.doc h5 { font-size: 14px; font-weight: 700; margin-top: 18px; margin-bottom: 4px; color: var(--text-2); }

/* L5 结构标记 */
.doc .section-label { font-weight: 700; margin-top: 14px; margin-bottom: 4px; }

/* 术语章节 */
.doc .term-item { margin-top: 10px; margin-bottom: 4px; line-height: 1.85; }
.doc .term-name { font-weight: 700; }

/* 有益效果 */
.doc .effect-item { margin-bottom: 12px; }
.doc .effect-title { font-weight: 700; margin-top: 18px; margin-bottom: 4px; }

/* 表格引导 */
.doc .table-caption { font-weight: 700; margin-top: 14px; margin-bottom: 4px; }
.doc table caption { font-size: 12px; color: #999; text-align: center; caption-side: bottom; padding-top: 6px; margin-bottom: 14px; }

/* 图片：与导出 docx 同一套厘米上限——宽≤14cm(占版心95.6%)、高≤12cm，宽高比锁死，工作台/Word 尺寸一致 */
.doc img { display: block;
  max-width: min(100%, calc(14 * var(--ppc) * 1px)); max-height: calc(12 * var(--ppc) * 1px);
  width: auto; height: auto;
  margin: 14px auto; border: 1px solid var(--border); border-radius: 8px; }
/* Mermaid：与导出 docx 同尺，宽≤14cm、高≤18cm */
.doc pre.mermaid svg { max-width: min(100%, calc(14 * var(--ppc) * 1px)); max-height: calc(18 * var(--ppc) * 1px); height: auto; }

/* 正文元素 */
.doc p { margin: 10px 0; text-indent: 2em; }
/* 标题 / 图例 / 标签 / 小节标题不缩进——只正文段首行缩进，与导出 docx 一致 */
.doc p.fig-caption, .doc p.section-label, .doc p.table-caption,
.doc p.effect-title, .doc .sub-h { text-indent: 0; }
.doc ul { margin: 8px 0; padding-left: 22px; }
.doc ul.sub { margin: 4px 0; }
.doc li { margin: 4px 0; }
.doc table { border-collapse: collapse; width: 100%; margin: 14px 0; font-size: 13.5px; }
.doc th, .doc td { border: 1px solid var(--border); padding: 6px 9px; text-align: left; vertical-align: top; }
.doc th { background: var(--surface-code); font-weight: 600; }
/* 成对状态图：2 列表格左右并排——去边框、居中、标签灰色小字、列宽均分 */
.doc table.fig-pair { width: 100%; table-layout: fixed; border: none; margin: 16px 0; }
.doc table.fig-pair th, .doc table.fig-pair td { border: none; text-align: center; vertical-align: top; padding: 4px 8px; }
.doc table.fig-pair th { background: none; color: var(--text-3); font-size: 13px; font-weight: 600; }
.doc table.fig-pair img { margin: 4px auto; }
.doc blockquote { margin: 14px 0; padding: 10px 14px; background: var(--surface-alt);
  border-left: 3px solid var(--border); color: var(--text-2); font-size: 13.5px; }
.doc .ph { color: #bbb; }
.doc pre.mermaid { background: var(--surface-alt); border: 1px solid var(--border); border-radius: 6px;
  padding: 16px; text-align: center; margin: 16px 0; overflow-x: auto; }

/* 元信息表 */
.doc .meta { margin: 18px 0 8px; font-size: 14px; }
.doc .meta td:first-child { background: var(--surface-code); font-weight: 600; width: 130px; white-space: nowrap; }

/* 图片插槽 */
.doc .fig-slot { margin: 16px 0; }
.doc .fig-placeholder { border: 1.5px dashed var(--border); border-radius: 8px; padding: 34px 16px;
  text-align: center; cursor: pointer; background: var(--surface-alt); transition: .15s; }
.doc .fig-placeholder:hover { border-color: #1f6feb; background: var(--surface-hover); }
.doc .fig-hint { display: block; color: #666; font-size: 13px; }
.doc .fig-label { display: block; color: #999; font-size: 12px; margin-top: 6px; }
.doc .fig-preview { max-width: 100%; border: 1px solid #e5e5e5; border-radius: 8px;
  display: block; margin: 0 auto; }

/* 图例文字（"图 X：xxx" / "(参见图 X:xxx)"）— 与导出 docx 视觉对齐：12px / #999 / 居中 */
.doc p.fig-caption { font-size: 12px; color: #999; text-align: center;
  margin: 4px 0 14px; line-height: 1.5; }

/* ── Section Actions & Editing ── */
.sec { position: relative; margin-bottom: 16px; border-radius: 6px; transition: background 0.2s; }
.sec.sec-active { background: rgba(22, 119, 255, 0.04); }
[data-theme="dark"] .sec.sec-active { background: rgba(22, 119, 255, 0.08); }
.sec-actions { position: absolute; right: -110px; top: 0;
  display: flex; flex-direction: column; gap: 6px;
  opacity: 0; transition: opacity 0.15s;
  user-select: none; -webkit-user-select: none; }
.sec:hover .sec-actions { opacity: 1; }
.act { font: inherit; font-size: 12px; padding: 4px 10px; border: 1px solid var(--border);
  border-radius: 6px; background: var(--card-bg); cursor: pointer; transition: all 0.15s;
  white-space: nowrap; color: var(--text-1); }
.act:hover { border-color: #888; background: var(--surface-hover); }

/* TinyMCE rich text editor */
.tinymce-wrap { margin: 8px 0; border-radius: 8px; overflow: hidden; }
.tox-tinymce { border-radius: 8px !important; border-color: var(--border) !important; }
.tox .tox-toolbar__primary { background: var(--surface-alt) !important; }

/* Legacy editing (source code fallback) */
.editing { min-height: 160px; white-space: pre-wrap; font-family: ui-monospace, Menlo, monospace;
  font-size: 13px; border: 1px solid var(--border); border-radius: 8px; padding: 12px;
  background: var(--surface-alt); outline: none; color: var(--text-1); }
.editing:focus { outline: 2px solid #999; }

/* ── AI Panel (right-side drawer) ── */
.ai-drawer {
  position: fixed; top: 52px; right: 0; z-index: 200;
  width: 380px; height: calc(100vh - 52px);
  background: var(--card-bg); border-left: 1px solid var(--border);
  box-shadow: -4px 0 24px var(--shadow);
  display: flex; flex-direction: column;
  transform: translateX(100%); transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}
.ai-drawer.open { transform: translateX(0); }

.ai-drawer-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.ai-drawer-title { font-size: 15px; font-weight: 600; }
.ai-drawer-close {
  background: none; border: none; font-size: 20px; cursor: pointer;
  color: var(--text-3); padding: 4px 8px; border-radius: 6px; line-height: 1;
}
.ai-drawer-close:hover { background: var(--surface-hover); color: var(--text-1); }

.ai-drawer-body {
  flex: 1; overflow-y: auto; padding: 16px 20px;
  display: flex; flex-direction: column; gap: 12px;
}

.ai-drawer .preset {
  display: block; width: 100%; text-align: left; padding: 10px 12px;
  border: 1px solid var(--border); border-radius: 8px;
  background: var(--surface-alt); cursor: pointer;
  transition: all 0.15s; font-size: 13px; color: var(--text-1); line-height: 1.5;
}
.ai-drawer .preset:hover { border-color: #1677ff; background: var(--surface-hover); color: #1677ff; }

.ai-drawer #ai-instr {
  width: 100%; min-height: 80px; padding: 10px 12px;
  border: 1px solid var(--border); border-radius: 8px;
  font: inherit; font-size: 13px; resize: vertical;
  box-sizing: border-box; background: var(--card-bg); color: var(--text-1); line-height: 1.6;
}
.ai-drawer #ai-instr:focus { border-color: #1677ff; outline: none; box-shadow: 0 0 0 2px rgba(22,119,255,0.1); }

.ai-drawer #ai-run {
  padding: 10px 20px; background: var(--primary); color: #fff;
  border: none; border-radius: 8px; cursor: pointer; font-size: 14px; font-weight: 500;
  align-self: flex-start; transition: background 0.15s;
}
.ai-drawer #ai-run:hover { background: var(--primary-hover); }

.ai-drawer .diff { display: flex; flex-direction: column; gap: 12px; margin: 4px 0; }
.ai-drawer .diff .col { min-width: 0; }
.ai-drawer .diff .col h4 { font-size: 13px; margin-bottom: 6px; font-weight: 600; color: var(--text-2); }
.ai-drawer .diff .box {
  border: 1px solid var(--border); border-radius: 8px; padding: 12px;
  max-height: 35vh; overflow: auto; background: var(--surface-alt);
  font-size: 13px; line-height: 1.7;
}
.ai-drawer .diff-actions { display: flex; gap: 8px; margin-top: 4px; }

.ai-err { color: #b00; margin: 8px 0; }
.ai-wait { color: #666; margin: 8px 0; }

/* ═══════════════════════════════════════════════════
   朱雀检测模式
   ═══════════════════════════════════════════════════ */
.zhuque-btn { margin-top: 8px; background: #f0f7ff; color: #1677ff; border: 1px solid #91caff; }
.zhuque-btn:hover { background: #e6f4ff; }

.zq-loading { text-align: center; padding: 60px 0; color: #666; font-size: 16px; }

.zq-page { max-width: 860px; margin: 0 auto; padding: 24px 16px; }

.zq-bar {
  position: sticky; top: 0; z-index: 100;
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  padding: 12px 20px; margin-bottom: 20px;
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  box-shadow: 0 2px 8px var(--shadow);
}
.zq-title { font-weight: 600; font-size: 15px; }
.zq-stat { font-size: 13px; color: #666; display: flex; align-items: center; gap: 10px; }
.zq-actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.zq-batch-btn { font-size: 12px !important; }
.zq-batch-btn.zq-batch-red { background: #fff1f0 !important; color: #cf1322 !important; border: 1px solid #ffa39e !important; }
.zq-batch-btn.zq-batch-red:hover { background: #ffccc7 !important; }
.zq-batch-btn.zq-batch-yellow { background: #fffbe6 !important; color: #ad6800 !important; border: 1px solid #ffe58f !important; }
.zq-batch-btn.zq-batch-yellow:hover { background: #fff1b8 !important; }
.zq-batch-btn:disabled { opacity: 0.6; cursor: not-allowed; }
.zq-exit { background: #f5f5f5 !important; color: #666 !important; }
.zq-exit:hover { background: #e8e8e8 !important; }

.zq-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; }
.zq-dot.zq-red { background: #ff4d4f; }
.zq-dot.zq-yellow { background: #faad14; }
.zq-dot.zq-green { background: #52c41a; }

.zq-list { display: flex; flex-direction: column; gap: 12px; }

.zq-frag {
  border: 1px solid var(--border); border-radius: 10px; overflow: hidden;
  transition: box-shadow 0.2s;
}
.zq-frag:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
.zq-frag.zq-red { border-left: 4px solid #ff4d4f; }
.zq-frag.zq-yellow { border-left: 4px solid #faad14; }
.zq-frag.zq-green { border-left: 4px solid #52c41a; }

.zq-frag-header {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px; background: var(--surface-alt); border-bottom: 1px solid var(--border);
}
.zq-frag-label { font-weight: 500; font-size: 14px; }
.zq-aigc { font-size: 13px; font-family: monospace; }
.zq-frag.zq-red .zq-aigc { color: #ff4d4f; }
.zq-frag.zq-yellow .zq-aigc { color: #d48806; }
.zq-frag.zq-green .zq-aigc { color: #389e0d; }
.zq-edited-badge {
  font-size: 11px; background: #e6f4ff; color: #1677ff;
  padding: 2px 8px; border-radius: 4px; font-weight: 500;
}

.zq-frag-body { padding: 12px 16px; }
.zq-text {
  white-space: pre-wrap; word-break: break-word;
  font-size: 14px; line-height: 1.7; color: var(--text-1);
  margin: 0; font-family: inherit; background: none; border: none;
  max-height: 300px; overflow-y: auto;
}

.zq-frag-footer { padding: 8px 16px; border-top: 1px solid var(--border); }
.zq-edit-btn { font-size: 13px; }

/* 编辑模式下的原文参考（只读，灰化区分） */
.zq-text-ref {
  opacity: 0.55;
  border-left: 3px solid #d9d9d9;
  padding-left: 12px;
  margin-bottom: 12px;
}

.zq-textarea {
  width: 100%; min-height: 150px; padding: 12px;
  font-size: 14px; line-height: 1.7; font-family: inherit;
  border: 1px solid var(--border); border-radius: 6px; resize: vertical;
  color: var(--text-1); background: var(--card-bg);
}
.zq-textarea:focus { outline: none; border-color: #1677ff; box-shadow: 0 0 0 2px rgba(22,119,255,0.1); }

/* 朱雀筛选 tabs */
.zq-tabs { display: flex; gap: 4px; }
.zq-tab {
  padding: 4px 12px; border-radius: 6px; font-size: 13px;
  border: 1px solid var(--border); background: var(--card-bg); cursor: pointer;
  color: var(--text-2); transition: all 0.15s;
}
.zq-tab:hover { background: var(--surface-hover); }
.zq-tab.active { background: #1677ff; color: #fff; border-color: #1677ff; }

.zq-hidden { display: none !important; }

/* 朱雀侧边栏片段导航 */
.zq-side-list { list-style: none; padding: 0; margin: 12px 0; }
.zq-side-list li { margin: 0; }
.zq-side-item {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 12px; font-size: 13px; color: #333;
  text-decoration: none; border-radius: 6px; transition: background 0.15s;
}
.zq-side-item:hover { background: var(--surface-hover); }
.zq-side-aigc { margin-left: auto; font-size: 11px; font-family: monospace; color: #999; }
.zq-side-item.zq-red .zq-side-aigc { color: #ff4d4f; }
.zq-side-item.zq-yellow .zq-side-aigc { color: #d48806; }
.zq-side-item.zq-green .zq-side-aigc { color: #389e0d; }

.zq-exit-side { background: var(--surface-hover); color: var(--text-2); margin-top: 8px; text-align: center; }
.zq-exit-side:hover { background: var(--surface-alt); }

/* 朱雀 doc 区域 */
.zq-doc { padding-top: 0 !important; }
.zq-doc .zq-bar { margin: 0 0 16px; }

/* 朱雀 AI 降重面板 */
.zq-ai-panel { padding: 4px 0; }
.zq-ai-presets { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.zq-ai-presets .preset {
  font-size: 12px; padding: 4px 10px; border-radius: 4px;
  border: 1px solid var(--border); background: var(--surface-alt); cursor: pointer;
  color: var(--text-1);
}
.zq-ai-presets .preset:hover { border-color: #1677ff; color: #1677ff; }
.zq-ai-instr {
  width: 100%; min-height: 60px; padding: 8px; font-size: 13px;
  border: 1px solid var(--border); border-radius: 6px; resize: vertical;
  margin-bottom: 8px; background: var(--card-bg); color: var(--text-1);
}
.zq-ai-instr:focus { outline: none; border-color: #1677ff; }
.zq-ai-diff { margin: 12px 0; border: 1px solid var(--border); border-radius: 6px; padding: 12px; background: var(--surface-alt); }
.zq-ai-actions { display: flex; gap: 8px; margin-top: 8px; }
.zq-frag-footer { display: flex; gap: 8px; }

/* ── 朱雀批量改写可视化 ── */

/* 进度轨道 */
.zq-progress-track {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 8px 0; animation: zq-track-in 0.3s ease;
}
.zq-progress-nodes { display: flex; gap: 6px; align-items: center; }
.zq-node {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--border); transition: all 0.3s ease;
}
.zq-node-done { background: #52c41a; transform: scale(1); }
.zq-node-active { background: #1677ff; animation: zq-node-pulse 1.2s infinite; }
.zq-node-error { background: #ff4d4f; }
.zq-progress-bar { flex: 1; height: 3px; background: var(--surface-hover); border-radius: 2px; overflow: hidden; }
.zq-progress-fill { height: 100%; background: linear-gradient(90deg, #1677ff, #69b1ff); width: 0; transition: width 0.5s ease; border-radius: 2px; }
.zq-progress-label { font-size: 13px; color: #666; white-space: nowrap; min-width: 80px; }
.zq-progress-label.zq-done { color: #52c41a; font-weight: 500; }
.zq-pause-btn { font-size: 12px !important; padding: 4px 12px !important; }

/* 卡片批量改写状态 */
.zq-frag.zq-rewriting {
  box-shadow: 0 0 0 2px #1677ff, 0 0 16px rgba(22,119,255,0.12);
  transition: box-shadow 0.3s ease;
}
.zq-frag.zq-dimmed { opacity: 0.45; transition: opacity 0.3s ease; pointer-events: none; }
.zq-frag.zq-flash-done { animation: zq-flash 0.8s ease forwards; }

/* 文本淡出/打字机 */
.zq-fadeout { opacity: 0; transition: opacity 0.3s ease; }
.zq-typewriter {
  border-left: 2px solid #1677ff; padding-left: 12px;
  animation: zq-cursor-blink 0.8s step-end infinite;
}
.zq-typewriter.zq-type-done {
  border-left-color: transparent; animation: none;
}

/* Keyframes */
@keyframes zq-node-pulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(22,119,255,0.4); }
  50% { transform: scale(1.3); box-shadow: 0 0 0 4px rgba(22,119,255,0); }
}
@keyframes zq-flash {
  0% { box-shadow: 0 0 0 3px #52c41a, 0 0 20px rgba(82,196,26,0.25); }
  100% { box-shadow: 0 0 0 0 transparent; }
}
@keyframes zq-cursor-blink {
  0%, 100% { border-left-color: #1677ff; }
  50% { border-left-color: transparent; }
}
@keyframes zq-track-in {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── Export Progress Card (floating, non-modal) ── */
.export-card {
  position: fixed; bottom: 24px; right: 24px; z-index: 9999;
  width: 360px; background: var(--card-bg); border: 1px solid var(--border);
  border-radius: 12px; box-shadow: 0 8px 32px var(--shadow);
  padding: 16px 20px; transform: translateY(20px); opacity: 0;
  transition: all 0.3s ease; pointer-events: auto;
}
.export-card.ec-show { transform: translateY(0); opacity: 1; }
.export-card.ec-collapsed { padding: 12px 20px; }

.ec-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.ec-title { font-weight: 600; font-size: 14px; }
.ec-close { background: none; border: none; font-size: 16px; cursor: pointer; color: #999; padding: 2px 6px; border-radius: 4px; }
.ec-close:hover { color: var(--text-1); background: var(--surface-hover); }

.ec-steps { margin-bottom: 12px; }
.ec-step { font-size: 13px; padding: 4px 0; color: #999; transition: color 0.2s; }
.ec-step.ec-done { color: #2e7d32; }
.ec-step.ec-running { color: #1677ff; font-weight: 500; }
.ec-icon { display: inline-block; width: 20px; text-align: center; }

.ec-progress { height: 3px; background: var(--surface-hover); border-radius: 2px; overflow: hidden; margin-bottom: 4px; }
.ec-bar { height: 100%; background: #1677ff; width: 0; transition: width 0.5s ease; border-radius: 2px; }

.ec-result { margin-top: 10px; font-size: 13px; line-height: 1.6; }
.ec-fix-count { color: var(--text-1); font-weight: 500; margin-bottom: 8px; }
.ec-fixes { margin: 4px 0 0 16px; font-size: 12px; color: var(--text-2); list-style: disc; }
.ec-fixes li { margin-bottom: 3px; line-height: 1.5; }
.ec-ok { color: #2e7d32; }
.ec-warn { color: #ed6c02; font-size: 12px; }
.ec-err { color: #d32f2f; }
.ec-redownload { display: inline-block; margin-top: 10px; font-size: 12px; color: #1677ff; text-decoration: none; }
.ec-redownload:hover { text-decoration: underline; }

/* Sub-steps (per-section progress) */
.ec-substeps { margin: 4px 0 8px 20px; }
.ec-sub { font-size: 12px; padding: 2px 0; color: #999; }
.ec-sub-done { color: #2e7d32; }
.ec-sub-running { color: #1677ff; font-weight: 500; }
.ec-sub-warn { color: #ed6c02; }
.ec-sub-icon { display: inline-block; width: 16px; text-align: center; }
.ec-sub-fix { color: #1677ff; font-weight: 500; }

/* Fix detail sections */
.ec-fix-section { margin-bottom: 8px; }
.ec-fix-section-name { font-size: 12px; font-weight: 600; color: var(--text-1); }
.ec-result { margin-top: 10px; font-size: 13px; line-height: 1.6; max-height: 300px; overflow-y: auto; }

/* ── Theme Toggle ── */
.theme-toggle { margin-left: auto; background: none; border: none; font-size: 18px;
  cursor: pointer; padding: 6px; border-radius: 6px; line-height: 1;
  transition: background .15s; display: flex; align-items: center; justify-content: center; }
.theme-toggle:hover { background: var(--surface-hover); }

/* ── Dark mode specific overrides ── */
[data-theme="dark"] .nav-item.active { background: #e0e0e0; color: #1a1a1a; }
[data-theme="dark"] .btn-primary { background: #e0e0e0; color: #1a1a1a; }
[data-theme="dark"] .btn-primary:hover { background: #ccc; }
[data-theme="dark"] .model-pill.selected { background: #e0e0e0; color: #1a1a1a; border-color: #e0e0e0; }
[data-theme="dark"] .zq-tab.active { background: #1677ff; color: #fff; border-color: #1677ff; }
[data-theme="dark"] .dialog-overlay { background: rgba(0,0,0,0.6); }
[data-theme="dark"] .zq-exit { background: var(--surface-hover) !important; color: var(--text-2) !important; }
[data-theme="dark"] .zq-exit:hover { background: var(--surface-alt) !important; }
[data-theme="dark"] .zq-batch-btn.zq-batch-red { background: #3d1f1f !important; color: #f87171 !important; border: 1px solid #7f1d1d !important; }
[data-theme="dark"] .zq-batch-btn.zq-batch-yellow { background: #3d2e0f !important; color: #fbbf24 !important; border: 1px solid #78350f !important; }
[data-theme="dark"] .zq-edited-badge { background: #1e3a5f; color: #60a5fa; }
[data-theme="dark"] .status-badge.status-ok { background: #14532d; color: #4ade80; }
[data-theme="dark"] .status-badge.status-error { background: #450a0a; color: #f87171; }
[data-theme="dark"] .zhuque-btn { background: #1e3a5f; color: #60a5fa; border-color: #1e40af; }
[data-theme="dark"] .zhuque-btn:hover { background: #1e40af; }
[data-theme="dark"] #toast { background: #444; }
[data-theme="dark"] .zq-progress-bar { background: #333; }

/* ═══════════════════════════════════════════════════
   DeAI Page (降 AI 率)
   ═══════════════════════════════════════════════════ */

.deai-page { max-width: 1200px; margin: 0 auto; padding: 32px 24px; }
.deai-page h1 { font-size: 22px; margin-bottom: 4px; }
.deai-desc { color: var(--text-3); font-size: 13px; margin-bottom: 16px; }

.deai-toolbar { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.deai-toolbar-left { display: flex; align-items: center; gap: 8px; }
.deai-toolbar-left label { font-size: 13px; color: var(--text-2); }
.deai-toolbar-left select { padding: 5px 10px; border: 1px solid var(--border); border-radius: 6px;
  font-size: 13px; background: var(--surface); color: var(--text-1); }
.deai-instruction-toggle { font-size: 13px; color: var(--text-2); }
.deai-instruction-toggle summary { cursor: pointer; }
.deai-instruction-toggle textarea { margin-top: 6px; width: 100%; min-width: 300px; height: 50px;
  padding: 8px; border: 1px solid var(--border); border-radius: 6px; font-size: 12px;
  background: var(--surface); color: var(--text-1); resize: vertical; font-family: inherit; }

/* 三栏布局：输入 | 结果A | 结果B */
.deai-layout { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; min-height: 350px; }

.deai-input-col { display: flex; flex-direction: column; }
#deai-input { flex: 1; min-height: 300px; padding: 14px; border: 1px solid var(--border);
  border-radius: 8px; font-size: 14px; line-height: 1.7; resize: vertical;
  background: var(--surface); color: var(--text-1); font-family: inherit; }
#deai-input:focus { outline: none; border-color: var(--text-3); }
#deai-input[readonly] { background: var(--surface-alt); opacity: 0.7; }

.deai-input-footer { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; }
#deai-charcount { font-size: 12px; color: var(--text-3); }
#deai-charcount.over { color: #e53e3e; font-weight: 600; }

/* 结果面板 */
.deai-results-col { display: contents; } /* 让2个panel占据grid的2列 */
.deai-result-panel { display: flex; flex-direction: column; border: 1px solid var(--border);
  border-radius: 8px; background: var(--surface); overflow: hidden; }
.deai-panel-header { display: flex; align-items: center; justify-content: space-between;
  padding: 8px 12px; border-bottom: 1px solid var(--border); background: var(--surface-alt); }
.deai-model-select { padding: 4px 8px; border: 1px solid var(--border); border-radius: 4px;
  font-size: 13px; font-weight: 500; background: var(--surface); color: var(--text-1); }
.deai-panel-body { flex: 1; padding: 14px; overflow-y: auto; min-height: 260px; }
.deai-placeholder { color: var(--text-3); font-size: 13px; text-align: center; margin-top: 100px; }
.deai-loading { color: var(--text-3); font-size: 13px; text-align: center; margin-top: 100px; }
.deai-result-text { font-size: 14px; line-height: 1.8; white-space: pre-wrap; color: var(--text-1); }
.deai-error { color: #e53e3e; font-size: 13px; }
.deai-copy-btn { background: none; border: none; cursor: pointer; font-size: 16px; padding: 2px 6px;
  border-radius: 4px; transition: background .15s; }
.deai-copy-btn:hover { background: var(--surface-hover); }
.deai-copy-btn.hidden { display: none; }
.deai-single-btn { background: none; border: 1px solid var(--border); cursor: pointer; font-size: 12px;
  padding: 2px 8px; border-radius: 4px; transition: background .15s, border-color .15s; }
.deai-single-btn:hover { background: var(--surface-hover); border-color: var(--accent); }
.deai-single-btn:disabled { opacity: .5; cursor: wait; }

.btn-icon { background: none; border: none; cursor: pointer; padding: 4px 8px; border-radius: 4px;
  font-size: 14px; transition: background .15s; }
.btn-icon:hover { background: var(--surface-hover); }

/* Responsive: 小屏变单列 */
@media (max-width: 900px) {
  .deai-layout { grid-template-columns: 1fr; }
  .deai-panel-body { min-height: 150px; }
}

/* ═══════════════════════════════════════════════════
   行内批注审阅 (Annotation Review)
   ═══════════════════════════════════════════════════ */

/* ── 批注高亮 ── */
.ann-highlight {
  background: rgba(250, 204, 21, 0.25);
  border-bottom: 2px solid #facc15;
  cursor: pointer;
  transition: background 0.15s;
  border-radius: 2px;
}
.ann-highlight:hover {
  background: rgba(250, 204, 21, 0.45);
}
[data-theme="dark"] .ann-highlight {
  background: rgba(250, 204, 21, 0.15);
  border-bottom-color: #ca8a04;
}
[data-theme="dark"] .ann-highlight:hover {
  background: rgba(250, 204, 21, 0.3);
}

/* ── 浮动工具条 ── */
.ann-toolbar {
  position: absolute; z-index: 500;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 4px 16px var(--shadow);
  padding: 4px;
  display: flex; align-items: center; gap: 2px;
  animation: ann-toolbar-in 0.15s ease;
  user-select: none; -webkit-user-select: none;
}
.ann-toolbar-btn {
  padding: 6px 10px;
  border: none; border-radius: 6px;
  background: none;
  font-size: 12px; font-weight: 500;
  cursor: pointer;
  color: var(--text-1);
  white-space: nowrap;
  transition: background 0.12s;
}
.ann-toolbar-btn:hover {
  background: var(--surface-hover);
}
.ann-toolbar-btn.ann-custom-btn {
  color: var(--text-2);
}
.ann-toolbar-input {
  width: 120px; padding: 5px 8px;
  border: 1px solid var(--border); border-radius: 6px;
  font-size: 12px; outline: none;
  background: var(--surface-alt); color: var(--text-1);
}
.ann-toolbar-input:focus {
  border-color: #1677ff;
}
@keyframes ann-toolbar-in {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── 悬浮批注 tooltip ── */
.ann-tooltip {
  position: absolute; z-index: 600;
  background: #1a1a1a; color: #fff;
  border-radius: 6px; padding: 6px 10px;
  font-size: 12px; max-width: 240px;
  pointer-events: none;
  animation: ann-tooltip-in 0.12s ease;
  line-height: 1.5;
}
.ann-tooltip-tag {
  display: inline-block;
  background: rgba(250, 204, 21, 0.3);
  padding: 1px 6px; border-radius: 3px;
  font-weight: 600; margin-right: 4px;
}
.ann-tooltip-comment { color: #ccc; }
[data-theme="dark"] .ann-tooltip { background: #333; }
@keyframes ann-tooltip-in {
  from { opacity: 0; transform: translateY(2px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── 侧边栏批注面板 ── */
.ann-panel-toggle {
  display: flex; align-items: center; gap: 6px;
  margin-top: 12px; padding: 6px 10px;
  border: 1px solid var(--border); border-radius: 6px;
  background: var(--surface-alt); cursor: pointer;
  font-size: 13px; font-weight: 500; color: var(--text-1);
  transition: background 0.15s;
  width: 100%;
}
.ann-panel-toggle:hover { background: var(--surface-hover); }
.ann-panel-count {
  margin-left: auto;
  background: #facc15; color: #1a1a1a;
  font-size: 11px; font-weight: 700;
  padding: 1px 6px; border-radius: 10px;
  min-width: 18px; text-align: center;
}
.ann-panel-count.ann-empty { background: var(--border); color: var(--text-3); }

.ann-panel {
  margin-top: 8px;
  max-height: 300px; overflow-y: auto;
  border: 1px solid var(--border); border-radius: 8px;
  background: var(--card-bg);
}
.ann-panel-list { list-style: none; padding: 0; margin: 0; }
.ann-panel-item {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  font-size: 12px; line-height: 1.5;
  cursor: pointer;
  transition: background 0.12s;
}
.ann-panel-item:last-child { border-bottom: none; }
.ann-panel-item:hover { background: var(--surface-hover); }
.ann-panel-item-text {
  color: var(--text-2);
  overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; max-width: 170px;
}
.ann-panel-item-tag {
  display: inline-block;
  background: rgba(250, 204, 21, 0.25);
  padding: 1px 5px; border-radius: 3px;
  font-size: 11px; font-weight: 600;
  color: #92400e; margin-left: 4px;
}
[data-theme="dark"] .ann-panel-item-tag { background: rgba(250, 204, 21, 0.15); color: #fbbf24; }
.ann-panel-item-del {
  float: right; background: none; border: none;
  color: #999; cursor: pointer; font-size: 14px; padding: 0 4px;
}
.ann-panel-item-del:hover { color: #e53e3e; }

.ann-panel-actions {
  padding: 8px 10px;
  border-top: 1px solid var(--border);
  display: flex; gap: 6px; flex-wrap: wrap;
}
.ann-panel-actions .act { font-size: 11px; padding: 4px 8px; }

/* ── 批量修改进度 & Diff ── */
.ann-fix-overlay {
  position: fixed; inset: 0; z-index: 10000;
  background: rgba(0,0,0,0.4);
  display: flex; align-items: center; justify-content: center;
  animation: dialog-fade-in 0.15s ease;
}
.ann-fix-panel {
  background: var(--card-bg);
  border-radius: 14px;
  width: 680px; max-width: 92vw; max-height: 85vh;
  box-shadow: 0 16px 48px var(--shadow);
  display: flex; flex-direction: column;
  overflow: hidden;
}
.ann-fix-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.ann-fix-header h3 { font-size: 16px; font-weight: 600; }
.ann-fix-close {
  background: none; border: none; font-size: 20px;
  cursor: pointer; color: var(--text-3); padding: 4px 8px; border-radius: 6px;
}
.ann-fix-close:hover { background: var(--surface-hover); color: var(--text-1); }

.ann-fix-progress {
  padding: 12px 20px;
  display: flex; align-items: center; gap: 12px;
}
.ann-fix-bar { flex: 1; height: 3px; background: var(--surface-hover); border-radius: 2px; overflow: hidden; }
.ann-fix-bar-fill { height: 100%; background: #1677ff; width: 0; transition: width 0.4s ease; }
.ann-fix-label { font-size: 13px; color: var(--text-2); white-space: nowrap; }
.ann-fix-label.done { color: #52c41a; font-weight: 500; }

.ann-fix-body {
  flex: 1; overflow-y: auto; padding: 16px 20px;
}
.ann-fix-item {
  border: 1px solid var(--border); border-radius: 8px;
  margin-bottom: 12px; overflow: hidden;
}
.ann-fix-item-header {
  padding: 8px 12px;
  background: var(--surface-alt);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 8px;
  font-size: 12px;
}
.ann-fix-item-tag {
  background: rgba(250, 204, 21, 0.25);
  padding: 2px 6px; border-radius: 3px;
  font-weight: 600; font-size: 11px;
}
.ann-fix-item-body { padding: 12px; }
.ann-fix-original {
  font-size: 13px; color: var(--text-2);
  text-decoration: line-through; margin-bottom: 8px;
  line-height: 1.6;
}
.ann-fix-rewritten {
  font-size: 13px; color: var(--text-1);
  border-left: 3px solid #52c41a;
  padding-left: 10px; line-height: 1.6;
}
.ann-fix-item-actions {
  padding: 8px 12px;
  border-top: 1px solid var(--border);
  display: flex; gap: 8px;
}
.ann-fix-accept {
  padding: 4px 12px; border: none; border-radius: 6px;
  background: #52c41a; color: #fff; font-size: 12px;
  cursor: pointer; font-weight: 500;
}
.ann-fix-accept:hover { background: #389e0d; }
.ann-fix-reject {
  padding: 4px 12px; border: 1px solid var(--border); border-radius: 6px;
  background: var(--card-bg); color: var(--text-2); font-size: 12px;
  cursor: pointer;
}
.ann-fix-reject:hover { background: var(--surface-hover); }
.ann-fix-loading {
  text-align: center; color: var(--text-3); padding: 8px;
  font-size: 12px;
}

.ann-fix-footer {
  padding: 12px 20px;
  border-top: 1px solid var(--border);
  display: flex; justify-content: flex-end; gap: 8px;
}

/* Dark mode */
[data-theme="dark"] .deai-model-select { background: var(--surface); border-color: var(--border); }
[data-theme="dark"] .ann-tooltip { background: #2a2a2a; }
[data-theme="dark"] .ann-panel-count { background: #ca8a04; color: #fff; }
