/* 后加功能：线条图标、左滑卡片、右下角「＋」、头像照片、宝宝资料、生长曲线、记录菜单、新版本提示、喂养选项。
   样式按原 styles.css 的顺序拆成 base → home → components → forms → features，index.html 按这个顺序加载；后面的覆盖前面的，调整时不要打乱顺序。 */

/* 体检复用疫苗表单，以现有蓝色区分。 */
.checkup-form .feed-hero { background: var(--blue); }
.nav-growth, .nav-health, .nav-records { border-radius: 50%; font-size: calc(16px * var(--fs, 1)); }
.nav-records { background: #e3efff; color: #3979a5; }
.nav-growth { background: #e2f4ea; color: #287351; }
.nav-health { background: #ffe1ed; color: #ac5269; }
/* 疫苗、体检、体型的线条图标（针筒、听诊器、尺子，线条取自 Lucide，ISC 许可）。用遮罩绘制，颜色跟随 currentColor。 */
.icon-syringe::before,
.icon-stethoscope::before,
.icon-ruler::before,
.icon-heart::before,
.icon-list::before {
  content: "";
  display: block;
  width: 62%;
  height: 62%;
  background: currentColor;
  -webkit-mask: var(--icon) center / contain no-repeat;
  mask: var(--icon) center / contain no-repeat;
}
.icon-syringe { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m18 2 4 4'/%3E%3Cpath d='m17 7 3-3'/%3E%3Cpath d='M19 9 8.7 19.3c-.9.9-2.5.9-3.4 0l-.6-.6c-.9-.9-.9-2.5 0-3.4L15 5'/%3E%3Cpath d='m9 11 4 4'/%3E%3Cpath d='m5 19-3 3'/%3E%3Cpath d='m14 4 6 6'/%3E%3C/svg%3E"); }
.icon-stethoscope { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M11 2v2'/%3E%3Cpath d='M5 2v2'/%3E%3Cpath d='M5 3H4a2 2 0 0 0-2 2v4a6 6 0 0 0 12 0V5a2 2 0 0 0-2-2h-1'/%3E%3Cpath d='M8 15a6 6 0 0 0 12 0v-3'/%3E%3Ccircle cx='20' cy='10' r='2'/%3E%3C/svg%3E"); }
.icon-ruler { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21.3 15.3a2.4 2.4 0 0 1 0 3.4l-2.6 2.6a2.4 2.4 0 0 1-3.4 0L2.7 8.7a2.41 2.41 0 0 1 0-3.4l2.6-2.6a2.41 2.41 0 0 1 3.4 0Z'/%3E%3Cpath d='m14.5 12.5 2-2'/%3E%3Cpath d='m11.5 9.5 2-2'/%3E%3Cpath d='m8.5 6.5 2-2'/%3E%3Cpath d='m17.5 15.5 2-2'/%3E%3C/svg%3E"); }
.icon-heart { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z'/%3E%3Cpath d='M3.22 12H9.5l.5-1 2 4.5 2-7 1.5 3.5h5.27'/%3E%3C/svg%3E"); }
.icon-list { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect width='8' height='4' x='8' y='2' rx='1'/%3E%3Cpath d='M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2'/%3E%3Cpath d='M12 11h4'/%3E%3Cpath d='M12 16h4'/%3E%3Cpath d='M8 11h.01'/%3E%3Cpath d='M8 16h.01'/%3E%3C/svg%3E"); }
.feed-hero.icon-syringe::before, .feed-hero.icon-stethoscope::before { width: 50%; height: 50%; }
#vaccine-form .feed-hero, #checkup-form .feed-hero { color: #fff; }
.record-icon.vaccine-mark, .upcoming-icon.vaccine-mark { background: #ffe1ed; color: #ac5269; }
.record-icon.checkup-mark, .upcoming-icon.checkup-mark { background: #e3efff; color: #3979a5; }
.record-icon.clinic-icon, .upcoming-icon.clinic-icon, .feed-type-icon.clinic-icon { background: #fdecec; }
.timeline .clinic-tag { display: inline-block; margin-left: 6px; padding: 0 7px; border-radius: 999px; background: #fdecec; color: #a8322b; font-size: calc(11px * var(--fs, 1)); font-weight: 500; line-height: 1.7; vertical-align: 2px; }
#checkup-category-row, .checkup-form #hospital-chips { margin: 0; }
.checkup-form #hospital-chips { padding: 8px 0 12px; border-bottom: 1px solid var(--line); }
.checkup-form #hospital-chips[hidden] { display: none; }
.module-mark { display: grid; place-items: center; color: #fff; }
.report-section { margin-top: 18px; }
.report-section h3 { font-size: calc(15px * var(--fs, 1)); }
.report-list { display: grid; gap: 8px; margin-top: 10px; }
.report-row { display: flex; align-items: center; gap: 8px; min-width: 0; }
.report-row span { flex: 1; min-width: 0; overflow-wrap: anywhere; font-size: calc(12px * var(--fs, 1)); font-weight: 500; }
.report-row button, .report-list > button {
  border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px;
  background: var(--surface-soft); color: #3979a5; font: inherit; font-size: calc(12px * var(--fs, 1));
  min-height: 36px; text-align: left; overflow-wrap: anywhere;
}
.checkup-form .report-picker { display: block; border: 0; margin-top: 12px; }
.report-picker span { display: block; margin-bottom: 8px; font-size: calc(13px * var(--fs, 1)); }
.report-picker input { padding: 10px 0; text-align: left; font-size: calc(13px * var(--fs, 1)); }
.checkup-card .record-meta { white-space: pre-wrap; }
.checkup-card .overdue { color: #ac5269; }
button:disabled { opacity: 0.6; cursor: wait; }
#backup-status { font-size: calc(14px * var(--fs, 1)); overflow-wrap: anywhere; }
.backup-download { display: inline-block; margin: 0 12px 0 0; padding: 12px 0; border: 0; background: none; color: #2f6f99; font: inherit; font-weight: 500; text-decoration: underline; }
.backup-download[hidden] { display: none; }
.me-backup-hint { margin: 8px 4px 0; color: var(--muted); font-size: calc(12px * var(--fs, 1)); line-height: 1.6; }

/* 记录左滑操作：外层保留时间线圆点和竖线，仅 .swipe-content 滑动。 */
.timeline-card.action-card { min-height: 0; padding: 0; background: none; box-shadow: none; }
.swipe-clip { position: relative; overflow: hidden; border-radius: 12px; background: #fff; box-shadow: 0 10px 24px rgba(85, 148, 182, 0.12); }
.swipe-content { position: relative; min-height: 70px; padding: 14px 14px 14px 42px; background: #fff; touch-action: pan-y; cursor: pointer; transition: transform 0.2s ease; }
.swipe-content:focus-visible { outline: 2px solid #3979a5; outline-offset: -2px; border-radius: 12px; }
.swipe-clip.dragging .swipe-content { transition: none; cursor: grabbing; user-select: none; -webkit-user-select: none; }
.swipe-actions { position: absolute; top: 0; right: 0; bottom: 0; display: flex; width: 72px; visibility: hidden; transition: visibility 0s linear 0.2s; }
.swipe-clip.revealed .swipe-actions { visibility: visible; transition-delay: 0s; }
.swipe-actions button { flex: 1; min-width: 0; border: 0; border-radius: 0; color: #fff; font: inherit; font-size: calc(14px * var(--fs, 1)); font-weight: 500; }
.swipe-delete { background: #d64545; }
.swipe-actions button:focus-visible { outline: 2px solid #fff; outline-offset: -4px; }
@media (prefers-reduced-motion: reduce) { .swipe-content, .swipe-actions { transition: none; } }
.feed-sheet { touch-action: pan-y; }
.feed-sheet > form { transition: transform 0.18s ease; }
.swipe-back-dragging { transition: none !important; user-select: none; -webkit-user-select: none; }
@media (prefers-reduced-motion: reduce) { .feed-sheet > form { transition: none; } }
.feed-sheet .save-feed.incomplete { background: #c3d0da; }
/* 日常记录按钮长按拖动排序（reorder.js） */
.feed-type-grid button, .care-type-grid button { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
.feed-type-grid button.dragging, .care-type-grid button.dragging { position: relative; z-index: 2; box-shadow: 0 16px 30px rgba(86, 151, 187, 0.3); }
/* 底部中间「＋」：突出的圆形按钮，任何页面都能打开记录菜单（navigation.js）。 */
.bottom-nav .nav-add {
  align-self: start;
  justify-self: center;
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  min-height: 0;
  margin-top: -20px;
  padding: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, #58a9d4, #76c7e8);
  color: #fff;
  box-shadow: 0 10px 22px rgba(57, 121, 165, 0.34);
}
.bottom-nav .nav-add svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; }
.bottom-nav .nav-add:active { transform: scale(0.94); }
.bottom-nav .nav-add[aria-expanded="true"] svg { transform: rotate(45deg); }
.bottom-nav .nav-add svg { transition: transform 0.18s ease; }
/* 宝宝头像：有照片时铺满圆形（avatar.js） */
.profile-button.has-photo, .avatar.has-photo { background: center / cover no-repeat; color: transparent; }
#avatar-status, .avatar-error { margin: 0; color: #c0504d; font-size: calc(13px * var(--fs, 1)); }
/* 宝宝资料（我的页） */
/* 生长曲线（growth-chart.js）：宝宝的线用通过色彩检查的 #2f80c0，参考线和区间用灰蓝 */
.growth-chart { margin: 14px 0 10px; padding: 12px 12px 10px; border-radius: 12px; background: var(--surface); box-shadow: 0 10px 24px rgba(85, 148, 182, 0.1); }
.chart-tabs { display: flex; gap: 4px; padding: 3px; margin-bottom: 8px; border-radius: 10px; background: #eef5fa; }
.chart-tabs button { flex: 1; min-height: 34px; border: 0; border-radius: 8px; background: none; color: var(--muted); font: inherit; font-size: calc(14px * var(--fs, 1)); font-weight: 500; }
.chart-tabs button[aria-selected="true"] { background: #fff; color: var(--text); box-shadow: 0 2px 6px rgba(57, 121, 165, 0.15); }
.growth-svg { display: block; width: 100%; height: auto; overflow: visible; touch-action: pan-y; -webkit-user-select: none; user-select: none; }
/* 双指缩放（chart.js）：svg 里的图形都不接收触摸，手势由 svg 本身处理，点测量点按位置找最近的点 */
.growth-svg *, .zoom-svg * { pointer-events: none; }
.growth-zoom-bar, .chart-zoom-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 26px; margin: 0 2px 2px; }
.growth-zoom-hint, .chart-zoom-hint { color: var(--muted); font-size: calc(12px * var(--fs, 1)); }
.growth-zoom-reset, .chart-zoom-reset { min-height: 26px; padding: 2px 12px; border: 0; border-radius: 999px; background: #e3f0f8; color: #2f6f99; font: inherit; font-size: calc(12px * var(--fs, 1)); font-weight: 500; cursor: pointer; }
.growth-zoom-reset[hidden], .chart-zoom-reset[hidden] { display: none; }
.growth-svg .grid { stroke: #edf2f6; stroke-width: 1; }
.growth-svg .tick, .growth-svg .ref-label { fill: var(--muted); font-size: calc(10px * var(--fs, 1)); }
.growth-svg .band-outer { fill: #eef5fa; }
.growth-svg .band-inner { fill: #dcebf5; }
.growth-svg .ref-line { fill: none; stroke: #b8c6d1; stroke-width: 1; stroke-dasharray: 3 3; }
.growth-svg .ref-median { fill: none; stroke: #8fa1ae; stroke-width: 1.5; }
.growth-svg .baby-line { fill: none; stroke: #2f80c0; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.growth-svg .baby-point { fill: #2f80c0; stroke: #fff; stroke-width: 2; }
.growth-svg .hit { fill: transparent; cursor: pointer; }
.chart-summary { margin: 8px 2px 4px; font-size: calc(13px * var(--fs, 1)); line-height: 1.5; color: var(--text); }
.chart-summary strong { font-weight: 500; }
.chart-note { margin: 0 2px; font-size: calc(11px * var(--fs, 1)); line-height: 1.5; color: var(--muted); }
/* 记录页“＋”菜单：底部弹出面板，背后半透明遮罩 */
.record-menu { position: fixed; inset: 0; z-index: 15; }
.record-menu-backdrop { position: absolute; inset: 0; background: rgba(38, 49, 61, 0.28); animation: menu-fade 0.18s ease; }
.record-menu-panel { position: absolute; left: 50%; bottom: 0; width: min(100%, 480px); transform: translateX(-50%); padding: 18px 16px calc(24px + env(safe-area-inset-bottom)); border-radius: 22px 22px 0 0; background: var(--bg); box-shadow: 0 -12px 30px rgba(57, 121, 165, 0.18); animation: menu-up 0.22s ease; }
.record-menu-panel h3 { font-size: calc(17px * var(--fs, 1)); }
.record-menu-hint { margin: 12px 0 0; text-align: center; color: var(--muted); font-size: calc(12px * var(--fs, 1)); }
.record-menu .feed-type-grid button { background: var(--surface); }
.record-menu-head { display: flex; justify-content: space-between; align-items: center; margin: 0 0 14px 4px; }
.record-menu-head h3 { margin: 0; }
.record-menu-close { display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 50%; background: #e3edf4; color: var(--muted); }
.record-menu-close svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; }
@keyframes menu-up { from { transform: translate(-50%, 100%); } }
@keyframes menu-fade { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .record-menu-backdrop, .record-menu-panel { animation: none; } }
/* 全部记录按日期分组 */
.day-group + .day-group { margin-top: 14px; }
.day-group { scroll-margin-top: calc(env(safe-area-inset-top) + 12px); }
.day-group.jumped .day-heading { animation: day-jumped 1.6s ease-out; }
@keyframes day-jumped { 0%, 40% { background: #dceefa; } 100% { background: transparent; } }
.day-group .day-heading { border-radius: 8px; padding: 2px 4px; margin-left: -2px; margin-right: -2px; }
.feed-heading-tools { display: flex; align-items: center; gap: 10px; }
.section-heading .day-jump { position: relative; overflow: hidden; display: inline-flex; align-items: center; gap: 4px; min-height: 32px; padding: 0 10px; border-radius: 16px; background: #e8f2fa; color: #2f6f99; font-size: calc(13px * var(--fs, 1)); font-weight: 500; }
.day-jump svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
/* iOS 的日期输入框不肯缩到按钮那么小，会伸出屏幕右边，整页就能左右拖：按钮裁掉多出的部分，输入框去掉自带外观 */
.day-jump input { position: absolute; inset: 0; width: 100%; min-width: 0; max-width: 100%; height: 100%; margin: 0; padding: 0; border: 0; opacity: 0; font-size: max(16px, calc(16px * var(--fs, 1))); -webkit-appearance: none; appearance: none; }
.feed-jump-note { margin: -2px 2px 8px; color: #2f6f99; font-size: calc(12px * var(--fs, 1)); }
.feed-jump-note:empty { display: none; }
.day-heading { display: flex; justify-content: space-between; align-items: baseline; margin: 0 2px 8px; font-size: calc(14px * var(--fs, 1)); font-weight: 500; color: var(--text); }
.day-heading small { color: var(--muted); font-size: calc(12px * var(--fs, 1)); font-weight: 500; }
/* 新版本提示条：顶部居中的胶囊，点了才刷新（app.js） */
.update-banner { position: fixed; top: calc(10px + env(safe-area-inset-top)); left: 50%; z-index: 40; transform: translateX(-50%); padding: 10px 18px; border: 0; border-radius: 999px; background: var(--text); color: #fff; font: inherit; font-size: calc(14px * var(--fs, 1)); font-weight: 500; white-space: nowrap; box-shadow: 0 10px 24px rgba(38, 49, 61, 0.25); animation: banner-in 0.25s ease; }
.update-banner[hidden] { display: none; }
/* 屏幕中间的短提示（ui/toast.js） */
.toast { position: fixed; top: 42%; left: 50%; z-index: 70; max-width: calc(100% - 48px); margin: 0; padding: 12px 18px; transform: translate(-50%, -50%); border-radius: 14px; background: rgba(29, 40, 51, 0.88); color: #fff; font-size: calc(15px * var(--fs, 1)); font-weight: 500; text-align: center; pointer-events: none; animation: toast-in 0.2s ease; }
.toast.warn { background: rgba(150, 45, 40, 0.92); }
.toast[hidden] { display: none; }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, -40%); } }
@media (prefers-reduced-motion: reduce) { .toast { animation: none; } }
@keyframes banner-in { from { opacity: 0; transform: translate(-50%, -12px); } }
@media (prefers-reduced-motion: reduce) { .update-banner { animation: none; } }
/* 喂养填写页的选项：母乳喂法、尿布状态、臭臭颜色/形状、红屁屁（单选按钮做成胶囊/色块） */
.choice-row, .choice-block { border-bottom: 1px solid var(--line); color: var(--muted); font-size: calc(18px * var(--fs, 1)); font-weight: 500; }
.choice-row { display: grid; grid-template-columns: 112px minmax(0, 1fr); align-items: center; min-height: 58px; }
.choice-row .segmented { justify-self: end; }
.choice-block { display: grid; gap: 10px; padding: 14px 0; }
.choice-row[hidden], .choice-block[hidden] { display: none; }
.feed-form .segmented label, .feed-form .chip-group label, .feed-form .swatch-group label { display: block; min-height: 0; border: 0; grid-template-columns: none; color: inherit; font-size: inherit; }
.feed-form .segmented input, .feed-form .chip-group input, .feed-form .swatch-group input { position: absolute; width: 1px; height: 1px; min-height: 0; opacity: 0; pointer-events: none; }
.segmented { display: inline-flex; padding: 3px; border-radius: 10px; background: #eef4f8; }
.segmented span { display: block; min-width: 56px; padding: 8px 14px; border-radius: 8px; color: var(--muted); font-size: calc(15px * var(--fs, 1)); font-weight: 500; text-align: center; }
.segmented input:checked + span { background: #fff; color: var(--text); box-shadow: 0 2px 6px rgba(57, 121, 165, 0.15); }
.chip-group { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-group span { display: block; padding: 8px 14px; border: 1.5px solid transparent; border-radius: 999px; background: #f1f7fb; color: var(--text); font-size: calc(15px * var(--fs, 1)); font-weight: 500; }
.chip-group.big span { display: grid; justify-items: center; gap: 4px; min-width: 78px; padding: 10px 12px; border-radius: 14px; }
.chip-group.big b { font-size: calc(22px * var(--fs, 1)); font-weight: 400; line-height: 1; }
.chip-group input:checked + span { border-color: var(--blue); background: #e8f4fb; color: #2f80c0; }
.swatch-group { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px 6px; }
.swatch-group label { text-align: center; }
.swatch-group i { display: block; width: 34px; height: 34px; margin: 0 auto 4px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08); }
.feed-form .swatch-group small { position: static; display: block; color: var(--muted); font-size: calc(12px * var(--fs, 1)); font-weight: 500; pointer-events: auto; }
.swatch-group input:checked + i { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--blue); }
.feed-form .swatch-group input:checked ~ small { color: #2f80c0; }
.feed-form .chip-group input:focus-visible + span, .feed-form .segmented input:focus-visible + span, .feed-form .swatch-group input:focus-visible + i { outline: 2px solid #3979a5; outline-offset: 2px; }
/* 母乳亲喂：左右各填分钟数（手动输入） */
.feed-form .side-minutes { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 14px; margin-top: 10px; color: var(--muted); font-size: calc(14px * var(--fs, 1)); }
.feed-form .side-minutes label { display: flex; align-items: center; gap: 6px; margin: 0; padding: 0; border: 0; min-height: 0; }
.feed-form .side-minutes input { width: 64px; min-height: 36px; padding: 4px 8px; border: 1px solid var(--line); border-radius: 8px; text-align: center; font-size: calc(15px * var(--fs, 1)); }
.feed-form #feed-next-side { position: static; margin-left: 6px; color: #b24a63; font-size: calc(12px * var(--fs, 1)); font-weight: 500; }

/* 备份异常提醒（backup-ui.js）：超过 36 小时没有成功的云端备份时，首页顶部一条红色提示，头像右上角红点 */
.backup-alert { display: block; width: 100%; margin-top: 10px; padding: 10px 14px; border: 0; border-radius: 12px; background: #fdecec; color: #b3261e; font: inherit; font-size: calc(14px * var(--fs, 1)); font-weight: 500; text-align: left; cursor: pointer; }
.backup-alert[hidden] { display: none; }
.profile-button { position: relative; }
.profile-button.backup-warn::after { content: ""; position: absolute; top: 0; right: 0; width: 10px; height: 10px; border: 2px solid var(--surface); border-radius: 50%; background: #d93025; }
/* 每日奶量柱状图（milk-chart.js）：配方奶蓝、瓶喂母乳粉（dataviz 校验通过），未分类灰；今天的柱子画浅；文字用正文色，不用系列色 */
.milk-chart { margin: 14px 0 6px; padding: 12px 12px 8px; border-radius: 12px; background: var(--surface); box-shadow: 0 10px 24px rgba(85, 148, 182, 0.1); }
.milk-chart-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.milk-chart-head h3 { margin: 0; font-size: calc(16px * var(--fs, 1)); }
.milk-chart-head .chart-tabs { margin: 0; width: 168px; }
.milk-chart-head .chart-tabs button { min-height: 30px; font-size: calc(13px * var(--fs, 1)); }
.milk-legend { display: flex; flex-wrap: wrap; gap: 4px 12px; margin: 8px 2px 2px; color: var(--muted); font-size: calc(12px * var(--fs, 1)); }
.milk-legend span { display: inline-flex; align-items: center; gap: 5px; }
.milk-legend span[hidden] { display: none; }
.milk-legend i { width: 10px; height: 10px; border-radius: 3px; }
.milk-legend i.seg-formula { background: #3b8fc6; }
.milk-legend i.seg-bottle { background: #d6607e; }
.milk-legend i.seg-other { background: #9aa7b3; }
.milk-svg { display: block; width: 100%; height: auto; overflow: visible; }
.milk-svg .seg-formula { fill: #3b8fc6; }
.milk-svg .seg-bottle { fill: #d6607e; }
.milk-svg .seg-other { fill: #9aa7b3; }
.milk-svg .today { opacity: 0.5; }
.milk-svg .baseline { stroke: #d9e4ec; stroke-width: 1; }
.milk-svg .avg { stroke: #7b8a98; stroke-width: 1; stroke-dasharray: 4 3; }
.milk-legend i.dash { width: 14px; height: 0; border-top: 1.5px dashed #7b8a98; border-radius: 0; }
.milk-legend .legend-avg b { font-weight: 400; }
.milk-svg .value { fill: var(--text); font-size: calc(10px * var(--fs, 1)); font-weight: 500; }
.milk-svg .day { fill: var(--muted); font-size: calc(10px * var(--fs, 1)); }
.milk-svg .day.is-today { fill: var(--text); font-weight: 500; }
.milk-svg .nursing { fill: var(--muted); font-size: calc(10px * var(--fs, 1)); }
.milk-svg .picked { fill: none; stroke: var(--text); stroke-width: 1.5; }
.milk-svg .hit { fill: transparent; cursor: pointer; }
.milk-detail { margin: 8px 2px 4px; font-size: calc(13px * var(--fs, 1)); line-height: 1.5; color: var(--text); }
/* 体型记录卡片：不写“体型测量”标题，直接列出数据，正文小字不加粗（用户要求）；要压过 .timeline span 的 18px 粗体 */
.timeline .growth-value { display: block; color: var(--text); font-size: calc(13px * var(--fs, 1)); font-weight: 400; line-height: 1.6; }

/* 健康页（health.js）：疫苗和体检合在一页，顶部筛选“全部 / 疫苗 / 体检”；「＋」弹出两个大按钮 */
.health-filter, .feed-filter, .monitor-filter { display: flex; width: 100%; margin: 4px 0 6px; }
.health-filter button, .feed-filter button, .monitor-filter button { flex: 1; min-height: 36px; padding: 6px 0; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font: inherit; font-size: calc(15px * var(--fs, 1)); font-weight: 500; }
.health-filter button[aria-selected="true"], .feed-filter button[aria-selected="true"], .monitor-filter button[aria-selected="true"] { background: #fff; color: var(--text); box-shadow: 0 2px 6px rgba(57, 121, 165, 0.15); }
/* 记录菜单“成长与健康”一组：黄疸、体型、疫苗、体检，4 列，不参与拖动排序 */
.record-menu-group { margin: 16px 4px 10px; color: var(--muted); font-size: calc(13px * var(--fs, 1)); font-weight: 500; }
.record-menu-head + .record-menu-group { margin-top: 0; }
.care-type-grid { position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.care-type-grid button { display: grid; justify-items: center; align-content: start; gap: 6px; min-height: 86px; padding: 0 0 8px; border: 0; border-radius: 16px; background: var(--surface); color: var(--text); font: inherit; font-weight: 500; box-shadow: 0 10px 22px rgba(86, 151, 187, 0.12); }
.care-type-grid .feed-type-icon { width: 44px; height: 44px; font-size: calc(21px * var(--fs, 1)); }
.care-type-grid .feed-type-icon.vaccine-mark { background: #ffe1ed; color: #ac5269; }
.care-type-grid .feed-type-icon.checkup-mark { background: #e3efff; color: #3979a5; }

/* 疫苗参考表（vaccine-guide.js）：健康页顶部入口；按月龄 / 按疫苗两种看法。免费蓝、自费橙、部分区免费绿，标签都带文字，不只靠颜色区分 */
.guide-entry { display: grid; grid-template-columns: 40px minmax(0, 1fr) 12px; align-items: center; gap: 12px; width: 100%; margin: 4px 0 10px; padding: 12px 14px; border: 0; border-radius: 16px; background: var(--surface); color: var(--text); font: inherit; text-align: left; box-shadow: 0 10px 24px rgba(85, 148, 182, 0.1); cursor: pointer; }
.guide-entry strong, .guide-entry small { display: block; }
.guide-entry strong { font-size: calc(15px * var(--fs, 1)); }
.guide-entry small { margin-top: 2px; color: #5f6e7c; font-size: calc(12px * var(--fs, 1)); }
.guide-entry > span:last-child { color: var(--muted); font-size: calc(20px * var(--fs, 1)); }
.guide-entry-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: #ffe1ed; color: #ac5269; }
.guide-intro { margin: 0 2px 10px; color: #5f6e7c; font-size: calc(12px * var(--fs, 1)); line-height: 1.6; }
.guide-views { display: flex; width: 100%; margin-bottom: 12px; }
.guide-views button { flex: 1; min-height: 36px; padding: 6px 0; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font: inherit; font-size: calc(15px * var(--fs, 1)); font-weight: 500; }
.guide-views button[aria-selected="true"] { background: #fff; color: var(--text); box-shadow: 0 2px 6px rgba(57, 121, 165, 0.15); }
.guide-age, .guide-vaccine { margin-bottom: 10px; padding: 12px 14px; border-radius: 14px; background: var(--surface); box-shadow: 0 6px 16px rgba(85, 148, 182, 0.08); }
.guide-age.past { opacity: 0.55; }
.guide-age.next { box-shadow: 0 0 0 2px #58a9d4, 0 10px 24px rgba(85, 148, 182, 0.16); }
.guide-age header, .guide-vaccine header { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; margin-bottom: 6px; }
.guide-age header strong, .guide-vaccine header strong { font-size: calc(15px * var(--fs, 1)); }
.guide-age header span { color: #3f4d5a; font-size: calc(13px * var(--fs, 1)); font-variant-numeric: tabular-nums; }
.guide-age header small, .guide-vaccine header small { margin-left: auto; color: #5f6e7c; font-size: calc(12px * var(--fs, 1)); }
.guide-age.next header small { color: #2f6f99; font-weight: 500; }
.guide-line { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 6px; align-items: start; margin-top: 4px; }
.guide-line > b { padding-top: 3px; font-size: calc(12px * var(--fs, 1)); }
.guide-line > div { display: flex; flex-wrap: wrap; gap: 6px; }
.guide-line b.free, .guide-tag.free { color: #2f6f99; }
.guide-line b.paid, .guide-tag.paid { color: #a35a12; }
.guide-tag.local { color: #287351; }
.guide-chip { display: inline-flex; align-items: baseline; gap: 4px; padding: 4px 9px; border-radius: 999px; font-size: calc(13px * var(--fs, 1)); font-weight: 500; }
.guide-chip.free { background: #e3f0f8; color: #245f86; }
.guide-chip.paid { background: #fdf0e1; color: #8a4b0f; }
.guide-chip.local { background: #e2f4ea; color: #1f5f40; }
.guide-chip small { color: inherit; font-size: calc(11px * var(--fs, 1)); font-weight: 500; opacity: 0.85; }
.guide-section { margin: 16px 2px 8px; font-size: calc(16px * var(--fs, 1)); }
.guide-tag { font-size: calc(12px * var(--fs, 1)); font-weight: 500; }
.guide-disease { margin: 0 0 6px; color: #3f4d5a; font-size: calc(13px * var(--fs, 1)); }
.guide-doses { margin: 0; padding: 0; list-style: none; }
.guide-doses li { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 8px; padding: 5px 0; border-top: 1px solid var(--line); font-size: calc(13px * var(--fs, 1)); font-variant-numeric: tabular-nums; }
.guide-doses li.past { color: #8a99a6; }
.guide-note { margin: 8px 0 0; color: #5f6e7c; font-size: calc(12px * var(--fs, 1)); line-height: 1.6; }

/* “我的”页（2026-10-08 改版）：仿 iPhone 设置的分组列表。顶部轻量返回；宝宝卡片（点头像换照片）；
   宝宝资料、账号与密码、数据备份三组；退出登录单独一行红字；最下面版本号。小字用 #5f6e7c（对比度够）。 */
.me-topbar { display: grid; grid-template-columns: 80px minmax(0, 1fr) 80px; align-items: center; min-height: 44px; margin-top: 6px; }
.me-topbar h2 { margin: 0; text-align: center; font-size: calc(17px * var(--fs, 1)); font-weight: 600; }
.me-back { display: flex; align-items: center; gap: 2px; min-height: 44px; padding: 0; border: 0; background: none; color: #2f6f99; font: inherit; font-size: calc(16px * var(--fs, 1)); font-weight: 500; cursor: pointer; }
.me-back svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.me-profile { display: flex; flex-direction: column; align-items: center; gap: 6px; margin: 8px 0 4px; padding: 22px 16px 20px; border-radius: 20px; background: var(--surface); box-shadow: 0 16px 38px rgba(77, 143, 177, 0.14); text-align: center; }
.me-avatar-button { position: relative; padding: 0; border: 0; border-radius: 50%; background: none; cursor: pointer; }
.avatar.me-avatar { width: 96px; height: 96px; font-size: calc(38px * var(--fs, 1)); box-shadow: 0 0 0 4px #fff, 0 0 0 6px #d8ecf8; }
.me-avatar-button.busy .me-avatar { opacity: 0.5; }
.me-camera { position: absolute; right: -2px; bottom: -2px; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: #26313d; color: #fff; box-shadow: 0 0 0 3px #fff; }
.me-camera svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.me-name { margin-top: 6px; font-size: calc(24px * var(--fs, 1)); }
.me-baby-line { display: inline-flex; align-items: center; gap: 4px; min-height: 32px; padding: 0 6px; border: 0; background: none; color: #5f6e7c; font: inherit; font-size: calc(13px * var(--fs, 1)); cursor: pointer; }
/* 2026-11-17 改版：一级页宝宝卡里的记录概况、同步卡、二级页 */
.me-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); width: 100%; margin-top: 8px; padding-top: 12px; border-top: 1px solid var(--line); color: #5f6e7c; font-size: calc(12px * var(--fs, 1)); text-align: center; }
.me-stats strong { display: block; color: var(--text); font-size: calc(20px * var(--fs, 1)); line-height: 1.3; }
.me-sync { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; align-items: center; gap: 10px; margin-top: 12px; padding: 12px 14px; border-radius: 16px; background: var(--surface); }
.me-sync > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.me-sync strong { font-size: calc(15px * var(--fs, 1)); }
.me-sync small { color: #5f6e7c; font-size: calc(12px * var(--fs, 1)); }
.me-sync-dot { width: 10px; height: 10px; border-radius: 50%; background: #2f9e6a; }
.me-sync.warn .me-sync-dot { background: #d68a1f; }
.me-sync.busy .me-sync-dot { background: #7aa7c7; }
#me-sync-now { min-height: 34px; padding: 0 12px; border: 0; border-radius: 999px; background: #e3f0f8; color: #2f6f99; font: inherit; font-size: calc(13px * var(--fs, 1)); font-weight: 500; white-space: nowrap; cursor: pointer; }
.me-main[hidden], .me-sub[hidden] { display: none; }
.me-sub { padding-bottom: 8px; }
.me-sub-hint { margin: 10px 4px 0; color: var(--muted); font-size: calc(12px * var(--fs, 1)); line-height: 1.6; }
.me-value.warn { color: #b3261e; font-weight: 500; }
.library-tabs { display: flex; width: 100%; margin-top: 8px; }
.library-tabs button { flex: 1; min-height: 36px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font: inherit; font-size: calc(15px * var(--fs, 1)); font-weight: 500; cursor: pointer; }
.library-tabs button[aria-selected="true"] { background: var(--surface); color: var(--text); box-shadow: 0 2px 6px rgba(57, 121, 165, 0.15); }
.me-list[hidden] { display: none; }
.me-list .me-list-row { grid-template-columns: minmax(0, 1fr) auto auto; min-height: 46px; }
.me-list .me-row + .me-row::before { left: 14px; }
.me-remove, .me-daily { min-height: 32px; padding: 0 12px; border: 1px solid var(--line); border-radius: 999px; background: transparent; color: #b3261e; font: inherit; font-size: calc(13px * var(--fs, 1)); font-weight: 500; cursor: pointer; }
.me-daily { color: #5f6e7c; }
.me-daily[aria-pressed="true"] { border-color: transparent; background: #e2f4ea; color: #287351; }
.me-daily[aria-pressed="true"]::before { content: "✓ "; }
.me-group .me-add { grid-template-columns: 1fr; color: #2f6f99; font-weight: 500; cursor: pointer; }
.me-group .me-option { grid-template-columns: minmax(0, 1fr) auto; min-height: 52px; cursor: pointer; text-align: left; }
.me-option small { color: var(--muted); font-size: calc(12px * var(--fs, 1)); }
.me-option[aria-checked="true"] .me-label::after { content: "✓"; margin-left: 6px; color: #2f80c0; font-weight: 500; }
.me-option[aria-checked="true"] .me-label { color: #2f80c0; font-weight: 500; }
.me-link[data-me-open] { grid-template-columns: 32px auto minmax(0, 1fr) 12px; }
.me-link[data-me-open] .me-label { white-space: nowrap; }
.me-link[data-me-open] .me-value { min-width: 0; overflow: hidden; color: #5f6e7c; font-size: calc(14px * var(--fs, 1)); text-align: right; white-space: nowrap; text-overflow: ellipsis; }
[data-me-sub="about"] .me-row { grid-template-columns: minmax(0, 1fr) auto; }
[data-me-sub="about"] .me-row::before, .me-options .me-row::before { left: 14px !important; }
[data-me-sub="about"] #check-update { grid-template-columns: minmax(0, 1fr) auto 12px; }
#avatar-status, .avatar-error { margin: 0; color: #b3261e; font-size: calc(13px * var(--fs, 1)); }
.me-group-title { margin: 16px 4px 6px; color: #5f6e7c; font-size: calc(13px * var(--fs, 1)); font-weight: 500; }
.me-group { overflow: hidden; border-radius: 16px; background: var(--surface); }
.me-row { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; align-items: center; gap: 12px; width: 100%; min-height: 56px; margin: 0; padding: 0 14px; border: 0; background: transparent; color: var(--text); font: inherit; text-align: left; }
.me-row + .me-row { position: relative; }
.me-row + .me-row::before { content: ""; position: absolute; top: 0; left: 58px; right: 0; height: 1px; background: #e6eff5; }
.me-link { cursor: pointer; }
.me-icon { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; }
.me-icon svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.me-icon.blue { background: #e3f0f8; color: #2f6f99; }
.me-icon.pink { background: #ffe1ed; color: #ac5269; }
.me-icon.green { background: #e2f4ea; color: #287351; }
.me-icon.red { background: #fdecec; color: #b3261e; }
.me-label { display: flex; align-items: center; gap: 6px; font-size: calc(16px * var(--fs, 1)); }
.me-value { color: #3f4d5a; font-size: calc(15px * var(--fs, 1)); overflow-wrap: anywhere; }
.me-chevron { width: 12px; height: 12px; fill: none; stroke: #9aa8b5; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.sex-toggle { display: inline-flex; padding: 3px; border-radius: 10px; background: #eef4f8; }
.sex-toggle button { min-height: 34px; padding: 0 14px; border: 0; border-radius: 8px; background: none; color: #5f6e7c; font: inherit; font-size: calc(14px * var(--fs, 1)); font-weight: 500; }
.sex-toggle button[aria-pressed="true"] { background: #fff; color: var(--text); box-shadow: 0 2px 6px rgba(57, 121, 165, 0.15); }
#baby-birth { max-width: 150px; min-height: 40px; padding: 0 4px; border: 0; background: transparent; color: #3f4d5a; font: inherit; font-size: calc(15px * var(--fs, 1)); text-align: right; }
.password-field { display: flex; align-items: center; justify-content: flex-end; min-width: 0; }
#account-password { width: 120px; min-width: 0; min-height: 40px; padding: 0; border: 0; background: transparent; color: #3f4d5a; font: inherit; font-size: calc(15px * var(--fs, 1)); text-align: right; letter-spacing: 1px; }
.eye-button { display: grid; place-items: center; width: 44px; height: 44px; margin-right: -10px; padding: 0; border: 0; background: none; color: #7b8a98; cursor: pointer; }
.eye-button svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.eye-button .eye-open, .eye-button.showing .eye-closed { display: none; }
.eye-button.showing .eye-open { display: block; }
.eye-button.showing { color: var(--blue); }
#password-status { margin: 8px 4px 0; color: #287351; font-size: calc(13px * var(--fs, 1)); }
#password-status:empty { display: none; }
.me-backup-state { display: grid; grid-template-columns: 32px minmax(0, 1fr); align-items: center; gap: 12px; padding: 14px; }
.me-backup-state > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.me-backup-state small { color: #5f6e7c; font-size: calc(12px * var(--fs, 1)); }
.me-dot { width: 8px; height: 8px; border-radius: 50%; background: #2f9e6a; }
#cloud-backup-state.warn .me-icon { background: #fdecec; color: #b3261e; }
#cloud-backup-state.warn .me-dot { background: #d64545; }
#cloud-backup-state.warn #cloud-backup-title, #cloud-backup-time.warn { color: #b3261e; font-weight: 500; }
.backup-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding: 0 14px 14px; }
.backup-actions button { display: flex; flex-direction: column; align-items: center; gap: 6px; min-height: 72px; padding: 10px 4px; border: 0; border-radius: 12px; background: #f2f7fb; color: var(--text); font: inherit; font-size: calc(13px * var(--fs, 1)); font-weight: 500; cursor: pointer; }
.backup-actions button:disabled { opacity: 0.5; }
.backup-actions svg { width: 22px; height: 22px; fill: none; stroke: #2f6f99; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
#backup-status { margin: 8px 4px 0; color: #3f4d5a; font-size: calc(13px * var(--fs, 1)); }
#backup-status:empty { display: none; }
.me-logout { width: 100%; min-height: 52px; margin-top: 22px; border: 0; border-radius: 16px; background: var(--surface); color: #b3261e; font: inherit; font-size: calc(16px * var(--fs, 1)); font-weight: 500; cursor: pointer; }
.me-version { margin: 10px 0 0; color: #7b8a98; font-size: calc(12px * var(--fs, 1)); text-align: center; }
.me-version:empty { display: none; }
.me-back:focus-visible, .me-row:focus-visible, .backup-actions button:focus-visible, .me-logout:focus-visible, .me-avatar-button:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
/* 黄疸记录（记录页「＋」→ 黄疸）：浅黄底图标；数值输入框靠右 */
.jaundice-icon { background: #fff3c4; }
/* 体温记录（「＋」→ 成长与健康 → 体温）：浅红底图标；数值输入框靠右 */
.temperature-icon { background: #ffe4df; }
.feed-form .temp-row input { text-align: right; }
.feed-form .bili-row input { text-align: right; }
/* 日常监测趋势图（monitor-chart.js）：黄疸 #c27c0e、体温 #cc5a45（dataviz 校验通过），文字用正文色；缩放条和成长曲线一样 */
.trend-chart { --series: #c27c0e; margin: 12px 0 6px; padding: 12px 12px 8px; border-radius: 12px; background: var(--surface); box-shadow: 0 10px 24px rgba(85, 148, 182, 0.1); }
#temperature-chart { --series: #cc5a45; }
.trend-chart[hidden] { display: none; }
.trend-chart h3 { margin: 0 0 4px; font-size: calc(16px * var(--fs, 1)); }
.trend-chart h3 small { margin-left: 6px; color: var(--muted); font-size: calc(12px * var(--fs, 1)); font-weight: 400; }
.trend-svg { display: block; width: 100%; height: auto; overflow: visible; touch-action: pan-y; user-select: none; -webkit-user-select: none; cursor: pointer; }
.trend-svg .grid { stroke: #edf2f6; stroke-width: 1; }
.trend-svg .tick { fill: var(--muted); font-size: calc(10px * var(--fs, 1)); }
.trend-svg .line { fill: none; stroke: var(--series); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.trend-svg .dot { fill: var(--series); stroke: var(--surface); stroke-width: 2; }
.trend-svg .dot.picked { stroke: var(--text); }
.trend-svg .value { fill: var(--text); font-size: calc(11px * var(--fs, 1)); font-weight: 500; }
.trend-detail { margin: 6px 2px 2px; font-size: calc(13px * var(--fs, 1)); line-height: 1.5; color: var(--text); }
/* 记录菜单：“日常”和“成长与健康”两组格子一样大（都 4 列、同高），比原来小一号 */
.record-menu .feed-type-grid, .record-menu .care-type-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.record-menu .feed-type-grid button, .record-menu .care-type-grid button { height: 66px; min-height: 0; padding: 0 0 5px; gap: 4px; align-content: start; border-radius: 12px; font-size: calc(12px * var(--fs, 1)); }
.record-menu .feed-type-icon { width: 34px; height: 34px; margin-top: 7px; font-size: calc(17px * var(--fs, 1)); }
/* 体温“测量部位”四个选项放不进标签右边，改成标签一行、选项在下一行平分整行 */
.health-care-heading { margin: 28px 0 12px; font-size: calc(18px * var(--fs, 1)); color: var(--text); }
#feed-temp-site-row, #feed-spit-row, #med-kind-row { grid-template-columns: 1fr; gap: 8px; padding: 12px 0; }
#feed-temp-site-row .segmented, #feed-spit-row .segmented, #med-kind-row .segmented { justify-self: stretch; display: flex; }
#feed-temp-site-row .segmented label, #feed-spit-row .segmented label, #med-kind-row .segmented label { flex: 1; }
#feed-temp-site-row .segmented span, #feed-spit-row .segmented span, #med-kind-row .segmented span { min-width: 0; padding: 8px 4px; white-space: nowrap; }
/* 辅食、用药的常用清单（ui/chips.js）：名字长短不一，按字数排开换行 */
.chip-row > span { display: flex; align-items: baseline; gap: 8px; }
.feed-form .chip-row > span small { position: static; font-size: calc(12px * var(--fs, 1)); font-weight: 500; }
.chip-library.flow { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-library.flow button { padding: 0 12px; }
.chip-row[hidden], .med-dose-row[hidden], .check-row[hidden] { display: none; }
/* 用药剂量：数字框＋单位下拉 */
.med-dose-row { position: relative; display: grid; grid-template-columns: 112px minmax(0, 1fr); align-items: center; min-height: 58px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: calc(18px * var(--fs, 1)); font-weight: 500; }
.med-dose-row::after { display: none; }
.med-dose { display: flex; justify-content: flex-end; gap: 8px; }
.feed-form .med-dose input { flex: 0 0 96px; width: 96px; min-height: 38px; padding: 4px 8px; border: 1px solid var(--line); border-radius: 8px; background: transparent; color: var(--text); font: inherit; font-size: max(16px, calc(16px * var(--fs, 1))); text-align: center; }
.feed-form .med-dose select { flex: 0 0 72px; width: 72px; text-align: center; min-height: 38px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; background: #f1f7fb; color: var(--text); font: inherit; font-size: max(16px, calc(16px * var(--fs, 1))); }
.feed-form .check-row { grid-template-columns: 28px minmax(0, 1fr); min-height: 50px; font-size: calc(15px * var(--fs, 1)); font-weight: 500; }
.feed-form .check-row input { width: 20px; height: 20px; min-height: 0; margin: 0; accent-color: #2f80c0; }
.timeline .first-tag { display: inline-block; margin-left: 6px; padding: 0 7px; border-radius: 999px; background: #e3f3ea; color: #23744b; font-size: calc(11px * var(--fs, 1)); font-weight: 500; line-height: 1.7; vertical-align: 2px; }

/* 健康页：顶部“医疗安排 | 日常监测”标签，往下滑时停在顶部（内容在 #app-shell 里滚） */
.health-tabs, .growth-tabs { position: sticky; top: 0; z-index: 5; display: flex; width: 100%; margin: 0 0 14px; padding: 4px; border-radius: 12px; background: #e6eff6; box-shadow: 0 0 0 6px var(--bg); }
.health-tabs button, .growth-tabs button { flex: 1; min-height: 42px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); font: inherit; font-size: calc(16px * var(--fs, 1)); font-weight: 500; }
.health-tabs button[aria-selected="true"], .growth-tabs button[aria-selected="true"] { background: #fff; color: var(--text); box-shadow: 0 2px 8px rgba(57, 121, 165, 0.16); }
.health-pane[hidden], .growth-pane[hidden] { display: none; }
/* 日常监测：黄疸 / 体温两张卡片，写最新数值；点卡片切换下方趋势图和记录 */
.monitor-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
.monitor-card { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 12px; border: 2px solid transparent; border-radius: 16px; background: var(--surface); color: var(--text); font: inherit; text-align: left; box-shadow: 0 10px 22px rgba(86, 151, 187, 0.12); }
.monitor-card[aria-selected="true"] { border-color: #58a9d4; }
.monitor-card .feed-type-icon { flex: none; width: 38px; height: 38px; margin: 0; font-size: calc(19px * var(--fs, 1)); }
.monitor-card-text { display: grid; gap: 2px; min-width: 0; }
.monitor-card-text strong { color: var(--muted); font-size: calc(13px * var(--fs, 1)); }
.monitor-card-text b { font-size: calc(17px * var(--fs, 1)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.monitor-card-text small { color: var(--muted); font-size: calc(12px * var(--fs, 1)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.show-all-completed { display: block; width: 100%; min-height: 44px; margin-top: 4px; border: 0; background: transparent; color: var(--blue); font: inherit; font-size: calc(14px * var(--fs, 1)); font-weight: 500; }
.show-all-completed[hidden] { display: none; }
@media (max-width: 360px) {
  .monitor-card { gap: 8px; padding: 10px; }
  .monitor-card .feed-type-icon { width: 32px; height: 32px; font-size: calc(16px * var(--fs, 1)); }
}
/* 记录页“奶”筛选：卡片右侧写距上一次喂奶的间隔（时间线里的 span 会吃到 .timeline span 的 18px 粗体，所以写成 .timeline .feed-gap） */
.timeline .with-gap .swipe-content { padding-right: 92px; }
.timeline .feed-gap { position: absolute; top: 50%; right: 14px; display: grid; justify-items: end; gap: 2px; transform: translateY(-50%); color: var(--blue); font-size: calc(15px * var(--fs, 1)); font-weight: 500; line-height: 1.2; text-align: right; white-space: nowrap; }
.timeline .feed-gap small { color: var(--muted); font-size: calc(11px * var(--fs, 1)); font-weight: 500; }
.timeline .feed-gap b { font: inherit; }
@media (max-width: 360px) {
  .timeline .with-gap .swipe-content { padding-right: 78px; }
  .timeline .feed-gap { right: 10px; font-size: calc(13px * var(--fs, 1)); }
}
/* 头像裁切（ui/cropper.js）：全屏深色，圆形取景框，下方缩放滑杆和“取消 / 使用” */
.cropper { position: fixed; inset: 0; z-index: 60; display: grid; align-content: center; justify-items: center; gap: 18px; padding: calc(20px + env(safe-area-inset-top)) 20px calc(20px + env(safe-area-inset-bottom)); background: #0d1218; color: #fff; }
.cropper[hidden] { display: none; }
.cropper h2 { margin: 0; font-size: calc(17px * var(--fs, 1)); }
.cropper-frame { position: relative; width: min(80vw, 340px); aspect-ratio: 1; overflow: hidden; border-radius: 50%; background: #000; box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.85); touch-action: none; cursor: grab; }
.cropper-frame img { position: absolute; top: 0; left: 0; max-width: none; transform-origin: 0 0; user-select: none; -webkit-user-select: none; -webkit-user-drag: none; pointer-events: none; }
.cropper-zoom { display: flex; align-items: center; gap: 12px; width: min(80vw, 340px); color: rgba(255, 255, 255, 0.7); font-size: calc(18px * var(--fs, 1)); font-weight: 500; }
.cropper-zoom input { flex: 1; accent-color: #58a9d4; }
.cropper-hint { margin: 0; color: rgba(255, 255, 255, 0.6); font-size: calc(13px * var(--fs, 1)); }
.cropper-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; width: min(100%, 340px); }
.cropper-actions button { min-height: 48px; border: 0; border-radius: 999px; font: inherit; font-size: calc(16px * var(--fs, 1)); font-weight: 600; }
.cropper-cancel { background: rgba(255, 255, 255, 0.14); color: #fff; }
.cropper-use { background: linear-gradient(90deg, #58a9d4, #76c7e8); color: #fff; }
/* 健康页疫苗、体检卡片：日期下面一行写周几，字号粗细和日期一样（.timeline span），单独占一行 */
.timeline .timeline-time .time-week { display: block; }

/* 大事记（成长页第二个标签）：金色星星和年龄标签（#8a5a00 字在 #fff1d6 底上对比够），有照片时右侧 64 像素小图。
   时间线里的 span、strong 会吃到 .timeline span 的 18px 粗体，所以写成 .timeline .xxx */
.milestone-heading { margin-top: 0; }
.record-icon.milestone-icon, .feed-type-icon.milestone-icon { background: #fff1d6; font-size: calc(14px * var(--fs, 1)); }
.feed-type-icon.milestone-icon { font-size: calc(20px * var(--fs, 1)); }
.timeline .milestone-item.with-thumb .swipe-content { min-height: 92px; padding-right: 88px; }
.timeline .milestone-name { font-size: calc(16px * var(--fs, 1)); font-weight: 500; line-height: 1.4; }
.timeline .milestone-tag { display: inline-block; margin-top: 4px; padding: 1px 8px; border-radius: 999px; background: #fff1d6; color: #8a5a00; font-size: calc(12px * var(--fs, 1)); font-weight: 500; line-height: 1.6; }
.timeline .milestone-note { display: block; white-space: pre-wrap; }
.milestone-thumb { position: absolute; top: 50%; right: 12px; width: 64px; height: 64px; padding: 0; border: 0; border-radius: 10px; overflow: hidden; background: #eef4f8; transform: translateY(-50%); cursor: zoom-in; }
.milestone-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.milestone-item.fresh .swipe-content { animation: milestone-fresh 1.6s ease; }
@keyframes milestone-fresh { 0% { box-shadow: inset 0 0 0 2px #e0a526; } 100% { box-shadow: inset 0 0 0 2px transparent; } }
@media (prefers-reduced-motion: reduce) { .milestone-item.fresh .swipe-content { animation: none; } }

/* 大事记填写页：每项占满一行；常用事件全部排开（不用横着拖）；照片只占一行（不常加照片） */
#milestone-form .milestone-card { gap: 0; padding: 16px; }
#milestone-form .milestone-field { display: grid; gap: 8px; padding: 12px 0; border-bottom: 1px solid var(--line); }
#milestone-form .milestone-field:first-child { padding-top: 0; }
#milestone-form .milestone-label { display: block; min-height: 0; border: 0; color: var(--muted); font-size: calc(15px * var(--fs, 1)); font-weight: 500; }
#milestone-form .milestone-label small { position: static; margin-left: 4px; font-size: calc(12px * var(--fs, 1)); font-weight: 500; }
#milestone-form #milestone-title { min-height: 46px; border-radius: 12px; font-size: calc(18px * var(--fs, 1)); font-weight: 500; text-align: left; }
#milestone-form #milestone-title::placeholder { color: var(--muted); font-weight: 500; }
.chip-library { display: grid; grid-template-columns: repeat(auto-fill, minmax(56px, 1fr)); gap: 6px; }
.chip-library button { min-height: 32px; padding: 0 2px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--text); font: inherit; font-size: calc(14px * var(--fs, 1)); white-space: nowrap; }
.chip-library button { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; transition: transform 0.15s ease; }
.chip-library button.pressing { transform: scale(0.92); }
.chip-library .chip-add { border-style: dashed; color: #2f6f99; font-size: calc(18px * var(--fs, 1)); font-weight: 500; line-height: 1; }
.chip-library button[aria-pressed="true"] { border-color: transparent; background: #fff1d6; color: #8a5a00; font-weight: 500; }
#milestone-form .milestone-date { grid-template-columns: auto minmax(0, 1fr); gap: 12px; min-height: 0; border: 0; }
#milestone-form .milestone-date input { justify-self: end; max-width: 190px; }
#milestone-form .milestone-age { justify-self: end; min-height: 20px; color: #8a5a00; font-size: calc(13px * var(--fs, 1)); font-weight: 500; }
#milestone-form .milestone-age:not(:empty) { padding: 1px 10px; border-radius: 999px; background: #fff1d6; }
#milestone-form .milestone-age:empty { display: none; }
#milestone-form #milestone-note { min-height: 64px; resize: none; line-height: 1.5; }
#milestone-form .milestone-photo-line { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 52px; padding-top: 12px; }
#milestone-form .milestone-photo-add, #milestone-form .milestone-photo-tool { display: inline-flex; align-items: center; min-height: 34px; padding: 0 14px; border: 0; border-radius: 999px; background: #eef5fa; color: #2f6f99; font: inherit; font-size: calc(14px * var(--fs, 1)); font-weight: 500; cursor: pointer; }
#milestone-form .milestone-photo-tool { padding: 0 11px; }
#milestone-form button.milestone-photo-tool { color: var(--muted); }
#milestone-form .milestone-photo-add[hidden], #milestone-form .milestone-photo-preview[hidden] { display: none; }
#milestone-form .milestone-photo-preview { display: flex; align-items: center; gap: 6px; }
#milestone-form .milestone-photo-preview img { width: 52px; height: 52px; margin-right: 4px; border-radius: 10px; object-fit: cover; }

/* 看大图：全屏黑底，点任意处关闭 */
.photo-viewer { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom); background: #000; cursor: zoom-out; }
.photo-viewer[hidden] { display: none; }
.photo-viewer img { max-width: 100%; max-height: 82vh; object-fit: contain; }
.photo-viewer p { position: absolute; left: 16px; right: 16px; bottom: calc(24px + env(safe-area-inset-bottom)); color: #fff; font-size: calc(14px * var(--fs, 1)); text-align: center; }
.photo-viewer-close { position: absolute; top: calc(12px + env(safe-area-inset-top)); right: 12px; width: 40px; height: 40px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, 0.18); color: #fff; font-size: calc(18px * var(--fs, 1)); }

/* 首页里程碑卡片：整张可点（进成长页“大事记”），满月、百天当天下面有“记一笔今天” */
#home-milestone .milestone-open { display: flex; flex-direction: column; gap: 6px; width: 100%; padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
#home-milestone .milestone-bar { display: block; }
#home-milestone .milestone-open:focus-visible, #home-milestone .milestone-log:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; border-radius: 8px; }
#home-milestone .milestone-log { margin-top: auto; min-height: 34px; padding: 0 10px; border: 0; border-radius: 999px; background: #fff1d6; color: #8a5a00; font: inherit; font-size: calc(13px * var(--fs, 1)); font-weight: 500; }

/* 睡眠（sleep.js）：颜色 #7a6bd6（浅色、深色底上对比度都 ≥3:1）；首页顶部“正在睡”条、记录图标、钟面图例、填写页 */
.sleep-now { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; gap: 12px; margin-top: 12px; padding: 14px; border-radius: 18px; background: #efedfc; box-shadow: 0 10px 24px rgba(122, 107, 214, 0.16); }
.sleep-now[hidden] { display: none; }
.sleep-moon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: #7a6bd6; }
.sleep-moon svg { width: 22px; height: 22px; fill: #fff; }
.sleep-now-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sleep-now-text small { color: #5b4fb3; font-size: calc(13px * var(--fs, 1)); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sleep-now-text strong { color: var(--text); font-size: calc(22px * var(--fs, 1)); font-weight: 600; line-height: 1.2; white-space: nowrap; }
.sleep-now.forgot .sleep-now-text strong { font-size: calc(16px * var(--fs, 1)); }
.sleep-wake { min-height: 40px; padding: 0 18px; border: 0; border-radius: 999px; background: #7a6bd6; color: #fff; font: inherit; font-size: calc(15px * var(--fs, 1)); font-weight: 600; white-space: nowrap; cursor: pointer; }
.sleep-wake:focus-visible { outline: 2px solid #5b4fb3; outline-offset: 2px; }
.sleep-key { width: 14px; height: 6px; border-radius: 3px; background: #7a6bd6; }
.sleep-icon { background: #efedfc; }
.sleep-part { display: grid; min-width: 0; margin: 0; padding: 0; border: 0; }
.sleep-part[hidden] { display: none; }
.sleep-mode .segmented label { min-width: 0; }
.sleep-ongoing-info { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 0 14px; }
.sleep-ongoing-info[hidden] { display: none; }
.feed-form .sleep-ongoing-info small { position: static; color: #5b4fb3; font-size: calc(13px * var(--fs, 1)); font-weight: 500; }
.sleep-ongoing-info strong { font-size: calc(30px * var(--fs, 1)); font-weight: 600; }
.sheet-hint { margin: 8px 0 4px; color: #5f6e7c; font-size: calc(13px * var(--fs, 1)); line-height: 1.5; }
.sleep-duration b { color: var(--text); font-size: calc(16px * var(--fs, 1)); font-weight: 500; }
.sleep-duration b.bad { color: #b24a63; font-size: calc(14px * var(--fs, 1)); }
/* 玩耍（v124，play.js）：菜单图标底色、时长滚轮（两列 scroll-snap，中间一条白色选中带） */
.play-icon { background: #dcf2ec; }
.play-wheel { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 36px minmax(0, 1fr) 36px; align-items: center; height: 200px; overflow: hidden; border-radius: 14px; background: var(--fill); }
.play-wheel .wheel-band { position: absolute; left: 8px; right: 8px; top: 80px; height: 40px; border-radius: 10px; background: var(--surface); box-shadow: var(--thumb-shadow); }
.wheel-box { position: relative; height: 200px; border-radius: 12px; outline-offset: -3px; }
.wheel-col { height: 200px; overflow-y: auto; overscroll-behavior: contain; scroll-snap-type: y mandatory; scrollbar-width: none; -webkit-mask-image: linear-gradient(transparent, #000 32%, #000 68%, transparent); mask-image: linear-gradient(transparent, #000 32%, #000 68%, transparent); }
.wheel-col::-webkit-scrollbar { display: none; }
.wheel-col .wheel-pad { display: block; height: 80px; }
.feed-form .wheel-col button { display: block; width: 100%; height: 40px; min-height: 0; margin: 0; padding: 0; border: 0; background: none; box-shadow: none; color: var(--muted); font: inherit; font-size: calc(20px * var(--fs, 1)); font-weight: 500; font-variant-numeric: tabular-nums; scroll-snap-align: center; cursor: pointer; }
.feed-form .wheel-col button.current { color: var(--text); font-size: calc(23px * var(--fs, 1)); font-weight: 500; }
.play-wheel .wheel-unit { position: relative; color: var(--text); font-size: calc(17px * var(--fs, 1)); font-weight: 500; }
.feed-form .play-span { margin: 0; color: #17806d; font-size: calc(14px * var(--fs, 1)); font-weight: 500; text-align: center; }
.feed-form .play-span.empty { color: var(--muted); }
/* 常玩的：普通字重（用户嫌粗）；选中是浅蓝底、主题蓝字，和“保存”按钮一个色系（2026-11-21 用户要求） */
#play-chips button { font-weight: 400; }
#play-chips button[aria-pressed="true"] { border-color: transparent; background: #e3f0fa; color: #1f6a9e; font-weight: 400; }
.feed-form .play-minutes-value { position: absolute; width: 1px; height: 1px; min-height: 0; padding: 0; border: 0; opacity: 0; pointer-events: none; }
/* 睡眠、玩耍卡片：几点到几点写在右上角两行，卡片矮一点（2026-11-20 用户要求）。用 float：标题和明细第一行让开它，
   明细多的第二行起用整张卡的宽度（不能用负的下边距：明细会压到它下半截）。没有明细时不留空行 */
.timeline .with-span .swipe-content { min-height: 56px; }
.timeline .feed-span { float: right; display: grid; justify-items: end; margin: 1px 0 0 10px; color: var(--text); font-size: calc(15px * var(--fs, 1)); font-weight: 500; line-height: 1.15; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.timeline .feed-span small { color: var(--muted); font-size: calc(13px * var(--fs, 1)); font-weight: 500; }
.timeline .feed-span b { font: inherit; }
.timeline .record-meta:empty { display: none; }
@media (max-width: 360px) { .timeline .feed-span { font-size: calc(14px * var(--fs, 1)); } }
@media (max-width: 360px) {
  .sleep-now { gap: 10px; padding: 12px; }
  .sleep-now-text strong { font-size: calc(19px * var(--fs, 1)); }
  .sleep-wake { padding: 0 14px; }
}

/* 首页四张趋势卡片（home-charts.js）：今天的数 + 近 7 天小柱子 + 日均和“上次多久前”；两行小字不折行 */
.trend-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 12px; }
.trend-card { gap: 4px; cursor: pointer; }
.trend-card:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.trend-head { display: flex; justify-content: space-between; align-items: baseline; gap: 6px; }
.trend-head small { color: #5f6e7c; font-size: calc(12px * var(--fs, 1)); white-space: nowrap; }
.trend-card .home-big { white-space: nowrap; line-height: 1.25; }
.trend-card .home-big small { margin-right: 4px; color: #3f4d5a; }
.trend-card .home-big small:last-child { margin-right: 0; }
.trend-mini { display: block; width: 100%; height: 38px; margin: 2px 0; }
.trend-foot { color: #5f6e7c; font-size: calc(12px * var(--fs, 1)); line-height: 1.45; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.trend-foot.sleeping { color: #5b4fb3; font-weight: 500; }

/* 记录页“每日趋势”：奶量 / 母乳 / 尿布 / 睡眠切换，30 天以上可双指缩放 */
.trend-kinds { margin: 10px 0 0; }
.trend-kinds button { min-height: 32px; font-size: calc(13px * var(--fs, 1)); }
.milk-chart .chart-zoom-bar { margin-top: 6px; }
.milk-chart .chart-zoom-bar[hidden] { display: none; }
.milk-svg.zoom-svg { touch-action: pan-y; user-select: none; -webkit-user-select: none; cursor: pointer; }
.milk-legend i.seg-nursing, .milk-svg .seg-nursing { background: #d6607e; fill: #d6607e; }
.milk-legend i.seg-pee, .milk-svg .seg-pee { background: #3b8fc6; fill: #3b8fc6; }
.milk-legend i.seg-poop, .milk-svg .seg-poop { background: #a8761c; fill: #a8761c; }
.milk-legend i.seg-sleep, .milk-svg .seg-sleep { background: #7a6bd6; fill: #7a6bd6; }

/* 记录页筛“奶”时的喂奶统计（milk-stats.js） */
.milk-stats { margin: 0 0 14px; padding: 12px 14px 10px; border-radius: 12px; background: var(--surface); box-shadow: 0 10px 24px rgba(85, 148, 182, 0.1); }
.milk-stats[hidden] { display: none; }
.milk-stats-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.milk-stats-head h3 { margin: 0 auto 0 0; font-size: calc(15px * var(--fs, 1)); }
/* 喂奶参考表（feed-guide.js） */
.guide-toggle { min-height: 28px; padding: 0 10px; border: 1px solid var(--line); border-radius: 999px; background: transparent; color: #2f6f99; font: inherit; font-size: calc(12px * var(--fs, 1)); font-weight: 500; cursor: pointer; }
.guide-toggle[aria-expanded="true"] { border-color: transparent; background: #e3f0f8; }
.guide-toggle[hidden], .feed-guide[hidden] { display: none; }
.feed-guide { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.guide-switch { display: flex; width: 100%; }
.guide-switch button { flex: 1; min-height: 30px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font: inherit; font-size: calc(13px * var(--fs, 1)); font-weight: 500; cursor: pointer; }
.guide-switch button[aria-selected="true"] { background: var(--surface); color: var(--text); box-shadow: 0 2px 6px rgba(57, 121, 165, 0.15); }
.guide-table { margin-top: 8px; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); font-size: calc(12px * var(--fs, 1)); }
.guide-row { display: grid; grid-template-columns: 1.25fr 0.9fr 1.1fr 1.2fr; gap: 4px; padding: 7px 8px; color: var(--muted); }
.guide-row + .guide-row { border-top: 1px solid var(--line); }
.guide-head { background: #f4f8fb; font-weight: 500; }
.guide-row.now { background: #fff6e0; color: var(--text); font-weight: 500; }
.guide-actual-title { margin: 10px 0 6px; color: var(--text); font-size: calc(13px * var(--fs, 1)); font-weight: 500; }
.guide-actual { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.guide-actual > div { display: grid; gap: 1px; padding: 7px 8px; border-radius: 9px; background: #f4f8fb; }
.guide-actual span { color: var(--muted); font-size: calc(11px * var(--fs, 1)); }
.guide-actual strong { font-size: calc(15px * var(--fs, 1)); }
.guide-actual small { font-size: calc(11px * var(--fs, 1)); font-weight: 500; }
.guide-actual .ok small { color: #23744b; }
.guide-actual .low small, .guide-actual .high small { color: #a35418; }
.guide-note { margin: 8px 0 0; color: var(--muted); font-size: calc(11px * var(--fs, 1)); line-height: 1.5; }
.milk-stats-head .chart-tabs { width: 116px; margin: 0; }
.milk-stats-head .chart-tabs button { min-height: 28px; font-size: calc(12px * var(--fs, 1)); }
.milk-stats-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 6px; margin: 12px 0 8px; }
.milk-stats-grid div { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 0; }
.milk-stats-grid span { color: #5f6e7c; font-size: calc(12px * var(--fs, 1)); white-space: nowrap; }
.milk-stats-grid strong { color: var(--text); font-size: calc(19px * var(--fs, 1)); font-weight: 600; white-space: nowrap; }
.milk-stats-grid strong small { margin-left: 2px; color: #5f6e7c; font-size: calc(11px * var(--fs, 1)); font-weight: 500; }
.milk-stats-note { margin: 0; color: var(--muted); font-size: calc(11px * var(--fs, 1)); text-align: center; }

@media (max-width: 360px) {
  .trend-card .home-big { font-size: calc(21px * var(--fs, 1)); }
  .milk-stats-grid strong { font-size: calc(17px * var(--fs, 1)); }
  .milk-chart-head .chart-tabs { width: 150px; }
  /* “距上次喂奶”大字在 320 宽原来会折成两行 */
  .milk-hero { gap: 10px; padding: 14px 12px; }
  .milk-ring { width: 70px; height: 70px; }
  .milk-hero-text { font-size: calc(12px * var(--fs, 1)); }
  .milk-hero-text #since-milk { font-size: calc(23px * var(--fs, 1)); white-space: nowrap; }
  #milk-next { font-size: calc(13px * var(--fs, 1)); }
  #next-side { font-size: calc(12px * var(--fs, 1)); white-space: nowrap; }
  #next-side .wide-only { display: none; }
}

/* 2026-11-17 五项借鉴：一周日期条、夜奶标签、奶量按顿分段的数字、白天睡眠色、统计卡里的“昨晚”、首页“昨晚”、“我的”夜里时段 */
.feed-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; margin: 4px 0 10px; }
.feed-week button { display: grid; justify-items: center; gap: 1px; min-height: 52px; padding: 6px 0; border: 0; border-radius: 12px; background: var(--surface); color: var(--text); font: inherit; box-shadow: 0 4px 12px rgba(85, 148, 182, 0.08); }
.feed-week button small { color: var(--muted); font-size: calc(11px * var(--fs, 1)); font-weight: 500; }
.feed-week button b { font-size: calc(17px * var(--fs, 1)); font-weight: 600; font-variant-numeric: tabular-nums; }
.feed-week button.empty { opacity: 0.45; }
.feed-week button.is-today b { color: #2f6f99; }
.feed-week button[aria-pressed="true"] { background: #2f6f99; color: #fff; }
.feed-week button[aria-pressed="true"] small, .feed-week button[aria-pressed="true"] b { color: #fff; }
.feed-week button:focus-visible { outline: 2px solid #2f6f99; outline-offset: 2px; }
.milk-stats-extra { margin: 8px 0 0; padding: 6px 10px; border-radius: 8px; background: #fdf0e6; color: #9a4f12; font-size: calc(13px * var(--fs, 1)); font-weight: 500; }
.milk-stats-extra[hidden] { display: none; }
.timeline .spit-tag { display: inline-block; margin-left: 6px; padding: 0 7px; border-radius: 999px; background: #fdebdc; color: #a35418; font-size: calc(11px * var(--fs, 1)); font-weight: 500; line-height: 1.7; vertical-align: 2px; }
.timeline .night-tag { display: inline-block; margin-left: 6px; padding: 0 7px; border-radius: 999px; background: #ebe8fb; color: #5b4fb3; font-size: calc(11px * var(--fs, 1)); font-weight: 500; line-height: 1.7; vertical-align: 2px; }
.milk-svg .seg-text { fill: #fff; font-size: calc(8px * var(--fs, 1)); font-weight: 500; pointer-events: none; }
.milk-legend i.seg-sleep-day, .milk-svg .seg-sleep-day { background: #c27c0e; fill: #c27c0e; }
.milk-stats-last { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 10px; align-items: baseline; margin: 10px 0 0; padding: 10px 12px; border-radius: 10px; background: #efedfc; }
.milk-stats-last[hidden] { display: none; }
.milk-stats-last span { grid-row: span 2; color: #5b4fb3; font-size: calc(12px * var(--fs, 1)); font-weight: 500; }
.milk-stats-last strong { color: var(--text); font-size: calc(16px * var(--fs, 1)); font-weight: 600; font-variant-numeric: tabular-nums; }
.milk-stats-last small { color: var(--muted); font-size: calc(12px * var(--fs, 1)); }
.last-night { display: grid; grid-template-columns: 36px minmax(0, 1fr); align-items: center; gap: 12px; margin-top: 12px; padding: 12px 14px; border-radius: 18px; background: #efedfc; }
.last-night[hidden] { display: none; }
.last-night-icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: #7a6bd6; }
.last-night-icon svg { width: 18px; height: 18px; fill: #fff; }
.last-night-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.last-night-text small { color: #5b4fb3; font-size: calc(12px * var(--fs, 1)); font-weight: 500; }
.last-night-text strong { color: var(--text); font-size: calc(18px * var(--fs, 1)); font-weight: 600; font-variant-numeric: tabular-nums; }
#last-night-sub { color: var(--muted); font-weight: 500; }
.me-icon.purple { background: #ebe8fb; color: #5b4fb3; }
.night-row { grid-template-columns: 32px minmax(0, 1fr) auto; }
.night-inputs { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); }
.night-inputs select { width: 76px; min-height: 36px; padding: 0 6px; border: 0; border-radius: 8px; background: #f2f6f9; color: #3f4d5a; font: inherit; font-size: calc(15px * var(--fs, 1)); font-variant-numeric: tabular-nums; text-align: center; text-align-last: center; appearance: none; -webkit-appearance: none; }
.night-note { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; margin: 6px 4px 0; color: var(--muted); font-size: calc(12px * var(--fs, 1)); line-height: 1.5; }
.night-note span { flex: 1 1 14em; }
.night-note button { border: 0; background: none; color: #2f6f99; font: inherit; font-size: calc(13px * var(--fs, 1)); font-weight: 500; padding: 0; }
@media (max-width: 360px) { .night-inputs select { width: 66px; font-size: calc(14px * var(--fs, 1)); } .feed-week button b { font-size: calc(15px * var(--fs, 1)); } }

/* 首页卡片（v108 页面设置，page-layout.js）：一个两列网格，整行的卡占两列，半宽的两张一行；顺序用 CSS order */
.home-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 12px; }
.home-cards > *, .home-cards .trend-grid > *, .home-cards .home-pair > * { margin: 0; }
.home-cards .trend-grid, .home-cards .home-pair { display: contents; }
.home-cards > .milk-hero, .home-cards > .home-clock, .home-cards > .upcoming-section, .home-cards > .home-empty { grid-column: 1 / -1; }
.home-cards [data-home-card][hidden] { display: none; }
.home-empty { padding: 22px 16px; border: 1px dashed var(--line); border-radius: 16px; color: var(--muted); font-size: calc(14px * var(--fs, 1)); text-align: center; }
/* 我的 → 页面设置（me.js）：每行 图标 / 名字 / 开关 / ☰ 把手 */
.me-group .layout-row { grid-template-columns: 28px minmax(0, 1fr) auto 36px; gap: 10px; min-height: 54px; padding: 0 4px 0 12px; background: var(--surface); }
.me-group .layout-row.locked { grid-template-columns: 28px minmax(0, 1fr) auto; padding-right: 14px; }
.layout-row.sorting { position: relative; z-index: 2; border-radius: 12px; box-shadow: 0 8px 20px rgba(38, 49, 61, 0.22); }
.layout-row.off .layout-name b { color: var(--muted); font-weight: 500; }
.layout-list .me-row + .me-row::before { left: 12px; }
.layout-icon { font-size: calc(18px * var(--fs, 1)); text-align: center; }
.layout-name { display: grid; gap: 0; line-height: 1.3; }
.layout-name b { font-size: calc(15px * var(--fs, 1)); font-weight: 500; }
.layout-name small { color: var(--muted); font-size: calc(11px * var(--fs, 1)); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.layout-new { display: inline-block; margin-left: 4px; padding: 0 6px; border-radius: 999px; background: #fbf0d9; color: #9a6200; font-size: calc(10px * var(--fs, 1)); font-weight: 500; vertical-align: 2px; }
.layout-switch { position: relative; width: 46px; height: 28px; padding: 0; border: 0; border-radius: 999px; background: #c9d4dd; cursor: pointer; transition: background 0.15s; }
.layout-switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25); transition: transform 0.15s; }
.layout-switch[aria-checked="true"] { background: #2f80c0; }
.layout-switch[aria-checked="true"]::after { transform: translateX(18px); }
.layout-switch[aria-disabled="true"] { opacity: 0.45; }
.layout-handle { display: grid; place-items: center; width: 36px; height: 44px; padding: 0; border: 0; background: transparent; color: #9aa8b5; cursor: grab; touch-action: none; }
.layout-handle svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.layout-lock { color: var(--muted); font-size: calc(12px * var(--fs, 1)); }
.layout-fixed { margin-bottom: 8px; }
.layout-note { min-height: 20px; color: #9a6200; font-weight: 500; text-align: center; }
.me-reset-link { display: block; margin: 4px auto 0; padding: 8px 14px; border: 0; background: none; color: #2f6f99; font: inherit; font-size: calc(14px * var(--fs, 1)); font-weight: 500; cursor: pointer; }
.layout-switch:focus-visible, .layout-handle:focus-visible, .me-reset-link:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .layout-switch, .layout-switch::after { transition: none; } }
/* 首页新卡片（home-cards.js） */
.extra-card { gap: 4px; cursor: pointer; }
.extra-card .trend-head .home-card-title { white-space: nowrap; }
.extra-card .home-big { white-space: nowrap; }
.extra-card:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.extra-card .home-big.extra-text { font-size: calc(17px * var(--fs, 1)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.extra-card .home-big.hot { color: #b3261e; }
.trend-foot.good { color: #287351; font-weight: 500; }
.trend-foot.warn { color: #a35418; font-weight: 500; }
.extra-chips { display: flex; flex-wrap: wrap; gap: 4px; min-height: 38px; align-content: flex-start; }
.extra-chips span { padding: 1px 7px; border-radius: 999px; background: #eef4f8; font-size: calc(12px * var(--fs, 1)); white-space: nowrap; }
.extra-chips span.done { background: #e2f4ea; color: #287351; font-weight: 500; }
.moment-row { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 8px; align-items: center; }
.moment-thumb { width: 52px; height: 52px; border-radius: 10px; object-fit: cover; }
.moment-thumb.empty { display: grid; place-items: center; background: #fff1d6; font-size: calc(22px * var(--fs, 1)); }
.moment-text { display: grid; min-width: 0; }
.moment-text strong { font-size: calc(14px * var(--fs, 1)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.guide-mini { display: grid; gap: 3px; font-size: calc(13px * var(--fs, 1)); }
.guide-mini > span { display: flex; align-items: baseline; gap: 4px; white-space: nowrap; }
.guide-mini b { color: var(--muted); font-size: calc(12px * var(--fs, 1)); font-weight: 500; }
.guide-mini small { margin-left: auto; font-size: calc(11px * var(--fs, 1)); font-weight: 500; }
.guide-mini .ok small { color: #23744b; }
.guide-mini .low small, .guide-mini .high small { color: #a35418; }
/* 洗澡（v132，bath.js）：菜单图标底色、时长按钮（一行五个，再点一下取消）、水温 − / ＋、顺便做了 */
.bath-icon { background: #dcf1f5; }
.feed-form .bath-minutes { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.feed-form .bath-minutes button { min-height: 36px; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); box-shadow: none; color: var(--text); font: inherit; font-size: calc(14px * var(--fs, 1)); font-weight: 400; white-space: nowrap; }
.feed-form .bath-minutes button[aria-pressed="true"], #bath-chips button[aria-pressed="true"] { border-color: transparent; background: #e3f0fa; color: #1f6a9e; font-weight: 400; }
#bath-chips button { font-weight: 400; }
.feed-form .bath-temp-row { display: grid; grid-template-columns: 40px minmax(0, 1fr) 40px auto; align-items: center; gap: 10px; }
.feed-form .bath-step { width: 40px; height: 40px; min-height: 0; margin: 0; padding: 0; border: 0; border-radius: 50%; background: var(--fill); box-shadow: none; color: var(--text); font: inherit; font-size: calc(22px * var(--fs, 1)); line-height: 1; }
.feed-form .bath-step:disabled { opacity: 0.35; }
.feed-form .bath-temp-row output { color: var(--text); font-size: calc(22px * var(--fs, 1)); font-weight: 600; font-variant-numeric: tabular-nums; text-align: center; }
.feed-form .bath-temp-row output.empty { color: var(--muted); font-size: calc(17px * var(--fs, 1)); font-weight: 400; }
.feed-form .bath-temp-skip { min-height: 32px; margin: 0; padding: 0 12px; border: 0; border-radius: 999px; background: none; box-shadow: none; color: #1f6a9e; font: inherit; font-size: calc(14px * var(--fs, 1)); font-weight: 400; }
.feed-form .bath-temp-note { margin: 0; color: #11798c; font-size: calc(13px * var(--fs, 1)); text-align: center; }
.feed-form .bath-temp-note.hot { color: #b4531a; }
.feed-form .bath-hidden-value { position: absolute; width: 1px; height: 1px; min-height: 0; padding: 0; border: 0; opacity: 0; pointer-events: none; }
/* “怎么洗”三个选项：320 宽时 112px 的标签列太宽，选项会竖着折成两行；标签按字宽，选项占满剩下的 */
#bath-kind-row { grid-template-columns: auto minmax(0, 1fr); gap: 12px; }
#bath-kind-row .segmented { justify-self: stretch; display: flex; }
#bath-kind-row .segmented label { flex: 1; min-width: 0; }
#bath-kind-row .segmented span { white-space: nowrap; }
