/* ==========================================================================
   framakifékoi — Digital Crèche 2026
   Warm, sunlit, mobile-first. One column, big touch targets, no chrome.
   ========================================================================== */

@font-face {
  font-family: 'Fraunces';
  src: url('../fonts/fraunces-latin.woff2') format('woff2-variations');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --sand: #faf5ec;
  --sand-deep: #f2e9da;
  --card: #fffcf7;
  --ink: #2b2521;
  --ink-soft: #74675a;
  --ink-faint: #a3968a;
  --line: #e8dfce;
  --line-strong: #d8cbb4;

  --terracotta: #c4653a;
  --terracotta-deep: #a5502b;
  --terracotta-soft: #f6e2d6;
  --olive: #6b7f5a;
  --olive-soft: #e4ebdc;
  --pool: #2e7d9a;
  --pool-soft: #dcedf3;
  --amber: #cc8a2c;
  --amber-soft: #f9ecd5;

  --radius: 18px;
  --radius-sm: 12px;
  --radius-pill: 999px;
  --shadow: 0 1px 2px rgba(64, 46, 30, .05), 0 8px 24px -12px rgba(64, 46, 30, .18);
  --shadow-lift: 0 2px 4px rgba(64, 46, 30, .06), 0 16px 32px -14px rgba(64, 46, 30, .26);

  --wrap: 720px;
  --tabbar-h: 62px;
  --display: 'Fraunces', 'Iowan Old Style', Georgia, serif;
  --body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

/* Author `display` rules outrank the UA's `[hidden] { display: none }`, and
   several components below set one. Keep the attribute authoritative. */
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--sand);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
  overflow-x: hidden;
}

h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.15; margin: 0; letter-spacing: -.01em; }
p { margin: 0; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--terracotta-deep); }

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--ink); color: var(--sand); padding: .6rem 1rem; border-radius: 0 0 var(--radius-sm) 0;
}
.skip:focus { left: 0; }

:focus-visible { outline: 2.5px solid var(--pool); outline-offset: 2px; border-radius: 6px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 18px 48px; }

/* ---------------------------------------------------------------- topbar */

.topbar {
  position: sticky; top: 0; z-index: 40;
  background: rgba(250, 245, 236, .88);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  max-width: var(--wrap); margin: 0 auto;
  padding: 10px 18px;
  display: flex; align-items: center; gap: 12px;
}
.brand { display: flex; align-items: center; gap: 9px; text-decoration: none; color: var(--ink); min-width: 0; }
.brand-mark {
  width: 30px; height: 30px; flex: none; border-radius: 9px;
  background: var(--terracotta); color: #fff;
  font-family: var(--display); font-weight: 700; font-size: 19px;
  display: grid; place-items: center; line-height: 1;
}
.brand-text { font-family: var(--display); font-weight: 600; font-size: 18px; letter-spacing: -.015em; }
.topnav { display: none; margin-left: auto; gap: 4px; }
.topnav a {
  text-decoration: none; color: var(--ink-soft); padding: 7px 13px;
  border-radius: var(--radius-pill); font-size: 15px; font-weight: 500;
}
.topnav a:hover { background: var(--sand-deep); color: var(--ink); }
.topnav a[aria-current='page'] { background: var(--terracotta-soft); color: var(--terracotta-deep); font-weight: 600; }

.whoami {
  margin-left: auto; display: flex; align-items: center; gap: 7px;
  background: var(--card); border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill); padding: 4px 12px 4px 4px;
  cursor: pointer; font-size: 14px; font-weight: 500; color: var(--ink-soft);
  max-width: 46vw; white-space: nowrap; overflow: hidden;
}
.whoami:hover { border-color: var(--terracotta); color: var(--ink); }
.topnav + .whoami { margin-left: 0; }

.live {
  position: absolute; right: 18px; bottom: -22px;
  display: flex; align-items: center; gap: 5px;
  font-size: 11px; color: var(--ink-faint); pointer-events: none;
  opacity: 0; transition: opacity .3s;
}
.live[data-status='offline'] { opacity: 1; color: var(--terracotta-deep); }
.live-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.live[data-status='live'] .live-text { display: none; }

/* ------------------------------------------------------------------ hero */

.hero { position: relative; isolation: isolate; margin-bottom: 26px; }
.hero img { width: 100%; height: clamp(280px, 46vh, 420px); object-fit: cover; }
.hero-veil {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(43, 37, 33, .18) 0%, rgba(43, 37, 33, .06) 32%, rgba(43, 37, 33, .72) 100%),
    linear-gradient(105deg, rgba(164, 80, 43, .28), rgba(46, 125, 154, .12));
}
.hero-body {
  position: absolute; inset: auto 0 0 0;
  max-width: var(--wrap); margin: 0 auto; padding: 0 18px 22px;
  color: #fff; text-shadow: 0 1px 20px rgba(30, 20, 12, .45);
}
.hero-kicker {
  font-size: 12px; letter-spacing: .16em; text-transform: uppercase;
  font-weight: 600; opacity: .92; margin-bottom: 4px;
}
.hero-title { font-family: var(--display); font-size: clamp(40px, 12vw, 68px); font-weight: 600; letter-spacing: -.03em; }
.hero-dates { font-size: 17px; font-weight: 600; margin-top: 6px; }
.hero-place { font-size: 14.5px; opacity: .9; }

.countdown {
  display: inline-flex; align-items: baseline; gap: 7px;
  margin-top: 14px; padding: 7px 15px;
  background: rgba(255, 252, 247, .95); color: var(--terracotta-deep);
  border-radius: var(--radius-pill); text-shadow: none;
  font-weight: 700; font-size: 15px;
}
.countdown b { font-family: var(--display); font-size: 21px; font-weight: 700; }
.countdown small { color: var(--ink-soft); font-weight: 500; font-size: 13px; }

/* ----------------------------------------------------------------- cards */

.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px;
  box-shadow: var(--shadow); margin-bottom: 14px;
}
.card-title {
  font-family: var(--display); font-size: 18px; font-weight: 600;
  display: flex; align-items: center; gap: 9px; margin-bottom: 4px;
}
.card-sub { color: var(--ink-soft); font-size: 14px; }

.section-title {
  font-size: 22px; margin: 30px 0 12px;
  display: flex; align-items: baseline; gap: 10px;
}
.section-title small { font-family: var(--body); font-size: 13px; font-weight: 500; color: var(--ink-faint); }
.page-title { font-size: clamp(30px, 8vw, 40px); margin: 26px 0 8px; letter-spacing: -.025em; }
.page-lede { color: var(--ink-soft); font-size: 15.5px; margin-bottom: 20px; max-width: 56ch; }
.hint { color: var(--ink-faint); font-size: 13.5px; margin-bottom: 12px; }

/* ----------------------------------------------------------------- stats */

.stats { display: flex; gap: 10px; margin-bottom: 18px; }
.stat {
  flex: 1; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 12px 10px; text-align: center;
  box-shadow: var(--shadow);
}
.stat b { display: block; font-family: var(--display); font-size: 25px; font-weight: 600; line-height: 1.1; }
.stat span { font-size: 12px; color: var(--ink-soft); }

/* ------------------------------------------------------------------ todo */

.todo { border-color: var(--terracotta); background: linear-gradient(180deg, #fff9f4, var(--card)); }
.todo ul { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 8px; }
.todo li a {
  display: flex; align-items: center; gap: 11px;
  padding: 11px 13px; background: var(--card);
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  text-decoration: none; color: var(--ink); font-weight: 500; font-size: 15px;
  min-height: 46px;
}
.todo li a:hover { border-color: var(--terracotta); background: #fff; }
.todo li a::after { content: '→'; margin-left: auto; color: var(--terracotta); font-weight: 700; }
.todo-done { display: flex; align-items: center; gap: 10px; color: var(--olive); font-weight: 600; }

/* ---------------------------------------------------------------- gauges */

.gauges { display: grid; gap: 13px; }
.gauge-row { display: flex; align-items: center; gap: 12px; font-size: 14px; }
.gauge-label { flex: 1; min-width: 0; }
.gauge-label b { font-weight: 600; }
.gauge-track { flex: none; width: 88px; height: 8px; border-radius: 4px; background: var(--sand-deep); overflow: hidden; }
.gauge-fill { height: 100%; border-radius: 4px; background: var(--olive); transition: width .5s cubic-bezier(.4, 0, .2, 1); }
.gauge-fill[data-tone='warn'] { background: var(--amber); }
.gauge-fill[data-tone='low'] { background: var(--terracotta); }
.gauge-num { flex: none; font-variant-numeric: tabular-nums; font-weight: 600; font-size: 13px; color: var(--ink-soft); width: 46px; text-align: right; }

/* --------------------------------------------------------------- weather */

.weather-days { display: flex; gap: 9px; }
.wday {
  flex: 1; text-align: center; padding: 12px 6px;
  background: var(--pool-soft); border-radius: var(--radius-sm);
}
.wday-name { font-size: 12px; font-weight: 600; color: var(--pool); text-transform: uppercase; letter-spacing: .05em; }
.wday-icon { font-size: 26px; line-height: 1.4; }
.wday-temp { font-weight: 600; font-size: 15px; }
.wday-temp small { color: var(--ink-soft); font-weight: 500; }
.wday-rain { font-size: 11.5px; color: var(--pool); }

/* ------------------------------------------------------------- practical */

.info-card { display: flex; gap: 13px; align-items: flex-start; }
.info-icon {
  flex: none; width: 40px; height: 40px; border-radius: 11px;
  display: grid; place-items: center; font-size: 20px; background: var(--sand-deep);
}
.info-body { min-width: 0; flex: 1; }
.info-body h3 { font-size: 16.5px; margin-bottom: 2px; }
.info-body p { font-size: 14px; color: var(--ink-soft); }
.pill-link {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 9px;
  padding: 7px 13px; border-radius: var(--radius-pill);
  background: var(--sand-deep); color: var(--ink); text-decoration: none;
  font-size: 13.5px; font-weight: 600; min-height: 36px;
}
.pill-link:hover { background: var(--terracotta-soft); color: var(--terracotta-deep); }
.rule-badge {
  display: inline-block; margin-top: 8px; padding: 5px 11px;
  background: var(--amber-soft); color: #8a5b12; border-radius: var(--radius-pill);
  font-size: 12.5px; font-weight: 600;
}

.photo-card { margin: 26px 0 0; padding: 0; overflow: hidden; border-radius: var(--radius); box-shadow: var(--shadow); background: var(--card); border: 1px solid var(--line); }
.photo-card img { width: 100%; height: 220px; object-fit: cover; }
.photo-card figcaption { padding: 13px 16px; font-size: 14.5px; color: var(--ink-soft); }

/* --------------------------------------------------------------- avatars */

.avatar {
  flex: none; width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 13px; font-weight: 700; color: #fff;
  letter-spacing: .01em; line-height: 1; user-select: none;
}
.avatar-sm { width: 24px; height: 24px; font-size: 10px; }
.avatar-lg { width: 46px; height: 46px; font-size: 15px; }
.avatar-me { box-shadow: 0 0 0 2.5px var(--card), 0 0 0 5px var(--terracotta); }

.person-chip {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 12px 5px 5px; border-radius: var(--radius-pill);
  background: var(--sand-deep); border: 1px solid transparent;
  font-size: 14px; font-weight: 500; cursor: pointer; min-height: 38px;
}
.person-chip[aria-pressed='true'] { background: var(--terracotta-soft); border-color: var(--terracotta); color: var(--terracotta-deep); font-weight: 600; }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }

/* ----------------------------------------------------------------- forms */

.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13.5px; font-weight: 600; color: var(--ink-soft); margin-bottom: 5px; }
.field input[type='datetime-local'],
.field input[type='number'],
.field input[type='text'],
.field select,
.field textarea {
  width: 100%; padding: 11px 13px; min-height: 46px;
  background: var(--sand); border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm); font-size: 16px; /* 16px avoids iOS zoom */
}
.field textarea { min-height: 84px; resize: vertical; line-height: 1.5; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--terracotta); background: #fff; }
.field-row { display: flex; gap: 12px; }
.field-row .field { flex: 1; min-width: 0; }

.seg { display: flex; gap: 6px; flex-wrap: wrap; }
.seg button {
  flex: 1; min-width: 76px; min-height: 44px; padding: 9px 12px;
  background: var(--sand); border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm); cursor: pointer; font-size: 14.5px; font-weight: 500;
}
.seg button[aria-pressed='true'] { background: var(--terracotta); border-color: var(--terracotta); color: #fff; font-weight: 600; }
.seg-days button { text-transform: capitalize; }

.time-input {
  width: 100%; margin-top: 7px; min-height: 46px; padding: 11px 14px;
  font-size: 17px; font-weight: 600; font-variant-numeric: tabular-nums;
  background: var(--sand); border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
}
.time-input::placeholder { font-weight: 400; color: var(--ink-faint); }
.time-input:focus { border-color: var(--terracotta); background: #fff; }

.check {
  display: flex; align-items: center; gap: 11px; padding: 12px 13px;
  background: var(--pool-soft); border-radius: var(--radius-sm);
  cursor: pointer; font-size: 14.5px; font-weight: 500; min-height: 48px;
}
.check input { width: 20px; height: 20px; accent-color: var(--pool); flex: none; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 20px; min-height: 48px; width: 100%;
  background: var(--terracotta); color: #fff; border: none;
  border-radius: var(--radius-sm); font-size: 16px; font-weight: 600; cursor: pointer;
}
.btn:hover { background: var(--terracotta-deep); }
.btn[disabled] { opacity: .55; cursor: default; }
.btn-ghost { background: transparent; color: var(--ink-soft); border: 1px solid var(--line-strong); }
.btn-ghost:hover { background: var(--sand-deep); color: var(--ink); }
.save-hint { font-size: 13px; color: var(--olive); font-weight: 600; margin: 4px 0 10px; text-align: center; min-height: 18px; }

.link-btn {
  background: none; border: none; padding: 4px 0; margin: -6px 0 14px;
  color: var(--ink-faint); font-size: 13px; font-weight: 500;
  text-decoration: underline; text-underline-offset: 3px; cursor: pointer;
}
.link-btn:hover { color: var(--terracotta-deep); }

/* -------------------------------------------------------------- shuttle */

.shuttle { background: var(--pool-soft); border-color: #bcdae4; }
.shuttle .card-title { color: var(--pool); }
.shuttle-list { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 7px; }
.shuttle-list li { display: flex; align-items: center; gap: 10px; font-size: 14.5px; background: rgba(255, 255, 255, .65); padding: 9px 12px; border-radius: var(--radius-sm); }
.shuttle-time { margin-left: auto; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--pool); }

/* ---------------------------------------------------------- travel list */

/* ------------------------------------------------------------------ gantt */

.gantt { margin-top: 14px; }
.gantt-row { display: flex; align-items: center; gap: 9px; height: 24px; }
.gantt-row.is-me .gantt-name { color: var(--terracotta-deep); font-weight: 700; }
.gantt-name {
  flex: none; width: 74px; font-size: 11.5px; font-weight: 600; color: var(--ink-soft);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: right;
}
.gantt-link { color: var(--pool); margin-left: 3px; }
.gantt-track { position: relative; flex: 1; height: 100%; min-width: 0; }

.gantt-header { height: 20px; margin-bottom: 4px; }
.gantt-axis { position: absolute; inset: 0; }
.gantt-day {
  position: absolute; top: 0; height: 100%;
  display: grid; place-items: center;
  font-size: 10.5px; font-weight: 700; letter-spacing: .05em;
  text-transform: uppercase; color: var(--ink-faint);
}
.gantt-grid { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--line-strong); }

.gantt-bar {
  position: absolute; top: 50%; transform: translateY(-50%);
  height: 11px; border-radius: 6px; opacity: .9;
}
/* A missing time is drawn as a bar that runs off the edge. */
.gantt-bar.open-start { border-top-left-radius: 0; border-bottom-left-radius: 0; opacity: .5; }
.gantt-bar.open-end { border-top-right-radius: 0; border-bottom-right-radius: 0; opacity: .5; }

.tag-with { color: var(--pool); font-weight: 600; }
.field-hint { font-size: 12.5px; color: var(--ink-faint); margin-top: 6px; }
.field select {
  width: 100%; padding: 11px 13px; min-height: 46px; font-size: 16px;
  background: var(--sand); border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
}
.field select:focus { border-color: var(--terracotta); background: #fff; }

.travel-list { display: grid; gap: 8px; }
.travel-row {
  display: flex; align-items: center; gap: 11px; padding: 11px 13px;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}
.travel-row.is-empty { background: transparent; border-style: dashed; }
.travel-main { min-width: 0; flex: 1; }
.travel-name { font-weight: 600; font-size: 15px; }
.travel-meta { font-size: 13px; color: var(--ink-soft); display: flex; flex-wrap: wrap; gap: 2px 8px; }
.travel-meta .tag + .tag::before { content: '·'; margin-right: 8px; color: var(--line-strong); }
.travel-note { font-size: 13px; color: var(--ink-faint); font-style: italic; margin-top: 2px; }
.tag { display: inline-flex; align-items: center; gap: 4px; }
.tag-pickup { color: var(--pool); font-weight: 600; }
.shuttle-head {
  font-family: var(--body); font-size: 12px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .06em; color: var(--pool);
  margin: 14px 0 6px;
}
.travel-edit {
  flex: none; background: none; border: none; cursor: pointer;
  color: var(--ink-faint); font-size: 18px; padding: 6px; border-radius: 8px;
}
.travel-edit:hover { background: var(--sand-deep); color: var(--terracotta); }

/* ------------------------------------------------------------------ beds */

.house { margin-bottom: 30px; }
.house-head { margin-bottom: 12px; }
.house-head h2 { font-size: 21px; }
.house-head p { font-size: 13.5px; color: var(--ink-soft); }

.rooms { display: grid; gap: 12px; }
@media (min-width: 560px) { .rooms { grid-template-columns: 1fr 1fr; } }

.room { padding: 14px; }
.room-head { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.room-name { font-family: var(--display); font-size: 17px; font-weight: 600; }
.room-count {
  margin-left: auto; font-size: 12px; font-weight: 600; color: var(--ink-soft);
  background: var(--sand-deep); padding: 3px 9px; border-radius: var(--radius-pill);
}
.room.is-full .room-count { background: var(--olive-soft); color: var(--olive); }

.beds { display: flex; flex-wrap: wrap; gap: 10px 8px; align-items: flex-start; }

/* Width and height are set inline to match the generated SVG exactly. */
.bed { position: relative; flex: none; }
.bed-svg { position: absolute; inset: 0; pointer-events: none; }

.slot {
  position: absolute; top: 12px; width: 54px; height: 76px;
  border: none; background: none; padding: 0; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
}
.slot-disc {
  width: 38px; height: 38px; border-radius: 50%;
  border: 2px dashed var(--line-strong); color: var(--ink-faint);
  display: grid; place-items: center; font-size: 20px; font-weight: 400;
  background: rgba(255, 253, 250, .7);
}
.slot:hover .slot-disc { border-color: var(--terracotta); color: var(--terracotta); background: #fff; }
.slot:hover .avatar { filter: brightness(1.12); }
.slot-name {
  font-size: 10.5px; font-weight: 600; color: var(--ink-faint); line-height: 1.15;
  max-width: 54px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.slot-taken .slot-name { color: var(--ink); }
.slot-free-label { font-weight: 500; }

.cots { margin-top: 12px; padding-top: 11px; border-top: 1px dashed var(--line-strong); }
.cot-row { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.cot-label { font-size: 12px; font-weight: 700; color: var(--ink-faint); width: 100%; letter-spacing: .03em; }
.cot-chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 5px 3px 9px; border-radius: var(--radius-pill);
  background: var(--olive-soft); color: var(--olive);
  font-size: 12.5px; font-weight: 600; min-height: 34px;
}
.cot-chip.is-provided { background: var(--amber-soft); color: #8a5b12; }
.cot-chip svg { flex: none; }
.cot-name { background: none; border: none; padding: 2px 0; cursor: pointer; font-size: 12.5px; font-weight: 600; color: inherit; }
.cot-flag { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; opacity: .8; }
.cot-remove {
  flex: none; width: 24px; height: 24px; border-radius: 50%; border: none;
  background: rgba(255, 255, 255, .6); color: inherit; cursor: pointer;
  font-size: 15px; line-height: 1; display: grid; place-items: center;
}
.cot-remove:hover { background: #fff; color: var(--terracotta-deep); }
.cot-add {
  min-height: 34px; padding: 4px 13px; border-radius: var(--radius-pill);
  border: 1.5px dashed var(--line-strong); background: none; cursor: pointer;
  font-size: 12.5px; font-weight: 600; color: var(--ink-faint);
}
.cot-add:hover { border-color: var(--olive); color: var(--olive); }
.cot-picker {
  display: flex; flex-wrap: wrap; gap: 6px; width: 100%; margin-top: 8px;
  padding: 9px; background: var(--sand); border-radius: var(--radius-sm);
}
.cot-picker .cot-add { border-style: solid; background: var(--card); color: var(--ink); }

.house-count { font-family: var(--body); font-size: 13px; font-weight: 600; color: var(--ink-faint); }
.name-seen { margin-left: auto; color: var(--olive); font-size: 20px; line-height: 1; }

.babies-pool { display: flex; flex-wrap: wrap; gap: 9px; }
.baby-chip {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 13px 5px 5px; border-radius: var(--radius-pill);
  background: var(--card); border: 1.5px solid var(--line-strong);
  font-size: 14px; font-weight: 600; cursor: pointer; min-height: 40px;
}
.baby-chip[aria-pressed='true'] { border-color: var(--olive); background: var(--olive-soft); }
.baby-chip.is-placed { opacity: .55; }
.baby-where { font-size: 11.5px; font-weight: 500; color: var(--ink-faint); }

/* ----------------------------------------------------------------- meals */

.meals { display: grid; gap: 14px; }
.meal-head { display: flex; align-items: center; gap: 11px; margin-bottom: 12px; }
.meal-emoji { font-size: 26px; line-height: 1; }
.meal-title { min-width: 0; flex: 1; }
.meal-day { display: block; font-family: var(--display); font-size: 17.5px; font-weight: 600; line-height: 1.2; }
.meal-name { display: block; font-size: 13px; color: var(--ink-soft); }
.meal-count {
  flex: none; font-size: 12.5px; font-weight: 700; padding: 5px 11px;
  border-radius: var(--radius-pill); background: var(--terracotta-soft); color: var(--terracotta-deep);
}
.meal-count[data-tone='ok'] { background: var(--olive-soft); color: var(--olive); }
.meal-cooks { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; min-height: 38px; align-items: center; }
.meal-empty { font-size: 13.5px; color: var(--ink-faint); font-style: italic; }
.meal-note-wrap { margin-top: 4px; }
.meal-note-wrap label { display: block; font-size: 12.5px; font-weight: 600; color: var(--ink-faint); margin-bottom: 5px; }
.meal-note-wrap textarea {
  width: 100%; min-height: 70px; padding: 10px 12px; resize: vertical;
  background: var(--sand); border: 1px solid var(--line); border-radius: var(--radius-sm);
  font-size: 15px; line-height: 1.5;
}
.meal-note-wrap textarea:focus { border-color: var(--terracotta); background: #fff; }
.meal-actions { display: flex; gap: 9px; align-items: center; }
.meal-actions .btn { width: auto; flex: 1; }
.note-saved { font-size: 12px; color: var(--olive); font-weight: 600; min-height: 16px; margin-top: 5px; }

/* ---------------------------------------------------------------- tabbar */

.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 45;
  display: flex; background: rgba(255, 252, 247, .94);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
}
.tabbar a {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 8px 4px 7px; text-decoration: none; color: var(--ink-faint);
  font-size: 11px; font-weight: 600; min-height: var(--tabbar-h);
}
.tabbar svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.tabbar a[aria-current='page'] { color: var(--terracotta); }

/* ----------------------------------------------------------------- modal */

.modal {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(43, 37, 33, .55);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  display: grid; place-items: end center; padding: 20px 0 0;
  overflow-y: auto;
}
@media (min-width: 620px) { .modal { place-items: center; padding: 24px; } }
.modal-card {
  background: var(--card); width: 100%; max-width: 520px;
  border-radius: var(--radius) var(--radius) 0 0; padding: 24px 20px calc(28px + env(safe-area-inset-bottom));
  animation: rise .32s cubic-bezier(.2, .8, .3, 1);
}
@media (min-width: 620px) { .modal-card { border-radius: var(--radius); padding-bottom: 24px; } }
.modal-card { position: relative; }
.modal-close {
  position: absolute; top: 14px; right: 14px;
  width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid var(--line-strong); background: var(--sand);
  color: var(--ink-soft); font-size: 22px; line-height: 1; cursor: pointer;
}
.modal-close:hover { border-color: var(--terracotta); color: var(--terracotta); }
.modal-card h2 { font-size: 25px; padding-right: 44px; }
.modal-lede { color: var(--ink-soft); font-size: 14.5px; margin: 6px 0 18px; }
.name-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }

.welcome-head { display: flex; align-items: center; gap: 13px; margin-bottom: 16px; }
.welcome-head h2 { font-size: 24px; }
.welcome-head .modal-lede { margin: 4px 0 0; }
.modal-todo { background: none; }
.modal-todo ul { margin-top: 0; }
.name-btn {
  display: flex; align-items: center; gap: 9px; padding: 8px 12px 8px 8px;
  background: var(--sand); border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill); cursor: pointer;
  font-size: 15px; font-weight: 500; min-height: 48px; text-align: left;
}
.name-btn:hover { border-color: var(--terracotta); background: #fff; }

/* ---------------------------------------------------------------- toasts */

.toast-stack {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 14px);
  z-index: 70; display: grid; gap: 8px; width: min(94vw, 460px); pointer-events: none;
}
.toast {
  background: var(--ink); color: var(--sand); padding: 12px 16px;
  border-radius: var(--radius-sm); font-size: 14.5px; font-weight: 500;
  box-shadow: var(--shadow-lift); animation: rise .26s cubic-bezier(.2, .8, .3, 1);
}
.toast[data-tone='warn'] { background: var(--terracotta-deep); }
.toast[data-tone='ok'] { background: var(--olive); }

/* ------------------------------------------------------------ animations */

@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; transform: translateY(9px); } to { opacity: 1; transform: none; } }

.view:not([hidden]) > .wrap > *, .view:not([hidden]) > .hero { animation: fade .4s both; }
.view:not([hidden]) > .wrap > *:nth-child(2) { animation-delay: .04s; }
.view:not([hidden]) > .wrap > *:nth-child(3) { animation-delay: .08s; }
.view:not([hidden]) > .wrap > *:nth-child(4) { animation-delay: .12s; }
.view:not([hidden]) > .wrap > *:nth-child(n+5) { animation-delay: .16s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

/* ------------------------------------------------------------- desktop */

@media (min-width: 900px) {
  body { padding-bottom: 0; }
  .tabbar { display: none; }
  .topnav { display: flex; }
  .whoami { margin-left: 14px; }
  .toast-stack { bottom: 22px; }
  .hero img { height: 400px; border-radius: 0 0 26px 26px; }
  .hero-veil { border-radius: 0 0 26px 26px; }
}
