:root {
  --bg: #f5f7fa;
  --card: #ffffff;
  --ink: #1f2937;
  --muted: #6b7280;
  --line: #e5e7eb;
  --brand: #2563eb;
  --brand-d: #1d4ed8;
  --ok: #16a34a;
  --warn: #d97706;
  --bad: #dc2626;
  --shadow: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.04);
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
.wrap { max-width: 820px; margin: 0 auto; padding: 16px 16px 60px; }
header.top {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 0; gap: 12px; flex-wrap: wrap;
}
header.top h1 { font-size: 18px; margin: 0; }
nav a {
  display: inline-block; margin-left: 10px; padding: 6px 12px;
  border-radius: 8px; background: var(--card); border: 1px solid var(--line);
  color: var(--ink); text-decoration: none; font-size: 13px;
}
nav a.active, nav a:hover { background: var(--brand); color: #fff; border-color: var(--brand); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 16px; box-shadow: var(--shadow); margin-bottom: 16px; }
h2 { font-size: 16px; margin: 0 0 12px; }
p.hint { color: var(--muted); font-size: 13px; margin: 4px 0 12px; }
label { display: block; font-size: 13px; color: var(--muted); margin: 10px 0 4px; }
input[type=text], input[type=time], input[type=number], textarea, select {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px;
  font-size: 14px; background: #fff; color: var(--ink); font-family: inherit;
}
textarea { min-height: 120px; resize: vertical; }
button {
  cursor: pointer; border: none; border-radius: 8px; padding: 11px 18px;
  font-size: 14px; font-weight: 600; background: var(--brand); color: #fff;
}
button:hover { background: var(--brand-d); }
button.ghost { background: #fff; color: var(--brand); border: 1px solid var(--brand); }
button.sm { padding: 6px 12px; font-size: 13px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.row > div { flex: 1; min-width: 140px; }
.bigbtns { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
.bigbtns a {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 22px 10px; background: var(--card); border: 1px solid var(--line);
  border-radius: 12px; text-decoration: none; color: var(--ink); font-weight: 600;
  box-shadow: var(--shadow); text-align: center;
}
.bigbtns a:hover { border-color: var(--brand); color: var(--brand); }
.bigbtns a span { font-size: 12px; font-weight: 400; color: var(--muted); margin-top: 6px; }
.stat { display: flex; gap: 14px; flex-wrap: wrap; }
.stat .box { flex: 1; min-width: 120px; background: #f8fafc; border: 1px solid var(--line); border-radius: 10px; padding: 12px; }
.stat .box b { display: block; font-size: 24px; }
.stat .box small { color: var(--muted); }
.tag { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.tag.ok { background: #dcfce7; color: var(--ok); }
.tag.warn { background: #fef3c7; color: var(--warn); }
.tag.bad { background: #fee2e2; color: var(--bad); }
.section { margin-top: 18px; }
.section h3 { font-size: 14px; margin: 0 0 8px; display: flex; align-items: center; gap: 8px; }
.list { list-style: none; margin: 0; padding: 0; }
.list li { padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; margin-bottom: 8px; background: #fff; }
.list li .meta { color: var(--muted); font-size: 12px; margin-top: 2px; }
.rules .rule { border: 1px solid var(--line); border-radius: 10px; padding: 12px; margin-bottom: 10px; }
.rules .rule .rhead { display: flex; align-items: center; gap: 10px; }
.rules .rule .rhead input[type=text] { width: auto; flex: 1; }
.rules .rule .rbody { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.rules .rule .rbody > div { flex: 1; min-width: 160px; }
.breakdown { list-style: none; padding: 0; margin: 8px 0 0; }
.breakdown li { padding: 4px 0; font-size: 13px; }
.ok-txt { color: var(--ok); }
.bad-txt { color: var(--bad); }
.imgs { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.imgs img { width: 90px; height: 90px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
.empty { color: var(--muted); font-size: 13px; padding: 14px; text-align: center; border: 1px dashed var(--line); border-radius: 8px; }
.result { margin-top: 14px; }
@media print {
  nav, header.top, .no-print { display: none !important; }
  body { background: #fff; }
  .card { box-shadow: none; border: 1px solid #ccc; }
}
@media (max-width: 560px) {
  .bigbtns { grid-template-columns: 1fr; }
}

/* 模块切换下拉（在顶部导航里） */
#moduleSel {
  padding: 4px 8px;
  border-radius: 8px;
  border: 1px solid var(--line, #e2e8f0);
  background: #fff;
  font-size: 13px;
  color: var(--ink, #1e293b);
  cursor: pointer;
  max-width: 140px;
}

/* AI 识别摘要 */
.ai-summary {
  background: #f0f9ff; border-left: 3px solid var(--brand);
  padding: 8px 10px; border-radius: 0 6px 6px 0; margin-top: 8px;
}

/* 运营：平台筛选 + 每平台截图块 */
.plat-sel { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 6px; }
.chk { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--ink); margin: 0; cursor: pointer; }
.chk input { width: auto; margin: 0; }
.plat-block {
  border: 1px solid var(--line); border-radius: 10px; padding: 12px;
  margin-top: 12px; background: #fcfdff;
}
.plat-block h3 { font-size: 14px; margin: 0 0 8px; }

