/* ============================================================
   康行 · 设计系统 (Design System)
   医疗健康风 · 浅色主题 · 温暖且有信任感
   ============================================================ */

:root {
  /* 品牌色 */
  --brand: #0FB5A6;
  --brand-dark: #0A8C80;
  --brand-soft: #E6F7F5;
  --brand-soft-2: #D2F0EC;
  --accent: #FF7A59;
  --accent-soft: #FFEDE6;
  --blue: #2D7FF9;
  --blue-soft: #E8F1FF;

  /* 中性色 */
  --ink: #1F2A37;
  --ink-2: #374151;
  --muted: #6B7280;
  --muted-2: #9AA3AF;
  --line: #E8ECF2;
  --line-2: #F0F3F8;
  --bg: #F6F8FB;
  --white: #FFFFFF;

  /* 语义色 */
  --warn: #F5A623;
  --danger: #EF5350;
  --success: #2BB673;
  --gold: #F5B800;

  /* 形状 */
  --r-sm: 10px;
  --r: 14px;
  --r-lg: 20px;
  --r-xl: 28px;

  /* 阴影 */
  --sh-sm: 0 1px 3px rgba(16, 24, 40, .06), 0 1px 2px rgba(16, 24, 40, .04);
  --sh: 0 6px 20px rgba(16, 24, 40, .08);
  --sh-lg: 0 18px 48px rgba(16, 24, 40, .12);
  --sh-brand: 0 10px 30px rgba(15, 181, 166, .28);

  /* 字体 */
  --font: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", -apple-system,
    BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4 { margin: 0; font-weight: 700; line-height: 1.25; color: var(--ink); }
p { margin: 0; }

/* ---------------- 布局 ---------------- */
.container { width: min(1160px, 92vw); margin: 0 auto; }
.app-root { min-height: 60vh; }
.section { padding: 56px 0; }
.section-tight { padding: 36px 0; }

/* ---------------- 顶部导航 ---------------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .86);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner { display: flex; align-items: center; gap: 22px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 19px; color: var(--ink); }
.brand .logo {
  width: 34px; height: 34px; border-radius: 10px;
  background: linear-gradient(135deg, var(--brand), var(--blue));
  display: grid; place-items: center; color: #fff; font-size: 18px;
  box-shadow: var(--sh-brand);
}
.brand b { color: var(--brand-dark); }
.nav { display: flex; gap: 4px; margin-left: 10px; }
.nav a {
  padding: 8px 14px; border-radius: 10px; color: var(--ink-2);
  font-weight: 600; font-size: 15px; transition: .18s;
}
.nav a:hover { background: var(--brand-soft); color: var(--brand-dark); }
.nav a.active { background: var(--brand-soft); color: var(--brand-dark); }
.topbar-spacer { flex: 1; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }

.user-chip {
  display: flex; align-items: center; gap: 9px;
  padding: 5px 12px 5px 5px; border-radius: 999px;
  background: var(--white); border: 1px solid var(--line); box-shadow: var(--sh-sm);
}
.user-chip .avatar { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 14px; }
.user-chip span { font-weight: 600; font-size: 14px; }
.user-chip .caret { color: var(--muted-2); font-size: 11px; }
.user-chip { cursor: pointer; }
.user-chip:hover { border-color: var(--brand); }

/* ---------------- 个人中心 ---------------- */
.profile-head { margin-bottom: 4px; }
.profile-stats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
  margin-top: 18px; padding-top: 16px; border-top: 1px dashed var(--line);
}
.profile-stats .kpi {
  background: var(--bg); border: none; box-shadow: none; padding: 12px; text-align: center;
}
.profile-stats .kpi .val { font-size: 26px; margin-top: 2px; }
.me-post { position: relative; }
.me-post .del-btn {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  width: 30px; height: 30px; border-radius: 50%; border: none; cursor: pointer;
  background: var(--white); box-shadow: var(--sh-sm); font-size: 14px; line-height: 1;
  opacity: .85;
}
.me-post .del-btn:hover { opacity: 1; color: var(--danger); }
/* 头像颜色选择 */
.swatches { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
.swatch {
  width: 30px; height: 30px; border-radius: 50%; cursor: pointer;
  border: 3px solid transparent; transition: transform .12s;
}
.swatch:hover { transform: scale(1.08); }
.swatch.on { border-color: var(--ink); box-shadow: 0 0 0 2px var(--white) inset; }

/* ---------------- 按钮 ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 20px; border-radius: 12px; border: 1px solid transparent;
  font-weight: 700; font-size: 15px; transition: .18s; white-space: nowrap;
}
.btn-primary { background: var(--brand); color: #fff; box-shadow: var(--sh-brand); }
.btn-primary:hover { background: var(--brand-dark); transform: translateY(-1px); }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { filter: brightness(1.04); transform: translateY(-1px); }
.btn-ghost { background: var(--white); color: var(--ink-2); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand-dark); }
.btn-soft { background: var(--brand-soft); color: var(--brand-dark); }
.btn-soft:hover { background: var(--brand-soft-2); }
.btn-block { width: 100%; }
.btn-sm { padding: 7px 13px; font-size: 13px; border-radius: 10px; }
.btn-lg { padding: 14px 26px; font-size: 16px; }

/* ---------------- 徽标/标签 ---------------- */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 700;
  background: var(--brand-soft); color: var(--brand-dark);
}
.badge.blue { background: var(--blue-soft); color: var(--blue); }
.badge.accent { background: var(--accent-soft); color: var(--accent); }
.badge.gold { background: #FFF6DD; color: #B8860B; }
.badge.gray { background: var(--line-2); color: var(--muted); }
.badge.dot::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }

/* ---------------- 卡片 ---------------- */
.card {
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--r-lg); box-shadow: var(--sh-sm); transition: .2s;
}
.card:hover { box-shadow: var(--sh); transform: translateY(-2px); }
.card-pad { padding: 22px; }

/* ---------------- Hero ---------------- */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(900px 460px at 12% -8%, rgba(15,181,166,.18), transparent 60%),
    radial-gradient(820px 420px at 96% 6%, rgba(45,127,249,.16), transparent 58%),
    linear-gradient(180deg, #FFFFFF, #F4F9FB);
  border-bottom: 1px solid var(--line);
}
.hero-inner { padding: 64px 0 56px; position: relative; }
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: 18px;
  padding: 6px 14px; border-radius: 999px; background: var(--white);
  border: 1px solid var(--line); box-shadow: var(--sh-sm);
  font-weight: 700; font-size: 13.5px; color: var(--brand-dark);
}
.hero h1 {
  font-size: 46px; line-height: 1.18; letter-spacing: -.5px; max-width: 16em;
}
.hero h1 .hl { color: var(--brand-dark); position: relative; }
.hero h1 .hl::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 6px; height: 12px;
  background: var(--brand-soft); z-index: -1; border-radius: 6px;
}
.hero-sub { margin-top: 18px; font-size: 18px; color: var(--muted); max-width: 36em; }
.hero-cta { margin-top: 28px; display: flex; gap: 12px; flex-wrap: wrap; }
.hero-note { margin-top: 16px; font-size: 13px; color: var(--muted-2); }

/* 三意图卡片 */
.intents { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 44px; }
.intent {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 26px 24px; box-shadow: var(--sh-sm); transition: .2s; cursor: pointer; position: relative;
}
.intent:hover { box-shadow: var(--sh-lg); transform: translateY(-4px); border-color: var(--brand-soft-2); }
.intent .ic {
  width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center;
  margin-bottom: 16px; font-size: 26px; background: var(--brand-soft); color: var(--brand-dark);
}
.intent:nth-child(2) .ic { background: var(--blue-soft); color: var(--blue); }
.intent:nth-child(3) .ic { background: var(--accent-soft); color: var(--accent); }
.intent h3 { font-size: 19px; }
.intent p { margin-top: 8px; color: var(--muted); font-size: 14.5px; }
.intent .go { margin-top: 14px; font-weight: 700; color: var(--brand-dark); font-size: 14px; }
.intent:nth-child(2) .go { color: var(--blue); }
.intent:nth-child(3) .go { color: var(--accent); }

/* 统计条 */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 40px; }
.stat { text-align: center; padding: 18px 12px; background: var(--white); border: 1px solid var(--line); border-radius: var(--r); }
.stat .n { font-size: 30px; font-weight: 800; color: var(--brand-dark); letter-spacing: -.5px; }
.stat .l { font-size: 13.5px; color: var(--muted); margin-top: 4px; }

/* ---------------- 区块标题 ---------------- */
.sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 26px; }
.sec-head h2 { font-size: 28px; letter-spacing: -.3px; }
.sec-head p { margin-top: 8px; color: var(--muted); font-size: 15.5px; }
.sec-head .more { color: var(--brand-dark); font-weight: 700; font-size: 14.5px; white-space: nowrap; }

/* ---------------- 病情圈网格 ---------------- */
.comm-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.comm {
  display: flex; gap: 14px; padding: 18px; align-items: center;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--sh-sm); transition: .2s; cursor: pointer;
}
.comm:hover { box-shadow: var(--sh); transform: translateY(-2px); }
.comm .emoji {
  width: 50px; height: 50px; border-radius: 14px; display: grid; place-items: center;
  font-size: 25px; background: var(--brand-soft); flex-shrink: 0;
}
.comm .meta h4 { font-size: 16.5px; }
.comm .meta .sub { font-size: 13px; color: var(--muted); margin-top: 3px; }
.comm .meta .cnt { font-size: 12.5px; color: var(--brand-dark); font-weight: 700; margin-top: 6px; }

/* 分类筛选 */
.chips { display: flex; gap: 9px; flex-wrap: wrap; margin-bottom: 22px; }
.chip {
  padding: 8px 15px; border-radius: 999px; background: var(--white);
  border: 1px solid var(--line); color: var(--ink-2); font-weight: 600; font-size: 14px; transition: .16s;
}
.chip:hover { border-color: var(--brand); color: var(--brand-dark); }
.chip.active { background: var(--brand); color: #fff; border-color: var(--brand); }

/* ---------------- 论坛/帖子 ---------------- */
.post {
  display: flex; gap: 14px; padding: 18px 20px; background: var(--white);
  border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh-sm); transition: .18s;
}
.post.link:hover { box-shadow: var(--sh); transform: translateY(-2px); cursor: pointer; }
.post .avatar { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 17px; flex-shrink: 0; }
.post .body { flex: 1; min-width: 0; }
.post .body .top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.post .body .author { font-weight: 700; font-size: 14.5px; }
.post .body .time { font-size: 12.5px; color: var(--muted-2); }
.post .body h4 { font-size: 17px; margin-top: 8px; }
.post .body .text { margin-top: 7px; color: var(--ink-2); font-size: 14.5px; }
.post .body .text.clamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.reactions { display: flex; gap: 8px; margin-top: 13px; flex-wrap: wrap; }
.react {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px;
  background: var(--line-2); color: var(--muted); font-weight: 700; font-size: 13px; border: 1px solid transparent; transition: .16s;
}
.react:hover { background: var(--brand-soft); color: var(--brand-dark); }
.react.on { background: var(--brand-soft); color: var(--brand-dark); border-color: var(--brand-soft-2); }

/* ---------------- 表单 ---------------- */
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 700; font-size: 14px; margin-bottom: 7px; color: var(--ink-2); }
.field .hint { font-size: 12.5px; color: var(--muted-2); margin-top: 6px; }
.input, .select, .textarea {
  width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px;
  font-size: 15px; font-family: inherit; color: var(--ink); background: var(--white); transition: .16s;
}
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.textarea { resize: vertical; min-height: 110px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* ---------------- 健康追踪 ---------------- */
.track-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 18px; align-items: start; }
.track-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.kpi { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px; box-shadow: var(--sh-sm); }
.kpi .lbl { font-size: 13.5px; color: var(--muted); font-weight: 600; }
.kpi .val { font-size: 32px; font-weight: 800; margin-top: 8px; letter-spacing: -.5px; }
.kpi .val small { font-size: 15px; font-weight: 700; color: var(--muted); }
.kpi .trend { font-size: 13px; font-weight: 700; margin-top: 6px; }
.kpi .trend.up { color: var(--success); }
.kpi .trend.down { color: var(--danger); }
.chart-box { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px 18px 8px; box-shadow: var(--sh-sm); }
.chart-box h4 { font-size: 16px; margin-bottom: 4px; }
.chart-box .sub { font-size: 13px; color: var(--muted); margin-bottom: 12px; }
.chart-canvas-wrap { position: relative; height: 240px; }

/* 记录列表 */
.rec-item { display: flex; align-items: center; gap: 12px; padding: 13px 0; border-bottom: 1px dashed var(--line); }
.rec-item:last-child { border-bottom: 0; }
.rec-item .dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.rec-item .info { flex: 1; min-width: 0; }
.rec-item .info .t { font-weight: 700; font-size: 14.5px; }
.rec-item .info .s { font-size: 13px; color: var(--muted); margin-top: 2px; }
.rec-item .when { font-size: 12.5px; color: var(--muted-2); white-space: nowrap; }

/* ---------------- 用药评价 ---------------- */
.rating { display: inline-flex; gap: 2px; color: var(--gold); font-size: 15px; }
.rating .empty { color: var(--line); }
.review { padding: 16px 0; border-bottom: 1px dashed var(--line); }
.review:last-child { border-bottom: 0; }
.review .head { display: flex; align-items: center; gap: 10px; }
.review .head .u { font-weight: 700; font-size: 14px; }
.review .head .when { font-size: 12.5px; color: var(--muted-2); }
.review .stars { margin: 8px 0 6px; }
.review .c { color: var(--ink-2); font-size: 14.5px; }
.review .tags { margin-top: 9px; display: flex; gap: 7px; flex-wrap: wrap; }

/* ---------------- 弹窗 ---------------- */
.modal-mask {
  position: fixed; inset: 0; z-index: 100; background: rgba(16, 24, 40, .5);
  display: grid; place-items: center; padding: 20px; animation: fade .2s ease;
}
.modal {
  width: min(440px, 94vw); background: var(--white); border-radius: var(--r-xl);
  box-shadow: var(--sh-lg); padding: 30px; animation: pop .22s ease; max-height: 90vh; overflow: auto;
}
.modal h3 { font-size: 23px; }
.modal .lead { color: var(--muted); margin-top: 8px; font-size: 14.5px; }
.modal .close { position: absolute; }
.modal-foot { margin-top: 6px; display: flex; gap: 10px; }
.modal-switch { margin-top: 16px; text-align: center; font-size: 14px; color: var(--muted); }
.modal-switch a { color: var(--brand-dark); font-weight: 700; }

@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(12px) scale(.98); } }

/* ---------------- 页脚 ---------------- */
.footer { background: #0E1B2A; color: #C9D4E0; margin-top: 60px; }
.footer-inner { padding: 46px 0 30px; display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 28px; }
.footer .brand { color: #fff; }
.footer .brand .logo { background: linear-gradient(135deg, var(--brand), var(--blue)); }
.footer .brand b { color: var(--brand); }
.footer p { color: #9FB0C2; font-size: 14px; margin-top: 14px; max-width: 30em; }
.footer h5 { color: #fff; font-size: 15px; margin: 4px 0 14px; }
.footer a { display: block; color: #C9D4E0; font-size: 14px; padding: 5px 0; }
.footer a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.08); padding: 18px 0; text-align: center; color: #7E8FA3; font-size: 13px; }
.footer-disclaimer { background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.07); border-radius: 12px; padding: 12px 14px; font-size: 12.5px; color: #8FA0B3; margin-top: 18px; }

/* ---------------- Toast ---------------- */
.toast {
  position: fixed; left: 50%; bottom: 30px; transform: translateX(-50%) translateY(20px);
  background: var(--ink); color: #fff; padding: 12px 20px; border-radius: 12px;
  font-size: 14.5px; font-weight: 600; box-shadow: var(--sh-lg); z-index: 200; opacity: 0;
  transition: .25s; pointer-events: none;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.ok { background: var(--brand-dark); }
.toast.warn { background: var(--warn); }

/* ---------------- 工具类 ---------------- */
.muted { color: var(--muted); }
.center { text-align: center; }
.right { text-align: right; }
.mt-8 { margin-top: 8px; } .mt-12 { margin-top: 12px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; }
.mb-8 { margin-bottom: 8px; } .mb-16 { margin-bottom: 16px; } .mb-24 { margin-bottom: 24px; }
.flex { display: flex; } .between { justify-content: space-between; } .items-center { align-items: center; } .gap-8 { gap: 8px; } .gap-12 { gap: 12px; }
.wrap { flex-wrap: wrap; }
.divider { height: 1px; background: var(--line); margin: 18px 0; }
.empty-state { text-align: center; padding: 50px 20px; color: var(--muted); }
.empty-state .big { font-size: 44px; margin-bottom: 10px; }
.hide { display: none !important; }

/* 引导步骤 */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 8px; }
.step { padding: 22px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--white); box-shadow: var(--sh-sm); }
.step .num { width: 34px; height: 34px; border-radius: 10px; background: var(--brand-soft); color: var(--brand-dark); font-weight: 800; display: grid; place-items: center; margin-bottom: 12px; }
.step h4 { font-size: 16.5px; }
.step p { margin-top: 7px; color: var(--muted); font-size: 14px; }

/* 详情页布局 */
.detail-grid { display: grid; grid-template-columns: 1fr 320px; gap: 22px; align-items: start; }
.side-card { position: sticky; top: 84px; }

/* ---------------- 底部导航（移动端） ---------------- */
.bottomnav { display: none; }
@media (max-width: 900px) {
  body { padding-bottom: 66px; }
  .bottomnav {
    display: flex;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    background: rgba(255, 255, 255, .96);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
    backdrop-filter: saturate(180%) blur(12px);
    border-top: 1px solid var(--line);
    box-shadow: 0 -4px 16px rgba(15, 40, 60, .08);
    padding-bottom: env(safe-area-inset-bottom, 0);
  }
  .bn-item {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
    padding: 8px 0 7px; color: var(--muted); font-size: 11px; text-decoration: none;
    -webkit-tap-highlight-color: transparent; transition: color .15s;
  }
  .bn-item .bn-icon { font-size: 21px; line-height: 1; transition: transform .15s; }
  .bn-item.active { color: var(--brand-dark); font-weight: 700; }
  .bn-item.active .bn-icon { transform: translateY(-1px); }
}

/* ---------------- SEO 入口链接 ---------------- */
.seo-link {
  display: inline-block;
  margin-top: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--brand);
}
.seo-link:hover { text-decoration: underline; }

/* ---------------- 通知 / 铃铛 ---------------- */
.btn-icon {
  position: relative;
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1px solid #e5e7eb;
  background: #fff;
  font-size: 17px; line-height: 1;
  display: grid; place-items: center;
  cursor: pointer; padding: 0;
  transition: border-color .15s, background .15s;
}
.btn-icon:hover { border-color: #0FB5A6; background: #f6fffe; }
.notif-badge {
  position: absolute; top: -5px; right: -5px;
  min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 9px;
  background: #FF4D4F; color: #fff;
  font-size: 11px; font-weight: 700; line-height: 18px; text-align: center;
  box-shadow: 0 0 0 2px #fff;
}
.notif-mask {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(15,23,42,.45);
  display: none; align-items: flex-start; justify-content: flex-end;
}
.notif-drawer {
  width: 380px; max-width: 92vw;
  height: 100%; max-height: 100vh;
  background: #fff;
  display: flex; flex-direction: column;
  box-shadow: -8px 0 30px rgba(0,0,0,.12);
  animation: notif-in .22s ease;
}
@keyframes notif-in { from { transform: translateX(20px); opacity: .6; } to { transform: none; opacity: 1; } }
.notif-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 18px; border-bottom: 1px solid #eee;
  font-weight: 700; font-size: 16px;
}
.notif-head div { display: flex; align-items: center; gap: 14px; font-weight: 400; font-size: 13px; }
.notif-head a { color: #0FB5A6; cursor: pointer; text-decoration: none; }
.notif-close { font-size: 18px; color: #9aa3ad; }
.notif-list { overflow-y: auto; flex: 1; padding: 6px 0; }
.notif-item {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 14px 18px; cursor: pointer;
  border-bottom: 1px solid #f3f4f6;
  position: relative;
  transition: background .12s;
}
.notif-item:hover { background: #f8fafc; }
.notif-item.unread { background: #f0fffd; }
.notif-item.unread:hover { background: #e6fbf8; }
.notif-body { flex: 1; min-width: 0; }
.notif-text { font-size: 14px; line-height: 1.5; color: #1f2937; }
.notif-time { font-size: 12px; color: #9aa3ad; margin-top: 4px; }
.notif-item .dot {
  width: 8px; height: 8px; border-radius: 50%; background: #0FB5A6;
  margin-top: 7px; flex: 0 0 auto;
}
.notif-empty { padding: 50px 24px; text-align: center; color: #9aa3ad; font-size: 14px; }
@media (max-width: 560px) {
  .notif-drawer { width: 100%; max-width: 100%; height: 82vh; border-radius: 16px 16px 0 0; align-self: flex-end; }
  .notif-mask { align-items: flex-end; justify-content: center; }
}

/* ---------------- 响应式 ---------------- */
@media (max-width: 900px) {
  .hero h1 { font-size: 34px; }
  .intents, .stats { grid-template-columns: 1fr 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .comm-grid, .track-grid, .track-grid-3, .detail-grid, .footer-inner, .steps { grid-template-columns: 1fr; }
  .nav { display: none; }
  .side-card { position: static; }
  .form-row { grid-template-columns: 1fr; }
  .hero-cta { flex-direction: column; align-items: stretch; }
  .hero-cta .btn { width: 100%; }
}
@media (max-width: 560px) {
  .hero h1 { font-size: 28px; }
  .intents, .stats { grid-template-columns: 1fr; }
  .section { padding: 40px 0; }
  .sec-head h2 { font-size: 23px; }
}

/* ---------------- 帖子配图画廊（多图） ---------------- */
.post-imgs.grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px;
}
.post-imgs.grid img {
  width: 100%; height: 160px; object-fit: cover; border-radius: 10px; display: block;
  background: var(--line-2);
}
.post-imgs.one img { width: auto; max-width: 100%; }

/* ---------------- 嵌套评论（楼中楼） ---------------- */
.comment { margin-top: 14px; }
.comment.is-reply { margin-top: 10px; }
.comment-children {
  margin-left: 18px; padding-left: 14px; border-left: 2px solid var(--line);
}
.c-head { font-size: 14px; }
.c-head .time { font-size: 12.5px; color: var(--muted-2); font-weight: 400; margin-left: 4px; }
.c-body { font-size: 14.5px; color: var(--ink-2); margin-top: 3px; white-space: pre-wrap; word-break: break-word; }
.c-body .at { color: var(--blue); font-weight: 700; }
.reply-link {
  background: none; border: none; color: var(--blue); font-size: 12.5px;
  font-weight: 700; cursor: pointer; padding: 3px 0 0; margin-top: 3px;
}
.reply-link:hover { text-decoration: underline; }
.reply-bar {
  background: var(--blue-soft); border-radius: 10px; padding: 9px 13px;
  font-size: 13.5px; color: var(--ink-2); margin-bottom: 10px;
}
.reply-bar b { color: var(--blue); }
.reply-bar a { color: var(--blue); cursor: pointer; font-weight: 700; margin-left: 4px; }
.reply-bar a:hover { text-decoration: underline; }

/* ---------------- 评论点赞 & 折叠 ---------------- */
.c-actions { display: flex; align-items: center; gap: 16px; margin-top: 5px; }
.like-link {
  background: none; border: none; cursor: pointer; padding: 3px 0 0;
  font-size: 12.5px; font-weight: 700; color: var(--muted-2);
  display: inline-flex; align-items: center; gap: 4px; transition: color .15s;
}
.like-link:hover { color: var(--brand); }
.like-link.liked { color: var(--brand); }
.like-link.liked .like-count { font-weight: 800; }
.expand-link {
  background: none; border: none; cursor: pointer; padding: 6px 0 2px;
  font-size: 12.5px; font-weight: 700; color: var(--blue); display: block;
}
.expand-link:hover { text-decoration: underline; }
.more-replies { margin-top: 0; }

/* ---------------- 搜索 ---------------- */
.search-box { display: flex; align-items: center; background: #fff; border: 1.5px solid var(--line, #e5e7eb); border-radius: 999px; padding: 2px 4px 2px 12px; transition: border-color .15s, box-shadow .15s; }
.search-box:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft, rgba(15,181,166,.15)); }
.search-input { border: none; outline: none; background: transparent; font-size: 14px; color: var(--ink, #1f2937); width: 168px; padding: 7px 0; }
.search-input::placeholder { color: var(--muted-2, #9ca3af); }
.search-btn { padding: 6px 9px; font-size: 15px; background: transparent; }
.search-btn:hover { background: var(--brand-soft, rgba(15,181,166,.12)); border-radius: 50%; }
.search-page-box { display: flex; gap: 10px; margin: 6px 0 4px; }
.search-page-box .search-input.big { flex: 1; width: auto; border: 1.5px solid var(--line, #e5e7eb); border-radius: 12px; padding: 12px 16px; font-size: 16px; background: #fff; }
.search-page-box .search-input.big:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft, rgba(15,181,166,.15)); }
.search-summary { margin: 16px 0 4px; font-size: 15px; color: var(--ink-2); }
.search-summary b { color: var(--brand); }
.search-group { margin-top: 22px; }
.search-group-title { font-size: 17px; margin-bottom: 12px; }
.search-group-title .muted { font-weight: 400; font-size: 14px; }
.user-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.user-card { display: flex; align-items: center; gap: 12px; background: #fff; border: 1px solid var(--line, #e5e7eb); border-radius: 14px; padding: 12px 14px; cursor: pointer; transition: transform .12s, box-shadow .12s, border-color .12s; }
.user-card:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(17,24,39,.08); border-color: var(--brand); }
.user-card .u-meta { min-width: 0; }
.user-card .u-name { font-weight: 700; font-size: 15px; color: var(--ink); }
.user-card .u-sub { font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 180px; }

@media (max-width: 768px) {
  .search-box { order: 5; width: 100%; margin-top: 8px; }
  .search-input { width: 100%; }
}

/* ── 用药评价合规化：免责横幅 / 体验标签 / 提示条 / 内容规范提示 ── */
.disclaimer-banner {
  background: #FFF8E6;
  border: 1px solid #F5D76E;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 13px;
  line-height: 1.6;
  color: #9A7B0A;
  margin-bottom: 12px;
}
.disclaimer-banner b { color: #B8860B; }

/* ── 治疗经历分享：自由叙述卡片（非结构化药品信息） ── */
.review.exp { background: #FBFDFE; border: 1px solid #E6EEF3; border-radius: 12px; padding: 12px 14px; margin-bottom: 10px; }
.exp-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.exp-avatar { width: 26px; height: 26px; border-radius: 50%; background: var(--brand, #0FB5A6); color: #fff; display: grid; place-items: center; font-size: 13px; font-weight: 700; }
.exp-head b { font-size: 14px; color: var(--ink, #1f2937); }
.exp-tag { font-size: 11px; background: #FFEDE7; color: #E8590C; padding: 2px 8px; border-radius: 10px; margin-left: auto; }

/* 内容类型标识：讨论(青绿) vs 经历(珊瑚)，用于区分两种发布入口 */
.type-pill { display:inline-flex; align-items:center; gap:4px; font-size:12px; font-weight:700; padding:3px 11px; border-radius:20px; line-height:1.6; white-space:nowrap; }
.type-pill.discuss { background: var(--brand-soft); color: var(--brand-dark); }
.type-pill.exp { background: #FFEDE7; color: #E8590C; }
.type-pill.sm { font-size:11px; padding:2px 8px; }
.sec-title-wrap { margin-bottom:8px; }
.sec-title-wrap h3, .sec-title-wrap h4 { margin:6px 0 2px; }
.exp-btn { background:#FFEDE7; color:#E8590C; }
.exp-btn:hover { background:#FFDCCF; }
.exp-text { font-size: 13.5px; line-height: 1.7; color: #374151; }

/* ── 注册单独授权勾选框（敏感个人信息） ── */
.consent-box { display: flex; gap: 8px; align-items: flex-start; font-size: 12.5px; line-height: 1.55; color: #4B5563; background: #F0FDF4; border: 1px solid #BBF7D0; border-radius: 8px; padding: 10px 12px; margin-top: 4px; cursor: pointer; }
.consent-box input[type=checkbox] { margin-top: 2px; flex-shrink: 0; width: 16px; height: 16px; }
.consent-box a { color: #1E40AF; text-decoration: underline; }
.consent-box strong { color: #166534; }

/* ── 举报链接 / 帖子底部 ── */
.post-foot { margin-top: 8px; display: flex; justify-content: flex-end; gap: 10px; align-items: center; }
.report-link { background: none; border: none; color: #9CA3AF; font-size: 12px; cursor: pointer; padding: 2px 4px; }
.report-link:hover { color: #EF5350; text-decoration: underline; }
.c-actions .report-link { margin-left: 4px; }

/* ── 收藏 / 分享 按钮 ── */
.fav-btn, .share-link {
  background: none; border: 1px solid #E5E7EB; border-radius: 999px;
  color: #6B7280; font-size: 12px; cursor: pointer; padding: 3px 12px; line-height: 1.6;
  transition: all .15s ease;
}
.fav-btn:hover, .share-link:hover { border-color: var(--brand); color: var(--brand); }
.fav-btn.on { background: #FFF7E6; border-color: #F5A623; color: #B7791F; font-weight: 600; }
.post-actions { display: flex; gap: 10px; }

/* ── 系统公告横幅（顶栏下方） ── */
.ann-banner {
  display: flex; align-items: center; gap: 12px; padding: 10px 16px;
  font-size: 13.5px; line-height: 1.5; border-bottom: 1px solid rgba(0,0,0,.06);
}
.ann-banner.lvl-info { background: #E8F6FF; color: #1E40AF; }
.ann-banner.lvl-important { background: #FFF4E5; color: #92400E; }
.ann-banner.lvl-warn { background: #FDECEC; color: #991B1B; }
.ann-icon { font-size: 18px; flex-shrink: 0; }
.ann-body { flex: 1; min-width: 0; }
.ann-body b { margin-right: 8px; }
.ann-body span { color: inherit; opacity: .9; }
.ann-close {
  background: none; border: none; cursor: pointer; font-size: 16px;
  color: inherit; opacity: .6; flex-shrink: 0; padding: 2px 6px;
}
.ann-close:hover { opacity: 1; }

/* ── 内联发帖器（讨论区 / 圈内讨论顶部） ── */
.composer {
  background: #fff; border: 1px solid #E5E7EB; border-radius: 14px;
  padding: 14px; margin-bottom: 16px; box-shadow: var(--sh-sm);
}
.composer-discuss { border-left: 3px solid var(--brand); }
.composer-row { display: flex; flex-direction: column; gap: 10px; margin-bottom: 10px; }
.composer-row-2 { flex-direction: row; flex-wrap: wrap; }
.composer-row-2 .select { flex: 0 0 140px; }
.composer-row-2 .input { flex: 1; min-width: 180px; }
.composer .textarea { min-height: 76px; resize: vertical; }
.composer-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 10px; }
.composer-hint { font-size: 12px; color: #9CA3AF; }
.composer-login { font-size: 14px; color: var(--ink-2); text-align: center; padding: 4px 0; }
.composer-login a { color: var(--brand); font-weight: 600; cursor: pointer; }

/* ── 微信内分享引导条 ── */
.wx-share-tip {
  display: flex; align-items: center; gap: 10px; padding: 9px 14px;
  font-size: 13px; line-height: 1.5; background: #FFF9E6; color: #92400E;
  border-bottom: 1px solid rgba(0,0,0,.06);
}
.wx-share-tip span { flex: 1; min-width: 0; }
.wx-share-tip button {
  background: none; border: none; cursor: pointer; font-size: 18px;
  color: inherit; opacity: .6; flex-shrink: 0; padding: 0 4px; line-height: 1;
}
.wx-share-tip button:hover { opacity: 1; }

/* ── 公告页 ── */
.ann-list { display: flex; flex-direction: column; gap: 14px; margin-top: 18px; }
.ann-card { background: #fff; border: 1px solid #E5E7EB; border-radius: 14px; padding: 16px 18px; }
.ann-card.lvl-important { border-left: 4px solid #F5A623; }
.ann-card.lvl-warn { border-left: 4px solid #EF5350; }
.ann-card.lvl-info { border-left: 4px solid #2D7FF9; }
.ann-card-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ann-card-head b { font-size: 16px; }
.ann-card-body { margin-top: 10px; color: var(--ink-2); line-height: 1.8; font-size: 14.5px; }

.sent-good { background: #DEF7EC !important; color: #03543F !important; }
.sent-ok   { background: #FEF3C7 !important; color: #92400E !important; }
.sent-hard { background: #FEE2E2 !important; color: #991B1B !important; }

.tips-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.tip-chip {
  display: inline-block;
  font-size: 12px;
  background: #F0FDF4;
  border: 1px solid #BBF7D0;
  color: #166534;
  padding: 3px 9px;
  border-radius: 20px;
}

.content-guideline {
  background: #EFF6FF;
  border: 1px solid #BFDBFE;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 12.5px;
  line-height: 1.55;
  color: #1E40AF;
  margin-bottom: 12px;
}
.content-guideline b { color: #1E3A8A; }

/* ── 法律文本页面（隐私政策 / 用户协议） ── */
.legal-body h3 { font-size: 18px; margin: 24px 0 10px; color: var(--ink); }
.legal-body p, .legal-body li { font-size: 14.5px; line-height: 1.75; color: #374151; }
.legal-body ul, .legal-body ol { padding-left: 20px; margin: 8px 0; }
.legal-body li { margin-bottom: 5px; }
