/* ============================================================
   毛细血管分析系统 — 产品原型
   设计系统 / 全局样式
   ============================================================ */

:root {
  /* 品牌 */
  --brand:        #0e9f8a;
  --brand-strong: #0b7f6e;
  --brand-soft:   #e6f6f2;
  --brand-grad:   linear-gradient(135deg, #12b89c 0%, #0e9f8a 55%, #0a7d6c 100%);

  /* 数据 / 图表（来自参考色板） */
  --accent:       #2a78d6;
  --accent-soft:  #eaf2fd;

  /* 状态色 */
  --good:    #0ca30c;
  --warn:    #b5760a;   /* 文字可读的琥珀 */
  --warn-bg: #fab219;
  --serious: #ec835a;
  --crit:    #d03b3b;

  /* 中性色 */
  --bg:         #f4f6f9;
  --card:       #ffffff;
  --ink:        #15222e;
  --ink-2:      #55626f;
  --ink-3:      #8a94a0;
  --line:       #e7ebf0;
  --line-2:     #d7dde4;

  /* 结构 */
  --radius:     16px;
  --radius-sm:  10px;
  --shadow:     0 12px 32px rgba(21, 42, 66, .08);
  --shadow-lg:  0 24px 60px rgba(21, 42, 66, .14);

  --sans: system-ui, -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--brand); text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

/* ---------- 布局骨架 ---------- */
.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  height: 64px;
  background: rgba(255,255,255,.86);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  padding: 0 28px;
  position: sticky;
  top: 0;
  z-index: 50;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  font-weight: 700;
  font-size: 16.5px;
  letter-spacing: .2px;
}

.brand .logo {
  width: 34px; height: 34px;
  border-radius: 10px;
  background: var(--brand-grad);
  display: grid; place-items: center;
  box-shadow: 0 4px 12px rgba(14,159,138,.35);
  color: #fff;
  flex: none;
}

.brand .logo svg { width: 20px; height: 20px; }

.brand small {
  display: block;
  font-weight: 500;
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: .4px;
  margin-top: 1px;
}

.topbar .spacer { flex: 1; }

.btn-home {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line-2);
  background: #fff;
  color: var(--ink-2);
  border-radius: 999px;
  padding: 8px 15px;
  font-size: 13px;
  font-weight: 600;
  margin-right: 14px;
  transition: border-color .2s ease, color .2s ease, transform .12s ease;
  flex: none;
}
.btn-home svg { width: 15px; height: 15px; }
.btn-home:hover { border-color: var(--brand); color: var(--brand); }
.btn-home:active { transform: translateY(1px); }

.brand-link { cursor: pointer; }

.pill {
  font-size: 12px;
  font-weight: 600;
  color: var(--brand-strong);
  background: var(--brand-soft);
  padding: 6px 12px;
  border-radius: 999px;
  letter-spacing: .3px;
}

.lang-switch {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-2);
  background: #fff;
  border: 1px solid var(--line-2);
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
  letter-spacing: .3px;
  margin-right: 12px;
  transition: border-color .2s ease, color .2s ease;
}
.lang-switch:hover { border-color: var(--brand); color: var(--brand); }

.stage {
  flex: 1;
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 40px 24px 72px;
}

/* ---------- 通用组件 ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: 12px;
  font-weight: 600;
  font-size: 15px;
  padding: 13px 24px;
  transition: transform .12s ease, box-shadow .2s ease, background .2s ease;
  letter-spacing: .2px;
  text-decoration: none;
  cursor: pointer;
}
.btn:active { transform: translateY(1px) scale(.99); }

.btn-primary {
  background: var(--brand-grad);
  color: #fff;
  box-shadow: 0 8px 20px rgba(14,159,138,.32);
}
.btn-primary:hover { box-shadow: 0 12px 28px rgba(14,159,138,.42); }

.btn-ghost {
  background: #fff;
  color: var(--ink-2);
  border: 1px solid var(--line-2);
}
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); }

.btn-soft {
  background: var(--brand-soft);
  color: var(--brand-strong);
}
.btn-soft:hover { background: #d7efea; }

.btn-lg { font-size: 20px; padding: 19px 62px; border-radius: 18px; letter-spacing: .5px; }
.hero .btn-lg {
  margin: 8px 0 46px;
  min-width: 300px;
  box-shadow: 0 16px 36px rgba(14,159,138,.40);
}
.hero .btn-lg:hover { box-shadow: 0 20px 44px rgba(14,159,138,.50); }
.btn-block { width: 100%; }

.btn:disabled { opacity: .5; cursor: not-allowed; }

/* 标签 */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 600;
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--bg);
  color: var(--ink-2);
  border: 1px solid var(--line);
}
.chip svg { width: 13px; height: 13px; }

/* 分割标题 */
.section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 17px;
  font-weight: 700;
  margin: 0 0 16px;
}
.section-title::before {
  content: "";
  width: 4px; height: 18px;
  border-radius: 2px;
  background: var(--brand-grad);
}
.section-title .hint { font-size: 12.5px; font-weight: 500; color: var(--ink-3); }

/* ============================================================
   首页 / 落地
   ============================================================ */
.hero {
  text-align: center;
  padding: 26px 0 8px;
}
.hero h1 {
  font-size: 40px;
  line-height: 1.22;
  margin: 0 0 14px;
  letter-spacing: .5px;
}
.hero h1 .accent {
  background: var(--brand-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero p.lead {
  font-size: 16.5px;
  color: var(--ink-2);
  max-width: 620px;
  margin: 0 auto 30px;
  line-height: 1.7;
}

.flow-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-wrap: nowrap;
  margin-bottom: 40px;
}
.flow-step {
  display: flex;
  align-items: center;
  gap: 7px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-2);
  box-shadow: var(--shadow);
  white-space: nowrap;
}
.flow-step .num {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand-strong);
  display: grid; place-items: center;
  font-size: 12px; font-weight: 700;
}
.flow-arrow { color: var(--ink-3); font-size: 15px; }

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-bottom: 40px;
}
.feature {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 22px;
  box-shadow: var(--shadow);
  text-align: left;
}
.feature .ico {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: var(--brand-soft);
  color: var(--brand-strong);
  display: grid; place-items: center;
  margin-bottom: 14px;
}
.feature .ico svg { width: 22px; height: 22px; }
.feature h3 { margin: 0 0 7px; font-size: 15.5px; }
.feature p { margin: 0; font-size: 13px; color: var(--ink-2); line-height: 1.65; }

/* ============================================================
   采集页
   ============================================================ */
.capture-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 22px;
  align-items: start;
}

.viewport {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: #0c1214;
  box-shadow: var(--shadow);
  aspect-ratio: 4 / 3;
}
.viewport video, .viewport img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.viewport .overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.viewport .frame {
  position: absolute;
  inset: 7%;
  border: 2px solid rgba(255,255,255,.55);
  border-radius: 18px;
}
.viewport .frame::before, .viewport .frame::after {
  content: "";
  position: absolute;
  width: 22px; height: 22px;
  border: 3px solid #38e0c0;
}
.viewport .frame::before { top: -3px; left: -3px; border-right: 0; border-bottom: 0; border-top-left-radius: 14px; }
.viewport .frame::after { bottom: -3px; right: -3px; border-left: 0; border-top: 0; border-bottom-right-radius: 14px; }

.viewport .corner-tl, .viewport .corner-br { position: absolute; width: 22px; height: 22px; border: 3px solid #38e0c0; }
.viewport .corner-tl { top: calc(7% - 2px); left: calc(7% - 2px); border-right: 0; border-bottom: 0; border-top-left-radius: 14px; }
.viewport .corner-br { bottom: calc(7% - 2px); right: calc(7% - 2px); border-left: 0; border-top: 0; border-bottom-right-radius: 14px; }

.viewport .rec-dot {
  position: absolute;
  top: 16px; left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(0,0,0,.45);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 999px;
  backdrop-filter: blur(4px);
}
.viewport .rec-dot .dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: #ff4d4d;
  animation: blink 1.1s infinite;
}
@keyframes blink { 50% { opacity: .25; } }

.viewport .hint-tag {
  position: absolute;
  left: 16px; bottom: 16px;
  font-size: 12px;
  color: rgba(255,255,255,.85);
  background: rgba(0,0,0,.4);
  padding: 5px 11px;
  border-radius: 999px;
}

.viewport .cam-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 24px;
  text-align: center;
  color: rgba(255,255,255,.72);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .5px;
  pointer-events: none;
}
.viewport .cam-placeholder svg {
  width: 42px; height: 42px;
  color: rgba(255,255,255,.42);
}

.capture-controls {
  display: flex;
  gap: 12px;
  margin-top: 16px;
  align-items: center;
  justify-content: center;
}
.shutter {
  width: 68px; height: 68px;
  border-radius: 50%;
  background: #fff;
  border: 5px solid var(--brand);
  position: relative;
  transition: transform .12s;
}
.shutter:active { transform: scale(.92); }
.shutter:disabled { opacity: .4; cursor: not-allowed; }
.shutter.recording { border-color: #ff4d4d; }
.shutter.recording::after {
  content: ""; position: absolute; inset: 6px;
  background: #ff4d4d; border-radius: 8px;
}

.mode-switch {
  display: inline-flex;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px;
  box-shadow: var(--shadow);
}
.mode-switch button {
  border: none;
  background: transparent;
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-2);
}
.mode-switch button.active {
  background: var(--brand-grad);
  color: #fff;
  box-shadow: 0 3px 10px rgba(14,159,138,.3);
}

.preview-thumbs {
  display: flex;
  gap: 12px;
  margin-top: 14px;
  flex-wrap: wrap;
}
.preview-thumbs .thumb {
  position: relative;
  width: 128px; height: 96px;
  border-radius: 10px;
  overflow: hidden;
  border: 2px solid transparent;
  cursor: pointer;
  background: #000;
  flex: none;
}
.preview-thumbs .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.preview-thumbs .thumb.sel { border-color: var(--brand); }
.preview-thumbs .thumb .no {
  position: absolute; left: 4px; top: 4px;
  min-width: 20px; height: 20px; padding: 0 4px;
  background: rgba(0,0,0,.65); color: #fff;
  font-size: 11px; line-height: 20px; text-align: center;
  border-radius: 5px;
  font-weight: 600;
}
.preview-thumbs .thumb .dur {
  position: absolute; right: 4px; bottom: 4px;
  background: rgba(0,0,0,.65); color: #fff;
  font-size: 11px; padding: 2px 6px; border-radius: 5px;
}
.preview-thumbs .thumb .vid {
  position: absolute; left: 50%; top: 50%;
  transform: translate(-50%,-50%);
  color: #fff; font-size: 22px;
  text-shadow: 0 1px 3px rgba(0,0,0,.7);
}
.preview-thumbs .thumb .del {
  position: absolute; right: 4px; top: 4px;
  width: 24px; height: 24px;
  border: none; padding: 0;
  border-radius: 50%;
  background: rgba(0,0,0,.62);
  color: #fff;
  font-size: 13px;
  line-height: 1;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  z-index: 2;
}
.preview-thumbs .thumb .del:hover { background: #d03b3b; }

/* 采集页：视频标记、返回拍摄、分析提示 */
.video-badge {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%,-50%);
  z-index: 4;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(0,0,0,.55);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  padding: 9px 16px;
  border-radius: 999px;
  backdrop-filter: blur(4px);
}
.resume-btn {
  position: absolute;
  top: 14px; right: 14px;
  z-index: 5;
  border: none;
  background: rgba(0,0,0,.55);
  color: #fff;
  font-size: 12.5px;
  font-weight: 600;
  padding: 7px 13px;
  border-radius: 999px;
  backdrop-filter: blur(4px);
  transition: background .2s ease;
}
.resume-btn:hover { background: rgba(14,159,138,.85); }
.analyze-hint {
  margin-top: 10px;
  font-size: 12.5px;
  color: #b5760a;
  background: #fdf3dc;
  border: 1px solid #f3e3b8;
  border-radius: 8px;
  padding: 8px 12px;
}

/* 侧栏 */
.capture-side h2 { margin: 0 0 6px; font-size: 19px; }
.capture-side .sub { color: var(--ink-2); font-size: 13.5px; margin: 0 0 18px; line-height: 1.6; }

.step-list { list-style: none; margin: 0; padding: 0; }
.step-list li {
  display: flex;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 14px;
  color: var(--ink-2);
}
.step-list li:last-child { border-bottom: 0; }
.step-list .idx {
  width: 22px; height: 22px; flex: none;
  border-radius: 50%;
  background: var(--bg);
  color: var(--ink-3);
  display: grid; place-items: center;
  font-size: 12px; font-weight: 700;
  margin-top: 1px;
}
.step-list li.done .idx { background: var(--brand-soft); color: var(--brand-strong); }
.step-list li.done .idx::after { content: "✓"; }

/* ============================================================
   分析进度页
   ============================================================ */
.analyze {
  max-width: 560px;
  margin: 40px auto;
  text-align: center;
  padding: 48px 40px;
}
.analyze .scan-orb {
  width: 120px; height: 120px;
  margin: 0 auto 30px;
  position: relative;
}
.analyze .scan-orb .ring {
  position: absolute; inset: 0;
  border-radius: 50%;
  border: 2px solid var(--brand-soft);
}
.analyze .scan-orb .ring.a { animation: pulse 2s ease-out infinite; }
.analyze .scan-orb .ring.b { animation: pulse 2s .5s ease-out infinite; }
.analyze .scan-orb .ring.c { animation: pulse 2s 1s ease-out infinite; }
@keyframes pulse {
  0% { transform: scale(.55); opacity: .9; }
  100% { transform: scale(1.5); opacity: 0; }
}
.analyze .scan-orb .core {
  position: absolute; inset: 24px;
  border-radius: 50%;
  background: var(--brand-grad);
  display: grid; place-items: center;
  color: #fff;
  box-shadow: 0 10px 30px rgba(14,159,138,.4);
}
.analyze .scan-orb .core svg { width: 34px; height: 34px; }

.analyze h2 { margin: 0 0 8px; font-size: 22px; }
.analyze .status-line { color: var(--ink-2); font-size: 14.5px; margin-bottom: 28px; min-height: 22px; }

.progress-track {
  height: 8px;
  background: var(--line);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 26px;
}
.progress-fill {
  height: 100%;
  width: 0%;
  background: var(--brand-grad);
  border-radius: 999px;
  transition: width .3s ease;
}

.analyze-steps { text-align: left; }
.analyze-steps .row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  font-size: 14px;
  color: var(--ink-3);
  border-bottom: 1px dashed var(--line);
}
.analyze-steps .row:last-child { border: 0; }
.analyze-steps .row .st {
  width: 20px; height: 20px; flex: none;
  border-radius: 50%;
  border: 2px solid var(--line-2);
  display: grid; place-items: center;
  font-size: 11px;
}
.analyze-steps .row.doing { color: var(--ink); font-weight: 600; }
.analyze-steps .row.doing .st { border-color: var(--brand); }
.analyze-steps .row.doing .st::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--brand); animation: blink 1s infinite; }
.analyze-steps .row.done { color: var(--ink-2); }
.analyze-steps .row.done .st { background: var(--brand-soft); border-color: var(--brand); color: var(--brand-strong); }
.analyze-steps .row.done .st::after { content: "✓"; }

/* ============================================================
   报告页
   ============================================================ */
.report-head {
  display: flex;
  gap: 24px;
  align-items: stretch;
  margin-bottom: 22px;
}
.score-hero {
  flex: 1;
  background: var(--brand-grad);
  color: #fff;
  border-radius: var(--radius);
  padding: 30px 32px;
  display: flex;
  align-items: center;
  gap: 30px;
  box-shadow: 0 18px 44px rgba(14,159,138,.34);
  position: relative;
  overflow: hidden;
}
.score-hero::after {
  content: "";
  position: absolute;
  right: -60px; top: -60px;
  width: 220px; height: 220px;
  border-radius: 50%;
  background: rgba(255,255,255,.12);
}
.score-hero .big-score {
  flex: none;
  text-align: center;
}
.score-hero .big-score .num {
  font-size: 84px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -2px;
  font-variant-numeric: tabular-nums;
}
.score-hero .big-score .cap { font-size: 14px; opacity: .85; margin-top: 6px; }
.score-hero .meta { flex: 1; }
.score-hero .grade-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(255,255,255,.18);
  border: 1px solid rgba(255,255,255,.35);
  border-radius: 999px;
  padding: 6px 16px;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 12px;
}
.score-hero .grade-badge b { font-size: 20px; }
.score-hero h2 { margin: 0 0 6px; font-size: 22px; }
.score-hero p { margin: 0; font-size: 14px; opacity: .92; line-height: 1.6; }

.age-card {
  width: 260px;
  flex: none;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 24px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.age-card .lbl { font-size: 13px; color: var(--ink-3); font-weight: 600; letter-spacing: .5px; }
.age-card .age-num { font-size: 46px; font-weight: 800; color: var(--accent); line-height: 1.1; margin: 6px 0 2px; font-variant-numeric: tabular-nums; }
.age-card .age-num small { font-size: 16px; font-weight: 600; color: var(--ink-3); }
.age-card .note { font-size: 12.5px; color: var(--ink-2); line-height: 1.6; }
.age-card .input-row { margin-top: 12px; display: flex; gap: 8px; align-items: center; }
.age-card input[type=number] {
  width: 100%;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  padding: 9px 12px;
  font-size: 14px;
  font-family: inherit;
}
.age-card input[type=number]:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }

.two-col { display: block; margin-bottom: 22px; }
.two-col .detail-wrap { margin-bottom: 22px; }

.radar-wrap {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 22px 10px;
  box-shadow: var(--shadow);
}
.radar-wrap .radar-svg { width: 100%; height: auto; display: block; }

.detail-wrap {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 22px 8px;
  box-shadow: var(--shadow);
}

.dim-row { padding: 11px 0; border-bottom: 1px solid var(--line); }
.dim-row:last-child { border-bottom: 0; }
.dim-row .top { display: flex; align-items: baseline; margin-bottom: 8px; }
.dim-row .name { font-weight: 700; font-size: 14.5px; }
.dim-row .unit { font-size: 11.5px; color: var(--ink-3); margin-left: 7px; font-weight: 500; }
.dim-row .sc { margin-left: auto; font-weight: 800; font-size: 16px; color: var(--accent); font-variant-numeric: tabular-nums; }
.dim-row .sc span { font-size: 12px; color: var(--ink-3); font-weight: 600; }
.dim-row .bar {
  height: 9px; border-radius: 999px;
  background: var(--line);
  overflow: hidden;
}
.dim-row .bar i {
  display: block; height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), #6da7ec);
  width: 0;
  transition: width .8s cubic-bezier(.2,.8,.2,1);
}
.dim-row .desc { font-size: 12.5px; color: var(--ink-2); margin-top: 8px; line-height: 1.55; }

.extra-row { padding: 12px 0; border-bottom: 1px solid var(--line); }
.extra-row:last-child { border-bottom: 0; }
.extra-row .e-top { display: flex; align-items: baseline; gap: 10px; }
.extra-row .e-name { font-weight: 700; font-size: 14.5px; }
.extra-row .e-val { margin-left: auto; font-weight: 800; font-size: 16px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.extra-row .e-val.good { color: var(--good); }
.extra-row .e-val.bad { color: var(--crit); }
.extra-row .e-val.mid { color: var(--accent); }
.extra-row .e-desc { font-size: 12.5px; color: var(--ink-2); margin-top: 8px; line-height: 1.55; }
.advice-list { margin: 8px 0 2px; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; }
.advice-list li { font-size: 12.5px; color: var(--ink-2); line-height: 1.55; padding-left: 18px; position: relative; }
.advice-list li::before { content: ""; position: absolute; left: 2px; top: 9px; width: 6px; height: 6px; border-radius: 50%; background: var(--brand); }

.quality-bar {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 22px;
}
.q-item {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 16px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
}
.q-item .q-ico { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; flex: none; }
.q-item .q-ico svg { width: 20px; height: 20px; }
.q-item .q-txt { display: flex; flex-direction: column; align-items: center; }
.q-item .q-name { font-size: 12px; color: var(--ink-3); font-weight: 600; letter-spacing: .5px; }
.q-item .q-val { font-size: 17px; font-weight: 700; color: var(--ink); margin-top: 4px; line-height: 1.2; }
.q-item .q-time { font-size: 14px; font-weight: 600; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.q-item .q-id { font-size: 13px; font-weight: 600; font-family: ui-monospace, "SF Mono", Consolas, monospace; color: var(--brand-strong); background: var(--brand-soft); padding: 3px 10px; border-radius: 7px; margin-top: 6px; }

.abnormal-bar { margin-bottom: 22px; }
.abnormal-bar .chips { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 4px; }

.disclaimer {
  background: #fffbf0;
  border: 1px solid #f3e3b8;
  border-radius: var(--radius);
  padding: 16px 20px;
  display: flex;
  gap: 12px;
  font-size: 13px;
  color: #7a5b16;
  line-height: 1.7;
  margin-bottom: 22px;
}
.disclaimer svg { flex: none; width: 18px; height: 18px; margin-top: 2px; color: #d99a1c; }

.report-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

/* 分享区：报告二维码 + H5 入口（分析完成后自动生成） */
.share-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  margin-top: 22px;
  align-items: stretch;
}
.share-qr { padding: 22px; text-align: center; }
.share-qr .qr-box { width: 200px; height: 200px; }
.share-qr .url {
  font-family: ui-monospace, "SF Mono", Consolas, monospace;
  font-size: 12px;
  color: var(--brand-strong);
  background: var(--brand-soft);
  border-radius: 8px;
  padding: 8px 12px;
  display: inline-block;
  word-break: break-all;
  max-width: 100%;
}
.share-side { padding: 24px; }
.share-desc { color: var(--ink-2); font-size: 13.5px; line-height: 1.7; margin: 0 0 18px; }
.result-head { text-align: center; margin: 8px 0 6px; }
.result-head h2 { margin: 0 0 6px; font-size: 26px; color: var(--ink); }
.result-head p { margin: 0; color: var(--ink-2); font-size: 14px; }

/* ============================================================
   二维码页
   ============================================================ */
.qr-page { max-width: 520px; margin: 30px auto; text-align: center; }
.qr-card { padding: 42px 40px; }
.qr-box {
  width: 230px; height: 230px;
  margin: 0 auto 22px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  background: #fff;
  display: grid; place-items: center;
  box-shadow: var(--shadow);
}
.qr-box img, .qr-box canvas { width: 100%; height: 100%; }
.qr-box .qr-fallback { width: 100%; height: 100%; display: grid; place-items: center; font-size: 13px; color: var(--ink-3); }
.qr-page h2 { margin: 0 0 8px; font-size: 22px; }
.qr-page .url {
  font-family: ui-monospace, "SF Mono", Consolas, monospace;
  font-size: 13px;
  color: var(--brand-strong);
  background: var(--brand-soft);
  border-radius: 8px;
  padding: 8px 12px;
  display: inline-block;
  word-break: break-all;
  margin-bottom: 22px;
}
.qr-page .tips { text-align: left; margin: 22px 0 0; font-size: 13px; color: var(--ink-2); line-height: 1.7; }

/* ---------- 报告原始图像卡 ---------- */
.image-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  margin-bottom: 22px;
}
.image-card img {
  width: 100%;
  display: block;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #f3e2d8;
}

/* ============================================================
   移动端报告（report.html）
   ============================================================ */
.m-report { max-width: 520px; margin: 0 auto; padding: 20px 16px 44px; }
.m-report .m-hero {
  background: var(--brand-grad);
  color: #fff;
  border-radius: 22px;
  padding: 30px 24px 34px;
  margin: 0 0 16px;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: 0 18px 44px rgba(14,159,138,.34);
}
.m-report .m-hero::after {
  content: ""; position: absolute; right: -50px; top: -50px;
  width: 180px; height: 180px; border-radius: 50%;
  background: rgba(255,255,255,.12);
}
.m-report .m-score { font-size: 76px; font-weight: 800; line-height: 1; letter-spacing: -2px; }
.m-report .m-grade { display: inline-flex; gap: 8px; align-items: center; background: rgba(255,255,255,.2); border-radius: 999px; padding: 5px 15px; font-weight: 700; margin-top: 8px; }
.m-report .m-age { margin-top: 14px; font-size: 14px; opacity: .95; }
.m-report .m-age b { font-size: 22px; }
.m-report .m-card {
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  border-radius: 18px;
  padding: 20px;
  margin-bottom: 14px;
}

/* ============ 媒体浏览灯箱 ============ */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(6,10,14,.94);
  display: flex;
  align-items: center;
  justify-content: center;
}
.lb-stage {
  max-width: 92vw;
  max-height: 84vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lb-stage img, .lb-stage video {
  max-width: 92vw;
  max-height: 84vh;
  border-radius: 12px;
  box-shadow: 0 24px 70px rgba(0,0,0,.55);
  background: #000;
}
.lb-close {
  position: absolute;
  top: 18px; right: 22px;
  z-index: 1002;
  width: 42px; height: 42px;
  border: none;
  border-radius: 50%;
  background: rgba(255,255,255,.14);
  color: #fff;
  font-size: 18px;
  display: grid; place-items: center;
  transition: background .2s ease;
}
.lb-close:hover { background: rgba(255,255,255,.28); }
.lb-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1002;
  width: 48px; height: 48px;
  border: none;
  border-radius: 50%;
  background: rgba(255,255,255,.14);
  color: #fff;
  font-size: 28px;
  line-height: 1;
  display: grid; place-items: center;
  transition: background .2s ease;
}
.lb-nav:hover { background: rgba(255,255,255,.28); }
.lb-prev { left: 20px; }
.lb-next { right: 20px; }
.lb-caption {
  position: absolute;
  bottom: 22px; left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,.9);
  font-size: 13px;
  background: rgba(0,0,0,.45);
  padding: 6px 14px;
  border-radius: 999px;
  backdrop-filter: blur(4px);
}

#review-img { cursor: zoom-in; }

/* ---------- 报告原始图像（多图 · 左右滚动） ---------- */
.cap-gallery {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 8px;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
}
.cap-gallery::-webkit-scrollbar { height: 6px; }
.cap-gallery::-webkit-scrollbar-thumb { background: #d6dbe0; border-radius: 999px; }
.cap-gallery::-webkit-scrollbar-track { background: transparent; }
.cap-gallery img {
  flex: 0 0 auto;
  width: 340px;
  max-width: 84vw;
  aspect-ratio: 15 / 8;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #f3e2d8;
  scroll-snap-align: start;
}
.cap-gallery img:only-child {
  width: 100%;
  max-width: none;
}

/* ---------- 选择分析图片弹窗 ---------- */
.modal-mask {
  position: fixed;
  inset: 0;
  z-index: 900;
  background: rgba(6, 10, 14, .55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal {
  width: 100%;
  max-width: 560px;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .3);
  padding: 22px;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
}
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.modal-head h3 { margin: 0; font-size: 18px; color: var(--ink); }
.modal-close {
  border: none;
  background: transparent;
  font-size: 20px;
  color: var(--ink-3);
  cursor: pointer;
  line-height: 1;
  padding: 4px;
}
.modal-close:hover { color: var(--ink); }
.modal-sub {
  margin: 0 0 14px;
  font-size: 13px;
  color: var(--ink-2);
}
.pick-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  overflow-y: auto;
  padding: 2px;
  flex: 1 1 auto;
  min-height: 0;
  align-content: start;
}
.pick-item {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  aspect-ratio: 4 / 3;
  background: #f3e2d8;
}
.pick-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.pick-item .pick-check {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(0, 0, 0, .4);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 12px;
  opacity: 0;
  transition: opacity .15s ease;
}
.pick-item .pick-no {
  position: absolute;
  left: 6px;
  top: 6px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  background: rgba(0, 0, 0, .55);
  color: #fff;
  font-size: 11px;
  line-height: 20px;
  text-align: center;
  border-radius: 6px;
  font-weight: 700;
}
.pick-item.sel { border-color: var(--brand); }
.pick-item.sel .pick-check { opacity: 1; background: var(--brand); }
.modal-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 16px;
}
.modal-actions {
  display: flex;
  gap: 10px;
}
.pick-count {
  font-size: 13px;
  color: var(--ink-2);
  font-weight: 600;
}
.pick-count.limit {
  color: #d03b3b;
}
.modal-foot .btn { min-width: 110px; }
.modal-foot .btn[disabled] { opacity: .5; cursor: not-allowed; }

/* ---------- 开始检测 · 受检者信息弹窗 ---------- */
.modal.pf-modal { max-width: 620px; }
.pf-form { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; }
.pf-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; overflow-y: auto; flex: 1 1 auto; min-height: 0; padding: 2px; }
.pf-field { display: flex; flex-direction: column; gap: 6px; }
.pf-field.full { grid-column: 1 / -1; }
.pf-field label { font-size: 12.5px; color: var(--ink-2); font-weight: 600; }
.pf-field label em { color: var(--crit); font-style: normal; margin-left: 2px; }
.pf-field > input, .pf-field > select {
  font-family: inherit; font-size: 14px; color: var(--ink);
  border: 1px solid var(--line); border-radius: 9px;
  padding: 10px 12px; background: #fff; width: 100%;
}
.pf-field > input:focus, .pf-field > select:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.pf-radio { display: flex; gap: 20px; padding: 7px 2px; }
.pf-radio label { display: inline-flex; align-items: center; gap: 7px; font-size: 14px; color: var(--ink); font-weight: 500; cursor: pointer; }
.pf-radio input { width: 16px; height: 16px; accent-color: var(--brand); }
.pf-hint { font-size: 12px; color: var(--ink-3); min-height: 16px; margin: 8px 0 0; }

/* ---------- 报告 · 受检者信息 ---------- */
.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 16px; }
.info-item { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px dashed var(--line); font-size: 13.5px; }
.info-item.wide { grid-column: 1 / -1; }
.info-item .k { color: var(--ink-3); flex: none; }
.info-item .v { color: var(--ink); font-weight: 600; text-align: right; word-break: break-all; }
@media (max-width: 480px) {
  .pf-grid { grid-template-columns: 1fr; }
  .info-grid { grid-template-columns: 1fr; }
  .info-item.wide { grid-column: auto; }
}

@media (max-width: 480px) {
  .pick-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- 轻提示 toast ---------- */
.toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1200;
  background: rgba(21, 34, 46, .92);
  color: #fff;
  padding: 10px 20px;
  border-radius: 999px;
  font-size: 13px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, .3);
  transition: opacity .2s ease;
}

/* 响应式 */
@media (max-width: 860px) {
  .stage { padding: 24px 16px 60px; }
  .hero h1 { font-size: 30px; }
  .hero .btn-lg { width: 100%; min-width: 0; padding-left: 24px; padding-right: 24px; }
  .feature-grid { grid-template-columns: 1fr; }
  .capture-grid { grid-template-columns: 1fr; }
  .report-head { flex-direction: column; }
  .age-card { width: auto; }
  .quality-bar { grid-template-columns: 1fr; }
  .flow-arrow { display: none; }
  .flow-strip { flex-wrap: wrap; }
}

/* 工具 */
.hidden { display: none !important; }
.muted { color: var(--ink-3); }
.center { text-align: center; }
