/* ==========================================================
   TCM 体质测评站 · 设计系统
   浅色 / 米白纸感 / 墨绿主色 / 宋体标题
   ========================================================== */

:root {
  --ink: #1c1c1a;
  --ink-2: #4a4a45;
  --ink-3: #8a8a80;
  --paper: #faf9f5;
  --paper-2: #ffffff;
  --paper-3: #f2f0e9;
  --line: #e3e0d5;
  --line-2: #d0ccbc;
  --brand: #1f5c4a;
  --brand-2: #2d7a63;
  --brand-soft: #e8f2ed;
  --gold: #a67c2e;
  --gold-soft: #f8f0dd;
  --red: #a83b3b;
  --shadow-sm: 0 1px 2px rgba(28, 28, 26, .04);
  --shadow-md: 0 4px 16px rgba(28, 28, 26, .06);
  --shadow-lg: 0 12px 40px rgba(28, 28, 26, .10);
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 16px;
  --r-xl: 24px;
  --serif: "Songti SC", "Noto Serif CJK SC", "Source Han Serif SC", "SimSun", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  /* 多语言正文：泰文（ไทย）/ 印尼文（Bahasa Indonesia）在缺字时要有确定的回退字体 */
  --sans-i18n: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei",
    "Malgun Gothic", "Apple SD Gothic Neo", "Noto Sans KR",
    "Leelawadee UI", "Thonburi", "Ayuthaya", "Noto Sans Thai", "Tahoma", "Segoe UI", sans-serif;
  --maxw: 1080px;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--sans);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.7;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }

button { font-family: inherit; cursor: pointer; border: none; background: none; }
a { color: inherit; text-decoration: none; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.wrap-narrow { max-width: 720px; margin: 0 auto; padding: 0 24px; }

/* ---------- 排版 ---------- */
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 500; line-height: 1.35; letter-spacing: .01em; }
h1 { font-size: 40px; }
h2 { font-size: 28px; }
h3 { font-size: 19px; }
h4 { font-size: 16px; }
p { margin-bottom: 0; }

.eyebrow {
  font-size: 12px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--gold); font-weight: 500; margin-bottom: 14px;
}
.lead { font-size: 17px; color: var(--ink-2); line-height: 1.8; }
.muted { color: var(--ink-3); font-size: 13px; }

/* ---------- 导航 ---------- */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(250, 249, 245, .88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 0 24px;
  height: 62px; display: flex; align-items: center; gap: 28px;
}
.logo { display: flex; align-items: center; gap: 9px; font-family: var(--serif); font-size: 17px; font-weight: 500; }
.logo-mark {
  width: 26px; height: 26px; border-radius: 50%;
  border: 1.5px solid var(--brand); position: relative; flex-shrink: 0;
}
.logo-mark::before {
  content: ""; position: absolute; inset: 4px;
  border-radius: 50% 50% 50% 0; background: var(--brand); opacity: .85;
}
.nav-links { display: flex; gap: 24px; margin-left: auto; font-size: 14px; color: var(--ink-2); }
.nav-links a:hover { color: var(--brand); }
.nav-actions { display: flex; align-items: center; gap: 12px; }
.nav-badge {
  font-size: 11px; padding: 3px 9px; border-radius: 20px;
  background: var(--gold-soft); color: var(--gold); font-weight: 500;
  border: 1px solid #e8d5a8;
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 26px; border-radius: 100px; font-size: 15px; font-weight: 500;
  transition: all .18s ease; white-space: nowrap;
}
.btn-primary { background: var(--brand); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--brand-2); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-ghost { border: 1px solid var(--line-2); color: var(--ink); background: var(--paper-2); }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); }
.btn-gold { background: var(--gold); color: #fff; }
.btn-gold:hover { background: #8f6a26; transform: translateY(-1px); }
.btn-sm { padding: 8px 16px; font-size: 13px; }
.btn-lg { padding: 16px 36px; font-size: 16px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }

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

/* ---------- 首页 Hero ---------- */
.hero { padding: 80px 0 72px; position: relative; overflow: hidden; }
.hero::after {
  content: ""; position: absolute; right: -180px; top: -120px;
  width: 520px; height: 520px; border-radius: 50%;
  background: radial-gradient(circle, rgba(31, 92, 74, .05), transparent 68%);
  pointer-events: none;
}
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 64px; align-items: center; }
.hero h1 { font-size: 46px; margin-bottom: 20px; letter-spacing: -.01em; }
.hero h1 em { font-style: normal; color: var(--brand); }
.hero-sub { font-size: 17px; color: var(--ink-2); line-height: 1.85; margin-bottom: 32px; max-width: 460px; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 28px; }
.hero-meta { display: flex; gap: 32px; padding-top: 26px; border-top: 1px solid var(--line); }
.hero-meta div strong { display: block; font-family: var(--serif); font-size: 24px; color: var(--brand); }
.hero-meta div span { font-size: 12px; color: var(--ink-3); }

/* 九宫格装饰 */
.hero-wheel {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
  padding: 20px; background: var(--paper-2); border: 1px solid var(--line);
  border-radius: var(--r-xl); box-shadow: var(--shadow-md);
}
.hero-wheel .type-tile {
  aspect-ratio: 1; display: flex; align-items: center; justify-content: center;
  font-family: var(--serif); font-size: 13.5px; border-radius: var(--r-md);
  background: var(--paper-3); color: var(--ink-2); text-align: center;
  transition: all .2s; border: 1px solid transparent;
}
.hero-wheel .type-tile:first-child { background: var(--brand-soft); color: var(--brand); font-weight: 500; }
.hero-wheel .type-tile:hover { background: var(--c, var(--brand)); color: #fff; transform: translateY(-2px); }
.grid-hint { font-size: 12px; color: var(--ink-3); text-align: center; margin-top: 12px; }

/* ---------- 通用区块 ---------- */
.section { padding: 72px 0; }
.section-alt { background: var(--paper-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { text-align: center; margin-bottom: 48px; }
.section-head h2 { margin-bottom: 12px; }
.section-head p { color: var(--ink-2); max-width: 520px; margin: 0 auto; }

/* ---------- 步骤卡 ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.step-card {
  background: var(--paper-2); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 28px 24px;
}
.step-num {
  width: 30px; height: 30px; border-radius: 50%; background: var(--brand-soft);
  color: var(--brand); display: flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 500; margin-bottom: 16px;
}
.step-card h3 { font-size: 17px; margin-bottom: 8px; }
.step-card p { font-size: 14px; color: var(--ink-2); line-height: 1.7; }

/* ---------- 免费/会员对比 ---------- */
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; background: var(--paper-2); }
.compare-col { padding: 32px 28px; }
.compare-col.free { border-right: 1px solid var(--line); }
.compare-col.member { background: linear-gradient(180deg, #fdfaf2 0%, var(--paper-2) 100%); position: relative; }
.compare-tag {
  display: inline-block; font-size: 11px; letter-spacing: .1em;
  padding: 4px 10px; border-radius: 20px; margin-bottom: 16px;
  background: var(--paper-3); color: var(--ink-2);
}
.compare-tag.gold { background: var(--gold-soft); color: var(--gold); }
.compare-col h3 { font-size: 20px; margin-bottom: 6px; }
.compare-price { font-family: var(--serif); font-size: 15px; color: var(--ink-3); margin-bottom: 20px; }
.compare-price strong { font-size: 26px; color: var(--brand); }
.compare ul { list-style: none; display: flex; flex-direction: column; gap: 11px; }
.compare li { display: flex; gap: 10px; font-size: 14px; color: var(--ink-2); line-height: 1.6; }
.compare li::before { content: "·"; color: var(--brand); font-weight: 700; flex-shrink: 0; }
.compare li.off { color: var(--ink-3); }
.compare li.off::before { content: "×"; color: #c4c0b2; }

/* ---------- 问卷 ---------- */
.quiz-shell { max-width: 760px; margin: 0 auto; padding: 32px 24px 80px; }
.quiz-top { margin-bottom: 28px; }
.quiz-progress-row { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; }
.quiz-progress-label { font-size: 13px; color: var(--ink-3); }
.quiz-progress-label strong { color: var(--brand); font-family: var(--serif); font-size: 15px; }
.progress-track { height: 4px; background: var(--line); border-radius: 4px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--brand); border-radius: 4px; transition: width .35s ease; }

.quiz-card {
  background: var(--paper-2); border: 1px solid var(--line);
  border-radius: var(--r-xl); padding: 40px 44px; box-shadow: var(--shadow-sm);
}
.quiz-group-label {
  font-size: 11px; letter-spacing: .16em; color: var(--gold);
  margin-bottom: 18px; display: flex; align-items: center; gap: 8px;
}
.quiz-group-label::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.quiz-q { font-family: var(--serif); font-size: 22px; line-height: 1.6; margin-bottom: 30px; min-height: 70px; }
.quiz-q .q-num { color: var(--ink-3); font-size: 14px; margin-right: 10px; font-family: var(--sans); }

.scale { display: flex; flex-direction: column; gap: 9px; }
.scale-opt {
  display: flex; align-items: center; gap: 14px; padding: 14px 18px;
  border: 1px solid var(--line); border-radius: var(--r-md); background: var(--paper-2);
  transition: all .15s; text-align: left; font-size: 15px; color: var(--ink);
}
.scale-opt:hover { border-color: var(--brand); background: var(--brand-soft); }
.scale-opt.selected { border-color: var(--brand); background: var(--brand-soft); box-shadow: inset 0 0 0 1px var(--brand); }
.scale-dot {
  width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--line-2);
  flex-shrink: 0; display: flex; align-items: center; justify-content: center;
}
.scale-opt.selected .scale-dot { border-color: var(--brand); }
.scale-opt.selected .scale-dot::after {
  content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--brand);
}
.scale-text { flex: 1; }
.scale-hint { font-size: 12px; color: var(--ink-3); }

.quiz-nav { display: flex; justify-content: space-between; align-items: center; margin-top: 28px; }
.quiz-nav .muted { font-size: 12px; }

/* 完成度提示 */
.quiz-hint { text-align: center; margin-top: 20px; font-size: 13px; color: var(--ink-3); }

/* ---------- 结果页 ---------- */
.result-hero { padding-top: 56px; padding-bottom: 40px; }
.result-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-bottom: 36px; }
.result-main-name { font-family: var(--serif); font-size: 44px; line-height: 1.2; margin-bottom: 8px; }
.result-main-name .pct { font-size: 22px; color: var(--ink-3); margin-left: 12px; font-family: var(--sans); }
.result-tagline { font-size: 16px; color: var(--ink-2); }

.score-bars { display: flex; flex-direction: column; gap: 14px; margin: 32px 0; }
.score-row { display: grid; grid-template-columns: 88px 1fr 56px; gap: 14px; align-items: center; }
.score-name { font-size: 14px; color: var(--ink-2); }
.score-track { height: 8px; background: var(--paper-3); border-radius: 8px; overflow: hidden; }
.score-fill {
  height: 100%; border-radius: 8px;
  transform-origin: left center;
  animation: growBar .9s cubic-bezier(.16, 1, .3, 1);
}
@keyframes growBar {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}
.score-val { font-size: 13px; color: var(--ink-3); text-align: right; font-variant-numeric: tabular-nums; }
.score-row.is-primary .score-name { color: var(--ink); font-weight: 500; }
.score-row.is-primary .score-val { color: var(--brand); font-weight: 500; }

/* 结论卡 */
.verdict {
  background: var(--paper-2); border: 1px solid var(--line);
  border-left: 3px solid var(--brand); border-radius: var(--r-md);
  padding: 20px 24px; margin-bottom: 32px; font-size: 14px; color: var(--ink-2); line-height: 1.8;
}
.verdict strong { color: var(--ink); }

/* 三栏特点 */
.trait-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 48px; }
.trait-card {
  background: var(--paper-2); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 22px 20px;
}
.trait-card h4 { font-size: 14px; color: var(--brand); margin-bottom: 10px; display: flex; align-items: center; gap: 7px; }
.trait-card p { font-size: 13.5px; color: var(--ink-2); line-height: 1.75; }

/* 痛点 */
.pain-block {
  background: #fdf7f4; border: 1px solid #f0ddd4; border-radius: var(--r-lg);
  padding: 32px 34px; margin-bottom: 40px;
}
.pain-block h3 { font-size: 21px; margin-bottom: 6px; }
.pain-block .sub { font-size: 14px; color: var(--ink-2); margin-bottom: 22px; }
.pain-list { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 28px; }
.pain-item { display: flex; gap: 11px; align-items: flex-start; font-size: 14.5px; color: var(--ink); line-height: 1.6; text-align: left; }
button.pain-item {
  width: 100%; padding: 9px 12px; border-radius: var(--r-sm);
  border: 1px solid transparent; background: transparent; cursor: pointer; transition: .16s;
}
button.pain-item:hover { background: rgba(255,255,255,.7); border-color: var(--line); }
button.pain-item.on { background: #fff; border-color: #e0d8c6; }
button.pain-item.on > span:last-child { color: var(--ink); font-weight: 500; }
.pain-sum { font-size: 12.5px; color: var(--ink-3); margin-top: 12px; }
.pain-check {
  width: 19px; height: 19px; border-radius: 50%; background: #eee7dc;
  color: #8a4b2a; display: flex; align-items: center; justify-content: center;
  font-size: 11px; flex-shrink: 0; margin-top: 2px; transition: .16s;
}
button.pain-item.on .pain-check { background: #8a4b2a; color: #fff; }

/* 解决方案截断 */
.solution-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 20px; }
.ingredient-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
.ingredient {
  background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 14px 12px 12px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 2px;
}
.ingredient .ico {
  width: 62px; height: 62px; margin-bottom: 6px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff, var(--paper-3));
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif); font-size: 19px; color: var(--ink-3);
  border: 1px solid var(--line);
}
.ingredient .ing-svg { width: 46px; height: 46px; }
.ingredient strong { display: block; font-size: 14px; }
.ingredient .tag { font-size: 10.5px; color: var(--gold); letter-spacing: .06em; }
.ingredient .sub { font-size: 11px; color: var(--ink-3); line-height: 1.45; margin-top: 2px; }
.ingredient.ghost { background: var(--paper-3); border-style: dashed; }
.ingredient.ghost strong { color: var(--ink-3); font-weight: 400; }

.locked-wrap { position: relative; }
.locked-content { filter: blur(4px); user-select: none; pointer-events: none; opacity: .62; }
.locked-overlay {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 14px;
  background: linear-gradient(180deg, rgba(250,249,245,.42) 0%, rgba(250,249,245,.88) 28%, rgba(250,249,245,.99) 100%);
  border-radius: var(--r-md); text-align: center; padding: 20px;
}
.locked-overlay p { font-size: 14px; color: var(--ink-2); max-width: 320px; }

/* 会员方案 */
.member-panel {
  background: linear-gradient(180deg, #fdfaf2 0%, #fbf7ec 100%);
  border: 1px solid #e8d5a8; border-radius: var(--r-xl);
  padding: 44px 40px; margin: 48px 0;
}
.member-panel-head { text-align: center; margin-bottom: 34px; }
.member-panel-head .badge {
  display: inline-block; font-size: 11px; letter-spacing: .14em;
  background: var(--gold); color: #fff; padding: 5px 14px; border-radius: 20px; margin-bottom: 16px;
}
.member-panel-head h2 { font-size: 30px; margin-bottom: 10px; }
.member-panel-head p { color: var(--ink-2); font-size: 15px; max-width: 480px; margin: 0 auto; }

.benefit-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 32px; }
.benefit {
  background: rgba(255,255,255,.75); border: 1px solid #ece0c4;
  border-radius: var(--r-md); padding: 18px 18px;
}
.benefit h4 { font-size: 14.5px; margin-bottom: 5px; display: flex; align-items: center; gap: 8px; }
.benefit h4 .tick { color: var(--gold); font-size: 13px; }
.benefit p { font-size: 12.5px; color: var(--ink-2); line-height: 1.6; }

.price-row { display: flex; align-items: center; justify-content: center; gap: 28px; flex-wrap: wrap; }
.price-tag { text-align: center; }
.price-tag .amount { font-family: var(--serif); font-size: 42px; color: var(--brand); line-height: 1; }
.price-tag .amount small { font-size: 15px; color: var(--ink-3); }
.price-tag .note { font-size: 12px; color: var(--ink-3); margin-top: 6px; }

/* ---------- 会员中心 ---------- */
.dash-head { padding-top: 48px; padding-bottom: 32px; }
.dash-grid { display: grid; grid-template-columns: 1fr 340px; gap: 28px; align-items: start; }
.panel {
  background: var(--paper-2); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 28px;
}
.panel + .panel { margin-top: 20px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.panel-head h3 { font-size: 18px; }

.plan-week { border-left: 2px solid var(--line); padding-left: 20px; margin-bottom: 26px; position: relative; }
.plan-week::before {
  content: ""; position: absolute; left: -5px; top: 6px;
  width: 8px; height: 8px; border-radius: 50%; background: var(--brand);
}
.plan-week h4 { font-size: 15px; margin-bottom: 3px; }
.plan-week .theme { font-size: 12px; color: var(--gold); margin-bottom: 10px; }
.plan-week ul { list-style: none; display: flex; flex-direction: column; gap: 7px; }
.plan-week li { font-size: 13.5px; color: var(--ink-2); display: flex; gap: 9px; line-height: 1.6; }
.plan-week li input { margin-top: 5px; accent-color: var(--brand); flex-shrink: 0; }
.plan-week li.done span { text-decoration: line-through; color: var(--ink-3); }

.history-item {
  display: flex; align-items: center; gap: 14px; padding: 13px 0;
  border-bottom: 1px solid var(--line); font-size: 14px;
}
.history-item:last-child { border-bottom: none; }
.history-date { color: var(--ink-3); font-size: 12.5px; width: 88px; flex-shrink: 0; font-variant-numeric: tabular-nums; }
.history-type { flex: 1; }
.history-pct { font-family: var(--serif); font-size: 17px; color: var(--brand); }

.chart-box { position: relative; height: 240px; margin-top: 8px; min-width: 0; }
/* Chart.js 会把 canvas 写成固定像素宽，若不设上限，它会反过来把栅格撑出容器 */
.chart-box canvas { max-width: 100%; }

/* 会员状态卡 */
.status-card {
  background: linear-gradient(135deg, #1f5c4a 0%, #2d7a63 100%);
  color: #fff; border-radius: var(--r-lg); padding: 26px 24px;
}
.status-card .label { font-size: 11px; letter-spacing: .14em; opacity: .7; margin-bottom: 8px; }
.status-card .who { font-family: var(--serif); font-size: 21px; margin-bottom: 4px; }
.status-card .sub { font-size: 12.5px; opacity: .75; }
.status-card .free-card { background: rgba(255,255,255,.12); }

/* ---------- 弹窗 ---------- */
.modal-mask {
  position: fixed; inset: 0; background: rgba(28,28,26,.42);
  backdrop-filter: blur(3px); z-index: 500;
  display: none; align-items: center; justify-content: center; padding: 24px;
}
.modal-mask.show { display: flex; animation: fadeIn .22s ease; }
.modal {
  background: var(--paper-2); border-radius: var(--r-xl); width: 100%;
  max-width: 440px; padding: 36px 32px; box-shadow: var(--shadow-lg);
  position: relative; max-height: 90vh; overflow-y: auto;
}
.modal-close {
  position: absolute; right: 18px; top: 16px; font-size: 20px;
  color: var(--ink-3); line-height: 1; padding: 4px;
}
.modal h3 { font-size: 22px; margin-bottom: 6px; }
.modal .sub { font-size: 13.5px; color: var(--ink-2); margin-bottom: 24px; }

.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12.5px; color: var(--ink-2); margin-bottom: 6px; }
.field input {
  width: 100%; padding: 11px 14px; border: 1px solid var(--line-2);
  border-radius: var(--r-sm); font-size: 14px; font-family: inherit;
  background: var(--paper); color: var(--ink); outline: none; transition: border .15s;
}
.field input:focus { border-color: var(--brand); background: #fff; }
.field .err { font-size: 12px; color: var(--red); margin-top: 5px; display: none; }

.pay-summary { background: var(--paper-3); border-radius: var(--r-md); padding: 16px 18px; margin-bottom: 20px; }
.pay-summary .row { display: flex; justify-content: space-between; font-size: 13.5px; padding: 5px 0; }
.pay-summary .row.total { border-top: 1px solid var(--line-2); margin-top: 8px; padding-top: 12px; font-weight: 500; }
.pay-summary .row.total span:last-child { font-family: var(--serif); font-size: 20px; color: var(--brand); }

/* Toast */
.toast {
  position: fixed; bottom: 32px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--ink); color: #fff; padding: 12px 22px; border-radius: 100px;
  font-size: 13.5px; opacity: 0; pointer-events: none; transition: all .3s; z-index: 900;
  box-shadow: var(--shadow-lg); max-width: 90vw;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- 页脚 ---------- */
.footer { border-top: 1px solid var(--line); padding: 44px 0 32px; margin-top: 40px; }
.footer-inner { display: flex; justify-content: space-between; gap: 40px; flex-wrap: wrap; }
.footer-brand { max-width: 320px; }
.footer-brand p { font-size: 12.5px; color: var(--ink-3); margin-top: 12px; line-height: 1.8; }
.footer-links { display: flex; gap: 48px; font-size: 13px; }
.footer-links h5 { font-size: 12px; color: var(--ink-3); margin-bottom: 10px; font-weight: 400; letter-spacing: .06em; }
.footer-links a { display: block; color: var(--ink-2); margin-bottom: 7px; font-size: 13px; }
.footer-links a:hover { color: var(--brand); }
.footer-bottom {
  margin-top: 32px; padding-top: 22px; border-top: 1px solid var(--line);
  font-size: 11.5px; color: var(--ink-3); line-height: 1.8;
}

/* ---------- PDF 模板（屏幕外） ---------- */
#pdf-template {
  position: absolute; left: -9999px; top: 0; width: 794px;
  background: #fff; color: #1c1c1a; padding: 0;
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
}
.pdf-page {
  padding: 54px 58px; page-break-after: always;
  min-height: 1123px; box-sizing: border-box; position: relative;
}
.pdf-page:last-child { page-break-after: auto; }
.pdf-cover {
  display: flex; flex-direction: column;
  justify-content: center; align-items: center; text-align: center;
}
.pdf-brand { font-size: 12px; letter-spacing: .3em; color: #1f5c4a; margin-bottom: 40px; }
.pdf-title { font-size: 34px; font-family: "Songti SC", serif; margin-bottom: 16px; }
.pdf-sub { font-size: 14px; color: #6b6b60; }
.pdf-type-name { font-size: 40px; font-family: "Songti SC", serif; color: #1f5c4a; margin: 30px 0 10px; }
.pdf-section { margin-bottom: 28px; }
.pdf-section h3 {
  font-size: 16px; font-family: "Songti SC", serif; color: #1f5c4a;
  border-left: 3px solid #1f5c4a; padding-left: 10px; margin-bottom: 12px;
}
.pdf-section p, .pdf-section li { font-size: 12.5px; line-height: 1.85; color: #333; }
.pdf-section ul { padding-left: 18px; }
.pdf-table { width: 100%; border-collapse: collapse; margin: 10px 0; }
.pdf-table td, .pdf-table th {
  border: 1px solid #ddd; padding: 8px 10px; font-size: 12px; text-align: left;
}
.pdf-table th { background: #f5f3ec; font-weight: 500; }
.pdf-badge {
  display: inline-block; background: #e8f2ed; color: #1f5c4a;
  padding: 4px 12px; border-radius: 20px; font-size: 12px; margin: 3px 4px 3px 0;
}
.pdf-foot { position: absolute; bottom: 30px; left: 60px; right: 60px; font-size: 10px; color: #999; border-top: 1px solid #eee; padding-top: 8px; }

/* ==========================================================
   v2 新增组件
   ========================================================== */

/* ---------- 体质图鉴 ---------- */
.type-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.type-tile {
  text-align: left; background: var(--paper-2); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 24px 22px; transition: all .2s; position: relative;
  display: flex; flex-direction: column; gap: 6px;
}
.type-tile:hover { border-color: var(--c); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.type-tile .tt-name { font-family: var(--serif); font-size: 22px; color: var(--c); }
.type-tile .tt-en { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }
.type-tile .tt-line { font-size: 13.5px; color: var(--ink-2); line-height: 1.6; margin-top: 4px; }
.type-tile .tt-more { font-size: 12.5px; color: var(--c); margin-top: 8px; }
.type-tile.compact .tt-name { font-size: 14px; }

/* ---------- 体质详情 ---------- */
.type-hero { padding-top: 40px; padding-bottom: 32px; }
.back-link { font-size: 13px; color: var(--ink-3); margin-bottom: 22px; display: inline-block; }
.back-link:hover { color: var(--brand); }
.type-hero h1 { font-size: 42px; margin-bottom: 6px; }
.type-tagline { font-size: 16px; color: var(--ink-2); margin-bottom: 22px; }
.type-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.principle { font-size: 14px; color: var(--ink-2); line-height: 1.8; margin-bottom: 20px; }
.avoid-block { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 8px; }
.avoid-label { font-size: 12px; color: var(--ink-3); margin-right: 4px; }
.chip {
  font-size: 12.5px; padding: 4px 12px; border-radius: 20px;
  background: var(--paper-3); color: var(--ink-2); border: 1px solid var(--line);
}
.chip-avoid { background: #fdf0ec; color: #a83b3b; border-color: #f0d9d2; }
.link-btn { font-size: 13.5px; color: var(--brand); border-bottom: 1px solid rgba(31,92,74,.3); padding-bottom: 1px; }
.badge-soft { display: inline-block; font-size: 12px; padding: 3px 11px; border-radius: 20px; }

/* 按摩位置 */
.massage-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); gap: 16px; }
.massage-card {
  display: flex; gap: 14px; background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--r-md); padding: 14px;
}
.massage-art { width: 92px; height: 92px; flex-shrink: 0; position: relative; border-radius: 12px; overflow: hidden; background: #f0ebe0; }
.massage-art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mdot {
  position: absolute; width: 15px; height: 15px; margin: -7.5px 0 0 -7.5px; border-radius: 50%;
  background: var(--c, #8a4b2a); border: 2.5px solid #fff;
  box-shadow: 0 0 0 3px rgba(255,255,255,.55), 0 2px 6px rgba(0,0,0,.28);
}
.mdot::after {
  content: ""; position: absolute; inset: -9px; border-radius: 50%;
  border: 2px solid var(--c, #8a4b2a); opacity: .45; animation: mdotPulse 2.4s ease-out infinite;
}
@keyframes mdotPulse { 0% { transform: scale(.55); opacity: .55; } 70% { transform: scale(1.25); opacity: 0; } 100% { opacity: 0; } }
.massage-label { font-size: 11px; letter-spacing: .1em; color: var(--gold); margin-bottom: 2px; }
.massage-card p { font-size: 13px; color: var(--ink-2); line-height: 1.65; margin-bottom: 8px; }
.massage-card p:last-child { margin-bottom: 0; }

/* 一天预览 */
.meal-mini-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.meal-mini { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-md); padding: 14px; }
.mm-time { font-size: 11px; letter-spacing: .1em; color: var(--gold); margin-bottom: 4px; }
.mm-name { font-family: var(--serif); font-size: 15px; margin-bottom: 4px; }
.mm-ing { font-size: 12px; color: var(--ink-3); line-height: 1.55; }

/* ---------- 档案：档案切换 ---------- */
.profile-bar { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 18px; }
.profile-chip {
  font-size: 13px; padding: 7px 15px; border-radius: 100px;
  border: 1px solid var(--line-2); background: var(--paper-2); color: var(--ink-2);
}
.profile-chip.on { background: var(--brand); color: #fff; border-color: var(--brand); }
.profile-chip.add { border-style: dashed; color: var(--ink-3); }
.profile-chip.full { border-style: solid; border-color: var(--line); color: var(--ink-3); background: transparent; cursor: default; }
.profile-seats { font-size: 12px; color: var(--ink-3); align-self: center; margin-left: 4px; }

/* ---------- 档案：每日食谱 ---------- */
.panel-sub {
  font-size: 12px; letter-spacing: .1em; color: var(--gold);
  padding-bottom: 8px; border-bottom: 1px solid var(--line); margin-bottom: 16px;
}
.meal-day { display: flex; flex-direction: column; gap: 18px; }
.meal-block .mb-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.mb-time { font-family: var(--serif); font-size: 15px; }
.dish { display: flex; gap: 12px; padding: 10px 0; border-top: 1px dashed var(--line); }
.dish:first-of-type { border-top: none; }
.dish-ico {
  width: 44px; height: 44px; border-radius: 50%; flex-shrink: 0;
  background: radial-gradient(circle at 35% 30%, #fff, var(--paper-3));
  border: 1px solid var(--line); display: flex; align-items: center; justify-content: center;
}
.dish-ico .ing-svg { width: 32px; height: 32px; }
.dish-body { flex: 1; min-width: 0; }
.dish-name { font-size: 14.5px; margin-bottom: 2px; }
.dish-ing { font-size: 12.5px; color: var(--ink-2); line-height: 1.55; }
.dish-swap { font-size: 11.5px; color: var(--ink-3); margin-top: 2px; }
.dish-fb { display: flex; gap: 8px; align-items: center; margin-top: 8px; flex-wrap: wrap; }
.fb-btn {
  font-size: 12px; padding: 4px 12px; border-radius: 100px;
  border: 1px solid var(--line-2); color: var(--ink-2); background: var(--paper-2);
}
.fb-btn:hover { border-color: var(--brand); color: var(--brand); }
.fb-btn.on { background: var(--brand-soft); border-color: var(--brand); color: var(--brand); }
.fb-reason { font-size: 11.5px; color: var(--ink-3); }

/* ---------- 档案：茶方 ---------- */
.tea-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.tea-tab {
  font-size: 12.5px; padding: 5px 14px; border-radius: 100px;
  border: 1px solid var(--line-2); color: var(--ink-2); background: var(--paper-2);
}
.tea-tab.on { background: var(--brand); color: #fff; border-color: var(--brand); }
.tea-current {
  display: flex; align-items: center; gap: 14px; padding: 14px 16px;
  background: var(--brand-soft); border: 1px solid #cfe3d9; border-radius: var(--r-md); margin-bottom: 14px;
}
.tc-label { font-size: 11px; letter-spacing: .1em; color: var(--brand); }
.tc-name { font-family: var(--serif); font-size: 17px; color: var(--brand); flex: 1; }
.tea-list { display: flex; flex-direction: column; gap: 10px; }
.tea-item {
  display: flex; gap: 12px; align-items: center; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: var(--r-md); background: var(--paper);
}
.tea-item.on { border-color: var(--brand); background: var(--brand-soft); }
.tea-ico {
  width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0;
  background: radial-gradient(circle at 35% 30%, #fff, var(--paper-3));
  border: 1px solid var(--line); display: flex; align-items: center; justify-content: center;
}
.tea-ico .ing-svg { width: 26px; height: 26px; }
.tea-body { flex: 1; min-width: 0; }
.tea-name { font-size: 14px; display: flex; align-items: center; gap: 8px; }
.tea-cat { font-size: 10.5px; padding: 1px 7px; border-radius: 20px; background: var(--paper-3); color: var(--ink-3); }
.tea-ing { font-size: 12px; color: var(--ink-2); }
.tea-note { font-size: 11.5px; color: var(--ink-3); }

/* ---------- 档案：记录 ---------- */
.log-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(190px, 100%), 1fr)); gap: 14px; }
.log-item { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; color: var(--ink-2); }
.log-opts { display: flex; gap: 6px; flex-wrap: wrap; }
.log-opt {
  font-size: 12.5px; padding: 7px 11px; border-radius: 100px; cursor: pointer;
  border: 1px solid var(--line-2); background: var(--paper); color: var(--ink-2); transition: .15s;
}
.log-opt:hover:not(:disabled) { border-color: var(--brand); color: var(--brand); }
.log-opt.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.log-opt:disabled { opacity: .55; cursor: default; }
.log-note { display: flex; flex-direction: column; gap: 5px; margin-top: 14px; font-size: 12.5px; color: var(--ink-2); }
.log-note textarea {
  padding: 10px 12px; border: 1px solid var(--line-2); border-radius: var(--r-sm);
  font-size: 13px; font-family: inherit; background: var(--paper); outline: none; resize: vertical;
}
.log-btn {
  font-size: 11px; padding: 2px 9px; border-radius: 100px; margin-left: 6px;
  background: var(--brand-soft); color: var(--brand); flex-shrink: 0;
}

/* ---------- 档案：曲线 ---------- */
.chart-tools { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; gap: 12px; flex-wrap: wrap; }
.range-tabs { display: flex; gap: 6px; }
.range-tab {
  font-size: 12px; padding: 5px 13px; border-radius: 100px;
  border: 1px solid var(--line-2); color: var(--ink-2); background: var(--paper-2);
}
.range-tab.on { background: var(--brand); color: #fff; border-color: var(--brand); }
.chart-box.tall { height: 300px; margin-top: 10px; }
.locked-box { display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 12px; background: var(--paper-3); border-radius: var(--r-md); }

/* ---------- 档案：侧栏 ---------- */
.icon-btn {
  width: 24px; height: 24px; border-radius: 50%; color: var(--ink-3);
  font-size: 15px; line-height: 1; display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.icon-btn:hover { background: #fdf0ec; color: var(--red); }
.family-list { display: flex; flex-direction: column; gap: 8px; }
.family-item {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px;
}
.family-item:last-child { border-bottom: none; }
.btn-white { background: rgba(255,255,255,.92); color: var(--brand); }

/* ---------- 申请记录（书面申请凭证） ---------- */
.consent-list { display: flex; flex-direction: column; gap: 2px; }
.consent-item {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 13.5px;
  min-width: 0;
}
.consent-item:last-child { border-bottom: none; }
.consent-main { min-width: 0; }
.consent-meta {
  font-size: 11.5px; color: var(--ink-3); margin-top: 3px;
  font-variant-numeric: tabular-nums; letter-spacing: .01em;
  word-break: break-all;
}
.consent-item .link-btn { flex: 0 0 auto; white-space: nowrap; }

/* ---------- 订阅弹窗 ---------- */
.modal-wide { max-width: 720px; }
.cycle-toggle {
  display: inline-flex; background: var(--paper-3); border-radius: 100px; padding: 4px; margin-bottom: 22px;
}
.cycle-toggle button {
  padding: 8px 22px; border-radius: 100px; font-size: 13.5px; color: var(--ink-2);
}
.cycle-toggle button.active { background: var(--paper-2); color: var(--brand); box-shadow: var(--shadow-sm); font-weight: 500; }
.plan-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 20px; }
.plan-card {
  text-align: left; border: 1.5px solid var(--line); border-radius: var(--r-lg);
  padding: 18px 16px; background: var(--paper-2); transition: all .18s;
}
.plan-card:hover { border-color: var(--line-2); }
.plan-card.on { border-color: var(--gold); background: #fffdf7; box-shadow: 0 0 0 3px rgba(166,124,46,.1); }
.pc-head { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; flex-wrap: wrap; }
.pc-name { font-family: var(--serif); font-size: 16px; }
.pc-tag { font-size: 10px; padding: 2px 7px; border-radius: 20px; background: var(--gold-soft); color: var(--gold); }
.pc-price { font-family: var(--serif); font-size: 26px; color: var(--brand); line-height: 1.1; }
.pc-price small { font-size: 12px; color: var(--ink-3); font-family: var(--sans); }
.pc-desc { font-size: 12px; color: var(--ink-3); margin: 6px 0 10px; line-height: 1.5; min-height: 36px; }
.plan-card ul { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.plan-card li { font-size: 11.5px; color: var(--ink-2); line-height: 1.5; display: flex; gap: 6px; }
.plan-card li::before { content: "·"; color: var(--gold); font-weight: 700; }
.pay-note { background: var(--paper-3); border-radius: var(--r-md); padding: 16px 18px; margin-bottom: 20px; }
.pay-note p { font-size: 12.5px; color: var(--ink-2); line-height: 1.75; }
.pay-note p + p { margin-top: 6px; }
/* 付费弹窗内容较多，收紧间距以免主按钮被挤到折叠线以下 */
#pay-modal .modal { padding: 20px 30px 14px; }
#pay-modal .modal .sub { margin-bottom: 10px; }
#pay-modal .pay-note { padding: 11px 14px; margin-bottom: 11px; }
#pay-modal .pay-note p { font-size: 12px; line-height: 1.58; }
#pay-modal .pay-note p + p { margin-top: 4px; }
#pay-modal .plan-list { margin-bottom: 11px; }
#pay-modal .plan-card { padding: 12px; }
#pay-modal .pay-consent { padding: 8px 11px; margin-bottom: 10px; }
/* 下单前的明示同意：欧盟 Art 16(a)/(m) 要求「事先明确同意 + 确认丧失撤销权」 */
.pay-consent {
  display: flex; gap: 9px; align-items: flex-start;
  padding: 10px 12px; margin-bottom: 12px;
  background: var(--paper-3); border: 1px solid var(--line); border-radius: var(--r-md);
  font-size: 11.5px; line-height: 1.6; color: var(--ink-2); cursor: pointer;
}
.pay-consent input { margin-top: 2px; flex: 0 0 auto; width: 14px; height: 14px; accent-color: var(--brand); }
.pay-consent span { min-width: 0; }
.pay-consent strong { color: var(--ink); font-weight: 600; }
.pay-note a, .pay-consent a { color: var(--brand); text-decoration: underline; text-underline-offset: 2px; }
.btn:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }

/* 条款类弹窗正文 */
.legal h4 { font-size: 13.5px; font-weight: 700; color: var(--ink); margin: 18px 0 6px; }
.legal h4:first-child { margin-top: 4px; }
.legal p, .legal li { font-size: 12.5px; line-height: 1.78; color: var(--ink-2); }
.legal p + p { margin-top: 6px; }
.legal ol { margin: 4px 0 0; padding-left: 18px; display: flex; flex-direction: column; gap: 5px; }

/* 特定商取引法表记（日本 §11）：日文项名 + 中文释义两行对照 */
.legal-table { border-top: 1px solid var(--line); margin: 6px 0 2px; }
.tk-row {
  display: grid; grid-template-columns: minmax(0, 34%) minmax(0, 1fr);
  gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line);
  font-size: 12.5px; line-height: 1.7;
}
.tk-row:last-child { border-bottom: none; }
.tk-k { color: var(--ink-2); }
.tk-k em { font-style: normal; font-size: 11px; color: var(--ink-3); display: block; margin-top: 2px; }
.tk-v { color: var(--ink); min-width: 0; }
.placeholder {
  display: inline-block; padding: 1px 6px; border-radius: 4px;
  background: #FDF3E3; color: #8A6220; border: 1px dashed #E2C98F;
  font-size: 11.5px; line-height: 1.6;
}
.legal li { list-style: decimal; }
.legal em { font-style: normal; color: var(--ink-3); }

/* 结果页工具条 */
.toolbar {
  display: flex; gap: 12px; flex-wrap: wrap; align-items: center; justify-content: space-between;
  padding: 24px 0; border-top: 1px solid var(--line);
}
.member-panel.active { background: linear-gradient(180deg, #eef7f2, #ffffff); border-color: #c9e3d6; }
.badge-on { background: var(--brand) !important; }
.plan-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; text-align: left; }
.plan-grid .plan-week { margin-bottom: 0; }
.panel-actions { text-align: center; margin-top: 28px; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
  /* 统一用 minmax(0, 1fr)：1fr 的 min-content 下限会让图表/长标题把栅格撑出屏幕 */
  .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .hero-wheel { max-width: min(340px, 100%); }
  .dash-grid { grid-template-columns: minmax(0, 1fr); }
  .benefit-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .trait-grid { grid-template-columns: minmax(0, 1fr); }
  .ingredient-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .type-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .plan-list { grid-template-columns: minmax(0, 1fr); }
  .plan-grid { grid-template-columns: minmax(0, 1fr); }
  .meal-mini-row { grid-template-columns: minmax(0, 1fr); }
  /* 窄屏兜底：flex/grid 子项默认 min-width:auto 会被内容顶宽 */
  .type-tile, .massage-card, .panel, .hero-grid > *, .type-grid > *, .dash-grid > * { min-width: 0; }
  .massage-card > *:not(.massage-art) { min-width: 0; }
}

/* ---------- 三档对比（茶饮独立成类目） ---------- */
.compare-3 { grid-template-columns: 1fr 1fr 1fr; }
.compare-3 .compare-col.free { border-right: 1px solid var(--line); }
.compare-3 .compare-col.member { border-right: 1px solid var(--line); }
.compare-3 .compare-col:last-child { border-right: none; }
.compare-col.tea-col { background: linear-gradient(180deg, #f7faf6 0%, var(--paper-2) 100%); }
.compare-col.tea-col .compare-tag.gold { background: #e8f0e6; color: #2f6b45; }
.compare-col.tea-col .compare-price strong { color: #2f6b45; }
.compare-col.tea-col li::before { color: #2f6b45; }
.compare-foot {
  margin-top: 18px; padding: 16px 20px; border-radius: var(--r-md);
  background: var(--paper-3); font-size: 13.5px; color: var(--ink-2); line-height: 1.8;
}
.compare-foot strong { color: var(--ink); }

/* ---------- 菜品反馈弹窗 ---------- */
.fb-opts { display: flex; flex-direction: column; gap: 9px; margin: 18px 0 20px; }
.fb-opt {
  text-align: left; padding: 13px 16px; border-radius: var(--r-sm); cursor: pointer;
  border: 1px solid var(--line-2); background: var(--paper); color: var(--ink); font-size: 14px; transition: .15s;
}
.fb-opt:hover { border-color: var(--brand); }
.fb-opt.on { border-color: var(--brand); background: var(--brand-soft); font-weight: 500; }

/* ---------- 过敏原 ---------- */
.allergen-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.ag-chip {
  font-size: 13px; padding: 8px 14px; border-radius: 100px; cursor: pointer;
  border: 1px solid var(--line-2); background: var(--paper); color: var(--ink-2); transition: .15s;
}
.ag-chip:hover { border-color: var(--brand); color: var(--brand); }
.ag-chip.on { background: var(--brand); border-color: var(--brand); color: #fff; }

/* ---------- 家庭版菜谱切换 ---------- */
.fam-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.fam-label { font-size: 11px; letter-spacing: .1em; color: var(--ink-3); }
.fam-tab {
  font-size: 12.5px; padding: 6px 12px; border-radius: 100px; cursor: pointer;
  border: 1px solid var(--line-2); background: var(--paper); color: var(--ink-2);
}
.fam-tab.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.fam-who { font-size: 11.5px; color: var(--ink-3); margin-left: 4px; }
.dish-from {
  display: inline-block; margin-left: 8px; font-size: 10.5px; padding: 1px 7px;
  border-radius: 100px; background: var(--brand-soft); color: var(--brand); vertical-align: middle;
}

/* ---------- 茶饮独立类目 ---------- */
.tea-intro { font-size: 12.5px; color: var(--ink-3); line-height: 1.7; margin-bottom: 12px; }
.tea-cat-row { display: flex; gap: 8px; flex-wrap: wrap; }
.tea-cat-pill {
  display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px;
  padding: 6px 12px; border-radius: 100px; background: #eef4ec; color: #2f6b45;
}
.tea-cat-pill b { font-family: var(--serif); font-size: 13px; }
.tea-cat-pill.off { background: var(--paper-3); color: var(--ink-3); }
.link-btn.sm { font-size: 11.5px; margin-left: 8px; font-family: var(--sans); }

/* ---------- 返回链接（加大加粗） ---------- */
.back-link {
  font-size: 15px; font-weight: 600; color: var(--brand);
  margin-bottom: 22px; display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px 6px 8px; border-radius: 100px; background: var(--brand-soft);
  border-bottom: none;
}
.back-link:hover { background: #d9e8e1; color: var(--brand-dark, #164a3a); }

/* 查看结果按钮呼吸提示 */
.btn.pulse { animation: btnPulse 1.1s ease-in-out 2; }
@keyframes btnPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(31,92,74,.45); }
  50% { box-shadow: 0 0 0 9px rgba(31,92,74,0); }
}

@media (max-width: 900px) {
  .compare-3 { grid-template-columns: 1fr; }
  .compare-3 .compare-col.free, .compare-3 .compare-col.member { border-right: none; border-bottom: 1px solid var(--line); }
}

@media (max-width: 640px) {
  h1 { font-size: 30px; }
  .hero { padding: 48px 0 40px; }
  .hero h1 { font-size: 32px; }
  .hero-meta { gap: 22px; }
  .steps { grid-template-columns: 1fr; }
  .compare { grid-template-columns: 1fr; }
  .compare-col.free { border-right: none; border-bottom: 1px solid var(--line); }
  .quiz-card { padding: 28px 22px; }
  .quiz-q { font-size: 18px; min-height: 56px; }
  .pain-list { grid-template-columns: 1fr; }
  .pain-block { padding: 24px 20px; }
  .member-panel { padding: 30px 22px; }
  .benefit-grid { grid-template-columns: 1fr; }
  .result-main-name { font-size: 32px; }
  .nav-links { display: none; }
  .section { padding: 48px 0; }
  .score-row { grid-template-columns: 74px 1fr 44px; gap: 10px; }
  .type-grid { grid-template-columns: 1fr; }
  .type-hero h1 { font-size: 34px; }
  .modal { padding: 28px 22px; }
  .plan-card { padding: 16px 14px; }
  .price-row { gap: 16px; }
  .price-tag .amount { font-size: 34px; }
  .log-grid { grid-template-columns: 1fr 1fr; }
  .massage-card { flex-direction: row; }
}

/* ==========================================================
   缔约前合规披露
   —— 订阅扣费醒目披露（新加坡 CPFTA 不公平实践 / 马来西亚购买前披露 / 越南信息完整披露）
   —— 地域法定权利告知（泰国 DSDMA มาตรา ๓๐/๓๑：须泰文、须更醒目）
   ========================================================== */
.pay-disclose {
  border: 1px solid var(--line-2);
  border-left: 3px solid var(--gold);
  background: var(--gold-soft);
  border-radius: var(--r-md);
  padding: 14px 16px;
  margin-bottom: 14px;
}
.pay-disclose .pd-head {
  font-size: 13px; font-weight: 700; color: var(--gold);
  letter-spacing: .02em; margin-bottom: 7px;
}
.pay-disclose .pd-lead { font-size: 13px; line-height: 1.8; color: var(--ink); }
.pay-disclose .pd-sub { font-size: 11.5px; line-height: 1.7; color: var(--ink-2); margin-top: 6px; }
.pay-disclose strong { font-weight: 700; }
.pay-disclose b { font-weight: 700; font-variant-numeric: tabular-nums; }

/* 泰国：解除权条款须比其余文字更醒目（มาตรา ๓๑） */
.region-notice {
  border: 1px solid var(--line-2);
  background: var(--paper-3);
  border-radius: var(--r-md);
  padding: 14px 16px;
  margin-bottom: 14px;
  font-family: var(--sans-i18n);
  line-height: 1.9;
  overflow-wrap: anywhere;
}
.region-notice.prominent {
  border: 2px solid var(--brand);
  background: var(--brand-soft);
  box-shadow: var(--shadow-sm);
}
.region-notice .rn-head {
  font-size: 17px; font-weight: 700; color: var(--brand); line-height: 1.5;
}
.region-notice.prominent .rn-head { font-size: 20px; letter-spacing: .01em; }
.region-notice .rn-sub {
  font-size: 12px; color: var(--ink-3); margin-top: 2px; margin-bottom: 9px;
}
.region-notice .rn-lead { font-size: 14.5px; line-height: 1.85; color: var(--ink); font-weight: 500; }
.region-notice.prominent .rn-lead { font-size: 16px; font-weight: 600; }
.region-notice .rn-cn { font-size: 12.5px; line-height: 1.8; color: var(--ink-2); margin-top: 6px; }
.region-notice .rn-method {
  margin-top: 9px; padding: 9px 11px; background: rgba(255, 255, 255, .72);
  border-radius: var(--r-sm); font-size: 13px; line-height: 1.75; color: var(--ink);
}
.region-notice .rn-k {
  display: inline-block; font-weight: 700; color: var(--brand); margin-right: 8px;
}
.region-notice .rn-src {
  margin-top: 9px; padding-top: 8px; border-top: 1px dashed var(--line-2);
  font-size: 11px; color: var(--ink-3); line-height: 1.7;
}

/* 档案页：法定窗口状态 */
.consent-actions { display: flex; flex-direction: column; gap: 6px; align-items: flex-end; flex: 0 0 auto; }
.cn-badge {
  display: inline-block; margin-top: 6px; padding: 2px 8px; border-radius: 999px;
  font-size: 11px; line-height: 1.7; font-weight: 500;
}
.cn-badge.open { background: var(--brand-soft); color: var(--brand); }
.cn-badge.done { background: var(--paper-3); color: var(--ink-2); }
.cn-badge.over { background: var(--paper-3); color: var(--ink-3); }
.cn-badge.none { background: var(--paper-3); color: var(--ink-3); }
.btn-xs { padding: 5px 10px; font-size: 12px; border-radius: 6px; }

/* ==========================================================
   当地买菜提示（按所在市场给出可买到的对应食材）
   ========================================================== */
.dish-local {
  font-size: 11.5px;
  color: #7a5c1f;
  background: var(--gold-soft);
  border: 1px solid #ecdcb4;
  border-radius: var(--r-sm);
  padding: 5px 8px;
  margin-top: 4px;
  line-height: 1.5;
}

/* ==========================================================
   地区准入说明页（尚未在该地区开展业务）
   ========================================================== */
.blocked-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  background: var(--paper);
}
.blocked-card {
  width: 100%;
  max-width: 520px;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-md);
  padding: 40px 28px 32px;
  text-align: center;
  font-family: var(--sans-i18n);
}
.blocked-mark {
  width: 44px; height: 44px;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: var(--brand-soft);
  border: 1px solid #cfe3da;
  position: relative;
}
.blocked-mark::after {
  content: "";
  position: absolute; inset: 0;
  background: no-repeat center/22px 22px
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231f5c4a' stroke-width='1.8' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7.5v5M12 16.2v.3'/%3E%3C/svg%3E");
}
.blocked-card h1 {
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 14px;
  line-height: 1.45;
}
.blocked-lead {
  font-size: 15px;
  color: var(--ink);
  line-height: 1.7;
  margin: 0 0 12px;
}
.blocked-body {
  font-size: 13.5px;
  color: var(--ink-2);
  line-height: 1.75;
  margin: 0 0 14px;
}
.blocked-reason {
  display: inline-block;
  font-size: 11.5px;
  color: var(--ink-3);
  background: var(--paper-3);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 12px;
  margin: 0 0 20px;
}
.blocked-kicker {
  display: inline-block;
  font-size: 11px;
  letter-spacing: .06em;
  color: var(--brand);
  background: var(--brand-soft);
  border: 1px solid #cfe3da;
  border-radius: 999px;
  padding: 3px 11px;
  margin: 0 0 12px;
}
.blocked-contact {
  font-size: 12px;
  color: var(--ink-2);
  line-height: 1.75;
  margin: 0 0 4px;
  padding: 10px 12px;
  background: var(--paper-3);
  border-radius: var(--r-sm);
}
.blocked-alt { margin: 0 0 18px; }
.blocked-opts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  margin-top: 14px;
}
.blocked-opt {
  font: inherit;
  font-size: 12.5px;
  color: var(--brand);
  background: var(--paper);
  border: 1px solid var(--line-2);
  border-radius: 999px;
  padding: 6px 12px;
  cursor: pointer;
}
.blocked-opt:hover { background: var(--brand-soft); border-color: var(--brand-2); }
.blocked-foot {
  font-size: 11.5px;
  color: var(--ink-3);
  line-height: 1.7;
  margin: 0;
  padding-top: 16px;
  border-top: 1px dashed var(--line);
}

/* ==========================================================
   退款说明：分地区规则卡（按 IP / 语言识别出的国家渲染）
   ========================================================== */
.region-card {
  border: 1px solid var(--line-2);
  background: var(--paper-3);
  border-radius: var(--r-md);
  padding: 14px 16px;
  margin: 0 0 16px;
  font-family: var(--sans-i18n);
}
.region-card .rc-head {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
}
.rc-tag {
  font-size: 10.5px;
  letter-spacing: .04em;
  color: #fff;
  background: var(--brand);
  border-radius: 999px;
  padding: 2px 9px;
}
.region-card .rc-head strong { font-size: 16px; color: var(--ink); }
.rc-src { font-size: 11.5px; color: var(--ink-3); margin-left: auto; }
.rc-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 12px 0 4px;
}
.rc-grid > div {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 8px 10px;
}
.rc-grid dt { font-size: 11px; color: var(--ink-3); line-height: 1.4; }
.rc-grid dd { margin: 3px 0 0; font-size: 13px; color: var(--ink); font-weight: 600; line-height: 1.5; }
.rc-law {
  font-size: 11px;
  color: var(--ink-3);
  line-height: 1.7;
  margin: 10px 0 0;
  padding-top: 8px;
  border-top: 1px dashed var(--line-2);
}
.rc-ev { display: inline-block; margin-left: 8px; }
.rc-note { font-size: 12px; color: var(--ink-2); line-height: 1.8; margin: 6px 0 0; }
.rc-market {
  color: #7a5c1f;
  background: var(--gold-soft);
  border: 1px solid #ecdcb4;
  border-radius: var(--r-sm);
  padding: 6px 9px;
}
.rc-fix { font-size: 12px; color: var(--ink-3); margin: 10px 0 0; }
.region-card.is-off { border-color: #e6c3c3; background: #fdf4f4; }
@media (max-width: 420px) {
  .rc-grid { grid-template-columns: 1fr; }
}

/* ==========================================================
   结果页顶部：非医疗器械 / 非诊断声明
   ========================================================== */
.nonmed-bar {
  margin: 0 0 18px;
  padding: 10px 13px;
  border: 1px solid #e6dcbf;
  border-left: 3px solid var(--gold);
  border-radius: var(--r-sm);
  background: #fdf9ee;
  color: #6b5a2e;
  font-size: 12px;
  line-height: 1.75;
}
.nonmed-bar strong { color: #8a6220; font-weight: 700; }

/* 打印（PDF 降级方案） */
@media print {
  @page { size: A4; margin: 0; }
  .nav, .footer, .hero-cta, .btn, .quiz-nav, .modal-mask, .toast { display: none !important; }
  body { background: #fff; }
  .view { display: none !important; }
  #pdf-template {
    position: static !important; left: auto !important; top: auto !important;
    width: 100% !important; background: #fff !important;
  }
  .pdf-page { page-break-after: always; break-after: page; }
  .pdf-page:last-child { page-break-after: auto; break-after: auto; }
}

/* ---- Turnstile 人机验证容器（默认空，未启用时不占空间） ---- */
#cf-turnstile { margin: 12px 0 0; }
#cf-turnstile:empty { margin: 0; }

/* ---- 结账页：后台配置的收款方式（未配置时整块隐藏） ---- */
.pay-methods { margin: 0 0 12px; border: 1px solid var(--line); border-radius: var(--r-md); padding: 12px 14px; background: var(--paper-2); }
.pay-methods h4 { font-size: 13px; color: var(--ink-2); margin-bottom: 8px; letter-spacing: .02em; }
.pay-method { display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; padding: 8px 0; border-top: 1px dashed var(--line); }
.pay-method:first-of-type { border-top: 0; }
.pay-method-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pay-method-main strong { font-size: 13.5px; font-weight: 500; }
.pay-method-main .muted { font-size: 12px; color: var(--ink-3); }
.pay-method-main code { font-size: 12px; background: var(--paper-3); padding: 2px 6px; border-radius: 4px; align-self: flex-start; word-break: break-all; }
.pay-method-qr { width: 84px; height: 84px; object-fit: contain; border: 1px solid var(--line); border-radius: 6px; background: #fff; flex: 0 0 auto; }
