/* AI 宠物健康管家 · 主人端 MVP */
:root {
  --bg: #f3f6f5;
  --surface: #ffffff;
  --surface-soft: #f8faf9;
  --ink: #0f172a;
  --ink-2: #334155;
  --muted: #6b7a86;
  --line: #e5ebee;
  --brand: #0f766e;
  --brand-deep: #0b5c56;
  --brand-soft: #e7f5f1;
  --green: #15803d;  --green-bg: #e8f7ec;
  --yellow: #a16207; --yellow-bg: #fdf6cf;
  --orange: #c2410c; --orange-bg: #ffeddf;
  --red: #b91c1c;    --red-bg: #fde8e8;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 8px 24px -12px rgba(15, 23, 42, .12);
  --font: "Microsoft YaHei UI", "Microsoft YaHei", "PingFang SC", "Noto Sans SC", system-ui, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  background:
    radial-gradient(1200px 500px at 85% -10%, #e2f0ec 0%, transparent 60%),
    var(--bg);
  color: var(--ink);
  font-size: 14.5px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p { margin: 0; }
button { font-family: inherit; cursor: pointer; }

/* ---------- 顶栏 ---------- */
.topbar {
  max-width: 1280px; margin: 0 auto; padding: 22px 28px 12px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.brand { display: flex; align-items: center; gap: 13px; }
.logo {
  width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center;
  background: linear-gradient(145deg, #0f766e, #14a08f); color: #fff; font-size: 22px;
  box-shadow: 0 8px 18px -8px rgba(15, 118, 110, .8);
}
.brand h1 { font-size: 19px; letter-spacing: .6px; }
.brand p { font-size: 12px; color: var(--muted); letter-spacing: .3px; }
.top-actions { display: flex; align-items: center; gap: 10px; }
.chip {
  font-size: 12px; color: var(--brand-deep); background: var(--brand-soft);
  border: 1px solid #cfeae2; padding: 5px 11px; border-radius: 999px; white-space: nowrap;
}
.ghost-chip { color: var(--muted); background: #fff; border-color: var(--line); }

/* ---------- 布局 ---------- */
.layout {
  max-width: 1280px; margin: 0 auto; padding: 8px 28px 48px;
  display: grid; grid-template-columns: 322px minmax(0, 1fr); gap: 20px; align-items: start;
}
.sidebar { position: sticky; top: 18px; display: grid; gap: 14px; }
.content { display: grid; gap: 18px; }

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 20px 22px;
}
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 14px; }
.card-head h2 { font-size: 16px; letter-spacing: .3px; }
.hint { font-size: 12px; color: var(--muted); }

/* ---------- 宠物列表 ---------- */
.pet-list { display: grid; gap: 8px; }
.pet-item {
  display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 12px;
  border: 1px solid transparent; background: var(--surface-soft); text-align: left; width: 100%;
  transition: border-color .15s, background .15s, transform .15s;
}
.pet-item:hover { border-color: #cfe3df; transform: translateY(-1px); }
.pet-item.active { border-color: #9ed3c8; background: var(--brand-soft); }
.avatar {
  width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center;
  font-size: 19px; background: #fff; border: 1px solid var(--line); flex: none;
}
.pet-item.active .avatar { border-color: #b7ded4; }
.pet-name { font-weight: 600; font-size: 14px; }
.pet-meta { font-size: 12px; color: var(--muted); }

/* ---------- 风险卡 ---------- */
.risk-card { border-left: 4px solid var(--line); }
.risk-card[data-level="green"] { border-left-color: var(--green); }
.risk-card[data-level="yellow"] { border-left-color: var(--yellow); }
.risk-card[data-level="orange"] { border-left-color: var(--orange); }
.risk-card[data-level="red"] { border-left-color: var(--red); }
.risk-top { display: flex; align-items: center; gap: 8px; }
.risk-badge {
  display: inline-flex; align-items: center; gap: 7px; font-weight: 700; font-size: 15px;
  padding: 4px 12px 4px 10px; border-radius: 999px; letter-spacing: .3px;
}
.risk-card[data-level="green"] .risk-badge { color: var(--green); background: var(--green-bg); }
.risk-card[data-level="yellow"] .risk-badge { color: var(--yellow); background: var(--yellow-bg); }
.risk-card[data-level="orange"] .risk-badge { color: var(--orange); background: var(--orange-bg); }
.risk-card[data-level="red"] .risk-badge { color: var(--red); background: var(--red-bg); }
.pulse-dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.risk-card[data-level="red"] .pulse-dot { animation: pulse 1.6s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(185,28,28,.45); } 70% { box-shadow: 0 0 0 9px rgba(185,28,28,0); } 100% { box-shadow: 0 0 0 0 rgba(185,28,28,0); } }
.risk-score { font-size: 12px; color: var(--muted); margin: 4px 0 2px; }
.risk-advice { font-size: 13px; color: var(--ink-2); margin: 10px 0 0; white-space: pre-line; }
.risk-subhead { font-size: 11.5px; color: var(--muted); letter-spacing: 1px; margin: 14px 0 6px; text-transform: uppercase; }
.risk-rules { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.risk-rules li { display: flex; gap: 8px; font-size: 12.5px; color: var(--ink-2); align-items: baseline; }
.risk-rules li::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: #cbd5e1; flex: none; transform: translateY(-2px); }
.risk-rules li b { font-weight: 600; }
.risk-rules li em { margin-left: auto; color: var(--muted); font-style: normal; font-variant-numeric: tabular-nums; }
.risk-combo { background: var(--surface-soft); border-radius: 10px; padding: 9px 11px; font-size: 12.5px; color: var(--ink-2); margin-top: 6px; }
.risk-combo b { color: var(--brand-deep); }
.disclaimer { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line); font-size: 11.5px; color: var(--muted); }
.skeleton { color: var(--muted); font-size: 13px; padding: 8px 0; }

/* ---------- 指标 ---------- */
.meta-card { padding: 14px 18px; display: grid; gap: 7px; }
.meta-row { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--muted); }
.meta-row b { color: var(--ink-2); font-weight: 600; }

/* ---------- 自查表单 ---------- */
.date-field { font-size: 12px; color: var(--muted); display: grid; gap: 4px; }
.date-field input {
  font-family: inherit; font-size: 13px; color: var(--ink); border: 1px solid var(--line);
  border-radius: 9px; padding: 6px 9px; background: #fff;
}
.dim-form { display: grid; }
.dim-row {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: center;
  padding: 13px 2px; border-bottom: 1px solid #f1f5f7;
}
.dim-row:last-child { border-bottom: 0; }
.dim-name { font-weight: 600; font-size: 14px; display: flex; align-items: center; gap: 8px; }
.dim-name .idx { font-size: 11px; color: #94a3b8; font-weight: 500; font-variant-numeric: tabular-nums; }
.dim-hint { font-size: 12px; color: var(--muted); margin-top: 2px; }
.dim-dir { font-size: 11px; color: #9aa8b3; margin-top: 1px; }

.segmented { display: inline-flex; background: #f1f4f5; border-radius: 11px; padding: 3px; gap: 2px; }
.segmented button {
  border: 0; background: transparent; border-radius: 8px; padding: 6px 13px; font-size: 13px;
  color: var(--muted); transition: all .14s; white-space: nowrap;
}
.segmented button:hover { color: var(--ink-2); }
.segmented button.active { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(15,23,42,.12); font-weight: 600; }
.segmented button.active[data-level="mild"] { color: var(--yellow); }
.segmented button.active[data-level="mod"] { color: var(--orange); }
.segmented button.active[data-level="severe"] { color: var(--red); }
.segmented.small button { padding: 5px 12px; font-size: 12.5px; }

/* ---------- 量化指标 ---------- */
.metrics-block { margin-top: 16px; padding: 14px 16px; background: var(--surface-soft); border-radius: 12px; }
.metrics-head { font-size: 13px; font-weight: 600; margin-bottom: 10px; }
.metrics-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.metric-field { display: grid; gap: 4px; font-size: 12px; color: var(--muted); }
.metric-field .input-wrap { display: flex; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 9px; padding: 0 10px; }
.metric-field input { border: 0; outline: 0; font-family: inherit; font-size: 14px; padding: 8px 0; width: 100%; background: transparent; min-width: 0; }
.metric-field .unit { font-size: 12px; color: #94a3b8; white-space: nowrap; margin-left: 6px; }

/* ---------- 量化记录（分组） ---------- */
.metric-group { margin-bottom: 16px; }
.metric-group:last-child { margin-bottom: 0; }
.metric-group-title { font-size: 12px; color: var(--muted); letter-spacing: .6px; margin-bottom: 9px; }
.metric-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(172px, 1fr)); gap: 12px 14px; }
.metric-label { color: var(--ink-2); font-size: 12.5px; }
.metric-field select {
  font-family: inherit; font-size: 13.5px; color: var(--ink); background: #fff;
  border: 1px solid var(--line); border-radius: 9px; padding: 8px 9px; width: 100%;
}
.metric-field select:focus { outline: 2px solid #b7ded4; border-color: #9ed3c8; }
.ref-hint { font-size: 11px; color: #94a3b8; min-height: 14px; }

/* ---------- 参考线表格 ---------- */
.ref-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.ref-table th, .ref-table td { padding: 8px; border-bottom: 1px solid #eef2f3; text-align: left; vertical-align: middle; }
.ref-table th { font-size: 11.5px; color: var(--muted); font-weight: 600; background: #f8faf9; }
.ref-table tr:last-child td { border-bottom: 0; }
.ref-table .ref-value { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--ink); }
.ref-table .ref-delta { font-variant-numeric: tabular-nums; color: var(--muted); }
.status-pill { display: inline-block; font-size: 11.5px; padding: 2px 9px; border-radius: 999px; white-space: nowrap; }
.status-pill.muted { color: #94a3b8; background: #f1f5f4; }
.ref-legend { font-size: 11.5px; color: var(--muted); }
.band-hint { font-size: 11px; color: #94a3b8; margin-top: 3px; }
.ref-note { margin-top: 10px; }

/* ---------- 红线 ---------- */
.redline-block { margin-top: 16px; border: 1px solid #f3d6d6; background: #fffafa; border-radius: 12px; padding: 4px 16px 12px; }
.redline-block summary { cursor: pointer; font-size: 13px; font-weight: 600; color: #9f1239; padding: 10px 0; list-style: none; display: flex; align-items: center; gap: 8px; }
.redline-block summary::-webkit-details-marker { display: none; }
.red-dot { width: 8px; height: 8px; border-radius: 50%; background: #dc2626; flex: none; }
.redline-list { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 18px; }
.redline-item { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-2); padding: 3px 0; }
.redline-item input { width: 15px; height: 15px; accent-color: #dc2626; }
.redline-item.checked { color: #b91c1c; font-weight: 600; }

.form-actions { display: flex; align-items: center; justify-content: flex-end; gap: 14px; margin-top: 18px; }
.btn {
  border: 1px solid var(--line); background: #fff; color: var(--ink-2); border-radius: 11px;
  padding: 9px 16px; font-size: 13.5px; font-weight: 600; transition: all .15s;
}
.btn:hover { border-color: #c3d5d1; color: var(--brand-deep); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: 0 6px 14px -8px rgba(15,118,110,.9); }
.btn.primary:hover { background: var(--brand-deep); }
.btn.ghost { background: #fff; }
.btn:disabled { opacity: .55; cursor: default; }

/* ---------- 热力图 ---------- */
.heatmap-wrap { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; overflow-x: auto; }
.heat-row { display: grid; grid-template-columns: 82px repeat(var(--cols, 7), minmax(30px, 1fr)); gap: 4px; align-items: center; margin-bottom: 4px; }
.heat-label { font-size: 12px; color: var(--muted); white-space: nowrap; }
.heat-cell {
  height: 26px; border-radius: 7px; display: grid; place-items: center; font-size: 11px;
  background: #f1f5f4; color: #b9c4cc;
}
.heat-cell[data-level="0"] { background: #e9f6ec; color: #15803d; }
.heat-cell[data-level="1"] { background: #fdf0b4; color: #8a6100; }
.heat-cell[data-level="2"] { background: #fbc99f; color: #9a3412; }
.heat-cell[data-level="3"] { background: #f2a4a4; color: #991b1b; }
.heat-head { font-size: 11px; color: #94a3b8; text-align: center; }
.heat-legend { display: flex; gap: 14px; margin-top: 8px; font-size: 11.5px; color: var(--muted); flex-wrap: wrap; }
.heat-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }

/* ---------- 曲线 ---------- */
.charts { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 12px; margin-top: 14px; }
.chart-card { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px 6px; }
.chart-title { font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.chart-title .unit { color: #94a3b8; font-weight: 400; }
.chart-title .last { color: var(--muted); font-weight: 400; float: right; font-variant-numeric: tabular-nums; }
.chart svg { width: 100%; height: 108px; display: block; }
.empty { color: #94a3b8; font-size: 12.5px; padding: 14px 2px; }

/* ---------- 时间线 ---------- */
.timeline { margin-top: 18px; }
.timeline h3 { font-size: 13px; color: var(--ink-2); margin-bottom: 8px; }
.timeline ul { list-style: none; margin: 0; padding: 0; }
.timeline li { display: flex; gap: 10px; align-items: center; font-size: 12.5px; color: var(--ink-2); padding: 5px 0; border-bottom: 1px dashed #eef3f4; }
.timeline li:last-child { border-bottom: 0; }
.tl-date { color: #94a3b8; width: 42px; flex: none; font-variant-numeric: tabular-nums; }
.tl-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--brand); flex: none; }
.tl-dot[data-type="redline"] { background: #dc2626; }
.tl-dot[data-type="risk"] { background: #ea580c; }

/* ---------- 规则说明 ---------- */
.rules-note { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 10px; }
.rules-note summary { cursor: pointer; font-size: 12.5px; color: var(--muted); list-style: none; }
.rules-note summary::-webkit-details-marker { display: none; }
.rules-note summary::before { content: "▸ "; }
.rules-note[open] summary::before { content: "▾ "; }
#rules-body { margin-top: 10px; }
.rule-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 8px 18px; }
.rule-item { font-size: 12px; color: var(--ink-2); display: flex; justify-content: space-between; border-bottom: 1px dashed #f0f4f5; padding: 3px 0; }
.rule-item span { color: var(--muted); }
.rule-note { font-size: 12px; color: var(--muted); margin-top: 10px; line-height: 1.8; }
.threshold-chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0 2px; }
.threshold-chips span { font-size: 11.5px; padding: 3px 10px; border-radius: 999px; }

/* ---------- 报告卡 ---------- */
.report-card { display: flex; align-items: center; justify-content: space-between; gap: 18px; }

/* ---------- 弹窗 ---------- */
.modal-mask { position: fixed; inset: 0; background: rgba(15, 23, 42, .42); backdrop-filter: blur(2px); display: grid; place-items: center; z-index: 50; padding: 20px; }
.modal-mask[hidden] { display: none; }
.modal {
  background: #fff; border-radius: 18px; padding: 24px 26px; width: min(440px, 100%);
  box-shadow: 0 30px 80px -20px rgba(15,23,42,.5); display: grid; gap: 12px;
  animation: pop .18s ease-out;
}
@keyframes pop { from { transform: translateY(8px) scale(.98); opacity: 0; } }
.modal h2 { font-size: 17px; margin-bottom: 2px; }
.field { display: grid; gap: 5px; }
.field label { font-size: 12px; color: var(--muted); }
.field input, .field select {
  font-family: inherit; font-size: 14px; padding: 9px 11px; border: 1px solid var(--line);
  border-radius: 10px; background: #fff; color: var(--ink);
}
.field input:focus, .field select:focus { outline: 2px solid #b7ded4; border-color: #9ed3c8; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 30px; transform: translateX(-50%);
  background: #0f172a; color: #fff; padding: 11px 18px; border-radius: 12px; font-size: 13px;
  box-shadow: 0 18px 40px -12px rgba(15,23,42,.6); z-index: 60; max-width: 86vw;
}
.toast[hidden] { display: none; }
.toast[data-level="red"] { background: #991b1b; }
.toast[data-level="orange"] { background: #9a3412; }
.toast[data-level="yellow"] { background: #854d0e; }
.toast[data-level="green"] { background: #14532d; }

/* ---------- 登录 / 注册 ---------- */
.auth-shell { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.auth-shell[hidden] { display: none; }
.auth-card {
  width: min(420px, 100%); background: #fff; border: 1px solid var(--line); border-radius: 20px;
  padding: 30px 30px 24px; box-shadow: 0 24px 60px -28px rgba(15, 23, 42, .28);
}
.auth-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.auth-brand h1 { font-size: 19px; letter-spacing: .6px; }
.auth-brand p { font-size: 12px; color: var(--muted); }
.auth-tabs { display: flex; background: #f1f4f5; border-radius: 12px; padding: 3px; margin-bottom: 16px; }
.auth-tabs button {
  flex: 1; border: 0; background: transparent; padding: 8px; border-radius: 9px;
  font-size: 13px; color: var(--muted); transition: all .14s;
}
.auth-tabs button.active { background: #fff; color: var(--ink); font-weight: 600; box-shadow: 0 1px 3px rgba(15,23,42,.12); }
.auth-form { display: grid; gap: 13px; }
.auth-form[hidden] { display: none; }
.auth-form label { display: grid; gap: 5px; font-size: 12px; color: var(--muted); }
.auth-form input {
  font-family: inherit; font-size: 14px; padding: 10px 12px; border: 1px solid var(--line);
  border-radius: 10px; background: #fff; color: var(--ink);
}
.auth-form input:focus { outline: 2px solid #b7ded4; border-color: #9ed3c8; }
.btn.block { width: 100%; padding: 11px; margin-top: 2px; }
.auth-error { color: #b91c1c; font-size: 12px; min-height: 16px; margin: 0; }
.auth-note { margin-top: 16px; text-align: center; font-size: 11.5px; color: var(--muted); }

/* ---------- 顶栏用户 ---------- */
.user-chip {
  display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-2);
  background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px; white-space: nowrap;
}
.user-chip b { font-weight: 600; }
.user-chip span { color: var(--muted); }

/* ---------- 报告按钮 ---------- */
.report-actions { display: flex; gap: 10px; flex: none; }

/* ---------- 模式切换 / 分诊流程 ---------- */
.mode-switch { display: flex; gap: 8px; background: #f1f4f5; border-radius: 14px; padding: 4px; margin-bottom: 18px; }
.mode-switch button {
  flex: 1; border: 0; background: transparent; border-radius: 11px; padding: 11px 8px;
  font-size: 14px; font-weight: 600; color: var(--muted); transition: all .15s;
}
.mode-switch button:hover { color: var(--ink-2); }
.mode-switch button.active { background: #fff; color: var(--brand-deep); box-shadow: 0 1px 4px rgba(15,23,42,.12); }
.mode-switch button[data-mode="abnormal"].active { color: #b45309; }

.step { margin-bottom: 18px; }
.step-title { font-size: 13.5px; font-weight: 600; color: var(--ink-2); margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.step-num {
  width: 20px; height: 20px; border-radius: 50%; background: var(--brand); color: #fff;
  font-size: 11.5px; display: grid; place-items: center; flex: none;
}

.symptom-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.symptom-chip {
  border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 7px 14px;
  font-size: 13px; color: var(--ink-2); transition: all .14s;
}
.symptom-chip:hover { border-color: #c3d5d1; color: var(--brand-deep); }
.symptom-chip.active { background: #fff7ed; border-color: #fdba74; color: #9a3412; font-weight: 600; }

.checks-list { display: grid; gap: 6px; margin-bottom: 14px; }
.check-item {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 10px;
  background: #f8faf9; border: 1px solid #eef2f3; font-size: 12.5px; color: var(--ink-2);
}
.check-rank {
  width: 18px; height: 18px; border-radius: 6px; background: var(--brand-soft); color: var(--brand-deep);
  font-size: 11px; font-weight: 700; display: grid; place-items: center; flex: none;
}
.check-item b { font-weight: 600; margin-right: 8px; }
.check-item .hint { font-size: 11.5px; }
.check-score { margin-left: auto; color: var(--muted); font-size: 11.5px; white-space: nowrap; }

.triage-result { margin-top: 6px; }
.triage-card { border-left: 4px solid; border-radius: 12px; padding: 14px 16px; margin-bottom: 14px; }
.triage-action { display: flex; align-items: center; gap: 8px; font-size: 17px; font-weight: 700; }
.triage-action .pulse-dot { background: currentColor; }
.triage-advice { margin: 8px 0 4px; font-size: 13px; color: var(--ink-2); }
.triage-meta { font-size: 11.5px; color: var(--muted); }
.disease-list { display: grid; gap: 8px; }
.disease-row { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: #fff; }
.disease-row[data-class="critical"] { border-color: #f3c6c6; background: #fffafa; }
.disease-head { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.disease-head b { font-size: 13.5px; }
.class-tag { font-size: 11px; padding: 1px 8px; border-radius: 999px; }
.class-tag[data-class="critical"] { background: #fde8e8; color: #b91c1c; }
.class-tag[data-class="serious"] { background: #ffeddf; color: #c2410c; }
.class-tag[data-class="mild"] { background: #e8f7ec; color: #15803d; }
.disease-row p { font-size: 12.5px; color: var(--ink-2); margin: 4px 0; }
.disease-row small { font-size: 11.5px; color: var(--muted); }

/* ---------- 判级徽标 / 主观项 ---------- */
.metric-group-head { display: flex; align-items: center; gap: 10px; margin-bottom: 7px; }
.level-badge { font-size: 11.5px; padding: 2px 9px; border-radius: 999px; background: #f1f5f4; color: #94a3b8; }
.level-badge[data-level="none"] { background: #e8f7ec; color: #15803d; }
.level-badge[data-level="mild"] { background: #fdf6cf; color: #a16207; }
.level-badge[data-level="mod"] { background: #ffeddf; color: #c2410c; }
.level-badge[data-level="severe"] { background: #fde8e8; color: #b91c1c; }
.level-reason { font-size: 11.5px; color: #94a3b8; margin-top: 6px; }
.subjective-dims { display: grid; gap: 10px; }
.subjective-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px; align-items: center; }
.subjective-name { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.metric-group-title { font-size: 12.5px; color: var(--ink-2); font-weight: 600; }

/* ---------- 体温 / 触温 ---------- */
.temp-field { margin-top: 14px; padding-top: 12px; border-top: 1px dashed #eef2f3; }
.temp-head { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; flex-wrap: wrap; }
.temp-thermo { max-width: 220px; }
.temp-touch { display: grid; gap: 10px; }
.touch-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px 14px; }
.touch-field { display: grid; gap: 4px; }
.touch-label { font-size: 12px; color: var(--muted); }
.touch-field select {
  font-family: inherit; font-size: 13px; color: var(--ink); background: #fff;
  border: 1px solid var(--line); border-radius: 9px; padding: 8px 9px; width: 100%;
}
.touch-field select:focus { outline: 2px solid #b7ded4; border-color: #9ed3c8; }
.touch-hint { margin-top: 2px; }
.touch-verdict {
  margin-top: 8px; border-radius: 10px; padding: 10px 12px; font-size: 12.5px;
  background: #f8faf9; border-left: 3px solid #cbd5e1;
}
.touch-verdict[data-level="none"] { background: #e8f7ec; border-left-color: #15803d; }
.touch-verdict[data-level="mild"] { background: #fdf6cf; border-left-color: #a16207; }
.touch-verdict[data-level="mod"] { background: #ffeddf; border-left-color: #c2410c; }
.touch-verdict[data-level="severe"] { background: #fde8e8; border-left-color: #b91c1c; }
.touch-verdict b { display: block; margin-bottom: 2px; }
.touch-verdict span { color: var(--muted); font-size: 11.5px; }
.touch-verdict p { margin: 6px 0 0; color: var(--ink-2); }


/* ---------- 自填症状 ---------- */
.symptom-chip.custom {
  border-style: dashed; border-color: #fdba74; background: #fff7ed; color: #9a3412;
  display: inline-flex; align-items: center; gap: 6px;
}
.chip-x { font-size: 14px; line-height: 1; opacity: .65; }
.symptom-chip.add-chip { border-style: dashed; color: var(--brand-deep); }
.custom-symptom { display: flex; gap: 8px; margin-top: 10px; align-items: center; flex-wrap: wrap; }
.custom-symptom[hidden] { display: none; }
.custom-symptom input {
  flex: 1; min-width: 240px; max-width: 420px; font-family: inherit; font-size: 13.5px;
  padding: 8px 11px; border: 1px solid var(--line); border-radius: 9px; background: #fff; color: var(--ink);
}
.custom-symptom input:focus { outline: 2px solid #b7ded4; border-color: #9ed3c8; }
.custom-hint { margin-top: 8px; }
.triage-note {
  background: #f8faf9; border-left: 3px solid #cbd5e1; border-radius: 8px;
  padding: 8px 12px; font-size: 12px; color: var(--muted); margin-bottom: 10px;
}


/* ---------- 下一步重点观察 ---------- */
.plan-panel {
  margin-top: 16px; border: 1px solid var(--line); border-left: 4px solid #cbd5e1;
  border-radius: 12px; padding: 14px 16px; background: #fffdf8;
}
.plan-panel[data-level="mild"] { border-left-color: #a16207; }
.plan-panel[data-level="mod"] { border-left-color: #c2410c; }
.plan-panel[data-level="severe"] { border-left-color: #b91c1c; }
.plan-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.plan-title { font-size: 14px; font-weight: 700; color: var(--ink); }
.plan-action { font-size: 12px; padding: 2px 10px; border-radius: 999px; font-weight: 600; }
.plan-action[data-level="mild"] { background: #fdf6cf; color: #a16207; }
.plan-action[data-level="mod"] { background: #ffeddf; color: #c2410c; }
.plan-action[data-level="severe"] { background: #fde8e8; color: #b91c1c; }
.plan-window { margin-left: auto; font-size: 12px; color: var(--muted); }
.plan-summary { font-size: 13px; color: var(--ink-2); margin: 0 0 10px; }
.plan-focus { display: grid; gap: 8px; }
.focus-row { background: #fff; border: 1px solid #eef2f3; border-radius: 10px; padding: 10px 12px; }
.focus-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.focus-head b { font-size: 13px; }
.focus-window { margin-left: auto; font-size: 11.5px; color: var(--muted); }
.focus-items { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 7px; }
.focus-item { font-size: 11.5px; background: #f1f5f4; color: var(--ink-2); padding: 3px 9px; border-radius: 999px; }
.focus-why { font-size: 11.5px; color: var(--muted); margin-top: 6px; }
.plan-timeline { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 5px; }
.plan-timeline li { display: flex; gap: 10px; font-size: 12px; }
.plan-timeline b { color: var(--brand-deep); min-width: 62px; }
.plan-timeline span { color: var(--ink-2); }

/* ---------- 体温行 ---------- */
.heat-row.extra { margin-top: 6px; padding-top: 6px; border-top: 1px dashed #e2e8f0; }
.heat-row.extra .heat-cell { font-size: 10px; }
.heat-row.extra .heat-label { color: var(--ink-2); font-weight: 600; }


/* ---------- 黄/橙/红线症状 ---------- */
.tier-group { margin-bottom: 12px; }
.tier-title {
  font-size: 12px; font-weight: 700; display: flex; align-items: center; gap: 6px;
  margin-bottom: 7px; letter-spacing: .3px;
}
.tier-title.tier-red { color: #b91c1c; }
.tier-title.tier-orange { color: #c2410c; }
.tier-title.tier-yellow { color: #a16207; }
.tier-dot { width: 8px; height: 8px; border-radius: 50%; background: #cbd5e1; flex: none; }
.tier-title.tier-red .tier-dot, .plan-triage .tier-dot[data-tier="red"] { background: #dc2626; }
.tier-title.tier-orange .tier-dot, .plan-triage .tier-dot[data-tier="orange"] { background: #ea580c; }
.tier-title.tier-yellow .tier-dot, .plan-triage .tier-dot[data-tier="yellow"] { background: #ca8a04; }
.symptom-chip.tier-red { border-color: #f3c6c6; }
.symptom-chip.tier-red.active { background: #fde8e8; border-color: #fca5a5; color: #b91c1c; font-weight: 600; }
.symptom-chip.tier-orange { border-color: #fde3c8; }
.symptom-chip.tier-orange.active { background: #ffeddf; border-color: #fdba74; color: #c2410c; font-weight: 600; }
.symptom-chip.tier-yellow { border-color: #f6ecc0; }
.symptom-chip.tier-yellow.active { background: #fdf6cf; border-color: #e7cf73; color: #854d0e; font-weight: 600; }
.add-row { margin-top: 6px; }
.daily-abnormal { background: #fffafa; border: 1px solid #f4e2e2; }
.plan-triage {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  background: #f8faf9; border-radius: 8px; padding: 8px 10px; margin-bottom: 8px; font-size: 12px; color: var(--ink-2);
}

/* ---------- 罕见·高致死 ---------- */
.symptom-chip.rare { border-style: dashed; }
.symptom-chip.rare.active { border-style: dashed; }
.tier-hint { font-size: 11px; color: var(--muted); margin-top: 6px; }

/* ---------- 一眼可见的急症提示 ---------- */
.obvious-note {
  margin-top: 12px; padding: 9px 12px; border-radius: 9px; background: #fff7ed;
  border: 1px dashed #fdba74; color: #9a3412; font-size: 12px; line-height: 1.6;
}

/* ---------- 连续橙线提醒 ---------- */
.plan-persist {
  margin: 4px 0 10px; padding: 9px 12px; border-radius: 9px; font-size: 12.5px;
  background: #ffedd5; color: #9a3412; border: 1px solid #fdba74;
}

/* ---------- 疾病自查（症状 → 概率） ---------- */
.btn.small { padding: 5px 10px; font-size: 12px; border-radius: 9px; margin-left: auto; }
.sign-panel { margin-top: 10px; padding-top: 10px; border-top: 1px dashed #e2e8f0; }
.sign-title { font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.sign-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.sign-chip {
  border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 5px 11px;
  font-size: 12px; color: var(--ink-2); transition: all .14s;
}
.sign-chip:hover { border-color: #c3d5d1; }
.sign-chip.active { background: var(--brand-soft); border-color: #9ed3c8; color: var(--brand-deep); font-weight: 600; }
.sign-chip.red { border-color: #f3c6c6; }
.sign-chip.red.active { background: #fde8e8; border-color: #fca5a5; color: #b91c1c; }
.prob-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.prob-bar { flex: 1; height: 8px; border-radius: 999px; background: #eef2f3; overflow: hidden; }
.prob-bar i { display: block; height: 100%; border-radius: 999px; }
.prob-action { font-size: 12.5px; color: var(--ink-2); background: #f8faf9; border-radius: 8px; padding: 8px 10px; margin-bottom: 6px; }
.prob-action[data-key="emergency"] { background: #fde8e8; color: #991b1b; }
.prob-action[data-key="check"] { background: #ffeddf; color: #9a3412; }
.prob-red { font-size: 12px; color: #b91c1c; margin-bottom: 6px; }

/* ---------- 结束自查：倒计时结论 ---------- */
.scan-overlay {
  position: fixed; inset: 0; z-index: 90; display: flex; align-items: center; justify-content: center;
  background: rgba(15, 23, 42, .55); backdrop-filter: blur(4px);
}
.scan-card {
  width: min(460px, 92vw); background: #fff; border-radius: 18px; padding: 28px 24px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, .25); text-align: center;
}
.scan-ring {
  position: relative; width: 96px; height: 96px; margin: 0 auto 16px; border-radius: 50%;
  border: 6px solid #e6f4f0; display: flex; align-items: center; justify-content: center;
  font-size: 30px; font-weight: 700; color: var(--brand-deep);
}
.scan-ring::before {
  content: ""; position: absolute; inset: -6px; border-radius: 50%;
  border: 6px solid transparent; border-top-color: var(--brand);
  animation: scan-spin 1.1s linear infinite;
}
@keyframes scan-spin { to { transform: rotate(360deg); } }
.scan-card h3 { font-size: 17px; margin-bottom: 8px; }
.scan-card .hint { font-size: 12.5px; }
.verdict { border-radius: 12px; padding: 16px; margin-bottom: 12px; text-align: left; }
.verdict[data-key="emergency"] { background: #fde8e8; border: 1px solid #fecaca; }
.verdict[data-key="check"] { background: #ffeddf; border: 1px solid #fdba74; }
.verdict[data-key="observe"] { background: #e8f6ee; border: 1px solid #b7e4c7; }
.verdict-label { font-size: 20px; font-weight: 800; margin-bottom: 6px; }
.verdict[data-key="emergency"] .verdict-label { color: #b91c1c; }
.verdict[data-key="check"] .verdict-label { color: #c2410c; }
.verdict[data-key="observe"] .verdict-label { color: #15803d; }
.verdict p { font-size: 12.5px; color: var(--ink-2); margin-bottom: 4px; }
.verdict-list { list-style: none; margin: 0 0 10px; padding: 0; text-align: left; }
.verdict-list li { display: flex; justify-content: space-between; font-size: 12.5px; padding: 6px 2px; border-bottom: 1px dashed #e5e7eb; }
.verdict-list b { color: var(--ink); }
.scan-cta { display: flex; align-items: center; gap: 10px; margin-top: 12px; padding-top: 12px; border-top: 1px dashed #e2e8f0; }

/* ---------- 结论弹窗（醒目版） ---------- */
.scan-card.verdict-card {
  width: min(520px, 94vw); padding: 0; overflow: hidden; text-align: left;
  animation: verdict-pop .32s cubic-bezier(.2, 1.3, .4, 1) both;
}
.scan-card.verdict-card[data-key="emergency"] {
  box-shadow: 0 0 0 3px rgba(220, 38, 38, .25), 0 30px 80px rgba(185, 28, 28, .35);
  animation: verdict-pop .32s cubic-bezier(.2, 1.3, .4, 1) both,
             verdict-pulse 1.8s ease-in-out .4s infinite;
}
.scan-card.verdict-card[data-key="check"] {
  box-shadow: 0 0 0 3px rgba(234, 88, 12, .2), 0 30px 80px rgba(194, 65, 12, .28);
}
@keyframes verdict-pop {
  from { transform: scale(.82); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
@keyframes verdict-pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(220, 38, 38, .2), 0 30px 80px rgba(185, 28, 28, .25); }
  50% { box-shadow: 0 0 0 10px rgba(220, 38, 38, .08), 0 30px 90px rgba(185, 28, 28, .5); }
}
.verdict-popup { padding: 26px 24px 22px; }
.verdict-popup[data-key="emergency"] { background: linear-gradient(180deg, #fee2e2 0%, #fff 46%); }
.verdict-popup[data-key="check"] { background: linear-gradient(180deg, #ffedd5 0%, #fff 46%); }
.verdict-popup[data-key="observe"] { background: linear-gradient(180deg, #e7f6ec 0%, #fff 46%); }
.verdict-icon { font-size: 46px; line-height: 1; margin-bottom: 10px; }
.verdict-action { font-size: 34px; font-weight: 900; letter-spacing: 1px; margin-bottom: 10px; }
.verdict-popup[data-key="emergency"] .verdict-action { color: #b91c1c; }
.verdict-popup[data-key="check"] .verdict-action { color: #c2410c; }
.verdict-popup[data-key="observe"] .verdict-action { color: #15803d; }
.verdict-reason { font-size: 14px; color: #334155; margin-bottom: 10px; }
.verdict-top {
  font-size: 13px; font-weight: 600; color: var(--ink); background: rgba(255, 255, 255, .7);
  border: 1px solid rgba(15, 23, 42, .06); border-radius: 9px; padding: 8px 10px; margin-bottom: 12px;
}
.verdict-popup .verdict-list { margin-bottom: 12px; }
.verdict-popup .btn { width: 100%; padding: 12px; font-size: 15px; }

/* ---------- 补全基础数据（折叠） ---------- */
.baseline-panel {
  margin-top: 14px; border: 1px solid #d7e6e1; border-radius: 14px;
  background: #fff; overflow: hidden; box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
  transition: border-color .15s, box-shadow .15s;
}
.baseline-panel:hover { border-color: #9ed3c8; box-shadow: 0 6px 18px rgba(15, 23, 42, .07); }
.baseline-panel[open] { border-color: var(--brand); }
.baseline-panel summary {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 16px; cursor: pointer; list-style: none;
}
.baseline-panel summary::-webkit-details-marker { display: none; }
.baseline-head { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.baseline-title { font-size: 14px; font-weight: 700; color: var(--ink); }
.baseline-actions { display: flex; align-items: center; gap: 10px; flex: none; }
.baseline-count {
  font-size: 11.5px; color: var(--muted);
  background: #eef4f2; border-radius: 999px; padding: 3px 10px;
}
.baseline-toggle {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 13px; border-radius: 999px; background: var(--brand-soft);
  color: var(--brand-deep); font-size: 12.5px; font-weight: 700;
}
.baseline-panel[open] .baseline-toggle { background: #eef4f2; color: var(--ink-2); }
.baseline-chevron { display: inline-block; transition: transform .2s; }
.baseline-panel[open] .baseline-chevron { transform: rotate(180deg); }
.baseline-body { border-top: 1px dashed #e5e7eb; padding: 14px 16px 16px; }
.baseline-body .form-actions { margin-top: 8px; }

/* ---------- 首屏大按钮 ---------- */
.quick-picks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 4px 0 6px; }
.quick-pick {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 12px 8px; border: 1px solid var(--line); border-radius: 12px;
  background: #fff; font-size: 13px; color: var(--ink-2); transition: all .14s;
}
.quick-pick:hover { border-color: #c3d5d1; background: #f7fbfa; }
.quick-pick.active { border-color: #7cc4b6; background: var(--brand-soft); color: var(--brand-deep); font-weight: 700; }
.quick-icon { font-size: 20px; line-height: 1; }
.quick-hint { margin-bottom: 8px; }
.all-symptoms { border: 1px dashed var(--line); border-radius: 12px; padding: 10px 12px; background: #fbfdfc; }
.all-symptoms > summary { cursor: pointer; font-size: 13px; color: var(--ink-2); font-weight: 600; }
.disease-details { margin-top: 10px; border-top: 1px dashed #e2e8f0; padding-top: 10px; }
.disease-details > summary { cursor: pointer; font-size: 13px; color: var(--ink-2); font-weight: 600; }

/* ---------- 折叠的参考线与矩阵 ---------- */
.ref-card summary { list-style: none; }
.ref-card summary::-webkit-details-marker { display: none; }
.ref-card summary.card-head { cursor: pointer; }
.ref-card summary .ref-legend { font-size: 11.5px; color: var(--muted); }
.heatmap-details, .more-charts { border-top: 1px dashed #e5e7eb; margin-top: 10px; padding-top: 10px; }
.heatmap-details > summary, .more-charts > summary { cursor: pointer; font-size: 13px; color: var(--ink-2); }
.heatmap-details[open] > summary, .more-charts[open] > summary { margin-bottom: 10px; }
.trend-summary { margin-top: 4px; color: var(--ink-2); }

/* ---------- FIP 早期预警 ---------- */
.plan-fip {
  margin: 4px 0 10px; padding: 12px 14px; border-radius: 10px;
  background: #fff7ed; border: 1px solid #fdba74; color: #7c2d12;
}
.plan-fip b { font-size: 13px; display: block; margin-bottom: 4px; }
.plan-fip p { font-size: 12.5px; margin-bottom: 6px; color: #9a3412; }
.plan-fip ul { margin: 0; padding-left: 18px; font-size: 12px; color: #7c2d12; }
.plan-fip li { margin-bottom: 2px; }

/* ---------- 复发提示 ---------- */
.plan-relapse {
  margin: 4px 0 10px; padding: 12px 14px; border-radius: 10px;
  background: #f5f3ff; border: 1px solid #c4b5fd; color: #4c1d95;
}
.plan-relapse b { font-size: 13px; display: block; margin-bottom: 4px; }
.plan-relapse p { font-size: 12.5px; margin-bottom: 6px; color: #5b21b6; }
.plan-relapse .relapse-sub { font-size: 12px; font-weight: 700; margin: 6px 0 2px; color: #4c1d95; }
.plan-relapse ul { margin: 0; padding-left: 18px; font-size: 12px; color: #5b21b6; }
.plan-relapse li { margin-bottom: 2px; }

/* ---------- 就诊登记 ---------- */
.visit-panel {
  margin-top: 12px; border: 1px dashed var(--line); border-radius: 12px;
  background: #fbfdfc; padding: 10px 12px;
}
.visit-panel summary { display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 13px; color: var(--ink-2); }
.visit-panel summary::-webkit-details-marker { display: none; }
.visit-body { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; margin-top: 10px; }
.visit-field { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); }
.visit-body input[type="text"] { flex: 1; min-width: 180px; }
.plan-vet {
  margin: 4px 0 10px; padding: 9px 12px; border-radius: 9px; font-size: 12.5px;
  background: #eef6ff; border: 1px solid #bfdbfe; color: #1e40af;
}

/* ---------- 就诊记录 / 兽医分享 ---------- */
.visit-list { list-style: none; margin: 10px 0 0; padding: 0; }
.visit-list li { display: flex; gap: 10px; padding: 8px 2px; border-bottom: 1px dashed #e5e7eb; font-size: 12.5px; }
.visit-list b { flex: none; color: var(--ink); min-width: 130px; }
.visit-list span { color: var(--ink-2); }
.vet-share { display: flex; align-items: center; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.vet-share input { flex: 1; min-width: 220px; font-size: 12px; }

/* ---------- 兽医工作台 ---------- */
.vet-body { background: #f4f7f6; }
.vet-main { max-width: 980px; margin: 0 auto; padding: 20px 16px 60px; display: grid; gap: 14px; }
.vet-table { overflow-x: auto; }
.heat-table { border-collapse: collapse; font-size: 12px; width: 100%; }
.heat-table th, .heat-table td { border: 1px solid #e5e7eb; padding: 5px 6px; text-align: center; }
.heat-table th { background: #f8faf9; font-weight: 600; }
.vet-form { display: grid; gap: 10px; }
.vet-form label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); }
.vet-row { display: flex; gap: 10px; flex-wrap: wrap; }
.vet-row label { flex: 1; min-width: 150px; }
.vet-form .full { width: 100%; }
.med-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.med-row input { flex: 1; min-width: 110px; }
.error-card { margin: 40px auto; max-width: 640px; color: #b91c1c; }

.plan-vet .vet-line { margin-top: 4px; font-size: 12px; color: #1e3a8a; }

.metrics-jump { margin-top: 8px; }

/* ---------- 进展信号 ---------- */
.watch-for {
  margin: 6px 0 4px; padding: 7px 10px; border-radius: 8px;
  background: #fff7ed; border: 1px dashed #fdba74; color: #9a3412; font-size: 12px; line-height: 1.6;
}
.watch-for.strong {
  font-weight: 700; border: 1px solid #f97316; background: #fff1e6;
  box-shadow: inset 3px 0 0 #f97316; color: #7c2d12;
}
.masquerade-tag {
  background: #fff1e6; color: #c2410c; border: 1px solid #fdba74;
}
.plan-fip .watch-for { background: #fff; border-color: #fdba74; }

/* ---------- 合规页面 ---------- */
.legal-body { background: #f4f7f6; }
.legal {
  max-width: 760px; margin: 32px auto; padding: 28px 26px 36px; background: #fff;
  border-radius: 16px; box-shadow: 0 4px 24px rgba(15, 23, 42, .06);
  font-size: 14px; line-height: 1.85; color: var(--ink-2);
}
.legal h1 { font-size: 24px; color: var(--ink); margin-bottom: 4px; }
.legal h2 { font-size: 16px; color: var(--ink); margin: 22px 0 6px; }
.legal ul { padding-left: 20px; margin: 6px 0; }
.legal li { margin-bottom: 4px; }
.legal-meta { color: var(--muted); font-size: 12px; margin-bottom: 12px; }
.legal-note { margin-top: 24px; padding-top: 12px; border-top: 1px dashed #e5e7eb; font-size: 12px; color: var(--muted); }
.legal-back { font-size: 13px; color: var(--brand-deep); text-decoration: none; }
.auth-form label.consent,
.consent {
  display: flex; flex-direction: row; gap: 8px; align-items: flex-start;
  font-size: 12px; color: var(--muted); line-height: 1.5;
}
.consent input[type="checkbox"] { width: auto; height: 16px; margin-top: 2px; flex: none; accent-color: var(--brand); }
.consent a { color: var(--brand-deep); }
.auth-legal { margin-top: 8px; display: flex; gap: 12px; justify-content: center; font-size: 12px; }
.auth-legal a { color: var(--muted); text-decoration: none; }
.auth-legal a:hover { color: var(--brand-deep); }

/* ---------- 页脚备案 ---------- */
.site-foot {
  max-width: 1280px; margin: 8px auto 0; padding: 18px 28px 26px;
  display: flex; gap: 8px; flex-wrap: wrap; align-items: center;
  color: var(--muted); font-size: 12.5px;
}
.site-foot a { color: var(--muted); text-decoration: none; }
.site-foot a:hover { color: var(--brand-deep); text-decoration: underline; }
.foot-dot { opacity: .5; }
.legal-foot { margin-top: 18px; padding-top: 12px; border-top: 1px dashed #e5e7eb; font-size: 12px; color: var(--muted); }
.legal-foot a { color: var(--muted); }

/* ---------- 响应式 ---------- */
@media (max-width: 760px) {
  /* 手机上先看自查，再看风险与规则 */
  .layout { display: flex; flex-direction: column; }
  .sidebar { display: contents; }
  .pet-card { order: 1; padding: 12px 14px; }
  .content { order: 2; }
  .risk-card { order: 3; }
  .meta-card { order: 4; }

  .pet-card .card-head { margin-bottom: 8px; }
  .pet-list { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
  .pet-item { min-width: 156px; flex: none; }

  #check-section .card-head { display: flex; flex-direction: column; align-items: stretch; gap: 8px; }
  #check-section .card-head > div { width: 100%; }
  #check-section .card-head .hint { margin-top: 4px; }
  .date-field {
    width: 100%; display: flex; align-items: center; justify-content: space-between;
    gap: 8px; white-space: nowrap;
  }
  .date-field input { width: auto; flex: none; }

  .baseline-title { white-space: nowrap; }
  .baseline-head .hint { font-size: 11.5px; }
  .baseline-panel summary { padding: 12px 14px; }
  .baseline-toggle { padding: 6px 10px; }

  .quick-picks { grid-template-columns: repeat(2, 1fr); }
  .step-title { font-size: 13.5px; }
}

@media (max-width: 1000px) {
  .layout { grid-template-columns: 1fr; padding: 8px 16px 40px; }
  .sidebar { position: static; }
  .topbar { padding: 18px 16px 8px; flex-wrap: wrap; }
  .top-actions .chip { display: none; }
  .dim-row { grid-template-columns: 1fr; gap: 8px; }
  .redline-list { grid-template-columns: 1fr; }
  .metrics-row { grid-template-columns: 1fr 1fr; }
  .report-card { flex-direction: column; align-items: stretch; }
}
