:root {
  --pink: #f8a5c2;
  --pink-deep: #e8749b;
  --pink-soft: #fdeef4;
  --green: #8fd9b6;
  --green-deep: #4cae8a;
  --ink: #4a3b41;
  --muted: #9b8b91;
  --bg: #fff7fa;
  --card: #ffffff;
  --shadow: 0 6px 24px rgba(232, 116, 155, 0.12);
  --radius: 18px;
}

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

body {
  font-family: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

/* ---------- 顶部导航 ---------- */
header.hero {
  background: linear-gradient(135deg, #ffd6e7 0%, #ffeef5 45%, #e6f7ee 100%);
  padding: 54px 20px 70px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
header.hero h1 {
  font-size: 2.1rem;
  letter-spacing: 2px;
  color: #c2456e;
  margin-bottom: 10px;
}
header.hero p.sub {
  color: #8a6b76;
  font-size: 1.02rem;
  max-width: 640px;
  margin: 0 auto;
}
.hero-badge {
  display: inline-block;
  margin-top: 18px;
  background: rgba(255,255,255,0.7);
  border: 1px solid #ffd0e0;
  color: #d4567f;
  padding: 6px 16px;
  border-radius: 999px;
  font-size: 0.85rem;
}
.site-domain {
  margin: 6px 0 0;
  color: #fff;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-shadow: 0 1px 3px rgba(214,51,108,0.35);
}

nav.topnav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(8px);
  box-shadow: 0 2px 12px rgba(0,0,0,0.05);
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 4px;
  padding: 8px 10px;
}
nav.topnav a {
  text-decoration: none;
  color: var(--ink);
  padding: 9px 16px;
  border-radius: 999px;
  font-size: 0.92rem;
  transition: all .2s;
  white-space: nowrap;
}
nav.topnav a:hover { background: var(--pink-soft); color: var(--pink-deep); }
nav.topnav a.active { background: var(--pink-deep); color: #fff; }

/* ---------- 通用容器 ---------- */
.section { max-width: 980px; margin: 0 auto; padding: 56px 20px; }
.section h2 {
  font-size: 1.5rem;
  color: #c2456e;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.section .lead { color: var(--muted); margin-bottom: 28px; font-size: 0.95rem; }
.section + .section { border-top: 1px dashed #ffd9e6; }

/* ---------- 时间线 ---------- */
.timeline { position: relative; padding-left: 34px; }
.timeline::before {
  content: ""; position: absolute; left: 12px; top: 6px; bottom: 6px;
  width: 3px; background: linear-gradient(var(--pink), var(--green)); border-radius: 3px;
}
.stage { position: relative; margin-bottom: 30px; }
.stage::before {
  content: ""; position: absolute; left: -28px; top: 6px;
  width: 16px; height: 16px; border-radius: 50%;
  background: #fff; border: 4px solid var(--pink-deep);
}
.stage-card {
  background: var(--card); border-radius: var(--radius); padding: 20px 22px;
  box-shadow: var(--shadow); border: 1px solid #ffe3ee;
}
.stage-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.stage-head .emoji { font-size: 1.6rem; }
.stage-head h3 { font-size: 1.18rem; color: var(--ink); }
.stage-head .period {
  margin-left: auto; background: var(--green); color: #fff;
  font-size: 0.78rem; padding: 3px 12px; border-radius: 999px;
}
.stage-desc { color: var(--muted); font-size: 0.9rem; margin: 8px 0 14px; }
.stage-items { list-style: none; }
.stage-items li {
  position: relative; padding: 6px 0 6px 26px; font-size: 0.94rem;
  border-bottom: 1px dashed #f3e3ea;
}
.stage-items li:last-child { border-bottom: none; }
.stage-items li::before {
  content: "🌸"; position: absolute; left: 0; top: 6px; font-size: 0.85rem;
}
.stage-groups { display: grid; gap: 16px; margin-top: 4px; }
.stage-group {
  background: var(--pink-soft); border-radius: 14px;
  padding: 14px 16px 16px; border: 1px solid #ffe3ee;
  transition: opacity .2s;
}
.group-head {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 10px; padding-bottom: 8px; border-bottom: 2px solid #ffd0e0;
}
.grp-check-wrap { display: flex; align-items: center; gap: 8px; cursor: pointer; flex: 1; }
.grp-check { width: 18px; height: 18px; accent-color: var(--green-deep); cursor: pointer; }
.group-title {
  font-size: 0.98rem; color: var(--pink-deep); font-weight: 700;
}
.group-title::before { content: "●"; font-size: 0.55rem; color: var(--green-deep); margin-right: 8px; }
.grp-done-tag {
  font-size: 0.78rem; color: var(--green-deep); background: #e3f7ee;
  padding: 2px 10px; border-radius: 999px; display: none; white-space: nowrap;
}
.stage-group.done .grp-done-tag { display: inline-block; }
.stage-group.done .group-title { text-decoration: line-through; color: var(--muted); }
.stage-group .stage-items li { font-size: 0.9rem; }

/* 时间线总进度条 */
.tl-progress {
  background: var(--card); border: 1px solid #ffe3ee; border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 16px 20px; margin-bottom: 26px;
}
.tl-progress-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; flex-wrap: wrap; margin-bottom: 10px;
  font-size: 0.95rem; color: var(--ink); font-weight: 600;
}
.tl-progress-num { color: var(--pink-deep); font-size: 0.88rem; }
.tl-progress-bar {
  height: 14px; border-radius: 999px; background: var(--pink-soft);
  overflow: hidden; border: 1px solid #ffd9e6;
}
.tl-progress-fill {
  height: 100%; width: 0; border-radius: 999px;
  background: linear-gradient(90deg, var(--pink-deep), var(--green-deep));
  transition: width .35s ease;
}
.tl-progress-foot { margin-top: 12px; }
.tl-toggle {
  background: #fff; color: var(--pink-deep); border: 1px solid var(--pink-deep);
  padding: 7px 16px; border-radius: 999px; cursor: pointer; font-size: 0.85rem; font-weight: 600;
  transition: all .2s;
}
.tl-toggle:hover { background: var(--pink-soft); }
.timeline.hide-done .stage-group.done { display: none; }

/* 当前进度高亮 */
.stage.current > .stage-card {
  border: 2px solid var(--pink-deep);
  box-shadow: 0 8px 30px rgba(232, 116, 155, 0.25);
}
.current-flag {
  display: inline-block; background: var(--pink-deep); color: #fff;
  font-size: 0.85rem; font-weight: 700; padding: 6px 16px;
  border-radius: 999px; margin: 10px 0 4px;
}

/* ---------- 政策 ---------- */
.policy-tabs { display: flex; gap: 10px; margin-bottom: 22px; }
.policy-tabs button {
  border: 1px solid #ffd0e0; background: #fff; color: var(--pink-deep);
  padding: 9px 22px; border-radius: 999px; cursor: pointer; font-size: 0.95rem;
  transition: all .2s;
}
.policy-tabs button.active { background: var(--pink-deep); color: #fff; border-color: var(--pink-deep); }
.policy-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.policy-card {
  background: var(--card); border-radius: var(--radius); padding: 18px 20px;
  box-shadow: var(--shadow); border-left: 5px solid var(--green-deep);
}
.policy-card h4 { color: var(--green-deep); font-size: 1.02rem; margin-bottom: 8px; }
.policy-card p { color: #6d5a61; font-size: 0.9rem; }

/* ---------- 产品清单 ---------- */
.prod-group {
  background: var(--card); border-radius: var(--radius); padding: 20px 22px;
  box-shadow: var(--shadow); margin-bottom: 20px; border: 1px solid #ffe3ee;
}
.prod-group h3 { display: flex; align-items: center; gap: 10px; color: var(--ink); margin-bottom: 14px; }
.prod-group .progress {
  margin-left: auto; font-size: 0.8rem; color: var(--pink-deep);
  background: var(--pink-soft); padding: 3px 12px; border-radius: 999px;
}
.prod-list { list-style: none; }
.prod-list li {
  display: flex; align-items: flex-start; gap: 10px; padding: 8px 0;
  border-bottom: 1px dashed #f3e3ea; cursor: pointer; font-size: 0.94rem;
}
.prod-list li:last-child { border-bottom: none; }
.prod-list li .box {
  width: 20px; height: 20px; border-radius: 6px; border: 2px solid var(--pink-deep);
  flex-shrink: 0; margin-top: 2px; display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem; color: #fff; transition: all .15s;
}
.prod-list li.done .box { background: var(--green-deep); border-color: var(--green-deep); }
.prod-list li.done span { text-decoration: line-through; color: var(--muted); }

/* ---------- 孕妇相关 ---------- */
.acc { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  margin-bottom: 12px; overflow: hidden; border: 1px solid #ffe3ee; }
.acc-head {
  padding: 16px 20px; cursor: pointer; display: flex; align-items: center; gap: 12px;
  font-size: 1.02rem; font-weight: 600; color: var(--ink);
}
.acc-head .emoji { font-size: 1.3rem; }
.acc-head .arrow { margin-left: auto; color: var(--pink-deep); transition: transform .2s; }
.acc.open .arrow { transform: rotate(90deg); }
.acc-body { max-height: 0; overflow: hidden; transition: max-height .3s ease; padding: 0 20px; color: #6d5a61; font-size: 0.92rem; }
.acc.open .acc-body { max-height: 400px; padding: 0 20px 18px; }

/* ---------- 检查报告 ---------- */
.report-toolbar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; align-items: center; }
.report-toolbar select, .report-toolbar input, .report-toolbar button {
  padding: 9px 12px; border-radius: 10px; border: 1px solid #ffd0e0; font-size: 0.9rem; font-family: inherit;
}
.report-toolbar select, .report-toolbar input { background: #fff; color: var(--ink); }
.report-toolbar button {
  background: var(--pink-deep); color: #fff; border: none; cursor: pointer; font-weight: 600;
}
.report-toolbar button.ghost { background: #fff; color: var(--pink-deep); border: 1px solid var(--pink-deep); }
.report-table { width: 100%; border-collapse: collapse; background: var(--card);
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.report-table th, .report-table td { padding: 11px 12px; text-align: left; font-size: 0.88rem; border-bottom: 1px solid #f3e3ea; }
.report-table th { background: var(--pink-soft); color: var(--pink-deep); font-weight: 600; }
.report-table tr:last-child td { border-bottom: none; }
.tag { padding: 2px 10px; border-radius: 999px; font-size: 0.78rem; }
.tag.normal { background: #e3f7ee; color: var(--green-deep); }
.tag.abn { background: #ffe3e3; color: #d64545; }
.tag.unknown { background: #fff3df; color: #c98a1e; }
.del-btn { background: none; border: none; color: #d64545; cursor: pointer; font-size: 0.85rem; }
.report-empty { text-align: center; color: var(--muted); padding: 30px; }
.suggest-wrap { margin-top: 18px; background: var(--pink-soft); border-radius: var(--radius);
  padding: 16px 18px; font-size: 0.85rem; color: #8a6b76; }
.suggest-wrap b { color: var(--pink-deep); }

/* ---------- 页脚 ---------- */
footer { text-align: center; padding: 36px 20px; color: var(--muted); font-size: 0.85rem; background: #fff0f6; }
footer a { color: var(--pink-deep); text-decoration: none; }

/* ---------- 我的档案 / 倒计时 ---------- */
.profile-photo { display: flex; flex-direction: column; align-items: center; gap: 8px; margin-bottom: 20px; }
.photo-preview {
  width: 124px; height: 124px; border-radius: 50%;
  background: #ffe9f1; border: 3px dashed #ffb6cf;
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem; color: #e8749b; overflow: hidden;
}
.photo-preview img { width: 100%; height: 100%; object-fit: cover; }
.profile-photo button {
  background: #fff; color: var(--pink-deep); border: 1px solid var(--pink-deep);
  padding: 7px 18px; border-radius: 999px; cursor: pointer; font-size: 0.85rem;
}
.photo-tip { font-size: 0.75rem; color: var(--muted); }
.profile-card {
  background: linear-gradient(135deg, #fff 0%, #fff0f6 100%);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 26px 24px; border: 1px solid #ffd9e6; text-align: center;
}
.countdown {
  font-size: 1.5rem; font-weight: 700; color: #c2456e; margin-bottom: 18px;
  background: #fff; display: inline-block; padding: 12px 26px; border-radius: 999px;
  box-shadow: 0 4px 14px rgba(232,116,155,0.18);
}
.countdown.born { color: var(--green-deep); }
.profile-form {
  display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; align-items: flex-end;
}
.profile-form label {
  display: flex; flex-direction: column; gap: 5px; font-size: 0.82rem;
  color: var(--muted); text-align: left;
}
.profile-form input {
  padding: 9px 12px; border-radius: 10px; border: 1px solid #ffd0e0;
  font-size: 0.9rem; font-family: inherit; color: var(--ink); min-width: 160px;
}
.profile-form button {
  background: var(--pink-deep); color: #fff; border: none; cursor: pointer;
  padding: 10px 22px; border-radius: 10px; font-size: 0.92rem; font-weight: 600;
}
.profile-meta { margin-top: 16px; color: #8a6b76; font-size: 0.9rem; }
.profile-meta span { display: inline-block; margin: 0 8px; }

/* ---------- 报告操作按钮 ---------- */
.report-actions { display: flex; gap: 10px; flex-wrap: wrap; margin: 14px 0 18px; }
.report-actions button {
  border: 1px solid var(--pink-deep); background: #fff; color: var(--pink-deep);
  padding: 9px 18px; border-radius: 10px; cursor: pointer; font-size: 0.9rem; font-weight: 600;
}
.report-actions button#repPrint { background: var(--pink-deep); color: #fff; }

/* ---------- 今日孕期 ---------- */
.today-card {
  background: linear-gradient(135deg, #fff 0%, #fff0f6 100%);
  border: 1px solid #ffd9e6; border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 22px 24px;
}
.today-empty {
  background: var(--card); border: 1px dashed #ffd0e0; border-radius: var(--radius);
  padding: 26px; text-align: center; color: var(--muted); font-size: 0.95rem;
}
.today-top { display: flex; align-items: center; gap: 18px; margin-bottom: 16px; }
.today-fruit {
  width: 84px; height: 84px; flex-shrink: 0; border-radius: 50%;
  background: var(--pink-soft); border: 3px solid #ffc4db;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.05rem; font-weight: 700; color: var(--pink-deep); text-align: center;
  padding: 6px; line-height: 1.2;
}
.today-info { flex: 1; }
.today-week { font-size: 1.3rem; font-weight: 700; color: #c2456e; margin-bottom: 6px; }
.today-size { color: var(--ink); font-size: 0.98rem; margin-bottom: 4px; }
.today-left { color: var(--pink-deep); font-size: 0.92rem; }
.today-left b { font-size: 1.1rem; }
.today-note { color: #6d5a61; font-size: 0.94rem; margin: 6px 0 12px; }
.today-tips { list-style: none; }
.today-tips li {
  position: relative; padding: 5px 0 5px 22px; font-size: 0.9rem; color: #6d5a61;
  border-bottom: 1px dashed #f3e3ea;
}
.today-tips li:last-child { border-bottom: none; }
.today-tips li::before { content: "🌿"; position: absolute; left: 0; top: 5px; font-size: 0.8rem; }
.today-body { border-top: 1px dashed #ffd9e6; padding-top: 12px; }
.today-row { display: flex; gap: 12px; padding: 7px 0; font-size: 0.92rem; color: #6d5a61; }
.today-row .t-label {
  flex-shrink: 0; width: 64px; color: var(--pink-deep); font-weight: 600;
}
.today-row.check { background: #fff7e6; border-radius: 10px; padding: 8px 10px; margin-top: 4px; }
.today-row.check .t-label { color: #c98a1e; }

/* ---------- 孕期周刊 ---------- */
.week-toolbar { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; flex-wrap: wrap; }
.week-hint { color: var(--muted); font-size: 0.82rem; }
#weeks { display: grid; gap: 10px; }
.week-item {
  display: flex; gap: 14px; background: var(--card); border: 1px solid #ffe3ee;
  border-radius: 14px; padding: 14px 16px; box-shadow: 0 3px 12px rgba(232,116,155,0.08);
}
.week-badge {
  flex-shrink: 0; width: 54px; height: 54px; border-radius: 50%;
  background: linear-gradient(135deg, var(--pink), var(--green));
  color: #fff; font-size: 1.15rem; font-weight: 700;
  display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1;
}
.week-badge span { font-size: 0.6rem; font-weight: 500; margin-top: 2px; }
.week-main { flex: 1; }
.week-line1 { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 4px; }
.week-fruit { font-size: 1.02rem; font-weight: 700; color: var(--pink-deep); }
.week-size { font-size: 0.85rem; color: var(--muted); }
.week-note { font-size: 0.9rem; color: #6d5a61; }
.week-mom { font-size: 0.85rem; color: #8a6b76; margin-top: 3px; }
.week-check {
  font-size: 0.85rem; color: #c98a1e; background: #fff7e6;
  border-radius: 8px; padding: 5px 10px; margin-top: 6px; display: inline-block;
}

/* ---------- 能不能吃 ---------- */
#eat { display: grid; gap: 18px; }
.eat-group {
  border-radius: var(--radius); padding: 18px 20px; border: 1px solid #ffe3ee;
  box-shadow: var(--shadow);
}
.eat-group h3 { font-size: 1.05rem; margin-bottom: 12px; display: flex; align-items: center; gap: 10px; }
.eat-count {
  font-size: 0.78rem; color: var(--muted); background: #fff; border: 1px solid #ffd0e0;
  padding: 1px 10px; border-radius: 999px;
}
.eat-safe { border-left: 5px solid var(--green-deep); }
.eat-limited { border-left: 5px solid #e6a23c; }
.eat-avoid { border-left: 5px solid #d64545; }
.eat-list { list-style: none; }
.eat-list li { padding: 8px 0; border-bottom: 1px dashed #f3e3ea; }
.eat-list li:last-child { border-bottom: none; }
.eat-list b { color: var(--ink); font-size: 0.95rem; display: block; margin-bottom: 2px; }
.eat-list li span { font-size: 0.85rem; color: var(--muted); }

/* ---------- 打印（仅报告表） ---------- */
@media print {
  nav.topnav, header.hero, footer, .suggest-wrap, .report-toolbar,
  .report-actions, .profile-card { display: none !important; }
  .section { display: none !important; padding: 0 !important; border: none !important; }
  #reportSec { display: block !important; max-width: 100% !important; }
  #reportSec h2 { color: #000; }
  .report-table { box-shadow: none; }
  .report-table th { background: #f0f0f0 !important; -webkit-print-color-adjust: exact; }
  .tag { -webkit-print-color-adjust: exact; }
}

/* ---------- 响应式 ---------- */
@media (max-width: 600px) {
  header.hero h1 { font-size: 1.6rem; }
  .section { padding: 40px 16px; }
  .stage-head .period { margin-left: 0; width: 100%; }
  .report-table { font-size: 0.8rem; }
  .report-table th, .report-table td { padding: 8px 6px; }
}
