:root {
  /* Neutral: lavender-tinted. Accent: one grape, for actions, selection and saved items only
     (deeper grape for accent text, which needs 4.5:1 on the pale grape fill).
     Status colors (green, amber, red) carry meaning and are used for nothing else. */
  --bg: #fdf6ff;
  --card: #ffffff;
  --ink: #2a1f47;
  --on-ink: #ffffff;
  --soft: #6e6488;
  --line: #eee7f6;
  --border-control: #8a80a6;
  --brand: #7b4dff;
  --brand-deep: #6a3df0;
  --on-accent: #ffffff;
  --accent-bg-subtle: #efe8ff;
  --accent-text: #6a3df0;
  --accent-border: #d9cbff;
  --logo-1: #ff5fa2; --logo-2: #ffd84d; --logo-3: #47b8ff; /* the three bars in the logo, decoration only */
  --shadow-color: #eadff7;
  --go: #047857;   --go-bg: #ecfdf5;
  --check: #92400e; --check-bg: #fffbeb;
  --maybe: #334155; --maybe-bg: #f1f5f9;
  --muted: #475569; --muted-bg: #f1f5f9;
  --gap: #b91c1c;  --gap-bg: #fef2f2;
  --radius: 22px;
  --shadow: 0 4px 0 var(--shadow-color); /* the flat, chunky drop shadow from mockup 3 */
  --tabbar-height: calc(84px + env(safe-area-inset-bottom));
  --round: "Fredoka", ui-rounded, system-ui, sans-serif;
  font-family: "Nunito", ui-rounded, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-weight: 500;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  /* Keep focused controls clear of the fixed bottom tab bar on phones. */
  scroll-padding-block-end: var(--tabbar-height);
}

/* Fredoka for headings, Nunito for text, served from site/fonts (SIL Open Font License, see the OFL files there). */
@font-face { font-family: "Fredoka"; font-weight: 600; font-display: swap; src: url("fonts/fredoka-600.ttf") format("truetype"); }
@font-face { font-family: "Nunito"; font-weight: 500; font-display: swap; src: url("fonts/nunito-500.ttf") format("truetype"); }
@font-face { font-family: "Nunito"; font-weight: 800; font-display: swap; src: url("fonts/nunito-800.ttf") format("truetype"); }

* { box-sizing: border-box; }
[hidden] { display: none !important; }
/* Column layout so the footer sits at the bottom of short pages instead of mid-screen. */
body { margin: 0; min-height: 100dvh; display: flex; flex-direction: column; }
body[data-mode="app"] { padding-bottom: var(--tabbar-height); }
.top, main, .foot { width: 100%; }
main { flex: 1; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3, .camp-name { font-family: var(--round); font-weight: 600; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }

/* Header + tabs (tabs dock to the bottom on phones) */
.top { padding: 18px 20px 8px; max-width: 1100px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; gap: 12px; }
.logo { display: flex; gap: 3px; }
.logo i { width: 0.875rem; height: 1.875rem; border-radius: 8px; }
.logo i:nth-child(1) { background: var(--logo-1); transform: rotate(-12deg); }
.logo i:nth-child(2) { background: var(--logo-2); }
.logo i:nth-child(3) { background: var(--logo-3); transform: rotate(12deg); }
.brand h1 { font-size: 1.125rem; line-height: 1.2; letter-spacing: -.01em; }
.brand p { color: var(--soft); font-size: 0.875rem; }
.tabs { position: fixed; z-index: 10; left: 0; right: 0; bottom: 0; display: flex; background: rgba(255, 255, 255, .96); backdrop-filter: blur(10px); border-top: 1px solid var(--line); padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); }
.tabs :is(button, a) { flex: 1; color: inherit; text-decoration: none; border: 0; background: none; padding: 8px 4px; border-radius: 14px; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 1.25rem; line-height: 1.2; position: relative; }
.tabs :is(button, a) .label { font-size: 0.75rem; font-weight: 600; color: var(--soft); }
.tabs :is(button, a)[aria-current="page"] { background: var(--accent-bg-subtle); }
.tabs :is(button, a)[aria-current="page"] .label { color: var(--accent-text); }
.account { display: flex; align-items: center; gap: 8px; font-size: 0.875rem; color: var(--soft); min-width: 0; white-space: nowrap; }
.account .who { display: none; } /* phones: just "Sign out"; the email shows from 760px up */
.account .ghost { padding: 6px 14px; }
#account-email { display: inline-block; max-width: 18ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }
.count { position: absolute; top: 2px; right: calc(50% - 26px); background: var(--brand); color: var(--on-accent); font-size: 0.6875rem; min-width: 18px; height: 18px; border-radius: 9px; display: grid; place-items: center; padding: 0 5px; font-variant-numeric: tabular-nums; }

@media (min-width: 760px) {
  :root { scroll-padding-block-end: 0; }
  body[data-mode="app"] { padding-bottom: 0; }
  .tabs { position: static; background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 4px; gap: 4px; box-shadow: var(--shadow); }
  .tabs :is(button, a) { flex-direction: row; font-size: 1rem; padding: 8px 16px; border-radius: 999px; gap: 6px; }
  .tabs :is(button, a) .label { font-size: 0.9375rem; white-space: nowrap; }
  .tabs :is(button, a)[aria-current="page"] { background: var(--brand); }
  .tabs :is(button, a)[aria-current="page"] .label { color: var(--on-accent); }
  .count { position: static; }
  .account .who { display: inline; }
  .brand h1 { font-size: 1.375rem; }
}

main { max-width: 1100px; margin: 0 auto; padding: 8px 20px 24px; }
.view { max-width: 760px; } /* one readable column, left-aligned with the header and footer */

/* "Next up" banner */
.next { background: linear-gradient(135deg, var(--brand), var(--brand-deep)); color: var(--on-accent); border-radius: var(--radius); padding: 18px 20px; margin: 8px 0 16px; box-shadow: var(--shadow); }
.next small { font-weight: 600; text-transform: uppercase; letter-spacing: .06em; font-size: 0.75rem; }
.next h2 { font-size: 1.25rem; line-height: 1.25; margin: 4px 0 2px; }

/* Filters */
.filters { display: grid; gap: 10px; margin: 8px 0 12px; }
.search input { width: 100%; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--border-control); background: var(--card); font-size: 1.0625rem; box-shadow: var(--shadow); }
.row { display: flex; gap: 8px; flex-wrap: wrap; }
.row select, .chip { padding: 10px 14px; border-radius: 999px; background: var(--card); font-size: 1rem; }
.row select { border: 1px solid var(--border-control); }
.chip { border: 1px solid var(--line); display: inline-flex; align-items: center; gap: 6px; cursor: pointer; user-select: none; }
.chip input { accent-color: var(--brand); width: 18px; height: 18px; margin: 0; }
.chip:has(input:checked) { background: var(--accent-bg-subtle); border-color: var(--accent-border); color: var(--accent-text); font-weight: 600; }
.results { color: var(--soft); font-size: 0.875rem; margin: 4px 2px 10px; }

/* Camp rows */
.group { margin-bottom: 18px; }
.group-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 2px 8px; }
.group-head h3 { font-size: 0.8125rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--soft); }
.group-head .n { font-weight: 600; font-variant-numeric: tabular-nums; }
.group-head .ghost { flex: none; padding: 6px 14px; font-size: 0.875rem; white-space: nowrap; }
.camp-list { list-style: none; padding: 0; margin: 0; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); }
.camp + .camp { border-top: 1px solid var(--line); }
.camp-row { display: flex; align-items: center; }
.camp-toggle { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; padding: 10px 4px 10px 12px; border: 0; background: none; text-align: start; border-radius: var(--radius); }
.cal { flex: none; width: 48px; text-align: center; border-radius: 10px; padding: 4px 0; line-height: 1.15; font-variant-numeric: tabular-nums; }
.cal small { display: block; font-size: 0.6875rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.cal b { display: block; font-size: 1.0625rem; }
.camp-text { min-width: 0; display: grid; }
.camp-name { font-weight: 650; overflow-wrap: anywhere; }
.camp-meta { color: var(--soft); font-size: 0.8125rem; }
.camp-meta .fast { color: var(--ink); font-weight: 600; white-space: nowrap; }
.heart { flex: none; width: 48px; height: 48px; margin-inline-end: 4px; border: 0; background: none; border-radius: 50%; font-size: 1.5rem; line-height: 1; color: var(--soft); }
.heart[aria-pressed="true"] { color: var(--brand); }
.camp.saved { background: var(--accent-bg-subtle); }
.camp:first-child, .camp:first-child .camp-toggle { border-start-start-radius: var(--radius); border-start-end-radius: var(--radius); }
.camp:last-child { border-end-start-radius: var(--radius); border-end-end-radius: var(--radius); }
.camp-detail { display: grid; gap: 10px; padding: 0 16px 14px 72px; }
.meta { color: var(--soft); font-size: 0.875rem; }
.reg { border-radius: 12px; padding: 10px 12px; display: grid; gap: 2px; font-size: 0.875rem; }
.reg strong { font-size: 0.9375rem; }
.tone-go { background: var(--go-bg); color: var(--go); }
.tone-check { background: var(--check-bg); color: var(--check); }
.tone-maybe { background: var(--maybe-bg); color: var(--maybe); }
.tone-muted { background: var(--muted-bg); color: var(--muted); }
.reg a { color: inherit; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.btn { border: 1px solid var(--line); background: var(--card); padding: 9px 14px; border-radius: 999px; font-size: 0.875rem; font-weight: 600; text-decoration: none; color: var(--ink); display: inline-flex; align-items: center; gap: 6px; }
.primary { background: var(--brand); color: var(--on-accent); border: 0; padding: 12px 18px; border-radius: 999px; font-weight: 700; box-shadow: var(--shadow); }
.ghost { background: none; border: 1px solid var(--line); padding: 10px 16px; border-radius: 999px; font-weight: 600; }

/* My list */
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 12px; flex-wrap: wrap; margin: 10px 0 16px; }
.section-head h2 { font-size: 1.375rem; line-height: 1.25; }
.section-head p { color: var(--soft); }
.empty { text-align: center; padding: 40px 16px; color: var(--soft); display: grid; gap: 12px; justify-items: center; }
.empty .big { font-size: 2.5rem; }

/* Summer plan */
.start { display: grid; gap: 4px; font-size: 0.8125rem; color: var(--soft); font-weight: 600; }
.start input { padding: 8px 10px; border-radius: 10px; border: 1px solid var(--border-control); background: var(--card); font-size: 1rem; color: var(--ink); }
.kids { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.kids button { border: 1px solid var(--line); background: var(--card); padding: 8px 14px; border-radius: 999px; font-weight: 600; }
.kids button[aria-pressed="true"] { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }
.kids input { padding: 8px 14px; border-radius: 999px; border: 1px solid var(--border-control); font-weight: 600; }
.meter { background: var(--card); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); margin-bottom: 12px; display: grid; gap: 8px; }
.bar { height: 10px; border-radius: 5px; background: var(--gap-bg); overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--go); border-radius: 5px; }
.weeks { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.weeks li { background: var(--card); border-radius: 14px; padding: 12px 14px; display: grid; grid-template-columns: 110px 1fr; gap: 12px; align-items: center; border-left: 5px solid var(--go); box-shadow: var(--shadow); }
.weeks li.gap { border-left-color: var(--gap); background: var(--gap-bg); }
.weeks .wk { font-weight: 700; font-size: 0.875rem; }
.weeks .wk small { display: block; color: var(--soft); font-weight: 500; }
.weeks select { width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--border-control); background: var(--card); font-size: 1rem; }
.hint { color: var(--soft); font-size: 0.875rem; }

.foot { max-width: 1100px; margin: 0 auto; padding: 8px 20px 28px; color: var(--soft); font-size: 0.8125rem; display: grid; gap: 2px; }
.tab-heart { color: var(--brand); }

/* Which screen shows: the app (signed in or out), the sign-in screen, or the profile step. */
body:not([data-mode="app"]) :is(.tabs, .view, #updated) { display: none !important; }
body:not([data-mode="landing"]) #landing,
body:not([data-mode="profile"]) #profile-step { display: none; }

/* Sign-in screen, profile step, and the signed-out intro */
.intro { display: grid; gap: 6px; margin-bottom: 16px; }
.landing { max-width: 560px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; padding-block: 12px 24px; }
.hero-title { font-size: 1.875rem; line-height: 1.15; letter-spacing: -.02em; text-wrap: balance; }
.hero-sub { color: var(--soft); font-size: 1.0625rem; text-wrap: pretty; }
.signup { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; display: grid; gap: 12px; }
.google { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 12px 18px; border-radius: 999px; border: 1px solid var(--border-control); background: var(--card); color: var(--ink); font-weight: 700; text-decoration: none; }
.google .g { font-weight: 800; color: var(--brand); }
.or { display: flex; align-items: center; gap: 10px; color: var(--soft); font-size: 0.875rem; }
.or::before, .or::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
.field-form { display: grid; gap: 8px; }
.field-form label { font-weight: 600; font-size: 0.9375rem; }
.field-form input { padding: 12px 14px; border-radius: 12px; border: 1px solid var(--border-control); background: var(--card); font-size: 1rem; }
.field-form input[aria-invalid="true"] { border-color: var(--gap); }
.field-form .primary { margin-top: 4px; }
.field-msg { font-size: 0.875rem; }
.field-msg.error { color: var(--gap); }
.linklike { border: 0; background: none; padding: 0; color: var(--brand); font-weight: 600; text-decoration: underline; }

/* Summer / School breaks switch on the Find tab */
.term { display: inline-flex; gap: 4px; padding: 4px; margin: 0 0 12px; border-radius: 999px; background: var(--line); }
.term button { border: 0; border-radius: 999px; padding: 8px 16px; font: inherit; font-weight: 600; background: transparent; color: inherit; cursor: pointer; }
.term button[aria-pressed="true"] { background: var(--card); color: var(--accent-text); box-shadow: var(--shadow); }


/* School breaks: the countdown line, then one chip per break (mockup 3's break strip), scrolling sideways on phones */
.countdown { margin: 0 2px 10px; color: var(--soft); }
.countdown b { color: var(--ink); font-weight: 800; }
.break-chips { display: flex; gap: 8px; overflow-x: auto; margin: 0 -20px 12px; padding: 2px 20px 8px; scrollbar-width: none; }
.break-chips button { flex: none; border: 0; background: var(--card); border-radius: var(--radius); padding: 8px 14px; text-align: start; box-shadow: var(--shadow); line-height: 1.3; }
.break-chips b { display: block; font-weight: 800; white-space: nowrap; }
.break-chips small { display: block; color: var(--soft); font-size: 0.8125rem; white-space: nowrap; }
.break-chips button[aria-pressed="true"] { background: var(--ink); color: var(--on-ink); box-shadow: none; }
.break-chips button[aria-pressed="true"] small { color: var(--on-ink); }

/* A break camp's days, a week per strip */
.days { display: grid; gap: 6px; }
.strip { display: flex; align-items: center; gap: 4px; }
.strip small { width: 3.25rem; color: var(--soft); font-size: 0.75rem; font-weight: 800; }
.strip i { width: 1.625rem; height: 1.625rem; border-radius: 8px; font-style: normal; font-size: 0.6875rem; font-weight: 800; display: grid; place-items: center; background: var(--line); color: var(--soft); }
.strip i.on { background: var(--brand); color: var(--on-accent); }
@media (min-width: 760px) { .break-chips { flex-wrap: wrap; overflow: visible; margin-inline: 0; padding-inline: 0; } }

/* Sign-up days: a timeline of opening days (mockup 7) */
.timeline { display: grid; gap: 14px; }
.stop { display: grid; grid-template-columns: 5.5rem 1fr; gap: 14px; align-items: start; }
.stop .date { border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow); min-height: 5.5rem; display: grid; place-content: center; text-align: center; line-height: 1.1; }
.stop .date small { font-size: 0.75rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--soft); }
.stop .date b { font-family: var(--round); font-weight: 600; font-size: 1.5rem; }
.stop .date.now { background: var(--go-bg); color: var(--go); } .stop .date.now b { font-size: 1.125rem; }
.stop .date.next { background: var(--accent-bg-subtle); color: var(--accent-text); }
.stop .date.guess { background: none; box-shadow: none; border: 2px dashed var(--accent-border); }
.stop .date.quiet { visibility: hidden; }
.stop .box { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 16px; display: grid; gap: 4px; }
.stop .box > p { color: var(--soft); font-size: 0.875rem; }
.stop .box a { color: var(--accent-text); font-weight: 800; }
.stop h3 { font-size: 1.125rem; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.stop ul { list-style: none; padding: 0; margin: 6px 0 0; }
.stop li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-top: 1px solid var(--line); }
.stop li b { font-weight: 800; }
.stop li small { color: var(--soft); white-space: nowrap; font-size: 0.8125rem; }
.tag { font-family: inherit; font-weight: 800; font-size: 0.75rem; padding: 2px 8px; border-radius: 999px; }
.tag.yes { background: var(--go-bg); color: var(--go); }
.tag.site { background: var(--check-bg); color: var(--check); }
.tag.est { background: var(--card); color: var(--soft); border: 1px dashed var(--accent-border); }
@media (max-width: 759px) {
  .stop { grid-template-columns: 1fr; gap: 6px; }
  .stop .date { min-height: 0; display: flex; gap: 8px; align-items: baseline; justify-content: flex-start; padding: 6px 12px; width: max-content; }
  .stop .date.quiet, .stop .date.now { display: none; } /* the box's heading already says it */
  .stop li { flex-direction: column; gap: 2px; }
}

/* Calendar: one break week on a calm Monday–Friday grid (mockup 5) */
.calendar { max-width: 1060px; }
.flip { display: flex; align-items: center; gap: 12px; margin: 10px 0 12px; }
.flip-title { flex: 1; text-align: center; }
.flip-title h2 { font-size: 1.5rem; }
.flip-title p { color: var(--soft); }
.arrow { flex: none; width: 2.75rem; height: 2.75rem; border-radius: 50%; border: 0; background: var(--card); box-shadow: var(--shadow); font-size: 1.5rem; line-height: 1; color: var(--ink); }
.arrow:disabled { opacity: .35; cursor: default; }
.board { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 12px; }
.cal-grid { display: grid; grid-template-columns: minmax(12rem, 2fr) repeat(5, minmax(3rem, 1fr)) minmax(6rem, auto); column-gap: 6px; }
.cal-grid .hd { padding: 6px 4px 10px; text-align: center; display: grid; gap: 2px; border-bottom: 1px solid var(--line); }
.cal-grid .hd .dn { font-size: 0.75rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--soft); }
.cal-grid .hd .dd { font-family: var(--round); font-weight: 600; font-size: 1.375rem; line-height: 1; }
.cal-grid .hd .n { font-size: 0.75rem; color: var(--soft); }
.cal-grid .hd.few .n { color: var(--gap); font-weight: 800; }
.cal-grid .hd.off { color: var(--soft); }
.cal-grid .camp { display: contents; }
.cal-grid .camp > * { padding: 10px 0; border-bottom: 1px solid var(--line); }
.cal-grid .who { display: grid; gap: 2px; padding-inline-end: 8px; }
.cal-grid .who b { font-weight: 800; line-height: 1.3; }
.cal-grid .who small { color: var(--soft); font-size: 0.8125rem; }
.cal-grid .cell { position: relative; }
.cal-grid .cell.on::after { content: ""; position: absolute; inset: 10px 2px; border-radius: 10px; background: var(--accent-bg-subtle); border: 2px solid var(--brand); }
.cal-grid .cell.on.together::after { background: var(--brand); }
.cal-grid .cell.off { background: var(--line); }
.cal-grid .price { font-size: 0.8125rem; color: var(--soft); text-align: end; display: grid; gap: 2px; align-content: start; }
.cal-grid .price a { color: var(--accent-text); font-weight: 800; }
.key { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 10px; color: var(--soft); font-size: 0.8125rem; }
.key span { display: inline-flex; align-items: center; gap: 6px; }
.key i { width: 1rem; height: 1rem; border-radius: 5px; border: 2px solid var(--brand); background: var(--accent-bg-subtle); }
.key i.k-together { background: var(--brand); }
#jump { margin-top: 4px; }
@media (max-width: 759px) {
  .board { padding: 8px; }
  .cal-grid { grid-template-columns: repeat(5, 1fr); }
  .cal-grid .hd.first, .cal-grid .hd.price-h { display: none; }
  .cal-grid .who { grid-column: 1 / -1; border-bottom: 0; padding-bottom: 4px; }
  .cal-grid .cell { min-height: 2.5rem; border-bottom: 0; }
  .cal-grid .price { grid-column: 1 / -1; text-align: start; padding-top: 0; }
}
