/* 首页：喂奶圆环和各图表卡片、近期安排。
   样式按原 styles.css 的顺序拆成 base → home → components → forms → features，index.html 按这个顺序加载；后面的覆盖前面的，调整时不要打乱顺序。 */

/* 首页图表卡片（home-charts.js）：大卡（距上次喂奶圆环）→ 两格并排（奶量环形图、尿布图标格）→ 整行 24 小时钟面 → 近期安排 → 两格并排（体重小折线、里程碑）。
   小字说明用 #5f6e7c（白底对比度够 4.5:1；--muted 只用在大字或次要装饰）。 */
.milk-hero { display: flex; align-items: center; gap: 16px; margin-top: 12px; padding: 16px; border-radius: 18px; background: var(--surface); box-shadow: 0 16px 38px rgba(77, 143, 177, 0.16); }
.milk-ring { flex: 0 0 auto; width: 96px; height: 96px; }
.milk-hero-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; color: #5f6e7c; font-size: calc(13px * var(--fs, 1)); }
.milk-hero-text #since-milk { color: var(--text); font-size: calc(27px * var(--fs, 1)); font-weight: 600; line-height: 1.15; letter-spacing: -0.3px; }
#milk-next { color: #2f6f99; font-size: calc(14px * var(--fs, 1)); font-weight: 500; }
#milk-next.over { color: #b24a63; }
#milk-interval:empty, #milk-next:empty, #next-side:empty { display: none; }
#next-side { color: #b24a63; font-size: calc(12px * var(--fs, 1)); }
.latest-feeding { overflow-wrap: anywhere; }
.home-card-label { color: #5f6e7c; font-size: calc(13px * var(--fs, 1)); }
.home-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 12px; }
.home-card { display: flex; flex-direction: column; gap: 6px; min-width: 0; padding: 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); }
.home-card[hidden] { display: none; }
.home-card-title { font-size: calc(14px * var(--fs, 1)); font-weight: 500; }
.home-small { color: #3f4d5a; font-size: calc(12px * var(--fs, 1)); }
.home-note { color: #5f6e7c; font-size: calc(12px * var(--fs, 1)); }
.home-note.good { color: #287351; font-weight: 500; }
.home-note.bottom { margin-top: auto; }
.home-big { font-size: calc(24px * var(--fs, 1)); font-weight: 600; }
.home-big small { font-size: calc(13px * var(--fs, 1)); font-weight: 600; }
.home-donut svg { display: block; width: 100%; max-width: 132px; margin: 0 auto; }
.home-legend { display: flex; flex-direction: column; gap: 3px; color: #3f4d5a; font-size: calc(12px * var(--fs, 1)); }
.home-legend span { display: flex; align-items: center; gap: 6px; }
.home-legend .key { flex: 0 0 auto; width: 9px; height: 9px; border-radius: 3px; }
.home-legend .key.ring { box-sizing: border-box; border: 2px solid; border-radius: 50%; }
.diaper-icons { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 3px; align-items: center; min-height: 22px; }
.diaper-icons svg { width: 100%; max-width: 22px; height: 22px; }
.diaper-icons b { color: #3f4d5a; font-size: calc(12px * var(--fs, 1)); }
.diaper-icons .none { grid-column: 1 / -1; color: #5f6e7c; font-size: calc(12px * var(--fs, 1)); }
.home-clock { margin-top: 12px; align-items: center; }
.home-clock-head { align-self: stretch; display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.home-clock-head .home-card-title { font-size: calc(16px * var(--fs, 1)); }
.home-clock-head small { color: #5f6e7c; font-size: calc(12px * var(--fs, 1)); }
.home-clock-face { width: min(100%, 300px); }
.home-clock-face svg { display: block; width: 100%; height: auto; }
.home-clock-legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 14px; color: #3f4d5a; font-size: calc(12px * var(--fs, 1)); }
.home-clock-legend span { display: flex; align-items: center; gap: 5px; }
.home-clock-legend svg { width: 18px; height: 18px; }
.night-key { width: 14px; height: 9px; border-radius: 2px; background: #e4e7f7; }
.home-weight { cursor: pointer; }
.home-weight svg { display: block; width: 100%; height: auto; }
.home-weight:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.milestone-bar { height: 10px; margin-top: 6px; overflow: hidden; border-radius: 5px; background: #f0eafc; }
.milestone-bar i { display: block; height: 100%; border-radius: 5px; background: #8a7be0; }
.milestone-ends { display: flex; justify-content: space-between; gap: 4px; color: #5f6e7c; font-size: calc(11px * var(--fs, 1)); }
.upcoming-list { overflow: hidden; border-radius: 12px; background: var(--surface); }
.upcoming-row { display: grid; grid-template-columns: 28px 86px minmax(0, 1fr) 12px; align-items: center; gap: 9px; width: 100%; min-height: 66px; padding: 12px; border: 0; background: transparent; color: var(--text); text-align: left; font: inherit; cursor: pointer; }
.upcoming-row + .upcoming-row { border-top: 1px solid var(--line); }
.upcoming-icon { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; color: #fff; font-size: calc(13px * var(--fs, 1)); }
.upcoming-date { font-size: calc(12px * var(--fs, 1)); font-weight: 500; }
.upcoming-info { min-width: 0; overflow-wrap: anywhere; }
.upcoming-info strong, .upcoming-info small { display: block; }
.upcoming-info strong { font-size: calc(14px * var(--fs, 1)); }
.upcoming-info small { margin-top: 4px; color: var(--muted); font-size: calc(12px * var(--fs, 1)); }
.upcoming-row.overdue .upcoming-info small { color: var(--rose); }
.upcoming-arrow { color: var(--muted); }
.upcoming-row:focus-visible, .undated-plans button:focus-visible { outline: 2px solid var(--blue); outline-offset: -2px; }
.upcoming-empty { margin: 0; padding: 12px; color: var(--muted); font-size: calc(13px * var(--fs, 1)); }
.undated-plans button { display: block; width: 100%; min-height: 44px; padding: 10px 0; border: 0; background: transparent; color: var(--blue); text-align: left; font: inherit; font-size: calc(13px * var(--fs, 1)); cursor: pointer; }
