/* 芯思考 web-demo — AI生成内容 1:1 light theme (ToolUiTheme + ToolShellLayout) */
:root, :root[data-theme="light"] {
  --bg-primary: #ffffff;
  --bg-secondary: #f8f9fa;
  --bg-card: #ffffff;
  --bg-hover: #f1f3f4;
  --bg-muted: #f1f3f4;
  --bg-pressed: #e8eaed;
  --bg-sidebar-item-hover: #f1f3f4;
  --bg-sidebar-item-active: #e8f0fe;
  --border: #e8eaed;
  --border-light: #ececec;
  --text-primary: #202124;
  --text-secondary: #5f6368;
  --text-tertiary: #6b7280;
  --text-muted: #6e747b;
  --accent: #1a73e8;
  --accent-hover: #1765cc;
  --accent-soft: rgba(26, 115, 232, 0.12);
  --danger: #c5221f;
  --danger-soft: rgba(197, 34, 31, 0.08);
  --success: #137333;
  --success-soft: rgba(19, 115, 51, 0.12);
  --warning: #ea8600;
  --warning-soft: rgba(234, 134, 0, 0.12);
  --info-soft: rgba(26, 115, 232, 0.12);
  --btn-primary-bg: #1a73e8;
  --btn-primary-hover: #1765cc;
  --btn-primary-text: #ffffff;
  --btn-secondary-bg: #ffffff;
  --btn-secondary-text: #1a73e8;
  --btn-secondary-border: rgba(26, 115, 232, 0.55);
  --btn-secondary-hover-bg: rgba(26, 115, 232, 0.10);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.08);
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 10px;
  --transition-fast: 0.12s ease;
  --transition-base: 0.18s ease;
  --nav-w: 172px;
  --demo-bar-h: 56px;
  --font: "Segoe UI", system-ui, "PingFang SC", "Microsoft YaHei", sans-serif;
  /* —— P3 收敛：后段模块（GEO/知识库/SEO）语义令牌 —— */
  --text-strong: #3c4043;          /* 正文强调灰（次于 --text-primary） */
  --border-strong: #dadce0;        /* 输入框/虚线框描边 */
  --danger-strong: #d93025;        /* 强调红（悬停/标记/必填星号） */
  --warning-text: #e37400;         /* 警示文字/进度条 */
  --warning-bg: #fef7e0;           /* 警示底 */
  --success-bg: #e6f4ea;           /* 成功底 */
  --accent-bg: #f8fbff;            /* 选中浅蓝底 */
  --accent-bg-alt: #f5f9ff;        /* 选中浅蓝底（GEO 另一档） */
  --accent-soft-border: #8ab4f8;   /* 选中浅蓝描边 */
  --accent-text-dark: #174ea6;     /* 选中态深蓝文字 */
  --seo-accent: #e67e22;           /* SEO 榜单强调橙 */
  --brand-doubao: #7c4dff;         /* 豆包品牌紫 */
  /* —— P3 收敛：浮层层级令牌（高→低：toast > 演示光标/圈 > KB块菜单 > 弹窗 > GEO抽屉 > KB提示 > 播放条；局部 2/3/12 不动） —— */
  --z-demo-bar: 9000;
  --z-kb-prompt: 9100;
  --z-geo-drawer: 9300;
  --z-modal: 9400;
  --z-kb-menu: 9600;
  --z-demo-ring: 9998;
  --z-demo-cursor: 9999;
  --z-toast: 10000;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html, body {
  margin: 0; height: 100%;
  font-family: var(--font);
  font-size: 13px; line-height: 1.5;
  background: var(--bg-secondary);
  color: var(--text-primary);
  overflow: hidden;
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); text-decoration: underline; }
[hidden] { display: none !important; }

/* ========== App shell ========== */
.app-root {
  height: 100%; display: flex; flex-direction: column; min-height: 0;
  padding-bottom: var(--demo-bar-h);
}
.tool-app {
  display: flex; flex: 1; min-height: 0; overflow: hidden;
  background: var(--bg-secondary); height: 100%;
}
.tool-nav-wrap { position: relative; flex-shrink: 0; display: flex; }
.tool-nav {
  width: var(--nav-w); flex-shrink: 0; height: 100%; min-height: 0;
  overflow-x: clip; overflow-y: auto;
  background: var(--bg-card); border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  transition: width .2s ease;
}
.tool-brand {
  font-size: 13px; font-weight: 600; padding: 14px 16px 12px;
  color: var(--text-primary); border-bottom: 1px solid var(--border-light);
  line-height: 1.4; white-space: nowrap; overflow: hidden;
  display: flex; align-items: center; gap: 6px; min-height: 44px;
  transition: opacity .15s ease, padding .2s ease;
}
.tool-automation-indicator {
  display: inline-flex; align-items: center; margin-left: auto;
  padding: 0 2px; font-size: 11px; color: var(--text-tertiary);
}
.tool-automation-indicator svg {
  width: 14px; height: 14px;
  animation: tool-automation-spin .85s linear infinite;
}
@keyframes tool-automation-spin { from { transform: rotate(0); } to { transform: rotate(360deg); } }

.tool-nav-list { list-style: none; margin: 8px 0 0; padding: 0 0 24px; }
.tool-nav-section {
  list-style: none; padding: 12px 14px 4px; margin: 0; pointer-events: none;
}
.tool-nav-section:first-child { padding-top: 6px; }
.tool-nav-section-label {
  display: block; font-size: 11px; font-weight: 600; color: var(--text-tertiary);
  letter-spacing: .02em; line-height: 1.3;
}
.tool-nav-item {
  display: flex; align-items: center; gap: 8px;
  width: 100%; text-align: left;
  padding: 9px 12px 9px 14px; font-size: 13px;
  color: var(--text-secondary); background: none; border: none;
  border-left: 3px solid transparent; cursor: pointer; line-height: 1.35;
  text-decoration: none; user-select: none;
}
.tool-nav-icon {
  display: inline-flex; flex-shrink: 0; width: 16px; height: 16px; opacity: .82;
}
.tool-nav-icon svg {
  width: 16px; height: 16px; display: block;
  fill: none; stroke: currentColor; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
}
.tool-nav-icon svg.tool-nav-icon-fill { fill: currentColor; stroke: none; }
.tool-nav-item.active .tool-nav-icon { opacity: 1; }
.tool-nav-label { min-width: 0; white-space: nowrap; overflow: hidden; }
.tool-nav-item:hover { background: var(--bg-sidebar-item-hover); color: var(--accent); }
.tool-nav-item.active {
  background: var(--bg-sidebar-item-active); color: var(--accent);
  border-left-color: var(--accent); font-weight: 600;
}
.tool-nav-item.demo-pulse {
  box-shadow: inset 0 0 0 1px var(--accent), 0 0 10px rgba(26,115,232,.18);
}

.tool-nav-collapse-btn {
  position: absolute; left: 100%; top: 50%; transform: translateY(-50%);
  width: 20px; height: 56px;
  border: 1px solid var(--border); border-left: none;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: var(--bg-card); color: var(--accent);
  cursor: pointer; z-index: 12; display: flex; align-items: center; justify-content: center;
  padding: 0;
  transition: background var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast);
}
.tool-nav-collapse-btn:hover { background: var(--accent-soft); border-color: var(--accent); }
.tool-nav-collapse-btn svg { width: 16px; height: 16px; fill: currentColor; stroke: none; display: block; }

.tool-app.nav-collapsed .tool-nav { width: 52px; }
.tool-app.nav-collapsed .tool-brand {
  opacity: 0; padding: 0; height: 0; border-bottom-color: transparent; overflow: hidden; min-height: 0;
}
.tool-app.nav-collapsed .tool-nav-section { display: none; }
.tool-app.nav-collapsed .tool-nav-label { opacity: 0; width: 0; overflow: hidden; }
.tool-app.nav-collapsed .tool-nav-item {
  justify-content: center; padding: 10px 8px; gap: 0; border-left-width: 0;
}
.tool-app.nav-collapsed .tool-nav-item.active { box-shadow: inset 3px 0 0 var(--accent); }

/* RIGHT main — only scroll container */
.tool-main {
  flex: 1; min-width: 0; min-height: 0;
  padding: 12px 20px 88px;
  overflow-x: clip; overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
.tool-automation-banner {
  display: none; margin: 0 0 10px; padding: 8px 12px;
  border-radius: var(--radius-sm);
  background: var(--accent-soft); color: var(--text-primary);
  font-size: 12px; line-height: 1.45;
}
.tool-automation-banner.has-text { display: block; }

.tool-content {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
  max-width: 960px;
  overflow-x: clip; overflow-y: clip;
}
.tool-page-title { font-size: 16px; font-weight: 600; margin: 0 0 4px; color: var(--text-primary); }
.tool-page-sub { font-size: 12px; color: var(--text-tertiary); margin: 0 0 14px; line-height: 1.5; }
.tool-page-head {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 12px; margin: 0 0 12px;
}
.tool-page-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-left: auto; }

/* ========== Buttons ========== */
.btn {
  display: inline-block; margin-top: 0; padding: 7px 14px;
  border-radius: var(--radius-sm); background: var(--btn-primary-bg); color: var(--btn-primary-text);
  text-decoration: none; font-size: 13px; cursor: pointer; border: 1px solid transparent;
  line-height: 1.4; font-weight: 600;
  transition: background var(--transition-base), border-color var(--transition-base), box-shadow var(--transition-base);
}
.btn:hover { background: var(--btn-primary-hover); box-shadow: 0 2px 6px rgba(0,0,0,.12); }
.btn.secondary {
  background: var(--btn-secondary-bg); color: var(--btn-secondary-text);
  border-color: var(--btn-secondary-border);
}
.btn.secondary:hover { background: var(--btn-secondary-hover-bg); border-color: var(--accent); box-shadow: none; }
.btn.sm { padding: 4px 10px; font-size: 12px; }
.btn:disabled { opacity: .45; cursor: not-allowed; pointer-events: none; }
.btn.demo-pulse { box-shadow: 0 0 0 3px rgba(26,115,232,.35); }
.btn-row { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

/* 键盘可达：统一焦点环（按钮/输入控件与可聚焦卡片、树节点） */
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible,
a:focus-visible, summary:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 1px;
}
.kb-node:focus-visible, .kb-drop:focus-visible, .geo-step:focus-visible,
.kb-create-bar:focus-visible, .kb-tpl:focus-within {
  outline: 2px solid var(--accent); outline-offset: 1px;
}

/* ========== Generate page ========== */
.generate-target-tabs {
  display: flex; gap: 0; margin: 0 0 14px; border-bottom: 1px solid var(--border);
}
.generate-target-tab {
  padding: 8px 16px; font-size: 13px; font-weight: 500; color: var(--text-secondary);
  background: none; border: none; border-bottom: 2px solid transparent; cursor: pointer;
  margin-bottom: -1px;
}
.generate-target-tab:hover { color: var(--accent); }
.generate-target-tab.active {
  color: var(--accent); border-bottom-color: var(--accent); font-weight: 600;
}
.generate-target-tab.demo-pulse { background: var(--accent-soft); }

.prompt-input { margin-bottom: 14px; }
.field-label {
  display: block; font-size: 12px; font-weight: 600; color: var(--text-tertiary); margin-bottom: 4px;
}
.prompt-input textarea {
  width: 100%; min-height: 120px; resize: vertical; padding: 10px 12px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--bg-primary); color: var(--text-primary); line-height: 1.55;
}
.prompt-input textarea:focus {
  border-color: var(--accent); outline: none; box-shadow: 0 0 0 2px var(--accent-soft);
}
.prompt-input.demo-pulse textarea,
#prompt.demo-pulse {
  box-shadow: 0 0 0 2px var(--accent), 0 0 0 5px var(--accent-soft);
}

.format-section { margin: 14px 0 4px; }
.format-head {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px;
  margin-bottom: 8px;
}
.format-head .field-label { margin: 0; display: inline; }
.format-radios {
  display: inline-flex; flex-wrap: wrap; align-items: center; gap: 14px 18px;
}
.format-radio {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; color: var(--text-primary); cursor: pointer; font-weight: 400;
}
.format-radio input { accent-color: var(--accent); margin: 0; }
.format-preview-link {
  margin-left: auto; color: var(--accent); font-size: 13px; font-weight: 500;
  background: none; border: none; cursor: pointer; padding: 0;
}
.format-preview-link:hover { text-decoration: underline; color: var(--accent-hover); }

.format-summary {
  font-size: 12px; color: var(--text-tertiary); margin: 0 0 12px; line-height: 1.5;
}

.format-selects {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 4px 0 8px;
  max-width: 420px;
}
.format-select-field {
  display: grid;
  grid-template-columns: 72px 1fr;
  align-items: center;
  gap: 10px;
}
.format-select-field label {
  display: block; font-size: 12px; font-weight: 600; color: var(--text-tertiary); margin: 0;
}
.format-select-field select {
  width: 100%; padding: 7px 9px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--bg-card); color: var(--text-primary); font-size: 13px;
  color-scheme: light;
}
.format-select-field select:focus {
  border-color: var(--accent); outline: none; box-shadow: 0 0 0 2px var(--accent-soft);
}
@media (max-width: 520px) {
  .format-select-field { grid-template-columns: 1fr; gap: 4px; }
  .format-preview-link { margin-left: 0; width: 100%; }
}

.inline-field-row {
  display: flex; flex-wrap: wrap; align-items: flex-start; gap: 10px 14px;
  margin: 14px 0 6px; padding: 0;
}
.inline-field-row > .field-label { margin: 6px 0 0; flex-shrink: 0; }

.platform-chips {
  display: flex; flex-wrap: wrap; gap: 8px; flex: 1; min-width: 0;
}
.platform-chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 12px 5px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-card);
  color: var(--text-secondary);
  font-size: 12.5px;
  cursor: pointer;
  user-select: none;
  transition: background var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast);
}
.platform-chip .chip-check {
  display: inline-flex; width: 14px; height: 14px; align-items: center; justify-content: center;
  border-radius: 50%; border: 1.5px solid var(--border); flex-shrink: 0;
  font-size: 10px; line-height: 1; color: transparent; background: transparent;
}
.platform-chip.selected {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}
.platform-chip.selected .chip-check {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--btn-primary-text);
}
.platform-chip.demo-pulse {
  box-shadow: 0 0 0 2px var(--accent);
}
.platform-chip input { position: absolute; opacity: 0; pointer-events: none; width: 0; height: 0; }

.note { font-size: 12px; color: var(--text-tertiary); margin: 8px 0; line-height: 1.45; }
.note a { font-weight: 500; }

.checkbox-row {
  display: flex; align-items: flex-start; gap: 8px;
  margin: 8px 0 4px; font-size: 13px; color: var(--text-secondary); cursor: pointer; line-height: 1.45;
}
.checkbox-row input { margin-top: 3px; accent-color: var(--accent); flex-shrink: 0; width: 16px; height: 16px; }
.checkbox-row strong { color: var(--text-primary); }
.tag-warn {
  display: inline-block; margin-left: 6px;
  padding: 1px 7px; border-radius: 999px;
  font-size: 11px; font-weight: 600;
  background: var(--warning); color: var(--btn-primary-text);
  vertical-align: middle; white-space: nowrap;
}
.tag-warn.soft {
  background: var(--warning-soft); color: var(--warning);
}

/* Generate progress / result */
.gen-progress { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--border-light); }
.progress-track {
  height: 6px; background: var(--bg-muted); border-radius: 999px; overflow: hidden;
}
.progress-track > span {
  display: block; height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--accent), #6ea8fe);
  transition: width .35s ease; border-radius: 999px;
}
.skeleton { margin-top: 12px; }
.skeleton-line {
  height: 12px; margin: 8px 0; border-radius: 4px;
  background: linear-gradient(90deg, var(--bg-muted) 25%, var(--border) 50%, var(--bg-muted) 75%);
  background-size: 200% 100%; animation: shimmer 1.2s infinite;
}
.skeleton-line.lg { height: 18px; width: 72%; }
.skeleton-line.md { width: 92%; }
.skeleton-line.sm { width: 58%; }
@keyframes shimmer { 0%{background-position:200% 0} 100%{background-position:-200% 0} }

.gen-result {
  margin-top: 16px; padding: 14px 16px; border-radius: var(--radius-lg);
  background: var(--success-soft); border: 1px solid var(--border); border-left: 3px solid var(--success);
}
.gen-result h3 { margin: 0 0 8px; font-size: 15px; color: var(--text-primary); }
.gen-result .meta { font-size: 12px; color: var(--text-tertiary); margin: 0 0 10px; }
.gen-result pre {
  white-space: pre-wrap; font-family: var(--font); margin: 0;
  color: var(--text-secondary); font-size: 12.5px; line-height: 1.55;
}

/* Stub list page */
.list-toolbar {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px;
}
.list-toolbar .spacer { flex: 1; }
.sel-hint { font-size: 12px; color: var(--text-muted); }
/* 窄窗口下列多时可横向滚动查看，不再直接裁掉 */
.job-table-wrap { overflow-x: auto; overflow-y: clip; }
table.job-table { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 4px; }
table.job-table th, table.job-table td {
  text-align: left; padding: 9px 8px; border-bottom: 1px solid var(--border-light); vertical-align: middle;
}
table.job-table th { color: var(--text-tertiary); font-weight: 600; font-size: 12px; }
table.job-table tbody tr:hover { background: var(--bg-hover); }
.status-pill {
  display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 11px; font-weight: 600;
  background: var(--bg-muted); color: var(--text-secondary);
}
.status-pill.done { background: var(--success-soft); color: var(--success); }
.status-pill.wait { background: var(--warning-soft); color: var(--warning); }

.stub-note {
  margin-top: 8px; padding: 12px 14px; border-radius: var(--radius-sm);
  background: var(--bg-muted); color: var(--text-secondary); font-size: 13px;
}

/* ========== Toast ========== */
.toast-host {
  position: fixed; top: 16px; right: 16px; z-index: var(--z-toast);
  display: flex; flex-direction: column; gap: 8px; pointer-events: none;
  max-width: min(360px, calc(100vw - 32px));
}
.toast {
  pointer-events: auto;
  background: #2d2d2d; color: var(--btn-primary-text);
  padding: 10px 14px 10px 12px;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  font-size: 13px; line-height: 1.4;
  border-left: 3px solid #34a853;
  opacity: 1; transition: opacity .2s ease, transform .2s ease;
}
.toast.error { border-left-color: #ea4335; }
.toast.bump { animation: toast-bump .28s ease; }
@keyframes toast-bump {
  0% { transform: translateX(0); }
  30% { transform: translateX(-4px); }
  60% { transform: translateX(2px); }
  100% { transform: translateX(0); }
}

/* ========== Demo cursor / bar ========== */
.demo-cursor {
  position: fixed; z-index: var(--z-demo-cursor); pointer-events: none;
  width: 22px; height: 22px; left: 0; top: 0;
  transform: translate(-2px, -2px);
  opacity: 0; transition: left .35s ease, top .35s ease, opacity .2s;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,.35));
}
.demo-cursor.visible { opacity: 1; }
.demo-cursor.clicking { transform: translate(-2px, -2px) scale(.88); }
.demo-ring {
  position: fixed; z-index: var(--z-demo-ring); pointer-events: none;
  border: 2px solid var(--accent); border-radius: var(--radius-sm);
  opacity: 0; transition: opacity .2s, left .35s ease, top .35s ease, width .35s ease, height .35s ease;
  box-shadow: 0 0 0 3px rgba(26,115,232,.15);
}
.demo-ring.visible { opacity: 1; }

.demo-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: var(--z-demo-bar);
  height: var(--demo-bar-h);
  background: rgba(255,255,255,.96);
  border-top: 1px solid var(--border);
  backdrop-filter: blur(8px);
}
.demo-bar-inner {
  max-width: 1100px; margin: 0 auto; height: 100%;
  display: flex; align-items: center; gap: 10px; padding: 0 16px;
}
.demo-btn {
  flex-shrink: 0; padding: 6px 12px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--bg-card);
  color: var(--text-primary); cursor: pointer; font-size: 12.5px; font-weight: 600;
}
.demo-btn:hover { background: var(--bg-hover); }
.demo-btn.primary { background: var(--btn-primary-bg); color: var(--btn-primary-text); border-color: transparent; }
.demo-btn.primary:hover { background: var(--btn-primary-hover); }
.demo-btn.ghost { background: transparent; color: var(--text-secondary); }
.demo-progress-wrap { flex: 1; min-width: 0; }
.demo-progress {
  height: 4px; background: var(--bg-muted); border-radius: 999px; overflow: hidden; margin-bottom: 4px;
}
.demo-progress > span {
  display: block; height: 100%; width: 0%;
  background: var(--accent); border-radius: 999px; transition: width .3s ease;
}
.demo-caption { font-size: 12px; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 5px; border: 2px solid var(--bg-secondary); }
::-webkit-scrollbar-thumb:hover { background: #9aa0a6; }

/* ========== Templates module ========== */
.tool-content.wide {
  max-width: 1180px;
}

.tpl-topbar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px;
  margin: 0 0 12px;
}
.tpl-pill-tab {
  display: inline-flex; align-items: center;
  padding: 5px 14px; border-radius: 999px;
  background: var(--accent); color: var(--btn-primary-text);
  font-size: 13px; font-weight: 600; line-height: 1.4;
  border: none; cursor: default; flex-shrink: 0;
}
.tpl-filter-select,
.tpl-search,
.list-footer select {
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  color: var(--text-primary);
  font-size: 12.5px;
  min-height: 32px;
}
.tpl-filter-select:focus,
.tpl-search:focus,
.list-footer select:focus,
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  border-color: var(--accent); outline: none;
  box-shadow: 0 0 0 2px var(--accent-soft);
}
.tpl-search {
  min-width: 180px; flex: 0 1 220px;
}
.tpl-topbar .spacer { flex: 1; min-width: 8px; }
.tpl-topbar .btn,
.tpl-page-actions .btn { margin-top: 0; }

.btn.danger-outline {
  background: var(--bg-card);
  color: var(--danger);
  border: 1px solid rgba(197, 34, 31, 0.55);
}
.btn.danger-outline:hover {
  background: var(--danger-soft);
  border-color: var(--danger);
  box-shadow: none;
}
.btn.linkish {
  background: none; border: none; color: var(--accent);
  padding: 4px 6px; font-weight: 500; cursor: pointer;
}
.btn.linkish:hover { text-decoration: underline; background: none; box-shadow: none; }
.btn.linkish:disabled { opacity: .4; cursor: not-allowed; text-decoration: none; }

.platform-pill {
  display: inline-block; padding: 2px 10px; border-radius: 999px;
  background: var(--bg-muted); color: var(--text-secondary);
  font-size: 12px; font-weight: 500; white-space: nowrap;
}
.name-link {
  color: var(--accent); font-weight: 500; cursor: pointer;
  background: none; border: none; padding: 0; font-size: 13px;
  text-align: left; max-width: 220px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  display: inline-block; vertical-align: middle;
}
.name-link:hover { text-decoration: underline; color: var(--accent-hover); }
.prompt-cell {
  max-width: 280px; overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; color: var(--text-secondary); font-size: 12.5px;
}
.row-actions { display: inline-flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.row-actions .btn { margin-top: 0; padding: 3px 8px; font-size: 12px; font-weight: 500; }

table.job-table td.col-check,
table.job-table th.col-check { width: 36px; text-align: center; }
table.job-table .time-cell { white-space: nowrap; color: var(--text-tertiary); font-size: 12px; }
table.job-table.reloading { opacity: .55; transition: opacity .2s; }

.list-footer {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px;
  margin-top: 12px; padding-top: 10px;
  border-top: 1px solid var(--border-light);
  font-size: 12.5px; color: var(--text-secondary);
}
.list-footer .footer-left {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
}
.list-footer .footer-right {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  margin-left: auto;
}
.list-footer label.sel-all {
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
  color: var(--text-secondary);
}
.list-footer label.sel-all input { accent-color: var(--accent); }
.sel-count { color: var(--text-muted); }
.page-info { color: var(--text-tertiary); white-space: nowrap; }

.status-pill.ok { background: var(--success-soft); color: var(--success); }
.status-pill.fail { background: var(--danger-soft); color: var(--danger); }

/* Forms */
.form-section-label {
  font-size: 13px; font-weight: 600; color: var(--text-primary);
  margin: 4px 0 12px;
}
.form-stack { display: flex; flex-direction: column; gap: 14px; max-width: 720px; }
.form-field label.field-label { margin-bottom: 6px; }
.form-field input[type="text"],
.form-field input[type="number"],
.form-field select,
.form-field textarea {
  width: 100%; padding: 8px 10px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--bg-primary); color: var(--text-primary); font-size: 13px;
}
.form-field textarea { min-height: 140px; resize: vertical; line-height: 1.55; }
.form-field .field-hint {
  margin: 6px 0 0; font-size: 12px; color: var(--text-tertiary); line-height: 1.45;
}
.form-field.compact input[type="number"] { max-width: 120px; }
.tpl-page-head {
  display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between;
  gap: 12px; margin: 0 0 14px;
}
.tpl-page-head .tool-page-title { margin-bottom: 4px; }
.tpl-page-head .tool-page-sub { margin-bottom: 0; }
.tpl-page-actions { display: flex; flex-wrap: wrap; gap: 8px; }

.gen-progress.inline {
  margin-top: 12px; padding-top: 0; border-top: none;
}

/* ========== Publish article module ========== */
.tool-content.wide-publish { max-width: 1280px; }

.status-pill.archived {
  background: var(--info-soft); color: var(--accent);
}
.status-pill.published {
  background: var(--success-soft); color: var(--success);
}
.status-pill.failed {
  background: var(--danger-soft); color: var(--danger);
}

.geo-tag {
  display: inline-block; margin-left: 6px;
  padding: 0 5px; border-radius: 3px;
  font-size: 10px; font-weight: 600; letter-spacing: .02em;
  color: var(--text-muted); background: var(--bg-muted);
  vertical-align: middle; line-height: 1.6;
}

.title-cell {
  max-width: 260px;
}
.title-cell .name-link {
  max-width: 220px;
}

.list-footnotes {
  margin-top: 14px; padding-top: 10px;
  border-top: 1px solid var(--border-light);
  font-size: 11.5px; color: var(--text-muted); line-height: 1.65;
}
.list-footnotes p { margin: 0 0 4px; }

.pub-ai-cell {
  display: inline-flex; align-items: center; gap: 6px;
  white-space: nowrap;
}
.pub-ai-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent); flex-shrink: 0;
}

/* Modal overlay（层级高于底部播放条，保证播放途中弹窗可交互） */
.modal-overlay {
  position: fixed; inset: 0; z-index: var(--z-modal);
  background: rgba(32, 33, 36, 0.45);
  display: flex; align-items: center; justify-content: center;
  padding: 24px 16px;
  animation: modal-fade-in .15s ease;
}
@keyframes modal-fade-in {
  from { opacity: 0; } to { opacity: 1; }
}
.modal-panel {
  background: var(--bg-card);
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0,0,0,.18), 0 2px 8px rgba(0,0,0,.08);
  border: 1px solid var(--border-light);
  max-height: calc(100vh - 48px);
  display: flex; flex-direction: column;
  animation: modal-pop .18s ease;
  position: relative;
}
@keyframes modal-pop {
  from { opacity: 0; transform: translateY(8px) scale(.98); }
  to { opacity: 1; transform: none; }
}
.modal-panel.batch-publish {
  width: min(920px, 96vw);
  height: min(620px, calc(100vh - 48px));
}
.modal-panel.website-publish {
  width: min(520px, 94vw);
}
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px 10px;
  border-bottom: 1px solid var(--border-light);
  flex-shrink: 0;
}
.modal-header h2 {
  margin: 0; font-size: 16px; font-weight: 600; color: var(--text-primary);
}
.modal-header .modal-sub {
  margin: 4px 0 0; font-size: 12px; color: var(--text-tertiary); font-weight: 400;
}
.modal-close {
  background: none; border: none; cursor: pointer;
  color: #9aa0a6; font-size: 20px; line-height: 1;
  padding: 4px 8px; border-radius: var(--radius-sm);
}
.modal-close:hover { background: var(--bg-hover); color: var(--text-primary); }

.batch-body {
  display: flex; flex: 1; min-height: 0; overflow: hidden;
}
.batch-left {
  width: 260px; flex-shrink: 0;
  border-right: 1px solid var(--border-light);
  display: flex; flex-direction: column; min-height: 0;
  background: var(--bg-secondary);
}
.batch-left-search {
  padding: 10px 12px; flex-shrink: 0;
}
.batch-left-search input {
  width: 100%; padding: 7px 10px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--bg-card); font-size: 12.5px;
}
.batch-left-search input:focus {
  border-color: var(--accent); outline: none;
  box-shadow: 0 0 0 2px var(--accent-soft);
}
.batch-plat-list {
  flex: 1; overflow-y: auto; padding: 0 4px 8px;
}
.batch-plat-group {
  margin: 4px 0 8px;
}
.batch-plat-group-title {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 10px; font-size: 12px; font-weight: 600;
  color: var(--text-secondary); cursor: pointer; user-select: none;
}
.batch-plat-group-title .caret {
  font-size: 10px; color: #9aa0a6; width: 12px;
}
.batch-plat-row {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 12px 6px 28px;
  font-size: 13px; color: var(--text-primary);
}
.batch-plat-row:hover { background: var(--bg-hover); }
.batch-plat-row label {
  display: inline-flex; align-items: center; gap: 8px;
  cursor: pointer; flex: 1; min-width: 0;
}
.batch-plat-row input { accent-color: var(--accent); margin: 0; }
.batch-plat-row .plat-settings {
  color: var(--accent); font-size: 12px; background: none; border: none;
  cursor: pointer; padding: 2px 4px; flex-shrink: 0;
}
.batch-plat-row .plat-settings:hover { text-decoration: underline; }
.batch-left-footer {
  flex-shrink: 0; padding: 8px 14px;
  border-top: 1px solid var(--border-light);
  font-size: 12px; color: var(--text-muted);
}

.batch-right {
  flex: 1; min-width: 0; display: flex; flex-direction: column;
  overflow-y: auto; padding: 14px 18px 12px;
}
.batch-field { margin-bottom: 16px; }
.batch-field > .field-label {
  margin-bottom: 8px; color: var(--text-secondary); font-weight: 600;
}
.batch-radios {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px;
}
.batch-radios label {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; cursor: pointer;
}
.batch-radios input { accent-color: var(--accent); margin: 0; }
.batch-hint {
  margin: 6px 0 0; font-size: 12px; color: var(--text-tertiary); line-height: 1.45;
}
.batch-cover-actions {
  display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0;
}
.cover-strip {
  display: flex; flex-wrap: wrap; gap: 10px; margin: 8px 0 4px;
}
.cover-thumb {
  position: relative; width: 88px; height: 66px;
  border-radius: var(--radius-sm); border: 2px solid transparent;
  cursor: pointer; overflow: hidden; flex-shrink: 0;
  background: linear-gradient(135deg, hsl(var(--hue), 70%, 62%), hsl(calc(var(--hue) + 40), 65%, 48%));
}
.cover-thumb.selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}
.cover-thumb .cover-check {
  position: absolute; top: 4px; right: 4px;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--accent); color: var(--btn-primary-text);
  font-size: 11px; display: none;
  align-items: center; justify-content: center; font-weight: 700;
}
.cover-thumb.selected .cover-check { display: flex; }
.cover-thumb .cover-label {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 2px 4px; font-size: 9px; color: var(--btn-primary-text);
  background: rgba(0,0,0,.35); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cover-select-all {
  margin: 4px 0 10px;
}
.selected-plat-tags {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  margin-top: 4px; min-height: 28px;
}
.plat-tag {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 8px 3px 10px;
  background: var(--bg-muted); border-radius: 999px;
  font-size: 12px; color: var(--text-secondary);
}
.plat-tag button {
  background: none; border: none; cursor: pointer;
  color: #9aa0a6; font-size: 14px; line-height: 1; padding: 0 2px;
}
.plat-tag button:hover { color: var(--danger); }

.batch-footer {
  display: flex; align-items: center; justify-content: flex-end;
  gap: 10px; padding: 12px 18px;
  border-top: 1px solid var(--border-light);
  flex-shrink: 0; background: var(--bg-card);
  border-radius: 0 0 12px 12px;
}

/* Website modal */
.website-body { padding: 16px 20px 8px; }
.website-section {
  background: #f0f6ff;
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin-bottom: 12px;
}
.website-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px;
}
.website-section .field-label { margin-bottom: 6px; }
.website-section select {
  width: 100%; padding: 8px 10px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--bg-card); font-size: 13px;
}
.website-section select:focus {
  border-color: var(--accent); outline: none;
  box-shadow: 0 0 0 2px var(--accent-soft);
}
.website-radios {
  display: flex; flex-direction: column; gap: 10px;
}
.website-radios label {
  display: flex; align-items: flex-start; gap: 8px;
  font-size: 13px; cursor: pointer; line-height: 1.45;
}
.website-radios input { margin-top: 2px; accent-color: var(--accent); }
.website-footer {
  display: flex; justify-content: flex-end; gap: 10px;
  padding: 12px 20px 16px;
}
.btn.ghost-grey {
  background: var(--bg-muted); color: var(--text-secondary);
  border: 1px solid var(--border);
}
.btn.ghost-grey:hover { background: var(--bg-pressed); box-shadow: none; }

/* Settings drawer */
.settings-drawer-mask {
  position: absolute; inset: 0; z-index: 2;
  background: rgba(32, 33, 36, 0.25);
  border-radius: 12px;
}
.settings-drawer {
  position: absolute; top: 0; right: 0; bottom: 0; z-index: 3;
  width: min(360px, 92%);
  background: var(--bg-card);
  border-left: 1px solid var(--border);
  box-shadow: -4px 0 24px rgba(0,0,0,.12);
  display: flex; flex-direction: column;
  animation: drawer-in .2s ease;
  border-radius: 0 12px 12px 0;
}
@keyframes drawer-in {
  from { transform: translateX(24px); opacity: .6; }
  to { transform: none; opacity: 1; }
}
.settings-drawer-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; border-bottom: 1px solid var(--border-light);
  flex-shrink: 0;
}
.settings-drawer-head h3 {
  margin: 0; font-size: 15px; font-weight: 600;
}
.settings-drawer-body {
  flex: 1; overflow-y: auto; padding: 14px 16px;
}
.settings-drawer-body .form-field { margin-bottom: 14px; }
.settings-drawer-body .form-field input[type="text"],
.settings-drawer-body .form-field select {
  width: 100%; padding: 8px 10px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--bg-card); font-size: 13px;
}
.settings-drawer-body .field-hint {
  margin: 5px 0 0; font-size: 11.5px; color: var(--text-tertiary); line-height: 1.4;
}
.settings-reminder {
  margin-top: 8px; padding: 10px 12px;
  background: #fff8e1; border: 1px solid #ffe082; border-radius: var(--radius-sm);
  font-size: 12px; color: #5d4037; line-height: 1.5;
}
.settings-reminder strong { color: #e65100; }
.settings-drawer-foot {
  display: flex; justify-content: flex-end; gap: 10px;
  padding: 12px 16px; border-top: 1px solid var(--border-light);
  flex-shrink: 0;
}

.modal-panel.batch-publish.has-drawer { overflow: hidden; }

/* ========== Publish dynamic module ========== */
.status-pill.published {
  background: rgba(13, 148, 136, 0.14);
  color: #0f766e;
}

.plat-pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--bg-muted);
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.6;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: middle;
}
.muted-dash { color: #9aa0a6; }

.pub-subtitle {
  margin: -4px 0 12px;
  font-size: 12.5px;
  color: var(--text-tertiary);
  line-height: 1.5;
}

.btn.danger {
  background: var(--danger);
  color: var(--btn-primary-text);
  border: 1px solid var(--danger);
}
.btn.danger:hover {
  filter: brightness(0.95);
  box-shadow: none;
}

.batch-left-head {
  padding: 10px 14px 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  flex-shrink: 0;
}
.batch-group-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  width: 100%;
}
.batch-group-check input { accent-color: var(--accent); margin: 0; }
.group-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  margin-left: 4px;
  border-radius: 999px;
  background: var(--bg-muted);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
}
.batch-hint-inline {
  font-weight: 400;
  font-size: 12px;
  color: var(--text-tertiary);
}
.dyn-batch-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  flex-wrap: wrap;
}
.dyn-batch-actions .spacer { flex: 1; min-width: 8px; }
.plat-tag.dyn-plat-tag {
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid rgba(26, 115, 232, 0.25);
}

.drawer-section-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 4px 0 12px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border-light);
}
.field-sub-label {
  font-size: 12px;
  color: var(--text-secondary);
  margin: 0 0 6px;
}
.choice-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.choice-card {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 13px;
  background: var(--bg-card);
  user-select: none;
}
.choice-card input { accent-color: var(--accent); margin: 0; }
.choice-card.selected,
.choice-card:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 500;
}

.dyn-form-page {
  max-width: 760px;
  padding-bottom: 72px;
}
.dyn-form-stack { max-width: 720px; }
.slot-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.slot-card {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 140px;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  font-size: 13px;
  background: var(--bg-card);
  user-select: none;
}
.slot-card input { accent-color: var(--accent); margin: 0; }
.slot-card.selected,
.slot-card:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}
.cover-thumb.square {
  width: 88px;
  height: 88px;
}
.dyn-form-covers { margin-top: 8px; }
.dyn-form-links {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}
.link-btn {
  background: none;
  border: none;
  color: var(--accent);
  font-size: 13px;
  cursor: pointer;
  padding: 0;
}
.link-btn:hover { text-decoration: underline; color: var(--accent-hover); }
.dot-sep { color: #9aa0a6; }

.dyn-form-footer {
  position: sticky;
  bottom: 0;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 0 4px;
  margin-top: 20px;
  background: linear-gradient(180deg, transparent, var(--bg-primary) 28%);
  border-top: 1px solid var(--border-light);
}

/* ========== 图片素材库 ========== */
.img-search-wrap {
  display: inline-flex;
  align-items: stretch;
  flex: 0 1 240px;
  min-width: 180px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  overflow: hidden;
}
.img-search-wrap:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-soft);
}
.img-search-wrap .tpl-search {
  border: none;
  border-radius: 0;
  box-shadow: none;
  flex: 1;
  min-width: 0;
  min-height: 30px;
}
.img-search-wrap .tpl-search:focus { box-shadow: none; }
.img-search-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  flex-shrink: 0;
}
.img-search-btn:hover { color: var(--accent); background: var(--accent-soft); }
.img-search-btn svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 2; }

.img-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: 14px 16px;
  margin: 4px 0 4px;
  min-height: 120px;
}
.img-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color .15s, box-shadow .15s;
}
.img-card:hover {
  border-color: rgba(26, 115, 232, .45);
  box-shadow: 0 2px 8px rgba(26, 115, 232, .08);
}
.img-card.selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}
.img-thumb {
  position: relative;
  aspect-ratio: 3 / 2;
  background: linear-gradient(135deg, hsl(var(--hue), 72%, 58%), hsl(calc(var(--hue) + 36), 68%, 46%));
  overflow: hidden;
}
.img-thumb-deco {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  pointer-events: none;
  color: var(--btn-primary-text);
  text-shadow: 0 1px 2px rgba(0,0,0,.25);
}
.img-thumb-deco .deco-box {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  background: rgba(255,255,255,.92);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: hsl(var(--hue), 65%, 42%);
  letter-spacing: -.02em;
}
.img-thumb-deco .deco-sub {
  font-size: 10px;
  opacity: .92;
  max-width: 90%;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.img-card-check {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
  cursor: pointer;
  margin: 0;
}
.img-card-tag {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--btn-primary-text);
  background: rgba(60, 64, 67, .82);
  max-width: 72%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.img-card-tag.publish {
  background: rgba(26, 115, 232, .88);
}
.img-card-name {
  display: block;
  padding: 8px 10px;
  background: #f5f6f8;
  color: var(--accent);
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  border-top: 1px solid var(--border-light);
}
.img-empty {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--text-muted);
  padding: 36px 12px;
  font-size: 13px;
}
.list-footnotes.img-notes {
  border-top: none;
  margin-top: 10px;
  padding-top: 4px;
}
.list-footnotes.img-notes ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.list-footnotes.img-notes li {
  position: relative;
  padding-left: 14px;
  margin: 0 0 6px;
  font-size: 11.5px;
  color: var(--text-muted);
  line-height: 1.65;
}
.list-footnotes.img-notes li::before {
  content: '';
  position: absolute;
  left: 0;
  top: .55em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}
.img-scanning .img-grid { opacity: .55; pointer-events: none; }

/* ========== 视频发布管理 ========== */
.video-file-cell {
  max-width: 160px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-secondary);
  font-size: 12.5px;
}
.vid-form-page {
  max-width: 920px;
  padding-bottom: 80px;
}
.vid-form-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.vid-form-head .tool-page-title { margin: 0; }
.vid-form-head-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.vid-form-stack { max-width: 880px; }
.vid-file-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.vid-file-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-card);
  font-size: 12.5px;
  cursor: pointer;
  user-select: none;
  color: var(--text-secondary);
}
.vid-file-pill input { accent-color: var(--accent); margin: 0; }
.vid-file-pill.selected,
.vid-file-pill:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}
.vid-declare-select {
  max-width: 280px;
  min-height: 34px;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  font-size: 13px;
}
.vid-plat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
  gap: 8px 12px;
  padding: 10px 12px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  background: var(--bg-secondary);
}
.vid-plat-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
}
.vid-plat-check input { accent-color: var(--accent); margin: 0; }
.vid-submit-radios {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.vid-radio-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  font-size: 13px;
  cursor: pointer;
  user-select: none;
}
.vid-radio-pill input { accent-color: var(--accent); margin: 0; }
.vid-radio-pill.selected,
.vid-radio-pill:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}
.vid-cover-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.vid-cover-btns {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.vid-cover-strip { margin-top: 10px; }
.vid-validation-warn {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 8px 0;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: #fff7e6;
  border: 1px solid #ffd591;
  color: #d46b08;
  font-size: 13px;
  line-height: 1.5;
}
.vid-validation-warn .warn-ico {
  flex-shrink: 0;
  font-size: 14px;
  line-height: 1.4;
}
.vid-plat-expand { margin: 12px 0 8px; }
.vid-expand-toggle {
  background: none;
  border: none;
  color: var(--accent);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  padding: 4px 0;
}
.vid-expand-toggle:hover { text-decoration: underline; }
.vid-expand-body { margin-top: 8px; }
.vid-flow-note {
  margin: 14px 0 0;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.65;
}
.vid-form-footer {
  position: sticky;
  bottom: 0;
  display: flex;
  justify-content: flex-start;
  gap: 10px;
  padding: 14px 0 4px;
  margin-top: 20px;
  background: linear-gradient(180deg, transparent, var(--bg-primary) 28%);
  border-top: 1px solid var(--border-light);
}

/* ========== Video batch publish modal ========== */
.modal-panel.vid-batch-publish {
  width: min(560px, 94vw);
  max-height: min(720px, calc(100vh - 48px));
}
.modal-panel.vid-batch-publish.has-drawer { overflow: hidden; }
.vid-batch-body {
  padding: 14px 20px 8px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}
.vid-batch-plat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px 28px;
  margin-top: 4px;
}
.vid-batch-plat-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 4px;
  font-size: 13px;
  color: var(--text-primary);
}
.vid-batch-plat-row label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  flex: 1;
  min-width: 0;
}
.vid-batch-plat-row input { accent-color: var(--accent); margin: 0; }
.vid-batch-plat-row .plat-settings {
  background: none;
  border: none;
  color: var(--accent);
  font-size: 13px;
  cursor: pointer;
  padding: 0 2px;
  flex-shrink: 0;
}
.vid-batch-plat-row .plat-settings:hover { text-decoration: underline; }


/* ========== Remaining pages: auto-publish / videos / platforms / sites / ai / guide ========== */
.list-hint {
  margin: 0 0 10px;
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.55;
}
.result-cell {
  max-width: 280px;
  font-size: 12.5px;
  color: var(--text-secondary);
  line-height: 1.45;
}
.result-link {
  color: var(--accent);
  text-decoration: none;
}
.result-link:hover { text-decoration: underline; }
.ext-tag {
  color: var(--text-muted);
  font-size: 12px;
}
.path-cell {
  max-width: 220px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-secondary);
  font-size: 12.5px;
}
.page-head-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.page-head-row .tool-page-title { margin-bottom: 4px; }
.page-head-row .tool-page-sub { margin: 0; max-width: 640px; }
.page-head-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.cap-tags {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
}
.cap-tag {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 4px;
  font-size: 11.5px;
  color: #c05600;
  background: #fff4e5;
  border: 1px solid #ffd8a8;
  line-height: 1.5;
}
.mono-id {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  color: var(--text-secondary);
  background: transparent;
}
.login-need {
  color: var(--danger);
  font-size: 12.5px;
  font-weight: 500;
}
.login-ok {
  color: var(--success, #188038);
  font-size: 12.5px;
  font-weight: 500;
}
.enable-cell,
.api-cell {
  white-space: nowrap;
}
.guide-banner {
  margin: 8px 0 18px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: #fff4e5;
  border: 1px solid #ffd8a8;
  color: #8a4b08;
  font-size: 13px;
  line-height: 1.6;
}
.guide-banner a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}
.guide-banner a:hover { text-decoration: underline; }
.guide-section {
  margin-bottom: 22px;
}
.guide-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.guide-h2 {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 650;
  color: var(--text);
}
.guide-desc {
  margin: 0;
  font-size: 12.5px;
  color: var(--text-muted);
  max-width: 720px;
  line-height: 1.55;
}
.guide-table th:last-child,
.guide-table td:last-child {
  width: 160px;
}

/* ========== GEO优化 ========== */
.tool-app.module-geo .tool-automation-indicator { display: none !important; }
.tool-content.geo-page { max-width: none; }
.tool-content.geo-home {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 2px 4px 24px;
  max-width: none;
}
.tool-nav-foot-gap {
  height: 8px;
  margin: 10px 12px 4px;
  border-top: 1px solid var(--border-light);
  list-style: none;
  pointer-events: none;
}

.geo-h1 { font-size: 18px; font-weight: 700; margin: 2px 0 4px; color: var(--text-primary); }
.geo-sub { margin: 0 0 14px; font-size: 12.5px; color: var(--text-tertiary); }
.geo-sec { font-size: 14px; font-weight: 700; margin: 4px 0 10px; }
.geo-steps {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}
.geo-step {
  font: inherit; color: inherit; text-align: left; width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 12px 14px;
  cursor: pointer;
  min-height: 118px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.geo-step:hover { border-color: #c6dafc; box-shadow: var(--shadow-sm); }
.geo-step.demo-pulse { box-shadow: 0 0 0 2px var(--accent); }
.geo-step-k { color: var(--accent); font-size: 11px; font-weight: 700; letter-spacing: .04em; }
.geo-step-t { font-size: 15px; font-weight: 700; margin: 4px 0 2px; color: var(--text-primary); }
.geo-step-line { color: var(--accent); font-weight: 600; font-size: 13px; }
.geo-step-d { color: var(--text-tertiary); font-size: 12px; margin-top: 8px; }

.geo-reports {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.geo-report {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.geo-report h3 { margin: 0 0 4px; font-size: 14px; font-weight: 650; }
.geo-report p { margin: 0; color: var(--text-tertiary); font-size: 12px; }
.geo-linkish {
  color: var(--accent); background: none; border: none; cursor: pointer;
  font-size: 13px; white-space: nowrap; padding: 0;
}
.geo-linkish:hover { text-decoration: underline; }
.geo-head-links { display: flex; gap: 14px; align-items: center; flex-shrink: 0; }

.geo-bars { margin: 4px 0 14px; }
.geo-bars-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 8px; }
.geo-bars-head strong { font-size: 14px; }
.geo-bars-head span { font-size: 12px; color: var(--text-tertiary); }
.geo-bar-row {
  display: grid;
  grid-template-columns: 120px 1fr 28px;
  align-items: center;
  gap: 10px;
  margin: 8px 0;
}
.geo-plat { display: flex; align-items: center; gap: 8px; font-size: 13px; min-width: 0; }
.geo-plat-ico {
  width: 18px; height: 18px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--btn-primary-text); font-size: 10px; font-weight: 700;
}
.geo-plat-ico.wenxin { background: var(--accent); border-radius: 4px; }
.geo-plat-ico.wenxin::before { content: '文'; }
.geo-plat-ico.deepseek { background: #2b6cb0; border-radius: 50%; }
.geo-plat-ico.deepseek::before { content: ''; width: 8px; height: 5px; border-radius: 4px 4px 2px 2px; background: var(--bg-card); display: block; }
.geo-plat-ico.doubao { background: linear-gradient(135deg, #ffb4c8, var(--brand-doubao)); border-radius: 50%; }
.geo-bar-track { height: 8px; background: #eceff1; border-radius: 999px; overflow: hidden; }
.geo-bar-track > span { display: block; height: 100%; background: var(--accent); border-radius: 999px; }
.geo-bar-num { text-align: right; color: var(--text-secondary); font-size: 13px; }
.geo-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.geo-stat {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 18px 14px;
}
.geo-stat b { display: block; font-size: 26px; font-weight: 700; line-height: 1.15; color: var(--text-primary); }
.geo-stat span { color: var(--text-tertiary); font-size: 12.5px; }

.geo-title-row {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 12px; margin: 0 0 8px;
}
.geo-title-row .tool-page-title { margin: 0; flex: 1; line-height: 1.45; }
.geo-title-note { font-weight: 400; color: var(--text-secondary); font-size: 13px; }
.req { color: var(--danger-strong); margin-right: 2px; }
.geo-name-box {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 14px 14px;
  margin: 4px 0 16px;
}
.geo-name-wrap { position: relative; }
.geo-name-wrap input {
  width: 100%; padding: 8px 56px 8px 10px;
  border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg-card);
}
.geo-name-count {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  font-size: 12px; color: var(--text-muted); pointer-events: none;
}
.geo-compose-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin: 0 0 10px;
}
.geo-compose-head h2 { margin: 0; font-size: 14px; font-weight: 650; }
.geo-cols {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}
.geo-col {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  display: flex; flex-direction: column;
  min-width: 0; min-height: 340px;
}
.geo-col-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 6px; padding: 8px 10px;
  border-bottom: 1px solid var(--border-light);
  font-weight: 650; font-size: 13px;
}
.geo-load {
  border: 1px solid rgba(26, 115, 232, .4);
  background: var(--bg-card); color: var(--accent);
  border-radius: var(--radius-sm); font-size: 12px;
  padding: 2px 8px; cursor: pointer; white-space: nowrap;
}
.geo-load:hover { background: var(--accent-soft); }
.geo-load .caret { font-size: 10px; margin-left: 2px; }
.geo-chip-list {
  flex: 1; min-height: 160px; max-height: 280px;
  overflow: auto; background: #f7f8fa; padding: 4px 8px 8px;
}
.geo-chip {
  display: flex; align-items: center; gap: 4px;
  padding: 3px 0; font-size: 13px; color: var(--text-primary);
}
.geo-chip-x {
  border: none; background: none; color: #9aa0a6; cursor: pointer;
  font-size: 14px; line-height: 1; padding: 0 2px;
}
.geo-chip-x:hover { color: var(--danger-strong); }
.geo-empty { color: var(--text-muted); text-align: center; padding: 36px 8px; font-size: 12.5px; }
.geo-col-add { display: flex; gap: 6px; padding: 8px; border-top: 1px solid var(--border-light); }
.geo-col-add input {
  flex: 1; min-width: 0; padding: 6px 8px;
  border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg-card); font-size: 12px;
}
.geo-form-foot {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-top: 12px; flex-wrap: wrap;
}
.geo-combo { color: var(--text-secondary); font-size: 12.5px; flex: 1; min-width: 220px; line-height: 1.5; }
.geo-form-actions { display: flex; gap: 8px; }

.geo-search-row { display: flex; gap: 8px; align-items: center; margin: 4px 0 12px; }
.geo-search-row .tpl-search { flex: 0 1 240px; }
.geo-name { font-weight: 650; }
.geo-art-n { font-weight: 650; }
.geo-pending { color: var(--warning-text); font-size: 12px; margin-left: 6px; }
.geo-ops { display: inline-flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.geo-ops button {
  background: none; border: none; padding: 0; color: var(--accent);
  cursor: pointer; font-size: 13px;
}
.geo-ops button.danger { color: var(--danger-strong); }
.geo-ops button:hover { text-decoration: underline; }
.geo-pager {
  display: flex; gap: 10px; align-items: center;
  margin-top: 10px; color: var(--text-tertiary); font-size: 12.5px;
}

.geo-gen-sub {
  display: flex; justify-content: space-between; gap: 12px;
  color: var(--text-secondary); font-size: 13px; margin: 0 0 12px;
}
.geo-gen-sub strong { color: var(--text-primary); }
.geo-block {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 14px 14px;
  margin-bottom: 12px;
}
.geo-block h2 { font-size: 14px; margin: 0 0 10px; font-weight: 650; line-height: 1.5; }
.geo-block h2 span { font-weight: 400; color: var(--text-tertiary); font-size: 12.5px; }
.geo-targets {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.geo-target {
  display: flex; align-items: center; gap: 6px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 7px 8px; background: var(--bg-secondary); font-size: 13px; min-width: 0;
  cursor: pointer;
}
.geo-target.on { border-color: #a8c7fa; background: var(--accent-bg-alt); }
.geo-target input { accent-color: var(--accent); margin: 0; flex-shrink: 0; }
.geo-word { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.geo-badge {
  margin-left: auto; background: var(--bg-muted); color: var(--text-tertiary);
  border-radius: 4px; font-size: 11px; padding: 0 5px; flex-shrink: 0;
}
.geo-batch-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 10px; }
.geo-batch-meta, .geo-sel-count { color: var(--text-tertiary); font-size: 12.5px; }
.geo-select, .geo-area {
  width: 100%; border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 8px 10px; background: var(--bg-card); font-size: 13px;
}
.geo-area { min-height: 92px; resize: vertical; margin-top: 4px; }
.geo-kb-meta { font-size: 12.5px; margin: 8px 0 4px; }
.geo-kb-meta.ok { color: var(--success); }
.geo-kb-meta.mid { color: var(--warning-text); }
.geo-kb-meta.bad { color: var(--text-tertiary); }
.geo-cite { font-size: 12px; color: var(--text-tertiary); margin: 0 0 8px; line-height: 1.5; }
.geo-facts-toggle {
  display: inline-flex; align-items: center; gap: 4px;
  background: none; border: none; color: var(--accent); cursor: pointer;
  padding: 0; margin: 2px 0 8px; font-size: 13px;
}
.geo-facts-toggle:hover { text-decoration: underline; }
.geo-facts {
  margin: 0 0 10px; padding: 10px 12px;
  background: var(--bg-secondary); border-radius: var(--radius-sm);
  font-size: 12.5px; color: var(--text-strong); white-space: pre-wrap;
  font-family: var(--font); line-height: 1.55;
}

.geo-drawer-mask {
  position: fixed; inset: 0; z-index: var(--z-geo-drawer);
  background: rgba(32, 33, 36, .45);
}
.geo-drawer {
  position: absolute; top: 0; right: 0; bottom: 0;
  width: min(440px, 94vw);
  background: var(--bg-card);
  box-shadow: -8px 0 28px rgba(0,0,0,.16);
  display: flex; flex-direction: column;
}
.geo-drawer.demo-pulse { box-shadow: -8px 0 0 2px var(--accent); }
.geo-drawer-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px 12px; flex-shrink: 0;
}
.geo-drawer-head h3 { margin: 0; font-size: 16px; font-weight: 650; }
.geo-drawer-banner {
  margin: 0 16px 10px;
  background: var(--bg-sidebar-item-active);
  color: var(--text-primary);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 13px; line-height: 1.55;
}
.geo-drawer-body { flex: 1; overflow: auto; padding: 0 8px 20px; }
.geo-drawer-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.geo-drawer-table th {
  text-align: left; color: var(--text-tertiary); font-weight: 600; font-size: 12px;
  padding: 8px 10px; border-bottom: 1px solid var(--border-light); position: sticky; top: 0; background: var(--bg-card);
}
.geo-drawer-table td { padding: 9px 10px; border-bottom: 1px solid #f1f3f4; }
.geo-d-no { width: 56px; color: var(--text-tertiary); }

@media (max-width: 1200px) {
  .geo-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .geo-cols { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .geo-targets { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .geo-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ===== GEO corp-kb / articles / monitor / records / dashboard / snapshot ===== */
.tool-content.geo-page { overflow-x: auto; }
.tool-content.geo-page .job-table-wrap { overflow-x: auto; }

.geo-dashed {
  border: 1px dashed var(--border-strong); border-radius: var(--radius-md);
  padding: 12px 14px; color: var(--text-tertiary); font-size: 13px; line-height: 1.65;
  background: var(--bg-card); margin: 8px 0 14px;
}
.geo-crumb { font-size: 12.5px; color: var(--text-tertiary); margin: 2px 0 10px; }
.geo-crumb button {
  background: none; border: none; color: var(--accent); cursor: pointer;
  padding: 0; font-size: 12.5px;
}
.geo-crumb button:hover { text-decoration: underline; }
.geo-kb-card {
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 14px 16px 16px; margin: 0 0 12px; background: var(--bg-card);
}
.geo-kb-name {
  width: min(460px, 100%); padding: 8px 10px;
  border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg-card); font-size: 13px;
}
.geo-kb-pct { margin: 8px 0 10px; font-size: 12.5px; color: var(--text-secondary); }
.geo-kb-pct b.ok { color: var(--success); font-weight: 650; }
.geo-kb-pct b.mid { color: var(--warning-text); font-weight: 650; }
.geo-kb-pct b.bad { color: var(--text-secondary); font-weight: 650; }
.geo-kb-tabs {
  display: flex; gap: 0; overflow-x: auto; border-bottom: 1px solid var(--border);
  margin: 0 -4px 12px;
}
.geo-kb-tabs button {
  background: none; border: none; border-bottom: 2px solid transparent;
  padding: 8px 12px; margin-bottom: -1px; cursor: pointer;
  color: var(--text-secondary); font-size: 13px; white-space: nowrap;
}
.geo-kb-tabs button.active { color: var(--accent); border-bottom-color: var(--accent); font-weight: 650; }
.geo-kb-sec { font-size: 13px; font-weight: 650; margin: 0 0 2px; }
.geo-kb-hint { margin: 0 0 8px; color: var(--text-tertiary); font-size: 12.5px; }
.geo-kb-area-wrap { position: relative; }
.geo-kb-area-wrap textarea {
  width: 100%; min-height: 200px; resize: vertical;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 10px 12px 28px; font-size: 13px; line-height: 1.6; background: var(--bg-card);
}
.geo-kb-count {
  position: absolute; right: 10px; bottom: 8px;
  font-size: 12px; color: var(--text-muted); pointer-events: none;
}
.geo-kb-actions { display: flex; gap: 8px; margin-top: 10px; }

.kb-prompt-mask {
  position: fixed; inset: 0; z-index: var(--z-kb-prompt);
  background: rgba(32, 33, 36, .28);
  display: flex; justify-content: center; align-items: flex-start;
  padding-top: 14vh;
}
.kb-prompt {
  width: min(440px, 92vw); background: var(--bg-card); border-radius: var(--radius-md);
  box-shadow: 0 12px 36px rgba(0,0,0,.22); padding: 16px 16px 14px;
}
.kb-prompt h3 { margin: 0 0 12px; font-size: 15px; font-weight: 650; }
.kb-prompt .field-label { color: var(--text-strong); font-weight: 500; }
.kb-prompt .geo-select, .kb-prompt input[type="text"], .kb-prompt input[type="number"] { margin-bottom: 10px; }
.kb-prompt-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }

.geo-st { font-weight: 650; font-size: 13px; }
.geo-st.ok { color: var(--success); }
.geo-st.bad { color: var(--danger-strong); }
.geo-st.muted { color: var(--text-tertiary); font-weight: 500; }
.geo-qc.ok { color: var(--success); }
.geo-qc.warn { color: var(--warning-text); }
.geo-qc-sub { color: var(--text-muted); font-size: 11px; line-height: 1.35; margin-top: 2px; }
.geo-ai { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.geo-ai i.mark {
  width: 16px; height: 16px; border-radius: 4px; color: var(--btn-primary-text);
  display: inline-flex; align-items: center; justify-content: center;
  font-style: normal; font-size: 10px; font-weight: 700; flex-shrink: 0;
}
.geo-ai.tongyi i.mark { background: #12b886; }
.geo-ai.wenxin i.mark { background: var(--accent); }
.geo-ai.yuanbao i.mark { background: #1aae6f; }
.geo-ai.doubao i.mark { background: linear-gradient(135deg, #ff8fab, var(--brand-doubao)); border-radius: 50%; }
.geo-ai.deepseek i.mark { background: #2b6cb0; border-radius: 50%; }
.geo-ai.tc .dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--danger-strong);
  display: inline-block; margin-left: 2px;
}
.geo-cluster { display: inline-flex; flex-wrap: wrap; gap: 2px; max-width: 148px; vertical-align: middle; }
.geo-cluster i {
  width: 16px; height: 16px; border-radius: 3px; color: var(--btn-primary-text);
  font-style: normal; font-size: 8px; line-height: 16px; text-align: center;
}
.geo-blank { text-align: center; color: var(--text-muted); padding: 28px 8px !important; }

.geo-art-batch { width: min(820px, 96vw); }
.geo-art-batch-body { overflow: auto; padding: 2px 18px 8px; }
.geo-batch-foot {
  display: flex; justify-content: flex-end; gap: 8px;
  padding: 10px 18px 14px; border-top: 1px solid var(--border-light);
}
.geo-inline-hint { font-weight: 400; color: var(--text-muted); font-size: 12px; }
.geo-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.geo-pill {
  background: var(--bg-card); border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  padding: 5px 14px; font-size: 13px; cursor: pointer; color: var(--text-strong);
}
.geo-pill.on { border-color: var(--accent); color: var(--accent); background: var(--accent-bg-alt); font-weight: 650; }
.geo-pub-grid {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 8px 0 10px;
}
.geo-pub-cell {
  display: flex; align-items: flex-start; gap: 6px;
  border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 8px 8px;
  font-size: 13px; cursor: pointer; min-height: 40px; background: var(--bg-card);
}
.geo-pub-cell.on { border-color: #a8c7fa; background: var(--accent-bg-alt); }
.geo-pub-cell input { accent-color: var(--accent); margin-top: 2px; }
.geo-pub-cell .nm { line-height: 1.35; }
.geo-pub-cell em { display: block; font-style: normal; color: var(--text-muted); font-size: 11px; }
.geo-pub-cell.is-muted { color: var(--text-muted); background: #fafafa; }
.geo-pub-cell.is-muted.on { background: #f3f6fb; }
.geo-cover-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 8px; }
.geo-snap-modal { width: min(560px, 94vw); }
.geo-snap-body { padding: 4px 18px 16px; white-space: pre-wrap; line-height: 1.65; font-size: 13.5px; color: var(--text-strong); }

.mon-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.mon-chip {
  font-size: 11px; padding: 1px 6px; border-radius: 999px;
  background: var(--bg-muted); color: var(--text-strong); white-space: nowrap;
}
.mon-chip.tongyi { background: var(--success-bg); color: var(--success); }
.mon-chip.wenxin { background: var(--bg-sidebar-item-active); color: #1967d2; }
.mon-chip.doubao { background: #fde7f3; color: #a1427a; }
.mon-chip.yuanbao { background: var(--success-bg); color: #0d904f; }
.mon-chip.deepseek { background: var(--bg-sidebar-item-active); color: #1a56c4; }
.mon-pill {
  display: inline-block; padding: 2px 8px; border-radius: 999px;
  font-size: 12px; font-weight: 650;
}
.mon-pill.pause { background: var(--warning-bg); color: var(--warning-text); }
.mon-pill.run { background: var(--success-bg); color: var(--success); }
.mon-pill.wait { background: var(--bg-muted); color: var(--text-secondary); }
.mon-prog { min-width: 150px; }
.mon-prog .t { font-size: 12.5px; color: var(--text-strong); }
.mon-prog .n { font-size: 12px; color: var(--text-tertiary); margin-top: 2px; }
.mon-prog .n b { color: var(--text-primary); font-weight: 650; }
.mon-bar { height: 4px; background: var(--border-light); border-radius: 99px; margin-top: 4px; overflow: hidden; }
.mon-bar i { display: block; height: 100%; background: var(--warning-text); border-radius: 99px; }

.geo-legend { display: flex; flex-wrap: wrap; gap: 12px; margin: 4px 0 8px; font-size: 12.5px; color: var(--text-secondary); }
.geo-legend i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 4px; }
.geo-legend .lv0 { background: #9aa0a6; }
.geo-legend .lv1 { background: var(--accent); }
.geo-legend .lv2a { background: var(--success); }
.geo-legend .lv2b { background: var(--brand-doubao); }
.geo-legend .lv3 { background: var(--warning-text); }
.geo-rec-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; margin: 0 0 8px; }
.geo-adv { margin: 8px 0 12px; }
.geo-adv summary { cursor: pointer; color: var(--accent); font-size: 13px; margin-bottom: 8px; }

.geo-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 12px 0 16px; }
.geo-kpi { border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 12px 14px; background: var(--bg-card); }
.geo-kpi b { display: block; font-size: 26px; line-height: 1.15; color: var(--text-primary); }
.geo-kpi span { color: var(--text-tertiary); font-size: 12.5px; }
.geo-trend-box { border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 12px 12px 8px; margin: 0 0 16px; }
.geo-trend-box h2 { margin: 0 0 8px; font-size: 14px; }
.geo-trend { display: flex; align-items: flex-end; gap: 3px; height: 150px; padding: 4px 0 22px; }
.geo-trend-col {
  flex: 1; min-width: 0; height: 100%;
  display: flex; flex-direction: column; justify-content: flex-end; align-items: center;
  position: relative;
}
.geo-trend-col i { display: block; width: 68%; max-width: 14px; background: var(--accent); border-radius: 3px 3px 0 0; }
.geo-trend-col.spike i { background: var(--warning-text); }
.geo-trend-col span {
  position: absolute; bottom: -18px; left: 50%; transform: translateX(-50%);
  font-size: 10px; color: var(--text-tertiary); white-space: nowrap;
}
.geo-lv {
  display: inline-block; padding: 1px 6px; border-radius: 4px;
  font-size: 12px; font-weight: 650; margin-right: 4px;
}
.geo-lv.l1 { background: var(--bg-sidebar-item-active); color: #1967d2; }
.geo-lv.l2 { background: var(--success-bg); color: var(--success); }
.geo-str { font-size: 12px; color: var(--text-secondary); }
.geo-str.hi { color: var(--danger-strong); font-weight: 650; }
.geo-str.mid { color: var(--warning-text); font-weight: 650; }

.geo-snap-meta {
  display: flex; flex-wrap: wrap; gap: 8px 16px;
  font-size: 13px; color: var(--text-strong); margin: 8px 0;
}
.geo-snap-meta b { font-weight: 650; }
.geo-chat {
  display: flex; border: 1px solid var(--border); border-radius: var(--radius-lg);
  min-height: 340px; overflow: hidden; background: var(--bg-card);
}
.geo-chat-side { width: 210px; flex-shrink: 0; background: var(--bg-secondary); border-right: 1px solid var(--border-light); padding: 12px 10px; }
.geo-chat-side h4 { margin: 0 0 8px; font-size: 13px; }
.geo-chat-brand { font-weight: 700; color: var(--accent); margin-bottom: 10px; }
.geo-chat-item { font-size: 12px; padding: 7px 8px; border-radius: var(--radius-sm); margin-bottom: 4px; color: var(--text-strong); line-height: 1.4; }
.geo-chat-item.on { background: var(--bg-sidebar-item-active); color: var(--accent-text-dark); }
.geo-chat-main { flex: 1; min-width: 0; padding: 14px 16px; }
.geo-chat-top { font-weight: 700; margin-bottom: 12px; font-size: 15px; }
.geo-chat-q { background: var(--bg-muted); border-radius: var(--radius-lg); padding: 8px 12px; margin: 0 0 12px auto; max-width: 80%; font-size: 13px; }
.geo-snap-answer { line-height: 1.75; font-size: 14px; color: var(--text-primary); }
.geo-snap-answer mark { background: #fff3b0; padding: 0 2px; border-radius: 2px; }

@media (max-width: 1100px) {
  .geo-pub-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .geo-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .geo-chat { flex-direction: column; }
  .geo-chat-side { width: auto; border-right: none; border-bottom: 1px solid var(--border-light); }
}

/* ===== 知识库 + SEO工具 ===== */
.tool-content.kb-page,
.tool-content.seo-page { max-width: 1080px; }
.tool-content.kb-tree { max-width: none; }

.kb-home-head, .kb-row-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin: 0 0 8px;
}
.kb-home-head h1, .seo-h { margin: 0; }
.kb-sub { font-size: 13px; font-weight: 500; color: var(--text-tertiary); margin-left: 8px; }
.kb-stats { display: flex; flex-wrap: wrap; gap: 12px; margin: 12px 0 14px; }
.kb-stat {
  min-width: 120px; border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 10px 16px 12px; background: var(--bg-card);
}
.kb-stat b { display: block; font-size: 22px; line-height: 1.2; font-weight: 650; }
.kb-stat span { color: var(--text-tertiary); font-size: 12px; }
.kb-create { border: 1px solid var(--border); border-radius: var(--radius-lg); margin: 0 0 14px; background: var(--bg-secondary); overflow: hidden; }
.kb-create-bar {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; padding: 12px 14px; background: transparent; border: 0; cursor: pointer;
  font-weight: 650; font-size: 14px; text-align: left;
}
.kb-create-bar:hover { background: var(--bg-hover); }
.kb-create-body { padding: 4px 16px 16px; background: var(--bg-card); border-top: 1px solid var(--border-light); }
.kb-input, .kb-select, .seo-input {
  width: 100%; padding: 8px 10px; border: 1px solid var(--border-strong); border-radius: var(--radius-md);
  background: var(--bg-card); font-size: 13px;
}
.kb-input:focus, .kb-select:focus, .seo-input:focus {
  border-color: var(--accent); outline: none; box-shadow: 0 0 0 2px var(--accent-soft);
}
.kb-tpl-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 8px 0 12px; }
.kb-tpl {
  position: relative; display: block; border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 12px 28px 12px 12px; background: var(--bg-card); cursor: pointer; text-align: left;
}
.kb-tpl.on { border-color: var(--accent); background: #f3f8ff; box-shadow: 0 0 0 1px var(--accent); }
.kb-tpl input { position: absolute; right: 10px; top: 12px; accent-color: var(--accent); }
.kb-tpl strong { display: block; font-size: 14px; margin-bottom: 4px; }
.kb-tpl .meta { color: var(--text-tertiary); font-size: 12px; margin: 0 0 4px; }
.kb-tpl p { margin: 0; font-size: 12px; color: var(--text-secondary); line-height: 1.5; }
.kb-tpl .foot { margin-top: 6px; color: var(--text-tertiary); font-size: 12px; }
.kb-sec { margin: 18px 0 8px; font-size: 15px; font-weight: 700; }
.kb-name-btn {
  background: none; border: 0; padding: 0; color: var(--accent); font-weight: 650;
  cursor: pointer; font-size: 13px;
}
.kb-name-btn:hover { text-decoration: underline; }
.kb-tpl-sub { color: var(--text-muted); font-size: 12px; margin-top: 2px; }
.kb-ops { white-space: nowrap; }
.kb-link { background: none; border: 0; color: var(--accent); cursor: pointer; padding: 0 1px; font-size: 13px; }
.kb-link:hover { text-decoration: underline; }
.kb-link.danger { color: var(--danger); }
.kb-dot { color: #c4c7cc; margin: 0 2px; }
.kb-stepper { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 8px 0 10px; }
.kb-step {
  display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px;
  border-radius: 999px; border: 1px solid var(--border-strong); color: var(--text-tertiary); font-size: 12px; background: var(--bg-card);
}
.kb-step.done { border-color: var(--accent-soft-border); color: var(--accent); background: var(--accent-bg); }
.kb-dash { color: #c4c7cc; font-size: 12px; }
.kb-card { border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px 16px; margin: 8px 0 14px; background: var(--bg-card); }
.kb-note { font-size: 12.5px; color: var(--text-secondary); line-height: 1.6; margin: 0 0 12px; }
.kb-note b, .kb-warn { color: var(--danger); font-weight: 650; }
.kb-drop {
  border: 1px dashed #c4c7cc; border-radius: var(--radius-lg); padding: 22px 16px; text-align: center; background: var(--bg-secondary);
}
.kb-drop.over { border-color: var(--accent); background: #f3f8ff; }
.kb-drop h3 { margin: 0 0 6px; font-size: 15px; }
.kb-drop p { margin: 0 0 12px; color: var(--text-tertiary); font-size: 12px; line-height: 1.55; }
.kb-muted { color: var(--text-tertiary); font-size: 12.5px; margin: 8px 0; }
.kb-libtag { font-size: 12px; color: var(--text-tertiary); letter-spacing: .04em; text-transform: lowercase; margin: 0 0 2px; }
.kb-filemeta { font-size: 13px; margin: 0 0 10px; }
.kb-jobnote {
  border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 12px 14px; margin: 14px 0; font-size: 13px; color: var(--text-strong);
}
.kb-adv { margin-top: 10px; font-size: 13px; }
.kb-adv summary { cursor: pointer; color: var(--text-strong); }
.kb-adv-body { display: flex; gap: 8px; margin-top: 8px; }
.kb-adv-body .kb-input { flex: 1; }
.kb-pick {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--bg-secondary); border-radius: var(--radius-md); padding: 14px 16px; margin: 0 0 8px;
}
.kb-pick b { font-size: 14px; }
.kb-folder {
  background: #eef0f3; color: var(--text-strong); border: 1px solid #e3e5e8; border-radius: var(--radius-md);
  padding: 6px 12px; cursor: pointer; font-size: 13px;
}
.kb-folder:hover { background: #e4e6ea; }
.kb-empty {
  border: 1px dashed var(--border-strong); border-radius: var(--radius-md); padding: 18px; text-align: center;
  color: var(--text-tertiary); background: var(--bg-secondary); font-size: 13px;
}
.kb-radio { display: inline-flex; align-items: center; gap: 6px; margin-right: 16px; font-size: 13px; cursor: pointer; }
.kb-radio input { accent-color: var(--accent); }
.kb-field { margin: 0 0 12px; }
.kb-field .field-label { margin-bottom: 6px; }
.kb-api {
  margin-top: 8px; border: 1px solid var(--accent-soft-border); color: var(--accent); background: var(--accent-bg);
  border-radius: var(--radius-sm); padding: 8px 10px; font-size: 13px;
}
.kb-api.warn { border-color: #f6c1be; color: var(--danger); background: #fef7f6; }
.kb-hint { font-size: 12px; color: var(--text-tertiary); margin: 6px 0 10px; }
.kb-inline { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.modal-panel.kb-rename { width: min(420px, 94vw); }
.kb-modal-body { padding: 8px 18px 4px; }
.kb-modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 18px 16px; }

/* 提案审核：左列表 + 右详情 diff */
.kb-review { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 10px; align-items: start; }
.kb-prop-list { display: flex; flex-direction: column; gap: 8px; }
.kb-prop {
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px; text-align: left;
  border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 10px 12px; background: var(--bg-card); cursor: pointer;
}
.kb-prop:hover { background: var(--accent-bg); }
.kb-prop.on { border-color: var(--accent); background: var(--accent-bg); box-shadow: 0 0 0 1px var(--accent) inset; }
.kb-prop b { font-size: 13.5px; line-height: 1.45; }
.kb-prop-meta { font-size: 12px; color: var(--text-tertiary); }
.kb-badge {
  display: inline-block; border-radius: 4px; padding: 1px 6px; font-size: 11.5px; font-weight: 650;
  background: var(--bg-muted); color: var(--text-secondary); flex-shrink: 0;
}
.kb-badge.struct { background: var(--bg-sidebar-item-active); color: var(--accent-text-dark); }
.kb-badge.patch { background: var(--warning-bg); color: #b06000; }
.kb-badge.new { background: var(--success-bg); color: var(--success); }
.kb-badge.rename { background: var(--warning-bg); color: #b06000; }
.kb-badge.accepted { background: var(--success-bg); color: var(--success); }
.kb-badge.rejected { background: #fce8e6; color: var(--danger); }
.kb-prop-detail {
  border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--bg-card); padding: 14px 16px 16px; min-width: 0;
}
.kb-prop-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.kb-prop-head h2 { margin: 0; font-size: 16px; line-height: 1.4; }
.kb-prop-sum { font-size: 13px; color: var(--text-secondary); line-height: 1.6; margin: 0 0 12px; }
.kb-prop-kv { display: flex; gap: 10px; font-size: 13px; margin: 4px 0; }
.kb-prop-kv span { color: var(--text-tertiary); min-width: 64px; flex-shrink: 0; }
.kb-prop-kv b { font-weight: 550; }
.kb-prop-body {
  border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--bg-secondary); padding: 10px 12px;
  font-size: 13px; line-height: 1.7; color: var(--text-strong); margin-bottom: 12px;
}
.kb-diff { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }
.kb-diff-col { border: 1px solid var(--border); border-radius: var(--radius-md); overflow: hidden; min-width: 0; }
.kb-diff-h {
  background: var(--bg-secondary); padding: 6px 10px; font-size: 12px; color: var(--text-secondary); font-weight: 650;
  border-bottom: 1px solid var(--border);
}
.kb-diff-line { padding: 6px 10px; font-size: 12.5px; line-height: 1.6; color: var(--text-strong); }
.kb-diff-line.del { background: #fce8e6; color: var(--danger); }
.kb-diff-line.add { background: var(--success-bg); color: var(--success); }
.kb-prop-acts { margin-top: 4px; }
.kb-done { margin-top: 14px; }
.kb-done-row { display: flex; align-items: center; gap: 8px; padding: 7px 2px; font-size: 13px; border-bottom: 1px solid #f1f3f4; }
.kb-done-row:last-child { border-bottom: 0; }
.kb-done-title { flex: 1; min-width: 0; }

/* 整树建议确认页 */
.kb-draft-card { display: flex; align-items: center; justify-content: space-between; gap: 14px; border-color: #d2e3fc; background: var(--accent-bg); }
.kb-draft-text b { font-size: 14px; }
.kb-draft-text p { margin: 4px 0 0; font-size: 12.5px; color: var(--text-secondary); }
.kb-draft-tree { border: 1px solid var(--border); border-radius: var(--radius-md); padding: 6px 0; margin: 0 0 12px; }
.kb-draft-row { display: flex; align-items: center; gap: 8px; padding: 6px 10px; font-size: 13px; }
.kb-draft-row + .kb-draft-row { border-top: 1px solid var(--bg-secondary); }
.kb-draft-title { font-weight: 550; }
.kb-draft-from { font-size: 12px; color: var(--text-tertiary); }

.kb-tree-top { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; margin-bottom: 8px; }
.kb-tree-name { font-size: 16px; font-weight: 700; }
.kb-tree-acts { font-size: 13px; margin-left: 8px; font-weight: 400; }
.kb-meta { color: var(--text-tertiary); font-size: 12px; margin-top: 2px; }
.kb-tree-tools { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 0 0 8px; }
.kb-tree-tools .kb-input { width: auto; flex: 1; min-width: 140px; max-width: 240px; }
.kb-split { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 10px; min-height: 520px; }
.kb-pane, .kb-editor { border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--bg-card); min-height: 420px; }
.kb-pane { overflow: auto; max-height: calc(100vh - 230px); padding: 6px 0; }
.kb-node { display: flex; align-items: center; gap: 4px; padding: 6px 8px; cursor: pointer; font-size: 13px; }
.kb-node:hover { background: var(--bg-hover); }
.kb-node.sel { background: var(--bg-sidebar-item-active); color: var(--accent-text-dark); }
.kb-tw { width: 18px; border: 0; background: none; cursor: pointer; color: var(--text-secondary); padding: 0; flex-shrink: 0; }
.kb-tw.sp { cursor: default; }
.kb-nt { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kb-editor { display: flex; flex-direction: column; min-width: 0; overflow: hidden; }
.kb-editor-bar {
  display: flex; flex-wrap: wrap; gap: 4px; align-items: center;
  padding: 6px 8px; border-bottom: 1px solid var(--border-light);
}
.kb-fmt {
  min-width: 28px; height: 28px; border: 1px solid var(--border); background: var(--bg-card);
  border-radius: 4px; cursor: pointer; font-size: 13px;
}
.kb-fmt:hover { background: var(--bg-hover); }
.kb-saved { font-size: 12px; color: var(--success); margin-right: 8px; }
.kb-saved.dirty { color: var(--warning-text); }
.kb-editor-bar .spacer { flex: 1; }
.kb-doc-title {
  font-size: 22px; font-weight: 700; margin: 10px 16px 4px;
  padding-left: 10px; border-left: 3px solid var(--accent);
}
.kb-editor .kb-hint { margin: 0 16px 6px; }
.kb-title-in { margin: 8px 12px 0; }

/* 连续长文块编辑器 */
.kb-blocks { flex: 1; overflow-y: auto; padding: 4px 8px 20px 4px; }
.kb-block { position: relative; display: flex; align-items: flex-start; border-radius: 4px; }
.kb-block.drop-above { box-shadow: 0 -2px 0 var(--accent); }
.kb-block.drop-below { box-shadow: 0 2px 0 var(--accent); }
.kb-grip {
  width: 22px; flex-shrink: 0; margin-top: 2px; border: 0; background: none; border-radius: 4px;
  color: #9aa0a6; font-size: 11px; letter-spacing: -1px; padding: 4px 2px; cursor: grab; opacity: 0;
}
.kb-block:hover .kb-grip, .kb-grip:focus { opacity: 1; }
.kb-grip:hover { background: var(--bg-hover); color: var(--text-secondary); }
.kb-blk {
  position: relative; flex: 1; min-width: 0; padding: 3px 8px; border-radius: 4px;
  font-size: 14px; line-height: 1.7; color: var(--text-strong); outline: none; word-break: break-word;
}
.kb-blk:focus { background: var(--accent-bg); }
.kb-blk.h { font-size: 18px; font-weight: 700; margin-top: 8px; color: var(--text-primary); }
.kb-blk.li { padding-left: 24px; }
.kb-blk.li::before { content: '•'; position: absolute; left: 10px; color: var(--text-secondary); }
.kb-blk.q {
  border-left: 3px solid var(--border-strong); border-radius: 0 4px 4px 0;
  padding-left: 12px; color: var(--text-secondary); background: var(--bg-secondary);
}
.kb-blk.empty::after {
  content: attr(data-ph); position: absolute; left: 8px; top: 3px;
  color: #b4b9be; pointer-events: none; font-weight: 400;
}
.kb-blk.li.empty::after { left: 24px; }
.kb-blk.q.empty::after { left: 12px; }
/* 块菜单：fixed 挂 body 防裁剪；层级高于底部播放条，自动演示途中菜单不被遮挡 */
.kb-block-menu {
  position: fixed; z-index: var(--z-kb-menu); min-width: 148px; padding: 4px;
  display: flex; flex-direction: column;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-md);
  box-shadow: 0 4px 16px rgba(60, 64, 67, .18);
}
.kb-bm-item {
  text-align: left; border: 0; background: none; border-radius: var(--radius-sm);
  padding: 7px 12px; font-size: 13px; color: var(--text-strong); cursor: pointer;
}
.kb-bm-item:hover { background: var(--bg-hover); }
.kb-bm-item.danger { color: var(--danger); }

.seo-lead { color: var(--text-secondary); font-size: 13px; margin: 4px 0 8px; line-height: 1.55; }
.seo-checks { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 8px 0 14px; }
.seo-check {
  display: flex; gap: 8px; align-items: flex-start; border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 10px 10px; background: var(--bg-card); cursor: pointer;
}
.seo-check.on { border-color: #d2e3fc; background: var(--accent-bg); }
.seo-check input { margin-top: 2px; accent-color: var(--accent); }
.seo-check b { display: block; font-size: 13px; }
.seo-check span { display: block; color: var(--text-tertiary); font-size: 12px; margin-top: 2px; }
.seo-run { text-align: center; padding: 18px 8px 8px; max-width: 640px; margin: 0 auto; }
.seo-spin {
  width: 42px; height: 42px; margin: 8px auto 14px; border-radius: 50%;
  border: 3px solid var(--border); border-top-color: var(--accent);
  animation: tool-automation-spin .8s linear infinite;
}
.seo-url { color: var(--text-tertiary); margin: 4px 0 10px; }
.seo-bar { height: 8px; background: var(--bg-pressed); border-radius: 99px; overflow: hidden; }
.seo-bar i { display: block; height: 100%; background: var(--accent); border-radius: 99px; transition: width .15s linear; }
.seo-bar-meta { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-tertiary); margin: 4px 0 8px; }
.seo-steps { text-align: left; margin: 16px auto; max-width: 420px; }
.seo-step { display: flex; gap: 8px; align-items: flex-start; margin: 8px 0; color: var(--text-muted); font-size: 13px; }
.seo-step .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--border-strong); margin-top: 6px; flex-shrink: 0; }
.seo-step.done { color: var(--success); }
.seo-step.done .dot { background: var(--success); }
.seo-step.cur { color: var(--accent); font-weight: 700; }
.seo-step.cur .dot { background: var(--accent); }
.seo-hist {
  border: 1px solid #f0d3a0; border-radius: var(--radius-lg); padding: 14px 14px 8px; margin: 0 0 14px; background: var(--bg-card);
}
.seo-hist-top { display: flex; gap: 14px; align-items: flex-start; }
.seo-score { font-size: 32px; font-weight: 700; color: #e09400; line-height: 1; min-width: 52px; }
.seo-score small { display: block; font-size: 12px; font-weight: 650; margin-top: 2px; }
.seo-hist-top .u { font-size: 15px; font-weight: 650; word-break: break-all; }
.seo-hist-top .m { color: var(--text-tertiary); font-size: 12px; margin-top: 2px; }
.seo-hist-acts { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.seo-report {
  border: 1px solid #e8b86d; border-radius: var(--radius-lg); padding: 16px; margin: 0 0 16px; background: var(--bg-card);
}
.seo-report-top { display: flex; gap: 16px; align-items: flex-start; }
.seo-report h2 { margin: 0 0 4px; font-size: 18px; }
.seo-meta { color: var(--text-secondary); font-size: 12.5px; line-height: 1.55; margin: 4px 0 10px; word-break: break-all; }
.seo-subs { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin: 8px 0 12px; }
.seo-sub { background: var(--bg-secondary); border-radius: var(--radius-md); padding: 8px 10px; }
.seo-sub span { display: block; color: var(--text-tertiary); font-size: 12px; }
.seo-sub b { font-size: 20px; }
.seo-sum { background: var(--bg-secondary); border-radius: var(--radius-md); padding: 12px; font-size: 13px; line-height: 1.65; color: var(--text-strong); }
.seo-sum p { margin: 0 0 8px; }
.seo-sum p:last-child { margin: 0; }
.seo-issue {
  display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--border-light); border-radius: var(--radius-md);
  padding: 10px 12px; margin: 8px 0; font-size: 13px;
}
.seo-issue .n {
  width: 22px; height: 22px; border-radius: 50%; background: var(--bg-muted); display: inline-flex;
  align-items: center; justify-content: center; font-size: 12px; flex-shrink: 0;
}
.seo-lv { font-weight: 700; }
.seo-lv.bad { color: var(--danger); }
.seo-lv.mid { color: var(--warning-text); }
.seo-print-note {
  display: flex; justify-content: space-between; gap: 12px; align-items: center;
  background: #f4f6f8; border-radius: var(--radius-md); padding: 10px 12px; margin: 8px 0 12px; font-size: 13px;
}
.seo-brown {
  background: linear-gradient(180deg, #8a5a32 0%, #5c3318 100%);
  color: var(--btn-primary-text); border-radius: var(--radius-md); padding: 18px 20px 16px; margin: 0 0 14px;
}
.seo-brown .k { letter-spacing: .12em; font-size: 12px; opacity: .85; }
.seo-brown .u { font-size: 22px; font-weight: 700; margin: 10px 0 6px; word-break: break-all; }
.seo-brown .m { font-size: 12.5px; opacity: .9; line-height: 1.5; }
.seo-brown-row { display: flex; gap: 18px; align-items: flex-end; margin-top: 14px; }
.seo-brown .seo-score { color: var(--btn-primary-text); font-size: 48px; }
.seo-brown .seo-score small { color: #f3d7b5; }
.seo-pbars { flex: 1; display: flex; gap: 10px; }
.seo-pbars .it { flex: 1; min-width: 0; font-size: 12px; }
.seo-pbars .track { height: 4px; background: rgba(255,255,255,.28); border-radius: 99px; margin: 6px 0 4px; }
.seo-pbars .track i { display: block; height: 100%; background: #f3d2a4; border-radius: 99px; }
.seo-paper { background: #f7f4ef; border-radius: var(--radius-lg); padding: 14px 16px; margin: 0 0 12px; }
.seo-paper h3 { margin: 0 0 8px; font-size: 15px; }
.seo-stub-box {
  border: 1px dashed var(--border-strong); border-radius: var(--radius-lg); padding: 28px 16px; text-align: center;
  color: var(--text-tertiary); background: var(--bg-secondary); font-size: 15px;
}
@media (max-width: 900px) {
  .kb-tpl-grid, .seo-checks { grid-template-columns: 1fr 1fr; }
  .kb-split, .kb-review, .kb-diff { grid-template-columns: 1fr; }
  .seo-subs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .seo-brown-row { flex-direction: column; align-items: stretch; }
}

/* seo detail: 诊断设置 + 报告问题卡 */
.seo-set-note { color: var(--text-secondary); font-size: 13px; line-height: 1.7; margin: 0 0 10px; }
.seo-ai-on {
  display: flex; align-items: center; gap: 8px; margin: 2px 0 10px;
  font-size: 14px; cursor: pointer;
}
.seo-ai-on input { accent-color: var(--accent); width: 16px; height: 16px; }
.seo-go-ai {
  display: inline-block; margin: 0 0 16px; background: none; border: 0; padding: 0;
  color: var(--accent); cursor: pointer; font-size: 14px;
}
.seo-go-ai:hover { text-decoration: underline; }
.seo-sec-head { margin: 4px 0 2px; font-size: 14px; font-weight: 700; }
.seo-strict { display: flex; flex-direction: column; gap: 10px; margin: 2px 0 16px; }
.seo-radio { display: flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; }
.seo-radio input { accent-color: var(--accent); width: 16px; height: 16px; }
.seo-rule-card {
  border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 14px 16px 8px;
  margin: 0 0 12px; background: var(--bg-card);
}
.seo-rule-card.gray { background: #f4f5f7; }
.seo-rule-card h3 { margin: 0 0 8px; font-size: 14px; font-weight: 700; }
.seo-rule {
  display: flex; align-items: flex-start; gap: 8px; margin: 0; padding: 5px 2px;
  font-size: 13.5px; line-height: 1.45; cursor: pointer;
}
.seo-rule input { margin-top: 2px; accent-color: var(--accent); width: 15px; height: 15px; flex-shrink: 0; }
.seo-save { margin-top: 4px; }
.seo-sec-prog { margin: 0 0 8px; color: var(--text-secondary); font-size: 13px; }
.seo-icard {
  display: flex; border: 1px solid var(--border); border-radius: var(--radius-md); margin: 0 0 12px;
  background: var(--bg-card); overflow: hidden;
}
.seo-icard .bar { width: 4px; flex-shrink: 0; }
.seo-icard.bad .bar { background: var(--danger); }
.seo-icard.mid .bar { background: var(--warning); }
.seo-icard.low .bar { background: #ba863f; }
.seo-icard.hint .bar { background: #9aa0a6; }
.seo-icard .body { padding: 12px 16px 12px; min-width: 0; flex: 1; }
.seo-icard h4 {
  margin: 0 0 6px; font-size: 15px; font-weight: 700;
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.seo-itag {
  display: inline-block; font-size: 12px; font-weight: 700; line-height: 1.5;
  padding: 1px 7px; border-radius: 4px;
}
.seo-icard.bad .seo-itag { color: var(--danger); background: #faeeed; }
.seo-icard.mid .seo-itag { color: var(--warning); background: #fcf0e0; }
.seo-icard.low .seo-itag { color: #8d6e3a; background: #f7f1e6; }
.seo-icard.hint .seo-itag { color: var(--text-secondary); background: var(--bg-muted); }
.seo-icard p { margin: 0 0 4px; color: var(--text-strong); font-size: 13px; line-height: 1.65; }
.seo-icard .lead { color: var(--text-secondary); margin-bottom: 6px; }
.seo-icard.bad .lead, .seo-icard.mid .lead { color: var(--text-strong); }
.seo-icard .std { color: var(--text-secondary); }
.seo-icard .k { color: var(--text-primary); }
.seo-skip {
  margin-top: 4px; background: none; border: 0; padding: 0; color: var(--accent);
  cursor: pointer; font-size: 13px;
}
.seo-skip:hover { text-decoration: underline; }
.seo-icard.compact { margin: 0 0 8px; }
.seo-icard.compact .body { padding: 8px 12px; }
.seo-icard.compact h4 { font-size: 13.5px; margin-bottom: 4px; }
.seo-icard.compact p { font-size: 12.5px; margin-bottom: 2px; }

/* ===== seo rank：账号排名 / 作品排名 / 关键词大盘 ===== */
.tool-content.seo-page:has(.seo-rk-table) { overflow-x: auto; }
.seo-rk { color: var(--text-primary); }
.seo-rk .field-label { color: var(--text-primary); font-weight: 650; font-size: 13px; margin-bottom: 6px; }
.seo-rk-field { margin: 0 0 12px; }
.seo-rk-go-row { display: flex; align-items: center; gap: 10px; margin: 2px 0 16px; }
.seo-rk-select {
  width: 118px; height: 34px; padding: 0 8px;
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--bg-card); font-size: 13px;
}
.seo-rk-select:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 2px rgba(26,115,232,.16); }
.seo-rk-go.btn { height: 34px; padding: 0 18px; line-height: 32px; }
.seo-rk-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.seo-rk-top .tool-page-title { margin-bottom: 2px; }
.seo-rk-kline { margin: 0 0 12px; color: var(--text-tertiary); font-size: 13px; }
.seo-rk-back {
  background: none; border: 0; color: var(--accent); cursor: pointer;
  font-size: 12px; padding: 2px 0; flex-shrink: 0;
}
.seo-rk-back:hover { text-decoration: underline; }
.seo-rk-card { border-radius: var(--radius-md); padding: 12px 14px; margin: 0 0 14px; }
.seo-rk-card .hd { display: flex; align-items: center; font-weight: 700; font-size: 14px; margin-bottom: 4px; }
.seo-rk-card p { margin: 2px 0; font-size: 13px; line-height: 1.65; }
.seo-rk-card.ok { background: #e7f6ec; border: 1px solid #b7dfc3; color: #0d652d; }
.seo-rk-card.warn { background: #fff6e8; border: 1px solid #f3d2a2; color: #c26400; }
.seo-rk-tick, .seo-rk-bang {
  display: inline-flex; align-items: center; justify-content: center;
  width: 16px; height: 16px; border-radius: 50%; color: var(--btn-primary-text); font-size: 11px;
  font-weight: 700; margin-right: 6px; flex-shrink: 0;
}
.seo-rk-tick { background: var(--success); }
.seo-rk-bang { background: var(--seo-accent); }
.seo-rk-cond { margin: 2px 0 14px; }
.seo-rk-cond-h { display: flex; align-items: center; font-weight: 700; font-size: 14px; margin-bottom: 8px; }
.seo-rk-mag {
  width: 14px; height: 14px; margin-right: 6px; position: relative; flex-shrink: 0;
  border: 2px solid var(--accent); border-radius: 50%; box-sizing: border-box;
}
.seo-rk-mag::after {
  content: ""; position: absolute; width: 6px; height: 2px; background: var(--accent);
  right: -5px; bottom: -1px; transform: rotate(45deg); border-radius: 1px;
}
.seo-rk-kv { display: flex; gap: 12px; align-items: baseline; margin: 5px 0; font-size: 13px; }
.seo-rk-kv span { color: var(--text-tertiary); width: 108px; flex-shrink: 0; }
.seo-rk-kv b { font-weight: 650; color: var(--text-primary); min-width: 0; }
.seo-rk-ext { color: var(--accent); font-weight: 500; word-break: break-all; }
.seo-rk-ext:hover { text-decoration: underline; }
.seo-rk-tips { margin: 2px 0 16px; font-size: 13px; color: var(--text-strong); line-height: 1.7; }
.seo-rk-tips h3 { margin: 0 0 6px; font-size: 14px; font-weight: 700; display: flex; align-items: center; gap: 6px; }
.seo-rk-tips p { margin: 0; }
.seo-rk-tips .vid { margin: 4px 0; color: var(--text-primary); }
.seo-rk-sec { margin: 6px 0 4px; font-size: 15px; font-weight: 700; }
.seo-rk-hint { margin: 0 0 8px; color: var(--text-tertiary); font-size: 12px; line-height: 1.5; }
.seo-rk-table-wrap { overflow: visible; }
.seo-rk-table { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 13px; }
.seo-rk-table th {
  text-align: left; background: #f5f6f8; color: var(--text-tertiary); font-weight: 600; font-size: 12px;
  padding: 8px 8px; border-bottom: 1px solid #eceff1; white-space: nowrap;
}
.seo-rk-table td {
  padding: 10px 8px; border-bottom: 1px solid #f1f3f4; vertical-align: middle; color: var(--text-primary);
}
.seo-rk-table th.rank, .seo-rk-table td.rank { width: 52px; text-align: center; }
.seo-rk-table th.vid, .seo-rk-table td.vid { width: 168px; white-space: nowrap; font-size: 12.5px; color: var(--text-strong); font-variant-numeric: tabular-nums; }
.seo-rk-table th.nick, .seo-rk-table td.nick { width: 156px; color: var(--text-strong); line-height: 1.35; word-break: break-word; overflow-wrap: anywhere; }
.seo-rk-table th.st, .seo-rk-table td.st { width: 78px; white-space: nowrap; color: var(--text-muted); }
.seo-rk-table th.ops, .seo-rk-table td.ops { width: 148px; white-space: nowrap; text-align: left; }
.seo-rk-table td.title { overflow: hidden; }
.seo-rk-table tr.seo-rk-hit td { background: #fcf0e0; }
.seo-rk-table tr.seo-rk-hit td:first-child { box-shadow: inset 3px 0 0 #f0a020; }
.seo-rk-table tr.seo-rk-hit td.vid { color: var(--seo-accent); font-weight: 650; }
.seo-rk-table th.vid, .seo-rk-table th.nick, .seo-rk-table th.st {
  color: var(--text-tertiary); font-size: 12px; font-weight: 600; white-space: nowrap;
  word-break: normal; overflow-wrap: normal;
}
.seo-rk-rank {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 50%; font-size: 12px; font-weight: 700; line-height: 1;
}
.seo-rk-rank.g { background: #f5b400; color: var(--btn-primary-text); }
.seo-rk-rank.s { background: #c5c9d0; color: var(--btn-primary-text); }
.seo-rk-rank.b { background: #c9844a; color: var(--btn-primary-text); }
.seo-rk-rank.n { background: var(--bg-pressed); color: var(--text-secondary); }
.seo-rk-title { display: flex; align-items: center; gap: 8px; min-width: 0; }
.seo-rk-title.open { align-items: flex-start; }
.seo-rk-title-txt {
  min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.seo-rk-title.open .seo-rk-title-txt { white-space: normal; overflow: visible; text-overflow: clip; }
.seo-rk-exp {
  flex-shrink: 0; background: none; border: 0; padding: 0; color: var(--accent);
  cursor: pointer; font-size: 13px;
}
.seo-rk-exp:hover { text-decoration: underline; }
.seo-rk-sthit { color: var(--seo-accent); font-weight: 700; }
.seo-rk-stdash { color: var(--text-muted); }
.seo-rk-ops { display: inline-flex; align-items: center; gap: 6px; flex-wrap: nowrap; }
.seo-rk-ops .btn { margin: 0; }
.seo-rk-consult {
  background: var(--bg-card); color: var(--warning-text); border: 1px solid #f0b15a;
  border-radius: var(--radius-sm); padding: 3px 10px; font-size: 12px; font-weight: 600;
  cursor: pointer; line-height: 1.4;
}
.seo-rk-consult:hover { background: #fff7ee; }
.seo-rk-hist { margin-top: 4px; padding-top: 12px; border-top: 1px solid var(--border-light); }
.seo-rk-hist-head {
  display: flex; align-items: center; justify-content: space-between;
  font-weight: 700; font-size: 14px; margin-bottom: 10px;
}
.seo-rk-clear { background: none; border: 0; color: var(--text-secondary); cursor: pointer; font-size: 13px; padding: 0; }
.seo-rk-clear:hover { color: var(--accent); }
.seo-rk-pills { display: flex; gap: 8px; margin: 0 0 10px; flex-wrap: wrap; }
.seo-rk-pill {
  border: 1px solid var(--border-strong); background: var(--bg-card); color: var(--text-strong);
  border-radius: 999px; padding: 3px 14px; font-size: 12px; cursor: pointer;
}
.seo-rk-pill.on { background: var(--accent); border-color: var(--accent); color: var(--btn-primary-text); }
.seo-rk-bulk { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; flex-wrap: wrap; }
.seo-rk-seln { color: var(--text-secondary); font-size: 13px; margin-right: 4px; }
.seo-rk-bdel {
  padding: 4px 10px; font-size: 12px; border-radius: var(--radius-sm); cursor: pointer; font-weight: 600;
  background: var(--bg-card); color: #e23b4a; border: 1px solid #f3b4bc;
}
.seo-rk-bdel:disabled { background: #fde8ea; color: #f3b7be; border-color: #f8d5d8; cursor: not-allowed; }
.seo-rk-hrow {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 2px; border-bottom: 1px solid #f1f3f4;
}
.seo-rk-hchk { display: flex; align-items: center; }
.seo-rk-hchk input { accent-color: var(--accent); width: 15px; height: 15px; }
.seo-rk-hmain { flex: 1; min-width: 0; }
.seo-rk-hline { display: flex; align-items: center; gap: 8px; min-width: 0; }
.seo-rk-hline b { font-weight: 650; }
.seo-rk-hsub { color: var(--text-tertiary); font-size: 12px; margin-top: 2px; }
.seo-rk-fieldhint {
  margin: 6px 0 0; color: var(--text-tertiary); font-size: 12px; line-height: 1.55;
}
.seo-rk-top-min { margin-bottom: 4px; justify-content: flex-end; }
.seo-rk-tag {
  display: inline-block; background: var(--bg-card); color: var(--accent);
  border: 1px solid var(--accent-soft-border);
  border-radius: 4px; padding: 1px 6px; font-size: 12px; font-weight: 650; white-space: nowrap;
}
.seo-rk-tag.work { background: #e7f6f3; color: #0f766e; border-color: #8fd4c8; }
.seo-rk-tag.kw { background: #fff1e3; color: var(--warning-text); border-color: #f3c28a; }
.seo-rk-hops { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.seo-rk-badge {
  display: inline-block; padding: 2px 8px; border-radius: 4px;
  font-size: 12px; font-weight: 650; white-space: nowrap;
}
.seo-rk-badge.ok { background: var(--success-bg); color: var(--success); }
.seo-rk-badge.miss { background: #fde7f1; color: #d81b60; }
.seo-rk-time { color: var(--text-muted); font-size: 12px; white-space: nowrap; }
.seo-rk-mini.btn { padding: 2px 8px; font-size: 12px; border-radius: 4px; }
.seo-rk-delbtn { background: none; border: 0; color: var(--danger-strong); cursor: pointer; font-size: 13px; padding: 2px 2px; }
.seo-rk-delbtn:hover { text-decoration: underline; }
.seo-rk-empty { color: var(--text-tertiary); font-size: 13px; padding: 8px 0; }

/* ========== 操作确认弹层（替代原生 confirm 弹窗，复用 modal 体系） ========== */
.ui-confirm-panel { width: min(360px, 92vw); padding: 18px 20px 14px; }
.ui-confirm-title { margin: 0; font-size: 15px; font-weight: 650; }
.ui-confirm-msg { margin: 12px 0 16px; font-size: 13px; line-height: 1.6; color: var(--text-strong); word-break: break-all; }
.ui-confirm-actions { display: flex; gap: 10px; justify-content: flex-end; }

/* ========== SEO 报告打印：隐藏壳层与按钮区，报告主体留白纸黑字 ========== */
@media print {
  .tool-nav-wrap, .demo-bar, .demo-cursor, .demo-ring, .toast-host,
  .tool-automation-banner, .seo-print-note, .kb-row-head { display: none !important; }
  html, body { height: auto; overflow: visible; background: #fff; }
  .app-root { padding-bottom: 0; }
  .tool-app, .tool-main, .tool-content { display: block; height: auto; overflow: visible; background: #fff; }
  .tool-content { padding: 0; }
  .tool-content, .tool-content * {
    color: #000 !important; border-color: #bbb !important;
    box-shadow: none !important; text-shadow: none !important;
  }
  .seo-brown, .seo-paper, .seo-icard, .seo-sum, .seo-sub { background: #fff !important; }
  .seo-brown, .seo-paper, .seo-icard { border: 1px solid #bbb !important; page-break-inside: avoid; }
}
