/* Lori care site. Calm palette: violet for her, sage for the baby, rose only for safety. */
:root {
  --ink: #2B2A33;
  --ink-2: #4E4B56;
  --muted: #66636E;
  --faint: #8C8893;
  --accent: #5E548E;
  --accent-deep: #4C4376;
  --accent-ink: #3F3768;
  --accent-soft: #EFECF7;
  --accent-faint: #F6F4FA;
  --lilac: #B9A6D8;
  --lilac-2: #D6CCE6;
  --sage: #5F8574;
  --sage-deep: #3F6B58;
  --sage-ink: #24352C;
  --sage-soft: #E7EFEA;
  --sage-faint: #F2F7F3;
  --blush: #8C4F3C;
  --blush-soft: #F6EBE6;
  --rose: #6D3A48;
  --rose-soft: #F6EEF0;
  --rose-line: #EEDCE1;
  --sand: #F3EDE4;
  --paper: #FAF8F5;
  --card: #FFFFFF;
  --line: #ECE7E1;
  --line-2: #D9D3CB;
  --ok: #2F6B4F;
  --ok-bg: #E5F1EA;
  --warn: #6B5520;
  --warn-bg: #F7EFD9;
  --danger: #94485B;
  --danger-bg: #F6E9EC;
  --prio: #6B5520;
  --prio-bg: #F7EFD9;
  --prio-line: #E2CF9E;
  --hour-line: #B9A6D8;
  --display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --body: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --r-sm: 10px;
  --r: 12px;
  --r-lg: 18px;
  --tabs-h: 64px;
  --top-h: 60px;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: var(--body);
  background: var(--paper);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
a { color: var(--accent); }
button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--display); font-weight: 500; margin: 0; letter-spacing: -0.2px; }
h1 { font-weight: 400; letter-spacing: -0.5px; }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--lilac); outline-offset: 2px; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: 13px; }
.tiny { font-size: 12px; }
.strong { font-weight: 600; }
.center { text-align: center; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.pre { white-space: pre-wrap; }

.shell { min-height: 100vh; display: flex; flex-direction: column; }

/* ── Header ─────────────────────────────────────────────────────────────── */
.top {
  position: sticky; top: 0; z-index: 20;
  background: var(--card); color: var(--ink); border-bottom: 1px solid var(--line);
  padding: 8px 16px; padding-top: max(8px, env(safe-area-inset-top));
  display: flex; align-items: center; gap: 10px; min-height: var(--top-h);
}
.brand { display: inline-flex; align-items: center; gap: 9px; font-family: var(--display); font-size: 21px; font-weight: 500; color: var(--ink); text-decoration: none; }
.brand .mark { width: 32px; height: 32px; border-radius: 10px; background: var(--accent); color: #FFFFFF; display: inline-flex; align-items: center; justify-content: center; }
.brand svg { width: 20px; height: 20px; }
.top .spacer { flex-grow: 1; }
.top .nav { display: none; }
.top .acct { display: none; }
.demo-tag {
  font-size: 11px; font-weight: 600; letter-spacing: 0.3px; text-transform: uppercase;
  color: var(--warn); background: var(--warn-bg); padding: 3px 8px; border-radius: 7px;
}

/* Who the page is for: her, or the baby */
.seg { display: inline-flex; gap: 3px; background: #F4F1EC; border-radius: 12px; padding: 3px; }
.seg button, .seg a {
  min-height: 36px; padding: 0 12px; border-radius: 9px; border: 0; background: transparent; cursor: pointer;
  font-size: 14px; font-weight: 600; color: var(--muted); white-space: nowrap; text-decoration: none;
  display: inline-flex; align-items: center; gap: 6px;
}
.seg button.on, .seg a.on { background: var(--card); color: var(--accent-ink); box-shadow: 0 1px 3px rgba(43, 42, 51, 0.08); }
.seg button.on.baby { color: var(--sage-deep); }
.seg .lbl { font-size: 12px; color: var(--faint); font-weight: 600; padding: 0 4px 0 6px; align-self: center; }
.who { max-width: 62vw; }
.who button { padding: 0 10px; overflow: hidden; text-overflow: ellipsis; }
.baby-pick {
  height: 36px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--card);
  padding: 0 10px; font-size: 14px; font-weight: 600; max-width: 40vw;
}

@media (min-width: 900px) {
  .top { padding: 10px 32px; min-height: 72px; gap: 14px; }
  .top .nav { display: flex; gap: 2px; margin-left: 18px; }
  .top .nav a { padding: 9px 13px; border-radius: 10px; font-weight: 500; color: var(--ink-2); text-decoration: none; font-size: 15px; }
  .top .nav a:hover { background: var(--accent-faint); }
  .top .nav a.on { color: var(--accent-ink); background: var(--accent-soft); font-weight: 600; }
  .top .acct { display: inline-flex; width: 38px; height: 38px; border-radius: 10px; background: var(--blush-soft); color: var(--blush); align-items: center; justify-content: center; font-family: var(--display); text-decoration: none; }
  .who { max-width: none; }
}

/* ── Page ───────────────────────────────────────────────────────────────── */
.page {
  width: 100%; max-width: 680px; margin: 0 auto; flex-grow: 1;
  padding: 18px 16px calc(var(--tabs-h) + 28px + env(safe-area-inset-bottom));
  display: flex; flex-direction: column; gap: 18px;
}
.page.wide { max-width: 1160px; }
.page.gate { padding-bottom: 32px; }
@media (min-width: 900px) {
  .page { padding: 32px 32px 56px; gap: 22px; }
}
.head { display: flex; flex-direction: column; gap: 4px; }
.head h1 { font-size: 28px; line-height: 1.15; }
.head .sub { color: var(--muted); font-size: 15px; }
.head .eyebrow, .eyebrow { font-size: 13px; font-weight: 600; color: var(--sage); }
.squiggle { display: block; width: 150px; height: 12px; margin-top: 2px; }
.back {
  align-self: flex-start; display: inline-flex; align-items: center; gap: 4px; min-height: 32px;
  color: var(--accent); font-weight: 600; font-size: 14px; text-decoration: none; background: none; border: 0; padding: 0; cursor: pointer;
}
.label { font-size: 13px; font-weight: 600; color: var(--muted); }
.section { display: flex; flex-direction: column; gap: 10px; }
.section > h2, .h2 { font-size: 22px; }
.sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.sec-head .sub { color: var(--muted); font-size: 14px; }
.cols { display: flex; flex-direction: column; gap: 18px; }
@media (min-width: 900px) {
  .head h1 { font-size: 36px; }
  .cols { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(300px, 1fr); gap: 22px; align-items: start; }
  .cols > .side { position: sticky; top: 96px; display: flex; flex-direction: column; gap: 16px; }
  .cols > .main { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
}
.cols > .main, .cols > .side { display: flex; flex-direction: column; gap: 16px; min-width: 0; }

/* ── Bottom tabs (phones) ───────────────────────────────────────────────── */
.tabs {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  background: var(--card); border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
}
.tabs nav { max-width: 680px; margin: 0 auto; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; height: var(--tabs-h); }
.tabs a {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  text-decoration: none; color: var(--faint); font-size: 12px; font-weight: 600;
}
.tabs a svg { width: 22px; height: 22px; }
.tabs a.on { color: var(--accent); }
@media (min-width: 900px) { .tabs { display: none; } }

/* ── Cards and rows ─────────────────────────────────────────────────────── */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.card.tint { background: var(--accent-faint); border-color: var(--accent-soft); }
.card.sage { background: var(--sage-faint); border-color: var(--sage-soft); }
.card.sage h2, .card.sage h3 { color: var(--sage-ink); }
.card.rose { background: var(--rose-soft); border-color: var(--rose-line); color: var(--rose); }
.card.dark { background: var(--accent-soft); border-color: var(--accent-soft); color: var(--ink); }
.card.dark .muted { color: var(--ink-2); }
.card h2 { font-size: 21px; }
.card h3 { font-size: 18px; }
a.card { text-decoration: none; color: inherit; }
a.card:hover, button.card:hover { border-color: var(--line-2); }
button.card { text-align: left; cursor: pointer; font: inherit; }
.list { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.row {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px; min-height: 56px;
  text-decoration: none; color: inherit; border-top: 1px solid var(--line); background: none; border-left: 0; border-right: 0; border-bottom: 0;
  width: 100%; text-align: left; cursor: pointer; font: inherit;
}
.list > .row:first-child { border-top: 0; }
.row:hover { background: var(--accent-faint); }
.row .grow { flex-grow: 1; min-width: 0; }
.row .title { font-weight: 600; }
.row .chev { color: var(--faint); flex-shrink: 0; }
.kv { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.kv .v { font-weight: 600; text-align: right; }
.divider { height: 1px; background: var(--line); }

/* ── Buttons and chips ──────────────────────────────────────────────────── */
.btn {
  min-height: 48px; padding: 0 18px; border-radius: var(--r); border: 1px solid var(--line-2);
  background: var(--card); color: var(--ink); font-size: 15px; font-weight: 600; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; text-align: center;
}
.btn:hover { border-color: #C6BFB6; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #FFFFFF; }
.btn.primary:hover { background: var(--accent-deep); }
.btn.sage { background: var(--sage-deep); border-color: var(--sage-deep); color: #FFFFFF; }
.btn.danger { color: var(--danger); border-color: #EBC9D2; }
.btn.light { background: var(--card); border-color: var(--line-2); color: var(--ink); }
.btn.wide { width: 100%; }
.btn.small { min-height: 40px; font-size: 14px; padding: 0 14px; border-radius: 10px; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: 0.5; cursor: default; pointer-events: none; }
.btns { display: flex; gap: 10px; flex-wrap: wrap; }
.btns > .btn { flex: 1 1 140px; }
.link { background: none; border: 0; padding: 4px 0; color: var(--accent); font-weight: 600; cursor: pointer; font-size: 14px; text-decoration: none; min-height: 32px; display: inline-flex; align-items: center; gap: 4px; }
.chip { display: inline-flex; align-items: center; font-size: 12px; font-weight: 600; padding: 4px 9px; border-radius: 7px; background: #F1EEE9; color: var(--ink-2); white-space: nowrap; }
.chip.ok { background: var(--ok-bg); color: var(--ok); }
.chip.warn { background: var(--warn-bg); color: var(--warn); }
.chip.danger { background: var(--danger-bg); color: var(--danger); }
.chip.accent { background: var(--accent-soft); color: var(--accent-ink); }
.chip.sage { background: var(--sage-soft); color: var(--sage-deep); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.choice {
  min-height: 40px; padding: 0 15px; border-radius: 20px; border: 1px solid var(--line-2); background: var(--card);
  font-size: 14px; font-weight: 500; cursor: pointer; color: var(--ink); white-space: nowrap;
}
.choice:hover { border-color: #C6BFB6; }
.choice.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.scroll-x { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px; }
.scroll-x::-webkit-scrollbar { display: none; }

/* ── Forms ──────────────────────────────────────────────────────────────── */
.stack { display: flex; flex-direction: column; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 600; color: var(--ink); }
.field .hint, .field .opt-note { font-weight: 400; color: var(--muted); font-size: 13px; }
.field input, .field select, .field textarea, .search input {
  min-height: 48px; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--card);
  font-size: 16px; padding: 0 14px; width: 100%; font-weight: 500;
}
.field textarea { padding: 12px 14px; min-height: 96px; resize: vertical; line-height: 1.5; }
.field input:focus, .field select:focus, .field textarea:focus, .search input:focus { border-color: var(--accent); outline: none; }
fieldset.field { border: 0; padding: 0; margin: 0; }
fieldset.field legend { margin-bottom: 8px; padding: 0; }
.phone-input { display: flex; align-items: center; min-height: 50px; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--card); overflow: hidden; }
.phone-input:focus-within { border-color: var(--accent); }
.phone-input .cc { padding: 0 10px 0 14px; color: var(--muted); border-right: 1px solid var(--line); line-height: 28px; font-weight: 600; }
.phone-input input { border: 0; height: 50px; flex-grow: 1; min-width: 0; outline: none; padding: 0 12px; font-size: 17px; font-weight: 600; letter-spacing: 0.5px; }
.code-input { letter-spacing: 6px; font-size: 22px !important; text-align: center; font-weight: 600 !important; }
.radio-row { display: flex; gap: 8px; flex-wrap: wrap; }
.radio-row label { flex: 1 1 100px; position: relative; }
.radio-row input { position: absolute; left: 0; top: 0; width: 1px; height: 1px; margin: 0; opacity: 0; pointer-events: none; }
.radio-row span {
  display: flex; align-items: center; justify-content: center; min-height: 46px; border-radius: 12px;
  border: 1px solid var(--line-2); background: var(--card); font-weight: 500; cursor: pointer; padding: 0 10px; text-align: center;
}
.radio-row input:checked + span { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-ink); font-weight: 600; }
.radio-row input:focus-visible + span { outline: 3px solid var(--lilac); outline-offset: 2px; }
.radio-row.pills label { flex: 0 0 auto; }
.radio-row.pills span { border-radius: 22px; padding: 0 16px; min-height: 42px; }
.error { color: var(--danger); font-size: 13px; font-weight: 600; min-height: 18px; }
.error:empty { display: none; }
.search { display: flex; gap: 8px; flex-wrap: wrap; }
.search input { flex: 1 1 220px; }

/* Steps (after sign-in) */
.steps { display: flex; gap: 6px; }
.steps span { flex: 1; height: 4px; border-radius: 2px; background: var(--line); }
.steps span.on { background: var(--accent); }

/* ── Notices ────────────────────────────────────────────────────────────── */
.notice { border-radius: var(--r); padding: 12px 14px; font-size: 14px; background: var(--accent-faint); color: var(--ink-2); display: flex; gap: 10px; align-items: flex-start; }
.notice.warn { background: var(--warn-bg); color: var(--warn); }
.notice.danger, .notice.rose { background: var(--rose-soft); color: var(--rose); }
.notice.ok { background: var(--ok-bg); color: var(--ok); }
.notice.sage { background: var(--sage-faint); color: var(--sage-ink); }
.notice svg { flex-shrink: 0; width: 18px; height: 18px; margin-top: 1px; }
.hint { font-size: 13px; color: var(--muted); }
.safety { border-radius: 14px; background: var(--rose-soft); border: 1px solid var(--rose-line); color: var(--rose); padding: 14px 16px; font-size: 14px; line-height: 1.55; }
.safety b { font-weight: 600; }

/* ── People ─────────────────────────────────────────────────────────────── */
.avatar { width: 48px; height: 48px; border-radius: 10px; object-fit: cover; flex-shrink: 0; background: var(--sand); color: var(--blush);
  display: inline-flex; align-items: center; justify-content: center; font-family: var(--display); font-weight: 500; font-size: 17px; }
.avatar.lg { width: 72px; height: 72px; font-size: 24px; border-radius: 14px; }
.avatar.sm { width: 40px; height: 40px; font-size: 14px; }
.person { display: flex; gap: 12px; align-items: flex-start; }
.person .grow { flex-grow: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.person .name { font-weight: 600; font-size: 16px; }
.person .foot { display: flex; justify-content: space-between; gap: 8px; margin-top: 6px; font-size: 13px; font-weight: 600; }
.free-now { color: var(--ok); }

/* Square photos */
.photo { position: relative; display: flex; align-items: center; justify-content: center; aspect-ratio: 1; width: 100%; border-radius: 12px; overflow: hidden; background: var(--sand); color: var(--blush); font-family: var(--display); font-size: 34px; }
.photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo .badge { position: absolute; left: 8px; top: 8px; font-family: var(--body); font-size: 11px; font-weight: 600; padding: 3px 7px; border-radius: 6px; background: rgba(255,255,255,0.92); color: var(--ok); }

/* Expert card (rail and tiles) */
.xcard { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 10px; display: flex; flex-direction: column; gap: 8px; text-decoration: none; color: inherit; min-width: 0; }
.xcard:hover { border-color: var(--line-2); }
.xcard .tx { display: flex; flex-direction: column; gap: 1px; padding: 0 4px; min-width: 0; }
.xcard .nm { font-weight: 600; font-size: 15px; }
.xcard .rl { font-size: 13px; font-weight: 600; color: var(--blush); }
.xcard .rl.baby { color: var(--sage-deep); }
.xcard .mt { font-size: 12.5px; color: var(--muted); }
.xcard .ft { margin: 2px 4px 2px; padding-top: 8px; border-top: 1px solid #F1ECE6; display: flex; justify-content: space-between; gap: 8px; font-size: 12.5px; font-weight: 600; }

/* Rail (carousel) */
.rail-wrap { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.rail-arrows { display: none; gap: 8px; }
.rail { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin: 0 -16px; padding: 2px 16px 4px; scroll-padding: 0 16px; }
.rail::-webkit-scrollbar { display: none; }
.rail > .xcard { flex: 0 0 168px; scroll-snap-align: start; }
@media (min-width: 900px) {
  .rail-arrows { display: flex; }
  .rail { margin: 0; padding: 2px 2px 4px; scroll-padding: 0; scroll-behavior: smooth; }
  .rail > .xcard { flex-basis: 212px; }
}

/* Experts page: tiles and list */
.xgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
@media (min-width: 900px) { .xgrid { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; } }
.xrow { display: flex; gap: 14px; align-items: flex-start; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 12px; text-decoration: none; color: inherit; }
.xrow:hover { border-color: var(--line-2); }
.xrow .photo { width: 92px; flex-shrink: 0; font-size: 26px; }
.xrow .grow { flex-grow: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.xrow .nm { font-weight: 600; font-size: 16px; }
.xrow .rl { font-size: 13px; font-weight: 600; color: var(--blush); }
.xrow .rl.baby { color: var(--sage-deep); }
.xrow .ft { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 6px; font-size: 13px; font-weight: 600; }
@media (min-width: 900px) { .xrow .photo { width: 120px; } }
.expert-top { display: flex; gap: 18px; align-items: flex-start; flex-wrap: wrap; }
.expert-top .photo { width: 140px; flex-shrink: 0; font-size: 40px; }
.expert-top .grow { flex: 1 1 240px; display: flex; flex-direction: column; gap: 6px; }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 18px; margin: 4px 0 0; font-size: 14px; }
.facts dt { color: var(--muted); font-size: 13px; }
.facts dd { margin: 1px 0 0; font-weight: 600; }
@media (min-width: 900px) { .expert-top .photo { width: 180px; } }

/* ── Day strip and slots ────────────────────────────────────────────────── */
.dayhead { display: flex; align-items: center; gap: 10px; }
.dayhead .grow { flex-grow: 1; font-size: 13px; color: var(--muted); }
.arrow { width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--card); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.arrow:disabled { opacity: 0.35; cursor: default; }
.days { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.day {
  border: 1px solid var(--line); background: var(--card); border-radius: 12px; padding: 8px 2px; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 1px; min-height: 72px;
}
.day .dow { font-size: 12px; color: var(--muted); font-weight: 500; }
.day .num { font-size: 19px; font-weight: 600; }
.day .note { font-size: 11px; font-weight: 600; color: var(--sage); min-height: 15px; }
.day.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-ink); }
.day:disabled { opacity: 0.45; cursor: default; }
.day:disabled .note { color: var(--faint); }
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.slot {
  border: 1px solid var(--line-2); background: var(--card); border-radius: 12px; min-height: 52px; padding: 6px 4px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; cursor: pointer; gap: 1px;
}
.slot .t { font-weight: 600; font-size: 15px; }
.slot .tag { font-size: 11px; font-weight: 500; color: var(--muted); }
.slot.hour { border-color: var(--hour-line); border-width: 1.5px; }
.slot.prio { background: var(--prio-bg); border-color: var(--prio-line); }
.slot.prio .tag { color: var(--prio); }
.slot.locked { background: var(--paper); border-style: dashed; }
.slot.on { background: var(--accent); border-color: var(--accent); color: #FFFFFF; }
.slot.on .tag { color: #E7E3F4; }
.slot:disabled { opacity: 0.45; text-decoration: line-through; cursor: default; background: var(--paper); }
.group-head { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.group-head.hour { color: var(--accent-ink); }
.group-head.prio { color: var(--prio); }
.group-head .note { font-weight: 500; color: var(--faint); }
.key { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12px; font-weight: 500; color: var(--muted); }
.key span::before { content: ''; display: inline-block; width: 11px; height: 11px; border-radius: 4px; border: 1px solid var(--line-2); margin-right: 5px; vertical-align: -1px; background: #FFF; }
.key .k-hour::before { border: 1.5px solid var(--hour-line); }
.key .k-prio::before { background: var(--prio-bg); border-color: var(--prio-line); }

/* Options (who with) */
.opt { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--card); cursor: pointer; text-align: left; width: 100%; font: inherit; color: inherit; }
.opt .dot { width: 22px; height: 22px; border-radius: 11px; border: 2px solid #CFC8BF; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; }
.opt.on { border-color: var(--accent); background: var(--accent-faint); }
.opt.on .dot { border-color: var(--accent); }
.opt.on .dot::after { content: ''; width: 10px; height: 10px; border-radius: 5px; background: var(--accent); }
.opt .grow { flex-grow: 1; min-width: 0; }
.opt .price { font-weight: 600; white-space: nowrap; }

/* Sticky action bar */
.action-bar {
  position: sticky; bottom: calc(var(--tabs-h) + env(safe-area-inset-bottom) + 10px); z-index: 10;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 12px;
  box-shadow: 0 8px 24px rgba(43, 42, 51, 0.08); display: flex; flex-direction: column; gap: 8px;
}
.action-bar .sum { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; color: var(--muted); }
.action-bar .sum b { color: var(--ink); font-weight: 600; }
@media (min-width: 900px) { .action-bar { position: static; box-shadow: none; } }

/* ── Home ───────────────────────────────────────────────────────────────── */
.greet { display: flex; flex-direction: column; gap: 4px; position: relative; }
.greet h1 { font-size: 30px; line-height: 1.15; }
@media (min-width: 900px) { .greet h1 { font-size: 40px; } }
.checkin .moods { display: flex; flex-wrap: wrap; gap: 8px; }
.checkin .reply { border-radius: 12px; background: var(--accent-faint); padding: 12px 14px; font-size: 14px; color: var(--ink-2); display: flex; flex-direction: column; gap: 8px; }
.checkin .reply.rose { background: var(--rose-soft); color: var(--rose); }
.checkin .reply.ok { background: var(--sage-faint); color: var(--sage-ink); }
.next { display: flex; gap: 12px; align-items: center; }
.next .when { width: 58px; flex-shrink: 0; border-radius: 12px; background: var(--accent-soft); padding: 7px 0; display: flex; flex-direction: column; align-items: center; color: var(--accent-ink); }
.next .when.baby { background: var(--sage-soft); color: var(--sage-deep); }
.next .when .d { font-size: 11px; font-weight: 600; }
.next .when .n { font-family: var(--display); font-size: 24px; line-height: 1.05; color: var(--ink); }
.next .grow { flex-grow: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.progress { height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.progress > span { display: block; height: 6px; background: #8FB5A0; }

/* Baby's clinic */
.hero { background: var(--sage-faint); border: 1px solid var(--sage-soft); color: var(--ink); border-radius: var(--r-lg); padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.hero h2 { font-size: 22px; color: var(--sage-ink); }
.hero .muted { color: #4E6B5C; }
.hero .chip { background: var(--card); color: var(--sage-deep); }
.hero .chip.ok { background: var(--ok-bg); color: var(--ok); }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (min-width: 900px) { .tiles { grid-template-columns: repeat(3, 1fr); gap: 14px; } }
.tile { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px; text-decoration: none; color: inherit; display: flex; flex-direction: column; gap: 4px; min-height: 96px; }
.tile:hover { border-color: var(--line-2); }
.tile .t { font-weight: 600; }
.tile .s { font-size: 13px; color: var(--muted); }
.tile .ic { width: 32px; height: 32px; border-radius: 10px; background: var(--sage-soft); color: var(--sage-deep); display: inline-flex; align-items: center; justify-content: center; margin-bottom: 4px; }
.tile.her .ic { background: var(--accent-soft); color: var(--accent); }
.tile .ic svg { width: 18px; height: 18px; }
.links { display: flex; flex-direction: column; }
.links a { display: flex; justify-content: space-between; align-items: center; padding: 11px 0; border-bottom: 1px solid #F1ECE6; color: var(--ink); text-decoration: none; min-height: 44px; }
.links a:last-child { border-bottom: 0; }
.links a svg { width: 16px; height: 16px; color: var(--faint); }

/* Queue numbers */
.nums { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.nums .cell { background: var(--card); border-radius: 12px; padding: 10px; }
.nums .k { font-size: 11px; font-weight: 600; color: var(--sage-deep); letter-spacing: 0.3px; }
.nums .v { font-family: var(--display); font-size: 28px; }

/* ── You: this phase ────────────────────────────────────────────────────── */
.stage-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 700px) { .stage-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.stage-grid .card .k { font-size: 13px; font-weight: 600; }
.stage-grid .card:nth-child(1) .k { color: var(--blush); }
.stage-grid .card:nth-child(2) .k { color: var(--accent); }
.stage-grid .card:nth-child(3) .k { color: #94485B; }
.weeks { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 6px; }
.weeks .w { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 11px; color: var(--muted); }
.weeks .w span { width: 100%; height: 34px; border-radius: 8px; background: #F1ECE6; display: block; }
.weeks .w.now { color: var(--ink); font-weight: 600; }
.mood-well span { background: var(--sage-soft) !important; }
.mood-tired span { background: var(--sand) !important; }
.mood-sore span { background: var(--blush-soft) !important; }
.mood-feeding span { background: var(--lilac-2) !important; }
.mood-low span, .mood-overwhelmed span { background: var(--danger-bg) !important; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: 12px; color: var(--muted); }
.legend .sw { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; background: var(--line); }

/* ── Care notes and prescriptions ───────────────────────────────────────── */
.note-card .body { font-size: 15px; line-height: 1.65; color: var(--ink-2); white-space: pre-wrap; }
.rx { background: var(--card); border: 1px solid var(--line-2); border-radius: 14px; padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.rx .rx-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; border-bottom: 1.5px solid var(--ink-2); padding-bottom: 12px; }
.rx .doc { font-family: var(--display); font-size: 21px; }
.rx table { width: 100%; border-collapse: collapse; font-size: 14px; }
.rx th { text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); padding: 8px 10px; background: var(--paper); }
.rx td { padding: 10px; border-top: 1px solid var(--line); vertical-align: top; }
.rx .foot-note { font-size: 12px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 10px; }

/* ── Landing (signed out) ───────────────────────────────────────────────── */
.landing { display: flex; flex-direction: column; gap: 28px; }
.land-hero { display: flex; flex-direction: column; gap: 22px; }
.land-hero .copy { display: flex; flex-direction: column; gap: 14px; position: relative; }
.land-hero h1 { font-size: 34px; line-height: 1.12; }
.land-hero h1 .u { position: relative; white-space: nowrap; }
.land-hero h1 .u svg { position: absolute; left: 0; bottom: -8px; width: 100%; height: 12px; }
.land-hero .lead { font-size: 17px; color: var(--ink-2); max-width: 560px; }
.trust { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 13px; color: var(--muted); margin: 0; padding: 0; list-style: none; }
.trust li::before { content: '✓'; color: var(--sage); font-weight: 700; margin-right: 6px; }
.signin-card { position: relative; }
.areas { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 640px) { .areas { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .areas { grid-template-columns: repeat(4, 1fr); } }
.area { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 18px; display: flex; flex-direction: column; gap: 8px; }
.area .ic { width: 42px; height: 42px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; }
.area .ic svg { width: 24px; height: 24px; }
.area h3 { font-size: 19px; }
.area p { font-size: 14px; color: var(--muted); }
.area .who { font-size: 13px; font-weight: 600; margin-top: auto; }
.how { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 700px) { .how { grid-template-columns: repeat(4, 1fr); } }
.how .n { font-family: var(--display); font-size: 30px; color: var(--lilac); line-height: 1; }
.how .t { font-weight: 600; margin-top: 4px; }
.how p { font-size: 14px; color: var(--muted); }
.band { background: var(--sage-soft); border-radius: 18px; padding: 20px; display: flex; flex-wrap: wrap; gap: 14px 24px; align-items: center; justify-content: space-between; }
.band h2 { font-size: 23px; color: var(--sage-ink); }
.band p { color: #3F5A4C; font-size: 15px; max-width: 640px; }
@media (min-width: 900px) {
  .landing { gap: 40px; }
  .land-hero { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(340px, 0.85fr); gap: 56px; align-items: center; padding-top: 12px; }
  .land-hero h1 { font-size: 54px; letter-spacing: -1.2px; }
}

/* ── QR ─────────────────────────────────────────────────────────────────── */
.qr { width: 150px; height: 150px; background: #FFFFFF; padding: 8px; border-radius: 12px; flex-shrink: 0; border: 1px solid var(--line); }
.qr svg { width: 100%; height: 100%; display: block; }
.qr-row { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.code-big { font-family: var(--display); font-size: 40px; letter-spacing: 6px; }

/* ── Empty and loading ──────────────────────────────────────────────────── */
.empty { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 30px 20px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.empty h2 { font-size: 20px; }
.empty p { color: var(--muted); max-width: 440px; }
.loading { display: flex; align-items: center; gap: 10px; color: var(--muted); padding: 24px 4px; font-size: 14px; }
.spin { width: 18px; height: 18px; border-radius: 9px; border: 2.5px solid var(--accent-soft); border-top-color: var(--accent); animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Dialog and toast ───────────────────────────────────────────────────── */
.scrim { position: fixed; inset: 0; background: rgba(43, 42, 51, 0.4); z-index: 40; display: flex; align-items: flex-end; justify-content: center; }
.dialog { background: var(--card); width: 100%; max-width: 480px; border-radius: 20px 20px 0 0; padding: 20px 16px calc(20px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 12px; }
@media (min-width: 640px) { .scrim { align-items: center; } .dialog { border-radius: 20px; padding: 24px; } }
.dialog h2 { font-size: 21px; }
.toast {
  position: fixed; left: 50%; bottom: calc(var(--tabs-h) + 18px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  background: var(--ink); color: #FFFFFF; padding: 12px 16px; border-radius: 12px; font-size: 14px; font-weight: 500; z-index: 50;
  max-width: calc(100vw - 32px); width: max-content; box-shadow: 0 8px 24px rgba(0,0,0,0.16);
}
.gate .toast { bottom: 24px; }
@media (min-width: 900px) { .toast { bottom: 28px; } }

/* ── Footer ─────────────────────────────────────────────────────────────── */
.foot { font-size: 12px; color: var(--faint); display: flex; flex-direction: column; gap: 6px; text-align: center; padding-top: 12px; border-top: 1px solid var(--line); margin-top: 8px; }
.foot a { color: var(--muted); }
.foot nav { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* Icons inside controls */
.btn svg, .back svg, .arrow svg, .chev svg, .link svg { width: 18px; height: 18px; flex-shrink: 0; }
.chev { display: inline-flex; }

/* Print a prescription or care note */
@media print {
  .top, .tabs, .foot, .no-print, .btn, .back { display: none !important; }
  body { background: #FFFFFF; }
  .page { padding: 0; max-width: none; }
  .card, .rx { break-inside: avoid; border-color: #999; }
}
