/* iPhone 风格（v110，用户 2026-11-17 确认）：在 features.css 之后、dark.css 之前加载，只改外观，不改结构。
   参考 iPhone 自带的“健康”“设置”“提醒事项”：系统分组灰底、白卡片、两层很淡的黑色阴影（不用蓝色阴影）、0.5px 分隔线、
   按下有反馈（卡片缩到 97%、列表行变灰）、底部导航和顶栏半透明毛玻璃、分段控件白色滑块带两层阴影并滑动、开关 51×31 打开是绿色。
   首页卡片的统一规范见 AGENTS.md「界面风格」，新卡片照它写，不要单独写阴影、圆角。
   深色版在 dark.css 末尾。 */
:root {
  --bg: #f2f2f7;
  --surface: #ffffff;
  --muted: #8a8a8e;
  --line: #e3e3e8;
  --sep: rgba(60, 60, 67, 0.2);
  --fill: rgba(118, 118, 128, 0.12);
  --fill-press: rgba(118, 118, 128, 0.16);
  --ios-green: #34c759;
  --ios-blue: #2f80c0;
  --card-radius: 20px;
  --card-shadow: 0 0.5px 0 rgba(0, 0, 0, 0.03), 0 1px 2px rgba(0, 0, 0, 0.04), 0 8px 24px rgba(0, 0, 0, 0.05);
  --thumb-shadow: 0 3px 8px rgba(0, 0, 0, 0.12), 0 3px 1px rgba(0, 0, 0, 0.04), 0 0 0 0.5px rgba(0, 0, 0, 0.04);
  --spring: cubic-bezier(0.3, 0.7, 0.2, 1.1);
  --shadow: var(--card-shadow);
}

/* ---- 外壳：纯灰底，状态栏和底部导航毛玻璃 ---- */
.app-shell { background: var(--bg); }
body::after { background: rgba(242, 242, 247, 0.8); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); }
.bottom-nav { z-index: 10; background: rgba(249, 249, 249, 0.82); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); box-shadow: none; border-top: 0.5px solid var(--sep); }
.bottom-nav button.active { background: transparent; color: var(--ios-blue); }
.bottom-nav .nav-add { box-shadow: 0 4px 12px rgba(47, 128, 192, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.35); }

/* ---- 顶栏：头像只显示；右上角设置齿轮，出问题亮红点 ---- */
.top-avatar { display: grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: 50%; background: linear-gradient(135deg, var(--green), var(--blue)); color: #fff; font-weight: 600; }
.top-avatar.has-photo { background: center / cover no-repeat; color: transparent; }
.top-actions .settings-button { position: relative; display: grid; place-items: center; width: 40px; min-width: 0; height: 40px; padding: 0; border-radius: 50%; background: var(--fill); box-shadow: none; color: var(--ios-blue); cursor: pointer; transition: transform 0.15s; }
.top-actions .settings-button:active { transform: scale(0.9); }
.settings-button svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.settings-button.sync-warn::after, .settings-button.backup-warn::after { content: ""; position: absolute; top: 0; right: 0; width: 11px; height: 11px; border: 2px solid var(--bg); border-radius: 50%; background: #ff3b30; }

/* ---- 卡片：白底、两层淡阴影、圆角 20、按下缩一下 ---- */
.home-card, .milk-hero, .milk-stats, .milk-chart, .growth-chart, .me-profile, .me-sync, .feeding-overview article, .monitor-card, .guide-entry { box-shadow: var(--card-shadow); }
.home-cards .home-card, .home-cards .milk-hero { border-radius: var(--card-radius); box-shadow: var(--card-shadow); }
.home-cards button.home-card, .home-cards .milk-hero { transition: transform 0.18s cubic-bezier(0.2, 0.8, 0.2, 1); }
.home-cards button.home-card:active, .milestone-open:active { transform: scale(0.97); }
.milk-stats, .milk-chart, .growth-chart { border-radius: 16px; }
.upcoming-list { border-radius: var(--card-radius); box-shadow: var(--card-shadow); }

/* 统一卡片头：彩色小图标＋名字，右边灰色的次数/时间和 ›（home-charts.js 的 cardHead） */
.card-head { display: flex; align-items: center; gap: 6px; min-width: 0; color: var(--c, var(--ios-blue)); font-size: calc(13px * var(--fs, 1)); font-weight: 600; }
.card-head > i { display: grid; place-items: center; flex: none; width: 20px; height: 20px; border-radius: 6px; background: var(--c-soft, var(--fill)); font-size: calc(12px * var(--fs, 1)); font-style: normal; }
.card-head > b { flex: 1; min-width: 0; overflow: hidden; font-weight: 600; white-space: nowrap; text-overflow: ellipsis; }
.card-head > small { flex: none; color: var(--muted); font-size: calc(12px * var(--fs, 1)); font-weight: 400; white-space: nowrap; }
button .card-head > small::after, .milestone-open .card-head > small::after { content: " ›"; }
.home-cards .home-big { font-size: calc(26px * var(--fs, 1)); font-weight: 600; letter-spacing: -0.02em; line-height: 1.15; font-variant-numeric: tabular-nums; }
.home-cards .home-big small { margin-left: 1px; color: var(--muted); font-size: calc(13px * var(--fs, 1)); font-weight: 600; letter-spacing: 0; }
.home-cards .trend-foot { color: var(--muted); }
/* 各类的颜色（名字和图标底色）：奶蓝、亲喂粉、尿布棕、睡眠紫、辅食橙、用药绿、体温红、黄疸金、时光机黄、体重绿 */
[data-home-card="since"], [data-home-card="milk"], [data-home-card="guide"] { --c: #2f7fb8; --c-soft: rgba(59, 143, 198, 0.14); }
[data-home-card="nurse"] { --c: #c4486a; --c-soft: rgba(214, 96, 126, 0.14); }
[data-home-card="diaper"] { --c: #946414; --c-soft: rgba(168, 118, 28, 0.15); }
[data-home-card="sleep"], [data-home-card="day24"] { --c: #6457c4; --c-soft: rgba(122, 107, 214, 0.15); }
[data-home-card="food"] { --c: #a8650a; --c-soft: rgba(194, 124, 14, 0.15); }
[data-home-card="play"] { --c: #17806d; --c-soft: rgba(31, 143, 118, 0.15); }
[data-home-card="bath"] { --c: #11798c; --c-soft: rgba(19, 137, 158, 0.15); }
[data-home-card="med"], [data-home-card="weight"] { --c: #23744b; --c-soft: rgba(47, 158, 106, 0.14); }
[data-home-card="temp"] { --c: #c0392b; --c-soft: rgba(204, 90, 69, 0.14); }
[data-home-card="bili"], [data-home-card="mile"], [data-home-card="moment"], [data-home-card="plans"] { --c: #9a6200; --c-soft: rgba(215, 169, 79, 0.2); }

/* ---- 分段控件：灰底 + 白色滑块（两层阴影）；按钮型的由 ui/segmented.js 加一块会滑动的 .seg-thumb ---- */
.segmented, .chart-tabs, .health-tabs, .growth-tabs, .feed-filter, .health-filter, .monitor-filter, .library-tabs, .guide-switch, .sex-toggle, .guide-views, .theme-toggle {
  border-radius: 9px; background: var(--fill); padding: 2px;
}
.segmented input:checked + span, .chart-tabs button[aria-selected="true"], .feed-filter button[aria-selected="true"], .health-filter button[aria-selected="true"],
.monitor-filter button[aria-selected="true"], .library-tabs button[aria-selected="true"], .guide-switch button[aria-selected="true"], .sex-toggle button[aria-pressed="true"],
.health-tabs button[aria-selected="true"], .growth-tabs button[aria-selected="true"], .guide-views button[aria-selected="true"] {
  border-radius: 7px; background: var(--surface); box-shadow: var(--thumb-shadow); color: var(--text);
}
.has-seg-thumb { position: relative; isolation: isolate; }
/* 滑块是 span：.segmented span（填写页单选的样式）的 min-width 56px 和内边距会让它比按钮宽，窄屏时最右边那项伸出框外（v132 修） */
.has-seg-thumb > .seg-thumb { min-width: 0; padding: 0; position: absolute; z-index: -1; top: 2px; bottom: 2px; left: 0; border-radius: 7px; background: var(--surface); box-shadow: var(--thumb-shadow); pointer-events: none; transition: transform 0.32s var(--spring), width 0.32s var(--spring); }
.has-seg-thumb.seg-instant > .seg-thumb { transition: none; }
.has-seg-thumb > button[aria-selected="true"], .has-seg-thumb > button[aria-pressed="true"] { background: transparent !important; box-shadow: none !important; }
.has-seg-thumb > button { position: relative; transition: color 0.2s; }
@media (prefers-reduced-motion: reduce) { .has-seg-thumb > .seg-thumb { transition: none; } }

/* ---- 开关：51×31，滑块带阴影，按住变宽，打开是绿色（用户选的） ---- */
.layout-switch, .feed-form .check-row input[type="checkbox"] {
  appearance: none; -webkit-appearance: none; position: relative; flex: none; width: 51px; height: 31px; margin: 0; padding: 0; border: 0; border-radius: 999px;
  background: var(--fill); cursor: pointer; transition: background 0.25s ease;
}
.layout-switch::after, .feed-form .check-row input[type="checkbox"]::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 999px; background: #fff;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15), 0 3px 1px rgba(0, 0, 0, 0.06), 0 0 0 0.5px rgba(0, 0, 0, 0.04);
  transition: transform 0.3s var(--spring), width 0.15s ease;
}
.layout-switch:active::after, .feed-form .check-row input[type="checkbox"]:active::after { width: 34px; }
.layout-switch[aria-checked="true"], .feed-form .check-row input[type="checkbox"]:checked { background: var(--ios-green); }
.layout-switch[aria-checked="true"]::after, .feed-form .check-row input[type="checkbox"]:checked::after { transform: translateX(20px); }
.layout-switch[aria-checked="true"]:active::after, .feed-form .check-row input[type="checkbox"]:checked:active::after { transform: translateX(13px); }
.feed-form .check-row { grid-template-columns: minmax(0, 1fr) 51px; }
.feed-form .check-row input[type="checkbox"] { grid-column: 2; grid-row: 1; }
.feed-form .check-row span { grid-column: 1; grid-row: 1; }
@media (prefers-reduced-motion: reduce) { .layout-switch, .layout-switch::after, .feed-form .check-row input::after { transition: none; } }

/* ---- 分组列表：圆角 12、0.5px 分隔线从文字左边开始、按下整行变灰 ---- */
.me-group { border-radius: 12px; }
.me-row + .me-row::before { height: 0.5px; background: var(--sep); }
.me-link:active, .me-option:active, .me-add:active, #check-update:active { background: var(--fill-press); }
.me-link, .me-option, .me-add { transition: background 0.2s; }

/* ---- “我的”大标题：二级页标题大号粗体左对齐，往下滑缩成顶栏小标题（me.js） ---- */
.me-topbar { position: sticky; top: env(safe-area-inset-top); z-index: 5; margin-inline: -16px; padding-inline: 16px; }
.me-topbar.compact { background: rgba(242, 242, 247, 0.82); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); box-shadow: 0 0.5px 0 var(--sep); }
.me-topbar h2 { opacity: 0; transition: opacity 0.2s; font-size: calc(17px * var(--fs, 1)); font-weight: 600; }
.me-topbar.compact h2 { opacity: 1; }
.me-large-title { margin: 2px 0 10px; font-size: calc(32px * var(--fs, 1)); font-weight: 600; letter-spacing: -0.02em; line-height: 1.15; }

/* ---- 填写页：顶上一条小横杠（往下拉可以关掉，ui/sheet-pull.js），顶栏毛玻璃 ---- */
.feed-sheet { background: rgba(0, 0, 0, 0.25); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.feed-form { position: relative; border-radius: 12px 12px 0 0; background: var(--bg); }
.feed-form::before { content: ""; position: absolute; top: 7px; left: 50%; width: 36px; height: 5px; margin-left: -18px; border-radius: 3px; background: rgba(60, 60, 67, 0.3); }
.sheet-card { border-radius: 12px; background: var(--surface); box-shadow: none; }
.feed-sheet > form.pulling { transition: none; }
/* 填写页内容比屏幕高时能上下滚（v118：尿布选“臭臭”后多了颜色、形状，表单顶到屏幕外面拖不下来）。
   短的照旧贴底：表单 margin-top: auto，比屏幕高时自动变成 0、从顶部开始滚（grid 的 align-items: end 溢出的部分滚不到） */
.feed-sheet { display: flex; flex-direction: column; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.feed-sheet > form { flex: none; margin-top: auto; }

/* ---- 记录页统计：一行五格（milk-stats.js） ---- */
.milk-stats-grid.strip { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; margin-top: 10px; padding: 8px 0; border-radius: 12px; background: var(--fill); }
.milk-stats-grid.strip > div { position: relative; display: grid; justify-items: center; gap: 1px; min-width: 0; padding: 0 2px; }
.milk-stats-grid.strip > div + div::before { content: ""; position: absolute; top: 4px; bottom: 4px; left: 0; width: 0.5px; background: var(--sep); }
.milk-stats-grid.strip span { color: var(--muted); font-size: calc(11px * var(--fs, 1)); white-space: nowrap; }
.milk-stats-grid.strip strong { font-size: calc(17px * var(--fs, 1)); font-weight: 600; letter-spacing: -0.02em; white-space: nowrap; font-variant-numeric: tabular-nums; }
.milk-stats-grid.strip strong small { margin-left: 1px; color: var(--muted); font-size: calc(10px * var(--fs, 1)); font-weight: 500; }
@media (max-width: 350px) { .milk-stats-grid.strip strong { font-size: calc(15px * var(--fs, 1)); } }

/* 距上次喂奶：头在最上面一整行，下面左钟面右文字 */
.home-cards .milk-hero { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; column-gap: 16px; row-gap: 8px; }
.home-cards .milk-hero > .card-head { grid-column: 1 / -1; }
.home-cards .home-clock-head { width: 100%; }
.home-cards .home-clock-head .home-card-title { font-size: calc(13px * var(--fs, 1)); }

/* “我的 → 外观”：一行里的三段（features/theme.js） */
.me-group .theme-row { grid-template-columns: 32px auto minmax(0, 1fr); }
.theme-toggle { display: flex; justify-self: end; width: min(100%, 168px); }
.theme-toggle button { flex: 1; min-height: 30px; padding: 0; border: 0; border-radius: 7px; background: transparent; color: var(--text); font: inherit; font-size: calc(13px * var(--fs, 1)); font-weight: 500; cursor: pointer; }
.theme-toggle button[aria-pressed="true"] { font-weight: 500; background: var(--surface); box-shadow: var(--thumb-shadow); }

/* ---- 「＋」菜单（v112，方案 A）：一块、每页 4×2、左右滑翻页；iPhone 主屏幕那样的圆角方块图标＋细字名字，没有格子底 ---- */
.record-menu-panel { --pull: 0px; transform: translateX(-50%) translateY(var(--pull)); padding-top: 8px; border-radius: 14px 14px 0 0; background: var(--bg); }
.record-menu-panel.pulling { transition: none; }
.sheet-grab { display: block; width: 36px; height: 5px; margin: 0 auto 10px; border-radius: 3px; background: rgba(60, 60, 67, 0.3); }
.record-menu-head { margin: 0 0 12px 4px; }
.record-menu-head h3 { font-size: calc(20px * var(--fs, 1)); font-weight: 600; letter-spacing: -0.01em; }
.record-menu-close { width: 30px; height: 30px; background: var(--fill); color: var(--muted); }
.record-menu-close svg { width: 14px; height: 14px; stroke-width: 3; }
.menu-pages { display: flex; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scrollbar-width: none; margin: 0 -4px; padding: 10px 0 4px; border-radius: 16px; background: var(--surface); }
.menu-pages::-webkit-scrollbar { display: none; }
.menu-page { position: relative; flex: 0 0 100%; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-template-rows: repeat(2, 88px); align-content: start; gap: 4px 0; scroll-snap-align: start; }
.menu-page[hidden] { display: none; }
.record-menu .menu-page > button { display: grid; justify-items: center; align-content: start; gap: 6px; height: auto; min-height: 0; padding: 6px 0 0; border: 0; border-radius: 12px; background: transparent; box-shadow: none; color: var(--text); font: inherit; cursor: pointer; transition: transform 0.15s;
  -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
.record-menu .menu-page > button:active { transform: scale(0.92); }
.record-menu .menu-page > button.dragging { z-index: 2; background: var(--surface); box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18); }
.record-menu .menu-page .feed-type-icon { display: grid; place-items: center; width: 56px; height: 56px; margin: 0; border-radius: 15px; font-size: calc(27px * var(--fs, 1)); background: var(--ic-soft, var(--fill)); color: var(--ic, var(--ios-blue)); }
.record-menu .menu-page .feed-type-icon.icon-ruler::before, .record-menu .menu-page .feed-type-icon.icon-syringe::before, .record-menu .menu-page .feed-type-icon.icon-stethoscope::before { transform: scale(1.2); }
.record-menu .menu-page strong { font-size: calc(12px * var(--fs, 1)); font-weight: 500; line-height: 1.2; color: var(--text); }
.menu-dots { display: flex; justify-content: center; gap: 7px; margin: 10px 0 0; }
.menu-dots[hidden] { display: none; }
.menu-dots i { width: 7px; height: 7px; border-radius: 50%; background: rgba(60, 60, 67, 0.25); transition: background 0.2s; }
.menu-dots i.on { background: var(--text); }
/* 图标底色：和首页卡片头同一套类别色 */
[data-feed-type="breast"] { --ic-soft: rgba(214, 96, 126, 0.16); }
[data-feed-type="formula"] { --ic-soft: rgba(59, 143, 198, 0.16); }
[data-feed-type="food"] { --ic-soft: rgba(194, 124, 14, 0.16); }
[data-feed-type="diaper"] { --ic-soft: rgba(47, 158, 106, 0.16); }
[data-feed-type="sleep"] { --ic-soft: rgba(122, 107, 214, 0.18); }
[data-feed-type="supplement"] { --ic-soft: rgba(47, 158, 106, 0.16); }
[data-feed-type="jaundice"] { --ic-soft: rgba(215, 169, 79, 0.22); }
[data-feed-type="temperature"] { --ic-soft: rgba(204, 90, 69, 0.16); }
#add-growth { --ic-soft: rgba(52, 163, 154, 0.16); --ic: #23746b; }
[data-add="vaccines"] { --ic-soft: rgba(214, 96, 126, 0.16); --ic: #ac5269; }
[data-add="checkups"] { --ic-soft: rgba(59, 143, 198, 0.16); --ic: #2f6f99; }
[data-add="clinic"] { --ic-soft: rgba(204, 90, 69, 0.16); }
[data-add="milestones"] { --ic-soft: rgba(215, 169, 79, 0.22); }

/* ---- “我的”一级页（v112，参考同类小程序压缩）：记录概况一条 → 宝宝卡横排 → 同步、备份两张小卡并排 ---- */
#me .me-stats { display: flex; align-items: baseline; justify-content: center; gap: 10px; width: auto; margin: 4px 0 12px; padding: 12px 14px; border: 0; border-radius: 16px; background: var(--surface); box-shadow: var(--card-shadow); color: var(--muted); font-size: calc(13px * var(--fs, 1)); }
#me .me-stats span { white-space: nowrap; }
#me .me-stats strong { display: inline; margin: 0 1px; color: var(--text); font-size: calc(20px * var(--fs, 1)); font-weight: 600; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
#me .me-stats i { align-self: center; width: 3px; height: 3px; border-radius: 50%; background: var(--line); }
#me .me-baby-card { display: grid; gap: 12px; margin: 0; padding: 16px; border-radius: var(--card-radius); align-items: stretch; }
.me-baby-top { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; align-items: center; gap: 12px; }
#me .me-baby-top .avatar.me-avatar { width: 64px; height: 64px; font-size: calc(26px * var(--fs, 1)); box-shadow: 0 0 0 3px var(--surface), 0 0 0 4px var(--line); }
#me .me-baby-top .me-camera { width: 24px; height: 24px; right: -4px; bottom: -4px; }
#me .me-baby-top .me-camera svg { width: 13px; height: 13px; }
.me-baby-name { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; min-width: 0; }
#me .me-baby-name .me-name { margin: 0; font-size: calc(22px * var(--fs, 1)); font-weight: 600; letter-spacing: -0.01em; }
.me-sex-tag { padding: 1px 8px; border-radius: 999px; background: rgba(59, 143, 198, 0.14); color: #2f7fb8; font-size: calc(12px * var(--fs, 1)); font-weight: 500; white-space: nowrap; }
.me-edit { padding: 7px 12px; border: 0; border-radius: 999px; background: var(--fill); color: var(--text); font: inherit; font-size: calc(13px * var(--fs, 1)); font-weight: 500; white-space: nowrap; cursor: pointer; }
.me-edit:active { background: var(--fill-press); }
.me-baby-facts { display: grid; grid-template-columns: 1.1fr 1.35fr 0.75fr; gap: 8px; padding-top: 12px; border-top: 1px dashed var(--line); }
.me-baby-facts span { display: grid; gap: 2px; min-width: 0; }
.me-baby-facts small { color: var(--muted); font-size: calc(12px * var(--fs, 1)); }
.me-baby-facts b { font-size: calc(15px * var(--fs, 1)); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.me-mini-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 12px; }
#me .me-mini { display: grid; grid-template-columns: minmax(0, 1fr); align-items: start; gap: 8px; min-width: 0; margin: 0; padding: 14px; border: 0; border-radius: var(--card-radius); background: var(--surface); box-shadow: var(--card-shadow); color: var(--text); font: inherit; text-align: left; cursor: pointer; transition: transform 0.18s cubic-bezier(0.2, 0.8, 0.2, 1); }
#me .me-mini:active { transform: scale(0.97); }
.me-mini-head { display: flex; align-items: center; justify-content: space-between; }
.me-mini-head b { font-size: calc(15px * var(--fs, 1)); font-weight: 500; }
.me-mini-body { display: grid; grid-template-columns: 36px minmax(0, 1fr); align-items: center; gap: 8px; }
.me-mini-body small { display: block; color: var(--muted); font-size: calc(12px * var(--fs, 1)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me-mini-body strong { display: block; font-size: calc(15px * var(--fs, 1)); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
#me .me-mini-icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: rgba(47, 158, 106, 0.14); color: #23744b; }
#me .me-mini-icon svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
#me .me-sync .me-mini-icon { background: rgba(59, 143, 198, 0.14); color: #2f7fb8; }
#me .me-sync.warn .me-mini-icon, #me .me-backup.warn .me-mini-icon { background: rgba(255, 59, 48, 0.14); color: #d93025; }
#me .me-sync.busy .me-mini-icon svg { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.me-mini-foot { color: var(--muted); font-size: calc(12px * var(--fs, 1)); }
#me .me-backup.warn #me-backup-value, #me .me-sync.warn #me-sync-title { color: #d93025; font-weight: 500; }
@media (prefers-reduced-motion: reduce) { #me .me-sync.busy .me-mini-icon svg { animation: none; } }
@media (max-width: 350px) { .me-baby-top { grid-template-columns: 56px minmax(0, 1fr) auto; } #me .me-baby-top .avatar.me-avatar { width: 56px; height: 56px; } .me-baby-facts b { font-size: calc(13px * var(--fs, 1)); } #me .me-stats strong { font-size: calc(18px * var(--fs, 1)); } .me-mini-body { grid-template-columns: 30px minmax(0, 1fr); } #me .me-mini-icon { width: 30px; height: 30px; } #me .me-mini { padding: 12px; } .me-mini-body { gap: 6px; } .me-mini-body strong { font-size: calc(14px * var(--fs, 1)); letter-spacing: -0.02em; } }

/* 首页宽卡（page-layout.js 的 applyHomeLayout 加 .wide：用户拉宽的、或落单的小卡）：左边大数字和几行小字，右边放大的图或清单 */
.home-cards [data-home-card].wide { grid-column: 1 / -1; }
.home-cards .wide-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 14px; align-items: end; }
@media (max-width: 350px) { .home-cards .wide-body { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 10px; } .home-cards .bar-days .wide-only { display: none; } }
.home-cards .wide-left { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.home-cards .wide-left .trend-foot, .home-cards .wide-left .home-note { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.home-cards .wide-right { display: block; min-width: 0; }
.home-cards .wide-right .trend-mini { height: 68px; margin: 0; }
.home-cards .wide-right > svg { display: block; width: 100%; }
.home-cards .bar-days { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); margin-top: 3px; color: var(--muted); font-size: calc(10px * var(--fs, 1)); text-align: center; }
.home-cards .bar-days i { font-style: normal; white-space: nowrap; }
.home-cards .bar-days.spark-days { grid-auto-columns: auto; justify-content: space-between; }
.home-cards .wide-spark { display: block; width: 100%; height: 62px; }
.home-cards .wide-list { display: grid; gap: 5px; font-size: calc(13px * var(--fs, 1)); }
.home-cards .wide-list > span { display: flex; justify-content: space-between; gap: 8px; min-width: 0; padding-bottom: 5px; border-bottom: 0.5px solid var(--sep); }
.home-cards .wide-list > span:last-child { padding-bottom: 0; border: 0; }
.home-cards .wide-list b { min-width: 0; overflow: hidden; font-weight: 500; white-space: nowrap; text-overflow: ellipsis; }
.home-cards .wide-list small { flex: none; color: var(--muted); font-size: calc(12px * var(--fs, 1)); }
.home-cards .wide-list .done b, .home-cards .wide-list .ok small { color: #23744b; }
.home-cards .wide-list .warn small, .home-cards .wide-list .low small, .home-cards .wide-list .high small { color: #a35418; }
.home-cards .wide-list .muted b { color: var(--muted); }
.home-cards .wide-empty { color: var(--muted); font-size: calc(12px * var(--fs, 1)); }
.home-cards .trend-foot.accent { color: var(--c); font-weight: 500; }
.home-cards .moment-strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.home-cards .moment-cell { display: grid; gap: 2px; min-width: 0; }
.home-cards .moment-cell .moment-thumb { width: 100%; height: auto; aspect-ratio: 1; }
.home-cards .moment-cell strong { overflow: hidden; font-size: calc(13px * var(--fs, 1)); white-space: nowrap; text-overflow: ellipsis; }
.home-cards .moment-cell small { color: var(--muted); font-size: calc(11px * var(--fs, 1)); }

/* ---- 首页编辑模式（features/home-edit.js，照 iPhone 桌面小组件）：卡片轻轻晃，左上角 −，右下角弧形把手 ---- */
.home-cards [data-home-card] { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
.top-actions .home-edit-done { min-width: 0; height: 32px; min-height: 32px; box-shadow: none; padding: 0 16px; border: 0; border-radius: 999px; background: var(--ios-blue); color: #fff; font: inherit; font-size: calc(15px * var(--fs, 1)); font-weight: 600; cursor: pointer; }
.home-edit-hint { margin: 10px 0 0; color: var(--muted); font-size: calc(12px * var(--fs, 1)); text-align: center; }
.home-cards.editing { position: relative; }
.home-cards.editing [data-home-card] { position: relative; touch-action: none; cursor: grab; animation: home-jiggle 0.26s ease-in-out infinite alternate; }
.home-cards.editing [data-home-card]:nth-child(2n) { animation-delay: -0.13s; }
.home-cards.editing [data-home-card].wide, .home-cards.editing .milk-hero, .home-cards.editing .home-clock, .home-cards.editing .upcoming-section { animation-name: home-jiggle-wide; }
.home-cards.editing [data-home-card] > :not(.edit-minus):not(.edit-grip) { pointer-events: none; }
.home-cards.editing button.home-card:active { transform: none; }
.home-cards.editing .upcoming-section .section-heading { padding-left: 24px; } /* 近期安排的标题在卡片外面，给左上角 − 让位 */
.home-cards [data-home-card].dragging { z-index: 2; scale: 1.04; animation: none; box-shadow: 0 18px 40px rgba(0, 0, 0, 0.22); cursor: grabbing; }
@keyframes home-jiggle { from { rotate: -1deg; } to { rotate: 1deg; } }
@keyframes home-jiggle-wide { from { rotate: -0.4deg; } to { rotate: 0.4deg; } }
@media (prefers-reduced-motion: reduce) { .home-cards.editing [data-home-card] { animation: none; } }
.edit-minus { position: absolute; z-index: 1; top: -7px; left: -7px; width: 24px; height: 24px; border-radius: 50%; background: #d1d1d6; color: #1c1c1e; font-size: calc(20px * var(--fs, 1)); font-weight: 600; line-height: 22px; text-align: center; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2); cursor: pointer; }
.edit-grip { position: absolute; z-index: 1; right: -6px; bottom: -6px; width: 40px; height: 40px; touch-action: none; cursor: nwse-resize; }
.edit-grip svg { position: absolute; inset: 0; width: 40px; height: 40px; overflow: visible; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.25)); }
.edit-grip path { fill: none; stroke: #48484a; stroke-width: 7; stroke-linecap: round; }
.edit-ghost { position: absolute; z-index: 3; display: flex; align-items: flex-end; justify-content: flex-end; box-sizing: border-box; padding: 8px 12px; border: 2px solid var(--ios-blue); border-radius: var(--card-radius); background: rgba(0, 122, 255, 0.08); color: var(--ios-blue); font-size: calc(12px * var(--fs, 1)); font-weight: 500; pointer-events: none; }
.home-edit-tray { display: grid; gap: 8px; margin-top: 16px; }
.home-edit-tray p { margin: 0; color: var(--muted); font-size: calc(12px * var(--fs, 1)); }
.home-edit-off { display: flex; flex-wrap: wrap; gap: 8px; }
.home-edit-off button { min-height: 32px; padding: 0 12px; border: 0; border-radius: 999px; background: var(--surface); color: var(--text); font: inherit; font-size: calc(13px * var(--fs, 1)); box-shadow: var(--card-shadow); cursor: pointer; }
.home-edit-none { color: var(--muted); font-size: calc(12px * var(--fs, 1)); }

/* 尿布照片（v119，features/diaper-photo.js）：填写页一行“照片 ＋ 添加 / 小图 更换 移除”；记录卡片右边一张小图，点了看原图 */
.feed-form .feed-photo-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 58px; padding: 10px 0; border-bottom: 1px solid var(--line); color: var(--muted); font-size: calc(18px * var(--fs, 1)); font-weight: 500; }
.feed-form .feed-photo-row[hidden] { display: none; }
.feed-form .feed-photo-row label.feed-photo-add, .feed-form .feed-photo-row .feed-photo-tool { display: inline-flex; align-items: center; min-height: 34px; padding: 0 14px; border: 0; border-radius: 999px; background: var(--fill); color: var(--ios-blue); font: inherit; font-size: calc(14px * var(--fs, 1)); font-weight: 500; cursor: pointer; }
.feed-form .feed-photo-row .feed-photo-tool { padding: 0 11px; }
.feed-form .feed-photo-row button.feed-photo-tool { color: var(--muted); }
.feed-form .feed-photo-row label.feed-photo-add[hidden], .feed-form .feed-photo-preview[hidden] { display: none; }
.feed-form .feed-photo-preview { display: flex; align-items: center; gap: 6px; }
.feed-form .feed-photo-zoom { flex: none; padding: 0; border: 0; background: none; cursor: zoom-in; }
.feed-form .feed-photo-preview img { width: 52px; height: 52px; margin-right: 4px; border-radius: 10px; object-fit: cover; background: var(--fill); }
.timeline .with-photo .swipe-content { padding-right: 70px; }
.timeline .feed-photo-thumb { position: absolute; top: 50%; right: 12px; display: grid; place-items: center; width: 48px; height: 48px; padding: 0; border: 0; border-radius: 10px; overflow: hidden; background: var(--fill); transform: translateY(-50%); cursor: zoom-in; }
.timeline .feed-photo-thumb img { grid-area: 1 / 1; display: block; width: 100%; height: 100%; object-fit: cover; }
.timeline .feed-photo-thumb img:not([src]) { visibility: hidden; }
.timeline .feed-photo-thumb i { grid-area: 1 / 1; font-size: calc(18px * var(--fs, 1)); font-style: normal; }
.timeline .feed-photo-thumb img[src] + i { display: none; }
.timeline .feed-photo-thumb.missing img { display: none; }
.timeline .feed-photo-thumb.missing i { display: block; }

/* “我的 → 存储空间”（v120，features/storage.js，照交互图）：分组小标题 + 白卡片；组成条、分类列表、走势图、备份圆环、快照柱子、能用多久、建议 */
.storage-page { --st-feed: #3b8fc6; --st-other: #2a8c8c; --st-avatar: #7a6bd6; --st-photo: #c27c0e; --st-sys: #aeaeb2; display: grid; gap: 6px; padding-bottom: 16px; }
.storage-page .st-label { margin: 16px 0 0 16px; color: var(--muted); font-size: calc(13px * var(--fs, 1)); }
.storage-page .st-label:first-child { margin-top: 0; }
.storage-page .st-card { position: relative; padding: 16px; border-radius: 14px; background: var(--surface); box-shadow: var(--card-shadow); }
.storage-page .st-foot { margin: 2px 16px 0; color: var(--muted); font-size: calc(12px * var(--fs, 1)); line-height: 1.5; }
.storage-page .st-foot-in { margin: 10px 0 0; }
.storage-page .st-loading { padding: 40px 16px; color: var(--muted); text-align: center; }
.storage-page .st-hero-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.storage-page .st-hero-top h3 { margin: 0; font-size: calc(17px * var(--fs, 1)); font-weight: 600; }
.storage-page .st-hero-top span { color: var(--muted); font-size: calc(13px * var(--fs, 1)); }
.storage-page .st-used { margin: 6px 0 10px; font-size: calc(34px * var(--fs, 1)); font-weight: 600; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.storage-page .st-used small { margin-left: 4px; color: var(--muted); font-size: calc(15px * var(--fs, 1)); font-weight: 500; }
.storage-page .st-stack { display: flex; gap: 2px; height: 22px; overflow: hidden; border-radius: 6px; background: var(--fill); }
.storage-page .st-stack i { display: block; height: 100%; transition: opacity 0.2s; }
.storage-page .st-stack.dim i { opacity: 0.3; }
.storage-page .st-stack.dim i.on { opacity: 1; }
.storage-page .st-quota { display: flex; align-items: center; gap: 10px; margin-top: 14px; color: var(--muted); font-size: calc(12px * var(--fs, 1)); font-variant-numeric: tabular-nums; }
.storage-page .st-track { position: relative; flex: 1; height: 6px; border-radius: 3px; background: var(--fill); }
.storage-page .st-track i { position: absolute; top: -3px; width: 12px; height: 12px; margin-left: -6px; border-radius: 50%; background: var(--ios-green); box-shadow: 0 0 0 3px rgba(52, 199, 89, 0.25); }
.storage-page .st-list { margin-top: 6px; overflow: hidden; border-radius: 14px; background: var(--surface); box-shadow: var(--card-shadow); }
.storage-page .st-row, .storage-page .st-tip { position: relative; display: grid; grid-template-columns: 30px minmax(0, 1fr) auto 14px; align-items: center; gap: 12px; width: 100%; padding: 11px 14px 11px 16px; border: 0; background: none; color: inherit; font: inherit; text-align: left; }
.storage-page .st-row { cursor: pointer; }
.storage-page .st-row:disabled { cursor: default; color: inherit; opacity: 1; }
.storage-page .st-row:not(:disabled):active, .storage-page button.st-tip:active { background: var(--fill-press); }
.storage-page .st-tip { grid-template-columns: 30px minmax(0, 1fr) auto; padding: 12px 14px 12px 16px; }
.storage-page button.st-tip { cursor: pointer; }
.storage-page .st-row + .st-row::before, .storage-page .st-detail + .st-row::before, .storage-page .st-tip + .st-tip::before { content: ""; position: absolute; top: 0; right: 0; left: 58px; height: 0.5px; background: var(--sep); }
.storage-page .st-ic { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; font-size: calc(16px * var(--fs, 1)); }
.storage-page .st-tip-ic { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--fill); font-size: calc(15px * var(--fs, 1)); }
.storage-page .st-row-text { min-width: 0; }
.storage-page .st-row-text b { display: block; font-size: calc(16px * var(--fs, 1)); font-weight: 500; }
.storage-page .st-tip .st-row-text b { font-size: calc(15px * var(--fs, 1)); }
.storage-page .st-row-text small { display: block; margin-top: 1px; color: var(--muted); font-size: calc(12.5px * var(--fs, 1)); line-height: 1.45; }
.storage-page .st-row .st-row-text small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.storage-page .st-size { color: var(--muted); font-size: calc(15px * var(--fs, 1)); font-variant-numeric: tabular-nums; white-space: nowrap; }
.storage-page .st-chev { color: var(--muted); font-size: calc(14px * var(--fs, 1)); transition: transform 0.2s; }
.storage-page .st-row[aria-expanded="true"] .st-chev { transform: rotate(90deg); }
.storage-page .st-detail { display: grid; gap: 6px; padding: 0 16px 12px 58px; font-size: calc(13px * var(--fs, 1)); }
.storage-page .st-detail[hidden] { display: none; }
.storage-page .st-detail div { display: grid; grid-template-columns: 76px minmax(0, 1fr) auto; align-items: center; gap: 8px; }
.storage-page .st-detail div span:nth-child(2) { height: 6px; overflow: hidden; border-radius: 3px; background: var(--fill); }
.storage-page .st-detail em { display: block; height: 100%; border-radius: 3px; }
.storage-page .st-detail div span:last-child { color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }
.storage-page .st-seg { display: flex; margin-bottom: 12px; padding: 2px; border-radius: 9px; background: var(--fill); }
.storage-page .st-seg button { flex: 1; padding: 6px 0; border: 0; border-radius: 7px; background: transparent; color: var(--text); font: inherit; font-size: calc(13px * var(--fs, 1)); font-weight: 500; cursor: pointer; }
.storage-page .st-seg button[aria-pressed="true"] { background: var(--surface); box-shadow: var(--thumb-shadow); font-weight: 500; }
.storage-page .st-chart-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.storage-page .st-chart-head strong { font-size: calc(22px * var(--fs, 1)); font-weight: 600; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.storage-page .st-chart-head span { color: var(--muted); font-size: calc(12px * var(--fs, 1)); text-align: right; }
.storage-page .st-chart { display: block; width: 100%; height: 150px; touch-action: pan-y; }
.storage-page .st-axis { display: flex; justify-content: space-between; gap: 6px; margin-top: 4px; color: var(--muted); font-size: calc(11px * var(--fs, 1)); }
.storage-page .st-empty { display: grid; place-items: center; height: 120px; border-radius: 10px; background: var(--fill); color: var(--muted); font-size: calc(13px * var(--fs, 1)); text-align: center; padding: 0 16px; }
.storage-page .st-tooltip { position: absolute; padding: 4px 7px; border-radius: 6px; background: var(--text); color: var(--surface); font-size: calc(11.5px * var(--fs, 1)); white-space: nowrap; transform: translate(-50%, -100%); pointer-events: none; }
.storage-page .st-backup { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 16px; }
.storage-page .st-ring { width: 96px; height: 96px; }
.storage-page .st-kv { display: grid; gap: 6px; font-size: calc(14px * var(--fs, 1)); }
.storage-page .st-kv div { display: flex; justify-content: space-between; gap: 8px; }
.storage-page .st-kv span { color: var(--muted); }
.storage-page .st-kv div span + span { font-size: calc(12px * var(--fs, 1)); text-align: right; }
.storage-page .st-kv b { font-weight: 500; font-variant-numeric: tabular-nums; white-space: nowrap; }
.storage-page .st-ok { color: var(--ios-green); }
.storage-page .st-bad { color: #ff3b30; }
.storage-page .st-snap { display: flex; align-items: flex-end; justify-content: flex-end; gap: 2px; height: 44px; margin-top: 14px; }
.storage-page .st-snap i { flex: 1; max-width: 14px; border-radius: 2px 2px 0 0; background: rgba(59, 143, 198, 0.5); }
.storage-page .st-snap i:last-child { background: var(--st-feed); }
.storage-page .st-years { display: flex; gap: 10px; margin: 4px 0 14px; }
.storage-page .st-years div { flex: 1; padding: 10px 12px; border-radius: 12px; background: var(--fill); }
.storage-page .st-years small { display: block; color: var(--muted); font-size: calc(12px * var(--fs, 1)); }
.storage-page .st-years strong { font-size: calc(24px * var(--fs, 1)); font-weight: 600; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.storage-page .st-years strong small { display: inline; margin-left: 2px; font-size: calc(13px * var(--fs, 1)); font-weight: 500; }
.storage-page .st-slider-label { display: flex; justify-content: space-between; margin-bottom: 6px; font-size: calc(14px * var(--fs, 1)); }
.storage-page .st-slider-label b { color: var(--st-photo); }
.storage-page input[type="range"] { width: 100%; accent-color: var(--st-photo); }
.storage-page .st-ticks { display: flex; justify-content: space-between; color: var(--muted); font-size: calc(11px * var(--fs, 1)); }
.storage-page .st-pill { padding: 3px 8px; border-radius: 999px; font-size: calc(11.5px * var(--fs, 1)); font-weight: 500; white-space: nowrap; }
.storage-page .st-pill.fine { background: rgba(52, 199, 89, 0.14); color: #248a3d; }
.storage-page .st-pill.warn { background: rgba(255, 149, 0, 0.16); color: #c76a00; }
.storage-page .st-updated { margin-top: 10px; text-align: center; }

/* 看大图手势（v122，ui/photo-zoom.js）：整层不让浏览器自己滚动缩放，图片按 transform 放大、拖动 */
.photo-viewer { touch-action: none; overflow: hidden; }
.photo-viewer img { transform-origin: center center; will-change: transform; user-select: none; -webkit-user-select: none; -webkit-user-drag: none; }
.photo-viewer.zoomed { cursor: grab; }
.photo-viewer-close { z-index: 1; }

/* 滚动容器的上内边距会把吸顶位置往下推，记录页把安全区内边距交给顶栏。 */
.app-shell:has(> #feeding.active) { padding-top: 0; }
.app-shell:has(> #feeding.active) > .topbar { padding-top: env(safe-area-inset-top); }
/* 类别栏贴着滚动区顶边，背景延伸到状态栏；天数选择随统计卡滚动。 */
#feeding .feed-top {
  position: sticky;
  top: 0;
  z-index: 5;
  margin: 0 -16px;
  padding: calc(env(safe-area-inset-top) + 4px) 16px 8px;
  background: var(--bg);
}
#feeding .feed-top .feed-filter { margin: 0; }
#feeding .feed-range { display: flex; margin: 10px 0 0; }
#feeding .feed-range[hidden] { display: none; }
#feeding .feed-range button { flex: 1; min-height: 30px; font-size: calc(13px * var(--fs, 1)); }
#feeding .feeding-overview { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 8px; }
#feeding .feeding-overview[hidden] { display: none; }
#feeding .milk-stats, #feeding .milk-chart { margin-top: 12px; }
#feeding .milk-chart[hidden], #feeding .milk-stats[hidden] { display: none; }
#feeding .milk-chart-head .trend-kinds { width: 128px; margin: 0; }
#feeding .milk-chart-head .trend-kinds[hidden] { display: none; }

/* ---- 字重（v126，用户 2026-11-21 看过“现在 / 建议”对比效果图后确认）：iPhone 上中文（苹方）最粗只到“中粗”，
   原来处处 700–850 看起来一样粗、分不出主次。现在只用三档：400 常规（多数文字）、500 中等（卡片标题、时间、标签）、
   600 半粗（只给首页大数字、页面标题、主按钮）；层次靠字号和颜色。新写的样式不要再用 700 以上（见 AGENTS.md）。 ---- */
b, strong { font-weight: 500; }
h1, h2, h3, h4 { font-weight: 600; }
/* 记录卡片：左边时间小一号、中等；标题 17 中等；明细 14 灰；日期分组改成灰色小标题；右上角时间段常规 */
.timeline .timeline-time span { font-size: calc(15px * var(--fs, 1)); font-weight: 500; }
.timeline strong { font-size: calc(17px * var(--fs, 1)); font-weight: 500; }
.timeline .record-meta { font-size: calc(14px * var(--fs, 1)); color: var(--muted); }
.day-heading { font-size: calc(13px * var(--fs, 1)); font-weight: 500; color: var(--muted); }
.day-heading small { font-size: calc(13px * var(--fs, 1)); font-weight: 400; }
.timeline .feed-span, .timeline .feed-span small { font-weight: 400; }
/* 筛选条、分段控件：常规，选中的半粗 */
.feed-filter button, .health-filter button, .monitor-filter button, .segmented span, .chart-tabs button, .library-tabs button, .guide-views button { font-weight: 400; }
.feed-filter button[aria-selected="true"], .health-filter button[aria-selected="true"], .monitor-filter button[aria-selected="true"], .segmented input:checked + span,
.chart-tabs button[aria-selected="true"], .library-tabs button[aria-selected="true"], .guide-views button[aria-selected="true"] { font-weight: 600; }
/* 填写页：左边的“日期 / 开始时间 …”改成黑色常规字（照 iPhone 设置），胶囊、滚轮数字常规 */
.feed-form label, .choice-row, .choice-block, .med-dose-row, .feed-form .feed-photo-row, .feed-form .check-row, #milestone-form .milestone-label { color: var(--text); font-size: calc(17px * var(--fs, 1)); font-weight: 400; }
.feed-form .wheel-col button { font-weight: 400; }
.feed-form .wheel-col button.current { font-weight: 500; }
.chip-library button, .chip-library button[aria-pressed="true"], .feed-form .chip-group span { font-weight: 400; }

/* ---- 提醒（v127，features/notify.js）：首页顶上的提醒条、“我的 → 提醒” ---- */
.notify-banner { display: grid; gap: 10px; margin-top: 10px; padding: 14px; border-radius: var(--card-radius); background: #e8f2fa; }
.notify-banner[hidden] { display: none; }
.notify-banner-head { display: flex; align-items: flex-start; gap: 10px; }
.notify-bell { display: grid; place-items: center; flex: none; width: 30px; height: 30px; border-radius: 9px; background: #2f80c0; color: #fff; }
.notify-bell svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.notify-banner-text { display: grid; gap: 2px; flex: 1; min-width: 0; }
.notify-banner-text b { font-size: calc(16px * var(--fs, 1)); font-weight: 500; }
.notify-banner-text small { color: #3c5a73; font-size: calc(13px * var(--fs, 1)); }
.notify-close { flex: none; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 50%; background: rgba(47, 128, 192, 0.12); color: #2f6f99; font: inherit; font-size: calc(15px * var(--fs, 1)); cursor: pointer; }
.notify-actions { display: flex; gap: 8px; }
.notify-actions button { flex: 1; min-height: 44px; border: 0; border-radius: 12px; background: #fff; color: #1f6a9e; font: inherit; font-size: calc(15px * var(--fs, 1)); font-weight: 500; cursor: pointer; }
.me-group .notify-item { grid-template-columns: minmax(0, 1fr) auto; min-height: 58px; padding-top: 10px; padding-bottom: 10px; }
#notify-targets .me-list-row { grid-template-columns: minmax(0, 1fr) auto; }
.me-group .notify-night-row { grid-template-columns: minmax(0, 1fr); }
.me-group .notify-item .me-label, #notify-targets .me-label { display: grid; gap: 2px; }
.me-group .notify-item small, .notify-tail { color: var(--muted); font-size: calc(12px * var(--fs, 1)); font-weight: 400; }
.notify-level-group { padding: 10px 14px; }
.notify-level-group .library-tabs { margin-top: 0; }
.notify-preview { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 10px; margin-top: 10px; padding: 11px 13px; border-radius: 18px; background: #20303f; color: #1c1c1e; }
.notify-preview > span:last-child { display: grid; gap: 2px; padding: 0; }
.notify-preview::before { content: none; }
.notify-preview-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 8px; background: #3fa88a; color: #fff; font-size: calc(18px * var(--fs, 1)); font-weight: 600; }
.notify-preview b { color: #fff; font-size: calc(14px * var(--fs, 1)); font-weight: 600; }
.notify-preview small { color: rgba(255, 255, 255, 0.85); font-size: calc(14px * var(--fs, 1)); }
.notify-status { min-height: 0; }
.notify-status:empty { display: none; }
.notify-status.bad { color: #b3261e; }

/* iPhone 的日期、时间框有自带的最小宽度，会把这一行撑出卡片（v124 用药页截图里日期伸到屏幕外） */
.feed-form input[type="date"], .feed-form input[type="time"] { min-width: 0; max-width: 100%; box-sizing: border-box; -webkit-appearance: none; appearance: none; }
.feed-form input[type="date"]::-webkit-date-and-time-value, .feed-form input[type="time"]::-webkit-date-and-time-value { text-align: right; }

/* ---- 文字大小（v129，“我的”外观下面；theme-boot.js 设 --fs）：所有字号都是 calc(Npx * var(--fs, 1))。
   选“小”时跟着外层字号走的输入框会小于 16 号，iPhone 一点输入框就自动放大页面，所以“小”这一档输入框兜底 16 号。 ---- */
html[data-font-size="small"] :is(input, select, textarea) { font-size: max(16px, 1em); }
/* “文字大小”一行：标题在上、四档按钮在下占满整行（特大时放在标题右边会挤成两行字） */
.me-group .font-row { grid-template-columns: 32px minmax(0, 1fr); row-gap: 8px; padding-top: 10px; padding-bottom: 12px; }
.me-group .font-row .font-toggle { grid-column: 1 / -1; width: 100%; }
.theme-toggle button { white-space: nowrap; }
