.baby-screen { gap: 16px; }
.baby-screen h1 { overflow-wrap: anywhere; }
.baby-header-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.baby-icon.icon-button { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; min-width: 44px; padding: 0; flex-shrink: 0; background: #edf3f5; color: #172126; border: 1px solid #d5e0e6; }
.baby-icon:disabled { opacity: .45; cursor: default; }
.baby-icon img, .baby-quick img, .baby-home-link > img { width: 22px; height: 22px; display: block; }
.baby-home-link { display: grid; grid-template-columns: 24px minmax(0, 1fr) 24px; gap: 12px; align-items: center; padding: 14px 16px; background: #eef8f6; border: 1px solid #c6dedb; border-radius: 8px; color: #172126; text-decoration: none; }
.baby-home-link strong, .baby-home-link small { display: block; overflow-wrap: anywhere; }
.baby-home-link small { font-size: 13px; color: #617078; }
.baby-instructions { border-bottom: 1px solid #d5e0e6; padding: 0 0 12px; }
.baby-instructions summary { cursor: pointer; font-weight: 700; padding: 8px 0; }
.baby-instructions p { white-space: pre-wrap; overflow-wrap: anywhere; margin: 8px 0; }
.baby-quick-actions { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.baby-quick { min-width: 0; border: 1px solid #d5e0e6; border-radius: 8px; padding: 12px 4px; background: white; color: #172126; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; font-size: 14px; line-height: 1.2; }
.baby-quick:hover { border-color: #107b77; }
.baby-quick:disabled { opacity: .55; cursor: default; }
.baby-active-sleep { background: #eeeaf9; border-left: 3px solid #8970b3; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px; }
.baby-active-sleep > div { min-width: 0; }
.baby-active-sleep small { display: block; font-size: 13px; color: #5f596b; }
.baby-day-nav { display: grid; grid-template-columns: 44px minmax(0, 210px) 44px; gap: 12px; justify-content: center; align-items: center; }
.baby-day-nav label { display: grid; text-align: center; gap: 4px; min-width: 0; }
.baby-day-nav label > span { font-size: 13px; color: #617078; text-transform: capitalize; }
.baby-day-nav input { width: 100%; min-width: 0; max-width: 100%; font-size: 16px; padding: 8px; height: 40px; text-align: center; }
.baby-totals { display: grid; grid-template-columns: 1.5fr 1fr .8fr; gap: 12px; margin: 0; padding: 12px 0; border-block: 1px solid #d5e0e6; }
.baby-totals dt { font-size: 13px; color: #617078; font-weight: 600; }
.baby-totals dd { font-size: 20px; font-weight: 700; margin: 0; }
.baby-totals dd small { font-size: 13px; font-weight: 500; white-space: normal; overflow-wrap: anywhere; }
.baby-entry { position: relative; display: flex; align-items: flex-start; gap: 10px; min-height: 64px; padding: 12px 8px; border-bottom: 1px solid #dce5e9; }
.baby-entry-icon { width: 32px; height: 32px; padding: 6px; background: #e3f3ef; border-radius: 8px; flex-shrink: 0; margin-top: 4px; }
.baby-kind-sleep .baby-entry-icon { background: #eeeaf9; }
.baby-kind-diaper .baby-entry-icon { background: #f9edd4; }
.baby-kind-note .baby-entry-icon { background: #e6eef8; }
.baby-entry-body { flex: 1; min-width: 0; }
.baby-entry-edit { display: flex; width: 100%; min-height: 28px; align-items: center; justify-content: space-between; gap: 12px; text-align: left; border: 0; background: transparent; padding: 2px 0; border-radius: 0; color: #172126; min-width: 0; }
/* One native edit button owns the whole row, including its icon, notes and padding. */
button.baby-entry-edit { position: static; cursor: pointer; touch-action: manipulation; }
button.baby-entry-edit::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: 6px; }
.baby-screen button.baby-entry-edit:focus-visible { outline: none; }
button.baby-entry-edit:focus-visible::after { outline: 2px solid #107b77; outline-offset: -2px; }
button.baby-entry-edit:active::after { background: rgb(16 123 119 / 8%); }
.baby-entry-chevron { width: 16px; height: 16px; flex-shrink: 0; align-self: center; opacity: .6; }
@media (hover: hover) and (pointer: fine) {
    button.baby-entry-edit:hover::after { background: rgb(16 123 119 / 4%); }
}
.baby-entry-edit strong { font-size: 16px; min-width: 0; overflow-wrap: anywhere; }
.baby-entry-edit time { font-size: 13px; color: #536773; font-weight: 500; flex-shrink: 0; }
.baby-entry-body > small { color: #617078; font-size: 12px; }
.baby-entry-body p { margin: 4px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; }
.baby-empty { padding: 24px 0; }
.baby-empty-day { padding: 24px 0; text-align: center; }
.baby-access-note { font-size: 12px; color: #617078; margin: 0; }
.baby-notice { color: #107b77; font-size: 14px; margin: 0; }
.baby-dialog { box-sizing: border-box; width: min(520px, calc(100vw - 24px)); max-width: calc(100vw - 24px); max-height: calc(var(--family-vh, 100dvh) - 24px); position: fixed; top: calc(var(--family-vv-top, 0px) + var(--family-vh, 100dvh) / 2); bottom: auto; transform: translateY(-50%); margin: 0 auto; padding: 20px; border: 1px solid #d5e0e6; border-radius: 8px; background: white; color: #172126; overflow-y: auto; overscroll-behavior: contain; }
.baby-dialog::backdrop { background: rgb(23 33 38 / 38%); }
.baby-dialog > header { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; }
.baby-dialog h2 { font-size: 20px; margin: 0; }
.baby-dialog .planning-dialog-close { position: static; }
.baby-error { background: #fff1ef; color: #a43129; padding: 10px; border-radius: 4px; font-size: 14px; }
.baby-form { display: grid; gap: 14px; }
.baby-form label { display: grid; gap: 6px; font-size: 14px; min-width: 0; }
.baby-form label small { font-size: 12px; font-weight: normal; color: #617078; }
.baby-form input:not([type=checkbox]), .baby-form select, .baby-form textarea { box-sizing: border-box; width: 100%; min-width: 0; max-width: 100%; font-size: 16px; border: 1px solid #cedde2; border-radius: 8px; padding: 10px 12px; background: #fbfdfd; }
.baby-form input[type=date], .baby-form input[type=time] { display: block; -webkit-appearance: none; appearance: none; min-height: 44px; }
.baby-form input::-webkit-date-and-time-value { min-height: 1.2em; text-align: left; }
.baby-form textarea { resize: vertical; }
.baby-form fieldset { border: 0; padding: 12px 0; margin: 0; border-top: 1px solid #d5e0e6; min-width: 0; }
.baby-form legend { font-size: 16px; font-weight: 700; padding: 0; }
.baby-form fieldset p { font-size: 13px; color: #617078; margin: 8px 0; }
.baby-form .baby-check { display: flex; align-items: center; gap: 10px; min-height: 44px; }
.baby-check input { width: 20px; height: 20px; margin: 0; flex-shrink: 0; accent-color: #107b77; }
.baby-form-child { font-weight: 700; color: #107b77; margin: 0; }
.baby-export-open { width: 100%; margin-bottom: 16px; }
.baby-export { min-width: 0; }
.baby-export-options, .baby-export-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.baby-export-options small { font-size: 12px; color: #617078; }
.baby-export-actions .primary-button { flex: 1; }
.baby-export .baby-export-text { min-height: 160px; max-height: 32dvh; white-space: pre-wrap; overflow-wrap: anywhere; resize: vertical; }
.baby-export-copy-status:empty { display: none; }
.baby-export .baby-date-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 399px) {
    .baby-export .baby-date-fields { grid-template-columns: minmax(0, 1fr); }
}
.baby-meal-modes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; padding: 4px; background: #edf3f5; border-radius: 8px; }
.baby-meal-modes button, .baby-meal-amounts button, .baby-last-amount { display: inline-flex; align-items: center; justify-content: center; min-width: 0; min-height: 44px; padding: 8px; font-size: 14px; line-height: 1.2; border: 1px solid #cedde2; border-radius: 6px; color: #172126; background: white; }
.baby-meal-modes button { background: transparent; border-color: transparent; }
.baby-meal-modes button[aria-pressed=true] { background: #107b77; color: white; }
.baby-meal-amounts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.baby-meal-amounts button[aria-pressed=true] { border-color: #107b77; background: #e3f3ef; color: #076e6a; }
.baby-last-amount { justify-self: start; padding-inline: 12px; color: #076e6a; }
.baby-meal-options { min-width: 0; border-top: 1px solid #d5e0e6; }
.baby-meal-options summary { cursor: pointer; padding: 12px 0; min-height: 44px; font-size: 14px; color: #617078; overflow-wrap: anywhere; }
.baby-meal-options > div { display: grid; gap: 14px; padding-bottom: 4px; }
.baby-date-fields { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 10px; }
.baby-delete-confirm { display: grid; gap: 8px; }
.baby-delete-confirm p { font-size: 14px; margin: 0; }
.baby-archive-action { margin-top: 20px; padding-top: 16px; border-top: 1px solid #d5e0e6; }
.baby-archive-action button { color: #a43129; }
.baby-archive-warning { margin: 0; font-size: 14px; overflow-wrap: anywhere; }
.baby-form .danger-button:disabled { opacity: .5; cursor: not-allowed; }
.baby-archives { border-top: 1px solid #d5e0e6; padding-top: 12px; }
.baby-archives summary { cursor: pointer; padding: 10px 0; color: #617078; font-size: 14px; }
.baby-archives p { font-size: 13px; color: #617078; margin: 8px 0; }
.baby-archive-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0; }
.baby-archive-row strong { min-width: 0; overflow-wrap: anywhere; }
.baby-archive-row button { flex-shrink: 0; }
.baby-screen button:focus-visible, .baby-dialog button:focus-visible { outline: 3px solid #88bbb8; outline-offset: 2px; }
.baby-now { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; padding: 4px 0; }
.baby-now > div { display: flex; align-items: center; gap: 10px; min-width: 0; }
.baby-now img { width: 22px; height: 22px; flex-shrink: 0; }
.baby-now strong, .baby-now small { display: block; overflow-wrap: anywhere; }
.baby-now strong { font-size: 13px; }
.baby-now small { font-size: 12px; color: #617078; }
.baby-now > div > span { flex: 1; min-width: 0; }
.baby-now .baby-active-sleep { padding: 8px; gap: 8px; flex-wrap: wrap; }
.baby-now .baby-active-sleep button { min-height: 44px; font-size: 13px; flex-shrink: 0; }
.baby-tabs { display: flex; border-bottom: 1px solid #d5e0e6; gap: 4px; }
.baby-tabs button { flex: 1; min-width: 0; min-height: 44px; padding: 10px 4px; border: 0; border-bottom: 3px solid transparent; border-radius: 0; background: transparent; color: #617078; font-size: 14px; text-align: center; display: inline-flex; justify-content: center; align-items: center; }
.baby-tabs button.is-active { color: #107b77; border-bottom-color: #107b77; }
.baby-section-header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.baby-section-header h2 { font-size: 18px; margin: 0; }
.baby-section-header small { display: block; color: #617078; font-size: 12px; }
.baby-section-header button { flex-shrink: 0; min-height: 44px; }
.baby-trend-totals { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 24px; }
.baby-trend-totals dd small { display: block; }
.baby-trend-table { display: grid; margin-bottom: 12px; }
.baby-trend-table > div { display: grid; grid-template-columns: minmax(0, 1fr) repeat(4, minmax(0, 1fr)); align-items: center; gap: 4px; min-height: 44px; border-bottom: 1px solid #e4ebee; }
.baby-trend-table span { min-width: 0; text-align: center; font-size: 13px; overflow-wrap: anywhere; }
.baby-trend-head span { font-size: 12px; color: #617078; }
.baby-trend-date { min-width: 0; min-height: 44px; padding: 4px 0; background: transparent; border: 0; color: #107b77; border-radius: 0; font-size: 13px; text-align: left; }
.baby-trend-table .is-empty { color: #859299; }
.baby-followup { min-width: 0; }
.baby-weight-current { display: flex; gap: 4px 14px; flex-wrap: wrap; align-items: baseline; margin: 16px 0; }
.baby-weight-current > strong { font-size: 30px; }
.baby-weight-current > strong small { font-size: 16px; }
.baby-weight-current > span { color: #617078; font-size: 13px; }
.baby-weight-chart { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 8px; margin: 20px 0; }
.baby-chart-scale { display: flex; flex-direction: column; justify-content: space-between; font-size: 12px; color: #617078; padding: 2px 0; }
.baby-weight-chart svg { display: block; width: 100%; height: 108px; overflow: visible; }
.baby-weight-chart polyline { fill: none; stroke: #107b77; stroke-width: 2; vector-effect: non-scaling-stroke; }
.baby-weight-chart circle { fill: #107b77; }
.baby-chart-grid { stroke: #d5e0e6; stroke-width: 1; fill: none; }
.baby-weight-chart figcaption { grid-column: 2; display: flex; justify-content: space-between; gap: 8px; font-size: 12px; color: #617078; }
.baby-followup-row { display: grid; grid-template-columns: minmax(0, 1fr) auto 20px; gap: 8px; width: 100%; min-width: 0; align-items: center; min-height: 52px; padding: 12px 0; text-align: left; border: 0; border-bottom: 1px solid #d5e0e6; border-radius: 0; color: #172126; background: transparent; font-size: 14px; }
.baby-followup-row > img { width: 18px; height: 18px; }
.baby-followup-row > small { grid-column: 1 / -1; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 12px; color: #617078; }
.baby-followup-row time, .baby-followup-row strong { min-width: 0; overflow-wrap: anywhere; }
.baby-relay-row > span:first-child { min-width: 0; }
.baby-relay-row strong, .baby-relay-row small { display: block; }
.baby-relay-row small { font-size: 13px; color: #617078; font-weight: normal; margin-top: 4px; }
.baby-relay-row.is-current { background: #edf8f3; box-shadow: inset 3px 0 #107b77; padding-inline: 10px; }
.baby-relay-status { max-width: 95px; font-size: 12px; color: #617078; text-align: right; }
.baby-relay-gap { margin: 8px 0; color: #866111; font-size: 13px; }
@media (max-width: 480px) {
    .baby-now { grid-template-columns: minmax(0, 1fr); gap: 8px; }
    .baby-trend-totals { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .baby-trend-head span { font-size: 11px; }
    .baby-screen .hero-header { align-items: center; flex-wrap: wrap; }
    .baby-screen h1 { font-size: 28px; }
    .baby-quick-actions { gap: 4px; }
    .baby-quick { font-size: 12px; }
    .baby-active-sleep { flex-wrap: wrap; }
    .baby-totals { gap: 8px; }
    .baby-totals dd small { display: block; }
    .baby-entry-edit { flex-wrap: wrap; gap: 2px 8px; }
    .baby-dialog { padding: 14px; }
}
@media (max-width: 400px) {
    .baby-date-fields { grid-template-columns: minmax(0, 1fr); }
}

.baby-window-tabs { display: flex; gap: 4px; border-bottom: 1px solid #d5e0e6; }
.baby-window-tabs button { min-height: 44px; border: 0; background: transparent; padding: 6px 12px; color: #53646c; font-size: 14px; }
.baby-window-tabs button[aria-pressed="true"] { color: #107b77; box-shadow: inset 0 -3px #107b77; }
.baby-timeline { padding: 8px 0; }
.baby-timeline-axis { display: flex; justify-content: space-between; margin-left: 64px; color: #53646c; font-size: 11px; }
.baby-timeline-row { display: grid; grid-template-columns: 64px minmax(0, 1fr); align-items: center; min-height: 26px; font-size: 12px; }
.baby-timeline-track { height: 18px; position: relative; background: #eef2f3; overflow: hidden; border-radius: 3px; }
.baby-timeline-mark { position: absolute; top: 3px; height: 12px; background: #107b77; border-radius: 2px; }
.baby-timeline-mark.kind-breastfeed { background: #2d7c49; }
.baby-timeline-mark.kind-sleep { background: #596ac1; }
.baby-timeline-mark.kind-diaper { background: #b77e1c; }
.baby-reminders, .baby-reminders .baby-form { display: grid; gap: 12px; min-width: 0; }
.baby-reminders .baby-form { padding-block: 12px; border-bottom: 1px solid #d5e0e6; }
.baby-reminder-row { display: flex; align-items: center; gap: 8px; min-width: 0; border-bottom: 1px solid #d5e0e6; padding: 8px 0; }
.baby-reminder-edit { min-width: 0; flex: 1; display: grid; text-align: left; border: 0; background: transparent; padding: 8px 0; min-height: 44px; }
.baby-reminder-edit strong, .baby-reminder-edit small { overflow-wrap: anywhere; }
.baby-reminder-edit small { font-size: 12px; font-weight: normal; color: #53646c; }
.baby-reminder-row.is-due { border-left: 3px solid #b77e1c; padding-left: 8px; }
.baby-reminder-row.is-done .baby-reminder-edit strong { text-decoration: line-through; }
.baby-reminder-notice { width: 100%; min-height: 44px; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 12px; border: 1px solid #e0d2ac; border-radius: 6px; background: #fff9eb; color: #624c12; }
.baby-reminder-notice img { width: 18px; height: 18px; }
.baby-trend-table [role="cell"] small { display: block; font-size: 11px; line-height: 1.4; overflow-wrap: anywhere; }
.baby-tabs { flex-wrap: wrap; }
.baby-measurement { display: block; color: #107b77; }
.baby-form .baby-grant { display: grid; gap: 6px; padding-block: 8px; min-width: 0; overflow-wrap: anywhere; }
.baby-grant select { width: 100%; max-width: 100%; min-width: 0; min-height: 44px; font-size: 16px; }
.baby-handovers { border-block: 1px solid #d5e0e6; padding-block: 8px; min-width: 0; }
.baby-handovers h2 { font-size: 16px; margin: 0; }
.baby-handover-line { border-left: 3px solid #107b77; padding: 8px 10px; margin-block: 8px; background: #f0f8f7; border-radius: 4px; overflow-wrap: anywhere; }
.baby-handover-line p { white-space: pre-wrap; margin: 4px 0 8px; }
.baby-handover-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; }
.baby-handover-actions details { min-width: 0; max-width: 100%; }
.baby-handover-actions small { display: block; }
.baby-handover-actions summary, .baby-navigation-settings summary, .baby-routine-settings summary { min-height: 44px; padding-block: 12px; font-size: 13px; cursor: pointer; }
.baby-now .baby-feed-cue { color: #46656a; font-size: 12px; }
.baby-passation-notice { display: flex; align-items: center; gap: 8px; min-height: 44px; width: 100%; padding: 4px 0; border: 0; background: transparent; color: #46656a; text-align: left; font-size: 13px; }
.baby-passation-notice span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.baby-passation-notice img { width: 18px; height: 18px; flex-shrink: 0; }
.baby-entry-body > .baby-measurement-partial { width: fit-content; max-width: 100%; padding: 2px 6px; margin-top: 4px; border-radius: 4px; background: #edf2f4; color: #536773; font-size: 12px; overflow-wrap: anywhere; }
.baby-dialog fieldset { min-width: 0; }
.baby-navigation-settings { border-top: 1px solid #d5e0e6; font-size: 13px; }
.baby-routine-settings { margin-block: 12px; }
.baby-quick-add { display: grid; grid-template-columns: minmax(0, 1fr) 44px; gap: 8px; min-width: 0; }
.baby-quick-add input { min-width: 0; width: 100%; font-size: 16px; }
.baby-quick-add button { width: 44px; height: 44px; padding: 0; display: grid; place-items: center; }
.baby-reminder-check { display: grid; place-items: center; flex: 0 0 44px; min-height: 44px; }
.baby-reminder-check input { width: 22px; height: 22px; accent-color: #107b77; }
.nav-more-dots { position: relative; }
.nav-more-dots .nav-unread-badge { position: absolute; }
.task-quick-add { display: grid; grid-template-columns: minmax(0, 1fr) 44px; gap: 8px; margin-block: 10px; }
.task-quick-add input { width: 100%; min-width: 0; font-size: 16px; }
.task-quick-add button { width: 44px; min-height: 44px; padding: 0; display: grid; place-items: center; }
.task-checklist-row { display: grid; grid-template-columns: 44px minmax(0, 1fr); border-bottom: 1px solid #d5e0e6; align-items: start; }
.task-checklist-row summary { padding: 10px 4px; min-height: 48px; cursor: pointer; overflow-wrap: anywhere; }
.task-checklist-row summary small { display: block; font-size: 12px; color: #53646c; }
.task-checklist-row .task-detail-card { border: 0; box-shadow: none; padding: 4px; }
.home-message-notice { display: flex; gap: 8px; align-items: center; padding: 10px 12px; min-height: 44px; border-left: 3px solid #107b77; background: #eef8f5; color: #155f5b; }
.task-add-form.detailed .task-repeat-toggle { display: flex; align-items: center; min-height: 44px; }
.task-add-form.detailed .task-repeat-toggle input[type="checkbox"] { width: 22px; height: 22px; min-height: 22px; flex: 0 0 22px; }
.baby-handovers .baby-section-header { margin-bottom: 0; }
@media (max-width: 360px) {
    .bottom-nav .bottom-nav-item { font-size: 10px; }
}
