/* =========================================================
   宏生医院 · 体检中心 H5
   ------------------------------------------------------------
   视觉基调：一个主题色统领全站，色彩按「身份」分工而不是随机铺开。
     · 主题色  碧青 #0E9686 —— 所有交互态、强调、进度都由它派生
     · 功能色  蓝/绿/琥珀/红 —— 只在表示「状态」时出现（合格/偏低/偏高/异常）
     · 分类色  5 色 —— 只在表示「套餐归属」时出现（尺条与标签）
     · 中性色  不带色相 —— 纸面不再染绿，颜色才有地方显形
   ========================================================= */

/* ---------- 1. 重置 ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* =======================================================
     1.1 主题色 · 碧青 Deep Jade
     全站唯一品牌色。色相锚定 hsl(173)，往蓝偏 2° 避免与「合格绿」撞色。
     ======================================================= */
  --brand-50:  #EDF8F6;
  --brand-100: #D0EEE9;
  --brand-200: #A3DCD3;
  --brand-300: #69C6B9;
  --brand-400: #2DAC9D;
  --brand-500: #0E9686;   /* ★ 主题色 · 图形元素（色带/进度/下划线）3.67:1 */
  --brand-600: #0A7669;   /* 主按钮底 & 强调文字 · 白字 5.51:1 */
  --brand-700: #085C53;
  --brand-800: #063F39;

  /* 深色底上的品牌浅色 */
  --brand-on:      #8FE0D4;
  --brand-on-dim:  rgba(255, 255, 255, .92);   /* 压 brand-600 上 4.6:1 */
  --brand-on-line: rgba(255, 255, 255, .34);

  /* 主题色面（首页首屏的品牌场） */
  --brand-field: linear-gradient(161deg, #0A7669 0%, #0E9686 48%, #1BA795 100%);

  /* =======================================================
     1.2 功能色 · 语义层
     规则：颜色只在「它正在陈述一件事」时出现，不做装饰。
     ======================================================= */
  --ok-50:   #E8F7EF;
  --ok-500:  #12A150;   /* 合格 / 成功 */
  --ok-600:  #0C7C3D;
  --ok-700:  #0A6431;

  --info-50:  #E9F1FE;
  --info-500: #2E7BE8;  /* 偏低 / 中性提示 */
  --info-600: #1E5FCC;

  --warn-50:  #FDF2E0;
  --warn-500: #C87C06;  /* 偏高 */
  --warn-600: #A8680A;

  --risk-50:  #FDECEC;
  --risk-500: #E0453F;  /* 异常 / 危急 */
  --risk-600: #BC2F2A;

  /* =======================================================
     1.3 分类色 · 只标识套餐归属
     五个色相按 ~200° 圆周等距铺开、统一明度，互相不打架。
     ======================================================= */
  --cat-base:    #0E9686;  /* 基础 —— 与主题色同源 */
  --cat-special: #6157CE;  /* 专项 */
  --cat-female:  #D4487F;  /* 女性 */
  --cat-hire:    #3F82C4;  /* 入职 */
  --cat-elder:   #C06A2E;  /* 长者 */

  /* =======================================================
     1.4 中性色 · 刻意不带色相
     旧版底色 #F2F7F6 带绿调，导致白卡片也被染绿、颜色显不出来。
     ======================================================= */
  --paper:   #F4F6F6;
  --surface: #FFFFFF;
  --surface-2:#FAFBFB;

  --ink:     #151D1C;   /* 17.2:1 */
  --ink-2:   #4C5654;   /*  7.6:1 */
  --ink-3:   #687472;   /*  4.5:1 — 旧版 2.9:1，11px 文字已达标 */

  --hairline:   rgba(21, 29, 28, .11);
  --hairline-2: rgba(21, 29, 28, .07);

  /* =======================================================
     1.5 形态与尺寸（沿用旧版）
     ======================================================= */
  --radius:     18px;
  --radius-sm:  12px;

  --head-h:     54px;
  --nav-h:      56px;
  --safe-b:     env(safe-area-inset-bottom, 0px);

  --font: "PingFang SC", "HarmonyOS Sans SC", "Source Han Sans SC",
          "Noto Sans SC", -apple-system, BlinkMacSystemFont,
          "Helvetica Neue", Arial, sans-serif;
}

html, body {
  height: 100%;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}

body { overflow: hidden; }

button, input, textarea {
  font-family: inherit; font-size: inherit; color: inherit;
  border: 0; background: none; outline: none;
}
button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
textarea { resize: none; }
img, svg { display: block; }

/* hidden 必须压过组件自身的 display，否则永远显示不出来 */
[hidden] { display: none !important; }

:focus-visible {
  outline: 2px solid var(--brand-500);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---------- 2. 排版 ---------- */
.eyebrow {
  font-size: 11px; font-weight: 500; letter-spacing: .16em;
  color: var(--brand-600); text-transform: uppercase;
}

/* 落在品牌深底上的眉标签换成反白 */
.hero .eyebrow { color: var(--brand-on-dim); }
.receipt .eyebrow { color: var(--ok-600); }

h1, h2, h3, p, li, dt, dd { margin: 0; }

/* ---------- 3. 顶部锁定区 ---------- */
.topbar {
  position: fixed; inset: 0 0 auto 0; z-index: 30;
  height: var(--head-h);
  padding: 0 20px;
  display: flex; align-items: center; justify-content: space-between;
  background: color-mix(in srgb, var(--paper) 84%, transparent);
  backdrop-filter: saturate(1.6) blur(14px);
  -webkit-backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid var(--hairline-2);
}

.topbar__brand { display: flex; align-items: center; gap: 9px; }

.mark {
  width: 26px; height: 26px; color: #fff;
  background: var(--brand-field);
  border-radius: 8px;
  display: grid; place-items: center;
  box-shadow: 0 2px 8px rgba(10, 118, 105, .28);
}
.mark svg { width: 17px; height: 17px; }

.topbar__name { display: flex; align-items: baseline; gap: 7px; }
.topbar__name b { font-size: 16px; font-weight: 600; letter-spacing: .01em; }
.topbar__name em {
  font-style: normal; font-size: 11px; font-weight: 400;
  color: var(--ink-3); letter-spacing: .1em;
}

.topbar__act {
  font-size: 13px; font-weight: 500; color: var(--brand-600);
  padding: 6px 2px;
}
.topbar__act::after {
  content: ""; display: block; height: 1px; margin-top: 2px;
  background: currentColor; transform: scaleX(0); transform-origin: left;
  transition: transform .18s ease;
}
.topbar__act:active::after { transform: scaleX(1); }

/* ---------- 4. 舞台与视图 ---------- */
.stage {
  position: fixed;
  inset: var(--head-h) 0 calc(var(--nav-h) + var(--safe-b)) 0;
}

.view { height: 100%; }
.view.is-active .scroll { animation: viewIn .26s ease both; }

.scroll {
  height: 100%; overflow-y: auto; overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 18px 20px 40px;
}

@keyframes viewIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}

/* ---------- 5. 首页首屏：品牌场 ----------
   全页最大面积的一块颜色，用来把主题色立住。
   上通下顶满，滚动时由 .stage 的边界自然裁切。 */
.hero {
  margin: -18px -20px 26px;
  padding: 26px 20px 28px;
  color: #fff;
  background:
    radial-gradient(88% 118% at 106% -12%, rgba(255, 255, 255, .22), transparent 56%),
    var(--brand-field);
}

.hero__title {
  margin-top: 11px;
  font-size: 31px; font-weight: 700;
  line-height: 1.28; letter-spacing: -.02em;
}

.hero__sub {
  margin-top: 12px; max-width: 21em;
  font-size: 13.5px; line-height: 1.75; color: var(--brand-on-dim);
}

.hero__cta { margin-top: 20px; display: flex; gap: 10px; }

/* 品牌深底上的主按钮反色为白底 —— 同一条规则：
   压在品牌色上的主按钮，永远换成承载面的颜色 */
.hero .btn--primary {
  background: #fff; color: var(--brand-700);
  box-shadow: 0 4px 14px rgba(6, 63, 57, .24);
}
.hero .btn--primary:active { background: var(--brand-50); }

.hero .btn--ghost {
  color: #fff;
  box-shadow: inset 0 0 0 1px var(--brand-on-line);
}

/* ---------- 6. 签名元素：指标区间量程尺 ----------
   三段色直接复用功能色：偏低=蓝 / 正常=主题色 / 偏高=琥珀。
   这不是装饰，是体检报告参考区间本来的读法。 */
.gauge {
  background: var(--surface);
  border: 1px solid var(--hairline-2);
  border-radius: var(--radius);
  padding: 18px 18px 16px;
}

.gauge__head {
  display: flex; align-items: flex-end; justify-content: space-between;
  margin-bottom: 22px;
}
.gauge__name { margin-top: 5px; font-size: 14px; font-weight: 500; color: var(--ink-2); }

/* 报告上的数字才是这页的主角：等宽数字 + 略紧字距 */
.gauge__reading { display: flex; align-items: baseline; gap: 4px; }
.gauge__value {
  font-size: 27px; font-weight: 650; letter-spacing: -.03em;
  font-variant-numeric: tabular-nums;
  color: var(--brand-600);
}
.gauge__unit { font-size: 11px; color: var(--ink-3); }

/* 整条 = 偏低 | 正常 | 偏高 */
.rail {
  position: relative; display: flex; gap: 3px;
  height: 7px; margin-bottom: 9px;
}
.rail__seg { border-radius: 2px; transform-origin: left; }
.rail__seg--low  { flex: 0 0 28%; background: var(--info-500); }
.rail__seg--ok   { flex: 1 1 auto;  background: var(--brand-500); }
.rail__seg--high { flex: 0 0 20%; background: var(--warn-500); }

.rail__needle {
  position: absolute; top: -6px; bottom: -6px; left: 58%;
  width: 2px; border-radius: 2px; background: var(--ink);
}
.rail__needle::before {
  content: ""; position: absolute; top: -1px; left: 50%;
  width: 7px; height: 7px; margin-left: -3.5px;
  border-radius: 50%; background: var(--ink);
}

.rail__scale {
  display: flex; justify-content: space-between;
  font-size: 10.5px; color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}
.rail__scale-mid { color: var(--brand-600); font-weight: 600; }

.gauge__note {
  margin-top: 16px; padding-top: 14px;
  border-top: 1px dashed var(--hairline);
  font-size: 11.5px; line-height: 1.7; color: var(--ink-3);
}

/* 开场只编排这一处：区段依次展开，指针从偏高段滑回正常段 */
.ready .rail__seg { animation: railIn .5s cubic-bezier(.2, .7, .3, 1) both; }
.ready .rail__seg--ok   { animation-delay: .10s; }
.ready .rail__seg--high { animation-delay: .18s; }
.ready .rail__needle   { animation: needleIn .62s cubic-bezier(.3, .9, .3, 1) .22s both; }

@keyframes railIn   { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes needleIn { from { left: 86%; opacity: .2; } to { left: 58%; opacity: 1; } }

/* ---------- 7. 文字式快捷导航 ---------- */
.quicklinks {
  margin: 0 0 30px; padding: 14px 0;
  display: flex; justify-content: space-between;
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
}
.quicklinks button {
  font-size: 12.5px; font-weight: 500; color: var(--ink-2);
  padding: 2px 0;
}
.quicklinks button::after {
  content: "›"; display: inline-block; margin-left: 3px;
  color: var(--brand-400);
}
.quicklinks button:active { color: var(--brand-600); }

/* ---------- 8. 区块标题 ---------- */
.section { margin-bottom: 30px; }
.section__head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 6px;
}
.section__title {
  font-size: 18px; font-weight: 650; letter-spacing: -.01em;
}
.section__more { font-size: 12px; color: var(--ink-3); }

/* ---------- 9. 套餐目录（列表式，不用卡片堆） ----------
   每行由 --accent 着色，由 JS 按分类注入，见 9.1 */
.planlist { border-top: 1px solid var(--hairline); }
.planlist--full { margin-top: 14px; }

.plan {
  --accent: var(--brand-500);

  display: flex; align-items: flex-start; gap: 14px;
  width: 100%; text-align: left;
  padding: 17px 0 16px;
  border-bottom: 1px solid var(--hairline);
}

/* 9.1 分类 → 颜色。色条与标签同源，一眼可辨归属 */
.plan[data-cat="base"]    { --accent: var(--cat-base); }
.plan[data-cat="special"] { --accent: var(--cat-special); }
.plan[data-cat="female"]  { --accent: var(--cat-female); }
.plan[data-cat="hire"]    { --accent: var(--cat-hire); }
.plan[data-cat="elder"]   { --accent: var(--cat-elder); }

.plan__main { flex: 1 1 auto; min-width: 0; }
.plan__top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.plan__name { font-size: 15.5px; font-weight: 600; letter-spacing: -.01em; }

/* 标签 = 状态，所以「当天出报告」是琥珀，「40 岁以上建议」是分类色 */
.tag {
  font-size: 10px; font-weight: 500; letter-spacing: .04em;
  padding: 2px 6px; border-radius: 4px;
  color: color-mix(in srgb, var(--accent) 76%, #0C1A18);
  background: color-mix(in srgb, var(--accent) 14%, var(--surface));
}
.tag--warm {
  color: var(--warn-600);
  background: color-mix(in srgb, var(--warn-500) 14%, var(--surface));
}

.plan__desc { margin-top: 3px; font-size: 12.5px; color: var(--ink-2); }
.plan__meta {
  margin-top: 7px; font-size: 11px; color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}

/* 项目覆盖尺：与量程尺同一套语言，只换成所属分类色 */
.plan__cov {
  display: block; margin-top: 9px; height: 3px;
  background: color-mix(in srgb, var(--accent) 16%, var(--surface));
  border-radius: 2px; overflow: hidden;
}
.plan__cov::after {
  content: ""; display: block; height: 100%;
  width: var(--cov, 50%); background: var(--accent); border-radius: 2px;
}

.plan__side { flex: 0 0 auto; text-align: right; padding-top: 2px; }
.plan__price {
  font-size: 21px; font-weight: 650; letter-spacing: -.03em;
  font-variant-numeric: tabular-nums;
}
.plan__price sup { font-size: 12px; font-weight: 550; margin-right: 1px; }
.plan__was {
  display: block; font-size: 11px; color: var(--ink-3);
  text-decoration: line-through; font-variant-numeric: tabular-nums;
}

/* ---------- 10. 到院须知 ---------- */
.notices {
  margin-top: 6px; padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--hairline-2);
  border-radius: var(--radius);
  list-style: none;
}
.notices li {
  position: relative; padding-left: 13px;
  font-size: 12.5px; line-height: 1.85; color: var(--ink-2);
}
.notices li + li { margin-top: 7px; }
.notices li::before {
  content: ""; position: absolute; left: 0; top: 11px;
  width: 3px; height: 3px; border-radius: 50%; background: var(--brand-400);
}
.notices b {
  display: inline-block; min-width: 2.6em; margin-right: 4px;
  font-weight: 600; color: var(--brand-600);
}

/* ---------- 11. 页头（套餐 / 预约） ---------- */
.pagehead { padding: 6px 0 18px; }
.pagehead__title { font-size: 25px; font-weight: 700; letter-spacing: -.02em; }
.pagehead__sub { margin-top: 6px; font-size: 12.5px; color: var(--ink-3); }

/* ---------- 12. 分类筛选（文字 + 下划线，不用胶囊） ---------- */
.filters {
  position: sticky; top: 0; z-index: 10;
  display: flex; gap: 20px;
  margin: 0 -20px; padding: 0 20px;
  background: color-mix(in srgb, var(--paper) 90%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--hairline-2);
  overflow-x: auto; scrollbar-width: none;
}
.filters::-webkit-scrollbar { display: none; }

.filters button {
  position: relative; flex: 0 0 auto;
  padding: 12px 0 11px;
  font-size: 13.5px; font-weight: 500; color: var(--ink-3);
  transition: color .16s ease;
}
.filters button::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0;
  height: 2px; background: var(--brand-500); border-radius: 1px;
  transform: scaleX(0); transition: transform .2s cubic-bezier(.2,.7,.3,1);
}
.filters button[aria-selected="true"] { color: var(--ink); font-weight: 600; }
.filters button[aria-selected="true"]::after { transform: scaleX(1); }

/* ---------- 13. 表单 ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--hairline-2);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 22px;
}
.card--picked { border-color: var(--brand-200); }
.card__row {
  margin-top: 8px; display: flex; align-items: flex-start;
  justify-content: space-between; gap: 14px;
}
.card__title { font-size: 16px; font-weight: 600; }
.card__meta { margin-top: 4px; font-size: 12px; color: var(--ink-3); }
.card__price {
  font-size: 20px; font-weight: 650; letter-spacing: -.03em;
  font-variant-numeric: tabular-nums; white-space: nowrap;
  color: var(--brand-600);
}

.pickrow {
  display: flex; gap: 8px;
  margin: 14px -18px -6px; padding: 14px 18px 6px;
  border-top: 1px dashed var(--hairline);
  overflow-x: auto; scrollbar-width: none;
}
.pickrow::-webkit-scrollbar { display: none; }
.pickrow button {
  flex: 0 0 auto; padding: 7px 11px;
  font-size: 12px; white-space: nowrap;
  color: var(--ink-2);
  border: 1px solid var(--hairline); border-radius: 8px;
}
.pickrow button[aria-pressed="true"] {
  color: var(--brand-700); border-color: var(--brand-400); background: var(--brand-50);
  font-weight: 500;
}

.form { display: block; }
.field { display: block; padding: 13px 0 14px; border-bottom: 1px solid var(--hairline); }
.field--group { padding-bottom: 16px; }
.field__label {
  display: block; margin-bottom: 7px;
  font-size: 11.5px; font-weight: 500; letter-spacing: .08em; color: var(--ink-3);
}
.field__label i { font-style: normal; letter-spacing: 0; opacity: .8; }

.field input, .field textarea {
  display: block; width: 100%;
  font-size: 15px; line-height: 1.5;
}
.field input::placeholder, .field textarea::placeholder { color: #97A3A1; }

.field.is-error input, .field.is-error textarea { color: var(--risk-600); }
.field__err { display: none; margin-top: 6px; font-size: 11.5px; color: var(--risk-600); }
.field.is-error .field__err { display: block; }

/* 日期横滑 */
.dates { display: flex; gap: 8px; margin: 2px -20px 0; padding: 2px 20px 4px; overflow-x: auto; scrollbar-width: none; }
.dates::-webkit-scrollbar { display: none; }

.date {
  flex: 0 0 auto; width: 52px; padding: 10px 0 11px;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--hairline); border-radius: 12px;
  transition: border-color .16s ease, background .16s ease;
}
.date em { display: block; font-style: normal; font-size: 10.5px; color: var(--ink-3); }
.date b {
  display: block; margin-top: 3px;
  font-size: 17px; font-weight: 600; letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
}
.date small { display: block; font-size: 9.5px; color: var(--ink-3); margin-top: 1px; }
.date[aria-pressed="true"] {
  color: #fff;
  background: linear-gradient(158deg, var(--brand-500), var(--brand-600));
  border-color: var(--brand-600);
  box-shadow: 0 3px 10px rgba(10, 118, 105, .26);
}
.date[aria-pressed="true"] em,
.date[aria-pressed="true"] small { color: rgba(255, 255, 255, .82); }
.date[aria-pressed="true"] b { color: #fff; }

/* 时段 */
.slots { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.slot {
  padding: 12px 10px; text-align: left;
  background: var(--surface);
  border: 1px solid var(--hairline); border-radius: 12px;
  font-size: 14px; font-weight: 500;
  transition: border-color .16s ease, background .16s ease;
}
.slot em {
  display: block; margin-top: 3px; font-style: normal;
  font-size: 11px; color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}
.slot[aria-pressed="true"] {
  border-color: var(--brand-400); background: var(--brand-50); color: var(--brand-700);
}
.slot[aria-pressed="true"] em { color: var(--brand-600); opacity: .85; }

.form__tip {
  margin: 18px 0 14px; padding: 12px 14px;
  font-size: 11.5px; line-height: 1.7; color: var(--brand-800);
  background: var(--brand-50);
  border-left: 3px solid var(--brand-400);
  border-radius: 4px var(--radius-sm) var(--radius-sm) 4px;
}

/* ---------- 14. 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 46px; padding: 0 22px;
  font-size: 14.5px; font-weight: 500; letter-spacing: .02em;
  border-radius: 12px;
  transition: transform .12s ease, opacity .16s ease;
}
.btn:active { transform: scale(.975); }

/* 主按钮用 brand-600 打底：白字 5.51:1，过 AA */
.btn--primary {
  background: var(--brand-600); color: #fff;
  box-shadow: 0 3px 12px rgba(10, 118, 105, .22);
}
.btn--primary:active { background: var(--brand-700); }
.btn--ghost {
  background: transparent; color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--hairline);
}
.btn--block { display: flex; width: 100%; }

/* ---------- 15. 预约成功凭证（报告风格） ---------- */
.receipt {
  margin: 10px 0 22px; padding: 24px 20px;
  background: var(--surface);
  border: 1px solid var(--hairline-2);
  border-top: 3px solid var(--ok-500);
  border-radius: var(--radius);
  text-align: center;
  box-shadow: 0 6px 24px rgba(12, 124, 61, .08);
}
.receipt__title { margin-top: 10px; font-size: 22px; font-weight: 700; letter-spacing: -.02em; }
.receipt__sub { margin-top: 8px; font-size: 12.5px; line-height: 1.7; color: var(--ink-2); }

.receipt__no {
  margin: 20px 0 16px; padding: 13px 0;
  border-top: 1px dashed var(--hairline);
  border-bottom: 1px dashed var(--hairline);
}
.receipt__no span { display: block; font-size: 10.5px; letter-spacing: .16em; color: var(--ink-3); }
.receipt__no b {
  display: block; margin-top: 4px;
  font-size: 17px; font-weight: 600; letter-spacing: .04em;
  font-variant-numeric: tabular-nums;
  color: var(--ok-700);
}

.receipt__list { text-align: left; }
.receipt__list > div {
  display: flex; justify-content: space-between; gap: 16px;
  padding: 9px 0; font-size: 12.5px;
}
.receipt__list dt { color: var(--ink-3); flex: 0 0 auto; }
.receipt__list dd { color: var(--ink); text-align: right; }

/* 条码：纯 CSS 渐变条纹，前台扫码取号 */
.barcode {
  height: 46px; margin: 20px 0 10px;
  background: repeating-linear-gradient(
    90deg,
    var(--ink) 0 2px, transparent 2px 4px,
    var(--ink) 4px 5px, transparent 5px 9px,
    var(--ink) 9px 12px, transparent 12px 14px
  );
  opacity: .88;
}
.receipt__foot { font-size: 10.5px; color: var(--ink-3); }

/* ---------- 16. 我的 ---------- */
/* 第二处品牌场：与首页同源，但更矮。
   首页和「我的」是身份页，套餐与预约是办事页 —— 颜色只在身份页上做重。 */
.profile {
  display: flex; align-items: center; gap: 14px;
  margin: -18px -20px 24px;
  padding: 24px 20px 26px;
  color: #fff;
  background:
    radial-gradient(88% 118% at 106% -20%, rgba(255, 255, 255, .20), transparent 56%),
    var(--brand-field);
}
.profile__avatar {
  width: 52px; height: 52px; flex: 0 0 auto;
  display: grid; place-items: center;
  font-size: 20px; font-weight: 600; color: #fff;
  /* 落在品牌场上就换成半透明白，否则头像会陷进背景里 */
  background: rgba(255, 255, 255, .17);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .32);
  border-radius: 16px;
}
.profile__name { font-size: 18px; font-weight: 650; letter-spacing: -.01em; }
.profile__meta { margin-top: 3px; font-size: 12px; color: rgba(255, 255, 255, .84); }

.stats {
  display: grid; grid-template-columns: repeat(3, 1fr);
  padding: 18px 0; margin-bottom: 26px;
  background: var(--surface);
  border: 1px solid var(--hairline-2);
  border-radius: var(--radius);
}
.stats > div { text-align: center; }
.stats > div + div { border-left: 1px solid var(--hairline-2); }
.stats b {
  display: block; font-size: 24px; font-weight: 650; letter-spacing: -.03em;
  font-variant-numeric: tabular-nums;
}
/* 三个计数各带一个身份色，数字本身区分「在办 / 待出 / 归档」 */
.stats > div:nth-child(1) b { color: var(--brand-600); }
.stats > div:nth-child(2) b { color: var(--info-600); }
.stats > div:nth-child(3) b { color: var(--ink); }
.stats span { display: block; margin-top: 3px; font-size: 11px; color: var(--ink-3); }

.menu { list-style: none; border-top: 1px solid var(--hairline); }
.menu li { border-bottom: 1px solid var(--hairline); }
.menu button {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; padding: 16px 0;
  font-size: 14.5px; font-weight: 500; text-align: left;
}
.menu em {
  font-style: normal; font-size: 11.5px; color: var(--ink-3); font-weight: 400;
}

/* ---------- 17. 底部导航 ---------- */
.tabbar {
  position: fixed; inset: auto 0 0 0; z-index: 30;
  height: calc(var(--nav-h) + var(--safe-b));
  padding-bottom: var(--safe-b);
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(1.6) blur(14px);
  -webkit-backdrop-filter: saturate(1.6) blur(14px);
  border-top: 1px solid var(--hairline-2);
}
.tabbar button {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; color: var(--ink-3);
  transition: color .16s ease;
}
.tabbar svg { width: 22px; height: 22px; }
.tabbar span { font-size: 10.5px; letter-spacing: .04em; }
.tabbar button[aria-selected="true"] { color: var(--brand-600); }
.tabbar button[aria-selected="true"] span { font-weight: 600; }

/* ---------- 18. 抽屉 ---------- */
.sheet { position: fixed; inset: 0; z-index: 50; }
.sheet__mask {
  position: absolute; inset: 0;
  background: rgba(10, 26, 24, .40);
  opacity: 0; transition: opacity .24s ease;
}
.sheet.is-open .sheet__mask { opacity: 1; }

.sheet__panel {
  position: absolute; inset: auto 0 0 0;
  max-height: 82vh; display: flex; flex-direction: column;
  padding: 8px 20px calc(20px + var(--safe-b));
  background: var(--paper);
  border-radius: 22px 22px 0 0;
  transform: translateY(101%);
  transition: transform .3s cubic-bezier(.2, .75, .3, 1);
  box-shadow: 0 -8px 40px rgba(10, 26, 24, .16);
}
.sheet__panel--short { padding-bottom: calc(24px + var(--safe-b)); }
.sheet.is-open .sheet__panel { transform: none; }

.sheet__grip {
  width: 34px; height: 4px; flex: 0 0 auto;
  margin: 4px auto 12px;
  background: var(--brand-200); border-radius: 2px;
}

.sheet__head { display: flex; align-items: flex-start; gap: 12px; padding-bottom: 14px; }
.sheet__title { font-size: 19px; font-weight: 650; letter-spacing: -.01em; }
.sheet__meta { margin-top: 4px; font-size: 12px; color: var(--ink-3); }
.sheet__close {
  margin-left: auto; width: 30px; height: 30px; flex: 0 0 auto;
  display: grid; place-items: center;
  font-size: 13px; color: var(--ink-2);
  background: var(--surface); border: 1px solid var(--hairline-2); border-radius: 50%;
}

.sheet__body { flex: 1 1 auto; overflow-y: auto; overscroll-behavior: contain; padding-bottom: 8px; }

.sheet__group { margin-bottom: 18px; }
.sheet__group h3 {
  margin-bottom: 9px; padding-bottom: 7px;
  font-size: 11.5px; font-weight: 600; letter-spacing: .1em; color: var(--brand-600);
  border-bottom: 1px solid var(--hairline);
}
.sheet__group li {
  display: flex; align-items: baseline; gap: 8px;
  padding: 5px 0; list-style: none;
  font-size: 12.5px; color: var(--ink-2);
}
.sheet__group li::before { content: "·"; color: var(--brand-400); }
.sheet__group ul { list-style: none; }

.sheet__foot {
  flex: 0 0 auto;
  display: flex; align-items: center; gap: 16px;
  padding-top: 14px; border-top: 1px solid var(--hairline);
}
.sheet__price b {
  font-size: 22px; font-weight: 650; letter-spacing: -.03em;
  font-variant-numeric: tabular-nums;
  color: var(--brand-700);
}
.sheet__price s { margin-left: 5px; font-size: 12px; color: var(--ink-3); }
.sheet__foot .btn { margin-left: auto; }

/* ---------- 19. 提示条 ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(var(--nav-h) + var(--safe-b) + 22px);
  z-index: 60;
  max-width: 78vw; padding: 10px 18px;
  font-size: 13px; color: #fff;
  background: rgba(6, 40, 36, .94);
  border-radius: 999px;
  transform: translate(-50%, 12px);
  opacity: 0; pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

.foot {
  padding: 6px 0 4px;
  font-size: 11px; line-height: 1.7; color: var(--ink-3);
  text-align: center;
}

/* ---------- 20. 桌面预览时收成手机宽度 ---------- */
@media (min-width: 680px) {
  body {
    display: flex; justify-content: center;
    background: #E4E8E8;
  }
  /* 只收窄内容层，遮罩保持全屏，否则桌面下会看到一条窄条盖住整页 */
  .topbar, .stage, .tabbar, .sheet__panel {
    left: 50%; width: 390px; transform: translateX(-50%);
  }
  .stage {
    position: fixed; top: var(--head-h); bottom: calc(var(--nav-h) + var(--safe-b));
    border-left: 1px solid var(--hairline-2); border-right: 1px solid var(--hairline-2);
  }
  .sheet__panel { transform: translate(-50%, 101%); }
  .sheet.is-open .sheet__panel { transform: translateX(-50%); }
}

/* ---------- 21. 尊重系统的减弱动效设置 ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}