:root {
  --green: #00934b;
  --border: #e2e8f0;
  --line: #dbe4ee;
  --bg: #f6f8fa;
  --panel: #ffffff;
  --panel-soft: #f8fafc;
  --fg: #0f172a;
  --text: #1e293b;
  --muted: #64748b;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  background:
    radial-gradient(1200px 400px at 80% -120px, rgba(0, 147, 75, .07), transparent 70%),
    linear-gradient(180deg, #eef2f7 0%, var(--bg) 220px);
  color: #1e293b;
  font-size: 13px;
  line-height: 1.4;
  min-height: 100vh;
}

/* 科技感深色顶栏 */
header {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 9px 18px;
  color: #e2e8f0;
  background: linear-gradient(100deg, #0b1220 0%, #111c33 55%, #0b1220 100%);
  border-bottom: 1px solid #1e293b;
  box-shadow: 0 1px 0 rgba(0, 255, 170, .08), 0 6px 18px rgba(0, 0, 0, .25);
}
.brand { display: flex; align-items: center; }
.brand h1 { margin: 0; font-size: 14px; font-weight: 600; letter-spacing: .3px; color: #f1f5f9; }
.brand-wordmark {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 1px;
  line-height: 1.05;
}
.brand-wordmark-main {
  color: #f8fafc;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0;
}
.top-admin-nav {
  display: flex;
  margin-left: auto;
  align-items: center;
  gap: 4px;
}
.top-admin-link {
  position: relative;
  padding: 5px 10px;
  color: #aebdca;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
}
.top-admin-link::after {
  position: absolute;
  right: 10px;
  bottom: 0;
  left: 10px;
  height: 2px;
  background: transparent;
  content: "";
}
.top-admin-link:hover {
  color: #f1f5f9;
}
.top-admin-link.active {
  color: #7ee2ad;
}
.top-admin-link.active::after {
  background: #43c981;
}
.top-context {
  color: #94a3b8;
  font-size: 12px;
  padding-left: 2px;
  white-space: nowrap;
}
.logo-mark {
  display: block;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border-radius: 11px;
}
.login-logo .logo-mark {
  width: 38px;
  height: 38px;
}

/* 生成 / 历史 切换开关（深色顶栏版） */
.seg {
  display: inline-flex;
  border: 1px solid #2a3a55;
  border-radius: 999px;
  background: rgba(255, 255, 255, .04);
  padding: 2px;
}
.seg-btn {
  border: none;
  background: none;
  margin: 0;
  padding: 4px 14px;
  border-radius: 999px;
  font-size: 12px;
  color: #94a3b8;
  cursor: pointer;
}
.seg-btn:hover { color: #e2e8f0; }
.seg-btn.active {
  background: var(--green);
  color: #fff;
  box-shadow: 0 0 10px rgba(0, 200, 120, .45);
}
.seg-btn.active:hover { color: #fff; }

/* ===== 顶部轻量状态 ===== */
.statusbar {
  position: static;
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #7c8aa3;
  font-size: 11px;
  white-space: nowrap;
}
.statusbar b {
  color: #94a3b8;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.tile-group {
  display: flex;
  gap: 6px;
  padding: 3px;
  border: 1px solid #223049;
  border-radius: 8px;
  background: rgba(255, 255, 255, .03);
}
.tile {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 58px;
  padding: 4px 9px;
  border-radius: 6px;
  background: rgba(255, 255, 255, .04);
  border: 1px solid transparent;
}
.tile .tk { font-size: 9px; letter-spacing: .8px; color: #7c8aa3; }
.tile .tv { font-size: 13px; font-weight: 600; color: #e8eef7; line-height: 1.1; }
.tile .tv.mono { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 12px; }
.tile .bar { height: 3px; border-radius: 3px; background: rgba(255, 255, 255, .12); overflow: hidden; margin-top: 1px; }
.tile .bar i { display: block; height: 100%; width: 0; background: var(--green); transition: width .5s ease; }
.tile .bar i.warn { background: #f59e0b; }
.tile .bar i.hot { background: #ef4444; }
.tile.clickable { cursor: pointer; border-color: #223049; }
.tile.clickable:hover { border-color: var(--green); background: rgba(0, 200, 120, .08); }
.tile.accent .tv { color: #34d399; }
.tile.active-pop { border-color: var(--green); box-shadow: 0 0 10px rgba(0, 200, 120, .35); }

/* ===== 浮窗（科技卡片） ===== */
.popover {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 12px;
  z-index: 60;
  min-width: 220px;
  background: #0f1a2e;
  color: #e2e8f0;
  border: 1px solid #233a5c;
  border-radius: 10px;
  padding: 12px 14px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, .5), 0 0 0 1px rgba(0, 200, 120, .08);
}
.popover.wide { min-width: 300px; }
.popover.open { display: block; }
.pop-title { font-size: 12px; font-weight: 700; margin-bottom: 8px; color: #f1f5f9; }
.pop-title .muted { color: #7c8aa3; font-weight: 400; }
.pop-row { display: flex; justify-content: space-between; gap: 16px; font-size: 12.5px; padding: 3px 0; }
.pop-row span { color: #94a3b8; }
.pop-row b { color: #e8eef7; }

select {
  padding: 4px 7px;
  border: 1px solid #2a3a55;
  border-radius: 5px;
  font-size: 12.5px;
  font-family: inherit;
  background: #0b1424;
  color: #e2e8f0;
  width: 100%;
}
select:focus { outline: none; border-color: var(--green); }
.usage-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 5px 14px;
  font-size: 12.5px;
  margin-top: 10px;
}
.usage-grid .lbl { color: #94a3b8; }
.usage-grid .val { text-align: right; font-variant-numeric: tabular-nums; font-family: ui-monospace, Menlo, monospace; color: #e8eef7; }
.usage-grid .total { font-weight: 700; border-top: 1px solid #233a5c; padding-top: 6px; margin-top: 3px; color: #f1f5f9; }
.usage-grid .total.val { color: #34d399; }

@media (max-width: 820px) {
  header { flex-wrap: wrap; }
  .top-context { display: none; }
  .statusbar { margin-left: 0; width: 100%; flex-wrap: wrap; }
  .popover { right: 8px; }
}

/* 当前用户 + 退出 */
.userbox { display: flex; align-items: center; gap: 8px; font-size: 12px; color: #cbd5e1; }
.userbox .who b { color: #f1f5f9; }
.logout-btn {
  margin: 0;
  padding: 4px 10px;
  font-size: 12px;
  color: #cbd5e1;
  background: rgba(255, 255, 255, .05);
  border: 1px solid #2a3a55;
  border-radius: 6px;
  cursor: pointer;
}
.logout-btn:hover { border-color: #ef4444; color: #fca5a5; }

@media (max-width: 560px) {
  header {
    gap: 8px 10px;
    padding: 8px 14px;
  }
  .brand {
    width: 100%;
  }
  .top-admin-nav {
    margin-left: 0;
  }
  .userbox {
    margin-left: auto;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: flex-end;
  }
  .logout-btn {
    padding: 4px 8px;
  }
}

/* 登录遮罩 */
.login-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(900px 400px at 50% -80px, rgba(0, 147, 75, .15), transparent 70%),
    linear-gradient(160deg, #0b1220, #111c33);
}
.login-overlay.show { display: flex; }
.login-card {
  width: 300px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 22px;
  background: #0f1a2e;
  border: 1px solid #233a5c;
  border-radius: 12px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .5);
}
.login-logo {
  display: flex;
  align-items: center;
  color: #f1f5f9;
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 6px;
}
.login-card input {
  background: #0b1424;
  border: 1px solid #2a3a55;
  color: #e2e8f0;
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 13px;
}
.login-card input:focus { outline: none; border-color: var(--green); }
.login-card .primary { margin-top: 4px; padding: 8px; letter-spacing: 2px; }
.login-err { color: #fca5a5; font-size: 12px; min-height: 14px; }
#projects-table.hide-owner .col-owner { display: none; }
button.danger { color: #dc2626; border-color: #fca5a5; }
button.danger:hover { background: #fef2f2; border-color: #dc2626; color: #dc2626; }
button.danger:disabled {
  color: #94a3b8;
  background: #f1f5f9;
  border-color: #cbd5e1;
  cursor: wait;
}
.tag-admin { color: var(--green); font-weight: 600; }

/* 操作提示 toast */
.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%) translateY(20px);
  z-index: 300;
  padding: 9px 16px;
  border-radius: 8px;
  font-size: 13px;
  color: #fff;
  background: #0f172a;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .3);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s, transform .25s;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.ok { background: #0f7a45; }
.toast.err { background: #b91c1c; }

/* 登录后后台壳：左侧栏目 + 右侧工作区 */
.app-shell {
  display: grid;
  grid-template-columns: 214px minmax(0, 1fr);
  min-height: calc(100vh - 50px);
}
body.auth-pending header,
body.login-active header,
body.auth-pending .app-shell,
body.login-active .app-shell {
  visibility: hidden;
}
.sidebar {
  background: #f7f9fa;
  border-right: 1px solid var(--border);
  padding: 18px 14px;
  position: sticky;
  top: 0;
  align-self: start;
  min-height: calc(100vh - 50px);
}
.side-section { margin-bottom: 18px; }
.side-title {
  font-size: 11px;
  color: #7a8995;
  font-weight: 700;
  letter-spacing: 0;
  margin: 0 0 10px 11px;
}
.side-btn {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  min-height: 40px;
  margin: 0 0 4px;
  padding: 9px 12px 9px 15px;
  border: 1px solid transparent;
  border-left: 3px solid transparent;
  border-radius: 4px;
  color: #40515d;
  background: transparent;
  text-align: left;
  font-weight: 600;
  box-sizing: border-box;
  cursor: pointer;
  text-decoration: none;
}
.side-btn:hover {
  border-color: #dce5e9;
  border-left-color: #9dcdb0;
  color: #173f2b;
  background: #ffffff;
}
.side-btn.active {
  border-color: #cfe2d6;
  border-left-color: #18834d;
  color: #145b37;
  background: #ffffff;
  box-shadow: 0 3px 10px rgba(24, 67, 46, .07);
}
.side-btn.sub {
  font-weight: 500;
  color: #64748b;
}
.workspace {
  min-width: 0;
  background: transparent;
}

/* 主区：全宽单栏(最大 2000)，上模块一 / 下关键词词库。 */
main {
  width: 100%;
  max-width: 2000px;
  margin: 12px auto;
  padding: 0 16px;
}
.workspace > main {
  min-height: calc(100vh - 74px);
}
.workspace-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 14px 16px;
  margin-bottom: 10px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}
.workspace-head h2 {
  margin: 0;
  font-size: 19px;
  color: var(--fg);
  line-height: 1.25;
}
.title-line {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.title-line h2 { margin: 0; }
.help-btn {
  border: 1px solid var(--border);
  background: #fff;
  color: #2563eb;
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 12px;
  cursor: pointer;
}
.help-btn:hover {
  border-color: #93c5fd;
  background: #eff6ff;
}
.workspace-head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.new-build-btn {
  border: 1px solid #86efac;
  background: #dcfce7;
  color: #047857;
  border-radius: 6px;
  padding: 5px 11px;
  font-size: 12px;
  font-weight: 700;
}
.new-build-btn:hover {
  border-color: #22c55e;
  background: #bbf7d0;
  color: #065f46;
}
.workspace-head p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12.5px;
}

@media (max-width: 560px) {
  main {
    margin: 10px auto;
    padding: 0 12px;
  }
  .workspace-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
  }
  .workspace-head-actions {
    width: 100%;
    justify-content: flex-start;
  }
  .new-build-btn {
    white-space: nowrap;
  }
  .module-status-badge {
    margin: 6px 0 0;
  }
  .export {
    margin-left: 0;
  }
}
.crumb {
  font-size: 11px;
  color: #059669;
  font-weight: 700;
  margin-bottom: 4px;
}
.module-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.module-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 14px;
  min-height: 112px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}
.module-card h3 {
  margin: 0 0 8px;
  font-size: 14px;
  color: #0f172a;
}
.module-card p {
  margin: 0;
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.6;
}
.module-status-badge {
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
  margin-left: 8px;
  padding: 3px 7px;
  border: 1px solid #facc15;
  border-radius: 999px;
  background: #fefce8;
  color: #854d0e;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}
.model-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.model-toolbar select { width: 180px; background: #fff; color: #0f172a; border-color: var(--border); }
.model-bindings-card {
  padding: 0;
  overflow: visible;
}
.model-bindings-card > h2 {
  margin: 0;
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 8;
}
.model-bindings-card #model-bindings-body {
  padding: 0;
}
.model-bindings-card #model-bindings-body > .hint,
.model-bindings-card #model-bindings-body > .results-placeholder {
  margin: 0;
  padding: 10px 16px;
}
.model-bindings-page-table {
  width: 100%;
  max-height: calc(100vh - 285px);
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 6px;
}
.model-bindings-table {
  width: 100%;
  min-width: 740px;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
}
.model-bindings-table thead th {
  position: sticky;
  top: 0;
  z-index: 7;
  background: #f8fafc;
  box-shadow: 0 1px 0 var(--border);
}
.model-bindings-table th:nth-child(1),
.model-bindings-table td:nth-child(1) {
  width: 10%;
  white-space: nowrap;
}
.model-bindings-table th:nth-child(2),
.model-bindings-table td:nth-child(2) {
  width: 19%;
}
.model-bindings-table th:nth-child(3),
.model-bindings-table td:nth-child(3) {
  width: 41%;
}
.model-bindings-table th:nth-child(4),
.model-bindings-table td:nth-child(4) {
  width: 22%;
}
.model-bindings-table th:nth-child(5),
.model-bindings-table td:nth-child(5) {
  width: 8%;
  text-align: center;
}
.model-order-input {
  width: 48px;
  height: 30px;
  padding: 3px 6px;
  text-align: center;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  color: #0f172a;
}
.model-module-input {
  width: 100%;
  min-height: 78px;
  resize: vertical;
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  color: #0f172a;
  font-size: 12px;
  line-height: 1.45;
}
.model-module-input:disabled {
  background: #f8fafc;
  color: var(--muted);
}
.model-feature-name {
  font-weight: 600;
  color: #0f172a;
  margin-bottom: 4px;
}
.model-module-name {
  color: #263b49;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.45;
}
.model-feature-desc {
  font-size: 12px;
  line-height: 1.55;
  color: var(--muted);
}
.model-runtime-note {
  margin-top: 6px;
  padding: 5px 7px;
  border: 1px solid #dbeafe;
  border-radius: 6px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 11.5px;
  line-height: 1.45;
}
.model-select {
  min-width: 0;
  background: #fff;
  color: #0f172a;
  border-color: var(--border);
}
.model-current {
  margin-top: 5px;
  font-size: 11.5px;
  color: var(--muted);
}
.model-current.ok { color: #166534; }
.model-current.bad { color: #b42318; }
.model-test-btn {
  margin-top: 0;
  min-height: 28px;
  padding: 4px 9px;
  font-size: 12px;
}
.model-test-result {
  margin-top: 5px;
  font-size: 11.5px;
  line-height: 1.4;
  color: var(--muted);
  word-break: break-word;
}
.model-test-result.ok { color: #166534; }
.model-test-result.bad { color: #b42318; }
.model-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 11px;
}
.model-pill.bad {
  border-color: #fecaca;
  background: #fef2f2;
  color: #b91c1c;
}
.usage-grid.light {
  max-width: 460px;
  color: #0f172a;
}
.usage-grid.light .lbl { color: var(--muted); }
.usage-grid.light .val { color: #0f172a; }
.usage-grid.light .total.val { color: #047857; }

#view-users .workspace-head,
#view-models .workspace-head,
#view-settings .workspace-head,
#view-history .workspace-head,
#view-history-detail .workspace-head,
#view-build-help .workspace-head {
  align-items: center;
}

.settings-layout {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  min-height: calc(100vh - 170px);
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--panel);
}

.settings-modules {
  padding: 16px 12px;
  border-right: 1px solid var(--border);
  background: #f8faf9;
}

.settings-modules-title {
  margin: 0 8px 10px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.settings-module-btn {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid transparent;
  border-radius: 4px;
  background: transparent;
  color: #334155;
  font-size: 13px;
  font-weight: 600;
  text-align: left;
}

.settings-module-btn.active {
  border-color: #173e2c;
  background: #173e2c;
  color: #ffffff;
  box-shadow: 0 5px 14px rgba(23, 62, 44, .18);
}

.settings-module-btn.active::after {
  position: absolute;
  top: 9px;
  right: 9px;
  width: 4px;
  height: 20px;
  border-radius: 2px;
  background: #72d69b;
  content: "";
}

.settings-content {
  display: flex;
  min-width: 0;
  padding: 18px;
  flex-direction: column;
}

.settings-panels {
  min-width: 0;
}

.settings-panels > .settings-content[hidden] {
  display: none;
}

#settings-panel-models #model-bindings-body {
  min-width: 0;
}

#settings-panel-models #model-bindings-body > .hint,
#settings-panel-models #model-bindings-body > .results-placeholder {
  margin: 0;
  padding: 10px 2px;
}

.settings-content-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.settings-content-head h3 {
  margin: 3px 0 5px;
  color: #132936;
  font-size: 18px;
}

.settings-content-head p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.settings-file-badge {
  flex: 0 0 auto;
  padding: 4px 8px;
  border: 1px solid #cbd5e1;
  border-radius: 5px;
  background: #f8fafc;
  color: #475569;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
}

.settings-prompt-editor {
  width: 100%;
  height: 66vh;
  min-height: 480px;
  padding: 14px 16px;
  resize: vertical;
  border-color: #cbd5e1;
  border-radius: 6px;
  background: #fbfcfc;
  color: #172a36;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  line-height: 1.65;
  tab-size: 2;
}

.settings-prompt-editor:disabled {
  cursor: wait;
  color: #94a3b8;
}

.settings-editor-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 10px;
}

.settings-save-status {
  min-height: 20px;
  color: var(--muted);
  font-size: 12px;
}

.settings-save-status.dirty {
  color: #9a6700;
}

.settings-save-status.saved {
  color: #166534;
}

.settings-save-status.error {
  color: #b42318;
}

.settings-editor-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
}

.settings-reset-btn {
  min-height: 32px;
  padding: 6px 12px;
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #475569;
}

.settings-reset-btn:hover:not(:disabled) {
  border-color: #94a3b8;
  color: #1e293b;
}

#view-users .form-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px 14px;
}

#view-users .field {
  grid-template-columns: 58px minmax(0, 1fr);
  margin-bottom: 0;
}

.user-create-card {
  max-width: 920px;
}

.users-list-card {
  min-height: 260px;
}

.user-table-wrap {
  min-height: 180px;
  max-height: calc(100vh - 280px);
}

.admin-table th:nth-child(1),
.admin-table td:nth-child(1) {
  width: 70px;
  text-align: center;
}

.admin-table th:nth-child(3),
.admin-table td:nth-child(3) {
  width: 120px;
}

.admin-table th:nth-child(4),
.admin-table td:nth-child(4) {
  width: 170px;
}

.admin-table th:nth-child(5),
.admin-table td:nth-child(5) {
  width: 310px;
  white-space: normal;
}

.admin-table td:nth-child(5) button {
  margin: 2px 4px 2px 0;
}

@media (max-width: 920px) {
  .settings-layout {
    grid-template-columns: 1fr;
  }
  .settings-modules {
    display: flex;
    gap: 6px;
    padding: 10px 12px;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }
  .settings-modules-title {
    display: none;
  }
  .settings-module-btn {
    width: auto;
  }
  .settings-prompt-editor {
    height: 62vh;
    min-height: 420px;
  }
  #view-users .form-grid {
    grid-template-columns: 1fr;
  }
  .admin-table th:nth-child(5),
  .admin-table td:nth-child(5) {
    width: 220px;
  }
}

@media (max-width: 560px) {
  .settings-content {
    padding: 14px 12px;
  }
  .settings-content-head {
    gap: 8px;
  }
  .settings-editor-footer {
    align-items: stretch;
    flex-direction: column;
  }
  .settings-editor-actions {
    justify-content: flex-end;
  }
}

@media (max-width: 980px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar {
    position: static;
    min-height: auto;
    display: block;
    padding: 10px 12px;
  }
  .side-section {
    display: flex;
    margin-bottom: 0;
    align-items: center;
    gap: 4px;
    overflow-x: auto;
  }
  .side-title {
    flex: 0 0 auto;
    margin: 0 8px 0 0;
  }
  .side-btn {
    width: auto;
    flex: 0 0 auto;
    margin: 0;
  }
  .module-grid { grid-template-columns: 1fr; }
  .model-bindings-page-table {
    overflow-x: auto;
    padding-bottom: 2px;
  }
}

@media (max-width: 560px) {
  .sidebar {
    padding: 10px 12px;
    gap: 6px;
  }
  .side-title {
    margin: 0 0 5px 6px;
  }
  .side-btn {
    min-height: 34px;
    padding: 7px 10px 7px 12px;
  }
}

/* 模块一表单：横向铺开、上下变矮的两列网格 */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 28px;
  align-items: start;
}
.form-grid .span2 { grid-column: 1 / -1; }
@media (max-width: 820px) {
  .form-grid { grid-template-columns: 1fr; }
}

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 12px 14px;
  margin-bottom: 10px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 8px 24px rgba(15, 23, 42, .05);
}
.card h2 {
  margin: 0 0 9px;
  font-size: 12px;
  font-weight: 700;
  color: var(--fg);
  border-bottom: 1px solid var(--border);
  padding-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 7px;
}
.card h2::before {
  content: "";
  width: 4px;
  height: 13px;
  border-radius: 2px;
  background: linear-gradient(var(--green), #34d399);
}

/* 字段行：标签在左、控件在右，横排省竖向空间 */
.field {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 8px;
  align-items: start;
  margin-bottom: 6px;
}
.field > label {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  padding-top: 5px;
  line-height: 1.25;
  white-space: nowrap;
}
.field .ctrl { min-width: 0; }
.req { color: #dc2626; font-weight: 700; }
.hint { font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.hint.done { color: var(--green); }

/* 关键词分类彩色标签：每类一种鲜明颜色，便于区分 */
.cat {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 11px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  border: 1px solid transparent;
}
.cat-core  { background: #dcfce7; color: #15803d; border-color: #86efac; }  /* 核心词-绿 */
.cat-big   { background: #dbeafe; color: #1d4ed8; border-color: #93c5fd; }  /* 大词-蓝 */
.cat-scene { background: #ede9fe; color: #6d28d9; border-color: #c4b5fd; }  /* 场景长尾-紫 */
.cat-func  { background: #fef3c7; color: #b45309; border-color: #fcd34d; }  /* 功能长尾-琥珀 */
.cat-param { background: #cffafe; color: #0e7490; border-color: #67e8f9; }  /* 参数长尾-青 */
.cat-aud   { background: #ffedd5; color: #c2410c; border-color: #fdba74; }  /* 人群长尾-橙 */
.cat-gift  { background: #fee2e2; color: #b91c1c; border-color: #fca5a5; }  /* 礼物长尾-红 */
.cat-color { background: #fce7f3; color: #be185d; border-color: #f9a8d4; }  /* 颜色长尾-粉 */
.cat-other { background: #f1f5f9; color: #475569; border-color: #cbd5e1; }  /* 其他长尾-灰 */

/* 词根/关键词报告：固定列宽（colgroup 生效）、可点击排序的表头 */
.data-table {
  table-layout: fixed;
  width: 100%;
  border-collapse: collapse;
  margin-top: 0;
  font-size: 12px;
}
.data-table th,
.data-table td {
  overflow: hidden;
  text-overflow: ellipsis;
  border: 1px solid var(--border);
  padding: 6px 8px;
  text-align: left;
  vertical-align: middle;
}
.data-table td.kw { white-space: normal; word-break: break-word; }
.data-table th {
  background: var(--panel-soft);
  color: #334155;
  font-weight: 700;
  white-space: nowrap;
}
.data-table th.sortable { cursor: pointer; user-select: none; white-space: nowrap; }
.data-table th.sortable:hover { color: var(--green); }
.data-table th .arr { opacity: .55; font-size: 11px; }
.data-table th.sortable:hover .arr { opacity: 1; }
.data-table td.empty { text-align: center; color: var(--muted); padding: 16px; }
/* 自适应列宽（词根表用）：按内容收缩，不再固定那么宽 */
.data-table.auto { table-layout: auto; width: auto; min-width: 240px; max-width: 100%; }
.data-table.auto th, .data-table.auto td { white-space: nowrap; padding-right: 22px; }
.data-table.auto td.kw { white-space: nowrap; }
/* 全部行装进固定高度的内嵌滚动框，表头吸顶 */
.table-scroll {
  max-height: 58vh;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--panel);
}
.table-scroll thead th {
  position: sticky; top: 0; z-index: 1;
  background: #f1f5f9; box-shadow: inset 0 -1px 0 var(--border);
}
.tbl-count { font-size: 11.5px; color: var(--muted); margin-top: 5px; }

/* 生成进度条（不确定型动画，点击生成那一刻显示）*/
.gen-progress { margin: 8px 0 4px; }
.gen-progress-bar {
  height: 8px;
  background: #e2e8f0;
  border-radius: 5px;
  overflow: hidden;
  position: relative;
}
.gen-progress-bar > i {
  position: absolute; top: 0; left: 0;
  display: block; height: 100%; width: 35%;
  border-radius: 5px;
  background: linear-gradient(90deg, var(--green), #34d399);
  animation: indet 1.1s infinite ease-in-out;
}
@keyframes indet {
  0%   { left: -35%; }
  100% { left: 100%; }
}
.gen-progress-tip {
  margin-top: 5px;
  font-size: 11.5px; color: var(--muted);
}

/* 后台 Search Terms 展示 */
.st-box {
  font-family: inherit;
  font-size: 12.5px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 9px 11px;
  word-break: break-word;
  line-height: 1.6;
  color: #0f172a;
}
.st-bytes { font-size: 11.5px; font-weight: 600; color: var(--green); margin-left: 6px; }
.st-bytes.over { color: #dc2626; }

/* 模块手动折叠 */
.card-h { cursor: pointer; }
.card-h .caret {
  display: inline-block; width: 0; height: 0;
  border-left: 5px solid transparent; border-right: 5px solid transparent;
  border-top: 6px solid var(--muted);
  transition: transform .15s; vertical-align: middle;
}
.card.collapsed .card-h .caret { transform: rotate(-90deg); }
.card.collapsed > :not(h2) { display: none; }
.v2-flow-card.v2-step-locked > .card-h {
  color: var(--muted);
  cursor: not-allowed;
  opacity: .72;
}
.v2-flow-card.v2-step-locked > .card-h .caret {
  border-top-color: #94a3b8;
}

/* 本次任务 token 消耗 */
.gen-tokens { font-size: 12.5px; font-weight: 600; color: var(--green); margin-top: 8px; }
.step-token-badge {
  display: inline-flex;
  align-items: center;
  flex: 0 1 auto;
  min-width: 0;
  max-width: 52%;
  margin-left: 10px;
  padding: 2px 7px;
  border: 1px solid #bbf7d0;
  border-radius: 999px;
  background: #f0fdf4;
  color: #166534;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
}
.card-h > span.step-token-badge.step-token-badge {
  flex: 0 1 max-content;
  min-width: 0;
  width: max-content;
}
@media (max-width: 560px) {
  .card-h {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .card-h > span:not(.caret):not(.step-token-badge) {
    flex: 0 0 calc(100% - 26px);
  }
  .step-token-badge {
    order: 3;
    max-width: calc(100% - 96px);
    margin-left: 26px;
  }
  .card-reset-btn {
    order: 4;
    flex: 0 0 auto;
    margin: 4px 0 0 26px;
  }
}
.tok-total td { border-top: 2px solid var(--border); background: var(--bg); }

/* 五点描述列表 */
ul.bullets, ol.bullets { margin: 6px 0 0; padding-left: 20px; }
ul.bullets li, ol.bullets li { margin-bottom: 8px; line-height: 1.55; font-size: 13px; }
.desc-actions { margin-bottom: 6px; }

/* 中英对照：中文行 */
.zh-line { font-size: 12.5px; color: #475569; margin-top: 3px; line-height: 1.5; }

/* 竞品 ASIN 国家选择行 */
.asin-country { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; flex-wrap: wrap; }
.asin-country select { width: auto; padding: 3px 6px; font-size: 12.5px; }

/* 系统工作流模块 */
.flow-h { margin: 14px 0 8px; font-size: 13px; color: #0f172a; }
.flow-table { table-layout: auto; }
.flow-table th, .flow-table td { font-size: 12.5px; vertical-align: top; padding: 6px 8px; line-height: 1.5; }
.flow-table td:first-child { white-space: nowrap; }
.flow { display: flex; flex-direction: column; align-items: stretch; gap: 0; }
.flow-step {
  display: flex; gap: 10px; align-items: flex-start;
  border: 1px solid var(--border); border-radius: 8px;
  background: var(--bg); padding: 9px 12px;
}
.flow-step > span.fs-n {
  flex: 0 0 auto; width: 22px; height: 22px; border-radius: 50%;
  background: linear-gradient(var(--green), #34d399); color: #fff;
  font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center;
}
.flow-step b { font-size: 13px; }
.fs-d { font-size: 12px; color: var(--muted); line-height: 1.55; margin-top: 3px; }
.fs-o { font-size: 12px; color: var(--green); font-weight: 600; margin-top: 4px; }
.flow-arrow { text-align: center; color: #cbd5e1; font-size: 12px; line-height: 1.2; padding: 2px 0; }

/* 关键词报告标题里的下载按钮 */
.export.inline {
  width: auto; margin-left: auto; padding: 3px 10px; font-size: 11.5px;
  font-weight: 600; cursor: pointer;
}
/* 历史旧版本里的小标题 */
.gen-sub { font-size: 12px; font-weight: 600; color: var(--muted); margin: 8px 0 4px; }

/* 上传进度条与状态 */
.upbar-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 6px 0 3px;
}
.upbar-row .upbar { flex: 1 1 auto; margin: 0; }
.upbar-row.upload-complete .upbar > i {
  background: var(--green);
}
.upload-percent {
  flex: 0 0 40px;
  color: var(--muted);
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.upbar-row.upload-complete .upload-percent {
  color: var(--green);
  font-weight: 700;
}
.stop-btn {
  flex: 0 0 auto;
  width: auto;
  padding: 3px 10px;
  font-size: 11.5px;
  border: 1px solid #fca5a5;
  background: #fef2f2;
  color: #dc2626;
  border-radius: 5px;
  cursor: pointer;
  white-space: nowrap;
}
.stop-btn:hover { background: #fee2e2; border-color: #f87171; }
.upbar {
  height: 8px;
  background: #e2e8f0;
  border-radius: 5px;
  overflow: hidden;
  margin: 6px 0 3px;
}
.upbar > i {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--green), #34d399);
  transition: width .15s ease;
}
.up-status { font-size: 11.5px; color: var(--muted); line-height: 1.5; }
.up-status.done { color: var(--green); }
.up-status.err { color: #dc2626; }
.link-btn {
  border: none;
  background: #fff;
  padding: 0 2px;
  color: #dc2626; cursor: pointer; font-size: 11.5px; text-decoration: underline;
  width: auto;
}
.link-btn:hover {
  background: #fff;
}

input, textarea {
  width: 100%;
  padding: 4px 7px;
  border: 1px solid var(--border);
  border-radius: 5px;
  font-size: 12.5px;
  font-family: inherit;
}
textarea { resize: vertical; }
input:focus, textarea:focus { outline: none; border-color: var(--green); }

/* 产品描述：结构化分项网格，逐项填写更清晰 */
.desc-field > label { padding-top: 2px; }
.desc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px 16px;
}
.desc-grid .df {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.desc-grid .df.full { grid-column: 1 / -1; }
.desc-grid .df > label {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--muted);
  line-height: 1.2;
  display: flex;
  align-items: center;
  gap: 4px;
}
.desc-grid .df textarea { height: 46px; resize: vertical; }
.desc-grid .df.full textarea { height: 52px; }
.gift-row { display: flex; gap: 8px; align-items: center; }
.gift-row select { flex: 0 0 92px; width: 92px; }
.gift-row input { flex: 1 1 auto; }
@media (max-width: 560px) {
  .desc-grid { grid-template-columns: 1fr; }
  .desc-grid .df.full { grid-column: auto; }
}

/* 产品图片：横向缩略图条，可横向滚动 */
:root { --media-h: 104px; }

/* 产品图片：横向缩略图条，高度与文本框一致，可横向滚动 */
.image-strip {
  display: flex;
  align-items: stretch;
  gap: 6px;
  height: var(--media-h);
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: #fff;
  overflow-x: auto;
}
.img-add {
  flex: 0 0 auto;
  min-width: 64px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px dashed var(--border);
  border-radius: 4px;
  color: var(--muted);
  font-size: 12px;
  cursor: pointer;
}
.img-add:hover { border-color: var(--green); color: var(--green); }
.thumb { position: relative; flex: 0 0 auto; height: 100%; }
.thumb img {
  height: 100%;
  width: auto;
  object-fit: cover;
  border: 1px solid var(--border);
  border-radius: 4px;
  display: block;
}
.thumb .rm {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 16px;
  height: 16px;
  line-height: 14px;
  text-align: center;
  font-size: 12px;
  color: #fff;
  background: rgba(0, 0, 0, .55);
  border-radius: 50%;
  cursor: pointer;
}
.thumb .rm:hover { background: #e11d48; }

/* 重复输入项横向铺排 */
.field-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 5px;
}
/* 竞品 ASIN：URL 较长，给更宽的输入框 */
.field-grid.wide {
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}
.add {
  padding: 1px 6px;
  font-size: 11px;
  border: 1px dashed var(--border);
  background: #fff;
  color: var(--muted);
  border-radius: 5px;
  cursor: pointer;
  margin-top: 4px;
}
.add:hover { border-color: var(--green); color: var(--green); }

button {
  padding: 5px 11px;
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 5px;
  cursor: pointer;
  font-size: 12px;
  margin: 0 4px 0 0;
}
button:hover { border-color: var(--green); color: var(--green); }
button.primary { background: var(--green); color: #fff; border-color: var(--green); }
button.primary:hover { opacity: .9; color: #fff; }
button:disabled {
  cursor: not-allowed;
  opacity: .7;
  filter: grayscale(.15);
}
input[type="file"]:disabled {
  cursor: not-allowed;
  opacity: .48;
  filter: grayscale(.2);
}
button:disabled:hover {
  border-color: var(--border);
  color: inherit;
}
button.primary:disabled:hover {
  color: #64748b;
}
button.primary:disabled {
  background: #e2e8f0;
  border-color: #cbd5e1;
  color: #64748b;
  opacity: 1;
}
.actions { margin-top: 8px; }
.export { display: inline-block; margin-left: 6px; font-size: 12px; color: var(--green); }
.v2-card .actions,
.history-step-card .actions,
.full-log-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.v2-card .actions .export,
.history-step-card .actions .export,
.full-log-actions .export,
.v2-progress-head .v2-log-download-btn {
  margin: 0;
}
.v2-card .actions a.export,
.v2-card .actions button.export,
.history-step-card .actions a.export,
.history-step-card .actions button.export,
.full-log-actions .export {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 10px;
  border: 1px solid #bbf7d0;
  border-radius: 6px;
  background: #f0fdf4;
  color: #047857;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
}
.v2-card .actions a.export:hover,
.v2-card .actions button.export:hover,
.history-step-card .actions a.export:hover,
.history-step-card .actions button.export:hover,
.full-log-actions .export:hover {
  border-color: #86efac;
  background: #dcfce7;
  color: #065f46;
}

/* 结果区 */
.results-placeholder { color: var(--muted); font-size: 12px; padding: 10px 4px; }
h3 { font-size: 12px; margin: 10px 0 5px; color: var(--muted); }

/* 紧凑表格：宽度按内容收缩，不强行拉满 */
table { border-collapse: collapse; margin-top: 6px; font-size: 12px; }
#keywords-result table { width: auto; }
.kw-scroll {
  display: block;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
}
.kw-scroll .kw-table {
  min-width: 100%;
}

/* 打造页面 */
.v2-card .form-grid { align-items: stretch; }
.v2-aba-file-field {
  grid-template-columns: 124px minmax(0, 1fr);
}
.v2-step-one-grid {
  grid-template-columns: minmax(220px, 1fr) minmax(0, 2fr);
}
@media (max-width: 820px) {
  .v2-step-one-grid {
    grid-template-columns: 1fr;
  }
}
.v2-comp-upload-field {
  min-width: 0;
}
.v2-source-note {
  margin: 0 0 8px;
  padding: 8px 10px;
  border: 1px solid #fed7aa;
  border-left: 4px solid #f97316;
  border-radius: 7px;
  background: #fff7ed;
  color: #9a3412;
  font-size: 12.5px;
  font-weight: 600;
}
.v2-restore-warning {
  margin: 0 0 10px;
  padding: 9px 11px;
  border: 1px solid #f2b8b5;
  border-left: 4px solid #d92d20;
  border-radius: 6px;
  background: #fff5f4;
  color: #8a1f17;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.45;
}
.v2-source-note a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.v2-relevance-card {
  border-color: #fdba74;
  background: linear-gradient(180deg, #fffaf5 0%, #fff 56%);
}
.v2-relevance-note {
  margin-bottom: 6px;
  padding: 6px 10px;
  border-color: #fb923c;
  border-left-color: #ea580c;
  background: #ffedd5;
  color: #7c2d12;
  line-height: 1.4;
}
.v2-relevance-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 16px;
  min-width: 0;
}
.v2-relevance-fields .field {
  grid-template-columns: 126px minmax(0, 1fr);
  gap: 6px 10px;
  align-items: start;
  margin-bottom: 0;
}
.v2-relevance-fields .field > label {
  padding-top: 8px;
  color: #475569;
  font-weight: 700;
}
.v2-relevance-fields textarea {
  height: 68px;
  min-height: 68px;
  max-height: 68px;
  line-height: 18px;
  overflow-y: auto;
  overflow-wrap: anywhere;
  resize: none;
  white-space: pre-wrap;
  background: #fff;
}
.v2-relevance-fields textarea.v2-relevance-review-invalid {
  border-color: #d92d20;
  box-shadow: 0 0 0 1px #d92d20;
}
.v2-relevance-fields textarea.v2-relevance-review-invalid:focus {
  border-color: #b42318;
  box-shadow: 0 0 0 2px rgba(217, 45, 32, .16);
}
.v2-relevance-review-message {
  grid-column: 2;
  min-width: 0;
  margin: -2px 0 1px;
  color: #b42318;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.v2-relevance-review-message::before {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin: 0 6px 1px 0;
  border-radius: 50%;
  background: #d92d20;
  content: "";
}
.v2-relevance-review-message.is-previous {
  color: #667085;
  font-weight: 500;
}
.v2-relevance-review-message.is-previous::before {
  background: #98a2b3;
}
.v2-relevance-review-error {
  margin-top: 8px;
  padding: 8px 10px;
  border: 1px solid #f2b8b5;
  border-left: 4px solid #d92d20;
  border-radius: 6px;
  background: #fff5f4;
  color: #8a1f17;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.45;
}
.v2-relevance-card .v2-relevance-review-ignore {
  border-color: #cbd5e1;
  background: #fff;
  color: #475467;
}
.v2-relevance-card .v2-relevance-review-ignore:hover {
  border-color: #98a2b3;
  background: #f8fafc;
  color: #344054;
}
.v2-hidden-compat {
  position: absolute;
  width: 1px;
  height: 1px;
  min-height: 0;
  padding: 0;
  border: 0;
  opacity: 0;
  pointer-events: none;
}
@media (max-width: 760px) {
  .v2-relevance-fields {
    grid-template-columns: minmax(0, 1fr);
    gap: 7px;
  }
  .v2-relevance-fields .field {
    grid-template-columns: 1fr;
    gap: 4px;
    padding-bottom: 7px;
    border-bottom: 1px solid #ffedd5;
  }
  .v2-relevance-review-message {
    grid-column: 1;
    margin-top: 0;
  }
  .v2-relevance-fields .field:last-of-type {
    padding-bottom: 0;
    border-bottom: 0;
  }
  .v2-relevance-card .actions {
    align-items: stretch;
  }
  .v2-relevance-card .actions button {
    max-width: 100%;
    white-space: normal;
  }
}
.v2-desc {
  min-height: 132px;
  resize: vertical;
}
.v2-brand-inline {
  margin-bottom: 8px;
}
.v2-brand-desc-stack {
  min-width: 0;
}
.v2-brand-desc-stack .field:last-child {
  margin-bottom: 0;
}
.v2-root-editor {
  margin-top: 12px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}
.v2-root-tabs {
  display: flex;
  align-items: stretch;
  min-height: 46px;
  margin-top: 9px;
  padding: 0 10px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  background: #fff;
}
.v2-root-tab {
  position: relative;
  min-width: 122px;
  border: 0;
  padding: 0 12px;
  background: transparent;
  color: #647581;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}
.v2-root-tab::after {
  position: absolute;
  right: 12px;
  bottom: 0;
  left: 12px;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: transparent;
  content: "";
}
.v2-root-tab:hover,
.v2-root-tab.active {
  color: #247547;
}
.v2-root-tab.active::after {
  background: #2d7a4c;
}
.v2-root-tab-count {
  display: inline-flex;
  min-width: 24px;
  height: 19px;
  margin-left: 5px;
  padding: 0 5px;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  background: #edf1f3;
  color: #5f707c;
  font-size: 11px;
}
.v2-root-tab.active .v2-root-tab-count {
  background: #eaf6ef;
  color: #247547;
}
.v2-root-table-toolbar {
  display: flex;
  min-height: 45px;
  padding: 6px 12px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-right: 1px solid var(--line);
  border-left: 1px solid var(--line);
  background: #fff;
}
.v2-root-active-title {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}
.v2-root-active-title strong {
  flex: 0 0 auto;
  color: var(--fg);
  font-size: 13px;
}
.v2-root-active-title > span:last-child {
  color: var(--muted);
}
.v2-root-group-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #2d7a4c;
}
.v2-root-table-tools,
.v2-root-row-actions {
  display: flex;
  align-items: center;
  gap: 7px;
}
.v2-root-table-tools {
  flex: 0 0 auto;
}
.v2-root-batch-move {
  display: flex;
  min-height: 31px;
  align-items: center;
  gap: 6px;
  padding-right: 7px;
  border-right: 1px solid #dce3e7;
}
.v2-root-batch-move > span {
  min-width: 42px;
  color: #647681;
  font-size: 12px;
  white-space: nowrap;
}
.v2-root-batch-move select {
  width: 118px;
  height: 31px;
  min-width: 0;
  border: 1px solid #cbd5dc;
  border-radius: 5px;
  padding: 0 25px 0 8px;
  background: #fff;
  color: #334750;
  font-size: 12px;
}
.v2-root-batch-move button {
  min-height: 31px;
  border: 1px solid #31814c;
  border-radius: 5px;
  padding: 0 11px;
  background: #43945b;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}
.v2-root-batch-move button:disabled,
.v2-root-batch-move select:disabled {
  border-color: #dce3e7;
  background: #f3f5f6;
  color: #9aa6ad;
  cursor: default;
}
.v2-root-sort-reset {
  min-height: 31px;
  border: 1px solid #cbd5dc;
  border-radius: 5px;
  padding: 0 10px;
  background: #fff;
  color: #536570;
  font-size: 12px;
  font-weight: 600;
}
.v2-root-sort-reset:disabled {
  border-color: #e1e6e9;
  background: #f4f6f7;
  color: #a0abb2;
  cursor: default;
}
.v2-root-table-shell {
  height: 65vh;
  min-height: 470px;
  max-height: 750px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 0 0 8px 8px;
  background: #fff;
  scrollbar-gutter: stable;
}
.v2-root-table {
  width: 100%;
  min-width: 1230px;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
}
.v2-root-table col.selection { width: 3%; }
.v2-root-table col.root { width: 12%; }
.v2-root-table col.translation { width: 13%; }
.v2-root-table col.weight { width: 11%; }
.v2-root-table col.source-count { width: 8%; }
.v2-root-table col.ratio { width: 10%; }
.v2-root-table col.evidence { width: 10%; }
.v2-root-table col.match-mode { width: 16%; }
.v2-root-table col.actions { width: 17%; }
.v2-root-table th,
.v2-root-table td {
  height: 36px;
  border-bottom: 1px solid #e7ecef;
  padding: 3px 9px;
  text-align: left;
  vertical-align: middle;
  font-size: 12px;
}
.v2-root-table th {
  position: sticky;
  z-index: 3;
  top: 0;
  height: 35px;
  background: #f6f8f9;
  box-shadow: inset 0 -1px 0 #c9d5da;
  color: #52636f;
  font-weight: 700;
}
.v2-root-table tbody[hidden] {
  display: none;
}
.v2-root-table tbody tr:hover {
  background: #f8fbf9;
}
.v2-root-table tbody tr.is-selected {
  background: #f0f8f3;
}
.v2-root-selection-cell {
  padding-right: 4px !important;
  padding-left: 7px !important;
  text-align: center !important;
}
.v2-root-selection-cell input {
  width: 15px;
  height: 15px;
  margin: 0;
  accent-color: #43945b;
  cursor: pointer;
}
.v2-root-card.conflict-weak td {
  background: #fff7f5;
}
.v2-root-ai-flag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 3px;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}
.v2-root-ai-flag.red {
  background: #fdecea;
  color: #b83e36;
  border: 1px solid #f0b9b4;
}
.v2-root-ai-flag.blue {
  background: #e8f1fb;
  color: #3176a8;
  border: 1px solid #b9d4ec;
}
.v2-root-ai-flag button {
  min-height: 20px;
  padding: 0 6px;
  font-size: 11px;
  border: 1px solid currentColor;
  border-radius: 3px;
  background: #fff;
  color: inherit;
  cursor: pointer;
}
.v2-root-ai-flag button:hover {
  background: currentColor;
  color: #fff;
}
.v2-root-flag-filter.active {
  background: #2d7a4c;
  border-color: #2d7a4c;
  color: #fff;
}
.v2-root-match-mode {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  width: 100%;
}
.v2-root-match-mode button {
  min-width: 0;
  min-height: 25px;
  padding: 0 5px;
  font-size: 11px;
  white-space: nowrap;
}
.v2-root-match-na {
  color: #8a969e;
  font-size: 11px;
}
.v2-root-placeholder-row td {
  height: 90px;
  text-align: center;
}
.v2-root-sort-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 700;
}
.v2-root-sort-btn:hover,
.v2-root-sort-btn.active {
  color: #247547;
}
.v2-root-sort-btn span {
  display: inline-flex;
  width: 14px;
  height: 14px;
  align-items: center;
  justify-content: center;
  color: #98a5ad;
}
.v2-root-sort-btn.active span {
  color: #247547;
}
.v2-root-sort-btn:disabled {
  color: #9aa6ad;
  cursor: default;
}
.v2-choice-filter-group {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 6px;
  color: #657681;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}
.v2-choice-segmented {
  display: inline-flex;
  min-height: 31px;
  padding: 2px;
  align-items: stretch;
  border: 1px solid #ced9de;
  border-radius: 6px;
  background: #edf1f3;
}
.v2-choice-segmented button {
  min-width: 64px;
  padding: 0 8px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #63747f;
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}
.v2-choice-segmented button:hover:not(:disabled) {
  color: #2d7a4c;
}
.v2-choice-segmented button.active {
  background: #fff;
  color: #2d7a4c;
  box-shadow: 0 1px 4px rgba(30, 55, 67, 0.12);
}
.v2-choice-segmented button:disabled {
  cursor: not-allowed;
  opacity: 0.62;
}
.v2-precision-toolbar {
  display: flex;
  min-height: 48px;
  margin-top: 10px;
  padding: 7px 10px;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 7px 7px 0 0;
  background: #f8faf9;
}
.v2-precision-toolbar label {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #5f707c;
  font-size: 12px;
  font-weight: 700;
}
.v2-precision-toolbar input {
  height: 32px;
  border: 1px solid #cbd5dc;
  border-radius: 5px;
  background: #fff;
  color: #1f3442;
  font-size: 12px;
}
.v2-precision-search {
  width: 220px;
  min-width: 220px;
  flex: 0 0 220px;
}
.v2-precision-search > span {
  flex: 0 0 auto;
  white-space: nowrap;
}
.v2-precision-search input {
  width: 100%;
  min-width: 0;
  flex: 1 1 auto;
}
.v2-precision-filter-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.v2-precision-counts {
  display: flex;
  margin-left: auto;
  align-items: center;
  gap: 8px;
  color: #60717b;
  font-size: 12px;
}
.v2-precision-counts span {
  display: inline-flex;
  height: 27px;
  padding: 0 8px;
  align-items: center;
  gap: 5px;
  border: 1px solid #d7e0e4;
  border-radius: 5px;
  background: #fff;
}
.v2-precision-counts b {
  color: #247547;
}
.v2-precision-status {
  min-height: 32px;
  padding: 7px 11px;
  border-right: 1px solid var(--line);
  border-left: 1px solid var(--line);
  background: #fff;
  color: #647581;
  font-size: 12px;
}
.v2-precision-status.is-error {
  color: #b42318;
}
.v2-precision-table-shell {
  height: 64vh;
  min-height: 440px;
  max-height: 720px;
  overflow: auto;
  border: 1px solid var(--line);
  background: #fff;
  scrollbar-gutter: stable;
}
.v2-precision-table {
  width: 100%;
  min-width: 960px;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
}
.v2-precision-table col.keyword { width: 17%; }
.v2-precision-table col.translation { width: 13%; }
.v2-precision-table col.relevance { width: 7%; }
.v2-precision-table col.search-volume { width: 9%; }
.v2-precision-table col.keyword-rank { width: 10%; }
.v2-precision-table col.match-mode { width: 19%; }
.v2-precision-table col.target-position { width: 25%; }
.v2-precision-table th,
.v2-precision-table td {
  height: 36px;
  border-bottom: 1px solid #e7ecef;
  padding: 3px 9px;
  text-align: left;
  vertical-align: middle;
  font-size: 12px;
}
.v2-precision-table th {
  position: sticky;
  z-index: 3;
  top: 0;
  height: 35px;
  background: #f6f8f9;
  box-shadow: inset 0 -1px 0 #c9d5da;
  color: #52636f;
  font-weight: 700;
}
.v2-precision-table tbody tr:hover {
  background: #f8fbf9;
}
.v2-precision-table tbody tr.is-selected {
  background: #f1f8f4;
}
.v2-table-load-more-row td {
  height: 48px !important;
  padding: 7px 12px !important;
  text-align: center !important;
  background: #f7faf8 !important;
}
.v2-table-load-more-row button {
  min-height: 30px;
  padding: 4px 14px;
  border: 1px solid #a9c8b4;
  border-radius: 4px;
  background: #fff;
  color: #246b43;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.v2-table-load-more-row button:hover {
  border-color: #4b9a65;
  background: #eef7f1;
}
.v2-table-load-more-row span {
  margin-left: 10px;
  color: #73818a;
  font-size: 11px;
}
.v2-precision-keyword {
  overflow: hidden;
  color: #172b3c;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.v2-precision-translation {
  overflow: hidden;
  color: #52636f;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.v2-precision-relevance {
  display: inline-flex;
  min-width: 50px;
  height: 22px;
  padding: 0 7px;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  background: #edf1f3;
  color: #536570;
  font-size: 11px;
  font-weight: 700;
}
.v2-precision-relevance.related {
  background: #eaf6ef;
  color: #247547;
}
.v2-precision-relevance.brand {
  background: #fff3dc;
  color: #9a5a08;
}
.v2-precision-relevance.unrelated {
  background: #fff0ed;
  color: #b42318;
}
.v2-precision-mode {
  min-height: 27px;
  padding: 2px;
}
.v2-precision-mode button {
  min-width: 64px;
  padding: 0 6px;
}
.v2-precision-position {
  min-height: 27px;
  padding: 2px;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}
.v2-precision-position button {
  min-width: 0;
  padding: 0 4px;
  font-size: 11px;
  white-space: nowrap;
}
.v2-precision-position[data-precision-selected="false"] {
  opacity: 0.55;
}
.v2-copy-target-position {
  display: inline-block;
  white-space: nowrap;
  color: #315f47;
  font-weight: 700;
}
.v2-precision-sort-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 700;
}
.v2-precision-sort-btn:hover,
.v2-precision-sort-btn.active {
  color: #247547;
}
.v2-precision-sort-btn span {
  color: #98a5ad;
}
.v2-precision-sort-btn.active span {
  color: #247547;
}
.v2-precision-footer {
  display: flex;
  min-height: 34px;
  padding: 6px 10px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-top: 0;
  border-radius: 0 0 7px 7px;
  background: #f8faf9;
  color: #647581;
  font-size: 11px;
}
.v2-root-card input.v2-root-en {
  width: 100%;
  height: 26px;
  border: 0;
  background: transparent;
  border-radius: 0;
  padding: 0;
  color: #172b3c;
  font: inherit;
  font-weight: 800;
  outline: 0;
}
.v2-root-card input.v2-root-en[readonly] {
  background: transparent;
  color: #172b3c;
  cursor: default;
}
.v2-root-number {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}
.v2-root-ratio-cell {
  display: flex;
  align-items: center;
  gap: 7px;
}
.v2-root-ratio-track {
  width: 58px;
  height: 5px;
  overflow: hidden;
  border-radius: 3px;
  background: #e6ebee;
}
.v2-root-ratio-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
}
.v2-root-ratio-value {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}
.v2-root-brand-status {
  display: inline-flex;
  min-height: 20px;
  align-items: center;
  border-radius: 4px;
  padding: 1px 6px;
  background: #f5effa;
  color: #79569b;
  font-size: 11px;
  font-weight: 700;
}
.v2-root-table-footer {
  position: sticky;
  z-index: 2;
  bottom: 0;
  display: flex;
  min-height: 34px;
  padding: 6px 10px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--line);
  background: #fbfcfc;
  color: var(--muted);
  font-size: 11px;
}
.v2-root-add-modal {
  display: grid;
  gap: 9px;
}
.v2-root-add-modal label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}
.v2-root-add-modal input {
  width: 100%;
  height: 38px;
}
.v2-root-add-error {
  min-height: 18px;
  color: #b42318;
  font-size: 12px;
  line-height: 1.45;
}
.v2-root-zh {
  min-height: 0;
  margin-top: 0;
  color: var(--muted);
  font-size: 12px;
}
.v2-root-move-control {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 0;
  color: #80530a;
  font-size: 11px;
  font-weight: 600;
}
.v2-root-move-control > span {
  display: none;
}
.v2-root-move-select {
  width: 112px;
  min-width: 0;
  height: 28px;
  flex: 0 0 auto;
  border: 1px solid #dda64f;
  border-radius: 5px;
  padding: 0 24px 0 7px;
  background: #fff;
  color: #5e420f;
  cursor: pointer;
  font: inherit;
}
.v2-root-move-select:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}
.v2-root-move-undo {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 8px 0;
  border: 1px solid #f0c579;
  border-radius: 6px;
  padding: 7px 9px;
  background: #fffbeb;
  color: #6f4a0b;
  font-size: 12px;
}
.v2-root-move-undo[hidden] {
  display: none;
}
.v2-root-move-undo button {
  flex: 0 0 auto;
  border-color: #d99b37;
  background: #fff;
  color: #8a5707;
  font-weight: 700;
}
.v2-root-zh.err { color: #b42318; }
.v2-root-evidence {
  display: inline-block;
  position: relative;
  margin-top: 0;
  color: #475569;
  font-size: 11px;
}
.v2-root-evidence-trigger {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  border: 0;
  border-radius: 4px;
  padding: 1px 3px;
  background: transparent;
  color: #047857;
  cursor: pointer;
  font: inherit;
  font-weight: 600;
  line-height: 1.35;
}
.v2-root-evidence-trigger:hover,
.v2-root-evidence-trigger:focus-visible,
.v2-root-evidence-trigger[aria-expanded="true"] {
  background: #e0f2e9;
  color: #05603a;
  outline: none;
}
.v2-root-evidence-trigger:focus-visible {
  box-shadow: 0 0 0 2px rgba(4, 120, 87, 0.2);
}
.v2-root-evidence-popover {
  display: none;
  position: fixed;
  z-index: 1200;
  width: min(520px, calc(100vw - 16px));
  max-height: min(286px, calc(100vh - 16px));
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.18);
  color: #334155;
  pointer-events: auto;
}
.v2-root-evidence-popover.is-open {
  display: block;
}
.v2-root-evidence-scroll {
  display: block;
  max-height: min(284px, calc(100vh - 18px));
  overflow: auto;
  border-radius: inherit;
  outline: none;
  overscroll-behavior: contain;
}
.v2-root-evidence-scroll:focus-visible {
  box-shadow: inset 0 0 0 2px rgba(4, 120, 87, 0.28);
}
.v2-root-evidence-loading {
  min-width: 220px;
  padding: 14px 16px;
  color: #64748b;
  font-size: 12px;
}
.v2-root-evidence-error {
  min-width: 220px;
  padding: 12px 14px;
  background: #fff7f6;
  color: #b42318;
  font-size: 12px;
  line-height: 1.45;
}
.v2-root-evidence-error span {
  display: block;
  margin-top: 3px;
  color: #7a271a;
  font-size: 11px;
}
.v2-root-evidence table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 11px;
  line-height: 1.35;
}
.v2-root-evidence th,
.v2-root-evidence td {
  border-bottom: 1px solid #e2e8f0;
  padding: 5px 7px;
  text-align: left;
  vertical-align: top;
  overflow-wrap: anywhere;
}
.v2-root-evidence th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f1f5f9;
  color: #475569;
  font-weight: 700;
  white-space: nowrap;
}
.v2-root-evidence th:nth-child(1),
.v2-root-evidence td:nth-child(1) {
  width: 34%;
}
.v2-root-evidence th:nth-child(2),
.v2-root-evidence td:nth-child(2) {
  width: 30%;
}
.v2-root-evidence th:nth-child(3),
.v2-root-evidence td:nth-child(3) {
  width: 20%;
  text-align: right;
  white-space: nowrap;
}
.v2-root-evidence th:nth-child(4),
.v2-root-evidence td:nth-child(4) {
  width: 16%;
  text-align: center;
  white-space: nowrap;
}
.v2-root-evidence-relevance {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 18px;
  border-radius: 4px;
  padding: 1px 5px;
  background: #eef1f4;
  color: #667085;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}
.v2-root-evidence-relevance.is-related {
  background: #e7f6ec;
  color: #167345;
}
.v2-root-evidence-relevance.is-unrelated {
  background: #fff0ee;
  color: #b42318;
}
.v2-root-evidence-relevance.is-brand {
  background: #fff7e6;
  color: #9a6700;
}
.v2-root-evidence tbody tr:last-child td {
  border-bottom: 0;
}
.v2-root-evidence tbody tr:nth-child(even) td {
  background: #f8fafc;
}
@media (max-width: 560px) {
  .v2-root-evidence-popover {
    width: calc(100vw - 16px);
  }
  .v2-root-evidence th,
  .v2-root-evidence td {
    padding: 5px;
  }
}
.v2-root-conflict {
  margin-top: 4px;
  color: #b42318;
  font-size: 11px;
  line-height: 1.25;
}
.v2-root-conflict b {
  display: inline-block;
  margin-right: 5px;
  padding: 0 4px;
  border-radius: 4px;
  background: #fecdca;
  color: #8a1f17;
  font-weight: 700;
}
.root-conflict-row td {
  background: #fff7f5;
}
.card-h {
  display: flex;
  align-items: center;
  gap: 8px;
}
.card-h > span:not(.caret) {
  min-width: 0;
  flex: 1;
}
.card-reset-btn {
  border: 1px solid #d7dee8;
  background: #fff;
  color: #64748b;
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 12px;
  cursor: pointer;
}
.card-reset-btn:hover {
  color: #0f172a;
  border-color: #aeb9c8;
}
.card-h > .step-token-badge {
  flex: 0 1 auto;
  min-width: 0;
}
@media (max-width: 560px) {
  .card-h {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .card-h > span:not(.caret):not(.step-token-badge) {
    flex: 0 0 calc(100% - 26px);
  }
  .step-token-badge {
    order: 3;
    max-width: calc(100% - 96px);
    margin-left: 26px;
  }
  .card-reset-btn {
    order: 4;
    flex: 0 0 auto;
    margin: 4px 0 0 26px;
  }
}
.v2-rule-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 8px;
}
.v2-rule-summary span {
  border: 1px solid var(--border);
  background: #f8fafc;
  border-radius: 6px;
  padding: 5px 8px;
  font-size: 12px;
}
.v2-module-stats {
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
  padding: 9px 10px;
}
.v2-module-stats-title {
  font-size: 12px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 7px;
}
.v2-module-stats .v2-rule-summary {
  margin-bottom: 0;
  gap: 6px;
}
.v2-module-stats .v2-rule-summary span {
  padding: 4px 7px;
}
.v2-progress {
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fbfdff;
  overflow: visible;
}
.v2-progress-body {
  max-height: 260px;
  overflow: auto;
  padding-right: 2px;
}
.v2-progress .gen-progress-bar > i {
  left: 0;
  animation: none;
}
.v2-progress.done {
  border-color: #9bd8b4;
  background: #f4fbf7;
}
.v2-progress.failed {
  border-color: #f3b7b7;
  background: #fff8f8;
}
.v2-progress.stopped {
  border-color: #f5d08a;
  background: #fffbeb;
}
.v2-progress.failed .gen-progress-bar > i {
  background: #d92d20;
}
.v2-progress.stopped .gen-progress-bar > i {
  background: #d97706;
}
.v2-progress-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
.v2-progress-caret {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
  position: relative;
}
.v2-progress-caret::before {
  content: "";
  display: block;
  width: 0;
  height: 0;
  margin: 5px 0 0 5px;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 7px solid #64748b;
  transition: transform .15s ease;
}
.v2-progress.collapsed .v2-progress-caret::before {
  transform: rotate(-90deg);
}
.v2-progress-head b {
  flex: 1;
  min-width: 0;
}
.v2-progress-head .v2-log-download-btn {
  flex: 0 0 auto;
  min-height: 24px;
  padding: 3px 8px;
  border-color: #bbf7d0;
  background: #fff;
  color: #047857;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 600;
  text-decoration: none;
}
.v2-progress-head .v2-log-download-btn:hover {
  background: #f0fdf4;
  border-color: #86efac;
  color: #065f46;
}
.v2-progress.collapsed {
  max-height: none;
  overflow: visible;
}
.v2-progress.collapsed .v2-progress-body {
  display: none;
}
.v2-log {
  margin-top: 8px;
}
.v2-log ul {
  margin: 8px 0 0;
  padding-left: 18px;
  height: auto;
  max-height: 150px;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  padding: 8px 10px 8px 24px;
}
.v2-log li.warning { color: #9a6700; }
.v2-log li.error { color: #b42318; }
.v2-log li.empty {
  color: var(--muted);
  list-style: none;
}
.v2-errors {
  margin-top: 12px;
  border: 1px solid #f3b7b7;
  border-left: 4px solid #d92d20;
  background: #fff8f8;
  border-radius: 8px;
  padding: 10px 12px;
  color: #7a271a;
}
.v2-errors details summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  list-style: none;
}
.v2-errors details summary::-webkit-details-marker {
  display: none;
}
.v2-error-details summary::before {
  content: "";
  width: 0;
  height: 0;
  flex: 0 0 auto;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 7px solid #7a271a;
  transition: transform .15s ease;
}
.v2-error-details:not([open]) summary::before {
  transform: rotate(-90deg);
}
.v2-error-details summary b {
  flex: 1;
  min-width: 0;
}
.v2-errors details summary span {
  color: var(--muted);
  font-size: 12px;
}
.v2-errors ul {
  margin: 6px 0 0;
  padding-left: 18px;
  max-height: 150px;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  padding: 8px 10px 8px 24px;
}
.v2-result-table th,
.v2-result-table td {
  white-space: nowrap;
}
.v2-root-result-table td:nth-child(6) {
  white-space: normal;
  min-width: 220px;
  max-width: 420px;
  line-height: 1.45;
}
.v2-result-table td:nth-child(7),
.v2-result-table td:nth-child(8) {
  white-space: normal;
  min-width: 180px;
}
.copy-guidance-grid .mini-textarea {
  min-height: 54px;
  resize: vertical;
}
.copy-guidance-grid.compact-brand-only {
  grid-template-columns: minmax(240px, 420px);
  margin-bottom: 8px;
}
.autofill-decoy {
  position: fixed;
  left: -10000px;
  top: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}
.singleline-input {
  width: 100%;
  min-height: 38px;
  height: 38px;
  resize: none;
  overflow: hidden;
  line-height: 20px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: #fff;
  color: var(--text);
  font: inherit;
}
.singleline-input:focus {
  outline: none;
  border-color: #16a34a;
  box-shadow: 0 0 0 2px rgba(22, 163, 74, .12);
}
.strategy-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 7px 7px 0 0;
  background: #f8fafc;
}
.strategy-head b {
  margin-right: 8px;
}
.strategy-head span,
.strategy-meta {
  color: var(--muted);
  font-size: 12px;
}
.strategy-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}
.strategy-workbench {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 12px;
}
.strategy-ued-head {
  margin-top: 0;
  border-radius: 7px;
}
.strategy-metrics {
  grid-template-columns: 1.4fr repeat(3, minmax(0, 1fr));
}
.strategy-layout {
  grid-template-columns: minmax(0, 1fr) minmax(360px, .9fr);
}
.strategy-target-panel {
  padding-bottom: 0;
}
.strategy-target-wrap {
  max-height: 360px;
}
.strategy-target-table th,
.strategy-target-table td {
  white-space: nowrap;
}
.strategy-edit-details {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  padding: 0;
  overflow: hidden;
}
.strategy-edit-details summary {
  cursor: pointer;
  padding: 10px 12px;
  font-weight: 700;
  background: #f8fafc;
  border-bottom: 1px solid var(--border);
}
.strategy-edit-details .hint {
  padding: 8px 12px 0;
}
.strategy-edit-details .actions.compact {
  padding: 8px 12px 0;
  margin: 0;
}
.strategy-edit-grid {
  border: 0;
  border-radius: 0;
  padding: 12px;
}
.strategy-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--border);
  border-top: 0;
  border-radius: 0 0 7px 7px;
  background: #fff;
}
.strategy-grid.strategy-edit-grid {
  border: 0;
  border-radius: 0;
  padding: 12px;
}
.strategy-grid label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
}
.strategy-grid textarea,
.strategy-name {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fbfdff;
  color: var(--fg);
  font: inherit;
  font-size: 12px;
}
.strategy-grid textarea {
  min-height: 94px;
  resize: vertical;
  padding: 8px;
}
.strategy-name {
  height: 28px;
  padding: 0 8px;
}
.copy-score-grid {
  display: grid;
  grid-template-columns: repeat(9, minmax(0, 1fr));
  gap: 6px;
  margin: 12px 0 10px;
}
.copy-score-grid span {
  border: 1px solid var(--border);
  background: #f8fafc;
  border-radius: 6px;
  padding: 7px 8px;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
}
.copy-score-grid b {
  display: block;
  color: var(--fg);
  font-size: 16px;
  line-height: 1.2;
}
.regen-modal {
  display: grid;
  gap: 10px;
}
.regen-modal label {
  color: var(--muted);
  font-size: 12px;
}
.regen-modal textarea {
  width: 100%;
  min-height: 130px;
  resize: vertical;
}
.modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}
.regen-inline-btn {
  color: #15803d;
}
.copy-result-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px;
  margin-top: 12px;
}
.copy-panel {
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 7px;
  padding: 10px;
  position: relative;
}
.copy-panel.span2 { grid-column: 1 / -1; }
.copy-panel.compact-copy-panel {
  padding: 8px 10px;
}
.copy-panel h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 6px;
  font-size: 13px;
}
.copy-panel h3 .link-btn:first-of-type {
  margin-left: auto;
}
.copy-text {
  border: 1px solid var(--line);
  background: #fbfdff;
  border-radius: 6px;
  padding: 9px;
  font-size: 13px;
  line-height: 1.6;
}
.copy-text.title { font-weight: 400; }
.copy-read {
  border: 1px solid var(--line);
  background: #fbfdff;
  border-radius: 6px;
  padding: 7px 8px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 400;
}
.copy-read.long .copy-read-en,
.copy-read.st .copy-read-en {
  white-space: pre-wrap;
  word-break: break-word;
}
.copy-read-en {
  color: #0f172a;
  font-size: 13px;
  line-height: 1.5;
  font-family: inherit;
  font-weight: 400;
}
.copy-read-zh {
  margin-top: 3px;
  color: #64748b;
  font-size: 13px;
  line-height: 1.45;
  font-family: inherit;
  font-weight: 400;
}
.copy-previous {
  margin-bottom: 6px;
}
.copy-previous-label {
  margin-bottom: 3px;
  color: #94a3b8;
  font-size: 11px;
}
.copy-old {
  background: #f8fafc;
  border-color: #e5e7eb;
  opacity: .82;
}
.copy-old .copy-read-en,
.copy-old .copy-read-zh,
.copy-old-list .copy-read-en,
.copy-old-list .copy-read-zh {
  color: #94a3b8;
  text-decoration: line-through;
  text-decoration-thickness: 1px;
}
.copy-old-list {
  margin-bottom: 6px;
}
.copy-panel-mask {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  background: rgba(255, 255, 255, .82);
  backdrop-filter: blur(1px);
}
.copy-panel-mask span {
  border: 1px solid #bbf7d0;
  background: #f0fdf4;
  color: #166534;
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 700;
}
.copy-panel-loading {
  min-height: 96px;
}
.copy-bullets {
  margin: 0;
  padding-left: 20px;
}
.copy-bullets li {
  margin-bottom: 6px;
  line-height: 1.55;
}
.copy-bullets.edit li {
  margin-bottom: 10px;
}
.copy-bullets.read {
  padding-left: 18px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 400;
}
.copy-bullets.read li:last-child {
  margin-bottom: 0;
}
.copy-bullets.read .copy-read {
  padding: 6px 8px;
}

.history-step-card .card-h.static {
  cursor: default;
}

.history-step-card .card-h.static .caret {
  transform: rotate(90deg);
}

.history-readonly-text {
  min-height: 120px;
  white-space: pre-wrap;
  word-break: break-word;
  color: #334155;
  font-size: 13px;
  line-height: 1.55;
}

.history-root-card input {
  color: #334155;
  cursor: default;
}

.history-root-groups {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
}

.history-root-groups .v2-root-group {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px;
  background: #fbfdff;
}

.history-root-groups .v2-root-group-h {
  margin-bottom: 5px;
  color: var(--fg);
  font-size: 12px;
  font-weight: 700;
}

.history-roots-box {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 7px;
  margin-top: 6px;
}

.history-root-card {
  position: relative;
  min-height: 78px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 7px;
  background: #eef6ff;
}

.history-root-card.conflict-weak {
  border-color: #f2b8b5;
  background: #fff1f0;
}

.history-root-card .v2-root-metrics {
  display: flex;
  min-height: 30px;
  margin: 0 0 4px 1px;
  flex-direction: column;
  gap: 1px;
  color: #8a98a8;
  font-size: 10.5px;
  line-height: 1.35;
}

.history-root-card input.v2-root-en {
  width: 100%;
  height: 28px;
  border: 1px solid #b6c2cf;
  border-radius: 5px;
  padding: 0 7px;
  background: #f8fafc;
  color: var(--fg);
  font: inherit;
}

.history-step-card .actions {
  margin-top: 8px;
}

.history-step-card .v2-module-stats {
  margin-top: 8px;
}
.bullet-tip {
  margin: -2px 0 6px;
  color: #64748b;
  font-size: 12px;
  line-height: 1.45;
}
.bullet-read {
  position: relative;
}
.bullet-meter {
  float: right;
  margin-left: 8px;
  color: #15803d;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.4;
}
.bullet-meter.over {
  color: #dc2626;
}
.bullet-marked {
  clear: none;
}
.bullet-priority {
  color: #14532d;
  background: rgba(22, 163, 74, .08);
  border-radius: 3px;
}
.bullet-overflow {
  color: #b91c1c;
  background: rgba(220, 38, 38, .08);
  border-radius: 3px;
}
.coverage-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
}
.coverage-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}
.coverage-stats span {
  border: 1px solid var(--border);
  background: #f8fafc;
  border-radius: 6px;
  padding: 5px 8px;
  font-size: 12px;
}
.coverage-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0;
}
.coverage-filter-panel {
  display: block;
  border: 1px solid var(--border);
  background: #f8fafc;
  border-radius: 8px;
  padding: 10px 12px;
  margin: 8px 0 10px;
}
.coverage-filter-row {
  display: grid;
  grid-template-columns: 82px 1fr;
  gap: 10px;
  align-items: start;
}
.coverage-filter-row + .coverage-filter-row {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid #e5e7eb;
}
.coverage-filter-label {
  font-size: 13px;
  font-weight: 700;
  color: #334155;
  line-height: 30px;
  white-space: nowrap;
}
.coverage-filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.coverage-filters button.active {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}
.coverage-table-wrap {
  max-height: 720px;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 7px;
}
.coverage-table {
  width: 100%;
  margin-top: 0;
}
.coverage-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
}
.hit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  border-radius: 999px;
  padding: 2px 6px;
  font-size: 12px;
}
.hit.yes {
  color: #067647;
  background: #ecfdf3;
  border: 1px solid #abefc6;
}
.hit.no {
  color: var(--muted);
  background: #f2f4f7;
  border: 1px solid var(--border);
}
.ued-demo-head p {
  max-width: 880px;
}
.ued-demo-shell {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.ued-workbench {
  display: grid;
  grid-template-columns: minmax(230px, .7fr) minmax(420px, 1.45fr) minmax(280px, .85fr);
  gap: 12px;
  align-items: start;
}
.ued-panel-head.compact {
  margin-bottom: 8px;
}
.ued-static-field {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  padding: 7px 0;
  border-bottom: 1px solid #edf2f7;
}
.ued-static-field span {
  color: var(--muted);
  font-size: 12px;
}
.ued-static-field b {
  color: #1d2939;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.45;
}
.ued-rule-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.ued-rule-tags span {
  border: 1px solid #d0d5dd;
  border-radius: 999px;
  background: #f9fafb;
  color: #344054;
  padding: 3px 8px;
  font-size: 12px;
}
.ued-hard-rule {
  margin-top: 10px;
  border: 1px solid #fedf89;
  border-radius: 7px;
  background: #fffaeb;
  color: #7a2e0e;
  padding: 8px;
  font-size: 12px;
  line-height: 1.45;
}
.ued-demo-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.ued-demo-actions .small {
  min-height: 30px;
  padding: 5px 10px;
}
.ued-editor-panel {
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.ued-editor-card {
  border: 1px solid var(--border);
  border-radius: 7px;
  background: #fbfdff;
  padding: 9px;
  cursor: pointer;
}
.ued-editor-card.active {
  border-color: var(--green);
  box-shadow: 0 0 0 2px rgba(0, 147, 75, .08);
  background: #f0fdf4;
}
.ued-editor-card-head,
.ued-editor-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.ued-editor-card-head b {
  font-size: 13px;
}
.ued-editor-card-head span,
.ued-editor-foot span {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}
.ued-editor-text {
  margin: 7px 0;
  color: #344054;
  font-size: 13px;
  line-height: 1.48;
}
.ued-editor-zh {
  margin: -1px 0 8px;
  color: #7c8aa3;
  font-size: 12px;
  line-height: 1.45;
}
.ued-editor-zh span {
  display: inline-block;
  margin-right: 6px;
  color: #98a2b3;
  font-size: 11px;
}
.ued-block-note {
  display: block;
  width: 100%;
  min-height: 54px;
  margin: 8px 0;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: #fff;
  color: #344054;
  padding: 7px 8px;
  font: inherit;
  font-size: 12px;
  resize: vertical;
}
.ued-block-note:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 2px rgba(0, 147, 75, .08);
}
.ued-inline-action {
  border: 1px solid var(--green);
  border-radius: 999px;
  background: #fff;
  color: #047857;
  padding: 3px 8px;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
  white-space: nowrap;
}
.ued-inline-action:hover {
  background: #ecfdf3;
}
.ued-bullet-list {
  margin: 7px 0;
  padding-left: 18px;
  color: #344054;
  font-size: 12.5px;
  line-height: 1.48;
}
.ued-bullet-list li {
  margin-bottom: 4px;
}
.ued-bullet-zh {
  margin-top: 2px;
  color: #7c8aa3;
  font-size: 12px;
  line-height: 1.45;
}
.ued-diagnosis-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ued-score-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.ued-score-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #f8fafc;
  padding: 10px;
  min-height: 94px;
}
.ued-score-card.good {
  border-color: #abefc6;
  background: #ecfdf3;
}
.ued-score-card.warn {
  border-color: #fedf89;
  background: #fffaeb;
}
.ued-score-card.bad {
  border-color: #fecdca;
  background: #fef3f2;
}
.ued-score-card span,
.ued-score-card i {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  line-height: 1.35;
}
.ued-score-card b {
  display: block;
  margin: 5px 0 4px;
  color: #101828;
  font-size: 22px;
  line-height: 1;
}
.ued-score-card:nth-child(5) {
  grid-column: 1 / -1;
}
.ued-mini-score {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 11px;
  background: #f8fafc;
}
.ued-mini-score.good { border-color: #abefc6; background: #ecfdf3; }
.ued-mini-score.warn { border-color: #fedf89; background: #fffaeb; }
.ued-mini-score.bad { border-color: #fecdca; background: #fef3f2; }
.ued-mini-score span,
.ued-mini-score i {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}
.ued-mini-score b {
  display: block;
  margin: 5px 0 3px;
  font-size: 26px;
  line-height: 1;
}
.ued-diagnostic-stack {
  display: grid;
  gap: 6px;
}
.ued-diagnostic-stack div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: #fbfdff;
  padding: 7px 9px;
  font-size: 12px;
}
.ued-diagnostic-stack span {
  color: #475467;
}
.ued-diagnostic-stack b.ok { color: #067647; }
.ued-diagnostic-stack b.warn { color: #b54708; }
.ued-diagnostic-stack b.bad { color: #b42318; }
.ued-alert-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.ued-alert-list > b {
  font-size: 12px;
  color: #344054;
}
.ued-alert-list button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid #fedf89;
  border-radius: 7px;
  background: #fffaeb;
  padding: 7px 9px;
  text-align: left;
  cursor: pointer;
}
.ued-alert-list span {
  color: #1d2939;
  font-size: 12px;
  font-weight: 600;
}
.ued-alert-list em {
  color: #b54708;
  font-style: normal;
  font-size: 12px;
  white-space: nowrap;
}
.ued-current-scope {
  border-top: 1px solid var(--border);
  padding-top: 9px;
  color: var(--muted);
  font-size: 12px;
}
.ued-metrics {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.ued-metric {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
  min-height: 88px;
}
.ued-metric span,
.ued-metric i {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}
.ued-metric b {
  display: block;
  margin: 6px 0 4px;
  font-size: 26px;
  line-height: 1;
}
.ued-metric.main {
  color: #101828;
}
.ued-metric.good {
  border-color: #abefc6;
  background: #ecfdf3;
}
.ued-metric.warn {
  border-color: #fedf89;
  background: #fffaeb;
}
.ued-metric.bad {
  border-color: #fecdca;
  background: #fef3f2;
}
.ued-panel {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}
.ued-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.ued-panel-head h3 {
  margin: 0;
  font-size: 15px;
}
.ued-panel-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}
.ued-panel-head .small {
  min-height: 30px;
  padding: 5px 10px;
}
.ued-flow {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.ued-flow > div {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  border: 1px solid #d0d5dd;
  border-radius: 7px;
  background: #f9fafb;
  padding: 9px;
}
.ued-flow b {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #111827;
  color: #fff;
  font-size: 12px;
  flex: 0 0 auto;
}
.ued-flow span {
  color: #344054;
  font-size: 12px;
  line-height: 1.45;
}
.ued-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.9fr);
  gap: 12px;
}
.ued-bars {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.ued-bar-row {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr) 54px;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: #fbfdff;
  padding: 8px;
  text-align: left;
  cursor: pointer;
}
.ued-bar-row.active {
  border-color: var(--green);
  background: #f0fdf4;
}
.ued-bar-row span,
.ued-bar-row b {
  font-size: 12px;
}
.ued-bar-row i {
  display: block;
  height: 9px;
  border-radius: 999px;
  background: #eaecf0;
  overflow: hidden;
}
.ued-bar-row em {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #16a34a, #22c55e);
}
.ued-scope-buttons,
.ued-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}
.ued-scope-buttons button,
.ued-filters button {
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  padding: 5px 10px;
  font-size: 12px;
  cursor: pointer;
}
.ued-scope-buttons button.active,
.ued-filters button.active {
  border-color: var(--green);
  background: var(--green);
  color: #fff;
}
.ued-prompt {
  width: 100%;
  min-height: 92px;
  resize: vertical;
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 9px;
  font: inherit;
  font-size: 12px;
  background: #fbfdff;
}
.ued-table-wrap {
  max-height: 420px;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 7px;
}
.ued-term-table {
  width: 100%;
  margin-top: 0;
}
.ued-term-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
}
.ued-row-risk {
  background: #fff7ed !important;
}
.ued-relevance {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 2px 7px;
  font-size: 12px;
  white-space: nowrap;
}
.ued-relevance.super {
  color: #b42318;
  background: #fef3f2;
  border: 1px solid #fecdca;
}
.ued-relevance.strong {
  color: #b54708;
  background: #fffaeb;
  border: 1px solid #fedf89;
}
.ued-relevance.normal {
  color: #475467;
  background: #f2f4f7;
  border: 1px solid #d0d5dd;
}
.ued-hit-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  border-radius: 999px;
  padding: 2px 7px;
  font-size: 12px;
}
.ued-hit-dot.yes {
  color: #067647;
  background: #ecfdf3;
  border: 1px solid #abefc6;
}
.ued-hit-dot.no {
  color: #667085;
  background: #f2f4f7;
  border: 1px solid #d0d5dd;
}
.ued-hit-dot.pending {
  color: #475467;
  background: #fff;
  border: 1px dashed #98a2b3;
}
.ued-copy-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.ued-copy-block {
  border: 1px solid var(--border);
  border-radius: 7px;
  background: #fbfdff;
  padding: 10px;
  min-height: 118px;
}
.ued-copy-block:nth-child(1),
.ued-copy-block:nth-child(2),
.ued-copy-block:nth-last-child(1) {
  grid-column: 1 / -1;
}
.ued-copy-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 7px;
}
.ued-copy-title b {
  font-size: 13px;
}
.ued-copy-title span {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}
.ued-copy-text {
  color: #344054;
  font-size: 13px;
  line-height: 1.55;
}
.ued-copy-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 8px;
}
.ued-copy-tags span {
  border: 1px solid #bbf7d0;
  background: #f0fdf4;
  color: #166534;
  border-radius: 999px;
  padding: 2px 7px;
  font-size: 12px;
}
.ued-copy-tags em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}
@media (max-width: 980px) {
  .ued-workbench,
  .ued-metrics,
  .ued-flow,
  .ued-layout,
  .strategy-layout,
  .strategy-metrics,
  .ued-copy-grid {
    grid-template-columns: 1fr;
  }
}
th, td { border: 1px solid var(--border); padding: 3px 8px; text-align: left; }
th { background: var(--bg); font-weight: 600; white-space: nowrap; }
td.kw { max-width: 260px; }
.relev { text-align: right; }
tbody tr:nth-child(even) { background: #fafbfc; }
#projects-table {
  width: 100%;
  margin-top: 0;
}
.history-table-wrap {
  max-height: 64vh;
}
#projects-table th,
#projects-table td {
  padding: 6px 8px;
  vertical-align: middle;
}
#projects-table th {
  color: #334155;
  background: #f8fafc;
  font-weight: 700;
}
.build-status {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 8px;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  color: #475569;
  background: #f8fafc;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}
.build-status-completed {
  color: #216e42;
  border-color: #b9dbc7;
  background: #edf8f1;
}
.build-status-failed {
  color: #b42318;
  border-color: #f2b8b5;
  background: #fff1f0;
}
.build-status-in_progress {
  color: #9a5b13;
  border-color: #ead1a7;
  background: #fff8e8;
}

/* 长文本限制可读宽度，宽屏下不至于铺满整行 */
#title-result p {
  margin: 4px 0;
  padding: 7px;
  background: var(--bg);
  border-radius: 5px;
  max-width: 900px;
}
#bullets-result ul { margin: 5px 0; padding-left: 16px; max-width: 900px; }
#bullets-result li { margin-bottom: 4px; }

/* 窄屏：标签回到上方堆叠 */
@media (max-width: 560px) {
  .field { grid-template-columns: 1fr; gap: 3px; }
  .field > label { padding-top: 0; }
  .v2-root-table-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }
  .v2-root-active-title {
    flex-wrap: wrap;
  }
  .v2-root-table-tools {
    width: 100%;
    flex-wrap: wrap;
  }
  .v2-root-table-tools > button,
  .v2-root-batch-move {
    flex: 1;
  }
  .v2-root-batch-move {
    padding-right: 0;
    border-right: 0;
  }
  .v2-root-table-shell {
    height: 62vh;
    min-height: 420px;
  }
  .v2-precision-toolbar {
    align-items: stretch;
    flex-direction: column;
  }
  .v2-precision-toolbar label,
  .v2-precision-search {
    width: 100%;
    min-width: 0;
  }
  .v2-precision-filter-row {
    display: flex;
    width: 100%;
    align-items: stretch;
    flex-direction: column;
    gap: 8px;
  }
  .v2-precision-filter-row .v2-choice-filter-group {
    width: 100%;
    align-items: flex-start;
    flex-direction: column;
  }
  .v2-precision-toolbar input,
  .v2-precision-search input {
    width: 100%;
    min-width: 0;
  }
  .v2-precision-filter-row .v2-choice-segmented {
    max-width: 100%;
    overflow-x: auto;
  }
  .v2-precision-counts {
    width: 100%;
    margin-left: 0;
  }
  .v2-precision-counts span {
    flex: 1;
    justify-content: center;
  }
  .v2-precision-table-shell {
    height: 62vh;
    min-height: 420px;
  }
  .v2-precision-footer {
    align-items: flex-start;
    flex-direction: column;
  }
  .copy-result-grid { grid-template-columns: 1fr; }
}

@media (max-width: 360px) {
  .v2-root-tab {
    min-width: 108px;
    padding: 0 8px;
  }
}

/* 历史项目查看弹窗 */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, .45);
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 16px;
  z-index: 50;
}
.modal-overlay.open { display: flex; }
.modal {
  background: #fff;
  border-radius: 8px;
  width: 100%;
  max-width: 760px;
  max-height: 85vh;
  overflow-y: auto;
  padding: 16px 18px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, .25);
}
.modal.build-help-modal { max-width: 980px; }
.modal.full-log-modal { max-width: 1180px; }
.modal.v2-root-keyword-coverage-modal {
  max-width: 1280px;
  overflow: hidden;
}
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 8px;
  margin-bottom: 10px;
}
.modal-head h2 { margin: 0; font-size: 15px; }
.modal-head .meta { font-size: 12px; color: var(--muted); }
.modal-close {
  border: none;
  background: none;
  font-size: 20px;
  line-height: 1;
  color: var(--muted);
  cursor: pointer;
  padding: 0 4px;
}
.modal-close:hover { color: #e11d48; }
.full-log-actions {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}
.full-log-view {
  margin: 0;
  min-height: 420px;
  max-height: 68vh;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 12px;
  line-height: 1.55;
  background: #0f172a;
  color: #e5e7eb;
  border-radius: 6px;
  padding: 12px;
}
.modal .section { margin-bottom: 14px; }
.modal .section > h3 { margin: 0 0 6px; }
.modal .desc {
  font-size: 12.5px;
  background: var(--bg);
  border-radius: 5px;
  padding: 8px;
  white-space: pre-wrap;
}
/* 结构化产品描述分项：左标签右内容的定义列表 */
.modal .kv {
  margin: 0;
  background: var(--bg);
  border-radius: 5px;
  padding: 4px 8px;
}
.modal .kv-row {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 10px;
  padding: 5px 0;
  border-bottom: 1px solid var(--border);
}
.modal .kv-row:last-child { border-bottom: none; }
.modal .kv-row dt {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}
.modal .kv-row dd {
  margin: 0;
  font-size: 12.5px;
  color: #0f172a;
  white-space: pre-wrap;
}
details.gen {
  border: 1px solid var(--border);
  border-radius: 5px;
  margin-bottom: 6px;
}
details.gen > summary {
  cursor: pointer;
  padding: 6px 9px;
  font-size: 12px;
  color: var(--muted);
  user-select: none;
}
details.gen[open] > summary { border-bottom: 1px solid var(--border); color: #1e293b; }
.gen-body { padding: 8px 9px; }
.gen-body pre { font-size: 11px; overflow-x: auto; margin: 0; }

.history-downloads {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}
.history-file-group {
  margin-bottom: 8px;
}
.history-file-group b,
.history-strategy-block b {
  display: block;
  margin-bottom: 5px;
  font-size: 12px;
  color: #334155;
}
.history-strategy {
  display: grid;
  gap: 10px;
}
.history-strategy-block {
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fbfdff;
  padding: 8px;
}
.history-coverage-stats {
  margin: 8px 0;
}
.history-coverage-wrap {
  max-height: 340px;
  overflow: auto;
}

/* 弹窗内：图片、词根标签、链接列表 */
.modal-imgs { display: flex; flex-wrap: wrap; gap: 6px; }
.modal-imgs img {
  height: 90px;
  width: auto;
  object-fit: cover;
  border: 1px solid var(--border);
  border-radius: 5px;
  display: block;
}
.build-help {
  font-size: 12.5px;
  color: var(--fg);
}
.build-help-page {
  max-width: 1440px;
  margin: 0 auto 28px;
  padding: 14px;
  display: grid;
  grid-template-columns: 188px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}
.help-toc {
  position: sticky;
  top: 12px;
  z-index: 5;
  display: grid;
  gap: 5px;
  padding: 8px;
  margin: 0;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 8px;
}
.help-toc a {
  display: flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 8px;
  border: 1px solid transparent;
  border-radius: 6px;
  color: #334155;
  text-decoration: none;
  background: transparent;
  line-height: 1.25;
}
.help-toc a:hover {
  color: var(--green);
  border-color: #bbf7d0;
  background: #f0fdf4;
}
.help-toc a.active {
  color: #166534;
  border-color: #86efac;
  background: #dcfce7;
  font-weight: 700;
}
.help-content {
  grid-column: 2;
  display: grid;
  gap: 12px;
  min-width: 0;
}
.help-content > section {
  margin: 0;
  padding: 13px 14px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .035);
  overflow-x: auto;
}
.build-help h3 {
  margin: 0 0 9px;
  font-size: 14px;
  color: var(--fg);
  display: flex;
  align-items: center;
  gap: 7px;
}
.build-help h3::before {
  content: "";
  width: 4px;
  height: 14px;
  border-radius: 2px;
  background: linear-gradient(var(--green), #34d399);
}
.build-help h4 {
  margin: 13px 0 7px;
  font-size: 13px;
  color: #0f172a;
}
.build-help .lead {
  margin: 0;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 9px 10px;
  line-height: 1.65;
}
.help-flow {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  align-items: center;
  gap: 8px;
  margin: 10px 0 12px;
  padding: 10px;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 9px;
}
.help-flow span {
  border: 1px solid #dbeafe;
  background: linear-gradient(180deg, #f8fbff, #eef5ff);
  color: #1d4ed8;
  border-radius: 6px;
  padding: 8px 9px;
  font-weight: 600;
  text-align: center;
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
.help-flow span b {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: #dbeafe;
  color: #1e40af;
  font-size: 11px;
}
.help-flow i {
  color: var(--muted);
  font-style: normal;
  display: none;
}
.help-steps {
  margin: 0;
  padding-left: 20px;
}
.help-steps li { margin: 5px 0; }
.help-table {
  width: 100%;
  border-collapse: collapse;
  margin: 8px 0 10px;
  font-size: 12px;
  background: #fff;
}
.help-table th,
.help-table td {
  border: 1px solid var(--border);
  padding: 7px 9px;
  text-align: left;
  vertical-align: top;
  line-height: 1.55;
}
.help-table th {
  background: #f8fafc;
  color: #334155;
  font-weight: 700;
  white-space: nowrap;
}
.help-table th:first-child,
.help-table td:first-child {
  min-width: 72px;
  white-space: nowrap;
}
.copy-help-flow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 18px minmax(0, 1fr) 18px minmax(0, 1fr) 18px minmax(0, 1fr);
  gap: 6px;
  align-items: stretch;
  margin-bottom: 10px;
}
.copy-help-flow div,
.copy-help-grid div {
  border: 1px solid var(--border);
  background: #f8fbff;
  border-radius: 7px;
  padding: 8px 9px;
}
.copy-help-flow b,
.copy-help-grid b {
  display: block;
  color: #0f172a;
  margin-bottom: 3px;
}
.copy-help-flow span,
.copy-help-grid span {
  display: block;
  color: #475569;
  line-height: 1.45;
}
.copy-help-flow i {
  align-self: center;
  justify-self: center;
  color: var(--muted);
  font-style: normal;
}
.copy-help-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 8px;
  margin-bottom: 8px;
}
.help-note {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-left: 4px solid #f97316;
  border-radius: 6px;
  padding: 8px 10px;
  margin-bottom: 8px;
  line-height: 1.6;
}
.help-shot-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.help-shot-grid figure {
  margin: 0;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  background: #fff;
}
.help-shot-grid figure button {
  display: block;
  width: 100%;
  padding: 0;
  margin: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
}
.help-shot-grid figure button:hover img {
  filter: brightness(.97);
}
.help-shot-grid img {
  display: block;
  width: 100%;
  height: 118px;
  object-fit: contain;
  background: #f8fafc;
}
.help-shot-grid figcaption {
  padding: 6px 8px;
  color: var(--muted);
  border-top: 1px solid var(--border);
}
.help-image-viewer {
  margin-top: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #f8fafc;
  padding: 8px;
}
.help-image-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  margin-bottom: 8px;
}
.help-image-head button {
  padding: 4px 8px;
  font-size: 12px;
}
.help-image-viewer img {
  display: block;
  width: 100%;
  max-height: 62vh;
  object-fit: contain;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 6px;
}
.help-warn {
  margin: 0;
  padding-left: 18px;
  line-height: 1.6;
}
.help-warn li { margin: 4px 0; }
@media (max-width: 1100px) {
  .build-help-page {
    grid-template-columns: 1fr;
  }
  .help-toc {
    grid-column: 1;
    position: static;
    display: flex;
    flex-wrap: wrap;
  }
  .help-content {
    grid-column: 1;
  }
  .help-flow {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .help-shot-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 720px) {
  .help-flow,
  .help-shot-grid { grid-template-columns: 1fr; }
  .help-shot-grid img { height: 150px; }
  .copy-help-flow,
  .copy-help-grid {
    grid-template-columns: 1fr;
  }
  .copy-help-flow i {
    display: none;
  }
}

/* Fifth step: copywriting workspace */
#v2-step-5.v2-copy-v3 {
  overflow: hidden;
  padding: 12px 14px;
}
#v2-step-5 > .actions {
  margin: 8px 0 0;
}
#v2-step-5 .v2-copy-v3-input {
  border-bottom: 1px solid #dce4e8;
  background: #fbfcfc;
}
#v2-step-5 .v2-copy-v3-summary-head,
#v2-step-5 .v2-copy-v3-output-head,
#v2-step-5 .v2-copy-v3-audit-head {
  display: flex;
  min-height: 44px;
  padding: 8px 18px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid #dce4e8;
}
#v2-step-5 .v2-copy-v3-output-head,
#v2-step-5 .v2-copy-v3-audit-head {
  min-height: 60px;
  padding: 10px 18px;
  justify-content: flex-start;
  border-top: 3px solid #357c4f;
  border-bottom-color: #c9d7ce;
  background: #f7faf8;
}
#v2-step-5 .v2-copy-v3-output-head {
  margin-top: 16px;
}
#v2-step-5 .v2-copy-v3-output-head > div,
#v2-step-5 .v2-copy-v3-audit-head > div {
  min-width: 0;
  flex: 1 1 auto;
}
#v2-step-5 .v2-copy-v3-section-index {
  display: inline-flex;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  background: #357c4f;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0;
}
#v2-step-5 .v2-copy-v3-summary-head h3,
#v2-step-5 .v2-copy-v3-output-head h3,
#v2-step-5 .v2-copy-v3-audit-head h3 {
  margin: 0;
  font-size: 15px;
}
#v2-step-5 .v2-copy-v3-output-head h3,
#v2-step-5 .v2-copy-v3-audit-head h3 {
  color: #173828;
  font-size: 16px;
  font-weight: 800;
}
#v2-step-5 .v2-copy-v3-summary-head p,
#v2-step-5 .v2-copy-v3-output-head p,
#v2-step-5 .v2-copy-v3-audit-head p {
  margin: 2px 0 0;
  color: #677884;
  font-size: 12px;
}
#v2-step-5 .v2-copy-v3-summary-head {
  min-height: 38px;
  padding-top: 6px;
  padding-bottom: 6px;
}
#v2-step-5 .v2-copy-v3-summary-head h3 {
  font-size: 13px;
}
#v2-step-5 .v2-copy-v3-facts {
  padding: 5px 18px 7px;
  border-bottom: 1px solid #dce4e8;
  border-left: 3px solid #5bbd7a;
  background: #f7fbf8;
}
#v2-step-5 .v2-copy-v3-fact {
  display: grid;
  min-width: 0;
  padding: 4px 0;
  grid-template-columns: 88px minmax(0, 1fr);
  align-items: start;
  gap: 0;
}
#v2-step-5 .v2-copy-v3-fact:not(:last-child) {
  border-bottom: 1px dashed #dce7df;
}
#v2-step-5 .v2-copy-v3-fact span {
  display: block;
  margin: 0;
  color: #677884;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
}
#v2-step-5 .v2-copy-v3-fact strong {
  display: block;
  color: #142333;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
#v2-step-5 .v2-copy-v3-prompt {
  display: flex;
  min-height: 39px;
  padding: 7px 18px;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid #dce4e8;
  color: #677884;
  font-size: 12px;
}
#v2-step-5 .v2-copy-v3-prompt strong {
  color: #142333;
}
#v2-step-5 .v2-copy-v3-state,
#v2-step-5 .v2-copy-v3-validation {
  display: inline-flex;
  min-height: 24px;
  padding: 0 8px;
  align-items: center;
  border: 1px solid #b9d9c4;
  border-radius: 5px;
  background: #eaf6ef;
  color: #267047;
  font-size: 11px;
  font-weight: 700;
}
#v2-step-5 .v2-copy-v3-validation.is-failed {
  border-color: #e7b2ae;
  background: #fff0ef;
  color: #b83e36;
}
#v2-step-5 .v2-copy-v3-match-groups {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
#v2-step-5 .v2-copy-v3-match-group {
  min-width: 0;
  padding: 10px 18px 11px;
  border-right: 1px solid #dce4e8;
}
#v2-step-5 .v2-copy-v3-match-group:last-child {
  border-right: 0;
}
#v2-step-5 .v2-copy-v3-match-head {
  display: flex;
  min-height: 24px;
  margin-bottom: 7px;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}
#v2-step-5 .v2-copy-v3-match-head strong {
  font-size: 13px;
}
#v2-step-5 .v2-copy-v3-match-head span {
  color: #677884;
  font-size: 11px;
}
#v2-step-5 .v2-copy-v3-match-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
#v2-step-5 .v2-copy-v3-match-metric {
  display: grid;
  min-height: 46px;
  padding: 7px 9px;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 2px 8px;
  border: 1px solid #c2d9e9;
  border-radius: 5px;
  background: #edf6fc;
  color: #5d6e79;
  font-size: 11px;
}
#v2-step-5 .v2-copy-v3-match-metric:first-child {
  border-color: #b9d9c4;
  background: #eaf6ef;
}
#v2-step-5 .v2-copy-v3-match-metric b {
  color: #142333;
  font-size: 15px;
}
#v2-step-5 .v2-copy-v3-match-metric em {
  grid-column: 1 / -1;
  color: #74838d;
  font-size: 10px;
  font-style: normal;
}
#v2-step-5 > .v2-progress,
#v2-step-5 > .v2-errors,
#v2-step-5 > .gen-tokens {
  margin: 12px 18px 0;
}
#v2-step-5 .v2-copy-v3-output-head {
  min-height: 54px;
  padding-top: 10px;
  padding-bottom: 10px;
}
#v2-step-5 .v2-copy-v3-highlight-bar {
  display: flex;
  min-height: 52px;
  padding: 8px 18px;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid #dce4e8;
  background: #fff;
}
#v2-step-5 .v2-copy-v3-highlight-label {
  flex: 0 0 auto;
  color: #425966;
  font-size: 12px;
  font-weight: 800;
}
#v2-step-5 .v2-copy-v3-highlight-options {
  display: flex;
  min-width: 0;
  flex: 1 1 auto;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}
#v2-step-5 .v2-copy-v3-highlight-option {
  display: inline-flex;
  min-height: 32px;
  padding: 0 10px;
  align-items: center;
  gap: 6px;
  border: 1px solid;
  border-radius: 5px;
  background: #fff;
  font-size: 11px;
  font-weight: 700;
}
#v2-step-5 .v2-copy-v3-highlight-option > span {
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  border: 2px solid currentColor;
  border-radius: 50%;
  background: transparent;
}
#v2-step-5 .v2-copy-v3-highlight-option.is-active {
  box-shadow: 0 0 0 2px rgba(29, 48, 61, 0.08);
}
#v2-step-5 .v2-copy-v3-highlight-option.is-active > span {
  background: currentColor;
  box-shadow: inset 0 0 0 1px #fff;
}
#v2-step-5 .v2-copy-v3-highlight-option.is-super {
  border-color: #91cba6;
  color: #267047;
}
#v2-step-5 .v2-copy-v3-highlight-option.is-super.is-active {
  background: #e5f6eb;
  border-color: #4d9a69;
}
#v2-step-5 .v2-copy-v3-highlight-option.is-strong {
  border-color: #9cbfe4;
  color: #2f68a3;
}
#v2-step-5 .v2-copy-v3-highlight-option.is-strong.is-active {
  background: #e7f1fc;
  border-color: #5d8fc4;
}
#v2-step-5 .v2-copy-v3-highlight-option.is-exact {
  border-color: #dfbe68;
  color: #8b6100;
}
#v2-step-5 .v2-copy-v3-highlight-option.is-exact.is-active {
  background: #fff4ce;
  border-color: #c99a24;
}
#v2-step-5 .v2-copy-v3-highlight-option.is-free {
  border-color: #dda48e;
  color: #9b4d31;
}
#v2-step-5 .v2-copy-v3-highlight-option.is-free.is-active {
  background: #ffebe3;
  border-color: #c87352;
}
#v2-step-5 .v2-copy-v3-highlight-clear {
  min-height: 30px;
  padding: 0 8px;
  border: 0;
  background: transparent;
  color: #647681;
  font-size: 11px;
  font-weight: 700;
}
#v2-step-5 .v2-copy-v3-highlight-clear:disabled {
  color: #aab4ba;
  cursor: default;
}
#v2-step-5 .v2-copy-v3-highlight-mark {
  padding: 1px 2px;
  border-radius: 2px;
  color: inherit;
  font-weight: 700;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}
#v2-step-5 .v2-copy-v3-highlight-mark.is-super {
  background: #ccebd7;
  box-shadow: inset 0 -1px 0 #68ae80;
}
#v2-step-5 .v2-copy-v3-highlight-mark.is-strong {
  background: #d5e8fb;
  box-shadow: inset 0 -1px 0 #6f9ece;
}
#v2-step-5 .v2-copy-v3-highlight-mark.is-exact {
  background: #ffe9a7;
  box-shadow: inset 0 -1px 0 #c99a24;
}
#v2-step-5 .v2-copy-v3-highlight-mark.is-free {
  background: #ffd9cb;
  box-shadow: inset 0 -1px 0 #cc7858;
}
#v2-step-5 .v2-copy-v3-copy-section {
  position: relative;
  border-bottom: 1px solid #dce4e8;
}
#v2-step-5 .v2-copy-v3-copy-head {
  display: flex;
  min-height: 44px;
  padding: 7px 18px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid #dce4e8;
  background: #fbfcfc;
}
#v2-step-5 .v2-copy-v3-copy-title,
#v2-step-5 .v2-copy-v3-section-actions {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 9px;
}
#v2-step-5 .v2-copy-v3-copy-title h4 {
  margin: 0;
  font-size: 14px;
}
#v2-step-5 .v2-copy-v3-count {
  display: inline-flex;
  min-height: 22px;
  padding: 0 7px;
  align-items: center;
  border-radius: 4px;
  background: #eaf6ef;
  color: #267047;
  font-size: 11px;
  font-weight: 700;
}
#v2-step-5 .v2-copy-v3-count.over {
  background: #fff0ef;
  color: #b83e36;
}
#v2-step-5 .v2-copy-v3-coverage-note {
  color: #677884;
  font-size: 11px;
}
#v2-step-5 .v2-copy-v3-section-actions button {
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid #c8d4da;
  border-radius: 6px;
  background: #f8faf9;
  color: #49606f;
  font-size: 12px;
  font-weight: 700;
}
#v2-step-5 .v2-copy-v3-copy-body {
  padding: 12px 18px 13px;
}
#v2-step-5 .v2-copy-v3-en {
  margin: 0;
  color: #152a38;
  font-family: Arial, sans-serif;
  font-size: 14px;
  line-height: 1.62;
}
#v2-step-5 .v2-copy-v3-zh {
  margin: 7px 0 0;
  color: #71808a;
  font-size: 12px;
  line-height: 1.55;
}
#v2-step-5 .v2-copy-v3-bullets {
  margin: 0;
  padding: 0;
  list-style: none;
}
#v2-step-5 .v2-copy-v3-bullet {
  display: grid;
  min-height: 58px;
  grid-template-columns: 34px minmax(0, 1fr) 70px;
  align-items: start;
  border-bottom: 1px solid #e8edef;
}
#v2-step-5 .v2-copy-v3-bullet:last-child {
  border-bottom: 0;
}
#v2-step-5 .v2-copy-v3-bullet-index {
  display: inline-flex;
  width: 23px;
  height: 23px;
  margin-top: 13px;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  background: #eaf6ef;
  color: #2d7a4c;
  font-size: 12px;
  font-weight: 700;
}
#v2-step-5 .v2-copy-v3-bullet-copy {
  padding: 10px 14px 9px 0;
}
#v2-step-5 .v2-copy-v3-bullet-copy p {
  margin: 0;
  font-family: Arial, sans-serif;
  font-size: 13px;
  line-height: 1.5;
}
#v2-step-5 .v2-copy-v3-bullet-copy small {
  display: block;
  margin-top: 4px;
  color: #74838d;
  font-size: 11px;
  line-height: 1.45;
}
#v2-step-5 .v2-copy-v3-bullet-count {
  padding-top: 14px;
  color: #72818b;
  font-size: 11px;
  text-align: right;
}
#v2-step-5 .v2-copy-v3-bullet-count.over {
  color: #b42318;
  font-weight: 700;
}
#v2-step-5 .v2-copy-v3-search {
  padding: 10px 12px;
  border: 1px solid #d7e0e4;
  border-radius: 5px;
  background: #f9fbfb;
  color: #213746;
  font-family: Arial, sans-serif;
  font-size: 13px;
  line-height: 1.55;
  word-break: break-word;
}
#v2-step-5 .v2-copy-v3-audit {
  margin-top: 20px;
  border-top: 0;
}
#v2-step-5 .v2-copy-v3-board {
  border-bottom: 8px solid #f3f6f7;
  background: #fff;
}
#v2-step-5 .v2-copy-v3-board:last-child {
  border-bottom: 0;
}
#v2-step-5 .v2-copy-v3-board-head {
  display: flex;
  min-height: 54px;
  padding: 9px 18px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid #dce4e8;
}
#v2-step-5 .v2-copy-v3-board-title h4 {
  margin: 0 0 3px;
  font-size: 13px;
  font-weight: 700;
}
#v2-step-5 .v2-copy-v3-board-title p {
  margin: 0;
  color: #677884;
  font-size: 11px;
}
#v2-step-5 .v2-copy-v3-board-stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
}
#v2-step-5 .v2-copy-v3-stat {
  display: inline-flex;
  min-height: 28px;
  padding: 0 8px;
  align-items: center;
  gap: 5px;
  border: 1px solid #d7e0e4;
  border-radius: 5px;
  background: #fff;
  color: #657680;
  font-size: 10px;
}
#v2-step-5 .v2-copy-v3-stat b {
  color: #142333;
  font-size: 12px;
}
#v2-step-5 .v2-copy-v3-toolbar {
  display: flex;
  min-height: 46px;
  padding: 7px 18px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid #dce4e8;
  background: #fbfcfc;
}
#v2-step-5 .v2-copy-v3-toolbar-left {
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
#v2-step-5 .v2-copy-v3-filter-label {
  flex: 0 0 auto;
  color: #6a7a85;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}
#v2-step-5 .v2-copy-v3-filter-search {
  display: inline-flex;
  flex: 0 0 220px;
  width: 220px;
  max-width: 220px;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
#v2-step-5 .v2-copy-v3-filter-search input {
  width: 100%;
  min-width: 0;
  height: 29px;
  border: 1px solid #cfd9df;
  border-radius: 5px;
  padding: 4px 9px;
  background: #fff;
  color: #233746;
  font-size: 11px;
}
#v2-step-5 .v2-copy-v3-toolbar.precision-toolbar {
  align-items: center;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 10px;
  overflow-x: auto;
  padding: 7px 16px;
}
#v2-step-5 .v2-copy-v3-toolbar.precision-toolbar .v2-copy-v3-toolbar-left {
  flex: 0 0 auto;
  flex-wrap: nowrap;
  gap: 10px;
}
#v2-step-5 .v2-copy-v3-toolbar.precision-toolbar .v2-choice-filter-group {
  gap: 5px;
  font-size: 11px;
}
#v2-step-5 .v2-copy-v3-toolbar.precision-toolbar .v2-choice-segmented {
  min-height: 31px;
  padding: 2px;
}
#v2-step-5 .v2-copy-v3-toolbar.precision-toolbar .v2-choice-segmented button {
  min-width: 64px;
  padding: 0 8px;
  font-size: 11px;
}
#v2-step-5 .v2-copy-v3-toolbar.precision-toolbar .v2-copy-v3-current-summary {
  margin-left: auto;
  font-size: 10px;
  white-space: nowrap;
}
#v2-step-5 .v2-copy-v3-current-summary {
  flex: 0 0 auto;
  color: #6d7d87;
  font-size: 11px;
}
#v2-step-5 .v2-copy-root-detail-btn {
  min-height: 22px;
  margin: 0;
  padding: 1px 7px;
  border-color: #b9d9c4;
  background: #f0f8f3;
  color: #267047;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}
#v2-step-5 .v2-copy-root-detail-btn:hover {
  border-color: #78b58d;
  background: #e5f3ea;
  color: #1f5f3b;
}
.v2-root-keyword-loading {
  display: flex;
  min-height: 260px;
  align-items: center;
  justify-content: center;
  color: #687985;
  font-size: 13px;
}
.v2-root-keyword-loading.is-error {
  color: #b42318;
}
.v2-root-keyword-summary {
  display: flex;
  min-height: 42px;
  padding: 6px 10px;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  border: 1px solid #d7e2dc;
  background: #f7faf8;
}
.v2-root-keyword-summary span {
  display: inline-flex;
  min-height: 27px;
  padding: 0 9px;
  align-items: center;
  gap: 5px;
  border: 1px solid #d4ded8;
  border-radius: 5px;
  background: #fff;
  color: #667883;
  font-size: 11px;
}
.v2-root-keyword-summary span.exact {
  border-color: #a9d2b6;
  color: #256b42;
}
.v2-root-keyword-summary span.longtail {
  border-color: #b8d2e5;
  color: #2d6d98;
}
.v2-root-keyword-summary span.unmatched {
  border-color: #d5dce1;
  color: #6b7780;
}
.v2-root-keyword-summary b {
  color: #172f22;
  font-size: 13px;
}
.v2-root-keyword-toolbar {
  display: flex;
  min-height: 48px;
  padding: 7px 10px;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  border-right: 1px solid #dce4e8;
  border-bottom: 1px solid #dce4e8;
  border-left: 1px solid #dce4e8;
  background: #fbfcfc;
}
.v2-root-keyword-toolbar label {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 6px;
  color: #657681;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}
.v2-root-keyword-toolbar label > span {
  flex: 0 0 auto;
  white-space: nowrap;
}
.v2-root-keyword-toolbar label.search {
  width: 220px;
  min-width: 220px;
  max-width: 220px;
  flex: 0 0 220px;
}
.v2-root-keyword-toolbar input {
  min-height: 31px;
  border: 1px solid #cfd9df;
  border-radius: 5px;
  background: #fff;
  color: #233746;
  font-size: 12px;
}
.v2-root-keyword-toolbar input {
  min-width: 0;
  flex: 1 1 auto;
  padding: 5px 9px;
}
.v2-root-keyword-toolbar .count {
  margin-left: auto;
  flex: 0 0 auto;
  color: #6b7b85;
  font-size: 11px;
  white-space: nowrap;
}
.v2-root-keyword-table-shell {
  height: min(62vh, 650px);
  overflow: auto;
  border-right: 1px solid #dce4e8;
  border-bottom: 1px solid #dce4e8;
  border-left: 1px solid #dce4e8;
}
.v2-root-keyword-table {
  width: 100%;
  margin: 0;
  table-layout: fixed;
}
.v2-root-keyword-table col.keyword { width: 25%; }
.v2-root-keyword-table col.translation { width: 20%; }
.v2-root-keyword-table col.volume { width: 10%; }
.v2-root-keyword-table col.relevance { width: 10%; }
.v2-root-keyword-table col.status { width: 11%; }
.v2-root-keyword-table col.locations { width: 24%; }
.v2-root-keyword-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  height: 34px;
  padding: 6px 9px;
  border-bottom: 1px solid #ccd8de;
  background: #f1f5f3;
  color: #536672;
  font-size: 11px;
  text-align: left;
}
.v2-root-keyword-table td {
  height: 34px;
  padding: 5px 9px;
  border-bottom: 1px solid #e4eaed;
  color: #263b49;
  font-size: 11.5px;
  line-height: 1.4;
  vertical-align: middle;
}
.v2-root-keyword-table td.keyword {
  overflow-wrap: anywhere;
  font-weight: 600;
}
.v2-root-keyword-table td.translation {
  color: #5f707a;
}
.v2-root-keyword-table td.number {
  font-variant-numeric: tabular-nums;
}
.v2-root-keyword-table tbody tr:nth-child(even) td {
  background: #fbfcfc;
}
.v2-root-keyword-match,
.v2-root-keyword-relevance,
.v2-root-keyword-location {
  display: inline-flex;
  min-height: 22px;
  padding: 2px 7px;
  align-items: center;
  border-radius: 4px;
  font-size: 10.5px;
  font-weight: 700;
  line-height: 1.25;
}
.v2-root-keyword-match.is-exact,
.v2-root-keyword-location.is-exact,
.v2-root-keyword-relevance.is-related {
  background: #e7f4eb;
  color: #236a40;
}
.v2-root-keyword-match.is-longtail,
.v2-root-keyword-location.is-longtail {
  background: #e8f2f9;
  color: #2e6e98;
}
.v2-root-keyword-match.is-unmatched,
.v2-root-keyword-relevance.is-unknown {
  background: #eef1f3;
  color: #687680;
}
.v2-root-keyword-relevance.is-unrelated {
  background: #fff0ef;
  color: #b23c34;
}
.v2-root-keyword-relevance.is-brand {
  background: #fff5df;
  color: #8a5c00;
}
.v2-root-keyword-locations {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.v2-root-keyword-locations .empty,
.v2-root-keyword-table .empty-row {
  color: #87939b;
}
.v2-root-keyword-table .empty-row {
  height: 120px;
  text-align: center;
}
@media (max-width: 760px) {
  .modal.v2-root-keyword-coverage-modal {
    padding-right: 10px;
    padding-left: 10px;
  }
  .v2-root-keyword-toolbar {
    align-items: stretch;
    flex-direction: column;
    overflow-x: visible;
  }
  .v2-root-keyword-toolbar label.search {
    width: 100%;
    min-width: 0;
    max-width: none;
    flex-basis: auto;
  }
  .v2-root-keyword-toolbar .v2-choice-filter-group {
    width: 100%;
    align-items: flex-start;
    flex-direction: column;
  }
  .v2-root-keyword-toolbar .v2-choice-segmented {
    display: grid;
    width: 100%;
    grid-template-columns: repeat(auto-fit, minmax(64px, 1fr));
  }
  .v2-root-keyword-toolbar .v2-choice-segmented button {
    min-width: 0;
  }
  .v2-root-keyword-toolbar .count {
    width: 100%;
    margin-left: 0;
    text-align: right;
  }
  .v2-root-keyword-table-shell {
    height: 58vh;
  }
  .v2-root-keyword-table {
    min-width: 920px;
  }
}
#v2-step-5 .v2-copy-v3-table-shell {
  height: 66vh;
  min-height: 480px;
  overflow: auto;
}
#v2-step-5 .v2-copy-v3-table {
  width: 100%;
  min-width: 1040px;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 11.5px;
}
#v2-step-5 .v2-copy-v3-table.precision {
  min-width: 1180px;
}
#v2-step-5 .v2-copy-v3-table th,
#v2-step-5 .v2-copy-v3-table td {
  height: 30px;
  padding: 2px 7px;
  border-bottom: 1px solid #e6ecef;
  text-align: center;
  vertical-align: middle;
}
#v2-step-5 .v2-copy-v3-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f5f8f9;
  color: #5e707c;
  font-size: 11px;
  line-height: 1.2;
  white-space: nowrap;
}
#v2-step-5 .v2-copy-v3-table th.sortable {
  cursor: pointer;
  user-select: none;
}
#v2-step-5 .v2-copy-v3-table th.sortable:hover {
  background: #edf5f0;
  color: #267047;
}
#v2-step-5 .v2-copy-v3-table th .arr {
  margin-left: 3px;
  color: #73917f;
  font-size: 10px;
}
#v2-step-5 .v2-copy-v3-table .align-left {
  text-align: left;
}
#v2-step-5 .v2-copy-v3-table tbody tr.is-uncovered {
  background: #fffafa;
}
#v2-step-5 .v2-copy-v3-table tbody tr:hover {
  background: #f7fbf8;
}
#v2-step-5 .v2-copy-v3-table .term {
  overflow: hidden;
  color: #1e3341;
  font-family: Arial, sans-serif;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#v2-step-5 .v2-copy-v3-hit {
  display: inline-flex;
  width: 18px;
  height: 18px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #eaf6ef;
  color: #2d7a4c;
  font-size: 11px;
  font-weight: 700;
}
#v2-step-5 .v2-copy-v3-hit.no {
  background: #f0f3f4;
  color: #a0abb1;
}
#v2-step-5 .v2-copy-v3-row-status {
  display: inline-flex;
  min-height: 20px;
  padding: 0 6px;
  align-items: center;
  border-radius: 4px;
  background: #eaf6ef;
  color: #267047;
  font-size: 10px;
  font-weight: 700;
}
#v2-step-5 .v2-copy-v3-row-status.missing {
  background: #fff0ef;
  color: #b83e36;
}
#v2-step-5 .v2-copy-uncovered-reason {
  overflow: hidden;
  color: #7a6260;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#v2-step-5 .v2-copy-v3-root-tier {
  display: inline-flex;
  min-height: 20px;
  padding: 0 6px;
  align-items: center;
  border-radius: 4px;
  background: #eef2f4;
  color: #63737d;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}
#v2-step-5 .v2-copy-v3-root-tier.is-required {
  background: #fff0ed;
  color: #b33a2f;
}
#v2-step-5 .v2-copy-v3-root-tier.is-priority {
  background: #eaf3fb;
  color: #2f668f;
}
#v2-step-5 .v2-copy-precision-match {
  display: inline-flex;
  min-height: 20px;
  padding: 0 6px;
  align-items: center;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}
#v2-step-5 .v2-copy-precision-match.is-exact {
  background: #eaf6ef;
  color: #267047;
}
#v2-step-5 .v2-copy-precision-match.is-free {
  background: #e8f2f9;
  color: #2d6d98;
}
#v2-step-5 .v2-copy-precision-match.is-unmatched {
  background: #eef1f3;
  color: #687680;
}
#v2-step-5 .v2-copy-v3-footer-note {
  min-height: 38px;
  padding: 10px 18px;
  border-top: 1px solid #dce4e8;
  background: #fbfcfc;
  color: #677884;
  font-size: 11px;
}

@media (max-width: 980px) {
  #v2-step-5 .v2-copy-v3-board-head,
  #v2-step-5 .v2-copy-v3-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }
  #v2-step-5 .v2-copy-v3-board-stats {
    justify-content: flex-start;
  }
  #v2-step-5 .v2-copy-v3-filter-search {
    flex-basis: 220px;
  }
  #v2-step-5 .v2-copy-v3-toolbar.precision-toolbar {
    align-items: center;
    flex-direction: row;
  }
  #v2-step-5 .v2-copy-v3-toolbar.precision-toolbar .v2-copy-v3-current-summary {
    display: none;
  }
}

@media (max-width: 620px) {
  .v2-precision-toolbar {
    align-items: stretch;
    flex-direction: column;
  }
  .v2-precision-toolbar label,
  .v2-precision-search {
    width: 100%;
    min-width: 0;
    max-width: none;
    flex-basis: auto;
  }
  .v2-precision-filter-row {
    width: 100%;
    align-items: stretch;
    flex-direction: column;
  }
  .v2-precision-filter-row .v2-choice-filter-group {
    width: 100%;
    align-items: flex-start;
    flex-direction: column;
  }
  .v2-precision-filter-row .v2-choice-segmented {
    display: grid;
    width: 100%;
    max-width: none;
    grid-template-columns: repeat(auto-fit, minmax(64px, 1fr));
    overflow-x: visible;
  }
  .v2-precision-filter-row .v2-choice-segmented button {
    min-width: 0;
  }
  .v2-precision-counts {
    width: 100%;
    margin-left: 0;
    flex-wrap: wrap;
  }
  #v2-step-5 .v2-copy-v3-head {
    align-items: flex-start;
    flex-wrap: wrap;
    padding: 11px 12px;
  }
  #v2-step-5 .v2-copy-v3-head > span:nth-child(2) {
    flex: 1 1 calc(100% - 26px);
  }
  #v2-step-5 .v2-copy-v3-head-actions {
    width: 100%;
    margin-left: 26px;
    flex-wrap: wrap;
  }
  #v2-step-5 .v2-copy-v3-match-groups {
    grid-template-columns: 1fr;
  }
  #v2-step-5 .v2-copy-v3-facts {
    padding-right: 12px;
    padding-left: 12px;
  }
  #v2-step-5 .v2-copy-v3-fact {
    grid-template-columns: 78px minmax(0, 1fr);
  }
  #v2-step-5 .v2-copy-v3-match-group {
    border-right: 0;
    border-bottom: 1px solid #dce4e8;
  }
  #v2-step-5 .v2-copy-v3-summary-head,
  #v2-step-5 .v2-copy-v3-output-head,
  #v2-step-5 .v2-copy-v3-audit-head,
  #v2-step-5 .v2-copy-v3-copy-head {
    align-items: flex-start;
    flex-direction: column;
    padding-right: 12px;
    padding-left: 12px;
  }
  #v2-step-5 .v2-copy-v3-copy-title {
    flex-wrap: wrap;
  }
  #v2-step-5 .v2-copy-v3-coverage-note {
    display: none;
  }
  #v2-step-5 .v2-copy-v3-section-actions {
    width: 100%;
  }
  #v2-step-5 .v2-copy-v3-section-actions button {
    flex: 1;
  }
  #v2-step-5 .v2-copy-v3-highlight-bar {
    padding-right: 12px;
    padding-left: 12px;
    align-items: flex-start;
    flex-direction: column;
  }
  #v2-step-5 .v2-copy-v3-highlight-options {
    width: 100%;
  }
  #v2-step-5 .v2-copy-v3-highlight-option {
    min-width: calc(50% - 4px);
    flex: 1 1 calc(50% - 4px);
    justify-content: flex-start;
  }
  #v2-step-5 .v2-copy-v3-bullet {
    grid-template-columns: 30px minmax(0, 1fr);
  }
  #v2-step-5 .v2-copy-v3-bullet-count {
    display: none;
  }
  #v2-step-5 .v2-copy-v3-table-shell {
    height: 62vh;
    min-height: 420px;
  }
  #v2-step-5 .v2-copy-v3-toolbar.precision-toolbar {
    width: 100%;
    padding-right: 12px;
    padding-left: 12px;
    align-items: stretch;
    flex-direction: column;
    overflow-x: visible;
  }
  #v2-step-5 .v2-copy-v3-filter-search {
    width: 100%;
    max-width: none;
    flex-basis: auto;
  }
  #v2-step-5 .v2-copy-v3-toolbar.precision-toolbar .v2-copy-v3-toolbar-left {
    width: 100%;
    align-items: stretch;
    flex-direction: column;
  }
  #v2-step-5 .v2-copy-v3-toolbar.precision-toolbar .v2-choice-filter-group {
    width: 100%;
    align-items: flex-start;
    flex-direction: column;
  }
  #v2-step-5 .v2-copy-v3-toolbar.precision-toolbar .v2-choice-segmented {
    display: grid;
    width: 100%;
    grid-template-columns: repeat(auto-fit, minmax(64px, 1fr));
  }
  #v2-step-5 .v2-copy-v3-toolbar.precision-toolbar .v2-choice-segmented button {
    min-width: 0;
  }
}
.chips { display: flex; flex-wrap: wrap; gap: 5px; }
.chip {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2px 9px;
  font-size: 12px;
}
ul.links { margin: 4px 0; padding-left: 18px; font-size: 12px; word-break: break-all; }
ul.links li { margin-bottom: 3px; }
ul.links a { color: var(--green); }
@media (max-width: 980px) {
  .strategy-grid,
  .copy-result-grid {
    grid-template-columns: 1fr;
  }
  .copy-score-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 560px) {
  .strategy-head,
  .coverage-head {
    flex-direction: column;
  }
  .strategy-meta,
  .coverage-stats {
    justify-content: flex-start;
  }
  .copy-score-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.v2-history-snapshot-banner {
  margin: 0 0 12px;
  padding: 9px 14px;
  border: 1px solid #b9d8c2;
  border-left: 4px solid #43945b;
  background: #f3faf5;
  color: #315b3d;
  font-size: 14px;
  line-height: 1.5;
}

.v2-history-readonly .card-reset-btn,
.v2-history-readonly .v2-root-add-btn,
.v2-history-readonly .v2-root-move-btn,
.v2-history-readonly .regen-inline-btn {
  opacity: .55;
}
