/* ============================================
   韩国医疗观光平台 手机WAP主样式表
   纯医疗蓝体系 · 全机型适配 · PbootCMS模板
   ============================================ */

/* ---------- 1. 基础重置 ---------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  /* 根字号固定 16px 作为 fallback；JS 会按屏宽动态设置（兼容微信 X5 内核） */
  font-size: 16px;
}

html, body { height: 100%; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  background: #f4f7fc;
  color: #1a2333;
  line-height: 1.5;
  width: 100%;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  position: relative;
}

img { max-width: 100%; display: block; border: 0; }
a { text-decoration: none; color: inherit; }
ul, ol { list-style: none; }
button { border: none; background: none; cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; font-size: inherit; outline: none; border: none; }

/* ---------- 2. 品牌色变量 ---------- */
:root {
  --primary: #1a6dff;        /* 主蓝 */
  --primary-dark: #0f4fd6;   /* 深蓝 */
  --primary-deep: #0a3fb0;    /* 更深蓝（顶部banner渐变用） */
  --primary-light: #e8f0ff;   /* 浅蓝底 */
  --primary-lighter: #f3f7ff; /* 更浅蓝底 */
  --success: #10b981;         /* 成功绿（仅状态） */
  --danger: #ef4444;          /* 警示红（仅价格/警告） */
  --warning: #f59e0b;          /* 星级金 */

  --text-main: #1a2333;
  --text-sub: #64748b;
  --text-mute: #9aa7b8;

  --bg-page: #f4f7fc;
  --bg-card: #ffffff;
  --bg-input: #f4f7fc;

  --border: #e4eaf3;
  --border-light: #eef2f8;

  --radius-sm: 0.5rem;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;
  --radius-xl: 1.25rem;

  --shadow-sm: 0 1px 3px rgba(20, 60, 140, 0.06);
  --shadow-md: 0 4px 14px rgba(20, 60, 140, 0.08);
  --shadow-lg: 0 8px 24px rgba(20, 60, 140, 0.14);

  --tabbar-height: 3.4rem;
}

/* ---------- 3. SVG图标通用 ---------- */
.i {
  width: 1.35em;
  height: 1.35em;
  display: inline-block;
  vertical-align: -0.25em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
.i--lg { width: 2.2em; height: 2.2em; }
.i--xl { width: 3rem; height: 3rem; }

/* ---------- 3b. 真实图片占位/展示通用 ---------- */
/* 所有图片展示位：填满容器、等比裁剪、圆角跟随父级 */
.img-fill {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: var(--primary-light);
}
/* 圆形容器内图片（头像等） */
.avatar img,
.dept-grid__icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
  display: block;
}
/* Banner 用背景图 */
.banner--img {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* ---------- 4. 页面容器 ---------- */
.page {
  min-height: 100%;
  background: var(--bg-page);
  padding-bottom: calc(var(--tabbar-height) + 1.25rem);
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
}
.page--no-tabbar { padding-bottom: 1.5rem; }

/* ---------- 5. 顶部导航 ---------- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-card);
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: var(--shadow-sm);
}
.navbar--blue {
  background: linear-gradient(135deg, var(--primary-deep) 0%, var(--primary-dark) 100%);
  color: #fff;
}
.navbar__title {
  font-size: 1.05rem;
  font-weight: 700;
  text-align: center;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.navbar__back {
  width: 2.25rem; height: 2.25rem;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; color: inherit; flex-shrink: 0;
}
.navbar__action {
  width: 2.25rem; height: 2.25rem;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

/* ---------- 6. 品牌Logo ---------- */
.logo { display: flex; align-items: center; gap: 0.5rem; }

/* ---------- 6b. 语言切换器 中/EN/한 ---------- */
.lang-switch {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 2px;
  font-size: 0.72rem;
  line-height: 1;
  flex-shrink: 0;
  background: var(--bg-input);
}
.lang-switch a {
  padding: 4px 9px;
  border-radius: 999px;
  color: var(--text-sub);
  white-space: nowrap;
}
.lang-switch a.active {
  background: var(--primary);
  color: #fff;
  font-weight: 600;
}
/* 蓝色navbar上的切换器（半透明白底+反色高亮） */
.navbar--blue .lang-switch {
  background: rgba(255, 255, 255, 0.18);
}
.navbar--blue .lang-switch a {
  color: rgba(255, 255, 255, 0.85);
}
.navbar--blue .lang-switch a.active {
  background: #fff;
  color: var(--primary);
  font-weight: 700;
}
/* 品牌 LOGO 图片（长型，图标+文字，透明PNG） */
.logo__mark {
  height: 2.1rem;
  width: auto;
  flex-shrink: 0;
  object-fit: contain;
  display: inline-block;
}
/* 随不同手机尺寸微调 LOGO 高度 */
@media (max-width: 340px) { .logo__mark { height: 1.8rem; } }
@media (min-width: 400px) and (max-width: 413px) { .logo__mark { height: 2.3rem; } }
.logo__text {
  font-weight: 800;
  font-size: 0.95rem;
  line-height: 1.15;
  color: var(--primary);
  letter-spacing: 0.02em;
}
.logo__text--white { color: #fff; }
.logo__sub { font-size: 0.62rem; font-weight: 500; opacity: 0.75; letter-spacing: 0.08em; }

/* ---------- 7. 按钮 ---------- */
.btn {
  display: flex; align-items: center; justify-content: center; gap: 0.4rem;
  width: 100%;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.95rem; font-weight: 600;
  transition: opacity 0.2s, transform 0.1s;
}
.btn:active { opacity: 0.85; transform: scale(0.99); }
.btn--primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #fff;
  box-shadow: 0 4px 12px rgba(26, 109, 255, 0.3);
}
.btn--outline {
  background: #fff; color: var(--primary);
  border: 1.5px solid var(--primary);
}
.btn--block { width: 100%; }
.btn--sm { padding: 0.45rem 0.85rem; font-size: 0.85rem; width: auto; }
.btn--round { border-radius: 999px; }
.btn .i { font-size: 1.05rem; }

/* ---------- 8. 卡片 ---------- */
.card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 1rem;
  margin: 0.75rem 1rem;
  box-shadow: var(--shadow-sm);
}
.card--flat { box-shadow: none; border: 1px solid var(--border-light); }

/* ---------- 9. 区块标题 ---------- */
.section-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.25rem 1rem 0.6rem;
}
.section-header__title { font-size: 1.08rem; font-weight: 700; }
.section-header__more {
  font-size: 0.82rem; color: var(--primary);
  display: flex; align-items: center; gap: 0.2rem;
}

/* ---------- 10. 底部Tab导航 ---------- */
.tabbar {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 480px;
  height: var(--tabbar-height);
  background: var(--bg-card);
  border-top: 1px solid var(--border-light);
  display: flex; align-items: center; justify-content: space-around;
  z-index: 100;
  padding-bottom: env(safe-area-inset-bottom);
}
.tabbar__item {
  display: flex; flex-direction: column; align-items: center; gap: 0.15rem;
  font-size: 0.68rem; color: var(--text-mute);
  flex: 1; padding: 0.3rem 0;
}
.tabbar__item.active { color: var(--primary); font-weight: 400; }
.tabbar__item .i { font-size: 1.3rem; }
/* 选中蓝色，点击不变大 */
.tabbar__item.active .i { stroke: var(--primary); }
.tabbar__item:active,
.tabbar__item:focus {
  transform: none !important;
  outline: none;
}
/* 锁定图标与文字尺寸，任何状态下都不缩放、不加粗 */
.tabbar__item .i,
.tabbar__item.active .i {
  font-size: 1.3rem !important;
  transform: none !important;
}
.tabbar__item span,
.tabbar__item.active span {
  font-size: 0.68rem !important;
  font-weight: 400 !important;
}

/* ---------- 11. 搜索框 ---------- */
.search-bar {
  display: flex; align-items: center; gap: 0.5rem;
  background: var(--bg-card);
  border-radius: 999px;
  padding: 0.6rem 1rem;
  margin: 0.75rem 1rem;
  box-shadow: var(--shadow-sm);
}
.search-bar__input {
  flex: 1; border: none; background: transparent;
  font-size: 0.92rem; color: var(--text-main);
}
.search-bar__input::placeholder { color: var(--text-mute); }
.search-bar__icon { color: var(--primary); display: flex; }

/* ---------- 12. 标签chip ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 0.3rem;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  font-size: 0.82rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-sub);
  white-space: nowrap;
}
.chip--active { background: var(--primary); color: #fff; border-color: var(--primary); }
.chip--blue { background: var(--primary-light); color: var(--primary); border-color: transparent; }
.chip--sm { padding: 0.25rem 0.6rem; font-size: 0.73rem; }
.chip-scroll {
  display: flex; gap: 0.5rem;
  overflow-x: auto;
  padding: 0.5rem 1rem;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.chip-scroll::-webkit-scrollbar { display: none; }

/* ---------- 13. 科室六宫格 ---------- */
.dept-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.6rem;
  padding: 0.75rem 1rem;
}
.dept-grid__item {
  display: flex; flex-direction: column; align-items: center; gap: 0.45rem;
  padding: 0.9rem 0.4rem;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}
.dept-grid__icon {
  width: 2.9rem; height: 2.9rem;
  border-radius: 50%;
  background: var(--primary-light);
  display: flex; align-items: center; justify-content: center;
  color: var(--primary);
}
.dept-grid__icon .i { font-size: 1.4rem; }
.dept-grid__label { font-size: 0.82rem; font-weight: 600; }

/* ---------- 14. 横滑卡片 ---------- */
.h-scroll {
  display: flex; gap: 0.7rem;
  overflow-x: auto;
  padding: 0.25rem 1rem 0.75rem;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.h-scroll::-webkit-scrollbar { display: none; }

.pkg-card {
  flex: 0 0 9.5rem;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.pkg-card__img {
  position: relative;
  width: 100%; height: 6.8rem;
  background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
  display: flex; align-items: center; justify-content: center;
  color: var(--primary);
  overflow: hidden;
}
.pkg-card__img .i { font-size: 2.2rem; }
.pkg-card__img .img-fill { transition: transform 0.25s ease; }
.pkg-card:active .pkg-card__img .img-fill { transform: scale(1.05); }
.pkg-card__body { padding: 0.6rem; }
.pkg-card__title { font-size: 0.84rem; font-weight: 600; margin-bottom: 0.2rem; }
.pkg-card__price { font-size: 0.9rem; color: var(--primary); font-weight: 700; }
.pkg-card__price--sub { color: var(--text-sub); font-weight: 500; font-size: 0.8rem; }

/* ---------- 15. 列表项 ---------- */
.list-item {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.9rem 1rem;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-light);
}
.list-item__icon {
  width: 2.5rem; height: 2.5rem;
  border-radius: var(--radius-sm);
  background: var(--primary-light);
  display: flex; align-items: center; justify-content: center;
  color: var(--primary);
  flex-shrink: 0;
}
.list-item__icon .i { font-size: 1.2rem; }
.list-item__body { flex: 1; min-width: 0; }
.list-item__title { font-size: 0.93rem; font-weight: 600; }
.list-item__sub { font-size: 0.78rem; color: var(--text-sub); margin-top: 0.1rem; }
.list-item__arrow { color: var(--text-mute); }

/* ---------- 16. 头像 ---------- */
.avatar {
  width: 3.4rem; height: 3.4rem;
  border-radius: 50%;
  background: linear-gradient(135deg, #dbeafe, #93c5fd);
  display: flex; align-items: center; justify-content: center;
  color: var(--primary);
  font-weight: 700;
  flex-shrink: 0;
}
.avatar .i { font-size: 1.6rem; }
.avatar--sm { width: 2.4rem; height: 2.4rem; }
.avatar--sm .i { font-size: 1.1rem; }
.avatar--lg { width: 4.5rem; height: 4.5rem; }
.avatar--lg .i { font-size: 2.1rem; }

/* ---------- 17. 星级 ---------- */
.rating { display: flex; align-items: center; gap: 0.3rem; }
.rating__stars { color: var(--warning); font-size: 0.88rem; letter-spacing: 1px; }
.rating__num { font-size: 0.85rem; font-weight: 700; }

/* ---------- 18. 表单 ---------- */
.field { margin: 0.75rem 1rem; }
.field__label {
  display: block; font-size: 0.88rem; font-weight: 600;
  margin-bottom: 0.45rem; color: var(--text-main);
}
.field__input {
  width: 100%;
  padding: 0.85rem 1rem;
  background: var(--bg-input);
  border: 1.5px solid transparent;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  transition: border-color 0.2s;
}
.field__input:focus { border-color: var(--primary); background: #fff; }
.field__input::placeholder { color: var(--text-mute); }
.field--row { display: flex; gap: 0.5rem; align-items: stretch; }
.field__prefix {
  display: flex; align-items: center; gap: 0.3rem;
  padding: 0 0.85rem;
  background: var(--bg-input);
  border-radius: var(--radius-md);
  font-weight: 600; font-size: 0.9rem;
  flex-shrink: 0;
}

/* ---------- 19. 步骤条 ---------- */
.steps {
  display: flex; align-items: flex-start; justify-content: center;
  padding: 1.25rem 1rem 0.5rem;
}
.steps__item {
  display: flex; flex-direction: column; align-items: center; gap: 0.3rem;
}
.steps__dot {
  width: 1.9rem; height: 1.9rem;
  border-radius: 50%;
  background: var(--border); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.85rem;
}
.steps__item.active .steps__dot { background: var(--primary); }
.steps__item.done .steps__dot { background: var(--success); }
.steps__label { font-size: 0.72rem; color: var(--text-sub); }
.steps__line { flex: 1; height: 2px; background: var(--border); margin: 0.95rem 0.4rem 0; }

/* ---------- 20. 首页Banner 轮播 ---------- */
.banner {
  position: relative;
  margin: 0.75rem 1rem;
  border-radius: var(--radius-lg);
  overflow: hidden;
  height: 11.5rem;
  background:
    linear-gradient(180deg, rgba(10, 63, 176, 0.2) 0%, rgba(10, 63, 176, 0.55) 100%),
    linear-gradient(160deg, #3b5bbf 0%, #1a4bd9 45%, #0a3fb0 100%);
  color: #fff;
}
/* 轮播轨道：铺满整个banner */
.banner__track { position: relative; width: 100%; height: 100%; }
/* 单个轮播页：背景图铺满，文字靠下 */
.banner__slide {
  position: absolute; inset: 0;
  background-size: cover; background-position: center; background-repeat: no-repeat;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 1.4rem;
  opacity: 0; visibility: hidden; transition: opacity .5s ease;
}
.banner__slide.active { opacity: 1; visibility: visible; z-index: 1; }
/* 城市天际线装饰（纯CSS） */
.banner::after {
  content: '';
  position: absolute; bottom: 0; left: 0; right: 0; height: 3.5rem; z-index: 2;
  background:
    linear-gradient(to top, rgba(6, 30, 90, 0.55), transparent),
    repeating-linear-gradient(90deg,
      rgba(255,255,255,0.08) 0 8px, transparent 8px 24px);
  -webkit-mask: linear-gradient(to top, #000 55%, transparent 100%);
  mask: linear-gradient(to top, #000 55%, transparent 100%);
  pointer-events: none;
}
.banner__tag {
  display: inline-flex; align-items: center; gap: 0.3rem;
  font-size: 0.75rem;
  background: rgba(255,255,255,0.2);
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  width: fit-content;
  margin-bottom: 0.5rem;
  backdrop-filter: blur(4px);
}
.banner__title { font-size: 1.35rem; font-weight: 800; line-height: 1.35; position: relative; z-index: 1; }
.banner__sub { font-size: 0.85rem; opacity: 0.92; margin-top: 0.4rem; position: relative; z-index: 1; }
.banner__dots {
  position: absolute; bottom: 0.6rem; left: 50%;
  transform: translateX(-50%);
  display: flex; gap: 0.3rem; z-index: 3;
}
.banner__dot { width: 0.35rem; height: 0.35rem; border-radius: 50%; background: rgba(255,255,255,0.5); }
.banner__dot.active { background: #fff; width: 0.9rem; border-radius: 999px; }

/* ---------- 21. 价格 ---------- */
.price { font-weight: 700; color: var(--primary); }
.price--lg { font-size: 1.45rem; }
.price--danger { color: var(--danger); }
.price--mute { color: var(--text-sub); font-weight: 500; font-size: 0.82rem; }

/* ---------- 22. 通知卡片 ---------- */
.notify-card {
  display: flex; gap: 0.75rem;
  padding: 0.9rem 1rem;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  margin: 0.5rem 1rem;
  box-shadow: var(--shadow-sm);
}
.notify-card__icon {
  width: 2.6rem; height: 2.6rem;
  border-radius: 50%;
  background: var(--primary-light);
  display: flex; align-items: center; justify-content: center;
  color: var(--primary);
  flex-shrink: 0;
}
.notify-card__icon .i { font-size: 1.2rem; }
.notify-card__body { flex: 1; }
.notify-card__tag { font-size: 0.73rem; color: var(--primary); font-weight: 600; }
.notify-card__title { font-size: 0.93rem; font-weight: 700; margin: 0.1rem 0; }
.notify-card__desc { font-size: 0.8rem; color: var(--text-sub); line-height: 1.45; }
.notify-card__time { font-size: 0.73rem; color: var(--text-mute); margin-top: 0.3rem; }
.notify-card.unread .notify-card__title::after {
  content: ''; display: inline-block;
  width: 0.4rem; height: 0.4rem; border-radius: 50%;
  background: var(--primary); margin-left: 0.3rem; vertical-align: middle;
}

/* ---------- 23. 优惠券 ---------- */
.coupon {
  position: relative;
  margin: 0.7rem 1rem;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
}
.coupon__left {
  flex: 0 0 42%;
  padding: 1.2rem 0.9rem;
  display: flex; flex-direction: column; justify-content: center;
  border-right: 2px dashed var(--border);
  background: var(--primary-light);
}
.coupon__amount { font-size: 1.75rem; font-weight: 800; color: var(--primary); line-height: 1.1; }
.coupon__amount small { font-size: 0.9rem; }
.coupon__unit { font-size: 0.75rem; color: var(--text-sub); margin-top: 0.3rem; }
.coupon__right { flex: 1; padding: 1.1rem; display: flex; flex-direction: column; justify-content: center; }
.coupon__desc { font-size: 0.78rem; color: var(--text-sub); margin: 0.3rem 0 0.7rem; }

/* ---------- 24. 聊天 ---------- */
.chat-wrap { padding: 1rem; display: flex; flex-direction: column; gap: 0.85rem; }
/* 单条消息行：默认左对齐（协调员/白色） */
.chat-msg { display: flex; align-items: flex-end; gap: 0.5rem; }
/* 用户消息行：整体靠右（蓝色） */
.chat-msg--mine { flex-direction: row-reverse; }
.chat-msg__avatar { width: 2rem; height: 2rem; flex-shrink: 0; }
.chat-msg__body { max-width: 80%; display: flex; flex-direction: column; }
.chat-msg--mine .chat-msg__body { align-items: flex-end; }
.chat-bubble {
  max-width: 100%;
  padding: 0.7rem 0.95rem;
  border-radius: var(--radius-lg);
  font-size: 0.92rem; line-height: 1.5;
}
/* 白色气泡：协调员，靠左 */
.chat-bubble--left {
  align-self: flex-start;
  background: var(--bg-card);
  border-bottom-left-radius: 0.25rem;
  box-shadow: var(--shadow-sm);
}
/* 蓝色气泡：用户，靠右 */
.chat-bubble--right {
  align-self: flex-end;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  border-bottom-right-radius: 0.25rem;
}
.chat-bubble__time { font-size: 0.68rem; color: var(--text-mute); margin-top: 0.25rem; }
.chat-bubble--right .chat-bubble__time { color: rgba(255,255,255,0.75); }
.chat-input-bar {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: var(--bg-card);
  padding: 0.65rem 0.85rem;
  display: flex; gap: 0.5rem; align-items: center;
  border-top: 1px solid var(--border-light);
  padding-bottom: calc(0.65rem + env(safe-area-inset-bottom));
}
.chat-input-bar__input {
  flex: 1;
  padding: 0.6rem 1rem;
  background: var(--bg-input);
  border-radius: 999px;
  font-size: 0.92rem;
}
.chat-input-bar__send {
  width: 2.4rem; height: 2.4rem; border-radius: 50%;
  background: var(--primary); color: #fff;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

/* ---------- 25. 我的页面 ---------- */
.profile-banner {
  margin: 0.75rem 1rem;
  padding: 1.4rem 1.2rem;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--primary-deep), var(--primary-dark));
  color: #fff;
  display: flex; align-items: center; gap: 0.9rem;
  box-shadow: 0 6px 18px rgba(26, 109, 255, 0.3);
}
.profile-banner__info { flex: 1; }
.profile-banner__name { font-size: 1.2rem; font-weight: 800; }
.profile-banner__sub { margin-top: 0.2rem; font-size: 0.82rem; opacity: 0.9; }
.profile-banner__points {
  margin-top: 0.5rem; font-size: 0.9rem;
  display: inline-flex; align-items: center; gap: 0.3rem;
  background: rgba(255,255,255,0.18);
  padding: 0.25rem 0.7rem; border-radius: 999px;
}
.stat-row {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem; padding: 0 1rem;
}
.stat-box {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 0.9rem 0.5rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
}
.stat-box__num { font-size: 1.4rem; font-weight: 800; color: var(--primary); }
.stat-box__label { font-size: 0.72rem; color: var(--text-sub); margin-top: 0.15rem; }

/* ---------- 26. 工具类 ---------- */
.text-center { text-align: center; }
.text-primary { color: var(--primary); }
.text-sub { color: var(--text-sub); }
.text-mute { color: var(--text-mute); }
.text-danger { color: var(--danger); }
.text-success { color: var(--success); }
.fw-bold { font-weight: 700; }
.flex { display: flex; align-items: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mb-2 { margin-bottom: 1rem; }

/* ---------- 27. 多尺寸适配 ---------- */
/* 大屏手机 414px+ */
@media (min-width: 414px) {
  html { font-size: calc(100vw / 414 * 16.5); }
}
/* 常规手机 361-413px 保持 375 基准由 JS 动态设置 */

/* 小屏手机 320-360px */
@media (max-width: 360px) {
  html { font-size: calc(100vw / 320 * 15); }
  .dept-grid { gap: 0.45rem; }
  .dept-grid__item { padding: 0.7rem 0.25rem; }
  .pkg-card { flex: 0 0 8.8rem; }
  .pkg-card__img { height: 6.2rem; }
  .banner { height: 10rem; }
}
/* 极窄屏 320px 及以下，进一步收紧间距与卡片尺寸 */
@media (max-width: 340px) {
  .section-header { padding: 1rem 0.75rem 0.5rem; }
  .search-bar, .card, .field { margin-left: 0.75rem; margin-right: 0.75rem; }
  .h-scroll, .chip-scroll { padding-left: 0.75rem; padding-right: 0.75rem; }
  .dept-grid { padding-left: 0.75rem; padding-right: 0.75rem; }
  .pkg-card { flex: 0 0 8.2rem; }
  .pkg-card__img { height: 5.8rem; }
  .lang-switch a { padding: 3px 6px; }
}
/* 更高清机型（如 iPhone Pro Max / 折叠屏）适度放大 */
@media (min-width: 400px) and (max-width: 413px) {
  .pkg-card { flex: 0 0 10rem; }
  .pkg-card__img { height: 7.2rem; }
}
/* 横屏矮高度：隐藏底部Tab */
@media (orientation: landscape) and (max-height: 500px) {
  .tabbar { display: none; }
  .page { padding-bottom: 1rem; }
}
/* 平板/超宽：内容居中限宽 */
@media (min-width: 600px) {
  body { max-width: 480px; margin: 0 auto; box-shadow: 0 0 30px rgba(0,0,0,0.08); }
}

/* ---------- 28. 下拉刷新指示条 ---------- */
.pull-refresh {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 2.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  color: var(--primary);
  font-size: 0.82rem;
  font-weight: 600;
  background: var(--bg-page);
  z-index: 300;
  transform: translateY(-100%);
  transition: opacity 0.2s ease;
  opacity: 0;
  pointer-events: none;
}
.pull-refresh.is-visible { opacity: 1; }
.pull-refresh__spinner {
  width: 1rem; height: 1rem;
  border: 2px solid var(--primary-light);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: pull-spin 0.7s linear infinite;
}
.pull-refresh.is-ready .pull-refresh__spinner { animation-duration: 0.4s; }
.pull-refresh.is-refreshing .pull-refresh__spinner { animation: pull-spin 0.6s linear infinite; }
@keyframes pull-spin { to { transform: rotate(360deg); } }

/* ---------- 29. 列表分页 ---------- */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1rem 1rem 1.5rem;
}
.pagination__btn {
  min-width: 5.5rem;
  padding: 0.55rem 1rem;
  border-radius: 999px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-sub);
  font-size: 0.85rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  transition: all 0.2s ease;
}
.pagination__btn:not(:disabled):active { transform: scale(0.96); }
.pagination__btn:disabled { opacity: 0.35; cursor: not-allowed; }
.pagination__btn--primary {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.pagination__info { font-size: 0.8rem; color: var(--text-mute); min-width: 2.6rem; text-align: center; }

/* ---------- 顶部加载进度条 ---------- */
.loadbar {
  position: fixed; top: 0; left: 0;
  width: 100%; height: 3px;
  z-index: 9999;
  background: transparent;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.loadbar.is-visible { opacity: 1; }
.loadbar__inner {
  height: 100%; width: 0;
  background: linear-gradient(90deg, var(--primary), #5b9bff);
  border-radius: 0 2px 2px 0;
  box-shadow: 0 0 8px rgba(26, 109, 255, 0.6);
  transition: width 0.3s ease;
}
/* 加载时页面内容淡入，避免白屏突兀 */
.page.is-loading { opacity: 0; transition: opacity 0.15s ease; }

/* ---------- 全屏居中 Loading 遮罩 ---------- */
.loading-mask {
  position: fixed; inset: 0;
  background: rgba(244, 247, 252, 0.85);
  backdrop-filter: blur(2px);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 0.9rem;
  z-index: 9998;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}
.loading-mask.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.loading-mask__spinner {
  width: 2.6rem; height: 2.6rem;
  border: 3px solid var(--primary-light);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: load-spin 0.8s linear infinite;
}
.loading-mask__text {
  font-size: 0.82rem; color: var(--text-sub);
  letter-spacing: 0.05em;
}
@keyframes load-spin { to { transform: rotate(360deg); } }
