/* =============================================================
   体质自测 · 样式表
   ============================================================= */

/* ---------- 主题变量 ---------- */
:root {
  --color-bg: #fdfaf6;
  --color-bg-alt: #f5ede0;
  --color-bg-card: #ffffff;
  --color-text: #2d2419;
  --color-text-soft: #6b5d4f;
  --color-text-mute: #a39888;
  --color-border: #e8dfd1;
  --color-primary: #e76f51;
  --color-primary-hover: #d65a3a;
  --color-accent: #2a9d8f;
  --color-warning: #f59e0b;
  --color-success: #10b981;
  --color-danger: #ef4444;
  --color-shadow: rgba(45, 36, 25, .08);
  --color-shadow-lg: rgba(45, 36, 25, .12);

  --font-sans: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', -apple-system,
               BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  --container: 1200px;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 24px;
  --shadow-sm: 0 2px 6px var(--color-shadow);
  --shadow-md: 0 6px 16px var(--color-shadow);
  --shadow-lg: 0 16px 40px var(--color-shadow-lg);

  --ease: cubic-bezier(.16, 1, .3, 1);
}

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

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

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  color: var(--color-text);
  background: var(--color-bg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; display: block; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
a { color: var(--color-primary); text-decoration: none; transition: color .15s var(--ease); }
a:hover { color: var(--color-primary-hover); }
ul { list-style: none; }

/* ---------- 容器 ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ---------- 通用按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .875rem 1.75rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 999px;
  white-space: nowrap;
  cursor: pointer;
  transition: all .25s var(--ease);
}
.btn-lg { padding: 1.125rem 2.5rem; font-size: 1.125rem; }
.btn-block { width: 100%; }

.btn-primary {
  background: linear-gradient(135deg, var(--color-primary), #f59482);
  color: white;
  box-shadow: 0 8px 20px -6px rgba(231, 111, 81, .5);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px -6px rgba(231, 111, 81, .65);
  color: white;
}

.btn-ghost {
  background: var(--color-bg-card);
  color: var(--color-text);
  border: 1px solid var(--color-border);
}
.btn-ghost:hover { background: var(--color-bg-alt); color: var(--color-text); }

.btn-accent {
  background: linear-gradient(135deg, var(--color-accent), #4cb5a8);
  color: white;
  box-shadow: 0 8px 20px -6px rgba(42, 157, 143, .45);
}
.btn-accent:hover { color: white; transform: translateY(-2px); }

/* ---------- 顶部导航 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(253, 250, 246, .85);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s var(--ease);
}
.site-header.is-scrolled { border-bottom-color: var(--color-border); }

.nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: .625rem;
  font-weight: 700;
  font-size: 1.0625rem;
  color: var(--color-text);
}
.logo-mark {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--color-primary), #f59482);
  color: white;
  font-size: 1.25rem;
}

.nav-links { display: flex; gap: 2rem; }
.nav-links a {
  color: var(--color-text-soft);
  font-weight: 500;
  font-size: .9375rem;
  position: relative;
}
.nav-links a:hover { color: var(--color-text); }
.nav-links a.active { color: var(--color-primary); }

.menu-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: 999px;
}
.menu-toggle:hover { background: var(--color-bg-alt); }

.mobile-menu { display: none; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 4rem 0 5rem;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -20%;
  right: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle,
    rgba(231, 111, 81, .12),
    transparent 70%);
  filter: blur(40px);
  z-index: -1;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle,
    rgba(42, 157, 143, .12),
    transparent 70%);
  filter: blur(40px);
  z-index: -1;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: center;
}
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .375rem .875rem;
  background: rgba(231, 111, 81, .12);
  color: var(--color-primary);
  border-radius: 999px;
  font-size: .8125rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
}
.hero-eyebrow .pulse {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--color-primary);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.2); opacity: .6; }
}

.hero-title {
  font-size: clamp(2rem, 5.5vw, 3.25rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -.02em;
  margin-bottom: 1.25rem;
}
.hero-title .hl {
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-subtitle {
  font-size: 1.125rem;
  color: var(--color-text-soft);
  max-width: 540px;
  margin-bottom: 2rem;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; }
.hero-trust {
  display: flex; flex-wrap: wrap; gap: 1.5rem;
  margin-top: 2rem; padding-top: 2rem;
  border-top: 1px dashed var(--color-border);
}
.hero-trust li strong {
  font-size: 1.5rem; font-weight: 700;
  color: var(--color-primary); display: block;
}
.hero-trust li span { font-size: .8125rem; color: var(--color-text-mute); }

/* Hero 装饰插画 */
.hero-visual {
  position: relative;
  aspect-ratio: 1;
  max-width: 480px;
  margin: 0 auto;
}
.hero-visual::before {
  content: '';
  position: absolute;
  inset: 8%;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(231, 111, 81, .15), rgba(42, 157, 143, .15));
  filter: blur(20px);
}

/* ---------- 通用 section ---------- */
.section {
  padding: 4rem 0;
}
.section-alt { background: var(--color-bg-alt); }

.section-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 3rem;
}
.section-header h2 {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -.02em;
  margin-bottom: .75rem;
}
.section-header p {
  color: var(--color-text-soft);
  font-size: 1.0625rem;
}
.section-eyebrow {
  display: inline-block;
  color: var(--color-primary);
  font-weight: 600;
  font-size: .8125rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  margin-bottom: .75rem;
}

/* ---------- 九大体质卡片网格 ---------- */
.types-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
.type-card {
  padding: 1.5rem;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  transition: all .25s var(--ease);
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  position: relative;
  overflow: hidden;
}
.type-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: var(--accent-color);
  opacity: 0;
  transition: opacity .25s var(--ease);
}
.type-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: transparent;
}
.type-card:hover::before { opacity: 1; }

.type-emoji {
  font-size: 2rem;
  margin-bottom: .75rem;
  display: block;
}
.type-name {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: .25rem;
}
.type-tagline {
  font-size: .875rem;
  color: var(--color-text-soft);
  margin-bottom: .75rem;
}
.type-arrow {
  color: var(--accent-color);
  font-weight: 600;
  font-size: .875rem;
}

/* ---------- 变现方案卡片（首页）---------- */
.plans-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}
.plan-card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: all .25s var(--ease);
  position: relative;
}
.plan-card.is-recommended {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(231, 111, 81, .15);
}
.plan-badge {
  position: absolute;
  top: -10px;
  right: 1.5rem;
  background: linear-gradient(135deg, var(--color-primary), #f59482);
  color: white;
  font-size: .6875rem;
  font-weight: 700;
  padding: .25rem .625rem;
  border-radius: 999px;
  letter-spacing: .05em;
}
.plan-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: .5rem;
}
.plan-tagline {
  color: var(--color-text-soft);
  font-size: .9375rem;
  margin-bottom: 1.25rem;
}
.plan-list li {
  display: flex;
  gap: .5rem;
  padding: .5rem 0;
  border-bottom: 1px dashed var(--color-border);
  font-size: .9375rem;
  color: var(--color-text-soft);
}
.plan-list li::before {
  content: '✓';
  color: var(--color-accent);
  font-weight: 700;
}
.plan-list li:last-child { border-bottom: none; }

/* ---------- 页脚 ---------- */
.site-footer {
  background: var(--color-bg-alt);
  border-top: 1px solid var(--color-border);
  padding: 2.5rem 0 1.5rem;
  text-align: center;
}
.footer-row {
  display: flex; flex-direction: column; align-items: center; gap: 1rem;
}
.footer-brand { font-weight: 700; font-size: 1rem; }
.footer-meta { color: var(--color-text-mute); font-size: .875rem; }
.disclaimer {
  margin-top: 1rem;
  padding: 1rem;
  background: var(--color-bg);
  border-radius: var(--radius-md);
  font-size: .8125rem;
  color: var(--color-text-soft);
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
  border-left: 3px solid var(--color-warning);
}

/* ==================================================
   测试问卷页样式
   ================================================== */
.quiz-page {
  max-width: 720px;
  margin: 0 auto;
  padding: 2rem 1.25rem;
}

.quiz-progress {
  position: sticky;
  top: 68px;
  background: var(--color-bg);
  padding: 1rem 0;
  margin-bottom: 1.5rem;
  z-index: 50;
  border-bottom: 1px solid var(--color-border);
}
.progress-meta {
  display: flex;
  justify-content: space-between;
  font-size: .875rem;
  color: var(--color-text-soft);
  margin-bottom: .625rem;
}
.progress-bar {
  height: 6px;
  background: var(--color-border);
  border-radius: 999px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
  transition: width .4s var(--ease);
  border-radius: 999px;
}

.question-card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin-bottom: 1.25rem;
  animation: slideIn .4s var(--ease);
}
@keyframes slideIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.question-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  color: var(--color-text-mute);
  font-size: .875rem;
}
.question-meta .tag {
  padding: .25rem .625rem;
  background: var(--color-bg-alt);
  border-radius: 999px;
}

.question-text {
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.5;
  margin-bottom: 1.5rem;
}

.options {
  display: flex;
  flex-direction: column;
  gap: .75rem;
}
.option {
  display: flex;
  align-items: center;
  gap: .875rem;
  padding: 1rem 1.25rem;
  background: var(--color-bg);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all .2s var(--ease);
  font-size: 1.0625rem;
}
.option:hover {
  border-color: var(--color-primary);
  background: rgba(231, 111, 81, .04);
}
.option.is-selected {
  border-color: var(--color-primary);
  background: rgba(231, 111, 81, .08);
}
.option-radio {
  width: 22px;
  height: 22px;
  border: 2px solid var(--color-border);
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .2s var(--ease);
}
.option.is-selected .option-radio {
  border-color: var(--color-primary);
  background: var(--color-primary);
}
.option.is-selected .option-radio::after {
  content: '';
  width: 8px;
  height: 8px;
  background: white;
  border-radius: 50%;
}

.quiz-nav {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.5rem;
}
.quiz-nav .btn { flex: 1; max-width: 200px; }

.quiz-intro {
  text-align: center;
  padding: 3rem 1.5rem;
  background: var(--color-bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
}
.quiz-intro h2 { font-size: 1.75rem; margin-bottom: 1rem; }
.quiz-intro p { color: var(--color-text-soft); margin-bottom: .75rem; }

/* ==================================================
   结果页样式
   ================================================== */
.result-wrap {
  max-width: 880px;
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
}

.result-hero {
  text-align: center;
  padding: 2.5rem 2rem;
  background: var(--hero-bg, linear-gradient(135deg, #fff, #f5ede0));
  border-radius: var(--radius-lg);
  margin-bottom: 2rem;
  position: relative;
  overflow: hidden;
}
.result-emoji {
  font-size: 4rem;
  margin-bottom: .75rem;
}
.result-type {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: .25rem;
}
.result-tagline {
  font-size: 1rem;
  color: var(--color-text-soft);
  margin-bottom: 1.5rem;
}
.result-score {
  display: inline-flex;
  flex-direction: column;
  padding: 1rem 2rem;
  background: rgba(255, 255, 255, .6);
  border-radius: var(--radius-md);
  font-size: .875rem;
  color: var(--color-text-soft);
}
.result-score strong {
  font-size: 1.5rem;
  color: var(--color-text);
}

.section-card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin-bottom: 1.5rem;
}
.section-card h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: .5rem;
}
.section-card h3 .num {
  display: inline-flex;
  width: 28px; height: 28px;
  background: linear-gradient(135deg, var(--color-primary), #f59482);
  color: white;
  border-radius: 50%;
  font-size: .875rem;
  align-items: center; justify-content: center;
}

.feature-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: .625rem;
}
.feature-list li {
  padding: .625rem .875rem;
  background: var(--color-bg-alt);
  border-radius: var(--radius-sm);
  font-size: .9375rem;
  display: flex;
  align-items: center;
  gap: .5rem;
}
.feature-list li::before {
  content: '◦';
  color: var(--color-primary);
  font-weight: 700;
  font-size: 1.25rem;
}

.advice-list li {
  display: flex;
  gap: .625rem;
  padding: .625rem 0;
  border-bottom: 1px dashed var(--color-border);
}
.advice-list li:last-child { border-bottom: none; }
.advice-list li::before {
  content: attr(data-num);
  flex-shrink: 0;
  width: 24px; height: 24px;
  background: var(--color-accent);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center; justify-content: center;
  font-size: .75rem;
  font-weight: 700;
}

/* 带货卡片 */
.products-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .75rem;
  margin-bottom: 1.5rem;
}
.product-chip {
  padding: 1rem;
  background: linear-gradient(135deg, rgba(231, 111, 81, .06), rgba(42, 157, 143, .06));
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  text-align: center;
  font-weight: 600;
  color: var(--color-text);
  font-size: 1rem;
}

.platform-list { display: flex; flex-direction: column; gap: .625rem; }
.platform-btn {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: var(--color-text);
  transition: all .2s var(--ease);
}
.platform-btn:hover {
  border-color: var(--color-primary);
  transform: translateX(4px);
  color: var(--color-text);
  background: rgba(231, 111, 81, .04);
}
.platform-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--color-bg-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}
.platform-info { flex: 1; }
.platform-name { font-weight: 600; margin-bottom: .125rem; }
.platform-desc { font-size: .8125rem; color: var(--color-text-mute); }
.platform-arrow { color: var(--color-text-mute); }

.score-bars {
  display: flex;
  flex-direction: column;
  gap: .75rem;
  margin-top: 1rem;
}
.score-row {
  display: grid;
  grid-template-columns: 100px 1fr 50px;
  align-items: center;
  gap: .75rem;
  font-size: .875rem;
}
.score-row .bar {
  height: 8px;
  background: var(--color-border);
  border-radius: 999px;
  overflow: hidden;
}
.score-row .fill {
  height: 100%;
  border-radius: 999px;
  transition: width 1s var(--ease);
}
.score-row .val {
  text-align: right;
  font-weight: 600;
  color: var(--color-text-soft);
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  justify-content: center;
  margin-top: 2rem;
}

/* ==================================================
   百科页样式
   ================================================== */
.guide-wrap {
  max-width: 880px;
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
}

.type-selector {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .5rem;
  margin-bottom: 2rem;
}
.type-pill {
  padding: .5rem .75rem;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  font-size: .8125rem;
  cursor: pointer;
  transition: all .2s var(--ease);
  color: var(--color-text);
  text-align: center;
}
.type-pill:hover { border-color: var(--accent, var(--color-primary)); }
.type-pill.is-active {
  background: var(--accent, var(--color-primary));
  color: white;
  border-color: transparent;
}

.guide-content {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 2rem;
}
.guide-content h2 {
  font-size: 1.75rem;
  margin-bottom: .5rem;
}
.guide-content .guide-meta {
  color: var(--color-text-soft);
  margin-bottom: 2rem;
}

.guide-block { margin-bottom: 2rem; }
.guide-block h3 {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: .75rem;
  display: flex;
  align-items: center;
  gap: .5rem;
}

/* ---------- 响应式断点 ---------- */
@media (min-width: 640px) {
  .types-grid { grid-template-columns: repeat(2, 1fr); }
  .plans-grid { grid-template-columns: repeat(3, 1fr); }
  .products-grid { grid-template-columns: repeat(3, 1fr); }
  .feature-list { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 1024px) {
  .container { padding: 0 2rem; }
  .hero-grid { grid-template-columns: 1.2fr 1fr; gap: 4rem; }
  .types-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ---------- 移动端 ---------- */
@media (max-width: 1023.98px) {
  .nav-links { display: none; }
  .menu-toggle { display: inline-flex; }
  .mobile-menu.is-open { display: block; }
}
@media (max-width: 767.98px) {
  .section { padding: 3rem 0; }
  .hero { padding: 2.5rem 0 3rem; }
  .question-card { padding: 1.5rem; }
  .question-text { font-size: 1.125rem; }
  .result-hero { padding: 2rem 1.25rem; }
  .type-selector { grid-template-columns: repeat(2, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}

/* =============================================================
   结果页扩展样式（专业版）
   ============================================================= */
.result-disclaimer {
  background: rgba(245, 158, 11, .08);
  border: 1px solid rgba(245, 158, 11, .3);
  border-left: 4px solid var(--color-warning);
  border-radius: var(--radius-md);
  padding: .875rem 1.25rem;
  margin-bottom: 1.5rem;
  font-size: .875rem;
  color: var(--color-text-soft);
}

.section-intro {
  color: var(--color-text-soft);
  font-size: .9375rem;
  margin-bottom: 1rem;
}

.advice-block {
  padding: 1.25rem;
  background: var(--color-bg-alt);
  border-radius: var(--radius-md);
  margin-bottom: 1rem;
}
.advice-block:last-child { margin-bottom: 0; }

.advice-title {
  font-weight: 700;
  font-size: 1rem;
  color: var(--color-text);
  margin-bottom: .5rem;
}

.advice-text {
  color: var(--color-text-soft);
  font-size: .9375rem;
  line-height: 1.7;
}

.food-tags {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}

.food-tag {
  display: inline-flex;
  align-items: center;
  padding: .375rem .75rem;
  border-radius: 999px;
  font-size: .875rem;
  font-weight: 500;
}

.food-tag-good {
  background: rgba(16, 185, 129, .12);
  color: #047857;
  border: 1px solid rgba(16, 185, 129, .3);
}

.food-tag-avoid {
  background: rgba(239, 68, 68, .08);
  color: #b91c1c;
  border: 1px solid rgba(239, 68, 68, .25);
}

/* 得分柱状图行（移动端优化） */
.score-row {
  grid-template-columns: 90px 1fr 40px;
  font-size: .8125rem;
}

/* ---------- 移动端深度优化 ---------- */
@media (max-width: 767.98px) {
  /* 字体与间距优化 */
  body { font-size: 15px; line-height: 1.6; }

  /* 容器内边距更小 */
  .container { padding: 0 1rem; }

  /* Hero 区垂直留白收紧 */
  .hero { padding: 2rem 0 2.5rem; }
  .hero-title { font-size: 1.875rem; }
  .hero-subtitle { font-size: 1rem; margin-bottom: 1.5rem; }
  .hero-actions { gap: .5rem; }
  .hero-actions .btn { flex: 1; min-width: 0; padding: .75rem 1rem; font-size: .9375rem; }
  .hero-actions .btn-lg { padding: .875rem 1.25rem; }
  .hero-trust { gap: 1rem; }
  .hero-trust strong { font-size: 1.25rem; }
  .hero-trust span { font-size: .75rem; }

  /* Hero 视觉隐藏（手机端不需要） */
  .hero-visual { display: none; }
  .hero-grid { grid-template-columns: 1fr; gap: 0; }

  /* 九大体质卡片单列 */
  .types-grid { grid-template-columns: 1fr; gap: .75rem; }
  .type-card { padding: 1.25rem; }
  .type-emoji { font-size: 1.75rem; }

  /* section 间距收紧 */
  .section { padding: 2.5rem 0; }
  .section-header { margin-bottom: 2rem; }
  .section-header h2 { font-size: 1.5rem; }
  .section-header p { font-size: .9375rem; }

  /* 卡片内边距收紧 */
  .section-card { padding: 1.25rem; }

  /* 测试问卷优化 */
  .quiz-page { padding: 1rem 1rem 2rem; }
  .quiz-progress { top: 60px; padding: .75rem 0; }
  .question-card { padding: 1.25rem; }
  .question-text { font-size: 1.0625rem; line-height: 1.5; }
  .option { padding: .875rem 1rem; font-size: 1rem; min-height: 48px; }
  .quiz-nav { gap: .5rem; }
  .quiz-nav .btn { padding: .75rem 1rem; font-size: .9375rem; }

  /* 结果页优化 */
  .result-wrap { padding: 1.5rem 1rem 3rem; }
  .result-hero { padding: 1.75rem 1.25rem; }
  .result-emoji { font-size: 3rem; }
  .result-type { font-size: 1.625rem; }
  .result-tagline { font-size: .9375rem; }
  .result-score { padding: .75rem 1.25rem; }

  .advice-block { padding: 1rem; }
  .advice-title { font-size: .9375rem; }
  .advice-text { font-size: .875rem; line-height: 1.6; }

  .food-tag { font-size: .8125rem; padding: .3125rem .625rem; }

  /* 得分柱状图移动端 */
  .score-row {
    grid-template-columns: 76px 1fr 32px;
    font-size: .75rem;
    gap: .5rem;
  }

  /* 百科页选择器优化 */
  .type-selector { grid-template-columns: repeat(2, 1fr); gap: .375rem; }
  .type-pill { padding: .4375rem .5rem; font-size: .75rem; }
  .guide-content { padding: 1.25rem; }
  .guide-content h2 { font-size: 1.375rem; }

  /* 操作按钮移动端 */
  .action-row { flex-direction: column; gap: .5rem; }
  .action-row .btn { width: 100%; }

  /* 页脚 disclaimer 字号 */
  .disclaimer { font-size: .75rem; padding: .75rem; }

  /* 顶部导航优化 */
  .nav-row { height: 60px; }
  .logo { font-size: 1rem; }
  .logo-mark { width: 32px; height: 32px; font-size: 1.0625rem; }
}

/* ---------- 极小屏（≤ 360px） ---------- */
@media (max-width: 360px) {
  .hero-title { font-size: 1.625rem; }
  .result-type { font-size: 1.5rem; }
  .section-header h2 { font-size: 1.375rem; }
}

/* ---------- 触摸目标优化 ---------- */
@media (pointer: coarse) {
  .btn,
  .option,
  .type-card,
  .type-pill,
  .nav-links a {
    min-height: 44px;
  }
}

/* ---------- 暗色模式（专业版） ---------- */
@media (prefers-color-scheme: dark) {
  :root {
    --color-bg: #1a1614;
    --color-bg-alt: #221c19;
    --color-bg-card: #2a2320;
    --color-text: #f5ede0;
    --color-text-soft: #c4b8ac;
    --color-text-mute: #8a7e72;
    --color-border: #3a322d;
    --color-shadow: rgba(0, 0, 0, .3);
    --color-shadow-lg: rgba(0, 0, 0, .5);
  }

  .result-hero { background: linear-gradient(135deg, rgba(231, 111, 81, .08), rgba(42, 157, 143, .08)); }
  .advice-block { background: var(--color-bg-alt); }
  .food-tag-good {
    background: rgba(16, 185, 129, .15);
    color: #34d399;
  }
  .food-tag-avoid {
    background: rgba(239, 68, 68, .12);
    color: #f87171;
  }
}

