:root {
  --bg: #f5f6f7;
  --card: #ffffff;
  --line: #e4e6e9;
  --line-2: #eef0f2;
  --text: #1a1d21;
  --muted: #6b7280;
  --faint: #9aa1aa;
  --accent: #0f6e56;
  --accent-soft: #e1f5ee;
  --blue: #185fa5;
  --blue-soft: #e6f1fb;
  --red: #a32d2d;
  --red-soft: #fcebeb;
  --amber: #854f0b;
  --amber-soft: #faeeda;
  --radius: 12px;
  /* 之前只在样式里引用了 --bg-2，没有定义，导致若干面板背景透明 */
  --bg-2: #f2f4f5;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: 1320px; margin: 0 auto; padding: 0 24px; }

/* ---------- 顶栏 ---------- */
.topbar {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255,255,255,.92);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner { display: flex; align-items: center; gap: 14px; height: 60px; }
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  /* 顶栏加了时间天气块与配色切换后变挤，品牌文字必须禁止折行，
     否则中文会被压成「问 / 卷 / 星」竖排 */
  flex: 0 0 auto;
  white-space: nowrap;
}
.brand > div { min-width: 0; }
.brand-title, .brand-sub { white-space: nowrap; }
.brand-mark {
  width: 30px; height: 30px; border-radius: 8px;
  background: var(--accent); color: #fff;
  display: grid; place-items: center; font-size: 15px; font-weight: 500;
}
.brand-title { font-size: 14px; font-weight: 500; line-height: 1.2; }
.brand-sub { font-size: 11px; color: var(--faint); line-height: 1.2; }

.nav {
  display: flex;
  gap: 2px;
  flex: 1 1 auto;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.nav::-webkit-scrollbar { display: none; }
.nav-item {
  border: 0; background: transparent; cursor: pointer;
  font-size: 13px; color: var(--muted); padding: 7px 12px; border-radius: 8px;
  font-family: inherit;
  /* 不加这行，窄屏下 flex 会把「① 设计问卷」压成一字一行的竖排 */
  white-space: nowrap;
}
.nav-item:hover { background: #f0f1f3; color: var(--text); }
.nav-item.is-active { background: var(--accent-soft); color: var(--accent); font-weight: 500; }

.topbar-right { display: flex; align-items: center; gap: 8px; }
.proj-name { font-size: 12px; color: var(--faint); max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- 布局 ---------- */
.main { padding: 22px 24px 60px; }
.tab-panel { display: none; }
.tab-panel.is-active { display: block; }
.is-hidden { display: none !important; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-bottom: 16px;
}
.card-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.card-head h2 { font-size: 14px; font-weight: 500; margin: 0; }
.hint { font-size: 12px; color: var(--faint); }
.sub { font-size: 13px; font-weight: 500; margin: 0 0 8px; color: var(--muted); }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px 16px; }

/**
 * 投放目标条
 *
 * 挂在「开始投放」上方的常驻提示：投错问卷要白烧 IP 和代理费，而且回收的数据
 * 脏了没法救，所以用左侧色条 + 底色做成一整条，而不是一行灰色小字。
 * 未选项目 / 答卷未生成时转成警示色（琥珀），让人点按钮前就注意到。
 */
.run-target {
  display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap;
  border: 1px solid var(--line-2); border-left: 4px solid var(--accent);
  background: var(--accent-soft); border-radius: 9px;
  padding: 10px 14px; margin: 4px 0 14px;
}
.run-target-label { font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.run-target-title { font-size: 14px; font-weight: 600; color: var(--text); word-break: break-all; }
.run-target-meta { font-size: 11.5px; color: var(--faint); margin-left: auto; white-space: nowrap; }
.run-target.is-empty { border-left-color: var(--faint); background: var(--line-2); }
.run-target.is-empty .run-target-title { color: var(--faint); font-weight: 500; }
.run-target.is-warn { border-left-color: var(--amber); background: var(--amber-soft); }
.run-target.is-warn .run-target-meta { color: var(--amber); }

@media (max-width: 860px) {
  .run-target-meta { margin-left: 0; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .topbar-inner { height: auto; flex-wrap: wrap; padding: 10px 0; gap: 10px 14px; min-width: 0; }
  /**
   * 手机端顶栏：品牌一行、导航一行
   *
   * 原来 nav 是 flex:1 且不换行，五个步骤被挤在 390px 里各分到 60px，
   * 中文逐字断行就成了「设 / 计 / 问 / 卷」的竖排，白白吃掉 200px 高度。
   * 改成整行横滑，一屏放不下就左右滑，高度只占一行。
   */
  .nav {
    order: 3;
    flex: 1 1 100%;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    gap: 4px;
    padding-bottom: 2px;
    scrollbar-width: none;
  }
  .nav::-webkit-scrollbar { display: none; }
  .nav-item { flex: 0 0 auto; }
  .topbar-right { margin-left: auto; min-width: 0; flex-wrap: wrap; justify-content: flex-end; }
  .proj-name { max-width: 42vw; }
}

/* ---------- 表单 ---------- */
.field { display: flex; flex-direction: column; gap: 5px; }
.field > span { font-size: 12px; color: var(--muted); }
input[type=text], input[type=password], input[type=number], select, textarea {
  font-family: inherit; font-size: 13px; color: var(--text);
  border: 1px solid var(--line); border-radius: 8px;
  padding: 7px 10px; background: #fff; width: 100%;
  transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(15,110,86,.10);
}
textarea { resize: vertical; line-height: 1.6; }
select { cursor: pointer; }

.inline-field { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.inline-field input { width: 76px; }
.toolbar { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }

.url-row { display: flex; gap: 8px; }
.url-row input { flex: 1; }
.row-actions { display: flex; gap: 10px; align-items: center; margin-top: 12px; flex-wrap: wrap; }

/* ---------- 按钮 ---------- */
.btn {
  font-family: inherit; font-size: 13px; cursor: pointer;
  border: 1px solid var(--line); background: #fff; color: var(--text);
  padding: 7px 14px; border-radius: 8px; white-space: nowrap;
  transition: background .15s, border-color .15s, opacity .15s;
}
.btn:hover { background: #f7f8f9; border-color: #d6d9dd; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: #0c5c47; border-color: #0c5c47; }
.btn-ghost { background: #fff; }
.btn-danger { background: var(--red); border-color: var(--red); color: #fff; }
.btn-danger:hover { background: #8c2626; }
.btn-sm { padding: 5px 10px; font-size: 12px; }

/* ---------- 表格 ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line-2); border-radius: 8px; }
.tbl { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.tbl th, .tbl td { padding: 8px 10px; text-align: left; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.tbl th { background: #fafbfb; font-weight: 500; color: var(--muted); font-size: 12px; white-space: nowrap; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr:hover { background: #fcfcfd; }
.tbl td.num { text-align: right; font-variant-numeric: tabular-nums; }
.tbl th.num { text-align: right; }
.tbl .sig { font-weight: 500; }
.tbl .sig-star { color: var(--accent); }

.tag {
  display: inline-block; font-size: 11px; padding: 1px 7px; border-radius: 999px;
  background: #f0f1f3; color: var(--muted); white-space: nowrap;
}
.tag-scale { background: var(--blue-soft); color: var(--blue); }
.tag-matrix { background: var(--amber-soft); color: var(--amber); }
.tag-text { background: #f0f1f3; color: var(--faint); }
.tag-ok { background: var(--accent-soft); color: var(--accent); }
.tag-bad { background: var(--red-soft); color: var(--red); }

/* ---------- 构念 ---------- */
.construct-bar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--accent-soft); color: var(--accent);
  border-radius: 999px; padding: 4px 10px; font-size: 12px;
}
.chip input {
  border: 0; background: transparent; font-size: 12px; color: var(--accent);
  width: auto; min-width: 40px; padding: 0; box-shadow: none;
}
.chip input:focus { box-shadow: none; }
.chip button { border: 0; background: transparent; color: var(--accent); cursor: pointer; font-size: 13px; padding: 0 2px; }
.chip-add { border: 1px dashed var(--line); background: #fff; color: var(--muted); cursor: pointer; border-radius: 999px; padding: 4px 12px; font-size: 12px; font-family: inherit; }

/* ---------- KPI ---------- */
.kpi-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
@media (max-width: 860px) { .kpi-row { grid-template-columns: 1fr 1fr; } }
.kpi { border: 1px solid var(--line-2); border-radius: 10px; padding: 12px 14px; }
.kpi-label { font-size: 12px; color: var(--muted); }
.kpi-value { font-size: 22px; font-weight: 500; line-height: 1.3; font-variant-numeric: tabular-nums; }
.kpi-value small { font-size: 12px; color: var(--faint); font-weight: 400; margin-left: 4px; }
.kpi.ok .kpi-value { color: var(--accent); }
.kpi.bad .kpi-value { color: var(--red); }

.report-box {
  margin-top: 14px; padding: 12px 14px; border-radius: 10px;
  background: #fbfcfc; border: 1px solid var(--line-2); font-size: 12.5px;
}
.report-box .r-row { display: flex; justify-content: space-between; padding: 3px 0; }

/* ---------- 进度 ---------- */
.bar { height: 8px; background: #eef0f2; border-radius: 999px; overflow: hidden; margin-bottom: 14px; }
.bar-fill { height: 100%; background: var(--accent); transition: width .4s ease; }
.stat-row { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; margin-bottom: 14px; }
@media (max-width: 860px) { .stat-row { grid-template-columns: repeat(3, 1fr); } }
.stat { }
.stat .l { font-size: 11px; color: var(--faint); }
.stat .v { font-size: 16px; font-weight: 500; font-variant-numeric: tabular-nums; }
.log {
  max-height: 260px; overflow-y: auto; font-size: 12px;
  border: 1px solid var(--line-2); border-radius: 8px; padding: 8px 10px;
  background: #fcfcfd; font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.log div { padding: 2px 0; border-bottom: 1px dotted #f0f1f3; }
.log .ok { color: var(--accent); }
.log .bad { color: var(--red); }
.log .warn { color: var(--amber); }

/* ---------- IP 列表 ---------- */
.ip-list { margin-top: 12px; max-height: 280px; overflow-y: auto; border: 1px solid var(--line-2); border-radius: 8px; }
.ip-row { display: flex; align-items: center; gap: 10px; padding: 7px 12px; border-bottom: 1px solid var(--line-2); font-size: 12.5px; }
.ip-row:last-child { border-bottom: 0; }
.ip-row .ip { font-family: ui-monospace, monospace; min-width: 150px; }
.ip-row .area { color: var(--muted); flex: 1; }

/* ---------- 弹窗 ---------- */
.modal {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(20,24,28,.32);
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.modal-card {
  background: #fff; border-radius: 14px; width: 100%; max-width: 620px;
  max-height: 86vh; display: flex; flex-direction: column;
  box-shadow: 0 12px 40px rgba(0,0,0,.14);
}
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--line-2); }
.modal-head h2 { font-size: 14px; font-weight: 500; margin: 0; }
.modal-x { border: 0; background: transparent; font-size: 20px; color: var(--faint); cursor: pointer; line-height: 1; }
.modal-body { padding: 18px 20px; overflow-y: auto; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 20px; border-top: 1px solid var(--line-2); }
.modal-body .field { margin-bottom: 12px; }
.modal-body code { background: #f4f5f6; padding: 1px 5px; border-radius: 4px; font-size: 12px; }

/* 任务详情浮层：沿用 modal 遮罩，详情表较宽故放宽卡片 */
.live-float {
  background: var(--card); border-radius: 14px; width: 100%; max-width: 1000px;
  max-height: 86vh; display: flex; flex-direction: column;
  box-shadow: 0 12px 40px rgba(0,0,0,.18);
}
.live-float .card-head { flex: 0 0 auto; }
.live-float .log-wrap { overflow: auto; }

.dist-body { display: flex; flex-direction: column; gap: 8px; }
.dist-item { display: flex; align-items: center; gap: 10px; }
.dist-item .txt { flex: 1; font-size: 13px; }
.dist-item input { width: 88px; text-align: right; }

.project-list { display: flex; flex-direction: column; gap: 8px; }
.project-item {
  border: 1px solid var(--line-2); border-radius: 10px; padding: 10px 12px;
  cursor: pointer; display: flex; justify-content: space-between; gap: 12px;
}
.project-item:hover { border-color: var(--accent); background: #fbfcfc; }
.project-item .t { font-size: 13px; }
.project-item .m { font-size: 11px; color: var(--faint); }

/* ---------- 草稿结果 ---------- */
.draft-result { margin-top: 14px; border-top: 1px solid var(--line-2); padding-top: 14px; }
.draft-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.draft-construct { margin-bottom: 14px; }
.draft-construct h4 { font-size: 13px; font-weight: 500; margin: 0 0 6px; color: var(--accent); }
.draft-q { display: flex; gap: 8px; align-items: flex-start; padding: 4px 0; font-size: 13px; line-height: 1.6; }
.draft-q .n { color: var(--faint); font-size: 12px; min-width: 22px; padding-top: 1px; }
.draft-q .rev { font-size: 11px; color: var(--amber); background: var(--amber-soft); padding: 0 6px; border-radius: 999px; margin-left: 6px; white-space: nowrap; }
.draft-opts { display: block; font-style: normal; font-size: 12px; color: var(--faint); margin-top: 2px; }
.draft-matrix { display: block; }
.draft-matrix b { display: block; font-weight: 500; margin-bottom: 4px; }
.draft-mrow { display: block; font-style: normal; font-size: 12.5px; color: var(--muted); padding: 2px 0 2px 10px; border-left: 2px solid var(--line-2); margin: 2px 0 2px 2px; }
.draft-warn {
  font-size: 12px; line-height: 1.7; color: #8a6d1f; background: var(--amber-soft);
  border-radius: 8px; padding: 8px 12px; margin-bottom: 10px;
}
.draft-tabs { display: flex; align-items: center; gap: 6px; margin: 4px 0 8px; flex-wrap: wrap; }
.dtab {
  appearance: none; border: 1px solid var(--line-2); background: transparent; color: var(--muted);
  font-size: 12px; padding: 4px 12px; border-radius: 999px; cursor: pointer; font-family: inherit;
}
.dtab.is-active { background: var(--accent); border-color: var(--accent); color: #fff; }
.wjx-pre {
  margin: 0; padding: 12px 14px; border: 1px solid var(--line-2); border-radius: 10px;
  background: var(--bg-2); font-family: var(--mono, ui-monospace, Menlo, monospace);
  font-size: 12px; line-height: 1.75; white-space: pre-wrap; word-break: break-word;
  max-height: 420px; overflow: auto; color: var(--text);
}

/* ---------- 解读 ---------- */
.interpret { font-size: 13px; line-height: 1.85; white-space: pre-wrap; }
.interpret .disclaimer {
  display: block; margin-top: 12px; padding: 8px 12px; border-radius: 8px;
  background: var(--amber-soft); color: var(--amber); font-size: 12px; white-space: normal;
}

/* ---------- 其他 ---------- */
.empty { text-align: center; padding: 60px 20px; color: var(--faint); font-size: 13px; }
.empty p { margin: 0 0 8px; }

.pred-list { display: flex; flex-wrap: wrap; gap: 8px; min-height: 34px; }
.pred-item { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 999px; padding: 3px 8px; font-size: 12px; }
.pred-item select { width: auto; border: 0; padding: 0 2px; font-size: 12px; background: transparent; }

.ai-block { border: 1px solid var(--line-2); border-radius: 10px; padding: 12px 14px; margin-top: 12px; font-size: 12.5px; background: #fcfcfd; }
.ai-block .warnline { color: var(--amber); }

.toast {
  position: fixed; left: 50%; bottom: 40px; transform: translateX(-50%) translateY(16px);
  background: #1f2429; color: #fff; font-size: 13px; padding: 9px 18px; border-radius: 8px;
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 200; max-width: 80vw;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.err { background: var(--red); }

/* ================= 投放页布局 ================= */
.spacer { flex: 1; }

.run-cols { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 980px) { .run-cols { grid-template-columns: 1fr; } }

.sec-range { display: flex; align-items: center; gap: 6px; }
.sec-range input { width: 100%; }
.sec-range span { color: var(--faint); font-size: 12px; }

/* 速度档位：三选一卡片，靠左的慢、靠右的快 */
.speed-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
@media (max-width: 720px) { .speed-row { grid-template-columns: 1fr; } }
.speed-opt {
  position: relative; display: block; cursor: pointer;
  border: 1px solid var(--line); border-radius: 10px;
  padding: 10px 12px 10px 34px; background: var(--bg-2);
  transition: border-color 0.15s, background 0.15s;
}
.speed-opt:hover { border-color: var(--accent); }
.speed-opt input { position: absolute; left: 12px; top: 13px; margin: 0; }
.speed-opt > span { display: block; }
.speed-opt b { display: block; font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 3px; }
.speed-opt i { display: block; font-style: normal; font-size: 11.5px; line-height: 1.55; color: var(--faint); }
.speed-opt:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.speed-opt:has(input:checked) b { color: var(--accent); }

/* 导航角标 */
.nav-badge {
  display: inline-block; margin-left: 5px; padding: 0 6px;
  font-size: 10.5px; line-height: 15px; border-radius: 999px;
  background: var(--accent); color: #fff; font-variant-numeric: tabular-nums;
  vertical-align: 1px;
}
.nav-item.is-active .nav-badge { background: #fff; color: var(--accent); }

/* 状态胶囊 */
.status-pill {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11.5px; padding: 2px 9px; border-radius: 999px;
  background: #f0f1f3; color: var(--muted); white-space: nowrap;
}
.status-pill::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status-pill.running { background: var(--accent-soft); color: var(--accent); }
.status-pill.running::before { animation: pulse 1.4s ease-in-out infinite; }
.status-pill.finished { background: var(--blue-soft); color: var(--blue); }
.status-pill.stopped { background: var(--amber-soft); color: var(--amber); }
.status-pill.failed { background: var(--red-soft); color: var(--red); }
@keyframes pulse { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: .35; transform: scale(.8); } }

/* 大进度条 */
.prog { margin-bottom: 16px; }
.prog-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 6px; }
.prog-pct { font-size: 26px; font-weight: 500; line-height: 1; font-variant-numeric: tabular-nums; color: var(--accent); }
.prog-count { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.bar-lg { height: 10px; margin-bottom: 8px; }
.bar-fill { background: linear-gradient(90deg, var(--accent), #16a37f); }
.prog-sub { font-size: 12px; color: var(--faint); display: flex; gap: 16px; flex-wrap: wrap; }
.prog-sub b { font-weight: 500; color: var(--muted); font-variant-numeric: tabular-nums; }

/* 统计条 */
.stat-row { grid-template-columns: repeat(auto-fit, minmax(88px, 1fr)); }
.stat { border-left: 2px solid var(--line-2); padding-left: 9px; }
.stat .v { font-size: 17px; }
.stat.s-ok .v { color: var(--accent); }
.stat.s-bad .v { color: var(--red); }
.stat.s-warn .v { color: var(--amber); }

/* 失败原因聚合 */
.fail-box { margin: 4px 0 14px; padding: 10px 12px; border-radius: 10px; background: #fdf7f7; border: 1px solid #f3dcdc; }
.fail-title { font-size: 12px; color: var(--red); margin-bottom: 7px; }
.fail-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.fail-chip {
  display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px;
  background: #fff; border: 1px solid #f0dada; color: #8a3b3b;
  border-radius: 999px; padding: 2px 9px; max-width: 100%;
}
.fail-chip b { font-weight: 600; font-variant-numeric: tabular-nums; }
.fail-chip .txt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 320px; }

/* 明细表 */
.log-head { display: flex; align-items: baseline; justify-content: space-between; margin: 4px 0 8px; }
.log-head .sub { margin: 0; }
.log-wrap { max-height: 320px; overflow-y: auto; }
.tbl-log { font-size: 12px; }
.tbl-log thead th { position: sticky; top: 0; z-index: 1; }
.tbl-log td { padding: 6px 10px; }
.tbl-log .mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11.5px; color: var(--muted); }
.tbl-log .why { color: var(--muted); max-width: 380px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tbl-log tr.r-bad .why { color: var(--red); }

/* 任务卡片 */
.task-now { margin-bottom: 12px; }
.now-card { border: 1px solid var(--line-2); border-radius: 10px; padding: 11px 13px; background: #fbfcfc; }
.now-card.is-live { border-color: #cfe9e0; background: #f6fcf9; }
.now-title { font-size: 12.5px; margin-bottom: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.now-meta { font-size: 11.5px; color: var(--faint); display: flex; gap: 10px; flex-wrap: wrap; }
.now-empty { font-size: 12px; color: var(--faint); padding: 10px 0; }

.task-history { display: flex; flex-direction: column; gap: 7px; max-height: 300px; overflow-y: auto; }
.task-item {
  display: flex; align-items: center; gap: 10px;
  border: 1px solid var(--line-2); border-radius: 9px; padding: 8px 10px; cursor: pointer;
  transition: border-color .15s, background .15s;
}
.task-item:hover { border-color: #cdd3d8; background: #fcfcfd; }
.task-item.is-current { border-color: var(--accent); background: #f6fcf9; }
.task-item .ti-main { flex: 1; min-width: 0; }
.task-item .ti-t { font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task-item .ti-m { font-size: 11px; color: var(--faint); font-variant-numeric: tabular-nums; }
.task-item .ti-right { text-align: right; min-width: 54px; }
.task-item .ti-pct { font-size: 12.5px; font-weight: 500; font-variant-numeric: tabular-nums; }
.task-item .ti-bar { height: 3px; width: 48px; background: #eef0f2; border-radius: 999px; overflow: hidden; margin-top: 3px; margin-left: auto; }
.task-item .ti-bar i { display: block; height: 100%; background: var(--accent); }

/* 管理员：账号归属标记 */
.task-item .ti-owner {
  font-size: 10px; padding: 1px 5px; border-radius: 4px;
  background: #eef2f7; color: #4a5a6a; font-variant-numeric: tabular-nums;
  border: 1px solid #dfe6ee; white-space: nowrap;
}
.task-item .ti-owner.is-mine { background: var(--accent-soft, #eaf7f1); color: var(--accent, #1f7a54); border-color: #cfe9dd; }

/**
 * 任务行（.task-row）的归属标记：姓名 + 手机号
 *
 * 原来这条样式只写在 .task-item 下，而任务列表早就换成 .task-row 了，
 * 于是手机号一直是段无样式灰字，姓名压根没显示。这里补上，并用「姓名加粗深色、
 * 手机号浅色小字」做出主次——姓名是给人认的，手机号只是精确索引。
 */
.tr-meta .ti-owner {
  display: inline-flex; align-items: baseline; gap: 5px;
  padding: 1px 7px; border-radius: 5px;
  background: var(--line-2); border: 1px solid var(--line);
  white-space: nowrap;
}
.tr-meta .ti-owner .ti-name {
  font-weight: 600; font-size: 11.5px; color: var(--text);
  font-style: normal;
}
.tr-meta .ti-owner .ti-phone {
  font-size: 10.5px; color: var(--faint);
  font-variant-numeric: tabular-nums;
}
/* 自己发的任务：整块转主色，方便在长列表里一眼扫到 */
.tr-meta .ti-owner.is-mine {
  background: var(--accent-soft); border-color: var(--accent);
}
.tr-meta .ti-owner.is-mine .ti-name { color: var(--accent); }
.tr-meta .ti-owner.is-mine .ti-phone { color: var(--accent); opacity: .7; }
.tr-meta .ti-owner.is-mine::after {
  content: '我'; font-size: 9.5px; font-weight: 600;
  background: var(--accent); color: #fff;
  border-radius: 3px; padding: 0 3px; margin-left: 1px;
}

.admin-bar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: #f7f9fb; border: 1px solid var(--line-2); border-radius: 8px;
  padding: 7px 10px; margin-bottom: 10px; font-size: 12px;
}
.admin-chk { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; user-select: none; }
.admin-chk input { margin: 0; }

/* ================= 全局任务坞 ================= */
.dock {
  position: fixed; right: 20px; bottom: 20px; z-index: 90;
  width: 330px; background: #fff; border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 10px 34px rgba(20,24,28,.13);
  overflow: hidden; font-size: 12.5px;
}
.dock-head { display: flex; align-items: center; gap: 8px; padding: 9px 12px; background: #fbfcfc; border-bottom: 1px solid var(--line-2); cursor: pointer; }
.dock.is-collapsed .dock-head { border-bottom: 0; }
.dock-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); flex: 0 0 auto; }
.dock.is-done .dock-dot { background: var(--blue); }
.dock.is-bad .dock-dot { background: var(--amber); }
.dock.is-live .dock-dot { animation: pulse 1.4s ease-in-out infinite; }
.dock-name { flex: 1; font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dock-pct { font-variant-numeric: tabular-nums; color: var(--accent); font-weight: 500; }
.dock-min {
  border: 0; background: transparent; cursor: pointer; color: var(--faint);
  font-size: 15px; line-height: 1; padding: 0 2px; width: 18px; font-family: inherit;
}
.dock-min::before { content: '\2013'; }
.dock.is-collapsed .dock-min::before { content: '\002B'; }
.dock-body { padding: 10px 12px 11px; }
.dock.is-collapsed .dock-body { display: none; }
.dock-bar { height: 5px; background: #eef0f2; border-radius: 999px; overflow: hidden; margin-bottom: 9px; }
.dock-fill { height: 100%; background: var(--accent); transition: width .5s ease; }
.dock-nums { display: flex; gap: 12px; flex-wrap: wrap; font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; margin-bottom: 7px; }
.dock-nums b { font-weight: 500; color: var(--text); }
.dock-nums .k-ok b { color: var(--accent); }
.dock-nums .k-bad b { color: var(--red); }
.dock-lines { max-height: 88px; overflow: hidden; font-size: 11px; color: var(--faint); line-height: 1.75; margin-bottom: 10px; }
.dock-lines div { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dock-lines .ok { color: var(--accent); }
.dock-lines .bad { color: var(--red); }
.dock-foot { display: flex; gap: 8px; }
.dock-foot .btn { flex: 1; justify-content: center; text-align: center; }

@media (max-width: 720px) {
  .dock { left: 12px; right: 12px; bottom: 12px; width: auto; }
  .prog-pct { font-size: 22px; }
}

.now-card.is-clickable { cursor: pointer; transition: border-color .15s, background .15s; }
.now-card.is-clickable:hover { border-color: var(--accent); background: #f2faf6; }
.hist-title { font-size: 11.5px; color: var(--faint); margin: 2px 0 2px; }

/* ================= v1.2 新增 ================= */
.btn-lg { padding: 10px 26px; font-size: 14px; }

/* 经验预设 */
.preset-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line); }
.preset-label { font-size: 12px; color: var(--faint); }
.preset {
  font-family: inherit; cursor: pointer; text-align: left;
  border: 1px solid var(--line); background: #fff; border-radius: 9px;
  padding: 6px 11px; font-size: 12.5px; color: var(--text);
  display: flex; flex-direction: column; gap: 1px; line-height: 1.35;
  transition: border-color .15s, background .15s;
}
.preset:hover { border-color: var(--accent); background: #f6fcf9; }
.preset span { font-size: 10.5px; color: var(--faint); font-variant-numeric: tabular-nums; }

/* 方法学要点 */
.tip-card { background: #fcfdfd; }
.tip-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; }
.tip { border: 1px solid var(--line-2); border-radius: 10px; padding: 12px 14px; background: #fff; }
.tip-h { font-size: 12.5px; font-weight: 500; color: var(--accent); margin-bottom: 6px; }
.tip p { margin: 0 0 8px; font-size: 12.5px; color: var(--muted); line-height: 1.75; }
.tip p:last-child { margin-bottom: 0; }
.tip b { color: var(--text); font-weight: 500; }
.tip code { background: #f4f5f6; padding: 1px 5px; border-radius: 4px; font-size: 11.5px; }
.tip-act { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.tip-tbl { width: 100%; border-collapse: collapse; font-size: 12px; margin-bottom: 8px; }
.tip-tbl th, .tip-tbl td { padding: 4px 6px; text-align: left; border-bottom: 1px solid var(--line-2); color: var(--muted); }
.tip-tbl th { color: var(--faint); font-weight: 400; font-size: 11px; }
.tip-tbl td:first-child { font-variant-numeric: tabular-nums; color: var(--text); }

/* 任务列表 */
.task-list { display: flex; flex-direction: column; gap: 10px; }
.task-row {
  display: flex; align-items: center; gap: 16px;
  border: 1px solid var(--line-2); border-left: 4px solid var(--accent);
  border-radius: 11px; padding: 12px 14px;
  cursor: pointer; transition: border-color .15s, background .15s;
}
.task-row:hover { border-color: var(--line-2); border-left-color: var(--accent); background: var(--bg-2); }
.task-row.is-current { border-color: var(--accent); border-left-color: var(--accent); background: var(--accent-soft); }
/* 组别徽章：原始任务绿、续投琥珀，一眼分主次 */
.task-seq { font-size: 11px; border-radius: 5px; padding: 1px 7px; white-space: nowrap; font-weight: 500; }
.task-seq.is-original { color: var(--accent); background: var(--accent-soft); }
.task-seq.is-follow { color: var(--amber); background: var(--amber-soft); }
/* 续投折叠区：左侧虚线引导 + 可点击提示条 */
.task-fold { margin: 2px 0 4px 18px; padding-left: 14px; border-left: 2px dashed var(--line-2); }
.task-fold > summary {
  cursor: pointer; display: inline-block; list-style: none;
  font-size: 11.5px; color: var(--amber); background: var(--amber-soft);
  border-radius: 6px; padding: 4px 10px; margin: 3px 0;
}
.task-fold > summary::-webkit-details-marker { display: none; }
.task-fold > summary::before { content: '▸ '; }
.task-fold[open] > summary::before { content: '▾ '; }
/* 续投行：琥珀左边框 + 琥珀浅底，视觉上归属原任务的附属条目 */
.task-fold .task-row {
  background: var(--amber-soft); border: 1px solid var(--line-2); border-left: 4px solid var(--amber);
  padding: 8px 12px; gap: 12px; margin: 5px 0;
}
.task-fold .task-row:hover { background: var(--amber-soft); border-color: var(--amber); border-left-color: var(--amber); }
.task-fold .task-row.is-current { background: var(--accent-soft); border-color: var(--accent); border-left-color: var(--accent); }
.task-fold .tr-title { font-size: 12.5px; }
.task-fold .tr-nums b { font-size: 14px; }
.tr-main { flex: 1; min-width: 0; }
.tr-title { font-size: 13px; display: flex; align-items: center; gap: 7px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tr-meta { font-size: 11.5px; color: var(--faint); display: flex; gap: 12px; flex-wrap: wrap; margin: 3px 0 7px; }
.tr-reason { color: var(--amber); }
.tr-bar { height: 4px; background: #eef0f2; border-radius: 999px; overflow: hidden; }
.tr-bar i { display: block; height: 100%; background: var(--accent); transition: width .4s; }
.tr-nums { display: flex; gap: 18px; }
.tr-nums div { text-align: right; }
.tr-nums b { display: block; font-size: 16px; font-weight: 500; font-variant-numeric: tabular-nums; line-height: 1.25; }
.tr-nums span { font-size: 10.5px; color: var(--faint); }
.tr-nums .ok b { color: var(--accent); }
.tr-nums .bad b { color: var(--red); }
.tr-acts { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; min-width: 190px; }
@media (max-width: 900px) {
  .task-row { flex-wrap: wrap; }
  .tr-acts { min-width: 0; width: 100%; justify-content: flex-start; }
}

/* 分析选择 */
.analysis-picker { display: flex; flex-direction: column; gap: 14px; }
.ap-group { border: 1px solid var(--line-2); border-radius: 10px; overflow: hidden; }
.ap-g-title { font-size: 11.5px; color: var(--muted); background: #fafbfb; padding: 6px 12px; border-bottom: 1px solid var(--line-2); }
.ap-items { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 0; }
.ap-item { display: flex; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--line-2); cursor: pointer; align-items: flex-start; }
.ap-item:hover { background: #fcfdfd; }
.ap-item input { margin-top: 2px; flex: 0 0 auto; }
.ap-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ap-name { font-size: 12.5px; }
.ap-desc { font-size: 11.5px; color: var(--faint); line-height: 1.6; }
.ap-paths { font-size: 10.5px; color: var(--faint); line-height: 1.7; margin-top: 2px; }
.ap-paths b { color: var(--muted); font-weight: 500; }
.analysis-opts { display: flex; flex-wrap: wrap; gap: 12px 18px; margin-top: 12px; }
.analysis-opts .inline-field select { width: 190px; }

/* 图表 */
.chart { width: 100%; max-width: 660px; height: auto; display: block; margin: 6px 0 2px; }
.res-card .chart { margin-left: 0; }
.chart.chart-fit { margin: 6px auto 2px; }
.freq-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 12px; margin-top: 12px; }
.freq-block { border: 1px solid var(--line-2); border-radius: 8px; padding: 8px 10px; }
.freq-title { font-size: 11.5px; color: var(--muted); margin-bottom: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tbl.mini { font-size: 11.5px; }
.tbl.mini td { padding: 4px 6px; border-bottom: 1px dotted var(--line-2); }

/* 生成过程 */
.trace { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line-2); }
.trace-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 8px; }
.trace-head .sub { margin: 0; }
.trace-flow { display: flex; flex-wrap: wrap; gap: 6px; }
.trace-flow span { font-size: 11.5px; color: var(--muted); background: #f6f8f8; border: 1px solid var(--line-2); border-radius: 999px; padding: 3px 10px; }
.tr-hit { background: #f3faf7; }
.compliance p strong { color: var(--red); font-weight: 500; }
.chart text { font-family: inherit; }

html { scroll-padding-top: 72px; }
.dist-note { font-size: 11.5px; color: var(--amber); margin-top: 8px; line-height: 1.7; }

/* 协议级降级原因（显示在通道标签下） */
.tr-proto { font-size: 10px; color: var(--muted); margin-top: 3px; max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 品赞配置三步引导 + 授权方式说明 */
.iz-steps { display: grid; gap: 6px; margin: 2px 0 14px; padding: 10px 12px; background: #fafbfb; border: 1px solid var(--line-2); border-radius: 8px; }
.iz-step { display: flex; gap: 9px; align-items: flex-start; font-size: 12px; color: var(--muted); line-height: 1.65; }
.iz-step b { flex: 0 0 16px; height: 16px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 10.5px; font-weight: 500; display: flex; align-items: center; justify-content: center; margin-top: 1px; }
.iz-step em { font-style: normal; color: var(--fg); }
.iz-step code { background: #fff; border: 1px solid var(--line-2); border-radius: 4px; padding: 0 4px; font-size: 11px; color: var(--accent); }
.iz-mode-hint { font-size: 12px; line-height: 1.75; padding: 9px 12px; border-radius: 8px; margin: 10px 0 12px; }
.iz-mode-hint.is-pw { background: #f0f7f4; border: 1px solid #cfe6dc; color: #1c5c49; }
.iz-mode-hint.is-wl { background: #fdf6e9; border: 1px solid #f0e0c2; color: #7a5210; }
.iz-mode-hint b { font-weight: 600; }

/* 出口 IP 下方的归属地 */
.tr-area { font-size: 10.5px; color: var(--muted); margin-top: 2px; letter-spacing: .2px; }
td.mono .tr-area { font-family: inherit; }

/* 分析结果的文字解读 */
.res-text {
  font-size: 13px;
  line-height: 1.95;
  color: var(--fg);
  margin: 10px 0 14px;
  padding: 12px 15px;
  background: #f7fbf9;
  border-left: 3px solid var(--accent);
  border-radius: 0 8px 8px 0;
  text-align: justify;
}
.res-summary .res-text { background: #f2f9f6; border-left-width: 4px; font-size: 13.5px; }
.res-summary .card-head .btn { margin-left: 8px; }

/* ---------- 登录 / 注册 ---------- */
.auth-mask {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(160deg, #eef2f0 0%, #f5f6f7 45%, #eaf0ee 100%);
  padding: 20px;
  overflow-y: auto;
}
.auth-mask.is-hidden { display: none; }

.auth-box {
  width: 100%; max-width: 400px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 28px 26px 22px;
  box-shadow: 0 12px 40px rgba(15, 30, 24, .08);
}

.auth-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.auth-title { font-size: 17px; font-weight: 600; letter-spacing: .3px; }
.auth-sub { font-size: 12px; color: var(--muted); margin-top: 1px; }

.auth-tabs {
  display: flex; gap: 4px; padding: 3px;
  background: var(--line-2); border-radius: 9px; margin-bottom: 18px;
}
.auth-tab {
  flex: 1; height: 34px; border: 0; background: transparent; cursor: pointer;
  font-size: 13px; color: var(--muted); border-radius: 7px;
  font-family: inherit; transition: all .15s;
}
.auth-tab.is-active { background: #fff; color: var(--text); font-weight: 600; box-shadow: 0 1px 3px rgba(0,0,0,.07); }

.auth-form { display: block; }
.auth-form.is-hidden { display: none; }
.auth-form .field { margin-bottom: 12px; }
.auth-form .field > span { font-size: 12px; color: var(--muted); }
.auth-form input { height: 40px; }

.auth-submit { width: 100%; height: 42px; margin-top: 6px; font-size: 14px; }

.auth-error {
  font-size: 12px; color: var(--red);
  background: var(--red-soft); border: 1px solid #f3d5d5;
  border-radius: 7px; padding: 7px 10px; margin-bottom: 10px;
}
.auth-error.is-hidden { display: none; }

.auth-foot { font-size: 12px; color: var(--faint); margin-top: 14px; text-align: center; line-height: 1.7; }

.user-chip {
  font-size: 12px; color: var(--muted);
  padding: 0 10px; height: 30px; display: inline-flex; align-items: center;
  background: var(--line-2); border-radius: 15px; white-space: nowrap;
}
.user-chip:empty { display: none; }

/* ---------- 本机公网 IP 条 ---------- */
.iz-ip-bar {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin-top: 10px; padding: 9px 12px;
  background: #f7f9f8; border: 1px solid var(--line-2); border-radius: 8px;
}
.iz-ip-label { font-size: 12px; color: var(--muted); }
#egressValue { font-size: 13px; font-weight: 600; color: var(--text); letter-spacing: .3px; }
.btn-xs { height: 26px !important; font-size: 12px !important; padding: 0 10px !important; }

/* 登录框聚焦态统一跟随主题色，避免浏览器默认黑框 */
.auth-form input:focus,
.auth-form input:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(15, 110, 86, .12);
}

/* ---------- 配置页精简：折叠区 ---------- */
.mini-more {
  margin-top: 10px; border-top: 1px dashed var(--line);
  padding-top: 8px;
}
.mini-more > summary {
  cursor: pointer; font-size: 12px; color: var(--muted);
  list-style: none; padding: 3px 0; user-select: none;
}
.mini-more > summary::-webkit-details-marker { display: none; }
.mini-more > summary::before { content: "＋ "; color: var(--faint); }
.mini-more[open] > summary::before { content: "－ "; }
.mini-more > summary:hover { color: var(--accent); }

.adv-box {
  margin-top: 10px; padding: 12px;
  background: #fafbfa; border: 1px solid var(--line-2); border-radius: 9px;
}

/* 方法学要点整卡折叠 */
details.tip-card { padding: 0; }
details.tip-card > .tip-summary {
  cursor: pointer; list-style: none; user-select: none;
  display: flex; align-items: baseline; gap: 10px;
  padding: 16px 20px;
}
details.tip-card > .tip-summary::-webkit-details-marker { display: none; }
.tip-sum-title { font-size: 14px; font-weight: 500; }
details.tip-card > .tip-summary::after {
  content: "展开"; margin-left: auto; font-size: 12px; color: var(--accent);
}
details.tip-card[open] > .tip-summary::after { content: "收起"; }
details.tip-card > #tipsBody { padding: 0 20px 20px; }

.btn.is-active { background: var(--accent-soft); color: var(--accent); }

/* ---------- AI 规划结果 ---------- */
.plan-box { margin-top: 14px; }
.plan-sec { margin-bottom: 16px; }
.plan-sec-h {
  font-size: 12px; font-weight: 600; color: var(--text);
  margin-bottom: 8px; display: flex; align-items: baseline; gap: 8px;
}

/* 构念卡 */
.con-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.con-card {
  border: 1px solid var(--line); border-radius: 9px; padding: 9px 11px;
  background: #fcfdfc;
}
.con-head { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; }
.con-idx {
  width: 17px; height: 17px; border-radius: 4px; flex: none;
  background: var(--accent-soft); color: var(--accent);
  font-size: 11px; display: grid; place-items: center; font-weight: 600;
}
.con-name { font-size: 13px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.con-n { font-size: 11px; color: var(--faint); margin-left: auto; flex: none; }
.con-items { display: flex; flex-wrap: wrap; gap: 4px; }
.chip-q {
  font-size: 11px; padding: 1px 6px; border-radius: 4px;
  background: var(--line-2); color: var(--muted); font-family: ui-monospace, monospace;
}

/* 相关列表 */
.corr-list { display: flex; flex-direction: column; gap: 4px; }
.corr-line {
  display: flex; align-items: center; gap: 10px;
  font-size: 12px; padding: 6px 10px; border-radius: 7px;
  background: #fafbfa; border: 1px solid var(--line-2);
}
.corr-line > span:first-child { flex: 1; color: var(--text); }
.corr-line > b { font-family: ui-monospace, monospace; font-weight: 600; }
.corr-line.pos > b { color: var(--accent); }
.corr-line.neg > b { color: var(--red); }
.corr-word { font-size: 11px; color: var(--faint); flex: none; }
.corr-line.out { background: var(--blue-soft); border-color: #d3e4f5; }

/* 选项占比表 */
.tbl-plan td { vertical-align: middle; }
.tbl-plan .q-title { color: var(--muted); font-size: 12px; }
.opt-cell { font-size: 11px; line-height: 1.9; }
.opt-p {
  display: inline-block; margin-right: 6px; color: var(--faint);
  white-space: nowrap;
}
.opt-p > b { color: var(--text); font-weight: 600; margin-left: 2px; }

/* 形状小柱图 */
.wb { display: inline-flex; align-items: flex-end; gap: 2px; height: 36px; }
.wb-col {
  width: 9px; border-radius: 2px 2px 0 0;
  background: #cfd8d4;
}
.wb-col.is-peak { background: var(--accent); }
.wb-pct {
  font-size: 10px; color: var(--faint); margin-left: 6px;
  font-family: ui-monospace, monospace; vertical-align: middle;
}

.plan-notes { margin: 0; padding-left: 18px; font-size: 12px; color: var(--muted); line-height: 1.9; }

.plan-analysis {
  font-size: 13px; line-height: 1.85; color: var(--text);
  background: #f8fbf9; border-left: 3px solid var(--accent);
  border-radius: 0 8px 8px 0; padding: 12px 14px;
}

/* 追问 */
.ask-row { display: flex; gap: 8px; }
.ask-row > input { flex: 1; height: 36px; }
.ask-tips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.ask-tip {
  border: 1px solid var(--line); background: #fff; cursor: pointer;
  font-size: 11px; color: var(--muted); padding: 4px 9px; border-radius: 12px;
  font-family: inherit; transition: all .15s;
  max-width: 100%; line-height: 1.5; text-align: left;
}
.ask-tip:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }

.plan-foot {
  display: flex; align-items: center; gap: 10px;
  padding-top: 12px; border-top: 1px solid var(--line-2);
}

/* 规划说明折叠 */
.plan-more {
  margin-bottom: 14px; border-top: 1px dashed var(--line); padding-top: 10px;
}
.plan-more > summary {
  cursor: pointer; list-style: none; user-select: none;
  font-size: 12px; color: var(--muted); padding: 2px 0;
}
.plan-more > summary::-webkit-details-marker { display: none; }
.plan-more > summary::before { content: "＋ "; color: var(--faint); }
.plan-more[open] > summary::before { content: "－ "; }
.plan-more > summary:hover { color: var(--accent); }
.plan-more .plan-notes { margin-top: 8px; }

.tbl-plan .bar-cell { text-align: right; padding-right: 14px; }
.tbl-plan .opt-cell { white-space: normal; }

/* 规划表：题干单行省略，避免长题干折三行把表格撑高 */
.tbl-plan .q-title {
  max-width: 132px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.tbl-plan td { padding-top: 7px; padding-bottom: 7px; }

/* ================= ⑤ 管理台 ================= */
#tab-admin .kpi-row { grid-template-columns: repeat(5, 1fr); }
@media (max-width: 1100px) {
  #tab-admin .kpi-row { grid-template-columns: repeat(3, 1fr); }
}

.admin-table-wrap { overflow-x: auto; }
.admin-table {
  width: 100%; border-collapse: collapse; font-size: 12.5px;
  font-variant-numeric: tabular-nums;
}
.admin-table th {
  text-align: left; font-weight: 500; color: var(--faint); font-size: 11.5px;
  padding: 0 10px 8px; border-bottom: 1px solid var(--line-2); white-space: nowrap;
}
.admin-table th.num, .admin-table td.num { text-align: right; }
.admin-table td {
  padding: 9px 10px; border-bottom: 1px solid var(--line-1, #f0f2f4); vertical-align: middle;
}
.admin-table tbody tr:hover { background: #fbfcfd; }
.admin-table tbody tr:last-child td { border-bottom: none; }

.admin-table .acc-phone { font-weight: 500; }
.admin-table .acc-nick { color: var(--faint); font-size: 11px; margin-left: 6px; }
.admin-table .role-tag {
  font-size: 10px; padding: 1px 6px; border-radius: 4px;
  background: var(--accent-soft, #eaf7f1); color: var(--accent, #1f7a54);
  border: 1px solid #cfe9dd;
}
.admin-table .role-tag.is-user { background: #f2f4f6; color: #77828c; border-color: #e6e9ec; }
.admin-table .cost-cell { font-weight: 500; }
.admin-table .cost-cell.is-zero { color: var(--faint); font-weight: 400; }
.admin-table .tok-detail { font-size: 10.5px; color: var(--faint); margin-top: 2px; }
.admin-table .row-act { white-space: nowrap; }
.admin-table .row-act .btn { padding: 3px 8px; font-size: 11px; }

/* 省 / 市 两级下拉并排 */
.area-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.area-pair select { min-width: 0; }

/* IP 时长档位上的推荐标记 */
#izMinute option[data-best="1"] { font-weight: 600; }


/* ================= 继续收集弹窗 ================= */
.ext-card { max-width: 660px; }
.ext-head-txt h2 { margin: 0; font-size: 15px; font-weight: 600; }
.ext-head-txt p { margin: 2px 0 0; font-size: 12px; color: var(--muted); }

/* 现状条 */
.ext-src {
  border: 1px solid var(--line); border-radius: 10px;
  background: var(--bg-2); padding: 12px 14px; margin-bottom: 16px;
}
.ext-src-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.ext-src-name { font-size: 13px; font-weight: 600; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ext-src-rate { font-size: 12px; font-variant-numeric: tabular-nums; color: var(--muted); flex: none; }
.ext-src-bar { height: 4px; border-radius: 999px; background: #e3e6e9; overflow: hidden; margin: 8px 0 6px; }
.ext-src-bar > i { display: block; height: 100%; width: 0; background: var(--accent); border-radius: 999px; transition: width .3s; }
.ext-src-bar > i.is-warn { background: #c98a2a; }
.ext-src-bar > i.is-bad { background: var(--red); }
.ext-src-meta { font-size: 12px; color: var(--muted); line-height: 1.6; }

/* 两列布局 */
.ext-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 620px) { .ext-cols { grid-template-columns: 1fr; } }

.ext-sec { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px 14px; background: #fff; }
.ext-sec > h3 {
  margin: 0 0 10px; font-size: 12px; font-weight: 600; color: var(--text);
  display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap;
}
.ext-sec > h3 .hint { font-weight: 400; font-size: 11.5px; }

/* 份数步进 */
.ext-qty { display: flex; align-items: stretch; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; }
.ext-qty input {
  flex: 1; min-width: 0; border: 0; text-align: center; font-size: 16px; font-weight: 600;
  padding: 8px 4px; color: var(--text); background: #fff; font-variant-numeric: tabular-nums;
  -moz-appearance: textfield;
}
.ext-qty input::-webkit-outer-spin-button,
.ext-qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.ext-qty input:focus { outline: none; background: var(--accent-soft); }
.qty-btn {
  width: 36px; border: 0; background: var(--bg-2); color: var(--text);
  font-size: 16px; cursor: pointer; line-height: 1;
}
.qty-btn:hover { background: #e8ecee; }
.qty-btn:active { background: #dde2e5; }

.ext-chips { display: flex; gap: 6px; margin-top: 8px; }
.ext-chips button {
  flex: 1; border: 1px solid var(--line); background: #fff; color: var(--muted);
  font-size: 11.5px; padding: 4px 0; border-radius: 7px; cursor: pointer;
  font-variant-numeric: tabular-nums; transition: all .12s;
}
.ext-chips button:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }

.ext-after { margin-top: 10px; font-size: 12px; color: var(--muted); }
.ext-after b { font-size: 15px; color: var(--text); font-variant-numeric: tabular-nums; margin: 0 2px; }
.ext-after b.is-over { color: var(--amber); }

/* 速度：竖排紧凑卡 */
.speed-row.speed-col { display: flex; flex-direction: column; gap: 6px; }
.speed-col .speed-opt { padding: 7px 10px 7px 30px; }
.speed-col .speed-opt input { top: 9px; left: 10px; }
.speed-col .speed-opt b { display: inline; font-size: 12.5px; margin-right: 6px; }
.speed-col .speed-opt i { display: inline; font-size: 11px; }

.ext-eta { margin: 10px 0 0; font-size: 12px; color: var(--muted); line-height: 1.6; }
.ext-eta b { color: var(--text); }

/* 目标三连 */
.ext-targets { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
@media (max-width: 620px) { .ext-targets { grid-template-columns: 1fr; } }
.ext-tg { display: flex; flex-direction: column; gap: 4px; }
.ext-tg > span { font-size: 11.5px; color: var(--muted); }
.ext-tg > input {
  border: 1px solid var(--line); border-radius: 8px; padding: 7px 9px;
  font-size: 13px; color: var(--text); background: #fff; font-variant-numeric: tabular-nums;
}
.ext-tg > input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.ext-tg > em {
  font-style: normal; font-size: 11px; color: var(--faint); font-variant-numeric: tabular-nums;
}
.ext-tg > em.is-ok { color: var(--accent); }
.ext-tg > em.is-bad { color: var(--red); }

/* 提示条 */
.ext-hint {
  margin-top: 14px; padding: 9px 12px; border-radius: 8px;
  background: var(--blue-soft); color: var(--blue); font-size: 12px; line-height: 1.6;
}
.ext-hint.is-error { background: var(--red-soft); color: var(--red); }

.modal-foot .spacer { flex: 1; }

/* 开关行（严格锁定城市） */
.switch-row {
  display: flex; gap: 10px; align-items: flex-start; cursor: pointer;
  margin-top: 12px; padding: 10px 12px; border: 1px solid var(--line);
  border-radius: 10px; background: var(--bg-2);
}
.switch-row input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch-box {
  flex: none; width: 34px; height: 20px; border-radius: 999px; background: #cfd4d8;
  position: relative; transition: background .18s; margin-top: 1px;
}
.switch-box::after {
  content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px;
  border-radius: 50%; background: #fff; transition: transform .18s;
  box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
.switch-row input:checked + .switch-box { background: var(--accent); }
.switch-row input:checked + .switch-box::after { transform: translateX(14px); }
.switch-row input:focus-visible + .switch-box { box-shadow: 0 0 0 3px var(--accent-soft); }
.switch-txt { min-width: 0; }
.switch-txt b { display: block; font-size: 12.5px; font-weight: 600; color: var(--text); }
.switch-txt i { display: block; font-style: normal; font-size: 11.5px; color: var(--muted); line-height: 1.6; margin-top: 2px; }

/* 检验结果里的地区结论条 */
.chk-area {
  display: flex; gap: 8px; align-items: flex-start; flex-wrap: wrap;
  margin: 8px 0 4px; padding: 8px 10px; border-radius: 8px;
  font-size: 12px; line-height: 1.6;
}
.chk-area b { flex: none; }
.chk-area span { color: inherit; opacity: .92; }
.chk-area.is-ok { background: var(--accent-soft); color: var(--accent); }
.chk-area.is-bad { background: var(--red-soft); color: var(--red); }

/* 弹窗左侧说明：把留白填成有用的提示 */
.ext-tip {
  margin: 10px 0 0; padding-top: 9px; border-top: 1px dashed var(--line);
  font-size: 11.5px; line-height: 1.65; color: var(--faint);
}

/* 开关上的小标签（默认关 · 费 IP） */
.switch-tag {
  display: inline-block; font-style: normal; font-size: 10.5px; font-weight: 500;
  color: var(--amber); background: var(--amber-soft); border-radius: 4px;
  padding: 1px 5px; margin-left: 6px; vertical-align: 1px;
}
.switch-txt i b { font-weight: 600; color: var(--text); }

/* 开关说明里的成本提示：单独成行，别和正文挤在一起换行显得零碎 */
.switch-txt i .sw-cost { display: block; margin-top: 4px; color: var(--amber); }

/* ================= 品赞地区探测 ================= */
.probe-box {
  margin-top: 12px; padding: 11px 13px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--bg-2);
}
.probe-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.probe-title { min-width: 0; }
.probe-title b { font-size: 12.5px; font-weight: 600; color: var(--text); margin-right: 6px; }
.probe-title .hint { font-size: 11.5px; }
.probe-cost { margin: 7px 0 0; font-size: 11.5px; line-height: 1.65; color: var(--muted); }
.probe-cost b { color: var(--text); font-variant-numeric: tabular-nums; }

/* 弹窗 */
.probe-card { max-width: 720px; }
.probe-hd h2 { margin: 0; font-size: 15px; font-weight: 600; }
.probe-hd p { margin: 2px 0 0; font-size: 12px; color: var(--muted); }

.probe-est {
  border: 1px solid var(--line); border-radius: 10px; background: #fff;
  padding: 4px 14px; margin-bottom: 12px;
}
.probe-est-row {
  display: flex; align-items: baseline; justify-content: space-between;
  padding: 8px 0; font-size: 12.5px; border-bottom: 1px dashed var(--line);
}
.probe-est-row:last-child { border-bottom: 0; }
.probe-est-row span { color: var(--muted); }
.probe-est-row b { font-variant-numeric: tabular-nums; color: var(--text); }
.probe-est-row b.is-money { color: var(--amber); font-size: 15px; }

.probe-note { margin: 0; font-size: 11.5px; line-height: 1.75; color: var(--muted); }
.probe-note b { color: var(--text); }
.probe-warn { display: none; }
.probe-warn.is-on {
  display: block; margin-top: 10px; padding: 8px 11px; border-radius: 8px;
  background: var(--amber-soft); color: var(--amber); font-size: 11.5px; line-height: 1.65;
}

/* 进度 */
.probe-progress { height: 5px; border-radius: 999px; background: #e3e6e9; overflow: hidden; }
.probe-progress > i {
  display: block; height: 100%; width: 0; border-radius: 999px;
  background: var(--accent); transition: width .35s ease;
}
.probe-meta {
  margin: 8px 0 0; font-size: 11.5px; color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.probe-sum {
  margin-top: 12px; padding: 10px 12px; border-radius: 9px;
  font-size: 12px; line-height: 1.7;
}
.probe-sum.is-good { background: var(--accent-soft); color: var(--accent); }
.probe-sum.is-partial { background: var(--amber-soft); color: var(--amber); }
.probe-sum.is-locked,
.probe-sum.is-weak,
.probe-sum.is-none { background: var(--red-soft); color: var(--red); }

/* 结果表 */
.probe-table-wrap {
  margin-top: 12px; border: 1px solid var(--line); border-radius: 10px;
  overflow: auto; max-height: 340px; background: #fff;
}
.probe-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.probe-table th {
  position: sticky; top: 0; z-index: 1;
  text-align: left; font-weight: 500; font-size: 11px; color: var(--faint);
  padding: 8px 10px; background: var(--bg-2); border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.probe-table td {
  padding: 7px 10px; border-bottom: 1px solid #eef1f3;
  color: var(--text); font-variant-numeric: tabular-nums; vertical-align: middle;
}
.probe-table tr:last-child td { border-bottom: 0; }
.probe-table td:nth-child(2),
.probe-table td:nth-child(3) { color: var(--muted); width: 52px; }

.probe-lb { font-weight: 500; white-space: nowrap; }
.probe-lv {
  font-style: normal; font-size: 10px; color: var(--faint);
  border: 1px solid var(--line); border-radius: 3px; padding: 0 3px; margin-left: 5px;
}
.probe-rate { width: 88px; font-weight: 600; }
.probe-table tr.is-good .probe-rate { color: var(--accent); }
.probe-table tr.is-mid .probe-rate { color: var(--amber); }
.probe-table tr.is-bad .probe-rate { color: var(--red); }
.probe-table tr.is-na .probe-rate { color: var(--faint); font-weight: 400; }
.probe-table tr.is-good td:first-child { box-shadow: inset 3px 0 0 var(--accent); }
.probe-table tr.is-mid td:first-child { box-shadow: inset 3px 0 0 var(--amber); }
.probe-table tr.is-bad td:first-child { box-shadow: inset 3px 0 0 var(--red); }
.probe-table tr.is-na td:first-child { box-shadow: inset 3px 0 0 #d7dcdf; }

.probe-top { color: var(--muted); font-size: 11.5px; }
.probe-unk { display: block; font-style: normal; font-size: 10.5px; color: var(--faint); margin-top: 1px; }
.probe-err { color: var(--red); }
.probe-na { font-style: normal; color: var(--faint); }
.probe-empty { text-align: center; color: var(--faint); padding: 22px 0 !important; }

.probe-pick {
  margin-left: 8px; border: 1px solid var(--accent); background: #fff; color: var(--accent);
  font-size: 10.5px; padding: 1px 7px; border-radius: 5px; cursor: pointer; white-space: nowrap;
}
.probe-pick:hover { background: var(--accent); color: #fff; }

.probe-spent { font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }

/* 上次探测结果回显 */
.probe-cache { display: none; }
.probe-cache.is-good,
.probe-cache.is-mid,
.probe-cache.is-bad {
  display: block; margin: 6px 0 0; padding: 6px 9px; border-radius: 7px;
  font-size: 11.5px; line-height: 1.6;
}
.probe-cache.is-good { background: var(--accent-soft); color: var(--accent); }
.probe-cache.is-mid { background: var(--amber-soft); color: var(--amber); }
.probe-cache.is-bad { background: var(--red-soft); color: var(--red); }
.probe-cache b { font-variant-numeric: tabular-nums; }

/* ================= 手机端（≤720px）布局收口 ================= */
@media (max-width: 720px) {
  .main { padding: 16px 12px 52px; }
  .card { padding: 14px; }

  /**
   * 表格在窄屏的可读性
   *
   * .tbl 是 width:100% + 自动列宽。390px 屏上「题项」那一列会被压到 1 个字宽，
   * 长题目逐字断行，一整张表变成竖排文字墙（实测截图里就是这样）。
   * 给第一列一个下限宽度，让表格自己撑开，由外层 .table-wrap 横向滚动：
   * 代价是要左右滑，但至少每一行读得懂。
   */
  .table-wrap .tbl th:first-child,
  .table-wrap .tbl td:first-child { min-width: 170px; }
  /* 明细表列多且每列都有用，整体给个下限，避免每列都被压成一条 */
  .table-wrap.log-wrap .tbl { min-width: 660px; }
  .table-wrap { -webkit-overflow-scrolling: touch; }

  /* 统计块在手机上两列就够，三列会把数字挤到换行 */
  .stat-row { gap: 8px; }
  .kpi-row { gap: 8px; }
}

/* 窄屏顶栏：把抢空间的次要信息收掉，避免「退出」被挤到第三行 */
@media (max-width: 620px) {
  .brand-sub { display: none; }
  .user-chip { display: none; }
  .proj-name { max-width: 30vw; }
  .topbar-right .btn { padding: 5px 9px; font-size: 12px; }
  .topbar-inner { gap: 8px 10px; }
}

/* 任务卡片在窄屏：标题允许换行，别截成「幼儿园教」 */
@media (max-width: 720px) {
  .tr-title {
    display: block;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    line-height: 1.55;
  }
  .tr-title .status-pill { margin-right: 5px; }
  .tr-nums { gap: 12px; }
  .tr-acts { gap: 6px; }
  .tr-acts .btn { padding: 6px 10px; font-size: 12px; }
}

/* 任务卡片在手机端改成上下结构：标题/统计/按钮各占一行，不再互相挤 */
@media (max-width: 720px) {
  .task-row { flex-direction: column; align-items: stretch; gap: 8px; }
  .tr-nums { justify-content: space-between; gap: 4px; }
  .tr-nums div { text-align: left; flex: 1; }
  .tr-nums b { font-size: 17px; }
  .tr-acts { width: 100%; }
  .tr-meta { gap: 8px; }
}

/* ---------- 大模型多路配置 ---------- */
.llm-bar {
  display: flex; align-items: flex-end; gap: 16px;
  flex-wrap: wrap; margin-bottom: 6px;
}
.llm-bar .field { flex: 1 1 220px; margin: 0; }
.llm-switch {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 13px; color: var(--text); cursor: pointer;
  padding-bottom: 9px; user-select: none;
}
.llm-switch input { width: 15px; height: 15px; margin: 0; accent-color: var(--accent); }

.llm-slot {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 13px;
  margin-top: 10px;
  background: var(--card);
}
.llm-slot[open] { background: #fcfdfd; }
.llm-slot > summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--text);
}
.llm-slot > summary::-webkit-details-marker { display: none; }
.llm-slot > summary::before {
  content: "▸"; color: var(--faint); font-size: 11px; transition: transform .15s;
}
.llm-slot[open] > summary::before { transform: rotate(90deg); }
.llm-slot > summary b { font-weight: 600; }
.llm-tag {
  font-size: 11px; color: var(--faint);
  border: 1px solid var(--line); border-radius: 20px;
  padding: 0 7px; line-height: 17px;
}
.llm-tag.on { color: var(--accent); border-color: #bfe3d7; background: var(--accent-soft); }
.llm-slot .grid-2 { margin-top: 10px; }
.llm-slot .field { margin-bottom: 8px; }
.llm-slot-foot {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; margin-top: 2px;
}
.llm-slot-foot .llm-switch { padding-bottom: 0; }
.llm-slot-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; margin-bottom: 9px;
}
.llm-slot-head b { font-size: 13px; font-weight: 600; }
.llm-slot-title {
  margin: 16px 0 2px; font-size: 13px; font-weight: 600; color: var(--text);
}
.llm-slot-title em {
  display: block; font-style: normal; font-weight: 400;
  font-size: 12px; color: var(--muted); margin-top: 2px;
}

@media (max-width: 620px) {
  .llm-bar { flex-direction: column; align-items: stretch; gap: 4px; }
  .llm-switch { padding-bottom: 0; }
}

/* ============================================================
   论文级信效度面板（P05）
   全部用现有 CSS 变量，换配色时自动跟随，不写死颜色
   ============================================================ */

.p05-card {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--card) 0%, var(--card) 100%);
}

/* 配置区 */
.p05-config {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
  padding: 14px 16px;
  background: var(--bg-2);
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  margin-bottom: 16px;
}

.p05-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 240px;
  flex: 0 1 auto;
}

.p05-field > span {
  font-size: 12px;
  color: var(--muted);
  letter-spacing: .2px;
}

.p05-field select {
  height: 34px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
  color: var(--text);
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  transition: border-color .15s;
}

.p05-field select:hover { border-color: var(--accent); }
.p05-field select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

/* 自检清单 */
.p05-checklist {
  display: grid;
  gap: 8px;
  margin-bottom: 20px;
}

.p05-check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px 12px;
  border-radius: 9px;
  border: 1px solid var(--line-2);
  background: var(--card);
  font-size: 13px;
  line-height: 1.6;
}

.p05-check-mark {
  flex: 0 0 18px;
  height: 18px;
  margin-top: 1px;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
  color: #fff;
  background: var(--faint);
}

.p05-check-body { flex: 1; min-width: 0; }
.p05-check-body b { display: block; font-weight: 600; margin-bottom: 2px; }
.p05-check-body span { color: var(--muted); }

.p05-check-ok { border-color: color-mix(in srgb, var(--accent) 22%, var(--line-2)); }
.p05-check-ok .p05-check-mark { background: var(--accent); }

.p05-check-warn { border-color: color-mix(in srgb, var(--red) 26%, var(--line-2)); background: var(--red-soft); }
.p05-check-warn .p05-check-mark { background: var(--red); }
.p05-check-warn .p05-check-body b { color: var(--red); }

.p05-check-info .p05-check-mark { background: var(--blue); }

/* 各节 */
.p05-section {
  margin-bottom: 22px;
}

.p05-section-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px dashed var(--line-2);
}

.p05-section-head h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .2px;
}

/* 正文引用块：左侧竖线，模拟论文排版 */
.p05-quote {
  padding: 14px 18px;
  background: var(--bg-2);
  border-left: 3px solid var(--accent);
  border-radius: 0 8px 8px 0;
  font-size: 14px;
  line-height: 1.95;
  color: var(--text);
  text-align: justify;
}

.p05-quote p {
  margin: 0 0 10px;
  text-indent: 2em;
}

.p05-quote p:last-child { margin-bottom: 0; }

/* 三线表：上下粗线、表头下细线、无竖线 */
table.tbl-three-line {
  border-collapse: collapse;
  width: 100%;
  font-variant-numeric: tabular-nums;
  border-top: 2px solid var(--text);
  border-bottom: 2px solid var(--text);
}

table.tbl-three-line thead th {
  border: 0;
  border-bottom: 1px solid var(--text);
  background: transparent;
  padding: 8px 10px;
  font-weight: 600;
  font-size: 12.5px;
  color: var(--text);
  white-space: nowrap;
}

table.tbl-three-line tbody td {
  border: 0;
  padding: 6px 10px;
  font-size: 13px;
  color: var(--text);
  border-bottom: 1px solid var(--line-2);
}

table.tbl-three-line tbody tr:last-child td { border-bottom: 0; }
table.tbl-three-line tbody tr:hover td { background: var(--accent-soft); }

/* 载荷矩阵里留空的单元格不参与斑马纹，视觉上更干净 */
table.tbl-three-line td.num { text-align: right; }
table.tbl-three-line th.num { text-align: right; }

/* 表注 */
.p05-note {
  margin-top: 8px;
  font-size: 12px;
  line-height: 1.7;
  color: var(--muted);
}

.p05-section .table-wrap {
  overflow-x: auto;
  border-radius: 6px;
}

/* 小屏：配置项各占一行 */
@media (max-width: 720px) {
  .p05-field { min-width: 100%; }
  .p05-config .btn { width: 100%; }
  .p05-quote { padding: 12px 14px; font-size: 13.5px; }
}

/* ============================================================
   顶栏空间分配（2026-11-25 补）
   1280 宽下原来品牌 153 + 导航 445 + 右侧 636 + 间隙 44 = 1278，
   而 .wrap 上限 1180，导航第 4 项被裁成只剩序号、第 5 项整项消失。
   这里在 1360 以下启用紧凑规则：项目名收窄、天气芯片只留时间与温度。
   导航项给 flex:0 0 auto 后由 .nav 自己横滑，不再压缩文字。
   ============================================================ */
.nav-item { flex: 0 0 auto; white-space: nowrap; }

@media (max-width: 1360px) {
  .proj-name { max-width: 110px; }
  .wx-chip { padding: 5px 10px 5px 6px; gap: 7px; }
  .wx-chip-sub { display: none; }
  .wx-chip-icon { width: 23px; height: 23px; flex-basis: 23px; }
}

/* ---------- 分析记录（自动存档） ---------- */
.ana-list { display: flex; flex-direction: column; gap: 8px; }
.ana-item {
  display: flex; align-items: center; gap: 12px;
  border: 1px solid var(--line-2); border-radius: 10px; padding: 10px 12px;
  background: var(--card);
}
.ana-item:hover { border-color: var(--line); }
.ana-when { flex: 0 0 92px; display: flex; flex-direction: column; font-size: 11.5px; color: var(--faint); }
.ana-when b { font-size: 12px; color: var(--accent); font-weight: 600; }
.ana-main { flex: 1; min-width: 0; }
.ana-line {
  font-size: 13px; color: var(--text); line-height: 1.55;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.ana-tags { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; font-size: 11.5px; color: var(--faint); }
.ana-empty { padding: 18px 4px; font-size: 13px; color: var(--faint); }
.ana-who { font-size: 12px; color: var(--muted); white-space: nowrap; }
.ana-card { max-width: 880px; }
.ana-card .modal-head h2 { flex: 1; }
.ana-card .modal-body { max-height: 76vh; }
.ana-detail-head { border-bottom: 1px solid var(--line-2); padding-bottom: 12px; margin-bottom: 14px; }
.ana-detail-head .ana-line { display: block; -webkit-line-clamp: unset; }
.btn-link { border-color: transparent; background: transparent; color: var(--faint); }
.btn-link:hover { border-color: var(--line-2); background: var(--bg-2); }

@media (max-width: 620px) {
  .ana-item { flex-wrap: wrap; }
  .ana-when { flex: 0 0 auto; flex-direction: row; gap: 6px; align-items: baseline; }
  .ana-item .btn { margin-left: auto; }
}

/* 任务窗口右上角的账号筛选：标签不换行，下拉限宽，窄屏也不挤压标题 */
#adminTaskCard .card-head .inline-field { flex: 0 0 auto; }
#adminTaskCard .card-head .inline-field span { white-space: nowrap; }
#adminTaskCard .card-head #adminTaskUser { max-width: 230px; }

/* ---------- 任务页 · 账号筛选（多选下拉） ---------- */
.acc-filter { position: relative; flex: 0 0 auto; }
.acc-btn {
  display: inline-flex; align-items: center; gap: 7px;
  height: 28px; padding: 0 10px; font-size: 12px; font-family: inherit;
  color: var(--text); background: var(--card);
  border: 1px solid var(--line); border-radius: 7px; cursor: pointer;
}
.acc-btn:hover { border-color: var(--accent); }
.acc-btn.is-open { border-color: var(--accent); }
.acc-btn-txt { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acc-caret {
  width: 0; height: 0; border-left: 4px solid transparent; border-right: 4px solid transparent;
  border-top: 5px solid var(--faint); transition: transform .15s;
}
.acc-btn.is-open .acc-caret { transform: rotate(180deg); }

.acc-pop {
  position: absolute; left: 0; top: calc(100% + 6px); z-index: 60;
  width: 288px; background: var(--card);
  border: 1px solid var(--line); border-radius: 10px;
  box-shadow: 0 12px 32px rgba(20, 24, 28, .14);
  display: flex; flex-direction: column; overflow: hidden;
}
.acc-pop-head {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px; border-bottom: 1px solid var(--line-2); background: var(--bg-2);
}
.acc-pop-list { max-height: 268px; overflow-y: auto; padding: 4px; }
.acc-item {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 8px; border-radius: 7px; cursor: pointer; font-size: 12.5px;
}
.acc-item:hover { background: var(--bg-2); }
.acc-item input { margin: 0; flex: 0 0 auto; }
.acc-item-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acc-item-name b { font-weight: 600; }
.acc-item-name em { font-style: normal; color: var(--faint); margin-left: 5px; }
.acc-item-n { flex: 0 0 auto; font-size: 11px; color: var(--faint); }
.acc-item-me .acc-item-name b::after {
  content: '我'; margin-left: 5px; font-size: 10px; font-weight: 400;
  color: var(--accent); border: 1px solid currentColor; border-radius: 4px; padding: 0 3px;
}
.acc-pop-foot {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px; border-top: 1px solid var(--line-2); background: var(--bg-2);
}
.acc-pop-foot .hint { font-size: 11.5px; }

@media (max-width: 620px) {
  .acc-pop { width: min(288px, calc(100vw - 40px)); }
}

/* 历史记录里的「AI 成稿」标签：和基础分析共用一条时间线，靠这个小标区分 */
.ana-kind {
  display: inline-block; padding: 0 6px; border-radius: 4px;
  background: var(--accent-soft); color: var(--accent);
  font-size: 10.5px; line-height: 17px; font-weight: 600;
}
.ana-ai-body { padding-bottom: 8px; }
.ana-ai-body .ai-sec:first-child { margin-top: 0; }
