:root {
  --bg: #F2F3F5;
  --card: #FFFFFF;
  --ink: #14161A;
  --ink-2: #3D4350;
  --muted: #8C93A0;
  --line: #ECEEF1;
  --accent: #EDA08A;
  --accent-soft: #FFF7F3;
  --radius: 22px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 12px 28px -16px rgba(16, 24, 40, .18);
  --safe-b: env(safe-area-inset-bottom, 0px);
  /* v122：全局字号规范（5 层，乘 --fs 全局缩放）
     h1 页面大标题 / h2 卡片标题 / body 正文与数字 / sub 次要说明 / foot 脚注小字 */
  --t-h1: 17px;
  --t-h2: 15px;
  --t-body: 13px;
  --t-sub: 11.5px;
  --t-foot: 10.5px;
}

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

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  /* v128：系统字体缩放钳制——禁止安卓 WebView 按系统「字体大小」设置整体放大文字，
     排版只由 App 内 --fs 字号档控制，换任何手机都不漂移 */
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro SC", "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}

button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input { font-family: inherit; }
.hidden { display: none !important; }
.muted { color: var(--muted); font-size: calc(13px * var(--fs)); }

/* ================= 登录 ================= */
.auth {
  position: fixed;
  inset: 0;
  overflow-y: auto;
  background: linear-gradient(180deg, #FAFAF8 0%, #F0F1F4 100%);
  display: flex;
  justify-content: center;
}
.auth-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(70px);
  opacity: .55;
  pointer-events: none;
}
.g1 { width: 320px; height: 320px; background: #FFD9CC; top: -110px; right: -90px; }
.g2 { width: 300px; height: 300px; background: #EDEFF2; bottom: -120px; left: -110px; }

.auth-inner {
  position: relative;
  width: 100%;
  max-width: 430px;
  padding: 68px 26px calc(40px + var(--safe-b));
  display: flex;
  flex-direction: column;
}
.brand { text-align: center; margin-bottom: 30px; }
.logo { width: 62px; height: 62px; margin: 0 auto 14px; }
.logo svg { width: 100%; height: 100%; display: block; }
.brand h1 {
  font-size: calc(17px * var(--fs));
  letter-spacing: 6px;
  margin: 0 0 6px;
  font-weight: 700;
  text-indent: 6px;
}
.brand-sub { margin: 0; color: var(--muted); font-size: calc(13px * var(--fs)); letter-spacing: 2px; }

.auth-card {
  background: rgba(255, 255, 255, .86);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 26px;
  padding: 22px 20px 18px;
  box-shadow: 0 2px 4px rgba(16, 24, 40, .03), 0 24px 48px -30px rgba(16, 24, 40, .3);
  border: 1px solid rgba(255, 255, 255, .8);
}
.auth-tabs {
  position: relative;
  display: flex;
  background: #F0F1F3;
  border-radius: 14px;
  padding: 4px;
  margin-bottom: 20px;
}
.auth-tab {
  flex: 1;
  position: relative;
  z-index: 2;
  padding: 9px 0;
  font-size: calc(13.5px * var(--fs));
  font-weight: 600;
  color: var(--muted);
  border-radius: 11px;
  transition: color .22s;
}
.auth-tab.active { color: var(--ink); }
.auth-indicator {
  position: absolute;
  top: 4px;
  left: 4px;
  width: calc(50% - 4px);
  height: calc(100% - 8px);
  background: #fff;
  border-radius: 11px;
  box-shadow: 0 1px 3px rgba(16, 24, 40, .1);
  transition: transform .26s cubic-bezier(.3, .9, .3, 1);
}
.auth-indicator.right { transform: translateX(100%); }

.field { display: block; margin-bottom: 14px; }
.field > span {
  display: block;
  font-size: calc(11.5px * var(--fs));
  color: var(--muted);
  margin: 0 0 7px 2px;
  letter-spacing: .3px;
}
.field input {
  width: 100%;
  height: 48px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #FBFBFC;
  padding: 0 15px;
  font-size: calc(15px * var(--fs));
  color: var(--ink);
  outline: none;
  transition: border-color .2s, background .2s, box-shadow .2s;
}
.field input:focus {
  border-color: #D7DAE0;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(20, 22, 26, .04);
}
.field input::placeholder { color: #B7BCC6; }
.field-row { display: flex; gap: 10px; }
.field-row .field { flex: 1; }

.auth-error {
  color: #B3795F;
  font-size: calc(13px * var(--fs));
  min-height: 17px;
  margin: 2px 2px 8px;
}
.btn-primary {
  width: 100%;
  height: 50px;
  border-radius: 15px;
  background: var(--ink);
  color: #fff;
  font-size: calc(15px * var(--fs));
  font-weight: 600;
  letter-spacing: .5px;
  transition: transform .16s, opacity .2s;
  box-shadow: 0 10px 24px -12px rgba(20, 22, 26, .7);
}
.btn-primary:active { transform: scale(.975); opacity: .9; }
.btn-primary[disabled] { opacity: .5; }
.auth-note {
  text-align: center;
  font-size: calc(11.5px * var(--fs));
  color: var(--muted);
  line-height: 1.6;
  margin: 14px 6px 0;
}

/* ================= 应用骨架 ================= */
.app {
  max-width: 460px;
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100dvh;
  padding-bottom: calc(78px + var(--safe-b));
  background: var(--bg);
}
@media (min-width: 520px) {
  body { background: #E9EBEF; }
  .app {
    box-shadow: 0 0 0 1px rgba(16, 24, 40, .04), 0 30px 80px -40px rgba(16, 24, 40, .3);
    min-height: 100vh;
  }
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  /* v135①：顶栏高度固定——此前随右侧内容伸缩（健康 40 / 助手 34 / 其他 52），
     切页时标题上下跳动；固定后所有页面标题基线一致（--hdr-h 由 JS 实测会自动跟随） */
  height: calc(62px + env(safe-area-inset-top, 0px));
  box-sizing: border-box;
  padding: calc(14px + env(safe-area-inset-top, 0px)) 20px 10px;
  /* v125：吸顶后内容穿过几乎不可见——底色高不透明 + 毛玻璃 */
  background: linear-gradient(180deg, rgba(242, 243, 245, .97) 55%, rgba(242, 243, 245, .93));
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

/* ===== v125/v126/v127：各应用顶部类目条吸顶通栏底衬（手册规则 47）=====
   v127 改为「通栏方角长条底衬」：
   - top = var(--hdr-h)：紧贴顶栏底边，中间无缝隙；margin-top:-4px 抵消 .main 顶部内边距，
     自然位置与钉住位置重合 → 滚动零移动；
   - 左右 margin:-16px 顶满屏幕两边（通栏），padding:3px 19px 保持按钮与原对齐一致；
   - border-radius:0 方角，内容穿过时不再露出圆弧边；
   - 底衬为渐变过渡（v128）：linear-gradient(180deg,#F2F3F5 0%,#E7E9ED 62%)，顶部与顶栏同色起笔向下柔和过渡到略深，消除拼接感；
   - 滚动 >6px（body.is-scrolled）后底部浮现一条淡分割线；
   - 时光集吸顶挂在外层 .nt-head 上（内层 #ntModeSeg 退化为透明容器，否则跑不出短父级） */
.sched-tabs,
.ev-chips,
.nt-head,
#ivSeg,
#mdSeg,
.vault-tabs,
#ltBody > .seg,
#lgSeg,
.h2-head {
  position: sticky;
  top: var(--hdr-h, 63px);
  margin-top: -4px !important;
  margin-left: -16px !important;
  margin-right: -16px !important;
  padding: 3px 19px !important;
  z-index: 18;
  /* v128：渐变过渡底衬——顶部与顶栏同色起笔，向下柔和过渡到略深色，消除拼接感 */
  background: linear-gradient(180deg, #F2F3F5 0%, #E7E9ED 62%) !important;
  border-radius: 0 !important;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
/* 时光集：内层分段条退化为透明容器，视觉与手势不变，吸顶由外层 .nt-head 负责 */
#ntModeSeg {
  background: transparent !important;
  border-radius: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
}
body.is-scrolled .sched-tabs,
body.is-scrolled .ev-chips,
body.is-scrolled .nt-head,
body.is-scrolled #ivSeg,
body.is-scrolled #mdSeg,
body.is-scrolled .vault-tabs,
body.is-scrolled #ltBody > .seg,
body.is-scrolled #lgSeg,
body.is-scrolled .h2-head {
  box-shadow: 0 10px 14px -12px rgba(16, 24, 40, .14);
}
.hello { margin: 0 0 2px; font-size: calc(11.5px * var(--fs)); color: var(--muted); letter-spacing: .4px; }
.topbar-title { margin: 0; font-size: calc(17px * var(--fs)); font-weight: 700; letter-spacing: -.4px; }
.sync-pill {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: calc(11.5px * var(--fs));
  color: var(--muted);
  background: rgba(255, 255, 255, .8);
  border: 1px solid var(--line);
  padding: 5px 9px;
  border-radius: 20px;
  transition: opacity .2s;
}
.sync-dot { width: 6px; height: 6px; border-radius: 50%; background: #8C93A0; }
.sync-pill.saving .sync-dot { background: #B3795F; animation: pulse 1s infinite; }
.sync-pill.error .sync-dot { background: #B3795F; }
@keyframes pulse { 50% { opacity: .25; } }

.main { padding: 4px 16px 0; }
.view { animation: fadeUp .28s ease both; }
@keyframes fadeUp {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ================= 日历 ================= */
.cal-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 14px 12px 12px;
  box-shadow: var(--shadow);
}
.cal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4px 6px;
}
.cal-month {
  font-size: calc(17px * var(--fs));
  font-weight: 650;
  letter-spacing: -.2px;
  display: flex;
  align-items: center;
  gap: 5px;
}
.caret {
  width: 0; height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid #C3C7CF;
}
.icon-btn {
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border-radius: 50%;
  transition: background .18s;
}
.icon-btn:active { background: #F2F3F5; }
.icon-btn svg {
  width: 19px; height: 19px;
  fill: none; stroke: var(--ink-2);
  stroke-width: 2.1; stroke-linecap: round; stroke-linejoin: round;
}
.weekdays {
  display: grid;
  width: 100%;
  grid-template-columns: repeat(7, 1fr);
  padding: 4px 0 2px;
}
.weekdays span {
  text-align: center;
  font-size: calc(11.5px * var(--fs));
  color: #A2A8B3;
  letter-spacing: .5px;
  padding: 4px 0;
}
.weekdays .wk { color: #D97757; }

.grid { display: block; }
.week-row {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
}
/* 折叠模式：只显示当前周（高度过渡，避免闪跳） */
.week-row {
  /* v110：宽屏（折叠屏展开/平板）单元格按宽度算高度会超过 110px，旧值会把农历和排班点裁掉 */
  max-height: 220px;
  overflow: hidden;
  transition: max-height .3s cubic-bezier(.3, .9, .3, 1), opacity .22s ease;
}
.cal-card.collapsed .week-row:not(.cur) { max-height: 0; opacity: 0; }
.cal-card.collapsed .cal-legend { display: none; }
.cal-card.collapsed .cal-grip .grip-bar,
#calSticky.collapsed .cal-grip .grip-bar { width: 26px; }

/* 折叠把手 */
.cal-grip {
  width: 100%;
  display: flex;
  justify-content: center;
  padding: 7px 0 2px;
}
.cal-grip .grip-bar {
  width: 40px;
  height: 5px;
  border-radius: 3px;
  background: #DFE2E7;
  transition: width .2s;
}
.day {
  position: relative;
  aspect-ratio: 1 / 1.32;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding-top: 3px;
  border-radius: 11px;
  transition: background .16s;
}
.day:active { background: #F7F8FA; }
.day .dnum {
  font-size: calc(17px * var(--fs));
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  width: 28px; height: 28px;
  display: grid; place-items: center;
  border-radius: 50%;
  transition: background .18s, color .18s;
  line-height: 1;
}
.day .lunar {
  font-size: calc(10.5px * var(--fs));
  line-height: 1.15;
  color: #A7ADB8;
  margin-top: -1px;
  transform: scale(.96);
  white-space: nowrap;
}
.day .lunar.fest { color: #E0703F; font-weight: 600; }
.day.today .lunar { color: #F08A64; }
.day .tag {
  margin-top: 2px;
  height: 15px;
  padding: 0 4px;
  border-radius: 4px;
  font-size: calc(10.5px * var(--fs));
  font-weight: 600;
  line-height: 15px;
  color: #fff;
  letter-spacing: .2px;
  max-width: 100%;
  overflow: hidden;
  white-space: nowrap;
}
.day.selected .tag { box-shadow: 0 0 0 1px rgba(255, 255, 255, .9); }
.day.other .dnum { color: #C9CDD4; }
.day.today .dnum { color: var(--accent); font-weight: 700; }
.day.today .dnum::after {
  content: "";
  position: absolute;
  bottom: 5px;
  width: 3px; height: 3px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0;
}
.day.selected { background: #F5F6F8; }
.day.selected .dnum { background: var(--ink); color: #fff; font-weight: 600; }
.day.today.selected .dnum { background: #DE8F72; color: #fff; }

.day .bar {
  width: 18px;
  height: 3.5px;
  border-radius: 2px;
  margin-top: 1px;
  background: transparent;
}
.day .bar.empty { background: #EFF1F4; }
.day .evdot {
  position: absolute;
  top: 8px;
  right: calc(50% - 17px);
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 1.5px #fff;
}
.cal-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  padding: 10px 6px 2px;
  border-top: 1px solid var(--line);
  margin-top: 8px;
}
.leg {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: calc(11.5px * var(--fs));
  color: var(--ink-2);
}
.leg i { width: 7px; height: 7px; border-radius: 50%; }

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 22px 4px 10px;
}
.section-head h2 { font-size: calc(15px * var(--fs)); margin: 0; font-weight: 650; letter-spacing: -.1px; }
.text-btn { font-size: calc(13px * var(--fs)); color: var(--muted); }

.upcoming { display: flex; flex-direction: column; gap: 9px; }
.up-item {
  display: flex;
  align-items: center;
  gap: 13px;
  background: var(--card);
  border-radius: 17px;
  padding: 13px 15px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .03);
}
.up-days {
  min-width: 46px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.up-days strong { display: block; font-size: calc(17px * var(--fs)); font-weight: 700; line-height: 1.1; }
.up-days span { font-size: calc(10.5px * var(--fs)); color: var(--muted); }
.up-main { flex: 1; min-width: 0; }
.up-main h3 { margin: 0 0 3px; font-size: calc(15px * var(--fs)); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.up-main p { margin: 0; font-size: calc(11.5px * var(--fs)); color: var(--muted); }
.empty-card {
  background: var(--card);
  border-radius: 17px;
  padding: 22px 18px;
  text-align: center;
  color: var(--muted);
  font-size: calc(13px * var(--fs));
  line-height: 1.7;
}

.summary-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.sum-cell {
  background: var(--card);
  border-radius: 16px;
  padding: 12px 6px 10px;
  text-align: center;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .03);
}
.sum-cell strong { display: block; font-size: calc(17px * var(--fs)); font-weight: 700; font-variant-numeric: tabular-nums; }
.sum-cell span { font-size: calc(10.5px * var(--fs)); color: var(--muted); }

/* ================= 面板 / 排班 ================= */
.panel {
  background: var(--card);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
  margin-bottom: 12px;
}
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.panel-head h2 { font-size: calc(15px * var(--fs)); margin: 0; font-weight: 650; }
.hint { font-size: calc(11.5px * var(--fs)); color: var(--muted); margin: 12px 2px 0; line-height: 1.6; }

.shift-type-list { display: flex; flex-direction: column; }
.st-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 2px;
  border-bottom: 1px solid var(--line);
}
.st-row:last-child { border-bottom: none; }
.st-dot { width: 11px; height: 11px; border-radius: 4px; flex-shrink: 0; }
.st-info { flex: 1; }
.st-info h4 { margin: 0 0 2px; font-size: calc(13.5px * var(--fs)); font-weight: 600; }
.st-info p { margin: 0; font-size: calc(11.5px * var(--fs)); color: var(--muted); }
.icon-mini {
  width: 30px; height: 30px;
  display: grid; place-items: center;
  border-radius: 9px;
  color: var(--muted);
}
.icon-mini:active { background: #F3F4F6; }
.icon-mini svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.stats { display: flex; flex-direction: column; gap: 11px; }
.stat-row { display: flex; align-items: center; gap: 10px; }
.stat-name { width: 42px; font-size: calc(13px * var(--fs)); color: var(--ink-2); }
.stat-track { flex: 1; height: 8px; border-radius: 5px; background: #F1F2F4; overflow: hidden; }
.stat-fill { height: 100%; border-radius: 5px; transition: width .5s cubic-bezier(.3, .9, .3, 1); }
.stat-val { width: 42px; text-align: right; font-size: calc(13px * var(--fs)); font-variant-numeric: tabular-nums; color: var(--ink-2); }

.tools { display: flex; gap: 10px; }
.tool {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  padding: 15px 6px;
  background: #F8F9FA;
  border-radius: 15px;
  font-size: calc(11.5px * var(--fs));
  color: var(--ink-2);
  transition: transform .15s;
}
.tool:active { transform: scale(.97); }
.tool svg { width: 20px; height: 20px; fill: none; stroke: #59606E; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ================= 事件 ================= */
.countdown-hero {
  background: linear-gradient(135deg, #1B1E26 0%, #33373F 100%);
  border-radius: var(--radius);
  padding: 20px;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.countdown-hero::after {
  content: "";
  position: absolute;
  width: 160px; height: 160px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(237, 160, 138, .40), transparent 70%);
  top: -60px; right: -40px;
}
.cd-label { font-size: calc(11.5px * var(--fs)); letter-spacing: 1.5px; opacity: .6; margin: 0 0 14px; }
.cd-num { display: flex; align-items: baseline; gap: 6px; margin-bottom: 8px; }
.cd-num strong { font-size: calc(17px * var(--fs)); font-weight: 700; line-height: 1; letter-spacing: -2px; font-variant-numeric: tabular-nums; }
.cd-num span { font-size: calc(13px * var(--fs)); opacity: .7; }
.cd-title { font-size: calc(15px * var(--fs)); margin: 0 0 4px; font-weight: 600; }
.cd-date { font-size: calc(11.5px * var(--fs)); opacity: .55; margin: 0; }
.cd-empty { font-size: calc(13px * var(--fs)); opacity: .7; line-height: 1.7; margin: 6px 0 0; }

.event-list { display: flex; flex-direction: column; gap: 9px; }
.event-item {
  display: flex;
  gap: 12px;
  background: var(--card);
  border-radius: 17px;
  padding: 13px 14px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .03);
  align-items: flex-start;
}
.ev-bar { width: 3px; align-self: stretch; border-radius: 3px; flex-shrink: 0; }
.ev-body { flex: 1; min-width: 0; }
.ev-top { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.ev-top h3 { margin: 0; font-size: calc(15px * var(--fs)); font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 0 1 auto; }
.ev-tag {
  font-size: calc(10.5px * var(--fs));
  padding: 2px 6px;
  border-radius: 6px;
  background: #F2F3F5;
  color: #6B7280;
  flex-shrink: 0;
}
.ev-meta { margin: 4px 0 0; font-size: calc(11.5px * var(--fs)); color: var(--muted); }
.ev-right { text-align: right; flex-shrink: 0; }
.ev-count { font-size: calc(13px * var(--fs)); font-weight: 600; font-variant-numeric: tabular-nums; }
.ev-count.soon { color: var(--accent); }
.ev-del { margin-top: 4px; font-size: calc(11.5px * var(--fs)); color: #B8BDC6; }

.fab {
  position: fixed;
  right: max(18px, calc(50% - 212px));
  bottom: calc(88px + var(--safe-b));
  width: 54px; height: 54px;
  border-radius: 20px;
  background: var(--ink);
  display: grid; place-items: center;
  box-shadow: 0 12px 28px -10px rgba(20, 22, 26, .6);
  transition: transform .16s;
  z-index: 15;
}
.fab:active { transform: scale(.94); }
.fab svg { width: 22px; height: 22px; fill: none; stroke: #fff; stroke-width: 2.2; stroke-linecap: round; }

/* ================= 我的 ================= */
.profile {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 18px;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.avatar {
  width: 52px; height: 52px;
  border-radius: 18px;
  background: linear-gradient(135deg, #F2AD99, #FF5A36);
  color: #fff;
  display: grid; place-items: center;
  font-size: calc(17px * var(--fs));
  font-weight: 600;
  flex-shrink: 0;
}
.profile h2 { margin: 0 0 3px; font-size: calc(17px * var(--fs)); font-weight: 650; }
.profile p { margin: 0; }
.metric-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; margin: 12px 0; }
.metric {
  background: var(--card);
  border-radius: 17px;
  padding: 14px 8px;
  text-align: center;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .03);
}
.metric strong { display: block; font-size: calc(17px * var(--fs)); font-weight: 700; font-variant-numeric: tabular-nums; }
.metric span { font-size: calc(10.5px * var(--fs)); color: var(--muted); }
.list-panel { padding: 4px 16px; }
.row {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 0;
  font-size: calc(13.5px * var(--fs));
  border-bottom: 1px solid var(--line);
  text-align: left;
}
.row:last-child { border-bottom: none; }
.chev { color: #C9CDD4; font-size: calc(17px * var(--fs)); }
.danger { color: #B3795F; }
.footnote { font-size: calc(11.5px * var(--fs)); color: var(--muted); line-height: 1.7; text-align: center; padding: 14px 20px 20px; }

/* ================= 底部导航 ================= */
.tabbar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  max-width: 460px;
  margin: 0 auto;
  display: flex;
  padding: 8px 10px calc(8px + var(--safe-b));
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-top: 1px solid rgba(0, 0, 0, .05);
  z-index: 25;
}
.tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 5px 0 3px;
  color: #A8ADB8;
  transition: color .2s;
}
.tab svg {
  width: 22px; height: 22px;
  fill: none; stroke: currentColor;
  stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round;
  transition: transform .2s;
}
.tab span { font-size: calc(10.5px * var(--fs)); letter-spacing: .2px; }
.tab.active { color: var(--ink); }
.tab.active svg { transform: translateY(-1px); stroke-width: 2; }

/* ================= 日期抽屉 ================= */
.sheet-mask {
  position: fixed;
  inset: 0;
  background: rgba(12, 14, 18, .38);
  backdrop-filter: blur(2px);
  z-index: 40;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  animation: maskIn .2s ease;
}
@keyframes maskIn { from { opacity: 0; } }
.sheet {
  width: 100%;
  max-width: 460px;
  background: #fff;
  border-radius: 26px 26px 0 0;
  padding: 6px 20px calc(22px + var(--safe-b));
  max-height: 82vh;
  overflow-y: auto;
  animation: sheetUp .3s cubic-bezier(.2, .9, .25, 1);
}
@keyframes sheetUp { from { transform: translateY(100%); } }
.sheet-grip {
  width: 38px; height: 4px;
  border-radius: 3px;
  background: #E3E5E9;
  margin: 6px auto 12px;
}
.sheet-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 16px;
}
.sheet-head h2 { margin: 0 0 3px; font-size: calc(17px * var(--fs)); font-weight: 700; letter-spacing: -.3px; }
.sheet-head p { margin: 0; }
.sheet-label { font-size: calc(13px * var(--fs)); color: var(--muted); font-weight: 500; margin: 0 0 9px; }
.sheet-label-row { display: flex; align-items: center; justify-content: space-between; margin-top: 20px; }
.sheet-label-row .sheet-label { margin: 0; }

.shift-picker { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 9px 14px;
  border-radius: 13px;
  border: 1.5px solid var(--line);
  font-size: calc(13px * var(--fs));
  color: var(--ink-2);
  background: #fff;
  transition: all .16s;
}
.chip i { width: 8px; height: 8px; border-radius: 3px; }
.chip.active {
  border-color: transparent;
  color: #fff;
  font-weight: 600;
}
.chip.clearchip { color: var(--muted); }
.chip.clearchip.active { background: #F0F1F3 !important; color: var(--ink); }

.day-events { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.de-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 13px;
  background: #F8F9FA;
  border-radius: 13px;
}
.de-row .ev-bar { width: 3px; }
.de-main { flex: 1; min-width: 0; }
.de-main h4 { margin: 0 0 2px; font-size: calc(13.5px * var(--fs)); font-weight: 600; }
.de-main p { margin: 0; font-size: calc(11.5px * var(--fs)); color: var(--muted); }
.de-empty { font-size: calc(13px * var(--fs)); color: var(--muted); padding: 14px 0; text-align: center; }

/* ================= 弹窗 ================= */
.dialog-mask {
  position: fixed;
  inset: 0;
  background: rgba(12, 14, 18, .42);
  backdrop-filter: blur(2px);
  z-index: 50;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
  animation: maskIn .18s ease;
}
/* v93：所有编辑弹窗统一为底部抽屉形式（保留全部字段） */
.dialog {
  width: 100%;
  max-width: 560px;
  background: #fff;
  border-radius: 26px 26px 0 0;
  padding: 22px 20px calc(20px + env(safe-area-inset-bottom, 0px));
  animation: sheetUp .28s cubic-bezier(.2, .9, .25, 1);
  max-height: 90vh;
  overflow-y: auto;
}
@keyframes sheetUp { from { opacity: .4; transform: translateY(45%); } }
.dialog h2 { margin: 0 0 18px; font-size: calc(17px * var(--fs)); font-weight: 680; }
.dialog-actions { display: flex; gap: 10px; margin-top: 6px; }
.btn-ghost {
  flex: 1;
  height: 50px;
  border-radius: 15px;
  background: #F2F3F5;
  font-size: calc(15px * var(--fs));
  font-weight: 600;
  color: var(--ink-2);
}
.dialog-actions .btn-primary { flex: 1.4; }

.cat-row { display: flex; gap: 8px; flex-wrap: wrap; }
.cat {
  padding: 8px 13px;
  border-radius: 11px;
  background: #F4F5F7;
  font-size: calc(13px * var(--fs));
  color: var(--ink-2);
  border: 1.5px solid transparent;
  transition: all .16s;
}
.cat.active { background: var(--ink); color: #fff; font-weight: 600; }

.color-row { display: flex; gap: 10px; flex-wrap: wrap; }
.swatch {
  position: relative;
  width: 31px; height: 31px;
  border-radius: 10px;
  border: none;
  box-shadow: 0 0 0 1px rgba(16, 24, 40, .06);
  transition: transform .15s, box-shadow .15s;
}
.swatch.active {
  transform: scale(1.08);
  box-shadow: 0 0 0 2px var(--ink), 0 0 0 4px #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 13l4 4L19 7'/%3E%3C/svg%3E");
  background-size: 15px 15px;
  background-position: center;
  background-repeat: no-repeat;
}

/* ================= Toast ================= */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(100px + var(--safe-b));
  transform: translate(-50%, 12px);
  background: rgba(20, 22, 26, .92);
  color: #fff;
  font-size: calc(13px * var(--fs));
  padding: 11px 18px;
  border-radius: 14px;
  opacity: 0;
  pointer-events: none;
  transition: all .26s;
  z-index: 90;
  max-width: 80vw;
  text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }


/* ================= 循环排班 / 安装引导 ================= */
/* v52：循环排班入口轻量化 —— 浅色圆圈图标，去箭头去黑底 */
.cycle-entry {
  display: flex;
  align-items: center;
  gap: 13px;
  width: 100%;
  padding: 13px 16px;
  margin-bottom: 12px;
  background: #fff;
  border-radius: 18px;
  color: var(--ink);
  text-align: left;
  box-shadow: 0 6px 18px -14px rgba(20, 22, 26, .35);
  transition: transform .15s;
}
.cycle-entry:active { transform: scale(.985); }
.cycle-entry-icon {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: #FFF3ED;
  display: grid; place-items: center;
  flex-shrink: 0;
}
.cycle-entry-icon svg { width: 19px; height: 19px; fill: none; stroke: #B3795F; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.cycle-entry-text { flex: 1; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cycle-entry-text strong { font-size: calc(15px * var(--fs)); font-weight: 650; }

/* v53/v54：弹层要盖过个人资料全屏页（z-index 60） */
#profileMask, #birthMask { z-index: 70; }

/* v54：笔记页统计卡（参照「我的」页 metric 卡） */
.nt-metric {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  background: #fff;
  border-radius: 18px;
  padding: 14px 16px;
  margin-bottom: 12px;
  text-align: left;
  box-shadow: 0 6px 18px -14px rgba(20, 22, 26, .35);
  transition: transform .15s;
}
.nt-metric:active { transform: scale(.985); }
.nt-metric b {
  font-size: calc(17px * var(--fs));
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -.5px;
  min-width: 40px;
}
.nt-metric-main { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.nt-metric-main span { font-size: calc(13px * var(--fs)); font-weight: 650; color: var(--ink); }
.nt-metric-main em { font-style: normal; font-size: calc(11.5px * var(--fs)); color: #A7ADB8; }
.nt-metric .chev { color: #C4C9D2; }

/* v54：出生日期步进选择器 */
.birth-picker { display: flex; flex-direction: column; gap: 10px; margin: 4px 0 10px; }
.bp-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.bp-row > span { font-size: calc(13px * var(--fs)); color: var(--muted); width: 26px; flex-shrink: 0; }
.bp-row b {
  flex: 1;
  text-align: center;
  font-size: calc(17px * var(--fs));
  font-weight: 700;
  color: var(--ink);
  background: #F7F8FA;
  border-radius: 12px;
  padding: 10px 0;
}
.bp-btn {
  width: 40px; height: 40px;
  border-radius: 12px;
  background: #F4F5F7;
  display: grid; place-items: center;
  font-size: calc(15px * var(--fs));
  color: var(--ink);
  flex-shrink: 0;
  transition: transform .14s, background .2s;
}
.bp-btn:active { transform: scale(.92); background: #EBEDF0; }
.bp-btn.bp-fast { width: 48px; font-size: calc(13px * var(--fs)); color: var(--muted); }

/* v53 徽章样式（v54 起改用统计卡，样式保留兼容） */
.nt-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  margin-left: 5px;
  border-radius: 9px;
  background: #3B82F6;
  color: #fff;
  font-size: calc(10.5px * var(--fs));
  font-weight: 700;
  font-style: normal;
  line-height: 1;
  transform: translateY(-1px);
  cursor: pointer;
}
.seg-btn.active .nt-count { background: #2563EB; }
/* v53：笔记按月统计弹层 */
.nt-stat-body { max-height: 46vh; overflow-y: auto; }
.nt-stat-total {
  font-size: calc(13px * var(--fs));
  color: var(--muted);
  margin: 2px 0 10px;
}
.nt-stat-total b { color: var(--ink); }
.nt-stat-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 2px;
  border-bottom: 1px solid rgba(0, 0, 0, .05);
  font-size: calc(13.5px * var(--fs));
}
.nt-stat-row:last-child { border-bottom: none; }
.nt-stat-row b { font-size: calc(13.5px * var(--fs)); color: #B3795F; }

.dlg-desc { font-size: calc(11.5px * var(--fs)); color: var(--muted); line-height: 1.6; margin: -8px 0 16px; }
.chip-row { display: flex; gap: 8px; flex-wrap: wrap; }
/* v52：弹窗内 chip 行单行横滚 */
.chip-row.scroll-x {
  flex-wrap: nowrap;
  overflow-x: auto;
  padding-bottom: 4px;
  margin-bottom: -4px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.chip-row.scroll-x::-webkit-scrollbar { display: none; }
.chip-row.scroll-x .mini-chip { flex-shrink: 0; }
/* v52：循环「自定义」天数输入行 */
.cy-custom-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 9px;
}
.cy-custom-row input {
  width: 84px;
  padding: 9px 12px;
  border: 1px solid #E3E6EB;
  border-radius: 11px;
  font-size: calc(13.5px * var(--fs));
  font-family: inherit;
  background: #fff;
}
.cy-custom-row input:focus { outline: none; border-color: #B3795F; }
.cy-custom-unit { font-size: calc(11.5px * var(--fs)); color: var(--muted); }
.mini-chip {
  padding: 8px 12px;
  border-radius: 11px;
  background: #F4F5F7;
  font-size: calc(13px * var(--fs));
  color: var(--ink-2);
  border: 1.5px solid transparent;
  transition: all .16s;
}
.mini-chip.active { background: #FFF7F3; border-color: #F9DCCF; color: #C08265; font-weight: 600; }

.seq {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 38px;
  padding: 8px;
  background: #F7F8FA;
  border-radius: 13px;
  margin-bottom: 10px;
  align-items: center;
}
.seq-empty { font-size: calc(11.5px * var(--fs)); color: #B3B8C2; padding-left: 4px; }
.seq-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 24px;
  padding: 0 7px;
  border-radius: 8px;
  font-size: calc(11.5px * var(--fs));
  font-weight: 600;
  color: #fff;
}
.seq-item b { font-weight: 600; }
.seq-item i { font-style: normal; opacity: .65; font-size: calc(10.5px * var(--fs)); }

.cy-preview {
  font-size: calc(11.5px * var(--fs));
  color: var(--ink-2);
  background: #F7F8FA;
  border-radius: 12px;
  padding: 10px 12px;
  line-height: 1.6;
  margin: 0 0 14px;
  min-height: 20px;
}
.cy-preview b { color: var(--ink); }

.shift-picker .chip { padding: 8px 12px; font-size: calc(13px * var(--fs)); }

/* ================= 提醒与开关 ================= */
.switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 2px;
  margin-bottom: 6px;
}
.switch-row > span { font-size: calc(13.5px * var(--fs)); color: var(--ink-2); display: flex; flex-direction: column; gap: 2px; }
.switch-row em { font-style: normal; font-size: calc(10.5px * var(--fs)); color: var(--muted); }
.switch-row input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 46px; height: 27px;
  border-radius: 20px;
  background: #E4E7EB;
  position: relative;
  transition: background .22s;
  flex-shrink: 0;
  margin: 0;
}
.switch-row input[type="checkbox"]::after {
  content: "";
  position: absolute;
  top: 3px; left: 3px;
  width: 21px; height: 21px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .18);
  transition: transform .22s cubic-bezier(.3, .9, .3, 1);
}
.switch-row input[type="checkbox"]:checked { background: #EDA08A; }
.switch-row input[type="checkbox"]:checked::after { transform: translateX(19px); }

.link-row {
  width: 100%;
  text-align: center;
  font-size: calc(13px * var(--fs));
  color: #B3795F;
  background: #FFF4EF;
  border-radius: 12px;
  padding: 11px;
  margin: 2px 0 14px;
  transition: transform .15s;
}
.link-row:active { transform: scale(.98); }

.row-sub {
  font-style: normal;
  font-size: calc(11.5px * var(--fs));
  color: var(--muted);
  margin-left: 8px;
  background: #F2F3F5;
  padding: 2px 7px;
  border-radius: 6px;
}
.row-sub.on { background: #F1F2F4; color: #3D4350; }

/* 提醒浮层 */
.reminder-stack {
  position: fixed;
  top: calc(10px + env(safe-area-inset-top, 0px));
  left: 0; right: 0;
  z-index: 95;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0 14px;
  max-width: 460px;
  margin: 0 auto;
  pointer-events: none;
}
.reminder-card {
  pointer-events: auto;
  background: #fff;
  border-radius: 18px;
  padding: 14px 15px;
  box-shadow: 0 10px 34px -10px rgba(16, 24, 40, .35);
  border-left: 4px solid #EDA08A;
  animation: dropIn .34s cubic-bezier(.2, .9, .25, 1);
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
@keyframes dropIn {
  from { opacity: 0; transform: translateY(-16px); }
}
.reminder-ic {
  width: 34px; height: 34px;
  border-radius: 12px;
  background: #FFF7F3;
  display: grid; place-items: center;
  flex-shrink: 0;
}
.reminder-ic svg { width: 18px; height: 18px; fill: none; stroke: #EDA08A; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.reminder-main { flex: 1; min-width: 0; }
.reminder-main strong { display: block; font-size: calc(13.5px * var(--fs)); font-weight: 650; margin-bottom: 3px; }
.reminder-main p { margin: 0; font-size: calc(11.5px * var(--fs)); color: var(--muted); }
.reminder-close {
  font-size: calc(11.5px * var(--fs));
  color: var(--muted);
  padding: 4px 9px;
  border-radius: 8px;
  background: #F4F5F7;
  flex-shrink: 0;
}

/* 事件卡片上的提醒标记 */
.ev-flags { display: flex; gap: 5px; margin-top: 5px; flex-wrap: wrap; }
.ev-flag {
  font-size: calc(10.5px * var(--fs));
  padding: 2px 6px;
  border-radius: 6px;
  background: #FFFAF7;
  color: #B3795F;
}
.ev-flag.year { background: #F4F5F7; color: #59606E; }

.sheet-fest {
  margin: 6px 0 0;
  font-size: calc(11.5px * var(--fs));
  color: #B3795F;
  font-weight: 600;
  letter-spacing: .3px;
}
.sheet-fest:empty { display: none; }
.day .lunar.term { color: #C08265; font-weight: 600; }

/* ================= 年/月跳转、今日卡、农历选择 ================= */
.cal-head .icon-btn.yr svg { width: 17px; height: 17px; stroke: #B9BEC8; stroke-width: 2; }
.cal-head { gap: 2px; padding: 0 0 6px; }
.cal-head .icon-btn { width: 32px; height: 32px; }
.cal-month { flex: 1; justify-content: center; }

/* 今日 / 选中日 信息卡 */
.today-card {
  margin-top: 12px;
  background: #fff;
  border-radius: 20px;
  padding: 15px 16px 14px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
}
.tc-top {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 3px;
}
.tc-date { font-size: calc(17px * var(--fs)); font-weight: 650; letter-spacing: -.2px; }
.tc-week { font-size: calc(13px * var(--fs)); color: var(--muted); }
.tc-lunar { font-size: calc(13.5px * var(--fs)); color: #7A8089; margin: 0 0 10px; }
.tc-lunar b { color: #B3795F; font-weight: 600; }
.tc-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.tc-chip {
  font-size: calc(13px * var(--fs));
  padding: 4px 9px;
  border-radius: 8px;
  background: #F3F4F6;
  color: #565C66;
}
.tc-chip.term { font-weight: 600; }
.tc-chip.fest { font-weight: 600; }

.tc-chip.mine { background: #14161A; color: #fff; font-weight: 600; }
.tc-empty { font-size: calc(13px * var(--fs)); color: #B3B8C2; }

/* 公历 / 农历 切换 */
.seg {
  display: flex;
  gap: 4px;
  background: #EAECEF;
  border-radius: 12px;
  padding: 3px;
  margin-bottom: 9px;
}
.seg-btn {
  flex: 1;
  height: 34px;
  border-radius: 9px;
  font-size: calc(13.5px * var(--fs));
  font-weight: 600;
  color: var(--muted);
  transition: all .18s;
}
.seg-btn.active {
  background: #fff;
  color: var(--ink);
  font-weight: 650;
  box-shadow: 0 1px 4px rgba(16, 24, 40, .1);
}

.lunar-pick { display: flex; gap: 8px; flex-wrap: wrap; }
.lunar-pick select {
  flex: 1;
  min-width: 0;
  height: 48px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #FBFBFC;
  padding: 0 12px;
  font-size: calc(15px * var(--fs));
  color: var(--ink);
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23B7BCC6' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 16px;
}
.lunar-hint {
  width: 100%;
  font-size: calc(11.5px * var(--fs));
  color: #9AA0AA;
  margin: 2px 2px 0;
}
.lunar-hint b { color: #B3795F; }

.field input.inline-check {
  appearance: none;
  -webkit-appearance: none;
  width: 52px !important;
  height: 30px !important;
  border-radius: 20px;
  background: #E4E7EB;
  position: relative;
  padding: 0 !important;
  border: none !important;
  box-shadow: none !important;
  cursor: pointer;
  transition: background .2s;
  margin: 9px 0;
  flex-shrink: 0;
}
.field input.inline-check::after {
  content: "";
  position: absolute;
  top: 3px; left: 3px;
  width: 24px; height: 24px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .18);
  transition: transform .22s cubic-bezier(.3, .9, .3, 1);
}
.field input.inline-check:checked { background: #EDA08A; }
.field input.inline-check:checked::after { transform: translateX(22px); }

.mini-note {
  font-size: calc(11.5px * var(--fs));
  color: #A7ADB8;
  line-height: 1.6;
  margin: 7px 2px 0;
}

/* 永久循环提示条 */
/* v52：循环横幅去填充色 */
.cycle-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, .05);
  border-radius: 18px;
  padding: 12px 14px;
  margin-bottom: 12px;
}
.cb-main { flex: 1; min-width: 0; }
.cb-title { font-size: calc(13px * var(--fs)); font-weight: 700; color: #B3795F; margin: 0 0 2px; }
.cb-sub { font-size: calc(11.5px * var(--fs)); color: #8A6A5B; margin: 0; line-height: 1.5; }
.cb-stop {
  font-size: calc(11.5px * var(--fs));
  color: #B3795F;
  background: #fff;
  border-radius: 10px;
  padding: 7px 12px;
  font-weight: 600;
  flex-shrink: 0;
}

/* 年月跳转弹窗 */
.picker-dialog { max-width: 340px; }
.picker-year {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin: -4px 0 14px;
}
.picker-year strong {
  font-size: calc(17px * var(--fs));
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.5px;
}
.picker-months {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}
.pm-btn {
  height: 46px;
  border-radius: 13px;
  background: #F4F5F7;
  font-size: calc(13.5px * var(--fs));
  color: var(--ink-2);
  transition: all .15s;
}
.pm-btn.active {
  background: #DE8F72;
  color: #fff;
  font-weight: 650;
  box-shadow: 0 6px 14px -8px rgba(237, 160, 138, .55);
}
.pm-btn:active { transform: scale(.96); }

/* ================= 启动闪屏（浅灰底 + 小图标，同截图样式） ================= */
.splash {
  position: fixed;
  inset: 0;
  z-index: 99;
  background: #EFEFEF;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 56px;
  transition: opacity .3s;
}
.splash.gone { opacity: 0; pointer-events: none; }
.splash-logo {
  width: 74px; height: 74px;
}
.splash-spin {
  width: 26px; height: 26px;
  border-radius: 50%;
  border: 3px solid #DEDEDE;
  border-top-color: #14161A;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ================= 近期日子 ================= */
.fest-card {
  background: #fff;
  border-radius: 20px;
  padding: 4px 16px 6px;
  margin-top: 12px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
}
.fest-title {
  font-size: calc(13px * var(--fs));
  font-weight: 600;
  color: var(--muted);
  padding: 12px 0 4px;
}
.fest-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}
.fest-row:last-child { border-bottom: none; }
.fest-name { min-width: 0; }
.fest-name strong { display: block; font-size: calc(15px * var(--fs)); font-weight: 650; letter-spacing: -.1px; }
.fest-name p { margin: 3px 0 0; font-size: calc(13px * var(--fs)); color: var(--muted); }
.fest-days {
  flex-shrink: 0;
  font-size: calc(15px * var(--fs));
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  color: var(--ink-2);
}
.fest-days.term, .fest-days.fest, .fest-days.world { color: #C08265; }



/* ================= 天气条 ================= */
.weather-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  background: #fff;
  border-radius: 16px;
  padding: 11px 15px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
}
.weather-bar .wi { font-size: calc(17px * var(--fs)); line-height: 1; }
.weather-bar .wt { font-size: calc(17px * var(--fs)); font-weight: 700; letter-spacing: -.3px; }
.weather-bar .wr { font-size: calc(11.5px * var(--fs)); color: var(--ink-2); }
.weather-bar .wc { font-size: calc(11.5px * var(--fs)); color: var(--muted); margin-left: auto; }

/* 顶栏固定：不参与内容重排 */
.topbar { will-change: transform; }
.topbar-title { animation: none; }

/* ================= v9：顶栏加号 / 左滑删除 / 日内面板 ================= */
.topbar-right { display: flex; align-items: center; gap: 8px; }
/* v50：排班 / 大事记子页顶栏返回按钮 */
.topbar-left { display: flex; align-items: center; gap: 6px; }
.topbar-back {
  width: 34px; height: 34px;
  border-radius: 12px;
  background: #F4F5F7;
  display: grid; place-items: center;
  transition: transform .16s, background .2s;
}
.topbar-back:active { transform: scale(.93); background: #EBEDF0; }
.topbar-back svg { width: 16px; height: 16px; fill: none; stroke: var(--ink); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
/* v53：顶栏加号去黑底，纯黑加号 */
.topbar-add {
  width: 38px; height: 38px;
  border-radius: 13px;
  background: transparent;
  display: grid; place-items: center;
  box-shadow: none;
  transition: transform .16s, opacity .2s;
}
.topbar-add:active { transform: scale(.93); }
/* v135②：顶栏图标是附属件，必须小于 17px 主体标题——统一 19/18px（点击热区仍 38px） */
.topbar-add svg { width: 16px; height: 16px; fill: none; stroke: var(--ink); stroke-width: 2.2; stroke-linecap: round; }

.field-tip { font-style: normal; font-size: calc(10.5px * var(--fs)); color: #A7ADB8; margin-left: 4px; }
.link-row.slim { font-size: calc(11.5px * var(--fs)); padding: 9px; margin: 8px 0 12px; background: #F7F8FA; color: var(--ink-2); }

/* 左滑删除 */
.swipe-wrap {
  position: relative;
  overflow: hidden;
  border-radius: 17px;
  background: #CE8A6D;
}
.swipe-actions {
  position: absolute;
  top: 0; right: 0; bottom: 0;
  display: flex;
  align-items: stretch;
}
.swipe-del {
  width: 80px;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: calc(13.5px * var(--fs));
  font-weight: 600;
  letter-spacing: .5px;
}
.swipe-body {
  position: relative;
  z-index: 1;
  transition: transform .24s cubic-bezier(.25, .9, .3, 1);
  touch-action: pan-y;
  will-change: transform;
}
.swipe-body .event-item { box-shadow: none; }
.swipe-hint { font-size: calc(11.5px * var(--fs)); color: #B3B8C2; text-align: center; padding: 18px 0 6px; }

/* 日历下方的「当天详情」面板 */
.today-card { padding: 16px 16px 8px; }
.dp-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.dp-add {
  flex-shrink: 0;
  font-size: calc(13px * var(--fs));
  font-weight: 600;
  color: #B3795F;
  background: #FFF1EB;
  padding: 6px 11px;
  border-radius: 10px;
}
.dp-add:active { transform: scale(.96); }
.dp-sec {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 11px 0 10px;
  border-top: 1px solid var(--line);
  margin-top: 11px;
}
.dp-label {
  font-size: calc(13px * var(--fs));
  color: var(--muted);
  width: 34px;
  flex-shrink: 0;
}
.dp-shifts { display: flex; flex-wrap: wrap; gap: 6px; flex: 1; }
.chip.sm { padding: 8px 13px; font-size: calc(13.5px * var(--fs)); border-radius: 11px; gap: 5px; }
.chip.sm i { width: 6px; height: 6px; }
.dp-events { display: flex; flex-direction: column; gap: 7px; flex: 1; min-width: 0; }
.dp-empty { font-size: calc(13px * var(--fs)); color: #B3B8C2; padding: 2px 0 4px; }
.de-row { background: #F8F9FA; }
.bday-age {
  font-size: calc(10.5px * var(--fs));
  font-weight: 600;
  color: #59606E;
  background: #EFF1F4;
  border-radius: 6px;
  padding: 1px 5px;
  margin-left: 6px;
  vertical-align: 1px;
}
.name-flags { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 3px; }

/* v9 补充 */
.event-list .swipe-wrap { box-shadow: 0 1px 2px rgba(16, 24, 40, .03); }
.ev-flag.bday { background: #EFF1F4; color: #59606E; }
.sound-note { font-size: calc(11.5px * var(--fs)); color: #A7ADB8; }
.swipe-body, .swipe-del { -webkit-user-select: none; user-select: none; }

/* ================= v10：设置 / 头像 / 日期滚轮 ================= */
.profile-tap { width: 100%; text-align: left; position: relative; }
.profile-tap .chev { position: absolute; right: 18px; top: 50%; transform: translateY(-50%); }
.avatar.big { width: 68px; height: 68px; border-radius: 24px; font-size: calc(17px * var(--fs)); margin: 0 auto; }
.avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; display: block; }
.pe-preview { display: flex; justify-content: center; padding: 4px 0 16px; }
.emoji-row { display: flex; flex-wrap: wrap; gap: 8px; }
.emoji-opt {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  font-size: calc(17px * var(--fs));
  border-radius: 12px;
  background: #F4F5F7;
  transition: all .15s;
}
.emoji-opt.active { background: #14161A; box-shadow: 0 0 0 2px var(--ink); }

/* 设置页（全屏页面，从右侧滑入） */
.settings-page {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  transform: translate3d(100%, 0, 0);
  transition: transform .3s cubic-bezier(.32, .72, 0, 1);
  will-change: transform;
}
.settings-page.show { transform: translate3d(0, 0, 0); }
.set-topbar {
  flex-shrink: 0;
  display: grid;
  grid-template-columns: 48px 1fr 48px;
  align-items: center;
  padding: calc(env(safe-area-inset-top, 0px) + 22px) 10px 12px;
  background: var(--bg);
  position: relative;
}
.set-topbar h1 {
  margin: 0;
  font-size: calc(17px * var(--fs));
  font-weight: 650;
  text-align: center;
  letter-spacing: -.2px;
 flex-shrink: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.back-btn {
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border-radius: 12px;
}
.back-btn:active { background: #E8EAEE; }
.back-btn svg {
  width: 22px; height: 22px;
  fill: none; stroke: var(--ink); stroke-width: 2.2;
  stroke-linecap: round; stroke-linejoin: round;
}
.set-topbar-fill { display: block; }
.set-scroll {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  overflow-anchor: none;
  padding: 2px 16px calc(30px + env(safe-area-inset-bottom));
}
.set-group-label { font-size: calc(11.5px * var(--fs)); color: var(--muted); margin: 14px 4px 7px; letter-spacing: .4px; }
.set-panel { background: #fff; border-radius: 18px; padding: 2px 14px; box-shadow: 0 1px 2px rgba(16,24,40,.04); border: 1px solid var(--line); }
.set-panel .row { padding: 13px 0; }
.set-panel .switch-row { padding: 12px 0; margin: 0; border-bottom: 1px solid var(--line); }
.set-panel .switch-row:last-child, .set-panel .row:last-child { border-bottom: none; }
.seg.sm { display: flex; gap: 3px; background: #EAECEF; border-radius: 12px; padding: 3px; margin: 0; }
.seg.sm .seg-btn { height: 30px; min-width: 58px; padding: 0 10px; border-radius: 9px; font-size: calc(13px * var(--fs)); flex: none; }
.def-remind { padding: 12px 0; border-bottom: 1px solid var(--line); }
.set-mini-label { display: block; font-size: calc(13px * var(--fs)); color: var(--ink-2); margin-bottom: 8px; }

/* 日期显示按钮 + 滚轮 */
.date-display {
  width: 100%;
  height: 48px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #FBFBFC;
  padding: 0 15px;
  font-size: calc(15px * var(--fs));
  color: var(--ink);
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.date-display::after {
  content: "";
  width: 15px; height: 15px;
  flex-shrink: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23B7BCC6' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-size: contain; background-repeat: no-repeat;
}
.lunar-pick .date-display { margin-bottom: 2px; }
.wheel-dialog { max-width: 360px; }
.wheel-box {
  position: relative;
  display: flex;
  gap: 4px;
  height: 212px;
  border-radius: 16px;
  background: #F5F6F8;
  padding: 0 6px;
  overflow: hidden;
}
.wheel-box::before {
  content: "";
  position: absolute;
  left: 6px; right: 6px;
  top: 86px;
  height: 40px;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 1px 4px rgba(16, 24, 40, .08);
  pointer-events: none;
  z-index: 2;
}
.wheel-col {
  flex: 1;
  overflow-y: auto;
  scroll-snap-type: y mandatory;
  position: relative;
  z-index: 3;
  scrollbar-width: none;
}
.wheel-col::-webkit-scrollbar { display: none; }
.wheel-items { padding: 86px 0; }
.wheel-item {
  height: 40px;
  line-height: 40px;
  text-align: center;
  font-size: calc(13.5px * var(--fs));
  color: #9AA0AA;
  scroll-snap-align: center;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.wheel-item.cur { color: var(--ink); font-weight: 650; font-size: calc(17px * var(--fs)); }
.wheel-col-ymd .wheel-item { font-size: calc(13.5px * var(--fs)); }

/* 日历设置联动 */
.cal-card.hide-lunar .day .lunar { visibility: hidden; }
.cal-card.show-wnum .week-row { grid-template-columns: 20px repeat(7, 1fr); }
.cal-card.show-wnum .weekdays { grid-template-columns: 20px repeat(7, 1fr); }
.cal-card.show-wnum .weekdays .wnum-head { display: block; }
.weekdays .wnum-head { display: none; font-size: calc(10.5px * var(--fs)); color: #C3C7CF; text-align: center; }
.wnum {
  font-size: calc(10.5px * var(--fs));
  color: #C3C7CF;
  text-align: center;
  padding-top: 5px;
  font-variant-numeric: tabular-nums;
}

/* v12：日历滑动性能 */
#calGrid { will-change: transform, opacity; }

/* v14：类型圆点 / 添加按钮 / 铃声列表 */
.cat { display: inline-flex; align-items: center; gap: 5px; }
.cat i { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.cat.cat-add {
  border: 1.5px dashed #C9CDD4;
  background: transparent;
  color: #9AA0AA;
  font-size: calc(13.5px * var(--fs));
  padding: 8px 11px;
}
.cat.cat-add:active { background: #EDEFF2; }
.mini-chip.custom {
  background: #FFF3EC;
  color: #B3795F;
  border: 1px dashed #F0B49A;
}
.mini-chip.custom.active {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}
.hint-birth { color: #B3795F; font-weight: 500; margin-left: 4px; }

/* ================= v15：日历通栏铺满 / 黄历宜忌 / 弹窗开关与删除 ================= */
/* 日历去边框：整块通栏铺满，像系统日历 */
#view-calendar .cal-card {
  background: var(--card);
  margin: -4px -16px 0;
  border-radius: 0;
  box-shadow: none;
  padding: 8px 8px 4px;
}

/* 黄历：农历日高亮 + 干支一行 + 宜忌 */
.tc-lunar b { color: #C08265; font-weight: 650; font-size: calc(15px * var(--fs)); margin-right: 3px; letter-spacing: .2px; }
.tc-yiji {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  padding: 10px 12px;
  margin-bottom: 13px;
  border-radius: 14px;
  background: #F7F8FA;
}
.yj-tag {
  font-size: calc(11.5px * var(--fs));
  font-weight: 700;
  width: 21px; height: 21px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.yj-tag.yi { background: #C08265; color: #fff; }
.yj-tag.ji { background: #9AA0AA; color: #fff; margin-left: 10px; }
.yj-items { font-size: calc(13px * var(--fs)); color: #565C66; letter-spacing: .3px; }

/* 弹窗里的「加入手机日历」开关行 */
.ics-row { border-top: 1px solid var(--line); margin-top: 4px; }

/* 弹窗左下角红色删除按钮 */
.btn-danger-left {
  margin-right: auto;
  flex: 1;
  height: 50px;
  border-radius: 15px;
  background: #FDF8F5;
  color: #B3795F;
  font-size: calc(15px * var(--fs));
  font-weight: 600;
  transition: transform .15s;
}
.btn-danger-left:active { transform: scale(.97); }
.btn-danger-left.hidden { display: none; }

/* ================= v16：星座说明 ================= */
.tc-zodiac {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 11px 12px;
  margin-bottom: 14px;
  border-radius: 14px;
  background: #F7F8FA;
}
.zodiac-sym {
  font-size: calc(17px * var(--fs));
  line-height: 1.1;
  color: #9AA0AA;
  flex-shrink: 0;
  transform: translateY(-1px);
}
.zodiac-main { flex: 1; min-width: 0; }
.zodiac-top { display: flex; align-items: baseline; gap: 7px; flex-wrap: wrap; }
.zodiac-name { font-size: calc(15px * var(--fs)); font-weight: 650; color: var(--ink); letter-spacing: .2px; }
.zodiac-range { font-size: calc(11.5px * var(--fs)); color: var(--muted); font-variant-numeric: tabular-nums; }
.zodiac-desc { font-size: calc(13px * var(--fs)); line-height: 1.5; color: #565C66; margin: 4px 0 0; }
.zodiac-next {
  flex-shrink: 0;
  font-size: calc(10.5px * var(--fs));
  color: #59606E;
  background: #EFF1F4;
  border-radius: 7px;
  padding: 3px 7px;
  white-space: nowrap;
  align-self: center;
}

/* ================= v21：字体设置 / 详情页 / 可点提示 ================= */
/* 设置页：竖排开关行（字号、字重） */
.switch-row.col {
  flex-direction: column;
  align-items: stretch;
  gap: 9px;
  padding: 13px 0;
}
.switch-row.col > span { display: block; }
.font-preview {
  margin: 2px 0 16px;
  padding: 13px 14px;
  border-radius: 14px;
  background: #F7F8FA;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.font-preview b { font-size: calc(17px * var(--fs)); font-weight: 700; }
.font-preview span { font-size: calc(13px * var(--fs)); color: var(--muted); }

/* 宜忌 / 星座块：可点开 */
.tc-yiji, .tc-zodiac { cursor: pointer; transition: background .16s, transform .12s; }
.tc-yiji:active, .tc-zodiac:active { transform: scale(.985); }
.yj-chev { margin-left: auto; font-size: calc(17px * var(--fs)); color: #C4C9D2; flex-shrink: 0; line-height: 1; }
.zodiac-chev { font-size: calc(17px * var(--fs)); color: #C4C9D2; flex-shrink: 0; align-self: center; margin: 0 -2px 0 -1px; }

/* 详情页 */
.dt-hero {
  background: #fff;
  border-radius: 20px;
  padding: 16px 16px 15px;
  margin-bottom: 12px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
}
.dt-date { margin: 0 0 5px; font-size: calc(13px * var(--fs)); color: var(--muted); }
.dt-lunar { margin: 0 0 11px; font-size: calc(15px * var(--fs)); font-weight: 650; }
.dt-zsign { display: flex; align-items: center; gap: 9px; margin-bottom: 7px; }
.dt-sym { font-size: calc(17px * var(--fs)); color: #59606E; line-height: 1; }
.dt-zsign b { font-size: calc(17px * var(--fs)); font-weight: 700; letter-spacing: -.2px; }
.dt-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.dt-badges span {
  font-size: calc(11.5px * var(--fs));
  color: #59606E;
  background: #F1F2F4;
  border-radius: 8px;
  padding: 4px 9px;
}
.dt-sec-title {
  margin: 0 0 10px;
  font-size: calc(13px * var(--fs));
  font-weight: 650;
  color: var(--ink-2);
  display: flex;
  align-items: center;
  gap: 7px;
}
.dt-text { margin: 0 0 7px; font-size: calc(13.5px * var(--fs)); line-height: 1.65; color: #4A505A; }
.dt-text:last-child { margin-bottom: 0; }
.dt-list { margin: 0; padding-left: 18px; font-size: calc(13.5px * var(--fs)); line-height: 1.85; color: #4A505A; }
.dt-tags { display: flex; flex-wrap: wrap; gap: 7px; }
.dt-tag { font-size: calc(13px * var(--fs)); padding: 5px 11px; border-radius: 9px; background: #F1F2F4; color: #4A505A; }
.dt-tag.bad { background: #FAFAFB; color: #6B7280; }
.yj-list { display: flex; flex-direction: column; }
.yj-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
}
.yj-item:last-child { border-bottom: none; }
.yj-dot {
  width: 21px; height: 21px;
  border-radius: 7px;
  font-size: calc(11.5px * var(--fs));
  font-weight: 700;
  color: #fff;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  margin-top: 1px;
}
.yj-item.yi .yj-dot { background: #C08265; }
.yj-item.ji .yj-dot { background: #9AA0AA; }
.yj-item b { display: block; font-size: calc(13.5px * var(--fs)); font-weight: 600; }
.yj-item em { font-style: normal; font-size: calc(13px * var(--fs)); color: var(--muted); }

/* ================= 字体缩放：全局字号倍率 ================= */
html { --fs: 1.08; }
html[data-fs="s"]  { --fs: 1; }
html[data-fs="m"]  { --fs: 1.08; }
html[data-fs="l"]  { --fs: 1.17; }
html[data-fs="xl"] { --fs: 1.28; }
/* v54：细 / 极细 */
html[data-fw="lt"] body,
html[data-fw="lt"] button,
html[data-fw="lt"] input,
html[data-fw="lt"] textarea,
html[data-fw="lt"] select {
  font-weight: 300;
}
html[data-fw="lt"] b,
html[data-fw="lt"] strong,
html[data-fw="lt"] h1, html[data-fw="lt"] h2, html[data-fw="lt"] h3, html[data-fw="lt"] h4 {
  font-weight: 400;
}
html[data-fw="xl"] body,
html[data-fw="xl"] button,
html[data-fw="xl"] input,
html[data-fw="xl"] textarea,
html[data-fw="xl"] select {
  font-weight: 200;
}
html[data-fw="xl"] b,
html[data-fw="xl"] strong,
html[data-fw="xl"] h1, html[data-fw="xl"] h2, html[data-fw="xl"] h3, html[data-fw="xl"] h4 {
  font-weight: 350;
}
html[data-fw="m"] body { -webkit-text-stroke: .3px currentColor; }
html[data-fw="b"] body { -webkit-text-stroke: .55px currentColor; }

/* 自动生成：字号按 --fs 缩放（随设置里的字号档位变化） */
.muted { font-size: calc(13px * var(--fs)); }
.brand h1 { font-size: calc(17px * var(--fs)); }
.brand-sub { font-size: calc(13px * var(--fs)); }
.auth-tab { font-size: calc(13.5px * var(--fs)); }
.field > span { font-size: calc(11.5px * var(--fs)); }
.field input { font-size: calc(15px * var(--fs)); }
.auth-error { font-size: calc(13px * var(--fs)); }
.btn-primary { font-size: calc(15px * var(--fs)); }
.auth-note { font-size: calc(11.5px * var(--fs)); }
.hello { font-size: calc(11.5px * var(--fs)); }
.topbar-title { font-size: calc(17px * var(--fs)); }
.sync-pill { font-size: calc(11.5px * var(--fs)); }
.cal-month { font-size: calc(17px * var(--fs)); }
.weekdays span { font-size: calc(11.5px * var(--fs)); }
.day .dnum { font-size: calc(17px * var(--fs)); }
.day .lunar { font-size: calc(10.5px * var(--fs)); }
.day .tag { font-size: calc(10.5px * var(--fs)); }
.leg { font-size: calc(11.5px * var(--fs)); }
.section-head h2 { font-size: calc(15px * var(--fs)); }
.text-btn { font-size: calc(13px * var(--fs)); }
.up-days strong { font-size: calc(17px * var(--fs)); }
.up-days span { font-size: calc(10.5px * var(--fs)); }
.up-main h3 { font-size: calc(15px * var(--fs)); }
.up-main p { font-size: calc(11.5px * var(--fs)); }
.empty-card { font-size: calc(13px * var(--fs)); }
.sum-cell strong { font-size: calc(17px * var(--fs)); }
.sum-cell span { font-size: calc(10.5px * var(--fs)); }
.panel-head h2 { font-size: calc(15px * var(--fs)); }
.hint { font-size: calc(11.5px * var(--fs)); }
.st-info h4 { font-size: calc(13.5px * var(--fs)); }
.st-info p { font-size: calc(11.5px * var(--fs)); }
.stat-name { font-size: calc(13px * var(--fs)); }
.stat-val { font-size: calc(13px * var(--fs)); }
.tool { font-size: calc(11.5px * var(--fs)); }
.cd-label { font-size: calc(11.5px * var(--fs)); }
.cd-num strong { font-size: calc(17px * var(--fs)); }
.cd-num span { font-size: calc(13px * var(--fs)); }
.cd-title { font-size: calc(15px * var(--fs)); }
.cd-date { font-size: calc(11.5px * var(--fs)); }
.cd-empty { font-size: calc(13px * var(--fs)); }
.ev-top h3 { font-size: calc(15px * var(--fs)); }
.ev-tag { font-size: calc(10.5px * var(--fs)); }
.ev-meta { font-size: calc(11.5px * var(--fs)); }
.ev-count { font-size: calc(13px * var(--fs)); }
.ev-del { font-size: calc(11.5px * var(--fs)); }
.avatar { font-size: calc(17px * var(--fs)); }
.profile h2 { font-size: calc(17px * var(--fs)); }
.metric strong { font-size: calc(17px * var(--fs)); }
.metric span { font-size: calc(10.5px * var(--fs)); }
.row { font-size: calc(13.5px * var(--fs)); }
.chev { font-size: calc(17px * var(--fs)); }
.footnote { font-size: calc(11.5px * var(--fs)); }
.tab span { font-size: calc(10.5px * var(--fs)); }
.sheet-head h2 { font-size: calc(17px * var(--fs)); }
.sheet-label { font-size: calc(13px * var(--fs)); }
.chip { font-size: calc(13px * var(--fs)); }
.de-main h4 { font-size: calc(13.5px * var(--fs)); }
.de-main p { font-size: calc(11.5px * var(--fs)); }
.de-empty { font-size: calc(13px * var(--fs)); }
.dialog h2 { font-size: calc(17px * var(--fs)); }
.btn-ghost { font-size: calc(15px * var(--fs)); }
.cat { font-size: calc(13px * var(--fs)); }
/* ================= Toast ================= */ .toast { font-size: calc(13px * var(--fs)); }
.cycle-entry-text strong { font-size: calc(15px * var(--fs)); }
.cycle-entry-text em { font-size: calc(11.5px * var(--fs)); }
.dlg-desc { font-size: calc(11.5px * var(--fs)); }
.mini-chip { font-size: calc(13px * var(--fs)); }
.seq-empty { font-size: calc(11.5px * var(--fs)); }
.seq-item { font-size: calc(11.5px * var(--fs)); }
.seq-item i { font-size: calc(10.5px * var(--fs)); }
.cy-preview { font-size: calc(11.5px * var(--fs)); }
.shift-picker .chip { font-size: calc(13px * var(--fs)); }
.switch-row > span { font-size: calc(13.5px * var(--fs)); }
.switch-row em { font-size: calc(10.5px * var(--fs)); }
.link-row { font-size: calc(13px * var(--fs)); }
.row-sub { font-size: calc(11.5px * var(--fs)); }
.reminder-main strong { font-size: calc(13.5px * var(--fs)); }
.reminder-main p { font-size: calc(11.5px * var(--fs)); }
.reminder-close { font-size: calc(11.5px * var(--fs)); }
.ev-flag { font-size: calc(10.5px * var(--fs)); }
.sheet-fest { font-size: calc(11.5px * var(--fs)); }
.tc-date { font-size: calc(17px * var(--fs)); }
.tc-week { font-size: calc(13px * var(--fs)); }
.tc-lunar { font-size: calc(13.5px * var(--fs)); }
.tc-chip { font-size: calc(13px * var(--fs)); }
.tc-empty { font-size: calc(13px * var(--fs)); }
.seg-btn { font-size: calc(13.5px * var(--fs)); }
.lunar-pick select { font-size: calc(15px * var(--fs)); }
.lunar-hint { font-size: calc(11.5px * var(--fs)); }
.mini-note { font-size: calc(11.5px * var(--fs)); }
.cb-title { font-size: calc(13px * var(--fs)); }
.cb-sub { font-size: calc(11.5px * var(--fs)); }
.cb-stop { font-size: calc(11.5px * var(--fs)); }
.picker-year strong { font-size: calc(17px * var(--fs)); }
.pm-btn { font-size: calc(13.5px * var(--fs)); }
.fest-title { font-size: calc(13px * var(--fs)); }
.fest-name strong { font-size: calc(15px * var(--fs)); }
.fest-name p { font-size: calc(13px * var(--fs)); }
.fest-days { font-size: calc(15px * var(--fs)); }
.weather-bar .wi { font-size: calc(17px * var(--fs)); }
.weather-bar .wt { font-size: calc(17px * var(--fs)); }
.weather-bar .wr { font-size: calc(11.5px * var(--fs)); }
.weather-bar .wc { font-size: calc(11.5px * var(--fs)); }
.field-tip { font-size: calc(10.5px * var(--fs)); }
.link-row.slim { font-size: calc(11.5px * var(--fs)); }
.swipe-del { font-size: calc(13.5px * var(--fs)); }
.swipe-hint { font-size: calc(11.5px * var(--fs)); }
.dp-add { font-size: calc(13px * var(--fs)); }
.dp-label { font-size: calc(13px * var(--fs)); }
.chip.sm { font-size: calc(13.5px * var(--fs)); }
.dp-empty { font-size: calc(13px * var(--fs)); }
.bday-age { font-size: calc(10.5px * var(--fs)); }
.sound-note { font-size: calc(11.5px * var(--fs)); }
.avatar.big { font-size: calc(17px * var(--fs)); }
.emoji-opt { font-size: calc(17px * var(--fs)); }
.set-topbar h1 { font-size: calc(17px * var(--fs)); }
.set-group-label { font-size: calc(11.5px * var(--fs)); }
.seg.sm .seg-btn { font-size: calc(13px * var(--fs)); }
.set-mini-label { font-size: calc(13px * var(--fs)); }
/* 日期显示按钮 + 滚轮 */ .date-display { font-size: calc(15px * var(--fs)); }
.wheel-item { font-size: calc(13.5px * var(--fs)); }
.wheel-item.cur { font-size: calc(17px * var(--fs)); }
.wheel-col-ymd .wheel-item { font-size: calc(13.5px * var(--fs)); }
.weekdays .wnum-head { font-size: calc(10.5px * var(--fs)); }
.wnum { font-size: calc(10.5px * var(--fs)); }
.cat.cat-add { font-size: calc(13.5px * var(--fs)); }
/* 黄历：农历日高亮 + 干支一行 + 宜忌 */ .tc-lunar b { font-size: calc(15px * var(--fs)); }
.yj-tag { font-size: calc(11.5px * var(--fs)); }
.yj-items { font-size: calc(13px * var(--fs)); }
/* 弹窗左下角红色删除按钮 */ .btn-danger-left { font-size: calc(15px * var(--fs)); }
.zodiac-sym { font-size: calc(17px * var(--fs)); }
.zodiac-name { font-size: calc(15px * var(--fs)); }
.zodiac-range { font-size: calc(11.5px * var(--fs)); }
.zodiac-desc { font-size: calc(13px * var(--fs)); }
.zodiac-next { font-size: calc(10.5px * var(--fs)); }
.font-preview b { font-size: calc(17px * var(--fs)); }
.font-preview span { font-size: calc(13px * var(--fs)); }
.yj-more { font-size: calc(11.5px * var(--fs)); }
.zodiac-chev { font-size: calc(17px * var(--fs)); }
.dt-date { font-size: calc(13px * var(--fs)); }
.dt-lunar { font-size: calc(15px * var(--fs)); }
.dt-sym { font-size: calc(17px * var(--fs)); }
.dt-zsign b { font-size: calc(17px * var(--fs)); }
.dt-badges span { font-size: calc(11.5px * var(--fs)); }
.dt-sec-title { font-size: calc(13px * var(--fs)); }
.dt-text { font-size: calc(13.5px * var(--fs)); }
.dt-list { font-size: calc(13.5px * var(--fs)); }
.dt-tag { font-size: calc(13px * var(--fs)); }
.yj-dot { font-size: calc(11.5px * var(--fs)); }
.yj-item b { font-size: calc(13.5px * var(--fs)); }
.yj-item em { font-size: calc(13px * var(--fs)); }

/* ================= v22：整月黄历 / 十二星座总览 ================= */
/* 月份切换条 */
.dt-monthbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fff;
  border-radius: 16px;
  padding: 6px;
  margin-bottom: 10px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
}
.mb-side { display: flex; align-items: center; gap: 2px; }
.mb-btn {
  min-width: 36px;
  height: 36px;
  padding: 0 4px;
  border-radius: 10px;
  font-size: calc(17px * var(--fs));
  line-height: 1;
  color: var(--ink-2);
  display: grid;
  place-items: center;
  letter-spacing: -1.5px;
}
.mb-btn:active { background: #F1F2F4; }
.mb-title { font-size: calc(15px * var(--fs)); font-weight: 650; letter-spacing: -.2px; }
.hy-tip { margin: 0 0 8px; padding-left: 4px; font-size: calc(11.5px * var(--fs)); color: #A7ADB8; }

/* 每日一行 */
.hy-list {
  background: #fff;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
}
.hy-day { border-bottom: 1px solid var(--line); }
.hy-day:last-child { border-bottom: none; }
.hy-day.sel { background: #FCFCFD; }
.hy-head {
  width: 100%;
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 12px 12px 12px 11px;
  text-align: left;
}
.hy-head:active { background: #F7F8FA; }
.hy-date {
  width: 42px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  padding-top: 1px;
}
.hy-date b {
  font-size: calc(17px * var(--fs));
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
  color: var(--ink);
}
.hy-date span { font-size: calc(10.5px * var(--fs)); color: #A7ADB8; }
.hy-day.today .hy-date b { color: var(--accent); }
.hy-day.today .hy-date span { color: var(--accent); opacity: .8; }
.hy-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.hy-line1 { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.hy-lunar { font-size: calc(13px * var(--fs)); font-weight: 600; color: var(--ink); }
.hy-gz { font-size: calc(11.5px * var(--fs)); color: #9AA0AA; }
.hy-officer {
  font-size: calc(10.5px * var(--fs));
  color: #59606E;
  background: #F1F2F4;
  border-radius: 6px;
  padding: 1px 6px;
}
.hy-tag { font-size: calc(10.5px * var(--fs)); border-radius: 6px; padding: 1px 6px; background: #F1F2F4; color: #59606E; }
.hy-tag.term { color: #B3795F; background: #FFF7F3; }
.hy-tag.fest { color: #B3795F; background: #FFF7F3; font-weight: 600; }
.hy-line2 { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.hy-lb { font-size: calc(10.5px * var(--fs)); font-weight: 700; width: 15px; flex-shrink: 0; text-align: center; }
.hy-lb.yi { color: #C08265; }
.hy-lb.ji { color: #9AA0AA; }
.yj-mini {
  font-size: calc(10.5px * var(--fs));
  padding: 2px 6px;
  border-radius: 6px;
  line-height: 1.3;
}
.yj-mini.yi { background: #FFF7F3; color: #B4571F; }
.yj-mini.ji { background: #F2F3F5; color: #7C838E; }
.hy-chev {
  flex-shrink: 0;
  font-size: calc(17px * var(--fs));
  color: #C4C9D2;
  align-self: center;
  transition: transform .22s;
}
.hy-day.open .hy-chev { transform: rotate(90deg); }
.hy-day.open .hy-head { background: #FCFCFD; }

/* 展开后的完整内容 */
.hy-full { display: none; padding: 0 12px 14px 64px; }
.hy-day.open .hy-full { display: block; }
.hy-badges { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 9px; }
.hy-badges span {
  font-size: calc(11.5px * var(--fs));
  color: #59606E;
  background: #F1F2F4;
  border-radius: 7px;
  padding: 3px 8px;
}
.hy-desc {
  margin: 0 0 12px;
  font-size: calc(13px * var(--fs));
  line-height: 1.6;
  color: #6B7280;
  background: #F7F8FA;
  border-radius: 10px;
  padding: 8px 10px;
}
.hy-full-sec { display: flex; gap: 8px; margin-bottom: 10px; }
.hy-full-sec:last-child { margin-bottom: 0; }
.hy-full-sec .yj-list { flex: 1; min-width: 0; }
.hy-full-sec .yj-item { padding: 6px 0; }
.hy-full-sec .yj-item .yj-dot { display: none; }
.hy-full-sec .yj-item b { font-size: calc(13px * var(--fs)); }
.hy-full-sec .yj-item em { font-size: calc(11.5px * var(--fs)); margin-left: 6px; }

/* 十二星座：简约列表 */
.zs-head { padding: 2px 4px 12px; }
.zs-cur { margin: 0 0 3px; font-size: calc(13.5px * var(--fs)); color: var(--ink-2); }
.zs-cur b { font-weight: 700; color: var(--ink); }
.zs-hint { margin: 0; font-size: calc(11.5px * var(--fs)); color: #A7ADB8; }
.zs-list {
  background: #fff;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
}
.zs-row {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 13px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}
.zs-row:last-child { border-bottom: none; }
.zs-row:active { background: #F7F8FA; }
.zs-sym {
  width: 34px;
  text-align: center;
  font-size: calc(17px * var(--fs));
  line-height: 1;
  color: #6B7280;
  flex-shrink: 0;
}
.zs-row.cur .zs-sym { color: var(--accent); }
.zs-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.zs-name { font-size: calc(15px * var(--fs)); font-weight: 650; letter-spacing: -.1px; display: flex; align-items: center; gap: 6px; }
.zs-now {
  font-style: normal;
  font-size: calc(10.5px * var(--fs));
  font-weight: 700;
  color: #fff;
  background: var(--accent);
  border-radius: 5px;
  padding: 1px 5px;
}
.zs-range { font-size: calc(11.5px * var(--fs)); color: #9AA0AA; font-variant-numeric: tabular-nums; }
.zs-chev { font-size: calc(17px * var(--fs)); color: #C9CDD4; flex-shrink: 0; }
.dt-back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: calc(13px * var(--fs));
  color: #6B7280;
  padding: 2px 4px 10px;
}

/* 单星座详情 */
.sg-hero {
  background: #fff;
  border-radius: 20px;
  padding: 18px 16px 16px;
  margin-bottom: 12px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
}
.sg-sym-wrap {
  width: 56px; height: 56px;
  border-radius: 18px;
  background: #F4F5F7;
  display: grid;
  place-items: center;
  margin-bottom: 11px;
}
.sg-sym { font-size: calc(17px * var(--fs)); line-height: 1; color: #4A505A; }
.sg-name { margin: 0; font-size: calc(17px * var(--fs)); font-weight: 700; letter-spacing: -.5px; display: flex; align-items: center; gap: 8px; }
.sg-now {
  font-style: normal;
  font-size: calc(10.5px * var(--fs));
  font-weight: 700;
  color: #fff;
  background: var(--accent);
  border-radius: 6px;
  padding: 2px 6px;
  letter-spacing: .3px;
}
.sg-en { margin: 3px 0 0; font-size: calc(11.5px * var(--fs)); color: #A7ADB8; letter-spacing: .4px; }
.sg-date { margin: 6px 0 0; font-size: calc(13px * var(--fs)); color: #6B7280; font-variant-numeric: tabular-nums; }
.sg-meta { display: flex; gap: 10px; margin: 14px 0 0; }
.sg-meta > div {
  flex: 1;
  background: #F7F8FA;
  border-radius: 12px;
  padding: 9px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.sg-meta b { font-size: calc(13.5px * var(--fs)); font-weight: 650; }
.sg-meta span { font-size: calc(10.5px * var(--fs)); color: #A7ADB8; }
.sg-intro {
  margin: 14px 0 0;
  font-size: calc(13.5px * var(--fs));
  line-height: 1.75;
  color: #4A505A;
}
.sg-card {
  background: #fff;
  border-radius: 18px;
  padding: 15px 16px;
  margin-bottom: 10px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
}
.sg-h3 {
  margin: 0 0 11px;
  font-size: calc(11.5px * var(--fs));
  font-weight: 650;
  color: #9AA0AA;
  letter-spacing: .6px;
}
.sg-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.sg-chips span {
  font-size: calc(13px * var(--fs));
  color: #4A505A;
  background: #F4F5F7;
  border-radius: 9px;
  padding: 5px 11px;
}
.sg-block { margin-bottom: 12px; }
.sg-block:last-child { margin-bottom: 0; }
.sg-block b { display: block; font-size: calc(13px * var(--fs)); font-weight: 650; color: var(--ink); margin-bottom: 3px; }
.sg-block p { margin: 0; font-size: calc(13px * var(--fs)); line-height: 1.7; color: #565C66; }
.sg-pc { display: flex; flex-direction: column; gap: 9px; }
.sg-plus, .sg-minus { display: flex; flex-wrap: wrap; gap: 6px; }
.sg-plus span, .sg-minus span {
  font-size: calc(11.5px * var(--fs));
  border-radius: 8px;
  padding: 4px 9px;
}
.sg-plus span { background: #FFF7F3; color: #B4571F; }
.sg-minus span { background: #F4F5F7; color: #7C838E; }
.sg-p { margin: 0 0 8px; font-size: calc(13px * var(--fs)); line-height: 1.7; color: #565C66; }
.sg-p:last-child { margin-bottom: 0; }
.sg-k {
  display: inline-block;
  font-size: calc(11.5px * var(--fs));
  font-weight: 700;
  color: #9AA0AA;
  background: #F4F5F7;
  border-radius: 6px;
  padding: 2px 7px;
  margin-right: 8px;
  vertical-align: 1px;
}
.sg-lucky {
  display: flex;
  background: #fff;
  border-radius: 18px;
  padding: 13px 6px;
  margin-bottom: 10px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
}
.sg-lucky > div {
  flex: 1;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 3px;
  border-right: 1px solid var(--line);
}
.sg-lucky > div:last-child { border-right: none; }
.sg-lucky span { font-size: calc(10.5px * var(--fs)); color: #A7ADB8; }
.sg-lucky b { font-size: calc(13.5px * var(--fs)); font-weight: 650; }

/* 新组件跟随字号设置 */
.hy-date b { font-size: calc(17px * var(--fs)); }
.hy-date span { font-size: calc(10.5px * var(--fs)); }
.hy-lunar { font-size: calc(13px * var(--fs)); }
.hy-gz { font-size: calc(11.5px * var(--fs)); }
.hy-officer, .hy-tag { font-size: calc(10.5px * var(--fs)); }
.yj-mini { font-size: calc(10.5px * var(--fs)); }
.hy-desc { font-size: calc(13px * var(--fs)); }
.mb-title { font-size: calc(15px * var(--fs)); }
.zs-name { font-size: calc(15px * var(--fs)); }
.zs-range { font-size: calc(11.5px * var(--fs)); }
.sg-name { font-size: calc(17px * var(--fs)); }
.sg-intro, .sg-block p, .sg-p { font-size: calc(13.5px * var(--fs)); }
.zs-cur { font-size: calc(13.5px * var(--fs)); }
.dt-lunar { font-size: calc(15px * var(--fs)); }
.dt-text { font-size: calc(13.5px * var(--fs)); }

/* ================= 笔记：记事本 / 日记本 ================= */
.nt-head { display: flex; align-items: center; gap: 8px; margin: 2px 0 10px; }
.nt-seg { flex: 1; margin: 0; background: #EAECEF; }
.nt-seg .seg-btn { color: var(--muted); }
.nt-seg .seg-btn.active { color: var(--ink); }
.nt-iconbtn {
  width: 40px; height: 40px; flex: none;
  display: grid; place-items: center;
  border-radius: 13px; background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
}
.nt-iconbtn svg {
  width: 19px; height: 19px; fill: none; stroke: var(--ink-2);
  stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round;
}
.nt-iconbtn:active { transform: scale(.94); }

/* 搜索 */
.nt-search {
  display: flex; align-items: center; gap: 7px;
  height: 42px; padding: 0 12px;
  background: #fff; border: 1px solid var(--line);
  border-radius: 14px; margin-bottom: 10px;
  transition: border-color .2s, box-shadow .2s;
}
.nt-search:focus-within { border-color: #FBDCCF; box-shadow: 0 0 0 3px rgba(237, 160, 138, .16); }
.nt-search svg {
  width: 17px; height: 17px; flex: none; fill: none; stroke: #AEB4BF;
  stroke-width: 1.9; stroke-linecap: round;
}
.nt-search input {
  flex: 1; min-width: 0; border: none; outline: none; background: none;
  font-size: calc(13.5px * var(--fs)); color: var(--ink);
}
.nt-search input::placeholder { color: #B4B9C2; }
.nt-search input::-webkit-search-cancel-button { display: none; }
.nt-clear {
  width: 20px; height: 20px; flex: none; border-radius: 50%;
  background: #E4E7EB; color: #8C93A0; font-size: calc(13.5px * var(--fs)); line-height: 1;
  display: grid; place-items: center;
}

/* 标签筛选条 */
.nt-tags {
  display: flex; gap: 7px; overflow-x: auto; padding: 1px 1px 10px;
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.nt-tags::-webkit-scrollbar { display: none; }
.nt-tagbtn {
  flex: none; height: 30px; padding: 0 13px; border-radius: 15px;
  background: #fff; border: 1px solid var(--line);
  font-size: calc(13px * var(--fs)); color: var(--ink-2);
  transition: all .18s;
}
.nt-tagbtn.active { background: var(--ink); border-color: var(--ink); color: #fff; font-weight: 600; }

/* 卡片列表：瀑布流 / 单列 */
.nt-grid { columns: 2; column-gap: 10px; }
.nt-grid.list { columns: 1; }

.nt-card {
  display: inline-block; width: 100%;
  break-inside: avoid; -webkit-column-break-inside: avoid;
  margin: 0 0 10px;
  padding: 13px 13px 11px;
  background: #fff; border: 1px solid var(--line);
  border-radius: 17px; text-align: left;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .035);
  transition: transform .16s ease, box-shadow .16s ease;
  position: relative;
}
.nt-card:active { transform: scale(.978); }
.nt-card.pinned { border-color: #FBE3D8; box-shadow: 0 1px 2px rgba(237, 160, 138, .18); }
.nt-card.tinted { border-color: transparent; }

.nt-card-top { display: flex; align-items: flex-start; gap: 6px; }
.nt-card-title {
  flex: 1; min-width: 0;
  font-size: calc(15px * var(--fs)); font-weight: 650; line-height: 1.4;
  color: var(--ink); margin: 0 0 4px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.nt-card-title.only { margin-bottom: 6px; }
.nt-pin-dot { width: 13px; height: 13px; flex: none; margin-top: 2px; }
.nt-pin-dot svg { width: 100%; height: 100%; fill: #EDA08A; }

.nt-card-body {
  font-size: calc(13px * var(--fs)); line-height: 1.62; color: #6B7280;
  margin: 0; white-space: pre-wrap; word-break: break-word;
  display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden;
}
.nt-grid.list .nt-card-body { -webkit-line-clamp: 3; }

.nt-card-todos { display: flex; flex-direction: column; gap: 5px; }
.nt-todo-line { display: flex; align-items: flex-start; gap: 7px; }
.nt-todo-line .box {
  width: 16px; height: 16px; flex: none; margin-top: 1px;
  border-radius: 5px; border: 1.6px solid #CFD4DC;
  display: grid; place-items: center;
  transition: all .16s;
}
.nt-todo-line.done .box { background: #EDA08A; border-color: #EDA08A; }
.nt-todo-line .box svg { width: 10px; height: 10px; fill: none; stroke: #6B3D2A; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; opacity: 0; transition: opacity .16s; }
.nt-todo-line.done .box svg { opacity: 1; }
.nt-todo-line .txt {
  font-size: calc(13px * var(--fs)); line-height: 1.5; color: #4B5563;
  word-break: break-word;
}
.nt-todo-line.done .txt { color: #AEB4BF; text-decoration: line-through; }

.nt-card-meta {
  display: flex; align-items: center; gap: 6px; margin-top: 9px;
  font-size: calc(10.5px * var(--fs)); color: #A9AFB9;
}
.nt-card-tag {
  padding: 2px 7px; border-radius: 8px;
  background: #F3F4F6; color: #7C8391; font-size: calc(10.5px * var(--fs));
}
.nt-card-meta .sp { flex: 1; }
.nt-more-count { font-size: calc(10.5px * var(--fs)); color: #A9AFB9; }

/* 空状态 */
.nt-empty { text-align: center; padding: 54px 24px 30px; }
.nt-empty svg { width: 52px; height: 52px; fill: none; stroke: #D8DCE2; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 12px; }
.nt-empty p { margin: 0; font-size: calc(13px * var(--fs)); color: #A9AFB9; line-height: 1.7; }
.nt-empty b { display: block; font-size: calc(15px * var(--fs)); color: var(--ink-2); font-weight: 600; margin-bottom: 5px; }
.nt-tip { text-align: center; font-size: calc(11.5px * var(--fs)); color: #B6BBC4; margin: 6px 0 0; }
.nt-tip.hide { display: none; }

/* 新建按钮已移到顶栏加号（固定不浮动），此处仅保留页头紧凑间距 */
.nt-head { padding-right: 2px; }

/* ===== 长按操作 ===== */
#ntActionMask {
  position: fixed; inset: 0; z-index: 70;
  background: rgba(12, 14, 18, .34);
  display: flex; align-items: flex-end; justify-content: center;
  animation: maskIn .18s ease;
}
.nt-action-sheet {
  width: 100%; max-width: 460px;
  background: #fff; border-radius: 22px 22px 0 0;
  padding: 8px 12px calc(14px + var(--safe-b));
  animation: sheetUp .24s cubic-bezier(.3, .9, .3, 1);
}
@keyframes sheetUp { from { transform: translateY(30px); opacity: .6; } }
.nt-action-sheet p.ac-title {
  margin: 6px 6px 4px; font-size: calc(11.5px * var(--fs)); color: var(--muted);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.nt-act {
  width: 100%; display: flex; align-items: center; gap: 10px;
  padding: 15px 8px; border-radius: 14px; text-align: left;
  font-size: calc(15px * var(--fs)); color: var(--ink);
}
.nt-act:active { background: #F4F5F7; }
.nt-act svg { width: 19px; height: 19px; fill: none; stroke: #6B7280; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.nt-act.danger { color: #B3795F; }
.nt-act.danger svg { stroke: #B3795F; }
.nt-act-cancel {
  width: 100%; margin-top: 6px; height: 50px; border-radius: 14px;
  background: #F4F5F7; color: var(--ink-2); font-size: calc(15px * var(--fs)); font-weight: 600;
}

/* ===== 记事编辑页 ===== */
.nt-done {
  justify-self: end; padding: 0 6px; height: 44px;
  font-size: calc(15px * var(--fs)); font-weight: 650; color: var(--ink);
}
/* v55：保存中转圈 */
.btn-spin {
  display: inline-block;
  width: 16px; height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(20, 22, 26, .22);
  border-top-color: var(--ink);
  animation: btnspin .7s linear infinite;
}
@keyframes btnspin { to { transform: rotate(360deg); } }
.nt-title-in {
  width: 100%; border: none; outline: none; background: none;
  font-size: calc(17px * var(--fs)); font-weight: 700; color: var(--ink);
  padding: 12px 2px 6px; letter-spacing: -.2px;
}
.nt-title-in::placeholder { color: #C3C8D0; font-weight: 600; }

.nt-typebar { display: flex; gap: 6px; padding: 2px 0 8px; }
.nt-tbtn {
  height: 29px; padding: 0 13px; border-radius: 15px;
  font-size: calc(11.5px * var(--fs)); color: var(--ink-2);
  background: #fff; border: 1px solid var(--line);
}
.nt-tbtn.active { background: #FFF7F3; border-color: #F9DCCF; color: #C08265; font-weight: 650; }

.nt-body-in {
  width: 100%; border: none; outline: none; background: none;
  font-size: calc(15px * var(--fs)); line-height: 1.78; color: var(--ink-2);
  min-height: 110px; padding: 4px 2px 12px; font-family: inherit;
  overflow: visible; -webkit-tap-highlight-color: transparent;
}
.nt-body-in::placeholder { color: #C3C8D0; }
.dy-body { min-height: 150px; }
/* v57：contentEditable 富文本 */
.nt-rt:empty::before { content: attr(data-placeholder); color: #C3C8D0; pointer-events: none; }
.nt-rt:focus { outline: none; }
.nt-rt p, .nt-rt div { margin: 0; }
.nt-rt h3 { font-size: calc(17px * var(--fs)); font-weight: 700; margin: 10px 0 2px; color: var(--ink); }
.nt-rt ul { margin: 4px 0 4px 22px; padding: 0; }
.nt-rt li { margin: 2px 0; }
.nt-rt blockquote { border-left: 3px solid #EDA08A; margin: 6px 0; padding: 2px 10px; color: #6E7681; background: #FFF9F6; border-radius: 0 8px 8px 0; }
.nt-rt b, .nt-rt strong { font-weight: 700; }

.nt-todos { display: flex; flex-direction: column; }
.nt-todo-row { display: flex; align-items: flex-start; gap: 10px; padding: 9px 2px; border-bottom: 1px solid #F4F5F7; }
.nt-todo-row:last-child { border-bottom: none; }
.nt-todo-box {
  width: 21px; height: 21px; flex: none; margin-top: 1px;
  border-radius: 7px; border: 1.8px solid #D3D8DF; background: #fff;
  display: grid; place-items: center; transition: all .16s;
}
.nt-todo-box svg { width: 12px; height: 12px; fill: none; stroke: #6B3D2A; stroke-width: 2.8; stroke-linecap: round; stroke-linejoin: round; opacity: 0; }
.nt-todo-row.done .nt-todo-box { background: #EDA08A; border-color: #EDA08A; }
.nt-todo-row.done .nt-todo-box svg { opacity: 1; }
.nt-todo-row input {
  flex: 1; min-width: 0; border: none; outline: none; background: none;
  font-size: calc(15px * var(--fs)); line-height: 1.55; color: var(--ink-2);
  padding: 1px 0; font-family: inherit;
}
.nt-todo-row.done input { color: #AEB4BF; text-decoration: line-through; }
.nt-todo-x { width: 26px; height: 26px; flex: none; display: grid; place-items: center; border-radius: 8px; color: #C6CAD2; font-size: calc(17px * var(--fs)); }
.nt-todo-x:active { background: #F4F5F7; }
.nt-addtodo {
  width: 100%; text-align: left; padding: 12px 2px;
  font-size: calc(13.5px * var(--fs)); color: var(--accent); font-weight: 600;
}

.nt-meta {
  margin-top: 18px; background: #fff; border: 1px solid var(--line);
  border-radius: 18px; padding: 2px 14px;
}
.nt-mrow { display: flex; align-items: center; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.nt-mrow.col { display: block; }
.nt-mrow:last-of-type { border-bottom: none; }
.nt-mlabel { font-size: calc(13px * var(--fs)); color: var(--ink-2); flex: none; display: block; }
.nt-mrow.col .nt-mlabel { margin-bottom: 9px; }
.nt-mrow .chip-row { gap: 7px; }
.nt-colors { display: flex; gap: 10px; }
.nt-color {
  width: 28px; height: 28px; border-radius: 10px;
  border: 1.5px solid #E3E6EA; position: relative;
}
.nt-color.on { box-shadow: 0 0 0 2px #fff, 0 0 0 3.6px #DE8F72; }
.nt-color.none { background: #fff; }
.nt-color.none::after {
  content: ""; position: absolute; inset: 6px;
  border-radius: 4px; background: #EDEFF2;
}
.nt-pinrow { border-bottom: none !important; padding: 13px 0 !important; }
.nt-edtime { font-size: calc(11.5px * var(--fs)); color: #B6BBC4; text-align: center; margin: 16px 0 0; }
.nt-del {
  width: 100%; height: 50px; margin: 16px 0 10px;
  border-radius: 15px; background: #FDF8F5; color: #B3795F;
  font-size: calc(15px * var(--fs)); font-weight: 600;
}
.nt-del:active { background: #F9EFE8; }

/* ===== 日记 ===== */
.dy-today {
  width: 100%; text-align: left; position: relative; overflow: hidden;
  background: #fff;
  border-radius: 20px; padding: 16px 16px 15px; margin-bottom: 16px;
  border: 1px solid rgba(0, 0, 0, .05);
}
.dy-today-top { display: flex; align-items: baseline; gap: 8px; }
.dy-today-top b { font-size: calc(17px * var(--fs)); font-weight: 750; color: #B3795F; letter-spacing: -.5px; }
.dy-today-top span { font-size: calc(11.5px * var(--fs)); color: #B4735A; }
.dy-today-lunar { font-size: calc(11.5px * var(--fs)); color: #BE8A76; margin: 5px 0 0; }
.dy-today-line {
  display: flex; align-items: center; gap: 6px; margin-top: 11px;
  padding-top: 11px; border-top: 1px solid rgba(179, 121, 95, .13);
  font-size: calc(13px * var(--fs)); color: #A9603F;
}
.dy-today-line .em { font-size: calc(15px * var(--fs)); }
.dy-today-line .go { margin-left: auto; font-size: calc(11.5px * var(--fs)); color: #C98B70; }
.dy-today-line .go::after { content: " ›"; }

.dy-month {
  font-size: calc(11.5px * var(--fs)); color: var(--muted); font-weight: 650;
  margin: 18px 2px 9px; letter-spacing: .3px;
}
.dy-item {
  width: 100%; display: flex; gap: 12px; text-align: left;
  background: #fff; border: 1px solid var(--line); border-radius: 18px;
  padding: 13px 14px; margin-bottom: 9px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .035);
  transition: transform .16s;
}
.dy-item:active { transform: scale(.985); }
.dy-daybox { flex: none; width: 42px; text-align: center; padding-top: 1px; }
.dy-daybox b { display: block; font-size: calc(17px * var(--fs)); font-weight: 700; color: var(--ink); line-height: 1.1; font-variant-numeric: tabular-nums; }
.dy-daybox span { display: block; font-size: calc(10.5px * var(--fs)); color: #AFB5BE; margin-top: 3px; }
.dy-bodybox { flex: 1; min-width: 0; }
.dy-item-title {
  font-size: calc(13.5px * var(--fs)); font-weight: 650; color: var(--ink); margin: 0 0 3px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.dy-item-text {
  font-size: calc(13px * var(--fs)); line-height: 1.6; color: #6B7280; margin: 0;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  white-space: pre-wrap; word-break: break-word;
}
.dy-item-foot { display: flex; align-items: center; gap: 6px; margin-top: 7px; font-size: calc(10.5px * var(--fs)); color: #AEB4BF; }
.dy-item-foot .em { font-size: calc(13px * var(--fs)); }
.dy-item-foot .dot { width: 2px; height: 2px; border-radius: 50%; background: #D3D7DE; }

/* 日记编辑 */
.dy-datecard {
  display: flex; align-items: center; gap: 12px;
  background: #fff; border: 1px solid var(--line); border-radius: 18px;
  padding: 13px 14px; margin: 6px 0 0;
}
.dy-dateleft { display: flex; align-items: center; gap: 12px; flex: 1; }
.dy-dateleft strong { font-size: calc(17px * var(--fs)); font-weight: 750; color: var(--ink); line-height: 1; letter-spacing: -1px; }
.dy-datemonth { margin: 0; font-size: calc(13px * var(--fs)); color: var(--ink-2); font-weight: 600; }
.dy-dateweek { margin: 2px 0 0; font-size: calc(11.5px * var(--fs)); color: var(--muted); }
.dy-datebtn {
  flex: none; height: 32px; padding: 0 13px; border-radius: 11px;
  background: #F5F6F8; color: var(--ink-2); font-size: calc(11.5px * var(--fs)); font-weight: 600;
}
.dy-lunar { font-size: calc(11.5px * var(--fs)); color: #A9AFB9; margin: 8px 4px 2px; }
.dy-block { padding: 14px 0 4px !important; }
.mood-row { display: flex; gap: 8px; flex-wrap: wrap; }
.mood-btn {
  width: 52px; height: 52px; border-radius: 16px; background: #fff;
  border: 1px solid var(--line); display: grid; place-items: center; gap: 0;
  font-size: calc(17px * var(--fs)); line-height: 1;
  transition: all .16s;
}
.mood-btn small { font-size: calc(10.5px * var(--fs)); color: #A9AFB9; margin-top: 2px; }
.mood-btn.on { background: #FFF9F5; border-color: #F9DCCF; }
.mood-btn.on small { color: #B3795F; }
.dy-count { text-align: right; font-size: calc(11.5px * var(--fs)); color: #BFC4CC; margin: 0 4px 0; }
.dy-body { margin-top: 4px; }

/* ===== 记事卡片：左滑删除改造 ===== */
.nt-grid .swipe-wrap {
  display: inline-block;
  width: 100%;
  break-inside: avoid;
  -webkit-column-break-inside: avoid;
  margin: 0 0 10px;
  background: #CE8A6D;
  box-shadow: none;
  touch-action: pan-y;
}
.nt-grid .swipe-wrap .nt-card {
  margin: 0;
  display: block;
  box-shadow: none;
  border-radius: 17px;
  touch-action: pan-y;
}
.nt-grid .swipe-wrap .nt-card:active { transform: none; }
.nt-grid .swipe-wrap .swipe-del {
  width: 76px;
  font-size: calc(13px * var(--fs));
  letter-spacing: .5px;
}

/* 标签数量 / 新建标签 */
.nt-tagbtn { display: inline-flex; align-items: center; gap: 4px; }
.nt-tagbtn i {
  font-style: normal;
  font-size: calc(10.5px * var(--fs));
  color: #A9AFB9;
  font-variant-numeric: tabular-nums;
}
.nt-tagbtn.active i { color: rgba(255, 255, 255, .66); }
.nt-tagadd {
  border-style: dashed;
  color: #A9AFB9;
  padding: 0 12px;
}

/* ===== 编辑页底部工具栏 ===== */
.nt-edscroll { padding-bottom: calc(20px + env(safe-area-inset-bottom)) !important; }
.nt-toolbar {
  flex-shrink: 0;
  display: flex;
  border-top: 1px solid var(--line);
  background: #fff;
  padding: 5px 6px calc(5px + env(safe-area-inset-bottom));
}
/* v63：键盘弹出时隐藏底部工具栏——它顶在键盘上方，和格式条各出一条线 */
body.kb-open .nt-toolbar { display: none; }
.nt-tool {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 7px 2px 5px;
  border-radius: 12px;
  color: #9AA1AC;
  transition: color .18s, background .18s;
}
.nt-tool svg {
  width: 21px; height: 21px;
  fill: none; stroke: currentColor;
  stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
.nt-tool em {
  font-style: normal;
  font-size: calc(10.5px * var(--fs));
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.nt-tool.on { color: #B3795F; }
.nt-tool.on svg { stroke-width: 2.1; }
.nt-tool.danger { color: #B9BEC8; }
.nt-tool:active { background: #F4F5F7; }

/* 标题行右侧的标签小标 */
.nt-ed-tags {
  display: flex; align-items: center;
  margin-left: auto; min-width: 0; overflow: hidden;
  align-self: center; padding-bottom: 10px;
}
.nt-mini-tag {
  font-size: calc(10.5px * var(--fs));
  color: #8C93A0;
  background: #F1F2F4;
  padding: 2.5px 8px;
  border-radius: 8px;
  white-space: nowrap;
}

/* ===== 底部小面板 ===== */
.nt-sheet-mask {
  position: fixed;
  inset: 0;
  z-index: 75;
  background: rgba(12, 14, 18, .34);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  transition: opacity .22s;
}
.nt-sheet-mask.show { opacity: 1; }
.nt-sheet {
  width: 100%;
  max-width: 460px;
  background: #fff;
  border-radius: 22px 22px 0 0;
  padding: 6px 16px calc(16px + env(safe-area-inset-bottom));
  transform: translateY(28px);
  transition: transform .26s cubic-bezier(.3, .9, .3, 1);
  max-height: 78vh;
  overflow-y: auto;
}
.nt-sheet-mask.show .nt-sheet { transform: none; }
.nt-sheet-bar {
  width: 36px; height: 4px; border-radius: 2px;
  background: #E3E6EA; margin: 4px auto 12px;
}
.nt-sheet-title {
  margin: 0 2px 12px;
  font-size: calc(15px * var(--fs));
  font-weight: 650;
  color: var(--ink);
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.nt-sheet-title em {
  font-style: normal;
  font-size: calc(11.5px * var(--fs));
  font-weight: 400;
  color: #A9AFB9;
}
.nt-sheet-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.nt-chip-new {
  border-style: dashed !important;
  color: #A9AFB9 !important;
}
.nt-sheet-done {
  width: 100%;
  height: 48px;
  margin-top: 18px;
  border-radius: 15px;
  background: #14161A;
  color: #fff;
  font-size: calc(15px * var(--fs));
  font-weight: 600;
}
.nt-sheet-done:active { opacity: .86; }
.nt-sheet-colors { display: flex; gap: 14px; padding: 4px 2px 6px; flex-wrap: wrap; }
.nt-sheet-colors .nt-color { width: 40px; height: 40px; border-radius: 13px; }
/* v59：背景面板 */
.bg-label { font-size: calc(11.5px * var(--fs)); color: var(--muted); margin: 14px 2px 8px; letter-spacing: .3px; }
.bg-custom { display: flex; align-items: center; gap: 12px; padding: 2px; }
.bg-custom input[type="color"] {
  width: 54px; height: 40px; padding: 0; border: 1px solid var(--line);
  border-radius: 12px; background: #fff; -webkit-appearance: none; appearance: none;
}
.bg-custom input[type="color"]::-webkit-color-swatch-wrapper { padding: 3px; }
.bg-custom input[type="color"]::-webkit-color-swatch { border: none; border-radius: 9px; }
.bg-custom span { font-size: calc(13px * var(--fs)); color: var(--muted); }
.bg-pats { display: flex; gap: 8px; flex-wrap: wrap; }
.bg-pat {
  padding: 9px 16px; border-radius: 12px; border: 1.5px solid transparent;
  background: #F4F5F7; color: var(--ink); font-size: calc(13px * var(--fs));
  font-family: inherit;
}
.bg-pat.on { background: #FFF7F3; border-color: #F0C4AE; color: #C08265; font-weight: 650; }
/* 卡片纹理 */
.nt-card.p-lines, .dy-item.p-lines {
  background-image: repeating-linear-gradient(180deg, transparent 0 27px, rgba(20, 22, 26, .055) 27px 28px);
}
.nt-card.p-dots, .dy-item.p-dots {
  background-image: radial-gradient(rgba(20, 22, 26, .12) 1px, transparent 1.1px);
  background-size: 14px 14px;
}
.nt-card.p-grid, .dy-item.p-grid {
  background-image: linear-gradient(rgba(20, 22, 26, .055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(20, 22, 26, .055) 1px, transparent 1px);
  background-size: 18px 18px;
}
.dy-toolrow { display: flex; gap: 10px; flex-wrap: wrap; }
.nt-sheet-input {
  width: 100%;
  height: 48px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #FBFBFC;
  padding: 0 14px;
  font-size: calc(15px * var(--fs));
  color: var(--ink);
  outline: none;
}
.nt-sheet-input:focus { border-color: #FBDCCF; background: #fff; }
.nt-sheet-actions { display: flex; gap: 10px; margin-top: 16px; }
.nt-sheet-actions .btn-ghost,
.nt-sheet-actions .btn-primary { flex: 1; height: 48px; }
.nt-sheet-list { display: flex; flex-direction: column; gap: 2px; }
.nt-sheet-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 15px 10px;
  border-radius: 14px;
  font-size: calc(15px * var(--fs));
  color: var(--ink);
  text-align: left;
}
.nt-sheet-row svg {
  width: 19px; height: 19px;
  fill: none; stroke: #8C93A0;
  stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
.nt-sheet-row:active { background: #F4F5F7; }
.nt-sheet-row.danger { color: #B3795F; }
.nt-sheet-row.danger svg { stroke: #B3795F; }

/* 提示条上的操作按钮 */
.toast.has-act { pointer-events: auto; display: inline-flex; align-items: center; gap: 12px; }
.toast-act {
  color: #F2AD99;
  font-size: calc(13px * var(--fs));
  font-weight: 650;
  padding: 2px 2px 2px 10px;
  border-left: 1px solid rgba(255, 255, 255, .18);
  white-space: nowrap;
}

/* ===== 日记列表：左滑删除 ===== */
.dy-list .swipe-wrap {
  display: block;
  margin: 0 0 9px;
  background: #CE8A6D;
  border-radius: 18px;
}
.dy-list .swipe-wrap .dy-item {
  margin: 0;
  width: 100%;
  background-color: #fff;
  border-radius: 18px;
  box-shadow: none;
}
.dy-list .swipe-wrap .dy-item:active { transform: none; }
.dy-list .swipe-wrap .swipe-del { width: 80px; font-size: calc(13px * var(--fs)); }

/* ================= 记账 ================= */
/* 底部 6 个标签时略微收窄，保证每个都点得到 */
.tab { gap: 2px; padding: 4px 0 2px; }
.tab svg { width: 21px; height: 21px; }
.tab span { font-size: calc(10.5px * var(--fs)); }

/* 月份切换 */
.lg-mbar { display: flex; align-items: center; justify-content: center; gap: 4px; padding: 2px 0 12px; }
.lg-mbtn {
  width: 34px; height: 34px; border-radius: 11px; flex: none;
  display: grid; place-items: center;
  background: #fff; border: 1px solid var(--line);
}
.lg-mbtn svg { width: 17px; height: 17px; fill: none; stroke: #6B7280; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.lg-mbtn:active { transform: scale(.94); }
.lg-mtitle { display: flex; align-items: baseline; justify-content: center; gap: 2px; min-width: 104px; }
.lg-mtitle b { font-size: calc(17px * var(--fs)); font-weight: 750; color: var(--ink); letter-spacing: -.5px; font-variant-numeric: tabular-nums; }
.lg-mtitle i { font-style: normal; font-size: calc(11.5px * var(--fs)); color: #6B7280; }
.lg-mtitle em { font-style: normal; font-size: calc(11.5px * var(--fs)); color: #A9AFB9; margin-left: 5px; }

/* 支出总览 */
.lg-hero {
  background: linear-gradient(140deg, #FFF8F4 0%, #FFFDFB 100%);
  border: 1px solid #FAE7DC;
  border-radius: 20px; padding: 15px 16px 13px; margin-bottom: 12px;
}
.lg-hero-label { margin: 0 0 3px; font-size: calc(11.5px * var(--fs)); color: #B3795F; letter-spacing: .3px; }
.lg-hero-num { margin: 0; display: flex; align-items: baseline; gap: 3px; }
.lg-hero-num span { font-size: calc(17px * var(--fs)); font-weight: 600; color: #C08265; }
.lg-hero-num b {
  font-size: calc(17px * var(--fs)); font-weight: 750; color: #1A1D22; letter-spacing: -1.1px;
  line-height: 1.15; font-variant-numeric: tabular-nums;
}
.lg-hero-row {
  display: flex; margin-top: 12px; padding-top: 11px;
  border-top: 1px solid rgba(194, 87, 31, .1);
}
.lg-hero-row > div { flex: 1; min-width: 0; }
.lg-hero-row span { display: block; font-size: calc(10.5px * var(--fs)); color: #B08A78; margin-bottom: 2px; }
.lg-hero-row b {
  font-size: calc(13.5px * var(--fs)); font-weight: 650; color: #3D4350;
  font-variant-numeric: tabular-nums;
}
.lg-hero-row b.neg { color: #B3795F; }

/* 图表卡片 */
.lg-card { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 14px 15px 13px; margin-bottom: 12px; }
.lg-card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.lg-card-head h3 { margin: 0; font-size: calc(13px * var(--fs)); font-weight: 650; color: var(--ink); }
.lg-card-head span { font-size: calc(10.5px * var(--fs)); color: #A9AFB9; text-align: right; }

.lg-donut-wrap { display: flex; align-items: center; gap: 12px; }
.lg-donut { flex: none; width: 112px; height: 112px; }
.lg-donut-svg { width: 100%; height: 100%; display: block; }
/* v135 修正：这里字号是 SVG viewBox(42) 内部单位，渲染到 112/168px 时会放大 2.67~4 倍，
   不能按屏幕字号归一 —— 5px≈明细页13.3px、统计页20px 视觉；4px≈10.7/16px 视觉 */
.lg-donut-num { font-size: 5px; font-weight: 750; fill: #14161A; font-family: inherit; }
.lg-donut-sub { font-size: 4px; fill: #A9AFB9; font-family: inherit; }
.lg-legend-box { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.lg-leg { display: flex; align-items: center; gap: 6px; font-size: calc(11.5px * var(--fs)); min-width: 0; }
.lg-leg i { width: 7px; height: 7px; border-radius: 2.5px; flex: none; background: #E3E6EA; }
.lg-leg b { font-weight: 600; color: #3D4350; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lg-leg span { margin-left: auto; color: #6B7280; font-variant-numeric: tabular-nums; white-space: nowrap; }
.lg-leg em { font-style: normal; font-size: calc(10.5px * var(--fs)); color: #B6BBC4; width: 26px; text-align: right; flex: none; font-variant-numeric: tabular-nums; }
.lg-leg-rest b { color: #8C93A0; font-weight: 500; }

.lg-hollow { margin: 0; padding: 22px 0 20px; text-align: center; font-size: calc(13px * var(--fs)); color: #B6BBC4; line-height: 1.9; }
.lg-hollow em { font-style: normal; font-size: calc(11.5px * var(--fs)); color: #C6CAD2; }
.lg-hollow.sm { padding: 14px 0 12px; font-size: calc(11.5px * var(--fs)); }

/* 每日趋势 */
.lg-trend { padding-top: 2px; }
.lg-bars { display: flex; align-items: flex-end; gap: 3px; height: 66px; }
.lg-bar {
  flex: 1; min-width: 0; height: 100%; padding: 0;
  display: flex; align-items: flex-end; position: relative;
}
.lg-bar i {
  display: block; width: 100%; border-radius: 2.5px 2.5px 1.5px 1.5px;
  background: #EDEFF2; transition: height .32s cubic-bezier(.3, .9, .3, 1);
}
.lg-bar.has i { background: #C4C9D2; }
.lg-bar.top i { background: #EDA08A; }
.lg-bar.today::after {
  content: ""; position: absolute; left: 50%; bottom: -6px;
  width: 3px; height: 3px; margin-left: -1.5px; border-radius: 50%; background: #14161A;
}
.lg-axis { display: flex; justify-content: space-between; margin-top: 8px; font-size: calc(10.5px * var(--fs)); color: #B6BBC4; font-variant-numeric: tabular-nums; }

/* 明细 */
.lg-sec-head { display: flex; align-items: baseline; justify-content: space-between; margin: 18px 3px 9px; }
.lg-sec-head h3 { margin: 0; font-size: calc(13px * var(--fs)); font-weight: 650; color: var(--ink); }
.lg-sec-head span { font-size: calc(10.5px * var(--fs)); color: #A9AFB9; }

.lg-day { margin-bottom: 13px; }
.lg-day-head { display: flex; align-items: baseline; gap: 7px; padding: 0 4px 7px; }
.lg-day-head b { font-size: calc(13px * var(--fs)); font-weight: 650; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.lg-day-head span { font-size: calc(10.5px * var(--fs)); color: #AFB5BE; }
.lg-day-head em { margin-left: auto; font-style: normal; font-size: calc(11.5px * var(--fs)); display: flex; gap: 8px; font-variant-numeric: tabular-nums; }
.lg-day-head em .pos { color: #B3795F; }
.lg-day-head em .neg { color: #6B7280; }

.lg-rec {
  display: flex; align-items: center; gap: 11px; width: 100%;
  background: #fff; border: 1px solid var(--line); border-radius: 15px;
  padding: 11px 13px; text-align: left;
}
.lg-ico {
  width: 34px; height: 34px; flex: none; border-radius: 11px;
  background: #F4F5F7; display: grid; place-items: center;
}
.lg-ico svg { width: 18px; height: 18px; fill: none; stroke: #6B7280; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.lg-rec-main { flex: 1; min-width: 0; display: flex; align-items: baseline; gap: 6px; }
.lg-rec-main b { font-size: calc(13.5px * var(--fs)); font-weight: 600; color: var(--ink); white-space: nowrap; flex: none; }
.lg-rec-main span { font-size: calc(11.5px * var(--fs)); color: #8C93A0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lg-amt { flex: none; font-size: calc(15px * var(--fs)); font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.2px; }
.lg-amt.expense { color: #14161A; }
.lg-amt.income { color: #C08265; }

.lg-list .swipe-wrap { background: #CE8A6D; border-radius: 15px; margin-bottom: 7px; }
.lg-list .swipe-wrap .lg-rec { margin: 0; border-radius: 15px; box-shadow: none; }
.lg-list .swipe-wrap .swipe-del { width: 74px; font-size: calc(13px * var(--fs)); }
.lg-list .swipe-wrap:last-child { margin-bottom: 0; }

/* ===== 记一笔 ===== */
.lg-type-seg {
  justify-self: center; display: flex; gap: 2px;
  background: #EAECEF; border-radius: 12px; padding: 3px;
}
.lg-type-seg button {
  height: 30px; padding: 0 18px; border-radius: 9px;
  font-size: calc(13px * var(--fs)); font-weight: 600; color: #6B7280;
  transition: background .18s, color .18s;
}
.lg-type-seg button.on {
  background: #fff; color: var(--ink);
  box-shadow: 0 1px 3px rgba(16, 24, 40, .1);
}
.lg-edscroll { padding-bottom: 16px !important; }

.lg-amount {
  display: flex; align-items: baseline; justify-content: flex-end; gap: 4px;
  margin: 6px 4px 0; padding: 14px 4px 8px;
  border-bottom: 2px solid #EFF1F4;
  transition: border-color .22s;
}
.lg-amount.filled { border-color: #EDA08A; }
.lg-amount .cur { font-size: calc(17px * var(--fs)); font-weight: 600; color: #A9AFB9; }
#lgAmountText {
  font-size: calc(17px * var(--fs)); font-weight: 750; letter-spacing: -1.4px;
  color: var(--ink); line-height: 1.1; font-variant-numeric: tabular-nums;
}
.lg-amount .caret {
  width: 2px; height: 28px; border-radius: 1px; background: #EDA08A;
  align-self: center; margin-left: 3px;
  animation: caretBlink 1.05s steps(1) infinite;
}
@keyframes caretBlink { 50% { opacity: 0; } }
.lg-amount-hint { margin: 8px 4px 0; text-align: right; font-size: calc(11.5px * var(--fs)); color: #B6BBC4; }

.lg-cat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; padding: 14px 0 2px; }
.lg-cat {
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  padding: 8px 2px 7px; border-radius: 14px;
  border: 1px solid transparent; transition: background .16s, border-color .16s;
}
.lg-cat .ico {
  width: 40px; height: 40px; border-radius: 13px;
  background: #F4F5F7; display: grid; place-items: center;
  transition: background .16s;
}
.lg-cat .ico svg {
  width: 21px; height: 21px; fill: none; stroke: #6B7280;
  stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round;
  transition: stroke .16s;
}
.lg-cat em { font-style: normal; font-size: calc(11.5px * var(--fs)); color: #6B7280; }
.lg-cat:active { transform: scale(.95); }
.lg-cat.on { background: #FFF7F3; border-color: #F7DFD2; }
.lg-cat.on .ico { background: #EDA08A; }
.lg-cat.on .ico svg { stroke: #fff; stroke-width: 1.85; }
.lg-cat.on em { color: #B3795F; font-weight: 650; }

.lg-meta { margin-top: 16px; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 0 14px; }
.lg-mrow {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 13px 0; border-bottom: 1px solid #F1F2F4; text-align: left;
}
.lg-mrow:last-child { border-bottom: none; }
.lg-mrow .lb { flex: none; width: 32px; font-size: calc(13px * var(--fs)); color: #8C93A0; }
.lg-mrow .val { flex: 1; text-align: right; font-size: calc(13.5px * var(--fs)); color: var(--ink); }
.lg-mrow > svg { width: 15px; height: 15px; flex: none; fill: none; stroke: #C4C9D2; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.lg-mrow input {
  flex: 1; min-width: 0; border: none; outline: none; background: none;
  font-size: calc(13.5px * var(--fs)); color: var(--ink); text-align: right; font-family: inherit;
}
.lg-mrow input::placeholder { color: #C3C8D0; }

.lg-del {
  width: 100%; height: 46px; margin-top: 14px; border-radius: 14px;
  background: #FDF8F5; color: #B3795F; font-size: calc(13.5px * var(--fs)); font-weight: 600;
}
.lg-del:active { background: #F9EFE8; }
.lg-date-hidden { position: absolute; left: -9999px; top: 0; width: 1px; height: 1px; opacity: 0; border: none; }

/* 数字键盘 */
.lg-kb {
  flex-shrink: 0; background: #F7F8FA; border-top: 1px solid var(--line);
  padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
}
.lg-kb-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.lg-kb-grid button {
  height: 51px; border-radius: 13px; background: #fff;
  font-size: calc(17px * var(--fs)); font-weight: 600; color: var(--ink);
  font-variant-numeric: tabular-nums;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .05);
  transition: transform .1s, background .12s;
  display: grid; place-items: center;
}
.lg-kb-grid button:active { background: #EDEFF2; transform: scale(.972); }
.lg-kb-grid .kb-fn svg { width: 22px; height: 22px; fill: none; stroke: #4A505A; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.lg-save-btn {
  width: 100%; height: 49px; margin-top: 8px; border-radius: 14px;
  background: #14161A; color: #fff; font-size: calc(15px * var(--fs)); font-weight: 650;
  transition: background .18s, transform .1s;
}
.lg-save-btn:active { transform: scale(.99); }
.lg-save-btn.ready { background: #EDA08A; }

/* ================= v30：记账统计 / 年月日期快选 / 自定义分类 ================= */

/* ---- 顶部「明细 / 统计」 ---- */
.lg-seg { margin: 0 0 12px; }
.lg-seg-slim { margin: 0 0 12px; }
.lg-seg-slim .seg-btn { height: 30px; font-size: calc(13px * var(--fs)); }

/* ---- 月份条：标题可点，右侧「本月」快捷 ---- */
.lg-mbar { position: relative; }
.lg-mtitle {
  background: none; border: none; padding: 0; font-family: inherit;
  cursor: pointer; border-radius: 10px;
}
.lg-mtitle:active { background: #F4F5F7; }
.lg-mtitle-chev {
  width: 13px; height: 13px; flex: none; margin-left: 2px;
  fill: none; stroke: #C4C9D2; stroke-width: 2.1;
  stroke-linecap: round; stroke-linejoin: round;
}
.lg-backcur {
  position: absolute; right: 0; top: 50%; transform: translateY(-50%);
  height: 27px; padding: 0 11px; border-radius: 9px;
  background: #FFF7F3; border: 1px solid #F7DFD2;
  font-size: calc(11.5px * var(--fs)); font-weight: 600; color: #B3795F;
}
.lg-backcur:active { background: #FBEBE3; }
.lg-backcur.hidden { display: none; }

/* ---- 统计：汇总卡 ---- */



/* ---- 统计：分类排行 ---- */
.st-mini-seg { display: flex; gap: 2px; background: #EAECEF; padding: 2px; border-radius: 9px; }
.st-mini-seg button { height: 24px; padding: 0 10px; border-radius: 7px; font-size: calc(11.5px * var(--fs)); color: #8C93A0; }
.st-mini-seg button.on { background: #fff; color: #14161A; font-weight: 650; box-shadow: 0 1px 2px rgba(16, 24, 40, .06); }

.st-cats { display: flex; flex-direction: column; gap: 12px; }
.st-cat { display: flex; align-items: center; gap: 9px; }
.st-cat .ico {
  width: 28px; height: 28px; border-radius: 9px; background: #F4F5F7;
  display: grid; place-items: center; flex: none;
}
.st-cat .ico svg { width: 16px; height: 16px; fill: none; stroke: #6B7280; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.st-cat-main { flex: 1; min-width: 0; }
.st-cat-line { display: flex; align-items: baseline; gap: 6px; margin-bottom: 5px; }
.st-cat-line b { font-size: calc(13px * var(--fs)); font-weight: 600; color: #14161A; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 42%; }
.st-cat-line span { margin-left: auto; font-size: calc(11.5px * var(--fs)); color: #3D4350; font-variant-numeric: tabular-nums; }
.st-cat-line em { font-style: normal; font-size: calc(10.5px * var(--fs)); color: #A9AFB9; width: 32px; text-align: right; flex: none; font-variant-numeric: tabular-nums; }
.st-cat-bar { height: 5px; border-radius: 3px; background: #F1F2F4; overflow: hidden; }
.st-cat-bar i { display: block; height: 100%; border-radius: 3px; background: #C4C9D2; transition: width .35s cubic-bezier(.3, .9, .3, 1); }
.st-cat.top .st-cat-bar i { background: #EDA08A; }
.st-cat.top .st-cat-line b { color: #B3795F; }

/* ---- 统计：月度趋势 ---- */
.st-empty-hollow { padding: 18px 0 14px; text-align: center; font-size: calc(11.5px * var(--fs)); color: #B6BBC4; }

/* ---- 统计：洞察四格 ---- */

/* ---- 年月快选面板 ---- */
.mpk-years { display: flex; align-items: center; justify-content: center; gap: 18px; margin: 0 0 14px; }
.mpk-years button {
  width: 32px; height: 32px; border-radius: 10px; background: #F4F5F7;
  display: grid; place-items: center;
}
.mpk-years button svg { width: 15px; height: 15px; fill: none; stroke: #5B6270; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.mpk-years b { font-size: calc(17px * var(--fs)); font-weight: 700; color: var(--ink); min-width: 76px; text-align: center; font-variant-numeric: tabular-nums; }
.mpk-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.mpk-m {
  height: 52px; border-radius: 13px; background: #F5F6F8;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
}
.mpk-m b { font-size: calc(13.5px * var(--fs)); font-weight: 650; color: #3D4350; font-variant-numeric: tabular-nums; }
.mpk-m em { font-style: normal; font-size: calc(10.5px * var(--fs)); color: #BFC4CC; }
.mpk-m.on { background: #EDA08A; }
.mpk-m.on b, .mpk-m.on em { color: #fff; }
.mpk-m:active { transform: scale(.96); }
.mpk-note { margin: 12px 2px 0; font-size: calc(10.5px * var(--fs)); color: #B6BBC4; text-align: center; }

/* ---- 日期快选面板 ---- */
.dpk-bar { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 0 0 10px; }
.dpk-bar button { width: 32px; height: 32px; border-radius: 10px; background: #F4F5F7; display: grid; place-items: center; }
.dpk-bar button svg { width: 15px; height: 15px; fill: none; stroke: #5B6270; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.dpk-bar b { font-size: calc(13.5px * var(--fs)); font-weight: 650; color: var(--ink); min-width: 106px; text-align: center; font-variant-numeric: tabular-nums; }
.dpk-week { display: grid; grid-template-columns: repeat(7, 1fr); margin-bottom: 3px; }
.dpk-week span { text-align: center; font-size: calc(10.5px * var(--fs)); color: #A9AFB9; }
.dpk-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.dpk-day {
  height: 38px; border-radius: 11px; display: grid; place-items: center;
  font-size: calc(13.5px * var(--fs)); color: #3D4350; font-variant-numeric: tabular-nums;
}
.dpk-day.mut { color: #D6DAE1; }
.dpk-day.today { box-shadow: inset 0 0 0 1px #F3CDBC; color: #B3795F; font-weight: 650; }
.dpk-day.on { background: #EDA08A; color: #fff; font-weight: 650; box-shadow: none; }
.dpk-quick { display: flex; gap: 8px; margin-top: 13px; }
.dpk-quick button {
  flex: 1; height: 38px; border-radius: 11px; background: #F4F5F7;
  font-size: calc(13px * var(--fs)); color: #4A505A;
}
.dpk-quick button:active { background: #EDEFF2; }

/* ---- 分类自定义 ---- */
.lg-cat.lg-cat-add .ico { background: #fff; border: 1px dashed #DCE0E6; }
.lg-cat.lg-cat-add .ico svg { stroke: #A9AFB9; stroke-width: 1.9; }
.lg-cat.lg-cat-add em { color: #A9AFB9; }
.lg-cat.lg-cat-add.on { background: #F7F8FA; border-color: #EEF0F3; }

.catm-add { display: flex; gap: 8px; }
.catm-add input {
  flex: 1; min-width: 0; height: 44px; border: 1px solid #EDEFF2; border-radius: 13px;
  padding: 0 13px; font-size: calc(13.5px * var(--fs)); color: var(--ink); background: #FAFAFB;
  font-family: inherit; outline: none;
}
.catm-add input:focus { border-color: #F5D8CA; background: #fff; }
.catm-add input::placeholder { color: #C3C8D0; }
.catm-add button {
  flex: none; width: 72px; height: 44px; border-radius: 13px;
  background: #14161A; color: #fff; font-size: calc(13.5px * var(--fs)); font-weight: 620;
}
.catm-add button:active { opacity: .86; }

.catm-icons { display: flex; gap: 7px; overflow-x: auto; padding: 12px 1px 2px; scrollbar-width: none; }
.catm-icons::-webkit-scrollbar { display: none; }
.catm-ico {
  flex: none; width: 38px; height: 38px; border-radius: 12px; background: #F4F5F7;
  display: grid; place-items: center; border: 1px solid transparent;
}
.catm-ico svg { width: 19px; height: 19px; fill: none; stroke: #6B7280; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.catm-ico.on { background: #FFF7F3; border-color: #F0D2C2; }
.catm-ico.on svg { stroke: #B3795F; }

.catm-list { margin-top: 14px; display: flex; flex-direction: column; }
.catm-row { display: flex; align-items: center; gap: 10px; padding: 9px 2px; border-bottom: 1px solid #F2F3F5; }
.catm-row:last-child { border-bottom: none; }
.catm-row .ico { width: 30px; height: 30px; border-radius: 10px; background: #F4F5F7; display: grid; place-items: center; flex: none; }
.catm-row .ico svg { width: 16px; height: 16px; fill: none; stroke: #6B7280; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.catm-row b { flex: 1; min-width: 0; font-size: calc(13.5px * var(--fs)); font-weight: 600; color: #14161A; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.catm-row .flag { flex: none; font-size: calc(10.5px * var(--fs)); color: #BFC4CC; }
.catm-del { flex: none; width: 52px; height: 30px; border-radius: 9px; background: #FDF8F5; color: #B3795F; font-size: calc(11.5px * var(--fs)); }
.catm-del:active { background: #F9EFE8; }
.catm-hint { margin: 12px 2px 2px; font-size: calc(10.5px * var(--fs)); color: #B6BBC4; line-height: 1.7; }

/* ================= v31：三页签（明细/统计/预算）+ 计算器键盘 ================= */

/* ---- 金额区：算式结果 ---- */
.lg-amount-eq {
  margin: 6px 4px 0;
  font-size: calc(13px * var(--fs));
  font-weight: 650;
  color: #B3795F;
  text-align: right;
  font-variant-numeric: tabular-nums;
  min-height: 16px;
  opacity: 0;
  transition: opacity .15s;
}
.lg-amount-eq.show { opacity: 1; }

/* ---- 计算器键盘：4 列 ---- */
.lg-kb-grid.lg-kb-calc { grid-template-columns: repeat(4, 1fr); }
.lg-kb-grid.lg-kb-calc button { height: 50px; font-size: calc(17px * var(--fs)); }
.lg-kb-grid .kb-op {
  background: #FFF7F3; color: #B3795F; font-size: calc(17px * var(--fs)); font-weight: 650;
}
.lg-kb-grid .kb-op:active { background: #FBEBE3; }
.lg-kb-grid .kb-again {
  background: #F1F2F4; color: #5B6270; font-size: calc(11.5px * var(--fs)); font-weight: 600;
  white-space: nowrap; letter-spacing: -.2px;
}
.lg-kb-grid .kb-again:active { background: #E6E8EB; }
.lg-kb-grid.lg-kb-calc .lg-save-btn {
  background: #EDA08A; color: #fff; font-size: calc(15px * var(--fs)); margin: 0;
}

/* ---- 统计：收支三列 ---- */
.st-duo {
  display: flex;
  background: #fff; border: 1px solid var(--line); border-radius: 18px;
  padding: 15px 6px 13px; margin-bottom: 7px;
}
.st-duo > div { flex: 1; min-width: 0; text-align: center; position: relative; }
.st-duo > div + div::before {
  content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 1px; height: 26px; background: #F0F1F3;
}
.st-duo span { display: block; font-size: calc(10.5px * var(--fs)); color: #A9AFB9; margin-bottom: 5px; }
.st-duo b {
  display: block; font-size: calc(15px * var(--fs)); font-weight: 700; color: var(--ink);
  font-variant-numeric: tabular-nums; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; letter-spacing: -.3px;
}
.st-duo b.neg { color: #B3795F; }
.st-delta { margin: 0 2px 14px; font-size: calc(11.5px * var(--fs)); color: #8C93A0; display: flex; align-items: center; gap: 4px; min-height: 16px; }
.st-delta.more { color: #B3795F; }
.st-delta svg { width: 11px; height: 11px; flex: none; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

/* ---- 统计：折线图 ---- */
.st-lines { padding-top: 2px; }
.st-lines-svg { width: 100%; height: 120px; display: block; }
.st-lines-svg polyline { stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.st-lines-svg .ls-exp { stroke: #EDA08A; }
.st-lines-svg .ls-inc { stroke: #3D4350; }
.st-lines-svg .ls-bal { stroke: #C4C9D2; stroke-dasharray: 4 3; }
.st-lines-axis { display: flex; justify-content: space-between; margin-top: 7px; font-size: calc(10.5px * var(--fs)); color: #B6BBC4; font-variant-numeric: tabular-nums; }
.st-lines-legend { display: flex; justify-content: center; gap: 16px; margin-top: 11px; }
.st-lines-legend span { display: flex; align-items: center; gap: 5px; font-size: calc(11.5px * var(--fs)); color: #6B7280; }
.st-lines-legend i { width: 14px; height: 3px; border-radius: 2px; flex: none; }
.st-lines-legend .li-exp { background: #EDA08A; }
.st-lines-legend .li-inc { background: #3D4350; }
.st-lines-legend .li-bal { background: #C4C9D2; }
.st-lines .st-empty-hollow { padding: 22px 0 18px; }

/* ---- 统计：分类环形 ---- */
.st-donut { display: flex; justify-content: center; padding: 2px 0 14px; }
.st-donut-box { width: 168px; height: 168px; }
.st-donut-box .lg-donut-svg { width: 100%; height: 100%; }
.st-donut:empty { display: none; padding: 0; }

/* ---- 统计：报表 ---- */
.st-rhead, .st-rrow {
  display: flex; align-items: baseline; gap: 8px;
  padding: 8px 2px; font-variant-numeric: tabular-nums;
}
.st-rhead {
  border-bottom: 1px solid #F1F2F4;
  font-size: calc(10.5px * var(--fs)); color: #A9AFB9; padding-bottom: 7px;
}
.st-rhead b { flex: none; width: 72px; font-weight: 500; }
.st-rhead span { flex: 1; text-align: right; }
.st-rrow { border-bottom: 1px solid #F7F8FA; font-size: calc(13px * var(--fs)); }
.st-rrow:last-child { border-bottom: none; }
.st-rrow b { flex: none; width: 72px; font-weight: 600; color: var(--ink-2); }
.st-rrow span { flex: 1; text-align: right; color: #3D4350; }
.st-rrow span.c1 { color: #B3795F; }
.st-rrow span.c3 { color: var(--ink); font-weight: 600; }
.st-rrow span.c3.neg, .st-duo b.neg { color: #B3795F; }
.st-rrow.st-rsum { border-top: 1px solid #F1F2F4; margin-top: 2px; padding-top: 10px; font-weight: 650; }
.st-rrow.st-rsum b { color: var(--ink); }
.st-rsum span { font-weight: 650; }

/* ---- 预算 ---- */
.bg-hero {
  background: #fff; border: 1px solid var(--line); border-radius: 18px;
  padding: 16px 16px 13px; margin-bottom: 12px;
}
.bg-hero.over { border-color: #F5D8CA; background: #FFFBF8; }
.bg-hero-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.bg-hero-main span { display: block; font-size: calc(11.5px * var(--fs)); color: #B3795F; margin-bottom: 4px; letter-spacing: .3px; }
.bg-hero-main b {
  font-size: calc(17px * var(--fs)); font-weight: 750; color: var(--ink); letter-spacing: -.7px;
  font-variant-numeric: tabular-nums; line-height: 1.15;
}
.bg-hero-main b.unset { color: #C4C9D2; font-weight: 650; }
.bg-setbtn {
  flex: none; height: 34px; padding: 0 14px; border-radius: 11px;
  background: #14161A; color: #fff; font-size: calc(13px * var(--fs)); font-weight: 600;
}
.bg-setbtn:active { opacity: .86; }
.bg-progress { height: 9px; border-radius: 5px; background: #F1F2F4; overflow: hidden; margin: 14px 0 13px; }
.bg-progress i {
  display: block; height: 100%; border-radius: 5px; width: 0;
  background: #EDA08A; transition: width .4s cubic-bezier(.3, .9, .3, 1);
}
.bg-progress i.over { background: #C96A4A; }
.bg-hero-row { display: flex; gap: 4px; padding-top: 12px; border-top: 1px solid #F3F4F6; }
.bg-hero-row > div { flex: 1; min-width: 0; }
.bg-hero-row span { display: block; font-size: calc(10.5px * var(--fs)); color: #A9AFB9; margin-bottom: 3px; }
.bg-hero-row b {
  display: block; font-size: calc(13.5px * var(--fs)); font-weight: 650; color: var(--ink-2);
  font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.bg-hero-row b.neg { color: #C96A4A; }
.bg-note { margin: 10px 0 0; font-size: calc(11.5px * var(--fs)); color: #B3795F; line-height: 1.6; }
.bg-note:empty { display: none; }

.bg-cats { display: flex; flex-direction: column; gap: 2px; }
.bg-cat {
  display: flex; align-items: center; gap: 9px; width: 100%;
  padding: 9px 2px; text-align: left;
}
.bg-cat:active { background: #FAFAFB; }
.bg-cat .ico {
  width: 30px; height: 30px; border-radius: 10px; background: #F4F5F7;
  display: grid; place-items: center; flex: none;
}
.bg-cat .ico svg { width: 16px; height: 16px; fill: none; stroke: #6B7280; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.bg-cat-main { flex: 1; min-width: 0; }
.bg-cat-line { display: flex; align-items: baseline; gap: 6px; margin-bottom: 5px; }
.bg-cat-line b { font-size: calc(13px * var(--fs)); font-weight: 600; color: var(--ink); }
.bg-cat-line span { margin-left: auto; font-size: calc(11.5px * var(--fs)); color: #8C93A0; font-variant-numeric: tabular-nums; }
.bg-cat.over .bg-cat-line span { color: #C96A4A; font-weight: 600; }
.bg-cat-bar { height: 5px; border-radius: 3px; background: #F1F2F4; overflow: hidden; }
.bg-cat-bar i { display: block; height: 100%; border-radius: 3px; background: #EDA08A; }
.bg-cat.over .bg-cat-bar i { background: #C96A4A; }
.bg-cat .chev { width: 13px; height: 13px; flex: none; fill: none; stroke: #C4C9D2; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.bg-add {
  width: 100%; height: 44px; margin-top: 10px; border-radius: 13px;
  background: #FDF8F5; color: #B3795F; font-size: calc(13px * var(--fs)); font-weight: 600;
}
.bg-add:active { background: #F9EFE8; }

/* ================= v32：全部统计 / 年预算 / 账单导入 ================= */

/* ---- 导入入口卡片 ---- */
.lg-import {
  display: flex; align-items: center; gap: 11px; width: 100%;
  margin: 16px 0 6px; padding: 13px 14px; text-align: left;
  background: #fff; border: 1px dashed #E7D9D0; border-radius: 15px;
}
.lg-import:active { background: #FEFAF8; }
.lg-import-ico {
  width: 34px; height: 34px; border-radius: 11px; flex: none;
  background: #FDF8F5; display: grid; place-items: center;
}
.lg-import-ico svg { width: 18px; height: 18px; fill: none; stroke: #B3795F; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.lg-import-txt { flex: 1; min-width: 0; }
.lg-import-txt b { display: block; font-size: calc(13.5px * var(--fs)); font-weight: 620; color: var(--ink); }
.lg-import-txt em { display: block; font-style: normal; font-size: calc(10.5px * var(--fs)); color: #A9AFB9; margin-top: 3px; line-height: 1.5; }
.lg-import .chev { width: 14px; height: 14px; flex: none; fill: none; stroke: #C4C9D2; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---- 解析中 ---- */
.imp-loading { display: flex; flex-direction: column; align-items: center; gap: 9px; padding: 34px 0 40px; }
.imp-spin {
  width: 26px; height: 26px; border-radius: 50%;
  border: 2.5px solid #F1E4DC; border-top-color: #EDA08A;
  animation: impSpin .8s linear infinite;
}
@keyframes impSpin { to { transform: rotate(360deg); } }
.imp-loading b { font-size: calc(13.5px * var(--fs)); color: var(--ink); }
.imp-loading em {
  font-style: normal; font-size: calc(11.5px * var(--fs)); color: #A9AFB9;
  max-width: 82%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* ---- 导入预览 ---- */
.imp-sum { display: flex; gap: 8px; margin-bottom: 12px; }
.imp-sum > div { flex: 1; min-width: 0; background: #FAFAFB; border-radius: 12px; padding: 9px 11px; }
.imp-sum span { display: block; font-size: calc(10.5px * var(--fs)); color: #A9AFB9; margin-bottom: 3px; }
.imp-sum b {
  display: block; font-size: calc(13px * var(--fs)); font-weight: 650; color: #14161A;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums;
}
.imp-hint { margin: 0 2px 8px; font-size: calc(10.5px * var(--fs)); color: #B6BBC4; }
.imp-list {
  max-height: 37vh; overflow-y: auto; margin: 0 -4px; padding: 2px 4px;
  display: flex; flex-direction: column; gap: 5px;
}
.imp-row {
  display: flex; align-items: center; gap: 8px; width: 100%; text-align: left;
  padding: 9px 10px; background: #FAFAFB; border: 1px solid transparent; border-radius: 12px;
}
.imp-row.on { border-color: #F3CDBC; background: #FFF9F6; }
.imp-date { flex: none; width: 50px; font-size: calc(10.5px * var(--fs)); color: #A9AFB9; font-variant-numeric: tabular-nums; }
.imp-note {
  flex: 1; min-width: 0; font-size: calc(13px * var(--fs)); color: #3D4350;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.imp-cat {
  flex: none; display: flex; align-items: center; gap: 2px; max-width: 92px;
  height: 24px; padding: 0 7px 0 8px; border-radius: 8px;
  background: #fff; border: 1px solid #EEF0F3; font-size: calc(11.5px * var(--fs)); color: #6B7280;
  overflow: hidden; white-space: nowrap;
}
.imp-cat svg { width: 11px; height: 11px; flex: none; fill: none; stroke: #C4C9D2; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.imp-amt { flex: none; font-size: calc(13px * var(--fs)); font-weight: 650; font-variant-numeric: tabular-nums; letter-spacing: -.2px; }
.imp-amt.exp { color: #14161A; }
.imp-amt.inc { color: #C08265; }
.imp-more { margin: 9px 2px 0; font-size: calc(10.5px * var(--fs)); color: #B6BBC4; text-align: center; }
.imp-more:empty { display: none; }

.imp-pick { margin-top: 12px; padding: 11px 12px; border-radius: 14px; background: #F7F8FA; }
.imp-pick.hidden { display: none; }
.imp-pick-title { margin: 0 0 9px; font-size: calc(11.5px * var(--fs)); color: #6B7280; }
.imp-pick-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.imp-pick-done { margin-top: 11px; width: 100%; height: 32px; border-radius: 9px; background: #fff; font-size: calc(11.5px * var(--fs)); color: #6B7280; }

/* ---- 预算：今年每月支出 ---- */
.bg-months { display: flex; align-items: flex-end; gap: 5px; height: 86px; padding-top: 4px; }
.bg-m { flex: 1; min-width: 0; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 5px; }
.bg-m i {
  width: 100%; max-width: 22px; min-height: 3px; border-radius: 5px 5px 3px 3px;
  background: #E3E6EA; transition: height .35s cubic-bezier(.3, .9, .3, 1);
}
.bg-m.has i { background: #C4C9D2; }
.bg-m.on i { background: #EDA08A; }
.bg-m em { font-style: normal; font-size: calc(10.5px * var(--fs)); color: #B6BBC4; }
.bg-m.on em { color: #B3795F; font-weight: 650; }

/* ================= v33：排班横滑 / 自定义统计 / 账单导出 / 我的 ================= */

/* ---- 顶栏「⋯」：本模块设置 ---- */
/* v55：三点按钮去背景，纯色图标（与加号统一） */
.topbar-more {
  width: 38px; height: 38px; border-radius: 13px;
  background: transparent; border: none;
  display: grid; place-items: center;
  transition: transform .16s;
}
.topbar-more:active { transform: scale(.93); background: transparent; }
.topbar-more svg { width: 16px; height: 16px; fill: var(--ink); stroke: none; }

/* ---- 日历首页：一天的排班只排一行，左右滑动看 ---- */
.dp-shifts {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 6px;
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 2px 1px 4px;
  scroll-snap-type: x proximity;
  overscroll-behavior-x: contain;
}
.dp-shifts::-webkit-scrollbar { width: 0; height: 0; display: none; }
.dp-shifts .chip { flex: 0 0 auto; scroll-snap-align: start; white-space: nowrap; }
.dp-shifts.can-scroll {
  -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 18px), rgba(0, 0, 0, .12));
  mask-image: linear-gradient(to right, #000 calc(100% - 18px), rgba(0, 0, 0, .12));
}
.dp-shifts.can-scroll.at-end {
  -webkit-mask-image: none;
  mask-image: none;
}

/* ---- 我的：资料卡 ---- */
.profile-main { flex: 1; min-width: 0; }
.profile-bio {
  font-size: calc(11.5px * var(--fs));
  color: #5B6270;
  margin: 2px 0 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.profile-since { margin-top: 3px !important; font-size: calc(10.5px * var(--fs)); }
.set-group-label em { font-style: normal; color: #BFC4CD; margin-left: 6px; font-size: calc(10.5px * var(--fs)); }
.row-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.row-title { display: flex; align-items: center; gap: 7px; font-size: calc(13.5px * var(--fs)); }
.row-note { font-style: normal; font-size: calc(10.5px * var(--fs)); color: var(--muted); }
.mod-dot { width: 7px; height: 7px; border-radius: 3px; display: inline-block; flex: none; }

/* ---- 个人资料页 ---- */
.pr-hero { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 0 14px; }
.pr-avatar-btn { position: relative; display: block; }
.pr-avatar-tag {
  position: absolute; left: 50%; bottom: -7px; transform: translateX(-50%);
  background: var(--ink); color: #fff; font-size: calc(10.5px * var(--fs)); font-weight: 600;
  padding: 2px 8px; border-radius: 9px; white-space: nowrap;
  box-shadow: 0 4px 10px -4px rgba(20, 22, 26, .6);
}
.pr-hero-name { margin: 12px 0 0; font-size: calc(17px * var(--fs)); font-weight: 700; letter-spacing: -.2px; }
.pr-hero-sub { margin: 2px 0 0; font-size: calc(11.5px * var(--fs)); color: var(--muted); }
.pr-panel { padding: 2px 14px; }
.pr-field {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 0; border-bottom: 1px solid var(--line);
}
.pr-panel .pr-field:last-child { border-bottom: none; }
.pr-field > span {
  flex: none; display: flex; flex-direction: column; gap: 2px;
  font-size: calc(13.5px * var(--fs)); color: var(--ink-2);
}
.pr-field > span em { font-style: normal; font-size: calc(10.5px * var(--fs)); color: var(--muted); max-width: 150px; line-height: 1.5; }
.pr-field > input {
  flex: 1; min-width: 0; text-align: right; border: none; background: none; outline: none;
  font-family: inherit; font-size: calc(13.5px * var(--fs)); font-weight: 550; color: var(--ink);
  padding: 4px 0;
}
.pr-field > input::placeholder { color: #C3C8D0; font-weight: 400; }
.pr-field.col { flex-direction: column; align-items: stretch; gap: 9px; position: relative; }
.pr-field.col > .seg { align-self: flex-start; }
.pr-field textarea {
  width: 100%; border: none; outline: none; resize: none;
  background: #F7F8FA; border-radius: 12px; padding: 10px 12px 18px;
  font-family: inherit; font-size: calc(13.5px * var(--fs)); line-height: 1.6; color: var(--ink);
}
.pr-field textarea::placeholder { color: #C3C8D0; }
.pr-count { position: absolute; right: 11px; bottom: 8px; font-style: normal; font-size: calc(10.5px * var(--fs)); color: #C3C8D0; }
.pr-hint { font-size: calc(10.5px * var(--fs)); color: var(--muted); text-align: center; padding: 14px 10px 0; line-height: 1.7; }

/* ---- 模块设置页 ---- */
.ms-note { font-size: calc(10.5px * var(--fs)); color: var(--muted); line-height: 1.7; padding: 12px 4px 0; }
.ms-badge {
  display: inline-flex; align-items: center; height: 20px; padding: 0 8px;
  border-radius: 7px; background: #FFF4EF; color: #B3795F; font-size: calc(10.5px * var(--fs)); margin-left: 6px;
}

/* ---- 统计：自定义时间段面板 ---- */
.rng-wrap { padding: 2px 2px 0; }
.rng-row { display: flex; gap: 9px; }
.rng-field { flex: 1; min-width: 0; background: #F7F8FA; border-radius: 13px; padding: 9px 12px; }
.rng-field span { display: block; font-size: calc(10.5px * var(--fs)); color: var(--muted); margin-bottom: 3px; }
.rng-field input {
  width: 100%; border: none; background: none; outline: none;
  font-family: inherit; font-size: calc(13.5px * var(--fs)); color: var(--ink); font-variant-numeric: tabular-nums;
}
.rng-presets { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 14px; }
.rng-tip { margin: 12px 2px 0; font-size: calc(10.5px * var(--fs)); color: #A9AFB9; line-height: 1.6; }
.rng-tip.more { color: #C96A4A; }

/* ---- 账单导出面板 ---- */
.exp-sec { margin-top: 15px; }
.exp-sec > b { display: block; font-size: calc(11.5px * var(--fs)); color: #8A909B; font-weight: 500; margin-bottom: 8px; }
.exp-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.exp-chips .mini-chip { height: 30px; padding: 0 12px; }
.exp-sum {
  margin-top: 15px; padding: 11px 13px; border-radius: 13px; background: #FBF8F5;
  font-size: calc(11.5px * var(--fs)); color: #8A6A56; line-height: 1.7;
}
.exp-sum b { color: #B3795F; font-weight: 650; }

.lg-export { margin-top: 10px; }

/* 底部面板内容多时自己滚 */
.nt-sheet { max-height: 88vh; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.nt-sheet-title em { font-style: normal; font-size: calc(10.5px * var(--fs)); color: #B6BBC4; margin-left: 7px; font-weight: 400; }
.profile-bio.empty { color: #A9AFB9; }
.me-group { margin-bottom: 12px; }

/* ================= v34：详情卡减框 / 黄历改版 / 格子整块变色 ================= */

/* ---- 日历格子：选中整块变色，更醒目 ---- */
.day.selected { background: var(--accent); }
.day.selected .dnum { background: transparent; color: #fff; font-weight: 700; }
.day.selected .lunar { color: rgba(255, 255, 255, .92); }
.day.selected .lunar.fest { color: #fff; }
.day.selected .lunar.term { color: #fff; font-weight: 600; }
.day.selected .evdot { background: #fff; box-shadow: none; }
.day.selected .bar.empty { background: rgba(255, 255, 255, .45); }
.day.selected .tag { box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .8); }
.day.today.selected { background: #DE8F72; }
.day.today.selected .dnum { color: #fff; }

/* ---- 详情卡：黄历两行紧凑 + 截断 + › ---- */
.tc-yiji {
  position: relative;
  padding: 11px 30px 11px 12px;
  margin-bottom: 13px;
  border-radius: 14px;
  background: #F7F8FA;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.tc-yiji .yj-row { display: flex; align-items: center; gap: 8px; min-width: 0; }
.tc-yiji .yj-items {
  flex: 1; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  letter-spacing: .4px;
}
.tc-yiji .yj-chev {
  position: absolute; right: 11px; top: 50%;
  transform: translateY(-50%);
  font-size: calc(17px * var(--fs)); color: #C4C9D2; line-height: 1;
}

/* 节日 / 节气小标签：去掉底色小框，改纯文字，减少框感 */
.tc-chip { background: none; padding: 0; color: #A7ADB8; font-size: calc(13px * var(--fs)); }
.tc-chip.term, .tc-chip.fest { color: #C08265; }
.tc-chips { gap: 4px 10px; margin-bottom: 12px; }

/* ---- 黄历子页（图3风格：单日传统黄历） ---- */
.al-nav { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.al-nav-btn {
  width: 40px; height: 36px; border-radius: 12px; background: #fff;
  font-size: calc(17px * var(--fs)); color: #5B6270; line-height: 1;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
}
.al-nav-btn:active { background: #F2F3F5; }
.al-nav-title { font-size: calc(15px * var(--fs)); font-weight: 650; letter-spacing: -.2px; }
.al-nav-sub { font-size: calc(10.5px * var(--fs)); color: var(--muted); text-align: center; margin-top: 1px; }
.al-back-today {
  margin: 0 auto 10px; padding: 5px 14px; border-radius: 12px;
  background: #FFF7F3; color: #B3795F; font-size: calc(11.5px * var(--fs)); font-weight: 600;
}

.al-card {
  display: flex; gap: 10px;
  background: #fff; border-radius: 20px;
  padding: 15px 14px; margin-bottom: 12px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
}
.al-yj { display: flex; gap: 10px; width: 128px; flex-shrink: 0; }
.al-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.al-badge {
  width: 22px; height: 22px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: calc(11.5px * var(--fs)); font-weight: 700; color: #fff;
}
.al-col.yi .al-badge { background: #C08265; }
.al-col.ji .al-badge { background: #9AA0AA; }
.al-col ul {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-direction: column; gap: 7px;
  text-align: center;
}
.al-col li { font-size: calc(13px * var(--fs)); color: #565C66; letter-spacing: 1px; line-height: 1; }
.al-col.ji li { color: #7A8089; }
.al-day {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 5px; text-align: center;
  border-left: 1px solid var(--line);
  padding: 6px 0 6px 12px;
}
.al-num { font-size: calc(17px * var(--fs)); font-weight: 700; line-height: 1; letter-spacing: -1px; color: var(--ink); }
.al-lunar { font-size: calc(17px * var(--fs)); font-weight: 650; letter-spacing: 2px; color: var(--ink); }
.al-gz { font-size: calc(11.5px * var(--fs)); color: var(--muted); letter-spacing: .5px; }

.al-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  background: #fff; border-radius: 20px; overflow: hidden;
  margin-bottom: 12px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
}
.al-cell { padding: 12px 14px 13px; border-top: 1px solid var(--line); }
.al-cell:nth-child(-n+2) { border-top: none; }
.al-cell:nth-child(odd) { border-right: 1px solid var(--line); }
.al-cell b { display: block; font-size: calc(13px * var(--fs)); font-weight: 650; margin-bottom: 5px; color: var(--ink); }
.al-cell p { margin: 0; font-size: calc(11.5px * var(--fs)); line-height: 1.55; color: #7A8089; letter-spacing: .3px; }

.al-hours {
  background: #fff; border-radius: 20px;
  padding: 12px 8px 10px; margin-bottom: 12px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
}
.al-hours-title { font-size: calc(13px * var(--fs)); font-weight: 650; padding: 0 6px 8px; }
.al-hours-grid { display: grid; grid-template-columns: repeat(12, 1fr); }
.al-h {
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  padding: 3px 0;
}
.al-h .hz { font-size: calc(11.5px * var(--fs)); font-weight: 600; color: var(--ink-2); }
.al-h .hl { font-size: calc(10.5px * var(--fs)); font-weight: 700; padding: 1.5px 0; width: 16px; text-align: center; border-radius: 5px; }
.al-h .hl.ji2 { color: #C08265; background: #FFF4EF; }
.al-h .hl.xiong { color: #A9AFB9; background: #F1F2F4; }
.al-h .hg { font-size: calc(10.5px * var(--fs)); color: #C4C9D2; transform: scale(.9); }

.al-officer {
  background: #fff; border-radius: 20px;
  padding: 13px 15px; margin-bottom: 12px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
  font-size: calc(13px * var(--fs)); line-height: 1.65; color: #7A8089;
}
.al-officer b { color: #B3795F; margin-right: 6px; }
.al-link {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; padding: 13px 15px;
  background: #fff; border-radius: 16px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
  font-size: calc(13.5px * var(--fs)); font-weight: 600; color: var(--ink);
}
.al-link .chev { color: #C4C9D2; font-size: calc(17px * var(--fs)); }

/* ================= v35：去分隔线 / 近期日子子页 / 天气子页 ================= */

/* ---- 取消列表分隔线（日历 / 排班 / 我的 / 设置等页面） ---- */
.row, .row:last-child { border-bottom: none; }
.set-panel .switch-row { border-bottom: none; }
.fest-row { border-bottom: none; }
.st-row { border-bottom: none; }
.st-row:last-child { border-bottom: none; }
.pr-field { border-bottom: none; }
.pr-panel .pr-field:last-child { border-bottom: none; }
.dp-sec { border-top: none; margin-top: 6px; }
.dp-sec + .dp-sec { margin-top: 2px; }
.ics-row { border-top: none; }
.hy-day { border-bottom: none; }
.hy-day + .hy-day { border-top: none; }

/* ---- 首页黄历：宜忌同一行 ---- */
.tc-yiji {
  flex-direction: row;
  align-items: center;
  gap: 7px;
  flex-wrap: nowrap;
  overflow: hidden;
}
.tc-yiji .yj-tag.ji { margin-left: 2px; }
.tc-yiji .yj-items { flex: 0 1 auto; min-width: 0; letter-spacing: .3px; }

/* ---- 近期日子 ---- */
.fest-card { cursor: pointer; }
.fest-card:active { transform: scale(.99); }
.fest-title {
  display: flex; align-items: baseline; justify-content: space-between;
}
.fest-more {
  font-style: normal; font-size: calc(11.5px * var(--fs)); color: #C08265; font-weight: 500;
}
.fm-month {
  font-size: calc(11.5px * var(--fs)); font-weight: 650; color: #B3795F;
  padding: 14px 2px 2px; letter-spacing: .3px;
}
.fm-row {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; padding: 11px 0; text-align: left;
}
.fm-row:active { opacity: .7; }
.fm-row .fest-days { font-size: calc(13.5px * var(--fs)); color: var(--muted); }
.fm-row .fest-days.term, .fm-row .fest-days.fest, .fm-row .fest-days.world { color: #C08265; }

/* ---- 黄历子页滑动提示 ---- */
.al-swipe-tip { margin: 0 2px 10px; font-size: calc(11.5px * var(--fs)); color: #A9AFB9; text-align: center; }

/* ---- 天气子页 ---- */
.wx-empty { padding: 40px 20px; text-align: center; color: var(--ink-2); font-size: calc(13.5px * var(--fs)); }
.wx-empty p { margin: 0 0 8px; font-weight: 600; }
.wx-empty-sub { font-size: calc(11.5px * var(--fs)) !important; color: var(--muted); font-weight: 400 !important; line-height: 1.7 !important; }

.wx-hero {
  border-radius: 22px; padding: 18px 17px 15px; margin-bottom: 12px;
  background: linear-gradient(135deg, #FFE3D1, #FFF6EF 70%);
}
.wx-hero.wx-cloud { background: linear-gradient(135deg, #E9EBF1, #F7F8FA 70%); }
.wx-hero.wx-rain { background: linear-gradient(135deg, #DDE7F1, #F3F7FB 70%); }
.wx-hero.wx-snow { background: linear-gradient(135deg, #E5EEF6, #F7FAFD 70%); }
.wx-hero-top { display: flex; justify-content: space-between; align-items: flex-start; }
.wx-city { margin: 0 0 6px; font-size: calc(13px * var(--fs)); color: #6A7078; }
.wx-temp { font-size: calc(17px * var(--fs)); font-weight: 700; line-height: 1; letter-spacing: -1px; color: var(--ink); }
.wx-hl { margin: 8px 0 0; font-size: calc(13px * var(--fs)); color: #6A7078; }
.wx-big { font-size: calc(17px * var(--fs)); line-height: 1; filter: drop-shadow(0 3px 6px rgba(20,22,26,.08)); }
.wx-meta {
  display: flex; justify-content: space-between;
  margin-top: 14px; padding-top: 12px; border-top: 1px solid rgba(20,22,26,.07);
}
.wx-meta div { display: flex; flex-direction: column; align-items: center; gap: 2px; flex: 1; }
.wx-meta b { font-size: calc(13.5px * var(--fs)); font-weight: 650; color: var(--ink); font-variant-numeric: tabular-nums; }
.wx-meta b .wx-unit { font-style: normal; font-size: calc(10.5px * var(--fs)); color: var(--muted); font-weight: 400; }
.wx-meta span { font-size: calc(10.5px * var(--fs)); color: #8C93A0; }

.wx-card {
  background: #fff; border-radius: 20px; padding: 13px 14px;
  margin-bottom: 12px; box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
}
.wx-card-title { font-size: calc(13px * var(--fs)); font-weight: 650; margin-bottom: 10px; }

.wx-hours { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; padding-bottom: 2px; }
.wx-hours::-webkit-scrollbar { display: none; }
.wx-hour {
  flex: 0 0 44px; display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 4px 0;
}
.wx-h1 { font-size: calc(10.5px * var(--fs)); color: var(--muted); white-space: nowrap; }
.wx-hour.today-now .wx-h1 { color: #B3795F; font-weight: 600; }
.wx-hi { font-size: calc(17px * var(--fs)); line-height: 1; }
.wx-ht { font-size: calc(13px * var(--fs)); font-weight: 650; color: var(--ink); }
.wx-hp { font-size: calc(10.5px * var(--fs)); color: #6FA3D8; min-height: 11px; }
.wx-hp.none { min-height: 11px; }

.wx-day {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 0;
}
.wx-day + .wx-day { border-top: none; }
.wx-d1 { width: 36px; font-size: calc(13px * var(--fs)); font-weight: 600; color: var(--ink); flex-shrink: 0; }
.wx-day.today .wx-d1 { color: #B3795F; }
.wx-d2 { width: 34px; font-size: calc(10.5px * var(--fs)); color: var(--muted); flex-shrink: 0; font-variant-numeric: tabular-nums; }
.wx-di { font-size: calc(15px * var(--fs)); line-height: 1; flex-shrink: 0; }
.wx-dp { width: 30px; font-size: calc(10.5px * var(--fs)); color: #6FA3D8; text-align: right; flex-shrink: 0; }
.wx-dmin { width: 28px; text-align: right; font-size: calc(11.5px * var(--fs)); color: var(--muted); font-variant-numeric: tabular-nums; flex-shrink: 0; }
.wx-dmax { width: 28px; font-size: calc(11.5px * var(--fs)); font-weight: 600; color: var(--ink-2); font-variant-numeric: tabular-nums; flex-shrink: 0; }
.wx-bar {
  flex: 1; height: 5px; border-radius: 3px; background: #F0F1F4;
  position: relative; overflow: hidden; min-width: 40px;
}
.wx-bar i {
  position: absolute; top: 0; bottom: 0; border-radius: 3px;
  background: linear-gradient(90deg, #9BC1E8, #EDA08A);
}

/* ============ v37：多排班表 ============ */
/* 排班页顶部的表切换标签 */
.sched-tabs {
  display: flex; gap: 4px; align-items: center;
  overflow-x: auto; padding: 3px; margin-bottom: 10px;
  background: #EAECEF; border-radius: 12px;
  scrollbar-width: none; -ms-overflow-style: none;
}
.sched-tabs::-webkit-scrollbar { width: 0; height: 0; display: none; }
.sched-tab {
  flex: 0 0 auto;
  border: 0; border-radius: 9px;
  background: transparent; color: var(--muted);
  height: 34px; padding: 0 15px; font-size: calc(13.5px * var(--fs)); font-weight: 600;
  display: inline-flex; align-items: center; gap: 5px;
  font-family: inherit; cursor: pointer;
  transition: all .18s;
}
.sched-tab.active { background: #fff; color: var(--ink); font-weight: 650; box-shadow: 0 1px 4px rgba(16, 24, 40, .1); }
.sched-tab.add {
  background: transparent; border: 1.5px dashed #C9CDD4;
  color: var(--muted); height: 34px; padding: 0 13px; font-size: calc(15px * var(--fs)); font-weight: 500;
}
.sched-tab.edit {
  background: transparent; border: 1px solid #E3E5E9;
  color: var(--muted); padding: 7px 10px;
}
.sched-tab.edit svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }

/* 日历下方详情卡：多表小标签 */
.dp-shift-wrap { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.dp-scheds {
  display: flex; gap: 6px; flex-wrap: nowrap;
  overflow-x: auto; scrollbar-width: none; -ms-overflow-style: none;
}
.dp-scheds::-webkit-scrollbar { width: 0; height: 0; display: none; }
.dp-sched-tab {
  flex: 0 0 auto; white-space: nowrap;
  border: none; border-radius: 999px; padding: 4px 11px;
  background: #F0F1F3; color: var(--muted);
  font-size: calc(11.5px * var(--fs)); font-weight: 600; font-family: inherit; cursor: pointer;
}
.dp-sched-tab.active { background: #FFF3ED; color: #B3795F; }

/* ================= v38：格子改版 / 表头固定 / 翻页动画 ================= */

/* ---- 日历格子：彩色框只框住日期数字，班次字在框下方单独显示 ---- */
.day.selected,
.day.today.selected { background: transparent; }
.day .dnum {
  width: 32px; height: 32px;
  font-size: calc(17px * var(--fs));
}
.day.selected .dnum { background: var(--ink); color: #fff; font-weight: 650; border-radius: 11px; }
.day.today.selected .dnum { background: #DE8F72; color: #fff; }
/* 选中日不再整块变色，恢复农历 / 标签原本配色 */
.day.selected .lunar { color: #A7ADB8; }
.day.selected .lunar.fest { color: #E0703F; font-weight: 600; }
.day.selected .lunar.term { color: #C08265; font-weight: 600; }
.day.selected.today .lunar { color: #F08A64; }
.day.selected .tag { box-shadow: none; }
.day.selected .evdot { background: var(--accent); box-shadow: 0 0 0 1.5px #fff; }
.day.selected .bar.empty { background: #EFF1F4; }

/* ---- 年月行 + 星期行固定（滚动时不跟着走） ---- */
/* v38 行内 sticky 方案已废弃（v39 改为独立表头 + JS 固定） */

/* ================= v39：表头永久固定 / 详情卡重构 / 主页统一版式 ================= */

/* ---- 日历表头：通栏、与日历卡对齐；原生 sticky 固定（无 JS 监听，不抖动） ---- */
.cal-sticky {
  position: sticky;
  top: var(--cal-sticky, 62px);
  z-index: 12;
  background: var(--card);
  margin: 0 -16px;
  padding: 10px 8px 0;
}
.cal-card {
  margin-top: 0;
  overflow: visible;
}
/* 覆盖 v38 的行内 sticky 方案（固定改由 JS 驱动） */
.cal-head {
  position: static;
  margin: 0; padding: 0 4px 6px;
  background: none; border-radius: 0;
  top: auto; z-index: auto;
}
.weekdays {
  position: static;
  margin: 0; padding: 4px 0 2px;
  background: none;
  top: auto; z-index: auto;
}
.cal-grip { padding: 5px 0 4px; }
.cal-sticky + .cal-card { margin-top: 0; }

/* ---- v57：日期一行，农历·星期作子行，与天气并列 ---- */
.dp-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.dp-date { min-width: 0; }
.dp-date .tc-date { font-size: calc(17px * var(--fs)); font-weight: 700; letter-spacing: -.2px; }
.dp-date-sub {
  margin: 3px 0 0; font-size: calc(11.5px * var(--fs)); color: var(--muted);
  letter-spacing: .2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.dp-head .tc-weather { margin-bottom: 0; padding: 8px 26px 8px 13px; gap: 7px; flex: none; max-width: 62%; }
.dp-head .tc-weather .wr { display: none; }
.dp-head .tc-weather-city { max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---- 详情卡：去大框，日期/干支直接排在页面上 ---- */
.today-card {
  background: none;
  box-shadow: none;
  border-radius: 0;
  padding: 0;
}
.tc-top { margin-bottom: 0; align-items: baseline; }
.tc-lunar-inline { font-size: calc(13.5px * var(--fs)); color: #B3795F; font-weight: 600; }
.tc-week { font-size: calc(11.5px * var(--fs)); color: var(--muted); }
.tc-gz { margin: 1px 0 4px; font-size: calc(11.5px * var(--fs)); color: var(--muted); letter-spacing: .3px; }
/* 宜忌 / 星座：去内部小框 */
.tc-yiji {
  background: none;
  border-radius: 0;
  padding: 10px 26px 6px 4px;
  margin-bottom: 0;
}
.tc-zodiac {
  background: none;
  border-radius: 0;
  padding: 8px 4px;
  margin-bottom: 0;
}
/* 事件：一条一张白卡 */
.dp-events { gap: 9px; }
.dp-events .swipe-wrap {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
  overflow: hidden;
}
.dp-events .de-row { background: transparent; }

/* ---- 排班 chips：字号收小 ---- */
.chip.sm { padding: 6px 11px; font-size: calc(11.5px * var(--fs)); border-radius: 10px; gap: 4px; }

/* ---- 近期日子：标题在框外，条目一张一张白卡 ---- */
.fest-card {
  background: none;
  box-shadow: none;
  border-radius: 0;
  padding: 0;
  margin-top: 0;
}
.fest-list { display: flex; flex-direction: column; gap: 9px; }
.fest-card .fest-row {
  background: #fff;
  border-radius: 16px;
  padding: 12px 15px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
}

/* ---- 黄历子页：顶部导航固定，翻页只滑内容 ---- */
.al-top {
  position: sticky;
  top: 0;
  z-index: 6;
  background: var(--bg);
  margin: 0 -16px 10px;
  padding: 2px 16px 8px;
}
.al-top .al-nav { margin-bottom: 0; }
.al-content { will-change: transform; }


/* v42：禁双击缩放（快速点箭头切月/年时会被浏览器判成双击缩放，导致页面错乱） */
html, body, button, .day, .tab, .chip, .icon-btn, .cal-month, .weekdays, .cal-grip {
  touch-action: manipulation;
}


/* ================= v43：滚动折叠日历 ================= */
html { overflow-anchor: none; } /* 折叠改高度时不让浏览器自动补偿滚动，避免抖动 */
#calGridSpacer { display: block; width: 100%; }
#calGridInner { will-change: transform; }

/* ================= v45：详情区重排 ================= */
/* 图例与日期之间空开一到两行 */
.today-card { margin-top: 30px; }

/* 宜忌 / 星座：白卡样式（参照天气条） */
.tc-yiji {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
  padding: 11px 26px 11px 12px;
  margin-bottom: 9px;
}
.tc-zodiac {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
  padding: 12px 30px 12px 12px;
  margin-bottom: 0;
}

/* 排班 / 事件：独立模块，标题在框外（参照天气 / 近期） */
.tc-mod-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 20px 4px 10px;
}
.tc-mod-head h2 {
  font-size: calc(15px * var(--fs));
  margin: 0;
  font-weight: 650;
  letter-spacing: -.1px;
}
.tc-mod-head .dp-add { align-self: center; }

/* ================= v46：天气作为日期下方第一个子内容 ================= */
.tc-weather {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
  padding: 11px 30px 11px 15px;
  margin-bottom: 9px;
  position: relative;
  cursor: pointer;
}
.tc-weather .wi { font-size: calc(17px * var(--fs)); line-height: 1; }
.tc-weather .wt { font-size: calc(17px * var(--fs)); font-weight: 600; }
.tc-weather .wr { font-size: calc(11.5px * var(--fs)); color: var(--muted); }
.tc-weather-city {
  margin-left: auto;
  font-size: calc(11.5px * var(--fs));
  color: var(--muted);
}
.tc-weather .tc-chev {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: calc(17px * var(--fs));
  color: #C4C9D2;
  line-height: 1;
}

/* ================= v47：排班 / 事件改为入口卡 ================= */
.tc-entry {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border: none;
  border-radius: 16px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
  padding: 13px 32px 13px 15px;
  font-family: inherit;
  text-align: left;
  position: relative;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.tc-entry-name { font-size: calc(13px * var(--fs)); color: var(--muted); flex-shrink: 0; }
.tc-entry-val {
  font-size: calc(13.5px * var(--fs));
  font-weight: 600;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tc-entry-val.muted { font-weight: 500; color: var(--muted); }
.tc-entry-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.tc-entry .tc-chev {
  position: absolute;
  right: 13px;
  top: 50%;
  transform: translateY(-50%);
  font-size: calc(17px * var(--fs));
  color: #C4C9D2;
  line-height: 1;
}
.dp-more {
  background: none;
  border: none;
  font-family: inherit;
  font-size: calc(13px * var(--fs));
  color: var(--muted);
  padding: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 2px;
}
.dp-more-chev { color: #C4C9D2; font-size: calc(15px * var(--fs)); line-height: 1; }

/* ================= v49：排班卡内嵌排班表切换 ================= */
.tc-entry-sched {
  flex-direction: column;
  align-items: stretch;
  gap: 9px;
  padding: 11px 32px 12px 12px;
}
.tc-sched-top {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.tc-sched-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  min-width: 0;
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
  padding: 1px 0;
}
.tc-sched-tabs::-webkit-scrollbar { width: 0; height: 0; display: none; }
.tc-sched-tab {
  flex: 0 0 auto;
  border: none;
  background: #F4F5F7;
  color: var(--muted);
  border-radius: 999px;
  padding: 5px 12px;
  font-size: calc(13px * var(--fs));
  font-weight: 600;
  font-family: inherit;
  line-height: 1.25;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background .16s, color .16s;
}
.tc-sched-tab.active {
  background: #FFF3ED;
  color: #B3795F;
}
.tc-sched-body {
  display: flex;
  align-items: center;
  gap: 7px;
  padding-left: 2px;
  min-width: 0;
}
.tc-sched-label {
  font-size: calc(11.5px * var(--fs));
  color: var(--muted);
}
.tc-sched-val {
  font-size: calc(13.5px * var(--fs));
  font-weight: 600;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tc-sched-val.muted { font-weight: 500; color: var(--muted); }

/* ================= v55：笔记插图 / 编辑器元信息 / 天气多城市 ================= */

/* 编辑器标题下的日期 · 字数 */
.nt-edmeta {
  font-size: calc(11.5px * var(--fs));
  color: #A7ADB8;
  margin: -2px 2px 8px;
  letter-spacing: .1px;
}

/* 图片预览条（编辑器内） */
.nt-imgstrip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 4px 0 10px;
}
.nt-imgcell { position: relative; }
.nt-imgcell img {
  width: 74px; height: 74px;
  object-fit: cover;
  border-radius: 12px;
  display: block;
  border: 1px solid var(--line);
}
.nt-imgx {
  position: absolute;
  top: -7px; right: -7px;
  width: 21px; height: 21px;
  border-radius: 50%;
  background: rgba(20, 22, 26, .82);
  color: #fff;
  font-size: calc(13px * var(--fs));
  line-height: 21px;
  text-align: center;
}
.nt-imgbtn { margin-bottom: 16px; }
.dy-imgbtn { margin-top: 8px; color: var(--muted); }
.dy-toolrow { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.dy-toolrow .dy-imgbtn { margin-top: 0; }

/* 卡片缩略图（记事 / 日记列表） */
.nt-card-imgs {
  display: flex;
  gap: 6px;
  margin: 2px 0 6px;
}
.nt-card-imgs img {
  width: 62px; height: 62px;
  object-fit: cover;
  border-radius: 10px;
  background: #F4F5F7;
}

/* 天气子页：城市切换条 */
.wx-citybar {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 2px 12px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.wx-citybar::-webkit-scrollbar { display: none; }
.wx-citychip {
  flex-shrink: 0;
  padding: 8px 14px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--line);
  font-size: calc(13px * var(--fs));
  color: var(--ink-2);
  transition: background .18s, color .18s, border-color .18s;
}
.wx-citychip.active {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
  font-weight: 650;
}
/* v61：长按删除城市弹层 */
.nt-sheet-note { font-size: calc(11.5px * var(--fs)); color: var(--muted); padding: 0 2px 10px; }
.wx-del-row { display: flex; gap: 10px; padding: 2px 0 8px; }
.wx-del-row button {
  flex: 1; padding: 13px 0; border-radius: 14px; font-size: calc(15px * var(--fs)); font-weight: 600;
  border: none; cursor: pointer;
}
.wx-del-cancel { background: #F2F3F5; color: var(--ink); }
.wx-del-ok { background: #FBEBE4; color: #B4543A; }

.wx-citychip.add { color: #B3795F; border-style: dashed; }

/* ---- v57：切城滑动动画 + 视图切换 ---- */
#wxSelBody { will-change: transform, opacity; }
.wx-out-l { transform: translateX(-38px); opacity: 0; transition: transform .17s ease, opacity .17s ease; }
.wx-out-r { transform: translateX(38px); opacity: 0; transition: transform .17s ease, opacity .17s ease; }
.wx-in-l { animation: wxInL .24s ease both; }
.wx-in-r { animation: wxInR .24s ease both; }
@keyframes wxInL { from { transform: translateX(-38px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes wxInR { from { transform: translateX(38px); opacity: 0; } to { transform: none; opacity: 1; } }
.wx-cityblock { margin-bottom: 18px; }
/* v58：平铺视图 = 简单条目 */
.wx-lrows {
  display: flex; flex-direction: column;
  background: #fff; border-radius: 18px; overflow: hidden;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .04); border: 1px solid var(--line);
}
.wx-lrow {
  display: flex; align-items: center; gap: 10px;
  width: 100%; padding: 15px 16px; text-align: left;
  background: none; border: none; border-bottom: 1px solid #F2F3F5;
  font-family: inherit; cursor: pointer;
}
.wx-lrow:last-child { border-bottom: none; }
.wx-lrow:active { background: #FAFBFC; }
.wx-lemoji { font-size: calc(17px * var(--fs)); line-height: 1; }
.wx-lname { font-size: calc(15px * var(--fs)); font-weight: 600; color: var(--ink); }
.wx-ltext { font-size: calc(11.5px * var(--fs)); color: var(--muted); }
.wx-ltemp { margin-left: auto; font-size: calc(17px * var(--fs)); font-weight: 650; color: var(--ink); }
.wx-lrange { font-size: calc(11.5px * var(--fs)); color: var(--muted); min-width: 62px; text-align: right; }

/* 添加城市页 */
.city-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 13px 4px;
  border-bottom: 1px solid #F2F3F5;
  text-align: left;
  font-size: calc(15px * var(--fs));
  color: var(--ink);
}
.city-row:last-child { border-bottom: none; }
.city-row .ck { width: 18px; height: 18px; margin-left: auto; stroke: #C08265; stroke-width: 2.4; fill: none; }
.city-row.on span { color: #C08265; font-weight: 600; }
.city-row.home-cur { flex-direction: column; align-items: flex-start; gap: 2px; }
.city-row.home-cur span { font-size: calc(15px * var(--fs)); font-weight: 600; color: var(--ink); }
/* v60：详情页顶栏放两个图标按钮（视图 + 添加城市） */
#detailPage .set-topbar { grid-template-columns: 48px 1fr auto auto; }
.city-row em {
  font-style: normal;
  font-size: calc(11.5px * var(--fs));
  color: #A7ADB8;
  margin-left: auto;
}
.city-del {
  flex-shrink: 0;
  padding: 5px 12px;
  border-radius: 999px;
  background: #F4F5F7;
  font-size: calc(11.5px * var(--fs));
  color: #E05555;
}

/* ================= v56：编辑器撤销/重做/对号 + 格式工具 + 预览 + 天气横滑 ================= */

/* 头部操作区：撤销 ↶ / 重做 ↷ / 对号 ✓ */
/* 编辑器头部：第三列放开给三个按钮 */
.set-topbar.has-ed-actions { grid-template-columns: 48px 1fr auto; }
.ed-actions { display: flex; align-items: center; gap: 0; margin-left: auto; flex-shrink: 0; }
.ed-ibtn {
  width: 37px; height: 44px;
  display: grid; place-items: center;
  transition: transform .14s, opacity .2s;
}
.ed-ibtn:active { transform: scale(.9); }
.ed-ibtn svg {
  width: 22px; height: 22px;
  fill: none; stroke: var(--ink);
  stroke-width: 2.1; stroke-linecap: round; stroke-linejoin: round;
}
.ed-ibtn.ok svg { stroke-width: 2.6; }

/* 格式工具行 */
.nt-fmtbar {
  /* v58：平时隐藏，输入法弹出时浮在键盘上方 */
  position: fixed;
  left: 0; right: 0;
  bottom: var(--kb-off, 0px);
  z-index: 62;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 8px 12px calc(8px + env(safe-area-inset-bottom, 0px));
  background: #fff;
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  transform: translateY(130%);
  visibility: hidden;
  pointer-events: none;
  transition: transform .2s ease, visibility .2s;
}
.nt-fmtbar.kb-on {
  transform: translateY(0);
  visibility: visible;
  pointer-events: auto;
}
/* v64：键盘弹出时整页收缩到键盘上方，底部内容与光标不再被输入法盖住 */
body.kb-open .settings-page {
  top: var(--kb-top, 0px);
  bottom: var(--kb-off, 0px);
}
/* 页面已经收缩，格式条改为贴住页面底（=键盘上沿），避免二次偏移飞到顶部 */
body.kb-open .nt-fmtbar { bottom: 0; }
body.kb-open #ntEdScroll,
body.kb-open #dyEdScroll {
  padding-bottom: calc(170px + env(safe-area-inset-bottom, 0px)) !important;
  scroll-padding-bottom: calc(170px + env(safe-area-inset-bottom, 0px));
}
.nt-fmtbar::-webkit-scrollbar { display: none; }
.nt-fmtbar button {
  flex-shrink: 0;
  min-width: 46px;
  height: 40px;
  padding: 0 12px;
  border-radius: 12px;
  background: #F4F5F7;
  font-size: calc(15px * var(--fs));
  color: var(--ink);
  display: grid;
  place-items: center;
  transition: background .18s, transform .14s;
}
.nt-fmtbar button:active { background: #EBEDF0; transform: scale(.94); }

/* 预览视图 */
.nt-preview {
  font-size: calc(15px * var(--fs));
  line-height: 1.9;
  color: var(--ink-2);
  padding: 4px 2px;
  min-height: 60px;
}
.nt-preview p { margin: 0 0 8px; }
.nt-preview .md-h { font-weight: 700; font-size: calc(17px * var(--fs)); color: var(--ink); }
.nt-preview .md-q {
  border-left: 3px solid var(--accent);
  padding-left: 10px;
  color: var(--muted);
}
.md-ul { margin: 0 0 8px; padding-left: 22px; }
.md-ul li { margin-bottom: 3px; }

/* 卡片正文支持格式标记（换行保留） */
.nt-card-body { white-space: pre-line; }

/* 日记天气一行横滑 */
.chip-row.scroll-x {
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 2px;
}
.chip-row.scroll-x::-webkit-scrollbar { display: none; }
.chip-row.scroll-x .mini-chip { flex-shrink: 0; }

/* ================= v65：我的页新模块入口 ================= */
.me-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 9px;
  margin: 2px 0 14px;
}
.me-card {
  background: var(--card);
  border-radius: 17px;
  border: 1px solid transparent;
  padding: 13px 6px 11px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .03);
  transition: transform .14s, background .16s;
}
.me-card:active { transform: scale(.97); background: #F7F8FA; }
.me-card svg {
  width: 23px; height: 23px;
  fill: none; stroke: var(--ink); stroke-width: 1.7;
  stroke-linecap: round; stroke-linejoin: round;
}
.me-card b {
  font-size: calc(13px * var(--fs));
  font-weight: 650;
  color: var(--ink);
}
.me-card small {
  font-size: calc(10.5px * var(--fs));
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.me-card.soon { opacity: .5; }

/* ================= v65：健康页 ================= */
#view-health { --hc: #5F8F7B; }
.hc-hero {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: var(--card);
  border-radius: 18px;
  padding: 16px 6px;
  margin: 4px 0 2px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .03);
}
.hc-hero-item { text-align: center; position: relative; }
.hc-hero-item + .hc-hero-item::before {
  content: "";
  position: absolute; left: 0; top: 12%;
  width: 1px; height: 76%;
  background: var(--line);
}
.hc-hero-item strong {
  display: block;
  font-size: calc(17px * var(--fs));
  font-weight: 700;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  letter-spacing: -.5px;
}
.hc-hero-item span {
  font-size: calc(10.5px * var(--fs));
  color: var(--muted);
}
.hc-day { margin-top: 16px; }
.hc-panel { padding: 0 16px; }
.hc-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}
.hc-row:last-child { border-bottom: none; }
.hc-ico {
  width: 24px; height: 24px; flex: none;
  display: grid; place-items: center;
  color: var(--hc);
}
.hc-ico svg {
  width: 20px; height: 20px;
  fill: none; stroke: currentColor; stroke-width: 1.7;
  stroke-linecap: round; stroke-linejoin: round;
}
.hc-name {
  flex: 1; min-width: 0;
  font-size: calc(13.5px * var(--fs));
  font-weight: 600;
  color: var(--ink);
}
.hc-step {
  width: 31px; height: 31px; flex: none;
  border-radius: 10px;
  background: #F4F5F7;
  color: var(--ink-2);
  font-size: calc(17px * var(--fs)); line-height: 1;
  display: grid; place-items: center;
  transition: transform .12s, background .16s;
}
.hc-step:active { background: #EAECEF; transform: scale(.93); }
.hc-val {
  width: 58px; flex: none;
  text-align: center;
  border: none;
  border-bottom: 1.5px solid transparent;
  background: transparent;
  padding: 2px 0;
  font-size: calc(17px * var(--fs));
  font-weight: 700;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  outline: none;
  border-radius: 0;
}
.hc-val:focus { border-bottom-color: var(--hc); }
.hc-val::placeholder { color: #C6CBD3; font-weight: 600; }
.hc-val::-webkit-outer-spin-button,
.hc-val::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.hc-unit {
  width: 20px; flex: none;
  margin-left: -4px;
  font-size: calc(10.5px * var(--fs));
  color: var(--muted);
  font-style: normal;
}
.hc-sporttypes { margin-top: 10px; }
.hc-chart-panel { padding: 14px 14px 10px; }
.hc-seg { display: flex; margin: 0 0 14px; }
.hc-seg .seg-btn { flex: 1; min-width: 0; }
.hc-chart svg { display: block; width: 100%; height: auto; }
.hc-chart-empty {
  text-align: center;
  font-size: calc(11.5px * var(--fs));
  color: var(--muted);
  padding: 30px 0 34px;
}
.hc-history { display: flex; flex-direction: column; gap: 8px; }
.hc-hrow {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--card);
  border-radius: 14px;
  padding: 11px 14px;
}
.hc-hdate {
  flex: 1; min-width: 0;
  font-size: calc(13px * var(--fs));
  font-weight: 600;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.hc-hdate em {
  font-style: normal;
  font-weight: 400;
  color: var(--muted);
  margin-left: 6px;
  font-size: calc(11.5px * var(--fs));
}
.hc-hvals {
  display: flex; gap: 11px;
  font-size: calc(11.5px * var(--fs));
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.hc-hvals b { color: var(--ink-2); font-weight: 600; }
.hc-empty {
  text-align: center;
  font-size: calc(11.5px * var(--fs));
  color: var(--muted);
  padding: 22px 0 26px;
}
/* 健康页输入时同样把页面让到键盘上方 */
body.kb-open #view-health { padding-bottom: calc(150px + env(safe-area-inset-bottom, 0px)); }

/* ================= v66：健康 = 吃与练 ================= */
#view-health { --hc: #5F8F7B; --hc2: #C08265; }
.topbar-more.stroke svg { fill: none !important; stroke: var(--ink); stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.hc-tabs { margin: 2px 0 14px; }
.hc-pane.hidden { display: none !important; }

.hc-prog {
  display: flex; align-items: center; gap: 14px;
  background: var(--card); border-radius: 18px;
  padding: 14px 16px; margin: 2px 0;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .03);
}
.hc-ring { width: 74px; height: 74px; flex: none; }
#hcRingFg { transition: stroke-dashoffset .55s cubic-bezier(.2, .8, .3, 1); }
.hc-prog-txt { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.hc-prog-txt strong { font-size: calc(15px * var(--fs)); font-weight: 700; color: var(--ink); }
.hc-prog-txt span { font-size: calc(11.5px * var(--fs)); color: var(--muted); line-height: 1.55; }
.hc-foot { margin: 12px 2px 0; font-size: calc(11.5px * var(--fs)); color: #A9AFB8; line-height: 1.6; }

.hc-todo {
  display: flex; align-items: center; gap: 11px;
  width: 100%; padding: 12px 0; text-align: left;
  background: none; border: 0; border-bottom: 1px solid var(--line);
}
.hc-todo:last-child { border-bottom: none; }
.hc-todo-time { width: 40px; flex: none; font-size: calc(11.5px * var(--fs)); color: var(--muted); font-variant-numeric: tabular-nums; }
.hc-todo-main { flex: 1; min-width: 0; }
.hc-todo-main b { display: block; font-size: calc(13.5px * var(--fs)); font-weight: 600; color: var(--ink); }
.hc-todo-main span { display: block; margin-top: 1px; font-size: calc(10.5px * var(--fs)); color: var(--muted); }
.hc-todo-val { font-size: calc(11.5px * var(--fs)); color: var(--muted); font-variant-numeric: tabular-nums; }
.hc-todo.done .hc-todo-main b { color: #9AA1AB; text-decoration: line-through; text-decoration-color: #CDD2D8; }

.hc-check {
  width: 26px; height: 26px; flex: none; border-radius: 50%;
  border: 1.6px solid #D6DAE0; background: #fff; color: transparent;
  font-size: calc(13px * var(--fs)); line-height: 1; display: grid; place-items: center;
  transition: background .16s, border-color .16s, transform .12s;
}
.hc-check[data-on="1"] { background: var(--hc); border-color: var(--hc); color: #fff; }
.hc-check:active { transform: scale(.9); }

.hc-pbar-card {
  background: var(--card); border-radius: 18px;
  padding: 15px 16px 13px; margin: 2px 0 4px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .03);
}
.hc-pbar-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 10px; }
.hc-pbar-head > span { font-size: calc(13px * var(--fs)); color: var(--muted); font-weight: 500; }
.hc-pbar-head strong { font-size: calc(17px * var(--fs)); font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.hc-pbar-head strong b { font-size: calc(17px * var(--fs)); }
.hc-pbar-head strong em { font-style: normal; color: var(--muted); font-weight: 500; font-size: calc(13px * var(--fs)); }
.hc-pbar-head strong i { font-style: normal; font-size: calc(11.5px * var(--fs)); color: var(--muted); margin-left: 3px; }
.hc-pbar { height: 8px; border-radius: 5px; background: #EFF1F3; overflow: hidden; }
.hc-pbar > i { display: block; height: 100%; width: 0; border-radius: 5px; background: var(--hc2); transition: width .45s cubic-bezier(.2, .8, .3, 1); }
#hcWeekFill { background: var(--hc); }
.hc-pbar-tip { margin: 8px 0 0; font-size: calc(11.5px * var(--fs)); color: var(--muted); line-height: 1.5; }

.hc-meals { display: flex; flex-direction: column; gap: 9px; }
.hc-meal { background: var(--card); border-radius: 16px; padding: 13px 15px 11px; box-shadow: 0 1px 2px rgba(16, 24, 40, .03); }
.hc-meal-head { display: flex; align-items: center; gap: 8px; }
.hc-meal-head b { font-size: calc(13.5px * var(--fs)); font-weight: 650; color: var(--ink); }
.hc-meal-head > span { font-size: calc(11.5px * var(--fs)); color: var(--muted); font-variant-numeric: tabular-nums; }
.hc-meal-head em { margin-left: auto; font-style: normal; font-size: calc(11.5px * var(--fs)); font-weight: 650; color: var(--hc2); font-variant-numeric: tabular-nums; }
.hc-meal-items { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px; }
.hc-mi { display: inline-flex; align-items: center; gap: 4px; background: #F5F6F8; border-radius: 8px; padding: 4px 8px; font-size: calc(11.5px * var(--fs)); color: var(--ink-2); }
.hc-mi i { font-style: normal; color: var(--muted); font-size: calc(10.5px * var(--fs)); }
.hc-mi-empty { font-size: calc(11.5px * var(--fs)); color: #B4BAC3; }
.hc-meal-add { margin-top: 9px; width: 100%; height: 34px; border-radius: 10px; background: #F5F6F8; color: var(--ink-2); font-size: calc(13px * var(--fs)); font-weight: 600; }
.hc-meal-add:active { background: #EBEEF1; }

.hc-suggest { padding-top: 2px !important; padding-bottom: 2px !important; }
.hc-sg { display: flex; align-items: center; gap: 10px; width: 100%; padding: 11px 0; text-align: left; background: none; border: 0; border-bottom: 1px solid var(--line); }
.hc-sg:last-child { border-bottom: none; }
.hc-sg-main { flex: 1; min-width: 0; }
.hc-sg-main b { display: block; font-size: calc(13px * var(--fs)); font-weight: 600; color: var(--ink); }
.hc-sg-main span { font-size: calc(10.5px * var(--fs)); color: var(--muted); }
.hc-sg-p { font-size: calc(13px * var(--fs)); font-weight: 650; color: var(--hc2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.hc-sg-go { width: 24px; height: 24px; flex: none; border-radius: 50%; background: #F5F6F8; color: var(--ink-2); display: grid; place-items: center; font-size: calc(15px * var(--fs)); }

.hc-week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; margin: 10px 0 2px; }
.hc-wday { text-align: center; background: var(--card); border-radius: 12px; padding: 8px 2px 7px; }
.hc-wday > span { display: block; font-size: calc(10.5px * var(--fs)); color: var(--muted); }
.hc-wday > b { display: block; margin: 3px 0 3px; font-size: calc(11.5px * var(--fs)); font-weight: 700; color: #C6CBD3; font-variant-numeric: tabular-nums; }
.hc-wday > b.on { color: var(--hc); }
.hc-wday.today { background: #EFF5F1; }
.hc-wday > i { display: block; height: 3px; width: 16px; margin: 0 auto; border-radius: 2px; background: #EFF1F3; }
.hc-wday > i.f { background: var(--hc); }

.hc-plan { padding: 14px 16px !important; }
.hc-plan-k { display: inline-flex; align-items: center; gap: 5px; font-size: calc(10.5px * var(--fs)); font-weight: 650; color: var(--hc); background: #EFF5F1; border-radius: 6px; padding: 2px 7px; margin-bottom: 8px; }
.hc-plan h3 { margin: 0 0 5px; font-size: calc(17px * var(--fs)); font-weight: 700; color: var(--ink); letter-spacing: -.2px; }
.hc-plan p { margin: 0; font-size: calc(11.5px * var(--fs)); color: var(--muted); line-height: 1.6; }
.hc-plan-btns { display: flex; gap: 8px; margin-top: 12px; }
.hc-plan-btns button { flex: 1; height: 36px; border-radius: 11px; background: #F5F6F8; color: var(--ink); font-size: calc(13px * var(--fs)); font-weight: 650; transition: transform .12s; }
.hc-plan-btns button.main { background: var(--hc); color: #fff; }
.hc-plan-btns button:active { transform: scale(.97); }

.hc-food-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 7px; }
.hc-food { display: flex; align-items: center; gap: 8px; background: #F7F8FA; border-radius: 12px; padding: 10px 11px; text-align: left; }
.hc-food:active { background: #EDF0F3; }
.hc-food > div { min-width: 0; }
.hc-food b { display: block; font-size: calc(13px * var(--fs)); font-weight: 600; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hc-food span { display: block; margin-top: 1px; font-size: calc(10.5px * var(--fs)); color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hc-food em { margin-left: auto; flex: 0 0 auto; font-style: normal; font-size: calc(11.5px * var(--fs)); font-weight: 700; color: var(--hc2); font-variant-numeric: tabular-nums; }
/* v135：窄屏降单列，避免两列挤压折行（清单 A6/B2） */
@media (max-width: 340px) { .hc-food-grid { grid-template-columns: 1fr; } }

.hc-set-row { display: flex; align-items: center; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.hc-set-row:last-child { border-bottom: none; }
.hc-set-row > label { flex: 1; min-width: 0; font-size: calc(13.5px * var(--fs)); color: var(--ink); font-weight: 500; }
.hc-set-row > label small { display: block; font-size: calc(10.5px * var(--fs)); color: var(--muted); font-weight: 400; margin-top: 2px; }
.hc-set-row input[type="number"], .hc-set-row input[type="time"] {
  width: 92px; flex: none; text-align: right; border: 0; background: #F5F6F8; border-radius: 8px;
  padding: 7px 9px; font-size: calc(13.5px * var(--fs)); font-weight: 600; color: var(--ink);
  font-variant-numeric: tabular-nums; outline: none; -webkit-appearance: none;
}
.hc-set-row input:focus { background: #EDF0F3; }
.hc-set-note { margin: 8px 0 0; font-size: calc(11.5px * var(--fs)); color: var(--muted); line-height: 1.6; }
.hc-switch { width: 44px; height: 26px; flex: none; border-radius: 14px; background: #DDE1E6; position: relative; transition: background .18s; }
.hc-switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .14); transition: transform .18s; }
.hc-switch[data-on="1"] { background: var(--hc); }
.hc-switch[data-on="1"]::after { transform: translateX(18px); }
body.kb-open #view-health { padding-bottom: calc(150px + env(safe-area-inset-bottom, 0px)); }
.hc-tabs .seg-btn { flex: 1; min-width: 0; padding-left: 0; padding-right: 0; }
.hc-seg { margin: 2px 0 12px; }
.hc-seg .seg-btn { flex: 1; min-width: 0; }

/* ================= v67：健康进主菜单 + 我的方案 ================= */
#view-health { padding-bottom: 10px; }
#view-health .hc-tabs { margin: 4px 0 13px; }
/* v117：健康页 5 条 > 4（规则 14）：放得下仍均分，字号放大放不下时允许横滑 */
#view-health .hc-tabs { overflow-x: auto; scrollbar-width: none; }
#view-health .hc-tabs::-webkit-scrollbar { display: none; }
#view-health .hc-tabs .seg-btn { flex: 1 0 auto; min-width: 58px; }
#view-health .hc-tabs .seg-btn {
  padding: 7px 0;
  font-size: calc(11.5px * var(--fs));
}

/* --- 方案页顶部引导卡 --- */
.hc-ai-card {
  padding: 15px 16px 14px !important;
  display: flex; flex-direction: column; gap: 5px;
  background: linear-gradient(180deg, #F3F8F5 0%, #FFFFFF 78%);
  border: 1px solid #E4EDE7;
}
.hc-ai-card > b {
  font-size: calc(15px * var(--fs));
  font-weight: 700; color: var(--ink);
  letter-spacing: -.2px;
}
.hc-ai-card > span {
  font-size: calc(11.5px * var(--fs));
  color: var(--muted); line-height: 1.65;
}
.hc-ai-btns { display: flex; gap: 8px; margin-top: 9px; }
.hc-ai-btns button {
  flex: 1; height: 38px; border-radius: 11px;
  font-size: calc(13px * var(--fs)); font-weight: 650;
  background: #EEF1F4; color: var(--ink);
  transition: transform .12s;
}
.hc-ai-btns button:active { transform: scale(.97); }
.hc-ai-btns .hc-ai-main { background: var(--hc); color: #fff; }

/* --- 方案行（可编辑） --- */
.hc-prow {
  display: flex; align-items: center; gap: 7px;
  padding: 9px 0; border-bottom: 1px solid var(--line);
}
.hc-prow:last-child { border-bottom: none; }
.hc-prow > label {
  flex: 1; min-width: 0;
  font-size: calc(13.5px * var(--fs));
  font-weight: 500; color: var(--ink);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.hc-prow > label small {
  display: block; margin-top: 2px;
  font-size: calc(10.5px * var(--fs));
  font-weight: 400; color: var(--muted);
}
.hc-prow input[type="number"],
.hc-prow input[type="time"],
.hc-prow input[type="text"] {
  flex: none; text-align: center;
  border: 0; background: #F5F6F8; border-radius: 8px;
  padding: 7px 6px;
  font-size: calc(13px * var(--fs)); font-weight: 600; color: var(--ink);
  font-variant-numeric: tabular-nums;
  outline: none; -webkit-appearance: none;
  font-family: inherit;
}
.hc-prow input:focus { background: #EAEEF2; }
.hc-prow .w-num { width: 62px; }
.hc-prow .w-time { width: 86px; }
.hc-prow .w-name { width: 84px; text-align: left; }
.hc-prow .w-q { width: 62px; }
.hc-prow .w-p { width: 50px; }
.hc-prow input::placeholder { color: #C2C8D0; font-weight: 500; }
.hc-prow .hc-del {
  width: 26px; height: 26px; flex: none;
  display: grid; place-items: center;
  border-radius: 8px; color: #B9BFC8;
  transition: background .15s, color .15s;
}
.hc-prow .hc-del:active { background: #FBEDE9; color: #C08265; }
.hc-prow .hc-del svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.hc-prow-tag {
  flex: none; font-size: calc(10.5px * var(--fs));
  color: var(--muted); font-variant-numeric: tabular-nums;
}
.hc-add-row {
  width: 100%; height: 36px; margin-top: 8px;
  border-radius: 11px; background: #F5F6F8;
  color: var(--ink-2);
  font-size: calc(13px * var(--fs)); font-weight: 600;
}
.hc-add-row:active { background: #EBEEF1; }
.hc-group-hint {
  font-style: normal;
  font-size: calc(10.5px * var(--fs));
  font-weight: 400; color: #AFB5BE;
  margin-left: 6px;
}
.hc-avoid-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 11px 0 3px; }
.hc-mini-note { padding: 9px 0 2px; font-size: calc(11.5px * var(--fs)); color: var(--muted); line-height: 1.6; }

/* --- 导入弹层 --- */
.hc-ta {
  width: 100%; min-height: 132px; resize: none;
  border: 1px solid #E6E9ED; border-radius: 12px;
  background: #FAFBFC; padding: 11px 12px;
  font-size: calc(13px * var(--fs)); line-height: 1.7;
  color: var(--ink); outline: none;
  font-family: inherit;
}
.hc-ta:focus { background: #fff; border-color: #D8DDE3; }
.hc-file-btn {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  width: 100%; height: 40px; margin-bottom: 10px;
  border-radius: 11px; background: #F2F4F7;
  font-size: calc(13px * var(--fs)); font-weight: 600; color: var(--ink);
}
.hc-file-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.hc-file-name {
  margin: -2px 0 10px;
  font-size: calc(11.5px * var(--fs)); color: var(--hc);
  text-align: center;
}
.hc-file-name.err { color: #C0563F; font-weight: 600; }
.hc-file-tip {
  margin: -4px 0 10px;
  padding: 9px 11px;
  border-radius: 10px;
  background: #FBF4F0;
  font-size: calc(11.5px * var(--fs));
  line-height: 1.65;
  color: #8A6A5C;
}
.hc-file-tip:empty { display: none; }

/* --- 分析结果 --- */
.hc-an-sec { margin-top: 14px; }
.hc-an-sec > h4 {
  margin: 0 0 7px;
  font-size: calc(11.5px * var(--fs));
  font-weight: 650; color: var(--muted);
  letter-spacing: .3px;
}
.hc-an-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.hc-an-chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 9px; border-radius: 8px;
  font-size: calc(11.5px * var(--fs)); font-weight: 600;
}
.hc-an-chip.hi { background: #FBEDE9; color: #A9613F; }
.hc-an-chip.ok { background: #EFF5F1; color: #4E7A67; }
.hc-an-chip i { font-style: normal; font-weight: 400; opacity: .72; font-size: calc(10.5px * var(--fs)); }
.hc-an-list { display: flex; flex-direction: column; gap: 7px; }
.hc-an-item {
  display: flex; gap: 8px;
  font-size: calc(11.5px * var(--fs)); line-height: 1.6; color: var(--ink-2);
}
.hc-an-item b { flex: none; color: var(--hc); font-weight: 700; }
.hc-an-empty {
  padding: 14px 0;
  font-size: calc(11.5px * var(--fs)); color: var(--muted); line-height: 1.6;
}
.hc-an-btns { display: flex; gap: 8px; margin-top: 16px; }
.hc-an-btns button {
  flex: 1; height: 42px; border-radius: 12px;
  font-size: calc(13px * var(--fs)); font-weight: 650;
}
.hc-an-btns .main { background: var(--hc); color: #fff; }
.hc-an-btns .sub { background: #F2F4F7; color: var(--ink-2); }
.hc-food.off { opacity: .42; }
.hc-food.off em { text-decoration: line-through; }

/* ================= v69：体检报告档案 / 指标表 / 多份对比 ================= */
/* 健康色提到全局：弹层和档案页（不在 #view-health 里）也要用 */
:root { --hc: #5F8F7B; --hc2: #C08265; }
.hc-ai-reports {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; margin-top: 9px; padding: 10px 12px;
  border-radius: 11px; background: #F6F7F9; color: var(--ink);
  font-size: calc(11.5px * var(--fs)); font-weight: 600;
}
.hc-ai-reports em { font-style: normal; font-size: calc(11.5px * var(--fs)); font-weight: 600; color: var(--hc); }

/* 指标表 */
.hc-mt-wrap {
  border: 1px solid #EEF0F3; border-radius: 12px;
  max-height: 262px; overflow-y: auto;
  -webkit-overflow-scrolling: touch; overscroll-behavior: contain;
}
.hc-mt-row {
  display: grid; grid-template-columns: minmax(0, 1fr) 96px 78px;
  gap: 6px; align-items: baseline;
  padding: 8px 11px; border-bottom: 1px solid #F3F5F7;
}
.hc-mt-row:last-child { border-bottom: 0; }
.hc-mt-head {
  position: sticky; top: 0; z-index: 1;
  background: #FAFBFC;
  font-size: calc(10.5px * var(--fs)); font-weight: 600; color: var(--muted);
  padding-top: 7px; padding-bottom: 6px;
}
.hc-mt-n {
  font-size: calc(11.5px * var(--fs)); color: var(--ink);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.hc-mt-v {
  font-size: calc(13px * var(--fs)); font-weight: 650; color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.hc-mt-v i { font-style: normal; font-size: calc(10.5px * var(--fs)); font-weight: 500; color: #A9AFB9; margin-left: 2px; }
.hc-mt-v.hi { color: #C0563F; }
.hc-mt-v.lo { color: #4A7FA5; }
.hc-mt-r { font-size: calc(10.5px * var(--fs)); color: var(--muted); text-align: right; }

/* 档案页 */
.hc-rep-wrap { padding: 6px 0 10px; }
.hc-rep-hint {
  margin: 0 0 12px; padding: 10px 12px;
  border-radius: 11px; background: #F7F8FA;
  font-size: calc(11.5px * var(--fs)); line-height: 1.65; color: var(--muted);
}
.hc-rep-empty { margin: 18px 0; font-size: calc(11.5px * var(--fs)); color: var(--muted); line-height: 1.7; text-align: center; }
.hc-rep-import {
  width: 100%; height: 44px; border-radius: 12px;
  background: var(--hc); color: #fff;
  font-size: calc(13px * var(--fs)); font-weight: 650;
  margin-bottom: 14px;
}
.hc-rep-list { display: flex; flex-direction: column; gap: 9px; }
.hc-rep-item {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 13px; border-radius: 13px;
  background: #fff; box-shadow: 0 1px 0 rgba(20, 22, 26, .05), 0 0 0 1px rgba(20, 22, 26, .04);
}
.hc-rep-item.on { box-shadow: 0 0 0 1.5px var(--hc); }
.hc-rep-main { flex: 1; min-width: 0; }
.hc-rep-main b { display: block; font-size: calc(13px * var(--fs)); font-weight: 650; color: var(--ink); }
.hc-rep-main span {
  display: block; margin-top: 3px;
  font-size: calc(11.5px * var(--fs)); color: var(--muted);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.hc-rep-main em { font-style: normal; color: #C0563F; font-weight: 600; }
.hc-rep-cmp {
  flex: 0 0 auto; height: 30px; padding: 0 11px;
  border-radius: 9px; background: #F2F4F7;
  font-size: calc(11.5px * var(--fs)); font-weight: 600; color: var(--ink-2);
}
.hc-rep-cmp.on { background: var(--hc); color: #fff; }
.hc-rep-bar {
  position: sticky; bottom: 0; z-index: 3;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin-top: 14px; padding: 10px 12px;
  border-radius: 13px; background: rgba(255, 255, 255, .96);
  box-shadow: 0 -6px 20px rgba(20, 22, 26, .07), 0 0 0 1px rgba(20, 22, 26, .05);
  backdrop-filter: blur(8px);
}
.hc-rep-bar span { font-size: calc(11.5px * var(--fs)); color: var(--muted); }
.hc-rep-bar button {
  height: 36px; padding: 0 16px; border-radius: 10px;
  font-size: calc(11.5px * var(--fs)); font-weight: 650;
}
.hc-rep-bar .main { background: var(--hc); color: #fff; }
.hc-rep-bar .main[disabled] { background: #E6E9ED; color: #A9AFB9; }

.hc-rep-flash {
  margin: 0 0 12px; padding: 11px 12px;
  border-radius: 12px; background: #EFF6F1;
  box-shadow: inset 0 0 0 1px rgba(95, 143, 123, .16);
}
.hc-rep-flash b { display: block; font-size: calc(13px * var(--fs)); color: #3F6B57; }
.hc-rep-flash span { display: block; margin-top: 4px; font-size: calc(11.5px * var(--fs)); color: #4F7A66; line-height: 1.6; }

.hc-rep-head { margin-bottom: 12px; }
.hc-rep-head b { display: block; font-size: calc(17px * var(--fs)); font-weight: 700; color: var(--ink); letter-spacing: -.2px; }
.hc-rep-head span { display: block; margin-top: 3px; font-size: calc(11.5px * var(--fs)); color: var(--muted); }
.hc-rep-head p { margin: 6px 0 0; font-size: calc(11.5px * var(--fs)); color: var(--muted); }
.hc-rep-head em { font-style: normal; color: #C0563F; font-weight: 600; }

.hc-rep-judge {
  margin-bottom: 14px; padding: 13px 14px;
  border-radius: 14px; background: #fff;
  box-shadow: 0 0 0 1px rgba(20, 22, 26, .05);
}
.hc-rep-judge h4 {
  margin: 0 0 8px; font-size: calc(11.5px * var(--fs));
  font-weight: 650; color: var(--muted); letter-spacing: .3px;
}
.hc-rep-judge p { margin: 0 0 7px; font-size: calc(13px * var(--fs)); line-height: 1.72; color: var(--ink); }
.hc-rep-judge p:last-child { margin-bottom: 0; }
.hc-rep-judge .hc-mt-wrap { margin-top: 2px; }
.hc-rep-focus {
  padding: 9px 11px; border-radius: 10px;
  background: #FBF4F0; color: #8A5546 !important;
  font-weight: 600;
}

.hc-rep-acts { display: flex; gap: 8px; margin-top: 4px; }
.hc-rep-acts button {
  flex: 1; height: 40px; border-radius: 11px;
  background: #F2F4F7; color: var(--ink-2);
  font-size: calc(11.5px * var(--fs)); font-weight: 600;
}
.hc-rep-acts .danger { color: #C0563F; }

.hc-cmp { border-radius: 13px; overflow: hidden; background: #fff; box-shadow: 0 0 0 1px rgba(20, 22, 26, .05); }
.hc-cmp-row {
  display: grid; grid-template-columns: minmax(0, 1fr) 62px 62px 72px;
  gap: 4px; align-items: baseline;
  padding: 9px 12px; border-bottom: 1px solid #F3F5F7;
  font-variant-numeric: tabular-nums;
}
.hc-cmp-row:last-child { border-bottom: 0; }
.hc-cmp-head { background: #FAFBFC; font-size: calc(10.5px * var(--fs)); color: var(--muted); font-weight: 600; }
.hc-cmp-n { font-size: calc(11.5px * var(--fs)); color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hc-cmp-v { font-size: calc(11.5px * var(--fs)); color: var(--ink); text-align: right; }
.hc-cmp-d { font-size: calc(10.5px * var(--fs)); color: var(--muted); text-align: right; }
.hc-cmp-row.better .hc-cmp-d { color: #3F7A5E; font-weight: 650; }
.hc-cmp-row.worse .hc-cmp-d { color: #C0563F; font-weight: 650; }
.hc-cmp-row.worse .hc-cmp-v:last-of-type { color: #C0563F; font-weight: 650; }

/* ================= v70：方案页「能照着吃」的成品卡片 ================= */
.hc-plan-card {
  margin: 2px 0 10px;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(20, 22, 26, .04), 0 0 0 1px rgba(20, 22, 26, .045);
  overflow: hidden;
}
.hc-pc-top { padding: 16px 16px 13px; background: linear-gradient(180deg, #F3F8F5 0%, #fff 100%); }
.hc-pc-title {
  display: flex; align-items: baseline; gap: 7px;
  font-size: calc(15px * var(--fs)); font-weight: 700; color: var(--ink); letter-spacing: -.2px;
}
.hc-pc-title em {
  font-style: normal; font-size: calc(10.5px * var(--fs)); font-weight: 600; color: #fff;
  background: var(--hc); padding: 2px 6px; border-radius: 6px; letter-spacing: 0;
}
.hc-pc-sum { margin: 9px 0 0; font-size: calc(13px * var(--fs)); line-height: 1.7; color: #3A3F45; }
.hc-pc-sum b { font-weight: 700; color: var(--hc); font-variant-numeric: tabular-nums; }
.hc-pc-src { margin: 6px 0 0; font-size: calc(10.5px * var(--fs)); line-height: 1.6; color: #A0A6AF; }

.hc-pc-meals { padding: 2px 12px 4px; }
.hc-pm { margin-bottom: 8px; padding: 11px 12px 10px; border-radius: 13px; background: #F8FAF9; }
.hc-pm-head { display: flex; align-items: baseline; gap: 7px; }
.hc-pm-head b { font-size: calc(13px * var(--fs)); font-weight: 650; color: var(--ink); }
.hc-pm-head em { font-style: normal; font-size: calc(11.5px * var(--fs)); font-weight: 650; color: var(--hc2); font-variant-numeric: tabular-nums; }
.hc-pm-head span { margin-left: auto; font-size: calc(10.5px * var(--fs)); color: #9AA0A8; }
.hc-pm-items { margin: 8px 0 0; font-size: calc(13px * var(--fs)); line-height: 1.62; color: var(--ink); }
.hc-pm-sum { margin: 5px 0 0; font-size: calc(11.5px * var(--fs)); color: #7C838C; }
.hc-pm-sum i { font-style: normal; margin-left: 6px; color: #B87A5E; }
.hc-pm-sum i.ok { color: var(--hc); }
.hc-pm-tip { margin: 5px 0 0; font-size: calc(10.5px * var(--fs)); color: #A0A6AF; line-height: 1.55; }

.hc-pc-sec { padding: 6px 16px 12px; }
.hc-pc-sec h4 { margin: 0 0 8px; font-size: calc(10.5px * var(--fs)); font-weight: 650; color: #8B9199; letter-spacing: .4px; }
.hc-pc-avoid { display: flex; flex-wrap: wrap; gap: 6px; }
.hc-pc-chip { display: inline-flex; align-items: baseline; gap: 5px; padding: 5px 9px; border-radius: 9px; background: #FBF1EC; }
.hc-pc-chip b { font-size: calc(11.5px * var(--fs)); font-weight: 650; color: #A5573F; }
.hc-pc-chip i { font-style: normal; font-size: calc(10.5px * var(--fs)); color: #B58A79; }
.hc-pc-flags { display: flex; flex-wrap: wrap; gap: 6px; }
.hc-pc-flag {
  padding: 4px 8px; border-radius: 8px; background: #F5F6F8;
  font-size: calc(10.5px * var(--fs)); color: #6B7079;
  font-variant-numeric: tabular-nums;
}
.hc-pc-flag b { color: #C0563F; font-weight: 700; }
.hc-pc-flag.lo b { color: #4A7FA5; }
.hc-pc-rules { margin: 0; padding-left: 15px; }
.hc-pc-rules li { margin-bottom: 3px; font-size: calc(11.5px * var(--fs)); line-height: 1.7; color: #4B5058; }
.hc-pc-btns { display: flex; gap: 8px; padding: 0 16px 10px; }
.hc-pc-btns button { flex: 1; height: 40px; border-radius: 11px; font-size: calc(13px * var(--fs)); font-weight: 650; }
.hc-pc-btns .sub { background: #F2F4F7; color: #4B5058; }
.hc-pc-btns .main { background: var(--hc); color: #fff; }
.hc-pc-link {
  display: block; width: 100%; padding: 2px 16px 10px;
  text-align: left; background: none;
  font-size: calc(11.5px * var(--fs)); font-weight: 600; color: var(--hc);
}
.hc-pc-note { margin: 0; padding: 0 16px 15px; font-size: calc(10.5px * var(--fs)); line-height: 1.65; color: #A9AFB9; }

.hc-plan-tweak {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; height: 42px; margin: 0 0 14px; padding: 0 14px;
  border-radius: 12px; background: #F2F4F7;
  font-size: calc(11.5px * var(--fs)); font-weight: 600; color: #4B5058;
}
.hc-plan-tweak svg {
  width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
  transform: rotate(90deg); transition: transform .22s;
}
.hc-plan-tweak.open svg { transform: rotate(-90deg); }

/* 方案页：导入 / 档案 两个常驻入口 */
.hc-plan-entry { display: flex; gap: 8px; margin: 0 0 10px; }
.hc-pe-main {
  flex: 1.15; height: 42px; border-radius: 12px;
  background: var(--hc); color: #fff;
  font-size: calc(13px * var(--fs)); font-weight: 650;
}
.hc-pe-sub {
  flex: 1; height: 42px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center; gap: 5px;
  background: #F2F4F7; color: #4B5058;
  font-size: calc(11.5px * var(--fs)); font-weight: 600;
}
.hc-pe-sub em { font-style: normal; font-size: calc(10.5px * var(--fs)); font-weight: 650; color: var(--hc); }

.hc-pc-headline {
  margin: 10px 0 0;
  padding: 9px 11px;
  border-radius: 10px;
  background: #EEF5F1;
  font-size: calc(11.5px * var(--fs));
  line-height: 1.7;
  color: #3F6B57;
  font-weight: 600;
}
.hc-pm-snack { background: #FBF9F6; }

/* ================= v71：日记洞察 ================= */
.dy-an-empty {
  margin: 4px 0 14px;
  font-size: calc(11.5px * var(--fs));
  line-height: 1.7;
  color: var(--muted);
}
.dy-an-list {
  max-height: 300px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  margin-bottom: 6px;
}
.dy-an-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 2px;
  border-bottom: 1px solid #F3F5F7;
}
.dy-an-row:last-child { border-bottom: 0; }
.dy-an-ck {
  flex: 0 0 auto;
  width: 17px;
  height: 17px;
  accent-color: var(--accent);
}
.dy-an-tag {
  flex: 0 0 auto;
  padding: 3px 7px;
  border-radius: 7px;
  font-size: calc(10.5px * var(--fs));
  font-weight: 650;
}
.dy-an-tag.t-year { background: #F7EFE8; color: #A8683C; }
.dy-an-tag.t-big { background: #F7E9E3; color: #B05C41; }
.dy-an-tag.t-up { background: #EDF1F5; color: #4A6B85; }
.dy-an-tag.t-health { background: #E9F2EE; color: #3F7A5E; }
.dy-an-tag.t-note { background: #E9F2EE; color: #3F7A5E; }
.dy-an-tag.t-mood { background: #F5F1E8; color: #9A7B3C; }
.dy-an-main { flex: 1; min-width: 0; }
.dy-an-main b {
  display: block;
  font-size: calc(13px * var(--fs));
  font-weight: 650;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dy-an-main small {
  display: block;
  margin-top: 2px;
  font-size: calc(10.5px * var(--fs));
  color: #A9AFB9;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dy-an-to {
  flex: 0 0 auto;
  max-width: 110px;
  font-size: calc(10.5px * var(--fs));
  color: var(--muted);
  text-align: right;
  line-height: 1.4;
}

/* 弹层通用按钮（日记洞察等 sheet 共用） */
.nt-sheet-btn {
  display: block;
  width: 100%;
  height: 42px;
  margin-top: 10px;
  border-radius: 12px;
  background: #F2F4F7;
  font-size: calc(13px * var(--fs));
  font-weight: 650;
  color: #4B5058;
}
.nt-sheet-btn.main {
  background: var(--accent);
  color: #fff;
}

/* ================= v73：助手 — 生态中枢 ================= */
.tab.hide { display: none; }
.row-em {
  font-style: normal;
  margin-left: 6px;
  font-size: calc(10.5px * var(--fs));
  color: #A9AFB9;
  font-weight: 500;
}

#view-assistant { display: flex; flex-direction: column; min-height: 100vh; padding: 0 0 0; }
.az-toolbar {
  display: flex; gap: 8px;
  padding: 10px 14px 6px;
}
.az-chip {
  height: 30px; padding: 0 12px; border-radius: 15px;
  background: #F2F4F7; color: #6B7079;
  font-size: calc(11.5px * var(--fs)); font-weight: 600;
}
.az-chip.on { background: var(--hc); color: #fff; }

.az-chat {
  flex: 1;
  padding: 8px 14px calc(96px + var(--safe-b));
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.az-hello {
  margin: 18px 4px; padding: 14px 15px;
  border-radius: 15px; background: #fff;
  box-shadow: 0 1px 2px rgba(20,22,26,.04), 0 0 0 1px rgba(20,22,26,.04);
  font-size: calc(13px * var(--fs)); line-height: 1.8; color: #4B5058;
}
.az-hello p { margin: 0 0 6px; }
.az-hello p:last-child { margin-bottom: 0; }
.az-hello b { color: var(--accent); }

.az-msg { display: flex; flex-direction: column; align-items: flex-start; margin-bottom: 10px; }
.az-msg.me { align-items: flex-end; }
.az-bubble {
  max-width: 84%;
  padding: 9px 12px;
  border-radius: 15px 15px 15px 4px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(20,22,26,.05), 0 0 0 1px rgba(20,22,26,.04);
  font-size: calc(13px * var(--fs));
  line-height: 1.65;
  color: var(--ink);
  word-break: break-word;
  white-space: pre-wrap;
}
.az-msg.me .az-bubble {
  border-radius: 15px 15px 4px 15px;
  background: var(--accent);
  color: #fff;
  box-shadow: none;
}
.az-bubble.typing { color: #A9AFB9; }
.az-time { margin-top: 3px; font-size: calc(10.5px * var(--fs)); color: #BFC4CC; }

/* 确认卡片 */
.az-card {
  width: 92%;
  margin: 4px 0 12px;
  padding: 12px 13px;
  border-radius: 15px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(20,22,26,.06), 0 0 0 1px rgba(20,22,26,.05);
}
.az-card.done { opacity: .62; }
.az-card-t { margin: 0 0 8px; font-size: calc(13px * var(--fs)); font-weight: 650; color: var(--ink); }
.az-card-btns { display: flex; gap: 8px; margin-top: 10px; }
.az-card-btns button {
  flex: 1; height: 38px; border-radius: 11px;
  font-size: calc(11.5px * var(--fs)); font-weight: 650;
  background: #F2F4F7; color: #4B5058;
}
.az-card-btns .main { background: var(--hc); color: #fff; }
.az-card-btns .main[disabled] { background: #E6E9ED; color: #A9AFB9; }
.az-flag {
  display: inline-block;
  margin: 0 6px 6px 0; padding: 4px 8px;
  border-radius: 8px; background: #FBF1EC;
  font-size: calc(10.5px * var(--fs)); color: #A5573F; font-weight: 600;
}
.az-flag.off { background: #F5F6F8; color: #8B9199; }
.dy-an-tag.t-ledger { background: #EDF3F7; color: #3C6E96; }

/* 输入条 */
.az-inputbar {
  position: fixed;
  left: 0; right: 0; bottom: calc(70px + var(--safe-b));
  max-width: 460px;
  margin: 0 auto;
  display: flex; align-items: flex-end; gap: 8px;
  padding: 8px 12px;
  background: rgba(250, 250, 248, .96);
  backdrop-filter: blur(8px);
  border-top: 1px solid #ECEEF1;
  z-index: 5;
}
body.kb-open .az-inputbar { bottom: calc(70px + var(--kb-off, 0px)); }
.az-attach {
  flex: 0 0 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 12px; background: #fff;
  box-shadow: 0 0 0 1px rgba(20,22,26,.07);
}
.az-attach svg { width: 18px; height: 18px; fill: none; stroke: #6B7079; stroke-width: 1.8; stroke-linecap: round; }
#azInput {
  flex: 1;
  max-height: 110px;
  padding: 9px 12px;
  border-radius: 13px;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(20,22,26,.07);
  font-size: calc(13px * var(--fs));
  line-height: 1.5;
  resize: none;
}
#azSendBtn {
  flex: 0 0 auto;
  height: 38px; padding: 0 14px;
  border-radius: 12px;
  background: var(--accent); color: #fff;
  font-size: calc(13px * var(--fs)); font-weight: 650;
}
#azSendBtn:disabled { background: #E6E9ED; color: #A9AFB9; }

/* AI 配置弹层 */
.az-cfg-hint { margin: 0 2px 10px; font-size: calc(11.5px * var(--fs)); line-height: 1.7; color: var(--muted); }
.az-cfg-row { display: flex; align-items: center; gap: 10px; margin-bottom: 9px; }
.az-cfg-row span { flex: 0 0 62px; font-size: calc(11.5px * var(--fs)); color: #4B5058; font-weight: 600; }
.az-cfg-row input {
  flex: 1; height: 40px; padding: 0 10px;
  border-radius: 11px; background: #F7F8FA;
  font-size: calc(13px * var(--fs)); color: var(--ink);
}

/* ---------- v75：记账规则 + 排班确认 ---------- */
.az-rule-list { margin: 4px 0 12px; }
.az-rule-row { display: flex; align-items: center; gap: 8px; padding: 7px 2px; border-bottom: 1px solid rgba(20,22,26,.06); font-size: calc(13px * var(--fs)); }
.az-rule-row b { font-weight: 600; color: #14161A; }
.az-rule-row span { flex: 1; color: #7C8391; }
.az-rule-del { border: 0; background: none; color: #C08265; font-size: calc(11.5px * var(--fs)); padding: 2px 4px; }
.az-cfg-row select {
  flex: 1; min-width: 0; border: 0; outline: none; background: #F4F2EF;
  border-radius: 9px; padding: 9px 10px; font-size: calc(13px * var(--fs)); color: #14161A;
  -webkit-appearance: none; appearance: none;
}

/* ================= v76：全模块框架 ================= */
/* 我的页 → 全部模块入口 */
.hub-entry {
  display: flex; align-items: center; gap: 10px; width: 100%;
  background: linear-gradient(135deg, #20232A, #33383F);
  color: #fff; border-radius: 18px; padding: 15px 16px; margin: 2px 0 12px;
  text-align: left; box-shadow: 0 10px 24px -14px rgba(16, 24, 40, .6);
}
.hub-entry:active { transform: scale(.985); }
.hub-entry-txt { flex: 1; display: flex; flex-direction: column; gap: 3px; }
.hub-entry-txt b { font-size: calc(15px * var(--fs)); font-weight: 680; letter-spacing: .2px; }
.hub-entry-txt small { font-size: calc(11.5px * var(--fs)); color: rgba(255, 255, 255, .62); }
.hub-entry-go { font-size: calc(11.5px * var(--fs)); color: var(--accent); font-weight: 600; white-space: nowrap; }

/* 模块中心 */
.hub-lead {
  margin: 0 2px 12px; font-size: calc(11.5px * var(--fs)); color: var(--muted); line-height: 1.6;
}
.hub-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.hub-card {
  display: flex; align-items: center; gap: 10px; text-align: left;
  background: var(--card); border-radius: 17px; padding: 12px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .03);
}
.hub-card:active { transform: scale(.975); }
.hub-card.off { opacity: .45; }
.hub-ic {
  width: 34px; height: 34px; border-radius: 11px; flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center;
  font-size: calc(13.5px * var(--fs)); font-weight: 700;
}
.hub-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.hub-main b { font-size: calc(13.5px * var(--fs)); font-weight: 660; color: var(--ink); }
.hub-main small {
  font-size: calc(10.5px * var(--fs)); color: var(--muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* 通用条目模块 */
.mod-head { display: flex; align-items: flex-end; justify-content: space-between; margin: 2px 2px 14px; }
.mod-head-main { display: flex; flex-direction: column; gap: 3px; }
.mod-head-main b { font-size: calc(17px * var(--fs)); font-weight: 700; letter-spacing: .2px; }
.mod-head-main span { font-size: calc(11.5px * var(--fs)); color: var(--muted); }
.mod-head-stat { font-size: calc(11.5px * var(--fs)); color: var(--muted); }
.mod-empty { text-align: center; padding: 46px 20px; }
.mod-empty p { margin: 0 0 8px; font-size: calc(13px * var(--fs)); }
.mod-empty .muted { color: var(--muted); font-size: calc(11.5px * var(--fs)); line-height: 1.7; }
.mod-month {
  margin: 14px 4px 7px; font-size: calc(11.5px * var(--fs));
  color: var(--muted); font-weight: 600; letter-spacing: .4px;
}
.mod-item {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  background: var(--card); border-radius: 15px; padding: 12px 13px; margin-bottom: 8px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .03);
}
.mod-item:active { transform: scale(.99); background: #FAFBFC; }
.mod-item-date {
  flex: 0 0 38px; font-size: calc(11.5px * var(--fs)); font-weight: 650; color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.mod-item-main { flex: 1; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.mod-item-main b {
  font-size: calc(13.5px * var(--fs)); font-weight: 620; color: var(--ink);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.mod-item-main small {
  font-size: calc(11.5px * var(--fs)); color: var(--muted);
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
}
.mod-tag {
  font-style: normal; background: #F2F4F7; color: #5B6270;
  border-radius: 6px; padding: 1px 6px; font-size: calc(10.5px * var(--fs));
}
.mod-tag.done { background: #EAF4EF; color: #3F7A63; }
.mod-tag.hold { background: #F7F0EA; color: #A9765C; }
.mod-money { color: #B3795F; font-weight: 600; }

/* 习惯 · 静心 */
.md-box {
  display: flex; align-items: center; gap: 14px;
  background: linear-gradient(140deg, #22303A, #1A2229);
  color: #fff; border-radius: 20px; padding: 16px; margin-bottom: 16px;
}
.md-side { flex: 0 0 auto; min-width: 96px; }
.md-title { margin: 0 0 4px; font-size: calc(11.5px * var(--fs)); color: rgba(255, 255, 255, .55); letter-spacing: .6px; }
.md-time {
  margin: 0; font-size: calc(17px * var(--fs)); font-weight: 300; letter-spacing: 1px;
  font-variant-numeric: tabular-nums; line-height: 1.05;
}
.md-hint { margin: 4px 0 0; font-size: calc(10.5px * var(--fs)); color: rgba(255, 255, 255, .42); }
.md-ctrl { flex: 1; display: flex; flex-direction: column; gap: 9px; align-items: flex-end; min-width: 0; }
/* v128：极窄屏 + 特大字号防溢出——时长 chip 与按钮允许换行，不再撑破盒子 */
.md-chips { display: flex; gap: 5px; flex-wrap: wrap; }
.md-chip {
  padding: 5px 9px; border-radius: 9px; font-size: calc(11.5px * var(--fs));
  background: rgba(255, 255, 255, .08); color: rgba(255, 255, 255, .7);
}
.md-chip.on { background: var(--accent); color: #fff; font-weight: 650; }
.md-btns { display: flex; gap: 7px; flex-wrap: wrap; justify-content: flex-end; }
.md-main {
  padding: 9px 20px; border-radius: 11px; background: var(--accent); color: #fff;
  font-size: calc(13px * var(--fs)); font-weight: 680;
}
.md-reset {
  padding: 9px 12px; border-radius: 11px; background: rgba(255, 255, 255, .1);
  color: rgba(255, 255, 255, .72); font-size: calc(11.5px * var(--fs));
}
.hb-card { background: var(--card); border-radius: 17px; padding: 12px 13px; margin-bottom: 9px; box-shadow: 0 1px 2px rgba(16, 24, 40, .03); }
.hb-top { display: flex; align-items: center; gap: 8px; margin-bottom: 9px; }
.hb-dot { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 auto; }
.hb-top b { font-size: calc(13.5px * var(--fs)); font-weight: 650; }
.hb-meta { flex: 1; font-size: calc(10.5px * var(--fs)); color: var(--muted); }
.hb-check {
  padding: 5px 11px; border-radius: 9px; border: 1px solid #E3E6EA;
  background: #fff; color: #5B6270; font-size: calc(11.5px * var(--fs)); font-weight: 620;
}
.hb-check.on { color: #fff; }
.hb-grid { display: grid; grid-template-columns: repeat(14, 1fr); gap: 3px; }
.hb-cell { height: 9px; border-radius: 2.5px; background: #EFF1F4; }

/* 那年今天 */
.otd-card { background: var(--card); border-radius: 17px; padding: 13px 15px; margin-top: 10px; box-shadow: 0 1px 2px rgba(16, 24, 40, .03); }
.otd-title { margin: 0 0 8px; font-size: calc(11.5px * var(--fs)); color: var(--muted); font-weight: 650; letter-spacing: .5px; }
.otd-row { display: flex; align-items: center; gap: 8px; padding: 5px 0; border-bottom: 1px solid rgba(20, 22, 26, .05); }
.otd-row:last-child { border-bottom: 0; }
.otd-y { flex: 0 0 34px; font-size: calc(11.5px * var(--fs)); color: var(--muted); font-variant-numeric: tabular-nums; }
.otd-t { flex: 1; font-size: calc(13px * var(--fs)); color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.otd-tag { font-size: calc(10.5px * var(--fs)); color: var(--muted); background: #F2F4F7; border-radius: 5px; padding: 1px 5px; }

.nt-sheet-btn.danger { background: #FBF0EC; color: #B3795F; }
.dy-an-tag.t-mod { background: #E8EDF3; color: #4C6B8A; }

/* ================= v77：4 tab + 应用九宫格 ================= */
.apps-lead { margin: 0 2px 14px; font-size: calc(11.5px * var(--fs)); color: var(--muted); line-height: 1.6; }
.apps-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.app-tile {
  background: var(--card); border-radius: 19px; padding: 15px 6px 13px;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .03);
}
.app-tile:active { transform: scale(.965); }
.app-tile.off { opacity: .42; }
.app-ic {
  width: 42px; height: 42px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: calc(17px * var(--fs)); font-weight: 700;
}
.app-tile b { font-size: calc(13px * var(--fs)); font-weight: 640; color: var(--ink); }
.app-tile small {
  font-size: calc(10.5px * var(--fs)); color: var(--muted);
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.apps-foot { text-align: center; font-size: calc(10.5px * var(--fs)); color: #B9BEC8; margin: 18px 0 0; }

/* 首页补充卡 */
.home-card {
  background: var(--card); border-radius: 18px; padding: 13px 15px; margin-top: 10px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .03);
}
.hc-t { margin: 0 0 7px; font-size: calc(11.5px * var(--fs)); color: var(--muted); font-weight: 650; letter-spacing: .4px; }
.hc-head { display: flex; align-items: center; justify-content: space-between; }
.hc-row { margin: 0 0 5px; font-size: calc(13px * var(--fs)); color: var(--ink-2); line-height: 1.55; }
.memo-row {
  display: flex; flex-direction: column; gap: 2px; width: 100%; text-align: left;
  padding: 7px 0; border-top: 1px solid rgba(20, 22, 26, .05);
}
.memo-row b { font-size: calc(13px * var(--fs)); font-weight: 620; color: var(--ink); }
.memo-row small { font-size: calc(10.5px * var(--fs)); color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 趣事 */
.fun-lead { margin: 2px 2px 12px; font-size: calc(11.5px * var(--fs)); color: var(--muted); line-height: 1.6; }
.fun-list { display: flex; flex-direction: column; gap: 9px; }
.fun-card {
  background: var(--card); border-radius: 16px; padding: 13px 15px; text-align: left;
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .03);
}
.fun-card:active { transform: scale(.99); }
.fun-date { font-size: calc(11.5px * var(--fs)); color: var(--muted); font-variant-numeric: tabular-nums; }
.fun-txt { flex: 1; font-size: calc(13px * var(--fs)); color: var(--ink); line-height: 1.6; }
.fun-tag { font-size: calc(10.5px * var(--fs)); color: #A9765C; background: #FBF0EC; border-radius: 6px; padding: 1px 6px; }

/* 圈子 */
.circle-wrap { background: var(--card); border-radius: 20px; padding: 8px; box-shadow: 0 1px 2px rgba(16, 24, 40, .03); }
.circle-svg { width: 100%; display: block; }
.circle-legend { display: flex; justify-content: center; gap: 12px; padding: 4px 0 8px; }
.circle-legend span { display: flex; align-items: center; gap: 4px; font-size: calc(10.5px * var(--fs)); color: var(--muted); }
.circle-legend i { width: 7px; height: 7px; border-radius: 50%; }
.circle-empty { text-align: center; padding: 54px 20px; background: var(--card); border-radius: 20px; }
.circle-empty p { margin: 0 0 8px; font-size: calc(13px * var(--fs)); }
.circle-empty .muted { color: var(--muted); font-size: calc(11.5px * var(--fs)); }
.circle-av {
  width: 34px; height: 34px; border-radius: 50%; flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center;
  font-size: calc(13px * var(--fs)); font-weight: 650;
}

/* 静心：课程 */
.mind-card {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  background: var(--card); border-radius: 16px; padding: 13px 15px; margin-bottom: 8px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .03);
}
.mind-card:active { transform: scale(.99); }
.mind-main { flex: 1; display: flex; flex-direction: column; gap: 3px; }
.mind-main b { font-size: calc(13px * var(--fs)); font-weight: 640; }
.mind-main small { font-size: calc(10.5px * var(--fs)); color: var(--muted); }
.mind-meta { display: flex; align-items: center; gap: 6px; font-size: calc(11.5px * var(--fs)); color: var(--muted); }
.mind-meta i { font-style: normal; background: #EAF1EE; color: #4E7A6B; border-radius: 6px; padding: 1px 6px; font-size: calc(10.5px * var(--fs)); }
.mind-step { margin: 0 0 10px; font-size: calc(13px * var(--fs)); color: var(--ink-2); line-height: 1.7; }

/* 静心：情绪 */
.mood-panel { padding: 16px 15px; }
.mood-q { margin: 0 0 12px; font-size: calc(13.5px * var(--fs)); font-weight: 650; }
.mood-row { display: flex; gap: 7px; margin-bottom: 16px; }
.mood-btn {
  flex: 1; background: #F5F6F8; border-radius: 13px; padding: 10px 2px 9px;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
}
.mood-btn b { font-size: calc(13.5px * var(--fs)); color: var(--ink-2); font-weight: 600; }
.mood-btn span { font-size: calc(10.5px * var(--fs)); color: var(--muted); }
.mood-btn.on { background: #EAF1EE; }
.mood-btn.on b { color: #3F7A63; }
.mood-tags { display: flex; flex-wrap: wrap; gap: 7px; }
.mood-tag { padding: 6px 11px; border-radius: 10px; background: #F5F6F8; font-size: calc(11.5px * var(--fs)); color: #5B6270; }
.mood-tag.on { background: var(--accent); color: #fff; }
.mood-stat { padding: 14px 15px; margin-top: 10px; }
.mood-stat-top { display: flex; align-items: baseline; gap: 8px; margin-bottom: 10px; }
.mood-stat-top b { font-size: calc(13px * var(--fs)); }
.mood-stat-top span { font-size: calc(10.5px * var(--fs)); color: var(--muted); }
.mood-bars { display: flex; align-items: flex-end; gap: 4px; height: 48px; }
.mood-bars i { flex: 1; background: #EDEFF2; border-radius: 3px; }
.mood-bars i.on { background: var(--hc); }

/* 许愿灯 */
.wish-lead { margin: 0 2px 12px; font-size: calc(11.5px * var(--fs)); color: var(--muted); }
.wish-card {
  display: flex; align-items: center; gap: 11px; background: var(--card);
  border-radius: 16px; padding: 13px 15px; margin-bottom: 9px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .03);
}
.wish-ck {
  width: 24px; height: 24px; border-radius: 50%; border: 1.5px solid #DDE1E6;
  background: #fff; color: #3F7A63; font-size: calc(11.5px * var(--fs)); flex: 0 0 auto;
}
.wish-card.done { opacity: .55; }
.wish-card.done .wish-ck { background: var(--hc); border-color: var(--hc); color: #fff; }
.wish-main { flex: 1; display: flex; flex-direction: column; gap: 3px; }
.wish-main b { font-size: calc(13px * var(--fs)); font-weight: 620; }
.wish-main small { font-size: calc(10.5px * var(--fs)); color: var(--muted); }

/* 资料柜 */
.vault-tabs {
  display: flex; gap: 4px; overflow-x: auto; padding: 3px;
  background: #EAECEF; border-radius: 12px; margin-bottom: 12px;
  -webkit-overflow-scrolling: touch;
}
.vault-tabs::-webkit-scrollbar { display: none; }
.vault-tab {
  flex: 0 0 auto; height: 34px; display: inline-flex; align-items: center;
  padding: 0 14px; border-radius: 9px;
  background: transparent; font-size: calc(13px * var(--fs)); font-weight: 600;
  color: var(--muted); transition: all .18s;
}
.vault-tab.on { background: #fff; color: var(--ink); font-weight: 650; box-shadow: 0 1px 4px rgba(16, 24, 40, .1); }
.lott-panel { padding: 14px 15px; margin-bottom: 4px; }
.lott-t { margin: 0 0 4px; font-size: calc(13px * var(--fs)); font-weight: 650; }
.lott-sub { margin: 0; font-size: calc(10.5px * var(--fs)); color: var(--muted); line-height: 1.6; }
.mod-list { display: flex; flex-direction: column; }

/* 彩票统计 */
.lott-tabs { display: flex; gap: 7px; overflow-x: auto; padding-bottom: 10px; }
.lott-tabs::-webkit-scrollbar { display: none; }
.lott-tab { flex: 0 0 auto; padding: 7px 13px; border-radius: 11px; background: var(--card); font-size: calc(11.5px * var(--fs)); color: #5B6270; box-shadow: 0 1px 2px rgba(16, 24, 40, .03); }
.lott-tab.on { background: var(--ink); color: #fff; }
.lott-balls { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 10px; }
.lott-ball {
  width: 32px; height: 32px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: calc(11.5px * var(--fs)); font-weight: 650; position: relative;
}
.lott-ball.red { background: #F4D9CF; color: #A94425; }
.lott-ball.blue { background: #D9E6F4; color: #2C5B8A; }
.lott-ball.hot { background: var(--accent); color: #fff; }
.lott-ball.cold { background: #E7E9ED; color: #5B6270; }
.lott-ball.miss { background: #fff; border: 1px dashed #C9CFD6; color: #5B6270; }
.lott-ball.miss i { position: absolute; top: -5px; right: -5px; background: #E88; color: #fff; font-style: normal; font-size: calc(10.5px * var(--fs)); border-radius: 50%; width: 15px; height: 15px; display: flex; align-items: center; justify-content: center; }
.lott-warn { margin: 4px 0 0; font-size: calc(10.5px * var(--fs)); color: #A9765C; line-height: 1.6; }
.hc-pm-it { display: inline-flex; align-items: center; gap: 4px; }
.hc-it-add {
  border: 0; background: #EAF1EE; color: #3F7A63; border-radius: 8px;
  padding: 2px 7px; font-size: calc(10.5px * var(--fs)); font-weight: 650;
}
.hc-it-add:active { transform: scale(.94); }

/* ===== v78 ===== */
/* 彩票：走势图 / 冷热条形 / 规则 / 速览 */
.lott-chart { width: 100%; height: auto; display: block; }
.lott-digest-row { display: flex; flex-direction: column; padding: 5px 0; border-bottom: 1px dashed rgba(20,22,26,.08); font-size: calc(11.5px * var(--fs)); }
.lott-digest-row:last-of-type { border-bottom: 0; }
.lott-digest-iss { font-weight: 650; color: var(--ink); }
.lott-bar-row { display: flex; align-items: center; gap: 8px; padding: 4px 0; font-size: calc(11.5px * var(--fs)); }
.lott-bar-num { width: 26px; text-align: center; font-weight: 700; }
.lott-bar-track { flex: 1; height: 10px; background: rgba(20,22,26,.06); border-radius: 5px; overflow: hidden; }
.lott-bar-track i { display: block; height: 100%; background: #C08265; border-radius: 5px; }
.lott-bar-track i.mis { background: #9AA1AC; }
.lott-bar-val { width: 52px; text-align: right; color: var(--muted); font-size: calc(10.5px * var(--fs)); }
.lott-rules { margin-top: 6px; }
.lott-rule-row { display: flex; gap: 8px; padding: 4px 0; font-size: calc(11.5px * var(--fs)); border-bottom: 1px dashed rgba(20,22,26,.06); }
.lott-rule-row b { min-width: 52px; }
.lott-rule-row span { color: var(--muted); }

/* 健康：方案食物行（勾选 + 份数） */
.hc-pm-row { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px dashed rgba(20,22,26,.06); }
.hc-pm-row.on .hc-pm-name { color: var(--ink); font-weight: 650; }
.hc-pm-check { width: 22px; height: 22px; border-radius: 7px; border: 1.5px solid rgba(20,22,26,.25); background: #fff; flex: none; display: flex; align-items: center; justify-content: center; font-size: calc(11.5px * var(--fs)); color: #fff; cursor: pointer; }
.hc-pm-row.on .hc-pm-check { background: var(--hc, #5F8F7B); border-color: var(--hc, #5F8F7B); }
.hc-pm-name { flex: 1; font-size: calc(13px * var(--fs)); color: var(--ink); display: flex; flex-direction: column; }
.hc-pm-name i { font-style: normal; font-size: calc(10.5px * var(--fs)); color: var(--muted); }
.hc-pm-step { display: flex; align-items: center; gap: 8px; flex: none; }
.hc-pm-step button { width: 26px; height: 26px; border-radius: 9px; border: 1px solid rgba(20,22,26,.18); background: #fff; font-size: calc(15px * var(--fs)); line-height: 1; color: var(--ink); cursor: pointer; }
.hc-pm-step b { min-width: 16px; text-align: center; font-size: calc(13px * var(--fs)); }
.hc-pm-btns { display: flex; gap: 8px; margin-top: 8px; }
.hc-pm-more { flex: 1; height: 32px; border-radius: 10px; border: 1px dashed rgba(95,143,123,.5); background: rgba(95,143,123,.06); color: var(--hc, #5F8F7B); font-size: calc(11.5px * var(--fs)); cursor: pointer; }
.hc-pm-more.ghost { border-color: rgba(20,22,26,.18); background: #fff; color: var(--muted); }
/* 今天吃了什么 */
.hc-eaten-row { display: flex; align-items: center; justify-content: space-between; padding: 5px 0; border-bottom: 1px dashed rgba(20,22,26,.06); font-size: calc(11.5px * var(--fs)); }
.hc-eaten-row:last-of-type { border-bottom: 0; }
.hc-eaten-row em { font-style: normal; color: var(--hc, #5F8F7B); font-weight: 650; margin-left: 4px; }
.hc-eaten-row b { font-size: calc(11.5px * var(--fs)); color: var(--muted); }
.hc-eaten-total { padding-top: 8px; font-size: calc(11.5px * var(--fs)); color: var(--ink); display: flex; flex-direction: column; gap: 4px; }
.hc-eaten-total b { font-size: calc(13.5px * var(--fs)); }
.hc-eaten-total i { font-style: normal; font-size: calc(11.5px * var(--fs)); }
.hc-eaten-total i.ok { color: var(--hc, #5F8F7B); }
.hc-eaten-total i.over { color: #B3593C; }
.hc-eaten-total i.under { color: #C08265; }
/* 训练地图 */
.hc-muscle-svg { width: 78%; max-width: 240px; margin: 0 auto; display: block; }
.hc-mspot { fill: rgba(95,143,123,.14); stroke: rgba(95,143,123,.55); stroke-width: 1.2; cursor: pointer; }
.hc-mspot.on { fill: rgba(95,143,123,.55); stroke: var(--hc, #5F8F7B); }
.hc-muscle-keys { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 4px; }
.hc-mkey { padding: 4px 10px; border-radius: 999px; border: 1px solid rgba(20,22,26,.14); background: #fff; font-size: calc(11.5px * var(--fs)); color: var(--ink); cursor: pointer; }
.hc-mkey.on { background: var(--hc, #5F8F7B); border-color: var(--hc, #5F8F7B); color: #fff; }
.hc-muscle-detail { margin-top: 6px; }
.hc-muscle-detail b { font-size: calc(13px * var(--fs)); }
/* 食物库挑选 */
.hc-pick-cats { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.hc-pick-cat { padding: 5px 12px; border-radius: 999px; border: 1px solid rgba(20,22,26,.14); background: #fff; font-size: calc(11.5px * var(--fs)); cursor: pointer; }
.hc-pick-cat.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.hc-pick-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; max-height: 260px; overflow-y: auto; }
.hc-pick-it { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 8px 10px; border-radius: 12px; border: 1px solid rgba(20,22,26,.1); background: #fff; cursor: pointer; text-align: left; }
.hc-pick-it b { font-size: calc(11.5px * var(--fs)); }
.hc-pick-it span { font-size: calc(10.5px * var(--fs)); color: var(--muted); }

/* 时光签（趣事） */
.fun-wall { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 4px 0 20px; }
.fun-wall.one { grid-template-columns: 1fr; }
.fun-sign { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 12px; border-radius: 14px; box-shadow: 0 2px 8px rgba(20,22,26,.07); border: 0; cursor: pointer; text-align: left; min-height: 92px; }
.fun-sign-emoji { font-size: calc(17px * var(--fs)); line-height: 1.1; }
.fun-sign-txt { font-size: calc(11.5px * var(--fs)); color: var(--ink); line-height: 1.4; word-break: break-all; }
.fun-sign .fun-date { font-size: calc(10.5px * var(--fs)); color: var(--muted); margin-top: auto; }
.fun-emoji-row { display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px; margin: 8px 0 10px; }
.fun-emoji { height: 38px; border-radius: 10px; border: 1px solid rgba(20,22,26,.1); background: #fff; font-size: calc(17px * var(--fs)); cursor: pointer; }
.fun-emoji.on { background: rgba(95,143,123,.14); border-color: var(--hc, #5F8F7B); }

/* 日记格子视图 / 圈子节点 */
#diaryList.diary-grid { columns: 2; column-gap: 10px; }
#diaryList.diary-grid .dy-month { column-span: all; margin-top: 0; }
.circle-node { cursor: pointer; }
.circle-node:active circle { fill-opacity: .35; }
.lott-note { margin: 0; font-size: calc(10.5px * var(--fs)); color: var(--muted); line-height: 1.5; }

/* ===== v79：对话存档（资料柜） ===== */
.az-arc { max-height: 52vh; overflow-y: auto; margin: 6px 0 12px; }
.az-arc-row { display: flex; gap: 8px; align-items: flex-start; padding: 7px 0; border-bottom: 1px dashed rgba(20,22,26,.07); font-size: calc(11.5px * var(--fs)); line-height: 1.55; color: var(--ink); }
.az-arc-row span { flex: none; color: var(--muted); font-size: calc(10.5px * var(--fs)); padding-top: 2px; width: 34px; }
.az-arc-row b { flex: none; width: 30px; font-size: calc(10.5px * var(--fs)); color: var(--hc, #5F8F7B); padding-top: 2px; }

/* ===== v80：圈子关系图（可缩放 / 立体 / 图上弹卡 / 名单折叠） ===== */
.circle-wrap {
  height: clamp(360px, calc(100dvh - 218px), 640px);
}
.c-view {
  position: relative;
  height: 100%;
  border-radius: 24px;
  overflow: hidden;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  background:
    radial-gradient(120% 90% at 50% 6%, rgba(237,160,138,.16) 0%, rgba(237,160,138,0) 42%),
    radial-gradient(100% 80% at 50% 40%, #262B36 0%, #191C24 52%, #101218 100%);
  box-shadow: 0 14px 34px rgba(16,18,24,.28), inset 0 1px 0 rgba(255,255,255,.08);
}
.c-view::after {
  content: "";
  position: absolute; inset: 0; border-radius: 24px; pointer-events: none;
  box-shadow: inset 0 0 60px rgba(0,0,0,.45);
}
.c-stage { position: absolute; inset: 0; transform-origin: 50% 50%; will-change: transform; }
.c-svg { width: 100%; height: 100%; display: block; }
.c-node { cursor: pointer; }
.c-node circle:nth-child(2) { transition: stroke .15s ease; }
.c-node:active circle:nth-child(2) { stroke: #fff; stroke-width: 3; }
.c-me { pointer-events: none; }

.c-zoom {
  position: absolute; right: 12px; bottom: 14px; z-index: 4;
  display: flex; flex-direction: column; gap: 7px;
}
.c-zoom button {
  width: 38px; height: 38px; border-radius: 13px; border: 1px solid rgba(255,255,255,.16);
  background: rgba(255,255,255,.1); color: #fff; font-size: calc(17px * var(--fs)); line-height: 1;
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 4px 12px rgba(0,0,0,.22); cursor: pointer;
}
.c-zoom button:active { background: rgba(255,255,255,.2); transform: scale(.95); }

.c-legend {
  position: absolute; left: 12px; bottom: 14px; z-index: 3; max-width: 56%;
  display: flex; flex-wrap: wrap; gap: 4px 10px; padding: 8px 12px; border-radius: 999px;
  background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.08);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.c-legend span { display: flex; align-items: center; gap: 4px; font-size: calc(10.5px * var(--fs)); color: rgba(255,255,255,.7); }
.c-legend i { width: 6px; height: 6px; border-radius: 50%; }
.c-hint {
  position: absolute; left: 50%; top: 10px; transform: translateX(-50%); z-index: 3;
  font-size: calc(10.5px * var(--fs)); color: rgba(255,255,255,.4); white-space: nowrap;
}

/* 图上人物卡 */
.c-pop {
  position: absolute; z-index: 6; width: 228px; padding: 12px 13px 11px;
  background: #fff; border-radius: 18px;
  box-shadow: 0 16px 40px rgba(8,10,14,.42), 0 0 0 1px rgba(255,255,255,.5);
  animation: cPopIn .16s ease-out both;
}
@keyframes cPopIn { from { opacity: 0; } to { opacity: 1; } }
.c-pop.up { transform: translate(-50%, calc(-100% - 38px)); }
.c-pop.down { transform: translate(-50%, 36px); }
.c-pop::after {
  content: ""; position: absolute; left: 50%; margin-left: -6px;
  border: 6px solid transparent;
}
.c-pop.up::after { bottom: -11px; border-top-color: #fff; }
.c-pop.down::after { top: -11px; border-bottom-color: #fff; }
.c-pop-x {
  position: absolute; right: 6px; top: 4px; width: 24px; height: 24px;
  border: 0; background: transparent; color: var(--muted); font-size: calc(11.5px * var(--fs)); cursor: pointer;
}
.c-pop-h { display: flex; align-items: center; gap: 9px; }
.c-pop-av {
  width: 36px; height: 36px; border-radius: 13px; flex: none; color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: calc(15px * var(--fs)); font-weight: 700;
  box-shadow: 0 4px 10px rgba(20,22,26,.18);
}
.c-pop-hb { display: flex; flex-direction: column; min-width: 0; }
.c-pop-hb b { font-size: calc(13.5px * var(--fs)); color: var(--ink); line-height: 1.3; }
.c-pop-hb i { font-style: normal; font-size: calc(10.5px * var(--fs)); }
.c-pop-rows { margin-top: 7px; }
.c-pop-rows p { display: flex; gap: 8px; margin: 5px 0 0; font-size: calc(11.5px * var(--fs)); line-height: 1.4; }
.c-pop-rows span { flex: none; width: 30px; color: var(--muted); }
.c-pop-rows em { font-style: normal; color: var(--ink); flex: 1; word-break: break-all; }
.c-pop-note {
  margin: 8px 0 0; padding: 6px 8px; border-radius: 9px; background: #F5F6F8;
  font-size: calc(10.5px * var(--fs)); color: var(--muted); line-height: 1.5; max-height: 54px; overflow: hidden;
}
.c-pop-btns { display: flex; gap: 7px; margin-top: 10px; }
.c-pop-btns button {
  flex: 1; height: 31px; border-radius: 10px; border: 1px solid rgba(20,22,26,.12);
  background: #fff; color: var(--ink); font-size: calc(11.5px * var(--fs)); cursor: pointer;
}
.c-pop-btns button:first-child { background: var(--ink); border-color: var(--ink); color: #fff; }

/* 名单折叠 */
.c-fold { margin-top: 12px; background: var(--card); border-radius: 18px; overflow: hidden; box-shadow: 0 2px 10px rgba(20,22,26,.05); }
.c-fold summary { display: flex; align-items: center; gap: 8px; padding: 13px 15px; cursor: pointer; list-style: none; }
.c-fold summary::-webkit-details-marker { display: none; }
.c-fold-t { font-size: calc(13.5px * var(--fs)); font-weight: 650; color: var(--ink); }
.c-fold-n { font-style: normal; font-size: calc(11.5px * var(--fs)); color: var(--muted); }
.c-fold-ic { margin-left: auto; width: 16px; height: 16px; fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; transition: transform .2s; }
.c-fold[open] .c-fold-ic { transform: rotate(180deg); }
.c-fold #circleList { padding: 0 8px 8px; }
.c-empty-orb { font-size: calc(17px * var(--fs)); margin-bottom: 4px; }
.c-fold:not([open]) #circleList { display: none; }

/* ===== v81：圈子极简版（白底画布 / 黑白线框 / 详情在下方） ===== */
.circle-wrap { height: clamp(400px, calc(100dvh - 198px), 720px); }
.c-view { background: transparent; box-shadow: none; border-radius: 0; }
.c-view::after { content: none; }
.c-svg { overflow: visible; }
.c-node .c-halo { transition: opacity .18s ease; }
.c-node.on .c-halo { opacity: .55; }
.c-node:active circle:nth-child(3) { fill: #F4F5F6; }
.c-zoom button {
  background: #fff; color: var(--ink); border: 1px solid #E6E8EB;
  box-shadow: 0 2px 8px rgba(20,22,26,.05); backdrop-filter: none; -webkit-backdrop-filter: none;
}
.c-zoom button:active { background: #F4F5F6; }

/* 下方人物详情 */
.c-detail {
  margin-top: 2px; padding: 15px 15px 14px; background: #fff;
  border: 1px solid #EDEFF2; border-radius: 20px;
  animation: cDtIn .2s ease both;
}
@keyframes cDtIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.c-dt-top { display: flex; align-items: center; gap: 12px; }
.c-dt-av {
  width: 48px; height: 48px; border-radius: 50%; flex: none;
  display: flex; align-items: center; justify-content: center;
  border: 1.6px solid var(--ink); background: #fff;
  font-size: calc(17px * var(--fs)); font-weight: 600; color: var(--ink);
}
.c-dt-name { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.c-dt-name b { font-size: calc(17px * var(--fs)); font-weight: 650; color: var(--ink); line-height: 1.25; }
.c-dt-name span { font-size: calc(11.5px * var(--fs)); color: var(--muted); }
.c-dt-x {
  margin-left: auto; width: 28px; height: 28px; flex: none;
  border: 0; background: transparent; color: #C2C6CC; font-size: calc(13px * var(--fs)); cursor: pointer;
}
.c-dt-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 9px; margin-top: 13px; }
.c-dt-row { display: flex; flex-direction: column; gap: 2px; padding: 9px 11px; background: #FAFAFB; border-radius: 11px; }
.c-dt-row i { font-style: normal; font-size: calc(10.5px * var(--fs)); color: #A2A8B2; }
.c-dt-row em { font-style: normal; font-size: calc(13px * var(--fs)); color: var(--ink); word-break: break-all; line-height: 1.4; }
.c-dt-row em.dim { color: #C6CAD0; }
.c-dt-note {
  margin: 10px 0 0; padding: 10px 12px; background: #FAFAFB; border-radius: 11px;
  font-size: calc(11.5px * var(--fs)); color: #606772; line-height: 1.65;
}
.c-dt-evs { margin-top: 11px; }
.c-dt-evs > i { font-style: normal; font-size: calc(10.5px * var(--fs)); color: #A2A8B2; }
.c-dt-evs p { display: flex; gap: 8px; margin: 6px 0 0; font-size: calc(11.5px * var(--fs)); color: var(--ink); }
.c-dt-evs p span { flex: none; color: var(--muted); }
.c-dt-btns { display: flex; gap: 8px; margin-top: 13px; }
.c-dt-btns button {
  flex: 1; height: 38px; border-radius: 12px; border: 1px solid #E6E8EB;
  background: #fff; color: var(--ink); font-size: calc(13px * var(--fs)); cursor: pointer;
}
.c-dt-btns button.main { background: var(--ink); border-color: var(--ink); color: #fff; }

/* 名单行头像改描边 */
.c-li-av {
  width: 34px; height: 34px; border-radius: 50%; flex: none;
  display: flex; align-items: center; justify-content: center;
  border: 1.3px solid var(--ink); background: #fff;
  font-size: calc(13px * var(--fs)); font-weight: 600; color: var(--ink);
}
.c-fold { border: 1px solid #EDEFF2; box-shadow: none; }

/* ===== v82：滚轮快跳 & 所有日期输入统一外观 ===== */
.wheel-quick {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 0 2px 10px;
  scrollbar-width: none;
}
.wheel-quick::-webkit-scrollbar { display: none; }
.wheel-quick button {
  flex: 0 0 auto;
  height: 28px;
  padding: 0 10px;
  border: 1px solid #E6E8EC;
  border-radius: 14px;
  background: #fff;
  color: #6B7280;
  font-size: calc(11.5px * var(--fs));
  font-variant-numeric: tabular-nums;
}
.wheel-quick button.on {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}
.wheel-box.wheel-2 .wheel-item { font-size: calc(17px * var(--fs)); }
input.wheel-input {
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23B7BCC6' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 14px;
  padding-right: 28px !important;
}

/* ===== v82：对话提炼稿 / 联动说明 ===== */
.az-dg {
  border: 1px solid #EDEFF2;
  border-radius: 16px;
  background: #fff;
  padding: 14px 14px 6px;
  margin: 4px 0 12px;
}
.az-dg-h {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}
.az-dg-h b { font-size: calc(13px * var(--fs)); color: var(--ink); }
.az-dg-h span { font-size: calc(10.5px * var(--fs)); color: #A6ABB4; white-space: nowrap; }
.az-dg-empty { font-size: calc(11.5px * var(--fs)); color: #8A909A; line-height: 1.7; padding: 2px 0 10px; }
.az-dg-g { display: flex; gap: 10px; padding: 7px 0; border-top: 1px solid #F3F4F6; }
.az-dg-g:first-of-type { border-top: 0; }
.az-dg-t {
  flex: 0 0 auto;
  height: 20px;
  line-height: 20px;
  padding: 0 8px;
  border-radius: 10px;
  font-style: normal;
  font-size: calc(10.5px * var(--fs));
  font-weight: 650;
  background: #F2F4F7;
  color: #6B7079;
}
.az-dg-t.t-person { background: #F5EBE5; color: #A9765C; }
.az-dg-t.t-schedule { background: #E9EEF4; color: #4C6B8A; }
.az-dg-t.t-money { background: #F3ECE4; color: #9A7B57; }
.az-dg-t.t-health { background: #E8F0EA; color: #5F8F7B; }
.az-dg-t.t-todo { background: #EFEDF5; color: #6E6390; }
.az-dg-t.t-mood { background: #F5ECEF; color: #9A6474; }
.az-dg-g ul { flex: 1; margin: 0; padding: 0; list-style: none; }
.az-dg-g li {
  position: relative;
  padding-left: 11px;
  font-size: calc(13px * var(--fs));
  line-height: 1.65;
  color: #2C3037;
  margin-bottom: 3px;
}
.az-dg-g li::before {
  content: "";
  position: absolute;
  left: 1px; top: 9px;
  width: 4px; height: 4px;
  border-radius: 50%;
  background: #C9CDD4;
}
.az-raw { margin: 4px 0 10px; }
.az-raw > summary {
  cursor: pointer;
  font-size: calc(11.5px * var(--fs));
  color: #8A909A;
  padding: 8px 2px;
  list-style: none;
}
.az-raw > summary::-webkit-details-marker { display: none; }
.az-raw > summary::after { content: " ›"; }
.az-raw[open] > summary::after { content: " ⌄"; }
.az-dg-ai { padding: 10px 12px; border-radius: 12px; background: #F7F8FA; margin: 6px 0 10px; }
.az-dg-ai.hidden { display: none; }
.az-dg-ai-h { font-size: calc(11.5px * var(--fs)); color: #8A909A; margin-bottom: 4px; }
.az-dg-ai-b { font-size: calc(13px * var(--fs)); line-height: 1.7; color: #2C3037; }
.az-dg-err { font-size: calc(11.5px * var(--fs)); color: #B4544B; }
.link-map { display: flex; flex-direction: column; gap: 2px; margin: 4px 0 12px; }
.link-row { display: flex; gap: 10px; padding: 10px 2px; border-bottom: 1px solid #F3F4F6; }
.link-row:last-child { border-bottom: 0; }
.link-ico {
  flex: 0 0 28px; height: 28px; border-radius: 9px;
  background: #F2F4F7; color: #6B7079;
  font-size: calc(13px * var(--fs)); line-height: 28px; text-align: center;
}
.link-main { flex: 1; min-width: 0; }
.link-main b { display: block; font-size: calc(13px * var(--fs)); color: var(--ink); margin-bottom: 2px; }
.link-main small { font-size: calc(11.5px * var(--fs)); color: #8A909A; line-height: 1.6; }
.link-num { flex: 0 0 auto; font-size: calc(10.5px * var(--fs)); color: #A6ABB4; align-self: center; }
.ct-birth { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; }
.ct-birth .seg { flex: 0 0 auto; }
.ct-birth .date-display { flex: 1; min-width: 0; font-size: calc(11.5px * var(--fs)); }
.ct-birth-row { align-items: flex-start; }

/* 滚轮可能从弹层里打开，层级要压过 nt-sheet */
#wheelMask { z-index: 96; }

/* ===== v83：AI 设置 · 服务商快选 / 测试连接 ===== */
.az-cfg-label {
  font-size: calc(11.5px * var(--fs));
  color: #8A909A;
  margin: 12px 2px 8px;
  letter-spacing: .3px;
}
.ai-presets {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}
.ai-preset {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 9px 8px;
  border: 1px solid #E6E8EC;
  border-radius: 12px;
  background: #fff;
  text-align: left;
  transition: border-color .15s, background .15s;
}
.ai-preset b {
  font-size: calc(11.5px * var(--fs));
  font-weight: 650;
  color: var(--ink);
  letter-spacing: -.2px;
}
.ai-preset small {
  font-size: calc(10.5px * var(--fs));
  color: #A6ABB4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ai-preset.on {
  border-color: var(--ink);
  background: #F7F8FA;
}
.ai-preset.on b { color: var(--ink); }
.az-test-out {
  margin: 12px 0 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #F7F8FA;
  font-size: calc(11.5px * var(--fs));
  line-height: 1.65;
  color: #8A909A;
  word-break: break-all;
}
.az-test-out.ok { background: #EDF4EF; color: #4B7A63; }
.az-test-out.bad { background: #FBEFED; color: #A9544A; }
.az-cfg-foot {
  font-size: calc(10.5px * var(--fs));
  color: #A6ABB4;
  line-height: 1.7;
  margin: 10px 2px 4px;
}

/* ===== v85：助手页整页定高 —— 工具条固定、聊天区独立滚动、输入条常驻 ===== */
#view-assistant {
  height: calc(100dvh - var(--hdr-h, 96px) - var(--tab-h, 76px));
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
}
body.kb-open #view-assistant {
  height: calc(100dvh - var(--hdr-h, 96px) - var(--kb-off, 0px));
}
.az-toolbar {
  flex: 0 0 auto;
  display: flex;
  gap: 8px;
  padding: 8px 14px;
  background: rgba(242, 243, 245, .94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(20, 22, 26, .05);
  overflow-x: auto;
  scrollbar-width: none;
  z-index: 3;
}
.az-toolbar::-webkit-scrollbar { display: none; }
.az-chip { flex: 0 0 auto; height: 32px; border-radius: 16px; }
.az-chat {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 6px 14px 14px;
  scroll-padding-bottom: 12px;
}
.az-inputbar {
  position: static;
  left: auto;
  right: auto;
  bottom: auto;
  max-width: none;
  margin: 0;
  flex: 0 0 auto;
  padding: 8px 12px calc(8px + var(--safe-b));
  border-top: 1px solid #ECEEF1;
  background: rgba(250, 250, 248, .98);
  backdrop-filter: blur(8px);
  z-index: 4;
}

/* ===== v85：应用页重做（极简 / 九宫格 + 列表 / 轻触反馈） ===== */
.apps-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
}
.apps-head .apps-lead {
  flex: 1;
  margin: 0;
  font-size: calc(11.5px * var(--fs));
  line-height: 1.6;
  color: #9AA0AA;
}
.apps-seg { flex: 0 0 auto; }
.apps-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.app-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 11px;
  width: 100%;
  padding: 14px 13px 13px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid rgba(20, 22, 26, .055);
  box-shadow: none;
  text-align: left;
  transition: transform .18s cubic-bezier(.22, 1, .36, 1), background .18s, border-color .18s;
}
.app-tile:active {
  transform: scale(.968);
  background: #FAFBFC;
  border-color: rgba(20, 22, 26, .09);
}
.app-tile.off { opacity: .45; }
.app-ic {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: calc(15px * var(--fs));
  font-weight: 600;
  letter-spacing: -.3px;
}
.app-tx {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  width: 100%;
}
.app-tile b {
  font-size: calc(13.5px * var(--fs));
  font-weight: 600;
  letter-spacing: -.2px;
  color: var(--ink);
  line-height: 1.2;
}
.app-tile small {
  font-size: calc(11.5px * var(--fs));
  color: #9AA0AA;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.app-chev { display: none; }

/* 列表排法：整块白卡，行间细线 */
.apps-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 2px 0;
  background: #fff;
  border: 1px solid rgba(20, 22, 26, .055);
  border-radius: 20px;
  overflow: hidden;
}
.apps-list .app-tile {
  flex-direction: row;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 0;
  border-radius: 0;
  border-bottom: 1px solid #F2F4F6;
}
.apps-list .app-tile:last-child { border-bottom: 0; }
.apps-list .app-tile:active { transform: none; background: #F7F8FA; }
.apps-list .app-ic {
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  font-size: calc(13.5px * var(--fs));
}
.apps-list .app-tx { flex: 1; }
.apps-list .app-chev {
  display: block;
  flex: 0 0 auto;
  color: #CBD0D8;
  font-size: calc(17px * var(--fs));
  line-height: 1;
}

/* ===== v86：主页重排——应用条目流 + 统计并入排班页 ===== */
#homeApps { margin: 14px 0 4px; }
#homeApps .section-head { margin: 0 0 10px; padding: 0 2px; }
.home-apps { margin: 0; }
.sum-panel { margin: 2px 0 16px; }


/* ===== v87 ===== */
/* 星座小行：白卡带框（与宜忌、天气条一致） */
.tc-zmini {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 12px 26px 12px 12px; border: 0; background: #fff; font-family: inherit;
  border-radius: 16px; box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
  margin-bottom: 9px; cursor: pointer;
}
.tc-zmini .zm-sym { font-size: calc(17px * var(--fs)); line-height: 1; }
.tc-zmini .zm-name { font-size: calc(13.5px * var(--fs)); font-weight: 600; color: var(--ink); }
.tc-zmini .zm-next { flex: 1; text-align: left; font-size: calc(11.5px * var(--fs)); color: var(--muted); }
/* 大事记 hero：主次分明 */
.cd-hero { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin: 2px 0 6px; }
.cd-hero-main { font-size: calc(17px * var(--fs)); font-weight: 700; letter-spacing: -.3px; color: var(--ink); }
.cd-hero small { font-size: calc(11.5px * var(--fs)); color: var(--muted); }
.cd-hero-big { font-size: calc(17px * var(--fs)); font-weight: 700; letter-spacing: -.3px; color: var(--accent-d); }
/* 选中态统一：白色带阴影 */
.sched-tab.active,
.dp-sched-tab.active,
.tc-sched-tab.active,
.cat.active,
.nt-tagbtn.active,
.mini-chip.active {
  background: #fff; color: var(--ink);
  box-shadow: 0 1px 4px rgba(16, 24, 40, .12);
  border-color: transparent;
}
.cat.active { font-weight: 600; }
.nt-tagbtn.active { border: 1px solid transparent; }
/* 应用页：九宫格上图下名 */
.apps-grid { gap: 12px; }
.apps-grid .app-tile {
  align-items: center; text-align: center;
  padding: 16px 10px 13px; gap: 9px; border-radius: 18px;
}
.apps-grid .app-tile b {
  font-size: calc(13px * var(--fs)); font-weight: 600; letter-spacing: -.1px; color: var(--ink);
}
.app-svg { width: 24px; height: 24px; display: block; }
.apps-grid .app-ic { width: 42px; height: 42px; border-radius: 13px; }
.apps-grid .app-ic .app-svg { width: 23px; height: 23px; margin: 0 auto; }
.apps-list .app-ic { width: 36px; height: 36px; border-radius: 11px; flex: 0 0 36px; }
.apps-list .app-ic .app-svg { width: 20px; height: 20px; margin: 0 auto; }
.apps-lead { font-size: calc(11.5px * var(--fs)); color: #9AA0AA; margin: 14px 4px 0; line-height: 1.6; }
.apps-head { margin: 0 0 12px; justify-content: flex-end; }
/* 助手输入：单行小字 */
#azInput {
  font-size: calc(11.5px * var(--fs));
  max-height: 38px;
  line-height: 1.45;
}
/* 健康页 v87 */
.hc-diet-tools { display: flex; gap: 8px; margin-bottom: 10px; }
.hc-tool-btn {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px;
  height: 38px; border-radius: 12px; border: 1px solid rgba(20,22,26,.07);
  background: #fff; color: var(--ink); font-size: calc(13px * var(--fs)); font-weight: 600;
  font-family: inherit;
}
.hc-tool-btn svg { width: 16px; height: 16px; }
.hc-vitals-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.hc-vitals-head b { font-size: calc(13.5px * var(--fs)); }
.hc-vitals-save {
  border: 0; background: var(--accent); color: #fff; font-family: inherit;
  border-radius: 9px; height: 30px; padding: 0 14px; font-size: calc(13px * var(--fs)); font-weight: 600;
}
.hc-vitals-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.hc-vital { display: flex; align-items: center; gap: 8px; background: #F6F7F8; border-radius: 10px; padding: 8px 10px; }
.hc-vital span { flex: 1; font-size: calc(11.5px * var(--fs)); color: var(--ink-2); white-space: nowrap; }
.hc-vital span i { font-style: normal; color: var(--muted); font-size: calc(10.5px * var(--fs)); margin-left: 2px; }
.hc-vital input {
  width: 58px; border: 0; background: #fff; border-radius: 8px; height: 28px;
  text-align: center; font-size: calc(13px * var(--fs)); font-family: inherit; color: var(--ink);
}
.hc-eval { line-height: 1.7; }
.hc-eval-line { margin: 3px 0; font-size: calc(13px * var(--fs)); color: var(--ink-2); }
.hc-eval-line b { color: var(--ink); }
.hc-week-menu .hc-wm-row { padding: 9px 0; border-bottom: 1px solid #F2F4F6; display: flex; flex-direction: column; gap: 3px; }
.hc-week-menu .hc-wm-row:last-child { border-bottom: 0; }
.hc-wm-row b { font-size: calc(13px * var(--fs)); color: var(--ink); }
.hc-wm-row span { font-size: calc(13px * var(--fs)); color: var(--ink-2); }
.hc-pick-n { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; font-size: calc(13px * var(--fs)); color: var(--muted); }
.fl-search {
  width: 100%; height: 38px; border-radius: 11px; border: 1px solid rgba(20,22,26,.08);
  background: #fff; padding: 0 12px; font-size: calc(13px * var(--fs)); font-family: inherit; margin-bottom: 10px;
}
.fl-cat { font-style: normal; color: var(--muted); font-size: calc(10.5px * var(--fs)); margin-left: 6px; }

/* ===== v88：应用条目卡片化（参照「近期」：一条一张独立白卡，无分割线） ===== */
/* 主页应用条目流 */
.home-apps {
  display: flex;
  flex-direction: column;
  gap: 9px;
  background: none;
  border: 0;
  border-radius: 0;
  padding: 0;
  overflow: visible;
}
.home-apps .app-tile,
.apps-list .app-tile {
  flex-direction: row;
  align-items: center;
  text-align: left;
  gap: 12px;
  padding: 12px 15px;
  background: #fff;
  border: 0;
  border-radius: 16px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
}
.home-apps .app-tile:active,
.apps-list .app-tile:active { transform: none; background: #FAFBFC; box-shadow: 0 1px 2px rgba(16, 24, 40, .04); }
.home-apps .app-tx,
.apps-list .app-tx { flex: 1; min-width: 0; }
.home-apps .app-tile b,
.apps-list .app-tile b { font-size: calc(15px * var(--fs)); }
.home-apps .app-tile small,
.apps-list .app-tile small { font-size: calc(11.5px * var(--fs)); }
.home-apps .app-ic,
.apps-list .app-ic { flex: 0 0 34px; width: 34px; height: 34px; border-radius: 11px; }
.home-apps .app-ic .app-svg,
.apps-list .app-ic .app-svg { width: 19px; height: 19px; margin: 0 auto; }
.home-apps .app-chev,
.apps-list .app-chev {
  display: block; flex: 0 0 auto; color: #CBD0D8;
  font-size: calc(17px * var(--fs)); line-height: 1;
}
/* 应用页列表排法：独立白卡，不再整块面板 + 分割线 */
.apps-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
  background: none;
  border: 0;
  border-radius: 0;
  padding: 0;
  overflow: visible;
}
/* 应用页头部已并入顶栏：切换器就是顶栏按钮，与加号同款大小 */

/* ===== v88b：主页班表切换条（排班条目下方，可横滑） ===== */
.home-sched-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 2px 4px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.home-sched-strip::-webkit-scrollbar { display: none; }
.home-sched-strip .sched-tab { flex: 0 0 auto; max-width: 40vw; overflow: hidden; text-overflow: ellipsis; }

/* ===== v88c：排班卡内嵌班表条（卡片内、横线分隔） ===== */
.home-apps .app-tile.app-tile-stack {
  flex-direction: column;
  align-items: stretch;
  padding: 4px 15px 10px;
}
.app-tile-core {
  display: flex; align-items: center; gap: 12px; width: 100%;
  background: none; border: 0; padding: 10px 0 8px;
  font-family: inherit; text-align: left; cursor: pointer;
}
.app-tile-core:active { opacity: .7; }
.app-tile-sep { display: block; border-top: 1px solid #F0F1F3; margin: 0 0 9px; }
.app-tile-stack .home-sched-strip { padding: 0 0 2px; gap: 8px; }
/* 卡内班表胶囊：字号比「排班」标题小，选中用白底带阴影（与其他页统一） */
.app-tile-stack .sched-tab {
  background: #F2F3F5;
  padding: 6px 13px;
  font-size: calc(11.5px * var(--fs));
  font-weight: 500;
  color: var(--ink-2);
}
.app-tile-stack .sched-tab.active {
  background: #fff; color: var(--ink);
  border: 1px solid #ECEEF1;
  box-shadow: 0 1px 4px rgba(16, 24, 40, .12);
}

/* ===== v88f：排班表横条列表（左滑删除整张表） ===== */
.sched-tabs.as-list {
  flex-direction: column;
  align-items: stretch;
  overflow-x: visible;
  gap: 8px;
  /* v118：列表模式不是类目条，去掉灰底和胶囊 padding——
     展开的排班表内容插在这个容器里，灰底会把整块内容都垫成灰色 */
  background: transparent;
  padding: 0;
}
.sched-tabs.as-list .swipe-wrap { width: 100%; }
.sc-swipe { background: #E4664B; border-radius: 14px; }
.sc-strip-row {
  display: flex; align-items: center; gap: 10px;
  background: #fff; border-radius: 14px;
  padding: 12px 15px; cursor: pointer;
}
.sc-strip-row:active { background: #FAFBFC; }
/* 当前正在使用的排班表：整条高亮选中态，切换一眼可见 */
.sc-strip-row.active {
  background: #FFF4EC;
  box-shadow: inset 0 0 0 1.5px #D9A183;
}
.sc-strip-row.active b { color: #A35B33; }
.sc-strip-row.active .sc-strip-meta { color: #B3795F; }
.sc-strip-row.active .sc-chev { color: #D9A183; }
.sc-strip-row b { font-size: calc(13.5px * var(--fs)); font-weight: 600; color: var(--ink); }
.sc-strip-meta { flex: 1; text-align: right; font-size: calc(11.5px * var(--fs)); color: var(--muted); }
.sc-chev { color: #CBD0D8; font-size: calc(17px * var(--fs)); line-height: 1; }
.sched-strip-add {
  width: 100%; border: 1.5px dashed #C9CDD4; background: none; border-radius: 14px;
  padding: 11px 0; font-size: calc(13px * var(--fs)); font-weight: 600;
  color: var(--muted); font-family: inherit; cursor: pointer;
}

/* ===== v89：大事记页重构 / 排班表选中态重设计 ===== */
/* hero 深色卡：主标题「张肖生日」改白色，其余层级用白色透明度 */
.countdown-hero .cd-hero-main { color: #fff; }
.countdown-hero .cd-hero small { color: rgba(255, 255, 255, .65); }
.countdown-hero .cd-hero-big { color: #fff; }
.countdown-hero .cd-date { opacity: .75; }

/* 排班表横条选中态：白底 + 柔和阴影 + 左侧圆角色条，不再描边 */
.sc-strip-row.active {
  background: #fff;
  box-shadow: 0 3px 12px rgba(167, 108, 66, .22);
}
.sc-strip-row.active::before {
  content: "";
  position: absolute;
  left: 10px; top: 12px; bottom: 12px;
  width: 4px; border-radius: 4px;
  background: #C77E52;
}
.sc-strip-row.active { padding-left: 24px; }
.sc-strip-row.active b { color: #A35B33; }
.sc-strip-row.active .sc-strip-meta { color: #B3795F; }
.sc-strip-row.active .sc-chev { color: #D9A183; }

/* 大事记类型分组 */
.ev-group-head h2 { display: flex; align-items: center; gap: 7px; }
.ev-group-dot { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.ev-group-list { margin-bottom: 6px; }

/* ===== v90：大事记类别标签条 ===== */
.ev-chips {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  padding: 3px;
  background: #EAECEF;
  border-radius: 12px;
  margin-bottom: 10px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.ev-chips::-webkit-scrollbar { display: none; }
.ev-chip {
  flex: 0 0 auto;
  height: 34px;
  display: inline-flex;
  align-items: center;
  padding: 0 16px;
  border-radius: 9px;
  border: 0;
  background: transparent;
  font-size: calc(13px * var(--fs));
  font-weight: 600;
  color: var(--muted);
  font-family: inherit;
  cursor: pointer;
  transition: all .18s;
}
.ev-chip.active {
  background: #fff;
  color: var(--ink);
  font-weight: 650;
  box-shadow: 0 1px 5px rgba(16, 24, 40, .13);
}

/* ===== v90：底部抽屉式添加弹窗 ===== */
.evsheet-mask { align-items: flex-end; padding: 0; }
.evsheet {
  width: 100%;
  max-height: 88vh;
  background: #fff;
  border-radius: 22px 22px 0 0;
  display: flex;
  flex-direction: column;
  animation: sheetUp .26s cubic-bezier(.2,.8,.3,1);
}
@keyframes sheetUp { from { transform: translateY(60%); opacity: .4; } to { transform: none; opacity: 1; } }
.evsheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 18px 6px;
}
.evsheet-head h2 { font-size: calc(15px * var(--fs)); font-weight: 650; color: var(--ink); margin: 0; }
.evsheet-cancel { border: 0; background: none; font-size: calc(13.5px * var(--fs)); color: var(--muted); font-family: inherit; cursor: pointer; }
.evsheet-save { border: 0; background: none; font-size: calc(13.5px * var(--fs)); color: #3E7BFA; font-weight: 600; font-family: inherit; cursor: pointer; }
.evsheet-body { padding: 4px 20px 26px; overflow-y: auto; }
.sheet-name {
  width: 100%;
  border: 0;
  font-size: calc(17px * var(--fs));
  font-weight: 600;
  color: var(--ink);
  font-family: inherit;
  padding: 14px 0 12px;
  outline: none;
}
.sheet-name::placeholder { color: #C3C8D1; font-weight: 500; }
.sheet-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 13px 0;
  border: 0;
  border-top: 1px solid #F2F3F5;
  background: none;
  font-family: inherit;
  font-size: calc(13.5px * var(--fs));
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}
.sr-label { flex: 0 0 auto; font-weight: 500; }
.sr-val { flex: 1; text-align: right; color: var(--muted); font-size: calc(13px * var(--fs)); }
.sheet-calseg {
  display: inline-flex;
  background: #E9EEFB;
  border-radius: 999px;
  padding: 2px;
  gap: 2px;
  flex: 0 0 auto;
}
.sheet-calseg button {
  border: 0;
  background: none;
  border-radius: 999px;
  padding: 4px 12px;
  font-size: calc(11.5px * var(--fs));
  font-weight: 600;
  color: #5A79D6;
  font-family: inherit;
  cursor: pointer;
}
.sheet-calseg button.on { background: #3E7BFA; color: #fff; }
.sr-chev { color: #C6CBD4; font-size: calc(17px * var(--fs)); line-height: 1; }
.sr-input { flex: 0 0 auto; margin-left: auto; border: 0; background: none; font-family: inherit; font-size: calc(13px * var(--fs)); color: var(--muted); text-align: right; outline: none; }
.sheet-sub {
  background: #F6F7F9;
  border-radius: 13px;
  padding: 10px 12px;
  margin: 4px 0 6px;
}
.sheet-sub .chip-row { justify-content: flex-start; flex-wrap: wrap; }
.sheet-mday { display: flex; align-items: center; gap: 8px; margin-top: 9px; font-size: calc(13px * var(--fs)); color: var(--ink-2); }
.sheet-mday input[type="number"] { width: 62px; border: 1px solid #E3E6EB; border-radius: 9px; padding: 7px 9px; font-family: inherit; font-size: calc(13px * var(--fs)); outline: none; }
.sheet-last { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; font-size: calc(13px * var(--fs)); color: var(--muted); }
.evsheet-body textarea {
  width: 100%;
  border: 0;
  background: #F6F7F9;
  border-radius: 13px;
  padding: 12px 14px;
  font-family: inherit;
  font-size: calc(13px * var(--fs));
  color: var(--ink);
  margin-top: 10px;
  resize: none;
  outline: none;
  box-sizing: border-box;
}
.sheet-del {
  width: 100%;
  border: 0;
  background: #FDF1EE;
  color: #D65A45;
  border-radius: 13px;
  padding: 12px 0;
  font-size: calc(13.5px * var(--fs));
  font-weight: 600;
  font-family: inherit;
  margin-top: 14px;
  cursor: pointer;
}

/* ===== v90：生命日 ===== */
.life-card {
  background:
    radial-gradient(120% 90% at 80% 0%, rgba(88, 110, 190, .35), transparent 60%),
    linear-gradient(168deg, #0C1128 0%, #131A38 55%, #1B2344 100%);
  border-radius: 20px;
  padding: 22px 20px 18px;
  color: #fff;
  overflow: hidden;
}
.life-card h2 { font-size: calc(17px * var(--fs)); font-weight: 700; margin: 0 0 8px; color: #fff; }
.life-sub { font-size: calc(13px * var(--fs)); color: rgba(255, 255, 255, .62); margin: 0 0 16px; line-height: 1.6; }
.life-pick {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, .22);
  background: rgba(255, 255, 255, .07);
  color: #fff;
  border-radius: 13px;
  padding: 12px 14px;
  font-size: calc(13.5px * var(--fs));
  font-family: inherit;
  text-align: left;
  cursor: pointer;
}
.life-age-row { display: flex; align-items: center; gap: 10px; margin: 14px 0 18px; font-size: calc(13.5px * var(--fs)); color: rgba(255, 255, 255, .8); }
.life-age-row input {
  width: 76px;
  border: 1px solid rgba(255, 255, 255, .22);
  background: rgba(255, 255, 255, .07);
  color: #fff;
  border-radius: 11px;
  padding: 9px 12px;
  font-size: calc(17px * var(--fs));
  font-weight: 600;
  font-family: inherit;
  text-align: center;
  outline: none;
}
.life-go {
  width: 100%;
  border: 0;
  background: linear-gradient(135deg, #5B8AF0, #7E6BE8);
  color: #fff;
  border-radius: 14px;
  padding: 13px 0;
  font-size: calc(13.5px * var(--fs));
  font-weight: 650;
  font-family: inherit;
  cursor: pointer;
}
.life-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.life-top > span { font-size: calc(13px * var(--fs)); color: rgba(255, 255, 255, .55); letter-spacing: 2px; }
.life-edit { border: 1px solid rgba(255, 255, 255, .25); background: rgba(255, 255, 255, .08); color: rgba(255, 255, 255, .85); border-radius: 999px; padding: 5px 13px; font-size: calc(11.5px * var(--fs)); font-family: inherit; cursor: pointer; }
.life-age { font-size: calc(15px * var(--fs)); color: rgba(255, 255, 255, .85); margin: 0 0 6px; }
.life-age b { font-size: calc(17px * var(--fs)); font-weight: 600; color: #fff; letter-spacing: -.5px; margin: 0 4px; font-variant-numeric: tabular-nums; }
.life-left { font-size: calc(13px * var(--fs)); color: rgba(255, 255, 255, .6); margin: 0 0 6px; }
.life-stage { position: relative; margin: 0 -6px; }
.life-svg { width: 100%; height: auto; display: block; }
.life-pct {
  position: absolute;
  transform: translate(-50%, -50%);
  background: rgba(255, 255, 255, .14);
  backdrop-filter: blur(6px);
  border-radius: 9px;
  padding: 5px 11px;
  font-size: calc(11.5px * var(--fs));
  color: #fff;
  white-space: nowrap;
}
.life-stats { display: flex; margin-top: 4px; padding-top: 14px; border-top: 1px solid rgba(255, 255, 255, .12); }
.life-stats > div { flex: 1; text-align: center; }
.life-stats b { display: block; font-size: calc(17px * var(--fs)); font-weight: 600; color: #fff; font-variant-numeric: tabular-nums; }
.life-stats span { font-size: calc(10.5px * var(--fs)); color: rgba(255, 255, 255, .55); }

/* ===== v91：标签条尾部加号 + 长按拖动 ===== */
.ev-chip-add {
  height: 34px;
  display: inline-flex;
  align-items: center;
  padding: 0 14px;
  background: none;
  border: 1.5px dashed #C9CDD4;
  color: var(--muted);
  font-weight: 600;
}
.ev-chip.dragging {
  opacity: .85;
  box-shadow: 0 4px 14px rgba(16, 24, 40, .22);
  transform: scale(1.06);
  position: relative;
  z-index: 2;
  background: #fff;
}
.ev-chips { touch-action: pan-x; }
.ev-add-opt {
  display: block;
  width: 100%;
  border: 0;
  border-top: 1px solid #F2F3F5;
  background: none;
  padding: 15px 4px;
  font-size: calc(13.5px * var(--fs));
  font-weight: 550;
  color: var(--ink);
  font-family: inherit;
  text-align: left;
  cursor: pointer;
}
.ev-add-opt:first-child { border-top: 0; }
.ev-add-opt:active { background: #F6F7F9; }
/* v91：事件条目去竖杠后左侧留白收紧 */
.event-item .ev-body { padding-left: 0; }

/* ================= v92：大事记管理模式 ================= */
.mg-tip { margin: 2px 0 10px; font-size: calc(11.5px * var(--fs)); color: var(--muted); line-height: 1.5; }
.mg-wrap { margin-bottom: 10px; }
.mg-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 15px 16px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .05);
  cursor: pointer;
}
.mg-row.open { box-shadow: 0 2px 8px rgba(16, 24, 40, .09); }
.mg-row b { font-size: calc(15px * var(--fs)); font-weight: 650; }
.mg-meta { margin-left: auto; font-size: calc(11.5px * var(--fs)); color: var(--muted); font-variant-numeric: tabular-nums; }
.mg-chev { color: #C9CDD4; font-size: calc(15px * var(--fs)); }
.mg-sub { padding: 4px 2px 2px; }
.mg-sub .event-item { box-shadow: 0 1px 2px rgba(16, 24, 40, .04); }
.mg-fixed { margin-top: 6px; }
.mg-note { margin: 8px 4px 0; font-size: calc(11.5px * var(--fs)); color: var(--muted); line-height: 1.5; }
.mg-add {
  width: 100%;
  margin-top: 8px;
  padding: 11px 0;
  border: 1.5px dashed #D8DCE3;
  border-radius: 14px;
  background: none;
  font-size: calc(13.5px * var(--fs));
  font-weight: 600;
  color: var(--ink-2);
  font-family: inherit;
  cursor: pointer;
}
.mg-add:active { background: #F6F7F9; }

/* ================= v93：卡片两行布局 + 拖动占位 ================= */
/* 第一行：标题+年龄+类别+提醒+每年（放不下时换行，保证名字完整显示） */
.ev-top .ev-flag { flex-shrink: 0; }
/* v110：名字优先完整显示，极端窄屏+大字号时最多折两行再省略，不再挤成一两个字 */
.ev-top h3 {
  overflow: hidden; text-overflow: ellipsis; flex: 0 1 auto;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  white-space: normal; overflow-wrap: break-word; line-height: 1.3;
}
/* 第二行：日期 · 农历/出生信息（v109：放得下就完整显示，过长才换行，不再截断） */
.event-item .ev-meta { white-space: normal; overflow-wrap: break-word; }
/* 标签拖动：浮动本体 + 虚线占位 */
.ev-chip.dragging {
  position: fixed;
  z-index: 99;
  margin: 0;
  box-shadow: 0 10px 24px rgba(16, 24, 40, .22);
  opacity: .95;
  transition: none;
}
.ev-chip.ev-ph { background: transparent; border: 1.5px dashed #C6CBD3; color: transparent; box-shadow: none; }

/* ================= v94：单行横滑选择 + 拖动触控 ================= */
/* 顶部标签：允许竖向滚页面，横向由脚本接管（长按拖动 / 横滑标签条） */
.ev-chip { touch-action: pan-y; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.ev-chips { -webkit-overflow-scrolling: touch; }
/* 抽屉里的选择行：周几 / 重复 / 提醒 / 类型 / 提示音，一排横滑 */
.sheet-sub .chip-row,
#sheetWdayChips,
#sheetTypeChips,
#sheetSoundChips {
  display: flex;
  gap: 8px;
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 2px;
}
#sheetRemindChips { display: flex; gap: 8px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.sheet-sub .chip-row::-webkit-scrollbar,
#sheetWdayChips::-webkit-scrollbar,
#sheetTypeChips::-webkit-scrollbar,
#sheetSoundChips::-webkit-scrollbar { display: none; }
.sheet-sub .mini-chip { flex: 0 0 auto; }
/* 旧弹窗里的类型 / 提醒 / 提示音 / 周几也一排横滑 */
#catRow, #remindRow, #soundRow, #wdayRow {
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
#catRow::-webkit-scrollbar, #remindRow::-webkit-scrollbar, #soundRow::-webkit-scrollbar, #wdayRow::-webkit-scrollbar { display: none; }
#catRow .cat, #remindRow .mini-chip, #soundRow .mini-chip, #wdayRow .mini-chip { flex: 0 0 auto; }

/* ================= v95b：管理模式子条目竖线 + 间距 ================= */
.mg-sub { position: relative; padding: 6px 2px 2px 16px; }
.mg-sub::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 10px;
  bottom: 10px;
  width: 2px;
  border-radius: 1px;
  background: #E6E9F0;
}
.mg-sub .swipe-wrap { margin-bottom: 9px; }
.mg-sub .mg-note { margin-left: 2px; }
.mg-sub .mg-add { margin-top: 2px; }

/* ================= v97：日历红点下移 / 选中圆圈 / 主页应用详情行 ================= */
/* 红点：从数字右上角移到数字正下方 */
.day .evdot {
  top: 32px;
  right: auto;
  left: 50%;
  transform: translateX(-50%);
}
/* 数字格子收窄一点，给红点留位置，农历字往下挪 */
.day .dnum { width: 28px; height: 28px; font-size: calc(17px * var(--fs)); }
.day .lunar { margin-top: 7px; }
/* 选中日：小方块变圆形，稍小一点，不压农历字，与下方留出距离 */
.day.selected .dnum,
.day.today.selected .dnum {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  margin-bottom: 2px;
  font-size: calc(15px * var(--fs));
}
/* 主页应用卡：横线下的一行动态（最近/接下来） */
.app-tile-stack .app-detail {
  padding: 1px 2px 3px;
  font-size: calc(13px * var(--fs));
  color: var(--ink-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ================= v98：灰点在农历字下 / 点日期弹大事小界面 ================= */
/* 农历字贴回数字下方，灰点变成小灰圆跟在农历字下面（随内容流式排列，有班次标签时点在标签上方） */
.day .lunar { margin-top: 2px; }
.day .evdot {
  position: static;
  display: block;
  flex: 0 0 auto;
  width: 4.5px;
  height: 4.5px;
  margin: 1px auto 0;
  background: #C3C8D1;
  box-shadow: none;
}
.day.selected .evdot { background: #9AA1AC; box-shadow: none; }
/* 当天大事弹出小界面 */
#dayEvPop {
  position: fixed;
  z-index: 80;
  background: rgba(28, 30, 36, .95);
  color: #fff;
  border-radius: 14px;
  padding: 10px 13px 8px;
  font-size: calc(13px * var(--fs));
  box-shadow: 0 10px 30px rgba(0, 0, 0, .28);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-5px);
  transition: opacity .16s, transform .16s;
}
#dayEvPop.show { opacity: 1; transform: none; pointer-events: auto; }
#dayEvPop .dep-head { font-size: calc(11.5px * var(--fs)); color: #A9AFB9; margin-bottom: 5px; }
#dayEvPop .dep-row { display: flex; align-items: center; gap: 7px; padding: 4px 0; }
#dayEvPop .dep-dot { width: 7px; height: 7px; border-radius: 50%; flex: 0 0 auto; }
#dayEvPop .dep-row small { color: #A9AFB9; margin-left: auto; padding-left: 8px; white-space: nowrap; }

/* ================= v98b：管理模式固定类目子条目独立成卡 + 间隔 ================= */
.mg-sub .mg-fixed {
  display: flex;
  flex-direction: column;
  gap: 9px;
  background: none;
  box-shadow: none;
  border-radius: 0;
  padding: 0;
  margin: 2px 0 4px;
}
.mg-sub .mg-fixed .fest-row {
  background: #fff;
  border-radius: 16px;
  padding: 12px 14px;
  border-bottom: none;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
}

/* ================= v101：循环按钮同排+细节长框 / 列表收起一行点开显细节 ================= */
/* 「循环排班」和「永久循环中」并排两个按钮；按钮上只有标题+停止 */
.sched-cycle-row { display: flex; gap: 10px; margin-bottom: 10px; }
.sched-cycle-row .cycle-entry { flex: 1 1 auto; margin-bottom: 0; padding: 11px 13px; gap: 10px; }
.sched-cycle-row .cycle-entry-icon { width: 32px; height: 32px; }
.sched-cycle-row .cycle-entry-icon svg { width: 17px; height: 17px; }
.sched-cycle-row .cycle-banner { flex: 0 0 auto; margin-bottom: 0; padding: 11px 13px; gap: 14px; }
.sched-cycle-row .cycle-banner .cb-title { margin: 0; }
/* 永久循环细节：独立全宽长框，常显 */
.cycle-detail-bar {
  background: #fff;
  border: 1px solid rgba(0, 0, 0, .05);
  border-radius: 18px;
  padding: 11px 14px;
  margin-bottom: 12px;
}
.cycle-detail-bar p { margin: 0; font-size: calc(11.5px * var(--fs)); color: #8A6A5B; line-height: 1.55; }
.cycle-detail-bar.hidden { display: none; }
/* 列表视图：收起时一行（表名+箭头），条加高显得大气，点开显示该表整页内容 */
.sc-strip-row2 {
  padding: 20px 16px;
}
.sc-strip-row2.opened { border-radius: 14px; }
.sc-line1 { display: flex; align-items: center; gap: 8px; width: 100%; }
.sc-line1 b { font-size: calc(15px * var(--fs)); font-weight: 650; }
.sc-cur {
  font-size: calc(10.5px * var(--fs));
  color: #B3795F;
  background: #FFF3ED;
  padding: 2px 8px;
  border-radius: 999px;
  font-weight: 600;
}
.sc-strip-row2 .sc-chev { color: var(--muted); }
/* v108：长按名称就地改名（替代弹窗与铅笔按钮） */
.inline-name-inp {
  font: inherit;
  color: var(--ink);
  background: #fff;
  border: 1.5px solid #E0A184;
  border-radius: 8px;
  padding: 1px 6px;
  min-width: 0;
  outline: none;
  -webkit-appearance: none;
  box-shadow: 0 0 0 3px rgba(224, 161, 132, 0.14);
}
.inline-name-inp--tab {
  width: 5.6em;
  max-width: 40vw;
  text-align: center;
  font-weight: 600;
  font-size: calc(13.5px * var(--fs));
}
.sched-tab.editing { padding: 5px 8px; }
.inline-name-inp--row {
  width: 9em;
  max-width: 52vw;
  text-align: left;
  font-size: calc(15px * var(--fs));
  font-weight: 650;
}
.inline-name-inp--shift {
  width: 8em;
  max-width: 48vw;
  text-align: left;
  font-size: calc(13.5px * var(--fs));
  font-weight: 600;
  margin: 0 0 2px;
}
.st-row { cursor: pointer; }
.st-row:active { background: rgba(0, 0, 0, 0.02); }
/* v103：展开箭头朝下，不再旋转成朝左 */
.sc-strip-row2.opened .sc-chev { transform: none; color: #D9A183; }
/* 展开的排班内容：与卡片连成一体 */
.sc-item { margin-bottom: 10px; }
.sc-expand {
  background: #fff;
  border-radius: 0 0 14px 14px;
  margin: -6px 0 0;
  padding: 12px 18px 12px;
  box-shadow: inset 0 1.5px 0 #F0F1F3;
}
.sc-item .sc-swipe { border-radius: 14px; }
.sc-item:has(.sc-expand) .sc-swipe { border-radius: 14px 14px 0 0; }
.sc-expand-cap { margin: 6px 0 2px; font-size: calc(11.5px * var(--fs)); color: var(--muted); font-weight: 600; }
.sc-expand-cap + .sc-prev-row { border-top: none; }
.sc-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 7px; vertical-align: middle; }
.sc-prev-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 6px 0;
  font-size: calc(13px * var(--fs));
  color: var(--muted);
}
.sc-prev-row + .sc-prev-row { border-top: 1px solid #F4F5F7; }
.sc-prev-row b { font-weight: 650; }
.sc-prev-empty { margin: 2px 0; font-size: calc(11.5px * var(--fs)); color: var(--muted); }

/* ================= v103：选中态微变色去竖线 / 展开内容淡竖线 / 标签居中 ================= */
/* 选中不再有左侧色条，整卡底色微变表示选中 */
.sc-strip-row.active::before { content: none; }
.sc-strip-row.active { padding-left: 16px; background: #FFF4EC; box-shadow: 0 2px 10px rgba(167, 108, 66, .14); }
/* 列表模式下展开的整页内容左侧加淡竖线，与上面卡片边框外沿平齐；内容贴近手机边框 */
#schedBody.sched-body-line {
  margin-left: 0px;
  border-left: 2px solid #E6E9F0;
  padding-left: 10px;
}
/* v106：其他展开表的内容快照，样式与活内容块一致，按钮不可点 */
.sc-snap {
  margin-left: 0px;
  border-left: 2px solid #E6E9F0;
  padding-left: 10px;
}
.sc-snap button { pointer-events: none; }
/* 标签少时居中显示，放不下自动切回左对齐横滑 */
.sched-tabs { justify-content: flex-start; }
.sched-tabs.fit-center { justify-content: center; }

/* v112：左缘右滑返回——跟随手指的进度指示条 */
#edgeBackHint {
  position: fixed;
  left: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 36px;
  border-radius: 20px;
  background: rgba(179, 121, 95, 0.9);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 10px;
  box-sizing: border-box;
  font-size: calc(17px * var(--fs));
  font-weight: 700;
  line-height: 1;
  opacity: 0;
  pointer-events: none;
  z-index: 95;
  transition: opacity 0.15s ease, width 0.08s ease-out;
  overflow: hidden;
}
#edgeBackHint.show { opacity: 1; }

/* v113：横滑切换分段时，目标分段按钮闪烁反馈 */
@keyframes segFlash {
  0% { transform: scale(1); }
  40% { transform: scale(1.1); }
  100% { transform: scale(1); }
}
.seg-flash { animation: segFlash 0.45s ease; }
/* v116：v114 的整页淡入动画 .seg-swap 已移除——它让每次横滑都「闪一下」，观感不好 */

/* ===== v117：类目条平铺规则（手册规则 14）=====
   类目 1~4 条：平铺均分（1 条整行、2 条对半、以此类推）；
   超过 4 条：保持横向滑动寻找。适用于所有横向类目容器 */
.ev-chips.flat .ev-chip,
.vault-tabs.flat .vault-tab,
.sched-tabs.flat .sched-tab {
  flex: 1 1 0;
  min-width: 0;
  justify-content: center;
  white-space: nowrap;
  padding-left: 6px;
  padding-right: 6px;
}
.ev-chips.flat .ev-chip-add { flex: 0 0 34px; padding: 0; }

/* ===== v119：双色球详情页 ===== */
/* 彩种切换：按规则 14 四等分平铺 + 表头白胶囊范式 */
.lott-tabs {
  display: flex; gap: 3px; background: #EAECEF; border-radius: 12px;
  padding: 3px; margin: 2px 0 10px;
}
.lott-tab {
  flex: 1 1 0; min-width: 0; padding: 0 4px; height: 34px; border-radius: 9px;
  background: transparent; box-shadow: none; border: 0;
  font-size: calc(11.5px * var(--fs)); font-weight: 600; color: var(--muted);
}
.lott-tab.on { background: #fff; color: var(--ink); font-weight: 650; box-shadow: 0 1px 4px rgba(16, 24, 40, .1); }

.lott-hero { padding: 15px 16px 8px; margin-bottom: 4px; }
.lott-hero-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.lott-hero-iss { margin: 0; font-size: calc(15px * var(--fs)); font-weight: 700; letter-spacing: .2px; }
.lott-hero-date { margin: 3px 0 0; font-size: calc(10.5px * var(--fs)); color: var(--muted); }
.lott-range { flex: 0 0 auto; margin: 0 !important; }
.lott-balls-lg .lott-ball { width: 38px; height: 38px; font-size: calc(13.5px * var(--fs)); }
.lott-facts { display: flex; gap: 14px; flex-wrap: wrap; font-size: calc(11.5px * var(--fs)); color: var(--muted); padding: 0 0 9px; }
.lott-facts b { color: var(--ink); font-weight: 650; }
.lott-mine {
  display: flex; flex-wrap: wrap; gap: 12px; padding: 8px 11px; margin-bottom: 4px;
  background: #FAFAFB; border-radius: 10px; font-size: calc(10.5px * var(--fs)); color: var(--muted);
}
.lott-mine b { color: var(--ink); font-weight: 650; }
.lott-mine b.bet { color: #3F7A63; }
.lott-mine b.win { color: #C0392B; }

.lott-fold {
  width: 100%; border: 0; background: transparent; color: var(--muted);
  font-size: calc(10.5px * var(--fs)); padding: 9px 0 3px;
  display: flex; align-items: center; justify-content: center; gap: 5px;
}
.lott-fold i { font-style: normal; color: #C08265; font-weight: 650; }
.lott-more { padding-bottom: 4px; }
.lott-more.hide { display: none; }
.lott-more-row {
  display: flex; align-items: center; gap: 8px; padding: 6px 0;
  border-top: 1px dashed rgba(20, 22, 26, .07); font-size: calc(10.5px * var(--fs));
}
.lott-more-iss { width: 52px; font-weight: 650; }
.lott-more-date { width: 40px; color: var(--muted); }
.lott-more-balls { color: #A94425; letter-spacing: .3px; }
.lott-more-balls i { color: #2C5B8A; font-style: normal; }

.lott-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 7px; }
.lott-head .lott-t { margin: 0; }
.lott-badge {
  font-size: calc(10.5px * var(--fs)); color: #A94425; background: #FBEDE7;
  border-radius: 999px; padding: 3px 9px; font-weight: 650; white-space: nowrap;
}
.pz-table { width: 100%; border-collapse: collapse; font-size: calc(10.5px * var(--fs)); }
.pz-table th {
  text-align: left; font-weight: 600; color: var(--muted); padding: 6px 4px;
  border-bottom: 1px solid var(--line); font-size: calc(10.5px * var(--fs)); white-space: nowrap;
}
.pz-table td { padding: 6px 4px; border-bottom: 1px solid #F4F5F7; vertical-align: top; }
.pz-lv { font-weight: 650; white-space: nowrap; }
.pz-cond { color: var(--muted); line-height: 1.5; }
.pz-num { text-align: right; white-space: nowrap; }
.pz-money { text-align: right; color: #C0392B; font-weight: 650; white-space: nowrap; }
.pz-dist-head {
  display: flex; justify-content: space-between; font-size: calc(10.5px * var(--fs));
  color: var(--muted); padding: 11px 4px 3px; border-top: 1px dashed rgba(20, 22, 26, .08); margin-top: 8px;
}
.pz-dist td { padding: 5px 4px; }
.pz-empty { text-align: center; color: var(--muted); padding: 10px 0; }
.lott-meta {
  display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 10px;
  font-size: calc(10.5px * var(--fs)); color: var(--muted);
}
.lott-meta b { color: var(--ink); font-weight: 650; }

.lott-duo { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.lott-mini { margin: 0 0 4px; font-size: calc(10.5px * var(--fs)); color: var(--muted); font-weight: 600; }
.lott-bar-track i.cold { background: #C9CFD6; }
.lott-ball.sm { width: 26px; height: 26px; font-size: calc(10.5px * var(--fs)); }
.lott-ball.sm i {
  position: absolute; bottom: -4px; right: -5px; background: #2C5B8A; color: #fff;
  font-style: normal; font-size: calc(10.5px * var(--fs)); line-height: 1; border-radius: 50%;
  width: 13px; height: 13px; display: flex; align-items: center; justify-content: center;
}

.lott-plus { display: inline-flex; align-items: center; color: var(--muted); margin: 0 1px; font-weight: 600; }
.lott-ball.pick-red { background: #C0392B; color: #fff; }
.lott-ball.pick-blue { background: #3A6EA5; color: #fff; }
.lott-reason { margin-top: 10px; padding: 10px 12px; background: #FAFAFB; border-radius: 10px; }
.lott-reason p { margin: 0 0 7px; font-size: calc(10.5px * var(--fs)); color: #5B6270; line-height: 1.75; }
.lott-reason p:last-child { margin-bottom: 0; }
.lott-reason b { color: var(--ink); font-weight: 650; }
.lott-export {
  margin-top: 12px; width: 100%; height: 42px; border: 0; border-radius: 12px;
  background: #F7EDE9; color: #A94425; font-size: calc(11.5px * var(--fs)); font-weight: 650;
}
.lott-export:active { transform: scale(.985); }
.lott-export[disabled] { opacity: .6; }

/* ===== v121：彩票页改版（大红+蓝主题、2×2 分析网格、方案选号） ===== */
.lt-lot-seg { margin: 2px 0 12px; }

.lt-hero { padding: 16px 18px 14px; background: linear-gradient(180deg, #FDF1EC, #FFFFFF); }
.lt-hero-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.lt-iss { margin: 0; font-size: calc(var(--t-h1) * var(--fs)); font-weight: 700; letter-spacing: .2px; color: #C0392B; }
.lt-date { margin: 5px 0 0; font-size: calc(var(--t-sub) * var(--fs)); color: var(--muted); }
.lt-balls { display: flex; flex-wrap: nowrap; align-items: center; gap: 5px; margin: 14px 0 6px; }
.lt-balls .lott-ball { width: 30px; height: 30px; font-size: calc(var(--t-sub) * var(--fs)); font-weight: 700; flex: 0 0 auto; }
.lt-balls .lott-ball.red { background: #C0392B; color: #fff; }
.lt-balls .lott-ball.blue { background: #3A6EA5; color: #fff; }
.lt-plus { color: var(--muted); font-weight: 600; margin: 0; font-size: calc(var(--t-sub) * var(--fs)); }
.lt-sales {
  margin: 8px 0 0; font-size: calc(var(--t-sub) * var(--fs)); color: var(--muted);
  display: flex; align-items: baseline; gap: 4px; flex-wrap: wrap;
}
.lt-sales b { color: #C0392B; font-weight: 700; font-size: calc(var(--t-body) * var(--fs)); }
.lt-sales i { color: var(--line); font-style: normal; margin: 0 6px; }

/* 卡片右上角「更多」按钮 */
.lt-head-r { display: inline-flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.lt-more-btn {
  display: inline-flex; align-items: center; gap: 3px;
  height: 28px; padding: 0 10px; border: 0; border-radius: 999px;
  background: #F7EDE9; color: #A94425;
  font-size: calc(var(--t-sub) * var(--fs)); font-weight: 650;
}
.lt-more-btn:active { transform: scale(.96); }

.lt-facts { display: flex; margin: 14px 0 6px; }
.lt-facts > div { flex: 1 1 0; text-align: center; }
.lt-facts > div + div { border-left: 1px solid var(--line); }
.lt-facts b { display: block; font-size: calc(var(--t-body) * var(--fs)); font-weight: 700; color: var(--ink); line-height: 1.25; }
.lt-facts span { display: block; margin-top: 3px; font-size: calc(var(--t-foot) * var(--fs)); color: var(--muted); }

.lt-rec {
  display: flex; margin-top: 10px; padding: 12px 4px;
  background: #FAFAFB; border-radius: 12px;
}
.lt-mine-rec { margin: 0 0 12px; }
.lt-rec > div { flex: 1 1 0; text-align: center; }
.lt-rec b { display: block; font-size: calc(var(--t-body) * var(--fs)); font-weight: 700; color: var(--ink); }
.lt-rec b.bet { color: #3F7A63; }
.lt-rec b.win { color: #C0392B; }
.lt-rec span { display: block; margin-top: 2px; font-size: calc(var(--t-foot) * var(--fs)); color: var(--muted); }

.lt-fold {
  width: 100%; border: 0; background: transparent; color: var(--muted);
  font-size: calc(11.5px * var(--fs)); padding: 12px 0 4px;
  display: flex; align-items: center; justify-content: center; gap: 5px;
}
.lt-fold svg { transition: transform .2s; }
.lt-fold.open svg { transform: rotate(180deg); }
.lt-more.hide { display: none; }
.lt-more-row {
  display: flex; align-items: center; gap: 10px; padding: 9px 2px;
  border-top: 1px dashed rgba(20, 22, 26, .07); font-size: calc(11.5px * var(--fs));
}
.lt-more-iss { width: 56px; font-weight: 650; }
.lt-more-date { width: 42px; color: var(--muted); }
.lt-more-balls { color: #A94425; letter-spacing: .4px; }
.lt-more-balls i { color: #2C5B8A; font-style: normal; }

.lt-card { padding: 18px; }
.lt-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.lt-card-head h3 {
  margin: 0; font-size: calc(var(--t-h2) * var(--fs)); font-weight: 700; color: var(--ink);
  padding-left: 9px; border-left: 4px solid #C0392B; line-height: 1.25;
}
.lt-scope { font-size: calc(var(--t-foot) * var(--fs)); color: var(--muted); white-space: nowrap; }
.lt-empty { margin: 0; font-size: calc(var(--t-sub) * var(--fs)); color: var(--muted); line-height: 1.7; }
.lt-tip { margin: 10px 0 0; font-size: calc(var(--t-foot) * var(--fs)); color: var(--muted); line-height: 1.75; font-weight: 400; }

/* 下拉 */
.lt-dd { position: relative; flex: 0 0 auto; }
.lt-dd-btn {
  display: inline-flex; align-items: center; gap: 4px;
  height: 32px; padding: 0 11px; border: 0; border-radius: 10px;
  background: #EAECEF; color: var(--ink-2);
  font-size: calc(11.5px * var(--fs)); font-weight: 650;
}
.lt-dd.open .lt-dd-btn { background: #E1E4E8; }
.lt-dd.open .lt-dd-btn svg { transform: rotate(180deg); }
.lt-dd-menu {
  display: none; position: absolute; right: 0; top: 38px; z-index: 30;
  min-width: 132px; max-height: 268px; overflow-y: auto;
  background: #fff; border-radius: 14px; padding: 6px;
  box-shadow: 0 8px 30px -8px rgba(16, 24, 40, .22), 0 0 0 1px rgba(16, 24, 40, .05);
  -webkit-overflow-scrolling: touch;
}
.lt-dd.open .lt-dd-menu { display: block; }
.lt-dd-item {
  display: block; width: 100%; text-align: left; border: 0; background: transparent;
  padding: 10px 11px; border-radius: 9px;
  font-size: calc(13px * var(--fs)); color: var(--ink-2); white-space: nowrap;
}
.lt-dd-item.on { background: #FBEDE7; color: #A94425; font-weight: 650; }
.lt-dd-item:active { background: #F2F3F5; }

/* 奖级表 */
.lt-prize-sum {
  display: flex; gap: 18px; flex-wrap: wrap;
  padding: 10px 12px; margin-bottom: 12px;
  background: #FAFAFB; border-radius: 10px;
  font-size: calc(11.5px * var(--fs)); color: var(--muted);
}
.lt-prize-sum b { color: var(--ink); font-weight: 650; }
.lt-table { font-size: calc(var(--t-sub) * var(--fs)); }
.lt-table th { padding: 9px 4px; font-size: calc(var(--t-foot) * var(--fs)); }
.lt-table td { padding: 10px 4px; }
.lt-table .pz-lv { font-size: calc(var(--t-sub) * var(--fs)); }
.lt-table .pz-cond { font-size: calc(var(--t-foot) * var(--fs)); }
.lt-table .pz-money { font-size: calc(var(--t-body) * var(--fs)); }
/* v121：奖级折叠——默认只显示一、二等奖 */
tr.lt-prize-more { display: none; }
table.lt-prize-open tr.lt-prize-more { display: table-row; }
.lt-prize-fold { padding: 10px 0 2px; color: #A94425; font-weight: 650; font-size: calc(var(--t-sub) * var(--fs)); }
.lt-fold-hide { display: none; }

.lt-dist-tip {
  margin: 14px 0 8px; padding-top: 12px; border-top: 1px dashed rgba(20, 22, 26, .08);
  font-size: calc(var(--t-sub) * var(--fs)); color: var(--muted); line-height: 1.75; font-weight: 400;
}

.lt-chart { width: 100%; height: auto; display: block; }

/* 号码分析（v121：2×2 等宽网格，四栏全部条状图） */
.lt-ana-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.lt-ana-cell { padding: 12px 12px 10px; background: #FAFAFB; border-radius: 14px; }
.lt-ana-t { margin: 0 0 6px; font-size: calc(var(--t-sub) * var(--fs)); font-weight: 700; }
.lt-ana-t.t-hot { color: #C0392B; }
.lt-ana-t.t-cold { color: #5B6E8C; }
.lt-ana-t.t-miss { color: #B06A22; }
.lt-ana-t.t-blue { color: #2C5B8A; }
.lt-ana-tip { margin: 7px 0 0; font-size: calc(var(--t-foot) * var(--fs)); color: var(--muted); line-height: 1.5; }
.lt-bar { display: flex; align-items: center; gap: 6px; padding: 5px 0; font-size: calc(var(--t-sub) * var(--fs)); }
.lt-bar-n { width: 22px; text-align: center; font-weight: 700; color: var(--ink); font-size: calc(var(--t-foot) * var(--fs)); }
.lt-bar-t { flex: 1 1 0; height: 11px; background: rgba(20, 22, 26, .05); border-radius: 6px; overflow: hidden; }
.lt-bar-t i { display: block; height: 100%; background: #C0392B; border-radius: 6px; }
.lt-bar-t i.b-hot { background: #C0392B; }
.lt-bar-t i.b-cold { background: #9FB0C7; }
.lt-bar-t i.b-miss { background: #D98E3C; }
.lt-bar-t i.b-blue { background: #3A6EA5; }
.lt-bar-v { width: 40px; text-align: right; color: var(--muted); font-size: calc(var(--t-foot) * var(--fs)); white-space: nowrap; }

/* 选号（v122：球缩小、理由小字、复制按钮） */
.lt-scheme { padding: 14px 0 6px; border-top: 1px dashed rgba(20, 22, 26, .08); }
.lt-scheme:first-of-type { border-top: 0; padding-top: 2px; }
.lt-scheme-head { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; }
.lt-scheme-head b { font-size: calc(var(--t-body) * var(--fs)); color: var(--ink); font-weight: 700; }
.lt-scheme-head span {
  font-size: calc(var(--t-foot) * var(--fs)); color: #fff; background: #C0392B;
  border-radius: 999px; padding: 2px 9px; font-weight: 650;
}
.lt-copy {
  display: inline-flex; align-items: center; gap: 4px;
  height: 26px; padding: 0 11px; border: 1px solid #E0E3E8; border-radius: 999px;
  background: #fff; color: var(--ink-2);
  font-size: calc(var(--t-foot) * var(--fs)); font-weight: 550;
}
.lt-copy:active { background: #F5F6F8; }
.lt-scheme-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  margin-top: 10px;
}
.lt-scheme-foot .lt-scheme-cost { flex: 1 1 auto; }
.lt-scheme-foot .lt-usepick { margin-left: 0; }
.lt-scheme .lt-reason { margin: 0 0 8px; }
.lt-scheme .lt-reason p { margin: 0; }
.lt-scheme-cost { margin: 0; font-size: calc(var(--t-foot) * var(--fs)); color: var(--muted); }
.lt-scheme-cost b { color: #C0392B; font-weight: 700; }
.lt-pick-balls { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 12px; }
.lt-pick-balls .lott-ball { width: 30px; height: 30px; font-size: calc(var(--t-sub) * var(--fs)); font-weight: 700; }
.lt-pick-balls .lt-plus { font-size: calc(var(--t-sub) * var(--fs)); }
.lt-reason { padding: 11px 13px; background: #FAFAFB; border-radius: 12px; font-size: calc(var(--t-sub) * var(--fs)); color: #6B7280; font-weight: 400; line-height: 1.8; }
.lt-reason p { margin: 0 0 10px; font-size: inherit; color: inherit; font-weight: inherit; line-height: inherit; }
.lt-reason p:last-child { margin-bottom: 0; }
.lt-reason b { color: var(--ink); font-weight: 650; }

/* 规则 */
.lt-rule-lead { margin: 0 0 6px; font-size: calc(var(--t-sub) * var(--fs)); color: var(--muted); line-height: 1.7; }
.lt-rule-list { margin-top: 10px; }
.lt-rule-row {
  display: flex; gap: 12px; padding: 11px 2px;
  border-bottom: 1px dashed rgba(20, 22, 26, .06);
  font-size: calc(var(--t-sub) * var(--fs));
}
.lt-rule-row:last-child { border-bottom: 0; }
.lt-rule-row b { width: 60px; flex: 0 0 auto; font-weight: 650; }
.lt-rule-row span { color: var(--muted); line-height: 1.6; }
/* v121：导出卡移到页面最下方 */
.lt-export-card { margin-bottom: 10px; }
.lt-export-card .lt-export { margin-top: 0; }
.lt-export {
  margin-top: 16px; width: 100%; height: 46px; border: 0; border-radius: 13px;
  background: #F7EDE9; color: #A94425;
  font-size: calc(13px * var(--fs)); font-weight: 700;
}
.lt-export:active { transform: scale(.985); }
.lt-export[disabled] { opacity: .6; }

/* ===== v122：「更多」子页（整页覆盖层，格式与主页一致） ===== */
.lt-sub-page {
  position: fixed; inset: 0; z-index: 90;
  background: var(--bg); display: flex; flex-direction: column;
  transform: translateX(100%); transition: transform .26s ease-out;
}
.lt-sub-page.show { transform: translateX(0); }
.lt-sub-head {
  flex: 0 0 auto; display: flex; align-items: center; gap: 8px;
  padding: calc(10px + var(--safe-b)) 14px 10px;
  padding-top: calc(10px + env(safe-area-inset-top, 0px));
  background: var(--card); border-bottom: 1px solid var(--line);
}
.lt-sub-back {
  display: inline-flex; align-items: center; gap: 3px;
  border: 0; background: transparent; color: #A94425;
  font-size: calc(var(--t-body) * var(--fs)); font-weight: 650; padding: 6px 8px 6px 0;
}
.lt-sub-title { margin: 0; font-size: calc(var(--t-h2) * var(--fs)); font-weight: 700; color: var(--ink); }
.lt-sub-body { flex: 1 1 auto; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 12px 12px calc(20px + var(--safe-b)); }
.lt-sub-block {
  background: var(--card); border-radius: 18px; padding: 16px; margin-bottom: 12px;
  box-shadow: var(--shadow);
}
.lt-sub-lead { margin: 2px 2px 10px; font-size: calc(var(--t-sub) * var(--fs)); color: var(--muted); line-height: 1.7; }

/* 期数选择条（子页内）：超过 4 个 → 横向滑动（基础规则），不换行不挤压 */
.lt-range-row {
  display: flex; flex-wrap: nowrap; gap: 8px; padding: 2px 0 6px;
  overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.lt-range-row::-webkit-scrollbar { display: none; }
.lt-range-chip {
  flex: 0 0 auto; min-width: 72px; height: 38px; padding: 0 16px; border: 1px solid var(--line); border-radius: 11px;
  background: #fff; color: var(--ink-2);
  font-size: calc(var(--t-sub) * var(--fs)); font-weight: 650;
}
.lt-range-chip.on { background: #C0392B; border-color: #C0392B; color: #fff; }
.lt-range-chip:active { transform: scale(.97); }

/* 往期开奖列表：每期一张与主页同款的开奖卡 */
.lt-sub-list { display: flex; flex-direction: column; gap: 12px; margin-top: 4px; }
.lt-hero-sub {
  margin: 0;
  /* v124：屏幕外的卡片先跳过绘制，长列表滚动更顺 */
  content-visibility: auto;
  contain-intrinsic-size: auto 170px;
}
.lt-fact-row { content-visibility: auto; contain-intrinsic-size: auto 40px; }

/* v124：形态标签（奇偶/大小/三区/和值/跨度/AC） */
.lt-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; }
.lt-tag {
  font-size: calc(var(--t-foot) * var(--fs)); color: #8A4B2E;
  background: #FAF1EA; border-radius: 999px; padding: 3px 10px; font-weight: 600; white-space: nowrap;
}
.lt-usepick { color: #A94425; border-color: #E3C9BF; }

/* 逐期明细行（和值/均值/奇偶、蓝球子页） */
.lt-fact-row {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 2px; border-bottom: 1px dashed rgba(20, 22, 26, .06);
  font-size: calc(var(--t-sub) * var(--fs));
}
.lt-fact-row:last-child { border-bottom: 0; }
.lt-fact-row .fr-iss { width: 62px; font-weight: 650; color: var(--ink); }
.lt-fact-row .fr-date { width: 44px; color: var(--muted); }
.lt-fact-row b { font-size: calc(var(--t-body) * var(--fs)); color: var(--ink-2); }
.lt-fact-row .fr-lab { color: var(--muted); font-size: calc(var(--t-foot) * var(--fs)); margin-right: 6px; }

/* 对奖器 */
.lt-chk-iss {
  width: 100%; height: 42px; border: 1px solid var(--line); border-radius: 11px;
  background: #fff; color: var(--ink); font-size: calc(var(--t-body) * var(--fs)); padding: 0 10px;
}
.lt-chk-reds { display: flex; gap: 6px; }
.lt-chk-in {
  width: 44px; height: 42px; text-align: center; border: 1px solid #E3C9BF; border-radius: 11px;
  background: #fff; color: #C0392B;
  font-size: calc(var(--t-body) * var(--fs)); font-weight: 700;
}
.lt-chk-blue { border-color: #C4D6EA; color: #3A6EA5; width: 100%; }
.lt-chk-in:focus { outline: none; border-color: #C0392B; }
.lt-chk-res { margin-top: 14px; padding: 14px; background: #FAFAFB; border-radius: 12px; }
.lt-chk-res p { margin: 0 0 6px; font-size: calc(var(--t-sub) * var(--fs)); color: #6B7280; line-height: 1.8; }
.lt-chk-res b { color: #C0392B; font-size: calc(var(--t-body) * var(--fs)); }
.lt-chk-lv { font-size: calc(var(--t-body) * var(--fs)) !important; font-weight: 700; color: var(--ink) !important; }

/* 首页日历开奖日小标 */
.day .lt-draw-tag { background: #C0392B; }

/* ===== v128：全 APP 图标统一 + 应用页纯线格 + 首页精装修（手册规则 53/54）===== */

/* —— ④ 图标统一墨色细线：去掉彩色底块/彩色描边，全 APP 一套墨色线稿 —— */
.app-ic.ink { background: transparent !important; color: #3A3F4A !important; }
.home-apps .app-ic.ink .app-svg { width: 23px !important; height: 23px !important; }
.apps-list .app-ic.ink .app-svg { width: 21px !important; height: 21px !important; }
.hub-ic.ink { background: #E8EAEE !important; color: #2E3440 !important; }

/* —— ③ 应用页「纯线格」：4 列墨色细线图标直接排在浅灰页面上，无卡片无阴影 —— */
.apps-grid:not(.apps-list) { grid-template-columns: repeat(4, 1fr) !important; gap: 26px 6px !important; padding: 10px 4px 0 !important; }
.apps-grid:not(.apps-list) .app-tile {
  background: rgba(255, 255, 255, .55) !important; box-shadow: none !important;
  border: 1px solid rgba(20, 22, 26, .05) !important;
  border-radius: 18px; padding: 18px 6px 20px !important; gap: 12px !important;
}
.apps-grid:not(.apps-list) .app-tile b { font-weight: 500; color: #3A3F4A; line-height: 1.3; }
.apps-grid:not(.apps-list) .app-tile:active { transform: scale(.94); }
.apps-grid:not(.apps-list) .app-ic.ink .app-svg { width: 26px !important; height: 26px !important; }
.apps-grid:not(.apps-list) .app-ic.ink { width: 30px !important; height: 30px !important; }

/* —— ⑤ 首页精装修（内容零删减）—— */
/* 1. 班次「彩块」变「彩点」：颜色不变含义不变，日历立刻安静 */
.day .tag.shift-dot {
  width: 5px; height: 5px; min-height: 0; padding: 0; margin-top: 3px;
  border-radius: 50%; line-height: 0; font-size: 0; flex: 0 0 auto;
}
.day.selected .tag.shift-dot { box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .95); }
/* 6. 节气变暖赭、节日降一档饱和度，仍可见但不抢眼 */
.day .lunar.term { color: #B98A54; font-weight: 500; }
.day .lunar.fest { color: #C77E52; }
/* 2. 今日卡去「卡中卡」：天气/宜忌/星座改为一张卡内细线分隔的三段 */
#todayCard .tc-weather {
  background: transparent !important; box-shadow: none !important; border-radius: 0 !important;
  padding: 8px 26px 8px 0 !important; margin-bottom: 0 !important;
}
#todayCard .tc-yiji,
#todayCard .tc-zmini {
  background: transparent !important; box-shadow: none !important; border-radius: 0 !important;
  margin-bottom: 0 !important;
  border-top: 1px solid rgba(0, 0, 0, .055);
}
/* 3. 日期大字更突出：作为今日卡主视觉 */
#todayCard .tc-date { font-size: calc(17px * var(--fs)); font-weight: 700; letter-spacing: .3px; }
/* 5. 首页班表切换条降噪：选中改墨底白字，融入整体墨色系 */
#homeSchedStrip .sched-tab.active {
  background: #2E3440 !important; color: #fff !important;
  box-shadow: none !important; border-color: transparent !important;
}

/* ===== v130：健康模块 H2（多成员 + 四标签）===== */
.h2-members { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.h2-mem {
  display: inline-flex; align-items: center; gap: 6px;
  background: #fff; border: 1px solid #E5E7EB; border-radius: 20px;
  padding: 5px 12px 5px 5px; font-size: calc(13px * var(--fs)); color: #5A6070;
}
.h2-mem .av {
  width: 24px; height: 24px; border-radius: 50%;
  background: #E8EAEE; color: #3A3F4A; font-size: calc(11.5px * var(--fs)); font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
}
.h2-mem.on { background: #2E3440; color: #fff; border-color: #2E3440; font-weight: 600; }
.h2-mem.on .av { background: rgba(255, 255, 255, .92); color: #2E3440; }
.h2-mem.add { border-style: dashed; color: #8A90A0; padding: 5px 12px; }
.h2-mem.manage { color: #8A90A0; padding: 5px 12px; }
/* 档案管理弹层 */
.h2-mg-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 2px; border-bottom: 1px solid #F0F1F4;
}
.h2-mg-row:last-of-type { border-bottom: none; }
.h2-mg-row .av {
  width: 32px; height: 32px; border-radius: 50%; flex: none;
  background: #E8EAEE; color: #3A3F4A; font-size: calc(13px * var(--fs)); font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
}
.h2-mg-name { flex: 1; min-width: 0; font-size: calc(13.5px * var(--fs)); color: #14161A; font-weight: 600; }
.h2-mg-name small { display: block; font-weight: 400; font-size: calc(11.5px * var(--fs)); color: #8A90A0; margin-top: 1px; }
.h2-mg-del {
  flex: none; border: 1px solid #E5E7EB; background: #fff; border-radius: 8px;
  padding: 6px 12px; font-size: calc(13px * var(--fs)); color: #B4433A;
}
.h2-guide { text-align: left; }
.h2-guide-t { font-size: calc(15px * var(--fs)); font-weight: 700; margin-bottom: 6px; }
.h2-vitals { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.h2-vital { background: var(--panel, #F2F3F5); border-radius: 10px; padding: 8px 6px; text-align: center; }
.h2-vital small { display: block; font-size: calc(10.5px * var(--fs)); color: var(--muted, #6B7280); margin-bottom: 2px; }
.h2-vital b { font-size: calc(13px * var(--fs)); }
.h2-rings { display: flex; gap: 14px; flex-wrap: wrap; }
.h2-ring-item { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 76px; }
.h2-ring-item small { font-size: calc(10.5px * var(--fs)); color: var(--muted, #6B7280); text-align: center; }
.h2-ring { width: 56px; height: 56px; }
.h2-rep { padding: 7px 4px; border-bottom: 1px solid #F0F1F3; }
.h2-rep:last-child { border-bottom: none; }
.h2-rep b { font-size: calc(13px * var(--fs)); display: block; }
.h2-rep small { color: var(--muted, #6B7280); font-size: calc(10.5px * var(--fs)); }
/* v130：健康页吸顶头部内部（成员行+标签条） */
.h2-head { padding: 2px 0 0; }
.h2-head .h2-members { margin-bottom: 8px; }

/* v130 二期：问卷与方案 */
.h2-chips { display: flex; flex-wrap: wrap; gap: 7px; margin: 4px 0 8px; }
/* 规则 62：抽屉横排栏 data-hscroll = 单行 + 横滑 + 隔离手势 */
[data-hscroll] { flex-wrap: nowrap !important; overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; scrollbar-width: none; padding-bottom: 2px; }
[data-hscroll]::-webkit-scrollbar { display: none; }
[data-hscroll] > * { flex-shrink: 0; }
.h2-chip { border: 1px solid #E0E2E8; background: #fff; border-radius: 18px; padding: 8px 14px; font-size: calc(13px * var(--fs)); color: #4B5563; }
.h2-chip.on { background: #2E3440; color: #fff; border-color: #2E3440; font-weight: 600; }
.h2-qnav { display: flex; gap: 10px; margin-top: 16px; }
.h2-qnav button { flex: 1; }
.h2-qnav #h2QBack { background: #F2F3F5; border: none; border-radius: 12px; padding: 12px; font-size: calc(13.5px * var(--fs)); color: #3A3F4A; }
.planline { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 4px; border-bottom: 1px solid #F0F1F3; font-size: calc(13px * var(--fs)); }
.planline:last-child { border-bottom: none; }
.planline small { color: var(--muted, #6B7280); font-size: calc(10.5px * var(--fs)); display: block; margin-top: 2px; line-height: 1.55; }
.planline .v { font-weight: 700; font-size: calc(13px * var(--fs)); white-space: nowrap; }
.h2-rebuild { width: 100%; margin-top: 12px; background: #fff; border: 1px solid #E0E2E8; border-radius: 12px; padding: 12px; font-size: calc(13px * var(--fs)); color: #3A3F4A; }
.h2-verdict p { margin: 4px 0; font-size: calc(13px * var(--fs)); color: #3A3F4A; line-height: 1.7; }

/* v130 三期：快速记录与联动 */
.h2-rec-row { display: flex; align-items: center; gap: 10px; margin: 10px 0; }
.h2-rec-row span { width: 64px; font-size: calc(13px * var(--fs)); color: #3A3F4A; }
.h2-rec-row input { flex: 1; border: 1px solid #E0E2E8; border-radius: 10px; padding: 10px 12px; font-size: calc(13.5px * var(--fs)); }
.h2-rec-row em { font-style: normal; color: var(--muted, #6B7280); font-size: calc(11.5px * var(--fs)); width: 28px; }
.h2-note { margin: 5px 0; font-size: calc(13px * var(--fs)); color: #3A3F4A; line-height: 1.7; }
.h2-indoor { background: #EEF3FA; border: 1px solid #D5E0EF; border-radius: 10px; padding: 9px 11px; font-size: calc(11.5px * var(--fs)); color: #33517A; line-height: 1.8; margin-top: 6px; }
.h2-habits { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; }

/* v130 四期：总结与容错 */
.h2-blue { background: #EEF3FA; border: 1px solid #D5E0EF; border-radius: 10px; padding: 9px 11px; font-size: calc(11.5px * var(--fs)); color: #33517A; line-height: 1.75; margin: 8px 0; }
.h2-mini { background: #F2F3F5; border: none; border-radius: 12px; padding: 4px 10px; font-size: calc(10.5px * var(--fs)); color: #5A6070; margin-left: 6px; }
.h2-mini.on { background: #2E3440; color: #fff; font-weight: 600; }
.spark { display: flex; align-items: flex-end; gap: 3px; height: 44px; margin: 8px 0 4px; }
.spark i { flex: 1; background: #2E3440; border-radius: 2px 2px 0 0; opacity: .85; min-width: 4px; }

/* v130 五期：AI 对话与病程 */
.h2-ailog { max-height: 200px; overflow-y: auto; margin: 6px 0; }
.h2-ai { margin: 6px 0; text-align: left; }
.h2-ai span { display: inline-block; background: #F2F3F5; border-radius: 12px; padding: 8px 11px; font-size: calc(13px * var(--fs)); line-height: 1.7; max-width: 92%; color: #3A3F4A; }
.h2-ai.me { text-align: right; }
.h2-ai.me span { background: #2E3440; color: #fff; }
.h2-chip.dark { background: #2E3440; color: #fff; border-color: #2E3440; font-weight: 600; }

/* ======================================================================
   v131 · H2 v2 视觉：绿白主色调 + 红色提示 + 极简细线图标 + 圆环
   ====================================================================== */
#view-health {
  --h2-green: #2F9E6E;
  --h2-green-deep: #1F7A4D;
  --h2-green-bg: #EAF6F0;
  --h2-green-line: #CBE7D8;
  --h2-red: #E15B5B;
  --h2-red-bg: #FBEFEF;
  --h2-red-line: #F2D4D4;
}
/* 顶栏：标题 + 右侧圆形头像组 */
.h2-topbar { display: flex; align-items: center; padding: 4px 2px 8px; }
.h2-title { font-size: calc(17px * var(--fs)); font-weight: 700; letter-spacing: 1px; display: flex; align-items: center; gap: 8px; color: #1F2937; }
.h2-title::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--h2-green); flex: none; }
.h2-topbar .h2-members { margin-left: auto; margin-bottom: 0; display: flex; gap: 7px; align-items: center; }
/* v135：头像圈必须小于大标题（规则 59①：标题是主体字最大，头像/加号是组成部分要小） */
.h2-av {
  width: 24px; height: 24px; border-radius: 50%; border: 1.5px solid #E0E2E8;
  background: #fff; color: #8A90A0; font-size: calc(10.5px * var(--fs)); font-weight: 600;
  display: flex; align-items: center; justify-content: center; padding: 0; flex: none;
}
.h2-av.on { background: var(--h2-green); border-color: var(--h2-green); color: #fff; }
.h2-av svg { width: 11px; height: 11px; }
.h2-av.gear svg { width: 10px; height: 10px; }
/* 健康页四标签选中态用绿 */
#view-health #hcTabs .seg-btn.active { background: var(--h2-green); color: #fff; border-color: var(--h2-green); }
/* 健康页主按钮绿色 */
#view-health .life-go { background: var(--h2-green); }
/* 选项 chip 选中态绿色（仅健康页） */
#view-health .h2-chip.on { background: var(--h2-green-bg); color: var(--h2-green-deep); border-color: var(--h2-green); font-weight: 600; }
#view-health .h2-chip.dark { background: var(--h2-green); color: #fff; border-color: var(--h2-green); }
#view-health .h2-mini.on { background: var(--h2-green); color: #fff; }
#view-health .h2-blue { background: var(--h2-green-bg); border-color: var(--h2-green-line); color: #2C5C46; }
/* 圆环组 */
.h2-rings2 { display: flex; gap: 12px; margin: 4px 0 8px; }
.h2-ringbox { flex: 1; text-align: center; background: var(--h2-green-bg); border-radius: 12px; padding: 10px 4px 8px; }
.h2-ringbox.alert { background: var(--h2-red-bg); }
.h2-ringbox svg { width: 54px; height: 54px; }
.h2-ringbox b { display: block; font-size: calc(13px * var(--fs)); color: #1F2937; margin-top: 3px; }
.h2-ringbox.alert b { color: var(--h2-red); }
/* 目标行 */
.h2-gtitle { font-size: calc(11.5px * var(--fs)); color: #8A90A0; margin: 10px 0 2px; font-weight: 600; }
.h2-goal-row { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid #F1F2F4; font-size: calc(13px * var(--fs)); }
.h2-goal-row:last-child { border-bottom: none; }
.h2-goal-row .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--h2-green); flex: none; }
.h2-goal-row .dot.red { background: var(--h2-red); }
.h2-goal-name { flex: 1; min-width: 0; font-weight: 600; color: #1F2937; }
.h2-goal-name small { display: block; font-weight: 400; font-size: calc(10.5px * var(--fs)); color: #8A90A0; margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.h2-goal-v { text-align: right; font-size: calc(11.5px * var(--fs)); color: #8A90A0; flex: none; max-width: 42%; }
.h2-goal-v.green { color: var(--h2-green-deep); font-weight: 600; }
.h2-goal-v.red { color: var(--h2-red); font-weight: 600; }
.h2-goal-v i { font-style: normal; display: block; font-weight: 400; color: #8A90A0; font-size: calc(10.5px * var(--fs)); }
/* 身体指标小卡 */
#view-health .h2-vitals { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
#view-health .h2-vital { background: #fff; border: 1px solid #E7E9ED; border-radius: 12px; padding: 9px 6px; text-align: center; }
#view-health .h2-vital small { color: #8A90A0; }
#view-health .h2-vital b { color: #1F2937; font-size: calc(13.5px * var(--fs)); }
/* 环境动向双入口 */
.h2-entries { display: flex; gap: 10px; margin-bottom: 12px; }
.h2-entry {
  flex: 1; display: flex; align-items: center; gap: 8px;
  border: 1px solid var(--h2-green-line); background: var(--h2-green-bg);
  border-radius: 12px; padding: 11px 12px; font-size: calc(13px * var(--fs));
  font-weight: 600; color: var(--h2-green-deep); text-align: left;
}
.h2-entry svg { width: 17px; height: 17px; flex: none; }
.h2-entry i { font-style: normal; margin-left: auto; color: var(--h2-green); font-weight: 400; }
/* 记录块 */
.h2-meal { display: flex; align-items: center; gap: 8px; font-size: calc(13px * var(--fs)); padding: 9px 0; border-bottom: 1px solid #F1F2F4; }
.h2-meal-ic { width: 26px; height: 26px; border-radius: 8px; background: var(--h2-green-bg); color: var(--h2-green-deep); display: flex; align-items: center; justify-content: center; flex: none; }
.h2-meal-ic svg { width: 14px; height: 14px; }
.h2-meal b { flex: none; }
.h2-meal-sum { flex: 1; min-width: 0; font-size: calc(11.5px * var(--fs)); color: #3A3F4A; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.h2-meal-sum em { font-style: normal; color: #A6ABB8; }
.h2-addbtn { width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--h2-green); color: var(--h2-green); background: #fff; display: flex; align-items: center; justify-content: center; flex: none; padding: 0; }
.h2-addbtn svg { width: 12px; height: 12px; }
.h2-echo { display: flex; align-items: center; gap: 8px; padding: 5px 0 5px 34px; border-bottom: 1px solid #F5F6F7; font-size: calc(11.5px * var(--fs)); }
.h2-echo em { font-style: normal; color: #3A3F4A; flex: 1; min-width: 0; }
.h2-echo button { border: none; background: none; color: #A6ABB8; font-size: calc(11.5px * var(--fs)); padding: 2px 4px; }
.h2-echo button:active { color: var(--h2-red); }
/* 方案卡（绿色主卡） */
.h2-plan-card {
  background: linear-gradient(150deg, var(--h2-green-deep), var(--h2-green));
  border-radius: 16px; color: #fff; padding: 16px; margin-bottom: 12px;
}
.h2-plan-sub { font-size: calc(11.5px * var(--fs)); opacity: .88; display: flex; align-items: center; gap: 6px; }
.h2-plan-sub svg { width: 13px; height: 13px; }
.h2-plan-card h3 { font-size: calc(17px * var(--fs)); margin: 8px 0 10px; }
.h2-plan-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.h2-plan-tags span { background: rgba(255,255,255,.16); border-radius: 6px; padding: 3px 9px; font-size: calc(11.5px * var(--fs)); }
.h2-plan-acts { display: flex; gap: 8px; }
.h2-plan-acts button { flex: 1; border: 1px solid rgba(255,255,255,.4); background: rgba(255,255,255,.1); color: #fff; border-radius: 9px; padding: 8px 0; font-size: calc(11.5px * var(--fs)); }
/* 一周排期 */
.h2-week { display: flex; gap: 6px; }
.h2-day { flex: 1; text-align: center; border: 1px solid #E7E9ED; border-radius: 10px; padding: 8px 2px 7px; background: #fff; }
.h2-day s { text-decoration: none; font-size: calc(10.5px * var(--fs)); color: #8A90A0; display: block; }
.h2-day b { display: block; font-size: calc(11.5px * var(--fs)); color: #1F2937; margin-top: 3px; line-height: 1.4; font-weight: 600; }
.h2-day small { font-size: calc(10.5px * var(--fs)); color: #8A90A0; }
.h2-day.run { border-color: var(--h2-green-line); background: var(--h2-green-bg); }
.h2-day.run b { color: var(--h2-green-deep); }
.h2-day.miss { border-style: dashed; border-color: var(--h2-red-line); background: var(--h2-red-bg); }
.h2-warn {
  display: flex; gap: 8px; align-items: center; margin-top: 10px; font-size: calc(11.5px * var(--fs));
  background: var(--h2-red-bg); border: 1px solid var(--h2-red-line); border-radius: 10px; padding: 8px 11px; color: var(--h2-red);
}
.h2-warn svg { width: 14px; height: 14px; flex: none; }
/* 食物库 */
.h2q-sub { font-size: calc(11.5px * var(--fs)); color: #6B7280; margin: 8px 0 6px; font-weight: 600; }
.h2q-addrow { display: flex; gap: 8px; margin: 8px 0 4px; }
.h2q-addrow input { flex: 1; border: 1px dashed #E0E2E8; border-radius: 10px; padding: 9px 12px; font-size: calc(13px * var(--fs)); }
.h2q-addrow button { border: 1px solid var(--h2-green); color: var(--h2-green-deep); background: var(--h2-green-bg); border-radius: 10px; padding: 0 14px; font-size: calc(13px * var(--fs)); flex: none; }
/* 问卷 */
.h2q-sec { padding: 4px 0 12px; border-bottom: 1px solid #F1F2F4; margin-bottom: 12px; }
.h2q-t { font-size: calc(13.5px * var(--fs)); font-weight: 700; color: #1F2937; display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.h2q-t i { font-style: normal; width: 22px; height: 22px; border-radius: 7px; background: var(--h2-green-bg); color: var(--h2-green-deep); font-size: calc(11.5px * var(--fs)); display: flex; align-items: center; justify-content: center; flex: none; }
.h2q-body { max-height: 46vh; overflow-y: auto; margin: 8px 0 4px; -webkit-overflow-scrolling: touch; }
.h2q-foot { font-size: calc(11.5px * var(--fs)); color: #8A90A0; margin: 4px 0 8px; }
.h2q-skip { float: right; border: none; background: none; color: #8A90A0; font-size: calc(13px * var(--fs)); }
/* 总结页数字+进度条小卡 */
.h2-bars { display: flex; gap: 10px; flex-wrap: wrap; }
.h2-barbox { flex: 1 1 40%; text-align: center; background: var(--h2-green-bg); border-radius: 12px; padding: 11px 6px 9px; }
.h2-barbox.alert { background: var(--h2-red-bg); }
.h2-bar-num { font-size: calc(17px * var(--fs)); font-weight: 700; color: var(--h2-green-deep); }
.h2-barbox.alert .h2-bar-num { color: var(--h2-red); }
.h2-barbox small { display: block; font-size: calc(11.5px * var(--fs)); color: #8A90A0; margin-top: 2px; }
.h2-bar-track { height: 4px; background: #DCEDE4; border-radius: 2px; margin: 7px 10px 0; overflow: hidden; }
.h2-barbox.alert .h2-bar-track { background: #F2DCDC; }
.h2-bar-track i { display: block; height: 100%; background: var(--h2-green); border-radius: 2px; }
.h2-barbox.alert .h2-bar-track i { background: var(--h2-red); }
.h2-export {
  width: 100%; display: flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid var(--h2-green-line); background: var(--h2-green-bg); color: var(--h2-green-deep);
  border-radius: 12px; padding: 12px 0; font-size: calc(13.5px * var(--fs)); font-weight: 600; margin: 4px 0 6px;
}
.h2-export svg { width: 16px; height: 16px; }
/* 报告页 */
.h2-firstrun {
  background: var(--h2-green-bg); border: 1px solid var(--h2-green-line); border-radius: 12px;
  padding: 12px 14px; font-size: calc(13px * var(--fs)); color: #2C5C46; margin-bottom: 12px; line-height: 1.7;
}
.h2-firstrun button { border: none; background: none; color: var(--h2-green-deep); font-weight: 700; font-size: calc(13px * var(--fs)); padding: 0; }
.h2-item-ic { width: 30px; height: 30px; border-radius: 9px; background: var(--h2-green-bg); color: var(--h2-green-deep); display: flex; align-items: center; justify-content: center; flex: none; }
.h2-item-ic.g { background: var(--h2-green); color: #fff; }
.h2-item-ic svg { width: 16px; height: 16px; }
.badge { background: var(--h2-green-bg); color: var(--h2-green-deep); font-size: calc(10.5px * var(--fs)); border-radius: 5px; padding: 2px 6px; font-weight: 600; flex: none; }
.h2-qentry { font-size: calc(11.5px * var(--fs)); color: #8A90A0; padding: 8px 2px 2px 40px; margin-top: -6px; }
/* 上传弹层 */
.h2-up-grid { display: flex; gap: 10px; margin: 10px 0; }
.h2-up {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px;
  border: 1px solid var(--h2-green-line); background: var(--h2-green-bg); color: var(--h2-green-deep);
  border-radius: 14px; padding: 16px 6px 12px; text-align: center;
}
.h2-up svg { width: 22px; height: 22px; }
.h2-up b { font-size: calc(13.5px * var(--fs)); }
.h2-up small { font-size: calc(10.5px * var(--fs)); color: #8A90A0; }
.h2-up-cancel { width: 100%; border: 1px solid #E0E2E8; background: #fff; border-radius: 11px; padding: 11px 0; font-size: calc(13.5px * var(--fs)); color: #3A3F4A; margin-top: 4px; }

/* ======================================================
   v132 · 11 项反馈修复样式
   ====================================================== */
/* 板块标题升格（全局清点：11.5px 注释感 → 14px 半粗，往板块标题靠） */
.set-group-label { font-size: calc(13.5px * var(--fs)); font-weight: 600; color: #374151; letter-spacing: .2px; }
/* 弹层绿主题 + 加高（85–92% 屏高） */
.nt-sheet.h2-sheet { max-height: 92vh; min-height: 62vh; }
.nt-sheet.h2-sheet .nt-sheet-title { color: var(--h2-green-deep, #1F7A4D); }
.nt-sheet.h2-sheet .h2q-t i { background: var(--h2-green, #2F9E6E); }
/* 问卷/普通输入框：统一 14px（修「输入字比标题大」） */
.h2q-in {
  width: 100%; font-size: calc(13.5px * var(--fs)); padding: 9px 12px;
  border: 1px solid var(--line); border-radius: 10px; background: #fff;
  margin: 6px 0; -webkit-appearance: none; appearance: none; color: #1F2937;
}
/* 运动四类 / 饮水 进度条 */
.h2-sbar { display: flex; align-items: center; gap: 8px; padding: 7px 0; }
.h2-sbar-ic { flex: none; display: flex; }
.h2-sbar-ic svg { width: 14px; height: 14px; color: var(--h2-green-deep, #1F7A4D); }
.h2-sbar-name { font-size: calc(13px * var(--fs)); font-weight: 600; width: 62px; flex: none; color: #374151; }
.h2-sbar-track { flex: 1; height: 10px; border-radius: 6px; background: #EAF6F0; overflow: hidden; }
.h2-sbar-track i { display: block; height: 100%; border-radius: 6px; background: var(--h2-green, #2F9E6E); transition: width .3s; }
.h2-sbar-track i.bad { background: var(--h2-red, #E15B5B); }
.h2-sbar-v { font-size: calc(11.5px * var(--fs)); color: var(--muted); min-width: 76px; text-align: right; }
.h2-sbar .h2-addbtn { flex: none; }
/* 身体指标卡片：可点击 */
#view-health button.h2-vital { border: none; background: #F7FBF9; border-radius: 12px; text-align: left; cursor: pointer; padding: 10px 12px; }
#view-health button.h2-vital:active { background: var(--h2-green-bg, #EAF6F0); }
/* 方案页顶部 3红2绿圆环入口 */
.h2-rdots { display: flex; gap: 6px; justify-content: space-between; padding: 10px 2px 6px; }
.h2-rdot { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; background: none; border: none; padding: 0; }
.h2-rdot i {
  width: 46px; height: 46px; border-radius: 50%; border: 3px solid var(--h2-red, #E15B5B);
  display: block; position: relative; box-sizing: border-box; background: #FDF4F4;
}
.h2-rdot i::before {
  content: ""; position: absolute; top: 50%; left: 50%; width: 24px; height: 24px;
  transform: translate(-50%, -50%); border-radius: 50%; background: #FBE3E3;
}
.h2-rdot.ok i { border-color: var(--h2-green, #2F9E6E); background: #F1FAF5; }
.h2-rdot.ok i::before { background: var(--h2-green-bg, #EAF6F0); }
.h2-rdot.lib i { border-color: var(--h2-green, #2F9E6E); background: #F1FAF5; }
.h2-rdot.lib i::before { background: var(--h2-green-bg, #EAF6F0); }
.h2-rdot b { font-size: calc(11.5px * var(--fs)); font-weight: 600; color: #374151; white-space: nowrap; }
/* 本周训练：一天一行 */
.h2-day-row { display: flex; align-items: center; gap: 10px; padding: 9px 2px; border-bottom: 1px solid #F0F2F1; }
.h2-day-row:last-child { border-bottom: none; }
.h2-day-row b { width: 40px; flex: none; color: var(--h2-green-deep, #1F7A4D); font-size: calc(13px * var(--fs)); }
.h2-day-row span { flex: 1; font-size: calc(13px * var(--fs)); color: #374151; }
.h2-day-row span.rest { color: var(--muted); }
/* 本周饮食：类型标签与内容分开 */
.h2-diet-row { display: flex; align-items: flex-start; gap: 10px; padding: 9px 2px; border-bottom: 1px solid #F0F2F1; }
.h2-diet-row:last-child { border-bottom: none; }
.h2-dtag {
  display: inline-block; padding: 3px 9px; border-radius: 9px; flex: none; margin-top: 1px;
  background: var(--h2-green-bg, #EAF6F0); color: var(--h2-green-deep, #1F7A4D);
  font-size: calc(11.5px * var(--fs)); font-weight: 600;
}
.h2-diet-row span { flex: 1; font-size: calc(13px * var(--fs)); color: #374151; line-height: 1.55; }
/* 素食小标 */
.h2-veg {
  font-style: normal; font-size: calc(10.5px * var(--fs)); color: var(--h2-green-deep, #1F7A4D);
  border: 1px solid var(--h2-green, #2F9E6E); border-radius: 4px; padding: 0 3px; margin-left: 4px;
}
/* 体检确认卡勾选行 */
.h2-ckrow {
  display: flex; align-items: center; gap: 8px; padding: 8px 2px;
  border-bottom: 1px solid #F0F2F1; font-size: calc(13px * var(--fs));
}
.h2-ckrow:last-child { border-bottom: none; }
.h2-ckrow input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--h2-green, #2F9E6E); flex: none; }
.h2-ckrow span { flex: 1; }
.h2-ckrow span b { font-weight: 700; }
.h2-ckrow small { color: var(--muted); font-size: calc(11.5px * var(--fs)); }
.h2-ckrow i { font-style: normal; font-size: calc(11.5px * var(--fs)); font-weight: 700; flex: none; }
.h2-ckrow i.bad { color: var(--h2-red, #E15B5B); }
.h2-ckrow i.ok { color: var(--h2-green-deep, #1F7A4D); }

/* ============ v133 · 按 v3 效果图重做（37 条批注） ============ */
/* 顶栏成员头像：与大标题同栏，圆形（规则 59①） */
.h2-members { display: flex; align-items: center; gap: 6px; margin-right: 4px; }
.h2-av2 { width: 30px; height: 30px; border-radius: 50%; border: 1.5px solid #E3E6EB; background: #fff; color: #6B7280;
  font-size: calc(11.5px * var(--fs)); font-weight: 700; display: inline-flex; align-items: center; justify-content: center; padding: 0; }
.h2-av2.on { border-color: #2F9E6E; background: #EAF6F0; color: #1F7A4D; }
.h2-av2.add, .h2-av2.gear { color: #9AA1AC; }
.h2-av2 svg { width: 13px; height: 13px; stroke: currentColor; fill: none; stroke-width: 1.6; }
.h2-members .h2-av2:active { transform: scale(.94); }

/* 抽屉统一高度（规则 59③） */
.nt-sheet { min-height: 84vh; max-height: 92vh; }
.nt-sheet.h2-sheet { min-height: 88vh; max-height: 92vh; }

/* 横向滚动条：分类/筛选一律单行（规则 62） */
.hscroll, .h2-chips.hscroll, .h2-scoperow { display: flex; flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden;
  gap: 7px; padding: 2px 18px 2px 0; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain;
  scrollbar-width: none; }
.hscroll::-webkit-scrollbar, .h2-scoperow::-webkit-scrollbar { display: none; }
.hscroll > *, .h2-scoperow > * { flex: 0 0 auto; }

/* 提示条 / 卡片头 */
.h2-tipbar { width: 100%; display: flex; align-items: center; gap: 8px; border: 1px solid #F3D9D9; background: #FDF3F3;
  color: #C24B4B; border-radius: 12px; padding: 10px 12px; font-size: calc(13px * var(--fs)); margin: 0 0 10px; }
.h2-tipbar svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 1.6; }
.h2-tipbar span { flex: 1; text-align: left; }
.h2-tipbar i { font-style: normal; font-size: calc(17px * var(--fs)); opacity: .6; }
.h2-cardhead { display: flex; align-items: center; justify-content: space-between; margin: 0 0 10px; }
.h2-cardhead h3 { margin: 0; font-size: calc(15px * var(--fs)); font-weight: 700; color: #14161A; letter-spacing: .2px; }
.h2-carddate { font-size: calc(11.5px * var(--fs)); color: #9AA1AC; }
.h2-cardarrow, .h2-cardmore { border: 0; background: transparent; color: #9AA1AC; font-size: calc(17px * var(--fs)); padding: 2px 2px 2px 8px; }
.h2-cardmore { font-size: calc(11.5px * var(--fs)); color: #2F9E6E; font-weight: 600; }

/* 今日目标：两大圆环 + 小进度条 */
.h2-goalcard { padding-bottom: 12px; }
.h2-bigring-row { display: flex; gap: 10px; justify-content: space-around; margin: 2px 0 12px; }
.h2-bigring { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.h2-bigring svg { width: 92px; height: 92px; }
.h2-bigring b { font-size: calc(13px * var(--fs)); color: #14161A; }
.h2-bigring small { font-size: calc(10.5px * var(--fs)); color: #8A909B; }
.h2-bigring.bad small { color: #E15B5B; }
.h2-mini-bars { display: flex; flex-direction: column; gap: 7px; }
.h2-habit-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }

/* 身体指标卡：数值 + 趋势 + 迷你柱 */
.h2-vgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.h2-vcard { border: 1px solid #EDEFF2; background: #fff; border-radius: 13px; padding: 10px 11px 8px; text-align: left; display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.h2-vcard small { font-size: calc(11.5px * var(--fs)); color: #8A909B; }
.h2-vmain { font-size: calc(17px * var(--fs)); font-weight: 700; color: #14161A; letter-spacing: -.2px; }
.h2-vmain i { font-style: normal; font-size: calc(10.5px * var(--fs)); font-weight: 500; color: #9AA1AC; margin-left: 2px; }
.h2-vcard em { font-style: normal; font-size: calc(10.5px * var(--fs)); }
.h2-vcard em.up { color: #E15B5B; }
.h2-vcard em.down { color: #2F9E6E; }
.h2-vcard em.good { color: #2F9E6E; }
.h2-vcard em.bad { color: #E15B5B; }
.h2-vcard em.flat { color: #9AA1AC; }
.h2-vsub { font-size: calc(10.5px * var(--fs)); color: #9AA1AC; }
.h2-spark { display: flex; align-items: flex-end; gap: 2px; height: 22px; margin-top: 4px; }
.h2-spark i { flex: 1; background: #EAF6F0; border-radius: 2px 2px 0 0; min-height: 3px; }
.h2-spark i:last-child { background: #2F9E6E; }
.h2-spark.empty { height: 8px; }

/* 方案页：五圆环 */
.h2-rdwrap { padding: 14px 8px 12px; }
.h2-rdots { display: flex; justify-content: space-between; gap: 2px; }
.h2-rd2 { flex: 1; border: 0; background: transparent; display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 0; }
.h2-rd2 svg { width: 46px; height: 46px; }
.h2-rd2 b { font-size: calc(10.5px * var(--fs)); font-weight: 600; color: #3A3F4A; }
.h2-rd2 small { font-size: calc(10.5px * var(--fs)); color: #A0A6B0; }
.h2-rd2.bad small { color: #D98A8A; }
.h2-rd2.lib small { color: #7FB79D; }

/* 健康目标六块 */
.h2-goalgrid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.h2-gcell { background: #F7F9F8; border-radius: 11px; padding: 9px 9px 8px; display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.h2-gcell b { font-size: calc(17px * var(--fs)); font-weight: 700; color: #14161A; letter-spacing: -.3px; }
.h2-gcell b i { font-style: normal; font-size: calc(10.5px * var(--fs)); font-weight: 500; color: #8A909B; margin-left: 1px; }
.h2-gcell small { font-size: calc(10.5px * var(--fs)); color: #6B7280; line-height: 1.25; }
.h2-gcell u { text-decoration: none; font-size: calc(10.5px * var(--fs)); color: #A8AEB8; margin-top: 2px; }
.h2-gcell.bad { background: #FDF3F3; }
.h2-gcell.bad b, .h2-gcell.bad small { color: #C24B4B; }
.h2-gcell.bad u { color: #D9A0A0; }
.h2-plan-acts2 { display: flex; gap: 8px; margin-top: 11px; }
.h2-ghost { flex: 1; border: 1px solid #DCEBE3; background: #F4FAF7; color: #1F7A4D; border-radius: 10px; padding: 9px 0; font-size: calc(11.5px * var(--fs)); font-weight: 600; }

/* 计划行：一天一行 */
.h2-wrow { display: flex; align-items: center; gap: 8px; padding: 9px 0; border-top: 1px solid #F1F3F5; }
.h2-wrow:first-of-type { border-top: 0; }
.h2-wday { width: 40px; font-size: calc(11.5px * var(--fs)); font-weight: 600; color: #14161A; display: flex; flex-direction: column; }
.h2-wday small { font-size: calc(10.5px * var(--fs)); font-weight: 500; color: #2F9E6E; }
.h2-wtxt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.h2-wtxt b { font-size: calc(13px * var(--fs)); font-weight: 600; color: #14161A; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.h2-wtxt small { font-size: calc(10.5px * var(--fs)); color: #9AA1AC; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.h2-wtag { font-size: calc(10.5px * var(--fs)); color: #1F7A4D; background: #EAF6F0; border-radius: 5px; padding: 2px 5px; flex: 0 0 auto; }
.h2-wtag.diet { color: #8A6A3A; background: #FBF3E6; }
.h2-wedit { width: 26px; height: 26px; border: 0; background: transparent; color: #B4B9C2; display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.h2-wedit svg { width: 13px; height: 13px; stroke: currentColor; fill: none; stroke-width: 1.5; }
.h2-warn { display: flex; gap: 7px; align-items: flex-start; background: #FDF6EE; border-radius: 10px; padding: 9px 10px; margin-top: 10px; font-size: calc(11.5px * var(--fs)); color: #A06A2C; line-height: 1.5; }
.h2-warn svg { width: 13px; height: 13px; flex: 0 0 auto; margin-top: 1px; stroke: currentColor; fill: none; stroke-width: 1.6; }
.h2-warn small { color: #B99A78; font-size: calc(10.5px * var(--fs)); }
.h2-favs { font-size: calc(11.5px * var(--fs)); color: #8A909B; margin: 10px 0 0; }

/* 目标依据 / 重算 */
.h2-basis-lead, .h2-recalc-lead { font-size: calc(11.5px * var(--fs)); color: #6B7280; margin: 0 0 10px; line-height: 1.5; }
.h2-basis-row { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; padding: 9px 0; border-top: 1px solid #F1F3F5; }
.h2-basis-k { font-size: calc(13px * var(--fs)); color: #3A3F4A; }
.h2-basis-row b { font-size: calc(13px * var(--fs)); color: #14161A; }
.h2-basis-row small { grid-column: 1 / -1; font-size: calc(10.5px * var(--fs)); color: #9AA1AC; }
.h2-recalc-row { display: flex; justify-content: space-between; padding: 9px 0; border-top: 1px solid #F1F3F5; font-size: calc(13px * var(--fs)); }
.h2-recalc-row span { color: #6B7280; }
.h2-recalc-row b { color: #14161A; font-weight: 600; }
.h2-recalc-warn { font-size: calc(11.5px * var(--fs)); color: #C24B4B; background: #FDF3F3; border-radius: 9px; padding: 8px 10px; margin: 10px 0 4px; }

/* 体检报告列表 / 对比表 */
.h2-rep2 { display: flex; flex-direction: column; gap: 2px; padding: 10px 0; border-top: 1px solid #F1F3F5; }
.h2-rep2 b { font-size: calc(13px * var(--fs)); color: #14161A; }
.h2-rep2 small { font-size: calc(10.5px * var(--fs)); color: #8A909B; }
.h2-rep-st { align-self: flex-start; font-size: calc(10.5px * var(--fs)); color: #C24B4B; background: #FDF3F3; border-radius: 5px; padding: 1px 5px; }
.h2-rep-st.ok { color: #1F7A4D; background: #EAF6F0; }
.h2-cmp-t { font-size: calc(13px * var(--fs)); font-weight: 700; color: #14161A; margin: 14px 0 6px; }
.h2-cmp { border: 1px solid #EDEFF2; border-radius: 11px; overflow: hidden; }
.h2-cmp-h, .h2-cmp-r { display: grid; grid-template-columns: 1.5fr .7fr .7fr .8fr; gap: 4px; padding: 7px 9px; font-size: calc(11.5px * var(--fs)); }
.h2-cmp-h { background: #F7F9F8; color: #8A909B; }
.h2-cmp-r { border-top: 1px solid #F1F3F5; color: #3A3F4A; }
.h2-cmp-r span.up { color: #E15B5B; }
.h2-cmp-r span.down { color: #2F9E6E; }
.h2-cmp-r span.flat { color: #9AA1AC; }

/* 病程：药物行 */
.h2-medrow { display: flex; align-items: center; gap: 8px; background: #F7F9F8; border-radius: 9px; padding: 7px 9px; margin-bottom: 6px; font-size: calc(11.5px * var(--fs)); }
.h2-medrow span { font-weight: 600; color: #14161A; }
.h2-medrow em { font-style: normal; color: #8A909B; font-size: calc(10.5px * var(--fs)); flex: 1; }
.h2-medrow button { border: 0; background: transparent; color: #B4B9C2; font-size: calc(17px * var(--fs)); line-height: 1; }
.h2-medadd { display: grid; grid-template-columns: 1.3fr .9fr .6fr .6fr auto; gap: 5px; margin-bottom: 12px; }
.h2-medadd input { border: 1px solid #EDEFF2; border-radius: 8px; padding: 7px 6px; font-size: calc(11.5px * var(--fs)); min-width: 0; }
.h2-medadd button { border: 0; background: #EAF6F0; color: #1F7A4D; border-radius: 8px; width: 30px; font-size: calc(15px * var(--fs)); }
.h2-ep-sum { display: flex; align-items: baseline; gap: 6px; margin: 0 0 8px; }
.h2-ep-sum b { font-size: calc(17px * var(--fs)); color: #14161A; }
.h2-ep-sum small { font-size: calc(10.5px * var(--fs)); color: #9AA1AC; margin-right: 10px; }
.h2-qnote { font-size: calc(10.5px * var(--fs)); color: #A8AEB8; text-align: center; margin: 8px 0 0; }

/* 总结页 */
.h2-rate-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.h2-rate-grid.h2-rate-3 { grid-template-columns: 1fr 1fr 1fr; }
.h2-rate-cell { background: #F7F9F8; border-radius: 11px; padding: 11px 10px; display: flex; flex-direction: column; gap: 1px; }
.h2-rate-cell b { font-size: calc(17px * var(--fs)); font-weight: 700; color: #14161A; letter-spacing: -.5px; }
.h2-rate-cell small { font-size: calc(10.5px * var(--fs)); color: #6B7280; }
.h2-rate-cell em { font-style: normal; font-size: calc(10.5px * var(--fs)); color: #A0A6B0; }
.h2-rate-cell.ok b { color: #1F7A4D; }
.h2-rate-cell.bad { background: #FDF3F3; }
.h2-rate-cell.bad b { color: #C24B4B; }
.h2-wchart { display: flex; align-items: flex-end; gap: 5px; height: 84px; padding: 4px 2px 0; }
.h2-wchart i { flex: 1; background: #DCEFE5; border-radius: 4px 4px 0 0; }
.h2-wchart i:last-child { background: #2F9E6E; }
.h2-wfoot { font-size: calc(11.5px * var(--fs)); color: #8A909B; text-align: center; margin: 7px 0 0; }
.h2-verdict3 { display: flex; gap: 8px; }
.h2-verdict3 .n { flex: 1; background: #F7F9F8; border-radius: 11px; padding: 10px 8px; text-align: center; }
.h2-verdict3 .n b { display: block; font-size: calc(17px * var(--fs)); color: #14161A; }
.h2-verdict3 .n small { font-size: calc(10.5px * var(--fs)); color: #8A909B; }
.h2-verdict3 .n.bad b { color: #E15B5B; }
.h2-verdict3 .n.ok b { color: #2F9E6E; }
.h2-oneline { font-size: calc(11.5px * var(--fs)); color: #3A3F4A; background: #F4FAF7; border-radius: 10px; padding: 10px 11px; margin: 10px 0 0; line-height: 1.5; }
.h2-adv { display: flex; align-items: center; gap: 8px; padding: 9px 0; border-top: 1px solid #F1F3F5; }
.h2-adv:first-of-type { border-top: 0; }
.h2-adv-t { flex: 1; min-width: 0; font-size: calc(13px * var(--fs)); font-weight: 600; color: #14161A; display: flex; flex-direction: column; gap: 1px; }
.h2-adv-t small { font-size: calc(10.5px * var(--fs)); color: #9AA1AC; font-weight: 400; }
.h2-adv-b { border: 1px solid #DCEBE3; background: #fff; color: #1F7A4D; border-radius: 9px; padding: 6px 12px; font-size: calc(11.5px * var(--fs)); font-weight: 600; flex: 0 0 auto; }
.h2-adv-b.on { background: #EAF6F0; border-color: #C9E4D7; }
.h2-exportbtn { width: 100%; border: 1px solid #E3E6EB; background: #fff; color: #3A3F4A; border-radius: 12px; padding: 12px 0; font-size: calc(13px * var(--fs)); margin-top: 4px; display: flex; align-items: center; justify-content: center; gap: 6px; }
.h2-exportbtn svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 1.6; }
.h2-hist-row { display: grid; grid-template-columns: 1fr auto; gap: 1px 8px; padding: 9px 0; border-top: 1px solid #F1F3F5; }
.h2-hist-row b { font-size: calc(11.5px * var(--fs)); color: #14161A; }
.h2-hist-row span { font-size: calc(11.5px * var(--fs)); color: #6B7280; text-align: right; }
.h2-hist-row small { grid-column: 1 / -1; font-size: calc(10.5px * var(--fs)); color: #9AA1AC; }
.h2-hist-row small.bad { color: #E15B5B; }
.h2-hist-row small.ok { color: #2F9E6E; }

/* 问卷：滚轮下拉 + 功课行 */
.h2q-sel { width: 100%; border: 1px solid #E3E6EB; border-radius: 10px; padding: 10px 11px; font-size: calc(13px * var(--fs)); color: #14161A; background: #fff; margin-bottom: 6px; }
.h2-time-row { display: flex; gap: 8px; }
.h2-time-row .h2q-sel { flex: 1; }
.h2-habit-edit { display: grid; grid-template-columns: 1.4fr 1fr .8fr auto; gap: 6px; margin-bottom: 6px; }
.h2-habit-edit input, .h2-habit-edit select { border: 1px solid #E3E6EB; border-radius: 9px; padding: 8px 8px; font-size: calc(11.5px * var(--fs)); min-width: 0; background: #fff; }
.h2-habit-edit button { border: 0; background: #F5F6F8; color: #9AA1AC; border-radius: 9px; width: 28px; font-size: calc(15px * var(--fs)); }
.h2-chips-line { display: flex; gap: 8px; }

/* 分类条强制单行横滑（覆盖 v132 的 wrap 写法，规则 62） */
#h2LibCats, #h2SpCats, #h2FnList { flex-wrap: nowrap !important; overflow-x: auto !important; overflow-y: hidden;
  padding-right: 18px; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; scrollbar-width: none; }
#h2LibCats::-webkit-scrollbar, #h2SpCats::-webkit-scrollbar, #h2FnList::-webkit-scrollbar { display: none; }
#h2LibCats > *, #h2SpCats > *, #h2FnList > * { flex: 0 0 auto; }
.h2-wtxt { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* 320px 窄屏防溢出：长文本一律省略 */
.h2-goal-name { min-width: 0; overflow: hidden; }
.h2-goal-name small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.h2-gcell small, .h2-gcell u, .h2-rep2 b, .h2-rep2 small, .h2-adv-t, .h2-adv-t small, .h2-basis-k, .h2-basis-row small,
.h2-recalc-row b, .h2-medrow span, .h2-medrow em { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.h2-medrow em { display: inline-block; }
.h2-gcell b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ============ v134 · L1 排版令牌统一（全局硬规则，规则 68） ============ */
/* 卡片：间距 12px、内边距 14/16、圆角 20 —— 与记账页一致 */
#view-health .set-panel, #view-health .hc-panel {
  margin: 0 0 12px; padding: 14px 16px; border-radius: 20px;
  border: 1px solid #EDEFF2; background: #fff; box-sizing: border-box;
}
#view-health .set-panel:last-child { margin-bottom: 6px; }
#view-health .hc-pane, #view-health [id^="h2Pane"] { padding-bottom: 4px; }

/* 字号：只用 17/15/13.5/13/11.5/10.5 六档，禁止 9-10px */
#view-health .h2-rd2 b { font-size: calc(11.5px * var(--fs)); }
#view-health .h2-rd2 small { font-size: calc(10.5px * var(--fs)); }
#view-health .h2-rd2 text { font-size: calc(13px * var(--fs)); }
#view-health .h2-gcell b { font-size: calc(17px * var(--fs)); }
#view-health .h2-gcell b i { font-size: calc(10.5px * var(--fs)); }
#view-health .h2-gcell small { font-size: calc(11.5px * var(--fs)); }
#view-health .h2-gcell u { font-size: calc(10.5px * var(--fs)); }
#view-health .h2-bigring b { font-size: calc(13px * var(--fs)); }
#view-health .h2-bigring small { font-size: calc(11.5px * var(--fs)); }
#view-health .h2-wday { font-size: calc(13px * var(--fs)); }
#view-health .h2-wday small { font-size: calc(10.5px * var(--fs)); }
#view-health .h2-wtag { font-size: calc(10.5px * var(--fs)); }
#view-health .h2-wtxt b { font-size: calc(13px * var(--fs)); }
#view-health .h2-wtxt small { font-size: calc(11.5px * var(--fs)); }
#view-health .h2-carddate { font-size: calc(11.5px * var(--fs)); }
#view-health .h2-cardmore { font-size: calc(11.5px * var(--fs)); }
#view-health .h2-vcard small { font-size: calc(11.5px * var(--fs)); }
#view-health .h2-vmain { font-size: calc(17px * var(--fs)); }
#view-health .h2-vsub { font-size: calc(10.5px * var(--fs)); }
#view-health .h2-warn { font-size: calc(11.5px * var(--fs)); }
#view-health .h2-warn small { font-size: calc(10.5px * var(--fs)); }
#view-health .h2-favs { font-size: calc(11.5px * var(--fs)); }
#view-health .h2-gtag { font-size: calc(10.5px * var(--fs)); }

/* 顶栏：头像与「健康」底部对齐（rule 59①）
   v135 修正：.h2-members 继承了早期 margin-bottom:10px，在 flex-end 布局里把头像抬高了 10px，
   导致头像圈与标题不在同一条底线上 —— 顶栏内一律清零，并让右侧整组底对齐 */
.topbar { align-items: flex-end; padding-bottom: 6px; }
#topTitle { line-height: 1.1; }
.topbar .topbar-right { align-items: flex-end; }
.topbar .h2-members { margin-bottom: 0; margin-left: auto; padding-bottom: 2px; }

/* ---- 新增组件 ---- */
.h2-mrow { display: flex; align-items: center; gap: 8px; padding: 10px 0; border-top: 1px solid #F1F3F5; }
.h2-mrow:first-of-type { border-top: 0; }
.h2-mtime { width: 42px; font-size: calc(11.5px * var(--fs)); color: #9AA1AC; flex: 0 0 auto; }
.h2-mname { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.h2-mname b { font-size: calc(13px * var(--fs)); color: #14161A; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.h2-mname small { font-size: calc(11.5px * var(--fs)); color: #8A909B; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.h2-xbtn { width: 26px; height: 26px; border: 0; background: transparent; color: #C3C8D0; font-size: calc(17px * var(--fs)); line-height: 1; flex: 0 0 auto; }
.h2-addrow { width: 100%; border: 1px dashed #D8DCE2; background: #FAFBFC; color: #6B7280; border-radius: 12px; padding: 11px 0; font-size: calc(13px * var(--fs)); margin-top: 10px; }
.h2-two { display: flex; gap: 9px; }
.h2-bigbtn { flex: 1; border: 1px solid #EDEFF2; background: #FAFBFC; border-radius: 14px; padding: 12px 10px; text-align: left; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.h2-bigbtn b { font-size: calc(13.5px * var(--fs)); color: #14161A; }
.h2-bigbtn small { font-size: calc(11.5px * var(--fs)); color: #8A909B; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.h2-waterline { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; font-size: calc(13px * var(--fs)); color: #3A3F4A; }
.h2-empty { font-size: calc(13px * var(--fs)); color: #9AA1AC; text-align: center; padding: 14px 0; margin: 0; }
.h2-sbar { display: grid; grid-template-columns: 44px 1fr auto; gap: 8px; align-items: center; font-size: calc(11.5px * var(--fs)); color: #6B7280; }
.h2-sbar i { height: 7px; background: #F0F2F4; border-radius: 4px; overflow: hidden; display: block; }
.h2-sbar i b { display: block; height: 100%; border-radius: 4px; transition: width .3s; }
.h2-sbar em { font-style: normal; font-size: calc(10.5px * var(--fs)); }
.h2-sbar em.bad { color: #E15B5B; }
.h2-sbar em.ok { color: #2F9E6E; }
.h2-oneline { font-size: calc(13px * var(--fs)); color: #3A3F4A; background: #F4FAF7; border-radius: 12px; padding: 11px 12px; margin: 0; line-height: 1.55; }
.h2-primary { width: 100%; border: 0; background: #2F9E6E; color: #fff; border-radius: 13px; padding: 14px 0; font-size: calc(13.5px * var(--fs)); font-weight: 600; }
.h2-primary:active { background: #1F7A4D; }

/* 记录弹层 */
.h2-msum { font-size: calc(13px * var(--fs)); color: #6B7280; margin: 0 0 8px; }
.h2-msum b { font-size: calc(17px * var(--fs)); color: #14161A; }
.h2-msum span { margin-left: 12px; }
.h2-mpicked { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; min-height: 24px; }
.h2-mpicked i { font-size: calc(11.5px * var(--fs)); color: #A8AEB8; font-style: normal; }
.h2-pchip { display: inline-flex; align-items: center; gap: 4px; background: #EAF6F0; color: #1F7A4D; border-radius: 8px; padding: 5px 8px; font-size: calc(11.5px * var(--fs)); }
.h2-pchip button { border: 0; background: transparent; color: #7FB79D; font-size: calc(13.5px * var(--fs)); line-height: 1; padding: 0 0 0 2px; }
.h2-searchrow { margin: 0 0 8px; }
.h2-searchrow input { width: 100%; border: 1px solid #E3E6EB; border-radius: 11px; padding: 10px 12px; font-size: calc(13px * var(--fs)); box-sizing: border-box; }
.h2-liblist { max-height: 46vh; overflow-y: auto; overscroll-behavior: contain; margin: 0 -4px; }
.h2-frow { width: 100%; display: flex; align-items: center; gap: 8px; border: 0; border-top: 1px solid #F4F5F7; background: transparent; padding: 10px 4px; text-align: left; }
.h2-frow:first-child { border-top: 0; }
.h2-fname { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.h2-fname b { font-size: calc(13px * var(--fs)); color: #14161A; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.h2-fname small { font-size: calc(11.5px * var(--fs)); color: #8A909B; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.h2-fkcal { font-size: calc(13px * var(--fs)); color: #3A3F4A; text-align: right; flex: 0 0 auto; display: flex; flex-direction: column; }
.h2-fkcal i { font-style: normal; font-size: calc(10.5px * var(--fs)); color: #A0A6B0; }
.h2-frow.lim { background: #FDF7EE; }
.h2-frow.lim .h2-fname b::after { content: " 受限"; font-size: calc(10.5px * var(--fs)); color: #C08A3E; }
.h2-frow.rec { background: #F4FAF7; }
.h2-frow.off { opacity: .45; }
.h2-sheetfoot { position: sticky; bottom: 0; background: #fff; padding: 10px 0 2px; margin-top: 6px; }
/* v135：抽屉主按钮一律贴底——不再随内容悬在半空（清单 B3）。
   抽屉本体是滚动容器，flex 列 + 末位主按钮 margin-top:auto（内容短时压到底）+ sticky（内容长时滚动仍贴底） */
.nt-sheet.h2-sheet { display: flex; flex-direction: column; }
.nt-sheet.h2-sheet > .h2-sheetfoot { margin-top: auto; }
.nt-sheet.h2-sheet > .life-go:last-child,
.nt-sheet.h2-sheet > .h2-primary:last-child {
  margin-top: auto;
  position: sticky;
  bottom: 0;
  background: #fff;
  padding-top: 8px;
  z-index: 2;
}
.h2-addrow2 { display: flex; gap: 8px; margin: 10px 0; }
.h2-addrow2 input { flex: 1; border: 1px solid #E3E6EB; border-radius: 10px; padding: 10px 11px; font-size: calc(13px * var(--fs)); min-width: 0; }

/* 单日餐单 */
.h2-daybar { display: flex; gap: 14px; font-size: calc(11.5px * var(--fs)); color: #6B7280; margin: 0 0 10px; }
.h2-mealbox { border: 1px solid #EDEFF2; border-radius: 16px; padding: 12px 13px; margin: 0 0 10px; }
.h2-mealhead { display: flex; align-items: baseline; justify-content: space-between; margin: 0 0 8px; }
.h2-mealhead b { font-size: calc(13.5px * var(--fs)); color: #14161A; }
.h2-mealhead small { font-size: calc(11.5px * var(--fs)); color: #8A909B; }
.h2-mgroup { display: flex; gap: 8px; padding: 7px 0; border-top: 1px solid #F4F5F7; }
.h2-mgroup:first-of-type { border-top: 0; }
.h2-gtag { width: 34px; flex: 0 0 auto; font-size: calc(10.5px * var(--fs)); color: #8A909B; padding-top: 6px; }
.h2-gitems { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.h2-gitem { border: 1px solid #E7EAEE; background: #fff; border-radius: 10px; padding: 7px 9px; text-align: left; display: flex; flex-direction: column; gap: 1px; max-width: 100%; }
.h2-gitem b { font-size: calc(11.5px * var(--fs)); color: #14161A; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.h2-gitem small { font-size: calc(10.5px * var(--fs)); color: #8A909B; }
.h2-gitem i { font-style: normal; font-size: calc(10.5px * var(--fs)); color: #C08A3E; }
.h2-gitem.lim { background: #FDF7EE; border-color: #F0E2CC; }
.h2-gitem.rec { background: #F4FAF7; border-color: #DCEBE3; }
.h2-swaplist { max-height: 52vh; overflow-y: auto; overscroll-behavior: contain; }
.h2-swapnote { font-size: calc(11.5px * var(--fs)); color: #9AA1AC; margin: 0 0 8px; }
.h2-swapitem { width: 100%; display: flex; flex-direction: column; gap: 2px; border: 0; border-top: 1px solid #F4F5F7; background: transparent; padding: 10px 4px; text-align: left; }
.h2-swapitem b { font-size: calc(13px * var(--fs)); color: #14161A; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.h2-swapitem small { font-size: calc(11.5px * var(--fs)); color: #8A909B; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.h2-swapitem i { font-style: normal; font-size: calc(10.5px * var(--fs)); color: #C08A3E; }
.h2-swapitem i.ok { color: #2F9E6E; }
.h2-swapitem.rec { background: #F4FAF7; }
.h2-wrow-btn { width: 100%; border: 0; background: transparent; text-align: left; }

/* 抽屉内滚动隔离：横滑不带动底页（规则 61） */
.nt-sheet { overflow-x: hidden; overscroll-behavior: contain; }
.h2-liblist, .h2-swaplist { overscroll-behavior: contain; }
.h2-repdel { align-self: flex-start; border: 0; background: transparent; color: #C24B4B; font-size: calc(11.5px * var(--fs)); padding: 2px 0 0; }

/* 总结子页：表格 + 翻页 */
.h2-table { border: 1px solid #EDEFF2; border-radius: 14px; overflow: hidden; }
.h2-trow { display: grid; grid-template-columns: 1fr 1fr 1fr 1fr; gap: 4px; padding: 9px 12px; font-size: calc(13px * var(--fs)); border-top: 1px solid #F1F3F5; }
.h2-trow:first-child { border-top: 0; }
.h2-thead { background: #F7F9F8; font-size: calc(11.5px * var(--fs)); color: #8A909B; }
.h2-trow span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.h2-trow span.up { color: #E15B5B; }
.h2-trow span.down { color: #2F9E6E; }
.h2-pager { display: flex; align-items: center; justify-content: space-between; margin: 10px 0; padding: 0 4px; }
.h2-pager b { font-size: calc(13px * var(--fs)); color: #14161A; }
.h2-pager button { width: 34px; height: 34px; border: 1px solid #E3E6EB; background: #fff; border-radius: 50%; font-size: calc(17px * var(--fs)); color: #6B7280; }
