:root {
  --font-ui: "Huninn", ui-rounded, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang TC", "Hiragino Sans GB", "Noto Sans TC", "Microsoft JhengHei", sans-serif;
  --paper: #f7f3ec;
  --surface: #fffdf8;
  --surface-raised: #ffffff;
  --surface-inset: #f0ebe2;
  --ink: #2d2b27;
  --ink-soft: #655f56;
  --ink-muted: #928b80;
  --line: rgba(73, 63, 49, 0.13);
  --line-strong: rgba(73, 63, 49, 0.22);
  --sun: #f4b942;
  --sun-dark: #a97100;
  --sun-wash: #fff3ce;
  --sage: #7c9b83;
  --sage-wash: #e5efe5;
  --coral: #e77d61;
  --coral-wash: #fbe7e0;
  --sky: #6fa9b6;
  --sky-wash: #e4f1f2;
  --lilac: #9a8db7;
  --lilac-wash: #eee9f6;
  --danger: #bf5448;
  --success: #4e8265;
  --shadow-soft: 0 10px 28px rgba(75, 60, 37, 0.07);
  --shadow-float: 0 18px 50px rgba(75, 60, 37, 0.15);
  --radius-sm: 7px;
  --radius-md: 11px;
  --radius-lg: 15px;
  --space: 8px;
  --control-height: 44px;
  --action-height: 40px;
  --mobile-nav-edge: max(12px, env(safe-area-inset-bottom));
  --mobile-nav-height: 68px;
  --type-caption: 0.75rem;
  --type-secondary: 0.875rem;
  --type-body: 1rem;
  --type-subheading: 1.125rem;
  --type-title: 2rem;
  --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
  color-scheme: light;
}

html[data-theme="dark"] {
  --paper: #1e1e1b;
  --surface: #292824;
  --surface-raised: #32302b;
  --surface-inset: #39362f;
  --ink: #f4efe6;
  --ink-soft: #c4bdb1;
  --ink-muted: #999184;
  --line: rgba(244, 239, 230, 0.13);
  --line-strong: rgba(244, 239, 230, 0.24);
  --sun-wash: #4a3d20;
  --sage-wash: #293b2d;
  --coral-wash: #492d27;
  --sky-wash: #233b40;
  --lilac-wash: #362f48;
  --shadow-soft: 0 10px 28px rgba(0, 0, 0, 0.18);
  --shadow-float: 0 18px 50px rgba(0, 0, 0, 0.35);
  color-scheme: dark;
}

* { box-sizing: border-box; }

html { min-width: 320px; background: var(--paper); }

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--font-ui);
  font-kerning: normal;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

button, input, select, textarea { font: inherit; }
button { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid rgba(244, 185, 66, 0.42);
  outline-offset: 2px;
}
a { color: inherit; text-decoration: none; }

.app-shell { min-height: 100dvh; }
.app-layout {
  display: grid;
  grid-template-columns: 244px minmax(0, 1fr);
  min-height: 100dvh;
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: calc(var(--space) * 3);
  padding: 24px 16px 20px;
  background: var(--surface);
  border-right: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 2px 10px 12px;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  color: #523a0f;
  background: var(--sun);
  box-shadow: 3px 3px 0 rgba(169, 113, 0, 0.13);
}
.brand-mark svg { width: 20px; height: 20px; }
.brand-name { font-size: 20px; font-weight: 780; letter-spacing: -0.02em; }
.brand-subtitle { margin: 1px 0 0; color: var(--ink-muted); font-size: 11px; }

.child-card {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--sun-wash);
  cursor: pointer;
}
.child-avatar {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: var(--sun);
  color: #5b410d;
  font-size: 18px;
  font-weight: 760;
  overflow: hidden;
}
.child-avatar img, .avatar-mini img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.child-copy { min-width: 0; flex: 1; }
.child-name { display: block; font-size: 14px; font-weight: 740; }
.child-age { display: block; margin-top: 2px; color: var(--ink-soft); font-size: 12px; }
.child-chevron { color: var(--sun-dark); }

.nav-label {
  padding: 0 12px 4px;
  color: var(--ink-muted);
  font-size: 11px;
  font-weight: 760;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.nav-list { display: grid; gap: 4px; }
.nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 44px;
  padding: 0 12px;
  border: 0;
  border-radius: 12px;
  color: var(--ink-soft);
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition: background 160ms ease-out, color 160ms ease-out;
}
.nav-item:hover { background: var(--surface-inset); color: var(--ink); }
.nav-item.active { color: var(--ink); background: var(--sun-wash); font-weight: 700; }
.nav-item.active .nav-icon { color: var(--sun-dark); }
.nav-icon { display: grid; place-items: center; width: 18px; color: var(--ink-muted); }
.nav-icon svg { width: 18px; height: 18px; }
.nav-count {
  margin-left: auto;
  padding: 2px 7px;
  border-radius: 999px;
  color: var(--coral);
  background: var(--coral-wash);
  font-size: 11px;
  font-weight: 760;
}
.sidebar-footer { margin-top: auto; display: grid; gap: 10px; }
.sync-note {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--ink-muted);
  font-size: 11px;
}
.sync-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--success); }
.sidebar-settings { display: flex; justify-content: space-between; align-items: center; padding: 8px 12px; color: var(--ink-muted); font-size: 12px; }

.main-panel { min-width: 0; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 72px;
  padding: 0 40px;
  border-bottom: 1px solid var(--line);
  background: rgba(247, 243, 236, 0.94);
  backdrop-filter: blur(12px);
}
html[data-theme="dark"] .topbar { background: rgba(30, 30, 27, 0.94); }
.topbar .mobile-menu { display: none; }
.breadcrumbs { display: flex; align-items: center; gap: 8px; color: var(--ink-muted); font-size: 12px; }
.breadcrumbs strong { color: var(--ink); font-size: 14px; }
.mobile-breadcrumb-title { display: none; }
.mobile-child-context { display: none; }
.topbar-actions { display: flex; align-items: center; gap: 8px; }
.icon-button, .ghost-button, .primary-button, .text-button, .segmented-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: var(--action-height);
  min-height: var(--action-height);
  padding-block: 0;
  box-sizing: border-box;
  font-size: 13px;
  line-height: 1;
  border: 1px solid transparent;
  border-radius: 11px;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
  transition: transform 160ms ease-out, background 160ms ease-out, border-color 160ms ease-out, color 160ms ease-out;
}
.icon-button:hover, .ghost-button:hover, .primary-button:hover, .text-button:hover, .segmented-button:hover { transform: translateY(-1px); }
.icon-button { width: 40px; padding: 0; color: var(--ink-soft); border-color: var(--line); background: var(--surface); }
.icon-button svg { width: 18px; height: 18px; }
.ghost-button { padding: 0 13px; color: var(--ink-soft); border-color: var(--line); background: var(--surface); font-weight: 650; }
.primary-button { padding: 0 15px; color: #523a0f; border-color: var(--sun); background: var(--sun); font-weight: 700; box-shadow: none; }
.primary-button:hover { background: #f7c75d; }
.text-button { padding: 0 8px; color: var(--sun-dark); background: transparent; font-weight: 650; }
.avatar-mini { display: grid; place-items: center; width: 34px; height: 34px; padding: 0; overflow: hidden; border: 2px solid var(--surface); border-radius: 50%; color: #6b4e12; background: var(--sun); font-size: 12px; font-weight: 780; box-shadow: 0 0 0 1px var(--line); cursor: pointer; }

.page { width: min(1240px, calc(100% - 80px)); margin: 0 auto; padding: 34px 0 80px; }
.page-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; margin-bottom: 24px; }
.eyebrow { margin: 0 0 7px; color: var(--ink-muted); font-size: 12px; font-weight: 650; letter-spacing: 0.05em; }
.page-title { margin: 0; color: var(--ink); font-size: clamp(28px, 3vw, 40px); font-weight: 800; line-height: 1.12; letter-spacing: -0.035em; text-wrap: balance; }
.child-name-accent { color: var(--sun-dark); }
html[data-theme="dark"] .child-name-accent { color: var(--sun); }
.page-description { max-width: 560px; margin: 9px 0 0; color: var(--ink-soft); font-size: 14px; text-wrap: pretty; }
.page-inline-meta { display: block; margin-top: 6px; color: var(--ink-muted); font-size: 12px; font-weight: 650; }
.heading-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.date-actions { display: flex; align-items: center; gap: 8px; }
.date-switcher { display: flex; align-items: center; gap: 5px; height: 40px; padding: 3px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-sizing: border-box; }
.date-switcher .icon-button { width: 32px; height: 32px; min-height: 32px; border: 0; background: transparent; }
.date-label { min-width: 104px; text-align: center; font-size: 13px; font-weight: 700; }

.stat-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}
.hero-card, .stat-card, .panel, .event-row, .setting-card, .share-card {
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}
.hero-card { display: flex; align-items: center; justify-content: space-between; gap: 18px; min-height: 146px; padding: 22px 24px; border-radius: var(--radius-lg); background: var(--sun-wash); overflow: hidden; }
.hero-kicker { margin: 0 0 5px; color: var(--sun-dark); font-size: 12px; font-weight: 780; }
.hero-title { margin: 0; font-size: clamp(22px, 2.5vw, 30px); line-height: 1.1; letter-spacing: -0.03em; text-wrap: balance; }
.hero-subtitle { margin: 8px 0 0; color: var(--ink-soft); font-size: 13px; }
.hero-sticker { display: grid; place-items: center; flex: 0 0 auto; width: 84px; height: 84px; border-radius: 18px; color: #63480c; background: var(--sun); transform: rotate(3deg); }
.hero-sticker svg { width: 48px; height: 48px; }
.stat-card { --trend-color: var(--sun-dark); --trend-wash: var(--sun-wash); display: grid; grid-template-columns: minmax(86px, 0.78fr) minmax(74px, 1fr); grid-template-rows: auto minmax(60px, 1fr); align-items: center; column-gap: 8px; row-gap: 3px; min-width: 0; min-height: 146px; padding: 16px; border-radius: var(--radius-md); }
.stat-card.pump { --trend-color: var(--sky); --trend-wash: var(--sky-wash); }
.stat-card.diaper { --trend-color: var(--coral); --trend-wash: var(--coral-wash); }
.stat-card.sleep { --trend-color: var(--lilac); --trend-wash: var(--lilac-wash); }
.stat-label { display: flex; grid-column: 1 / -1; align-items: center; justify-content: space-between; gap: 10px; min-width: 0; color: var(--ink-muted); font-size: 13px; font-weight: 650; }
.stat-label-main { display: flex; align-items: center; gap: 7px; min-width: 0; }
.stat-label-main > span:last-child { min-width: 0; line-height: 1.25; white-space: nowrap; }
.stat-count { flex: 0 0 auto; margin-left: auto; font-size: 12px; font-weight: 700; line-height: 1; white-space: nowrap; font-variant-numeric: tabular-nums; }
.stat-icon { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 9px; color: var(--ink-soft); background: var(--surface-inset); }
.stat-icon svg { width: 14px; height: 14px; }
.stat-value { display: block; grid-column: 1; grid-row: 2; margin: 0; font-size: 24px; font-weight: 750; letter-spacing: -0.04em; white-space: nowrap; font-variant-numeric: tabular-nums; }
.stat-card.diaper .stat-value { font-size: clamp(15px, 1.35vw, 20px); letter-spacing: -0.02em; }
.stat-meta { display: block; grid-column: 1 / -1; grid-row: 3; margin: 0; overflow: hidden; color: var(--ink-muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.stat-trend { display: grid; grid-column: 2; grid-row: 2; align-self: stretch; grid-template-rows: 1fr; min-width: 0; color: var(--trend-color); }
.stat-sparkline { display: block; align-self: center; width: 100%; height: 76px; overflow: visible; }
.sparkline-grid { fill: none; stroke: var(--line); stroke-width: 1; }
.sparkline-area { fill: var(--trend-wash); opacity: 0.88; }
.sparkline-line { fill: none; stroke: var(--trend-color); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.sparkline-point { fill: var(--surface); stroke: var(--trend-color); stroke-width: 2; }

.quick-actions { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin-bottom: 22px; }
.quick-action { display: flex; align-items: center; gap: 11px; min-height: 68px; padding: 11px 13px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); box-shadow: 0 4px 15px rgba(75, 60, 37, 0.045); text-align: left; cursor: pointer; transition: transform 160ms ease-out, border-color 160ms ease-out, background 160ms ease-out; }
.quick-action:hover { transform: translateY(-2px); border-color: rgba(244, 185, 66, 0.55); background: #fffefa; }
.quick-action-icon { display: grid; place-items: center; flex: 0 0 auto; width: 38px; height: 38px; border-radius: 12px; }
.quick-action-icon svg { width: 19px; height: 19px; }
.quick-action[data-type="feeding"] .quick-action-icon { color: #996a00; background: var(--sun-wash); }
.quick-action[data-type="pump"] .quick-action-icon { color: #4f7e86; background: var(--sky-wash); }
.quick-action[data-type="diaper"] .quick-action-icon { color: #bd5c43; background: var(--coral-wash); }
.quick-action[data-type="sleep"] .quick-action-icon { color: #74639c; background: var(--lilac-wash); }
.quick-action-copy { min-width: 0; }
.quick-action-title { display: block; font-size: 13px; font-weight: 760; }
.quick-action-subtitle { display: block; margin-top: 2px; color: var(--ink-muted); font-size: 11px; }

.content-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.72fr); gap: 18px; align-items: start; }
.panel { border-radius: var(--radius-lg); overflow: hidden; }
.panel-header { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 18px 20px 14px; }
.panel-title { margin: 0; font-size: 17px; letter-spacing: -0.02em; }
.panel-subtitle { margin: 3px 0 0; color: var(--ink-muted); font-size: 12px; }
.panel-body { padding: 0 20px 20px; }
.timeline { display: grid; gap: 12px; }
.event-row { display: grid; grid-template-columns: 46px 28px minmax(0, 1fr) auto; gap: 12px; align-items: center; min-height: 68px; padding: 10px 16px; border-color: transparent; border-radius: var(--radius-md); box-shadow: none; }
.event-row.feeding { background: var(--sun-wash); }
.event-row.pump { background: var(--sky-wash); }
.event-row.diaper { background: var(--coral-wash); }
.event-row.sleep { background: var(--lilac-wash); }
.event-row.solids, .event-row.bath, .event-row.walk, .event-row.note { background: var(--sage-wash); }
.event-row.temp, .event-row.symptom, .event-row.medicine, .event-row.hospital { background: rgba(236, 224, 218, 0.58); }
.event-row:hover { filter: saturate(1.05); }
.event-time { color: var(--ink-muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.event-dot { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 10px; }
.event-dot svg { width: 15px; height: 15px; }
.event-dot.feeding, .event-row.feeding .event-title { color: #996a00; background: transparent; }
.event-dot.pump, .event-row.pump .event-title { color: #4f7e86; background: transparent; }
.event-dot.diaper, .event-row.diaper .event-title { color: #bd5c43; background: transparent; }
.event-dot.sleep, .event-row.sleep .event-title { color: #74639c; background: transparent; }
.event-dot.bath, .event-dot.note, .event-dot.solids, .event-dot.walk { color: var(--success); background: transparent; }
.event-copy { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.event-title { display: block; font-size: 13px; font-weight: 720; }
.event-detail { display: block; margin-top: 2px; color: var(--ink-muted); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.event-actions { display: flex; align-items: center; gap: 3px; }
.event-action { display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 9px; color: var(--ink-muted); background: transparent; cursor: pointer; }
.event-action:hover { color: var(--ink); background: var(--surface-inset); }
.event-action svg { width: 15px; height: 15px; }
.empty-state { padding: 34px 18px; color: var(--ink-muted); text-align: center; }
.empty-state svg { width: 34px; height: 34px; margin-bottom: 7px; color: var(--sun-dark); }
.empty-state p { margin: 0; font-size: 13px; }

.side-stack { display: grid; gap: 14px; }
.next-card { padding: 14px 16px; border: 2px solid var(--sky); border-radius: var(--radius-md); color: var(--ink); background: var(--surface); }
.next-card .panel-title { color: #315b62; }
.next-card-main { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.next-card-copy { min-width: 0; }
.next-card-title { display: flex; align-items: center; gap: 7px; }
.next-card-title svg { flex: 0 0 auto; color: var(--sky); }
.next-card .panel-subtitle { margin-top: 3px; color: #5f858b; }
.next-time { display: grid; flex: 0 0 auto; justify-items: end; gap: 1px; margin: 0; }
.next-time-value { display: flex; align-items: center; justify-content: flex-end; gap: 5px; }
.next-time strong { font-size: 27px; line-height: 1; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }
.next-time span { color: #5f858b; font-size: 12px; }
.next-feed-edit { display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 999px; color: #4f7e86; background: var(--sky-wash); cursor: pointer; }
.next-feed-edit:hover { color: #315b62; }
.next-feed-edit svg { width: 15px; height: 15px; }
.next-foot { display: flex; justify-content: space-between; gap: 8px; margin-top: 9px; padding-top: 8px; border-top: 1px solid rgba(111, 169, 182, 0.2); color: #5f858b; font-size: 11px; }
.summary-card { padding: 18px 19px; border-radius: var(--radius-lg); }
.summary-list { display: grid; gap: 11px; margin-top: 16px; }
.summary-row { display: flex; align-items: center; gap: 10px; }
.summary-row-icon { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 9px; color: var(--ink-soft); background: var(--surface-inset); }
.summary-row-icon svg { width: 15px; height: 15px; }
.summary-row-copy { display: flex; justify-content: space-between; gap: 12px; width: 100%; font-size: 12px; }
.summary-row-copy span { color: var(--ink-soft); }
.summary-row-copy strong { font-variant-numeric: tabular-nums; }
.note-card { padding: 18px 19px; border-radius: var(--radius-lg); background: var(--surface); }
.note-card p { margin: 14px 0 0; color: var(--ink-soft); font-size: 13px; line-height: 1.7; }
.note-footer { display: flex; align-items: center; gap: 8px; margin-top: 14px; color: var(--ink-muted); font-size: 11px; }
.note-footer .avatar-mini { width: 24px; height: 24px; font-size: 9px; box-shadow: none; }
.card-empty-state { margin-top: 14px; padding: 16px 0 2px; border-top: 1px solid var(--line); color: var(--ink-muted); font-size: 12px; }

.filter-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 14px; }
.record-filter-scroll { display: flex; flex: 0 0 auto; flex-wrap: nowrap; align-items: center; gap: 8px; max-width: 100%; overflow-x: auto; overscroll-behavior-inline: contain; scrollbar-width: none; }
.record-filter-scroll::-webkit-scrollbar { display: none; }
.record-filter-scroll .filter-chip { flex: 0 0 auto; white-space: nowrap; }
.filter-chip, .tag { display: inline-flex; align-items: center; gap: 5px; min-height: 32px; padding: 0 10px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink-soft); background: var(--surface); font-size: 12px; cursor: pointer; }
.filter-chip.active { color: var(--sun-dark); border-color: rgba(244, 185, 66, 0.5); background: var(--sun-wash); font-weight: 720; }
.search-box { display: flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 14px; margin-left: auto; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); }
.search-box svg { width: 15px; color: var(--ink-muted); }
.search-box input { width: 160px; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: 12px; }
.view-toggle { display: flex; gap: 3px; padding: 3px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); }
.view-toggle-button { display: inline-flex; align-items: center; justify-content: center; gap: 5px; min-height: 30px; padding: 0 11px; border: 0; border-radius: 999px; color: var(--ink-muted); background: transparent; font-family: inherit; font-size: 12px; font-weight: 650; cursor: pointer; }
.view-toggle-button.active { color: var(--ink); background: var(--surface-inset); }
.view-toggle-button svg { width: 14px; height: 14px; }
.record-table-wrap { overflow-x: auto; padding: 0 0 20px; }
.record-table { width: 100%; min-width: 900px; border-collapse: separate; border-spacing: 0; font-size: 11px; }
.record-table th, .record-table td { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.record-table thead th { padding: 10px 9px; color: var(--ink-muted); background: var(--surface-inset); font-size: 12px; font-weight: 700; text-align: left; }
.record-table thead th:first-child { border-top-left-radius: var(--radius-sm); }
.record-table thead th:last-child { border-top-right-radius: var(--radius-sm); }
.record-table tbody th { width: 68px; padding: 8px 10px; color: var(--ink-muted); font-variant-numeric: tabular-nums; font-weight: 650; vertical-align: top; background: var(--surface-inset); }
.record-table td { min-width: 112px; height: 58px; padding: 4px; vertical-align: top; background: var(--surface); }
.record-table tbody tr:last-child th { border-bottom-left-radius: var(--radius-sm); }
.record-table tbody tr:last-child td:last-child { border-bottom-right-radius: var(--radius-sm); }
.record-cell { display: block; position: relative; width: 100%; min-height: 48px; padding: 0; overflow: hidden; border: 0; border-radius: 7px; background: var(--surface-inset); cursor: pointer; }
.record-cell-stack { display: grid; grid-auto-rows: minmax(10px, 1fr); gap: 3px; min-height: 48px; }
.record-cell-stack .record-cell { min-height: 0; }
.record-cell:hover, .month-care-mark:hover { outline: 2px solid rgba(45, 43, 39, 0.22); outline-offset: -2px; }
.care-block-dot { display: block; width: 100%; height: 100%; min-height: inherit; }
.record-cell.feeding, .month-care-mark.feeding { background: #f2c45b; }
.record-cell.pump, .month-care-mark.pump { background: #82bdc9; }
.record-cell.solids, .month-care-mark.solids { background: #eeb08d; }
.record-cell.diaper, .month-care-mark.diaper { background: #ef8d75; }
.record-cell.sleep, .month-care-mark.sleep { background: #aa98cf; }
.record-cell.temp, .record-cell.symptom, .record-cell.medicine, .record-cell.hospital, .month-care-mark.health { background: #8eb79a; }
.record-cell.walk, .record-cell.bath, .record-cell.note, .month-care-mark.other { background: #c6beb2; }
.record-empty { display: block; min-height: 48px; }
.month-table td { height: 52px; }
.month-date { min-height: 42px; padding: 0 4px; border: 0; color: var(--ink-soft); background: transparent; font-family: inherit; font-size: 11px; font-weight: 700; white-space: nowrap; cursor: pointer; }
.month-date:hover { color: var(--sun-dark); }
.month-care-mark { display: block; width: 100%; min-height: 42px; padding: 0; overflow: hidden; border: 0; border-radius: 7px; background: var(--surface-inset); cursor: pointer; }
.month-empty { display: block; min-height: 42px; }
.care-group-list .event-list { gap: 8px; }

.month-care-view { min-width: 0; }
.month-care-legend {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 2px 12px;
  overflow-x: auto;
  color: var(--ink-muted);
  font-size: 11px;
  scrollbar-width: none;
}
.month-care-legend::-webkit-scrollbar { display: none; }
.month-care-legend-item { display: inline-flex; align-items: center; flex: 0 0 auto; gap: 5px; white-space: nowrap; }
.month-care-legend-item i { width: 10px; height: 10px; border-radius: 3px; background: var(--surface-inset); }
.month-care-legend-item.feeding i, .month-care-event.feeding { background: #f2c45b; }
.month-care-legend-item.pump i, .month-care-event.pump { background: #82bdc9; }
.month-care-legend-item.solids i, .month-care-event.solids { background: #eeb08d; }
.month-care-legend-item.diaper i, .month-care-event.diaper { background: #ef8d75; }
.month-care-legend-item.sleep i, .month-care-event.sleep { background: #aa98cf; }
.month-care-legend-item.health i, .month-care-event.health { background: #8eb79a; }
.month-care-legend-item.other i, .month-care-event.other { background: #c6beb2; }
.month-care-scroll {
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  scrollbar-color: var(--line-strong) transparent;
  scrollbar-width: thin;
}
.month-care-map {
  --month-axis-width: 56px;
  --month-day-width: 48px;
  --month-track-height: 720px;
  display: grid;
  grid-template-columns: var(--month-axis-width) max-content;
  width: max-content;
  min-width: 100%;
}
.month-time-axis {
  position: sticky;
  left: 0;
  z-index: 5;
  width: var(--month-axis-width);
  color: var(--ink-muted);
  background: var(--surface-inset);
  box-shadow: 1px 0 0 var(--line);
}
.month-axis-title, .month-day-header {
  height: 46px;
  border-bottom: 1px solid var(--line);
}
.month-axis-title { display: grid; place-items: center; font-size: 10px; font-weight: 700; }
.month-time-track, .month-day-track { position: relative; height: var(--month-track-height); }
.month-time-label {
  position: absolute;
  inset-inline: 0 6px;
  transform: translateY(-50%);
  font-size: 9px;
  line-height: 1;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.month-time-label.first { transform: none; }
.month-days { display: flex; min-width: max-content; }
.month-day-column { flex: 0 0 var(--month-day-width); width: var(--month-day-width); min-width: 0; }
.month-day-header {
  display: grid;
  place-content: center;
  gap: 1px;
  border-right: 1px solid var(--line);
  text-align: center;
}
.month-day-header strong { font-size: 10px; font-weight: 760; font-variant-numeric: tabular-nums; }
.month-day-header small { color: var(--ink-muted); font-size: 9px; }
.month-day-column.today .month-day-header { color: var(--sun-dark); background: var(--sun-wash); }
.month-day-track {
  border-right: 1px solid var(--line);
  background-image: repeating-linear-gradient(to bottom, transparent 0, transparent calc((var(--month-track-height) / 24) - 1px), var(--line) calc((var(--month-track-height) / 24) - 1px), var(--line) calc(var(--month-track-height) / 24));
}
.month-day-column.today .month-day-track { background-color: rgba(244, 185, 66, 0.035); }
.month-care-event {
  position: absolute;
  inset-inline: 3px;
  z-index: 2;
  display: block;
  min-height: 7px;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 3px;
  cursor: pointer;
  opacity: 0.94;
  transition: filter 140ms ease-out, transform 140ms ease-out, opacity 140ms ease-out;
}
.month-care-event.sleep { z-index: 1; opacity: 0.72; }
.month-care-event:hover, .month-care-event:focus-visible { z-index: 4; filter: saturate(1.12) brightness(0.97); opacity: 1; transform: scaleX(1.08); }
.month-care-event:focus-visible { outline: 2px solid var(--ink); outline-offset: 1px; }

.subpage-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr); gap: 18px; align-items: start; }
.chart-panel { min-height: 390px; }
.chart-wrap { padding: 0 16px 16px; }
.chart-legend { display: flex; gap: 18px; padding: 0 4px 13px; color: var(--ink-soft); font-size: 11px; }
.legend-item { display: inline-flex; align-items: center; gap: 6px; }
.legend-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--sun); }
.legend-dot.secondary { background: var(--sage); }
.growth-chart { display: block; width: 100%; height: 280px; overflow: visible; }
.growth-chart text { fill: var(--ink-muted); font-size: 10px; font-family: inherit; }
.growth-chart .grid-line { stroke: rgba(73, 63, 49, 0.1); stroke-width: 1; }
.growth-chart .weight-line { fill: none; stroke: var(--sun-dark); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.growth-chart .height-line { fill: none; stroke: var(--sage); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.growth-chart .point-weight { fill: var(--surface); stroke: var(--sun-dark); stroke-width: 3; }
.growth-chart .point-height { fill: var(--surface); stroke: var(--sage); stroke-width: 3; }
.measurement-list { display: grid; gap: 8px; padding: 0 20px 20px; }
.measurement-row { display: flex; justify-content: space-between; align-items: center; min-height: 49px; padding: 0 12px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); font-size: 12px; }
.measurement-row span { color: var(--ink-muted); }
.measurement-row strong { font-variant-numeric: tabular-nums; }
.callout { padding: 18px; border-radius: var(--radius-lg); background: var(--sage-wash); border: 1px solid rgba(124, 155, 131, 0.22); }
.callout p { margin: 10px 0 0; color: #4c6651; font-size: 13px; line-height: 1.7; }
.vaccine-panel { margin-top: 18px; overflow: hidden; }
.vaccine-panel > .panel-header .ghost-button { flex: 0 0 auto; padding-inline: 10px; white-space: nowrap; }
.vaccine-body { display: grid; gap: 12px; padding: 0 20px 20px; }
.vaccine-upcoming { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 11px; min-height: 64px; padding: 11px 13px; border: 1px solid rgba(124, 155, 131, 0.24); border-radius: var(--radius-md); background: var(--sage-wash); }
.vaccine-upcoming-icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; color: var(--success); background: var(--surface); }
.vaccine-upcoming small, .vaccine-upcoming strong { display: block; }
.vaccine-upcoming small { color: var(--ink-muted); font-size: 10px; }
.vaccine-upcoming strong { margin-top: 1px; font-size: 13px; }
.vaccine-upcoming time { color: var(--success); font-size: 13px; font-weight: 750; white-space: nowrap; font-variant-numeric: tabular-nums; }
.vaccine-list { display: grid; gap: 8px; }
.vaccine-row { display: grid; grid-template-columns: 92px minmax(0, 1fr) minmax(145px, 0.55fr) 36px; align-items: center; gap: 12px; min-height: 68px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); }
.vaccine-date { color: var(--ink-muted); font-size: 12px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.vaccine-copy { min-width: 0; }
.vaccine-name-line { display: flex; align-items: center; gap: 6px; min-width: 0; }
.vaccine-name-line strong { min-width: 0; overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.vaccine-copy > span { display: block; margin-top: 3px; overflow: hidden; color: var(--ink-muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.vaccine-source-tag, .vaccine-incomplete { display: inline-flex; align-items: center; flex: 0 0 auto; min-height: 20px; padding: 0 7px; border-radius: 999px; font-size: 9px; font-weight: 700; white-space: nowrap; }
.vaccine-source-tag { color: var(--success); background: var(--sage-wash); }
.vaccine-incomplete { color: var(--sun-dark); background: var(--sun-wash); }
.vaccine-next { display: grid; min-width: 0; }
.vaccine-next span { color: var(--ink-muted); font-size: 9px; }
.vaccine-next strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; font-variant-numeric: tabular-nums; }
.vaccine-next small { overflow: hidden; color: var(--ink-muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.vaccine-next.empty strong { color: var(--ink-muted); font-weight: 600; }
.vaccine-edit { width: 36px; height: 36px; }
.vaccine-empty { min-height: 126px; }
.vaccine-empty > span { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; color: var(--success); background: var(--sage-wash); }
.vaccine-source-note { display: flex; grid-column: 1 / -1; align-items: flex-start; gap: 9px; padding: 11px 12px; border-radius: var(--radius-sm); color: var(--success); background: var(--sage-wash); }
.vaccine-source-note > span { display: grid; place-items: center; flex: 0 0 auto; width: 26px; height: 26px; border-radius: 8px; background: var(--surface); }
.vaccine-source-note strong, .vaccine-source-note small { display: block; }
.vaccine-source-note strong { font-size: 12px; }
.vaccine-source-note small { margin-top: 2px; color: var(--ink-muted); font-size: 10px; line-height: 1.5; overflow-wrap: anywhere; }
.milestone-list { display: grid; gap: 12px; margin-top: 16px; }
.milestone { display: flex; align-items: flex-start; gap: 10px; }
.milestone-mark { display: grid; place-items: center; flex: 0 0 auto; width: 24px; height: 24px; border-radius: 8px; color: var(--success); background: #d6e7d6; }
.milestone-copy strong { display: block; font-size: 12px; }
.milestone-copy span { display: block; margin-top: 2px; color: var(--ink-muted); font-size: 11px; }

.diary-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.diary-card { display: grid; grid-template-columns: 156px minmax(0, 1fr); width: 100%; min-width: 0; min-height: 184px; padding: 0; overflow: visible; border: 1px solid var(--line); border-radius: var(--radius-md); color: var(--ink); background: var(--surface); box-shadow: var(--shadow-soft); font-family: inherit; text-align: left; cursor: pointer; transition: transform 160ms ease-out, border-color 160ms ease-out; }
.diary-card:hover { transform: translateY(-2px); border-color: var(--line-strong); }
.diary-card:focus-visible, .diary-photo-tile:focus-visible { outline: 3px solid rgba(244, 185, 66, 0.28); outline-offset: 2px; }
.diary-photo { display: grid; place-items: center; width: calc(100% - 20px); aspect-ratio: 4 / 5; align-self: center; margin: 10px; padding: 6px 6px 20px; overflow: hidden; border: 1px solid var(--line); border-radius: 3px; color: var(--ink-muted); background: var(--surface-raised); box-shadow: 0 8px 18px rgba(75, 60, 37, 0.14); transform: rotate(-1.8deg); }
.diary-card:nth-child(even) .diary-photo { transform: rotate(1.5deg); }
.diary-photo svg { width: 25px; height: 25px; }
.diary-photo img, .diary-photo video { display: block; width: 100%; height: 100%; min-height: 0; object-fit: cover; object-position: center; }
.diary-copy { display: block; min-width: 0; padding: 16px; }
.diary-date { color: var(--sun-dark); font-size: 11px; font-weight: 760; }
.diary-title { display: block; margin: 5px 0 0; overflow-wrap: anywhere; font-size: 14px; line-height: 1.35; }
.diary-excerpt { display: -webkit-box; margin: 7px 0 0; overflow: hidden; color: var(--ink-soft); font-size: 12px; line-height: 1.6; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.diary-tags { display: flex; flex-wrap: wrap; gap: 5px; min-width: 0; max-width: 100%; margin-top: 11px; overflow: hidden; }
.diary-tags .tag { min-width: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.diary-tag-more { flex: 0 0 auto; }
.diary-photo-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; padding: 8px 5px 18px; }
.diary-photo-tile { position: relative; display: grid; place-items: center; width: 100%; aspect-ratio: 4 / 5; padding: 7px 7px 24px; overflow: hidden; border: 1px solid var(--line); border-radius: 3px; color: var(--ink-muted); background: var(--surface-raised); box-shadow: 0 9px 22px rgba(75, 60, 37, 0.13); cursor: pointer; transform: rotate(-1.8deg); transition: transform 180ms var(--ease-out-quart), border-color 160ms ease-out, box-shadow 180ms ease-out; }
.diary-photo-tile:nth-child(3n + 2) { transform: rotate(1.7deg); }
.diary-photo-tile:nth-child(3n) { transform: rotate(-0.7deg); }
.diary-photo-tile:hover { border-color: var(--line-strong); box-shadow: 0 13px 28px rgba(75, 60, 37, 0.18); transform: translateY(-3px) rotate(0deg); }
.diary-photo-tile img, .diary-photo-tile video { width: 100%; height: 100%; object-fit: cover; object-position: center; }
.diary-empty { grid-column: 1 / -1; gap: 12px; min-height: 180px; }
.diary-media-editor, .diary-new-media-preview { display: flex; gap: 8px; max-width: 100%; padding: 2px 2px 8px; overflow-x: auto; scrollbar-width: none; }
.diary-media-editor::-webkit-scrollbar, .diary-new-media-preview::-webkit-scrollbar { display: none; }
.diary-new-media-preview:empty { display: none; }
.diary-media-edit-item { position: relative; display: grid; flex: 0 0 82px; gap: 4px; width: 82px; min-width: 0; padding: 5px 5px 8px; border: 1px solid var(--line); border-radius: 4px; background: var(--surface-raised); box-shadow: 0 5px 12px rgba(75, 60, 37, 0.09); transition: opacity 160ms ease-out, filter 160ms ease-out; }
.diary-media-edit-item.removed { opacity: 0.42; filter: grayscale(1); }
.diary-media-thumb { display: grid; place-items: center; width: 70px; height: 70px; overflow: hidden; color: var(--ink-muted); background: var(--surface-inset); }
.diary-media-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.diary-media-file-name { overflow: hidden; color: var(--ink-muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.diary-media-remove { position: absolute; top: -5px; right: -5px; display: grid; place-items: center; width: 28px; height: 28px; padding: 0; border: 1px solid var(--line); border-radius: 999px; color: var(--danger); background: var(--surface); box-shadow: 0 4px 10px rgba(75, 60, 37, 0.12); cursor: pointer; }
.diary-media-input { padding-block: 8px; height: auto; min-height: var(--control-height); }
.modal.diary-lightbox { width: min(900px, 100%); }
.diary-lightbox-header .modal-title { margin-top: 5px; }
.diary-lightbox-body { padding: 0 22px; }
.diary-lightbox-layout { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(250px, 0.8fr); gap: 22px; align-items: start; }
.diary-lightbox-layout.no-media { grid-template-columns: 1fr; }
.diary-lightbox-media { min-width: 0; }
.diary-lightbox-primary { display: grid; place-items: center; min-height: 300px; max-height: 520px; padding: 8px 8px 26px; overflow: hidden; border: 1px solid var(--line); border-radius: 4px; background: var(--surface-raised); box-shadow: 0 12px 30px rgba(75, 60, 37, 0.17); transform: rotate(-0.45deg); }
.diary-lightbox-primary img, .diary-lightbox-primary video { display: block; width: 100%; height: 100%; max-height: 520px; object-fit: contain; }
.diary-lightbox-thumbs { display: flex; gap: 7px; margin-top: 8px; overflow-x: auto; padding: 2px; scrollbar-width: none; }
.diary-lightbox-thumbs::-webkit-scrollbar { display: none; }
.diary-lightbox-thumbs button { display: grid; place-items: center; flex: 0 0 54px; width: 54px; height: 54px; padding: 0; overflow: hidden; border: 2px solid transparent; border-radius: 10px; color: var(--ink-muted); background: var(--surface-inset); cursor: pointer; }
.diary-lightbox-thumbs button.active { border-color: var(--sun); }
.diary-lightbox-thumbs img { width: 100%; height: 100%; object-fit: cover; object-position: center; }
.diary-lightbox-copy { min-width: 0; }
.diary-lightbox-copy p { margin: 0; color: var(--ink-soft); font-size: 14px; line-height: 1.8; overflow-wrap: anywhere; white-space: pre-wrap; }
.diary-lightbox-placeholder { display: grid; place-items: center; gap: 8px; min-height: 220px; border-radius: var(--radius-md); color: var(--ink-muted); background: var(--surface-inset); }
.diary-lightbox-actions { justify-content: flex-end; }
.diary-delete-button { color: var(--danger); }
.diary-delete-button:hover { color: var(--danger); border-color: rgba(191, 84, 72, 0.28); background: rgba(191, 84, 72, 0.08); }
.tag { min-height: 24px; padding: 0 7px; border: 0; background: var(--surface-inset); font-size: 10px; cursor: default; }

.share-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 0.74fr); gap: 18px; align-items: start; }
.share-card { padding: 20px; border-radius: var(--radius-lg); }
.share-card p { margin: 7px 0 0; color: var(--ink-soft); font-size: 13px; }
.invite-form { display: flex; gap: 8px; margin-top: 18px; }
.field-input, .field-select, .field-textarea { display: block; inline-size: 100%; min-inline-size: 0; max-inline-size: 100%; margin: 0; border: 1px solid var(--line-strong); border-radius: 10px; outline: 0; color: var(--ink); background-color: var(--surface); font-size: 0.9375rem; line-height: 1.35; }
.field-input, .field-select { block-size: var(--control-height); min-block-size: var(--control-height); padding: 0 12px; }
.field-select { -webkit-appearance: none; appearance: none; padding-right: 40px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='none' stroke='%23655f56' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 13px center; background-size: 16px; }
html[data-theme="dark"] .field-select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='none' stroke='%23c4bdb1' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E"); }
.field-input:is([type="date"], [type="time"]) { display: flex; align-items: center; padding-block: 0; -webkit-appearance: none; appearance: none; text-align: left; line-height: 1; }
.field-input:is([type="date"], [type="time"])::-webkit-date-and-time-value { display: flex; align-items: center; width: 100%; height: 100%; min-height: 100%; margin: 0; padding: 0; text-align: left; line-height: normal; }
.field-input:is([type="date"], [type="time"])::-webkit-datetime-edit { display: flex; align-items: center; padding: 0; line-height: normal; }
.field-input[type="file"] { overflow: hidden; padding: 6px 8px; white-space: nowrap; }
.field-input[type="file"]::file-selector-button, .field-input[type="file"]::-webkit-file-upload-button { height: 30px; margin: 0 10px 0 0; padding: 0 10px; border: 0; border-radius: 8px; color: var(--ink); background: var(--surface-inset); font: inherit; font-size: 0.8125rem; font-weight: 700; }
.field-textarea { min-height: 104px; padding: 11px 12px; resize: vertical; }
.field-input:focus, .field-select:focus, .field-textarea:focus { border-color: var(--sun); box-shadow: 0 0 0 3px rgba(244, 185, 66, 0.16); }
.caregiver-list { display: grid; gap: 10px; margin-top: 18px; }
.caregiver-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 11px 0; border-top: 1px solid var(--line); }
.caregiver-person { display: flex; align-items: center; gap: 10px; min-width: 0; }
.caregiver-avatar { display: grid; place-items: center; width: 35px; height: 35px; border-radius: 12px; color: #496150; background: var(--sage-wash); font-size: 12px; font-weight: 760; }
.caregiver-person strong { display: block; font-size: 13px; }
.caregiver-person span { display: block; margin-top: 2px; color: var(--ink-muted); font-size: 11px; }
.permission { color: var(--success); font-size: 11px; font-weight: 720; }
.share-code { display: grid; place-items: center; min-height: 240px; padding: 20px; border-radius: var(--radius-lg); color: #315b62; background: var(--sky-wash); }
.fake-qr { display: grid; grid-template-columns: repeat(7, 10px); gap: 3px; padding: 11px; border: 7px solid #fff; background: #fff; box-shadow: var(--shadow-soft); }
.fake-qr span { width: 10px; height: 10px; background: #315b62; }
.fake-qr span:nth-child(3n), .fake-qr span:nth-child(7n) { background: transparent; }
.share-code small { margin-top: 14px; font-size: 11px; }

.settings-list { display: grid; gap: 12px; max-width: 800px; }
.setting-card { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 18px 20px; border-radius: var(--radius-md); }
.setting-actions { display: flex; gap: 8px; flex-wrap: nowrap; justify-content: flex-end; margin-left: auto; }
.setting-actions .ghost-button { flex: 0 0 116px; width: 116px; padding-inline: 10px; white-space: nowrap; }
.setting-copy strong { display: block; font-size: 13px; }
.setting-copy span { display: block; margin-top: 4px; color: var(--ink-muted); font-size: 12px; }
.toggle { position: relative; width: 46px; height: 26px; flex: 0 0 auto; padding: 0; border: 0; border-radius: 999px; background: #d5d0c7; cursor: pointer; }
.toggle::after { content: ""; position: absolute; top: 4px; left: 4px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,0.18); transition: transform 160ms ease-out; }
.toggle.on { background: var(--sage); }
.toggle.on::after { transform: translateX(20px); }
.danger-card { border-color: rgba(191, 84, 72, 0.22); }
.danger-card .setting-copy strong { color: var(--danger); }

.child-picker-list { display: grid; gap: 9px; margin-bottom: 14px; }
.child-picker-row { display: flex; align-items: center; gap: 8px; padding: 7px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.child-picker-row.current { border-color: rgba(244, 185, 66, 0.6); background: var(--sun-wash); }
.child-picker-select { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; padding: 0; border: 0; background: transparent; text-align: left; cursor: pointer; }
.child-picker-select .child-avatar { width: 38px; height: 38px; font-size: 15px; }
.child-picker-select strong, .child-picker-select small { display: block; }
.child-picker-select strong { font-size: 13px; }
.child-picker-select small { margin-top: 2px; color: var(--ink-muted); font-size: 11px; }
.child-picker-select .tag { margin-left: auto; flex: 0 0 auto; color: var(--sun-dark); background: var(--surface); }
.child-picker-delete { color: var(--danger); }
.child-picker-delete:hover { color: var(--danger); border-color: rgba(191, 84, 72, 0.28); background: rgba(191, 84, 72, 0.08); }
.avatar-upload-row { display: flex; align-items: center; gap: 10px; min-width: 0; }
.avatar-upload-row .avatar-preview { width: 52px; height: 52px; border-radius: 16px; }
.avatar-upload-button { flex: 0 0 auto; }
.avatar-upload-button input { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.avatar-file-name { min-width: 0; overflow: hidden; color: var(--ink-muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.full-button { width: 100%; }

.bottom-nav { display: none; }
.modal-backdrop { position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; padding: 20px; background: rgba(45, 43, 39, 0.32); animation: modal-backdrop-in 180ms ease-out both; }
.modal { width: min(520px, 100%); max-height: min(760px, calc(100dvh - 40px)); overflow: auto; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-float); scrollbar-width: none; -ms-overflow-style: none; transform-origin: 50% 45%; animation: modal-in 240ms var(--ease-out-quart) both; }
.modal-backdrop.closing { pointer-events: none; animation: modal-backdrop-out 150ms ease-in both; }
.modal-backdrop.closing .modal { animation: modal-out 150ms ease-in both; }
.modal::-webkit-scrollbar { display: none; width: 0; height: 0; }
.modal-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding: 22px 22px 14px; }
.modal-title { margin: 0; font-size: 20px; letter-spacing: -0.03em; }
.modal-subtitle { margin: 5px 0 0; color: var(--ink-muted); font-size: 12px; }
.modal-body { padding: 0 22px 22px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.form-field { display: grid; gap: 6px; min-width: 0; width: 100%; }
.event-common-fields { margin-bottom: 12px; }
.form-field.full { grid-column: 1 / -1; }
.form-label { color: var(--ink-soft); font-size: 12px; font-weight: 700; line-height: 1.25; }
.form-help { color: var(--ink-muted); font-size: 11px; }
.choice-row { display: flex; flex-wrap: wrap; gap: 6px; }
.choice-chip { flex: 1 1 0; display: inline-flex; align-items: center; justify-content: center; min-inline-size: 64px; min-height: 32px; padding: 0 10px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink-soft); background: var(--surface); font-size: 12px; cursor: pointer; }
.choice-chip.active { color: var(--sun-dark); border-color: rgba(244, 185, 66, 0.5); background: var(--sun-wash); font-weight: 720; }
.choice-chip:focus-visible { border-color: var(--sun); box-shadow: 0 0 0 3px rgba(244, 185, 66, 0.16); outline: 0; }
.modal-footer { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 22px 22px; }
.type-picker { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
.type-option { display: grid; justify-items: center; gap: 5px; min-height: 72px; padding: 10px 6px; border: 1px solid var(--line); border-radius: 12px; color: var(--ink-soft); background: var(--surface); cursor: pointer; }
.type-option.selected { color: var(--sun-dark); border-color: rgba(244, 185, 66, 0.7); background: var(--sun-wash); }
.type-option svg { width: 19px; height: 19px; }
.type-option span { font-size: 11px; }
.timer-box { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px; margin-bottom: 12px; border-radius: 12px; background: var(--surface-inset); }
.timer-box strong { font-size: 20px; font-variant-numeric: tabular-nums; }
.timer-box small { display: block; color: var(--ink-muted); font-size: 11px; }
.sleep-timer-active { border: 1px solid rgba(144, 124, 188, 0.34); background: var(--lilac-wash); }
.timer-conflict strong { font-size: 13px; }
.timer-cancel { color: var(--danger); }
.sleep-session-note { gap: 3px; padding: 11px 12px; border-radius: var(--radius-sm); color: #66578a; background: var(--lilac-wash); }
.sleep-session-note strong, .sleep-session-note span { display: block; }
.sleep-session-note strong { font-size: 13px; }
.sleep-session-note span { color: var(--ink-muted); font-size: 11px; line-height: 1.5; }
.weekly-panel { --chart-color: var(--sun-dark); --chart-wash: var(--sun-wash); margin-top: 18px; }
.weekly-panel.pump { --chart-color: var(--sky); --chart-wash: var(--sky-wash); }
.weekly-panel.diaper { --chart-color: var(--coral); --chart-wash: var(--coral-wash); }
.weekly-panel.sleep { --chart-color: var(--lilac); --chart-wash: var(--lilac-wash); }
.weekly-panel-header { align-items: flex-start; }
.weekly-metric-tabs { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px; }
.weekly-metric-button { display: inline-flex; align-items: center; justify-content: center; gap: 5px; min-height: 32px; padding: 0 11px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink-muted); background: var(--surface); font-family: inherit; font-size: 11px; font-weight: 650; cursor: pointer; }
.weekly-metric-button:hover { color: var(--ink); border-color: var(--line-strong); }
.weekly-metric-button.active { color: var(--chart-color); border-color: var(--chart-color); background: var(--chart-wash); }
.weekly-chart { display: grid; grid-template-columns: 162px minmax(0, 1fr); gap: 20px; padding: 4px 20px 20px; }
.weekly-chart-summary { display: flex; flex-direction: column; align-items: flex-start; padding: 14px; border-radius: var(--radius-md); color: var(--ink-soft); background: var(--chart-wash); font-size: 11px; }
.weekly-chart-icon { display: grid; place-items: center; width: 30px; height: 30px; margin-bottom: 10px; border-radius: 9px; color: var(--chart-color); background: var(--surface); }
.weekly-chart-summary > strong { margin: 3px 0 15px; color: var(--ink); font-size: 24px; line-height: 1; font-variant-numeric: tabular-nums; }
.weekly-chart-summary > strong small { color: var(--ink-muted); font-size: 10px; font-weight: 650; }
.weekly-chart-summary > div { display: flex; justify-content: space-between; gap: 8px; width: 100%; padding-top: 8px; margin-top: 8px; border-top: 1px solid var(--line); }
.weekly-chart-summary b { color: var(--ink); font-weight: 700; font-variant-numeric: tabular-nums; }
.weekly-columns { display: grid; grid-template-columns: repeat(7, minmax(34px, 1fr)); align-items: stretch; gap: 8px; min-height: 224px; padding: 0 4px; }
.weekly-column { display: grid; grid-template-rows: 18px minmax(120px, 1fr) 34px; gap: 5px; align-items: end; min-width: 0; text-align: center; }
.weekly-column-value { color: var(--ink-soft); font-size: 10px; font-variant-numeric: tabular-nums; }
.weekly-column-track { display: flex; align-items: flex-end; justify-content: center; height: 100%; overflow: hidden; border-bottom: 1px solid var(--line-strong); background: transparent; }
.weekly-column-bar { display: block; width: min(32px, 72%); min-height: 0; border-radius: 5px 5px 0 0; background: var(--chart-color); transition: height 180ms ease-out; }
.weekly-column time { color: var(--ink-soft); font-size: 10px; font-weight: 700; }
.weekly-column time small { display: block; margin-top: 2px; color: var(--ink-muted); font-size: 9px; font-weight: 500; }
.auth-status { display: flex; gap: 10px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-inset); }
.auth-status p { margin: 3px 0 0; color: var(--ink-muted); font-size: 12px; line-height: 1.6; }
.data-flow { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }
.data-flow div { padding: 12px 9px; border: 1px solid var(--line); border-radius: 12px; text-align: center; }
.data-flow span { display: grid; place-items: center; width: 24px; height: 24px; margin: 0 auto 7px; border-radius: 50%; color: #523a0f; background: var(--sun); font-size: 11px; font-weight: 800; }
.data-flow strong, .data-flow small { display: block; }
.data-flow strong { font-size: 12px; }
.data-flow small { margin-top: 3px; color: var(--ink-muted); font-size: 10px; }
.modal-hint { margin: 14px 0 0; color: var(--ink-muted); font-size: 11px; line-height: 1.7; }
.modal-hint code { color: var(--ink-soft); }
.toast-region { position: fixed; right: 20px; bottom: 20px; z-index: 50; display: grid; gap: 8px; pointer-events: none; }
.toast { display: flex; align-items: center; gap: 9px; min-width: 240px; padding: 12px 16px; border: 0; border-radius: 999px; color: var(--ink); background: var(--surface-raised); box-shadow: 0 12px 32px rgba(75, 60, 37, 0.14); font-size: 12px; animation: toast-in 180ms ease-out both; }
.toast svg { color: var(--success); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes modal-backdrop-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes modal-backdrop-out { from { opacity: 1; } to { opacity: 0; } }
@keyframes modal-in { from { opacity: 0; transform: translateY(8px) scale(0.975); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes modal-out { from { opacity: 1; transform: translateY(0) scale(1); } to { opacity: 0; transform: translateY(5px) scale(0.985); } }

@media (max-width: 1120px) {
  .stat-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .page { width: min(100% - 48px, 1240px); }
  .topbar { padding: 0 24px; }
}

@media (max-width: 860px) {
  .app-layout { display: block; }
  .sidebar { display: none; }
  .topbar { min-height: 62px; padding: 0 16px; }
  .topbar .mobile-menu { display: none; }
  .breadcrumbs { gap: 0; }
  .desktop-breadcrumb-brand, .desktop-breadcrumb-separator, .desktop-page-title { display: none; }
  .mobile-child-context { display: flex; align-items: center; gap: 10px; }
  .mobile-breadcrumb-title { display: flex; flex-direction: column; gap: 2px; }
  .mobile-breadcrumb-title strong { color: var(--ink); font-size: var(--type-body); font-weight: 800; line-height: 1.2; }
  .mobile-breadcrumb-title small { color: var(--ink-muted); font-size: var(--type-caption); line-height: 1.2; }
  .mobile-child-avatar { width: 44px; height: 44px; font-size: 0.875rem; }
  .topbar-actions .desktop-child-avatar { display: none; }
  .topbar-actions .icon-button { width: 44px; }
  .page { width: calc(100% - 32px); padding-top: 24px; padding-bottom: 92px; }
  .stat-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .content-grid, .subpage-grid, .share-layout { grid-template-columns: 1fr; }
  .weekly-chart { grid-template-columns: 140px minmax(0, 1fr); gap: 14px; }
  .bottom-nav { position: fixed; right: auto; bottom: var(--mobile-nav-edge); left: 50%; z-index: 20; display: grid; grid-template-columns: repeat(5, 1fr); width: min(calc(100% - 24px), 560px); height: var(--mobile-nav-height); padding: 5px; overflow: hidden; border: 0; border-radius: 999px; background: rgba(255, 253, 248, 0.76); box-shadow: 0 14px 38px rgba(75, 60, 37, 0.14); -webkit-backdrop-filter: blur(18px) saturate(1.5); backdrop-filter: blur(18px) saturate(1.5); transform: translate3d(-50%, 0, 0); backface-visibility: hidden; }
  html[data-theme="dark"] .bottom-nav { background: rgba(41, 40, 36, 0.76); box-shadow: 0 14px 38px rgba(0, 0, 0, 0.3); }
  .bottom-nav .nav-item { justify-content: center; flex-direction: column; gap: 2px; min-height: 56px; padding: 4px 2px; border-radius: 999px; font-size: 0.8125rem; touch-action: manipulation; }
  .bottom-nav .nav-item:hover:not(.active) { color: var(--ink-soft); background: transparent; }
  .bottom-nav .nav-item:active:not(.active) { color: var(--ink); background: var(--surface-inset); }
  .bottom-nav .nav-icon { width: 22px; }
  .bottom-nav .nav-icon svg { width: 20px; height: 20px; }
  .bottom-nav .nav-count { position: absolute; margin: -25px 0 0 20px; padding: 1px 4px; font-size: 0.6875rem; }
  .toast-region { right: 12px; bottom: calc(var(--mobile-nav-edge) + var(--mobile-nav-height) + 12px); left: 12px; }
}

@media (max-width: 620px) {
  :root { --action-height: 44px; }
  body { font-size: var(--type-body); }
  .icon-button, .ghost-button, .primary-button, .text-button, .segmented-button { font-size: 0.9375rem; }
  .topbar-actions .ghost-button { display: none; }
  .page-heading { display: block; }
  .heading-actions { justify-content: flex-start; margin-top: 16px; }
  .date-actions { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 6px; width: 100%; }
  .date-actions .date-switcher { width: 100%; min-width: 0; height: var(--action-height); }
  .date-actions .date-label { min-width: 0; overflow: hidden; font-size: var(--type-secondary); text-overflow: ellipsis; white-space: nowrap; }
  .date-actions > .ghost-button, .date-actions > .primary-button { height: var(--action-height); min-height: var(--action-height); font-size: var(--type-secondary); white-space: nowrap; }
  .date-actions > .ghost-button { padding-inline: 10px; }
  .date-actions > .primary-button { padding-inline: 12px; }
  .eyebrow { font-size: var(--type-secondary); }
  .page-title { font-size: var(--type-title); }
  .page-description { font-size: var(--type-body); line-height: 1.6; }
  .page-inline-meta { font-size: 0.8125rem; }
  .quick-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .quick-action[data-type="diaper"] { display: none; }
  .quick-action-title { font-size: 0.9375rem; }
  .quick-action-subtitle { font-size: var(--type-caption); line-height: 1.35; }
  .stat-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; overflow: visible; padding-bottom: 0; }
  .hero-card { min-height: 126px; padding: 18px; }
  .hero-sticker { width: 64px; height: 64px; border-radius: 18px; }
  .hero-sticker svg { width: 38px; height: 38px; }
  .stat-card { grid-template-columns: minmax(82px, 1fr) minmax(52px, 0.7fr); grid-template-rows: 26px minmax(78px, 1fr); align-items: center; column-gap: 7px; row-gap: 3px; height: 132px; min-height: 132px; padding: 12px; overflow: hidden; }
  .stat-trend { display: grid; align-self: center; min-height: 0; }
  .stat-sparkline { height: 66px; }
  .stat-value { margin: 0; font-size: 1.375rem; }
  .stat-card.diaper .stat-value { font-size: 0.9375rem; }
  .stat-label { font-size: 0.8125rem; }
  .stat-count { font-size: var(--type-caption); }
  .panel-header { padding: 16px 15px 12px; }
  .panel-body { padding: 0 9px 12px; }
  .panel-title { font-size: var(--type-subheading); }
  .panel-subtitle { font-size: 0.8125rem; }
  .empty-state p { font-size: var(--type-secondary); }
  .event-row { grid-template-columns: 48px 28px minmax(0, 1fr) 30px; gap: 7px; min-height: 62px; padding: 9px 10px; }
  .event-time { font-size: 0.8125rem; }
  .event-copy { gap: 9px; }
  .event-title { flex: 0 0 auto; font-size: 0.9375rem; }
  .event-detail { min-width: 0; max-width: none; margin-top: 0; font-size: 0.8125rem; }
  .event-actions .event-action:not(:last-child) { display: none; }
  .next-feed-edit { width: 40px; height: 40px; }
  .next-time span { font-size: var(--type-secondary); }
  .next-foot, .note-footer { font-size: var(--type-caption); }
  .summary-row-copy { font-size: var(--type-secondary); }
  .note-card p, .callout p, .share-card p { font-size: 0.9375rem; }
  .search-box { width: 100%; margin-left: 0; }
  .record-filter-scroll { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 5px; width: 100%; overflow: visible; }
  .record-filter-scroll .filter-chip { width: 100%; min-width: 0; min-height: 40px; padding-inline: 3px; }
  .search-box { min-height: 48px; }
  .search-box input { width: 100%; font-size: var(--type-body); }
  .filter-chip { min-height: 44px; padding-inline: 13px; font-size: var(--type-secondary); }
  .choice-chip { min-height: 44px; padding-inline: 10px; font-size: var(--type-secondary); }
  .view-toggle { width: 100%; }
  .view-toggle-button { flex: 1; min-height: 42px; font-size: var(--type-secondary); }
  .month-care-map { --month-axis-width: 48px; --month-day-width: 42px; --month-track-height: 624px; }
  .month-care-scroll { scrollbar-width: none; }
  .month-care-scroll::-webkit-scrollbar { display: none; }
  .month-care-legend { gap: 10px; font-size: var(--type-caption); }
  .month-axis-title, .month-day-header { height: 44px; }
  .month-time-label { inset-inline-end: 5px; font-size: 9px; }
  .month-day-header strong { font-size: 10px; }
  .month-day-header small { font-size: 9px; }
  .record-table-wrap { padding: 0 0 12px; }
  .record-table { min-width: 640px; table-layout: fixed; font-size: 0.75rem; }
  .record-table thead th { padding: 8px 5px; font-size: 0.75rem; white-space: nowrap; }
  .record-table thead th:first-child, .record-table tbody th { width: 52px; }
  .record-table tbody th { padding: 7px 5px; }
  .record-table td { min-width: 0; padding: 3px; }
  .record-cell { padding: 0; }
  .measurement-row { font-size: var(--type-secondary); }
  .vaccine-body { padding: 0 15px 16px; }
  .vaccine-upcoming { grid-template-columns: auto minmax(0, 1fr); }
  .vaccine-upcoming time { grid-column: 2; }
  .vaccine-row { grid-template-columns: 74px minmax(0, 1fr) 44px; gap: 8px; min-height: 76px; padding: 10px; }
  .vaccine-date { font-size: var(--type-caption); }
  .vaccine-name-line { flex-wrap: wrap; gap: 4px; }
  .vaccine-name-line strong { flex: 0 0 100%; font-size: var(--type-secondary); }
  .vaccine-copy > span { font-size: var(--type-caption); }
  .vaccine-next { grid-column: 2 / -1; grid-template-columns: auto auto minmax(0, 1fr); align-items: center; gap: 6px; }
  .vaccine-next strong { font-size: var(--type-caption); }
  .vaccine-next small { font-size: 0.6875rem; }
  .vaccine-edit { grid-column: 3; grid-row: 1; width: 44px; height: 44px; }
  .milestone-copy strong { font-size: var(--type-secondary); }
  .milestone-copy span { font-size: 0.8125rem; }
  .diary-list { grid-template-columns: 1fr; }
  .diary-card { grid-template-columns: 118px minmax(0, 1fr); min-height: 150px; }
  .diary-copy { padding: 13px; }
  .diary-photo { width: calc(100% - 16px); margin: 8px; padding: 5px 5px 17px; }
  .diary-photo-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; padding-inline: 2px; }
  .diary-photo-tile { padding: 5px 5px 17px; }
  .diary-date { font-size: 0.8125rem; }
  .diary-title { font-size: var(--type-body); }
  .diary-excerpt { font-size: 0.9375rem; }
  .modal.diary-lightbox { width: 100%; max-height: calc(100dvh - 24px); }
  .diary-lightbox-body { padding: 0 18px; }
  .diary-lightbox-layout { grid-template-columns: 1fr; gap: 16px; }
  .diary-lightbox-primary { min-height: 220px; max-height: 46dvh; }
  .diary-lightbox-primary img, .diary-lightbox-primary video { max-height: 46dvh; }
  .diary-lightbox-copy p { font-size: var(--type-body); line-height: 1.7; }
  .diary-lightbox-actions { justify-content: stretch; }
  .diary-lightbox-actions .ghost-button { flex: 1; }
  .tag { font-size: var(--type-caption); }
  .form-grid { grid-template-columns: 1fr; }
  .form-field.full { grid-column: auto; }
  .form-label { font-size: 0.9375rem; }
  .form-help { font-size: 0.8125rem; line-height: 1.45; }
  .field-input, .field-select { --control-height: 52px; font-size: var(--type-body); }
  .field-textarea { min-height: 124px; font-size: var(--type-body); }
  .modal-title { font-size: 1.5rem; }
  .modal-subtitle { font-size: var(--type-secondary); }
  .modal-header { padding: 20px 18px 14px; }
  .modal-body { padding: 0 18px 18px; }
  .modal-footer { padding: 14px 18px 20px; }
  .type-picker { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .type-option span { font-size: 0.8125rem; }
  .timer-box small { font-size: 0.8125rem; }
  .weekly-panel-header { display: grid; }
  .weekly-metric-tabs { justify-content: flex-start; margin-top: 10px; }
  .weekly-metric-button { min-height: 40px; font-size: 0.8125rem; }
  .weekly-chart { grid-template-columns: 1fr; padding: 0 15px 16px; }
  .weekly-chart-summary { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 8px; font-size: var(--type-secondary); }
  .weekly-chart-icon { margin: 0; }
  .weekly-chart-summary > strong { margin: 0; font-size: 1.5rem; }
  .weekly-chart-summary > div { display: none; }
  .weekly-columns { grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; width: 100%; min-width: 0; min-height: 190px; overflow: visible; padding: 0; }
  .weekly-column { grid-template-rows: 20px minmax(104px, 1fr) 38px; gap: 4px; }
  .weekly-column-value, .weekly-column time { font-size: var(--type-caption); }
  .weekly-column time small { font-size: 0.6875rem; }
  .setting-card { align-items: flex-start; }
  .setting-card-actions { flex-direction: column; }
  .setting-card-actions .setting-actions { width: 100%; justify-content: flex-end; }
  .setting-copy strong { font-size: 0.9375rem; }
  .setting-copy span { font-size: 0.8125rem; line-height: 1.5; }
  .caregiver-person strong, .child-picker-select strong { font-size: var(--type-secondary); }
  .caregiver-person span, .child-picker-select small, .permission, .share-code small { font-size: 0.8125rem; }
  .auth-status p { font-size: var(--type-secondary); }
  .data-flow strong { font-size: var(--type-secondary); }
  .data-flow small, .modal-hint { font-size: var(--type-caption); }
  .data-flow { grid-template-columns: 1fr; }
  .invite-form { display: grid; grid-template-columns: 1fr; }
  .toast { min-width: 0; font-size: var(--type-secondary); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

.sync-status { position: fixed; right: 16px; bottom: 16px; z-index: 60; display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 12px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink-soft); background: var(--surface); font-size: 12px; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06); }
.sync-status[hidden] { display: none; }
.sync-status.syncing { color: var(--sun-dark); border-color: rgba(244, 185, 66, 0.5); background: var(--sun-wash); }
.sync-status.offline { color: var(--ink-muted); }
@media (max-width: 720px) {
  .sync-status { right: 12px; bottom: 76px; min-height: 36px; }
}
