:root {
  /* "Kids Zone" feel: cream, butter yellow, sage, golden, sky blue. No red or pink anywhere. */
  --bg: #FEF4D4;            /* cream page */
  --butter: #F4DF90;        /* header band */
  --sage: #669D89;          /* utility bar, footer, borders, decorative */
  --sage-bar: #537F6F;      /* footer bottom bar */
  --olive-deep: #457363;    /* darker sage: headings text, links, primary buttons (white text 5.4:1) */
  --olive-deeper: #3E6B5C;  /* hover */
  --sage-heading: #4A7A68;  /* Pacifico headings on cream (4.5:1) */
  --honey: #EBB749;         /* golden accents: card borders, Top Picks frame */
  --honey-tint: #FDF0C4;
  --sky: #4BBCD7;           /* date chips, secondary buttons (#333 text 5.7:1) */
  --sky-tint: #E3F4F9;
  --olive: #669D89;         /* category pill border */
  --olive-text: #2F5246;    /* category pill text */
  --olive-tint: #E4F0EA;    /* category pill wash */
  --caramel: #EBB749;       /* NEW tags (golden) */
  --caramel-tint: #FCEFC6;
  --card: #FFFFFF;
  --text: #333333;
  --muted: #5E5E5E;
  --on-sage: #14211C;       /* text on #669D89 bands (5.3:1) */
  --line: rgba(51, 51, 51, 0.14);
  --radius: 14px;
  --heading: "Nunito", "Trebuchet MS", sans-serif;          /* card titles stay Nunito */
  --display: "Pacifico", "Trebuchet MS", cursive;           /* site title, section titles, day headings */
  --hand: "Patrick Hand", "Trebuchet MS", sans-serif;       /* badges, tags, filter labels */
  --sans: "Nunito", "Trebuchet MS", sans-serif;
  --flower: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%20100%20100%22%3E%3Cg%20fill%3D%22%23000%22%3E%3Ccircle%20cx%3D%2250%22%20cy%3D%2250%22%20r%3D%2234%22/%3E%3Ccircle%20cx%3D%2280.0%22%20cy%3D%2250.0%22%20r%3D%2220%22/%3E%3Ccircle%20cx%3D%2271.2%22%20cy%3D%2271.2%22%20r%3D%2220%22/%3E%3Ccircle%20cx%3D%2250.0%22%20cy%3D%2280.0%22%20r%3D%2220%22/%3E%3Ccircle%20cx%3D%2228.8%22%20cy%3D%2271.2%22%20r%3D%2220%22/%3E%3Ccircle%20cx%3D%2220.0%22%20cy%3D%2250.0%22%20r%3D%2220%22/%3E%3Ccircle%20cx%3D%2228.8%22%20cy%3D%2228.8%22%20r%3D%2220%22/%3E%3Ccircle%20cx%3D%2250.0%22%20cy%3D%2220.0%22%20r%3D%2220%22/%3E%3Ccircle%20cx%3D%2271.2%22%20cy%3D%2228.8%22%20r%3D%2220%22/%3E%3C/g%3E%3C/svg%3E");
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; font-size: 17px; } /* +1px on every text size: all font sizes are rem-based from this root */
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.5 var(--sans);
}
a { color: var(--olive-deeper); }
a:hover { color: var(--olive-deep); }
:focus-visible { outline: 3px solid var(--honey); outline-offset: 2px; }
[hidden] { display: none !important; }

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip { position: absolute; left: -9999px; top: 8px; background: var(--card); padding: 8px 12px; border-radius: 8px; z-index: 10; }
.skip:focus { left: 8px; }

/* Header */
.site-header { background: var(--olive-deep); color: #fff; padding: 28px 0 22px; }
.brand { font-family: var(--heading); font-weight: 800; font-size: 2rem; line-height: 1.15; margin: 0; letter-spacing: 0.01em; }
.tagline { margin: 6px 0 0; font-size: 1.02rem; opacity: 0.95; }
.week {
  display: inline-block; margin: 14px 0 0; padding: 4px 12px; border-radius: 999px;
  background: var(--honey); color: var(--text); font-weight: 700; font-size: 0.9rem;
}

main { padding-top: 18px; padding-bottom: 32px; }
h2, h3 { font-family: var(--heading); font-weight: 800; color: var(--olive-deep); }
.section-title { font-size: 1.6rem; margin: 34px 0 4px; }
.section-sub { margin: 0 0 14px; color: var(--muted); font-size: 0.95rem; }

/* Buttons */
.btn {
  appearance: none; border: 0; border-radius: 10px; padding: 11px 16px; min-height: 44px;
  font: 700 0.98rem var(--sans); cursor: pointer;
}
.btn-primary { background: var(--olive-deep); color: #fff; }
.btn-primary:hover { background: var(--olive-deeper); }
.btn-primary:disabled { opacity: 0.6; cursor: progress; }
.link-btn {
  appearance: none; background: none; border: 0; padding: 6px 0; min-height: 36px;
  color: var(--olive-deeper); font: 600 0.95rem var(--sans); text-decoration: underline; cursor: pointer;
}

/* Distance box */
.distance {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; box-shadow: 0 1px 2px rgba(51, 51, 51, 0.06);
}
.distance-title { font-size: 1.2rem; margin: 0 0 10px; }
.origin-form { display: flex; flex-wrap: wrap; gap: 8px; }
.origin-form input {
  flex: 1 1 200px; min-width: 0; min-height: 44px; padding: 10px 12px; font: 1rem var(--sans);
  color: var(--text); background: #fff; border: 1.5px solid var(--line); border-radius: 10px;
}
.origin-form input:focus { border-color: var(--olive-deep); }
.origin-form .btn { flex: 0 0 auto; }
.origin-status { margin: 10px 0 0; font-weight: 600; }
.origin-status.is-error { color: var(--text); background: var(--honey-tint); border-left: 4px solid var(--honey); padding: 6px 10px; border-radius: 6px; }
.fine-print { margin: 6px 0 0; color: var(--muted); font-size: 0.85rem; }

.load-error {
  background: var(--honey-tint); border-left: 5px solid var(--honey); padding: 12px 14px;
  border-radius: 8px; font-weight: 600; margin: 18px 0 0;
}

/* Top picks */
.top-picks {
  margin-top: 22px; background: var(--honey-tint); border: 2px solid var(--honey);
  border-radius: var(--radius); padding: 14px 16px 6px;
}
.top-picks h2 { margin: 0 0 8px; font-size: 1.3rem; }
.top-picks ol { margin: 0; padding-left: 1.3em; }
.top-picks li { margin: 0 0 10px; }

/* Day groups (This Week) */
.day { margin: 0 0 8px; }
.day-title {
  font-size: 1.15rem; margin: 22px 0 10px; padding-bottom: 6px;
  border-bottom: 2px solid var(--honey);
}

/* Filters */
.filters {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 12px; margin-bottom: 8px;
}
.cat-buttons { display: flex; flex-wrap: wrap; gap: 8px; overflow: visible; }
.cat-btn {
  appearance: none; cursor: pointer; min-height: 40px; padding: 7px 12px; border-radius: 999px;
  border: 1.5px solid var(--olive); background: var(--olive-tint); color: var(--olive-text);
  font: 700 0.9rem var(--sans); white-space: nowrap; max-width: 100%;
}
.cat-btn[aria-pressed="true"] { background: var(--olive-deep); border-color: var(--olive-deep); color: #fff; }
.cat-btn .count { font-weight: 400; opacity: 0.85; }
.cat-btn .lbl-short { display: none; }
.toggles { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; }
.toggle { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; font-weight: 600; cursor: pointer; }
.toggle input { width: 22px; height: 22px; accent-color: var(--olive-deep); margin: 0; }
.result-count { margin: 8px 0 0; color: var(--muted); font-size: 0.92rem; }

.cat-group-title { font-size: 1.3rem; margin: 26px 0 10px; }
.cat-group-title .count { font-family: var(--sans); font-size: 0.95rem; color: var(--muted); font-weight: 400; }
.empty {
  background: var(--card); border: 1px dashed var(--line); border-radius: var(--radius);
  padding: 18px; text-align: center; color: var(--muted); margin-top: 16px;
}

/* Cards */
.cards { display: grid; grid-template-columns: 1fr; gap: 14px; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px; display: flex; flex-direction: column; gap: 8px; min-width: 0;
  box-shadow: 0 2px 8px rgba(51, 51, 51, 0.08);
}
.card.is-top { border: 2px solid var(--honey); }
.card-head { display: flex; gap: 12px; align-items: flex-start; }
.thumb {
  flex: 0 0 auto; width: 56px; height: 56px; border-radius: 12px; overflow: hidden;
  display: grid; place-items: center; background: var(--honey-tint); color: var(--olive-deep);
  font: 700 1.5rem var(--heading); border: 1px solid var(--line);
}
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-title { font-family: var(--heading); font-weight: 700; font-size: 1.12rem; line-height: 1.3; margin: 0; color: var(--text); overflow-wrap: anywhere; }
.card-subtitle { margin: 2px 0 0; color: var(--muted); font-size: 0.93rem; }
.badges { display: flex; flex-wrap: wrap; gap: 6px; }
.pill {
  display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 0.8rem; font-weight: 700;
  background: var(--olive-tint); border: 1.5px solid var(--olive); color: var(--olive-text);
}
.tag-new { background: var(--caramel-tint); border: 1.5px solid var(--caramel); color: var(--text); border-radius: 6px; padding: 2px 8px; font-size: 0.75rem; font-weight: 800; letter-spacing: 0.05em; }
.tag-allweek { background: var(--olive-tint); border: 1.5px solid var(--olive); color: var(--olive-text); border-radius: 6px; padding: 2px 8px; font-size: 0.75rem; font-weight: 800; }
.tag-top { background: var(--honey); color: var(--text); border-radius: 6px; padding: 2px 8px; font-size: 0.75rem; font-weight: 800; }
.facts { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 3px 10px; font-size: 0.94rem; }
.facts .fact { display: contents; }
.facts dt { font-weight: 700; color: var(--muted); }
.facts dd { margin: 0; overflow-wrap: anywhere; }
.desc { margin: 0; }
.tip, .animals { margin: 0; font-size: 0.92rem; background: var(--bg); border-radius: 8px; padding: 6px 10px; }
.distance-line { margin: 0; font-weight: 700; color: var(--olive-deeper); font-size: 0.95rem; }
.distance-line.is-unknown { color: var(--muted); font-weight: 600; }
.card-foot { display: flex; flex-direction: column; gap: 8px; margin-top: auto; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 4px; }
.action {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 8px 14px;
  border-radius: 10px; font-weight: 700; font-size: 0.95rem; text-decoration: none; flex: 1 1 auto;
}
.action-primary { background: var(--olive-deep); color: #fff; }
.action-primary:hover { background: var(--olive-deeper); color: #fff; }
.action-secondary { border: 1.5px solid var(--olive-deep); color: var(--olive-deeper); background: var(--card); }
.action-secondary:hover { background: var(--bg); }

/* Quick jump links under Top Picks */
.quick-nav { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.quick-link {
  flex: 1 1 220px; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 48px; padding: 10px 16px; border-radius: 12px; font-weight: 800; text-decoration: none;
  border: 1.5px solid var(--olive-deep); color: var(--olive-deep); background: var(--card);
}
.quick-link:hover { background: var(--olive-tint); color: var(--olive-deeper); }
.quick-link-primary { background: var(--olive-deep); color: #fff; }
.quick-link-primary:hover { background: var(--olive-deeper); color: #fff; }
.quick-link-primary span { font-weight: 600; opacity: 0.9; }

/* Sticky search bar for the browse list */
.filter-sticky {
  position: sticky; top: 0; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px;
  background: var(--bg); padding: 8px 0; margin-bottom: 8px; border-bottom: 1px solid var(--line);
}
.search-form { flex: 1 1 240px; display: flex; }
.search-form input {
  flex: 1; min-width: 0; min-height: 44px; padding: 10px 12px; font: 1rem var(--sans); color: var(--text);
  background: #fff; border: 1.5px solid var(--olive); border-radius: 10px;
}
.search-form input:focus { border-color: var(--olive-deep); }
.sticky-count { margin: 0; color: var(--muted); font-size: 0.88rem; font-weight: 600; }
.sticky-top { font-size: 0.88rem; font-weight: 700; color: var(--olive-deep); margin-left: auto; }
.distance-filter select {
  min-height: 40px; padding: 6px 10px; font: 600 0.95rem var(--sans); color: var(--text);
  background: #fff; border: 1.5px solid var(--line); border-radius: 8px;
}
.cat-btn:disabled, .cat-btn.is-empty:not([aria-pressed="true"]) { opacity: 0.45; cursor: not-allowed; }
.toggles + .cat-buttons { margin-top: 10px; }
#browse { scroll-margin-top: 8px; }
/* Phones: compact pills that wrap onto a few rows (no sideways scrolling). */
@media (max-width: 699px) {
  .cat-buttons { gap: 6px 5px; }
  .cat-btn { min-height: 34px; padding: 4px 8px; font-size: 0.78rem; }
  .cat-btn .lbl-full {
    position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
  }
  .cat-btn { position: relative; }
  .cat-btn .lbl-short { display: inline; }
  .filters { padding: 12px 10px; }
}

/* Sort control (Browse) */
.sort-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 14px 0 4px; }
.sort-label { font-weight: 800; font-size: 1.05rem; color: var(--olive-deep); }
.sort-seg {
  display: flex; flex: 0 1 560px; border: 2px solid var(--olive-deep); border-radius: 14px; overflow: hidden;
  background: var(--card);
}
.sort-btn {
  appearance: none; flex: 1 1 0; min-height: 50px; padding: 8px 10px; border: 0; margin: 0; cursor: pointer;
  background: var(--card); color: var(--olive-deep); font: 800 1rem var(--sans); line-height: 1.15;
}
.sort-btn + .sort-btn { border-left: 2px solid var(--olive-deep); }
.sort-btn:hover { background: var(--olive-tint); }
.sort-btn[aria-pressed="true"] { background: var(--olive-deep); color: #fff; }
.sort-btn:focus-visible { outline: 3px solid var(--honey); outline-offset: -3px; }
@media (max-width: 699px) {
  .sort-bar { flex-direction: column; align-items: stretch; gap: 6px; }
  .sort-seg { flex: 1 1 auto; width: 100%; }
  .sort-btn { font-size: 0.95rem; padding: 8px 4px; }
}
#category-groups[data-sort="date"] .cat-group-title,
#category-groups[data-sort="distance"] .cat-group-title { border-bottom: 2px solid var(--honey); padding-bottom: 6px; }

/* Header links and Past events view */
.header-nav { margin-top: 12px; display: flex; gap: 16px; flex-wrap: wrap; }
.header-nav a { color: #fff; font-weight: 700; text-underline-offset: 3px; }
.header-nav a:hover { color: var(--honey-tint); }
.link-back { display: inline-block; margin-top: 18px; font-weight: 700; color: var(--olive-deep); }
.past-view #past-cat-buttons:empty { display: none; }
.past-view .filters:has(#past-cat-buttons:empty) { display: none; }
#past-clear { margin-top: 6px; }
.card.is-past { opacity: 0.82; background: #FBFAF5; box-shadow: none; }
.card.is-past .thumb { filter: grayscale(0.35); }
.tag-past { background: #EEEEEA; border: 1.5px solid #A8A89E; color: var(--text); border-radius: 6px; padding: 2px 8px; font-size: 0.75rem; font-weight: 800; }
.archived-week { margin: 0; color: var(--muted); font-size: 0.88rem; }

/* Distance origin, folded into the filter box */
.filters .distance {
  margin-top: 12px; padding: 0; border: 0; box-shadow: none; background: none; border-radius: 0;
  border-top: 1px solid var(--line);
}
.filters .distance summary {
  cursor: pointer; padding: 10px 0 2px; min-height: 40px; font-weight: 600; color: var(--text); list-style-position: inside;
}
.filters .distance summary strong { color: var(--olive-deep); }
.summary-change { color: var(--olive-deep); text-decoration: underline; font-size: 0.9rem; margin-left: 4px; }
.filters .distance[open] summary { margin-bottom: 8px; }
.week-range { font-weight: 400; color: var(--muted); font-size: 0.9em; }

/* Footer */
.site-footer { background: var(--text); color: var(--bg); padding: 22px 0; font-size: 0.92rem; }
.site-footer p { margin: 0 0 6px; }
.site-footer a { color: var(--honey); }

@media (min-width: 700px) {
  .brand { font-size: 2.6rem; }
  .distance { padding: 18px 20px; }
}
/* Desktop (900px+): page uses 90% of the window, two roomy cards per row. */
@media (min-width: 900px) {
  .wrap { width: 90%; max-width: none; padding: 0; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
  .card { padding: 20px 22px; gap: 10px; }
  .card-title { font-size: 1.25rem; }
  .card-subtitle { font-size: 1rem; }
  .thumb { width: 64px; height: 64px; }
  /* Details: When across the full card (often long), then Where | Price | Ages in two columns. */
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 24px; font-size: 0.97rem; }
  .facts .fact { display: grid; grid-template-columns: auto 1fr; gap: 0 10px; align-content: start; }
  .facts .fact { grid-template-columns: 3.4em 1fr; }
  .facts .fact:first-child { grid-column: 1 / -1; }
  .desc { font-size: 1.02rem; line-height: 1.55; }
  .tip, .animals { padding: 8px 12px; }
  .card-foot { flex-direction: row; align-items: center; justify-content: space-between; gap: 12px; padding-top: 6px; border-top: 1px solid var(--line); }
  .card-foot .actions { padding-top: 0; flex-wrap: nowrap; }
  .card-foot .action { flex: 0 0 auto; min-width: 128px; }
  /* Top picks: two columns of short lines instead of one long stack. */
  .top-picks { padding: 18px 24px 10px; }
  .top-picks ol { columns: 2; column-gap: 48px; }
  .top-picks li { break-inside: avoid; }
}
@media (prefers-reduced-motion: no-preference) {
  .cat-btn, .btn, .action, .sort-btn { transition: background-color 0.15s ease, color 0.15s ease; }
}

/* ================= Kids Zone look (our own CSS/SVG) ================= */
body {
  /* Page tile: bg-tile.svg (1000x600 seamless, #EED79A outline icons on cream). Bands and white cards sit on top. */
  background-color: #FEF4D4;
  background-image: url("bg-tile.svg");
  background-repeat: repeat;
  background-size: 1000px 600px;
}
@media (max-width: 699px) {
  body { background-size: 700px 420px; }
}
a { color: var(--olive-deep); }
a:hover { color: var(--olive-deeper); }

/* Sage utility bar on top */
.utility-bar { background: var(--sage); color: var(--on-sage); font-size: 0.86rem; font-weight: 700; }
.utility-bar .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; padding-top: 6px; padding-bottom: 6px; }

/* Butter-yellow header band */
.site-header {
  background: var(--butter); color: var(--text); padding: 22px 0 18px;
  border-bottom: 4px solid var(--honey);
}
.brand { font-family: var(--display); font-weight: 400; color: var(--olive-deep); letter-spacing: 0; line-height: 1.3; }
.tagline { color: var(--text); opacity: 1; }
.week { background: var(--honey); color: var(--text); font-family: var(--hand); font-weight: 400; font-size: 1.05rem; padding: 2px 14px; }
.header-nav a { color: var(--olive-text); font-weight: 800; }
.header-nav a:hover { color: var(--on-sage); }

/* Section titles and day headings in Pacifico */
h2, h3 { color: var(--sage-heading); }
.section-title, .top-picks h2, .cat-group-title, .distance-title {
  font-family: var(--display); font-weight: 400; color: var(--sage-heading); letter-spacing: 0;
}
.section-title { font-size: 1.9rem; }
.cat-group-title { font-size: 1.45rem; border-bottom: 3px dotted var(--honey); padding-bottom: 6px; }
.cat-group-title .count, .day-title .count { font-family: var(--sans); }
/* By date: day headers become sky-blue chips */
#category-groups[data-sort="date"] .cat-group-title {
  display: inline-block; background: var(--sky); color: var(--text); border: 0;
  padding: 4px 18px 8px; border-radius: 12px; margin-top: 28px;
}
#category-groups[data-sort="date"] .cat-group-title .count { color: var(--text); }
#category-groups[data-sort="distance"] .cat-group-title { border-bottom: 3px dotted var(--honey); }

/* Top Picks: golden frame band */
.top-picks { background: #FFFDF3; border: 3px solid var(--honey); border-radius: 18px; box-shadow: 0 4px 0 var(--honey-tint); }
.top-picks h2 { font-size: 1.6rem; margin-bottom: 10px; }
.top-picks li::marker { color: var(--olive-deep); font-weight: 800; }

/* Filters and playful labels */
.filters { background: #FFFFFF; border: 2px solid var(--honey); border-radius: 16px; }
.toggle span, .sort-label, .distance-filter > span { font-family: var(--hand); font-size: 1.15rem; font-weight: 400; }
.sort-label { color: var(--sage-heading); font-size: 1.3rem; }
.week-range { font-family: var(--sans); font-size: 0.85rem; }
.toggle input { accent-color: var(--olive-deep); }
.filter-sticky { background: var(--bg); }
.search-form input { border: 2px solid var(--honey); border-radius: 12px; }
.search-form input:focus { border-color: var(--olive-deep); outline: none; }

/* Buttons: flat, friendly, slightly rounded */
.btn, .action, .sort-btn, .cat-btn { border-radius: 10px; }
.btn-primary, .action-primary { background: var(--olive-deep); color: #fff; }
.btn-primary:hover, .action-primary:hover { background: var(--olive-deeper); color: #fff; }
.action-secondary { background: var(--sky); border: 0; color: var(--text); }
.action-secondary:hover { background: #3FA9C3; color: var(--text); }
.sort-seg { border-color: var(--olive-deep); border-radius: 12px; }
.sort-btn { color: var(--olive-deep); background: #fff; }
.sort-btn + .sort-btn { border-left-color: var(--olive-deep); }
.sort-btn[aria-pressed="true"] { background: var(--olive-deep); color: #fff; }
.cat-btn { font-family: var(--hand); font-weight: 400; font-size: 1.02rem; border-radius: 999px; }
.cat-btn[aria-pressed="true"] { background: var(--olive-deep); border-color: var(--olive-deep); color: #fff; }

/* Cards: white, thin golden border, soft corners */
.card { background: #fff; border: 2px solid var(--honey); border-radius: 18px; box-shadow: 0 3px 0 var(--honey-tint); }
.card.is-top { border: 3px solid var(--honey); box-shadow: 0 4px 0 #F6DA8A; }
.card.is-past { border-color: #E6DCB8; }

.pill, .tag-new, .tag-top, .tag-allweek, .tag-past { font-family: var(--hand); font-weight: 400; font-size: 0.98rem; letter-spacing: 0; line-height: 1.2; }
.pill { background: var(--olive-tint); border-color: var(--olive); color: var(--olive-text); }
.tag-new { background: var(--honey); border: 0; color: var(--text); border-radius: 8px; }
.tag-top { background: var(--sky); color: var(--text); border-radius: 8px; }
.tag-allweek { background: var(--sky-tint); border: 1.5px solid var(--sky); color: var(--text); border-radius: 8px; }
.tip, .animals { background: var(--honey-tint); }
.distance-line { color: var(--olive-deep); }
.facts dt { color: var(--muted); }

/* Sage footer with darker bottom bar */
.site-footer { background: var(--sage); color: var(--on-sage); padding: 0; margin-top: 24px; border-top: 4px solid var(--honey); }
.site-footer .footer-main { padding: 26px 0 18px; }
.site-footer .footer-tagline { font-family: var(--display); font-size: 1.35rem; margin: 0 0 10px; color: var(--on-sage); }
.site-footer a { color: var(--on-sage); font-weight: 700; }
.footer-bottom { background: var(--sage-bar); color: #fff; font-size: 0.88rem; }
.footer-bottom .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; padding-top: 10px; padding-bottom: 10px; }
.footer-bottom a { color: #fff; }
.footer-bottom p { margin: 0; }

/* Empty states */
.empty { background: #FFFDF3; border: 2px dashed var(--honey); }

/* ================= Kids Zone round 2: menu, clouds, photo cards, 3-column footer ================= */

/* Header: butter band, logo left, icon menu right */
.site-header { padding: 16px 0 12px; }
.header-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 28px; }
.header-brand { min-width: 0; }
.header-nav { margin: 0; display: flex; gap: 4px; flex-wrap: nowrap; }
.header-nav a {
  display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 76px; padding: 8px 10px 6px;
  border-radius: 14px; text-decoration: none; color: var(--olive-text); font: 800 0.98rem var(--sans); line-height: 1.1;
}
.header-nav a:hover, .header-nav a:focus-visible { background: #FBEDB5; color: var(--on-sage); }
.header-nav a:focus-visible { outline: 3px solid var(--olive-deep); outline-offset: 0; }
.nav-icon { width: 30px; height: 30px; color: var(--olive-deep); flex: 0 0 auto; }
.nav-short { display: none; }
@media (max-width: 699px) {
  .site-header { padding: 14px 0 6px; }
  .header-inner { gap: 8px; }
  .header-brand { width: 100%; }
  .header-nav { width: 100%; justify-content: space-between; border-top: 2px dashed rgba(69, 115, 99, 0.35); padding-top: 4px; }
  .header-nav a { flex: 1 1 0; min-width: 0; padding: 6px 2px 4px; font-size: 0.82rem; }
  .nav-icon { width: 26px; height: 26px; }
  .nav-long { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .nav-short { display: inline; }
}

/* Scalloped cloud badges (our own SVG mask) */
.section-title, .top-picks h2 { display: flex; align-items: center; gap: 12px; }
.section-title::before, .top-picks h2::before {
  content: ""; flex: 0 0 auto; width: 58px; height: 52px; background-color: var(--sage);
  -webkit-mask: var(--cloud) center / 100% 100% no-repeat; mask: var(--cloud) center / 100% 100% no-repeat;
}
#browse-title::before { background: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 32 32%22%3E%3Crect x=%226%22 y=%228%22 width=%2220%22 height=%2218%22 rx=%224%22 fill=%22none%22 stroke=%22%23fff%22 stroke-width=%222.6%22/%3E%3Cpath d=%22M6 14h20M12 5v6M20 5v6%22 stroke=%22%23fff%22 stroke-width=%222.6%22 stroke-linecap=%22round%22/%3E%3C/svg%3E") center / 46% no-repeat, var(--sage); }
.top-picks h2::before { background: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 32 32%22%3E%3Cpath d=%22M16 3l3.8 8 8.7 1-6.4 6 1.7 8.6L16 22.4 8.2 26.6 9.9 18 3.5 12l8.7-1z%22 fill=%22%23fff%22/%3E%3C/svg%3E") center / 46% no-repeat, var(--honey); }
#past-title::before { background: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 32 32%22%3E%3Ccircle cx=%2216%22 cy=%2216%22 r=%2210%22 fill=%22none%22 stroke=%22%23fff%22 stroke-width=%222.6%22/%3E%3Cpath d=%22M16 10v6l4 3%22 fill=%22none%22 stroke=%22%23fff%22 stroke-width=%222.6%22 stroke-linecap=%22round%22/%3E%3C/svg%3E") center / 46% no-repeat, var(--sky); }

/* Top Picks: each item sits next to a numbered cloud */
.top-picks ol { list-style: none; padding-left: 0; counter-reset: pick; }
.top-picks li { counter-increment: pick; position: relative; padding-left: 52px; min-height: 40px; }
.pick-num {
  position: absolute; left: 0; top: -4px; width: 42px; height: 38px;
  display: grid; place-items: center; padding-top: 1px; color: #fff; font: 400 1.1rem var(--display); line-height: 1;
  background: var(--olive-deep); text-decoration: none;
  -webkit-mask: var(--cloud) center / 100% 100% no-repeat; mask: var(--cloud) center / 100% 100% no-repeat;
}
a.pick-num:hover { background: var(--olive-deeper); color: #fff; }
.top-picks li:nth-child(3n+2) .pick-num { background: var(--sky); color: var(--text); }
.top-picks li:nth-child(3n) .pick-num { background: var(--honey); color: var(--text); }
/* The mask clips outlines, so keyboard focus on the number cloud shows as a ring around the whole item */
.top-picks li:has(a.pick-num:focus-visible) { outline: 3px solid var(--sky); outline-offset: 3px; border-radius: 10px; }
.pick-text strong { font-weight: 800; color: var(--text); }
.pick-link { color: inherit; text-decoration: none; }
.pick-link, .pick-link:hover, .pick-link:focus, a.pick-num, a.pick-num:hover, a.pick-num:focus { text-decoration: none; }
.pick-link strong { text-decoration: none; color: var(--text); transition: color .15s; }
.pick-link:hover strong, .pick-link:focus-visible strong { color: #457363; text-decoration: none; }
.pick-link:focus-visible { outline: 3px solid var(--sky); outline-offset: 2px; border-radius: 4px; }

/* Empty states: a cloud badge above the message */
.empty::before {
  content: ""; display: block; width: 78px; height: 70px; margin: 2px auto 10px;
  background: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 32 32%22%3E%3Ccircle cx=%2214%22 cy=%2214%22 r=%227.5%22 fill=%22none%22 stroke=%22%23fff%22 stroke-width=%222.8%22/%3E%3Cpath d=%22M19.5 19.5L26 26%22 stroke=%22%23fff%22 stroke-width=%223.2%22 stroke-linecap=%22round%22/%3E%3C/svg%3E") center / 44% no-repeat, var(--sky);
  -webkit-mask: var(--cloud) center / 100% 100% no-repeat; mask: var(--cloud) center / 100% 100% no-repeat;
}
.empty p { color: var(--text); font-weight: 600; }

/* Photo cards like blog squares: media on top (16:10), cover crop, never stretched */
.card { overflow: hidden; }
/* Media: left strip (date block over category badge) + frame showing the whole photo or placeholder art.
   Nothing overlays the image. Photos use contain on a cream backdrop: never cropped, never stretched. */
.card-media {
  --strip: 68px; --frame-h: 300px;
  display: grid; grid-template-columns: var(--strip) minmax(0, 1fr); height: var(--frame-h);
  margin: -14px -14px 4px; border-bottom: 2px solid var(--honey); background: #FDF3D6;
}
.media-blocks { display: flex; flex-direction: column; background: transparent; border-right: 0; }
.date-block {
  display: flex; flex-direction: column; align-items: center; justify-content: center; height: 72px; flex: 0 0 auto;
  background: var(--sky); color: var(--text); line-height: 1;
}
.date-big { font: 400 1.75rem var(--display); line-height: 1.05; }
.date-small { font: 400 1.05rem var(--hand); margin-top: 1px; }
.date-block.is-word .date-big { font-size: 1.15rem; }
.date-wday { font: 400 0.9rem var(--hand); margin-bottom: 1px; }
/* Weekday / day / month: line-height 1, no stray margins, and the same visible gap above and below the number.
   Pacifico's tall ascent leaves extra room above the digits, so pull the number up by 0.19em (measured). */
.date-block.has-wday .date-wday, .date-block.has-wday .date-big, .date-block.has-wday .date-small { line-height: 1; margin: 0; }
.date-block.has-wday .date-big { margin-top: calc(2px - 0.19em); }
.date-block.has-wday .date-small { margin-top: 2px; }
.date-block.has-wday { height: 86px; }
.cat-icon {
  display: block; height: 56px; flex: 0 0 auto; background-color: var(--honey); background-position: center;
  background-size: 32px 32px; background-repeat: no-repeat;
}
.media-frame {
  position: relative; min-width: 0; height: 100%; overflow: hidden;
  background-color: #FCEFC9; background-size: cover; background-position: center; background-repeat: no-repeat;
}
.media-frame.has-photo { background-image: none; background-color: #FDF3D6; }
.media-frame img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; object-position: center; display: block;
}
.card.is-past .card-media { filter: saturate(0.6); }
@media (min-width: 900px) {
  .card-media { --strip: 84px; --frame-h: 340px; margin: -20px -22px 4px; }
  .date-block { height: 84px; }
  .date-block.has-wday { height: 100px; }
  .date-big { font-size: 2rem; }
  .cat-icon { height: 64px; background-size: 38px 38px; }
}
@media (min-width: 1500px) {
  .card-media { --frame-h: 380px; }
}
.card-head { display: block; }

/* Footer: three columns on the sage band */
.site-footer .footer-main { padding: 34px 0 22px; }
.footer-cols { display: grid; grid-template-columns: 1fr; gap: 26px; }
.footer-heading {
  font: 400 1.5rem var(--display); color: var(--on-sage); margin: 0 0 14px; padding-bottom: 8px;
  border-bottom: 3px solid #fff; letter-spacing: 0;
}
.footer-col p { margin: 0 0 8px; }
.footer-lede { font-size: 1rem; }
.footer-links { list-style: none; margin: 0; padding: 0; }
.footer-links li { margin: 0 0 8px; padding-left: 22px; position: relative; }
.footer-links li::before {
  content: ""; position: absolute; left: 0; top: 0.3em; width: 15px; height: 13px; background: #fff;
  -webkit-mask: var(--cloud) center / 100% 100% no-repeat; mask: var(--cloud) center / 100% 100% no-repeat;
}
.footer-links a { color: var(--on-sage); font-weight: 700; text-underline-offset: 3px; }
.footer-links a:hover { text-decoration-thickness: 2px; }
@media (min-width: 700px) {
  .footer-cols { grid-template-columns: 1.3fr 1fr 1.3fr; gap: 36px; }
}
#cat-buttons { scroll-margin-top: 90px; }
@media (min-width: 900px) {
  /* Two columns at every desktop width, filled down then across (picks 1-3 left, 4-6 right). */
  .top-picks ol { display: block; columns: 2; column-gap: 40px; column-fill: balance; }
  .top-picks li { break-inside: avoid; }
  .top-picks li.pick-col2 { break-before: column; -webkit-column-break-before: always; }
  /* Keep the number cloud inside its own item so it never splits across the column edge. */
  .top-picks li { padding-top: 4px; }
  .top-picks .pick-num { top: 0; }
}

/* Card titles link to the event page (new tab) but keep the plain title look */
.card-title .title-link { color: inherit; text-decoration: none; cursor: pointer; }
.card-title .title-link:hover, .card-title .title-link:focus-visible { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }
.card-title .title-link:focus-visible { outline: 3px solid var(--olive-deep); outline-offset: 2px; border-radius: 4px; }

/* Desktop: content is 80% of the screen (phones unchanged) */
@media (min-width: 900px) {
  .wrap { width: 80%; }
}

/* Filters panel uses Nunito (the card body font) throughout */
.filters, .filters .toggle span, .filters .distance-filter > span, .filters .cat-btn, .filters select,
.filters .distance summary, .filters .result-count, .filters .week-range, .filters .link-btn { font-family: var(--sans); }
.filters .toggle span, .filters .distance-filter > span { font-size: 1rem; font-weight: 700; }
.filters .week-range { font-weight: 400; font-size: 0.88rem; }
.filters .cat-btn { font-weight: 700; font-size: 0.92rem; }
@media (max-width: 699px) {
  .filters .cat-btn { font-size: 0.8rem; }
  .filters .toggle span, .filters .distance-filter > span { font-size: 0.95rem; }
}

/* Card photo/placeholder frame links to the event page */
a.media-frame { display: block; cursor: pointer; }
a.media-frame:focus-visible { outline: 4px solid var(--sky); outline-offset: -4px; box-shadow: inset 0 0 0 8px var(--honey); }

/* Top pick jump: brief golden/sky highlight on the target card */
.card.is-flash { outline: 4px solid var(--sky); outline-offset: 3px; box-shadow: 0 0 0 10px rgba(235, 183, 73, 0.55); }
.card:focus { outline: none; }
.card.is-flash:focus { outline: 4px solid var(--sky); }
@media (prefers-reduced-motion: no-preference) {
  .card { transition: box-shadow 0.4s ease, outline-color 0.4s ease; }
}

/* Card facts: clear labeled rows (When, Where, Price, Ages, What, Why) */
.facts dt { color: var(--olive-text); font-weight: 800; font-family: var(--sans); }
.facts dd { color: var(--text); }
.facts { row-gap: 6px; }
.facts .fact-wide dd { line-height: 1.5; }
@media (min-width: 900px) {
  .facts .fact-wide { grid-column: 1 / -1; }
}
.card { scroll-margin-top: 96px; }

/* The Tutoring Center card (between Top picks and Events).
   Plain block stack on phones; one flex row from 900px. No grid, :has() or gap needed, nothing starts hidden. */
.ttc-card {
  display: block; margin: 18px 0 6px; padding: 14px 16px; background: #fff; border: 2px solid var(--honey);
  border-radius: 16px; box-shadow: 0 3px 0 var(--honey-tint);
}
.ttc-card-badge {
  display: block; width: 54px; height: 48px; margin: 0 0 6px;
  background: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 32 32%22%3E%3Cpath d=%22M4 8.5c4-1.6 8-1.6 12 1 4-2.6 8-2.6 12-1V25c-4-1.6-8-1.6-12 1-4-2.6-8-2.6-12-1z%22 fill=%22none%22 stroke=%22%23fff%22 stroke-width=%222.4%22 stroke-linejoin=%22round%22/%3E%3Cpath d=%22M16 9.5V26%22 stroke=%22%23fff%22 stroke-width=%222.4%22/%3E%3C/svg%3E") center / 50% no-repeat, var(--olive-deep);
  -webkit-mask: var(--cloud) center / 100% 100% no-repeat; mask: var(--cloud) center / 100% 100% no-repeat;
}
.ttc-card-brand { display: block; width: 100%; min-width: 0; }
.ttc-card-head { display: flex; align-items: center; }
.ttc-card-head .ttc-card-badge { flex: 0 0 auto; margin: 0 12px 0 0; }
.ttc-card-kicker { flex: 1 1 auto; min-width: 0; margin: 0; font: 400 1.05rem var(--hand); color: var(--muted); line-height: 1.2; }
.ttc-card-logo { display: table; margin: 8px auto 8px; line-height: 0; border-radius: 6px; }
.ttc-card-logo img { display: block; width: 180px; max-width: 100%; height: auto; }
.ttc-card-logo:focus-visible { outline: 3px solid var(--sky); outline-offset: 3px; }
.ttc-card-body { margin: 0; font-size: 0.92rem; line-height: 1.45; color: var(--text); }
.ttc-card-actions { display: block; margin-top: 10px; }
.ttc-card-actions .action { display: flex; width: 100%; margin-top: 8px; }
.ttc-card-actions .action:first-child { margin-top: 0; }
@media (min-width: 900px) {
  .ttc-card { display: flex; align-items: center; padding: 10px 20px; }
  .ttc-card-brand { flex: 0 0 auto; width: auto; margin: 0 22px 0 0; }
  .ttc-card-head .ttc-card-badge { width: 44px; height: 40px; }
  .ttc-card-logo { margin: 4px auto 0; }
  .ttc-card-logo img { width: 150px; }
  .ttc-card-body { flex: 1 1 240px; min-width: 0; line-height: 1.4; }
  .ttc-card-actions { flex: 0 0 auto; display: flex; margin: 0 0 0 18px; }
  .ttc-card-actions .action { width: auto; min-width: 150px; white-space: nowrap; margin: 0 0 0 8px; }
  .ttc-card-actions .action:first-child { margin-left: 0; }
}
.footer-ttc a { color: #fff; font-weight: 700; }

/* Blurred fill behind contain-fit photos; the sharp image sits on top */
.media-frame.has-photo::before {
  content: ""; position: absolute; inset: 0; z-index: 0;
  background: var(--img) center / cover no-repeat;
  filter: blur(18px) saturate(1.1); transform: scale(1.15); opacity: 0.85;
}
.media-frame img { z-index: 1; }

/* ---- Share buttons (share.js). Site palette only: olive/sage buttons, honey ring, cream sheet. ---- */
.share-btn svg, .share-fab svg, .share-sheet-close svg { width: 20px; height: 20px; display: block; flex: 0 0 auto; }
.share-btn { color: #fff; }
/* Desktop (900px and up, where the content is 80% wide and the side margin is at least 90px): slim bar on the left edge */
.share-bar {
  position: fixed; left: 14px; top: 50%; transform: translateY(-50%); z-index: 20;
  display: flex; flex-direction: column; gap: 8px; padding: 8px;
  background: var(--card); border: 2px solid var(--honey); border-radius: 999px;
  box-shadow: 0 4px 14px rgba(20, 33, 28, 0.14);
}
.share-bar .share-btn {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 0; padding: 0;
  background: var(--olive-deep); color: #fff; cursor: pointer; text-decoration: none;
}
.share-bar .share-btn:hover { background: var(--olive-text); }
.share-btn:focus-visible, .share-fab:focus-visible, .share-sheet-close:focus-visible { outline: 3px solid var(--sky); outline-offset: 2px; }
/* Phones and tablets: one floating Share button at the bottom right */
.share-fab {
  position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 20;
  width: 56px; height: 56px; border-radius: 50%; padding: 0; display: grid; place-items: center; cursor: pointer;
  background: var(--olive-deep); color: #fff; border: 3px solid var(--honey);
  box-shadow: 0 6px 16px rgba(20, 33, 28, 0.25);
}
.share-fab svg { width: 24px; height: 24px; }
.share-fab:hover { background: var(--olive-text); }
@media (max-width: 899px) {
  .share-bar { display: none; }
  /* room under the last content so the Share button never sits on top of card buttons at the end of the page */
  body { padding-bottom: calc(84px + env(safe-area-inset-bottom, 0px)); }
}
@media (min-width: 900px) {
  .share-fab, .share-sheet { display: none !important; }
}
/* Share sheet (phones without the native share sheet) */
.share-sheet { position: fixed; inset: 0; z-index: 30; }
.share-sheet[hidden] { display: none; }
.share-sheet-backdrop { position: absolute; inset: 0; background: rgba(20, 33, 28, 0.45); }
.share-sheet-panel {
  position: absolute; left: 0; right: 0; bottom: 0; background: var(--bg); border-top: 4px solid var(--honey);
  border-radius: 18px 18px 0 0; padding: 14px 16px calc(16px + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -8px 24px rgba(20, 33, 28, 0.2); max-width: 560px; margin: 0 auto;
}
.share-sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.share-sheet-title { margin: 0; font: 800 1.1rem var(--sans); color: var(--olive-text); }
.share-sheet-close {
  width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--line); background: var(--card);
  color: var(--olive-text); display: grid; place-items: center; cursor: pointer; padding: 0;
}
.share-sheet-list { display: grid; grid-template-columns: 1fr; gap: 8px; }
.share-sheet-list .share-btn {
  display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 6px 12px 6px 6px; border-radius: 999px;
  background: var(--card); border: 1.5px solid var(--olive); color: var(--olive-text); text-decoration: none;
  font: 700 1rem var(--sans); cursor: pointer; text-align: left; width: 100%;
}
.share-sheet-list .share-btn svg { width: 36px; height: 36px; padding: 8px; border-radius: 50%; background: var(--olive-deep); color: #fff; box-sizing: border-box; }
.share-sheet-list .share-btn:hover { background: var(--olive-tint); }
/* "Link copied" note */
.share-toast {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); z-index: 40;
  transform: translate(-50%, 12px); opacity: 0; pointer-events: none;
  background: var(--on-sage); color: #fff; font: 700 0.95rem var(--sans); padding: 8px 16px; border-radius: 999px;
  box-shadow: 0 4px 14px rgba(20, 33, 28, 0.25); transition: opacity 0.2s ease, transform 0.2s ease;
}
.share-toast.is-on { opacity: 1; transform: translate(-50%, 0); }
@media (max-width: 899px) { .share-toast { bottom: calc(86px + env(safe-area-inset-bottom, 0px)); } }
@media (prefers-reduced-motion: reduce) { .share-toast { transition: none; } }
