/* ============================================================
 * CliBuddy - 云医伴 · 医生端 H5 原型（静态 HTML）
 * 项目：CliBuddy（与 DrAgent「云医生 AI 智能体」互不相干）
 * 设计令牌原出自共用 tokens.css，此处就地固化；rpx 已换算为 px（÷2）
 * 规范：页面底 #F5F5F5 / 白卡 / 正文 #333 / 卡片圆角 6px / 无投影
 * ============================================================ */

:root {
  /* 默认风格 = 云医伴·标准蓝 #3e8ef7（2026-11-01 定稿：与后台、落地页、宣传站同一主色） */
  --brand: #3e8ef7;
  --brand-dark: #3880de;
  --brand-soft: #ecf4fe;
  --accent: #ff9e01;
  --accent-bg: #fff6eb;
  --danger: #fe0419;
  --danger-bg: #ffedee;
  --success: #06b252;
  --success-bg: #e8f9f1;

  --ink-900: #263343;
  --ink-800: #333;
  --ink-600: #666;
  --ink-400: #999;
  --ink-300: #a2a6af;
  --ink-200: #e5e5e5;
  --ink-100: #efeff1;
  --ink-70: #f3f5f7;
  --ink-50: #f5f5f5;

  --text-1: var(--ink-800);
  --text-2: var(--ink-600);
  --text-3: var(--ink-400);

  --fs-cap: 11px;
  --fs-xs: 11px;
  --fs-sm: 12px;
  --fs-md: 13px;
  --fs-base: 14px;
  --fs-body: 15px;
  --fs-lg: 16px;
  --fs-xl: 18px;
  --fs-2xl: 20px;
  --fs-3xl: 22px;

  --sp-1: 5px;
  --sp-2: 10px;
  --sp-3: 15px;
  --sp-4: 20px;
  --page-x: 12px;
  --page-x-detail: 16px;

  --radius-card: 6px;
  --radius-input: 10px;
  --radius-chip: 4px;
  --radius-btn: 22px;

  --nav-h: 44px;
  --tab-h: 56px;

  /* 品牌渐变（头像底、医生头像环、签约卡都用它，跟随风格切换） */
  --brand-2: #4a6d95;
  --brand-grad: linear-gradient(135deg, var(--brand) 0%, var(--brand-2) 100%);
}

/* ============================================================
 * 风格管理（2026-10-28 甲方第 5 条）
 *
 * 切换方式：`document.body[data-theme="<key>"]`，由 `assets/app.js` 从
 * localStorage(`dr_theme`) 读取并**在页面渲染前**打好标记，才不会有闪一下默认色。
 *
 * ⚠️ 只覆盖**令牌**，不改任何组件的写死色（页面里已经全部走 var()）：
 *    新增风格 = 在下面加一个 body[data-theme=xxx] 块，不需要动组件样式。
 * ⚠️ 默认风格（standard = 标准蓝 #3e8ef7）不加属性 —— `body[data-theme=""]` 匹配不到，自然落回 :root。
 *
 * 2026-11-01 甲方两次调整后定稿：**默认主色统一为标准蓝 #3e8ef7**（后台 / 医生端 / 患者端 /
 * 落地页 / 宣传站同一套）；深海蓝 #2b4a6f 降为可选风格（navy）。另补两套医疗行业常用色
 * （医疗蓝 / 生命绿），医生端与患者端同一套 key。
 * ============================================================ */
body[data-theme="navy"] {
  --brand: #2b4a6f;
  --brand-dark: #233c5a;
  --brand-soft: #eaeef1;
  --brand-2: #4a6d95;
}

body[data-theme="medical"] {
  --brand: #0f6fc5;
  --brand-dark: #0d62ae;
  --brand-soft: #e7f1ff;
  --brand-2: #3f8bd9;
}

body[data-theme="vital"] {
  --brand: #2f9e44;
  --brand-dark: #2a8e3d;
  --brand-soft: #eaf4ec;
  --brand-2: #59b169;
}

body[data-theme="jade"] {
  --brand: #12a594;
  --brand-dark: #0b8a7c;
  --brand-soft: #e2f6f2;
  --brand-2: #4ecdc4;
  --accent: #f0a63c;
  --accent-bg: #fdf4e7;
}
body[data-theme="jade"] .bubble--me { color: #fff; }

body[data-theme="apricot"] {
  --brand: #e07a33;
  --brand-dark: #c2621f;
  --brand-soft: #fdeee1;
  --brand-2: #f2a860;
  --accent: #2f9e6f;
  --accent-bg: #e9f7f0;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body { margin: 0; padding: 0; }

body {
  background: #e9edf2;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", Arial, sans-serif;
  color: var(--text-1);
  font-size: var(--fs-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; border: 0; background: none; cursor: pointer; color: inherit; }
input, textarea { font-family: inherit; }

/* ---------- 手机外框 ---------- */
.app {
  position: relative;
  max-width: 390px;
  min-height: 100vh;
  margin: 0 auto;
  background: var(--ink-50);
  overflow-x: hidden;
  padding-bottom: calc(var(--tab-h) + 12px);
}
.app--no-tab { padding-bottom: 20px; }

/* ---------- 导航栏 ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  background: #fff;
  border-bottom: 1px solid var(--ink-200);
}
.nav__back {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: var(--ink-800);
  line-height: 1;
}
.nav__title {
  flex: 1;
  text-align: center;
  font-size: var(--fs-lg);
  font-weight: 700;
  color: var(--ink-900);
  padding-right: 44px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.nav__title--flush { padding-left: 8px; }

/* ---------- 品牌 LOGO ----------
   英文 CliBuddy + 中文 云医伴 组成一个整体 wordmark：
   不带方形图标，中文不是角标（不用小号带底色）。白底用标准蓝 #3e8ef7 + 中文近墨色。 */
.cblogo {
  display: inline-flex;
  align-items: baseline;
  gap: .34em;
  font-family: 'Poppins', 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI',
    'PingFang SC', 'Microsoft YaHei', sans-serif;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -.015em;
  line-height: 1;
  white-space: nowrap;
  color: #3e8ef7;
}
.cblogo b { font-weight: 800; letter-spacing: -.03em; }
.cblogo i { font-style: normal; font-weight: 800; font-size: .8em; letter-spacing: .06em; color: #16202e; }

.nav__right {
  min-width: 44px;
  padding-right: 12px;
  text-align: right;
  font-size: var(--fs-sm);
  color: var(--brand);
}

/* ---------- 页面容器 ---------- */
.page { padding: var(--page-x); }
.page--detail { padding: var(--page-x-detail); }
.section + .section { margin-top: var(--sp-3); }

.hd {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 0 0 8px;
}
.hd__t { font-size: var(--fs-base); font-weight: 700; color: var(--ink-900); }
.hd__more { font-size: var(--fs-sm); color: var(--text-3); }

/* ---------- 卡片 ---------- */
.card {
  background: #fff;
  border-radius: var(--radius-card);
  padding: 12px;
}
.card + .card { margin-top: 10px; }
.card__hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.card__t { font-size: var(--fs-base); font-weight: 700; color: var(--ink-900); }
.card__more { font-size: var(--fs-sm); color: var(--brand); }

/* ---------- 标签 ---------- */
.chip {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 6px;
  border-radius: var(--radius-chip);
  font-size: var(--fs-xs);
  line-height: 1;
  white-space: nowrap;
}
.chip--brand { background: var(--brand-soft); color: var(--brand-dark); }
.chip--warn { background: var(--accent-bg); color: #b96a00; }
.chip--danger { background: var(--danger-bg); color: var(--danger); }
.chip--ok { background: var(--success-bg); color: #03873e; }
.chip--gray { background: var(--ink-70); color: var(--text-2); }
.chip--line { border: 1px solid var(--ink-200); color: var(--text-2); }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 0 20px;
  border-radius: var(--radius-btn);
  font-size: var(--fs-body);
  font-weight: 700;
  background: var(--ink-70);
  color: var(--ink-800);
}
.btn--primary { background: var(--brand); color: #fff; }
.btn--primary:active { background: var(--brand-dark); }
.btn--ghost { background: #fff; border: 1px solid var(--ink-200); color: var(--ink-800); }
.btn--block { display: flex; width: 100%; }
.btn--sm { height: 32px; padding: 0 12px; font-size: var(--fs-sm); font-weight: 400; border-radius: 16px; }
.btn--disabled { background: var(--ink-100); color: var(--ink-300); }
.btn-row { display: flex; gap: 8px; }
.btn-row .btn { flex: 1; }

/* ---------- 列表行 ---------- */
.row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid var(--ink-100);
  font-size: var(--fs-base);
}
.row:last-child { border-bottom: 0; }
.row__main { flex: 1; min-width: 0; }
.row__t { color: var(--ink-800); }
.row__s { margin-top: 2px; font-size: var(--fs-sm); color: var(--text-3); }
.row__v { font-size: var(--fs-base); color: var(--text-2); }
.row__arrow { color: var(--ink-300); font-size: 15px; }

/* ---------- 四宫格 ---------- */
.grid4 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.grid4__item {
  display: block;
  background: #fff;
  border-radius: var(--radius-card);
  padding: 14px 12px;
}
.grid4__ico {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--brand-soft);
  color: var(--brand);
  margin-bottom: 8px;
}
.grid4__ico svg { width: 19px; height: 19px; }
.grid4__t { font-size: var(--fs-base); font-weight: 700; color: var(--ink-900); }
.grid4__s { margin-top: 2px; font-size: var(--fs-sm); color: var(--text-3); }

/* ---------- 底部 TabBar ---------- */
.tabbar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 390px;
  height: var(--tab-h);
  background: #fff;
  border-top: 1px solid var(--ink-200);
  display: flex;
  z-index: 30;
}
.tabbar__item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font-size: 10px;
  color: var(--text-3);
}
.tabbar__item svg { width: 21px; height: 21px; }
.tabbar__item.is-on { color: var(--brand); }

/* ---------- 聊天气泡 ---------- */
.chat { padding: 12px; display: flex; flex-direction: column; gap: 12px; }
.msg { display: flex; gap: 8px; max-width: 88%; }
.msg--me { align-self: flex-end; flex-direction: row-reverse; }
.msg__ava {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--brand-soft); color: var(--brand-dark);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; flex: none;
}
.msg__ava--me { background: var(--ink-70); color: var(--text-2); }
.bubble {
  padding: 9px 12px;
  border-radius: 10px;
  background: #fff;
  font-size: var(--fs-base);
  line-height: 1.55;
  color: var(--ink-800);
}
.bubble--me { background: var(--brand); color: #fff; border-bottom-right-radius: 3px; }
.bubble--ai { border-bottom-left-radius: 3px; }
.bubble strong { font-weight: 700; }

/* 对话内动作卡 */
.act {
  border: 1px solid var(--ink-200);
  border-radius: var(--radius-card);
  padding: 12px;
  background: #fff;
  margin-top: 6px;
}
.act__hd { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; }
.act__badge {
  font-size: 10px; padding: 1px 5px; border-radius: 3px;
  background: var(--brand-soft); color: var(--brand-dark);
}
.act__t { font-size: var(--fs-base); font-weight: 700; }
.act__d { font-size: var(--fs-sm); color: var(--text-2); line-height: 1.5; }
.act__foot { display: flex; gap: 8px; margin-top: 10px; }

/* ---------- 表单 ---------- */
.field { background: #fff; border-radius: var(--radius-card); padding: 12px; }
.field + .field { margin-top: 10px; }
.field__label {
  font-size: var(--fs-sm); color: var(--text-3); margin-bottom: 6px;
}
.input {
  width: 100%; height: 40px; border: 0; outline: 0;
  background: var(--ink-70); border-radius: var(--radius-input);
  padding: 0 12px; font-size: var(--fs-base); color: var(--ink-800);
}
.input::placeholder { color: var(--ink-300); }
.opt-row { display: flex; gap: 8px; flex-wrap: wrap; }
.opt {
  padding: 6px 14px; border-radius: 16px; font-size: var(--fs-sm);
  background: var(--ink-70); color: var(--text-2); border: 1px solid transparent;
}
.opt.is-on { background: var(--brand-soft); color: var(--brand-dark); border-color: var(--brand); font-weight: 700; }
.check { display: flex; align-items: flex-start; gap: 8px; font-size: var(--fs-sm); color: var(--text-2); line-height: 1.5; }
.check__box {
  width: 16px; height: 16px; border-radius: 4px; border: 1.5px solid var(--ink-200);
  flex: none; margin-top: 1px; display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 11px;
}
.check__box.is-on { background: var(--brand); border-color: var(--brand); }

/* ---------- 指标 ---------- */
.metric { display: flex; align-items: baseline; gap: 4px; }
.metric__v { font-size: var(--fs-2xl); font-weight: 700; color: var(--ink-900); font-variant-numeric: tabular-nums; }
.metric__v--up { color: var(--danger); }
.metric__u { font-size: var(--fs-sm); color: var(--text-3); }
.metric__d { font-size: var(--fs-sm); color: var(--text-3); }

/* ---------- 时间线 ---------- */
.tl { position: relative; padding-left: 18px; }
.tl::before {
  content: ""; position: absolute; left: 4px; top: 4px; bottom: 4px;
  width: 1px; background: var(--ink-200);
}
.tl__item { position: relative; padding-bottom: 14px; }
.tl__item:last-child { padding-bottom: 0; }
.tl__dot {
  position: absolute; left: -18px; top: 5px;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--brand); border: 2px solid #fff; box-shadow: 0 0 0 1px var(--brand-soft);
}
.tl__dot--gray { background: var(--ink-300); box-shadow: 0 0 0 1px var(--ink-70); }
.tl__dot--warn { background: var(--accent); box-shadow: 0 0 0 1px var(--accent-bg); }
.tl__date { font-size: var(--fs-xs); color: var(--text-3); }
.tl__t { font-size: var(--fs-base); color: var(--ink-800); font-weight: 700; }
.tl__d { font-size: var(--fs-sm); color: var(--text-2); }

/* ---------- 步骤条 ---------- */
.steps { display: flex; align-items: center; gap: 6px; padding: 12px; background: #fff; }
.steps__i {
  flex: 1; height: 3px; border-radius: 2px; background: var(--ink-100);
}
.steps__i.is-done { background: var(--brand); }
.steps__i.is-cur { background: var(--brand); opacity: .55; }

/* ---------- 提示条 ---------- */
.notice {
  /* ⚠️ 不能用 flex：纯文本 + <b> 混合时，浏览器会把每段文字拆成独立 flex 项，
     「问的是」会被压成一字一列竖排（医生端「问档案」实测踩到）。 */
  display: block;
  background: var(--accent-bg); color: #8a5200;
  border-radius: var(--radius-card); padding: 10px 12px;
  font-size: var(--fs-sm); line-height: 1.5;
}
.notice--brand { background: var(--brand-soft); color: var(--brand-dark); }
/* 提示条里的日期/次数不能被拆行（「11-03」被断成「11-」+「03」很扎眼） */
.notice b { white-space: nowrap; }
.notice--danger { background: var(--danger-bg); color: var(--danger); }
.notice--gray { background: var(--ink-70); color: var(--text-2); }

.disclaimer {
  padding: 10px 12px; font-size: var(--fs-xs); color: var(--text-3);
  line-height: 1.5; text-align: center;
}

/* ---------- 空状态 / 加载 ---------- */
.empty { padding: 40px 20px; text-align: center; color: var(--text-3); font-size: var(--fs-sm); }

/* ---------- 打卡圆点 ---------- */
.dots { display: flex; gap: 6px; flex-wrap: wrap; }
.dot {
  width: 26px; height: 26px; border-radius: 6px;
  background: var(--ink-70); color: var(--text-3);
  font-size: 10px; display: flex; align-items: center; justify-content: center;
}
.dot.is-done { background: var(--success-bg); color: #03873e; }
.dot.is-today { background: var(--brand); color: #fff; font-weight: 700; }

/* ---------- 图表 ---------- */
.chart { width: 100%; height: 96px; display: block; }
.chart-legend { display: flex; gap: 12px; font-size: var(--fs-xs); color: var(--text-3); }

/* ---------- 原型导航浮标 ---------- */
.pnav {
  position: fixed; left: 10px; bottom: calc(var(--tab-h) + 14px);
  z-index: 40; width: 32px; height: 32px; border-radius: 50%;
  background: rgba(38, 51, 67, .55); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; backdrop-filter: blur(2px);
}
.app--no-tab .pnav { bottom: 16px; }

/* ---------- 右侧二维码入口（手机扫码看） ---------- */
.qr { position: fixed; right: 0; top: 50%; transform: translateY(-50%); z-index: 60; display: none; }
@media (min-width: 900px) { .qr { display: block; } }

.qr__tab {
  display: flex; align-items: center; gap: 6px;
  writing-mode: vertical-rl;
  background: var(--brand, #3e8ef7); color: #fff;
  border-radius: 8px 0 0 8px;
  padding: 16px 7px;
  font-size: 12px; letter-spacing: 2px;
  cursor: pointer; user-select: none;
  transition: opacity .18s ease;
}
/* 展开时把竖条让给二维码，避免两块叠在一起 */
.qr.is-open .qr__tab { opacity: 0; pointer-events: none; }
.qr__tab i { font-style: normal; letter-spacing: 0; font-size: 13px; }

.qr__panel {
  position: absolute; right: 34px; top: 50%;
  width: 210px; background: #fff; border-radius: 10px; padding: 14px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, .16);
  opacity: 0; pointer-events: none;
  transform: translate(10px, -50%);
  transition: opacity .18s ease, transform .18s ease;
}
.qr.is-open .qr__panel { opacity: 1; pointer-events: auto; transform: translate(0, -50%); }
.qr__panel { right: 8px; }

.qr__hd { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.qr__hd b { font-size: 13px; color: var(--ink-900); }
.qr__x { cursor: pointer; color: var(--ink-300); font-size: 16px; line-height: 1; padding: 0 2px; }
.qr__img {
  display: block; width: 100%; height: auto; border-radius: 4px;
  background: var(--ink-70);
}
.qr__url {
  margin-top: 8px; font-size: 10px; color: var(--text-3); word-break: break-all; line-height: 1.5;
  background: var(--ink-70); border-radius: 4px; padding: 5px 6px; font-family: ui-monospace, monospace;
}
.qr__hint { margin-top: 6px; font-size: 10px; color: var(--text-3); line-height: 1.5; }
.qr__copy {
  margin-top: 8px; height: 28px; width: 100%; border-radius: 14px;
  background: var(--brand-soft); color: var(--brand-dark);
  font-size: 12px; font-weight: 700;
}
.qr__err { padding: 18px 0; text-align: center; font-size: 11px; color: var(--danger); line-height: 1.6; }

/* ============================================================
 * 2026-10-28 甲方第 1~4 条：首页视觉重做
 *   · 小 LOGO + 真实头像 + 诊所 Banner
 *   · 签约医生提到最上、带照片 / 擅长 / 出诊状态
 *   · 患者信息压成一行（自己看自己没意义）
 *   · 页脚诊所信息卡
 * ============================================================ */

/* ---------- 图片头像 ---------- */
.ava {
  display: block; border-radius: 50%; object-fit: cover;
  background: var(--ink-70); flex: none;
}
.ava--r { border-radius: 10px; }

/* ---------- 小 LOGO（纯 CSS/SVG，跟随品牌色，不额外请求图片） ---------- */
.logo {
  width: 26px; height: 26px; border-radius: 8px;
  background: var(--brand-grad);
  display: flex; align-items: center; justify-content: center;
  flex: none;
}
.logo svg { width: 16px; height: 16px; color: #fff; }
.logo--lg { width: 34px; height: 34px; border-radius: 10px; }
.logo--lg svg { width: 20px; height: 20px; }

/* ---------- 首页 Banner ---------- */
.hero {
  position: relative;
  height: 178px;
  overflow: hidden;
  background: var(--brand-dark);
}
.hero__img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  /* 主体（门面与灯箱）在画面中偏下，往上提一点裁切重心，别把地面全裁进来 */
  object-fit: cover; object-position: center 58%;
}
.hero__mask {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(12, 22, 34, .58) 0%, rgba(12, 22, 34, .18) 42%, rgba(12, 22, 34, .72) 100%);
}
.hero__body {
  position: relative; z-index: 1;
  height: 100%; padding: 12px 14px;
  display: flex; flex-direction: column;
}
.hero__top { display: flex; align-items: center; gap: 8px; }
.hero__name { font-size: var(--fs-lg); font-weight: 700; color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,.3); }
.hero__ava {
  border: 2px solid rgba(255,255,255,.85);
  box-shadow: 0 2px 8px rgba(0,0,0,.25);
}
/* 头像外面包了一层 <a>（点击进档案），靠右要让**链接**成为 flex item 才生效 */
.hero__top > a { margin-left: auto; flex: none; display: block; }
.hero__bottom { margin-top: auto; }
.hero__sub { font-size: 12px; color: rgba(255,255,255,.9); margin-top: 3px; }
.hero__tags { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.hero__tag {
  font-size: 11px; line-height: 1; padding: 4px 7px; border-radius: 4px;
  /* 不用 backdrop-filter：它会把背后一层文字糊成"重影"（实测 Banner 副标题叠了两层） */
  background: rgba(255,255,255,.22); color: #fff;
}

/* ---------- 患者信息（弱化：一行，不再是大卡片） ---------- */
.who {
  display: flex; align-items: center; gap: 6px;
  padding: 9px 2px 0;
  font-size: 12px; color: var(--text-3);
}
.who__n { color: var(--text-2); font-weight: 700; }
.who__more { margin-left: auto; color: var(--brand); }

/* ---------- 签约医生卡（首页重点） ---------- */
.doc {
  display: block; background: #fff; border-radius: var(--radius-card);
  /* 2026-10-28 甲方第 2 条：这张卡是首页主角，给足留白（比普通卡更松） */
  padding: 15px 14px; position: relative; overflow: hidden;
}
.doc::after {
  /* 右上角一枚极淡的品牌色弧，让白卡有点色彩又不抢内容 */
  content: ""; position: absolute; right: -26px; top: -30px;
  width: 92px; height: 92px; border-radius: 50%;
  background: var(--brand-soft); opacity: .75;
}
.doc__hd { display: flex; gap: 12px; position: relative; z-index: 1; }
.doc__ph {
  /* 照片放大到 74（原 58）：这是患者认人的唯一依据，太小等于没有 */
  width: 74px; height: 74px; border-radius: 12px; object-fit: cover;
  flex: none; box-shadow: 0 0 0 2px var(--brand-soft);
}
.doc__body { flex: 1; min-width: 0; padding-top: 1px; }
.doc__name { display: flex; align-items: center; gap: 6px; font-size: 16px; font-weight: 700; color: var(--ink-900); }
.doc__meta { font-size: 12px; color: var(--text-3); margin-top: 4px; }
/* ⚠️ 这里**不能用 flex**：「擅长」那枚小标签会被压成 1 个字宽，
   两个字竖着排（实测踩到）。用行内块 + nowrap，永远是一行，
   后面的正文在它右边自然折行。 */
.doc__good {
  font-size: 12px; color: var(--text-2); margin-top: 6px; line-height: 18px;
}
.doc__good b { color: var(--ink-800); font-weight: 400; }
.doc__good em {
  display: inline-block; font-style: normal;
  color: var(--brand-dark); background: var(--brand-soft);
  padding: 0 5px; border-radius: 3px; margin-right: 4px;
  white-space: nowrap; line-height: 18px;
}
.doc__status { display: flex; align-items: center; gap: 6px; margin-top: 11px; flex-wrap: wrap; }
.doc__go { margin-left: auto; font-size: var(--fs-sm); color: var(--brand); flex: none; }
.doc__acts { display: flex; gap: 9px; margin-top: 13px; position: relative; z-index: 1; }
.doc__acts .btn { flex: 1; height: 40px; font-size: var(--fs-base); border-radius: 20px; }

/* ---------- 便捷服务（原「四大入口」） ---------- */
.svc { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.svc__item {
  display: block; background: #fff; border-radius: var(--radius-card);
  padding: 13px 12px; position: relative; overflow: hidden;
}
.svc__ico {
  width: 34px; height: 34px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 8px;
  background: var(--t-bg, var(--brand-soft)); color: var(--t-fg, var(--brand));
}
.svc__ico svg { width: 19px; height: 19px; }
.svc__t { font-size: var(--fs-base); font-weight: 700; color: var(--ink-900); }
.svc__s { margin-top: 2px; font-size: var(--fs-sm); color: var(--text-3); }
/* 四格各自一种色（甲方「让页面有点色彩」）。
   ⚠️ 这四色**固定**、不跟随风格令牌：它们表达的是"功能类别"（问诊/自测/舌诊/报告），
      不是品牌色。若第 1 格跟着品牌色走，切到「青竹绿」时会和第 2 格的绿撞色 ——
      四个入口变成两绿一橙一紫，反而分不清。 */
.svc__item:nth-child(1) { --t-bg: #e8f0ff; --t-fg: #3e8ef7; }
.svc__item:nth-child(2) { --t-bg: #e8f9f1; --t-fg: #03873e; }
.svc__item:nth-child(3) { --t-bg: #fdf3e6; --t-fg: #c47a12; }
.svc__item:nth-child(4) { --t-bg: #efecff; --t-fg: #6b5bd6; }

/* ---------- 诊所信息卡（首页底部） ---------- */
.clinic { background: #fff; border-radius: var(--radius-card); padding: 12px; }
.clinic__hd { display: flex; gap: 10px; }
.clinic__thumb { width: 54px; height: 54px; border-radius: 8px; object-fit: cover; flex: none; }
.clinic__name { font-size: 15px; font-weight: 700; color: var(--ink-900); }
.clinic__good { font-size: 12px; color: var(--text-3); margin-top: 3px; line-height: 1.5; }
.clinic__lines { margin-top: 10px; border-top: 1px solid var(--ink-100); padding-top: 8px; }
.clinic__line {
  display: flex; gap: 7px; align-items: flex-start;
  font-size: 12px; color: var(--text-2); padding: 3px 0; line-height: 1.5;
}
.clinic__line i { font-style: normal; color: var(--ink-300); width: 13px; flex: none; text-align: center; }
.clinic__acts { display: flex; gap: 8px; margin-top: 10px; }
.clinic__acts .btn { flex: 1; height: 32px; font-size: 12px; border-radius: 16px; }

/* ---------- 医生详情：头图 ---------- */
.dochero { position: relative; height: 210px; overflow: hidden; background: var(--ink-900); }
.dochero__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.dochero__mask {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(12,22,34,.15) 0%, rgba(12,22,34,.05) 40%, rgba(12,22,34,.82) 100%);
}
.dochero__body { position: absolute; left: 0; right: 0; bottom: 0; padding: 12px 16px; }
.dochero__name { font-size: 20px; font-weight: 700; color: #fff; }
.dochero__meta { font-size: 12px; color: rgba(255,255,255,.86); margin-top: 4px; }

/* ---------- 出诊时段 ---------- */
.slot { display: flex; gap: 8px; }
.slot__d {
  flex: 1; border: 1px solid var(--ink-200); border-radius: var(--radius-card);
  padding: 9px 6px; text-align: center;
}
.slot__d.is-on { border-color: var(--brand); background: var(--brand-soft); }
.slot__w { font-size: 10px; color: var(--text-3); }
.slot__d.is-on .slot__w { color: var(--brand-dark); }
.slot__n { font-size: 14px; font-weight: 700; color: var(--ink-800); margin-top: 1px; }
.slot__t { font-size: 10px; color: var(--text-3); margin-top: 3px; line-height: 1.4; }
.slot__d.is-on .slot__t { color: var(--brand-dark); }

/* ---------- 设置：开关 ---------- */
.sw { position: relative; width: 40px; height: 23px; flex: none; }
.sw input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; }
.sw__b {
  position: absolute; inset: 0; border-radius: 12px; background: var(--ink-200);
  transition: background .16s;
}
.sw__b::after {
  content: ""; position: absolute; top: 2px; left: 2px;
  width: 19px; height: 19px; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,.18); transition: transform .16s;
}
.sw input:checked + .sw__b { background: var(--brand); }
.sw input:checked + .sw__b::after { transform: translateX(17px); }

/* ---------- 设置：风格色卡 ---------- */
/* 风格色卡：2026-11-01 起有 6 套（深海蓝 / 经典蓝 / 医疗蓝 / 生命绿 / 青竹绿 / 暖杏橙），
   一行放不下 → 三列两行。 */
.themes { display: flex; flex-wrap: wrap; gap: 10px; }
.theme {
  flex: 1 1 calc(33.333% - 7px); min-width: 0;
  border: 1.5px solid var(--ink-200); border-radius: var(--radius-card);
  padding: 10px 6px; text-align: center; position: relative; background: #fff;
}
.theme.is-on { border-color: var(--brand); }
.theme__dots { display: flex; justify-content: center; gap: 4px; }
.theme__dots span { width: 15px; height: 15px; border-radius: 50%; display: block; }
.theme__n { display: block; font-size: 12px; font-weight: 700; color: var(--ink-800); margin-top: 7px; }
.theme__d { display: block; font-size: 10px; color: var(--text-3); margin-top: 1px; }
.theme.is-on .theme__n { color: var(--brand-dark); }
.theme__ck {
  position: absolute; top: -6px; right: -6px;
  width: 17px; height: 17px; border-radius: 50%;
  background: var(--brand); color: #fff; font-size: 11px;
  display: none; align-items: center; justify-content: center;
}
.theme.is-on .theme__ck { display: flex; }

/* 行尾「标签 + 箭头」不要让标签贴到箭头上（个人中心「我的预约」那行） */
.row .chip + .row__arrow { margin-left: 8px; }

/* ---------- 统一页脚（AI 免责 / 诊所资质） ----------
   ⚠️ 2026-10-29 甲方定稿：删掉原来第三行「绿萝云 · CliBuddy.CN」（连同小 logo），
      页脚只留免责与资质两段。品牌识别由顶栏与启动页承担，不在页脚重复。 */
.foot { padding: 18px 14px 6px; }
.foot__i {
  font-size: var(--fs-cap); color: var(--ink-300);
  line-height: 1.75; text-align: center;
}
.foot__i + .foot__i { margin-top: 5px; }

/* ============================================================
 * 字体大小（2026-10-29 甲方第 1 条：参考微信的字体大小设置，支持多档）
 *
 * 5 档：1 标准 / 2 较大 / 3 大 / 4 很大 / 5 特大。
 * 用 `body[data-care="N"]` 标记，状态存 localStorage(`dr_care_size`)，默认 1。
 *
 * 实现思路与微信一致：**只缩放文字与间距，不动布局结构**。
 *   ① 设计令牌 --fs-* 一律写成 calc(基准 + 系数 × --bump) —— 改一处，全站生效；
 *   ② 原型里还有大量内联 px 字号（老页面遗留），用 [style*=...] 兜底，同样乘 --bump；
 *   ③ 档位 ≥4 自动精简（隐藏各区块右侧小链接与 .hide-care 标记的次要信息）。
 *
 * ⚠️ 不用 zoom / transform: scale 整体放大：那会连 390px 视口一起缩，
 *    等于把手机压成 320px 宽，反而更容易挤成两行。
 * ⚠️ 医生端与患者端**必须用同一份规则**，否则两端对同一患者看到的字号不一致。
 * ============================================================ */
body[data-care="1"] { --bump: 0px; }
body[data-care="2"] { --bump: 1.5px; }
body[data-care="3"] { --bump: 3px; }
body[data-care="4"] { --bump: 4.5px; }
body[data-care="5"] { --bump: 6px; }

body[data-care] {
  --fs-cap: calc(11px + .7 * var(--bump));
  --fs-xs: calc(11px + .7 * var(--bump));
  --fs-sm: calc(12px + .8 * var(--bump));
  --fs-md: calc(13px + .9 * var(--bump));
  --fs-base: calc(14px + 1 * var(--bump));
  --fs-body: calc(15px + 1.1 * var(--bump));
  --fs-lg: calc(16px + 1.2 * var(--bump));
  --fs-xl: calc(18px + 1.4 * var(--bump));
  --fs-2xl: calc(20px + 1.6 * var(--bump));
  --fs-3xl: calc(24px + 2 * var(--bump));
}

/* 内联字号的兜底（原型的权宜之计：正式实现应把字号全部收敛到上面的令牌） */
body[data-care] [style*="font-size:11px"] { font-size: calc(11px + .7 * var(--bump)) !important; }
body[data-care] [style*="font-size:12px"] { font-size: calc(12px + .8 * var(--bump)) !important; }
body[data-care] [style*="font-size:13px"] { font-size: calc(13px + .9 * var(--bump)) !important; }
body[data-care] [style*="font-size:14px"] { font-size: calc(14px + 1 * var(--bump)) !important; }
body[data-care] [style*="font-size:15px"] { font-size: calc(15px + 1.1 * var(--bump)) !important; }
body[data-care] [style*="font-size:16px"] { font-size: calc(16px + 1.2 * var(--bump)) !important; }
body[data-care] [style*="font-size:17px"] { font-size: calc(17px + 1.3 * var(--bump)) !important; }
body[data-care] [style*="font-size:18px"] { font-size: calc(18px + 1.4 * var(--bump)) !important; }
body[data-care] [style*="font-size:20px"] { font-size: calc(20px + 1.6 * var(--bump)) !important; }

/* 间距与控件跟着长，否则大字号会挤成一坨 */
body[data-care] .card { padding: calc(12px + .6 * var(--bump)); }
body[data-care] .row { padding: calc(12px + .6 * var(--bump)) 0; }
body[data-care] .btn { height: calc(44px + 2 * var(--bump)); }
body[data-care] .btn--sm { height: calc(32px + 1.4 * var(--bump)); padding: 0 calc(12px + 1.2 * var(--bump)); }
body[data-care] .chip { height: calc(20px + .9 * var(--bump)); padding: 0 calc(6px + .6 * var(--bump)); }
body[data-care] .doc__ph { width: calc(74px + 2 * var(--bump)); height: calc(74px + 2 * var(--bump)); }
body[data-care] .svc__ico,
body[data-care] .grid4__ico { width: calc(34px + 1 * var(--bump)); height: calc(34px + 1 * var(--bump)); }
body[data-care] .tabbar { height: calc(56px + 2 * var(--bump)); }
body[data-care] .tabbar__item svg { width: calc(22px + .6 * var(--bump)); height: calc(22px + .6 * var(--bump)); }
body[data-care] .hero { height: calc(178px + 4 * var(--bump)); }
body[data-care] .hero__ava { width: calc(34px + 1.5 * var(--bump)); height: calc(34px + 1.5 * var(--bump)); }
body[data-care] .logo { width: calc(26px + 1 * var(--bump)); height: calc(26px + 1 * var(--bump)); }
body[data-care] .search input,
body[data-care] .composer input { height: calc(38px + 1.6 * var(--bump)); }

/* 4 档以上自动精简：一屏塞不下那么多信息了，先砍次要的 */
body[data-care="4"] .hide-care,
body[data-care="5"] .hide-care { display: none !important; }
body[data-care="4"] .hd__more,
body[data-care="5"] .hd__more { display: none; }


/* ---------- 详情页底部操作条 ---------- */
.actbar {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 390px;
  background: #fff; border-top: 1px solid var(--ink-200);
  padding: 8px 12px; display: flex; gap: 8px; z-index: 30;
}
.actbar .btn { flex: 1; height: 40px; font-size: 14px; }
.app--actbar { padding-bottom: calc(56px + 14px); }

/* ---------- 原型索引页 ---------- */
.index { max-width: 760px; margin: 0 auto; padding: 28px 20px 60px; }
.index h1 { font-size: 22px; margin: 0 0 6px; color: #263343; }
.index p.sub { margin: 0 0 22px; color: #666; font-size: 13px; line-height: 1.7; }
.index h2 { font-size: 14px; margin: 26px 0 10px; color: #263343; letter-spacing: .04em; }
.links { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.link {
  display: block; background: #fff; border-radius: 8px; padding: 12px 14px;
  border: 1px solid #e5e5e5;
}
.link:hover { border-color: var(--brand); }
.link b { display: block; font-size: 14px; color: #263343; }
.link span { display: block; margin-top: 3px; font-size: 12px; color: #999; line-height: 1.5; }
.flow { background: #fff; border-radius: 8px; padding: 14px 16px; font-size: 13px; color: #444; line-height: 2; border: 1px solid #e5e5e5; }
.flow code { background: #f3f5f7; padding: 1px 5px; border-radius: 4px; font-size: 12px; color: #263343; }

/* ============================================================
 * 医生端（H5 工作台）2026-10-28
 * 与患者端同源（同一套令牌与基础组件），只补"工作台感"的组件：
 * 数字待办、待办条目、风险徽标、指标格、分段筛选、患者行、对话输入条。
 * ⚠️ 医生端信息密度比患者端高，字号整体沿用令牌，不再单独放大。
 * ============================================================ */

/* 顶部问候 */
.wk { padding: 14px 14px 0; display: flex; align-items: flex-start; gap: 10px; }
.wk__hi { font-size: var(--fs-xl); font-weight: 700; color: var(--ink-900); line-height: 1.35; }
.wk__date { font-size: var(--fs-sm); color: var(--text-3); margin-top: 4px; }

/* 四数待办 */
.nums { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.num {
  background: #fff; border-radius: var(--radius-card); padding: 12px 13px;
  display: flex; align-items: center; gap: 11px;
}
.num__v {
  font-size: 26px; font-weight: 700; line-height: 1; flex: none;
  font-variant-numeric: tabular-nums; color: var(--ink-900); min-width: 26px; text-align: center;
}
.num__t { font-size: var(--fs-sm); color: var(--ink-800); font-weight: 700; }
.num__s { font-size: var(--fs-cap); color: var(--text-3); margin-top: 2px; }
.num--warn .num__v { color: var(--accent); }
.num--danger .num__v { color: var(--danger); }

/* 待办条目 */
.task { display: flex; gap: 9px; padding: 12px 0; border-bottom: 1px solid var(--ink-100); }
.task:last-child { border-bottom: 0; padding-bottom: 0; }
.task:first-child { padding-top: 0; }
.task__dot { width: 6px; height: 6px; border-radius: 50%; background: var(--brand); margin-top: 8px; flex: none; }
.task__dot--danger { background: var(--danger); }
.task__dot--warn { background: var(--accent); }
.task__main { flex: 1; min-width: 0; }
.task__t {
  font-size: var(--fs-base); font-weight: 700; color: var(--ink-900);
  display: flex; gap: 6px; align-items: center; flex-wrap: wrap;
}
.task__s { font-size: var(--fs-sm); color: var(--text-3); margin-top: 3px; line-height: 1.6; }
.task__act { flex: none; align-self: center; }
/* 「需要我处理」的两个按钮：靠右收在卡片右端（2026-11-01 甲方：原来贴在文字左下角，位置不对）。
   不放到标题行右侧——标题里有患者名 + 状态 + 日期，两枚按钮并排挤在同一行会把标题折断。 */
.task__acts { margin-top: 8px; display: flex; gap: 8px; justify-content: flex-end; }

/* 风险徽标 */
.risk { font-size: var(--fs-xs); padding: 1px 6px; border-radius: 3px; line-height: 1.6; flex: none; }
.risk--high { background: var(--danger-bg); color: var(--danger); }
.risk--mid { background: var(--accent-bg); color: #b96a00; }
.risk--low { background: var(--success-bg); color: #03873e; }

/* 指标格 */
.mgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.mbox { background: var(--ink-50); border-radius: 8px; padding: 9px 10px; }
.mbox__t { font-size: var(--fs-cap); color: var(--text-3); }
.mbox__v {
  font-size: var(--fs-xl); font-weight: 700; color: var(--ink-900);
  margin-top: 2px; font-variant-numeric: tabular-nums;
}
.mbox__v.is-up { color: var(--danger); }
.mbox__d { font-size: var(--fs-cap); color: var(--text-3); margin-top: 1px; }

/* 分段筛选 */
.seg { display: flex; gap: 6px; overflow-x: auto; padding: 2px 0 2px; -webkit-overflow-scrolling: touch; }
.seg::-webkit-scrollbar { display: none; }
.seg__i {
  flex: none; font-size: var(--fs-sm); padding: 6px 12px; border-radius: 15px;
  background: #fff; color: var(--text-2); border: 1px solid var(--ink-200);
}
.seg__i.is-on { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 700; }

/* 患者列表行 */
.pt { display: flex; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--ink-100); align-items: center; }
.pt:first-child { padding-top: 0; }
.pt:last-child { border-bottom: 0; padding-bottom: 0; }
.pt__main { flex: 1; min-width: 0; }
.pt__n { font-size: var(--fs-base); font-weight: 700; color: var(--ink-900); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.pt__m { font-size: var(--fs-sm); color: var(--text-3); margin-top: 3px; line-height: 1.5; }

/* 顶部搜索 */
.search { display: flex; align-items: center; gap: 8px; background: #fff; border-radius: 18px; padding: 8px 14px; }
.search input { flex: 1; border: 0; outline: 0; font-size: var(--fs-base); background: transparent; color: var(--ink-800); }
.search input::placeholder { color: var(--ink-300); }

/* 医生名片 + 患者建档二维码 */
.dcard { background: var(--brand-grad); color: #fff; border-radius: var(--radius-card); padding: 16px 15px; }
.qrbox { background: #fff; border-radius: 10px; padding: 9px; width: 124px; flex: none; }
.qrbox img { width: 100%; display: block; border-radius: 4px; }
.qrbox__t { font-size: 10px; color: var(--text-3); text-align: center; margin-top: 5px; }

/* 底部长文本输入（问档案） */
.composer {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 390px; background: #fff;
  border-top: 1px solid var(--ink-200); padding: 8px 12px;
  display: flex; gap: 8px; z-index: 30;
}
.composer input {
  flex: 1; height: 38px; border-radius: 19px; border: 1px solid var(--ink-200);
  padding: 0 14px; font-size: var(--fs-base); background: var(--ink-50); outline: 0;
}
.app--composer { padding-bottom: 84px; }

/* 出处引用（AI 答完给链接） */
.src {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: var(--fs-xs); color: var(--brand); background: var(--brand-soft);
  padding: 2px 7px; border-radius: 4px; margin: 2px 4px 2px 0;
}

/* 小号统计行 */
.stat { display: flex; gap: 18px; }
.stat__i { font-size: var(--fs-sm); color: var(--text-3); }
.stat__i b { font-size: var(--fs-lg); color: var(--ink-900); font-variant-numeric: tabular-nums; }

/* 轻提示（复制话术 / 确认发送后的反馈） */
.toast {
  position: fixed; left: 50%; bottom: 84px; transform: translateX(-50%);
  max-width: 300px; background: rgba(22, 28, 36, .92); color: #fff;
  font-size: 13px; line-height: 1.5; padding: 9px 14px; border-radius: 8px;
  z-index: 60; text-align: center;
  transition: opacity .3s, transform .3s;
}
.toast.is-out { opacity: 0; transform: translate(-50%, 8px); }

/* 医生端「问档案」：气泡直接放在 .page 里（没有 .msg 包裹），
   需要自己收窄并贴边 —— 否则会撑满整行，看不出谁在说话。 */
.bubble--me { margin-left: auto; max-width: 82%; width: fit-content; }
.bubble--ai { margin-right: auto; max-width: 90%; width: fit-content; }

/* ---------- 我的云医伴（2026-10-29） ---------- */
/* 云医伴地址：等宽字体，避免 liangyj 这种小写串在字间距里看错 */
.url {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px; color: var(--text-3); word-break: break-all;
  background: var(--ink-70); border-radius: 4px; padding: 5px 6px; line-height: 1.5;
}

/* ---------- 名片上的两枚胶囊：我的云医伴 / 我的建档码（2026-10-29） ----------
   甲方第 2 条：这两样并进头部蓝色块，不再各占一张卡。
   用半透明白底压在渐变上，颜色跟着风格走（青竹 / 暖杏也成立）。 */
.dcard__acts { display: flex; gap: 8px; margin-top: 13px; }
.dtool {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px;
  height: 36px; padding: 0 10px; border-radius: 18px;
  background: rgba(255, 255, 255, .18); border: 1px solid rgba(255, 255, 255, .3);
  color: #fff; font-size: var(--fs-sm); font-weight: 700;
}
.dtool svg { width: 15px; height: 15px; flex: none; }
.dtool__more { font-weight: 400; opacity: .85; }

/* ---------- 建档码弹层（点「我的建档码」弹出） ---------- */
.qrmask {
  position: fixed; inset: 0; z-index: 80; display: none;
  background: rgba(18, 24, 32, .55);
  align-items: center; justify-content: center; padding: 0 26px;
}
.qrmask.is-open { display: flex; }
.qrmask__box {
  width: 100%; max-width: 300px; background: #fff; border-radius: 14px;
  padding: 16px; text-align: center;
}
.qrmask__hd { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.qrmask__hd b { font-size: var(--fs-base); color: var(--ink-900); }
.qrmask__x { color: var(--ink-300); font-size: 18px; line-height: 1; cursor: pointer; padding: 0 2px; }
.qrmask__img {
  display: block; width: 100%; aspect-ratio: 1 / 1; object-fit: contain;
  border-radius: 6px; background: var(--ink-70);
}
.qrmask__t { font-size: var(--fs-sm); color: var(--text-2); line-height: 1.65; margin-top: 11px; }
.qrmask__url {
  margin-top: 8px; font-size: 10px; color: var(--text-3); word-break: break-all;
  background: var(--ink-70); border-radius: 4px; padding: 5px 6px;
  font-family: ui-monospace, monospace; line-height: 1.5;
}
.qrmask__hint { margin-top: 6px; font-size: 10px; color: var(--text-3); line-height: 1.5; }

/* 大字号下胶囊跟着长，否则 20px 的字塞进 36px 的胶囊会顶到边 */
body[data-care] .dtool { height: calc(36px + 1.6 * var(--bump)); }

/* ---------- 字体大小档位（设置页，2026-10-29） ---------- */
.fz { display: flex; gap: 7px; align-items: stretch; }
.fz__i {
  flex: 1; display: block; text-align: center;
  border: 1.5px solid var(--ink-200); border-radius: var(--radius-card);
  background: #fff; padding: 10px 3px 8px; line-height: 1;
}
.fz__i b { display: block; font-weight: 700; color: var(--ink-800); }
.fz__i span { display: block; font-size: 10px; color: var(--text-3); margin-top: 8px; }
.fz__i.is-on { border-color: var(--brand); background: var(--brand-soft); }
.fz__i.is-on b, .fz__i.is-on span { color: var(--brand-dark); }

/* ---------- 文件库：原稿缩略图 / 原稿预览 / 指标行（2026-10-29） ---------- */
/* 列表里的小缩略图：用 CSS 画成"一页单据"，比纯色块更像报告，也不用额外图片素材 */
.rep {
  width: 42px; flex: none; align-self: flex-start;
  aspect-ratio: 3 / 4; border-radius: 5px; background: #fff;
  border: 1px solid var(--ink-200); padding: 6px 5px;
  display: flex; flex-direction: column; gap: 3px; overflow: hidden;
}
.rep i { display: block; height: 2px; border-radius: 1px; background: var(--ink-100); }
.rep i:first-child { width: 62%; background: var(--ink-200); margin-bottom: 2px; }
.rep i:nth-child(3n) { width: 72%; }

/* 原稿大图预览（⚠️ 类名不能用 .doc —— 那是首页的医生卡） */
.paper {
  background: #fff; border: 1px solid var(--ink-200); border-radius: 6px;
  padding: 16px 14px; display: flex; flex-direction: column; gap: 9px;
}
.paper__hd { height: 9px; width: 46%; border-radius: 3px; background: var(--ink-200); margin-bottom: 3px; }
.paper__line { height: 5px; border-radius: 3px; background: var(--ink-100); }

/* 指标行（项目 / 结果 / 参考范围） */
.idx { display: flex; align-items: baseline; gap: 8px; padding: 9px 0; border-bottom: 1px solid var(--ink-100); }
.idx:last-child { border-bottom: 0; }
.idx__n { flex: 1; min-width: 0; font-size: var(--fs-base); color: var(--ink-800); }
.idx__v { width: 62px; text-align: right; font-size: var(--fs-base); font-weight: 700; color: var(--ink-900); font-variant-numeric: tabular-nums; }
.idx__v.is-up { color: var(--danger); }
.idx__v.is-warn { color: var(--accent); }
.idx__r { width: 76px; text-align: right; font-size: var(--fs-sm); color: var(--text-3); }

/* ============================================================
 * 2026-11-01 新增：云医伴经营层（店铺 / 钱包 / 物料 / 结算）
 * 只追加组件类，不改既有令牌与组件；.seg / .num / .card / .chip / .btn 全部复用
 * ============================================================ */

/* ---------- 首页「今日经营」条 ---------- */
.bizbar {
  display: flex; align-items: center; gap: 12px; margin-top: 10px;
  background: var(--brand-grad); color: #fff;
  border-radius: var(--radius-card); padding: 13px 14px;
}
.bizbar__row { display: flex; gap: 20px; flex: 1; min-width: 0; }
.bizbar__v { font-size: 21px; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.bizbar__t { font-size: 11px; color: rgba(255,255,255,.82); margin-top: 3px; }
.bizbar__go {
  flex: none; font-size: 12px; padding: 7px 12px; border-radius: 14px;
  background: #fff; color: var(--brand-dark); font-weight: 700;
}

/* ---------- 商品行 ---------- */
.goods { display: flex; gap: 11px; padding: 11px 0; border-bottom: 1px solid var(--ink-100); }
.goods:first-child { padding-top: 0; }
.goods:last-child { border-bottom: 0; padding-bottom: 0; }
.goods__img { width: 66px; height: 66px; border-radius: 6px; flex: none; object-fit: cover; background: var(--ink-70); }
.goods__main { flex: 1; min-width: 0; }
.goods__t { font-size: var(--fs-md); font-weight: 700; color: var(--ink-900); line-height: 1.45; }
.goods__s { font-size: var(--fs-cap); color: var(--text-3); margin-top: 3px; line-height: 1.5; }
.goods__foot { display: flex; align-items: baseline; gap: 8px; margin-top: 6px; flex-wrap: wrap; }
.goods__price { font-size: var(--fs-lg); font-weight: 700; color: var(--danger); font-variant-numeric: tabular-nums; }
.goods__price small { font-size: var(--fs-cap); font-weight: 400; }
.goods__earn { font-size: var(--fs-cap); color: var(--accent); font-weight: 700; }
.goods__act { flex: none; align-self: center; }

/* ---------- 钱包 ---------- */
/* 身份认证（2026-11-01 甲方）：医生认证 / 机构认证的状态标签 + 待办提示条 */
.vtag {
  display: inline-flex; align-items: center; height: 17px; padding: 0 6px;
  margin-left: 6px; border-radius: 9px; vertical-align: 1px;
  font-size: 11px; font-weight: 400; background: var(--ink-100); color: var(--text-2);
}
.vtag--ok { background: var(--success-bg); color: #03873e; }
.vtag--wait { background: var(--accent-bg); color: #b96a00; }
.vtag--opt { background: transparent; border: 1px solid var(--ink-200); color: var(--text-3); }
.vbar {
  display: flex; flex-direction: column; gap: 2px; margin-bottom: 8px;
  padding: 9px 11px; border-radius: 8px; background: var(--danger-bg);
  color: #a4343a; font-size: 12px; line-height: 1.6;
}
.vbar b { font-size: 12.5px; }
/* 版本与有效期：弱化 —— 小字浅灰居中，贴在页脚上方 */
.verline { margin-top: 16px; text-align: center; font-size: 11px; color: var(--ink-300); line-height: 1.7; }

/* 店铺页 → 我的云诊所入口（2026-11-01 甲方：店铺页要能点进对外主页） */
.cli-link { display: flex; align-items: center; gap: 8px; margin-top: 10px; padding: 12px 13px; }
.cli-link__t { font-size: var(--fs-base); font-weight: 700; color: var(--ink-900); }

.wtop { background: var(--brand-grad); color: #fff; border-radius: var(--radius-card); padding: 16px 15px; }
.wtop__lb { font-size: var(--fs-sm); color: rgba(255,255,255,.85); }
.wtop__v { font-size: 31px; font-weight: 700; line-height: 1.15; font-variant-numeric: tabular-nums; margin-top: 4px; }
.wtop__v small { font-size: 15px; font-weight: 400; margin-right: 2px; }
.wtop__sub { display: flex; gap: 22px; margin-top: 13px; }
.wtop__sub b { font-size: 15px; font-variant-numeric: tabular-nums; }
.wtop__sub span { font-size: 11px; color: rgba(255,255,255,.8); display: block; margin-top: 2px; }
.wtop__btn {
  margin-top: 14px; width: 100%; height: 38px; border-radius: var(--radius-btn);
  background: #fff; color: var(--brand-dark); font-size: var(--fs-base); font-weight: 700;
}

/* ---------- 账单行 ---------- */
.bill { display: flex; align-items: center; gap: 11px; padding: 11px 0; border-bottom: 1px solid var(--ink-100); }
.bill:last-child { border-bottom: 0; padding-bottom: 0; }
.bill__ico {
  width: 34px; height: 34px; border-radius: 50%; flex: none;
  background: var(--brand-soft); color: var(--brand-dark);
  display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700;
}
.bill__ico--out { background: var(--accent-bg); color: var(--accent); }
.bill__main { flex: 1; min-width: 0; }
.bill__t { font-size: var(--fs-md); color: var(--ink-800); font-weight: 700; }
.bill__s { font-size: var(--fs-cap); color: var(--text-3); margin-top: 2px; }
.bill__v { font-size: var(--fs-base); font-weight: 700; color: var(--success); font-variant-numeric: tabular-nums; flex: none; }
.bill__v--out { color: var(--ink-800); }

/* ---------- 物料 ---------- */
.mats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mat { background: #fff; border-radius: var(--radius-card); overflow: hidden; }
.mat__thumb {
  height: 104px; background: var(--ink-70);
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-400); font-size: var(--fs-cap); text-align: center; padding: 8px; line-height: 1.5;
}
.mat__thumb--brand { background: var(--brand-grad); color: #fff; }
.mat__body { padding: 9px 10px 11px; }
.mat__t { font-size: var(--fs-sm); font-weight: 700; color: var(--ink-900); }
.mat__s { font-size: var(--fs-cap); color: var(--text-3); margin-top: 3px; }
.mat__act { margin-top: 8px; }

/* ---------- 底部结算条 ---------- */
.checkout {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 390px; background: #fff;
  border-top: 1px solid var(--ink-200); padding: 9px 12px;
  display: flex; align-items: center; gap: 11px; z-index: 30;
}
.checkout__sum { flex: 1; min-width: 0; }
.checkout__v { font-size: var(--fs-xl); font-weight: 700; color: var(--danger); font-variant-numeric: tabular-nums; }
.checkout__s { font-size: var(--fs-cap); color: var(--text-3); margin-top: 1px; }
.app--checkout { padding-bottom: 76px; }

/* ---------- 数量步进 ---------- */
.qty { display: inline-flex; align-items: center; border: 1px solid var(--ink-200); border-radius: 4px; overflow: hidden; }
.qty button { width: 27px; height: 27px; font-size: 16px; line-height: 1; color: var(--text-2); display: flex; align-items: center; justify-content: center; }
.qty span { min-width: 30px; text-align: center; font-size: var(--fs-sm); font-variant-numeric: tabular-nums; }

/* ---------- 执业证书照片上传（me.html 我的 → 执业信息） ---------- */
.imgfield { display: flex; align-items: center; gap: 10px; }
.imgfield__img {
  width: 84px; height: 62px; object-fit: cover; border-radius: 4px;
  border: 1px solid var(--ink-200); background: var(--ink-70); flex: none;
}
.imgfield__ph {
  width: 84px; height: 62px; border-radius: 4px; border: 1px dashed var(--ink-200);
  display: flex; align-items: center; justify-content: center; font-size: 11px;
  color: var(--text-3); background: var(--ink-70); flex: none;
}
.imgfield__act { display: flex; flex-direction: column; gap: 5px; align-items: flex-start; }
.imgfield__act label.btn { cursor: pointer; }

/* ---------- 体验期到期提醒（api.js 的 showExpireBanner） ---------- */
#expireBar {
  position: fixed; left: 10px; right: 10px; bottom: 14px; z-index: 150;
  display: flex; align-items: center; gap: 8px;
  background: #fff4f4; border: 1px solid #ffd6d8; border-radius: 10px;
  padding: 9px 12px; box-shadow: 0 6px 18px rgba(254, 4, 25, .10);
  font-size: 12px; color: var(--danger); line-height: 1.5;
}
#expireBar.has-tab { bottom: calc(var(--tab-h) + 12px); }
#expireBar b { flex: none; font-size: 12px; }
#expireBar span { flex: 1; color: #a5353c; }
#expireBar i {
  flex: none; font-style: normal; font-size: 11px; color: var(--danger);
  border: 1px solid #ffc7ca; background: #fff; border-radius: 10px; padding: 1px 8px;
}

.exsheet {
  position: fixed; inset: 0; z-index: 200; background: rgba(0, 0, 0, .42);
  display: flex; align-items: flex-end; justify-content: center;
}
.exsheet__box {
  width: 100%; max-width: 460px; background: #fff;
  border-radius: 14px 14px 0 0; padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
}
.exsheet__t { font-size: 16px; font-weight: 700; color: var(--danger); text-align: center; }
.exsheet__b { margin: 10px 0 14px; font-size: 13px; color: var(--text-2); line-height: 1.85; }
.exsheet__b p { margin: 0 0 6px; }
.exsheet__b b { color: var(--ink-900); }
