/* ===== 月安 · 全局样式（移动优先，无外部依赖） ===== */
:root {
  --rose: #c2556d;        /* 主色 */
  --rose-deep: #a83d56;
  --rose-light: #f7e8ec;  /* 浅粉底 */
  --rose-lighter: #fdf5f7;
  --amber: #d9973f;       /* 警示/暖色 */
  --green: #4d8a6a;       /* 安心绿 */
  --text: #3d2f33;
  --text-muted: #8a747b;
  --line: #efdfe4;
  --card: #ffffff;
  --shadow: 0 4px 16px rgba(160, 90, 110, .10);
  --radius: 14px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", system-ui, sans-serif;
  background: linear-gradient(180deg, #fdf5f7 0%, #faf1f3 40%, #fdf9f8 100%);
  color: var(--text);
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container { width: 100%; max-width: 720px; margin: 0 auto; padding: 0 16px; }

/* ===== 顶部 ===== */
.site-header {
  background: rgba(255,255,255,.85);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 10;
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 56px; }
.brand { display: flex; align-items: center; gap: 8px; font-size: 20px; font-weight: 700; color: var(--rose-deep); }
.top-nav a { color: var(--text-muted); text-decoration: none; font-size: 14px; margin-left: 18px; }
.top-nav a:hover { color: var(--rose); }

main { flex: 1; padding: 28px 0 48px; }

/* ===== 视图切换 ===== */
.view { display: none; }
.view.active { display: block; animation: fadeIn .35s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ===== 首页 ===== */
.hero { text-align: center; padding: 28px 0 8px; }
.hero h1 { font-size: 30px; line-height: 1.4; color: var(--rose-deep); margin-bottom: 14px; }
.hero-sub { color: var(--text-muted); font-size: 15px; margin-bottom: 20px; }
.hero-preview { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-bottom: 20px; }
.phase-chip {
  background: var(--card); border: 1.5px solid #f2c3cf; color: var(--rose-deep);
  border-radius: 999px; padding: 8px 16px; font-size: 13.5px; box-shadow: var(--shadow);
}
.hero-points {
  list-style: none; text-align: left; max-width: 420px; margin: 0 auto 24px;
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 16px 22px; font-size: 14px;
}
.hero-points li { padding: 5px 0; }
.disclaimer-agree {
  display: flex; align-items: flex-start; gap: 8px; text-align: left;
  font-size: 12.5px; color: var(--text-muted); max-width: 440px; margin: 0 auto 20px;
}
.disclaimer-agree input { margin-top: 4px; accent-color: var(--rose); }
.disclaimer-agree span { flex: 1; }

/* ===== 按钮 ===== */
.btn-primary, .btn-secondary, .btn-back {
  border: none; cursor: pointer; border-radius: 999px; font-size: 15px;
  padding: 11px 34px; transition: all .18s ease;
}
.btn-primary { background: var(--rose); color: #fff; box-shadow: 0 4px 12px rgba(194,85,109,.35); }
.btn-primary:hover:not(:disabled) { background: var(--rose-deep); }
.btn-primary:disabled { background: #d9b8c1; box-shadow: none; cursor: not-allowed; }
.btn-secondary { background: var(--rose-light); color: var(--rose-deep); }
.btn-secondary:hover { background: #f0d5dd; }
.btn-back { background: transparent; color: var(--text-muted); padding: 8px 12px; font-size: 14px; }
.btn-back:hover { color: var(--rose); }
.hidden { display: none !important; }

/* ===== 问卷 ===== */
.quiz-head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.progress-wrap { flex: 1; display: flex; align-items: center; gap: 10px; }
.progress-bar { flex: 1; height: 8px; background: var(--rose-light); border-radius: 999px; overflow: hidden; }
.progress-fill { height: 100%; width: 8%; background: linear-gradient(90deg, #f2a9b8, var(--rose)); border-radius: 999px; transition: width .3s ease; }
.progress-text { font-size: 12px; color: var(--text-muted); white-space: nowrap; }

.quiz-card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px 20px; margin-bottom: 16px; }
.quiz-card h2 { font-size: 19px; color: var(--text); margin-bottom: 4px; }
.quiz-hint { font-size: 13px; color: var(--text-muted); margin-bottom: 16px; }

.option {
  display: block; width: 100%; text-align: left; cursor: pointer;
  border: 1.5px solid var(--line); background: var(--rose-lighter);
  border-radius: 12px; padding: 12px 16px; font-size: 15px; color: var(--text);
  margin-bottom: 10px; transition: all .15s ease;
}
.option:hover { border-color: #e8b4c2; background: var(--rose-light); }
.option.selected { border-color: var(--rose); background: var(--rose-light); color: var(--rose-deep); font-weight: 600; }
.option .opt-tag { float: right; font-size: 12px; color: var(--text-muted); font-weight: 400; }

.quiz-foot { display: flex; justify-content: space-between; align-items: center; }

/* ===== 结果页 ===== */
.result-title { text-align: center; margin-bottom: 20px; }
.result-title h1 { font-size: 24px; color: var(--rose-deep); margin-bottom: 6px; }
.result-title p { font-size: 14px; color: var(--text-muted); }

.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; margin-bottom: 16px; }
.card h3 { font-size: 16px; margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }

/* 体质卡 */
.constitution-card { text-align: center; padding: 26px 20px; }
.constitution-name { font-size: 22px; font-weight: 700; color: var(--rose-deep); }
.constitution-sub { font-size: 13px; color: var(--text-muted); margin: 6px 0 12px; }
.constitution-tags { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.tag { font-size: 12px; padding: 4px 12px; border-radius: 999px; background: var(--rose-light); color: var(--rose-deep); }
.tag.warn { background: #fdf0e3; color: var(--amber); }
.tag.green { background: #e7f2ec; color: var(--green); }

/* 风险卡 */
.risk-card { border-left: 4px solid var(--amber); }
.risk-card h3 { color: var(--amber); }
.risk-card ul { padding-left: 20px; font-size: 14px; }
.safe-card { border-left: 4px solid var(--green); }
.safe-card h3 { color: var(--green); }

/* 三阶段时间轴 */
.phase { position: relative; padding-left: 34px; margin-bottom: 16px; }
.phase::before {
  content: ""; position: absolute; left: 11px; top: 26px; bottom: -16px;
  width: 2px; background: var(--line);
}
.phase:last-child::before { display: none; }
.phase-dot {
  position: absolute; left: 0; top: 4px; width: 24px; height: 24px; border-radius: 50%;
  background: var(--rose-light); color: var(--rose-deep); font-size: 13px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; border: 2px solid #f2c3cf;
}
.phase .card h3 { color: var(--rose-deep); }
.advice { padding: 8px 0; border-bottom: 1px dashed var(--line); font-size: 14.5px; }
.advice:last-child { border-bottom: none; }
.badge {
  display: inline-block; font-size: 11px; padding: 1px 8px; border-radius: 6px; margin-right: 8px;
  vertical-align: 1px; white-space: nowrap;
}
.badge.evidence { background: #e7f2ec; color: var(--green); }
.badge.tcm { background: #fdf0e3; color: var(--amber); }
.badge.lifestyle { background: #eceaf7; color: #6a5bb0; }

/* 参考来源 */
.refs { font-size: 12px; color: var(--text-muted); line-height: 1.9; }
.refs code { background: var(--rose-light); padding: 1px 5px; border-radius: 4px; font-size: 11px; }

.result-foot { text-align: center; margin-top: 8px; }
.result-foot .btn-secondary { margin-right: 12px; }

/* ===== 页脚 ===== */
.site-footer { border-top: 1px solid var(--line); background: #fff; padding: 18px 0; text-align: center; font-size: 12px; color: var(--text-muted); }
.site-footer a { color: var(--rose); text-decoration: none; }
.footer-muted { margin-top: 6px; opacity: .8; }

/* ===== 桌面端微调 ===== */
@media (min-width: 640px) {
  .hero h1 { font-size: 34px; }
  .card { padding: 24px; }
}
