/* Family Game Plan, styled after Simek's 2024 Impact Report: oat paper, deep slate navy,
   coral for action, periwinkle and powder blue, sage, blush and a mustard "today".
   Wide tracked caps for headings, a soft italic serif for warm accents, navy waves,
   coral spark marks and dotted journey lines. */
:root {
  --ice: #fbf5ea;          /* page: oat paper */
  --oat: #f6e8d1;
  --surface: #ffffff;
  --line: #ece1cd;
  --boards: #1e4256;       /* headings: slate navy */
  --ink: #1f3341;
  --ink-2: #566673;
  --ink-3: #96a0a7;
  --blue-line: #2a5f80;    /* links */
  --sky: #7f97c8;          /* periwinkle accent */
  --sky-soft: #e2ebf4;     /* powder blue */
  --sauce: #e05a3f;        /* coral: main action */
  --butter: #ebc35a;       /* mustard: today */
  --blush: #f3cfd7;
  --sage: #6f9886;
  --red-line: #c4442b;     /* alerts and overlaps */
  --warn-bg: #fbe6de;
  --ok: #3f8a68;
  --round: "Montserrat", "Avenir Next", "Avenir", "Futura", system-ui, sans-serif;
  --text: "Avenir Next", "Avenir", "Montserrat", -apple-system, system-ui, "Segoe UI", Roboto, sans-serif;
  --serif: "Fraunces", "Iowan Old Style", "Palatino", Georgia, serif;
  --tab-h: 62px;
  --squiggle: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 12'%3E%3Cpath d='M3 7c9-6 15-6 24 0s15 6 24 0 15-6 24 0 15 6 24 0 12-5 18-3' fill='none' stroke='%231e4256' stroke-width='3.6' stroke-linecap='round'/%3E%3C/svg%3E");
  color-scheme: light;
}
:root[data-theme="dark"] {
    color-scheme: dark;
    --ice: #13202a;
    --oat: #2a2f31;
    --surface: #1b2a35;
    --line: #2b3d4a;
    --boards: #f3eadb;
    --ink: #f1ebe0;
    --ink-2: #b6c0c7;
    --ink-3: #7b8790;
    --blue-line: #9cc0dd;
    --sky: #9fb2dc;
    --sky-soft: #233a4d;
    --sauce: #f07a5f;
    --butter: #e9c35c;
    --blush: #5a3d46;
    --sage: #86b3a0;
    --red-line: #ff8a73;
    --warn-bg: #3d2420;
    --ok: #7cc6a2;
    --squiggle: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 12'%3E%3Cpath d='M3 7c9-6 15-6 24 0s15 6 24 0 15-6 24 0 15 6 24 0 12-5 18-3' fill='none' stroke='%239fb2dc' stroke-width='3.6' stroke-linecap='round'/%3E%3C/svg%3E");
  }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ice);
  color: var(--ink);
  font: 17px/1.45 var(--text);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: var(--round); color: var(--boards); margin: 0; line-height: 1.15; }
h1 { font-size: 32px; font-weight: 850; letter-spacing: -0.015em; }
.page-head h1, .cal-head h1, .signin h1, .page > h1 {
  padding-bottom: 12px; background: var(--squiggle) left bottom / 96px 10px no-repeat;
}
h2 { font-size: 20px; font-weight: 750; }
h3 { font-size: 16px; font-weight: 700; margin-top: 14px; }
p { margin: 0 0 10px; }
a { color: var(--blue-line); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--blue-line); outline-offset: 2px; border-radius: 8px; }

/* ---------- layout ---------- */
.page {
  max-width: 720px;
  margin: 0 auto;
  padding: calc(env(safe-area-inset-top) + 18px) 18px calc(var(--tab-h) + env(safe-area-inset-bottom) + 28px);
}
.page.narrow { max-width: 480px; }
.page-head, .cal-head, .section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.page-head { margin-bottom: 14px; }
.section { margin-top: 26px; }
.section-head { margin-bottom: 8px; }
.section.quiet { margin-top: 36px; }
.stack { display: grid; gap: 14px; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 8px; }
.grow { flex: 1; min-width: 0; }
.muted { color: var(--ink-2); }
.small { font-size: 14px; }
.fine { font-size: 14px; color: var(--ink-2); margin: 0; }
.pad { padding: 24px 0; }
.lede { font-size: 19px; color: var(--ink-2); }
.panel { background: var(--surface); border: 2px solid var(--line); border-radius: 24px; padding: 20px; margin-top: 18px; }
.error { color: var(--red-line); background: var(--warn-bg); padding: 12px 14px; border-radius: 16px; margin: 8px 0; font-size: 15px; }
.flag { display: block; color: var(--red-line); font-size: 14px; font-weight: 600; }
.flag.overlap::before { content: ""; display: inline-block; width: 14px; height: 3px; background: var(--red-line); margin-right: 6px; vertical-align: middle; border-radius: 2px; }
.warn-text { color: var(--red-line); }
.badge { font: 600 13px var(--text); background: var(--red-line); color: #fff; padding: 2px 8px; border-radius: 999px; margin-left: 6px; vertical-align: 2px; }

/* ---------- controls ---------- */
.primary, .secondary, .danger {
  min-height: 50px; padding: 0 22px; border-radius: 999px; border: 0; font-weight: 750; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; text-decoration: none;
}
.primary { background: var(--ink); color: var(--surface); box-shadow: 0 3px 0 var(--sky); }
.primary:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--sky); }
.secondary { background: var(--surface); color: var(--ink); border: 2px solid var(--sky); }
.danger { background: transparent; color: var(--red-line); border: 1.5px solid currentColor; }
.small.secondary, .secondary.small { min-height: 40px; padding: 0 14px; font-size: 15px; }
button:disabled { opacity: 0.5; cursor: default; }
.link { background: none; border: 0; padding: 6px 0; color: var(--blue-line); font-weight: 600; cursor: pointer; min-height: 36px; }
.danger-text { color: var(--red-line); }
.field { display: grid; gap: 6px; border: 0; padding: 0; margin: 0; }
.field > span, .field > legend { font-size: 15px; font-weight: 600; color: var(--ink-2); padding: 0; }
.field em { font-style: normal; font-weight: 400; color: var(--ink-3); }
.field.inline { grid-template-columns: auto 1fr; align-items: center; margin-bottom: 8px; }
.field.indent, .checks.indent { margin-left: 30px; }
input:not([type="checkbox"]):not([type="radio"]), select, textarea {
  width: 100%; min-height: 50px; padding: 10px 16px; border-radius: 16px; border: 2px solid var(--line);
  background: var(--surface);
}
textarea { min-height: 90px; }
.code-input { font: 700 28px var(--round); letter-spacing: 0.3em; text-align: center; font-variant-numeric: tabular-nums; }
.check { display: flex; align-items: center; gap: 10px; min-height: 40px; cursor: pointer; }
.check input { width: 22px; height: 22px; accent-color: var(--sauce); flex: none; }
.check.preset { align-items: flex-start; padding: 6px 0; }
.check.preset input { margin-top: 3px; }
.checks { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.check .dot, .chip .dot { width: 12px; height: 12px; border-radius: 50%; background: var(--kid); flex: none; }

.segmented { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--sky-soft); border-radius: 999px; padding: 4px; margin: 16px 0 12px; }
.segmented button { border: 0; background: transparent; min-height: 40px; border-radius: 999px; font-weight: 700; color: var(--ink-2); cursor: pointer; }
.segmented button.on { background: var(--surface); color: var(--ink); box-shadow: 0 2px 0 var(--sky); }
.segmented.small { margin: 0; }
.segmented.small button { min-height: 34px; font-size: 15px; }

/* ---------- sign in ---------- */
.signin { max-width: 420px; margin: 0 auto; padding: calc(env(safe-area-inset-top) + 12vh) 22px 40px; }
.signin h1 { font-size: 40px; margin-top: 16px; }
.signin .lede { margin: 6px 0 26px; }

/* ---------- calendar ---------- */
.cal-head h1 { font-size: 28px; }
.cal-actions { display: flex; align-items: center; gap: 10px; }
.stepper { display: flex; border: 2px solid var(--line); border-radius: 999px; overflow: hidden; background: var(--surface); }
.stepper button { border: 0; background: none; min-width: 40px; min-height: 40px; font-weight: 750; color: var(--ink); cursor: pointer; padding: 0 10px; }
.stepper button + button { border-left: 2px solid var(--line); }
.add { width: 48px; height: 48px; border-radius: 50%; border: 0; background: var(--sauce); color: #fff; font: 700 30px/1 var(--round); cursor: pointer; box-shadow: 0 3px 0 color-mix(in srgb, var(--sauce) 55%, #000); }
.add:active { transform: translateY(2px); box-shadow: 0 1px 0 color-mix(in srgb, var(--sauce) 55%, #000); }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 8px; scrollbar-width: none; align-items: center; }
.chip {
  display: inline-flex; align-items: center; gap: 7px; flex: none; min-height: 38px; padding: 0 14px; border-radius: 999px;
  border: 2px solid color-mix(in srgb, var(--kid, var(--line)) 35%, var(--line)); background: var(--surface); font-weight: 750; cursor: pointer; color: var(--ink);
}
.chip.off { opacity: 0.45; }
.chip.more { color: var(--ink-2); }
.chip.more.on { border-color: var(--ink); color: var(--ink); }

/* The game sheet: big aligned start times, a kid-colored stripe per event. */
.agenda .earlier { display: block; margin: 0 auto 4px; }
.day { margin-top: 22px; }
.day-head { display: flex; align-items: center; gap: 10px; padding: 0 0 10px; }
.day-head .dow {
  font-size: 18px; font-weight: 850; background: var(--sky-soft); color: var(--ink);
  padding: 5px 14px; border-radius: 999px;
}
.day-head .date { font: 650 15px var(--text); color: var(--ink-2); }
.day.today .day-head .dow { background: var(--butter); color: #26212b; }
.day.past { opacity: 0.55; }
.events { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.event-row {
  display: grid; grid-template-columns: 78px 6px 1fr; gap: 12px; width: 100%; text-align: left;
  padding: 14px 14px 14px 8px; border: 0; border-radius: 20px; background: var(--surface); cursor: pointer; color: inherit;
  box-shadow: 0 1px 0 var(--line), 0 0 0 1px var(--line);
}
.event-row:active { transform: scale(0.99); }
.event-row .when { font-family: var(--round); font-variant-numeric: tabular-nums; text-align: right; padding-top: 1px; }
.event-row .t { display: block; white-space: nowrap; font-size: 21px; font-weight: 850; color: var(--ink); line-height: 1.05; }
.event-row .t small { font-size: 11px; font-weight: 700; margin-left: 2px; color: var(--ink-2); }
.event-row .end { display: block; font-size: 13px; color: var(--ink-3); margin-top: 3px; }
.event-row .allday { display: block; font-size: 14px; font-weight: 700; color: var(--ink-2); padding-top: 3px; }
.event-row .stripe { border-radius: 999px; background: var(--stripe); }
.event-row .what { display: grid; gap: 2px; min-width: 0; }
.event-row .who { font-weight: 850; font-size: 15px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.event-row .who .hh { font-weight: 500; color: var(--ink-2); }
.event-row .title { font-size: 17px; }
.event-row .where { font-size: 14px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.event-row.off .title, .event-row.off .t { text-decoration: line-through; color: var(--ink-3); }
.kind { font: 750 12px var(--text); padding: 3px 9px; border-radius: 999px; border: 0; }
.kind-game { color: #fff; background: var(--sauce); }
.kind-practice { color: var(--ink); background: var(--sky-soft); }
.kind-other { color: var(--ink-3); border-color: transparent; padding-left: 0; }

.setup ol { margin: 8px 0 0; padding-left: 20px; display: grid; gap: 6px; }
.empty { text-align: center; padding: 48px 16px; color: var(--ink-2); }
.empty h3 { font-size: 20px; margin-bottom: 8px; }
.empty p { max-width: 36ch; margin: 0 auto 16px; }

/* week grid */
.week { margin-top: 6px; background: var(--surface); border: 2px solid var(--line); border-radius: 22px; overflow: hidden; }
.week-days, .week-allday, .week-body { display: grid; grid-template-columns: 40px repeat(7, 1fr); }
.week-days span { text-align: center; padding: 8px 0 6px; font-size: 13px; color: var(--ink-2); font-weight: 600; }
.week-days b { display: block; font: 850 17px var(--round); color: var(--ink); width: 30px; height: 30px; line-height: 30px; margin: 2px auto 0; border-radius: 50%; }
.week-days .today b { background: var(--butter); color: #26212b; }
.week-allday { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); min-height: 28px; }
.week-allday .axis { font-size: 10px; color: var(--ink-3); align-self: center; text-align: center; }
.week-allday > div { padding: 3px 2px; display: grid; gap: 2px; border-left: 1px solid var(--line); }
.wk-pill { border: 0; border-radius: 5px; height: 20px; color: #fff; font: 700 12px var(--round); cursor: pointer; }
.week-body { position: relative; height: calc(var(--hours) * var(--hour)); }
.axis-col { position: relative; }
.axis-col span { position: absolute; right: 4px; font-size: 10px; color: var(--ink-3); transform: translateY(-1px); }
.wk-col {
  position: relative; border-left: 1px solid var(--line);
  background: repeating-linear-gradient(to bottom, transparent 0 calc(var(--hour) - 1px), var(--line) calc(var(--hour) - 1px) var(--hour));
}
.wk-col.today { background-color: color-mix(in srgb, var(--butter) 14%, transparent); }
.wk-block {
  position: absolute; border: 0; border-radius: 9px; padding: 3px 4px; overflow: hidden; cursor: pointer;
  background: var(--kid); color: #fff; text-align: left; display: flex; flex-direction: column; font-family: var(--round);
}
.wk-block b { font-size: 11px; font-variant-numeric: tabular-nums; }
.wk-block span { font-size: 11px; opacity: 0.9; }
.wk-block.off { opacity: 0.35; text-decoration: line-through; }

/* month grid */
.month { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; margin-top: 6px; }
.mh { text-align: center; font-size: 13px; font-weight: 650; color: var(--ink-3); padding: 4px 0; }
.md {
  aspect-ratio: 1 / 1.05; border: 0; border-radius: 14px; background: var(--surface); cursor: pointer; padding: 5px 2px;
  display: flex; flex-direction: column; align-items: center; gap: 4px; color: var(--ink);
}
.md .n { font: 700 16px var(--round); font-variant-numeric: tabular-nums; }
.md.out { background: transparent; color: var(--ink-3); }
.md.today .n { background: var(--butter); color: #26212b; border-radius: 50%; width: 26px; height: 26px; line-height: 26px; }
.md.sel { outline: 3px solid var(--sky); outline-offset: -3px; }
.md .dots { display: flex; flex-wrap: wrap; justify-content: center; gap: 3px; max-width: 30px; }
.md .dots i { width: 7px; height: 7px; border-radius: 50%; }
.md .dots em { font: 600 9px var(--text); font-style: normal; color: var(--ink-2); }

/* ---------- sheets ---------- */
.sheet-backdrop { position: fixed; inset: 0; background: rgb(8 16 28 / 0.45); display: flex; align-items: flex-end; justify-content: center; z-index: 20; }
.sheet {
  width: 100%; max-width: 560px; max-height: 92vh; overflow: auto; background: var(--ice); border-radius: 30px 30px 0 0;
  padding: 0 20px calc(env(safe-area-inset-bottom) + 24px); outline: none;
  animation: rise 0.22s ease-out;
}
@keyframes rise { from { transform: translateY(24px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .sheet { animation: none; } }
@media (min-width: 700px) { .sheet-backdrop { align-items: center; } .sheet { border-radius: 22px; } }
.sheet-head { position: sticky; top: 0; background: var(--ice); display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 18px 0 10px; z-index: 1; }
.sheet-head h2 { font-size: 22px; }
.detail .who-line { display: flex; align-items: center; gap: 8px; font-weight: 750; font-size: 17px; }
.big-time { font: 850 22px/1.3 var(--round); color: var(--ink); font-variant-numeric: tabular-nums; margin: 6px 0 14px; }
.detail .loc { margin: 14px 0; }
.detail .desc { white-space: pre-wrap; background: var(--surface); border-radius: 12px; padding: 12px 14px; }
.kind-edit { display: flex; align-items: center; gap: 12px; margin: 18px 0 6px; }
.kind-edit > span { font-weight: 600; color: var(--ink-2); }
.kind-edit .segmented { flex: 1; }
.source { margin-top: 14px; }
.kid-dots { display: inline-flex; gap: 3px; }
.kid-dots span { width: 12px; height: 12px; border-radius: 50%; }

/* ---------- family / schedules ---------- */
.list { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 2px solid var(--line); border-radius: 22px; overflow: hidden; }
.list li { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.list li:last-child { border-bottom: 0; }
.feed .section-head { display: block; }
.feed .section-head .muted { display: block; margin-top: 2px; }
.map .grow .small { display: block; }
.list.map select { width: auto; max-width: 48%; min-height: 40px; }
.swatch { width: 24px; height: 24px; border-radius: 50%; flex: none; }
.kid-name { font-weight: 700; }
.swatches { display: flex; gap: 10px; flex-wrap: wrap; }
.swatches button { width: 40px; height: 40px; border-radius: 12px; border: 3px solid transparent; cursor: pointer; }
.swatches button { border-radius: 50%; }
.swatches button.on { border-color: var(--ink); box-shadow: inset 0 0 0 3px var(--surface); }
.invite-link { font-size: 14px; word-break: break-all; background: var(--surface); border: 1px dashed var(--line); padding: 12px; border-radius: 12px; }
.status { padding: 12px 14px; border-radius: 16px; font-size: 15px; margin: 6px 0 4px; }
.status.ok { background: var(--surface); border-left: 4px solid var(--ok); }
.status.warn { background: var(--warn-bg); border-left: 4px solid var(--red-line); }
.status.wait { background: var(--surface); border-left: 4px solid var(--ink-3); }
.help summary { cursor: pointer; font-weight: 650; color: var(--blue-line); min-height: 40px; }
.steps, .plain { padding-left: 20px; margin: 6px 0 10px; }
.plain { color: var(--ink-2); }

/* ---------- tab bar ---------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; display: flex; justify-content: space-around;
  height: calc(var(--tab-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
  background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
}
.tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: var(--ink-3); text-decoration: none; font-size: 11px; font-weight: 650; }
.tabbar a svg { padding: 3px 14px; box-sizing: content-box; border-radius: 999px; }
.tabbar a.on { color: var(--ink); }
.tabbar a.on svg { stroke-width: 2.2; background: var(--sky-soft); }

/* ---------- babysitting ---------- */
.small-pill { min-height: 42px; padding: 0 18px; font-size: 15px; }
.group-title { font-size: 17px; margin-bottom: 8px; }
.req-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.req-card {
  width: 100%; text-align: left; display: grid; gap: 4px; padding: 16px 18px; border: 0; border-radius: 22px; cursor: pointer;
  background: var(--surface); color: inherit; box-shadow: 0 0 0 1px var(--line); position: relative; overflow: hidden;
}
.req-card::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 6px; background: var(--sky); }
.req-card.tone-good::before { background: var(--ok); }
.req-card.tone-warn::before { background: var(--butter); }
.req-card.tone-done::before { background: var(--line); }
.req-card:active { transform: scale(0.99); }
.req-when { font: 850 18px var(--round); color: var(--ink); font-variant-numeric: tabular-nums; }
.req-who { display: flex; align-items: center; gap: 8px; font-weight: 700; flex-wrap: wrap; }
.req-status { font-weight: 750; font-size: 15px; color: var(--blue-line); }
.req-status.tone-good { color: var(--ok); }
.req-status.tone-warn { color: color-mix(in srgb, var(--butter) 30%, var(--ink)); }
.req-status.tone-done { color: var(--ink-3); }
.quiet-list .req-card { opacity: 0.7; }
.note { background: var(--sky-soft); border-radius: 16px; padding: 12px 14px; font-weight: 650; }
.list.compact li { padding: 10px 16px; }
.resp { font-size: 14px; font-weight: 700; color: var(--ink-2); }
.resp-accepted { color: var(--ok); }
.resp-declined, .resp-withdrawn { color: var(--ink-3); }
.resp-needs_reconfirm { color: var(--red-line); }
.checks.column { flex-direction: column; gap: 0; }
.kind-sitter { color: #26212b; background: var(--butter); }
.event-row.booking { background: color-mix(in srgb, var(--butter) 12%, var(--surface)); }
.schedules-link { display: flex; align-items: center; justify-content: space-between; gap: 12px; text-decoration: none; color: inherit; margin: 6px 0 4px; }
.schedules-link .chev { font: 700 26px var(--round); color: var(--ink-3); }

/* ---------- inbox ---------- */
.inbox { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 8px; }
.inbox-item {
  width: 100%; text-align: left; display: grid; gap: 2px; padding: 14px 16px 14px 18px; border: 0; border-radius: 18px;
  background: var(--surface); color: inherit; cursor: pointer; box-shadow: 0 0 0 1px var(--line); position: relative;
}
.inbox-item .ib-title { font-weight: 650; }
.inbox-item .ib-body { color: var(--ink-2); font-size: 15px; }
.inbox-item .ib-time { color: var(--ink-3); font-size: 13px; }
.inbox-item.unread .ib-title { font-weight: 850; }
.inbox-item.unread::before { content: ""; position: absolute; left: 7px; top: 20px; width: 7px; height: 7px; border-radius: 50%; background: var(--sauce); }
.push-card h2 { font-size: 18px; margin-bottom: 6px; }
.push-card.on { border-color: color-mix(in srgb, var(--ok) 40%, var(--line)); }
.toggles { margin-top: 14px; }

/* ---------- tab badge ---------- */
.tab-icon { position: relative; display: inline-flex; }
.tab-badge {
  position: absolute; top: -2px; right: 6px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px;
  background: var(--sauce); color: #fff; font: 800 11px/18px var(--round); text-align: center;
}
a.primary { text-align: center; }

/* ---------- home ---------- */
.home-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.home-head h1 { font-size: 30px; padding-bottom: 12px; background: var(--squiggle) left bottom / 96px 10px no-repeat; }
.home-date { font: 700 15px var(--text); color: var(--ink-2); margin: 0 0 2px; }
.icon-btn {
  flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 999px;
  background: var(--surface); color: var(--ink-2); box-shadow: 0 0 0 1px var(--line); margin-top: 4px;
}
.nudges { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.nudge {
  display: grid; grid-template-columns: 1fr auto; column-gap: 10px; align-items: center; padding: 14px 16px 14px 20px;
  border-radius: 20px; background: var(--surface); color: inherit; text-decoration: none; position: relative; overflow: hidden;
  box-shadow: 0 0 0 1px var(--line);
}
.nudge::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 6px; background: var(--sky); }
.nudge.tone-ask::before { background: var(--sauce); }
.nudge.tone-warn::before { background: var(--butter); }
.nudge-text { font-weight: 800; grid-column: 1; }
.nudge-detail { grid-column: 1; font-size: 14px; color: var(--ink-2); }
.nudge .chev { grid-column: 2; grid-row: 1 / span 2; font: 700 24px var(--round); color: var(--ink-3); }
.nudge:active { transform: scale(0.99); }

/* Today wears the same butter sticker as today in the calendar. */
.today-card .section-head h2 {
  font-size: 18px; font-weight: 850; background: var(--butter); color: #26212b;
  padding: 5px 14px; border-radius: 999px; margin-bottom: 10px;
}
.quiet-day { background: var(--surface); border-radius: 20px; padding: 18px; box-shadow: 0 0 0 1px var(--line); }
.quiet-title { font: 800 18px var(--round); margin: 0 0 2px; }
.quiet-day .link { text-align: left; min-height: 0; }

.kid-counts { list-style: none; margin: 4px 0 12px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.kid-counts li {
  display: inline-flex; align-items: center; gap: 7px; padding: 6px 6px 6px 12px; border-radius: 999px;
  background: var(--surface); box-shadow: 0 0 0 2px color-mix(in srgb, var(--kid) 35%, transparent); font-weight: 750;
}
.kid-counts .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--kid); }
.kid-counts b {
  min-width: 26px; height: 26px; display: grid; place-items: center; border-radius: 999px; padding: 0 6px;
  background: color-mix(in srgb, var(--kid) 16%, var(--surface)); font: 850 14px var(--round); font-variant-numeric: tabular-nums;
}
.mini-day { margin-top: 12px; }
.mini-day-head { font: 850 16px var(--round); margin: 0 0 6px; }
.mini-day-head .muted { font: 600 14px var(--text); margin-left: 4px; }
.mini-list { list-style: none; margin: 0; padding: 0; background: var(--surface); border-radius: 20px; box-shadow: 0 0 0 1px var(--line); overflow: hidden; }
.mini-list li + li { border-top: 1px solid var(--line); }
.mini-row {
  display: grid; grid-template-columns: 70px auto 1fr auto; align-items: center; gap: 10px; width: 100%;
  padding: 11px 14px; border: 0; background: none; color: inherit; text-align: left; cursor: pointer;
}
.mini-row:active { background: var(--sky-soft); }
.mini-time { font: 850 16px var(--round); font-variant-numeric: tabular-nums; white-space: nowrap; }
.mini-time small { font-size: 10px; color: var(--ink-2); }
.mini-dots { display: flex; flex-direction: column; gap: 3px; }
.mini-dots i { width: 9px; height: 9px; border-radius: 50%; display: block; }
.mini-what { display: grid; min-width: 0; }
.mini-who { font-size: 13px; font-weight: 800; color: var(--ink-2); }
.mini-title { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-row.off .mini-title, .mini-row.off .mini-time { text-decoration: line-through; color: var(--ink-3); }

.shortcuts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.shortcut {
  display: flex; align-items: center; gap: 10px; padding: 12px; border: 0; border-radius: 18px; min-height: 60px;
  background: var(--surface); color: var(--ink); font-weight: 800; font-size: 15px; line-height: 1.2; text-decoration: none; text-align: left; cursor: pointer;
  box-shadow: 0 0 0 1px var(--line);
}
.shortcut:last-child:nth-child(odd) { grid-column: 1 / -1; }
.shortcut:active { transform: scale(0.98); }
.sc-icon {
  flex: none; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 12px;
  background: var(--sky-soft); color: var(--blue-line); font-size: 18px; font-weight: 800;
}

.new-here { background: var(--sky-soft); border-radius: 16px; padding: 12px 14px; font-size: 15px; font-weight: 600; margin: 4px 0 14px; }

/* ---------- impact-report theme layer ---------- */
/* Headings: wide, tracked caps in navy (like "PROTECTING OUR PLANET"). */
h1 { font-size: 26px; font-weight: 800; letter-spacing: 0.07em; text-transform: uppercase; line-height: 1.12; }
h2 { font-size: 15px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; }
h3 { letter-spacing: 0.02em; }
.group-title { font-size: 13px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--sauce); margin-bottom: 10px; }
.page-head h1, .cal-head h1, .page > h1 { padding-bottom: 14px; background-size: 92px 9px; }
.cal-head h1 { font-size: 24px; }
.lede, .new-here { font-family: var(--serif); }
.lede { font-style: italic; font-size: 20px; color: var(--ink-2); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Logo lockup: GP mark beside FAMILY / GAME PLAN. */
.lockup { display: inline-flex; align-items: center; gap: 12px; }
.gp-mark { flex: none; display: block; }
.lockup-words { display: grid; line-height: 1; font-family: var(--round); text-transform: uppercase; }
.lockup-family { color: var(--sauce); font-weight: 700; letter-spacing: 0.32em; font-size: 12px; margin-bottom: 5px; }
.lockup-gp { color: var(--boards); font-weight: 800; letter-spacing: 0.1em; font-size: 22px; }
.lockup-sm { gap: 9px; }
.lockup-sm .lockup-family { font-size: 9px; margin-bottom: 3px; }
.lockup-sm .lockup-gp { font-size: 16px; }
.lockup-lg { gap: 14px; }
.lockup-lg .lockup-family { font-size: 14px; margin-bottom: 7px; }
.lockup-lg .lockup-gp { font-size: 31px; }
:root[data-theme="dark"] .gp-mark rect { fill: #cfdfea; }

/* Sign in */
.signin { padding-top: calc(env(safe-area-inset-top) + 10vh); }
.signin .lockup { margin-bottom: 22px; }
.new-here { background: var(--oat); color: var(--ink); font-size: 16px; font-weight: 500; }
:root[data-theme="dark"] .new-here { background: var(--sky-soft); }

/* Buttons and controls */
.primary { background: var(--boards); color: var(--ice); box-shadow: 0 3px 0 var(--sky); font-weight: 700; letter-spacing: 0.02em; }
.primary:active { box-shadow: 0 1px 0 var(--sky); }
:root[data-theme="dark"] .primary { background: var(--sauce); color: #1b1410; box-shadow: 0 3px 0 color-mix(in srgb, var(--sauce) 55%, #000); }
.secondary { border-color: var(--sky); }
.panel { border-color: var(--line); }
input:not([type="checkbox"]):not([type="radio"]), select, textarea { border-color: var(--line); }
input:focus-visible, select:focus-visible, textarea:focus-visible { border-color: var(--sky); outline-color: var(--sky); }
.check input { accent-color: var(--sauce); }

/* Tags and stickers */
.kind { letter-spacing: 0.04em; }
.kind-game { background: var(--sauce); color: #fff; }
.kind-practice { background: var(--sky-soft); color: var(--boards); }
.kind-sitter { background: var(--butter); color: #2b2412; }
.day-head .dow { font-family: var(--round); font-size: 14px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; background: var(--sky-soft); color: var(--boards); }
.day.today .day-head .dow, .today-card .section-head h2 { background: var(--butter); color: #2b2412; }
.today-card .section-head h2 { font-size: 14px; letter-spacing: 0.12em; }
.day-head .date { font-family: var(--serif); font-style: italic; font-weight: 500; }

/* Tab bar */
.tabbar a.on { color: var(--boards); }
.tabbar a.on svg { background: var(--sky-soft); }
.tab-badge { background: var(--sauce); }

/* Home: report-style header, serif greeting, dotted journey through the week */
.home-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.home-date { font: 800 12px var(--round); letter-spacing: 0.16em; text-transform: uppercase; color: var(--sauce); margin: 0 0 6px; }
.home-head { display: block; margin-bottom: 4px; }
.home-head h1 { font-family: var(--serif); font-style: italic; text-transform: none; letter-spacing: 0; font-weight: 600; font-size: 30px; padding-bottom: 14px; background-size: 92px 9px; }
.nudge.tone-ask::before { background: var(--sauce); }
.nudge.tone-warn::before { background: var(--butter); }
.nudge::before { background: var(--sky); }
.kid-counts li { font-family: var(--round); font-weight: 700; }
.week-path { position: relative; padding-left: 22px; }
.week-path::before {
  content: ""; position: absolute; left: 6px; top: 10px; bottom: 18px;
  border-left: 2.5px dotted var(--sky);
}
.mini-day { position: relative; }
.mini-day::before {
  content: ""; position: absolute; left: -21px; top: 4px; width: 12px; height: 12px; border-radius: 50%;
  background: var(--dot, var(--sky)); box-shadow: 0 0 0 3px var(--ice);
}
.mini-day-head { font-family: var(--round); font-size: 13px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--boards); }
.mini-day-head .muted { font-family: var(--serif); font-style: italic; font-weight: 500; letter-spacing: 0; text-transform: none; font-size: 15px; }
.sc-icon { background: var(--sky-soft); color: var(--boards); }
.shortcut { font-family: var(--round); font-weight: 700; font-size: 14px; letter-spacing: 0.02em; }
.req-when { font-family: var(--round); font-weight: 800; letter-spacing: 0.01em; }
.req-card::before { background: var(--sky); }
.req-card.tone-good::before { background: var(--sage); }
.req-card.tone-warn::before { background: var(--butter); }
.day-head .date, .mini-day-head .muted { text-transform: none; letter-spacing: 0; font-size: 16px; }

/* Soft kid colors: tinted blocks with a solid edge and navy text, so every color stays readable. */
.kid-name { color: color-mix(in srgb, var(--kid) 72%, var(--ink)); }
.wk-block { background: color-mix(in srgb, var(--kid) 30%, var(--surface)); color: var(--ink); box-shadow: inset 4px 0 0 var(--kid); padding-left: 7px; }
.wk-block span { opacity: 0.75; }
.wk-pill { background: color-mix(in srgb, var(--kid) 30%, var(--surface)); color: var(--ink); box-shadow: inset 3px 0 0 var(--kid); }

.event-row .who .kid-name, .mini-who .kid-name { font-weight: 850; }
.kid-amp { color: var(--ink-2); font-weight: 600; }
.kid-counts li { color: color-mix(in srgb, var(--kid) 72%, var(--ink)); }
.kid-counts b { color: var(--ink); }

/* ---------- Home: impact-report layout (design option 5) ---------- */
.home-band {
  position: relative; background: #cfdfea; color: #1e4256;
  margin: calc(-1 * (env(safe-area-inset-top) + 18px)) -18px 0;
  padding: calc(env(safe-area-inset-top) + 18px) 22px 44px;
}
.band-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.band-brand { font: 800 11px var(--round); letter-spacing: 0.3em; text-transform: uppercase; color: #c44a30; }
.home-band .icon-btn { background: rgba(255,255,255,0.55); color: #1e4256; box-shadow: none; margin: 0; }
.home-band h1 {
  font-family: var(--serif); font-style: italic; font-weight: 500; text-transform: none; letter-spacing: 0;
  font-size: 32px; line-height: 1.1; color: #1e4256; padding: 0; background: none; max-width: 240px;
}
.home-band .home-date { font: 700 12px var(--round); letter-spacing: 0.14em; text-transform: uppercase; color: #3c5a70; margin: 10px 0 0; }
.stat-blob {
  position: absolute; right: 18px; bottom: -34px; width: 104px; height: 96px; z-index: 1;
  background: var(--sauce); color: #fbf5ea; border-radius: 52% 48% 55% 45% / 50% 55% 45% 50%;
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
}
.stat-blob b { font: 800 34px/1 var(--round); font-variant-numeric: tabular-nums; }
.stat-blob span { font: 700 10px/1.2 var(--round); letter-spacing: 0.06em; text-transform: uppercase; margin-top: 2px; }
.band-wave { display: block; width: calc(100% + 36px); height: 18px; margin: -1px -18px 0; fill: #cfdfea; }
:root[data-theme="dark"] .home-band, :root[data-theme="dark"] .band-wave { background: #233a4d; }
:root[data-theme="dark"] .band-wave { background: none; fill: #233a4d; }
:root[data-theme="dark"] .home-band h1, :root[data-theme="dark"] .home-band .home-date { color: #f1ebe0; }
:root[data-theme="dark"] .band-brand { color: var(--sauce); }
:root[data-theme="dark"] .home-band .icon-btn { background: rgba(255,255,255,0.1); color: #f1ebe0; }

.home-filter {
  display: inline-grid; grid-auto-flow: column; gap: 4px; padding: 4px; margin-top: 18px;
  background: var(--surface); border: 1.5px solid var(--line); border-radius: 999px;
}
.home-filter button {
  border: 0; background: none; min-height: 38px; padding: 0 16px; border-radius: 999px; cursor: pointer;
  font: 700 13px var(--round); letter-spacing: 0.04em; color: var(--ink-2);
}
.home-filter button.on { background: var(--boards); color: var(--ice); }
:root[data-theme="dark"] .home-filter button.on { background: var(--sauce); color: #1b1410; }

.today-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.today-row {
  width: 100%; display: flex; gap: 14px; align-items: center; text-align: left; cursor: pointer; color: inherit;
  background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 14px 16px;
}
.today-row:active { transform: scale(0.99); }
.today-row.booking { background: color-mix(in srgb, var(--butter) 12%, var(--surface)); }
.today-time { display: flex; flex-direction: column; width: 58px; flex: none; font-family: var(--round); }
.today-time b { font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.05; }
.today-time small { font-size: 11px; font-weight: 700; color: var(--ink-3); }
.today-what { display: grid; gap: 2px; min-width: 0; }
.today-who { font-weight: 800; font-size: 14px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.today-title { font-size: 16px; font-weight: 500; }
.today-where { font-family: var(--serif); font-style: italic; font-size: 14px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.today-row.off .today-title, .today-row.off .today-time b { text-decoration: line-through; color: var(--ink-3); }
.game-pill, .sitter-pill {
  font: 800 10px var(--round); letter-spacing: 0.08em; text-transform: uppercase; border-radius: 999px; padding: 3px 8px;
  background: var(--sauce); color: #fff; margin-left: 4px; vertical-align: 1px; white-space: nowrap;
}
.sitter-pill { background: var(--butter); color: #2b2412; }

.journey { list-style: none; margin: 4px 0 0; padding: 0 0 0 26px; position: relative; display: grid; gap: 16px; }
.journey::before { content: ""; position: absolute; left: 7px; top: 8px; bottom: 10px; border-left: 2.5px dotted var(--sky); }
.journey-day { position: relative; }
.journey-day::before {
  content: ""; position: absolute; left: -26px; top: 2px; width: 16px; height: 16px; border-radius: 50%;
  background: var(--dot); box-shadow: 0 0 0 3px var(--ice);
}
.journey-head { margin: 0 0 4px; font: 800 12px var(--round); letter-spacing: 0.12em; text-transform: uppercase; color: var(--boards); }
.journey-date { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: 0; text-transform: none; font-size: 15px; color: var(--ink-2); margin-left: 4px; }
.journey-list { list-style: none; margin: 0; padding: 0; }
.journey-row {
  width: 100%; display: flex; justify-content: space-between; align-items: baseline; gap: 10px; text-align: left;
  border: 0; background: none; color: inherit; padding: 7px 0; min-height: 40px; cursor: pointer; font-size: 15px;
}
.journey-row + .journey-row, .journey-list li + li .journey-row { border-top: 1px dashed var(--line); }
.journey-what { min-width: 0; }
.journey-what .kid-name { font-weight: 800; }
.journey-time { flex: none; font: 700 14px var(--round); font-variant-numeric: tabular-nums; color: var(--ink-2); }
.journey-row.off .journey-title { text-decoration: line-through; color: var(--ink-3); }

/* ---------- Home: one clear card per day ---------- */
.days { display: grid; gap: 22px; margin-top: 22px; }
.day-label { display: flex; align-items: baseline; gap: 10px; margin: 0 0 8px; text-transform: none; letter-spacing: 0; }
.day-name { font: 800 14px var(--round); letter-spacing: 0.12em; text-transform: uppercase; color: var(--boards); }
.is-today .day-name { background: var(--butter); color: #2b2412; padding: 4px 12px; border-radius: 999px; }
.day-date { font-family: var(--serif); font-style: italic; font-weight: 400; font-size: 16px; color: var(--ink-2); }
.day-link { margin-left: auto; font-size: 15px; min-height: 0; padding: 0; text-transform: none; letter-spacing: 0; }
.day-card { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; overflow: hidden; }
.day-card li + li { border-top: 1px solid var(--line); }
.day-empty { margin: 0; padding: 14px 16px; background: var(--surface); border: 1px dashed var(--line); border-radius: 20px; color: var(--ink-2); font-size: 15px; }
.drow {
  width: 100%; display: grid; grid-template-columns: 62px 4px 1fr; gap: 12px; align-items: stretch;
  padding: 13px 14px; border: 0; background: none; color: inherit; text-align: left; cursor: pointer;
}
.drow:active { background: var(--sky-soft); }
.drow.booking { background: color-mix(in srgb, var(--butter) 12%, var(--surface)); }
.drow-time { display: flex; flex-direction: column; font-family: var(--round); text-align: right; padding-top: 1px; }
.drow-time b { font-size: 19px; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.1; white-space: nowrap; }
.drow-time small { font-size: 11px; font-weight: 700; color: var(--ink-3); }
.drow-stripe { border-radius: 999px; background: var(--stripe); }
.drow-what { display: grid; gap: 1px; min-width: 0; }
.drow-who { display: flex; align-items: center; gap: 6px; font-size: 14px; }
.drow-who .kid-name { font-weight: 800; }
.drow-title { font-size: 16px; font-weight: 500; line-height: 1.3; }
.drow-where { font-size: 13px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.drow.off .drow-title, .drow.off .drow-time b { text-decoration: line-through; color: var(--ink-3); }
.game-pill, .sitter-pill { margin-left: 0; }
/* Logo on the Home header: cream tile so the mark stands off the powder-blue band. */
.home-band .band-top { margin-bottom: 20px; }
.home-band .gp-mark rect { fill: #fbf5ea; }
:root[data-theme="dark"] .home-band .lockup-gp { color: #f1ebe0; }

/* Kid name lists stay one wrapping line of text, never split into flex items. */
.kid-names { display: inline; white-space: normal; }
.kid-names > span { white-space: nowrap; }
.kid-amp { font-weight: 600; color: var(--ink-2); }
/* Kid dots, names and family name flow as one line of text that wraps naturally. */
.req-who, .who-line, .detail .who-line { display: block; line-height: 1.45; }
.req-who > .kid-dots, .who-line > .kid-dots { display: inline-flex; vertical-align: -1px; margin-right: 8px; }
.req-who > .muted, .who-line > .muted { white-space: nowrap; }
/* "Event" (school concerts, Grandparents Day…): sage tag so it stands apart from games and practices. */
.kind-other { background: color-mix(in srgb, var(--sage) 22%, var(--surface)); color: color-mix(in srgb, var(--sage) 55%, var(--ink)); border-color: transparent; padding-left: 9px; }
.event-pill {
  font: 800 10px var(--round); letter-spacing: 0.08em; text-transform: uppercase; border-radius: 999px; padding: 3px 8px;
  background: var(--sage); color: #fff; white-space: nowrap; vertical-align: 1px;
}
/* Event tag: navy outline, so it never reads as a kid color. */
.event-pill { background: transparent; color: var(--boards); box-shadow: inset 0 0 0 1.5px var(--boards); }
.kind-other { background: transparent; color: var(--boards); box-shadow: inset 0 0 0 1.5px var(--boards); padding-left: 9px; }
.ok-note { margin: 0; padding: 10px 14px; border-radius: 14px; background: color-mix(in srgb, var(--ok) 14%, var(--surface)); color: color-mix(in srgb, var(--ok) 70%, var(--ink)); font-weight: 600; }

/* ---------- "Showing" filter (families and kids), shared by Home and Calendar ---------- */
.who { display: grid; gap: 8px; margin-top: 16px; }
.who-row { margin: 0; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.who-row::-webkit-scrollbar { display: none; }
.who-row .chip { flex: none; }
.chip.fam { background: var(--surface); color: var(--boards); box-shadow: inset 0 0 0 1.5px var(--line); font-weight: 700; }
.chip.fam.on { background: var(--boards); color: var(--ice); box-shadow: none; }
.who-summary {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  margin: 12px 0 0; padding: 10px 14px; border-radius: 14px; font-size: 14px;
  background: var(--sky-soft); color: var(--boards);
}
.who-summary .link { min-height: 0; padding: 0; font-size: 14px; }
.home .home-filter { margin-top: 12px; }
.cal-filters { margin-top: 10px; }
.who-row { flex-wrap: wrap; overflow: visible; }
.home .who { margin-top: 46px; } /* clear the coral "this week" blob */
