/* ===== 吉祥草 AI健康测评中心 全局样式 ===== */
:root {
  --pri: #1677FF;
  --pri-light: #E8F1FF;
  --pri-dark: #0958D9;
  --purple: #8B5CF6;
  --purple-light: #F3E8FF;
  --purple-dark: #7C3AED;
  --blue: #3B82F6;
  --blue-light: #DBEAFE;
  --blue-dark: #1D4ED8;
  --accent: #F59E0B;
  --accent-light: #FEF3C7;
  --accent-dark: #B45309;
  --orange: #F97316;
  --red: #EF4444;
  --bg: #F0F5FF;
  --card: #FFFFFF;
  --t1: #1F2937;
  --t2: #4B5563;
  --t3: #6B7280;
  --t4: #9CA3AF;
  --border: #E5E7EB;
  --border-light: #F3F4F6;
  --radius: 18px;
  --radius-sm: 10px;
  --radius-lg: 22px;
  --shadow: 0 2px 8px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.06);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
  --nav-h: 64px;
  --max-w: 500px;
}

* { margin:0; padding:0; box-sizing:border-box; }
html { font-size:16px; -webkit-text-size-adjust:100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--t1);
  line-height:1.6;
  min-height:100vh;
  padding-bottom:calc(var(--nav-h) + 32px);
  -webkit-tap-highlight-color: transparent;
}
a { text-decoration:none; color:inherit; }
button { font-family:inherit; cursor:pointer; border:none; }
input, select, textarea { font-family:inherit; }
ul { list-style:none; }

/* ===== Header ===== */
.header {
  background: linear-gradient(135deg, #1677FF 0%, #3B82F6 40%, #0958D9 100%);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(22,119,255,0.25);
}
.header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 8px 16px;
  color: #fff;
}
.header .logo-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.header .logo-icon {
  width: 32px; height: 32px;
  background: rgba(255,255,255,0.18);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  overflow: hidden;
}
.header h1 { font-size: 15px; font-weight: 700; letter-spacing: 0.3px; }
.header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  padding: 5px 12px;
  background: rgba(255,255,255,0.13);
  border-radius: 18px;
  font-size: 11px;
}
.header-bar span { cursor: pointer; }
.header-lvl {
  flex-shrink: 0;
  background: rgba(255,255,255,0.2);
  padding: 2px 8px; border-radius: 10px;
  font-size: 10px; font-weight: 600;
}
.header-actions { display: flex; gap: 6px; flex-shrink: 0; }
.ha-btn {
  background: rgba(255,255,255,0.22);
  color: #fff; border: none;
  padding: 3px 10px; border-radius: 12px;
  font-size: 10px; font-weight: 600; cursor: pointer;
}
.ha-btn:active { background: rgba(255,255,255,0.35); }

/* ===== 容器 ===== */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 16px;
}

/* ===== 卡片 ===== */
.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 14px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border-light);
}
.card-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--pri-dark);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.card-title .icon { font-size: 20px; }

/* ===== 按钮 ===== */
.btn-primary {
  display: inline-block;
  background: var(--pri);
  color: #fff;
  padding: 11px 26px;
  border-radius: 24px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 3px 12px rgba(34,197,94,0.25);
  text-align: center;
  transition: all 0.15s;
  border: none;
}
.btn-primary:active { transform: scale(0.97); }
.btn-primary.block { display: block; width: 100%; }
.btn-accent {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  padding: 11px 26px;
  border-radius: 24px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 3px 12px rgba(245,158,11,0.25);
  text-align: center;
  transition: all 0.15s;
  border: none;
}
.btn-outline {
  display: inline-block;
  background: #fff;
  color: var(--pri);
  padding: 9px 22px;
  border-radius: 24px;
  font-size: 13px;
  font-weight: 600;
  border: 2px solid var(--pri);
  cursor: pointer;
  transition: all 0.15s;
}
.btn-outline:active { background: var(--pri-light); }
.btn-outline.block { display: block; width: 100%; }
.btn-accent.block { display: block; width: 100%; }

/* ===== 底部导航 ===== */
.bottom-nav-wrap {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: #fff;
  border-top: 1px solid var(--border-light);
  z-index: 200;
  box-shadow: 0 -2px 12px rgba(0,0,0,0.04);
}
.bottom-nav {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  justify-content: space-around;
  align-items: center;
  height: var(--nav-h);
}
.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  cursor: pointer;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 10px;
  color: var(--t4);
  background: none;
  border: none;
  font-family: inherit;
  transition: all 0.2s;
}
.nav-item .ni-icon { font-size: 20px; }
.nav-item .ni-icon img { width: 20px; height: 20px; object-fit: contain; display: block; }
.nav-item.active { color: var(--pri); font-weight: 600; }
.nav-item:active { background: var(--pri-light); }

/* ===== 权益列表 ===== */
.benefit-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border-radius: 12px;
  background: var(--border-light); margin-bottom: 8px;
}
.benefit-item.locked { opacity: 0.55; filter: grayscale(0.4); }
.bi-icon { font-size: 26px; flex-shrink: 0; }
.bi-info { flex: 1; min-width: 0; }
.bi-name { font-size: 13px; font-weight: 600; color: var(--t1); }
.bi-desc { font-size: 11px; color: var(--t3); margin-top: 2px; }
.bi-need { font-size: 10px; flex-shrink: 0; font-weight: 600; }
.benefit-item.locked .bi-need { color: var(--t4); }
.benefit-item:not(.locked) .bi-need { color: var(--pri); }

/* ===== 案例展示 ===== */
.case-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.case-card {
  background: #fff; border: 1px solid var(--border-light); border-radius: 14px;
  padding: 14px; text-align: center; box-shadow: var(--shadow);
}
.case-img {
  width: 64px; height: 64px; margin: 0 auto 8px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center; font-size: 32px;
}
.case-img.tongue { background: linear-gradient(135deg, #DCFCE7, #BBF7D0); }
.case-img.palm { background: linear-gradient(135deg, #F3E8FF, #EDE9FE); }
.case-img.back { background: linear-gradient(135deg, #DBEAFE, #EFF6FF); }
.case-img.report { background: linear-gradient(135deg, #FEF3C7, #FDE68A); }
.case-label { font-size: 12px; font-weight: 600; color: var(--t1); }
.case-note { font-size: 10px; color: var(--t4); margin-top: 2px; }

/* ===== 页脚 ===== */
.footer {
  text-align: center;
  padding: 12px;
  font-size: 11px;
  color: var(--t4);
  max-width: var(--max-w);
  margin: 0 auto;
}

/* ===== 呵护专品 ===== */.care-banner {
  background: #fff;
  border-radius: var(--radius);
  padding: 18px;
  margin-top: 14px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border-light);
}
.care-header {
  display: flex; flex-direction: column; gap: 2px;
  margin-bottom: 12px;
}
.care-title {
  font-size: 16px; font-weight: 700; color: var(--pri-dark);
}
.care-sub {
  font-size: 12px; color: var(--t3);
}
.care-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
}
.care-item {
  display: flex; flex-direction: column; align-items: flex-start; gap: 3px;
  padding: 12px; border-radius: 14px;
  background: var(--bg);
  cursor: pointer; transition: all 0.15s;
  border: 1px solid var(--border-light);
}
.care-item:active { transform: scale(0.97); background: var(--pri-light); }
.care-icon { font-size: 26px; }
.care-name { font-size: 13px; font-weight: 700; color: var(--t1); }
.care-desc { font-size: 10px; color: var(--t4); line-height: 1.3; }

/* ===== 拼图游戏 ===== */
.puzzle-theme {
  padding: 12px; border-radius: 12px; font-size: 13px; font-weight: 600;
  background: var(--bg); border: 2px solid var(--border-light); cursor: pointer;
  color: var(--t2); transition: all 0.15s;
}
.puzzle-theme.active {
  background: var(--pri-light); border-color: var(--pri); color: var(--pri-dark);
}

/* ===== 积分流水 ===== */
.plog-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border-radius: 12px;
  background: var(--border-light); margin-bottom: 8px;
}
.plog-icon { font-size: 22px; flex-shrink: 0; }
.plog-info { flex: 1; min-width: 0; }
.plog-desc { font-size: 13px; font-weight: 600; color: var(--t1); }
.plog-date { font-size: 11px; color: var(--t4); margin-top: 2px; }
.plog-amount { font-size: 15px; font-weight: 700; flex-shrink: 0; }
.empty-state {
  text-align: center; padding: 30px 0; color: var(--t4); font-size: 13px; line-height: 1.8;
}

/* ===== 我的健康报告入口容器（已并入首页，保留类名兼容） ===== */
.health-report-banner {
  max-width: var(--max-w); margin: 0 auto 14px;
  padding: 0 16px;
}
/* ===== 我的健康报告入口 ===== */
.health-report-entry {
  background: #fff;
  border-radius: var(--radius);
  padding: 16px 18px;
  display: flex; align-items: center; gap: 12px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border-light);
  cursor: pointer;
  transition: all 0.15s;
}
.health-report-entry:active { transform: scale(0.98); background: #F9FAFB; }
.hre-icon {
  width: 46px; height: 46px; border-radius: 14px;
  background: linear-gradient(135deg, #DCFCE7, #BBF7D0);
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; flex-shrink: 0;
}
.hre-info { flex: 1; min-width: 0; }
.hre-title { font-size: 14px; font-weight: 700; color: var(--t1); }
.hre-desc { font-size: 11px; color: var(--t4); margin-top: 2px; }
.hre-arrow { font-size: 18px; color: var(--t4); flex-shrink: 0; }

/* ===== Toast ===== */
.toast {
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%) scale(0.8);
  background: rgba(0,0,0,0.82);
  color: #fff;
  padding: 11px 24px;
  border-radius: 24px;
  font-size: 13px;
  z-index: 400;
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s;
}
.toast.show { opacity:1; transform: translate(-50%, -50%) scale(1); }

/* ===== 弹窗 ===== */
.modal-overlay {
  display: none;
  position: fixed;
  top:0; left:0; right:0; bottom:0;
  background: rgba(0,0,0,0.5);
  z-index: 300;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-overlay.show { display: flex; }
.modal-box {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 24px;
  max-width: 380px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
}
.modal-box h3 { font-size: 18px; margin-bottom: 14px; color: var(--t1); text-align: center; font-weight: 700; }
.modal-box p { font-size: 13px; color: var(--t2); line-height: 1.7; margin-bottom: 8px; }
.modal-box .close-btn { display: block; margin: 14px auto 0; }

/* ===== 登录弹窗 ===== */
.login-tabs { display: flex; margin-bottom: 16px; background: var(--border-light); border-radius: 12px; padding: 3px; }
.login-tab {
  flex: 1; padding: 10px; text-align: center;
  border: none; font-size: 14px; font-weight: 600;
  cursor: pointer; color: var(--t2); transition: all 0.2s;
  border-radius: 10px; background: transparent;
}
.login-tab.active { background: #fff; color: var(--pri); box-shadow: 0 1px 3px rgba(0,0,0,0.06); }
.login-panel { display: none; }
.login-panel.active { display: block; }
.login-panel input {
  width: 100%; padding: 12px 14px;
  border: 2px solid var(--border);
  border-radius: 12px; font-size: 14px;
  margin-bottom: 10px; outline: none;
  background: #fff; transition: border-color 0.2s;
}
.login-panel input:focus { border-color: var(--pri); }
.login-panel .sms-row { display: flex; gap: 8px; }
.login-panel .sms-row input { flex: 1; }
.login-panel .sms-btn {
  background: var(--accent); color: #fff;
  border: none; padding: 10px 16px;
  border-radius: 12px; font-size: 12px; font-weight: 600;
  white-space: nowrap; cursor: pointer; flex-shrink: 0;
}
.login-mode-switch {
  text-align: right; font-size: 12px; color: var(--pri);
  cursor: pointer; margin-bottom: 8px; font-weight: 500;
}
.privacy-check { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--t3); margin: 8px 0; }
.privacy-check input { width: auto; margin: 0; }
.divider-text {
  display: flex; align-items: center; gap: 10px;
  margin: 14px 0; color: var(--t4); font-size: 12px;
}
.divider-text::before, .divider-text::after {
  content: ''; flex: 1; height: 1px; background: var(--border);
}

/* ===== 动画 ===== */
@keyframes fadeInUp {
  from { opacity:0; transform:translateY(10px); }
  to { opacity:1; transform:translateY(0); }
}
.fade-in { animation: fadeInUp 0.35s ease; }

/* ===== 页面面板 ===== */
.page-panel { display: none; }
.page-panel.active { display: block; }

/* ===== 响应式 ===== */
@media (max-width:380px) {
  .container { padding: 12px 12px; }
  .header-inner { padding: 12px 14px; }
  .card { padding: 14px; }
}

/* ===== 图片轮播 ===== */
.carousel { position: relative; overflow: hidden; border-radius: 14px; margin: 14px 0; background: #F9FAFB; }
.carousel-track { display: flex; transition: transform 0.4s ease; }
.carousel-slide { min-width: 100%; display: flex; align-items: center; justify-content: center; }
.carousel-slide img { width: 100%; height: 240px; object-fit: contain; display: block; background: #fff; }
.carousel-dots { display: flex; justify-content: center; gap: 6px; padding: 10px 0; }
.carousel-dots .dot { width: 8px; height: 8px; border-radius: 50%; background: #D1D5DB; cursor: pointer; transition: all 0.2s; }
.carousel-dots .dot.active { background: var(--pri); width: 20px; border-radius: 4px; }

/* ===== 每日签到弹窗 ===== */
.checkin-box { text-align: center; }
.checkin-icon { font-size: 52px; line-height: 1; margin-bottom: 10px; }

/* ===== 图片放大弹窗 ===== */
.fullimage-box { padding: 16px; text-align: center; }
.fullimage-box img { width: 100%; max-height: 70vh; object-fit: contain; border-radius: 12px; display: block; background: #fff; }

/* ===== 睡眠凝胶购买 ===== */
.gel-buy-box { padding: 20px 20px 24px; }
.gel-specs { display: flex; gap: 10px; margin: 14px 0 10px; }
.gel-spec {
  flex: 1; padding: 10px 8px; text-align: center;
  border: 2px solid var(--border); border-radius: 12px;
  font-size: 13px; font-weight: 600; color: var(--t2);
  cursor: pointer; transition: all 0.15s; background: #fff;
}
.gel-spec.active { border-color: #F59E0B; background: #FEF3C7; color: #B45309; }
.gel-price-box { display: flex; align-items: baseline; justify-content: center; gap: 6px; margin: 6px 0 12px; }
.gel-cash { font-size: 28px; font-weight: 800; color: #EA580C; }
.gel-unit { font-size: 13px; color: var(--t3); }
.gel-plus { font-size: 16px; font-weight: 700; color: var(--t3); }
.gel-points { font-size: 18px; font-weight: 700; color: #F59E0B; }
.gel-row { display: flex; align-items: center; justify-content: space-between; margin: 10px 0; }
.gel-qty { display: flex; align-items: center; gap: 14px; }
.gel-qty-btn {
  width: 30px; height: 30px; border-radius: 50%; border: 1.5px solid var(--border);
  background: #fff; font-size: 18px; line-height: 1; cursor: pointer; color: var(--t1);
}
.gel-qty-btn:active { background: var(--pri-light); }
.gel-qty-label { font-size: 13px; color: var(--t3); }
.gel-pay { display: flex; gap: 10px; margin: 12px 0; }
.gel-pay-btn {
  flex: 1; padding: 11px; text-align: center; border-radius: 12px;
  border: 2px solid var(--border); background: #fff;
  font-size: 14px; font-weight: 600; color: var(--t2); cursor: pointer; transition: all 0.15s;
}
.gel-pay-btn.active { border-color: var(--pri); background: var(--pri-light); color: #15803D; }
.gel-total {
  padding: 12px; background: #FFF7E6; border-radius: 12px;
  font-size: 13px; color: var(--t1); margin-bottom: 14px; line-height: 1.6;
}
.pb-note {
  padding: 10px 12px; background: #FEF3C7; border-radius: 10px;
  font-size: 12px; color: #B45309; margin-bottom: 14px; line-height: 1.6;
}
/* ========== 健康问卷（AI+评估拍摄后） ========== */
.hq-tip {
  background: linear-gradient(135deg,#DCFCE7,#DBEAFE);
  border-radius: 12px; padding: 12px 14px; margin-bottom: 14px;
  font-size: 12px; color: #1D4ED8; line-height: 1.7;
}
.hq-tip b { color: #15803D; }
.hq-item {
  background: #fff; border: 1px solid var(--border-light);
  border-radius: var(--radius-sm); padding: 12px 14px; margin-bottom: 10px;
}
.hq-q {
  display: flex; align-items: flex-start; gap: 8px;
  font-size: 13px; font-weight: 700; color: var(--t1); margin-bottom: 8px;
}
.hq-q .hq-num {
  flex-shrink: 0; width: 18px; height: 18px; border-radius: 50%;
  background: var(--pri); color: #fff; font-size: 11px; line-height: 18px;
  text-align: center; font-weight: 700; margin-top: 1px;
}
.hq-q .hq-hint { display: block; font-weight: 400; font-size: 11px; color: var(--t4); margin-top: 1px; }
.hq-input {
  width: 100%; padding: 10px 12px; border: 2px solid var(--border);
  border-radius: 10px; font-size: 13px; outline: none; background: #fff;
  transition: border-color .15s; color: var(--t1);
}
.hq-input:focus { border-color: var(--pri); }
textarea.hq-input { resize: vertical; min-height: 56px; line-height: 1.6; }
.hq-chip-group { display: flex; flex-wrap: wrap; gap: 8px; }
.hq-chip { position: relative; }
.hq-chip input { display: none; }
.hq-chip span {
  display: inline-block; padding: 7px 14px; border: 2px solid var(--border);
  border-radius: 18px; font-size: 13px; color: var(--t2); cursor: pointer;
  background: #fff; transition: all .15s;
}
.hq-chip input:checked + span {
  border-color: var(--pri); background: var(--pri-light); color: #15803D; font-weight: 600;
}
.hq-chip-group.sm { gap: 6px; }
.hq-chip-group.sm .hq-chip span { padding: 5px 12px; font-size: 12px; }
.hq-sub-label { font-size: 11px; color: var(--t4); margin: 6px 0 4px; }

/* ========== 自我修炼（八部金刚功/长寿功/打坐阅读） ========== */
.cult-item {
  background: #fff; border: 1px solid var(--border-light);
  border-radius: var(--radius-sm); padding: 16px; margin-bottom: 12px;
  display: flex; align-items: center; gap: 14px;
}
.cult-info { flex: 1; min-width: 0; }
.cult-name { font-size: 15px; font-weight: 700; color: var(--t1); margin-bottom: 4px; }
.cult-desc { font-size: 11px; color: var(--t3); line-height: 1.5; margin-bottom: 8px; }
.cult-btn {
  display: inline-flex; align-items: center; gap: 4px;
  background: var(--pri-light); color: var(--pri-dark);
  border: none; padding: 7px 14px; border-radius: 16px;
  font-size: 12px; font-weight: 600; cursor: pointer; transition: all .15s;
}
.cult-btn:active { transform: scale(0.95); }
.cult-qr {
  width: 84px; height: 84px; border-radius: 10px; flex-shrink: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; background: #f9fafb; border: 1px solid var(--border-light);
}
.cult-qr img { width: 64px; height: 64px; object-fit: contain; border-radius: 6px; cursor: zoom-in; }
.cult-qr .qr-cap { font-size: 9px; color: var(--t4); }
.cult-read {
  background: linear-gradient(135deg, #FFF7ED, #FFFDF7);
  border: 1px solid #FED7AA; border-radius: var(--radius-sm);
  padding: 16px; margin-top: 4px;
}
.cult-read-title {
  font-size: 15px; font-weight: 700; color: #C2410C; margin-bottom: 10px;
  display: flex; align-items: center; gap: 6px;
}
.cult-read-body {
  font-size: 13px; color: #4B5563; line-height: 1.9; max-height: 260px;
  overflow-y: auto; text-align: justify;
}
.cult-read-body p { margin: 0 0 10px; }
.cult-read-body .q-source { color: var(--t4); font-size: 11px; }
