/* ============================================================
   壹茗方济 · 中医体质辨识 H5
   风格：与官网一致（暖赭石 / 中式留白 / 茶疗养生）
   ============================================================ */

:root {
  --terracotta-900: #6b1c16;
  --terracotta-700: #8f2b20;
  --terracotta-500: #b55a1a;
  --terracotta-300: #d98b48;
  --terracotta-100: #f7e6d3;
  --terracotta-50:  #fff8f0;
  --gold-500: #c9952e;
  --gold-100: #f9edc8;
  --ink:       #3e2723;
  --gray-600:  #6d5e55;
  --gray-300:  #e8d6c0;
  --bg:        #fffbf7;
  --bg-soft:   #fff5eb;
  --radius:    14px;
  --shadow:    0 6px 24px rgba(107, 28, 22, 0.08);
  --shadow-lg: 0 12px 40px rgba(107, 28, 22, 0.14);
}

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

body {
  font-family: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  background-image: radial-gradient(circle at 85% 8%, rgba(217, 139, 72, 0.10) 0, transparent 42%),
                    radial-gradient(circle at 8% 92%, rgba(201, 149, 46, 0.08) 0, transparent 40%);
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.app { max-width: 520px; margin: 0 auto; min-height: 100vh; padding: 0 18px 40px; }

/* ---------- 屏切换 ---------- */
.screen { display: none; animation: fadeIn .35s ease; }
.screen.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ---------- 通用按钮 ---------- */
.btn {
  display: inline-block; border: none; cursor: pointer;
  font-size: 16px; font-weight: 600; font-family: inherit;
  padding: 14px 26px; border-radius: 999px;
  transition: transform .12s ease, box-shadow .12s ease, opacity .12s ease;
}
.btn:active { transform: scale(.97); }
.btn-primary {
  background: linear-gradient(135deg, var(--terracotta-700), var(--terracotta-500));
  color: #fff; box-shadow: 0 8px 20px rgba(143, 43, 32, .28);
}
.btn-primary:hover { box-shadow: 0 10px 26px rgba(143, 43, 32, .36); }
.btn-primary:disabled { opacity: .5; box-shadow: none; cursor: not-allowed; }
.btn-ghost {
  background: transparent; color: var(--terracotta-700);
  border: 1.5px solid var(--gray-300);
}
.btn-block { display: block; width: 100%; }
.btn-row { display: flex; gap: 12px; margin-top: 26px; }
.btn-row .btn { flex: 1; }

/* ---------- 屏 1：封面 ---------- */
.brand-bar { padding: 26px 0 6px; text-align: center; }
.brand-logo { width: 168px; margin: 0 auto; }

.intro-body { text-align: center; padding-top: 26px; }
.eyebrow {
  display: inline-block; font-size: 12.5px; letter-spacing: .18em;
  color: var(--terracotta-500); background: var(--terracotta-100);
  padding: 5px 14px; border-radius: 999px;
}
.intro-body h1 {
  font-size: 34px; letter-spacing: .06em; margin: 18px 0 6px;
  color: var(--terracotta-900);
}
.intro-body .sub { color: var(--gray-600); font-size: 15px; margin-bottom: 26px; }

.intro-feats {
  display: flex; gap: 10px; margin: 0 auto 24px;
  background: #fff; border: 1px solid var(--gray-300);
  border-radius: var(--radius); padding: 18px 10px;
  box-shadow: var(--shadow);
}
.feat { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.feat-num {
  font-size: 26px; font-weight: 700; color: var(--terracotta-700);
  font-family: Georgia, "Times New Roman", serif;
}
.feat-label { font-size: 12px; color: var(--gray-600); }

.intro-note {
  background: var(--bg-soft); border-radius: var(--radius);
  padding: 14px 16px; font-size: 13.5px; color: var(--gray-600);
  text-align: left; margin-bottom: 26px;
}

.legal {
  font-size: 12px; color: var(--gray-600); opacity: .75;
  margin-top: 14px; line-height: 1.6;
}

.foot-brand {
  text-align: center; font-size: 12px; color: var(--gray-600);
  opacity: .6; margin-top: 40px; letter-spacing: .08em;
}

/* ---------- 屏 2：安全确认 ---------- */
.screen-head { padding: 34px 0 8px; text-align: center; }
.screen-head h2 { font-size: 24px; color: var(--terracotta-900); }
.head-sub { color: var(--gray-600); font-size: 14px; margin-top: 4px; }

.screening-list { margin-top: 20px; display: flex; flex-direction: column; gap: 14px; }
.screen-item {
  background: #fff; border: 1px solid var(--gray-300);
  border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow);
}
.screen-item p.q { font-size: 15.5px; font-weight: 600; margin-bottom: 12px; }
.seg { display: flex; gap: 8px; }
.seg button {
  flex: 1; padding: 10px 0; font-size: 14.5px; font-family: inherit;
  border-radius: 10px; border: 1.5px solid var(--gray-300);
  background: var(--bg); color: var(--gray-600); cursor: pointer;
  transition: all .15s ease;
}
.seg button.on {
  border-color: var(--terracotta-700); background: var(--terracotta-700);
  color: #fff; font-weight: 600;
}
.screen-tip {
  margin-top: 16px; background: var(--gold-100); border-radius: 10px;
  padding: 10px 14px; font-size: 12.5px; color: #7a5c1e; line-height: 1.6;
  display: none;
}
.screen-tip.show { display: block; }

/* ---------- 屏 3：答题 ---------- */
.quiz-top {
  display: flex; align-items: center; gap: 14px;
  padding: 30px 0 18px;
}
.quiz-back {
  width: 40px; height: 40px; border-radius: 50%;
  border: 1.5px solid var(--gray-300); background: #fff;
  font-size: 22px; line-height: 1; color: var(--terracotta-700);
  cursor: pointer; flex-shrink: 0;
}
.quiz-progress { flex: 1; display: flex; align-items: center; gap: 12px; }
.quiz-progress-bar {
  flex: 1; height: 8px; border-radius: 999px;
  background: var(--terracotta-100); overflow: hidden;
}
.quiz-progress-bar i {
  display: block; height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--terracotta-500), var(--terracotta-700));
  border-radius: 999px; transition: width .3s ease;
}
#quiz-progress-text { font-size: 13px; color: var(--gray-600); flex-shrink: 0; }

.quiz-card {
  background: #fff; border: 1px solid var(--gray-300);
  border-radius: var(--radius); padding: 28px 22px;
  box-shadow: var(--shadow-lg);
}
.quiz-dim {
  display: inline-block; font-size: 12px; color: var(--terracotta-500);
  background: var(--terracotta-50); border: 1px solid var(--terracotta-100);
  padding: 3px 10px; border-radius: 999px; margin-bottom: 12px;
}
.quiz-title { font-size: 19px; line-height: 1.6; margin-bottom: 22px; }

.quiz-options { display: flex; flex-direction: column; gap: 10px; }
.quiz-options button {
  text-align: left; padding: 13px 18px; font-size: 15.5px; font-family: inherit;
  border-radius: 12px; border: 1.5px solid var(--gray-300);
  background: var(--bg); color: var(--ink); cursor: pointer;
  transition: all .15s ease;
}
.quiz-options button:hover { border-color: var(--terracotta-300); }
.quiz-options button.picked {
  border-color: var(--terracotta-700); background: var(--terracotta-50);
  color: var(--terracotta-900); font-weight: 600;
}
.quiz-options button .opt-dot {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  background: var(--terracotta-300); margin-right: 10px; vertical-align: middle;
}
.quiz-hint { text-align: center; font-size: 12.5px; color: var(--gray-600); opacity: .7; margin-top: 18px; }

/* ---------- 屏 4：结果 ---------- */
#screen-result { padding-top: 30px; }

.result-report {
  background: linear-gradient(160deg, var(--terracotta-900), var(--terracotta-700) 62%, #a04426);
  color: #fff; border-radius: 18px; padding: 28px 24px;
  box-shadow: var(--shadow-lg); text-align: center;
  position: relative; overflow: hidden;
}
.result-report::after {
  content: "养"; position: absolute; right: -14px; bottom: -30px;
  font-size: 120px; opacity: .07; font-family: "Songti SC", "SimSun", serif;
}
.result-date { font-size: 12px; opacity: .75; letter-spacing: .1em; }
.result-label { font-size: 13.5px; opacity: .85; margin-top: 10px; letter-spacing: .2em; }
.result-type { font-size: 34px; font-weight: 700; letter-spacing: .08em; margin: 4px 0 2px; }
.result-level {
  display: inline-block; font-size: 12.5px; background: rgba(255,255,255,.16);
  padding: 4px 14px; border-radius: 999px; margin-top: 8px;
}
.result-score-wrap { margin-top: 18px; text-align: left; }
.result-score-label { font-size: 12.5px; opacity: .8; margin-bottom: 6px; display: flex; justify-content: space-between; }
.result-score-bar { height: 8px; background: rgba(255,255,255,.2); border-radius: 999px; overflow: hidden; }
.result-score-bar i { display: block; height: 100%; background: var(--gold-300); border-radius: 999px; }

.result-mixed-tip {
  margin-top: 14px; font-size: 12.5px; background: rgba(255,255,255,.12);
  border-radius: 10px; padding: 8px 12px; line-height: 1.6; text-align: left;
}

.result-sec { margin-top: 22px; }
.result-sec-title {
  display: flex; align-items: center; gap: 8px;
  font-size: 16.5px; font-weight: 700; color: var(--terracotta-900);
  margin-bottom: 12px;
}
.result-sec-title::before {
  content: ""; width: 4px; height: 18px; border-radius: 2px;
  background: linear-gradient(var(--terracotta-500), var(--gold-500));
}

.meridian-box {
  background: var(--bg-soft); border: 1px solid var(--gray-300);
  border-radius: var(--radius); padding: 14px 16px; font-size: 14.5px;
}
.meridian-box b { color: var(--terracotta-700); }
.meridian-box p + p { margin-top: 6px; }

/* 得分条形图 */
.score-chart {
  background: #fff; border: 1px solid var(--gray-300); border-radius: var(--radius);
  padding: 16px; box-shadow: var(--shadow);
}
.score-row { display: flex; align-items: center; gap: 10px; margin-bottom: 9px; }
.score-row:last-child { margin-bottom: 0; }
.score-row .score-name { width: 52px; font-size: 12.5px; color: var(--gray-600); flex-shrink: 0; }
.score-row .score-track { flex: 1; height: 8px; background: var(--bg-soft); border-radius: 999px; overflow: hidden; }
.score-row .score-track i {
  display: block; height: 100%; border-radius: 999px;
  background: var(--terracotta-300); transition: width .6s ease;
}
.score-row.hot .score-track i { background: var(--terracotta-700); }
.score-row.warm .score-track i { background: var(--terracotta-300); }
.score-row .score-val { width: 34px; font-size: 12px; color: var(--gray-600); text-align: right; flex-shrink: 0; }
.score-legend { font-size: 11.5px; color: var(--gray-600); opacity: .7; margin-top: 10px; }

/* 茶方卡 */
.tea-card {
  background: #fff; border: 1px solid var(--gray-300); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden;
}
.tea-card + .tea-card { margin-top: 14px; }
.tea-img { position: relative; background: var(--bg-soft); }
.tea-img picture { display: block; }
.tea-img img { width: 100%; height: 190px; object-fit: cover; }
.tea-badge {
  position: absolute; top: 12px; left: 12px;
  background: rgba(107, 28, 22, .88); color: #fff;
  font-size: 12px; padding: 4px 12px; border-radius: 999px; letter-spacing: .1em;
}
.tea-body { padding: 16px 18px 18px; }
.tea-name { font-size: 20px; font-weight: 700; color: var(--terracotta-900); }
.tea-tag { font-size: 13px; color: var(--gold-500); margin: 2px 0 8px; letter-spacing: .06em; }
.tea-desc { font-size: 14px; color: var(--ink); margin-bottom: 8px; }
.tea-herbs { font-size: 12.5px; color: var(--gray-600); line-height: 1.7; }
.tea-herbs b { color: var(--terracotta-700); font-weight: 600; }
.tea-note {
  margin-top: 10px; background: var(--gold-100); color: #7a5c1e;
  font-size: 12.5px; border-radius: 10px; padding: 8px 12px; line-height: 1.6;
}
.tea-note.danger { background: #fbe3dd; color: var(--terracotta-900); }

/* 通用养护卡（安全模式） */
.care-card {
  background: var(--bg-soft); border: 1px dashed var(--terracotta-300);
  border-radius: var(--radius); padding: 18px; font-size: 14.5px;
}
.care-card b { color: var(--terracotta-700); }
.care-card ul { margin: 8px 0 0 18px; color: var(--gray-600); font-size: 13.5px; }
.care-card li { margin-bottom: 4px; }

/* 领周期表 CTA */
.cta-box {
  margin-top: 22px; background: linear-gradient(135deg, var(--terracotta-50), var(--gold-100));
  border: 1px solid var(--terracotta-100); border-radius: var(--radius);
  padding: 20px; text-align: center;
}
.cta-box h3 { font-size: 17px; color: var(--terracotta-900); }
.cta-box p { font-size: 13px; color: var(--gray-600); margin: 6px 0 14px; }

/* 留资表单 */
.lead-form { display: flex; flex-direction: column; gap: 10px; text-align: left; }
.lead-form input[type="text"],
.lead-form input[type="tel"] {
  width: 100%; box-sizing: border-box;
  border: 1px solid var(--gray-300); border-radius: 10px;
  padding: 12px 14px; font-size: 15px; font-family: inherit;
  background: #fff; color: var(--ink);
}
.lead-form input::placeholder { color: #b0a49a; }
.lead-form input:focus {
  outline: none; border-color: var(--terracotta-300);
  box-shadow: 0 0 0 3px rgba(143, 43, 32, .08);
}
.lead-check {
  display: flex; gap: 8px; align-items: flex-start;
  font-size: 12px; color: var(--gray-600); line-height: 1.6;
  cursor: pointer; margin: 2px 0;
}
.lead-check input { margin-top: 2px; accent-color: var(--terracotta-700); flex: none; }
.btn-block { width: 100%; }
.lead-err { font-size: 12.5px; color: #b3261e; min-height: 17px; margin: 0; text-align: center; }
.lead-success {
  background: #fff; border: 1px solid var(--terracotta-100);
  border-radius: 10px; padding: 12px; margin-top: 2px;
  font-size: 14px; font-weight: 600; color: var(--terracotta-700);
}
.lead-skip {
  display: block; text-align: center; font-size: 13px;
  color: var(--gray-600); text-decoration: underline;
  text-underline-offset: 3px; cursor: pointer; margin-top: 2px;
}
.lead-skip:active { color: var(--terracotta-700); }
.lead-intro { margin-top: 16px; margin-bottom: 16px; }
.lead-note {
  font-size: 12px; color: var(--gray-600); text-align: center;
  line-height: 1.7; margin: 10px 0 0;
}
.lead-return-tip {
  background: #fdf3e7; border: 1px solid var(--gold-500, #c8a45c);
  color: var(--terracotta-700, #8f2b20); border-radius: 10px;
  font-size: 12.5px; line-height: 1.7; padding: 10px 12px; margin: 0 0 12px;
}

/* 调养方案区（体质调养卡四疗版 V2.0：饮茶疗 + 食疗 + 水疗 + 导疗） */
.plan-ver {
  font-size: 11.5px; color: var(--gold-500); margin: -2px 0 12px;
  letter-spacing: .5px;
}
.plan-grid { display: grid; grid-template-columns: 1fr; gap: 10px; margin-top: 12px; }
.plan-card {
  background: #fff; border: 1px solid var(--terracotta-100);
  border-radius: 12px; padding: 12px 14px;
}
.plan-wide { margin-top: 10px; }
.plan-row { display: flex; gap: 8px; align-items: baseline; margin-top: 8px; flex-wrap: wrap; }
.plan-lab {
  flex: none; font-size: 11px; color: #fff; background: var(--terracotta-300);
  border-radius: 6px; padding: 2px 8px; font-weight: 600;
}
.plan-v-inline { font-size: 15px; font-weight: 700; color: var(--terracotta-900); }
.plan-i-inline { font-size: 12.5px; color: var(--gray-600); }
.plan-t { font-size: 13px; color: var(--gray-600); line-height: 1.7; width: 100%; }
.plan-k { font-size: 11.5px; color: var(--gold-500); font-weight: 600; letter-spacing: .5px; }
.plan-v { font-size: 15.5px; font-weight: 700; color: var(--terracotta-900); margin-top: 3px; }
.plan-v-text { font-size: 14px; font-weight: 500; line-height: 1.6; }
.plan-i { font-size: 12.5px; color: var(--gray-600); margin-top: 4px; }
.plan-note {
  margin-top: 10px; font-size: 12.5px; color: var(--gray-600);
  background: var(--bg-soft); border-radius: 10px; padding: 10px 12px; line-height: 1.7;
}
.plan-foot { margin-top: 8px; font-size: 11.5px; color: var(--gray-600); opacity: .75; line-height: 1.7; }

/* 倾向参考说明（V1.2：线上结果非体质结论） */
.result-disclaim {
  margin-top: 12px; font-size: 11.5px; color: var(--gray-600);
  background: var(--bg-soft); border-radius: 10px;
  padding: 9px 12px; line-height: 1.7; text-align: left;
}

/* 声明区 */
.result-legal {
  margin-top: 22px; background: #fff; border: 1px solid var(--gray-300);
  border-radius: var(--radius); padding: 14px 16px;
  font-size: 12px; color: var(--gray-600); line-height: 1.8;
}
.result-legal b { color: var(--terracotta-700); }

.result-actions { margin-top: 22px; display: flex; gap: 12px; }
.result-actions .btn { flex: 1; }
.save-tip { text-align: center; font-size: 12.5px; color: var(--gray-600); opacity: .75; margin-top: 14px; }

@media (max-width: 380px) {
  .intro-body h1 { font-size: 29px; }
  .result-type { font-size: 29px; }
}

/* 体质随身卡（沙龙体质卡 V2.6 数字版：测完即得，长按保存） */
.bodycard-tip {
  font-size: 12.5px; color: var(--gray-600); line-height: 1.7;
  background: var(--bg-soft); border-radius: 10px; padding: 9px 12px;
}
.bodycard { margin: 12px 0 0; }
.bodycard img {
  width: 100%; height: auto; border-radius: 10px;
  border: 1px solid var(--terracotta-100);
  box-shadow: var(--shadow);
}
.bodycard figcaption {
  margin-top: 6px; text-align: center;
  font-size: 11.5px; color: var(--gray-600); opacity: .8;
}
.bodycard-save {
  margin-top: 12px; text-align: center; font-size: 12.5px;
  color: var(--terracotta-700); font-weight: 600;
}
