/* 呼呼生活 · 视觉系统 v3（Clean 12NOV 设计稿逐值对齐）
   M3 暖色体系：背景 #fff8f4 / 主色深棕 #904d00 / 橙强调 #fa8c16 /
   完成绿 #266d00(+container #85fa51) / 便便锈红 #a73a05 / Plus Jakarta Sans
   ------------------------------------------------ */

:root {
  /* M3 surface 层级（设计稿逐值） */
  --bg: #FFF8F4;
  --surface-lowest: #FFFFFF;
  --surface-low: #FEF2E8;
  --surface-c: #F8ECE2;
  --surface-high: #F2E6DD;
  --surface-highest: #ECE0D7;
  --bg-deep: #F2E6DD;
  --card: #FFFFFF;
  --inset: #FEF2E8;
  --inset-2: #F8ECE2;

  --ink: #201B15;
  --ink-2: #564335;
  --ink-3: #897363;
  --ink-4: #DCC1AF;

  --line: rgba(138, 86, 44, 0.12);
  --line-2: rgba(138, 86, 44, 0.18);
  --sep: #F5EBE1;   /* HIG V2 缩进分割线色：极浅暖杏灰 */
  --outline: #897363;
  --outline-variant: #DCC1AF;

  /* primary：深棕（大数字 / CTA / 标题图标） */
  --brand: #904D00;
  --brand-2: #FA8C16;          /* primary-container 橙：进度条 / 高亮 */
  --brand-fixed: #FFDCC3;      /* primary-fixed：图标底 / pill 底 */
  --on-brand-fixed: #2F1500;
  --brand-soft: #FFDCC3;
  --brand-line: rgba(144, 77, 0, 0.28);

  /* secondary：完成绿 */
  --ok: #266D00;
  --ok-container: #85FA51;
  --mint: #266D00;
  --mint-soft: rgba(133, 250, 81, 0.28);

  /* tertiary：便便锈红 */
  --ter: #A73A05;
  --ter-container: #FF8657;
  --ter-fixed: #FFDBCF;
  --clay: #A73A05;
  --clay-soft: #FFDBCF;

  --sky: #904D00;
  --sky-soft: #FFDCC3;
  --amber: #904D00;
  --amber-soft: #FFDCC3;
  --violet: #564335;
  --violet-soft: #F2E6DD;
  --danger: #BA1A1A;
  --danger-soft: #FFDAD6;

  --r-card: 20px;
  --r-inset: 12px;
  --r-pill: 999px;

  --gutter: 16px;
  --topbar-h: 56px;
  --tabbar-h: 58px;
  --safe-b: env(safe-area-inset-bottom, 0px);

  /* HIG V2：暖色调漫反射环境光阴影，替代灰调（杜绝脏灰） */
  --shadow-card: 0 4px 20px -2px rgba(138, 86, 44, 0.06);
  --shadow-tile: 0 2px 8px rgba(138, 86, 44, 0.04);
  --shadow-cta: 0 4px 12px rgba(250, 140, 22, 0.25);
  --shadow-sheet: 0 -10px 40px rgba(32, 27, 21, 0.16);
  --shadow-fab: 0 8px 20px rgba(144, 77, 0, 0.36);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

/* v97：禁止移动端浏览器（微信内置/Safari）自动放大字号——字体膨胀会把
   固定高度的按钮行与列表行挤到重叠，全应用统一 100% 渲染 */
html { height: 100%; background: var(--bg); -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Helvetica Neue", sans-serif;
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  padding-bottom: calc(var(--tabbar-h) + var(--safe-b) + 24px); /* v115: +16px 给 FAB 上沿悬浮让位，滚动内容不再被压住 */
}

button { font: inherit; color: inherit; border: 0; background: none; padding: 0; cursor: pointer; transition: transform 0.12s ease; }

/* Apple HIG：统一按压缩放反馈（个别控件自带更强按压态的会按特异性覆盖） */
button:active { transform: scale(0.97); }
input, textarea, select { font: inherit; color: inherit; }
b { font-weight: 600; }
.num { font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------- 顶栏 */

.topbar {
  position: sticky; top: 0; z-index: 20;
  padding: 8px var(--gutter) 10px;
  background: linear-gradient(var(--bg) 72%, rgba(250, 248, 244, 0.86));
  backdrop-filter: saturate(180%) blur(8px);
}
.topbar-row { display: flex; align-items: center; gap: 10px; }
.brand { display: flex; align-items: center; gap: 9px; min-width: 0; }
.brand-mark {
  width: 30px; height: 30px; border-radius: 9px; flex: 0 0 auto;
  background: linear-gradient(150deg, var(--brand-2), var(--brand));
  display: grid; place-items: center; color: #fff;
}
.brand-mark svg { width: 18px; height: 18px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.brand-title { font-size: 17px; font-weight: 600; letter-spacing: -0.01em; }
.brand-sub { font-size: 12px; color: var(--ink-3); letter-spacing: 0.02em; }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
/* v101c 守护天数：无背景纯文字，顶栏齿轮左侧 */
.guard-pill { font-size: 12px; font-weight: 700; color: var(--ink-3); white-space: nowrap; }
.avatar-btn {
  display: flex; align-items: center; gap: 6px;
  padding: 4px 10px 4px 4px; border-radius: var(--r-pill);
  background: var(--card); box-shadow: var(--shadow-card);
}
.avatar {
  width: 26px; height: 26px; border-radius: 50%;
  background: linear-gradient(150deg, #FFD9A8, #FFB05C);
  display: grid; place-items: center;
  font-size: 12px; font-weight: 600; color: #7A4A10;
}
.avatar-meta { display: flex; flex-direction: column; line-height: 1.1; text-align: left; }
.avatar-name { font-size: 12px; font-weight: 600; }
.avatar-age { font-size: 10px; color: var(--ink-3); }

/* ---------------------------------------------------------------- 日期条 */

.weekstrip {
  display: flex; gap: 6px; margin: 2px 0 10px;
  overflow-x: auto; scrollbar-width: none;
}
.weekstrip::-webkit-scrollbar { display: none; }
.wk {
  flex: 1 0 auto; min-width: 42px;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 7px 4px 6px; border-radius: 13px;
  color: var(--ink-2);
}
.wk-label { font-size: 11px; color: var(--ink-3); }
.wk-day { font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }
.wk.on { background: var(--brand); color: #fff; box-shadow: 0 6px 14px rgba(255, 122, 26, 0.28); }
.wk.on .wk-label { color: rgba(255, 255, 255, 0.82); }
.wk-dot { width: 4px; height: 4px; border-radius: 50%; background: transparent; }
.wk-dot.full { background: var(--mint); }
.wk-dot.part { background: var(--amber); }
.wk-dot.light { background: var(--ink-4); }
.wk.on .wk-dot { background: rgba(255, 255, 255, 0.9); }

.date-line { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; }
.date-main { font-size: 13px; color: var(--ink-2); font-weight: 500; }
.date-main .wd { margin-left: 6px; color: var(--ink-3); font-weight: 400; }
.date-link { margin-left: auto; font-size: 12px; color: var(--brand); font-weight: 500; }
.nav-pair { display: flex; gap: 6px; }
.nav-circle {
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--card); box-shadow: var(--shadow-card);
  display: grid; place-items: center; color: var(--ink-2);
}
.nav-circle svg { width: 14px; height: 14px; }

/* ---------------------------------------------------------------- 卡片 */

.card {
  background: var(--card); border-radius: var(--r-card);
  box-shadow: var(--shadow-card);
  padding: 16px; margin-bottom: 12px;
}
.card[data-act="goto-card"] { cursor: pointer; }  /* v122 整卡可点（营养与保健品） */
.card-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.card-title { font-size: 18px; font-weight: 600; letter-spacing: -0.005em; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-title .mini { font-size: 11px; color: var(--ink-3); font-weight: 400; margin-left: 6px; }
.card-right { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.badge {
  font-size: 12.5px; padding: 4px 10px; border-radius: var(--r-pill);
  background: var(--inset-2); color: var(--ink-2); white-space: nowrap;
}
.badge.ok { background: var(--mint-soft); color: #0B8A66; }
.badge.warn { background: var(--amber-soft); color: #A56A00; }
.badge.info { background: var(--sky-soft); color: #0A76A8; }
.badge.brand { background: var(--brand-soft); color: #C4560A; }
.card-link { font-size: 13px; color: var(--brand); font-weight: 500; }

/* 卡片标题前的色块图标：每张卡一个固定色相，全页统一 */
.ct-ico {
  width: 34px; height: 34px; border-radius: 11px; flex: 0 0 auto;
  display: grid; place-items: center;
}
.ct-ico svg { width: 19px; height: 19px; }
.ct-ico.blue { background: var(--sky-soft); color: #0A76A8; }
.ct-ico.orange { background: #FDE8DC; color: #E8641B; }
.ct-ico.green { background: var(--mint-soft); color: #12A878; }
.ct-ico.brown { background: #F3E8DF; color: #A85B12; }
.ct-ico.mint { background: #E4F1EA; color: #2F6B4F; }

.inset {
  background: var(--inset); border-radius: var(--r-inset);
  padding: 11px 12px; margin-top: 10px;
}
.inset.flat { background: var(--inset-2); }

.pet-card { display: flex; align-items: center; gap: 12px; }
.pet-avatar {
  width: 52px; height: 52px; border-radius: 50%; flex: 0 0 auto;
  background: linear-gradient(150deg, #FFDCAF, #FFB05C);
  display: grid; place-items: center;
  font-size: 20px; font-weight: 600; color: #7A4A10;
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.7);
}
.pet-info { min-width: 0; flex: 1; }
.pet-name { font-size: 15px; font-weight: 600; }
.pet-name .age { font-size: 11px; color: var(--ink-3); font-weight: 400; margin-left: 6px; }
.pet-status { font-size: 12px; color: var(--ink-2); margin-top: 2px; }
.pet-summary {
  font-size: 12px; color: var(--ink-2); margin-top: 8px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.progress-grid { display: flex; gap: 6px; margin-top: 10px; }

/* Clean 12NOV 视觉：宠物卡右上角健康分大数字 + 达成四卡 2×2 浅色大卡 */
.hs-score { flex: none; text-align: right; line-height: 1; }
.hs-score b { font-size: 36px; font-weight: 800; letter-spacing: -0.03em; }
.hs-score small { display: block; font-size: 11px; color: var(--ink-3); margin-top: 3px; font-weight: 500; }
.ach-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 12px; }
.ach-item {
  border-radius: 18px; padding: 12px 13px; text-align: left;
  display: flex; flex-direction: column; gap: 7px; align-items: flex-start;
}
.ach-item .ach-top { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-2); }
.ach-item .ach-ico { font-size: 15px; line-height: 1; }
.ach-item .ach-top b { font-weight: 600; }
.ach-item .ach-val { font-size: 16.5px; font-weight: 800; letter-spacing: -0.02em; color: var(--ink); }
.ach-item .ach-tag {
  font-size: 10px; font-weight: 600; padding: 3px 9px; border-radius: 99px;
  background: rgba(31, 27, 22, 0.06); color: var(--ink-3);
}
.ach-item .ach-tag.ok { background: var(--brand); color: #fff; }
.ach-item.blue { background: #EAF4FD; }
.ach-item.orange { background: var(--brand-soft); }
.ach-item.green { background: var(--mint-soft); }
.ach-item.brown { background: var(--clay-soft); }

/* 饮食卡一键打卡 */
.checkall-btn {
  width: 100%; margin-top: 10px; padding: 11px 0;
  border-radius: var(--r-inset); background: var(--brand-soft);
  color: var(--brand); font-size: 13.5px; font-weight: 600;
}
.pg-item {
  flex: 1; text-align: center; padding: 6px 2px; border-radius: 10px;
  background: var(--inset-2); color: var(--ink-3); font-size: 11px;
}
.pg-item b { display: block; font-size: 13px; color: var(--ink-2); font-weight: 600; }
.pg-item.done { background: var(--mint-soft); color: #0B8A66; }
.pg-item.done b { color: #0B8A66; }

.metric { display: flex; align-items: baseline; gap: 4px; }
.metric-num { font-size: 34px; font-weight: 700; letter-spacing: -0.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.metric-unit { font-size: 14px; color: var(--ink-3); font-weight: 500; }
.metric-target { margin-left: auto; font-size: 12px; color: var(--ink-3); }
.metric-sub { font-size: 12px; color: var(--ink-2); margin-top: 6px; }
.metric-sub b { color: var(--ink); }

.bar { height: 7px; border-radius: var(--r-pill); background: var(--inset-2); overflow: hidden; margin-top: 10px; }
.bar > i {
  display: block; height: 100%; border-radius: var(--r-pill);
  background: var(--sky); transition: width 0.45s ease;
}
.bar.mint > i { background: var(--mint); }
.bar.brand > i { background: var(--brand); }

.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.chip {
  padding: 7px 13px; border-radius: var(--r-pill);
  background: var(--inset-2); color: var(--ink-2); font-size: 13px; font-weight: 600;
}
.chip.on { background: var(--brand); color: #fff; box-shadow: 0 4px 10px rgba(255, 122, 26, 0.26); }
.chip.ghost { background: transparent; box-shadow: inset 0 0 0 1px var(--line-2); }

.seg { display: flex; gap: 4px; padding: 3px; background: var(--inset-2); border-radius: var(--r-pill); }
.seg-item {
  flex: 1; text-align: center; padding: 7px 8px; border-radius: var(--r-pill);
  font-size: 14px; color: var(--ink-2); font-weight: 600; white-space: nowrap;
}
.seg-item.on { background: var(--card); color: var(--ink); box-shadow: 0 1px 4px rgba(31, 27, 22, 0.1); }

/* HIG V2 缩进分割线：带左侧圆图标的行，分割线左缩进 52px 与文字对齐、右侧通栏 */
.row { position: relative; }
.row:has(> .ico) { border-bottom: 0; }
.row:has(> .ico):not(:last-child)::after {
  content: ''; position: absolute; left: 52px; right: 0; bottom: 0; height: 1px;
  background: var(--sep); pointer-events: none;
}
.list { display: flex; flex-direction: column; }
.row {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 9px 0; text-align: left; border-bottom: 1px solid var(--line);
}
.row:last-child { border-bottom: 0; }
.ico {
  width: 32px; height: 32px; border-radius: 10px; flex: 0 0 auto;
  display: grid; place-items: center; font-size: 12px; font-weight: 600;
}
.ico.water { background: var(--sky-soft); color: #0EA5E9; }
.ico.meal { background: var(--amber-soft); color: #B47400; }
.ico.poop { background: var(--clay-soft); color: var(--clay); }
.ico.supp { background: var(--violet-soft); color: var(--violet); }
.ico.act { background: #E4F1EA; color: #2F6B4F; }
.ico.done { background: var(--mint-soft); color: var(--mint); }
.ico.dim { background: var(--inset-2); color: var(--ink-4); }
.ico svg { width: 18px; height: 18px; }
.row-main { min-width: 0; flex: 1; display: flex; flex-direction: column; }
.row-title { font-size: 15px; font-weight: 500; display: flex; align-items: center; gap: 5px; }
.row-sub { font-size: 12px; color: var(--ink-3); margin-top: 1px; }
.row-val { font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.row-val small { font-size: 12px; font-weight: 400; color: var(--ink-3); margin-left: 1px; }
.row-val.accent { color: #0EA5E9; }
/* 已打卡计划的服用时间：本身是个按钮，点了能改 */
.time-btn {
  font-size: 12px; font-weight: 500; color: var(--ink-3);
  background: var(--inset-2); border-radius: 8px; padding: 3px 8px;
  font-variant-numeric: tabular-nums;
}
.time-btn:active { background: var(--bg-deep); }
.tag {
  font-size: 11px; padding: 1px 6px; border-radius: 6px;
  background: var(--inset-2); color: var(--ink-3); font-weight: 400;
}
.chev { color: var(--ink-4); flex: 0 0 auto; }
.chev svg { width: 15px; height: 15px; display: block; }
.check {
  width: 22px; height: 22px; border-radius: 50%; flex: 0 0 auto;
  box-shadow: inset 0 0 0 1.5px var(--ink-4); display: grid; place-items: center;
}
.check.on { background: var(--mint); box-shadow: none; color: #fff; }
.check svg { width: 13px; height: 13px; }

/* v97 防重叠加固：快捷按钮行窄屏自动换行，且与下方流水列表保持固定间距 */
.quick { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 11px; }
.card[data-card="water"] .quick { margin-bottom: 8px; }
.qbtn {
  flex: 1; padding: 9px 0; min-height: 44px; border-radius: var(--r-pill);
  background: var(--sky-soft); color: #0A76A8; font-size: 14px; font-weight: 600;
}
.qbtn.primary { background: var(--brand); color: #fff; flex: 1.25; }
/* v124（M3 §3.2 绿色只留给达标语义）：写今日小结改 brand-fixed 底 + on-brand-fixed 字 */
.qbtn.brand-fixed { background: var(--brand-fixed); color: var(--on-brand-fixed); }

.addrow {
  width: 100%; margin-top: 10px; padding: 9px 0; border-radius: var(--r-inset);
  background: var(--inset-2); color: var(--ink-2); font-size: 14px; font-weight: 500;
  display: flex; align-items: center; justify-content: center; gap: 5px;
}
.addrow .plus { color: var(--brand); font-weight: 600; }

.hint-row { padding: 12px 0; color: var(--ink-3); font-size: 13px; text-align: center; }

/* ------------------------------------------------ 今日页：打卡式新组件 */

/* 饮水：按时段汇总行 */
.wsegs { margin-top: 10px; display: flex; flex-direction: column; }
.wseg-row {
  width: 100%; display: flex; align-items: center; gap: 11px;
  padding: 10px 2px; border-bottom: 1px solid var(--line); text-align: left;
}
.wseg:last-child .wseg-row { border-bottom: none; }
.wseg-row .ico { width: 34px; height: 34px; border-radius: 12px; flex: 0 0 auto;
  display: grid; place-items: center; background: var(--sky-soft); color: #0A76A8; }
.wseg-row .row-title { font-size: 15px; font-weight: 600; }
.wseg-row .row-sub { font-size: 12px; color: var(--ink-3); margin-top: 2px; }
.wseg-row .row-val { font-size: 16px; }
.wseg-row .chev { color: var(--ink-4); display: grid; place-items: center; }
.wseg-row .chev.up svg { transform: rotate(90deg); }
.wseg-detail { padding: 2px 0 8px; border-bottom: 1px solid var(--line); }
/* 饮水：时段行点开后的明细区 */
.seg-plans + .wseg-detail { margin-top: 8px; border-bottom: none; padding-bottom: 2px; }

/* 排便 / 活动 / 饮水时段行（v42）：与保健周期管理同款视觉，复用 supp-plan 结构 */
button.supp-plan { width: 100%; text-align: left; }
.mp-ico {
  width: 24px; height: 24px; border-radius: 50%; flex: 0 0 auto;
  display: grid; place-items: center;
}
.mp-ico svg { width: 13px; height: 13px; }
.mp-ico.blue { background: var(--sky-soft); color: #0A76A8; }
.mp-ico.green { background: var(--mint-soft); color: #12A878; }
.mp-ico.mint { background: #E4F1EA; color: #2F6B4F; }
.supp-plan.on { background: #EAF4FB; }
.supp-plan .chev { color: var(--ink-4); flex: 0 0 auto; display: grid; place-items: center; }
.mp-title .mp-n { font-size: 13.5px; }
.mp-title .mp-n small { font-size: 11px; font-weight: 600; margin-left: 1px; }
.pill-val {
  flex: 0 0 auto; padding: 5px 11px; border-radius: var(--r-pill);
  background: var(--card); color: #0A76A8; font-size: 12px; font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.pill-val small { font-size: 10px; font-weight: 500; margin-left: 1px; }
.seg-plans { margin-top: 10px; }

/* 饮食安排 / 保健：左圆圈 + 大标题 + 右胶囊按钮 */
.meal-plans, .supp-plans { display: flex; flex-direction: column; gap: 7px; }
.meal-plan, .supp-plan {
  display: flex; align-items: center; gap: 11px;
  background: var(--inset-2); border-radius: 14px; padding: 9px 12px;
}
.meal-plan.done, .supp-plan.done { background: var(--inset); }
/* 特殊饮食日：计划整行划掉置灰 */
.meal-plan.off { background: var(--inset); opacity: .62; }
.meal-plan.off .mp-title { text-decoration: line-through; text-decoration-thickness: 1.5px; color: var(--ink-3); }
.meal-plan.off .mp-sub { color: var(--ink-4); }
.meal-plan.off .mp-n { color: var(--ink-4); }
.mp-check.off { box-shadow: inset 0 0 0 2px var(--ink-4); opacity: .5; }
/* 特殊饮食日：划线的原计划整体缩小（双列小瓦片，行高约为正常行的 1/3） */
.meal-plans.struck { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.meal-plans.struck .meal-plan {
  padding: 5px 8px; gap: 6px; align-items: center; min-width: 0; border-radius: 11px;
}
.meal-plans.struck .mp-check { width: 15px; height: 15px; }
.meal-plans.struck .mp-body { min-width: 0; }
.meal-plans.struck .mp-title {
  font-size: 11.5px; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  display: block; text-overflow: ellipsis;
}
.meal-plans.struck .mp-title .mp-n { font-weight: 600; }
.meal-plans.struck .mp-sub { display: none; }
/* 特殊饮食开关 */
.sm-toggle {
  width: 100%; display: flex; align-items: center; gap: 11px;
  padding: 10px 13px; background: var(--inset-2); border-radius: 14px;
  margin: 10px 0 2px; text-align: left;
}
.sm-toggle.on { background: #FFF4DF; }
.tg-track {
  width: 44px; height: 26px; border-radius: 99px; flex: 0 0 auto;
  background: var(--ink-4); position: relative; transition: background .2s;
}
.sm-toggle.on .tg-track { background: #D9930F; }
.tg-knob {
  position: absolute; top: 3px; left: 3px; width: 20px; height: 20px;
  border-radius: 50%; background: #fff; transition: left .2s;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .2);
}
.sm-toggle.on .tg-knob { left: 21px; }
.tg-txt { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; }
.tg-txt b { font-size: 14px; letter-spacing: -0.01em; }
.tg-txt small { font-size: 11px; color: var(--ink-3); margin-top: 1px; }
/* 特殊饮食记录列表：排在暂停的计划之前 */
.sm-list { display: flex; flex-direction: column; gap: 7px; margin: 10px 0 2px; }
.sm-row {
  display: flex; align-items: center; gap: 10px;
  background: #FFF7E8; border: 1px solid rgba(217, 147, 15, .25);
  border-radius: 13px; padding: 10px 12px; text-align: left; min-width: 0;
}
.sm-time { font-size: 12.5px; font-weight: 700; color: #B07C1C; font-variant-numeric: tabular-nums; flex: 0 0 auto; }
.sm-sum {
  flex: 1; min-width: 0; font-size: 13px; color: var(--ink-2);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.plan-paused { margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--line-2); }
.pp-title { font-size: 12px; color: var(--ink-4); margin-bottom: 8px; }
/* 饮食模板：整套配置打包保存 / 一键应用 */
.tpl-box {
  border: 1px solid var(--line); border-radius: 15px; margin: 0 0 14px;
  overflow: hidden; background: var(--inset-2);
}
.tpl-head { display: flex; align-items: center; gap: 7px; padding: 10px 12px; }
.tpl-head b { font-size: 14px; }
.tpl-head span {
  font-size: 11px; color: var(--ink-3); flex: 1; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.tpl-add { flex: 0 0 auto; color: var(--brand); font-weight: 600; font-size: 12.5px; }
.tpl-row {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 12px; background: var(--card); border-top: 1px solid var(--line);
}
.tpl-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.tpl-main b { font-size: 14px; letter-spacing: -0.01em; }
.tpl-main small { font-size: 11px; color: var(--ink-3); margin-top: 1px; }
.tpl-apply {
  flex: 0 0 auto; background: var(--brand); color: #fff;
  border-radius: 10px; padding: 7px 13px; font-size: 12.5px; font-weight: 600;
}
.tpl-del { width: 24px; height: 24px; border-radius: 50%; flex: 0 0 auto; color: var(--ink-4); font-size: 12px; background: var(--inset-2); }
.tpl-empty { padding: 10px 12px; font-size: 11.5px; color: var(--ink-4); border-top: 1px solid var(--line); }
/* 当前执行方案行（Clean 12NOV 设计稿）：餐次 + 清单 + kcal 估算 */
.cur-row {
  display: flex; align-items: baseline; gap: 8px;
  padding: 9px 12px; background: var(--card); border-top: 1px solid var(--line);
}
.cur-slot {
  flex: 0 0 auto; font-size: 12px; font-weight: 700; color: var(--brand);
  background: var(--inset-2); border-radius: 8px; padding: 3px 9px;
}
.cur-items { flex: 1; min-width: 0; font-size: 12.5px; color: var(--ink-2); }
.cur-kcal { flex: 0 0 auto; font-size: 11.5px; font-weight: 600; color: var(--ink-3); }
/* 备选模版描述（设计稿卡片说明文案） */
.tpl-desc {
  font-size: 11.5px; color: var(--ink-3); line-height: 1.55;
  margin-top: 5px; overflow: hidden; display: -webkit-box;
  -webkit-line-clamp: 3; -webkit-box-orient: vertical;
}
.tpl-form { padding: 10px 12px; background: var(--card); border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
.tpl-form-row { display: flex; gap: 7px; align-items: center; }
.tpl-form-row .input { flex: 1; min-width: 0; }
.mp-check {
  width: 34px; height: 34px; border-radius: 50%; flex: 0 0 auto;
  box-shadow: inset 0 0 0 2px var(--ink-4); display: grid; place-items: center; color: #fff;
}
.mp-check.on { background: #34C97B; box-shadow: none; color: #0A3D24; }
.mp-body { flex: 1; min-width: 0; }
.mp-title { font-size: 15px; font-weight: 700; letter-spacing: -0.01em; line-height: 1.3; }
.mp-title .mp-n { color: #0B8A66; font-weight: 700; }
.mp-sub { font-size: 12.5px; color: var(--ink-2); margin-top: 3px; }
.meal-plan.done .mp-title, .supp-plan.done .mp-title { color: var(--ink); }
.pill-go {
  flex: 0 0 auto; padding: 8px 14px; border-radius: var(--r-pill);
  background: #E8641B; color: #fff; font-size: 13.5px; font-weight: 700;
}
.pill-done {
  flex: 0 0 auto; padding: 8px 14px; border-radius: var(--r-pill);
  background: #14532D; color: #fff; font-size: 13.5px; font-weight: 700;
}
.pill-ghost {
  flex: 0 0 auto; padding: 6px 13px; border-radius: var(--r-pill);
  background: var(--surface-high); color: var(--ink-2); font-size: 12.5px; font-weight: 600;
  border: none;
}

/* 保健计划：周期进度行 */
.sp-cycle {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 7px; padding: 7px 11px; border-radius: 11px;
  background: #fff; font-size: 12px; color: var(--ink-2);
}
.sp-cycle b { color: #C0560B; font-weight: 700; font-variant-numeric: tabular-nums; }
/* 今日页保健卡紧凑版（v40）：周期并入副标题 + 迷你进度条，行高约为原来一半 */
.supp-plans .supp-plan { padding: 6px 10px; gap: 9px; border-radius: 12px; }
.supp-plans .mp-check { width: 24px; height: 24px; }
.supp-plans .mp-title { font-size: 14px; }
.supp-plans .mp-sub { font-size: 11.5px; margin-top: 1px; }
.sp-bar {
  display: block; height: 4px; border-radius: 2px; overflow: hidden;
  background: rgba(192, 86, 11, 0.16); margin-top: 4px;
}
.sp-bar i { display: block; height: 100%; background: #C0560B; border-radius: 2px; }

/* 排便与消化健康 */
.pill-hl {
  padding: 6px 13px; border-radius: var(--r-pill); font-size: 13px; font-weight: 700;
  background: #6EE7A0; color: #06341C;
}
.pill-hl.warn { background: #FBD86B; color: #5C3D00; }
.pill-hl.bad { background: #F8A9A0; color: #6B1000; }
.poo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 4px; }
.poo-box { background: var(--inset-2); border-radius: 16px; padding: 12px 14px; }
.poo-label { font-size: 12.5px; color: var(--ink-2); display: flex; align-items: center; justify-content: space-between; }
.poo-big { font-size: 30px; font-weight: 700; letter-spacing: -0.03em; line-height: 1.15; margin-top: 4px; font-variant-numeric: tabular-nums; }
.poo-big small { font-size: 13px; font-weight: 500; color: var(--ink-3); margin-left: 3px; }
.poo-big.sm { font-size: 22px; line-height: 1.3; }
.poo-sub { font-size: 12px; color: #0B8A66; font-weight: 600; margin-top: 3px; }
.poo-nodes {
  display: flex; align-items: center; gap: 8px;
  margin-top: 10px; padding: 9px 12px; border-radius: 12px; background: var(--inset-2);
  color: var(--ink-2); font-size: 12.5px;
}
.poo-nodes svg { color: var(--ink-3); flex: 0 0 auto; }
.pn-txt { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pn-add { flex: 0 0 auto; color: #C0560B; font-weight: 700; font-size: 13px; padding: 2px 4px; }

/* ---------------------------------------------------------------- 底部导航 */

.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  height: calc(var(--tabbar-h) + var(--safe-b));
  padding-bottom: var(--safe-b);
  display: grid; grid-template-columns: repeat(4, 1fr);
  align-items: center;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: saturate(180%) blur(14px);
  border-top: 1px solid var(--line);
}
.tab {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  color: var(--ink-3); font-size: 10px; padding-top: 2px; min-height: 44px;
}
.tab svg { width: 21px; height: 21px; }
.tab.on { color: var(--brand); }
/* Clean 12NOV 改版：中央 FAB 已移除，打卡入口收敛到各卡片与今日小结卡 */

/* 日历生活档案 · 当天疾病症状 */
.cal-syms { margin-top: 8px; }
.cal-sym {
  display: flex; align-items: baseline; gap: 8px; width: 100%; text-align: left;
  padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 13px; color: var(--ink);
}
.cal-sym:last-child { border-bottom: none; }
.cal-sym .sym-time { flex: none; font-variant-numeric: tabular-nums; color: var(--ink-3); font-size: 12px; }
.cal-sym .sym-kind { flex: none; font-weight: 600; }
.cal-sym-detail { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-sym-detail em { font-style: normal; font-size: 11px; color: var(--ink-3); margin-left: 6px; }
.fab {
  width: 50px; height: 50px; border-radius: 50%;
  background: linear-gradient(150deg, var(--brand-2), var(--brand));
  color: #fff; display: grid; place-items: center;
  box-shadow: var(--shadow-fab); margin-top: -16px;
}
.fab svg { width: 24px; height: 24px; }

/* ---------------------------------------------------------------- 面板 */

.mask {
  position: fixed; inset: 0; z-index: 40;
  background: rgba(31, 27, 22, 0.34);
  opacity: 0; pointer-events: none; transition: opacity 0.22s ease;
}
.mask.on { opacity: 1; pointer-events: auto; }

.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 41;
  max-height: 92vh; display: flex; flex-direction: column;
  background: var(--bg);
  border-radius: 20px 20px 0 0;
  box-shadow: var(--shadow-sheet);
  transform: translateY(102%); transition: transform 0.28s cubic-bezier(0.32, 0.72, 0, 1);
  padding-bottom: var(--safe-b);
}
.sheet.on { transform: translateY(0); }
.sheet-head {
  display: flex; align-items: center; gap: 10px;
  padding: 12px var(--gutter) 10px;
  border-bottom: 1px solid var(--line);
  background: var(--bg); border-radius: 20px 20px 0 0;
}
.sheet-head .t { font-size: 16px; font-weight: 700; }
.sheet-cancel { font-size: 15px; color: var(--ink-2); }
.sheet-save { font-size: 15px; font-weight: 600; color: var(--brand); }
.sheet-body { overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 12px var(--gutter) 16px; }
/* v110 右上角「饮食管理」入口：轻量文字链接，与字段标签同节奏（去掉胶囊底色） */
.diet-mgr-row { display: flex; justify-content: flex-end; align-items: baseline; margin: 0 0 12px; }
.diet-mgr-btn {
  font-size: 15px; font-weight: 700; color: var(--brand);
  background: none; border: none; padding: 0; cursor: pointer;
  letter-spacing: 0.2px;
}
.sheet-foot { padding: 8px var(--gutter) 12px; background: var(--bg); border-top: 1px solid var(--line); }

/* Clean 12NOV 阶段3：独立整页录入（饮食/饮水/排便/运动） */
.sheet.full {
  top: 0; height: 100dvh; max-height: 100dvh;
  border-radius: 0; padding-bottom: var(--safe-b);
}
.sheet.full .sheet-head { border-radius: 0; padding-top: calc(10px + env(safe-area-inset-top)); }
/* v111：关闭/保存为文字按钮后不再放大（18px 是 ✕ 图标时代的遗产），与标题 16px 保持层级 */
.sheet.full .sheet-body { padding-bottom: 24px; }
.sheet.full .sheet-foot { padding-bottom: 12px; }
.sheet.full .sheet-foot .primary-btn { padding: 15px 0; font-size: 16px; }
.rec-hero { display: flex; gap: 14px; align-items: center; margin-bottom: 16px; }
.rec-hero .ring {
  width: 92px; height: 92px; border-radius: 50%; flex: none;
  display: grid; place-items: center;
}
.rec-hero .ring-in {
  width: 74px; height: 74px; border-radius: 50%; background: var(--bg);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  line-height: 1.25;
}
.rec-hero .ring-in b { font-size: 15px; }
.rec-hero .ring-in small { font-size: 10px; color: var(--ink-3); }
.rec-hero .ring-in span { font-size: 10px; color: var(--brand); font-weight: 600; }
.rec-hero .hero-side { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.rec-hero .hero-side .hint-row { margin: 0; text-align: left; }
.joint-card {
  background: var(--inset-2); border-radius: 14px;
  padding: 12px 14px; margin-bottom: 14px;
}
.joint-card .joint-title { font-size: 12.5px; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
.joint-card .joint-item { font-size: 11.5px; color: var(--ink-3); line-height: 1.7; }

.primary-btn {
  width: 100%; padding: 15px 0; border-radius: 14px; min-height: 50px;
  background: var(--brand); /* v124（M3 §3.1）：主按钮渐变改实色 */
  color: #fff; font-size: 16px; font-weight: 600;
  box-shadow: 0 6px 14px rgba(144, 77, 0, 0.18); /* 阴影随实色收淡 */
}
.primary-btn.ghost { background: var(--inset-2); color: var(--ink-2); box-shadow: none; }
.primary-btn:disabled { opacity: 0.55; }

.field { margin-bottom: 14px; }
.field-label { font-size: 14px; color: var(--ink-2); font-weight: 700; margin-bottom: 7px; display: flex; align-items: center; gap: 6px; }
.field-label .hint { margin-left: auto; font-size: 12px; color: var(--ink-4); font-weight: 500; }
.input {
  width: 100%; padding: 10px 12px; border-radius: 12px;
  background: var(--card); box-shadow: inset 0 0 0 1px var(--line-2);
  border: 0; outline: none; font-size: 16px;
}
.input:focus { box-shadow: inset 0 0 0 1.5px var(--brand-line); }
textarea.input { min-height: 74px; resize: vertical; line-height: 1.5; }
.time-row { display: flex; align-items: center; gap: 8px; }
.input::placeholder { color: var(--ink-4); }
.count { font-size: 11px; color: var(--ink-4); text-align: right; margin-top: 4px; }

.bristol { display: flex; gap: 6px; }
.br-item {
  flex: 1; padding: 8px 4px 7px; border-radius: 12px;
  background: var(--card); box-shadow: inset 0 0 0 1px var(--line);
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  color: var(--ink-2);
}
.br-item .br-v { font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.br-item .br-n { font-size: 12px; font-weight: 500; white-space: nowrap; }
.br-item.on { background: var(--brand-soft); box-shadow: inset 0 0 0 1.5px var(--brand-line); color: #C4560A; }
.br-item.on .br-v { color: #E08A3C; }
.br-desc { font-size: 12px; color: var(--ink-2); margin-top: 8px; text-align: center; min-height: 17px; }

.colors { display: flex; gap: 6px; flex-wrap: wrap; }
.color-chip {
  display: flex; align-items: center; gap: 5px;
  padding: 6px 10px; border-radius: var(--r-pill);
  background: var(--card); box-shadow: inset 0 0 0 1px var(--line);
  font-size: 12px; color: var(--ink-2);
}
.color-chip i { width: 9px; height: 9px; border-radius: 50%; display: block; }
.color-chip.on { box-shadow: inset 0 0 0 1.5px var(--brand-line); background: var(--brand-soft); color: #C4560A; }

.stepper { display: flex; align-items: center; gap: 10px; }
.step-btn {
  width: 38px; height: 38px; border-radius: 50%; flex: 0 0 auto;
  background: var(--card); box-shadow: inset 0 0 0 1px var(--line-2);
  display: grid; place-items: center; font-size: 19px; color: var(--ink-2);
}
.step-btn.plus { background: var(--brand); color: #fff; box-shadow: none; }
.step-val { flex: 1; text-align: center; font-size: 26px; font-weight: 700; letter-spacing: -0.02em; }
.step-val small { font-size: 12px; font-weight: 500; color: var(--ink-3); margin-left: 3px; }
/* 运动时长/步数：中值可点击直接输入（点数字编辑，失焦生效） */
.step-val-wrap { flex: 1; display: flex; align-items: baseline; justify-content: center; gap: 3px; min-width: 0; }
.step-val-input {
  width: 76px; border: 0; outline: 0; background: transparent; text-align: center;
  font: inherit; font-size: 26px; font-weight: 700; letter-spacing: -0.02em; color: var(--ink);
  border-bottom: 1.5px dashed var(--line-2); border-radius: 0; padding: 0 0 2px;
}
.step-val-input:focus { border-bottom-color: var(--brand); }
.step-val-input::placeholder { color: var(--ink-3); font-weight: 500; }
.step-val-wrap small { font-size: 12px; font-weight: 500; color: var(--ink-3); }

.photo-strip { display: flex; gap: 10px; flex-wrap: wrap; }
.photo-thumb {
  width: 96px; height: 96px; border-radius: 14px; overflow: hidden;
  background: var(--inset-2); position: relative;
}
.photo-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-thumb .del {
  position: absolute; top: 4px; right: 4px;
  width: 20px; height: 20px; border-radius: 50%;
  background: rgba(31, 27, 22, 0.6); color: #fff;
  font-size: 11px; line-height: 20px; text-align: center;
}
.photo-add {
  width: 96px; height: 96px; border-radius: 14px;
  background: var(--brand-soft); border: 1.5px dashed var(--brand-line);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; color: var(--brand); font-size: 11px; font-weight: 500;
}
.cam-circle {
  width: 32px; height: 32px; border-radius: 50%; background: #fff;
  display: grid; place-items: center; box-shadow: 0 2px 6px rgba(31, 27, 22, 0.12);
}
.cam-circle svg { width: 17px; height: 17px; }

/* ---------------------------------------------------------------- 今日抓拍 */

.snaps {
  display: flex; gap: 10px; overflow-x: auto; margin-top: 11px;
  padding-bottom: 2px; -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.snaps::-webkit-scrollbar { display: none; }
.snap {
  position: relative; flex: 0 0 44%; aspect-ratio: 4 / 3;
  border-radius: 18px; overflow: hidden; background: var(--inset);
}
.snap img { width: 100%; height: 100%; object-fit: cover; display: block; }
.snap.add {
  flex: 0 0 32%; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 6px;
  background: var(--brand-soft); border: 1.5px dashed var(--brand-line);
  color: var(--brand); font-size: 12px; font-weight: 500;
}
.snaps.only .snap.add { flex: 1; aspect-ratio: 16 / 7; }
/* 无照片时的紧凑上传行（v40） */
.snap-empty {
  display: flex; align-items: center; justify-content: center; gap: 7px;
  width: 100%; margin-top: 9px; padding: 9px 12px;
  background: var(--brand-soft); border: 1.5px dashed var(--brand-line);
  border-radius: 12px; color: var(--brand); font-size: 12.5px; font-weight: 500;
}

/* ---------------------------------------------------------------- 看大图 */

.viewer {
  position: fixed; inset: 0; z-index: 80; display: none;
  flex-direction: column; background: rgba(24, 20, 16, 0.95);
}
.viewer.on { display: flex; }
.viewer-head {
  display: flex; align-items: center; gap: 8px;
  padding: calc(12px + env(safe-area-inset-top, 0px)) var(--gutter) 10px;
  color: #fff; font-size: 15px;
}
.viewer-head .t { flex: 1; font-weight: 600; }
.viewer-head .sheet-cancel { color: rgba(255, 255, 255, 0.85); }
.viewer-body {
  flex: 1; overflow-y: auto; padding: 0 var(--gutter) calc(20px + var(--safe-b));
  display: grid; gap: 12px; align-content: start;
  overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
}
.viewer-item { position: relative; border-radius: 14px; overflow: hidden; background: #000; scroll-margin-top: 8px; }
/* 任何比例的照片都限制在一屏内完整可见，不再需要上下滚动找边 */
.viewer-item img {
  width: 100%; display: block;
  max-height: calc(100dvh - 150px); object-fit: contain; background: #0a0908;
}
.viewer-item .del {
  position: absolute; top: 8px; right: 8px; padding: 5px 12px;
  border-radius: 999px; background: rgba(255, 255, 255, 0.92);
  color: var(--ink); font-size: 12px; font-weight: 500;
}

/* ---------------------------------------------------------------- 日历 */

.cal-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.cal-month { font-size: 17px; font-weight: 600; letter-spacing: -0.01em; }
.cal-week, .cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.cal-week { margin-bottom: 4px; }
.cal-week span { text-align: center; font-size: 11px; color: var(--ink-3); }
.cal-cell {
  aspect-ratio: 1 / 1.16; border-radius: 11px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  font-size: 14px; font-variant-numeric: tabular-nums; color: var(--ink-2);
}
.cal-cell.out { color: var(--ink-4); }
.cal-cell.sel { background: var(--brand); color: #fff; box-shadow: 0 5px 12px rgba(255, 122, 26, 0.26); }
.cal-cell .cd { width: 5px; height: 5px; border-radius: 50%; background: transparent; }
.cal-cell .cd.full { background: var(--mint); }
.cal-cell .cd.part { background: var(--amber); }
.cal-cell .cd.light { background: var(--ink-4); }
.cal-cell.sel .cd { background: #fff; }
.legend { display: flex; gap: 12px; margin-top: 10px; flex-wrap: wrap; }
.legend span { display: flex; align-items: center; gap: 5px; font-size: 11px; color: var(--ink-3); }
.legend i { width: 6px; height: 6px; border-radius: 50%; display: block; }

/* 时间线 */
.tl { position: relative; padding-left: 26px; margin-top: 4px; }
.tl::before {
  content: ""; position: absolute; left: 10px; top: 6px; bottom: 6px;
  width: 1.5px; background: var(--line-2);
}
.tl-item { position: relative; padding: 0 0 14px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-dot {
  position: absolute; left: -26px; top: 1px;
  width: 21px; height: 21px; border-radius: 50%;
  display: grid; place-items: center; font-size: 10px; font-weight: 600;
  background: var(--inset-2); color: var(--ink-2);
}
.tl-dot.water { background: var(--sky-soft); color: #0A76A8; }
.tl-dot.meal { background: var(--amber-soft); color: #B47400; }
.tl-dot.poop { background: var(--clay-soft); color: var(--clay); }
.tl-dot.supp { background: var(--violet-soft); color: var(--violet); }
.tl-dot.note { background: var(--brand-soft); color: #C4560A; }
.tl-dot.snap { background: var(--mint-soft); color: #0B8A66; }
.tl-time { font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.tl-title { font-size: 14px; font-weight: 500; margin-top: 1px; }
.tl-body { font-size: 12px; color: var(--ink-2); margin-top: 3px; }
.tl-tags { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 5px; }
.tl-photos { display: flex; gap: 6px; margin-top: 7px; }
.tl-photos img { width: 58px; height: 58px; border-radius: 9px; object-fit: cover; }

/* 生活档案 · 早/午/晚/夜 分时段 */
.tl2 { margin-top: 14px; }
.seg-block { position: relative; padding: 0 0 18px 30px; }
.seg-block:last-child { padding-bottom: 2px; }
.seg-block::before {
  content: ''; position: absolute; left: 9px; top: 25px; bottom: 2px;
  width: 1.5px; background: var(--line-2); border-radius: 1px;
}
.seg-block:last-child::before { display: none; }
.seg-dot {
  position: absolute; left: 0; top: 0;
  width: 21px; height: 21px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 10px; font-weight: 600;
  background: var(--inset-2); color: var(--ink-2);
}
.seg-block.morning .seg-dot { background: #E4F1EA; color: #2F6B4F; }
.seg-block.noon .seg-dot { background: var(--sky-soft); color: #0A76A8; }
.seg-block.evening .seg-dot { background: var(--amber-soft); color: #B47400; }
.seg-block.night .seg-dot { background: var(--violet-soft); color: var(--violet); }
.seg-head { display: flex; align-items: baseline; gap: 8px; }
.seg-title { font-size: 14px; font-weight: 600; letter-spacing: -0.01em; }
.seg-time { margin-left: auto; font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.seg-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.stag {
  font-size: 11px; line-height: 1.55; padding: 2px 8px; border-radius: var(--r-pill);
  background: var(--inset-2); color: var(--ink-2); white-space: nowrap;
}
.stag.act { background: #E4F1EA; color: #2F6B4F; }
.stag.meal { background: var(--amber-soft); color: #9A6300; }
.stag.meal.sub { background: var(--inset); color: var(--ink-2); }
.stag.water { background: var(--sky-soft); color: #0A76A8; }
.stag.poop { background: var(--clay-soft); color: #8A5A2E; }
.stag.poop.warn { background: var(--danger-soft); color: var(--danger); }
.stag.supp { background: var(--violet-soft); color: var(--violet); }
.seg-mine {
  font-size: 12.5px; color: var(--ink); margin-top: 7px; line-height: 1.6;
  padding: 7px 10px; border-radius: 10px; background: var(--inset);
  box-shadow: inset 2px 0 0 var(--brand-line);
}
.seg-photos { display: flex; gap: 6px; margin-top: 8px; }
.seg-photos img { width: 64px; height: 64px; border-radius: 11px; object-fit: cover; }
.seg-actions { display: flex; gap: 6px; margin-top: 8px; }
.seg-add {
  font-size: 11px; color: var(--ink-3);
  padding: 3px 9px; border-radius: var(--r-pill);
  background: transparent; box-shadow: inset 0 0 0 1px var(--line-2);
}
.seg-add:active { background: var(--inset-2); }

/* v120：逐笔明细并入生活档案卡内（卡底明细附录） */
.daylog { margin-top: 16px; padding-top: 12px; border-top: 1px dashed var(--line-2); }
.daylog-head { display: flex; align-items: center; gap: 7px; margin-bottom: 8px; }
.daylog-ico { display: grid; place-items: center; color: var(--ink-3); }
.daylog-title { font-size: 13px; font-weight: 600; letter-spacing: -0.01em; }
.daylog-note { margin-left: auto; font-size: 11px; color: var(--ink-3); }

/* ===== v121 便便卡排版：四档标尺 + 时间胶囊 ===== */
.poop-scale { display: flex; gap: 4px; margin-top: 10px; }
.ps-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.ps-dot {
  width: 17px; height: 17px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 9px; font-weight: 700;
  background: var(--inset-2); color: var(--ink-4);
  font-variant-numeric: tabular-nums;
}
.ps-lab { font-size: 10px; color: var(--ink-3); letter-spacing: .02em; font-variant-numeric: tabular-nums; }
.ps-name { font-size: 9px; color: var(--ink-4); margin-top: -3px; }
.ps-col.ideal .ps-dot { box-shadow: inset 0 0 0 1.5px var(--mint); }  /* 理想档描边提示 */
.ps-col.has.ideal .ps-dot { background: var(--mint); color: #fff; }
.ps-col.has.mid .ps-dot { background: var(--amber-soft); color: var(--amber); }
.ps-col.has.bad .ps-dot { background: var(--clay-soft); color: var(--clay); }
.ps-col.has .ps-lab { color: var(--ink-2); font-weight: 600; }
.ps-col.has .ps-name { color: var(--ink-3); }
.poop-times { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; margin-top: 8px; }
.pt-chip {
  font-size: 11px; padding: 2.5px 9px; border-radius: var(--r-pill);
  background: var(--clay-soft); color: var(--clay);
  font-variant-numeric: tabular-nums;
}
.pt-place { font-size: 11px; color: var(--ink-3); margin-left: 2px; }

/* v121 保健品全部完成：有温度的收尾条 */
.supp-cheer {
  display: flex; align-items: center; gap: 6px;
  margin-top: 8px; padding: 8px 11px;
  font-size: 12.5px; font-weight: 500;
  color: #2F6B4F; background: #E4F1EA;
  border-radius: 10px;
}

/* ---------------------------------------------------------------- 统计 */

.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stat-tile {
  background: var(--card); border-radius: var(--r-card); padding: 12px;
  box-shadow: var(--shadow-card);
}
.stat-tile.wide { grid-column: 1 / -1; }
.stat-label { font-size: 11px; color: var(--ink-3); }

/* 统计 · 特殊情况模块：按连续日期聚合的事件段 */
.sp-tile .stat-label { display: flex; align-items: center; gap: 8px; }
.sp-badge {
  display: inline-flex; align-items: center; padding: 2px 9px; border-radius: 99px;
  background: rgba(236, 154, 41, 0.14); color: #B4720E; font-size: 11px; font-weight: 600;
}
.sp-ep {
  margin-top: 10px; padding: 9px 11px; border-radius: 12px;
  background: var(--inset); display: flex; flex-direction: column; gap: 5px;
}
.sp-head { display: flex; align-items: baseline; gap: 8px; }
.sp-head b { font-size: 13.5px; font-weight: 700; letter-spacing: -0.01em; }
.sp-head span { font-size: 11.5px; color: var(--ink-3); }
.sp-reason, .sp-food { display: flex; align-items: flex-start; gap: 7px; font-size: 12.5px; color: var(--ink); line-height: 1.45; word-break: break-all; }
.sp-reason i, .sp-food i {
  flex: none; font-style: normal; font-size: 10.5px; font-weight: 600; color: var(--ink-3);
  border: 1px solid var(--line); border-radius: 5px; padding: 1px 5px; margin-top: 1px;
}
.sp-reason i { color: #B4720E; border-color: rgba(236, 154, 41, 0.35); background: rgba(236, 154, 41, 0.08); }
.sp-empty { margin-top: 8px; font-size: 12.5px; color: var(--ink-3); }
.stat-value { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; margin-top: 3px; font-variant-numeric: tabular-nums; }
.stat-value small { font-size: 11px; font-weight: 500; color: var(--ink-3); margin-left: 2px; }
.stat-note { font-size: 11px; color: var(--ink-2); margin-top: 2px; }

.bars { display: flex; align-items: flex-end; gap: 3px; height: 64px; margin-top: 10px; }
.bar-col { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; height: 100%; }
.bar-col i { display: block; border-radius: 4px 4px 2px 2px; background: var(--sky); min-height: 2px; }
.bar-col.mint i { background: var(--mint); }
.bar-col.brand i { background: var(--brand); }
.bar-col.clay i { background: var(--clay); }
.bars-x { display: flex; gap: 3px; margin-top: 4px; }
.bars-x span { flex: 1; text-align: center; font-size: 9px; color: var(--ink-4); }

.stack { display: flex; height: 10px; border-radius: var(--r-pill); overflow: hidden; margin-top: 8px; }
.stack i { display: block; height: 100%; }
.stack-legend { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; }
.stack-legend div { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--ink-2); }
.stack-legend i { width: 7px; height: 7px; border-radius: 2px; }
.stack-legend b { margin-left: auto; font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------- 我的 */

.profile-hero { display: flex; align-items: center; gap: 14px; }
.profile-avatar {
  width: 64px; height: 64px; border-radius: 50%;
  background: linear-gradient(150deg, #FFDCAF, #FFB05C);
  display: grid; place-items: center; font-size: 24px; font-weight: 600; color: #7A4A10;
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.7);
}
.profile-name { font-size: 19px; font-weight: 600; letter-spacing: -0.01em; }
.profile-sub { font-size: 12px; color: var(--ink-3); margin-top: 2px; }
.profile-badges { display: flex; gap: 5px; margin-top: 6px; flex-wrap: wrap; }

.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 12px; }
.grid-4 button {
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  padding: 10px 2px; border-radius: 12px; background: var(--inset-2);
  font-size: 11px; color: var(--ink-2);
}
.grid-4 .ico { width: 30px; height: 30px; border-radius: 9px; }

.ring-wrap { display: flex; align-items: center; gap: 14px; }
.ring { flex: 0 0 auto; }
.ring text { font-variant-numeric: tabular-nums; }
.ring-label { font-size: 11px; color: var(--ink-3); }

/* ---------------------------------------------------------------- 杂项 */

.toast {
  position: fixed; left: 50%; bottom: calc(var(--tabbar-h) + var(--safe-b) + 16px);
  transform: translate(-50%, 12px); z-index: 60;
  background: rgba(31, 27, 22, 0.9); color: #fff;
  padding: 9px 16px; border-radius: var(--r-pill); font-size: 13px;
  opacity: 0; pointer-events: none; transition: all 0.22s ease;
  max-width: 80vw; text-align: center;
}
.toast.on { opacity: 1; transform: translate(-50%, 0); }
.toast.err { background: rgba(197, 45, 50, 0.94); }
/* HIG V2 撤销衰减：Toast 底部 5 秒线性进度条（宽度匀速 100%→0），给用户直观时间预期 */
.toast-bar {
  position: absolute; left: 14px; right: 14px; bottom: 5px; height: 2.5px;
  border-radius: 2px; background: rgba(255, 255, 255, 0.55);
  transform-origin: left center; pointer-events: none;
  animation: toast-decay 5s linear forwards;
}
@keyframes toast-decay { from { transform: scaleX(1); } to { transform: scaleX(0); } }

.empty { text-align: center; padding: 26px 12px; color: var(--ink-3); font-size: 13px; }
.empty b { display: block; font-size: 15px; color: var(--ink-2); font-weight: 500; margin-bottom: 3px; }

.card.flash { animation: flashCard 1.4s ease; }
@keyframes flashCard {
  0% { box-shadow: 0 0 0 0 rgba(255, 122, 26, 0.5); }
  100% { box-shadow: var(--shadow-card); }
}

.muted { color: var(--ink-3); }
.row-right { margin-left: auto; display: flex; align-items: center; gap: 6px; }

/* ---------------------------------------------------------------- 饮食餐次 */

.meal-slots { display: flex; gap: 6px; margin-top: 10px; }
.meal-slots .ms {
  flex: 1; text-align: center; padding: 5px 0; border-radius: 9px;
  font-size: 12px; color: var(--ink-4); background: var(--inset-2);
}
.meal-slots .ms.on { background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.row.is-dup { opacity: 0.45; }

.mini-cam {
  width: 27px; height: 27px; border-radius: 50%;
  background: var(--brand-soft); color: var(--brand);
  display: grid; place-items: center; flex: 0 0 auto;
}
.mini-cam svg { width: 16px; height: 16px; }

/* ---------------------------------------------------------------- 头像 */

/* 头像是照片时填满圆形；没有照片仍是「呼」字 */
.avatar, .pet-avatar, .profile-avatar { position: relative; overflow: hidden; }
.ava-img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover; border-radius: 50%;
  display: block;
}
.ava-btn { border: 0; padding: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.ava-slot { position: relative; flex: 0 0 auto; }
.ava-badge {
  position: absolute; right: -3px; bottom: -3px;
  width: 21px; height: 21px; border-radius: 50%;
  background: var(--brand); color: #fff;
  display: grid; place-items: center;
  box-shadow: 0 0 0 2px var(--card);
  pointer-events: none;
}
.ava-badge svg { width: 12px; height: 12px; }

.ava-wrap { text-align: center; padding: 4px 0 2px; }
.ava-big {
  width: 104px; height: 104px; border-radius: 50%;
  margin: 0 auto 12px; position: relative; overflow: hidden;
  background: linear-gradient(150deg, #FFDCAF, #FFB05C);
  display: grid; place-items: center;
  font-size: 34px; font-weight: 600; color: #7A4A10;
  box-shadow: inset 0 0 0 4px rgba(255, 255, 255, 0.75);
}
.ava-note { font-size: 12px; color: var(--ink-3); line-height: 1.6; }
.ava-actions { display: grid; gap: 10px; margin-top: 16px; }

/* ---------------------------------------------------------------- 左滑操作 */

.swipe { position: relative; overflow: hidden; border-bottom: 1px solid var(--line); }
.swipe:last-child { border-bottom: 0; }
.swipe-body {
  position: relative; background: var(--card);
  padding-right: 0;
  transition: padding-right 0.24s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.swipe-body .row { border-bottom: 0; }
/* 展开时行内容让出按钮宽度，份量与时间仍在，便于确认要删的是哪一条 */
.swipe.open .swipe-body { padding-right: 143px; }
.swipe-body .row-title, .swipe-body .row-sub { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.swipe-body .chev { transition: opacity 0.16s ease; }
.swipe.open .swipe-body .chev { opacity: 0; }

/* 按钮从右侧浮出盖住行尾，行内品牌与时间保持可见，方便确认删的是哪一条 */
.swipe-acts {
  position: absolute; top: 0; right: 0; bottom: 0; z-index: 2;
  display: flex; align-items: center; gap: 7px;
  padding-left: 14px; background: var(--card);
  box-shadow: -1px 0 0 0 var(--line);
  transform: translateX(102%);
  transition: transform 0.24s cubic-bezier(0.22, 0.61, 0.36, 1);
  pointer-events: none;
  will-change: transform;
}
.swipe.open .swipe-acts { transform: translateX(0); pointer-events: auto; }
.sw-btn {
  width: 58px; height: calc(100% - 14px); min-height: 40px;
  border-radius: 14px; border: 1.5px solid var(--brand);
  background: var(--card); color: var(--brand);
  font-size: 12px; font-weight: 600;
  display: grid; place-items: center;
  -webkit-tap-highlight-color: transparent;
}
.sw-btn.del { background: var(--brand-soft); }

/* ---------------------------------------------------------------- 饮食分类 */

.chip-unit { display: inline-flex; align-items: center; gap: 2px; font-size: 10px; opacity: 0.62; margin-left: 3px; font-weight: 400; }
.chip-unit::before { content: '·'; opacity: 0.55; }
.chip.mini { font-size: 11px; padding: 4px 9px; }
.chip.mini::after { inset: -11px -8px; }
.fb-item { padding: 10px 0; border-bottom: 1px solid var(--line); }
.fb-item:last-of-type { border-bottom: 0; }
.fb-top { display: flex; align-items: baseline; gap: 8px; }
.fb-name { font-size: 14px; font-weight: 600; }
.fb-unit { font-size: 11px; color: var(--ink-3); flex: 1; }
.fb-del {
  width: 24px; height: 24px; border-radius: 50%; flex: 0 0 auto;
  color: var(--ink-4); font-size: 12px; background: var(--inset-2);
}
.fb-add { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }

/* ---------------------------------------------------------------- 轻提示的撤销 */

.toast.long {
  display: flex; align-items: center; gap: 14px; padding-right: 10px;
  pointer-events: auto; white-space: nowrap; max-width: 92vw;
}
.toast-act {
  color: var(--brand); font-size: 13px; font-weight: 600;
  padding: 2px 6px; flex: 0 0 auto;
}
.field-label .hint.link { color: var(--brand); font-weight: 500; }

/* ---------------------------------------------------------------- 我的 · 设计稿配色 v3
   浅绿渐变的宠物名片、白瓷数据卡、胶囊标签、米橙小贴士；
   只作用于「我的」页与两处管理面板，不影响今日 / 统计 / 日历。
   ------------------------------------------------ */

.mine-wrap { padding: 0 var(--gutter); }

/* 宠物名片 */
.mine-hero {
  position: relative;
  background: linear-gradient(180deg, #F0F9F2 0%, #FFFFFF 52%);
  border: 1px solid rgba(18, 184, 134, 0.08);
  border-radius: 22px;
  padding: 16px 14px 14px;
  box-shadow: var(--shadow-card);
  margin-bottom: 12px;
}
.mine-id { display: flex; align-items: center; gap: 13px; }
.mine-ava-slot { position: relative; flex: 0 0 auto; }
.mine-ava {
  width: 74px; height: 74px; border-radius: 50%;
  background: linear-gradient(150deg, #FFDCAF, #FFB05C);
  display: grid; place-items: center;
  font-size: 28px; font-weight: 600; color: #7A4A10;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.92), 0 6px 16px rgba(31, 27, 22, 0.12);
  overflow: hidden;
}
.mine-ava .ava-img { width: 100%; height: 100%; object-fit: cover; }
.mine-ava-badge {
  position: absolute; right: -2px; bottom: 0;
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--mint); color: #fff;
  display: grid; place-items: center;
  border: 2px solid #fff; box-shadow: 0 2px 6px rgba(18, 184, 134, 0.35);
}
.mine-id-txt { min-width: 0; flex: 1; }
.mine-name { font-size: 24.5px; font-weight: 700; letter-spacing: -0.02em; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.mine-name em { font-style: normal; font-size: 14.5px; font-weight: 500; color: var(--ink-2); letter-spacing: 0; }
.mine-sub { font-size: 13.5px; color: var(--ink-2); margin-top: 5px; }

/* 双数据卡：只留标签与数字，字号放大 */
.mine-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 14px; }
.mine-stat {
  display: flex; align-items: center; gap: 11px;
  background: linear-gradient(135deg, #E9F7EE, #F6FCF8);
  border: 1px solid rgba(18, 184, 134, 0.08);
  border-radius: 15px; padding: 12px 13px;
  text-align: left; font-family: inherit; color: inherit;
}
.mine-stat .s-more { margin-left: auto; flex: 0 0 auto; color: var(--ink-4); display: grid; place-items: center; }
.mine-stat .s-ico { width: 38px; height: 38px; border-radius: 12px; flex: 0 0 auto; display: grid; place-items: center; background: rgba(255, 255, 255, 0.9); }
.mine-stat .s-ico.orange { color: var(--brand); }
.mine-stat .s-ico.green { color: #0B8A66; }
.mine-stat .s-body { min-width: 0; }
.mine-stat-label { font-size: 13px; color: var(--ink-2); }
.mine-stat-value { font-size: 30px; font-weight: 700; letter-spacing: -0.03em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.mine-stat-value small { font-size: 13px; font-weight: 500; color: var(--ink-3); margin-left: 3px; }

/* 四个功能入口 */
.mine-actions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; margin-top: 12px; }
.mine-actions button {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 4px 2px 2px; border-radius: 14px;
  background: transparent; font-size: 12.5px; font-weight: 500; color: var(--ink-2);
}
.mine-actions .a-ico { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; }
.mine-actions .a-ico.orange { background: #FFF0E2; color: #E9761A; }
.mine-actions .a-ico.green { background: #E6F7EF; color: #12A878; }
.mine-actions .a-ico.blue { background: #EAF4FE; color: #3B96D9; }
.mine-actions .a-ico.clay { background: #F7EEE4; color: #B07C4C; }

/* 健康目标 */
.mine-goal-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.mine-goal-box { border-radius: 13px; padding: 10px 12px 11px; }
.mine-goal-box.water { background: #F0F8FE; }
.mine-goal-box.act { background: #FFF5EA; }
.mine-goal-label { font-size: 12.5px; color: var(--ink-2); display: flex; align-items: center; gap: 5px; }
.mine-goal-num { font-size: 23px; font-weight: 700; letter-spacing: -0.03em; line-height: 1.15; margin-top: 3px; font-variant-numeric: tabular-nums; }
.mine-goal-num small { font-size: 12.5px; font-weight: 500; color: var(--ink-3); margin-left: 3px; }
.mine-goal-sub { font-size: 12.5px; color: var(--ink-3); margin-top: 3px; }
.mine-goal-bar { height: 6px; border-radius: 99px; background: rgba(31, 27, 22, 0.07); overflow: hidden; margin-top: 8px; }
.mine-goal-bar i { display: block; height: 100%; border-radius: 99px; background: var(--sky); }
.mine-goal-box.act .mine-goal-bar i { background: var(--brand); }
.goal-calc { font-size: 20px; font-weight: 700; color: var(--brand); font-variant-numeric: tabular-nums; }

/* 饮食管理：三分类并排，品名在上、数字在下，字号放大便于长辈阅读 */
.food-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.food-col {
  display: flex; flex-direction: column; gap: 7px; min-width: 0;
  background: var(--inset-2); border-radius: 15px; padding: 10px 11px 11px;
  text-align: left; border: 1px solid transparent;
}
.food-col:active { background: var(--inset); }
.fc-head { display: flex; align-items: center; gap: 5px; font-size: 14px; font-weight: 600; min-width: 0; }
.fc-head small { font-size: 11px; color: var(--ink-3); font-weight: 400; margin-left: auto; }
.fc-ico { width: 23px; height: 23px; border-radius: 8px; display: grid; place-items: center; flex: 0 0 auto; }
.fc-ico.clay { background: #F7EEE4; color: #B07C4C; }
.fc-ico.mint { background: #E6F8F1; color: #12A878; }
.fc-ico.amber { background: #FFF4DF; color: #D9930F; }
.fc-ico.brand { background: var(--brand-soft); color: var(--brand); }
.fc-row { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.fc-b { font-size: 13px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fc-n { font-size: 20px; font-weight: 700; letter-spacing: -0.03em; line-height: 1.2; font-variant-numeric: tabular-nums; }
.fc-n small { font-size: 10.5px; font-weight: 500; color: var(--ink-3); margin-left: 2px; }
.fc-empty { font-size: 12.5px; color: var(--ink-4); }
.fc-more { font-size: 11px; color: var(--ink-4); }
.fc-slots { font-size: 10.5px; color: var(--ink-3); letter-spacing: .02em; }
.fc-day { font-size: 10px; font-weight: 400; color: var(--ink-3); margin-right: 1px; }
/* 编辑面板里的删除按钮 */
.del-rec-btn {
  width: 100%; margin-top: 16px; padding: 11px; border-radius: 12px;
  background: #FDECEC; color: #E5484D; font-size: 14px; font-weight: 600;
}

/* 日常滋补：绿色高亮小卡，与服药期大卡同属「用药与保健」一个框 */
.supp-head {
  display: flex; align-items: baseline; gap: 8px;
  margin: 14px 0 8px; padding-top: 12px; border-top: 1px solid var(--line);
}
.supp-head b { font-size: 16px; font-weight: 700; }
.supp-head span { font-size: 12.5px; color: var(--ink-3); margin-left: auto; }
.supp-cols { display: grid; gap: 6px; }
/* 日常滋补（v101c）：上行=名字，下行=用量说明（每天 · 早上 · 1茶匙）；打卡动态已在 v99 移除 */
.supp-col {
  display: flex; flex-direction: column; align-items: flex-start;
  gap: 2px; min-width: 0;
  background: #EDF9F3; border: 1.5px solid rgba(18, 184, 134, 0.28);
  border-radius: 11px; padding: 7px 10px; text-align: left;
  box-shadow: 0 1px 4px rgba(18, 184, 134, 0.07);
}
.supp-col:active { background: #DFF5EB; }
.supp-col.done { background: #DDF6EA; border-color: rgba(18, 184, 134, 0.5); }
.sc-name {
  flex: 1; min-width: 0; display: inline-flex; align-items: center; gap: 5px;
  font-size: 15px; font-weight: 700; letter-spacing: -0.01em;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.sc-dot { width: 6px; height: 6px; border-radius: 50%; flex: 0 0 auto; background: #12B886; }
.supp-col.done .sc-dot { background: #0B8A66; }
.sc-brand { font-size: 11px; font-weight: 600; color: #4C8B78; }
/* v101c 日常滋补用量说明：每天 · 早上 · 1茶匙 */
.sc-sub { font-size: 12px; font-weight: 500; color: var(--ink-3); padding-left: 13px; }
.sc-side { display: inline-flex; align-items: center; gap: 5px; flex: 0 0 auto; }
.sc-num {
  font-size: 14px; font-weight: 700; line-height: 1; color: #0B8A66;
  letter-spacing: -0.02em; font-variant-numeric: tabular-nums;
}
.sc-num small { font-size: 10px; font-weight: 600; color: #4C8B78; margin-left: 1px; }
.sc-state {
  display: inline-flex; align-items: center; gap: 2px; font-size: 10px;
  color: var(--ink-3); padding: 1.5px 6px; border-radius: 999px;
  background: var(--inset-2); font-weight: 500; white-space: nowrap;
}
.sc-state.on { color: #06654A; font-weight: 600; background: #BCEBD8; }
/* 计划名旁的品牌小标签（如 MAG） */
.plan-brand {
  font-size: 10.5px; font-weight: 600; padding: 1.5px 7px; border-radius: 7px;
  background: var(--inset-2); color: var(--ink-2); vertical-align: 1px;
}

/* 小贴士 */
.mine-tip {
  display: flex; gap: 10px; align-items: flex-start;
  background: linear-gradient(125deg, #FFF0DF 0%, #FFF9F1 100%);
  border-radius: 18px; padding: 13px 14px; margin-bottom: 12px;
}
.mine-tip .t-ico {
  width: 30px; height: 30px; border-radius: 10px; flex: 0 0 auto;
  background: rgba(255, 255, 255, 0.8); color: var(--brand);
  display: grid; place-items: center;
}
.mine-tip .t-title { font-size: 13px; font-weight: 600; color: #A85B12; }
.mine-tip .t-body { font-size: 13.5px; color: #7A5B3D; line-height: 1.6; margin-top: 3px; }

/* 饮食管理面板：四组 */
.fbm-groups { display: flex; flex-direction: column; gap: 12px; }
.fbm-group { border: 1px solid var(--line); border-radius: 15px; overflow: hidden; background: var(--card); }
.fbm-head { display: flex; align-items: center; gap: 7px; padding: 9px 12px; background: var(--inset-2); }
.fbm-head b { font-size: 14px; }
.fbm-head small { font-size: 11px; color: var(--ink-3); }
.fbm-head .fbm-count { margin-left: auto; font-size: 11px; color: var(--ink-4); }
.fbm-dot { width: 9px; height: 9px; border-radius: 3px; }
.fbm-dot.clay { background: var(--clay); }
.fbm-dot.mint { background: var(--mint); }
.fbm-dot.amber { background: var(--amber); }
.fbm-dot.brand { background: var(--brand); }
.fbm-row { padding: 9px 12px 10px; border-top: 1px solid var(--line); }
.fbm-line { display: flex; align-items: center; gap: 10px; }
.fbm-name { flex: 1; min-width: 0; font-size: 14.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fbm-recipe { font-style: normal; font-size: 11px; font-weight: 500; color: var(--ink-3); margin-left: 6px; white-space: nowrap; }
.rp-tag { font-style: normal; font-size: 10.5px; font-weight: 500; color: var(--brand); background: var(--brand-1, rgba(250,140,22,.12)); border-radius: 6px; padding: 1px 6px; margin-left: 6px; vertical-align: 1px; }
/* v101 自制配比区：与品牌区同款 fbm-group 视觉；行 = 食材名 + 克重 + 自动占比 */
.hm-group .hm-cat { border-top: 1px solid var(--line); padding: 7px 0 3px; }
.hm-cat-head { display: flex; align-items: baseline; gap: 6px; padding: 0 12px 2px; }
.hm-cat-head b { font-size: 13px; font-weight: 700; color: var(--clay); }
.hm-cat-head span { font-size: 11px; color: var(--ink-4); margin-left: auto; }
.hm-row { display: flex; align-items: center; gap: 9px; padding: 5px 12px; }
.hm-row .hm-name { flex: 1; min-width: 0; font-size: 14px; font-weight: 600; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hm-num { display: inline-flex; align-items: center; gap: 3px; flex: 0 0 auto; }
.hm-num input { width: 62px; padding: 5px 8px; border: 1px solid var(--line); border-radius: 8px; font-size: 14px; font-weight: 700; text-align: right; background: var(--card); }
.hm-num em { font-style: normal; font-size: 11px; color: var(--ink-3); }
.hm-pct { flex: 0 0 46px; text-align: right; font-size: 12px; font-weight: 700; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.hm-empty { padding: 2px 12px 6px; font-size: 12px; color: var(--ink-4); }
.hm-form { padding: 10px 12px; border-top: 1px solid var(--line); background: var(--card); display: flex; flex-direction: column; gap: 8px; }
/* v100 当前应用中的模版：使用中徽章（去掉棕色切换按钮） */
.tpl-current { font-style: normal; font-size: 11px; font-weight: 700; color: #0B8A66; background: rgba(18,184,134,0.12); border-radius: 999px; padding: 2px 8px; margin-left: 7px; vertical-align: 1px; }
.tpl-row.using { background: rgba(18,184,134,0.05); }
/* v101b 模版配比展开查看 */
.tpl-view { align-self: flex-start; font-size: 11.5px; font-weight: 600; color: var(--brand); padding: 0; margin-top: 3px; }
.tpl-detail { margin-top: 7px; border-top: 1px dashed var(--line-2, var(--line)); padding-top: 6px; display: flex; flex-direction: column; gap: 4px; }
.tpl-detail-row { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; font-size: 12.5px; }
.tpl-detail-row b { font-weight: 600; color: var(--ink); flex: 0 0 auto; }
.tpl-detail-row span { color: var(--ink-3); text-align: right; }
.fbm-amount { display: flex; align-items: center; gap: 4px; flex: 0 0 auto; font-size: 10px; color: var(--ink-3); }
.fbm-amount input {
  width: 60px; padding: 5px 7px; text-align: right;
  border: 1px solid var(--line-2); border-radius: 9px; background: var(--inset-2);
  font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums;
}
.fbm-amount em { font-style: normal; font-size: 11px; color: var(--ink-3); min-width: 12px; }
.fbm-slots { display: flex; align-items: center; gap: 6px; margin-top: 8px; }
.fbm-lab { font-size: 11px; color: var(--ink-3); margin-right: 2px; }
.fbm-slot {
  padding: 4px 13px; border-radius: var(--r-pill);
  background: var(--inset-2); color: var(--ink-3); font-size: 12.5px; font-weight: 500;
}
.fbm-slot.on { background: #E8641B; color: #fff; font-weight: 600; }
.fbm-del { width: 24px; height: 24px; border-radius: 50%; flex: 0 0 auto; color: var(--ink-4); font-size: 12px; background: var(--inset-2); }
.fbm-empty { padding: 10px 12px; font-size: 11px; color: var(--ink-4); border-top: 1px solid var(--line); }
.fbm-add { display: block; width: 100%; padding: 9px 12px; text-align: left; font-size: 12px; color: var(--brand); font-weight: 500; border-top: 1px dashed var(--line-2); }
.fbm-form { padding: 10px 12px; border-top: 1px solid var(--line); background: var(--inset-2); }
.fbm-form-row { display: flex; align-items: center; gap: 7px; margin-top: 8px; }
.fbm-form-row .input { flex: 1; min-width: 0; }
.fbm-unit { font-size: 12px; color: var(--ink-3); flex: 0 0 auto; }
.fbm-save { flex: 0 0 auto; background: var(--brand); color: #fff; border-radius: 10px; padding: 8px 14px; font-size: 13px; font-weight: 600; }
.fbm-cancel { flex: 0 0 auto; background: var(--inset-2); color: var(--ink-3); border-radius: 10px; padding: 8px 14px; font-size: 13px; font-weight: 600; }

/* ------------------------------------------------ 健康目标面板 */
.goal-lines { display: flex; flex-direction: column; }
.goal-line {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 0; border-bottom: 1px solid var(--line);
}
.goal-line:last-child { border-bottom: 0; }
/* 目标管理面板：体重目标行内的数字输入框与步进器对齐（v100 修复整行溢出错乱） */
.goal-line > .input { flex: 0 0 118px; width: 118px; text-align: right; padding: 8px 10px; font-size: 17px; font-weight: 700; }
.goal-line-txt { flex: 1; min-width: 0; }
.goal-line-txt b { display: block; font-size: 15px; font-weight: 600; }
.goal-line-txt span { font-size: 11.5px; color: var(--ink-3); }
.stepper.compact { flex: 0 0 154px; gap: 6px; }
.stepper.compact .step-btn { width: 32px; height: 32px; font-size: 17px; }
.stepper.compact .step-val { font-size: 19px; }
.goal-line .goal-calc { font-size: 22px; }

/* ------------------------------------------------ 用药与保健卡片 */
.plan-card { padding-bottom: 15px; }
/* 我的页用药行：同药早/晚合并成一行，紧凑列表（替代原先每药一张大卡） */
.rx-rows { display: flex; flex-direction: column; gap: 7px; margin-top: 10px; }
.rx-row {
  display: flex; align-items: center; gap: 10px;
  background: var(--inset-2); border-radius: 14px; padding: 10px 12px;
  text-align: left; min-width: 0;
}
.rx-row.done { background: var(--inset); }
.rx-dot {
  width: 9px; height: 9px; border-radius: 50%; flex: 0 0 auto;
  background: var(--brand); box-shadow: 0 0 0 3px rgba(255, 122, 26, 0.12);
}
.rx-row.done .rx-dot { background: #12B886; box-shadow: 0 0 0 3px rgba(18, 184, 134, 0.12); }
.rx-row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.rx-row-name {
  display: flex; align-items: center; gap: 6px; min-width: 0;
  font-size: 15.5px; font-weight: 700; letter-spacing: -0.01em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.rx-row-name em {
  font-style: normal; flex: 0 0 auto;
  font-size: 12px; font-weight: 500; color: var(--ink-3);
  background: var(--card); border-radius: 6px; padding: 1px 6px;
}
.rx-row-sub {
  font-size: 13px; color: var(--ink-3);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.rx-row-bar { height: 4px; border-radius: 99px; background: rgba(31, 27, 22, 0.08); overflow: hidden; }
.rx-row-bar i { display: block; height: 100%; background: var(--brand); border-radius: 99px; }
.rx-row-state {
  flex: 0 0 auto; font-size: 12.5px; font-weight: 600;
  color: var(--brand); background: rgba(255, 122, 26, 0.1);
  padding: 4px 10px; border-radius: 99px;
}
.rx-row-state.on { color: #0B8A66; background: rgba(18, 184, 134, 0.12); }

/* ------------------------------------------------ 体重记录面板 */
.wt-hero {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 12px;
  background: linear-gradient(135deg, #EAF7FE 0%, #F6FBFE 100%);
  border-radius: 18px; padding: 14px 16px;
}
.wt-hero.empty { flex-direction: column; align-items: flex-start; gap: 4px; }
.wt-hero-label { font-size: 13px; color: var(--ink-2); }
.wt-hero-num { font-size: 38px; font-weight: 700; letter-spacing: -0.03em; line-height: 1.1; margin-top: 2px; font-variant-numeric: tabular-nums; }
.wt-hero-num small { font-size: 14px; font-weight: 500; color: var(--ink-3); margin-left: 4px; }
.wt-hero-side { text-align: right; font-size: 12.5px; color: var(--ink-3); line-height: 1.6; }
.wt-hero-hint { font-size: 12.5px; color: var(--ink-3); }
.wt-diff { font-size: 15px; font-weight: 700; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.wt-diff span { font-size: 11.5px; font-weight: 400; color: var(--ink-3); margin-left: 4px; }
.wt-diff.up { color: #E5484D; }
.wt-diff.down { color: #0B8A66; }

.wt-range { display: flex; gap: 7px; margin: 14px 0 8px; }
.wt-chip {
  padding: 6px 13px; border-radius: var(--r-pill);
  background: var(--inset-2); color: var(--ink-2); font-size: 12.5px; font-weight: 500;
}
.wt-chip.on { background: var(--sky-soft); color: #0A76A8; font-weight: 600; }

.wt-chart { background: var(--inset-2); border-radius: 18px; padding: 8px 6px 10px; }
.wt-svg { display: block; width: 100%; height: auto; }
.wt-grid { stroke: rgba(31, 27, 22, 0.08); stroke-width: 1; stroke-dasharray: 4 5; }
.wt-ax { font-size: 10.5px; fill: var(--ink-3); }
.wt-now { font-size: 13px; font-weight: 700; fill: #0A76A8; paint-order: stroke; stroke: #F9F6F1; stroke-width: 3.4; stroke-linejoin: round; }
.wt-first { font-size: 11.5px; font-weight: 600; fill: var(--ink-3); paint-order: stroke; stroke: #F9F6F1; stroke-width: 3; stroke-linejoin: round; }
.wt-sum {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 4px 12px 0; font-size: 12.5px; color: var(--ink-2);
}
.wt-sum b.up { color: #E5484D; }
.wt-sum b.down { color: #0B8A66; }
.wt-spread { padding: 2px 12px 0; font-size: 11.5px; color: var(--ink-3); }

.wt-form {
  display: flex; flex-direction: column; gap: 9px;
  margin-top: 14px; padding: 14px; border-radius: 16px;
  background: var(--inset); border: 1px solid var(--brand-line);
}
.wt-form-row { display: flex; gap: 9px; }
.wt-field { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.wt-field span { font-size: 12px; color: var(--ink-2); }
.wt-form .input { background: #fff; }

.wt-list-head {
  display: flex; align-items: baseline; gap: 8px;
  margin: 18px 0 8px; font-size: 14px; font-weight: 600;
}
.wt-list-head span { font-size: 11.5px; font-weight: 400; color: var(--ink-3); }
.wt-list { background: var(--card); border-radius: 16px; overflow: hidden; border: 1px solid var(--line); }
.wt-row {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 12px; border-bottom: 1px solid var(--line);
}
.wt-row:last-child { border-bottom: 0; }
.wt-row.now { background: #F4FBFE; }
.wt-date { display: flex; align-items: baseline; gap: 6px; width: 96px; flex: 0 0 auto; }
.wt-date b { font-size: 14px; font-weight: 600; }
.wt-date small { font-size: 11px; color: var(--ink-3); }
.wt-kg { font-size: 19px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; flex: 0 0 auto; min-width: 62px; }
.wt-kg small { font-size: 10.5px; font-weight: 500; color: var(--ink-3); margin-left: 2px; }
.wt-note { flex: 1; min-width: 0; font-size: 11.5px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wt-del {
  width: 26px; height: 26px; border-radius: 50%; flex: 0 0 auto;
  background: var(--inset-2); color: var(--ink-4); font-size: 15px; line-height: 1;
}

/* ------------------------------------------------ 计划管理面板 */
.pm-group { margin-bottom: 14px; }
.pm-group-head { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
.pm-group-head span { font-size: 11px; color: var(--ink-4); font-weight: 500; }
.pm-group-hint { font-size: 11px; color: var(--ink-4); margin: -2px 0 8px; line-height: 1.5; }
.pm-row {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 11px 12px; background: var(--inset-2); border-radius: 14px;
  margin-bottom: 7px; text-align: left;
}
.pm-ico { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; flex: 0 0 auto; }
.pm-ico.rx { background: var(--brand-soft); color: var(--brand); }
.pm-ico.daily { background: #E6F8F1; color: #0B8A66; }
.pm-main { flex: 1; min-width: 0; }
.pm-name { display: flex; align-items: center; gap: 6px; font-size: 15px; font-weight: 600; }
.pm-name i { font-style: normal; font-size: 11px; font-weight: 500; color: #0B8A66; }
.pm-sub { font-size: 11.5px; color: var(--ink-3); margin-top: 2px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pm-chev { color: var(--ink-4); flex: 0 0 auto; }
.pm-badge { font-size: 11px; color: var(--ink-3); background: var(--inset); padding: 3px 8px; border-radius: 99px; }
.pm-empty { font-size: 12px; color: var(--ink-4); padding: 10px 2px; }
.pm-inline { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pm-inline .input { width: 90px; flex: 0 0 auto; }
.pm-num { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; color: var(--ink-2); }
.pm-num input {
  width: 60px; text-align: center; border: 1px solid var(--line-2); border-radius: 9px;
  padding: 8px 6px; font-size: 16px; background: var(--inset-2); font-variant-numeric: tabular-nums;
}
.pm-danger {
  display: block; width: 100%; margin-top: 20px; padding: 12px;
  border-radius: 13px; background: var(--danger-soft); color: var(--danger);
  font-size: 14px; font-weight: 600;
}
.pm-stop {
  display: block; width: 100%; margin-top: 20px; padding: 11px;
  border-radius: 13px; background: var(--inset-2); color: var(--ink-2);
  font-size: 13.5px; font-weight: 500;
}
.pm-stop + .pm-danger { margin-top: 9px; }
.pm-num + .pm-num { margin-left: 4px; }


/* ---------------------------------------------------------------- 疾病管理 */

.ill-card, .ill-active { border: 1px solid var(--brand-line); background: linear-gradient(160deg, #FFF6F0, #fff 58%); }
.ill-top { display: flex; align-items: center; gap: 11px; }
.ill-badge {
  flex: 0 0 38px; width: 38px; height: 38px; border-radius: 12px;
  background: var(--brand-soft); color: var(--brand);
  display: grid; place-items: center;
}
.ill-main { min-width: 0; flex: 1; }
.ill-name { font-size: 15px; font-weight: 600; display: flex; align-items: center; gap: 7px; }
.ill-day {
  font-size: 11px; font-weight: 500; color: var(--brand);
  background: var(--brand-soft); padding: 2px 8px; border-radius: var(--r-pill);
}
.ill-sub { font-size: 12px; color: var(--ink-2); margin-top: 2px; }
.ill-link {
  margin-top: 10px; width: 100%; text-align: left;
  font-size: 12px; color: var(--brand); font-weight: 500;
  padding-top: 9px; border-top: 1px dashed var(--line-2);
}
.ill-quick { display: flex; gap: 8px; margin-top: 11px; }
.ill-quick button {
  flex: 1; padding: 8px 0; border-radius: var(--r-pill);
  background: var(--bg); font-size: 12px; font-weight: 500; color: var(--ink-2);
  border: 1px solid var(--line-2);
}
.ill-quick button:active { background: var(--brand-soft); color: var(--brand); }

.ill-list { display: flex; flex-direction: column; }
.ill-hrow {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 11px 2px; text-align: left; border-bottom: 1px solid var(--line);
}
.ill-list .ill-hrow:last-child { border-bottom: 0; }
.ih-main { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 2px; }
.ih-name { font-size: 14px; font-weight: 500; display: flex; align-items: center; gap: 6px; }
.ih-sub { font-size: 12px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ih-cost {
  font-style: normal; font-size: 11px; color: var(--clay);
  background: var(--clay-soft); border-radius: var(--r-pill); padding: 1px 7px; margin-left: 6px;
}
.ih-dose {
  font-style: normal; font-size: 11px; color: var(--ink-3);
  background: var(--inset-2); border-radius: var(--r-pill); padding: 1px 7px; margin-left: 6px;
}
.ul-row .mini-cam { flex: 0 0 auto; color: var(--brand); font-size: 12px; font-weight: 500; }
.ill-empty { text-align: center; padding: 30px 20px; }
.ill-empty-ico { color: var(--ink-4); margin-bottom: 10px; }
.ill-empty-t { font-size: 16px; font-weight: 600; }
.ill-empty-s { font-size: 13px; color: var(--ink-3); margin-top: 6px; line-height: 1.6; }

.ill-head { display: flex; align-items: center; gap: 10px; padding: 4px 2px 14px; }
.ill-back {
  flex: 0 0 36px; width: 36px; height: 36px; border-radius: 50%;
  background: var(--card); box-shadow: var(--shadow-card);
  display: grid; place-items: center; color: var(--ink-2);
}
.ill-head-main { min-width: 0; flex: 1; }
.ill-tag {
  font-size: 10px; font-weight: 500; padding: 2px 8px; border-radius: var(--r-pill);
  background: var(--inset-2); color: var(--ink-3);
}
.ill-tag.on { background: var(--amber-soft); color: #9a6a00; }

.tl-date { font-size: 12px; font-weight: 600; color: var(--ink-2); margin: 10px 0 4px; }
.tl-date small { font-weight: 400; color: var(--ink-4); margin-left: 5px; }
.sym-row {
  display: flex; align-items: center; gap: 9px; width: 100%;
  padding: 9px 2px; border-bottom: 1px solid var(--line); text-align: left;
}
.sym-row:last-child { border-bottom: 0; }
.sym-time { flex: 0 0 42px; font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.sym-kind { flex: 0 0 auto; font-size: 12px; font-weight: 500; display: inline-flex; align-items: center; gap: 5px; }
.sym-detail { flex: 1; min-width: 0; font-size: 12px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sym-thumbs { display: flex; gap: 5px; }
.sym-thumbs img { width: 34px; height: 34px; border-radius: 8px; object-fit: cover; }

.sev-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.sev-l { background: var(--mint); }
.sev-m { background: var(--amber); }
.sev-h { background: var(--danger); }

/* 病程快照：按天罗列观察记录，方便复制给医生 */
.snap-day { padding-bottom: 6px; }
.snap-day .tl-date { margin-top: 2px; }
.snap-row {
  display: flex; align-items: flex-start; gap: 8px;
  padding: 6px 0; border-bottom: 1px solid var(--line);
}
.snap-row:last-child { border-bottom: 0; }
.snap-tag {
  flex: 0 0 44px; margin-top: 1px;
  font-size: 11px; font-weight: 600; line-height: 20px; text-align: center;
  color: var(--ink-3); background: var(--paper-2, rgba(0,0,0,0.04)); border-radius: 6px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.snap-tag.snap-warn { color: var(--danger); background: rgba(229, 72, 77, 0.1); }
.snap-tag.snap-amber { color: #b07a00; background: rgba(255, 176, 32, 0.14); }
.snap-tag.snap-meal { color: var(--clay); background: rgba(224, 122, 62, 0.12); }
.snap-tag.snap-med { color: var(--plum, #7c5cbf); background: rgba(124, 92, 191, 0.12); }
.snap-tag.snap-poop { color: var(--mint); background: rgba(18, 184, 134, 0.12); }
.snap-tag.snap-visit { color: #2a7fb8; background: rgba(42, 127, 184, 0.12); }
.snap-txt { flex: 1; min-width: 0; font-size: 12.5px; color: var(--ink-2); line-height: 1.5; }
.chip.sev.on.sev-l { background: var(--mint); box-shadow: 0 4px 10px rgba(18, 184, 134, 0.26); }
.chip.sev.on.sev-m { background: var(--amber); box-shadow: 0 4px 10px rgba(255, 176, 32, 0.26); }
.chip.sev.on.sev-h { background: var(--danger); box-shadow: 0 4px 10px rgba(229, 72, 77, 0.26); }

.visit-row { display: flex; align-items: center; gap: 10px; width: 100%; padding: 11px 2px; text-align: left; border-bottom: 1px solid var(--line); }
.visit-cost { padding: 10px 2px 2px; font-size: 13px; color: var(--ink-2); text-align: right; }
.visit-cost b { color: var(--clay); font-size: 15px; }

.med-row { display: flex; align-items: center; gap: 10px; padding: 11px 2px; border-bottom: 1px solid var(--line); }
.med-row:last-child { border-bottom: 0; }
.med-ok {
  flex: 0 0 26px; width: 26px; height: 26px; border-radius: 50%;
  background: var(--mint-soft); color: var(--mint); display: grid; place-items: center;
}
.ill-actions { display: flex; gap: 10px; margin: 4px 0 12px; }
.ill-actions .primary-btn { flex: 1; }
.primary-btn.ghost { background: var(--card); color: var(--ink-2); border: 1px solid var(--line-2); box-shadow: none; }
.field-row { display: flex; gap: 10px; }
.field-row .field { flex: 1; }

/* ---------------------------------------------------------------- 桌面浏览器的手机壳展示
   应用面向手机端（未来 iOS app）；宽屏下以 430px 手机宽度居中展示，方便网页验收 */
@media (min-width: 520px) {
  html { background: #EAE2D6; }
  body {
    max-width: 430px; margin: 0 auto; min-height: 100vh;
    box-shadow: 0 0 0 1px rgba(31, 27, 22, 0.05), 0 20px 60px rgba(31, 27, 22, 0.18);
  }
  .tabbar, .sheet {
    left: calc(50% - 215px); right: auto;
    width: 100%; max-width: 430px;
  }
}

/* ================================================================
   Clean 12NOV 设计稿对齐层 v50（M3 暖色体系逐值覆盖）
   primary #904D00 深棕 / primary-container #FA8C16 橙 /
   secondary #266D00+container #85FA51 / tertiary #A73A05+#FF8657
   ================================================================ */

/* ---- 卡片基座 ---- */

/* ---- 标题图标：统一圆形 + 设计稿四色映射 ---- */
.ct-ico { width: 32px; height: 32px; border-radius: 50%; }
.ct-ico.blue  { background: var(--brand-fixed); color: var(--brand); }
.ct-ico.orange { background: rgba(250, 140, 22, 0.22); color: var(--brand); }
.ct-ico.brown { background: rgba(133, 250, 81, 0.4); color: var(--ok); }
.ct-ico.green { background: var(--surface-high); color: var(--ter); }
.ct-ico.mint  { background: rgba(255, 220, 195, 0.5); color: var(--brand); }
.ct-ico.gray  { background: var(--surface-high); color: var(--ink-2); }

/* ---- 徽章 / 胶囊 ---- */
.badge { background: var(--surface-c); color: var(--ink-2); font-weight: 500; }
.badge.ok    { background: rgba(133, 250, 81, 0.32); color: var(--ok); }
.badge.warn  { background: var(--brand-fixed); color: var(--brand); }
.badge.info  { background: var(--brand-fixed); color: var(--brand); }
.badge.brand { background: var(--brand-fixed); color: var(--brand); }
.badge.bad   { background: var(--danger-soft); color: var(--danger); }

/* 卡片头右侧：说明文字 + 统一高亮添加按钮（v97：全应用唯一入口规范——
   「记录饮水/记录饮食/记排便/记录活动/新增计划/添加医院/更新记录/记症状…」
   一律放在卡片标题行右上角，同一种高亮色、同一字号，触控热区 ≥44px） */
.head-note { font-size: 13px; color: var(--ink-3); white-space: nowrap; }
.head-pill {
  position: relative;
  display: inline-flex; align-items: center; gap: 4px;
  min-height: 44px; padding: 6px 15px; border-radius: var(--r-pill);
  background: var(--brand-fixed); color: var(--on-brand-fixed);
  font-size: 13.5px; font-weight: 700; white-space: nowrap;
}
.head-pill svg { width: 13px; height: 13px; }
.head-pill::after { content: ''; position: absolute; inset: -7px -5px; }

/* ---- 宠物卡 ---- */
.brand-mark { background: var(--brand-fixed); color: var(--brand); border-radius: 50%; }
.hs-score b { color: var(--brand); font-size: 32px; font-weight: 700; }
.pet-pill {
  display: inline-flex; align-items: center; margin-left: 2px;
  padding: 2px 9px; border-radius: var(--r-pill); vertical-align: 2px;
  background: rgba(133, 250, 81, 0.4); color: var(--ok);
  font-size: 10px; font-weight: 600; line-height: 1.5;
}
.pet-pill.todo { background: var(--surface-c); color: var(--ink-3); font-weight: 500; }

/* ---- 达成四卡（2×2 白卡，独立区块） ---- */
.ach-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0 0 12px; }
.ach-item {
  background: var(--card); border-radius: 18px; padding: 13px 14px;
  box-shadow: var(--shadow-tile); text-align: left;
  display: flex; flex-direction: column; min-width: 0;
}
.ach-item .ach-top { display: flex; align-items: center; gap: 6px; }
.ach-item .ach-top b { font-size: 13px; font-weight: 600; color: var(--ink); }
.ach-ico {
  width: 28px; height: 28px; border-radius: 50%; flex: 0 0 auto;
  display: grid; place-items: center;
}
.ach-ico svg { width: 14px; height: 14px; }
.ach-ico.w { background: rgba(255, 220, 195, 0.6); color: var(--brand); }
.ach-ico.m { background: rgba(250, 140, 22, 0.18); color: var(--brand); }
.ach-ico.s { background: rgba(133, 250, 81, 0.5); color: var(--ok); }
.ach-ico.p { background: var(--surface-high); color: var(--ter); }
.ach-side { margin-left: auto; display: flex; align-items: center; }
.ach-stat { font-size: 10px; font-weight: 500; color: var(--ink-2); white-space: nowrap; }
.ach-stat.ok { color: var(--ok); font-weight: 600; }
.ach-body { margin-top: 9px; min-width: 0; }
.ach-val {
  display: flex; align-items: center; gap: 6px;
  font-size: 16.5px; font-weight: 700; letter-spacing: -0.02em; color: var(--ink);
  overflow: hidden; white-space: nowrap;
}
.ach-val small { font-size: 10px; font-weight: 500; color: var(--ink-3); letter-spacing: 0; }
/* v97：「57% 达成」紧跟 750ml 之后同一行（原来是独立一行小字） */
.ach-pct {
  flex: 0 0 auto; margin-left: 2px; padding: 2px 7px; border-radius: 999px;
  background: var(--brand-fixed); color: var(--on-brand-fixed);
  font-size: 10px; font-weight: 700;
}
.ach-bar { height: 6px; border-radius: var(--r-pill); background: var(--surface-high); overflow: hidden; margin-top: 7px; }
.ach-bar i { display: block; height: 100%; background: var(--brand-2); border-radius: var(--r-pill); }
.ach-sub { display: flex; align-items: center; gap: 4px; font-size: 10px; color: var(--ink-3); margin-top: 5px; }
.ach-sub.ok { color: var(--ok); font-weight: 500; }
.pulse-dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--brand-2); flex: 0 0 auto;
  animation: ach-pulse 1.6s ease-in-out infinite;
}
@keyframes ach-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }

/* ---- 饮水卡 ---- */
.metric-num { color: var(--brand); font-size: 30px; font-weight: 700; }
.pct-pill {
  margin-left: 8px; padding: 4px 10px; border-radius: var(--r-pill);
  background: var(--brand-fixed); color: var(--on-brand-fixed);
  font-size: 12px; font-weight: 600; white-space: nowrap;
}
.pct-pill.full { background: rgba(133, 250, 81, 0.4); color: var(--ok); }
.bar { height: 10px; background: var(--surface-c); }
.bar > i { background: linear-gradient(90deg, #904D00, #FA8C16); }
.bar.brand > i { background: linear-gradient(90deg, #904D00, #FA8C16); }
.qbtn { background: var(--surface-c); color: var(--ink); font-weight: 600; }
.qbtn.primary { background: var(--brand); color: #fff; box-shadow: var(--shadow-cta); }
.qbtn.brand-fixed { background: var(--brand-fixed); color: var(--on-brand-fixed); }
.qbtn.ghost { background: var(--surface-high); color: var(--ink-2); }
.wlog-n {
  flex: 0 0 auto; padding: 2px 6px; border-radius: 7px;
  background: rgba(255, 220, 195, 0.6); color: var(--on-brand-fixed);
  font-size: 11px; font-weight: 600; white-space: nowrap;
}
.wlog-n.new { background: var(--ter-fixed); color: var(--ter); }
.wlog-tag {
  display: inline-block; padding: 1px 5px; border-radius: 5px;
  background: var(--surface-highest); color: var(--ink-2); font-size: 11px; font-weight: 400;
}
.card[data-card="water"] .list .row {
  background: var(--surface-low); border-radius: 14px; padding: 8px 10px; margin-bottom: 6px;
}
.row-val.accent { color: var(--brand); }

/* ---- 饮食 / 保健品 ---- */
.meal-plan, .supp-plan { background: var(--surface-low); border-radius: 14px; }
.meal-plan.done, .supp-plan.done { background: rgba(133, 250, 81, 0.18); }
.mp-check.on { background: var(--ok-container); color: #14532D; }
.pill-go { background: var(--brand); color: #fff; }
.pill-done { background: rgba(133, 250, 81, 0.36); color: var(--ok); }
.checkall-btn {
  border-radius: var(--r-pill); background: var(--brand); color: #fff;
  padding: 12px 0; font-size: 13.5px; font-weight: 600; box-shadow: var(--shadow-cta);
}
/* ===== v122b 空状态引导 / 一键打卡置灰 / 已吃完行可点 ===== */
.set-empty { padding: 14px 0 4px; text-align: center; }
.set-empty .se-ico { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--inset-2); color: var(--ink-3); margin-bottom: 8px; }
.set-empty .se-txt { font-size: 13.5px; color: var(--ink-2); line-height: 1.6; }
.set-empty .se-txt small { font-size: 11.5px; color: var(--ink-3); }
.set-empty .se-btns { display: flex; gap: 8px; margin-top: 12px; }
.set-empty .se-btns .qbtn { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 5px; }
.qbtn.primary.is-off {
  background: var(--surface-c); color: var(--ink-3); box-shadow: none;
  cursor: default;
}
.meal-plan.done .mp-body.tap-edit { cursor: pointer; }
.meal-plan.done .mp-body.tap-edit:active { opacity: .7; }
.addrow {
  border-radius: var(--r-pill); background: rgba(255, 220, 195, 0.4);
  color: var(--brand); font-weight: 600; padding: 10px 0;
}
.mp-ico.blue { background: var(--brand-fixed); color: var(--brand); }
.mp-ico.green { background: var(--ter-fixed); color: var(--ter); }
.mp-ico.mint { background: rgba(255, 220, 195, 0.5); color: var(--brand); }
.mp-title .mp-n { color: var(--brand); }

/* ---- 便便卡 ---- */
.poo-summary { background: var(--surface-low); border-radius: 16px; padding: 12px; }
.poo-sum-head {
  display: flex; align-items: center; justify-content: space-between;
  padding-bottom: 9px; margin-bottom: 4px; border-bottom: 1px solid var(--surface-c);
}
.poo-list { margin-top: 8px; }
.poo-list .row {
  background: var(--surface-lowest); border: 1px solid var(--surface-c);
  border-radius: 14px; padding: 9px 11px; margin-bottom: 7px;
}
.poo-type {
  display: inline-block; padding: 1px 5px; border-radius: 5px; margin-right: 4px;
  background: var(--surface-highest); color: var(--ink-2);
  font-size: 10px; font-weight: 700;
}
.poo-mood {
  flex: 0 0 auto; padding: 2px 8px; border-radius: var(--r-pill);
  background: rgba(133, 250, 81, 0.4); color: #287100; font-size: 10px; font-weight: 600;
}
.poo-mood.warn { background: var(--danger-soft); color: var(--danger); }

/* ---- 运动卡 ---- */
.act-stats {
  display: grid; grid-template-columns: 1fr 1fr 1fr; text-align: center;
  background: var(--surface-low); border-radius: 16px; padding: 11px 0; margin: 4px 0 10px;
}
.act-stats > div { display: flex; flex-direction: column; gap: 3px; padding: 0 8px; }
.act-stats > div + div { border-left: 1px solid rgba(220, 193, 175, 0.45); }
.act-stats b { font-size: 17px; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.act-stats b.accent { color: var(--brand); }
.act-stats span { font-size: 10px; color: var(--ink-3); }

/* ---- 随手拍 ---- */
.snaps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.snap { border-radius: 14px; overflow: hidden; aspect-ratio: 1; position: relative; }
.snap-cap {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 7px 6px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.55));
  color: #fff; font-size: 10px; font-weight: 500; text-align: left;
}
.snap.add {
  border: 2px dashed rgba(144, 77, 0, 0.4); background: rgba(255, 220, 195, 0.2);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
}
.snap.add b { font-size: 11px; font-weight: 600; color: var(--brand); }
.snap.add small { font-size: 9px; color: var(--ink-3); }
.snap.add .cam-circle { width: 28px; height: 28px; background: rgba(250, 140, 22, 0.2); color: var(--brand); }

/* ---- 底部导航 / 其他 ---- */
.tabbar { background: rgba(255, 248, 244, 0.92); }
.tab.on { color: var(--brand); }
.tab.on span { font-weight: 600; }
.topbar { background: linear-gradient(var(--bg) 72%, rgba(255, 248, 244, 0.86)); }
.avatar { background: var(--brand-fixed); color: var(--brand); }

/* ---- 饮食管理：按餐次份量条目（v51） ---- */
.fbm-items { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.fbm-item { display: flex; align-items: center; gap: 7px; }
.fbm-item-slot {
  flex: 0 0 auto; min-width: 44px; text-align: center;
  padding: 4px 8px; border-radius: var(--r-pill);
  background: var(--surface-c); color: var(--ink-2); font-size: 11px; font-weight: 600;
  white-space: nowrap;
}
.fbm-item .fbm-amount input { width: 56px; }
.fbm-times { display: flex; align-items: center; gap: 4px; flex: 1; min-width: 0; overflow-x: auto; }
.fbm-time {
  flex: 0 0 auto; padding: 4px 9px; border-radius: var(--r-pill);
  background: var(--surface-c); color: var(--ink-3); font-size: 11px;
}
.fbm-time.on { background: var(--brand-fixed); color: var(--brand); font-weight: 600; }
.fbm-item-hint { margin-top: 8px; font-size: 11px; color: var(--ink-3); }
.fbm-snack-add {
  display: block; width: 100%; padding: 7px 12px; text-align: left;
  font-size: 12px; color: var(--brand); font-weight: 500;
  border-top: 1px dashed var(--line-2); margin-top: 2px;
}

/* ================================================================
   v52 今日页记录行统一：饮水/饮食/运动/保健/排便 同高同底同圆角
   行：surface-low 底、14px 圆角、内距 10/12、最小高 56、行距 7
   行首图标：32px 圆形（饮水=橙、排便=锈红、保健=绿、运动=橙调）
   ================================================================ */
.meal-plans, .supp-plans { gap: 7px; }
.card[data-card="water"] .list,
.card[data-card="poop"] .list,
.card[data-card="supp"] .list { gap: 7px; }
.meal-plan, .supp-plan,
.card[data-card="water"] .list .row,
.card[data-card="poop"] .list .row,
.card[data-card="supp"] .list .row {
  display: flex; align-items: center; gap: 10px;
  background: var(--surface-low);
  border-radius: 14px; padding: 10px 12px;
  height: 64px; border: 0; margin-bottom: 0;
  border-bottom: 0;
}
/* 旧紧凑版覆盖还原（.supp-plans .supp-plan 曾压成 6/10 + 12px） */
.supp-plans .supp-plan { padding: 10px 12px; border-radius: 14px; }
/* 排便旧样式：带边框 + surface-lowest，统一为无边框 */
.poo-list .row { border: 0; background: var(--surface-low); }
/* 行首图标统一 32px 圆形 */
.card[data-card] .ico, .mp-ico { width: 32px; height: 32px; border-radius: 50%; }
.card[data-card] .ico svg { width: 16px; height: 16px; }
.mp-ico svg { width: 15px; height: 15px; }
.ico.water { background: var(--brand-fixed); color: var(--brand); }
.ico.poop { background: var(--ter-fixed); color: var(--ter); }
.ico.supp { background: rgba(133, 250, 81, 0.4); color: var(--ok); }
/* 打卡圈与图标同一视觉量级 */
.meal-plan .mp-check, .supp-plan .mp-check { width: 26px; height: 26px; }
/* 标题 / 副标题统一：单行省略，保证行高严格一致 */
.mp-title, .row-title {
  display: block; font-size: 15px; font-weight: 600; letter-spacing: 0; line-height: 20px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.mp-sub, .row-sub {
  font-size: 12.5px; color: var(--ink-3); line-height: 16px; margin-top: 1px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.mp-title .mp-n { line-height: 20px; }
.row-title .wlog-n { display: inline-flex; vertical-align: middle; margin-right: 2px; }
.row-sub .poo-type { display: inline-block; vertical-align: middle; }
.mp-body .mp-title .mp-n small { font-size: 10.5px; }

/* ---- 今日页：已配份量未安排餐次的引导行（v53） ---- */
.plan-hint {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: var(--brand-fixed); border-radius: 14px;
  padding: 10px 12px; margin-bottom: 10px;
}
.plan-hint .ph-text { font-size: 13px; color: var(--brand); font-weight: 500; line-height: 1.45; }
.plan-hint .ph-go {
  flex: 0 0 auto; padding: 6px 12px; border-radius: var(--r-pill);
  background: var(--brand); color: #fff; font-size: 12px; font-weight: 600;
}

/* ---- 今日页：当前执行模版行（v54） ---- */
.tpl-line {
  display: flex; align-items: center; gap: 6px;
  margin-bottom: 10px; padding: 8px 12px;
  background: var(--surface-low); border-radius: 14px;
  font-size: 13px; color: var(--ink-2); font-weight: 500;
}
.tpl-dot {
  width: 7px; height: 7px; border-radius: 50%; flex: 0 0 auto;
  background: var(--ok);
  animation: tpl-pulse 2s ease-in-out infinite;
}
@keyframes tpl-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }
.tpl-change {
  margin-left: auto; padding: 4px 10px; border-radius: var(--r-pill);
  background: var(--surface-c); color: var(--brand);
  font-size: 11.5px; font-weight: 600; flex: 0 0 auto;
}

/* ================================================================
   v55 便便区与其他区完全同构
   1) 去掉摘要盒嵌套（app.js 改为 flow-head 分段头，行直接排列）
   2) swipe 容器透明化：白色 swipe-body 在有底色的行上会露出
      四个白色缺口（圆角裁切），改为透明 + 圆角跟随行
   3) swipe 底部旧分隔线去掉（行已有 gap 与底色）
   ================================================================ */
.swipe { border-bottom: 0; border-radius: 14px; }
.swipe:last-child { border-bottom: 0; }
.swipe-body { background: transparent; }
.swipe-body .row { border-bottom: 0; }
/* 嵌套盒时期的旧样式清理：行不再有额外边框/不同底色 */
.poo-list .row {
  background: var(--surface-low); border: 0; border-radius: 14px;
  padding: 10px 12px; margin-bottom: 0;
}
/* 消化评分徽章沿用统一 badge 尺寸（20NOV v96 徽章已上移至卡片标题行，flow-head 移除） */

/* ================================================================
   v56 今日页瘦身：行高压到 52 + 记录折叠
   1) 五类行统一 64→52（padding 7/12、打卡圈 26→22），
      保持五区同构只是整体变矮
   2) .fold-btn 折叠按钮：记录区默认只显示最近 2 条，
      点「展开全部 N 条」看历史，「收起」折回
   ================================================================ */
.meal-plans, .supp-plans { gap: 6px; }
.card[data-card="water"] .list,
.card[data-card="poop"] .list,
.card[data-card="supp"] .list { gap: 6px; }
.meal-plan, .supp-plan,
.card[data-card="water"] .list .row,
.card[data-card="poop"] .list .row,
.card[data-card="supp"] .list .row {
  height: 52px; padding: 7px 12px;
}
.supp-plans .supp-plan { padding: 7px 12px; }
.poo-list .row { padding: 7px 12px; }
.meal-plan .mp-check, .supp-plan .mp-check { width: 22px; height: 22px; }
.meal-plan .mp-check svg, .supp-plan .mp-check svg { width: 15px; height: 15px; }
/* 折叠按钮：与记录行同宽同圆角，弱化为浅底主色字 */
.fold-btn {
  display: flex; align-items: center; justify-content: center; gap: 5px;
  width: 100%; padding: 8px 0; border-radius: 12px;
  background: var(--surface-low); color: var(--brand);
  font-size: 13px; font-weight: 600; letter-spacing: 0.2px;
}
.fold-btn:active { opacity: 0.7; }

/* v58 饮食页从 tab 改为档案子页：页头返回行 */
.page-head {
  display: flex; align-items: center; gap: 10px;
  padding: 2px 2px 12px; font-size: 16px; color: var(--ink);
}
/* 档案页饮食管理：当前饮食计划（模版名 + 启用时间 + 计划明细 + 今日打卡） */
.dp-tpl {
  display: flex; align-items: center; gap: 7px;
  margin-bottom: 8px; padding: 8px 12px;
  background: var(--surface-low); border-radius: 14px;
  font-size: 12.5px; color: var(--ink-2); font-weight: 500;
}
.dp-tpl em { font-style: normal; color: var(--ink-4); font-weight: 400; margin-left: auto; font-size: 11.5px; }
.dp-tpl.none { color: var(--ink-4); }
.dp-tpl-name { color: var(--ink); font-weight: 600; }
.dp-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px; border-radius: 12px;
  background: var(--surface-lowest); border: 1px solid var(--surface-low);
  font-size: 14px; margin-bottom: 6px;
}
.dp-slot {
  flex: 0 0 auto; font-weight: 700; color: var(--brand);
  background: rgba(250, 140, 22, 0.12); border-radius: 8px; padding: 2px 8px; font-size: 12.5px;
}
.dp-foods { flex: 1; min-width: 0; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dp-n { color: var(--ink); font-weight: 700; }
.dp-item b { color: var(--ink); font-weight: 600; }
.dp-ico { flex: 0 0 24px; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: var(--brand); }
.dp-ico.mint { background: var(--mint); }
.dp-ico.clay { background: var(--clay); }
.dp-ico.amber { background: var(--amber); }
.dp-amt { color: var(--ink-2); font-weight: 600; }
.dp-slots { color: var(--ink-4); font-size: 12px; margin-left: auto; }
.dp-empty { padding: 10px 12px; font-size: 12.5px; color: var(--ink-4); background: var(--surface-low); border-radius: 12px; margin-bottom: 8px; }
.dp-taken {
  display: flex; align-items: center; gap: 8px;
  margin-top: 2px; padding: 8px 12px;
  font-size: 12px; color: var(--ink-3);
  background: var(--surface-low); border-radius: 14px;
}
.dp-taken-label { flex: 0 0 auto; font-weight: 600; color: var(--ink-2); }

/* v59 底栏中央「快速记一笔」FAB：悬浮在 tabbar 上沿 */
.tab-fab {
  position: absolute; left: 50%; top: -16px; transform: translateX(-50%);
  z-index: 2;
}
.fab {
  width: 54px; height: 54px; border-radius: 50%;
  background: linear-gradient(150deg, var(--brand-2), var(--brand));
  color: #fff; display: grid; place-items: center;
  border: 3px solid #fff;
  box-shadow: var(--shadow-fab);
}
.fab:active { transform: scale(0.94); }
.fab svg { width: 24px; height: 24px; }
/* 已停用计划行：行内「启用」一键恢复 */
.pm-row.stopped { opacity: 0.75; }
.pm-on {
  flex: 0 0 auto; padding: 5px 13px; border-radius: var(--r-pill);
  background: var(--brand); color: #fff; font-size: 12px; font-weight: 600;
}
.pm-on:active { opacity: 0.75; }

/* v60 小贴士紧凑条：贴在今日小结（达成四卡）下方，文字一行内 */
.tip-slim {
  margin: 8px 0 12px; padding: 9px 14px;
  align-items: center;
}
.tip-slim .t-ico svg { width: 15px; height: 15px; }
.tip-slim .t-body { font-size: 12.5px; line-height: 1.45; }

/* ===== v61 健康记录（13NOV 设计稿）：月历汇总 + 当日四类聚合卡 ===== */
.cal-rate {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; border-radius: var(--r-pill);
  background: var(--mint-soft); font-size: 10px; font-weight: 600; color: var(--ok);
}
.cal-rate i { width: 6px; height: 6px; border-radius: 50%; background: var(--ok); }
.cal-sum { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 4px 0 12px; }
.cs-item {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 8px 4px; background: var(--surface-low); border-radius: 14px;
}
.cs-label { display: inline-flex; align-items: center; gap: 4px; font-size: 10.5px; color: var(--ink-2); }
.cs-label .dot { width: 6px; height: 6px; border-radius: 50%; }
.cs-item b { font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; }
.cs-item b small { font-size: 10.5px; font-weight: 400; color: var(--ink-3); margin-left: 2px; }
.c-ok { color: var(--ink); } .c-amber { color: var(--brand-2); } .c-dim { color: var(--ink-3); }
.cal-cell.today { background: var(--brand-fixed); color: var(--on-brand-fixed); font-weight: 700; }
/* 当日标题行 + 补录 */
.dayrec-head { display: flex; align-items: center; gap: 8px; margin: 16px 2px 10px; }
.dayrec-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--brand-2); flex: none; }
.dayrec-title { font-size: 17px; font-weight: 600; letter-spacing: -0.005em; }
.dayrec-add {
  margin-left: auto; display: inline-flex; align-items: center; gap: 3px;
  padding: 6px 13px; border-radius: var(--r-pill);
  background: var(--brand-fixed); color: var(--on-brand-fixed); font-size: 13.5px; font-weight: 700;
}
.dayrec-add:active { opacity: 0.75; }
/* 四类聚合卡 */
.day-cards { display: flex; flex-direction: column; gap: 10px; }
.drc {
  display: flex; align-items: center; gap: 11px;
  background: var(--card); border-radius: var(--r-card); padding: 13px 14px;
  box-shadow: var(--shadow-card);
}
.drc-ico {
  flex: none; width: 44px; height: 44px; border-radius: 15px;
  display: grid; place-items: center; background: var(--surface-low); color: var(--brand);
}
.drc-main { min-width: 0; flex: 1; }
.drc-t { display: flex; align-items: center; gap: 7px; font-size: 15px; font-weight: 600; color: var(--ink); }
.drc-n2 { font-size: 12px; font-weight: 500; color: var(--ink-3); }
.drc-s { margin-top: 2px; font-size: 12px; line-height: 1.45; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.drc-badge {
  flex: none; padding: 2px 8px; border-radius: var(--r-pill);
  background: var(--surface-low); font-size: 10px; font-weight: 600; color: var(--ink-3);
}
.drc-badge.ok { background: var(--mint-soft); color: var(--ok); }
.drc-badge.warn { background: var(--brand-soft); color: var(--brand); }
.drc-badge.special { background: var(--ter-fixed); color: var(--ter); }
.drc-right { flex: none; text-align: right; }
.drc-num { font-size: 16px; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.drc-num small { font-size: 11px; font-weight: 400; color: var(--ink-3); }
.drc-bar { width: 64px; height: 5px; border-radius: 3px; background: var(--surface-low); margin-top: 6px; overflow: hidden; }
.drc-bar i { display: block; height: 100%; border-radius: 3px; background: var(--brand-2); }
.drc-bar i.ok { background: var(--ok); }
.drc-sub2 { margin-top: 3px; font-size: 10.5px; color: var(--ink-3); }
.drc-times { font-size: 11px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.drc-state { display: inline-flex; align-items: center; gap: 4px; margin-top: 4px; font-size: 10.5px; font-weight: 600; }
.drc-state i { width: 7px; height: 7px; border-radius: 50%; }
.drc-state.ok { color: var(--ok); } .drc-state.ok i { background: var(--ok); }
.drc-state.warn { color: var(--brand); } .drc-state.warn i { background: var(--brand-2); }

/* ===== v61 趋势页（13NOV 设计稿）：宠物条 + 三张指标卡 + 汇总 ===== */
.spb { display: flex; align-items: center; gap: 12px; padding: 13px 14px; }
.spb-avatar { flex: none; width: 48px; height: 48px; border-radius: 50%; object-fit: cover; background: var(--surface-low); }
.spb-ph { display: grid; place-items: center; color: var(--brand); }
.spb-main { min-width: 0; }
.spb-name { display: flex; align-items: center; gap: 7px; font-size: 16px; font-weight: 700; color: var(--ink); }
.spb-tag { padding: 2px 9px; border-radius: var(--r-pill); background: var(--surface-low); font-size: 11px; font-weight: 500; color: var(--ink-2); }
.spb-range { display: block; margin-top: 3px; font-size: 12px; color: var(--ink-3); }
.st-card { display: flex; flex-direction: column; gap: 11px; }
.stc-head { display: flex; align-items: center; gap: 9px; }
.stc-ico { flex: none; width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; }
.stc-ico.water { background: var(--mint-soft); color: var(--ok); }
.stc-ico.poop { background: var(--ter-fixed); color: var(--ter); }
.stc-ico.act { background: var(--brand-soft); color: var(--brand); }
.stc-title { font-size: 15px; font-weight: 600; color: var(--ink); }
.stc-side { margin-left: auto; text-align: right; }
.stc-side b { font-size: 15px; color: var(--ok); font-weight: 700; }
.ok-c { color: var(--ok); }
.stc-side span { display: block; font-size: 10.5px; color: var(--ink-3); }
.stc-big { display: flex; align-items: baseline; gap: 6px; font-size: 28px; font-weight: 700; letter-spacing: -0.015em; color: var(--ink); line-height: 1.1; }
.stc-big small { font-size: 13px; font-weight: 400; color: var(--ink-3); }
.stc-big em { font-style: normal; margin-left: auto; font-size: 11.5px; color: var(--ink-3); }
/* 饮水柱图 */
.stc-bars { position: relative; display: flex; align-items: flex-end; justify-content: space-between; gap: 6px; height: 116px; padding: 0 4px; }
.stc-target { position: absolute; left: 0; right: 0; pointer-events: none; }
.stc-target i { display: block; border-top: 1.5px dashed var(--outline-variant); }
.stc-target span { position: absolute; right: 0; top: -14px; font-size: 9.5px; color: var(--ink-3); background: var(--card); padding: 0 3px; }
.stc-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; height: 100%; justify-content: flex-end; z-index: 1; }
.stc-v { font-size: 11px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.stc-v.low { color: var(--brand); font-weight: 700; }
.stc-col i { width: 70%; max-width: 26px; border-radius: 6px 6px 0 0; background: var(--ok); }
.stc-col i.low { background: var(--brand-2); }
.stc-x { font-size: 9.5px; color: var(--ink-3); }
.stc-insight {
  display: flex; align-items: center; gap: 7px;
  padding: 9px 12px; border-radius: 13px; background: var(--surface-low);
  font-size: 12px; color: var(--ink-2);
}
.stc-insight svg { flex: none; color: var(--brand); }
/* 便便比例条 */
.stc-stack { display: flex; height: 12px; border-radius: 6px; overflow: hidden; background: var(--surface-low); }
.stc-legend { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; font-size: 11px; color: var(--ink-2); }
.stc-legend div { display: flex; align-items: center; gap: 6px; min-width: 0; }
.stc-legend i { flex: none; width: 9px; height: 9px; border-radius: 50%; }
.stc-legend b { margin-left: auto; font-weight: 600; color: var(--ink); white-space: nowrap; }
.stc-events { display: flex; flex-direction: column; gap: 7px; }
.stc-ev {
  display: flex; align-items: center; gap: 8px; width: 100%; text-align: left;
  padding: 10px 12px; border-radius: 13px; background: var(--surface-low);
  font-size: 12.5px; color: var(--ink);
}
.stc-ev i { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--ter); }
.stc-ev span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stc-ev svg { flex: none; color: var(--ink-3); }
/* 运动类型占比 */
.stc-kinds { display: flex; gap: 8px; }
.stc-kind {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 9px 4px; border-radius: 13px; background: var(--surface-low);
}
.stc-kind span { font-size: 11px; color: var(--ink-2); }
.stc-kind b { font-size: 15px; font-weight: 700; color: var(--ink); }
/* 汇总条 + 特殊情况精简列表 */
.stat-strip { display: flex; flex-wrap: wrap; gap: 6px 14px; padding: 10px 12px; border-radius: 13px; background: var(--surface-low); font-size: 12px; color: var(--ink-2); }
.stat-strip b { color: var(--ink); font-weight: 700; }
.sp-list { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.sp-row { display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-radius: 12px; background: var(--surface-lowest); border: 1px solid var(--surface-low); font-size: 12.5px; }
.sp-row b { flex: none; color: var(--ink); font-variant-numeric: tabular-nums; }
.sp-days { flex: none; font-size: 11px; color: var(--ink-3); }
.sp-why { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); }
/* 导出 */
.stat-export { margin-top: 14px; }
.export-btn {
  width: 100%; display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px; border-radius: var(--r-pill); background: var(--card);
  box-shadow: var(--shadow-card); color: var(--brand); font-size: 13.5px; font-weight: 600;
}
.export-btn:active { opacity: 0.75; }
/* 打印（导出 PDF）：隐藏导航与按钮，只留内容 */
@media print {
  .tabbar, .seg, .dayrec-add, .export-btn, .stat-export, .weekstrip, .sp-header, .fab { display: none !important; }
  body { background: #fff; }
  .card, .drc, .st-card, .spb { box-shadow: none; border: 1px solid #eee; }
}

/* ===== M1 账号 / 登录页 / 宠物切换与管理 ===== */
.auth-wrap {
  min-height: 100dvh; display: flex; flex-direction: column;
  align-items: center; justify-content: center; padding: 24px;
  background: var(--bg, #faf7f2);
}
.auth-logo { margin-bottom: 10px; }
.brand-mark.big { width: 56px; height: 56px; border-radius: 18px; display: inline-flex;
  align-items: center; justify-content: center; background: var(--brand); color: #fff; }
.auth-title { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; color: var(--ink); }
.auth-sub { font-size: 12.5px; color: var(--ink-3); margin-top: 4px; margin-bottom: 18px; }
.auth-card { width: 100%; max-width: 360px; background: #fff; border-radius: 20px;
  padding: 18px 16px 16px; box-shadow: 0 8px 30px rgba(60, 40, 20, 0.08);
  display: flex; flex-direction: column; gap: 12px; }
.auth-field { display: flex; flex-direction: column; gap: 5px; font-size: 12px; color: var(--ink-2); }
.auth-field input, .auth-field select {
  height: 44px; border: 1.5px solid var(--line, #eee2d8); border-radius: 12px;
  padding: 0 12px; font-size: 16px; background: var(--inset-2, #faf6f1);
  outline: none; width: 100%; box-sizing: border-box; color: var(--ink);
}
.auth-field input:focus, .auth-field select:focus { border-color: var(--brand); background: #fff; }
.auth-submit { margin-top: 4px; }
.auth-switch { background: none; border: none; color: var(--brand); font-size: 13px;
  font-weight: 600; padding: 6px; }
.auth-forgot { color: var(--ink-3); font-weight: 500; margin-top: -6px; }

/* 家庭共享（M2） */
.auth-nested { min-height: calc(100dvh - 110px); padding-top: 40px; }
.fam-code { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.fam-code-text {
  font-size: 30px; font-weight: 800; letter-spacing: 8px; color: var(--ink);
  background: var(--inset-2, #faf6f1); border: 1.5px dashed var(--line, #eee2d8);
  border-radius: 14px; padding: 12px 20px 12px 28px; font-variant-numeric: tabular-nums;
}
.fam-code-sub { font-size: 12px; color: var(--ink-3); line-height: 1.5; }
.fam-join-link { align-self: flex-start; padding-left: 0; }
.pm-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* 我的页：宠物切换 + 账号区 */
.pet-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.pet-chip {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--inset-2, #faf6f1); border: 1.5px solid transparent;
  border-radius: 999px; padding: 6px 13px 6px 7px; font-size: 14px; font-weight: 700;
  color: var(--ink);
}
.pet-chip.on { border-color: var(--brand); background: var(--brand-soft, #fff3e8); color: var(--brand); }
.pet-chip .pc-face { width: 26px; height: 26px; border-radius: 50%; background: var(--brand);
  color: #fff; display: inline-flex; align-items: center; justify-content: center; }
.pet-chip img { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; }
.pet-chip em { font-style: normal; font-size: 10.5px; font-weight: 600; color: var(--ink-3); }
.mine-acct {
  display: flex; align-items: center; gap: 14px; margin-top: 4px;
  padding: 12px 4px 4px; border-top: 1px solid var(--line, #f0e6db);
}
.acct-name { display: flex; flex-direction: column; font-size: 13.5px; font-weight: 700;
  color: var(--ink); margin-right: auto; min-width: 0; }
.acct-name small { font-size: 11px; font-weight: 400; color: var(--ink-3);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 180px; }
.card-link.warn { color: #d94848; }

/* 宠物管理视图 */
.pm-row { display: flex; align-items: center; gap: 10px; padding: 9px 2px; }
.pm-ava { width: 40px; height: 40px; border-radius: 13px; object-fit: cover; flex: 0 0 auto; }
.pm-ava.face { background: var(--brand); color: #fff; display: inline-flex;
  align-items: center; justify-content: center; }
.pm-body { min-width: 0; flex: 1; }
.pm-name { font-size: 15px; font-weight: 700; color: var(--ink); display: flex;
  align-items: center; gap: 6px; }
.pm-sub { font-size: 11.5px; color: var(--ink-3); margin-top: 2px; }
.pm-form { margin-top: 6px; padding-top: 12px; border-top: 1px dashed var(--line, #eee2d8);
  display: flex; flex-direction: column; gap: 10px; }
.fm-title { font-size: 13px; font-weight: 700; color: var(--ink-2); }
.pm-add { margin-top: 10px; }

/* ================= v65：档案页头部重构 + 表单修复 ================= */

/* 生日/性别并排容易在窄屏挤压堆叠 → 改为单列全宽 */
.pm-form-row { grid-template-columns: 1fr; }

/* 顶栏：左上角头像 + Pawsley；右上角宠物名/年龄 + 齿轮 */
.brand-ava { overflow: hidden; }
.brand-ava img { width: 100%; height: 100%; object-fit: cover; border-radius: 9px; }
.top-pet { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.15; }
.top-pet-name { font-size: 13px; font-weight: 700; color: var(--ink); max-width: 110px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top-pet-age { font-size: 10.5px; color: var(--ink-3); }
.gear-btn {
  width: 34px; height: 34px; border-radius: 50%; flex: 0 0 auto;
  background: var(--card); box-shadow: var(--shadow-card); border: 0;
  display: grid; place-items: center; color: var(--ink-2);
}
.gear-btn:active { background: var(--inset-2, #faf6f1); }

/* 右上角设置下拉菜单（参照支付宝） */
.settings-layer {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(38, 26, 18, 0.22);
}
.settings-menu {
  position: absolute; top: 58px; right: 12px; min-width: 172px;
  background: var(--card, #fff); border-radius: 14px;
  box-shadow: 0 12px 32px rgba(60, 36, 16, 0.18);
  padding: 6px; display: flex; flex-direction: column;
  animation: setmenu-in 0.16s ease-out;
}
@keyframes setmenu-in { from { opacity: 0; transform: translateY(-6px) scale(0.98); } }
.set-item {
  text-align: left; border: 0; background: none; cursor: pointer;
  font-size: 14.5px; font-weight: 600; color: var(--ink);
  padding: 11px 14px; border-radius: 9px;
}
.set-item:active { background: var(--inset-2, #faf6f1); }
.set-item.warn { color: var(--danger, #d9534f); }

/* v66：日常滋补改单列长行后，v65 的首字放大 hack 不再使用 */

/* ===== 18NOV V2：疾病 tab 双态 ===== */
/* 无治疗中疾病：病史与疾病档案总览 */
.ill-stat {
  display: flex; align-items: center; gap: 12px;
  background: linear-gradient(135deg, #fff3e6, #fdeadd); border: 0;
  padding: 14px; border-radius: 16px; margin-bottom: 14px;
}
.ill-stat-ico {
  width: 40px; height: 40px; border-radius: 12px; flex: none;
  background: #ffe1c7; color: #b35d10; display: grid; place-items: center;
}
.ill-stat-main { flex: 1; min-width: 0; }
.ill-stat-t { font-size: 14.5px; font-weight: 700; color: #7a430e; letter-spacing: -0.01em; }
.ill-stat-t b { font-size: 20px; margin-right: 2px; }
.ill-stat-s { font-size: 11.5px; color: #a87446; margin-top: 2px; }
.ill-stat-chip {
  flex: none; font-size: 11px; font-weight: 700; color: #b35d10;
  background: #ffdfbd; border-radius: 999px; padding: 5px 10px;
}
.sec-head {
  display: flex; align-items: baseline; gap: 7px;
  margin: 2px 2px 9px; letter-spacing: -0.01em;
}
.sec-head b { font-size: 15.5px; font-weight: 800; color: var(--ink); }
.sec-head small { font-size: 11px; color: var(--ink-3); }
.sec-head .card-link { margin-left: auto; font-size: 12.5px; }
.ill-arc {
  display: block; width: 100%; text-align: left; border: 0;
  background: var(--card, #fff); border-radius: 16px; padding: 14px;
  box-shadow: var(--shadow-card, 0 1px 4px rgba(60,40,20,.07));
  margin-bottom: 11px; font-family: inherit;
}
.ill-arc:active { background: #fdf7f0; }
.ia-top { display: flex; align-items: center; gap: 8px; }
.ia-name { flex: 1; min-width: 0; font-size: 16px; font-weight: 800; color: var(--ink); letter-spacing: -0.01em; }
.ia-done {
  display: inline-flex; align-items: center; gap: 4px; flex: none;
  font-size: 11px; font-weight: 700; color: #0B8A66;
  background: #E3F7EE; border-radius: 999px; padding: 4px 9px;
}
.ia-done i { width: 6px; height: 6px; border-radius: 50%; background: #0B8A66; }
.ia-date { margin-top: 7px; font-size: 12.5px; color: var(--ink-2); display: flex; align-items: center; gap: 8px; }
.ia-days {
  font-size: 11px; font-weight: 700; color: #C0560B;
  background: #FDEEE2; border-radius: 7px; padding: 3px 8px;
}
.ia-sym { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line-2, #eee3d6); }
.ia-warn { font-size: 11.5px; font-weight: 700; color: #b35d10; }
.ia-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 7px; }
.ia-chip {
  font-size: 11.5px; font-weight: 600; color: #C0560B;
  background: #FDEEE2; border-radius: 8px; padding: 4px 9px;
}
.ia-meta {
  margin-top: 10px; display: flex; flex-wrap: wrap; gap: 6px 14px;
  font-size: 11.5px; color: var(--ink-2);
}
.ia-meta span { display: inline-flex; align-items: center; gap: 4px; }
.ill-newbtn {
  display: block; width: 100%; border: 0; font-family: inherit;
  background: #fff1e2; color: #C0560B; font-size: 14.5px; font-weight: 800;
  border-radius: 14px; padding: 14px; margin: 4px 0 12px; letter-spacing: 0.01em;
}
.ill-newbtn:active { background: #ffe7d2; }
.ill-advice { background: #fff; }
.ill-advice-t {
  display: flex; align-items: center; gap: 5px;
  font-size: 13.5px; font-weight: 800; color: #C0560B;
}
.ill-advice-s { margin-top: 7px; font-size: 13px; line-height: 1.7; color: var(--ink-2); }

/* 18NOV V2：病程主页（有治疗中疾病） */
.ihm-quote {
  margin: 2px 0 12px; padding: 9px 12px;
  background: #fff7ec; border-left: 3px solid #E8952F; border-radius: 0 10px 10px 0;
  font-size: 12.5px; line-height: 1.65; color: #7a430e;
}
.ihm-quote b {
  display: block; font-size: 11px; color: #b35d10; margin-bottom: 3px;
}
.ihm-line {
  display: flex; align-items: flex-start; justify-content: space-between;
  padding: 4px 2px 12px;
}
.ihm-node {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  min-width: 52px; text-align: center;
}
.ihm-node i {
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--inset-2, #f4ece2); border: 2px solid var(--line-2, #e2d4c4);
  display: grid; place-items: center; color: #fff; font-style: normal;
}
.ihm-node.done i { background: #0B8A66; border-color: #0B8A66; }
.ihm-node.now i { width: 14px; height: 14px; background: #E8952F; border: 3px solid #ffd9ab; box-shadow: 0 0 0 3px #fff3e6; }
.ihm-node b { font-size: 12.5px; font-weight: 800; color: var(--ink); }
.ihm-node.now b { color: #C0560B; }
.ihm-node small { font-size: 10.5px; color: var(--ink-3); }
.ihm-node.none { opacity: 0.55; }
.ihm-bar { flex: 1; height: 2px; background: var(--line-2, #e2d4c4); border-radius: 1px; margin-top: 10px; }
.ihm-entries { display: flex; flex-direction: column; gap: 8px; }
.ihm-entry {
  display: flex; align-items: center; gap: 10px; width: 100%;
  background: var(--inset-2, #faf3ea); border: 0; border-radius: 12px;
  padding: 10px 12px; text-align: left; text-decoration: none; font-family: inherit;
}
.ihm-entry:active { background: #f3e7d8; }
.ie-ico {
  width: 34px; height: 34px; border-radius: 10px; flex: none;
  background: #ffe1c7; color: #b35d10; display: grid; place-items: center;
}
.ie-ico.tel { background: #e3f7ee; color: #0B8A66; }
.ie-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.ie-main b { font-size: 13.5px; font-weight: 800; color: var(--ink); }
.ie-main small { font-size: 11px; color: var(--ink-3); }
.ihm-meds { margin-top: 13px; }
.ihm-med {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 0; border-top: 1px dashed var(--line-2, #eee3d6);
}
.ihm-med:first-of-type { border-top: 0; }
.ihm-med-main { flex: 1; min-width: 0; }
.ihm-med-name { font-size: 14px; font-weight: 800; color: var(--ink); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.ihm-med-name .ia-chip { font-size: 10.5px; padding: 2px 7px; }
.ihm-med-sub { margin-top: 3px; font-size: 11.5px; color: var(--ink-3); line-height: 1.5; }
.ihm-med-done { flex: none; font-size: 11.5px; font-weight: 700; color: #0B8A66; }
.ihm-med.done .ihm-med-name { color: var(--ink-3); }
.ihm-vitals { margin-top: 13px; }
.iv-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.iv-cell {
  background: var(--inset-2, #faf3ea); border: 0; border-radius: 12px;
  padding: 12px; text-align: left; font-family: inherit; display: block; width: 100%;
}
.iv-cell:active { background: #f3e7d8; }
.iv-t { font-size: 22px; font-weight: 800; color: var(--ink); letter-spacing: -0.02em; }
.iv-t small { font-size: 12px; font-weight: 600; color: var(--ink-3); margin-left: 2px; }
.iv-l { margin-top: 3px; font-size: 12px; font-weight: 700; color: var(--ink-2); }
.iv-dots { display: flex; gap: 4px; margin-top: 6px; }
.iv-dots i { width: 9px; height: 9px; border-radius: 50%; background: #e6dccf; }
.iv-dots i.on { background: #E8952F; }
.iv-s { margin-top: 5px; font-size: 10.5px; color: var(--ink-3); }
.iv-more {
  display: flex; align-items: center; gap: 4px; width: 100%;
  margin-top: 10px; padding: 8px 10px; border: 0; border-radius: 10px;
  background: #fff7ec; color: #C0560B; font-size: 12px; font-weight: 700; font-family: inherit;
}
.ihm-diet { margin-top: 13px; }
.id-plan { background: var(--inset-2, #faf3ea); border-radius: 12px; padding: 12px; }
.id-name { font-size: 14px; font-weight: 800; color: var(--ink); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.id-name .ia-days { background: #e3f7ee; color: #0B8A66; }
.id-sub { margin-top: 5px; font-size: 12px; color: var(--ink-2); }
.id-note {
  margin-top: 8px; font-size: 11.5px; line-height: 1.65; color: #a87446;
  background: #fff7ec; border-radius: 9px; padding: 8px 10px;
}
.id-progress {
  margin-top: 10px; display: flex; align-items: center; justify-content: space-between; gap: 8px;
  font-size: 12px; color: var(--ink-2);
}
.id-progress b { color: #C0560B; }
/* 精神食欲评分 sheet */
.ap-list { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.ap-row {
  display: flex; align-items: center; gap: 10px; width: 100%;
  border: 1.5px solid var(--line-2, #eee3d6); background: #fff; border-radius: 12px;
  padding: 11px 13px; font-family: inherit; text-align: left;
}
.ap-row b { font-size: 14px; font-weight: 800; color: var(--ink); flex: none; }
.ap-row span { font-size: 12.5px; color: var(--ink-2); }
.ap-row.on { border-color: #E8952F; background: #fff7ec; }
.ap-row.on b { color: #C0560B; }
/* card-head 右侧带文字的小按钮：横向胶囊（避免被 27px 圆形压成竖排） */
.card-head .mini-cam.text {
  width: auto; height: auto; border-radius: 999px;
  padding: 5px 11px; font-size: 12px; font-weight: 700;
  display: inline-flex; align-items: center; gap: 3px;
  white-space: nowrap;
}
.card-head .mini-cam.text svg { width: 13px; height: 13px; }
/* 症状时间线图例 */
.sym-legend {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; color: var(--ink-3); font-weight: 600;
}
.sym-legend .sev-dot { width: 8px; height: 8px; }
/* 快照页：症状高发角标 + 已记录计数 */
.snap-day .tl-date { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.snap-hot {
  font-size: 10.5px; font-weight: 700; color: #C0560B;
  background: #FDEEE2; border-radius: 999px; padding: 3px 9px;
}
.snap-n { margin-left: auto; font-size: 11px; color: var(--ink-3); }

/* ============ 18NOV V3 档案页版式（2026-11-18 按 stitch 设计稿重排） ============ */

/* 多宠切换条：活跃宠橙色实底胶囊 + 其他白底描边 + 虚线添加 */
.v3-switch-bar { display: flex; align-items: center; gap: 8px; overflow-x: auto; padding: 6px 0 2px; margin-top: 4px; scrollbar-width: none; }
.v3-switch-bar::-webkit-scrollbar { display: none; }
.v3-pet-pill { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px 6px 7px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--ink-2); font-size: 13px; font-weight: 500; white-space: nowrap; flex: 0 0 auto; }
.v3-pet-pill img, .v3-pet-pill .vp-face { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; background: var(--bg-2, #f6efe8); display: grid; place-items: center; color: var(--ink-3); }
.v3-pet-pill.on { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 700; box-shadow: 0 2px 8px rgba(250, 140, 22, 0.25); }
.v3-pet-pill.on .vp-face { background: rgba(255, 255, 255, 0.25); color: #fff; }
.v3-pet-pill.add { border-style: dashed; border-color: rgba(200, 90, 60, 0.35); color: var(--brand); background: var(--surface-low); font-weight: 600; padding: 6px 13px; }
.vp-dot { width: 7px; height: 7px; border-radius: 50%; background: #35b45f; flex: 0 0 auto; }

/* 宠物档案卡 */
.v3-pet-card { position: relative; display: flex; flex-direction: column; gap: 12px; padding-bottom: 8px; }
/* v99：编辑铅笔 + 守护徽章固定卡片右上角 */
.v3-pet-corner { position: absolute; top: 12px; right: 12px; display: flex; align-items: center; gap: 8px; }
.v3-pet-age { font-size: 14px; color: var(--ink-2); font-weight: 600; margin-top: 3px; }
/* 目标管理入口（体重/饮水/运动统一配置） */
/* v100：目标管理按钮移入宠物卡右上区（编辑铅笔下方），与出生日期行底部平齐 */
.goal-mgr-btn {
  align-self: flex-end; margin-left: auto; margin-bottom: 1px;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px; border-radius: var(--r-pill);
  background: var(--brand-fixed); color: var(--on-brand-fixed);
  font-size: 13.5px; font-weight: 700; white-space: nowrap;
}
.goal-mgr-btn svg { width: 14px; height: 14px; }
.goal-mgr-btn:active { opacity: 0.75; }
.v3-goal-row { display: flex; align-items: center; gap: 8px; }
.v3-goal-hint { font-size: 12px; color: var(--ink-4); }
.v3-guard {
  flex: 0 0 auto;
  padding: 4px 10px; border-radius: var(--r-pill);
  background: var(--brand-fixed); color: var(--on-brand-fixed);
  font-size: 12.5px; font-weight: 700; white-space: nowrap;
}
.v3-ava { position: relative; width: 62px; height: 62px; border-radius: 50%; flex: 0 0 auto; overflow: visible; padding: 0; border: none; background: var(--brand-soft); color: var(--brand); font-size: 24px; font-weight: 700; display: grid; place-items: center; }
.v3-ava .ava-img, .v3-ava .ava-face { width: 62px; height: 62px; border-radius: 50%; object-fit: cover; box-shadow: 0 4px 12px rgba(250, 140, 22, 0.15); }
.v3-ava-badge { position: absolute; right: 0; bottom: 2px; width: 19px; height: 19px; border-radius: 50%; background: #35b45f; color: #fff; display: grid; place-items: center; border: 2px solid #fff; }
.v3-pet-info { min-width: 0; flex: 1; }
/* 名字行不换行（呼呼等短名正常横排）；角标在最右侧，超长名用省略号防钻到角标下 */
.v3-pet-name { padding-right: 8px; }
.v3-pet-top { display: flex; align-items: stretch; gap: 12px; }
.v3-pet-name { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; display: flex; align-items: center; gap: 7px; }
.v3-tag { font-size: 11px; font-weight: 600; color: var(--brand); background: rgba(250, 140, 22, 0.13); padding: 2.5px 8px; border-radius: 999px; font-style: normal; flex: 0 0 auto; }
.v3-pet-sub { font-size: 13px; color: var(--ink-3); margin-top: 3px; }
.v3-pet-bday { display: flex; align-items: center; gap: 4px; font-size: 11.5px; color: var(--ink-3); margin-top: 3px; opacity: 0.85; }
.v3-edit-btn { width: 38px; height: 38px; border-radius: 50%; background: var(--bg-2, #f6efe8); color: var(--brand); display: grid; place-items: center; flex: 0 0 auto; border: none; }
/* 名字行内的小笔（21NOV：编辑入口从右上角移到名字后面） */
.v3-pet-name .v3-edit-btn { width: 26px; height: 26px; }

/* 生理基线三格卡：v82 起内嵌进宠物卡（守护天数并入副标题，去掉独立标题行） */
.v3-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.v3-grid-3 { grid-template-columns: repeat(3, 1fr); gap: 8px; }
.v3-grid-incard { margin-bottom: 0; }
.v3-grid-incard .v3-bio-card { background: var(--surface-low); box-shadow: none; }
.v3-grid-incard .v3-bio-tip { background: var(--card); }
.v3-bio-card { background: var(--card); border-radius: 16px; padding: 13px; box-shadow: 0 4px 16px rgba(140, 131, 123, 0.06); display: flex; flex-direction: column; }
button.v3-bio-card.tap { border: none; font-family: inherit; text-align: left; cursor: pointer; }
.v3-grid-3 .v3-bio-card { padding: 11px 10px; }
.v3-grid-3 .v3-bio-head { font-size: 13px; gap: 3px; letter-spacing: -0.01em; }
.v3-grid-3 .v3-bio-ico { width: 18px; height: 18px; }
.v3-grid-3 .v3-bio-num { font-size: 20px; margin-top: 6px; }
.v3-grid-3 .v3-bio-num small { font-size: 11px; }
.v3-grid-3 .v3-bio-note { font-size: 10.5px; margin-top: 4px; }
.v3-grid-3 .v3-bio-bar { height: 5px; margin-top: 6px; }
.v3-grid-3 .v3-bio-tip { font-size: 10.5px; padding: 5px 7px; margin-top: 7px; }
.v3-grid-3 .v3-bio-foot { font-size: 10.5px; margin-top: 7px; padding-top: 6px; }
.v3-bio-head { display: flex; align-items: center; justify-content: space-between; font-size: 13px; color: var(--ink-2); font-weight: 700; }
.v3-bio-ico { width: 27px; height: 27px; border-radius: 50%; display: grid; place-items: center; flex: 0 0 auto; }
.v3-bio-ico.orange { background: rgba(250, 140, 22, 0.1); color: var(--brand); }
.v3-bio-ico.green { background: rgba(53, 180, 95, 0.12); color: #1d8a44; }
.v3-bio-ico.clay { background: rgba(200, 90, 60, 0.1); color: var(--brand); }
.v3-bio-num { font-size: 26px; font-weight: 700; letter-spacing: -0.02em; margin-top: 8px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.v3-bio-num small { font-size: 12.5px; font-weight: 500; color: var(--ink-3); margin-left: 3px; }
.v3-bio-bar { height: 6px; border-radius: 999px; background: var(--bg-2, #f6efe8); overflow: hidden; margin-top: 8px; }
.v3-bio-bar i { display: block; height: 100%; border-radius: 999px; background: var(--brand); }
.v3-bio-note { font-size: 11.5px; color: var(--brand); font-weight: 600; margin-top: 6px; }
.v3-bio-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; padding-top: 8px; border-top: 1px dashed var(--line); font-size: 11px; color: var(--ink-3); }
.v3-mini-btn { font-size: 11.5px; font-weight: 600; color: var(--brand); background: rgba(250, 140, 22, 0.1); padding: 3px 9px; border-radius: 999px; border: none; }
.v3-bio-tip { font-size: 11.5px; color: var(--ink-3); background: var(--surface-low); border-radius: 9px; padding: 6px 8px; margin-top: 10px; }
/* 账号与安全（19NOV：饲养人账号维护回归档案页） */
.acct-row { display: flex; align-items: center; gap: 11px; padding: 2px 0 12px; }
.acct-face { width: 40px; height: 40px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; font-weight: 700; font-size: 16px; flex: 0 0 auto; }
.acct-info { flex: 1; min-width: 0; }
.acct-info b { font-size: 15px; display: block; }
.acct-info span { font-size: 12px; color: var(--ink-3); display: block; margin-top: 1px; word-break: break-all; }
.acct-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.acct-btn { display: flex; align-items: center; justify-content: center; gap: 5px; padding: 10px 0; border-radius: 999px; background: var(--surface-high); color: var(--ink); font-size: 13px; font-weight: 600; border: none; }
.acct-btn.warn { background: rgba(220, 68, 55, 0.08); color: #C0392B; }

/* 定点医院子卡 */
.v3-hosp-card { display: flex; flex-direction: column; }
.v3-hosp-item { background: var(--surface-low); border-radius: 16px; padding: 12px 13px; margin-bottom: 10px; border: 1px solid rgba(250, 140, 22, 0.1); }
.v3-hosp-hit { width: 100%; text-align: left; background: none; border: none; padding: 0; display: block; }
.v3-hosp-name { font-size: 15px; font-weight: 700; color: var(--ink); }
.v3-hosp-note { display: flex; align-items: center; gap: 4px; font-size: 12px; color: var(--ink-3); margin-top: 4px; }
.v3-hosp-note svg { flex: 0 0 auto; opacity: 0.7; }
.v3-add-dashed { display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; padding: 11px 0; border-radius: 16px; border: 1.5px dashed rgba(200, 90, 60, 0.3); background: var(--surface-low); color: var(--brand); font-size: 13.5px; font-weight: 600; }

/* 家庭共同照料圈 */
.v3-fam-card { display: flex; flex-direction: column; }
.v3-fam-list { display: flex; flex-direction: column; gap: 8px; }
.v3-fam-row { display: flex; align-items: center; gap: 11px; background: var(--surface-low); border-radius: 16px; padding: 10px 12px; }
.v3-fam-face { width: 38px; height: 38px; border-radius: 50%; background: rgba(200, 90, 60, 0.12); color: var(--brand); font-weight: 700; font-size: 14px; display: grid; place-items: center; flex: 0 0 auto; }
.v3-fam-face.lead { background: var(--brand); color: #fff; }
.v3-fam-info { flex: 1; min-width: 0; }
.v3-fam-name { font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.v3-tag2 { font-size: 10.5px; font-weight: 600; color: var(--brand); background: rgba(250, 140, 22, 0.14); padding: 2px 7px; border-radius: 999px; font-style: normal; }
.v3-tag2.gray { color: var(--ink-3); background: var(--surface-high); }
.v3-invite { display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; padding: 11px 0; border-radius: 999px; background: rgba(200, 90, 60, 0.09); color: var(--brand); font-size: 13.5px; font-weight: 600; border: none; margin-top: 12px; }

/* 弹窗底部删除按钮 */
.sheet-foot { display: flex; gap: 10px; }
.sheet-del { flex: 0 0 auto; padding: 0 16px; border-radius: 14px; border: 1px solid rgba(200, 60, 50, 0.35); background: #fff; color: #C43C32; font-weight: 600; font-size: 14.5px; }
.sheet-hint { display: flex; align-items: center; gap: 5px; font-size: 12.5px; color: var(--ink-3); margin-top: 10px; }
.sheet-hint svg { flex: 0 0 auto; opacity: 0.75; }

/* ---- v80 亲友圈设计稿：家庭照料圈 / 账号与安全（内嵌淡橙横带版式） ---- */
.fam2-band, .acct2-band {
  display: flex; align-items: center; gap: 13px; width: 100%; text-align: left;
  background: rgba(255, 220, 195, 0.32); border: none; border-radius: 18px;
  padding: 12px 14px; margin-top: 2px;
}
.fam2-avas { display: flex; flex: 0 0 auto; }
.fam2-face, .fi-face {
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
  font-size: 14px; font-weight: 700; border: 2px solid #fff;
  background: #EFE7DD; color: #8A6B4F; flex: 0 0 auto;
}
.fam2-face + .fam2-face { margin-left: -9px; }
.fam2-face.lead { background: var(--brand-soft); color: var(--brand); }
.fam2-txt, .acct2-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.fam2-txt b, .acct2-txt b { font-size: 15px; font-weight: 700; color: var(--ink); }
.fam2-txt span, .acct2-txt span { font-size: 12px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acct2-band { width: auto; margin-bottom: 10px; }
.acct2-face {
  width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center;
  background: var(--brand-soft); color: var(--brand); font-size: 16px; font-weight: 700; flex: 0 0 auto;
}
.acct2-go { font-style: normal; font-size: 12.5px; font-weight: 600; color: var(--brand); flex: 0 0 auto; }
.acct2-card .acct-btn.warn { width: 100%; }

/* ---- v82 紧凑：共同守护横带缩减（fam2） ---- */
.fam2-band { padding: 9px 12px; gap: 10px; margin-top: 0; }
.fam2-face { width: 32px; height: 32px; font-size: 13px; }
.fam2-face + .fam2-face { margin-left: -8px; }
.fam2-txt { gap: 1px; }
.fam2-txt b { font-size: 14px; }
.fam2-txt span { font-size: 11.5px; }

/* ---- v83 疫苗与驱虫状态卡 ---- */
.vac-row { display: flex; align-items: center; gap: 10px; background: rgba(255, 220, 195, 0.32); border-radius: 14px; padding: 10px 12px; margin-top: 8px; }
.vac-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.vac-info b { font-size: 13.5px; font-weight: 700; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vac-info span { font-size: 11.5px; color: var(--ink-3); }
.vac-pill { display: inline-flex; align-items: center; gap: 5px; flex: 0 0 auto; font-style: normal; font-size: 11.5px; font-weight: 600; color: #1d8a44; background: rgba(53, 180, 95, 0.14); padding: 4px 10px; border-radius: 999px; }
.vac-pill i { width: 6px; height: 6px; border-radius: 50%; background: #35b45f; }
.vac-pill.warn { color: #C05621; background: rgba(250, 140, 22, 0.14); }
.vac-pill.warn i { background: var(--brand); }
.vac-empty { font-size: 12.5px; color: var(--ink-3); background: var(--surface-low); border-radius: 14px; padding: 12px 14px; margin-top: 8px; line-height: 1.5; }

/* ---- v83 更新防疫记录面板 ---- */
.sheet-label { font-size: 12px; font-weight: 600; color: var(--ink-2); margin: 12px 0 6px; display: flex; align-items: baseline; gap: 6px; }
.sheet-label em { font-style: normal; font-size: 10.5px; font-weight: 500; color: var(--ink-3); }
.fi-chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.fi-chips .fi-chip { padding: 8px 13px; }
.vac-custom { flex: 1; min-width: 108px; padding: 8px 12px !important; font-size: 12px; border-radius: 12px; }
.vac-tabs { display: flex; gap: 8px; margin-top: 12px; }
.vac-tab { flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px; padding: 10px 0; border-radius: 999px; border: none; background: var(--surface-low); color: var(--ink-2); font-size: 13.5px; font-weight: 600; }
.vac-tab.on { background: var(--brand); color: #fff; box-shadow: 0 4px 10px rgba(250, 140, 22, 0.25); }
.vac-opts { display: flex; flex-direction: column; gap: 8px; }
.vac-opt { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; border-radius: 14px; border: 1.5px solid transparent; background: var(--surface-low); padding: 11px 12px; }
.vac-opt.on { border-color: var(--brand); background: var(--brand-soft); }
.vac-opt-ico { width: 34px; height: 34px; border-radius: 50%; background: #fff; display: grid; place-items: center; color: var(--brand); flex: 0 0 auto; }
.vac-opt-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.vac-opt-txt b { font-size: 13.5px; font-weight: 700; display: flex; align-items: center; gap: 6px; }
.vac-opt-tag { font-style: normal; font-size: 10px; font-weight: 600; color: #fff; background: var(--brand); padding: 1px 7px; border-radius: 999px; }
.vac-opt-txt span { font-size: 11px; color: var(--ink-3); }
.vac-opt-dot { width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--line); background: #fff; flex: 0 0 auto; }
.vac-opt-dot.on { background: var(--brand); border-color: var(--brand); box-shadow: inset 0 0 0 3px #fff; }
/* v94 HIG 验收：日期与防护周期原两列挤压易重叠，改纵向堆叠（HIG 建议每行单一任务） */
.vac-grid2 { display: grid; grid-template-columns: 1fr; gap: 14px; align-items: start; }
.vac-grid2 .fi-chips { row-gap: 8px; }
.vac-next { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; background: rgba(53, 180, 95, 0.1); color: #1d8a44; font-size: 12.5px; font-weight: 700; border-radius: 12px; padding: 10px 12px; margin-top: 12px; }
.vac-next em { font-style: normal; font-weight: 500; font-size: 11.5px; opacity: 0.85; }
.vac-hrow { display: flex; align-items: center; gap: 8px; background: var(--surface-low); border-radius: 12px; padding: 9px 12px; margin-top: 6px; }
.vac-hdel { border: none; background: none; color: var(--ink-3); font-size: 14px; padding: 4px 6px; flex: 0 0 auto; }
.vac-foot { display: flex; gap: 12px; align-items: center; margin-top: 14px; }
.vac-hist-btn { flex: 0 0 auto; border: none; background: none; color: var(--ink-3); font-size: 12.5px; text-decoration: underline; padding: 8px 0; }
.vac-save { flex: 1; padding: 12px 0; border-radius: 999px; border: none; background: var(--brand); color: #fff; font-size: 15px; font-weight: 700; box-shadow: 0 6px 14px rgba(250, 140, 22, 0.3); }

/* ---- v81 账号与安全模块（齿轮菜单 → set-acct 面板） ---- */
.as-list { display: flex; flex-direction: column; gap: 6px; }
.as-item {
  display: flex; align-items: center; gap: 11px; width: 100%; text-align: left;
  background: var(--surface-low); border: none; border-radius: 14px; padding: 12px 14px;
  font-size: 14px; font-weight: 600; color: var(--ink);
}
.as-item > svg:last-child { margin-left: auto; color: var(--ink-3); flex: 0 0 auto; }
.as-item .as-ico { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; flex: 0 0 auto; }
.as-ico.orange { background: var(--brand-soft); color: var(--brand); }
.as-ico.blue { background: var(--brand-fixed); color: var(--brand); }
.as-ico.green { background: rgba(7, 193, 96, 0.12); color: #07A34B; }
.as-ico.red { background: rgba(220, 68, 55, 0.1); color: #C0392B; }
.as-item.warn { color: #C0392B; }
.as-item.warn .as-ico { background: rgba(220, 68, 55, 0.1); }

/* ---- v80 邀请家人面板（famInvite sheet） ---- */
.fi-head { display: flex; align-items: center; gap: 8px; padding: 18px 20px 4px; }
.fi-title { font-size: 16px; font-weight: 700; color: var(--ink); }
.fi-badge {
  font-style: normal; font-size: 11px; font-weight: 600; color: #C4560A;
  background: var(--brand-soft); padding: 3px 9px; border-radius: 999px;
  display: inline-flex; align-items: center; gap: 3px; flex: 0 0 auto;
}
.fi-close {
  margin-left: auto; height: auto; padding: 8px 0 8px 12px; border-radius: 0;
  background: none; border: none; color: var(--ink-2);
  font-size: 15px; line-height: 1; flex: 0 0 auto; cursor: pointer;
}
.fi-desc { font-size: 12.5px; color: var(--ink-3); line-height: 1.6; margin: 4px 0 14px; }
.fi-pet { display: flex; align-items: center; gap: 12px; background: var(--brand-soft); border-radius: 16px; padding: 12px 14px; }
.fi-pet-ava { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; flex: 0 0 auto; }
.fi-pet-ava.face { display: grid; place-items: center; background: #fff; color: var(--brand); }
.fi-pet-info { flex: 1; min-width: 0; }
.fi-pet-name { font-size: 15px; font-weight: 700; color: #C4560A; display: flex; align-items: center; gap: 4px; }
.fi-pet-name svg { flex: 0 0 auto; }
.fi-pet-sub { font-size: 11.5px; color: #C4560A; opacity: 0.72; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fi-pet-badge { flex: 0 0 auto; font-size: 11px; font-weight: 600; background: #fff; color: #C4560A; border-radius: 999px; padding: 5px 10px; }
.fi-sec { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 16px 0 9px; }
.fi-sec-l { font-size: 13.5px; font-weight: 700; color: var(--ink); display: inline-flex; gap: 5px; align-items: center; }
.fi-sec-l svg { flex: 0 0 auto; color: var(--brand); }
.fi-sec-r { font-size: 11px; color: var(--ink-3); display: inline-flex; gap: 3px; align-items: center; flex: 0 0 auto; }
.fi-sec-r svg { flex: 0 0 auto; }
.fi-sec-r .card-link { font-size: 12px; }
.fi-roles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.fi-chip {
  padding: 9px 0; border-radius: 12px; background: var(--surface-low); border: none;
  font-size: 12px; font-weight: 600; color: var(--ink);
  display: flex; align-items: center; justify-content: center; gap: 3px; white-space: nowrap;
}
.fi-chip.on { background: var(--brand-soft); color: var(--brand); box-shadow: inset 0 0 0 1.5px var(--brand-line); }
.fi-wx {
  display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%;
  padding: 14px 0; border: none; border-radius: 999px; background: #07C160; color: #fff;
  font-size: 15px; font-weight: 700; margin-top: 2px;
  box-shadow: 0 6px 14px rgba(7, 193, 96, 0.24);
}
.fi-wx.gen { background: var(--brand); box-shadow: 0 6px 14px rgba(255, 122, 26, 0.24); }
.fi-ways { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 9px; }
.fi-way-btn {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  padding: 11px 6px; border-radius: 12px; background: var(--brand-soft); border: none;
  color: #C4560A; font-size: 12.5px; font-weight: 600; min-width: 0; white-space: nowrap;
}
.fi-way-btn.wide { margin-top: 10px; width: 100%; }
.fi-way-btn svg { flex: 0 0 auto; }
.fi-qr { display: flex; flex-direction: column; align-items: center; gap: 9px; padding: 6px 0 2px; }
.fi-qr-box { width: 210px; height: 210px; background: #fff; border-radius: 14px; padding: 12px; box-shadow: var(--shadow-card); }
.fi-qr-box svg { width: 100%; height: 100%; display: block; }
.fi-qr p { font-size: 12px; color: var(--ink-3); }
.fi-code { font-size: 17px; font-weight: 800; letter-spacing: 2px; color: var(--ink); }
.fi-qr-err { font-size: 12px; color: #C0392B; padding: 24px 0; }
.fi-members { display: flex; flex-direction: column; gap: 6px; }
.fi-member { display: flex; align-items: center; gap: 11px; background: var(--surface-low); border-radius: 14px; padding: 10px 12px; }
.fi-member .fi-face { width: 36px; height: 36px; font-size: 13px; }
.fi-m-info { flex: 1; min-width: 0; }
.fi-m-name { font-size: 13.5px; font-weight: 600; color: var(--ink); display: flex; align-items: center; gap: 6px; }
.fi-owner-tag {
  font-style: normal; font-size: 10px; font-weight: 600;
  background: var(--brand); color: #fff; padding: 2px 7px; border-radius: 999px; flex: 0 0 auto;
}
.fi-m-sub { font-size: 11px; color: var(--ink-3); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fi-m-status { font-size: 11px; font-weight: 600; color: var(--ink-3); flex: 0 0 auto; display: inline-flex; gap: 3px; align-items: center; text-align: right; }
.fi-m-status.ok { color: #0A8A3C; }

/* ---- 19NOV v85 防疫面板：自定义品牌 chip（带删除角标）+ 自定义月数输入 ---- */
.vac-cchip { position: relative; display: inline-flex; min-width: 0; }
.vac-cchip-hit {
  padding: 9px 22px 9px 12px; border-radius: 12px; background: var(--surface-low); border: none;
  font-size: 12px; font-weight: 600; color: var(--ink); white-space: nowrap;
  display: flex; align-items: center; justify-content: center;
}
.vac-cchip.on .vac-cchip-hit { background: var(--brand-soft); color: var(--brand); box-shadow: inset 0 0 0 1.5px var(--brand-line); }
.vac-cchip-x {
  position: absolute; top: -5px; right: -5px; width: 16px; height: 16px; border-radius: 50%;
  border: none; background: var(--ink-3); color: #fff; font-size: 11px; line-height: 1;
  display: flex; align-items: center; justify-content: center; padding: 0;
}
.vac-mcust { max-width: 108px; padding: 9px 10px; font-size: 12px; text-align: center; }

/* ---- 19NOV v87 饮食新增「零食」分类（pink 色调） ---- */
.fbm-dot.pink { background: #E75A9C; }
.dp-ico.pink { background: #E75A9C; }

/* ---- 19NOV v88 分享 Pawsley：入口 pink 色调 + 链接文本样式 ---- */
.as-ico.pink { background: rgba(231, 90, 156, 0.12); color: #E75A9C; }
.share-url { display: block; text-align: center; margin: 10px 0 12px; font-size: 14px; letter-spacing: 0.5px; word-break: break-all; }

/* ---- 19NOV v90 用药与保健分组折叠：展开/收起按钮 ---- */
.pm-expand {
  width: 100%; border: none; background: none; padding: 10px 2px 4px;
  display: flex; align-items: center; justify-content: center; gap: 4px;
  font-size: 12px; font-weight: 600; color: var(--ink-2);
}
.pm-expand svg { transform: rotate(90deg); }

/* ---- 19NOV v91 同名多时段计划标识 ---- */
.pm-grp {
  font-style: normal; font-size: 10px; font-weight: 700; padding: 2px 6px;
  border-radius: 6px; background: rgba(90, 149, 231, 0.12); color: #4a7fd4;
  white-space: nowrap;
}

/* ---- 20NOV v92 Apple HIG 批次B：触控热区补足（≥44px 命中区，视觉基本不变） ---- */
/* v115：chip 命中区整体抬到 ≥44px（含 .mini），单元说明字号 9→10px */
.chip { position: relative; padding: 8px 13px; }
.chip::after { content: ''; position: absolute; inset: -6px -4px; }
.qbtn { min-height: 44px; }
.step-btn, .gear-btn, .fi-close, .time-btn, .dayrec-add, .seg-item { position: relative; }
.step-btn::after { content: ''; position: absolute; inset: -4px; }
.stepper.compact .step-btn::after { inset: -6px; }
.gear-btn::after { content: ''; position: absolute; inset: -6px; }
.fi-close::after { content: ''; position: absolute; inset: -6px; }
.time-btn::after { content: ''; position: absolute; inset: -8px -6px; }
.dayrec-add::after { content: ''; position: absolute; inset: -7px -4px; }
.seg-item::after { content: ''; position: absolute; inset: -4px 0; }
/* v94 HIG 全面板验收补漏：文字链按钮热区扩展（tpl-add 存为模板 / card-link 管理成员等） */
.tpl-add, .card-link { position: relative; display: inline-block; }
.tpl-add::after { content: ''; position: absolute; inset: -12px -10px; }
.card-link::after { content: ''; position: absolute; inset: -11px -8px; }
.sheet-cancel { padding: 8px 10px; min-height: 44px; display: inline-flex; align-items: center; }

/* ---- 20NOV v92 Apple HIG 批次C：半屏抽屉规范（Grabber/蒙层/背景下沉） ---- */
.sheet::before {
  content: ''; position: absolute; top: 8px; left: 50%; transform: translateX(-50%);
  width: 36px; height: 5px; border-radius: 999px; background: #D6D3D1;
  z-index: 2; pointer-events: none;
}
.sheet.full::before { display: none; }
.sheet-head { padding-top: 22px; }
.sheet.full .sheet-head { padding-top: calc(10px + env(safe-area-inset-top)); }
.mask { background: rgba(0, 0, 0, 0.4); }
#app { transform-origin: top center; transition: transform 0.28s cubic-bezier(0.32, 0.72, 0, 1); }
body.sheet-open #app { transform: scale(0.96); }
.sheet.swiping { transition: none !important; }

/* ---- 20NOV v92 Apple HIG 批次E：医院卡高德导航按钮 ---- */
.v3-hosp-item { position: relative; }
.v3-hosp-item .v3-hosp-hit { padding-right: 46px; }
.v3-hosp-nav {
  position: absolute; right: 10px; top: 12px; width: 34px; height: 34px; border-radius: 50%;
  background: var(--brand-soft); color: var(--brand); display: grid; place-items: center;
  text-decoration: none;
}
.v3-hosp-nav { position: absolute; }
.v3-hosp-nav::after { content: ''; position: absolute; inset: -5px; }

/* v105b 应用内确认弹窗（替代原生 confirm，不带网址标题） */
.confirm-layer {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(38, 26, 18, 0.30);
  display: flex; align-items: center; justify-content: center;
  padding: 28px;
  animation: confirmIn 0.16s ease-out;
}
@keyframes confirmIn { from { opacity: 0; transform: scale(1.04); } to { opacity: 1; transform: scale(1); } }
.confirm-box {
  width: 100%; max-width: 300px;
  background: #FDF6EF; border-radius: 18px;
  padding: 20px 18px 14px;
  box-shadow: 0 18px 48px rgba(60, 36, 16, 0.30);
  display: flex; flex-direction: column; gap: 10px;
}
.confirm-msg { font-size: 15px; font-weight: 600; color: var(--ink); line-height: 1.5; text-align: left; padding: 0 2px 4px; }
.confirm-btn { border: none; border-radius: 14px; padding: 12px 0; font-size: 16px; font-weight: 700; width: 100%; }
.confirm-btn.ok { background: var(--brand, #B4622D); color: #fff; }
.confirm-btn.no { background: rgba(180, 98, 45, 0.10); color: var(--ink-2, #6B4A2E); }

/* ---- 26NOV 今日页 v1.1：便便警示 / 调整份量 / 泡水 chips / 逐笔明细 ---- */
/* 便便卡：异常橙色警示条 */
.poo-alert {
  display: flex; flex-direction: column; gap: 3px;
  background: rgba(233, 118, 34, 0.10);
  border: 1px solid rgba(233, 118, 34, 0.28);
  border-radius: 14px; padding: 10px 14px; margin-top: 8px;
}
.poo-alert b { font-size: 13px; font-weight: 700; color: #B45309; }
.poo-alert span { font-size: 12px; color: var(--ink-2); line-height: 1.45; }

/* 饮食计划行：调整份量按钮（未打卡行，与「去打卡」并排） */
.pill-adj {
  border: none; background: transparent; color: var(--ink-3);
  font-size: 12px; font-weight: 600; padding: 6px 8px; border-radius: 999px;
}
.pill-adj:active { background: rgba(0,0,0,0.05); }

/* 品牌面板：泡水量 chips */
/* 覆盖 1910 行的单行布局：条目改为两行（份量行 + 泡水行） */
.fbm-item { flex-direction: column; gap: 6px; }
.fbm-item-top { display: flex; align-items: center; gap: 8px; }
.fbm-item-soak { display: flex; align-items: center; gap: 5px; padding-left: 2px; }
.fbm-soak-lab { font-size: 11px; color: var(--ink-3); flex: none; }
.fbm-soak {
  border: 1px solid rgba(0,0,0,0.10); background: transparent; color: var(--ink-2);
  font-size: 11px; font-weight: 600; padding: 3px 9px; border-radius: 999px;
}
.fbm-soak.on { background: var(--sky-soft, #DDEBF5); color: #0A76A8; border-color: transparent; }

/* 调整份量面板 */
.adj-row { display: flex; flex-direction: column; gap: 8px; }
.adj-row.excluded { opacity: 0.45; }
.adj-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.adj-head .chip { font-size: 12px; padding: 5px 12px; }
.adj-brand { font-size: 15px; font-weight: 700; color: var(--ink); }
