:root {
  --primary: #06b6d4;
  --primary-dark: #0891b2;
  --bg: #f4f6f8;
  --card: #ffffff;
  --text: #1f2937;
  --text-sub: #6b7280;
  --gold: #f59e0b;
  --tab-h: 56px;
  --top-h: 52px;
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
}

a { text-decoration: none; color: inherit; }
img { display: block; max-width: 100%; }

/* 顶部栏 */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  height: var(--top-h);
  display: flex;
  align-items: center;
}
.topbar-inner {
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
}
.logo { color: #fff; font-weight: 800; font-size: 18px; white-space: nowrap; }
.logo span { font-weight: 400; opacity: .9; }
.search {
  flex: 1;
  display: flex;
  align-items: center;
  background: #fff;
  border-radius: 18px;
  height: 34px;
  padding: 0 12px;
  gap: 6px;
}
.search-ico { font-size: 13px; opacity: .5; }
.search input { flex: 1; border: none; outline: none; font-size: 13px; }
.msg { color: #fff; font-size: 18px; }

/* 页面容器 */
.page {
  max-width: 640px;
  margin: 0 auto;
  padding-bottom: calc(var(--tab-h) + 20px);
}

/* 轮播图 */
.banner { padding: 10px 12px; }
.swiper {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(0,0,0,.08);
}
.swiper-track { display: flex; transition: transform .4s ease; }
.slide {
  position: relative;
  min-width: 100%;
  height: 160px;
  color: #fff;
  display: flex;
  align-items: center;
  padding: 0 22px;
}
.slide.has-img {
  height: auto;
  padding: 0;
  display: block;
}
.slide.has-img img {
  display: block;
  width: 100%;
  height: auto;
}
.slide.has-img::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 45%;
  background: linear-gradient(to top, rgba(0,0,0,.55), rgba(0,0,0,0));
  z-index: 1;
  pointer-events: none;
}
.slide-text {
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: 16px;
  z-index: 2;
}
.slide.has-img .slide-text {
  top: auto;
}
.slide-text h3 { font-size: 22px; margin-bottom: 8px; text-shadow: 0 2px 6px rgba(0,0,0,.2); }
.slide-text p { font-size: 13px; opacity: .95; text-shadow: 0 1px 4px rgba(0,0,0,.2); }
.swiper-dots {
  position: absolute;
  bottom: 10px;
  left: 0; right: 0;
  display: flex;
  justify-content: center;
  gap: 6px;
}
.swiper-dots span {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,.5);
  transition: all .3s;
}
.swiper-dots span.active { width: 18px; border-radius: 3px; background: #fff; }

/* 金刚区 */
.grid-nav {
  background: var(--card);
  margin: 0 12px 12px;
  border-radius: 14px;
  padding: 16px 8px 8px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px 0;
  box-shadow: 0 2px 10px rgba(0,0,0,.04);
}
.grid-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
}
.grid-ico {
  width: 48px; height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: #fff;
  box-shadow: 0 4px 10px rgba(0,0,0,.12);
}
.ico-tongue { background: linear-gradient(135deg,#06b6d4,#3b82f6); }
.ico-vip { background: linear-gradient(135deg,#f59e0b,#ef4444); }
.ico-record { background: linear-gradient(135deg,#10b981,#34d399); }
.ico-monitor { background: linear-gradient(135deg,#8b5cf6,#a855f7); }
.ico-advisor { background: linear-gradient(135deg,#ec4899,#f472b6); }
.ico-community { background: linear-gradient(135deg,#3b82f6,#60a5fa); }
.ico-doctor { background: linear-gradient(135deg,#ef4444,#f87171); }
.ico-share { background: linear-gradient(135deg,#f59e0b,#fbbf24); }
.grid-label { font-size: 12.5px; color: var(--text); }

/* VIP 推广条 */
.vip-banner {
  margin: 0 12px 12px;
  background: linear-gradient(135deg,#2b2440,#43345f);
  border-radius: 14px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #fff;
}
.vip-left { display: flex; align-items: center; gap: 12px; }
.vip-crown { font-size: 30px; }
.vip-title { font-weight: 700; font-size: 15px; color: #fde68a; }
.vip-sub { font-size: 11.5px; opacity: .8; margin-top: 3px; }
.vip-btn {
  background: linear-gradient(135deg,#fbbf24,#f59e0b);
  color: #4a2c00;
  border: none;
  font-weight: 700;
  font-size: 13px;
  padding: 8px 16px;
  border-radius: 18px;
}

/* 通用区块 */
.block {
  background: var(--card);
  margin: 0 12px 12px;
  border-radius: 14px;
  padding: 14px;
  box-shadow: 0 2px 10px rgba(0,0,0,.04);
}
.block-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.block-head h2 { font-size: 17px; position: relative; padding-left: 12px; }
.block-head h2::before {
  content: "";
  position: absolute;
  left: 0; top: 50%;
  transform: translateY(-50%);
  width: 4px; height: 16px;
  border-radius: 2px;
  background: linear-gradient(var(--primary), var(--primary-dark));
}
.more { font-size: 12px; color: var(--text-sub); }

/* 到家服务 */
.service-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.service-card {
  background: #f7f9fb;
  border-radius: 12px;
  padding: 14px 6px;
  text-align: center;
}
.svc-ico { font-size: 26px; }
.svc-name { font-size: 12px; margin: 8px 0 4px; color: var(--text); }
.svc-price { color: #ef4444; font-weight: 700; font-size: 14px; }
.svc-price small { font-size: 10px; font-weight: 400; }

/* 到家服务全部 */
.svc-banner { margin: 12px; background: linear-gradient(135deg,#10b981,#06b6d4); border-radius: 14px; padding: 18px; color: #fff; font-size: 15px; font-weight: 600; }
.svc-all-grid { padding: 0 12px 12px; }
.svc-cat-title { font-size: 14px; font-weight: 700; color: var(--text); margin: 14px 2px 8px; }
.svc-cat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.svc-all-card { background: #fff; border: 1px solid #f0f0f0; border-radius: 14px; padding: 16px 12px; text-align: center; }
.svc-all-card .svc-ico { font-size: 34px; }
.svc-all-card .svc-name { font-size: 14px; font-weight: 600; margin: 8px 0 4px; color: var(--text); }
.svc-all-card .svc-desc { font-size: 11px; color: var(--text-sub); line-height: 1.5; min-height: 32px; }
.svc-all-card .svc-price { margin-top: 8px; }

/* 热卖商品 */
.goods-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.goods-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #f0f0f0;
}
.goods-img {
  height: 110px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 44px;
}
.goods-img img { width: 100%; height: 100%; object-fit: cover; }
.goods-name {
  font-size: 13px;
  padding: 8px 10px 4px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.goods-tags { padding: 0 10px; display: flex; gap: 5px; }
.goods-tags span {
  font-size: 10px;
  color: var(--primary-dark);
  background: #e0f7fb;
  border-radius: 4px;
  padding: 1px 5px;
}
.goods-price { padding: 6px 10px 10px; color: #ef4444; font-weight: 700; font-size: 16px; }
.goods-price del { color: var(--text-sub); font-weight: 400; font-size: 11px; margin-left: 4px; }

.bottom-tip {
  text-align: center;
  color: var(--text-sub);
  font-size: 12px;
  padding: 18px 0;
}

/* 底部导航 */
.tabbar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: var(--tab-h);
  background: #fff;
  border-top: 1px solid #eee;
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: 50;
  max-width: 640px;
  margin: 0 auto;
}
.tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  color: var(--text-sub);
  font-size: 11px;
}
.tab.active { color: var(--primary); }
.tab-ico { font-size: 20px; }
.tab-center { flex: 0 0 auto; }
.tab-ai {
  width: 46px; height: 46px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin-top: -22px;
  box-shadow: 0 4px 12px rgba(6,182,212,.5);
}

/* 登录 / 注册 弹窗 */
.auth-mask {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  display: none;
  align-items: flex-end;
  justify-content: center;
  z-index: 100;
}
.auth-mask.show { display: flex; }
.auth-sheet {
  position: relative;
  width: 100%;
  max-width: 640px;
  background: #fff;
  border-radius: 18px 18px 0 0;
  padding: 26px 22px 30px;
  animation: slideUp .28s ease;
}
@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}
.auth-close {
  position: absolute;
  top: 14px; right: 16px;
  border: none;
  background: none;
  font-size: 18px;
  color: #9ca3af;
}
.auth-title { text-align: center; font-size: 19px; font-weight: 700; margin-bottom: 18px; }
.auth-tabs {
  display: flex;
  justify-content: center;
  gap: 28px;
  margin-bottom: 20px;
}
.auth-tab {
  font-size: 15px;
  color: var(--text-sub);
  padding-bottom: 6px;
  position: relative;
  cursor: pointer;
}
.auth-tab.active { color: var(--primary); font-weight: 700; }
.auth-tab.active::after {
  content: "";
  position: absolute;
  left: 50%; bottom: 0;
  transform: translateX(-50%);
  width: 24px; height: 3px;
  border-radius: 2px;
  background: var(--primary);
}
.auth-field {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 0 14px;
  height: 48px;
  margin-bottom: 14px;
}
.auth-field:focus-within { border-color: var(--primary); }
.auth-fico { font-size: 18px; opacity: .6; }
.auth-field input { flex: 1; border: none; outline: none; font-size: 15px; }
.auth-err { color: #ef4444; font-size: 12.5px; min-height: 18px; margin: -4px 2px 10px; }
.auth-submit {
  width: 100%;
  height: 48px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 4px;
  margin-top: 4px;
}
.auth-submit:active { opacity: .9; }
.auth-switch { text-align: center; font-size: 13px; color: var(--text-sub); margin-top: 16px; }
.auth-switch a { color: var(--primary); font-weight: 700; cursor: pointer; }

/* 登录后顶部提示条 */
.login-toast {
  position: fixed;
  top: 60px; left: 50%;
  transform: translateX(-50%);
  background: rgba(17,24,39,.85);
  color: #fff;
  font-size: 13px;
  padding: 8px 16px;
  border-radius: 20px;
  z-index: 200;
  opacity: 0;
  transition: opacity .3s;
  pointer-events: none;
  white-space: nowrap;
}
.login-toast.show { opacity: 1; }

/* ============ 二级页通用 ============ */
.view { display: block; }
.view[hidden] { display: none; }
.page { transition: none; }

/* 顶部返回 */
.back-btn {
  display: none;
  border: none; background: none; color: #fff;
  font-size: 26px; line-height: 1; width: 30px; padding: 0;
}
.page-title {
  display: none;
  color: #fff; font-weight: 700; font-size: 16px; margin-left: 4px;
}

/* 详情容器 */
.detail { padding-bottom: calc(var(--tab-h) + 20px); }
.hero-mini {
  color: #fff; text-align: center;
  padding: 30px 20px 26px;
}
.hero-mini .hero-emoji { font-size: 50px; }
.hero-mini h2 { font-size: 22px; margin: 8px 0 6px; text-shadow: 0 2px 6px rgba(0,0,0,.2); }
.hero-mini p { font-size: 13px; opacity: .95; }
.vip-price { margin-top: 14px; font-weight: 700; font-size: 18px; }
.vip-price span { font-size: 30px; }
.vip-price del { font-size: 13px; font-weight: 400; opacity: .7; }

/* 通用大按钮 */
.big-btn {
  display: block; width: calc(100% - 24px);
  margin: 16px auto 0;
  height: 48px; border: none; border-radius: 24px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff; font-size: 16px; font-weight: 700;
}
.big-btn:active { opacity: .9; }
.fixed-buy {
  position: sticky; bottom: calc(var(--tab-h) + 8px);
  width: calc(100% - 24px); box-shadow: 0 6px 16px rgba(6,182,212,.4);
}

/* 提示卡片 */
.tip-card {
  margin: 14px 12px 0; background: #fff; border-radius: 14px;
  padding: 16px; box-shadow: 0 2px 10px rgba(0,0,0,.04);
}
.tip-title { font-weight: 700; font-size: 15px; margin-bottom: 10px; }
.result-row { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px dashed #eee; font-size: 14px; }
.result-row span { color: var(--text-sub); }
.result-desc { font-size: 13px; color: var(--text-sub); line-height: 1.6; margin: 12px 0; }
.tip-card .big-btn { margin: 0; width: 100%; background: linear-gradient(135deg,#10b981,#06b6d4); }

/* 检查项目 */
.check-list { background: #fff; border-radius: 12px; overflow: hidden; }
.check-item { display: flex; justify-content: space-between; padding: 13px 14px; border-bottom: 1px solid #f3f4f6; font-size: 14px; }
.check-item:last-child { border-bottom: none; }
.check-item i { color: var(--primary); font-style: normal; font-size: 12.5px; }

/* 上传框 */
.upload-box { margin: 14px 12px; }
.upload-inner {
  border: 2px dashed #cbd5e1; border-radius: 14px;
  padding: 34px 16px; text-align: center; background: #fff;
}
.upload-ico { font-size: 40px; }
.upload-txt { font-size: 15px; font-weight: 600; margin-top: 8px; }
.upload-sub { font-size: 12px; color: var(--text-sub); margin-top: 6px; }

/* 权益网格 */
.rights-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; }
.right-cell {
  background: #fff; border-radius: 12px; padding: 14px 6px; text-align: center;
}
.right-cell span { font-size: 26px; }
.right-cell b { display: block; font-size: 13px; margin: 6px 0 2px; }
.right-cell i { font-style: normal; font-size: 11px; color: var(--text-sub); }

/* 支付列表 */
.pay-list { background: #fff; border-radius: 12px; padding: 4px 14px; }
.pay-item { display: flex; align-items: center; gap: 10px; padding: 13px 0; border-bottom: 1px solid #f3f4f6; font-size: 14px; }
.pay-item:last-child { border-bottom: none; }
.pay-item b { margin-left: auto; color: #ef4444; }

/* 档案 */
.profile-card { display: flex; align-items: center; gap: 12px; background: #fff; margin: 12px; border-radius: 14px; padding: 16px; }
.avatar { width: 56px; height: 56px; border-radius: 50%; background: #e0f7fb; display: flex; align-items: center; justify-content: center; font-size: 30px; }
.profile-info { flex: 1; }
.profile-name { font-weight: 700; font-size: 16px; }
.profile-meta { font-size: 12.5px; color: var(--text-sub); margin-top: 3px; }
.ghost-btn { border: 1px solid var(--primary); color: var(--primary); background: none; border-radius: 16px; padding: 6px 14px; font-size: 13px; }

.form-list { background: #fff; border-radius: 12px; padding: 4px 14px; }
.form-row { display: flex; align-items: center; padding: 13px 0; border-bottom: 1px solid #f3f4f6; }
.form-row:last-child { border-bottom: none; }
.form-row span { width: 90px; font-size: 14px; color: var(--text-sub); }
.form-row input { flex: 1; border: none; outline: none; font-size: 14px; text-align: right; }
.history-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.history-tags span { background: #f1f5f9; border-radius: 14px; padding: 6px 14px; font-size: 13px; color: var(--text); }

/* 健康监测 */
.device-bind-tip { margin: 12px; background: #fff; border: 1px solid #e2e8f0; border-radius: 14px; padding: 14px; display: flex; align-items: center; gap: 12px; box-shadow: 0 2px 10px rgba(15,23,42,.04); }
.device-bind-ico { font-size: 26px; }
.device-bind-main { flex: 1; }
.device-bind-main b { font-size: 14px; color: var(--text); }
.device-bind-main p { font-size: 12px; color: var(--text-sub); margin-top: 2px; line-height: 1.4; }
.device-bind-btn { background: linear-gradient(135deg,#06b6d4,#3b82f6); color: #fff; border: none; border-radius: 18px; padding: 7px 16px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.monitor-hero { margin: 12px; background: linear-gradient(135deg,#06b6d4,#3b82f6); border-radius: 14px; padding: 20px; color: #fff; display: flex; align-items: center; gap: 18px; }
.monitor-bmi { text-align: center; background: rgba(255,255,255,.18); border-radius: 50%; width: 96px; height: 96px; display: flex; flex-direction: column; justify-content: center; }
.bmi-num { font-size: 30px; font-weight: 800; }
.bmi-label { font-size: 11px; opacity: .9; }
.monitor-status { font-size: 13px; line-height: 1.6; }
.metric-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; }
.metric-cell { background: #fff; border-radius: 12px; padding: 14px 8px; text-align: center; }
.metric-cell span { font-size: 12px; color: var(--text-sub); }
.metric-cell b { display: block; font-size: 17px; margin-top: 4px; }
.metric-cell small { font-size: 10px; color: var(--text-sub); font-weight: 400; }

.chart { display: flex; align-items: flex-end; justify-content: space-between; height: 120px; padding: 10px 4px; gap: 6px; }
.chart .bar { flex: 1; background: linear-gradient(var(--primary),#a5f3fc); border-radius: 4px 4px 0 0; position: relative; }
.chart .bar i { position: absolute; bottom: -18px; left: 0; right: 0; text-align: center; font-size: 10px; color: var(--text-sub); font-style: normal; }

.remind-list { background: #fff; border-radius: 12px; overflow: hidden; }
.remind-item { display: flex; align-items: center; gap: 12px; padding: 13px 14px; border-bottom: 1px solid #f3f4f6; }
.remind-item:last-child { border-bottom: none; }
.remind-item > span { font-size: 24px; }
.remind-item div { flex: 1; }
.remind-item b { font-size: 14px; }
.remind-item p { font-size: 12px; color: var(--text-sub); margin-top: 2px; }
.remind-item i { font-style: normal; font-size: 12px; color: var(--primary); }

/* 顾问 / AI 聊天 */
.advisor-card { display: flex; gap: 12px; background: #fff; margin: 12px; border-radius: 14px; padding: 16px; }
.advisor-avatar { width: 54px; height: 54px; border-radius: 50%; background: #e0f2fe; display: flex; align-items: center; justify-content: center; font-size: 30px; }
.advisor-info { flex: 1; }
.advisor-name { font-weight: 700; font-size: 15px; }
.advisor-desc { font-size: 12.5px; color: var(--text-sub); margin: 4px 0 8px; }
.advisor-tags span { font-size: 11px; background: #ecfdf5; color: #10b981; border-radius: 10px; padding: 2px 8px; margin-right: 6px; }

/* 顾问联系方式 */
.contact-list { background: #fff; border-radius: 12px; overflow: hidden; }
.contact-item { display: flex; align-items: center; gap: 12px; padding: 14px; border-bottom: 1px solid #f3f4f6; }
.contact-item:last-child { border-bottom: none; }
.contact-ico { font-size: 24px; }
.contact-main { flex: 1; }
.contact-label { font-size: 11.5px; color: var(--text-sub); }
.contact-value { font-size: 15px; font-weight: 600; margin-top: 2px; }
.contact-btn {
  border: 1px solid var(--primary); color: var(--primary); background: none;
  border-radius: 16px; padding: 6px 14px; font-size: 13px; text-decoration: none; white-space: nowrap;
}
.contact-btn:active { background: var(--primary); color: #fff; }
.advisor-actions { display: flex; gap: 10px; margin-top: 14px; }
.adv-act {
  flex: 1; height: 44px; border: 1px solid var(--primary); color: var(--primary);
  background: #fff; border-radius: 22px; font-size: 14px; font-weight: 600;
}
.adv-act.primary { background: linear-gradient(135deg,var(--primary),var(--primary-dark)); color: #fff; border: none; }
.adv-act:active { opacity: .9; }

.chat-box { background: #f7f9fb; border-radius: 12px; padding: 14px; min-height: 120px; }
.bubble { max-width: 78%; padding: 10px 13px; border-radius: 14px; font-size: 14px; line-height: 1.5; margin-bottom: 12px; word-break: break-word; }
.bubble.left { background: #fff; border-bottom-left-radius: 4px; }
.bubble.right { background: linear-gradient(135deg,var(--primary),var(--primary-dark)); color: #fff; margin-left: auto; border-bottom-right-radius: 4px; }
.chat-input { display: flex; gap: 8px; margin-top: 12px; }
.chat-input input { flex: 1; height: 42px; border: 1px solid #e5e7eb; border-radius: 21px; padding: 0 16px; outline: none; font-size: 14px; }
.chat-input button { border: none; background: linear-gradient(135deg,var(--primary),var(--primary-dark)); color: #fff; border-radius: 21px; padding: 0 18px; font-size: 14px; font-weight: 700; }

/* 社区 */
.tabs-line { display: flex; gap: 18px; padding: 12px 16px; position: sticky; top: var(--top-h); background: var(--bg); z-index: 10; overflow-x: auto; }
.tl { font-size: 15px; color: var(--text-sub); white-space: nowrap; position: relative; padding-bottom: 6px; }
.tl.active { color: var(--text); font-weight: 700; }
.tl.active::after { content: ""; position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); width: 20px; height: 3px; border-radius: 2px; background: var(--primary); }

.post-list { padding: 0 12px; }
.post-card { background: #fff; border-radius: 14px; padding: 14px; margin-bottom: 12px; box-shadow: 0 2px 10px rgba(0,0,0,.04); }
.post-head { display: flex; align-items: center; gap: 10px; }
.post-ava { width: 38px; height: 38px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 20px; background: #e0f7fb; }
.post-head-main { flex: 1; }
.post-user { font-size: 14px; font-weight: 600; }
.post-follow { border: 1px solid var(--primary); color: var(--primary); background: #fff; border-radius: 16px; padding: 5px 12px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.post-follow.on { border-color: #cbd5e1; color: var(--text-sub); background: #f8fafc; }
.post-time { font-size: 11px; color: var(--text-sub); }
.post-title { font-size: 15px; font-weight: 700; margin: 10px 0 6px; }
.post-text { font-size: 13.5px; color: #374151; line-height: 1.6; }
.post-tags { margin-top: 8px; }
.post-tags span { font-size: 11px; color: var(--primary-dark); background: #e0f7fb; border-radius: 4px; padding: 2px 7px; margin-right: 6px; }
.post-foot { display: flex; gap: 18px; margin-top: 12px; color: var(--text-sub); font-size: 12.5px; }
.post-foot span { display: flex; align-items: center; gap: 4px; }
.post-foot span.liked { color: #ef4444; font-weight: 700; }
.post-foot span[data-fav].on { color: #f59e0b; }

/* 评论区 */
.cmt-box { margin-top: 12px; background: #f8fafc; border-radius: 10px; padding: 10px; }
.cmt-item { font-size: 13px; color: #374151; line-height: 1.6; padding: 3px 0; }
.cmt-user { color: var(--primary-dark); font-weight: 600; }
.cmt-empty { font-size: 12px; color: var(--text-sub); padding: 4px 0 8px; }
.cmt-input { display: flex; gap: 8px; margin-top: 8px; }
.cmt-input input { flex: 1; height: 34px; border: 1px solid #e5e7eb; border-radius: 17px; padding: 0 14px; font-size: 13px; outline: none; box-sizing: border-box; background: #fff; }
.cmt-input input:focus { border-color: var(--primary); }
.cmt-input button { border: none; background: var(--primary); color: #fff; border-radius: 17px; padding: 0 16px; font-size: 13px; font-weight: 600; }

/* 发帖按钮 */
.fab-post {
  position: fixed;
  right: 16px;
  bottom: calc(var(--tab-h) + 18px);
  z-index: 60;
  border: none;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  border-radius: 24px;
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 6px 16px rgba(6,182,212,.45);
}
.fab-post:active { opacity: .9; }

/* 发帖弹窗 */
.post-form { padding: 6px 4px 0; }
.post-title-input {
  width: 100%; height: 44px; border: 1px solid #e5e7eb; border-radius: 10px;
  padding: 0 14px; font-size: 15px; outline: none; box-sizing: border-box; margin-bottom: 12px;
}
.post-title-input:focus { border-color: var(--primary); }
.post-content-input {
  width: 100%; height: 120px; border: 1px solid #e5e7eb; border-radius: 10px;
  padding: 12px 14px; font-size: 14px; outline: none; resize: none; box-sizing: border-box;
  font-family: inherit; line-height: 1.6;
}
.post-content-input:focus { border-color: var(--primary); }

/* 发帖上传 */
.post-upload { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 12px 0; }
.post-thumbs { display: flex; flex-wrap: wrap; gap: 10px; }
.post-thumb { position: relative; width: 72px; height: 72px; border-radius: 10px; overflow: hidden; background: #f1f5f9; }
.post-thumb img, .post-thumb video { width: 100%; height: 100%; object-fit: cover; display: block; }
.post-thumb .post-thumb-del { position: absolute; top: 2px; right: 2px; width: 20px; height: 20px; border-radius: 50%; background: rgba(0,0,0,.55); color: #fff; font-size: 12px; line-height: 20px; text-align: center; }
.post-thumb .post-thumb-badge { position: absolute; left: 0; bottom: 0; right: 0; background: rgba(0,0,0,.5); color: #fff; font-size: 10px; text-align: center; }
.post-add {
  width: 72px; height: 72px; border: 1px dashed #cbd5e1; border-radius: 10px; display: flex; flex-direction: column;
  align-items: center; justify-content: center; color: var(--text-sub); font-size: 12px; line-height: 1.4; cursor: pointer;
}
.post-add span { text-align: center; }
.post-add:active { background: #f8fafc; }
.post-upload-tip { width: 100%; font-size: 11px; color: var(--text-sub); margin-top: 2px; }

/* 帖子正文媒体 */
.post-media { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 10px 0; }
.post-media .pm { border-radius: 8px; overflow: hidden; aspect-ratio: 1 / 1; background: #f1f5f9; }
.post-media .pm img { width: 100%; height: 100%; object-fit: cover; display: block; }
.post-media .pm-video { position: relative; border-radius: 8px; overflow: hidden; grid-column: 1 / -1; background: #000; }
.post-media .pm-video video { width: 100%; max-height: 280px; display: block; }
.post-media .pm-video .play-ico { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); font-size: 40px; color: rgba(255,255,255,.9); pointer-events: none; }

.post-cats { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; }
.pc { font-size: 13px; border: 1px solid #e5e7eb; border-radius: 16px; padding: 6px 14px; color: var(--text-sub); background: #fff; }
.pc.active { border-color: var(--primary); color: var(--primary); background: #e0f7fb; font-weight: 600; }
.post-err { color: #ef4444; font-size: 12.5px; min-height: 18px; margin: 4px 2px 8px; }

/* AI 医生 */
.ai-doc { display: flex; flex-direction: column; }
.ai-banner { display: flex; align-items: center; gap: 12px; color: #fff; padding: 18px 16px; }
.ai-ico { font-size: 36px; }
.ai-banner b { font-size: 16px; display: block; }
.ai-banner p { font-size: 12px; opacity: .9; margin-top: 2px; }
.ai-chat { flex: 1; min-height: 200px; }
.quick-asks { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 4px; }
.quick-asks span { font-size: 12.5px; background: #fff; border: 1px solid #e5e7eb; border-radius: 16px; padding: 6px 12px; color: var(--text); }
.ai-disclaimer { text-align: center; font-size: 11.5px; color: #ef4444; padding: 10px; }

/* 分享有礼 */
.invite-card { margin: 14px 12px; background: linear-gradient(135deg,#fffbeb,#fef3c7); border: 1px solid #fde68a; border-radius: 14px; padding: 18px; text-align: center; }
.invite-code { margin-bottom: 14px; }
.invite-code div { font-size: 12px; color: var(--text-sub); }
.invite-code b { font-size: 28px; letter-spacing: 3px; color: var(--gold); }
.reward-row { display: flex; justify-content: space-between; padding: 12px 0; border-bottom: 1px dashed #eee; font-size: 14px; }
.reward-row:last-child { border-bottom: none; }
.reward-row span { color: var(--text-sub); }
.share-channel { display: grid; grid-template-columns: repeat(4,1fr); gap: 10px; padding: 0 12px 16px; }
.share-btn { border: 1px solid #e5e7eb; background: #fff; border-radius: 12px; padding: 14px 2px; font-size: 12px; color: var(--text); }

/* 运营管理后台 */
.mine-cell { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 0; }
.mine-cell span { font-size: 24px; }
.mine-cell b { font-size: 13px; font-weight: 600; color: var(--text); }
.admin-mask { position: fixed; inset: 0; background: rgba(15,23,42,.5); z-index: 200; display: none; }
.admin-mask.show { display: block; }
.admin-panel { position: absolute; left: 0; right: 0; bottom: 0; top: 8%; background: #f1f5f9; border-radius: 18px 18px 0 0; display: flex; flex-direction: column; overflow: hidden; }
.admin-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; background: #fff; font-size: 16px; font-weight: 700; border-bottom: 1px solid #eee; }
.admin-close { width: 32px; height: 32px; border: none; background: #f1f5f9; border-radius: 50%; font-size: 16px; color: #64748b; }
.admin-body { flex: 1; overflow-y: auto; padding: 14px; }
.admin-list { display: flex; flex-direction: column; gap: 10px; }
.admin-item { background: #fff; border-radius: 12px; padding: 12px; display: flex; align-items: center; gap: 10px; }
.admin-item .ai-thumb { width: 48px; height: 48px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 24px; overflow: hidden; flex-shrink: 0; background: #f1f5f9; }
.admin-item .ai-thumb img { width: 100%; height: 100%; object-fit: cover; }
.admin-item .ai-main { flex: 1; min-width: 0; }
.admin-item .ai-main b { font-size: 14px; display: block; }
.admin-item .ai-main p { font-size: 12px; color: var(--text-sub); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.admin-item .ai-ops { display: flex; gap: 8px; flex-shrink: 0; }
.admin-item .ai-ops button { border: none; border-radius: 8px; padding: 6px 10px; font-size: 12px; }
.ai-edit { background: var(--primary); color: #fff; }
.ai-del { background: #fee2e2; color: #ef4444; }
.admin-add { width: 100%; border: 1px dashed #94a3b8; background: #fff; border-radius: 12px; padding: 14px; font-size: 14px; color: var(--primary); font-weight: 600; margin-top: 4px; }
.admin-form { background: #fff; border-radius: 12px; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.admin-form label { font-size: 13px; color: var(--text); font-weight: 600; }
.admin-form input, .admin-form textarea, .admin-form select { width: 100%; border: 1px solid #e5e7eb; border-radius: 8px; padding: 10px 12px; font-size: 14px; outline: none; box-sizing: border-box; font-family: inherit; }
.admin-form input:focus, .admin-form textarea:focus { border-color: var(--primary); }
.admin-form .af-row { display: flex; gap: 10px; }
.admin-form .af-row > div { flex: 1; }
.admin-form .af-pic { display: flex; align-items: center; gap: 10px; }
.admin-form .af-pic img { width: 56px; height: 56px; border-radius: 8px; object-fit: cover; border: 1px solid #eee; }
.admin-form .af-pic button { border: 1px solid #cbd5e1; background: #fff; border-radius: 8px; padding: 8px 12px; font-size: 13px; }
.admin-form .af-upload { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.admin-form .af-preview { width: 56px; height: 56px; border-radius: 10px; border: 1px dashed #cbd5e1; background: #f8fafc; display: flex; align-items: center; justify-content: center; overflow: hidden; flex-shrink: 0; }
.admin-form .af-preview img { width: 100%; height: 100%; object-fit: cover; }
.admin-form .af-upload input[type=file] { flex: 1; min-width: 140px; font-size: 13px; }
.admin-form .af-clear { border: 1px solid #cbd5e1; background: #fff; border-radius: 8px; padding: 8px 12px; font-size: 13px; }
.admin-form .af-actions { display: flex; gap: 10px; margin-top: 4px; }
.admin-form .af-save { flex: 1; border: none; background: var(--primary); color: #fff; border-radius: 10px; padding: 12px; font-size: 15px; font-weight: 600; }
.admin-form .af-cancel { border: 1px solid #cbd5e1; background: #fff; color: var(--text-sub); border-radius: 10px; padding: 12px 18px; font-size: 15px; }
.admin-hint { font-size: 12px; color: var(--text-sub); background: #fff7ed; border: 1px solid #fed7aa; border-radius: 8px; padding: 10px; line-height: 1.6; }
.admin-cat-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.admin-cat-chips span { font-size: 13px; background: #fff; border: 1px solid #e5e7eb; border-radius: 16px; padding: 6px 12px; color: var(--text); display: flex; align-items: center; gap: 6px; }
.admin-cat-chips span b { font-weight: 600; }
.admin-cat-chips span i { color: #ef4444; font-style: normal; cursor: pointer; }

/* 商城 */
.mall-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 12px; padding: 0 12px 16px; }
.mall-card { background: #fff; border-radius: 12px; overflow: hidden; border: 1px solid #f0f0f0; }
.mall-img { height: 110px; display: flex; align-items: center; justify-content: center; font-size: 44px; }
.mall-img img { width: 100%; height: 100%; object-fit: cover; }
.mall-name { font-size: 13px; padding: 8px 10px 4px; line-height: 1.4; }
.mall-price { padding: 4px 10px 10px; color: #ef4444; font-weight: 700; font-size: 16px; }
.mall-price del { color: var(--text-sub); font-weight: 400; font-size: 11px; margin-left: 4px; }

/* 我的 */
.mine-head { display: flex; align-items: center; gap: 12px; padding: 26px 18px; color: #fff; }
.mine-avatar { width: 60px; height: 60px; border-radius: 50%; background: rgba(255,255,255,.25); display: flex; align-items: center; justify-content: center; font-size: 34px; }
.mine-info { flex: 1; }
.mine-name { font-size: 18px; font-weight: 700; }
.mine-sub { font-size: 12.5px; opacity: .9; margin-top: 4px; }
.mine-vip { border: 1px solid #fff; background: rgba(255,255,255,.2); color: #fff; border-radius: 16px; padding: 6px 12px; font-size: 12px; }
.mine-stats { display: flex; background: #fff; margin: -16px 12px 12px; border-radius: 14px; padding: 16px 0; box-shadow: 0 4px 12px rgba(0,0,0,.06); position: relative; }
.mine-stats > div { flex: 1; text-align: center; }
.mine-stats b { display: block; font-size: 20px; color: var(--text); }
.mine-stats span { font-size: 12px; color: var(--text-sub); }
.mine-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 10px; }
.mine-cell { background: #fff; border-radius: 12px; padding: 14px 4px; text-align: center; }
.mine-cell span { font-size: 24px; }
.mine-cell b { display: block; font-size: 12px; margin-top: 6px; }
.mine-line { display: flex; align-items: center; padding: 14px 14px; border-bottom: 1px solid #f3f4f6; font-size: 14px; }
.mine-line:last-child { border-bottom: none; }
.mine-line i { margin-left: auto; color: #cbd5e1; font-style: normal; }

/* ============ 我的订单 ============ */
.order-list { padding: 0 12px; }
.order-card { background: #fff; border-radius: 14px; padding: 14px; margin-bottom: 12px; box-shadow: 0 2px 10px rgba(0,0,0,.04); }
.order-card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.oc-name { font-size: 14px; font-weight: 600; }
.oc-status { font-size: 12px; color: var(--primary); }
.order-card-body { display: flex; align-items: center; gap: 12px; border-top: 1px solid #f3f4f6; border-bottom: 1px solid #f3f4f6; padding: 12px 0; }
.oc-img { width: 60px; height: 60px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 32px; flex-shrink: 0; }
.oc-info { flex: 1; }
.oc-spec { font-size: 12.5px; color: var(--text-sub); }
.oc-qty { font-size: 12px; color: var(--text-sub); margin-top: 4px; }
.oc-total { font-size: 16px; font-weight: 700; color: #ef4444; }
.order-card-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 10px; }
.oc-btn { border: 1px solid #e5e7eb; background: #fff; border-radius: 16px; padding: 6px 14px; font-size: 12.5px; color: var(--text); }
.oc-btn.pay { border-color: var(--primary); color: var(--primary); background: #e0f7fb; font-weight: 600; }

/* ============ 我的收藏 ============ */
#favGrid { padding: 12px; }

/* ============ 收货地址 ============ */
.address-list { padding: 12px; }
.address-card { background: #fff; border-radius: 14px; padding: 14px; margin-bottom: 12px; box-shadow: 0 2px 10px rgba(0,0,0,.04); }
.addr-top { display: flex; align-items: center; gap: 10px; }
.addr-top b { font-size: 15px; }
.addr-top span { font-size: 13px; color: var(--text-sub); }
.addr-def { margin-left: auto; font-size: 11px; color: #fff; background: var(--primary); border-radius: 10px; padding: 2px 8px; font-style: normal; }
.addr-detail { font-size: 13px; color: #374151; margin: 8px 0 10px; line-height: 1.5; }
.addr-ops { display: flex; gap: 18px; border-top: 1px solid #f3f4f6; padding-top: 10px; }
.addr-ops span { font-size: 12.5px; color: var(--text-sub); }

/* ============ 设置 ============ */
.set-row { display: flex; align-items: center; padding: 14px 0; border-bottom: 1px solid #f3f4f6; font-size: 14px; }
.set-row:last-child { border-bottom: none; }
.set-line { display: flex; align-items: center; padding: 14px 0; border-bottom: 1px solid #f3f4f6; font-size: 14px; }
.set-line:last-child { border-bottom: none; }
.set-line i { margin-left: auto; color: #cbd5e1; font-style: normal; font-size: 12.5px; }
.switch { position: relative; width: 46px; height: 26px; margin-left: auto; }
.switch input { display: none; }
.slider { position: absolute; inset: 0; background: #cbd5e1; border-radius: 13px; transition: .2s; }
.slider::before { content: ""; position: absolute; width: 22px; height: 22px; left: 2px; top: 2px; background: #fff; border-radius: 50%; transition: .2s; }
.switch input:checked + .slider { background: var(--primary); }
.switch input:checked + .slider::before { transform: translateX(20px); }

/* ============ 商品详情 ============ */
.pd-img { height: 280px; display: flex; align-items: center; justify-content: center; font-size: 110px; }
.pd-img img { width: 100%; height: 100%; object-fit: cover; }
.pd-info { background: #fff; padding: 16px; }
.pd-name { font-size: 17px; font-weight: 700; line-height: 1.4; }
.pd-price { font-size: 22px; color: #ef4444; font-weight: 800; margin-top: 8px; }
.pd-price del { font-size: 13px; font-weight: 400; color: var(--text-sub); margin-left: 6px; }
.pd-sales { float: right; font-size: 12px; color: var(--text-sub); font-weight: 400; margin-top: 8px; }
.pd-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.pd-tags span { font-size: 11px; color: var(--primary-dark); background: #e0f7fb; border-radius: 4px; padding: 3px 9px; }
.pd-specs { display: flex; flex-wrap: wrap; gap: 10px; }
.pd-spec { border: 1px solid #e5e7eb; border-radius: 18px; padding: 8px 16px; font-size: 13px; color: var(--text); background: #fff; }
.pd-spec.active { border-color: var(--primary); color: var(--primary); background: #e0f7fb; font-weight: 600; }
.pd-desc { font-size: 13.5px; color: #374151; line-height: 1.7; }
.pd-bar {
  position: sticky; bottom: calc(var(--tab-h) + 8px);
  display: flex; align-items: center; gap: 10px;
  background: #fff; border-radius: 28px; padding: 8px 10px;
  margin: 16px 12px 0; box-shadow: 0 6px 18px rgba(0,0,0,.12);
}
.pd-qty { display: flex; align-items: center; border: 1px solid #e5e7eb; border-radius: 16px; overflow: hidden; }
.pd-qty button { width: 30px; height: 30px; border: none; background: #f3f4f6; font-size: 18px; color: var(--text); }
.pd-qty span { width: 34px; text-align: center; font-size: 14px; }
.pd-cart, .pd-buy, .pd-fav { flex: 1; height: 40px; border: none; border-radius: 20px; font-size: 14px; font-weight: 700; color: #fff; }
.pd-fav { background: #fff; color: var(--text); border: 1px solid #e5e7eb; flex: 0.9; font-size: 13px; }
.pd-cart { background: linear-gradient(135deg,#f59e0b,#f97316); }
.pd-buy { background: linear-gradient(135deg,var(--primary),var(--primary-dark)); }
.pd-bar .pd-cart, .pd-bar .pd-buy { flex: 1.2; }

/* ============ 确认下单 ============ */
.addr-left { display: flex; align-items: center; gap: 12px; flex: 1; }
.addr-ico { font-size: 26px; }
.addr-name { font-size: 15px; font-weight: 700; }
.addr-detail { font-size: 12.5px; color: var(--text-sub); margin-top: 4px; }
.addr-edit { color: #cbd5e1; font-size: 20px; }
#orderAddr { display: flex; align-items: center; }

.order-goods { display: flex; align-items: center; gap: 12px; }
.og-img { width: 64px; height: 64px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 34px; flex-shrink: 0; }
.og-info { flex: 1; }
.og-name { font-size: 14px; font-weight: 600; }
.og-spec { font-size: 12px; color: var(--text-sub); margin: 4px 0; }
.og-price { font-size: 15px; color: #ef4444; font-weight: 700; }
.og-price del { font-size: 11px; font-weight: 400; color: var(--text-sub); margin-left: 4px; }
.og-qty { color: var(--text-sub); font-size: 14px; }

.order-fee { background: #fff; margin: 0 12px 12px; border-radius: 14px; padding: 14px 16px; }
.fee-row { display: flex; justify-content: space-between; padding: 7px 0; font-size: 14px; }
.fee-row span { color: var(--text-sub); }
.fee-row.total { border-top: 1px dashed #e5e7eb; margin-top: 6px; padding-top: 12px; }
.fee-row.total span, .fee-row.total b { color: #ef4444; font-size: 17px; font-weight: 800; }
.pay-item i { font-style: normal; font-size: 11px; color: var(--primary); margin-left: 4px; }

