/* 友仁宠医 · 宠主端（H5/PWA）样式 —— 移动优先，安全区适配，iOS 主屏幕全屏不顶边 */
:root {
  --brand: #2E7D6B;
  --brand-l: #E7F4F0;
  --bg: #F5F6F8;
  --card: #FFFFFF;
  --text: #1F2937;
  --text2: #6B7280;
  --line: #E5E7EB;
  --danger: #DC2626;
  --warn: #B45309;
  --ok: #15803D;
  --r: 14px;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--text); }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  font-size: 15px; line-height: 1.5; overscroll-behavior-y: contain;
}
a { color: var(--brand); text-decoration: none; }
button { font: inherit; color: inherit; }

/* ---------- 顶栏 ---------- */
.bar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 8px;
  padding: calc(10px + var(--safe-t)) 12px 10px;
  background: var(--card); border-bottom: 1px solid var(--line);
}
.bar-title { flex: 1; font-size: 17px; font-weight: 700; text-align: center; }
.bar-back, .bar-action {
  min-width: 40px; height: 32px; border: 0; background: transparent; font-size: 15px; color: var(--brand);
}
.bar-back { font-size: 26px; line-height: 1; text-align: left; }
.bar-action { text-align: right; }

/* ---------- 主视图 ---------- */
.view { padding: 12px 12px calc(76px + var(--safe-b)); min-height: 100vh; }
.view.no-tabs { padding-bottom: calc(24px + var(--safe-b)); }

/* ---------- 卡片 / 通用 ---------- */
.card { background: var(--card); border-radius: var(--r); padding: 14px; margin-bottom: 12px; box-shadow: 0 1px 3px rgba(16,24,40,.05); }
.card-t { font-size: 15px; font-weight: 700; margin: 0 0 10px; }
.muted { color: var(--text2); font-size: 13px; }
.tiny { font-size: 12px; color: var(--text2); }
.row { display: flex; align-items: center; gap: 10px; }
.row + .row { margin-top: 8px; }
.grow { flex: 1; min-width: 0; }
.ell { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.divider { height: 1px; background: var(--line); margin: 12px 0; }
.empty { text-align: center; color: var(--text2); padding: 40px 16px; font-size: 14px; }
.err { color: var(--danger); font-size: 13px; padding: 8px 0; }

/* ---------- 按钮 / 表单 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 44px; padding: 0 18px; border-radius: 12px; border: 1px solid transparent;
  background: var(--brand); color: #fff; font-size: 15px; font-weight: 600; width: 100%;
}
.btn:active { opacity: .85; }
.btn[disabled] { opacity: .5; }
.btn.ghost { background: #fff; color: var(--brand); border-color: var(--brand); }
.btn.sm { height: 34px; font-size: 13px; padding: 0 12px; width: auto; border-radius: 9px; }
.btn.gray { background: #EEF1F4; color: var(--text); }
.btn.danger { background: #FEF2F2; color: var(--danger); border-color: #FCA5A5; }
.field { margin-bottom: 12px; }
.field > label { display: block; font-size: 13px; color: var(--text2); margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%; height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: 12px;
  background: #fff; font-size: 15px; color: var(--text); outline: none; -webkit-appearance: none;
}
.field textarea { height: 84px; padding: 10px 12px; resize: vertical; line-height: 1.5; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--brand); }
.field-row { display: flex; gap: 10px; }
.field-row > .field { flex: 1; }
.code-row { display: flex; gap: 8px; }
.code-row > input { flex: 1; }

/* ---------- 底部 tab ---------- */
.tabs {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 35;
  display: flex; background: rgba(255,255,255,.96); border-top: 1px solid var(--line);
  padding-bottom: var(--safe-b); backdrop-filter: blur(8px);
}
.tab { flex: 1; text-align: center; padding: 7px 0 6px; color: var(--text2); font-size: 11px; position: relative; }
.tab-i { display: block; font-size: 20px; line-height: 1.25; }
.tab.on { color: var(--brand); font-weight: 700; }
/* 消息未读角标（与小程序底部「消息」页签一致；只统计系统通知，沟通消息不参与） */
.tab-badge { position: absolute; top: 3px; left: 50%; margin-left: 2px; min-width: 15px; height: 15px; line-height: 15px; padding: 0 4px; border-radius: 999px; background: var(--danger); color: #fff; font-size: 10px; font-weight: 600; text-align: center; }
@supports (padding: max(0px)) { .tabs { padding-bottom: max(var(--safe-b), 0px); } }

/* ---------- 宠物卡 ---------- */
.pet-card { display: flex; gap: 12px; align-items: center; }
.pet-avatar { width: 52px; height: 52px; border-radius: 14px; background: var(--brand-l); display: flex; align-items: center; justify-content: center; font-size: 26px; flex-shrink: 0; overflow: hidden; }
.pet-avatar img { width: 100%; height: 100%; object-fit: cover; }
.pet-name { font-size: 16px; font-weight: 700; }
.pet-meta { font-size: 12.5px; color: var(--text2); margin-top: 2px; }
.chip { display: inline-block; font-size: 11.5px; padding: 1px 8px; border-radius: 999px; background: var(--brand-l); color: var(--brand); margin-left: 6px; }
.chip.warn { background: #FEF3C7; color: var(--warn); }
.chip.danger { background: #FEE2E2; color: var(--danger); }

/* ---------- 快捷入口 ---------- */
.quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.quick a { text-align: center; padding: 10px 4px; border-radius: 12px; background: #FAFBFC; color: var(--text); }
.quick .qi { display: block; font-size: 22px; line-height: 1.3; }
.quick .qt { font-size: 12px; color: var(--text2); }

/* ---------- 列表行 ---------- */
.li { display: flex; align-items: center; gap: 10px; padding: 12px 2px; border-bottom: 1px solid var(--line); }
.li:last-child { border-bottom: 0; }
.li-main { flex: 1; min-width: 0; }
.li-t { font-size: 14.5px; font-weight: 600; }
.li-s { font-size: 12.5px; color: var(--text2); margin-top: 2px; }
.li-r { font-size: 13px; color: var(--text2); text-align: right; }

/* ---------- 分段 tab（记录页） ---------- */
.seg { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; margin-bottom: 10px; }
.seg button { flex: 0 0 auto; height: 32px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: #fff; font-size: 13px; color: var(--text2); }
.seg button.on { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }

/* ---------- 表格（报告明细） ---------- */
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th, .tbl td { border-bottom: 1px solid var(--line); padding: 7px 6px; text-align: left; vertical-align: top; }
.tbl th { font-size: 12px; color: var(--text2); font-weight: 600; background: #FAFBFC; }
.tbl td.bad { color: var(--danger); font-weight: 700; }

/* ---------- 金额 ---------- */
.money { font-variant-numeric: tabular-nums; }
.money-big { font-size: 22px; font-weight: 800; }

/* ---------- 弹层 ---------- */
.sheet-mask { position: fixed; inset: 0; z-index: 50; background: rgba(15,23,42,.45); display: flex; align-items: flex-end; }
.sheet { width: 100%; max-height: 86vh; overflow-y: auto; background: #fff; border-radius: 18px 18px 0 0; padding: 16px 16px calc(16px + var(--safe-b)); animation: up .18s ease-out; }
@keyframes up { from { transform: translateY(24px); opacity: .6; } to { transform: none; opacity: 1; } }
.sheet-t { font-size: 16px; font-weight: 700; margin-bottom: 12px; }

/* ---------- toast / busy ---------- */
.toast { position: fixed; left: 50%; bottom: calc(90px + var(--safe-b)); transform: translateX(-50%); z-index: 60; max-width: 82vw; background: rgba(17,24,39,.92); color: #fff; font-size: 13.5px; padding: 9px 14px; border-radius: 10px; text-align: center; }
.busy { position: fixed; inset: 0; z-index: 55; display: flex; align-items: center; justify-content: center; background: rgba(255,255,255,.5); }
.spinner { width: 30px; height: 30px; border: 3px solid var(--brand-l); border-top-color: var(--brand); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- 登录页 ---------- */
.login-wrap { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; padding: 24px 20px calc(24px + var(--safe-b)); }
.login-logo { text-align: center; margin-bottom: 18px; }
.login-logo img { width: 76px; height: 76px; border-radius: 20px; box-shadow: 0 6px 18px rgba(46,125,107,.25); }
.login-name { font-size: 20px; font-weight: 800; margin-top: 10px; }
.login-sub { font-size: 13px; color: var(--text2); margin-top: 4px; }
.login-tabs { display: flex; gap: 18px; justify-content: center; margin: 18px 0 14px; }
.login-tabs button { border: 0; background: transparent; font-size: 15px; color: var(--text2); padding: 6px 2px; border-bottom: 2px solid transparent; }
.login-tabs button.on { color: var(--brand); font-weight: 700; border-bottom-color: var(--brand); }
.login-foot { text-align: center; font-size: 12px; color: var(--text2); margin-top: 16px; line-height: 1.7; }

/* ---------- 安装引导条 ---------- */
.install-tip { display: flex; gap: 10px; align-items: center; background: #FFFBEB; border: 1px solid #FDE68A; color: #92400E; border-radius: 12px; padding: 10px 12px; font-size: 12.5px; margin-bottom: 12px; }
.install-tip .x { border: 0; background: transparent; color: #92400E; font-size: 16px; padding: 0 4px; }

/* ---------- 消息中心（对齐小程序 messages 页） ---------- */
.badge2 { display: inline-block; min-width: 16px; height: 16px; line-height: 16px; padding: 0 4px; margin-left: 4px; border-radius: 999px; background: var(--danger); color: #fff; font-size: 10.5px; font-weight: 600; text-align: center; vertical-align: 1px; }
.dot2 { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--danger); margin-left: 4px; vertical-align: 3px; }
.sign-banner { background: #FFFBEB; border: 1px solid #FDE68A; border-radius: 12px; padding: 10px 12px; margin-bottom: 12px; }
.sign-banner .sb-t { font-size: 14px; font-weight: 700; color: #92400E; }
.sign-banner .sb-s { font-size: 12px; color: #B45309; margin-top: 2px; }
/* 系统消息条目 */
.nt { padding: 12px 2px; border-bottom: 1px solid var(--line); }
.nt:last-child { border-bottom: 0; }
.nt.unread { background: #F7FBFA; }
.nt-h { display: flex; align-items: baseline; gap: 8px; }
.nt-t { flex: 1; min-width: 0; font-size: 14.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nt.unread .nt-t { color: var(--brand); }
.nt-time { flex: 0 0 auto; font-size: 11.5px; color: var(--text2); }
.nt-b { font-size: 13px; color: var(--text2); margin-top: 4px; white-space: pre-wrap; word-break: break-word; }
.nt-f { display: flex; align-items: center; gap: 6px; margin-top: 6px; }
.nt-tag { font-size: 11px; padding: 1px 7px; border-radius: 999px; background: #F1F3F5; color: var(--text2); }
.nt-tag.pet { background: var(--brand-l); color: var(--brand); }
.nt-go { margin-left: auto; font-size: 12.5px; color: var(--brand); }
/* 沟通空间 = 一个沟通框（多宠共用） */
.chat-card { padding: 10px 10px 0; }
.chat-multi { font-size: 11.5px; color: var(--text2); background: #F7F8FA; border-radius: 8px; padding: 5px 8px; margin-bottom: 8px; }
.chat-scroll { padding: 2px 2px 8px; }
.pad14 { padding: 14px 4px; }
.msg { display: flex; flex-direction: column; align-items: flex-start; margin: 10px 0; }
.msg.mine { align-items: flex-end; }
.m-who { font-size: 11px; color: var(--text2); margin-bottom: 3px; }
.m-recall { color: var(--brand); margin-left: 4px; }
.m-bubble { max-width: 82%; padding: 8px 11px; border-radius: 13px; background: #F1F3F5; color: var(--text); font-size: 14.5px; line-height: 1.45; word-break: break-word; }
.m-bubble.mine { background: var(--brand); color: #fff; }
.m-text { white-space: pre-wrap; }
.m-img { display: block; max-width: 180px; max-height: 240px; border-radius: 9px; margin: 4px 0; }
.m-video { display: block; width: 220px; max-width: 100%; border-radius: 9px; margin: 4px 0; background: #000; }
.m-recalled { text-align: center; font-size: 11.5px; color: var(--text2); margin: 8px 0; }
/* 医院发来的资料卡片 */
.m-card { background: #fff; color: var(--text); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; margin-bottom: 4px; min-width: 200px; }
.m-bubble.mine .m-card { background: #fff; }
.mc-title { font-size: 13.5px; font-weight: 700; }
.mc-sub { font-size: 11.5px; color: var(--text2); margin-top: 2px; }
.mc-row { display: flex; gap: 8px; font-size: 12.5px; margin-top: 4px; }
.mc-row > span { flex: 0 0 auto; color: var(--text2); }
.mc-row > b { flex: 1; min-width: 0; }
.mc-text { font-size: 12.5px; margin-top: 6px; white-space: pre-wrap; }
.mc-file { font-size: 12.5px; color: var(--brand); margin-top: 6px; }
/* 输入区 */
/* 输入区：贴在屏幕底部（页签栏之上），聊天内容由整页滚动 —— 与小程序「点开就能问」一致 */
.chat-input { position: sticky; bottom: calc(58px + var(--safe-b)); z-index: 6; display: flex; align-items: center; gap: 8px; padding: 8px 0 10px; border-top: 1px solid var(--line); margin-top: 4px; background: #fff; }
.chat-input .ci-pic { border: 0; background: transparent; font-size: 20px; padding: 0 4px; }
.chat-input input { flex: 1; height: 38px; border: 1px solid var(--line); border-radius: 19px; padding: 0 14px; font-size: 15px; outline: none; }
.chat-input .ci-send { height: 34px; padding: 0 14px; border: 0; border-radius: 17px; background: var(--brand); color: #fff; font-size: 14px; font-weight: 600; }
/* 消息页：小标签吸附在顶栏下面（与小程序「页签固定、只滚列表」一致） */
.seg-sticky { position: sticky; top: calc(45px + var(--safe-t)); z-index: 8; background: #fff; padding: 6px 0 4px; }
.tip { font-size: 11.5px; color: var(--text2); text-align: center; padding: 0 8px 14px; line-height: 1.6; }
/* 签字：正文阅读框 + 手写签名板 */
.md-read { max-height: 44vh; overflow-y: auto; border: 1px solid var(--line); border-radius: 10px; padding: 10px; margin-top: 8px; background: #FCFCFD; }
.md-sect { font-size: 12px; font-weight: 700; color: var(--text2); margin: 10px 0 4px; }
.md-sect:first-child { margin-top: 0; }
.md-para { font-size: 13.5px; line-height: 1.6; margin-bottom: 6px; white-space: pre-wrap; }
.md-frow { display: flex; gap: 8px; font-size: 13px; padding: 3px 0; }
.md-frow > span { flex: 0 0 84px; color: var(--text2); }
.md-frow > b { flex: 1; min-width: 0; }
.md-note { font-size: 11px; color: var(--text2); margin-top: 8px; }
.md-warn { font-size: 12.5px; color: #B45309; background: #FFFBEB; border-radius: 8px; padding: 6px 8px; margin-top: 6px; }
.sig-pad { width: 100%; height: 150px; border: 1px dashed #CBD5E1; border-radius: 10px; background: #fff; touch-action: none; margin-top: 6px; }
.img-full { text-align: center; padding: 8px 0; }
.img-full img { max-width: 100%; border-radius: 10px; }

/* ---------- 首页：医疗服务宫格 ---------- */
.svc-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.svc-cell { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 2px; border-radius: 12px; background: #FAFBFC; color: var(--text); }
.svc-i { font-size: 22px; line-height: 1.2; }
.svc-t { font-size: 12px; color: var(--text2); }

/* ---------- 首页：宠物档案 3×3 无框表（免疫/驱虫/美容 三列浅底色） ---------- */
.arch-pet { font-size: 13.5px; font-weight: 600; margin: 4px 0 8px; }
.arch-tbl { width: 100%; border-collapse: separate; border-spacing: 4px; font-size: 12px; table-layout: fixed; }
.arch-tbl th { font-size: 11.5px; font-weight: 600; color: var(--text2); padding: 5px 2px; text-align: left; }
.arch-tbl tbody th { width: 44px; color: var(--text); font-weight: 600; }
.arch-tbl td { padding: 6px 5px; border-radius: 8px; line-height: 1.35; overflow-wrap: anywhere; word-break: normal; vertical-align: top; }
.arch-tbl td b { display: block; font-size: 11px; font-weight: 600; opacity: .8; }
.arch-tbl td span { display: block; margin-top: 1px; }
.arch-tbl td.c-imm { background: #EAF7F0; color: #1F6B4D; }
.arch-tbl td.c-dew { background: #FFF3E6; color: #8A5A00; }
.arch-tbl td.c-gro { background: #F2EEFB; color: #553C9A; }

/* ---------- 首页：宠物健康概况 ---------- */
.seg-b { flex: 0 0 auto; height: 32px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: #fff; font-size: 13px; color: var(--text2); }
.seg-b.on { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }
.h-legend { display: flex; flex-wrap: wrap; gap: 6px 12px; margin: 2px 0 6px; }
.h-legend .lg { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; color: var(--text2); }
.h-legend .lg i { width: 8px; height: 8px; border-radius: 2px; display: inline-block; }
.h-legend .lg b { color: var(--text); font-size: 12.5px; }
.h-legend .lg em { font-style: normal; color: #9aa3ab; font-size: 11px; }
.h-svg { width: 100%; height: auto; display: block; }

/* ---------- 宠物切换 / 症状快捷标签 ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.chip-b { height: 30px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: #fff; font-size: 13px; color: var(--text2); }
.chip-b.on { background: var(--brand-l); border-color: var(--brand); color: var(--brand); font-weight: 600; }

/* ---------- 我的：账号卡 / 资产 / 订单 ---------- */
.head-row { display: flex; align-items: center; gap: 12px; }
.tag-row { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 6px; }
.tag { font-size: 11.5px; padding: 3px 9px; border-radius: 999px; background: var(--brand-l); color: var(--brand); }
.tag.off { background: #F1F3F5; color: var(--text2); }
.tag.shop { background: #F2EEFB; color: #553C9A; }
.tag.shop.off { background: #F1F3F5; color: var(--text2); }
.asset-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 10px 0 6px; }
.asset-cell { text-align: center; padding: 8px 2px; border-radius: 10px; background: #FAFBFC; }
.asset-num { font-size: 15px; font-weight: 800; font-variant-numeric: tabular-nums; }
.asset-label { font-size: 11px; color: var(--text2); margin-top: 2px; }
.order-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 4px; }
.order-cell { position: relative; border: 0; background: #FAFBFC; border-radius: 10px; padding: 12px 2px; font-size: 12.5px; color: var(--text); }
.badge { position: absolute; top: 2px; right: 6px; min-width: 16px; height: 16px; line-height: 16px; padding: 0 4px; border-radius: 999px; background: var(--danger); color: #fff; font-size: 10.5px; text-align: center; }
.qr-wrap { text-align: center; padding: 12px 0; }
.qr-wrap img { width: 210px; height: 210px; }

/* ---------- 商城（分类/品牌/商品 + 购物车 + 结算 + 订单详情） ---------- */
.shop-search { display: flex; gap: 8px; margin-bottom: 8px; }
.shop-search input { flex: 1; height: 36px; border: 1px solid var(--line); border-radius: 18px; padding: 0 14px; font-size: 14px; outline: none; }
.shop-search button { height: 36px; padding: 0 14px; border: 0; border-radius: 18px; background: var(--brand); color: #fff; font-size: 14px; font-weight: 600; }
.brands { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; margin-bottom: 8px; }
.brand { flex: 0 0 auto; height: 28px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: #fff; font-size: 12.5px; color: var(--text2); }
.brand.on { background: var(--brand-l); border-color: var(--brand); color: var(--brand); font-weight: 600; }
.shop-body { display: flex; gap: 8px; align-items: flex-start; }
.cats { flex: 0 0 86px; background: #F7F8FA; border-radius: 12px; padding: 6px 4px; }
.cat-item { padding: 9px 6px; border-radius: 9px; font-size: 12.5px; color: var(--text2); text-align: center; }
.cat-item.on { background: #fff; color: var(--brand); font-weight: 700; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.cat-item em { display: block; font-style: normal; font-size: 10.5px; color: #9aa3ab; }
.prods { flex: 1; min-width: 0; }
.prod, .cart-row { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); position: relative; }
.prod:last-child { border-bottom: 0; }
.prod-img { flex: 0 0 68px; width: 68px; height: 68px; border-radius: 10px; background: #F1F3F5; display: flex; align-items: center; justify-content: center; font-size: 26px; overflow: hidden; }
.prod-img img { width: 100%; height: 100%; object-fit: cover; }
.prod-main { flex: 1; min-width: 0; }
.prod-name { font-size: 14px; font-weight: 600; line-height: 1.35; }
.prod-spec { font-size: 11.5px; color: var(--text2); margin-top: 2px; }
.prod-hint { font-size: 11px; color: #B45309; margin-top: 2px; }
.prod-foot { display: flex; align-items: center; gap: 6px; margin-top: 6px; }
.prod-price { font-size: 15px; font-weight: 800; color: var(--brand); font-variant-numeric: tabular-nums; }
.prod-old { font-size: 11.5px; color: #9aa3ab; text-decoration: line-through; }
.prod-add { margin-left: auto; width: 28px; height: 28px; border: 0; border-radius: 50%; background: var(--brand); color: #fff; font-size: 16px; line-height: 1; }
.more, .more-done { text-align: center; font-size: 12.5px; color: var(--text2); padding: 12px 0; }
.more { color: var(--brand); }
.cart-bar { position: fixed; left: 12px; right: 12px; bottom: calc(60px + var(--safe-b)); z-index: 22; display: flex; align-items: center; gap: 10px; background: rgba(17,24,39,.94); color: #fff; border-radius: 999px; padding: 9px 16px; box-shadow: 0 6px 18px rgba(0,0,0,.18); }
.cart-bar .cb-l { font-size: 13px; }
.cart-bar .cb-m { font-size: 15px; font-weight: 800; margin-left: auto; font-variant-numeric: tabular-nums; }
.cart-bar .cb-r { font-size: 13px; font-weight: 700; color: #7FE3C9; }
.qty { display: inline-flex; align-items: center; gap: 8px; margin-left: auto; }
.qty button { width: 26px; height: 26px; border: 1px solid var(--line); background: #fff; border-radius: 8px; font-size: 15px; line-height: 1; color: var(--text); }
.qty span { min-width: 18px; text-align: center; font-size: 14px; font-variant-numeric: tabular-nums; }
.cart-del { position: absolute; top: 8px; right: 0; border: 0; background: transparent; color: #B6BCC2; font-size: 15px; }

/* ---------- 住院实况：护理记录时间轴（小程序用“上升曲线”，H5 用左侧时间轴表达同一顺序） ---------- */
.hl-list { position: relative; padding-left: 18px; }
.hl-list::before { content: ''; position: absolute; left: 5px; top: 8px; bottom: 8px; width: 2px; border-radius: 2px; background: linear-gradient(180deg, #e5484d, #0e7cbd 40%, rgba(14,124,189,.18)); }
.hl-row { position: relative; margin-bottom: 10px; }
.hl-dot { position: absolute; left: -17px; top: 11px; width: 9px; height: 9px; border-radius: 50%; background: #0e7cbd; border: 2px solid #fff; box-shadow: 0 0 0 1px rgba(14,124,189,.35); }
.hl-row:first-child .hl-dot { background: #e5484d; box-shadow: 0 0 0 1px rgba(229,72,77,.4); }
.hl-box { background: #F7FAFC; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; }
.hl-box .li-t { font-size: 13.5px; font-weight: 700; }
.hl-box .li-s { font-size: 12.5px; }
/* ---------- 宠物健康档案（对齐小程序 pages/pet-health）：体重/驱虫/免疫/美容/相册 ---------- */
.hp-next { font-size: 13px; color: #8A5A00; background: #FFF7E6; border: 1px solid #FFE0A3; border-radius: 10px; padding: 9px 11px; margin-bottom: 10px; line-height: 1.5; }
.hp-add { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
.hp-add input, .hp-add select { height: 36px; min-width: 0; border: 1px solid var(--line); border-radius: 9px; padding: 0 9px; font-size: 13px; background: #fff; color: var(--text); }
.hp-add input[type=date] { flex: 0 0 138px; }
.hp-add input:not([type=date]) { flex: 1 1 110px; }
.hp-add .btn { flex: 0 0 auto; }
.hp-row { display: flex; align-items: center; gap: 8px; padding: 9px 2px; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.hp-row:last-child { border-bottom: 0; }
.hp-src { flex: 0 0 auto; font-size: 11px; padding: 1px 7px; border-radius: 999px; background: #EEF2F7; color: var(--text2); }
.hp-src.owner { background: #E7F6EF; color: #0F7B5A; }
.hp-stage { font-size: 12px; color: var(--text2); margin-left: 4px; }
.hp-del { flex: 0 0 auto; border: 0; background: transparent; color: #B42318; font-size: 12px; padding: 2px 4px; }
.hp-album { border: 1px solid var(--line); border-radius: 12px; padding: 10px; margin-bottom: 10px; }
.hp-photos { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 4px 0 8px; }
.hp-photos img { width: 100%; height: 68px; object-fit: cover; border-radius: 8px; display: block; }
.cart-sum { text-align: right; font-size: 13px; color: var(--text2); padding: 10px 0 4px; }
.cart-sum b { font-size: 17px; color: var(--brand); margin-left: 6px; }
.sum-row { display: flex; justify-content: space-between; font-size: 13px; color: var(--text2); padding: 5px 0; border-top: 1px dashed var(--line); }
.sum-row.total { border-top: 1px solid var(--line); margin-top: 4px; padding-top: 8px; font-size: 14px; color: var(--text); }
.sum-row.total b { font-size: 18px; color: var(--brand); }
/* 商品详情 */
.pd-cover { height: 220px; border-radius: 12px; background: #F1F3F5; display: flex; align-items: center; justify-content: center; font-size: 56px; overflow: hidden; }
.pd-cover img { width: 100%; height: 100%; object-fit: cover; }
.pd-name { font-size: 17px; font-weight: 700; margin-top: 12px; line-height: 1.4; }
.pd-price { font-size: 22px; font-weight: 800; color: var(--brand); margin-top: 6px; font-variant-numeric: tabular-nums; }
.pd-old { font-size: 12.5px; color: #9aa3ab; text-decoration: line-through; margin-left: 8px; font-weight: 400; }
.pd-hint { font-size: 12px; color: #B45309; margin-top: 6px; }
.pd-meta { font-size: 12.5px; color: var(--text2); margin-top: 8px; }
.pd-detail { font-size: 13.5px; line-height: 1.65; margin-top: 10px; white-space: pre-wrap; color: var(--text); }
.pd-img { display: block; width: 100%; border-radius: 10px; margin-top: 8px; }
.pd-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: flex; align-items: center; gap: 10px; padding: 8px 12px calc(8px + var(--safe-b)); background: #fff; border-top: 1px solid var(--line); }
.pd-bar .btn { flex: 1; }
.pd-bar .qty { margin-left: 0; }

/* ---------- 关键：hidden 必须真的不显示 ----------
   .busy / .sheet-mask 上有 display:flex（id 选择器无关，class 优先级高于 UA 的 [hidden]），
   只写 hidden 属性会被覆盖 → 整页常驻白色半透明遮罩 + spinner。 */
[hidden] { display: none !important; }
