/* Little One web app. Colours are tokens: every text/background pair is checked for WCAG AA in
   apps/web/tests/contrast.test.mjs, in the light theme below and the dark theme further down. */
:root {
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  --serif: Georgia, "Times New Roman", serif;

  --bg: #faf8f2;
  --surface: #fffefa;
  --surface-raised: #fffdf8;
  --surface-soft: #f0f2e9;
  --surface-sunken: #eef1e4;
  --topbar: #fcfbf7;
  --field: #fbfcf8;
  --border: #e6e7dc;
  --border-strong: #7f8a7a;
  --text: #283d34;
  --text-2: #4a5747;
  --muted: #5c6758;
  --accent: #274d40;
  --accent-hover: #38614e;
  --on-accent: #f6f4ea;
  --accent-text: #3d5a35;
  --accent-soft: #e0e7d4;
  --brand-dot: #748c5a;
  --decor: #9eab7f;
  --focus: #2f6b4f;
  --danger: #9a4236;
  --danger-fill: #974e46;
  --on-danger: #ffffff;
  --peach: #f8e4d5;
  --sage: #e9eedc;
  --lilac: #eeebf5;
  --yellow: #f8edce;
  --tint-icon: #6e6249;
  --note-bg: #f0f1e2;
  --note-border: #e1e5d0;
  --together-bg: #f6f2e8;
  --together-border: #d9d3bf;
  --warm-bg: #f6edda;
  --warm-border: #e5d5b0;
  --warm-text: #7a5a2e;
  --timer-bg: #274d40;
  --timer-text: #f7f5e9;
  --timer-muted: #c8d4c0;
  --timer-line: #9fb59b;
  --timer-stop: #edf0dc;
  --on-timer-stop: #2f4229;
  --timer-focus: #f7f5e9;
  --shadow: #20301c1f;
  --backdrop: #162e234d;
  --mobile-nav: #fffefaf0;

  /* One hue per kind, shared with the native app: tint for tiles, strong for icons and chart marks. */
  --on-strong: #ffffff;
  --breast-tint: #fbf0cf;   --breast-strong: #a06800;
  --bottle-tint: #fbe3da;   --bottle-strong: #c0461b;
  --sleep-tint: #e8eafb;    --sleep-strong: #4f63c9;
  --pump-tint: #f9e1ec;     --pump-strong: #a9386f;
  --diaper-tint: #dcf1ed;   --diaper-strong: #0e7566;
  --solids-tint: #e3f1da;   --solids-strong: #3b7d33;
  --growth-tint: #ddeefa;   --growth-strong: #1d6ba3;
  --care-tint: #fbe0e0;     --care-strong: #b3261e;
  --moment-tint: #efe5fa;   --moment-strong: #7a4db8;
  --recovery-tint: #f0e8e0; --recovery-strong: #7a5b3e;
  --dirty: #7a5b3e;
  --sleep-fill: color-mix(in srgb, var(--sleep-strong) 55%, var(--surface));
  /* How much category color the week pattern keeps: pastel shapes, without outlines. Mirrors WeekPattern.swift. */
  --pastel-sleep: 32%; --pastel-edge: 55%; --pastel-pump: 50%; --pastel-mark: 60%; --pastel-dot: 75%;

  /* Week pattern */
  --night: #eef0f6;
  --grid: #d3d8e0;
  --today-col: #274d400a;
  --p-dry: #7b8378;
  --p-now: #c8402c;

  color: var(--text);
  background: var(--bg);
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #0f1714;
    --surface: #16201b;
    --surface-raised: #18231e;
    --surface-soft: #131c18;
    --surface-sunken: #22302a;
    --topbar: #111a16;
    --field: #111a16;
    --border: #26332d;
    --border-strong: #6f8379;
    --text: #f2ecdf;
    --text-2: #d5d9cd;
    --muted: #aeb8a9;
    --accent: #b5dbbd;
    --accent-hover: #c9e8cf;
    --on-accent: #10231a;
    --accent-text: #b5dbbd;
    --accent-soft: #24372d;
    --brand-dot: #8fbf98;
    --decor: #6f8a72;
    --focus: #b5dbbd;
    --danger: #f0a493;
    --danger-fill: #f0a493;
    --on-danger: #2b1410;
    --peach: #3a2a21;
    --sage: #253021;
    --lilac: #2a2836;
    --yellow: #342e1f;
    --tint-icon: #e6d9c0;
    --note-bg: #1a251d;
    --note-border: #2b3a2c;
    --together-bg: #1e1c16;
    --together-border: #4a4433;
    --warm-bg: #342b1b;
    --warm-border: #57492c;
    --warm-text: #f0d9a8;
    --timer-bg: #1e3a2f;
    --timer-text: #f2ecdf;
    --timer-muted: #bccbb9;
    --timer-line: #7f9a86;
    --timer-stop: #b5dbbd;
    --on-timer-stop: #10231a;
    --timer-focus: #f2ecdf;
    --shadow: #00000066;
    --backdrop: #000000a6;
    --mobile-nav: #111a16f0;

    --on-strong: #0f1714;
    --breast-tint: #3a3218;   --breast-strong: #f2c14e;
    --bottle-tint: #3d2620;   --bottle-strong: #ff9b72;
    --sleep-tint: #23284a;    --sleep-strong: #a3b4ee;
    --pump-tint: #3d2232;     --pump-strong: #f09cc5;
    --diaper-tint: #16332f;   --diaper-strong: #6fd3c2;
    --solids-tint: #213520;   --solids-strong: #9ad58e;
    --growth-tint: #182e40;   --growth-strong: #8ec5f0;
    --care-tint: #401f22;     --care-strong: #f4a3a0;
    --moment-tint: #30233f;   --moment-strong: #c9a9f2;
    --recovery-tint: #352c25; --recovery-strong: #d2ae88;
    --dirty: #d2ae88;
    --sleep-fill: color-mix(in srgb, var(--sleep-strong) 70%, var(--sleep-tint));
    /* Dark mode keeps more color, otherwise the pastels turn grey on the dark surface. */
    --pastel-sleep: 50%; --pastel-edge: 75%; --pastel-pump: 70%; --pastel-mark: 78%; --pastel-dot: 90%;

    --night: #101915;
    --grid: #2f3d36;
    --today-col: #b5dbbd0a;
    --p-dry: #939c92;
    --p-now: #ff8a70;
  }
}

/* Base */
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); }
button, input, select, textarea { font: inherit; color: inherit; }
button, a, input, select, textarea, summary { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; border: 0; background: none; padding: 0; line-height: 1.2; hyphens: manual; overflow-wrap: normal; transition: background .15s, transform .15s, color .15s; }
button:disabled { cursor: not-allowed; }
button:active:not(:disabled) { transform: translateY(1px); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }
h1 { font-family: var(--serif); font-size: 45px; font-weight: 400; line-height: 1.16; letter-spacing: -1.7px; }
h1 > span { color: var(--brand-dot); }
h2 { font-size: 19px; letter-spacing: -.4px; font-weight: 600; }
h3 { font-size: 16px; font-weight: 600; }
p { line-height: 1.65; }
.icon { width: 22px; height: 22px; flex-shrink: 0; vertical-align: middle; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.loading { padding: 50px; text-align: center; color: var(--muted); }

/* Sidebar */
.sidebar { position: fixed; inset: 0 auto 0 0; width: 236px; padding: 40px 25px 28px; background: var(--surface-soft); border-right: 1px solid var(--border); display: flex; flex-direction: column; z-index: 10; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; margin-bottom: 60px; padding-left: 6px; border-radius: 12px; }
.brand img { width: 37px; height: 37px; border-radius: 11px; }
.brand > span { font-family: var(--serif); font-size: 30px; letter-spacing: -1.4px; color: var(--accent-text); }
.brand-dot { color: var(--brand-dot); }
.sidebar nav { display: grid; gap: 8px; }
.nav-item { display: flex; align-items: center; gap: 15px; min-height: 52px; text-align: left; padding: 0 17px; border-radius: 14px; font-size: 14px; color: var(--text-2); }
.nav-item.selected { background: var(--accent-soft); color: var(--accent-text); font-weight: 600; }
.nav-item:hover { background: var(--accent-soft); }
.nav-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent-text); margin-left: auto; }
.sidebar-bottom { margin-top: auto; padding: 22px 17px 0; }
.little-flower { color: var(--decor); margin-bottom: 20px; transform: rotate(-20deg); width: max-content; }
.little-flower .icon { width: 35px; height: 35px; }
.sidebar-bottom p { font-family: var(--serif); font-size: 18px; color: var(--accent-text); line-height: 1.6; }

/* Top bar */
.shell { margin-left: 236px; }
.topbar { min-height: 88px; border-bottom: 1px solid var(--border); padding: 12px 46px; display: flex; align-items: center; justify-content: space-between; gap: 20px; background: var(--topbar); }
.topbar-right { display: flex; align-items: center; gap: 20px; min-width: 0; margin-left: auto; }
.save-status { font-size: 12px; color: var(--muted); display: inline-flex; align-items: center; gap: 8px; }
.status-dot { flex: none; height: 7px; width: 7px; border-radius: 50%; background: var(--brand-dot); display: inline-block; }
.status-dot.warn { background: var(--bottle-strong); }
.profile-button { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 4px 12px 4px 4px; border-radius: 999px; font-size: 14px; font-weight: 600; min-width: 0; }
.profile-button:hover { background: var(--surface-sunken); }
.profile-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 160px; }
.profile-button .chevron { width: 14px; height: 14px; transform: rotate(90deg); color: var(--muted); }
.avatar { display: inline-flex; flex: none; width: 36px; height: 36px; border-radius: 50%; align-items: center; justify-content: center; background: var(--peach); color: var(--tint-icon); font-size: 15px; font-family: var(--serif); }
.avatar .icon { width: 18px; height: 18px; }
.demo-tag { display: inline-flex; align-items: center; min-height: 40px; font-size: 13px; line-height: 1.35; text-align: left; color: var(--warm-text); background: var(--warm-bg); border: 1px solid var(--warm-border); border-radius: 10px; padding: 6px 12px; }

/* Layout */
main { max-width: 1350px; margin: 0 auto; padding: 42px 46px 24px; }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 25px; margin-bottom: 34px; }
.eyebrow { font-size: 11px; letter-spacing: 2px; font-weight: 600; color: var(--muted); display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.eyebrow .icon { width: 16px; height: 16px; color: var(--decor); }
.page-heading p { color: var(--muted); font-size: 14px; margin-top: 12px; }
.dot-separator { padding: 0 7px; }
.date-badge { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; font-size: 13px; color: var(--muted); white-space: nowrap; }
.date-badge strong { font-size: 15px; font-weight: 500; color: var(--text); }
.dashboard-columns { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 28px; }
.dashboard-main { min-width: 0; container-type: inline-size; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }

/* Buttons */
.primary, .secondary, .danger { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 18px; border-radius: 12px; font-size: 14px; font-weight: 600; text-align: center; text-wrap: balance; }
.primary { background: var(--accent); color: var(--on-accent); }
.primary:hover:not(:disabled) { background: var(--accent-hover); }
.secondary { background: var(--surface-sunken); color: var(--accent-text); border: 1px solid var(--border-strong); }
.secondary:hover:not(:disabled) { background: var(--accent-soft); }
.danger { background: var(--danger-fill); color: var(--on-danger); }
.primary .icon, .secondary .icon, .danger .icon { width: 18px; height: 18px; }
.primary:disabled, .secondary:disabled, .danger:disabled { background: var(--surface-sunken); color: var(--muted); border: 1px dashed var(--border-strong); }
.round-button:disabled { color: var(--muted); border-style: dashed; background: transparent; }
.text-button:disabled, .chip:disabled, .quiet-button:disabled, .timer-pause:disabled, .timer-stop:disabled { opacity: .7; }
.is-busy:disabled { border-style: solid; }
.small { min-height: 38px; padding: 8px 14px; font-size: 13px; }
.large { min-height: 52px; padding: 14px 26px; font-size: 15px; }
.wide { width: 100%; }
.text-button { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 6px 0; color: var(--accent-text); font-size: 13px; font-weight: 600; white-space: nowrap; }
.text-button:hover { text-decoration: underline; text-underline-offset: 3px; }
.text-button .icon { height: 14px; width: 14px; }
.quiet-button { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 8px 2px; color: var(--muted); font-size: 14px; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.quiet-button:hover { color: var(--text); }
.quiet-button.center { display: flex; margin: 6px auto 0; }
.danger-text { display: inline-flex; align-items: center; min-height: 44px; color: var(--danger); font-size: 14px; font-weight: 600; padding: 8px 2px; }
.round-button { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--border-strong); color: var(--text); background: var(--surface); }
.round-button:hover:not(:disabled) { background: var(--surface-sunken); }
.round-button .icon { width: 16px; height: 16px; }
.icon-button { flex: none; border-radius: 50%; width: 40px; height: 40px; background: var(--surface-sunken); display: flex; align-items: center; justify-content: center; color: var(--text-2); }
.icon-button > .icon { width: 18px; height: 18px; }
.chip { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 36px; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--border-strong); font-size: 13px; font-weight: 600; color: var(--text-2); white-space: nowrap; }
.chip:hover { background: var(--surface-sunken); }
.chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; margin: -4px 0 16px; }
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin: 20px 0 4px; }
.form-actions.center { justify-content: center; }
.form-actions.stack { flex-direction: column; align-items: stretch; }
.is-busy::before { content: ""; flex: none; width: 1em; height: 1em; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .75s linear infinite; }
.is-busy .icon { display: none; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Timer card */
.timer-card { --focus: var(--timer-focus); position: relative; padding: 24px 27px 19px; border-radius: 23px; background: var(--timer-bg); color: var(--timer-text); overflow: hidden; margin-bottom: 23px; box-shadow: 0 9px 20px var(--shadow); }
.timer-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.timer-top > span:first-child { display: flex; align-items: center; gap: 9px; font-size: 14px; font-weight: 500; }
.timer-top .icon { width: 19px; height: 19px; color: var(--timer-muted); }
.live-tag { flex: none; font-size: 10px; letter-spacing: 1.3px; font-weight: 600; display: inline-flex; align-items: center; gap: 7px; color: var(--timer-muted); background: #ffffff12; padding: 6px 10px; border-radius: 20px; }
.live-tag i { width: 6px; height: 6px; border-radius: 50%; background: var(--timer-muted); }
.timer-middle { display: flex; align-items: center; justify-content: space-between; margin: 17px 0 21px; }
.timer-value { font-size: 52px; font-weight: 300; letter-spacing: 1px; font-variant-numeric: tabular-nums; line-height: 1.1; }
.timer-middle small { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin-top: 10px; font-size: 13px; color: var(--timer-muted); }
.timer-edit { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; font-size: 13px; color: var(--timer-text); text-decoration: underline; text-underline-offset: 3px; }
.timer-edit .icon { width: 14px; height: 14px; }
.timer-art { position: relative; padding-right: 20px; transform: rotate(-15deg); color: var(--timer-muted); }
.timer-art::before, .timer-art::after { content: "✧"; position: absolute; font-size: 20px; left: -20px; top: -10px; }
.timer-art::after { left: auto; right: 0; top: 50px; font-size: 12px; }
.timer-art .icon { height: 65px; width: 65px; stroke-width: .8; }
.timer-footer { border-top: 1px solid #ffffff24; padding-top: 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.timer-footer > span { font-family: var(--serif); font-size: 14px; font-style: italic; color: var(--timer-muted); }
.timer-actions { display: flex; gap: 10px; margin-left: auto; }
.timer-pause, .timer-stop { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 8px 16px; border-radius: 11px; font-size: 14px; font-weight: 600; white-space: nowrap; }
.timer-pause .icon, .timer-stop .icon { width: 16px; height: 16px; }
.timer-pause { border: 1px solid var(--timer-line); color: var(--timer-text); }
.timer-pause:hover { background: #ffffff14; }
.timer-stop { background: var(--timer-stop); color: var(--on-timer-stop); }
.timer-stop .icon { fill: currentColor; width: 12px; height: 12px; }
.side-controls { display: flex; gap: 8px; margin-bottom: 15px; }
.side-controls button { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; border: 1px solid var(--timer-line); border-radius: 11px; padding: 8px 14px; font-size: 14px; font-weight: 600; color: var(--timer-text); }
.side-time { font-weight: 400; font-variant-numeric: tabular-nums; color: var(--timer-muted); }
.side-controls button[aria-pressed="true"] { background: var(--timer-stop); border-color: var(--timer-stop); color: var(--on-timer-stop); }
.side-controls button[aria-pressed="true"] .side-time { color: inherit; }

/* Forecast */
.forecast-card { padding: 20px 20px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: 17px; margin: -14px 0 32px; }
.forecast-card .section-heading { margin-bottom: 6px; }
.forecast-card h2 { font-size: 16px; }
.forecast-card .section-heading > .icon { width: 16px; height: 16px; color: var(--decor); }
.forecast-rows { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 4px 18px; }
.forecast-row { display: flex; align-items: flex-start; gap: 12px; padding: 12px 0; }
.forecast-row > div { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.forecast-label { font-size: 12px; color: var(--muted); }
.forecast-row p { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; line-height: 1.35; }
.forecast-row strong { font-size: 17px; font-weight: 600; font-variant-numeric: tabular-nums; }
.forecast-when { font-size: 13px; color: var(--accent-text); font-weight: 600; }
.forecast-row small { font-size: 12px; color: var(--text-2); }
.forecast-note { font-size: 12px; color: var(--muted); line-height: 1.55; border-top: 1px solid var(--border); padding-top: 12px; margin-top: 4px; }

/* Day totals */
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; margin-bottom: 32px; }
.stat { padding: 19px 19px 17px; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; min-width: 0; }
.stat-label { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.stat-label .icon { height: 17px; width: 17px; color: var(--decor); }
.stat > div { margin-top: 12px; display: flex; align-items: baseline; gap: 7px; flex-wrap: wrap; }
.stat strong { font-size: 29px; letter-spacing: -1px; font-weight: 500; line-height: 1.1; }
.stat > div > span { font-size: 12px; color: var(--muted); }
.stat small { font-size: 12px; color: var(--muted); display: block; margin-top: 8px; line-height: 1.4; }
.stat .stat-pump { display: flex; align-items: center; gap: 5px; margin-top: 4px; }
.stat-pump .icon { flex: none; width: 13px; height: 13px; color: var(--pump-strong); }

/* Quick log */
.quick-section { margin-bottom: 33px; }
.quick-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
.quick-card { display: flex; align-items: center; text-align: left; gap: 12px; min-height: 84px; padding: 16px 18px; border-radius: 15px; border: 1px solid transparent; min-width: 0; }
.quick-card:hover { filter: brightness(.98); transform: translateY(-1px); }
.peach { background: var(--peach); }
.sage { background: var(--sage); }
.lilac { background: var(--lilac); }
.yellow { background: var(--yellow); }
.kind-breast { --tint: var(--breast-tint); --strong: var(--breast-strong); }
.kind-bottle { --tint: var(--bottle-tint); --strong: var(--bottle-strong); }
.kind-sleep { --tint: var(--sleep-tint); --strong: var(--sleep-strong); }
.kind-pump { --tint: var(--pump-tint); --strong: var(--pump-strong); }
.kind-diaper { --tint: var(--diaper-tint); --strong: var(--diaper-strong); }
.kind-solids { --tint: var(--solids-tint); --strong: var(--solids-strong); }
.kind-growth { --tint: var(--growth-tint); --strong: var(--growth-strong); }
.kind-medicine, .kind-temperature { --tint: var(--care-tint); --strong: var(--care-strong); }
.kind-milestone, .kind-pregnancy { --tint: var(--moment-tint); --strong: var(--moment-strong); }
.kind-recovery { --tint: var(--recovery-tint); --strong: var(--recovery-strong); }
[class*="kind-"] { background: var(--tint); }
.quick-icon { display: flex; align-items: center; justify-content: center; color: var(--strong, var(--tint-icon)); flex: none; }
.quick-icon .icon { width: 28px; height: 28px; stroke-width: 1.3; }
.quick-copy { display: flex; flex-direction: column; gap: 3px; min-width: 0; font-size: 14px; font-weight: 600; line-height: 1.3; }
.quick-card small { display: block; font-size: 12px; font-weight: 400; color: var(--text-2); }
.quick-plus { margin-left: auto; flex: none; display: inline-flex; color: var(--strong, var(--tint-icon)); }
.quick-plus .icon { width: 18px; height: 18px; }

/* Journal */
.timeline-section { border: 1px solid var(--border); border-radius: 20px; background: var(--surface); padding: 22px 23px 7px; }
.timeline-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 14px; }
.count { display: inline-flex; align-items: center; justify-content: center; min-width: 24px; height: 22px; border-radius: 6px; font: 600 12px -apple-system, BlinkMacSystemFont, sans-serif; color: var(--text-2); background: var(--surface-sunken); padding: 0 6px; vertical-align: middle; margin-left: 6px; }
.day-nav { display: flex; align-items: center; gap: 6px; }
.date-pill { display: inline-flex; flex-direction: row; align-items: center; gap: 8px; height: 40px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); margin: 0; font-size: 14px; }
.date-pill:focus-within { outline: 3px solid var(--focus); outline-offset: 2px; }
.date-pill > .icon { width: 16px; height: 16px; color: var(--muted); }
.date-pill input { border: 0; padding: 0; min-height: 0; height: 100%; background: transparent; font-size: 14px; color: var(--text); width: auto; min-width: 0; }
.date-pill input:focus-visible { outline: none; }
.filter-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding-bottom: 14px; border-bottom: 1px solid var(--border); }
.today-link { margin-left: auto; }
.timeline-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 16px 0; text-align: left; border-bottom: 1px solid var(--border); border-radius: 0; }
.timeline-row:last-child { border: 0; }
.timeline-row:hover { background: linear-gradient(90deg, transparent, var(--surface-sunken) 20%, var(--surface-sunken) 80%, transparent); }
.timeline-row time { flex: none; font-size: 13px; color: var(--muted); min-width: 42px; font-variant-numeric: tabular-nums; }
.timeline-icon { width: 38px; height: 38px; border-radius: 12px; display: flex; align-items: center; justify-content: center; color: var(--strong, var(--tint-icon)); flex-shrink: 0; }
.timeline-icon .icon { width: 19px; height: 19px; stroke-width: 1.4; }
.timeline-copy { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.timeline-copy strong { font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.timeline-copy > span { color: var(--text-2); font-size: 13px; font-variant-numeric: tabular-nums; }
.timeline-copy small { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; max-width: 360px; white-space: nowrap; }
.author-pill { flex: none; margin-left: auto; font-size: 12px; color: var(--text-2); padding: 4px 9px; background: var(--surface-sunken); border-radius: 7px; max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-chevron { display: inline-flex; color: var(--muted); }
.row-chevron .icon { width: 13px; height: 13px; }
.running-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--brand-dot); }
.empty-small { text-align: center; padding: 30px 12px; color: var(--text-2); font-size: 14px; line-height: 1.8; }
.empty-small > span { font-size: 13px; color: var(--muted); }

/* Side column */
.day-aside { display: flex; flex-direction: column; gap: 24px; }
.baby-note { position: relative; min-height: 281px; background: var(--note-bg); border-radius: 20px; padding: 30px 22px; text-align: center; overflow: hidden; border: 1px solid var(--note-border); }
.tiny-leaf { color: var(--decor); transform: rotate(-15deg); margin: 1px auto 20px; width: max-content; }
.tiny-leaf .icon { width: 42px; height: 42px; stroke-width: 1.1; }
.note-stars { position: absolute; left: 38px; top: 28px; color: var(--decor); font-size: 20px; }
.baby-note h3 { font-family: var(--serif); font-size: 25px; line-height: 1.28; font-weight: 400; letter-spacing: -.4px; color: var(--accent-text); }
.baby-note p { font-size: 13px; color: var(--text-2); line-height: 1.7; margin-top: 14px; }
.note-line { width: 28px; height: 1px; background: var(--decor); margin: 19px auto 14px; }
.baby-note > span { font-size: 10px; letter-spacing: 2px; font-weight: 600; color: var(--muted); }
.last-moments, .mobile-moments { padding: 20px 19px; background: var(--surface); border: 1px solid var(--border); border-radius: 17px; }
.mobile-moments { display: none; }
.last-moments .section-heading, .mobile-moments .section-heading { margin-bottom: 6px; }
.last-moments h3, .mobile-moments h3 { font-size: 14px; }
.last-moments .section-heading > .icon, .mobile-moments .section-heading > .icon { width: 15px; height: 15px; color: var(--decor); }
.last-moment { display: flex; align-items: center; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--border); }
.last-moment:last-child { border: 0; padding-bottom: 0; }
.last-icon { display: flex; align-items: center; justify-content: center; flex-shrink: 0; height: 34px; width: 34px; border-radius: 10px; color: var(--strong, var(--tint-icon)); }
.last-icon .icon { width: 16px; height: 16px; }
.last-moment > div { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.last-moment > div > span { font-size: 12px; color: var(--muted); }
.last-moment strong { font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.last-moment small { font-size: 12px; color: var(--text-2); }
.together-note { padding: 25px 22px; background: var(--together-bg); border: 1px dashed var(--together-border); border-radius: 17px; }
.together-note > .icon { color: var(--decor); width: 24px; height: 24px; margin-bottom: 13px; }
.together-note h3 { font-family: var(--serif); font-size: 20px; font-weight: 400; }
.together-note p { font-size: 13px; line-height: 1.7; color: var(--text-2); margin-top: 8px; }
.together-note .text-button { margin-top: 8px; }
.page-footer { max-width: 1350px; margin: 20px auto 0; padding: 23px 46px 28px; display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 12px; color: var(--muted); }
.page-footer > span:first-child { font-family: var(--serif); font-size: 18px; letter-spacing: -1px; color: var(--accent-text); }
.mobile-nav { display: none; }

/* Welcome */
.welcome { display: flex; align-items: center; flex-direction: column; text-align: center; padding: 15px 0 50px; }
.welcome h1 { font-size: 60px; }
.welcome > p { font-size: 17px; color: var(--text-2); margin: 23px 0 30px; }
.welcome > .text-button { margin-top: 15px; font-size: 15px; min-height: 44px; }
.welcome-art { position: relative; display: flex; align-items: center; justify-content: center; width: 280px; height: 220px; margin: 15px auto 5px; }
/* A soft contact shadow right under what each fox stands on; the values are measured from the artwork and shared
   with FoxIllustration in Components.swift. Cards lift every fox onto one baseline. */
.fox-art { object-fit: contain; flex-shrink: 0; background: radial-gradient(var(--fox-w,38%) 3.6% at var(--fox-x,50%) var(--fox-y,89%),color-mix(in srgb,var(--fox-ground,var(--accent)) 24%,transparent),transparent) no-repeat; }
.fox-art[data-fox="bottle"] { --fox-x: 54.9%; --fox-w: 34.1%; --fox-y: 95.3%; --fox-lift: -1.0%; }
.fox-art[data-fox="breast"] { --fox-x: 58.3%; --fox-w: 31.9%; --fox-y: 94.3%; --fox-lift: 0.0%; }
.fox-art[data-fox="diaper"] { --fox-x: 48.4%; --fox-w: 42.7%; --fox-y: 92.4%; --fox-lift: 1.9%; }
.fox-art[data-fox="growth"] { --fox-x: 49.3%; --fox-w: 37.7%; --fox-y: 91.3%; --fox-lift: 3.0%; }
.fox-art[data-fox="medicine"] { --fox-x: 48.3%; --fox-w: 40.5%; --fox-y: 92.9%; --fox-lift: 1.4%; }
.fox-art[data-fox="milestone"] { --fox-x: 60.2%; --fox-w: 31.5%; --fox-y: 88.7%; --fox-lift: 5.6%; }
.fox-art[data-fox="pregnancy"] { --fox-x: 55.1%; --fox-w: 33.5%; --fox-y: 95.0%; --fox-lift: -0.7%; }
.fox-art[data-fox="pump"] { --fox-x: 48.0%; --fox-w: 45.2%; --fox-y: 90.8%; --fox-lift: 3.5%; }
.fox-art[data-fox="recovery"] { --fox-x: 45.6%; --fox-w: 40.3%; --fox-y: 91.8%; --fox-lift: 2.5%; }
.fox-art[data-fox="sleep"] { --fox-x: 52.0%; --fox-w: 24.5%; --fox-y: 88.7%; --fox-lift: 5.6%; }
.fox-art[data-fox="solids"] { --fox-x: 49.7%; --fox-w: 39.1%; --fox-y: 91.7%; --fox-lift: 2.6%; }
.fox-art[data-fox="temperature"] { --fox-x: 56.8%; --fox-w: 29.4%; --fox-y: 93.6%; --fox-lift: 0.7%; }
.fox-art[data-fox="together"] { --fox-x: 49.9%; --fox-w: 48.0%; --fox-y: 85.4%; --fox-lift: 8.9%; }
.fox-art[data-fox="welcome"] { --fox-x: 52.8%; --fox-w: 36.0%; --fox-y: 90.4%; --fox-lift: 3.9%; }
.timer-art .fox-art, .entry-art-stage .fox-art { translate: 0 var(--fox-lift,0%); }
.fox-art[data-fox="breast"] { --fox-ground: var(--breast-strong); }
.fox-art[data-fox="bottle"] { --fox-ground: var(--bottle-strong); }
.fox-art[data-fox="sleep"] { --fox-ground: var(--sleep-strong); }
.fox-art[data-fox="pump"] { --fox-ground: var(--pump-strong); }
.fox-art[data-fox="diaper"] { --fox-ground: var(--diaper-strong); }
.fox-art[data-fox="solids"] { --fox-ground: var(--solids-strong); }
.fox-art[data-fox="growth"] { --fox-ground: var(--growth-strong); }
.fox-art[data-fox="medicine"], .fox-art[data-fox="temperature"] { --fox-ground: var(--care-strong); }
.fox-art[data-fox="milestone"], .fox-art[data-fox="pregnancy"] { --fox-ground: var(--moment-strong); }
.fox-art[data-fox="recovery"] { --fox-ground: var(--recovery-strong); }
.fox-art[data-fox="peek"] { background-image: none; }
.welcome-art .fox-art { width: 180px; height: 180px; position: relative; }
.empty-fox { display: block; margin: 0 auto 14px; }
.entry-fox { display: block; margin: -4px auto 16px; }
.together-note .fox-art { display: block; margin: 0 auto 14px; }
.orbit { position: absolute; border: 1px solid var(--border); border-radius: 50%; width: 210px; height: 180px; transform: rotate(-30deg); }
.orbit-two { width: 250px; height: 210px; transform: rotate(25deg); }
.orbit-one::before, .orbit-two::after { content: "✧"; position: absolute; right: -7px; top: 40px; color: var(--decor); background: var(--bg); font-size: 28px; }
.welcome-note { font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 8px; margin-top: 40px; }
.welcome-note .icon { width: 15px; height: 15px; }

/* Cards: overview and family */
.trends-grid, .settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; align-items: start; }
.trend-card, .settings-card { padding: 27px; background: var(--surface); border: 1px solid var(--border); border-radius: 20px; min-width: 0; }
.trend-card > p, .settings-card > p { font-size: 14px; color: var(--text-2); margin-top: 12px; margin-bottom: 18px; }
.empty-card { max-width: 560px; }
.settings-card > h2 { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.settings-card > h2 > .icon { color: var(--decor); }
.settings-card h3 { margin: 18px 0 12px; font-size: 15px; }
.settings-card hr { margin: 27px 0; border: 0; border-top: 1px solid var(--border); }
.billing-page { max-width: 780px; }
.billing-page > p, .billing-page > .settings-card, .billing-page > nav { margin-block: 16px; }
.billing-plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 265px), 1fr)); gap: 18px; }
.billing-plan { display: flex; flex-direction: column; align-items: start; }
.billing-plan > h2 { margin-bottom: 4px; }
.billing-plan > .billing-price { font: 1.8rem/1.2 var(--serif); color: var(--accent-text); margin-block: 6px 14px; }
.billing-plan > p { margin-block: 0 16px; }
.billing-plan > button { margin-top: auto; }
.readonly-entry { border: 0; padding: 0; min-width: 0; }
.entry-note { white-space: pre-wrap; overflow-wrap: anywhere; }
.growth-row { display: flex; justify-content: space-between; border-bottom: 1px solid var(--border); padding: 14px 0; font-size: 14px; }
.growth-row > span { color: var(--muted); }
.growth-row + button, .trend-card .empty-small + button { margin-top: 20px; }
.footnote { font-size: 13px !important; color: var(--muted) !important; line-height: 1.7; margin: 18px 0; }

/* Forms */
.field { display: flex; flex-direction: column; gap: 8px; margin: 16px 0; min-width: 0; }
.field > label, legend { font-size: 13px; font-weight: 500; color: var(--accent-text); }
label { display: flex; flex-direction: column; gap: 8px; font-size: 13px; color: var(--accent-text); margin: 16px 0; }
.field > label { margin: 0; }
.field-row { display: grid; grid-template-columns: 2fr 1fr; gap: 14px; }
.field-row.even { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.field-row > .field { margin: 16px 0; }
.field-row + .field-hint { margin-top: -8px; }
.field-hint { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); line-height: 1.5; margin: 6px 0 0; }
.field-hint .icon { width: 15px; height: 15px; }
.field-hint.ok { color: var(--accent-text); }
.field-hint .rule-ok, .field-hint.ok .rule-open { display: none; }
.field-hint.ok .rule-ok { display: inline; }
input, textarea, select { width: 100%; min-width: 0; border: 1px solid var(--border-strong); border-radius: 11px; background: var(--field); padding: 11px 13px; font-size: 15px; min-height: 46px; color: var(--text); }
input[readonly] { background: var(--surface-sunken); font-size: 13px; }
textarea { resize: vertical; line-height: 1.6; }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: 1; font-size: 14px; }
input:focus-visible, textarea:focus-visible, select:focus-visible { outline-offset: 1px; }
.form-error { font-size: 14px; color: var(--danger); margin-top: 12px; line-height: 1.5; font-weight: 500; }
.form-error:empty { display: none; }
.entry-meta { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); background: var(--surface-sunken); border-radius: 10px; padding: 9px 12px; margin-bottom: 4px; }
.entry-meta .icon { width: 16px; height: 16px; color: var(--muted); }
.password-field { position: relative; display: flex; }
.password-field input { padding-right: 84px; }
.reveal { position: absolute; right: 1px; top: 1px; bottom: 1px; min-width: 76px; padding: 0 12px; border-radius: 0 10px 10px 0; font-size: 13px; font-weight: 600; color: var(--accent-text); }
.reveal:hover { background: var(--surface-sunken); }
.reveal:focus-visible { outline-offset: -3px; }
.pill-group { border: 0; padding: 0; margin: 16px 0; min-width: 0; }
.pill-group legend { padding: 0; margin-bottom: 10px; }
.pills { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.pill { position: relative; margin: 0; display: block; }
.pill input { position: absolute; inset: 0; opacity: 0; margin: 0; min-height: 0; cursor: pointer; }
.pill span { display: flex; align-items: center; justify-content: center; min-height: 52px; padding: 6px 10px; border-radius: 999px; border: 1.5px solid var(--border-strong); background: var(--field); color: var(--text-2); font-size: 15px; font-weight: 600; }
.pill input:checked + span { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.pill input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
/* Pumping: the yield fields that fit the checked side (data-side, set by the app); without a side, the total of an older entry. */
.pump-fields .pills { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pump-fields .pump-left, .pump-fields .pump-right { display: none; }
.pump-fields[data-side="left"] .pump-left,
.pump-fields[data-side="right"] .pump-right,
.pump-fields[data-side="both"] .pump-left,
.pump-fields[data-side="both"] .pump-right { display: flex; }
.pump-fields:not([data-side=""]) .pump-total { display: none; }
.pill:hover span { border-color: var(--accent-text); }

/* Account */
.segmented { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 14px; background: var(--surface-sunken); margin: 18px 0 4px; }
.segmented [role="tab"] { min-height: 44px; border-radius: 10px; font-size: 14px; font-weight: 600; color: var(--text-2); }
.segmented [role="tab"][aria-selected="true"] { background: var(--surface); color: var(--text); box-shadow: 0 0 0 1px var(--border-strong), 0 2px 6px var(--shadow); }
.auth-form .primary { margin-top: 8px; }
.notice { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 14px; background: var(--yellow); margin: 4px 0 16px; }
.notice .icon { flex: none; width: 20px; height: 20px; margin-top: 2px; color: var(--tint-icon); }
.notice p { font-size: 14px; line-height: 1.55; }
.notice-close { flex: none; margin: -8px -8px -8px auto; width: 40px; height: 40px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: var(--text-2); }
.notice-close:hover { background: #00000010; }
.notice-close .icon { width: 16px; height: 16px; margin: 0; }
/* The pumping reminder wears the pumping colour, like its timer and diary rows. */
.pump-nudge { background: var(--pump-tint); }
.pump-nudge > .icon { color: var(--pump-strong); }
.confirm-state { text-align: center; padding: 6px 0 0; }
.confirm-state h3 { font-family: var(--serif); font-weight: 400; font-size: 24px; margin: 14px 0 8px; }
.confirm-state p { font-size: 14px; color: var(--text-2); overflow-wrap: anywhere; }
.confirm-icon { display: inline-flex; width: 56px; height: 56px; border-radius: 18px; background: var(--lilac); align-items: center; justify-content: center; color: var(--tint-icon); }
.signed-in-as { font-size: 14px; color: var(--text-2); overflow-wrap: anywhere; }
.choice-grid { display: grid; gap: 14px; margin: 16px 0 8px; }
/* Explicit consent before a family is shared (consent.mjs): the checkbox starts off and is read by both choices. */
.consent-card { border: 1px solid var(--border); border-radius: 16px; padding: 18px; background: var(--surface-raised); margin: 16px 0 8px; }
.consent-card h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; }
.consent-card h3 .icon { width: 20px; height: 20px; color: var(--accent); }
.consent-check { display: flex; gap: 12px; align-items: flex-start; margin: 12px 0; padding: 12px 14px; border-radius: 12px; background: var(--surface); font-weight: 600; cursor: pointer; }
.consent-check input { flex: none; width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--accent); }
.consent-card .primary { margin-top: 4px; }
.choice-card { border: 1px solid var(--border); border-radius: 16px; padding: 18px 18px 16px; background: var(--surface-raised); }
.choice-card h3 { margin: 12px 0 6px !important; font-size: 17px; }
.choice-card p { font-size: 14px; color: var(--text-2); line-height: 1.55; }
.choice-icon { display: inline-flex; width: 40px; height: 40px; border-radius: 12px; align-items: center; justify-content: center; color: var(--strong, var(--tint-icon)); }
.choice-icon .icon { width: 20px; height: 20px; }
.family-badge { display: flex; align-items: center; gap: 14px; border-radius: 14px; padding: 16px; background: var(--sage); }
.family-badge > div { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.family-badge strong { font-size: 16px; font-weight: 600; }
.family-badge span:not(.avatar) { font-size: 13px; color: var(--text-2); overflow-wrap: anywhere; }
.sync-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin: 16px 0; padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.sync-row .form-error { flex-basis: 100%; margin: 0; }
.inline-status { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--text-2); }
.invite-area > p { font-size: 14px; color: var(--text-2); margin-bottom: 14px; }
.invite-area h3 { margin-top: 4px; }
.invite-box { background: var(--surface-sunken); border-radius: 14px; padding: 16px; margin: 4px 0 0; display: grid; gap: 4px; }
.invite-box > strong { font-size: 15px; }
.invite-box > p { font-size: 13px; color: var(--text-2); }
.invite-box .field { margin: 10px 0 4px; }
.invite-code { font-size: 13px; color: var(--text-2); }
.invite-code code { font-size: 13px; color: var(--text); overflow-wrap: anywhere; }
.invite-box .form-actions { margin-top: 10px; }
.invite-box .quiet-button { justify-self: start; }
.child-row { display: flex; align-items: center; gap: 12px; margin: 16px 0; }
.child-row > div { display: flex; flex-direction: column; gap: 3px; }
.child-row strong { font-size: 15px; font-weight: 600; }
.child-row > div > span { font-size: 13px; color: var(--muted); }

/* Week pattern */
.pattern-card { background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: 24px 24px 18px; margin-bottom: 22px; }
.pattern-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.pattern-month { font-size: 14px; color: var(--muted); margin-top: 2px; }
.pager { display: flex; gap: 8px; }
.legend { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 14px; }
.legend-toggle { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 6px 13px 6px 10px; border-radius: 999px; border: 1px solid var(--border-strong); font-size: 13px; font-weight: 600; color: var(--text); background: var(--surface-sunken); white-space: nowrap; }
.legend-toggle[aria-pressed="false"] { background: transparent; color: var(--muted); font-weight: 500; text-decoration: line-through; text-decoration-thickness: 1px; }
.legend-toggle[aria-pressed="false"] .swatch { background: transparent; box-shadow: inset 0 0 0 2px var(--c); }
.swatch { flex: none; width: 14px; height: 14px; border-radius: 4px; background: var(--c); }
.sw-sleep { --c: color-mix(in srgb, var(--sleep-strong) var(--pastel-sleep), var(--surface)); }
.sw-breast { --c: color-mix(in srgb, var(--breast-strong) var(--pastel-mark), var(--surface)); }
.sw-bottle { --c: color-mix(in srgb, var(--bottle-strong) var(--pastel-mark), var(--surface)); }
.sw-pump { --c: color-mix(in srgb, var(--pump-strong) var(--pastel-pump), var(--surface)); }
.sw-solids { --c: color-mix(in srgb, var(--solids-strong) var(--pastel-mark), var(--surface)); }
.sw-diaper { --c: var(--diaper-strong); border-radius: 50%; }
.pattern { --axis: 36px; --h: 720px; position: relative; }
.pattern-head, .pattern-totals { display: grid; grid-template-columns: var(--axis) repeat(7, minmax(0, 1fr)); }
.pattern-day { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; min-height: 52px; margin: 0 3px; border-radius: 12px; font-size: 12px; color: var(--muted); }
.pattern-day strong { font-size: 18px; font-weight: 600; color: var(--text); line-height: 1.15; }
.pattern-day:hover { background: var(--surface-sunken); }
.pattern-day.is-today { background: var(--accent); color: var(--on-accent); }
.pattern-day.is-today strong { color: var(--on-accent); }
.pattern-body { position: relative; height: var(--h); margin: 14px 0 10px; }
.pattern-canvas { position: absolute; inset: 0; }
.pattern-axis span { position: absolute; left: 0; width: calc(var(--axis) - 8px); text-align: right; transform: translateY(-50%); font-size: 11px; line-height: 1; color: var(--muted); font-variant-numeric: tabular-nums; }
.pattern-plot { position: absolute; inset: 0 0 0 var(--axis); border-radius: 10px; overflow: hidden; border: 1px solid var(--border); }
.pattern-plot .night { position: absolute; left: 0; right: 0; background: var(--night); }
.hour-line { position: absolute; left: 0; right: 0; border-top: 1px dashed var(--grid); }
.pattern-columns { position: absolute; inset: 0 0 0 var(--axis); display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.pattern-col { position: relative; min-width: 0; }
.pattern-col + .pattern-col { border-left: 1px solid var(--grid); }
.pattern-col.is-today { background: var(--today-col); }
.pb, .pd { position: absolute; padding: 0; border-radius: 6px; }
.pb { left: 4px; right: 13px; min-height: 4px; background: var(--c); box-shadow: 0 0 0 1.5px var(--surface); z-index: 2; }
.pb:hover, .pd:hover { filter: brightness(1.08) saturate(1.1); }
/* Pastel shapes without outlines keep the week calm; sleep, the large shape, is lightest. */
.pb-sleep { --c: color-mix(in srgb, var(--sleep-strong) var(--pastel-sleep), var(--surface)); border-radius: 8px; box-shadow: none; z-index: 1; }
.pb-breast { --c: color-mix(in srgb, var(--breast-strong) var(--pastel-mark), var(--surface)); }
.pb-pump { --c: color-mix(in srgb, var(--pump-strong) var(--pastel-pump), var(--surface)); }
.pb-bottle { --c: color-mix(in srgb, var(--bottle-strong) var(--pastel-mark), var(--surface)); }
.pb-solids { --c: color-mix(in srgb, var(--solids-strong) var(--pastel-mark), var(--surface)); }
.pb-mark { height: 6px; min-height: 6px; transform: translateY(-50%); border-radius: 3px; z-index: 3; }
.pb-mark:active:not(:disabled) { transform: translateY(-50%); }
.pb-split { background: transparent; border: 0; box-shadow: none; }
.pb-split i { position: absolute; left: 0; right: 0; min-height: 3px; background: var(--c); border-radius: 6px; box-shadow: 0 0 0 1.5px var(--surface); }
.pb-split.pb-sleep i { box-shadow: none; }
/* A session that is still running ends in a dashed edge instead of a closed shape. */
.pb-live { border-bottom: 1.5px dashed color-mix(in srgb, var(--sleep-strong) var(--pastel-edge), var(--surface)); border-bottom-left-radius: 2px; border-bottom-right-radius: 2px; }
.pb::after, .pd::after { content: ""; position: absolute; inset: -4px; }
.pd { right: 2px; width: 9px; height: 9px; border-radius: 50%; transform: translateY(-50%); background: var(--c); z-index: 3; }
.pd:active:not(:disabled) { transform: translateY(-50%); }
.pd-wet { --c: color-mix(in srgb, var(--diaper-strong) var(--pastel-dot), var(--surface)); }
.pd-dirty { --c: color-mix(in srgb, var(--dirty) var(--pastel-dot), var(--surface)); }
.pd-both { background: color-mix(in srgb, var(--diaper-strong) var(--pastel-dot), var(--surface)); border: 2px solid color-mix(in srgb, var(--dirty) var(--pastel-dot), var(--surface)); }
.pd-dry { background: transparent; border: 2px solid var(--p-dry); }
.pattern-now { position: absolute; left: 0; right: 0; height: 0; border-top: 2px solid var(--p-now); z-index: 4; pointer-events: none; }
.pattern-now i { position: absolute; left: -5px; top: -6px; width: 10px; height: 10px; border-radius: 50%; background: var(--p-now); }
.pattern-empty { position: absolute; top: 45%; left: var(--axis); right: 0; text-align: center; font-size: 14px; color: var(--text-2); background: var(--surface); width: max-content; max-width: 80%; margin: 0 auto; padding: 8px 14px; border-radius: 10px; }
.pattern-totals { font-size: 12px; color: var(--text-2); text-align: center; font-variant-numeric: tabular-nums; align-items: center; }
.pattern-totals > span:first-child { display: inline-flex; justify-content: flex-end; padding-right: 8px; color: var(--muted); }
.pattern-totals .icon { width: 15px; height: 15px; }
.week-summary { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.week-stat { display: flex; flex-direction: column; gap: 8px; padding: 16px; border-radius: 16px; border: 1px solid transparent; min-width: 0; }
.week-stat.plain { background: var(--surface); border-color: var(--border); }
.week-stat-label { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--text-2); }
.week-stat-label .icon { width: 16px; height: 16px; color: var(--strong, var(--tint-icon)); }
.week-stat strong { font-size: 25px; font-weight: 500; letter-spacing: -.6px; line-height: 1.15; }
.week-stat small { font-size: 12px; color: var(--text-2); line-height: 1.45; }
.week-summary .empty-small { grid-column: 1 / -1; }
.week-summary + .footnote { margin-bottom: 26px; }
/* Dagtotalen in Overzicht: one day of the shown week, picked with the chips. */
.day-totals { margin-bottom: 26px; }
.day-totals h2 { margin-bottom: 12px; }
.day-totals .stats { margin-bottom: 0; }

/* Dialogs */
dialog { border: 1px solid var(--border); border-radius: 24px; background: var(--surface-raised); padding: 29px; width: min(480px, calc(100% - 30px)); max-height: 90dvh; color: var(--text); box-shadow: 0 25px 100px var(--shadow); }
dialog:modal { overscroll-behavior: contain; }
dialog::backdrop { background: var(--backdrop); backdrop-filter: blur(4px); overflow: hidden; overscroll-behavior: contain; }
.modal-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 18px; gap: 15px; }
.modal-header h2 { font-family: var(--serif); font-weight: 400; font-size: 29px; line-height: 1.2; }
.modal-header .eyebrow { font-size: 10px; margin-bottom: 8px; }
.start-panel { border-radius: 16px; padding: 22px; text-align: center; margin-bottom: 18px; }
.start-panel > span > .icon { width: 32px; height: 32px; color: var(--strong, var(--tint-icon)); }
.start-panel p { font-size: 14px; color: var(--text-2); margin: 12px 0 14px; }
summary { display: flex; align-items: center; min-height: 44px; font-size: 14px; font-weight: 600; color: var(--accent-text); cursor: pointer; }
.baby-choices { display: grid; gap: 10px; }
.choice-button { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 60px; padding: 10px 14px 10px 10px; border-radius: 14px; border: 1px solid var(--border-strong); text-align: left; font-size: 15px; font-weight: 600; background: var(--surface); }
.choice-button > span:nth-child(2) { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.choice-button small { font-size: 13px; font-weight: 400; color: var(--muted); }
.choice-button > .icon { margin-left: auto; width: 18px; height: 18px; color: var(--accent-text); }
.choice-button.selected { background: var(--accent-soft); }
.choice-button:hover { background: var(--surface-sunken); }
#toast { position: fixed; bottom: 30px; left: calc(50% + 118px); transform: translate(-50%, 20px); padding: 14px 22px; background: var(--accent); color: var(--on-accent); border-radius: 13px; z-index: 100; box-shadow: 0 8px 30px var(--shadow); font-size: 14px; line-height: 1.45; max-width: calc(100% - 30px); width: max-content; opacity: 0; pointer-events: none; transition: .2s; }
#toast.visible { opacity: 1; transform: translate(-50%, 0); }

@media (min-width: 1500px) {
  main { padding-top: 53px; }
  .dashboard-columns { grid-template-columns: minmax(0, 1fr) 290px; gap: 35px; }
  .timer-card { padding: 28px 30px 23px; }
  .timer-value { font-size: 58px; }
  .timer-middle { margin: 22px 0 28px; }
  .quick-card { min-height: 90px; }
  .stat { padding: 22px; }
  .baby-note { min-height: 300px; }
  .topbar { padding-left: 55px; padding-right: 55px; }
  .page-heading { margin-bottom: 40px; }
  .quick-copy { font-size: 15px; }
}

@media (max-width: 1200px) {
  .sidebar { width: 200px; padding-left: 18px; padding-right: 18px; }
  .shell { margin-left: 200px; }
  .topbar { padding: 12px 30px; }
  main { padding: 32px 30px 20px; }
  .topbar-right { width: 100%; justify-content: space-between; }
  .dashboard-columns { grid-template-columns: minmax(0, 1fr) 230px; gap: 20px; }
  h1 { font-size: 39px; }
  .stats { gap: 9px; }
  .stat { padding: 16px 13px; }
  .quick-card { padding: 14px 13px; gap: 10px; }
  .page-footer { padding-left: 30px; padding-right: 30px; }
  .timer-footer > span { display: none; }
  .timer-value { font-size: 46px; }
  .sidebar-bottom p { font-size: 16px; }
  .week-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  #toast { left: calc(50% + 100px); }
}

@media (max-width: 1000px) {
  .sidebar { width: 180px; padding: 30px 14px; }
  .brand { gap: 8px; }
  .brand > span { font-size: 26px; }
  .brand img { width: 30px; height: 30px; }
  .nav-item { font-size: 13px; padding: 0 12px; gap: 12px; }
  .shell { margin-left: 180px; }
  .dashboard-columns { grid-template-columns: 1fr; }
  .day-aside { display: grid; grid-template-columns: 1fr 1fr; }
  .baby-note { min-height: unset; }
  .together-note { display: none; }
  .trends-grid, .settings-grid { grid-template-columns: 1fr; }
  .page-heading h1 { font-size: 40px; }
  #toast { left: calc(50% + 90px); }
}

@media (max-width: 640px) {
  body { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
  .sidebar { display: none; }
  .shell { margin-left: 0; }
  .topbar { min-height: 68px; padding: 10px 16px; background: var(--bg); }
  .topbar-right { gap: 8px; }
  .save-status { font-size: 12px; min-width: 0; }
  .profile-button { font-size: 13px; gap: 8px; padding-right: 8px; flex: none; }
  .profile-name { max-width: 110px; }
  .avatar { width: 34px; height: 34px; }
  .demo-tag { font-size: 12px; max-width: 220px; min-height: 44px; }
  main { padding: 26px 16px 15px; }
  .page-heading { margin-bottom: 24px; gap: 10px; }
  .page-heading h1 { font-size: 36px; letter-spacing: -1.4px; }
  .page-heading p { font-size: 13px; margin-top: 10px; line-height: 1.6; }
  .eyebrow { font-size: 10px; letter-spacing: 1.7px; margin-bottom: 10px; }
  .date-badge { display: none; }
  .timer-card { padding: 20px 18px 16px; border-radius: 21px; margin-bottom: 18px; }
  .timer-top > span:first-child { font-size: 13px; }
  .live-tag { font-size: 9px; padding: 5px 8px; letter-spacing: 1px; }
  .timer-middle { margin: 16px 0 18px; }
  .timer-value { font-size: 46px; }
  .timer-edit { min-height: 44px; }
  .timer-art { padding-right: 10px; }
  .timer-art .icon { height: 52px; width: 52px; }
  .timer-footer { padding-top: 14px; }
  .timer-actions { width: 100%; }
  .timer-pause, .timer-stop { flex: 1; min-height: 46px; padding: 8px 10px; }
  .side-controls button { flex: 1; justify-content: center; }
  .stats { gap: 8px; margin-bottom: 18px; }
  .stat { border-radius: 13px; padding: 13px 11px; }
  .stat-label { font-size: 12px; gap: 5px; }
  .stat-label > .icon { width: 14px; height: 14px; }
  .stat strong { font-size: 23px; letter-spacing: -.7px; }
  .stat small { font-size: 11px; line-height: 1.4; }
  .stat > div > span { font-size: 11px; }
  .stat > div { gap: 4px; margin-top: 10px; }
  .mobile-moments { display: block; margin-bottom: 26px; padding: 14px 16px; }
  .forecast-card { margin: -8px 0 18px; padding: 16px 16px 14px; }
  .forecast-row { padding: 9px 0; }
  .mobile-moments .last-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 14px; }
  .mobile-moments .last-moment { padding: 10px 0; border: 0; align-items: flex-start; }
  .mobile-moments .last-moment:last-child { padding-bottom: 10px; }
  .mobile-moments .last-icon { width: 30px; height: 30px; }
  .section-heading { margin-bottom: 13px; }
  h2 { font-size: 18px; }
  .quick-grid { gap: 9px; }
  .quick-card { padding: 14px 12px; min-height: 78px; border-radius: 13px; gap: 9px; }
  .quick-copy { font-size: 14px; }
  .quick-card small { font-size: 12px; }
  .quick-icon .icon { width: 24px; height: 24px; }
  .quick-plus { display: none; }
  .text-button { min-height: 44px; }
  .quick-section { margin-bottom: 26px; }
  .timeline-section { padding: 18px 14px 6px; border-radius: 19px; }
  .timeline-heading { gap: 10px; }
  .timeline-heading h2 { font-size: 18px; }
  .day-nav { width: 100%; }
  .date-pill { flex: 1; justify-content: center; height: 44px; }
  .round-button { width: 44px; height: 44px; }
  .chip { min-height: 44px; padding: 6px 14px; }
  .filter-row { gap: 6px; }
  .today-link { margin-left: 0; }
  .timeline-row { gap: 10px; padding: 14px 0; }
  .timeline-row time { font-size: 12px; min-width: 38px; }
  .timeline-icon { width: 34px; height: 34px; border-radius: 11px; }
  .timeline-copy strong { font-size: 14px; }
  .timeline-copy > span { font-size: 12px; }
  .timeline-copy small { max-width: 100%; font-size: 12px; }
  .author-pill { font-size: 11px; padding: 3px 7px; max-width: 64px; }
  .row-chevron { display: none; }
  .day-aside { display: none; }
  .page-footer { padding: 17px 16px 15px; margin-top: 5px; font-size: 12px; }
  .page-footer > span:nth-child(2) { text-align: right; }
  .page-footer > span:first-child { font-size: 16px; }
  .mobile-nav { display: flex; position: fixed; bottom: 0; left: 0; right: 0; padding: 8px 16px calc(8px + env(safe-area-inset-bottom)); background: var(--mobile-nav); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--border); z-index: 20; justify-content: space-around; gap: 8px; }
  .mobile-nav button { display: flex; flex: 1; max-width: 120px; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 56px; color: var(--muted); font-size: 12px; font-weight: 500; border-radius: 14px; }
  .mobile-nav button.selected { color: var(--accent-text); background: var(--accent-soft); font-weight: 600; }
  .mobile-nav .icon { width: 22px; height: 22px; }
  #toast { left: 50%; bottom: calc(86px + env(safe-area-inset-bottom)); font-size: 14px; text-align: center; }
  .welcome { padding: 10px 0 20px; }
  .welcome h1 { font-size: 44px; }
  .welcome-art { height: 180px; width: 240px; margin: 0 auto 10px; }
  .welcome-art .fox-art { width: 145px; height: 145px; }
  .orbit { width: 170px; height: 150px; }
  .orbit-two { width: 215px; height: 177px; }
  .welcome > p { font-size: 15px; }
  .welcome-note { font-size: 12px; }
  .settings-card, .trend-card { padding: 22px 18px; border-radius: 18px; }
  .settings-grid, .trends-grid { gap: 16px; }
  .settings-card h2 { font-size: 18px; }
  dialog { padding: 22px 18px; border-radius: 21px; width: calc(100% - 20px); }
  .modal-header h2 { font-size: 26px; }
  .icon-button, .notice-close { width: 44px; height: 44px; }
  .field-row { gap: 10px; }
  .pills { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form-actions .primary, .form-actions .secondary { flex: 1 1 auto; }
  .count { margin-left: 3px; }
  .settings-card > p, .trend-card > p { font-size: 14px; }
  .legend-toggle { min-height: 44px; }
  .pattern-card { padding: 18px 12px 14px; border-radius: 18px; }
  .pattern-top { padding: 0 4px; }
  .legend { gap: 6px; padding: 0 4px; }
  .pattern { --axis: 26px; --h: 560px; }
  .pattern-day { margin: 0; min-height: 48px; font-size: 11px; border-radius: 10px; }
  .pattern-day strong { font-size: 15px; }
  .pattern-axis span { font-size: 10px; width: calc(var(--axis) - 5px); }
  .pb { left: 2px; right: 9px; }
  .pd { right: 1px; width: 7px; height: 7px; }
  .pattern-totals { font-size: 11px; }
  .pattern-totals > span:first-child { padding-right: 4px; }
  .week-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .week-stat { padding: 13px 12px; }
  .week-stat strong { font-size: 21px; }
  .week-stat:last-child:nth-child(odd) { grid-column: 1 / -1; }
}

/* Motion: short fades with a small slide or scale. Nothing appears or disappears abruptly. */
@keyframes enter { from { opacity: 0; transform: translateY(8px) scale(.985); } }
@keyframes leave { to { opacity: 0; transform: translateY(-6px) scale(.97); } }
@keyframes page-enter { from { opacity: 0; transform: translateY(6px); } }
@keyframes from-left { from { opacity: 0; transform: translateX(-16px); } }
@keyframes from-right { from { opacity: 0; transform: translateX(16px); } }
@keyframes dialog-in { from { opacity: 0; transform: translateY(14px) scale(.97); } }
@keyframes dialog-out { to { opacity: 0; transform: translateY(10px) scale(.97); } }
@keyframes fade-in { from { opacity: 0; } }
@keyframes fade-out { to { opacity: 0; } }
.enter { animation: enter .26s cubic-bezier(.2, .7, .3, 1) both; }
.leaving { animation: leave .2s ease-in forwards; pointer-events: none; }
.page-enter { animation: page-enter .24s cubic-bezier(.2, .7, .3, 1) both; }
.pattern-columns.from-left { animation: from-left .28s cubic-bezier(.2, .7, .3, 1) both; }
.pattern-columns.from-right { animation: from-right .28s cubic-bezier(.2, .7, .3, 1) both; }
dialog[open] { animation: dialog-in .24s cubic-bezier(.2, .7, .3, 1); }
dialog[open]::backdrop { animation: fade-in .24s ease; }
dialog.closing { animation: dialog-out .18s ease-in forwards; }
dialog.closing::backdrop { animation: fade-out .18s ease-in forwards; }
.legend-toggle, .chip, .pill span, .segmented [role="tab"] { transition: background .2s, color .2s, border-color .2s, box-shadow .2s; }

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
  .enter, .leaving, .page-enter, .pattern-columns.from-left, .pattern-columns.from-right, dialog[open], dialog[open]::backdrop, dialog.closing, dialog.closing::backdrop { animation: none !important; }
  .is-busy::before { animation-duration: 2s; }
}

/* Import review stays inside the family's existing account area. */
.import-intro { text-align: center; padding: 10px 0 18px; }
.import-intro h3 { margin: 10px 0; font-size: 21px; }
.import-intro p { color: var(--text-2); font-size: 14px; }
.import-file-symbol { display: inline-grid; place-items: center; width: 58px; height: 58px; border-radius: 20px; background: var(--sage); font-size: 30px; }
.import-dropzone { display: grid; justify-items: center; gap: 12px; padding: 24px 16px; background: var(--surface-sunken); border: 1px dashed var(--border-strong); border-radius: 16px; text-align: center; }
.import-dropzone.is-dragging { background: var(--sage); border-color: var(--accent); outline: 2px solid var(--border-strong); }
.import-dropzone p, .import-dropzone small { font-size: 13px; color: var(--text-2); }
.import-reading:empty { display: none; }
.import-reading { font-size: 13px; color: var(--accent-text); }
.import-filename { overflow-wrap: anywhere; color: var(--text-2); font-size: 13px; }
.import-profile { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: center; padding: 14px 0; margin: 0; border-bottom: 1px solid var(--border); color: var(--text); }
.import-profile small, .import-samples small { display: block; color: var(--muted); font-size: 12px; font-weight: 400; margin-top: 4px; }
.import-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 20px 0; }
.import-stats > div { padding: 17px 6px; background: var(--sage); border-radius: 16px; text-align: center; }
.import-stats strong { display: block; font-size: 28px; font-weight: 600; color: var(--text); }
.import-stats span { font-size: 12px; color: var(--text-2); }
.import-categories { display: flex; flex-wrap: wrap; gap: 7px; margin: 16px 0; }
.import-categories > span { padding: 6px 10px; border-radius: 20px; background: var(--surface-sunken); font-size: 12px; }
.import-samples { margin: 20px 0; }
.import-samples h3 { font-size: 14px; }
.import-samples > div { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.import-samples > div > span:last-child { white-space: nowrap; color: var(--text-2); }
.import-warnings { background: var(--warm-bg); padding: 14px; border-radius: 14px; font-size: 13px; }
.import-warnings summary { min-height: 0; color: var(--warm-text); }
.import-warnings ul { padding-left: 18px; max-height: 150px; overflow: auto; }

/* Shared language/help controls and a quiet, readable support centre. */
.locale-control select, .language-select { min-height: 44px; border: 1px solid var(--border-strong); border-radius: 12px; padding: 8px 28px 8px 12px; background: var(--surface); font-size: 13px; max-width: 150px; }
.help-link { min-height: 44px; display: inline-flex; align-items: center; font-size: 13px; text-underline-offset: 4px; }
.page-footer { flex-wrap: wrap; }
.page-footer nav { display: flex; flex-wrap: wrap; gap: 12px; }
.page-footer a, .legal-links a { text-underline-offset: 3px; }
.legal-links { margin-top: 16px; font-size: 12px; line-height: 1.7; color: var(--muted); }
.skip-link { position: fixed; left: 16px; top: -100px; z-index: 100; background: var(--accent); color: var(--on-accent); padding: 14px 20px; border-radius: 12px; }
.skip-link:focus { top: 12px; }
.help-header { max-width: 1200px; margin: auto; padding: 25px 40px; display: flex; align-items: center; justify-content: space-between; gap: 24px; border-bottom: 1px solid var(--border); }
.help-header .brand { padding: 0; margin: 0; }
.help-header-actions { display: flex; align-items: center; gap: 24px; }
.help-back { min-height: 44px; display: inline-flex; align-items: center; gap: 12px; font-size: 14px; text-decoration: none; font-weight: 600; }
.help-back span { font-size: 20px; }
.help-body main { max-width: 1120px; padding: 58px 40px 32px; }
.help-hero { display: flex; justify-content: space-between; align-items: center; gap: 36px; margin-bottom: 36px; }
.help-hero h1 { max-width: 740px; font-size: clamp(36px,5vw,56px); line-height: 1.12; }
.help-hero > div > p:last-child { max-width: 690px; margin-top: 18px; color: var(--muted); }
.help-hero-icon { width: 110px; height: 110px; border-radius: 30px; transform: rotate(7deg); }
.help-tabs { display: flex; flex-wrap: wrap; gap: 6px; padding: 6px; border: 1px solid var(--border); background: var(--surface-soft); border-radius: 16px; margin-bottom: 42px; }
.help-tabs a { text-decoration: none; padding: 13px 20px; border-radius: 11px; color: var(--text-2); font-size: 14px; }
.help-tabs a[aria-current] { background: var(--accent); color: var(--on-accent); }
.help-tabs a:hover:not([aria-current]) { background: var(--accent-soft); }
.help-steps > h2 { margin-bottom: 18px; }
.help-steps ol { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); list-style: none; gap: 14px; margin: 0; padding: 0; }
.help-steps li { border: 1px solid var(--border); border-radius: 20px; padding: 24px; background: var(--surface); }
.help-steps li:nth-child(2) { background: var(--breast-tint); }
.help-steps li:nth-child(3) { background: var(--diaper-tint); }
.step-number { font-family: var(--serif); font-size: 28px; color: var(--accent); display: inline-block; margin-bottom: 26px; }
.help-steps h3 { margin-bottom: 12px; line-height: 1.4; }
.help-steps p { color: var(--text-2); font-size: 14px; }
.help-questions { max-width: 820px; margin: 46px auto 0; }
.help-search-label { display: block; margin-bottom: 10px; font-weight: 600; }
#help-search { width: 100%; min-height: 54px; background: var(--surface); border: 1px solid var(--border-strong); border-radius: 14px; padding: 14px 18px; font-size: 16px; }
.help-result-count { font-size: 12px; margin: 12px 0 28px; color: var(--muted); }
.help-category { margin: 30px 0; }
.help-category h2 { margin-bottom: 12px; }
.faq-item { border-bottom: 1px solid var(--border); margin: 0; }
.faq-item summary { padding: 19px 30px 19px 0; cursor: pointer; font-weight: 500; line-height: 1.5; list-style: none; position: relative; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '+'; position: absolute; right: 4px; top: 16px; font-size: 23px; font-weight: 400; color: var(--accent); }
.faq-item[open] summary::after { content: '−'; }
.faq-answer { padding: 0 28px 22px 0; font-size: 15px; color: var(--text-2); }
.faq-answer p + p { margin-top: 12px; }
.help-empty { padding: 28px; background: var(--surface-soft); border-radius: 16px; }
.help-policy { max-width: 740px; margin: auto; }
.policy-intro { font-size: 18px; color: var(--text-2); }
.policy-index { padding: 22px 26px; background: var(--surface-soft); border-radius: 18px; margin: 28px 0 38px; display: grid; grid-template-columns: 1fr 1fr; gap: 15px 28px; }
.policy-index a { font-size: 14px; text-underline-offset: 4px; line-height: 1.5; }
.help-policy section { margin: 36px 0; scroll-margin-top: 24px; }
.help-policy section h2 { margin-bottom: 15px; line-height: 1.4; }
.help-policy section p { color: var(--text-2); font-size: 16px; }
.help-policy section p + p { margin-top: 14px; }
.help-contact { display: flex; align-items: center; gap: 22px; border-top: 1px solid var(--border); padding: 32px 0 0; margin-top: 50px; }
.help-contact img { width: 55px; height: 55px; border-radius: 15px; }
.help-contact h2 { font-size: 17px; margin-bottom: 8px; }
.help-contact a { text-underline-offset: 4px; }
.help-contact p { font-size: 12px; color: var(--muted); margin-top: 10px; }
.help-footer { max-width: 1120px; padding: 16px 40px 36px; margin: auto; display: flex; flex-wrap: wrap; align-items: center; gap: 20px; color: var(--muted); font-size: 13px; }
.help-footer > span { font: 24px var(--serif); margin-right: auto; color: var(--accent); }
.help-footer a { text-underline-offset: 4px; }
@media (max-width: 640px) {
  .help-header { padding: 16px 20px; align-items: flex-start; }
  .help-header .brand > span { font-size: 25px; }
  .help-header .brand img { width: 30px; height: 30px; }
  .help-header-actions { flex-direction: column; gap: 4px; align-items: flex-end; }
  .help-back { font-size: 12px; }
  .help-body main { padding: 28px 20px; }
  .help-hero { align-items: flex-start; gap: 14px; margin-bottom: 25px; }
  .help-hero-icon { display: none; }
  .help-hero h1 { letter-spacing: -1px; }
  .help-hero > div > p:last-child { font-size: 15px; }
  .help-tabs { margin-bottom: 30px; }
  .help-tabs a { flex: 1 1 40%; text-align: center; padding: 12px 8px; }
  .help-steps ol { grid-template-columns: 1fr; }
  .help-steps li { display: grid; grid-template-columns: 36px 1fr; column-gap: 14px; padding: 20px; }
  .step-number { grid-row: span 2; margin: 0; font-size: 24px; }
  .help-steps h3 { margin-bottom: 6px; }
  .help-steps p { grid-column: 2; }
  .help-questions { margin-top: 34px; }
  .policy-index { grid-template-columns: 1fr; padding: 20px; }
  .help-contact { gap: 15px; }
  .help-footer { padding: 8px 20px 30px; gap: 18px; }
  .help-footer > span { flex-basis: 100%; }
}

/* Measurements share the native app's units and activity colour. */
.growth-controls { display:flex; gap:8px; flex-wrap:wrap; margin:20px 0; }
.growth-controls .chip { min-height:44px; }
.growth-latest { display:flex; gap:12px; flex-wrap:wrap; justify-content:space-between; align-items:baseline; }
.growth-latest>span { color:var(--muted); font-size:13px; }
.growth-latest>strong { font-size:30px; font-weight:500; color:var(--growth-strong); }
.growth-latest small { font-size:16px; }
.growth-chart svg { display:block; width:100%; max-width:720px; height:auto; margin:12px 0; overflow:visible; }
.growth-chart svg text { fill:var(--muted); font-size:13px; }
.growth-grid { stroke:var(--border); stroke-width:1; }
.growth-line { fill:none; stroke:var(--growth-strong); stroke-width:2; vector-effect:non-scaling-stroke; }
.growth-point { fill:var(--surface); stroke:var(--growth-strong); stroke-width:2; }
.growth-table summary { cursor:pointer; min-height:44px; align-content:center; font-size:14px; }
.growth-table table { border-collapse:collapse; width:100%; max-width:720px; font-size:14px; }
.growth-table th,.growth-table td { text-align:left; padding:10px 4px; border-bottom:1px solid var(--border); }
.growth-table th:last-child,.growth-table td:last-child { text-align:right; }
.growth-chart .footnote { margin:14px 0 20px; }

.language-picker { display:flex; align-items:center; flex-shrink:0; }
.language-picker select { min-height:44px; max-width:132px; padding:8px 24px 8px 10px; border:1px solid var(--border-strong); border-radius:12px; background:var(--surface); color:var(--text); font:inherit; font-size:12px; }
.sidebar-help { display:block; margin-bottom:24px; color:var(--accent); font-size:12px; line-height:1.6; text-decoration:underline; text-underline-offset:3px; }
.topbar .help-link { display:grid; place-items:center; flex:0 0 44px; width:44px; height:44px; border:1px solid var(--border); border-radius:50%; text-decoration:none; font-weight:600; }
.page-footer .legal-links { width:100%; justify-content:flex-start; }
@media (max-width:700px) {
  .topbar { height:auto; min-height:76px; padding-top:10px; padding-bottom:10px; }
  .topbar-right { flex:1; min-width:0; gap:8px; flex-wrap:wrap; }
  .topbar .profile-button { margin-left:auto; }
  .topbar .demo-tag { order:5; flex-basis:100%; text-align:center; white-space:normal; }
  .topbar .save-status { order:5; flex-basis:100%; font-size:11px; }
  .page-footer .legal-links { gap:14px; }
}
.legal-links { display:flex; flex-wrap:wrap; column-gap:16px; row-gap:8px; }
@media (max-width:700px) {
  .growth-chart svg text { font-size:22px; }
}

/* Timeline rows: time range, duration bar per session and breastfeeding sides in the order fed. */
.timeline-copy .row-time { font-size: 13px; color: var(--text-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.row-bar { display: flex; align-items: center; gap: 8px; background: none; }
.row-bar b { font-size: 13px; font-weight: 650; color: var(--text); font-variant-numeric: tabular-nums; white-space: nowrap; }
.dur-bar { display: flex; gap: 2px; width: calc(140px * var(--f, 0)); min-width: 8px; height: 7px; transform-origin: left center; animation: bar-grow .6s cubic-bezier(.2,.8,.2,1) both; }
.dur-bar i { flex: 1; min-width: 3px; border-radius: 99px; background: var(--strong); }
.dur-bar i.side-right { opacity: .45; }
.side-row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.side-chip { font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 99px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.side-chip.side-left { background: var(--breast-strong); color: var(--on-strong); }
.side-chip.side-right { background: var(--breast-tint); color: var(--text); box-shadow: inset 0 0 0 1.2px var(--breast-strong); }
.side-arrow { font-size: 12px; color: var(--muted); }
.side-next { margin-left: 4px; font-size: 12px; font-weight: 650; color: var(--breast-strong); }
@keyframes bar-grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@media (prefers-reduced-motion: reduce) { .dur-bar { animation: none; } }
.next-side { display: block; font-size: 11px; font-weight: 600; opacity: .85; }

/* A running timer takes the color of its kind; the stop action stays the primary green. */
.timer-card.kind-breast, .timer-card.kind-sleep, .timer-card.kind-pump {
  --timer-bg: var(--tint); --timer-text: var(--text); --timer-muted: var(--strong); --timer-focus: var(--text);
  --timer-line: color-mix(in srgb, var(--strong) 45%, transparent); --timer-stop: var(--accent); --on-timer-stop: var(--on-accent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--strong) 28%, transparent), 0 9px 20px var(--shadow);
}
.timer-card[class*="kind-"] .timer-value { color: var(--strong); font-weight: 500; }
.timer-card[class*="kind-"] .timer-footer { border-top-color: color-mix(in srgb, var(--strong) 22%, transparent); }
.timer-card[class*="kind-"] .live-tag { background: color-mix(in srgb, var(--strong) 14%, transparent); }
.timer-card[class*="kind-"] .side-controls button[aria-pressed="true"] { background: var(--strong); border-color: var(--strong); color: var(--on-strong); }

/* Account and family notices above every page, and the state shown when local storage cannot open. */
#main:focus { outline: none; }
.app-notice { align-items: center; margin: 0 0 22px; }
.app-notice p { flex: 1; }
.app-notice .text-button { display: inline-flex; margin-left: 4px; font-size: 14px; }
.storage-error { max-width: 560px; margin: 0 auto; padding: 72px 24px; text-align: center; display: grid; justify-items: center; gap: 14px; }
.storage-error img { width: 72px; height: 72px; }
.storage-error p { color: var(--text-2); line-height: 1.6; }

/* "Zo voelt Little One" on the welcome screen: phones drawn in HTML that loop through real moments of the app.
   Every base style is the most telling still frame; the animations only add motion on top of it. */
@property --v { syntax: '<integer>'; inherits: false; initial-value: 0; }
.showcase { max-width: 1120px; margin: 10px auto 30px; }
.showcase-head { text-align: center; max-width: 620px; margin: 0 auto; }
.showcase-head h2 { font-family: var(--serif); font-weight: 500; font-size: 40px; line-height: 1.1; margin-top: 10px; }
.showcase-head p { color: var(--text-2); font-size: 16px; margin-top: 12px; }
.showcase-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 40px 26px; margin-top: 36px; }
.sc-scene { display: flex; flex-direction: column; align-items: center; gap: 20px; text-align: center; }
.sc-caption h3 { font-size: 17px; font-weight: 650; }
.sc-caption p { color: var(--text-2); font-size: 14px; line-height: 1.55; margin-top: 8px; max-width: 290px; }
.showcase-cta { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 10px 18px; margin-top: 34px; }

.sc-phone { --cycle: 10s; position: relative; width: 236px; height: 480px; flex: none; border-radius: 40px; padding: 7px;
  background: #1c201c; box-shadow: 0 24px 50px var(--shadow), inset 0 0 0 1.5px #444a43; text-align: left; }
.sc-phone::before { content: ''; position: absolute; top: 15px; left: 50%; width: 70px; height: 20px; border-radius: 12px; background: #0b0d0b; transform: translateX(-50%); z-index: 3; }
.sc-screen { position: relative; height: 100%; overflow: hidden; border-radius: 33px; background: var(--bg); padding: 44px 11px 12px; display: flex; flex-direction: column; gap: 9px; font-size: 11px; color: var(--text); }
.sc-screen small { display: block; color: var(--text-2); font-size: 10px; line-height: 1.35; }
.sc-screen b { font-weight: 650; }
.sc-top { display: flex; align-items: center; gap: 7px; font-family: var(--serif); font-size: 17px; }
.sc-top b { font-weight: 500; }
.sc-avatar { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--accent); color: var(--on-accent); font: 600 12px var(--serif); flex: none; }
.sc-glyph { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 9px; background: var(--tint); color: var(--strong); flex: none; }
.sc-glyph .icon { width: 15px; height: 15px; }
.sc-card { background: var(--tint); border-radius: 18px; padding: 11px; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--strong) 25%, transparent); }
.sc-card .sc-glyph { background: var(--surface); }
.sc-card-head { display: flex; align-items: center; gap: 8px; }
.sc-big { font-size: 34px; font-weight: 600; color: var(--strong); margin: 6px 0 8px; font-variant-numeric: tabular-nums; letter-spacing: -.5px; }
.sc-clock { display: inline-flex; align-items: flex-start; line-height: 1; }
.sc-roll { display: inline-block; height: 1em; overflow: hidden; }
.sc-roll > span { display: flex; flex-direction: column; animation: sc-roll var(--d) steps(var(--n)) infinite; }
.sc-roll i { display: block; height: 1em; font-style: normal; }
@keyframes sc-roll { to { transform: translateY(-100%); } }

/* Breastfeeding: the sides take turns, the next side glows, the Watch mirrors the timer. */
.sc-breast .sc-phone { --cycle: 8s; }
.sc-sides { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.sc-side { text-align: center; padding: 8px 0; border-radius: 11px; font-weight: 650; background: var(--surface); }
.sc-sides .sc-left, .sc-watch-sides .sc-left { animation: sc-side-a var(--cycle) infinite; }
.sc-sides .sc-right, .sc-watch-sides .sc-right { animation: sc-side-b var(--cycle) infinite; }
.sc-sides .sc-left { background: var(--strong); color: var(--on-strong); }
@keyframes sc-side-a { 0%, 46% { background: var(--strong); color: var(--on-strong); } 50%, 96% { background: var(--surface); color: var(--text); } }
@keyframes sc-side-b { 0%, 46% { background: var(--surface); color: var(--text); } 50%, 96% { background: var(--strong); color: var(--on-strong); } }
.sc-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; }
.sc-tiles span { background: var(--surface); border-radius: 11px; padding: 7px; box-shadow: inset 0 0 0 1px var(--border); }
.sc-tiles b { display: block; font-size: 11px; color: var(--strong); margin-top: 2px; white-space: nowrap; }
.sc-quick { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: auto; }
.sc-quick > span { display: flex; align-items: center; gap: 6px; padding: 8px; border-radius: 13px; background: var(--tint); font-weight: 650; font-size: 10.5px; white-space: nowrap; overflow: hidden; }
.sc-quick .sc-glyph { width: 22px; height: 22px; background: var(--surface); }
.sc-next { display: flex; align-items: center; gap: 6px; padding: 8px 10px; border-radius: 12px; background: var(--breast-tint); color: var(--text); animation: sc-glow 2.6s ease-in-out infinite; }
.sc-next .icon { width: 14px; height: 14px; color: var(--breast-strong); }
.sc-next b { color: var(--breast-strong); }
@keyframes sc-glow { 50% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--breast-strong) 22%, transparent); } }
.sc-watch { position: absolute; right: -38px; top: 64px; width: 92px; height: 108px; border-radius: 28px; background: #050605; border: 5px solid #30352f;
  box-shadow: 0 14px 30px var(--shadow); color: #f2c14e; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 4px; z-index: 4; }
.sc-watch small { color: #f2c14e; opacity: .8; font-size: 9px; }
.sc-watch b { font-size: 19px; font-weight: 600; font-variant-numeric: tabular-nums; }
.sc-watch-sides { display: flex; gap: 6px; }
.sc-watch-sides i { width: 18px; height: 6px; border-radius: 3px; }
.sc-watch-sides .sc-left { --strong: #f2c14e; --on-strong: #050605; --surface: #2b2a22; background: #f2c14e; }
.sc-watch-sides .sc-right { --strong: #f2c14e; --on-strong: #050605; --surface: #2b2a22; background: #2b2a22; }

/* Pumping: stop, the yield sheet slides up, the sides count up to the total, the moment lands in the diary. */
.sc-pump .sc-phone { --cycle: 10s; }
.sc-stop { position: relative; display: block; text-align: center; padding: 8px 0; border-radius: 12px; background: var(--accent); color: var(--on-accent); font-weight: 650; }
.sc-tap { position: absolute; left: 50%; top: 50%; width: 34px; height: 34px; margin: -17px; border-radius: 50%; background: color-mix(in srgb, var(--on-accent) 55%, transparent); opacity: 0; animation: sc-tap-stop var(--cycle) infinite; }
.sc-save .sc-tap { animation-name: sc-tap-save; }
@keyframes sc-tap-stop { 0%, 24% { opacity: 0; transform: scale(.3); } 27% { opacity: .9; } 32%, 100% { opacity: 0; transform: scale(1.6); } }
@keyframes sc-tap-save { 0%, 64% { opacity: 0; transform: scale(.3); } 67% { opacity: .9; } 72%, 100% { opacity: 0; transform: scale(1.6); } }
.sc-sheet { position: absolute; left: 0; right: 0; bottom: 0; padding: 10px 14px 16px; background: var(--surface); border-radius: 24px 24px 0 0; box-shadow: 0 -10px 30px var(--shadow);
  display: flex; flex-direction: column; gap: 8px; animation: sc-sheet var(--cycle) cubic-bezier(.2,.8,.2,1) infinite; }
.sc-sheet > b { font-size: 13px; text-align: center; }
.sc-grabber { width: 34px; height: 4px; border-radius: 2px; background: var(--border-strong); opacity: .5; margin: 0 auto 2px; }
@keyframes sc-sheet { 0%, 31% { transform: translateY(105%); } 37%, 72% { transform: translateY(0); } 78%, 100% { transform: translateY(105%); } }
.sc-segment { display: grid; grid-template-columns: repeat(3, 1fr); padding: 3px; border-radius: 10px; background: var(--surface-sunken); text-align: center; }
.sc-segment span { padding: 5px 0; border-radius: 8px; }
.sc-segment .on { background: var(--surface); box-shadow: 0 1px 4px var(--shadow); font-weight: 650; }
.sc-line { display: flex; align-items: baseline; gap: 5px; padding: 6px 2px; border-bottom: 1px solid var(--border); }
.sc-line span { flex: 1; }
.sc-line small { display: inline; }
.sc-count { --v: var(--to); counter-reset: v var(--v); font-size: 17px; color: var(--pump-strong); font-variant-numeric: tabular-nums; animation: sc-count var(--cycle) infinite; }
.sc-count::after { content: counter(v); }
.sc-count-r { animation-delay: .15s; }
.sc-sum { border-bottom: 0; }
.sc-sum .sc-count { color: var(--text); }
@keyframes sc-count { 0%, 40% { --v: 0; } 54%, 100% { --v: var(--to); } }
.sc-save { position: relative; display: block; overflow: hidden; text-align: center; padding: 9px 0; border-radius: 12px; background: var(--accent); color: var(--on-accent); font-weight: 650; }
.sc-saved { animation: sc-saved var(--cycle) infinite; }
@keyframes sc-saved { 0%, 74% { opacity: 0; transform: translateY(12px); } 80%, 96% { opacity: 1; transform: none; } 100% { opacity: 0; } }
/* After Stop the running card folds away, as in the app; it comes back when the loop starts over. */
.sc-collapse { display: grid; grid-template-rows: 1fr; animation: sc-collapse var(--cycle) cubic-bezier(.2,.8,.2,1) infinite; }
.sc-collapse > .sc-card { min-height: 0; overflow: hidden; }
@keyframes sc-collapse { 0%, 29% { grid-template-rows: 1fr; opacity: 1; } 35%, 95% { grid-template-rows: 0fr; opacity: 0; } 100% { grid-template-rows: 1fr; opacity: 1; } }
.sc-total { display: flex; align-items: baseline; justify-content: space-between; padding: 9px 11px; border-radius: 13px; background: var(--tint); }
.sc-total b { font-size: 15px; color: var(--strong); }
.sc-total .sc-count { font-size: inherit; color: inherit; }
.sc-count-day { animation-name: sc-count-day; }
@keyframes sc-count-day { 0%, 77% { --v: var(--from); } 86%, 100% { --v: var(--to); } }

/* Diary: moments slide in, the duration bars grow in the color of their kind. */
.sc-diary .sc-phone, .sc-rhythm .sc-phone { --cycle: 12s; }
.sc-day { display: flex; flex-direction: column; gap: 2px; }
.sc-day b { font-family: var(--serif); font-weight: 500; font-size: 18px; }
.sc-row { display: flex; gap: 8px; align-items: flex-start; padding: 8px; border-radius: 13px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--border); }
.sc-row > div { flex: 1; min-width: 0; }
.sc-diary .sc-screen { gap: 6px; }
.sc-diary .sc-row { padding: 6px 8px; animation: sc-row var(--cycle) cubic-bezier(.2,.8,.2,1) infinite; animation-delay: calc(var(--i) * .35s); }
@keyframes sc-row { 0% { opacity: 0; transform: translateY(10px); } 7%, 86% { opacity: 1; transform: none; } 94%, 100% { opacity: 0; transform: translateY(-6px); } }
.sc-bar { display: flex; height: 6px; width: calc(var(--f) * 100%); margin: 5px 0 3px; border-radius: 3px; background: var(--strong); transform-origin: left; animation: sc-bar var(--cycle) cubic-bezier(.2,.8,.2,1) infinite; animation-delay: calc(var(--i) * .35s); }
.sc-bar:has(i) { background: none; gap: 2px; }
.sc-bar i { flex: .48; border-radius: 3px; background: var(--strong); }
.sc-bar i + i { flex: .52; background: color-mix(in srgb, var(--strong) 45%, var(--tint)); }
@keyframes sc-bar { 0%, 5% { transform: scaleX(0); } 18%, 86% { transform: scaleX(1); } 94%, 100% { transform: scaleX(0); } }
.sc-chip { display: inline-block; padding: 1px 5px; border-radius: 6px; background: var(--strong); color: var(--on-strong); font-weight: 650; font-size: 9px; }
.sc-row em { font-style: normal; font-weight: 650; color: var(--breast-strong); }

/* Week rhythm: sleep blocks and feeds appear day by day, gaps visible; the next nap breathes. */
.sc-week { display: grid; grid-template-columns: 16px repeat(7, 1fr); gap: 4px; height: 250px; }
.sc-hours { position: relative; color: var(--muted); font-size: 8px; }
.sc-hours i { position: absolute; font-style: normal; transform: translateY(-50%); }
.sc-hours i:nth-child(1) { top: 2%; } .sc-hours i:nth-child(2) { top: 25%; } .sc-hours i:nth-child(3) { top: 50%; } .sc-hours i:nth-child(4) { top: 75%; }
.sc-col { position: relative; overflow: hidden; border-radius: 7px; background: var(--surface-soft); }
.sc-block { position: absolute; left: 14%; right: 14%; top: var(--top); height: var(--h); border-radius: 4px; background: var(--sleep-fill); box-shadow: inset 0 0 0 1px var(--sleep-strong);
  transform-origin: top; animation: sc-grow var(--cycle) cubic-bezier(.2,.8,.2,1) infinite; animation-delay: calc(var(--d) * .3s); }
.sc-dot { position: absolute; left: 50%; top: var(--top); width: 6px; height: 6px; margin-left: -3px; border-radius: 50%; background: var(--bottle-strong);
  animation: sc-grow var(--cycle) infinite; animation-delay: calc(var(--d) * .3s + .4s); }
@keyframes sc-grow { 0%, 3% { opacity: 0; transform: scaleY(0); } 14%, 88% { opacity: 1; transform: none; } 96%, 100% { opacity: 0; } }
.sc-forecast { display: flex; gap: 9px; align-items: center; padding: 9px; border-radius: 14px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--border); }
.sc-forecast .sc-glyph { animation: sc-breathe 3s ease-in-out infinite; }
.sc-forecast em { display: block; font-style: normal; font-size: 10px; color: var(--accent-text); font-weight: 650; }
@keyframes sc-breathe { 50% { transform: scale(1.12); } }

/* Together: a bottle logged on one phone flies over and appears on the other. */
.sc-together { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); align-items: center; gap: 26px; margin-top: 46px; padding: 30px; border-radius: 28px; background: var(--sage); text-align: left; }
.sc-together .sc-caption { text-align: left; }
.sc-pair { --cycle: 8s; display: flex; align-items: center; justify-content: center; gap: 4px; }
.sc-mini { display: flex; flex-direction: column; gap: 9px; width: 170px; padding: 16px 10px 12px; border-radius: 26px; background: var(--bg); box-shadow: 0 14px 30px var(--shadow), inset 0 0 0 6px #1c201c; font-size: 11px; }
.sc-mini .sc-avatar { margin: 0 auto; }
.sc-mini small { display: block; color: var(--text-2); font-size: 10px; }
.sc-mini .sc-mini-day { font-family: var(--serif); font-size: 14px; color: var(--text); }
.sc-from .sc-new { animation: sc-from var(--cycle) infinite; }
.sc-to .sc-new { animation: sc-to var(--cycle) infinite; }
@keyframes sc-from { 0% { opacity: 0; transform: scale(.92); } 8%, 90% { opacity: 1; transform: none; } 97%, 100% { opacity: 0; } }
@keyframes sc-to { 0%, 56% { opacity: 0; transform: scale(.92); } 62% { opacity: 1; transform: scale(1.05); box-shadow: 0 0 0 3px color-mix(in srgb, var(--bottle-strong) 45%, transparent); } 70%, 90% { opacity: 1; transform: none; } 97%, 100% { opacity: 0; } }
.sc-flight { position: relative; width: 70px; height: 60px; flex: none; }
.sc-flight::before { content: ''; position: absolute; left: 4px; right: 4px; top: 50%; border-top: 2px dashed color-mix(in srgb, var(--accent) 45%, transparent); }
.sc-flight i { position: absolute; left: 50%; top: 50%; width: 26px; height: 26px; margin: -13px; display: grid; place-items: center; border-radius: 50%; background: var(--bottle-tint); color: var(--bottle-strong); animation: sc-flight var(--cycle) ease-in-out infinite; }
.sc-flight .icon { width: 15px; height: 15px; }
@keyframes sc-flight { 0%, 22% { opacity: 0; transform: translate(-36px, 0); } 28% { opacity: 1; } 42% { transform: translate(0, -20px); } 56% { opacity: 1; transform: translate(36px, 0); } 62%, 100% { opacity: 0; transform: translate(36px, 0); } }

@media (max-width: 640px) {
  .showcase-head h2 { font-size: 30px; }
  .showcase-grid { gap: 44px; }
  .sc-together { grid-template-columns: 1fr; padding: 22px 16px; }
  .sc-together .sc-caption { text-align: center; }
  .sc-mini { width: 130px; }
  .sc-flight { width: 44px; }
}
@media (prefers-reduced-motion: reduce) {
  .showcase *, .showcase *::before, .showcase *::after { animation: none !important; }
}

/* Distinct category cards keep each moment, expectation and day total visibly connected. */
/* Jullie ritme: tiles two per row, so they never look like the full-width timer cards; an odd last tile spans the row
   with the fox beside the copy. The estimate leads in large type next to a "+" in the category color, and feeding turns
   over in 3D to choose a breastfeed or a bottle. The latest moments wait behind the history toggle. Mirrors ForecastCard.swift. */
.rhythm-card { margin-bottom: 30px; }
.rhythm-heading { display: flex; justify-content: space-between; gap: 16px; align-items: center; margin-bottom: 14px; }
.rhythm-tools { display: flex; align-items: center; gap: 4px; }
.rhythm-history { display: grid; place-items: center; width: 40px; height: 40px; margin: -6px 0; padding: 0; border-radius: 50%; color: var(--muted); background: none; }
.rhythm-history .icon { width: 20px; height: 20px; }
.rhythm-history[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); }
.rhythm-history:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.rhythm-items { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.rhythm-item { --line: color-mix(in srgb,var(--strong) 18%,transparent); display: flex; min-width: 0; perspective: 1000px; background: none; }
.rhythm-flipper { position: relative; flex: 1; display: grid; transform-style: preserve-3d; transition: transform .6s cubic-bezier(.3,1.25,.45,1); }
.rhythm-item.is-flipped .rhythm-flipper { transform: rotateY(180deg); }
.rhythm-face { grid-area: 1 / 1; container-type: inline-size; position: relative; display: flex; flex-direction: column; min-width: 0; padding: 14px; border-radius: 22px; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.rhythm-front { border: 1px solid var(--line); background: color-mix(in srgb,var(--tint) 60%,var(--surface)); }
/* The category with the "+" in the top right corner; the "+" overhangs the line, so the card does not grow. */
.rhythm-card-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 9px; }
.rhythm-category { display: flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); pointer-events: none; }
.rhythm-category .icon { width: 14px; height: 14px; color: var(--strong); }
.rhythm-lead { display: flex; flex-direction: column; align-items: stretch; margin: 0; }
.rhythm-label { font-size: min(14px,8.6cqi); font-weight: 600; line-height: 1.35; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rhythm-value { min-width: 0; display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 6px; font-size: clamp(28px,8.4vw,34px); font-weight: 700; letter-spacing: -.6px; line-height: 1.15; font-variant-numeric: tabular-nums; color: var(--text); }
.rhythm-value small { font-size: 16px; font-weight: 600; letter-spacing: 0; color: var(--muted); }
/* "3u 26m" stays on one line and shrinks with a narrow tile; its "geleden" may move to the next line. */
.rhythm-value.is-elapsed { font-size: min(34px,24cqi); }
.rhythm-value [data-elapsed] { white-space: nowrap; }
.rhythm-note { font-size: 14px; line-height: 1.45; color: var(--text-2); font-variant-numeric: tabular-nums; }
.rhythm-extra { margin-top: 4px; font-size: 13px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.rhythm-extra b { font-weight: 600; color: var(--text); }
/* The "+": a dark circle in the category color whose hit area covers the whole tile. */
.rhythm-add { flex: none; display: grid; place-items: center; width: 30px; height: 30px; margin: -7px -4px -7px 0; padding: 0; border-radius: 50%; background: var(--strong); color: var(--on-strong); box-shadow: 0 2px 6px color-mix(in srgb,var(--strong) 28%,transparent); }
.rhythm-add .icon { width: 16px; height: 16px; stroke-width: 2.6; }
.rhythm-add::after { content: ""; position: absolute; inset: 0; border-radius: 22px; }
.rhythm-add:focus-visible { outline: none; }
.rhythm-add:focus-visible::after { outline: 2px solid var(--focus); outline-offset: 2px; }
.rhythm-front:has(.rhythm-add:active) { transform: scale(.98); }
.rhythm-front { transition: transform .15s ease; }
/* The latest moments and today's total, while the toggle is on. */
.rhythm-facts { display: none; gap: 10px; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); }
.show-history .rhythm-facts { display: grid; animation: rhythm-in .25s ease; }
@keyframes rhythm-in { from { opacity: 0; transform: translateY(-4px); } }
.rhythm-fact span { display: block; font-size: 12px; color: var(--text-2); }
.rhythm-fact > strong { display: block; margin-top: 1px; font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.rhythm-card .stats { grid-template-columns: 1fr; gap: 0; margin: 0; }
.rhythm-card .stat { padding: 0; border: 0; border-radius: 0; background: none; }
.rhythm-card .stat-label { font-size: 12px; color: var(--text-2); }
.rhythm-card .stat-label .icon { display: none; }
.rhythm-card .stat > div { margin-top: 1px; gap: 5px; }
.rhythm-card .stat strong { font-size: 16px; font-weight: 600; letter-spacing: 0; }
.rhythm-card .stat small { margin-top: 2px; }
/* The back of the feeding tile, in the dark feeding color like its "+". */
.rhythm-back { transform: rotateY(180deg); gap: 8px; background: var(--strong); color: var(--on-strong); }
.rhythm-back-heading { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-bottom: 2px; }
.rhythm-back-heading h3 { font-size: min(14px,8.6cqi); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rhythm-back-close { flex: none; display: grid; place-items: center; width: 30px; height: 30px; padding: 0; margin: -7px -4px -7px 0; border-radius: 50%; background: color-mix(in srgb,var(--on-strong) 18%,transparent); color: var(--on-strong); }
.rhythm-back-close .icon { width: 16px; height: 16px; stroke-width: 2.2; }
.rhythm-choice { display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 7px 8px; border-radius: 14px; background: var(--surface); color: var(--text); text-align: left; font-size: min(14px,8.6cqi); font-weight: 600; }
.rhythm-choice .quick-icon { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 10px; background: var(--tint); color: var(--strong); }
.rhythm-choice .quick-icon .icon { width: 17px; height: 17px; }
.rhythm-choice small { display: block; font-size: min(12px,8cqi); font-weight: 600; color: var(--breast-strong); }
.rhythm-choice:hover { background: var(--surface-raised); }
/* An odd last tile spans the row: the same parts with room to breathe. */
.rhythm-item:last-child:nth-child(odd) { grid-column: 1 / -1; }
.rhythm-item:last-child:nth-child(odd) .rhythm-front { padding: 16px; }
.rhythm-item:last-child:nth-child(odd) .rhythm-label { font-size: 14px; }
.show-history .rhythm-item:last-child:nth-child(odd) .rhythm-facts { grid-template-columns: repeat(auto-fit,minmax(130px,max-content)); column-gap: 28px; }
.rhythm-item:last-child:nth-child(odd) .rhythm-back { display: grid; grid-template-columns: 1fr 1fr; align-content: start; }
.rhythm-item:last-child:nth-child(odd) .rhythm-back-heading { grid-column: 1 / -1; }
@media (prefers-reduced-motion: reduce) {
  .rhythm-flipper, .rhythm-front { transition: none; }
  .show-history .rhythm-facts { animation: none; }
}

/* Collapse visually and in keyboard/accessibility navigation; animate the actual height both ways. */
.diary-more { display: grid; grid-template-rows: 0fr; opacity: 0; transition: grid-template-rows .32s ease, opacity .24s ease; }
.diary-more > div { overflow: hidden; min-height: 0; }
.diary-more.is-expanded { grid-template-rows: 1fr; opacity: 1; }
.diary-more.is-expanded > div > .timeline-row:first-child { border-top: 1px solid var(--border); }
.diary-toggle { width: 100%; display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; color: var(--accent-text); font-weight: 600; font-size: 13px; border-top: 1px solid var(--border); border-radius: 0; }
.diary-toggle .icon { width: 15px; height: 15px; transform: rotate(90deg); transition: transform .3s ease; }
.diary-toggle[aria-expanded="true"] .icon { transform: rotate(-90deg); }
.quick-card:has(small) { transition: transform .2s ease; }

/* Same illustration scale, baseline and breathing room for every new measurement. */
.entry-art-stage { display: grid; place-items: center; min-height: 178px; padding: 14px; border-radius: 24px; margin: 0 0 22px; }
.entry-art-stage .fox-art { display: block; width: 148px; height: 148px; object-fit: contain; margin: 0; }
.start-panel { background: none; padding: 0; }
.start-panel .entry-art-stage { margin-bottom: 16px; }
.start-panel p { max-width: 340px; margin: 12px auto 18px; line-height: 1.6; }
[data-live-timer] .timer-card { margin-bottom: 0; }

@media (max-width: 700px) {
  .rhythm-card { margin-bottom: 26px; }
}
@media (prefers-reduced-motion: reduce) {
  .diary-more, .diary-toggle .icon, .quick-card { transition: none; }
}


/* The fox replaces the decorative timer glyph; the timestamp itself is the edit control. */
.timer-card { padding: 18px 22px 16px; }
.timer-middle { margin: 10px 0 12px; }
.timer-middle small { margin-top: 4px; }
.timer-footer { padding-top: 12px; }
.timer-middle > div:first-child { min-width: 0; }
.timer-art { padding: 0; transform: none; flex: 0 0 auto; margin-left: 10px; }
.timer-art::before, .timer-art::after { content: none; }
/* As large as the card allows; it bleeds into the margins around it, so the card keeps its height. */
.timer-art .fox-art { display: block; width: clamp(104px, 11vw, 124px); height: auto; object-fit: contain; margin: -14px -8px -14px 0; }
.timer-edit { min-height: 36px; padding: 5px 10px; border-radius: 999px; background: var(--surface); color: var(--text-2); border: 1px solid var(--border); text-decoration: none; font-size: 12px; }
.timer-edit:hover { background: var(--surface-raised); border-color: var(--border-strong); }
.timer-edit:focus-visible { outline-color: var(--focus); }
.timer-middle small { gap: 4px 7px; }
@media (max-width: 700px) {
  .timer-card { padding: 16px 18px 14px; }
  .timer-edit { min-height: 44px; }
  .timer-art .fox-art { width: 108px; margin: -12px -6px -12px 0; }
  .timer-value { font-size: clamp(32px,10vw,46px); }
}
.rhythm-help { position: relative; flex: none; }
.rhythm-help summary { display: grid; place-items: center; width: 40px; height: 40px; padding: 0; margin: -6px -8px 0 0; list-style: none; cursor: pointer; }
.rhythm-help summary::-webkit-details-marker { display: none; }
.rhythm-help summary > span { display: grid; place-items: center; width: 20px; height: 20px; border: 1px solid var(--border-strong); border-radius: 50%; font: 500 12px -apple-system, sans-serif; color: var(--muted); }
.rhythm-help summary:focus-visible { outline: 2px solid var(--focus); border-radius: 12px; }
.rhythm-help-popover { position: absolute; top: 39px; right: 0; z-index: 3; width: min(270px,70vw); padding: 16px; border: 1px solid var(--border); border-radius: 16px; background: var(--surface-raised); box-shadow: 0 8px 28px var(--shadow); }
.rhythm-help-popover p { font-size: 13px; line-height: 1.6; color: var(--text-2); margin: 0; }
.rhythm-help-popover p + p { margin-top: 10px; }

/* Stapsgewijs slaapschema: Dagplanning card, active sleep timer guidance, and schedule modal. */
.dayplan-card { margin-bottom: 26px; }
.dayplan-tools { display: flex; align-items: center; gap: 12px; }
.dayplan-box { background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: 16px 18px; }
.dayplan-summary { padding-bottom: 12px; border-bottom: 1px solid var(--border); margin-bottom: 4px; }
.dayplan-summary-top { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px; font-size: 14px; }
.dayplan-summary-top strong { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--text); }
.dayplan-summary-top strong .icon { width: 16px; height: 16px; color: var(--sleep-strong); }
.dayplan-summary-top span { font-size: 12px; font-weight: 600; color: var(--text-2); font-variant-numeric: tabular-nums; }
.dayplan-summary-top span.is-over { color: var(--danger); }
.dayplan-bar { height: 6px; border-radius: 999px; background: var(--sleep-tint); overflow: hidden; margin-top: 8px; }
.dayplan-bar i { display: block; height: 100%; border-radius: 999px; background: var(--sleep-strong); }
.dayplan-bar i.is-over { background: var(--danger); }
.dayplan-note { margin: 8px 0 0; font-size: 12.5px; color: var(--text-2); line-height: 1.45; }
.dayplan-slots { display: flex; flex-direction: column; }
.dayplan-slot { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 10px 4px; border-bottom: 1px solid var(--border); background: none; color: var(--text); }
.dayplan-slot:last-child { border-bottom: 0; padding-bottom: 2px; }
button.dayplan-slot:hover { background: var(--surface-sunken); border-radius: 12px; padding-left: 8px; padding-right: 8px; }
.dayplan-icon { flex: none; width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; background: var(--tint); color: var(--strong); }
.dayplan-icon .icon { width: 16px; height: 16px; }
.dayplan-slot.is-completed .dayplan-icon { background: var(--surface-sunken); color: var(--muted); }
.dayplan-copy { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.dayplan-copy strong { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; }
.dayplan-slot.is-completed .dayplan-copy strong { color: var(--muted); text-decoration: line-through; }
.dayplan-copy small { font-size: 12px; color: var(--text-2); line-height: 1.4; }
.dayplan-time { flex: none; font-size: 13.5px; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--text); white-space: nowrap; }
.dayplan-slot.is-completed .dayplan-time { color: var(--muted); }
.dayplan-badge { font-size: 11px; font-weight: 650; padding: 2px 7px; border-radius: 999px; background: var(--sleep-tint); color: var(--sleep-strong); text-decoration: none; }
.dayplan-badge.is-active { background: var(--sleep-strong); color: var(--on-strong); }

.timer-guidance { margin: 0 0 12px; padding: 10px 12px; border-radius: 14px; background: color-mix(in srgb, var(--surface) 84%, transparent); display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; color: var(--text); }
.timer-guidance strong { font-weight: 600; }
.timer-guidance small { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-2); }
.timer-guidance small .icon { width: 14px; height: 14px; color: var(--strong); flex: none; }
.timer-guidance.is-alert { background: var(--strong); color: var(--on-strong); }
.timer-guidance.is-alert small, .timer-guidance.is-alert small .icon { color: var(--on-strong); }

.schedule-toggle { display: flex; flex-direction: row; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); margin: 0 0 14px; cursor: pointer; color: var(--text); }
.schedule-toggle input { width: 18px; height: 18px; min-height: 0; padding: 0; margin: 2px 0 0; accent-color: var(--accent); flex: none; }
.schedule-toggle span { display: flex; flex-direction: column; gap: 2px; }
.schedule-toggle strong { font-size: 14px; font-weight: 600; color: var(--text); }
.schedule-toggle small { font-size: 12px; color: var(--text-2); line-height: 1.4; }
.schedule-age-card { padding: 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); margin-bottom: 14px; display: flex; flex-direction: column; gap: 12px; }
.schedule-age-card .schedule-toggle.is-compact { padding: 0; border: 0; background: none; margin: 0; }
.schedule-age-summary { padding: 11px 12px; border-radius: 12px; background: var(--sleep-tint); display: flex; flex-direction: column; gap: 4px; }
.schedule-age-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.schedule-age-head strong { font-size: 13.5px; font-weight: 600; color: var(--text); }
.schedule-age-summary small { font-size: 12px; font-weight: 600; color: var(--sleep-strong); }
.schedule-age-summary p { margin: 2px 0 0; font-size: 12px; line-height: 1.45; color: var(--text-2); }
.schedule-preset-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.schedule-preset-chips .chip.is-selected { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-text); font-weight: 600; }
.schedule-finetune { margin: 4px 0 14px; border: 1px solid var(--border); border-radius: 14px; padding: 0 14px; background: var(--surface); }
.schedule-finetune > summary { min-height: 46px; font-size: 13.5px; justify-content: space-between; }
.schedule-finetune-body { padding: 6px 0 12px; border-top: 1px solid var(--border); }
.schedule-finetune .field-label { display: block; font-size: 12.5px; font-weight: 600; margin-bottom: 6px; color: var(--text-2); }
