/* =========================================================
   医保便民服务体系 · 样式表
   政务/民生风格：蓝色为主调，卡片化、信息层级清晰
   ========================================================= */

:root {
  --bg: #f3f6fb;
  --bg-alt: #eaf0f8;
  --surface: #ffffff;
  --surface-2: #f7f9fd;
  --surface-soft: #eef3fa;
  --text: #16233a;
  --text-2: #46566f;
  --text-3: #7d8aa0;
  --border: #dfe6f0;
  --border-strong: #c9d4e3;

  --primary: #1f6fdd;
  --primary-dark: #1554b0;
  --primary-soft: #e6f0ff;
  --primary-ink: #1554b0;
  --teal: #1f8a70;
  --teal-soft: #e3f4ee;
  --amber: #c47d1a;
  --amber-soft: #fdf1dd;
  --red: #c0392b;
  --red-soft: #fdeceb;
  --purple: #7a4fa3;
  --purple-soft: #f1eaf9;

  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 2px rgba(22, 35, 58, .05), 0 2px 8px rgba(22, 35, 58, .05);
  --shadow: 0 4px 12px rgba(22, 35, 58, .07), 0 12px 30px rgba(22, 35, 58, .06);
  --shadow-lg: 0 12px 30px rgba(22, 35, 58, .14), 0 30px 60px rgba(22, 35, 58, .1);

  --header-h: 66px;
  --font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC",
          "Noto Sans CJK SC", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-num: "DIN Alternate", "Bahnschrift", "Segoe UI", var(--font);
  --ease: cubic-bezier(.22, .61, .36, 1);
}

html[data-theme="dark"] {
  --bg: #0e141d;
  --bg-alt: #0b1017;
  --surface: #171f2b;
  --surface-2: #1c2533;
  --surface-soft: #212c3c;
  --text: #e7edf6;
  --text-2: #aebbd0;
  --text-3: #7d8a9f;
  --border: #26313f;
  --border-strong: #344256;

  --primary: #5b9cf5;
  --primary-dark: #3f7ede;
  --primary-soft: #16283f;
  --primary-ink: #8cbaf8;
  --teal: #52bf9f;
  --teal-soft: #12302a;
  --amber: #e0ab5a;
  --amber-soft: #33270f;
  --red: #ef7b6f;
  --red-soft: #38201d;
  --purple: #b18ce0;
  --purple-soft: #2a2138;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow: 0 4px 14px rgba(0, 0, 0, .4), 0 14px 34px rgba(0, 0, 0, .3);
  --shadow-lg: 0 14px 32px rgba(0, 0, 0, .55), 0 30px 70px rgba(0, 0, 0, .45);
}

/* ---------- 基础 ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 20px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); font-size: 15px; line-height: 1.65;
  color: var(--text); background: var(--bg);
  -webkit-font-smoothing: antialiased;
  transition: background-color .4s var(--ease), color .4s var(--ease);
}
svg { display: block; }
button { font: inherit; color: inherit; cursor: pointer; border: none; background: none; }
input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4, p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--primary); color: #fff; }
[hidden] { display: none !important; }

.container { width: min(1240px, 100% - 48px); margin-inline: auto; }
* { scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 99px; border: 3px solid var(--bg); }

/* ---------- 政务提示条 ---------- */
.gov-banner {
  background: linear-gradient(90deg, var(--primary-dark), var(--primary));
  color: #fff; font-size: 12.5px;
}
.gov-banner-inner { display: flex; align-items: center; gap: 12px; padding: 7px 0; flex-wrap: wrap; }
.gov-badge {
  flex-shrink: 0; padding: 1px 9px; border-radius: 4px;
  background: rgba(255, 255, 255, .2); border: 1px solid rgba(255, 255, 255, .35);
  font-weight: 700; letter-spacing: .5px;
}
.gov-banner-text { opacity: .92; }

/* ---------- 顶部导航 ---------- */
.site-header {
  position: sticky; top: 0; z-index: 90;
  height: var(--header-h);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, box-shadow .3s, background-color .4s;
}
.site-header.scrolled { border-bottom-color: var(--border); box-shadow: 0 8px 24px -20px rgba(22, 35, 58, .6); }
.header-inner { display: flex; align-items: center; gap: 20px; height: 100%; }

.brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.brand-logo { color: var(--primary); width: 36px; height: 36px; flex-shrink: 0; }
.brand-logo svg { width: 100%; height: 100%; }
.brand-logo.small { width: 30px; height: 30px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-text strong { font-size: 16.5px; letter-spacing: .5px; }
.brand-text small { font-size: 10.5px; color: var(--text-3); letter-spacing: .2px; }

.main-nav { display: flex; gap: 2px; margin-left: 6px; }
.nav-link {
  padding: 7px 12px; border-radius: 8px; font-size: 14px; color: var(--text-2);
  transition: color .2s, background-color .2s; white-space: nowrap;
}
.nav-link:hover { color: var(--text); background: var(--surface-soft); }
.nav-link.active { color: var(--primary); background: var(--primary-soft); font-weight: 600; }

.header-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.search-box {
  position: relative; display: flex; align-items: center;
  width: 230px; height: 38px; padding: 0 12px 0 36px;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px;
  transition: width .3s var(--ease), border-color .2s, box-shadow .2s;
}
.search-box:focus-within { width: 290px; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); background: var(--surface); }
.search-box svg { position: absolute; left: 12px; width: 16px; height: 16px; fill: none; stroke: var(--text-3); stroke-width: 2; stroke-linecap: round; }
.search-box input { width: 100%; border: 0; background: none; outline: none; font-size: 13.5px; }
.search-box input::placeholder { color: var(--text-3); }
.search-box input::-webkit-search-cancel-button { display: none; }
.search-clear { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 16px; line-height: 1; color: var(--text-3); background: var(--surface-soft); }
.search-clear:hover { color: var(--primary); }
.theme-toggle {
  width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; font-size: 16px;
  background: var(--surface-2); border: 1px solid var(--border);
  transition: transform .3s var(--ease), border-color .2s;
}
.theme-toggle:hover { transform: rotate(-15deg); border-color: var(--border-strong); }

/* 搜索下拉结果 */
.search-results {
  position: absolute; left: 0; right: 0; top: 100%;
  background: var(--surface); border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  max-height: 60vh; overflow-y: auto;
  padding: 10px max(24px, calc((100% - 1240px) / 2));
}
.search-group-title { font-size: 12px; color: var(--text-3); letter-spacing: 1px; margin: 10px 0 6px; }
.search-hit {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  padding: 9px 12px; border-radius: 9px; font-size: 13.5px;
}
.search-hit:hover { background: var(--surface-soft); }
.search-hit .hit-icon { flex-shrink: 0; width: 26px; height: 26px; border-radius: 7px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); font-size: 13px; }
.search-hit .hit-sub { margin-left: auto; color: var(--text-3); font-size: 12px; }
.search-hit mark { background: color-mix(in srgb, var(--amber) 35%, transparent); color: inherit; border-radius: 3px; padding: 0 1px; }
.search-none { padding: 18px; text-align: center; color: var(--text-3); font-size: 13.5px; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 10px 20px; border-radius: 9px; font-size: 14px; font-weight: 600;
  transition: transform .18s var(--ease), box-shadow .22s, background-color .22s, color .22s, border-color .22s;
  white-space: nowrap;
}
.btn-sm { padding: 7px 14px; font-size: 13px; border-radius: 8px; }
.btn-primary { color: #fff; background: linear-gradient(135deg, var(--primary), var(--primary-dark)); box-shadow: 0 6px 16px -8px rgba(31, 111, 221, .9); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 12px 22px -10px rgba(31, 111, 221, .95); }
.btn-ghost { color: var(--text); background: var(--surface); border: 1px solid var(--border-strong); }
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.full-width { width: 100%; }
.icon-btn {
  width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center;
  font-size: 20px; line-height: 1; color: var(--text-2); background: var(--surface-soft); border: 1px solid var(--border);
}
.icon-btn:hover { color: var(--primary); border-color: var(--primary); }

/* ---------- 首屏 ---------- */
.hero { position: relative; overflow: hidden; padding: clamp(40px, 6vw, 72px) 0 0; }
.hero-bg { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.hero-grid {
  position: absolute; inset: 0;
  background-image: linear-gradient(var(--border) 1px, transparent 1px), linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 20%, transparent 75%);
  opacity: .55;
}
.hero-blob { position: absolute; border-radius: 50%; filter: blur(70px); }
.blob-1 { width: 480px; height: 480px; top: -220px; left: -120px; background: color-mix(in srgb, var(--primary) 26%, transparent); }
.blob-2 { width: 420px; height: 420px; top: -180px; right: -100px; background: color-mix(in srgb, var(--teal) 22%, transparent); }

.hero-inner { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 48px; align-items: start; }
.hero-copy { padding-top: 10px; }
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12.5px; font-weight: 600; letter-spacing: 1px; color: var(--primary);
  padding: 5px 13px; border-radius: 999px; background: var(--primary-soft);
  border: 1px solid color-mix(in srgb, var(--primary) 22%, transparent);
}
.pulse-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 0 rgba(31, 138, 112, .6); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 8px rgba(31, 138, 112, 0); } 100% { box-shadow: 0 0 0 0 rgba(31, 138, 112, 0); } }
.hero h1 {
  margin-top: 18px; font-size: clamp(32px, 4.6vw, 52px); line-height: 1.22; letter-spacing: .01em; font-weight: 800;
}
.hero h1 .grad { background: linear-gradient(100deg, var(--primary), var(--teal)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-sub { margin-top: 18px; font-size: 15px; line-height: 1.9; color: var(--text-2); max-width: 560px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.hero-quick { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.quick-chip {
  padding: 7px 14px; border-radius: 999px; font-size: 13px; color: var(--text-2);
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-sm);
  transition: all .2s var(--ease);
}
.quick-chip:hover { color: var(--primary); border-color: color-mix(in srgb, var(--primary) 45%, var(--border)); transform: translateY(-1px); }

.hero-panel {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow); overflow: hidden;
}
.panel-tabs { display: flex; border-bottom: 1px solid var(--border); background: var(--surface-2); }
.panel-tab { flex: 1; padding: 13px; font-size: 14px; font-weight: 600; color: var(--text-3); border-bottom: 2px solid transparent; }
.panel-tab.active { color: var(--primary); border-bottom-color: var(--primary); background: var(--surface); }
.panel-body { padding: 8px; }
.panel-item {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  padding: 12px 12px; border-radius: 10px; transition: background-color .2s;
}
.panel-item:hover { background: var(--surface-soft); }
.panel-item-icon {
  width: 36px; height: 36px; flex-shrink: 0; border-radius: 10px; display: grid; place-items: center;
  font-size: 17px; background: var(--primary-soft);
}
.panel-item-main { min-width: 0; flex: 1; }
.panel-item-title { font-size: 13.8px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.panel-item-meta { font-size: 11.5px; color: var(--text-3); margin-top: 1px; display: flex; gap: 8px; align-items: center; }
.panel-item-go { color: var(--text-3); font-size: 15px; flex-shrink: 0; }
.panel-notice { padding: 10px 12px; border-radius: 10px; }
.panel-notice:hover { background: var(--surface-soft); }
.panel-notice-date { font-size: 11.5px; color: var(--primary); font-weight: 600; }
.panel-notice-title { font-size: 13.5px; margin-top: 2px; line-height: 1.55; }
.panel-foot { display: flex; align-items: center; justify-content: space-between; padding: 11px 16px; border-top: 1px solid var(--border); background: var(--surface-2); }
.panel-foot-meta { font-size: 11.5px; color: var(--text-3); }
.panel-foot-link { font-size: 12.5px; color: var(--primary); font-weight: 600; }

.stat-strip {
  display: flex; align-items: stretch; gap: 0; margin-top: clamp(28px, 4vw, 46px);
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); overflow: hidden;
}
.stat-item { flex: 1; padding: 18px 16px; text-align: center; }
.stat-item b { display: block; font-family: var(--font-num); font-size: clamp(24px, 2.8vw, 30px); color: var(--primary); line-height: 1.15; font-variant-numeric: tabular-nums; }
.stat-item span { font-size: 12.5px; color: var(--text-3); }
.stat-sep { width: 1px; background: var(--border); margin: 16px 0; }

/* ---------- 通用区块 ---------- */
.section { padding: clamp(48px, 6vw, 76px) 0; }
.section-alt { background: var(--bg-alt); }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-bottom: 26px; }
.section-eyebrow { font-size: 12px; letter-spacing: 2.5px; font-weight: 700; color: var(--primary); margin-bottom: 7px; }
.section-title { font-size: clamp(23px, 2.9vw, 31px); line-height: 1.3; font-weight: 800; letter-spacing: .01em; }
.section-desc { margin-top: 9px; font-size: 14px; color: var(--text-2); max-width: 640px; }
.empty-hint { padding: 40px 16px; text-align: center; color: var(--text-3); font-size: 14px; border: 1px dashed var(--border-strong); border-radius: var(--radius); }
.legend { display: flex; gap: 16px; font-size: 12.5px; color: var(--text-3); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.dot.online { background: var(--teal); }
.dot.offline { background: var(--amber); }

/* ---------- 服务大厅 ---------- */
.category-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-bottom: 22px; }
.category-card {
  position: relative; text-align: left; padding: 16px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-sm);
  transition: transform .22s var(--ease), box-shadow .22s, border-color .22s;
  overflow: hidden;
}
.category-card::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--cat-color, var(--primary)); opacity: 0; transition: opacity .2s; }
.category-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--cat-color, var(--primary)) 40%, var(--border)); }
.category-card:hover::after, .category-card.active::after { opacity: 1; }
.category-card.active { border-color: var(--cat-color, var(--primary)); box-shadow: var(--shadow); background: color-mix(in srgb, var(--cat-color, var(--primary)) 6%, var(--surface)); }
.cat-icon { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; font-size: 18px; background: color-mix(in srgb, var(--cat-color, var(--primary)) 12%, var(--surface)); color: var(--cat-color, var(--primary)); }
.cat-name { margin-top: 10px; font-size: 15px; font-weight: 700; }
.cat-en { font-size: 11px; color: var(--text-3); letter-spacing: .4px; }
.cat-desc { margin-top: 6px; font-size: 12px; color: var(--text-2); line-height: 1.6; min-height: 38px; }
.cat-count { margin-top: 9px; font-size: 12px; color: var(--cat-color, var(--primary)); font-weight: 600; }

.service-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 14px; }
.service-card {
  display: flex; flex-direction: column; text-align: left; padding: 18px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); transition: transform .22s var(--ease), box-shadow .22s, border-color .22s;
  animation: fadeUp .35s var(--ease) backwards;
}
.service-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--primary) 32%, var(--border)); }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } }
.sc-top { display: flex; align-items: flex-start; gap: 10px; }
.sc-title { font-size: 15.5px; font-weight: 700; line-height: 1.5; flex: 1; }
.sc-badges { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 5px; font-size: 11.5px; font-weight: 600; }
.badge-online { color: var(--teal); background: var(--teal-soft); }
.badge-offline { color: var(--amber); background: var(--amber-soft); }
.badge-cat { color: var(--primary); background: var(--primary-soft); }
.sc-summary { margin-top: 9px; font-size: 13px; line-height: 1.75; color: var(--text-2); flex: 1; }
.sc-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 13px; padding-top: 11px; border-top: 1px dashed var(--border); font-size: 12px; color: var(--text-3); }
.sc-foot .go { color: var(--primary); font-weight: 600; }

/* ---------- 办事指南 ---------- */
.guide-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 16px; }
.guide-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 20px; }
.guide-head { display: flex; align-items: flex-start; gap: 12px; }
.guide-icon { width: 40px; height: 40px; flex-shrink: 0; border-radius: 11px; display: grid; place-items: center; font-size: 19px; background: var(--primary-soft); }
.guide-title { font-size: 15.5px; font-weight: 700; line-height: 1.5; }
.guide-meta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; font-size: 12px; color: var(--text-3); }
.guide-meta b { color: var(--text-2); font-weight: 600; }
.steps { margin-top: 16px; display: flex; flex-direction: column; gap: 0; }
.step { position: relative; padding: 0 0 14px 34px; }
.step:last-child { padding-bottom: 0; }
.step::before {
  content: ""; position: absolute; left: 11px; top: 24px; bottom: 0; width: 2px; background: var(--border);
}
.step:last-child::before { display: none; }
.step-dot {
  position: absolute; left: 0; top: 1px; width: 24px; height: 24px; border-radius: 50%;
  display: grid; place-items: center; font-size: 11.5px; font-weight: 700;
  background: var(--primary-soft); color: var(--primary); border: 1px solid color-mix(in srgb, var(--primary) 25%, transparent);
}
.step-name { font-size: 13.5px; font-weight: 600; }
.step-desc { font-size: 12.5px; color: var(--text-2); line-height: 1.7; }
.guide-materials { margin-top: 14px; padding: 12px; border-radius: 10px; background: var(--surface-2); border: 1px dashed var(--border-strong); }
.guide-materials h4 { font-size: 12.5px; margin-bottom: 6px; color: var(--text-2); }
.guide-materials ul { display: flex; flex-wrap: wrap; gap: 6px; }
.guide-materials li { font-size: 12px; padding: 3px 9px; border-radius: 6px; background: var(--surface); border: 1px solid var(--border); color: var(--text-2); }
.chip { padding: 6px 14px; border-radius: 999px; font-size: 13px; color: var(--text-2); background: var(--surface); border: 1px solid var(--border); transition: all .2s; }
.chip:hover { color: var(--primary); border-color: var(--primary); }
.chip.active { color: #fff; background: var(--primary); border-color: var(--primary); font-weight: 600; }
.handbook-filter { display: flex; gap: 8px; }

/* ---------- 工具区 ---------- */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 18px; padding: 6px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-sm); }
.tab { padding: 9px 16px; border-radius: 9px; font-size: 13.5px; font-weight: 600; color: var(--text-2); transition: all .2s; white-space: nowrap; }
.tab:hover { background: var(--surface-soft); color: var(--text); }
.tab.active { background: var(--primary); color: #fff; box-shadow: 0 6px 14px -8px rgba(31, 111, 221, .9); }
.tool-panel { animation: fadeUp .3s var(--ease); }
.tool-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.tool-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); padding: 22px; }
.result-card { background: var(--surface); }
.tool-title { font-size: 16px; font-weight: 700; margin-bottom: 16px; display: flex; align-items: center; gap: 8px; }
.tool-title::before { content: ""; width: 4px; height: 16px; border-radius: 2px; background: var(--primary); }
.tool-hint { font-size: 12.5px; color: var(--text-3); line-height: 1.7; margin-top: 4px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field.full { grid-column: 1 / -1; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field-label { font-size: 13px; font-weight: 600; color: var(--text-2); }
.input {
  width: 100%; padding: 10px 12px; border-radius: 9px; font-size: 14px;
  background: var(--surface-2); border: 1px solid var(--border-strong); outline: none;
  transition: border-color .2s, box-shadow .2s, background-color .2s;
}
.input:focus { border-color: var(--primary); background: var(--surface); box-shadow: 0 0 0 3px var(--primary-soft); }
textarea.input { resize: vertical; min-height: 76px; }
select.input { cursor: pointer; }
.field-error { font-size: 12px; color: var(--red); min-height: 0; }
.field-error:empty { display: none; }
.field.has-error .input { border-color: var(--red); box-shadow: 0 0 0 3px var(--red-soft); }

.seg { display: inline-flex; padding: 3px; gap: 3px; background: var(--surface-soft); border-radius: 10px; border: 1px solid var(--border); flex-wrap: wrap; }
.seg-btn { padding: 7px 14px; border-radius: 8px; font-size: 13px; color: var(--text-2); font-weight: 500; transition: all .2s; }
.seg-btn:hover { color: var(--text); }
.seg-btn.active { background: var(--surface); color: var(--primary); font-weight: 700; box-shadow: var(--shadow-sm); }

.switch { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; user-select: none; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch-track { position: relative; width: 40px; height: 23px; border-radius: 999px; background: var(--border-strong); transition: background-color .22s var(--ease); flex-shrink: 0; }
.switch-track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 17px; height: 17px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); transition: transform .22s var(--ease); }
.switch input:checked + .switch-track { background: var(--primary); }
.switch input:checked + .switch-track::after { transform: translateX(17px); }
.switch input:focus-visible + .switch-track { outline: 2px solid var(--primary); outline-offset: 3px; }
.switch-label { font-size: 13px; color: var(--text-2); }

/* 测算结果 */
.calc-result .result-hero { text-align: center; padding: 18px 12px 20px; border-radius: 14px; background: linear-gradient(150deg, var(--primary-soft), color-mix(in srgb, var(--teal) 12%, var(--surface))); }
.result-label { font-size: 12.5px; color: var(--text-3); }
.result-amount { display: block; font-family: var(--font-num); font-size: clamp(30px, 4vw, 40px); font-weight: 800; color: var(--primary); line-height: 1.2; font-variant-numeric: tabular-nums; }
.result-sub { font-size: 12.5px; color: var(--text-2); }
.result-bars { margin-top: 18px; display: flex; flex-direction: column; gap: 10px; }
.bar-row { display: flex; align-items: center; gap: 10px; font-size: 12.5px; }
.bar-name { width: 58px; flex-shrink: 0; color: var(--text-2); }
.bar-track { flex: 1; height: 9px; border-radius: 99px; background: var(--surface-soft); overflow: hidden; }
.bar-fill { display: block; height: 100%; width: 0; border-radius: 99px; transition: width .5s var(--ease); }
.bar-fill.personal { background: linear-gradient(90deg, var(--amber), #e0a85a); }
.bar-fill.fund { background: linear-gradient(90deg, var(--primary), var(--teal)); }
.bar-num { width: 70px; text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.calc-breakdown { margin-top: 18px; border-top: 1px dashed var(--border); padding-top: 12px; display: flex; flex-direction: column; gap: 7px; }
.calc-breakdown li { display: flex; justify-content: space-between; font-size: 12.8px; color: var(--text-2); }
.calc-breakdown li b { color: var(--text); font-variant-numeric: tabular-nums; }
.calc-breakdown li.total-row { border-top: 1px solid var(--border); padding-top: 8px; margin-top: 3px; font-weight: 700; color: var(--text); }
.calc-note { margin-top: 14px; font-size: 11.5px; color: var(--text-3); line-height: 1.7; }

/* 表单与回执 */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.form-row { display: flex; gap: 10px; }
.form-row .input { flex: 1; }
.form-actions { display: flex; gap: 10px; margin-top: 6px; }
.result-empty { text-align: center; padding: 28px 16px; color: var(--text-3); font-size: 13.5px; }
.result-empty-icon { font-size: 32px; margin-bottom: 8px; }
.receipt { animation: fadeUp .35s var(--ease); }
.receipt-head { display: flex; align-items: center; gap: 12px; padding-bottom: 14px; border-bottom: 1px dashed var(--border); }
.receipt-check { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-size: 19px; background: var(--teal-soft); color: var(--teal); flex-shrink: 0; }
.receipt-code { font-family: var(--font-num); font-size: 16px; font-weight: 700; letter-spacing: .5px; }
.receipt-title { font-size: 12.5px; color: var(--text-3); }
.receipt-rows { margin-top: 14px; display: flex; flex-direction: column; gap: 8px; }
.receipt-row { display: flex; justify-content: space-between; gap: 16px; font-size: 13px; }
.receipt-row span { color: var(--text-3); }
.receipt-row b { text-align: right; }
.receipt-note { margin-top: 14px; padding: 10px 12px; border-radius: 9px; font-size: 12.3px; line-height: 1.7; background: var(--amber-soft); color: var(--amber); }
.tool-tip-list { margin-top: 18px; padding-top: 14px; border-top: 1px dashed var(--border); }
.tool-tip-list h4 { font-size: 13px; margin-bottom: 8px; }
.tool-tip-list ul { display: flex; flex-direction: column; gap: 6px; }
.tool-tip-list li { position: relative; padding-left: 14px; font-size: 12.5px; color: var(--text-2); line-height: 1.7; }
.tool-tip-list li::before { content: "•"; position: absolute; left: 2px; color: var(--primary); }

/* 定点查询 */
.tool-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 16px; }
.search-inline { position: relative; flex: 1; min-width: 220px; }
.search-inline svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; fill: none; stroke: var(--text-3); stroke-width: 2; stroke-linecap: round; }
.search-inline .input { padding-left: 36px; }
.hospital-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.hospital-item { padding: 15px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); transition: border-color .2s, box-shadow .2s; }
.hospital-item:hover { border-color: color-mix(in srgb, var(--primary) 35%, var(--border)); box-shadow: var(--shadow-sm); }
.hi-head { display: flex; align-items: flex-start; gap: 10px; }
.hi-icon { width: 34px; height: 34px; flex-shrink: 0; border-radius: 9px; display: grid; place-items: center; font-size: 16px; background: var(--primary-soft); }
.hi-name { font-size: 14.5px; font-weight: 700; line-height: 1.45; }
.hi-meta { font-size: 12px; color: var(--text-3); margin-top: 2px; display: flex; flex-wrap: wrap; gap: 8px; }
.hi-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 9px; }
.hi-tag { font-size: 11px; padding: 2px 7px; border-radius: 5px; background: var(--surface); border: 1px solid var(--border); color: var(--text-2); }
.hi-tag.hot { color: var(--teal); border-color: color-mix(in srgb, var(--teal) 35%, var(--border)); background: var(--teal-soft); }
.hi-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; font-size: 12px; color: var(--text-3); }

/* 表格 */
.table-wrap { overflow-x: auto; border-radius: 10px; border: 1px solid var(--border); }
.data-table { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 640px; }
.data-table th, .data-table td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--border); }
.data-table th { font-size: 12px; color: var(--text-3); font-weight: 600; background: var(--surface-2); position: sticky; top: 0; }
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover { background: var(--surface-2); }
.data-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.lvl { display: inline-block; padding: 1px 8px; border-radius: 5px; font-size: 11.5px; font-weight: 700; }
.lvl-a { color: var(--teal); background: var(--teal-soft); }
.lvl-b { color: var(--amber); background: var(--amber-soft); }
.lvl-out { color: var(--red); background: var(--red-soft); }

/* 进度查询 */
.demo-codes { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 14px; }
.demo-code { font-family: var(--font-num); font-size: 12.5px; padding: 5px 11px; border-radius: 7px; background: var(--surface-2); border: 1px dashed var(--border-strong); color: var(--text-2); }
.demo-code:hover { border-color: var(--primary); color: var(--primary); border-style: solid; }
.progress-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 12px; border-bottom: 1px dashed var(--border); flex-wrap: wrap; }
.progress-title { font-size: 15px; font-weight: 700; }
.progress-code { font-family: var(--font-num); font-size: 12.5px; color: var(--text-3); }
.status-pill { font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.status-done { color: var(--teal); background: var(--teal-soft); }
.status-doing { color: var(--primary); background: var(--primary-soft); }
.status-warn { color: var(--amber); background: var(--amber-soft); }
.timeline { margin-top: 16px; }
.tl-item { position: relative; padding: 0 0 16px 30px; }
.tl-item::before { content: ""; position: absolute; left: 7px; top: 20px; bottom: 0; width: 2px; background: var(--border); }
.tl-item:last-child::before { display: none; }
.tl-dot { position: absolute; left: 0; top: 4px; width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--border-strong); background: var(--surface); }
.tl-item.done .tl-dot { border-color: var(--teal); background: var(--teal); }
.tl-item.doing .tl-dot { border-color: var(--primary); background: var(--surface); box-shadow: 0 0 0 4px var(--primary-soft); animation: pulse2 1.8s infinite; }
.tl-item.warn .tl-dot { border-color: var(--amber); background: var(--amber); }
@keyframes pulse2 { 50% { box-shadow: 0 0 0 8px transparent; } }
.tl-name { font-size: 13.5px; font-weight: 600; }
.tl-time { font-size: 12px; color: var(--text-3); }
.progress-notice { margin-top: 14px; padding: 10px 12px; border-radius: 9px; background: var(--amber-soft); color: var(--amber); font-size: 12.5px; }

/* ---------- 医保百科 ---------- */
.knowledge-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 14px; }
.k-card { padding: 18px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-sm); transition: transform .22s var(--ease), box-shadow .22s, border-color .22s; }
.k-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--primary) 30%, var(--border)); }
.k-head { display: flex; align-items: center; gap: 10px; }
.k-icon { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; font-size: 16px; background: var(--primary-soft); color: var(--primary); flex-shrink: 0; }
.k-term { font-size: 15.5px; font-weight: 700; }
.k-alias { font-size: 11.5px; color: var(--text-3); }
.k-summary { margin-top: 10px; font-size: 13px; line-height: 1.72; color: var(--text-2); }
.k-detail { margin-top: 8px; font-size: 12.5px; line-height: 1.75; color: var(--text-3); }
.k-example { margin-top: 10px; padding: 8px 10px; border-radius: 8px; font-size: 12px; line-height: 1.7; background: var(--surface-2); border-left: 3px solid var(--primary); color: var(--text-2); }
.k-more { margin-top: 10px; font-size: 12.5px; color: var(--primary); font-weight: 600; }

/* ---------- 政策解读 ---------- */
.policy-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 14px; }
.policy-card { padding: 20px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-sm); display: flex; flex-direction: column; transition: box-shadow .22s, transform .22s; }
.policy-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.policy-top { display: flex; align-items: center; gap: 10px; font-size: 11.5px; color: var(--text-3); }
.policy-tag { color: var(--primary); background: var(--primary-soft); padding: 2px 8px; border-radius: 5px; font-weight: 700; }
.policy-title { margin-top: 10px; font-size: 16px; font-weight: 800; line-height: 1.5; }
.policy-summary { margin-top: 8px; font-size: 13px; line-height: 1.75; color: var(--text-2); }
.policy-points { margin-top: 12px; display: flex; flex-direction: column; gap: 7px; flex: 1; }
.policy-points li { position: relative; padding-left: 16px; font-size: 12.5px; line-height: 1.7; color: var(--text-2); }
.policy-points li::before { content: "✓"; position: absolute; left: 0; color: var(--teal); font-weight: 700; font-size: 11px; }
.policy-foot { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--border); display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: var(--text-3); }
.policy-open { color: var(--primary); font-weight: 600; }

/* ---------- FAQ ---------- */
.faq-inner { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.6fr); gap: 40px; align-items: start; }
.faq-cats { display: flex; flex-wrap: wrap; gap: 8px; grid-column: 1 / -1; order: 2; }
.faq-head { order: 1; }
.faq-list { order: 3; grid-column: 2; display: flex; flex-direction: column; gap: 10px; }
.faq-cats { grid-column: 1 / -1; }
.faq-inner > .faq-cats { order: 2; grid-column: 1; }
.faq-item { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; box-shadow: var(--shadow-sm); }
.faq-q { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 14px 16px; font-size: 14px; font-weight: 600; }
.faq-q .q-icon { flex-shrink: 0; width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; font-size: 12px; font-weight: 800; background: var(--primary-soft); color: var(--primary); }
.faq-q .q-arrow { margin-left: auto; color: var(--text-3); transition: transform .25s var(--ease); flex-shrink: 0; }
.faq-item.open .q-arrow { transform: rotate(180deg); }
.faq-a { padding: 0 16px 15px 50px; font-size: 13.2px; line-height: 1.85; color: var(--text-2); display: none; }
.faq-item.open .faq-a { display: block; animation: fadeUp .25s var(--ease); }

/* ---------- 服务渠道 ---------- */
.channel-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.channel-card { padding: 20px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-sm); }
.ch-head { display: flex; align-items: flex-start; gap: 12px; }
.ch-icon { width: 40px; height: 40px; flex-shrink: 0; border-radius: 11px; display: grid; place-items: center; font-size: 19px; background: var(--primary-soft); color: var(--primary); }
.ch-name { font-size: 15px; font-weight: 700; line-height: 1.45; }
.ch-type { font-size: 11.5px; color: var(--primary); font-weight: 600; }
.ch-badge { margin-left: auto; flex-shrink: 0; font-size: 11px; padding: 2px 8px; border-radius: 5px; background: var(--teal-soft); color: var(--teal); font-weight: 600; }
.ch-desc { margin-top: 10px; font-size: 13px; line-height: 1.75; color: var(--text-2); }
.ch-steps { margin-top: 12px; display: flex; flex-direction: column; gap: 6px; }
.ch-steps li { display: flex; gap: 8px; font-size: 12.5px; color: var(--text-2); }
.ch-steps .n { flex-shrink: 0; width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; font-size: 10.5px; font-weight: 700; background: var(--surface-soft); color: var(--primary); }

/* 适老化卡片 */
.elder-card {
  margin-top: 20px; padding: 26px; border-radius: var(--radius-lg);
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 28px;
  background: linear-gradient(140deg, var(--surface), color-mix(in srgb, var(--primary) 7%, var(--surface)));
  border: 1px solid var(--border); box-shadow: var(--shadow-sm);
}
.elder-tag { display: inline-block; font-size: 11.5px; font-weight: 700; color: var(--primary); background: var(--primary-soft); padding: 3px 10px; border-radius: 5px; }
.elder-copy h3 { margin-top: 12px; font-size: clamp(19px, 2.2vw, 24px); font-weight: 800; }
.elder-copy p { margin-top: 10px; font-size: 13.5px; line-height: 1.85; color: var(--text-2); }
.elder-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.elder-points { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-content: center; }
.elder-point { display: flex; gap: 10px; padding: 13px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); }
.ep-icon { font-size: 18px; flex-shrink: 0; line-height: 1.5; }
.elder-point b { font-size: 13.5px; }
.elder-point p { font-size: 12px; color: var(--text-3); line-height: 1.65; margin-top: 2px; }

/* ---------- 声明 ---------- */
.disclaimer { padding: 22px 0; background: var(--amber-soft); border-top: 1px solid color-mix(in srgb, var(--amber) 25%, transparent); }
.disclaimer-inner { display: flex; gap: 12px; align-items: flex-start; font-size: 12.8px; line-height: 1.85; color: color-mix(in srgb, var(--amber) 70%, var(--text)); }
.disclaimer-icon { flex-shrink: 0; font-size: 16px; line-height: 1.7; }
.disclaimer b { color: color-mix(in srgb, var(--amber) 55%, var(--text)); }

/* ---------- 页脚 ---------- */
.site-footer { background: var(--surface); border-top: 1px solid var(--border); padding: 34px 0 0; }
.footer-main { display: flex; justify-content: space-between; gap: 32px; flex-wrap: wrap; padding-bottom: 26px; }
.footer-brand { display: flex; align-items: flex-start; gap: 12px; }
.footer-brand strong { font-size: 15px; }
.footer-brand p { font-size: 12.5px; color: var(--text-3); margin-top: 3px; }
.footer-links { display: flex; gap: 48px; flex-wrap: wrap; }
.footer-links h4 { font-size: 12.5px; color: var(--text-3); letter-spacing: 1px; margin-bottom: 8px; font-weight: 600; }
.footer-links div { display: flex; flex-direction: column; gap: 6px; }
.footer-links button { font-size: 13px; color: var(--text-2); text-align: left; padding: 0; transition: color .2s; }
.footer-links button:hover { color: var(--primary); }
.footer-bottom { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 14px 0 22px; border-top: 1px solid var(--border); font-size: 12px; color: var(--text-3); }

/* ---------- 抽屉 ---------- */
.drawer-mask { position: fixed; inset: 0; z-index: 200; background: rgba(10, 18, 30, .5); backdrop-filter: blur(3px); opacity: 0; transition: opacity .3s var(--ease); }
.drawer-mask.show { opacity: 1; }
.drawer { position: fixed; z-index: 201; top: 0; right: 0; bottom: 0; width: min(560px, 100%); display: flex; flex-direction: column; background: var(--bg); border-left: 1px solid var(--border); box-shadow: var(--shadow-lg); transform: translateX(102%); transition: transform .36s var(--ease); }
.drawer.open { transform: translateX(0); }
.drawer-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding: 22px 24px 16px; background: var(--surface); border-bottom: 1px solid var(--border); }
.drawer-cat { font-size: 11.5px; font-weight: 700; color: var(--primary); background: var(--primary-soft); padding: 2px 9px; border-radius: 5px; }
.drawer-head h2 { margin-top: 8px; font-size: 21px; line-height: 1.4; }
.drawer-body { flex: 1; overflow-y: auto; padding: 20px 24px 28px; }
.drawer-foot { display: flex; gap: 10px; padding: 14px 24px; border-top: 1px solid var(--border); background: var(--surface); }
.drawer-foot .btn { flex: 1; }
.dr-section { margin-bottom: 20px; }
.dr-section h4 { display: flex; align-items: center; gap: 8px; font-size: 13.5px; margin-bottom: 10px; }
.dr-section h4::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.dr-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.dr-summary { font-size: 13.5px; line-height: 1.85; color: var(--text-2); }
.dr-meta-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.dr-meta { padding: 11px 13px; border-radius: 10px; background: var(--surface); border: 1px solid var(--border); }
.dr-meta span { font-size: 11.5px; color: var(--text-3); }
.dr-meta b { display: block; font-size: 13px; margin-top: 2px; line-height: 1.6; }
.dr-list { display: flex; flex-direction: column; gap: 7px; }
.dr-list li { position: relative; padding-left: 18px; font-size: 13px; line-height: 1.75; color: var(--text-2); }
.dr-list li::before { content: "•"; position: absolute; left: 4px; color: var(--primary); }
.dr-steps li { position: relative; padding: 0 0 14px 30px; }
.dr-steps li::before { content: ""; position: absolute; left: 9px; top: 22px; bottom: 0; width: 2px; background: var(--border); }
.dr-steps li:last-child::before { display: none; }
.dr-step-dot { position: absolute; left: 0; top: 0; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 10.5px; font-weight: 700; background: var(--primary-soft); color: var(--primary); }
.dr-step-name { font-size: 13px; font-weight: 700; }
.dr-step-desc { font-size: 12.5px; color: var(--text-2); line-height: 1.7; }

/* ---------- 智能客服 ---------- */
.chat-fab {
  position: fixed; right: 22px; bottom: 22px; z-index: 150;
  width: 54px; height: 54px; border-radius: 50%;
  display: grid; place-items: center; color: #fff;
  background: linear-gradient(140deg, var(--primary), var(--primary-dark));
  box-shadow: 0 10px 24px -8px rgba(31, 111, 221, .8);
  transition: transform .22s var(--ease);
}
.chat-fab svg { width: 25px; height: 25px; fill: currentColor; }
.chat-fab:hover { transform: translateY(-3px) scale(1.04); }
.fab-dot { position: absolute; top: 3px; right: 4px; width: 11px; height: 11px; border-radius: 50%; background: #ff5f5f; border: 2px solid var(--surface); }
.chat-panel {
  position: fixed; right: 22px; bottom: 88px; z-index: 151;
  width: min(360px, calc(100% - 32px)); height: min(520px, 72vh);
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--border); border-radius: 18px;
  box-shadow: var(--shadow-lg); overflow: hidden;
  animation: chatIn .28s var(--ease);
}
@keyframes chatIn { from { opacity: 0; transform: translateY(14px) scale(.97); } }
.chat-head { display: flex; align-items: center; gap: 10px; padding: 13px 15px; background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: #fff; }
.chat-avatar { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-weight: 800; background: rgba(255, 255, 255, .2); }
.chat-head strong { display: block; font-size: 14px; }
.chat-head small { font-size: 11px; opacity: .85; }
.chat-head .icon-btn { margin-left: auto; background: rgba(255, 255, 255, .16); border-color: transparent; color: #fff; }
.chat-body { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; background: var(--surface-2); }
.msg { max-width: 84%; padding: 9px 13px; border-radius: 12px; font-size: 13px; line-height: 1.7; }
.msg.bot { align-self: flex-start; background: var(--surface); border: 1px solid var(--border); border-bottom-left-radius: 4px; }
.msg.user { align-self: flex-end; color: #fff; background: var(--primary); border-bottom-right-radius: 4px; }
.chat-quick { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 12px; border-top: 1px solid var(--border); background: var(--surface); }
.chat-q { font-size: 12px; padding: 5px 10px; border-radius: 999px; background: var(--surface-soft); border: 1px solid var(--border); color: var(--text-2); }
.chat-q:hover { border-color: var(--primary); color: var(--primary); }
.chat-input { display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--border); background: var(--surface); }
.chat-input input { flex: 1; padding: 8px 12px; border-radius: 9px; font-size: 13.5px; background: var(--surface-2); border: 1px solid var(--border-strong); outline: none; }
.chat-input input:focus { border-color: var(--primary); }

/* ---------- 登录弹窗 & 提示 ---------- */
.modal-mask { position: fixed; inset: 0; z-index: 210; display: grid; place-items: center; padding: 20px; background: rgba(10, 18, 30, .55); backdrop-filter: blur(3px); }
.modal { position: relative; width: min(400px, 100%); padding: 26px; border-radius: 18px; background: var(--surface); box-shadow: var(--shadow-lg); animation: fadeUp .28s var(--ease); }
.modal h3 { font-size: 19px; font-weight: 800; }
.modal-sub { font-size: 12.5px; color: var(--text-3); margin: 4px 0 18px; }
.modal .field-label { display: block; margin: 12px 0 6px; }
.modal .btn { margin-top: 18px; }
.modal-close { position: absolute; top: 14px; right: 14px; }
.modal-note { margin-top: 14px; font-size: 11.5px; color: var(--text-3); line-height: 1.7; }

.toast {
  position: fixed; left: 50%; bottom: 32px; z-index: 220;
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  padding: 11px 20px; border-radius: 10px; font-size: 13.5px; font-weight: 600;
  color: #fff; background: var(--text); box-shadow: var(--shadow-lg);
  transition: opacity .25s var(--ease), transform .25s var(--ease);
  max-width: calc(100% - 32px); text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.ok { background: var(--teal); }
.toast.warn { background: var(--amber); }
.toast.err { background: var(--red); }

/* ---------- 响应式 ---------- */
@media (max-width: 1180px) {
  .hero-inner { grid-template-columns: 1fr; gap: 28px; }
  .hero-copy { padding-top: 0; }
  .hero-panel { max-width: 620px; }
}
@media (max-width: 1024px) {
  .main-nav { display: none; }
  .faq-inner { grid-template-columns: 1fr; gap: 20px; }
  .faq-list { grid-column: 1; }
  .tool-split { grid-template-columns: 1fr; }
  .elder-card { grid-template-columns: 1fr; }
  .search-box { width: 200px; }
  .search-box:focus-within { width: 240px; }
}
@media (max-width: 760px) {
  .stat-strip { flex-wrap: wrap; }
  .stat-item { flex: 1 1 45%; padding: 14px 10px; }
  .stat-sep { display: none; }
  .service-list, .guide-grid, .hospital-list, .policy-list, .channel-grid, .knowledge-grid { grid-template-columns: 1fr; }
  .category-grid { grid-template-columns: repeat(2, 1fr); }
  .cat-desc { min-height: 0; }
  .field-row, .form-grid { grid-template-columns: 1fr; }
  .elder-points { grid-template-columns: 1fr; }
  .footer-links { gap: 28px; }
  .gov-banner-text { font-size: 11.5px; }
  .drawer-head, .drawer-body, .drawer-foot { padding-inline: 16px; }
}
@media (max-width: 560px) {
  .container { width: calc(100% - 32px); }
  .brand-text small { display: none; }
  .header-actions { gap: 6px; }
  .search-box { width: 100%; }
  .search-box:focus-within { width: 100%; }
  .header-inner { gap: 8px; }
  .login-btn { display: none; }
  .hero h1 { font-size: 30px; }
  .section-head { align-items: flex-start; }
  .tab { padding: 8px 12px; font-size: 12.5px; }
  .faq-a { padding-left: 18px; }
  .chat-fab { right: 14px; bottom: 14px; }
  .chat-panel { right: 8px; bottom: 78px; }
  .policy-foot { flex-direction: column; align-items: flex-start; gap: 6px; }
  .search-results { padding-inline: 16px; }
}

@media print {
  .site-header, .gov-banner, .chat-fab, .chat-panel, .hero-actions, .hero-quick,
  .theme-toggle, .login-btn, .drawer, .drawer-mask, .tool-panel:not(.active) { display: none !important; }
  body { background: #fff; color: #000; }
  .section-alt { background: #fff; }
  .service-card, .k-card, .policy-card, .channel-card { box-shadow: none; break-inside: avoid; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
  html { scroll-behavior: auto; }
}
