:root {
  --bg: #f4f6f8; --panel: #fff; --ink: #1b2430; --muted: #5b6776; --line: #d9dfe6;
  --accent: #0b6e4f; --accent-ink: #fff; --walk: #6b7785; --focus: #0b57d0;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #11161c; --panel: #1a2129; --ink: #e8edf2; --muted: #9aa6b4; --line: #2c3743; --accent: #3fb88a; --accent-ink: #06231a; --walk: #8f9cab; --focus: #7aa7ff; }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; min-height: 100vh; display: flex; flex-direction: column;
  background: var(--bg); color: var(--ink); font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
main.stack { display: block; max-width: 960px; }
.tiles { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 640px) { .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.tile { display: block; height: 100%; padding: 18px 16px; text-align: center; background: var(--panel); border: 1px solid var(--line);
  border-radius: 12px; color: var(--ink); text-decoration: none; }
a.tile:hover { border-color: var(--accent); }
a.tile:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.tile-ic { display: block; font-size: 2.2rem; line-height: 1.2; }
.tile-t { display: block; margin: 4px 0; font-size: 1.15rem; font-weight: 700; }
.tile-d { display: block; color: var(--muted); font-size: .92rem; }
.tile-soon { border-style: dashed; opacity: .75; }
.adbanner { margin-top: 18px; padding: 16px; text-align: center; background: var(--panel); border: 1px dashed var(--accent); border-radius: 12px; }
.adbanner p { margin: 4px 0 8px; color: var(--muted); }
.btn { display: inline-block; padding: 10px 18px; background: var(--accent); color: var(--accent-ink); border-radius: 8px; text-decoration: none; font-weight: 700; }
.btn:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.prose .panel { margin-bottom: 14px; }
.prose h2 { margin: 0 0 8px; font-size: 1.15rem; text-align: center; }
.prose ul:not([class]) { margin: 0 0 10px; padding-left: 1.2em; }   /* plain text lists only, not tiles, contacts, programs */
.sos { text-align: center; }
.sos-t { margin: 0; font-weight: 700; color: #b3261e; }
.sos-call { display: block; margin: 6px auto; max-width: 320px; padding: 12px; font-size: 2.4rem; font-weight: 800; letter-spacing: .08em;
  color: #b3261e; background: var(--panel); border: 2px solid #b3261e; border-radius: 12px; text-decoration: none; }
.sos-call:hover { background: #fdeceb; }
.sos-call:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.sos-d { margin: 4px 0 0; color: var(--muted); font-size: .92rem; }
.contacts { list-style: none; margin: 0; padding: 0; }
.contact { padding: 10px 0; border-top: 1px solid var(--line); display: grid; gap: 6px; }
.contact:first-child { border-top: 0; }
.c-name { font-weight: 600; }
.c-note { font-weight: 400; color: var(--muted); font-size: .85rem; }
.c-name .c-note { display: block; margin-top: 2px; }          /* address, hours and remarks sit under the name */
.c-links { display: flex; flex-wrap: wrap; gap: 8px; }
.call { display: inline-block; padding: 8px 10px; font-size: .95rem; border: 1px solid var(--line); border-radius: 8px; background: var(--bg);
  color: var(--ink); text-decoration: none; font-variant-numeric: tabular-nums; white-space: nowrap; overflow-wrap: anywhere; }
.call:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.call::before { content: "📞 "; }
.call.mail::before { content: "✉️ "; }
.call.web::before { content: "🌐 "; }
.call.sched::before { content: "🗓️ "; }
@media (min-width: 640px) { .contact { grid-template-columns: minmax(0, 1fr) auto; align-items: center; } .c-links { justify-content: flex-end; } }
.stamp { text-align: center; }
@media (prefers-color-scheme: dark) { .sos-t { color: #ff8a80; } .sos-call { color: #ff8a80; border-color: #ff8a80; } .sos-call:hover { background: #3a1d1b; } }
.foot-brand { margin-top: 8px; }
.tabs { display: flex; justify-content: center; gap: 8px; margin: 0 0 14px; white-space: nowrap; }
.tabs a { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); color: var(--ink); text-decoration: none; font-size: .9rem; }
.tabs a[aria-current=page] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.tabs a:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
@media (max-width: 360px) { .tabs { gap: 6px; } .tabs a { padding: 6px 9px; font-size: .84rem; } }
.filters { display: flex; align-items: center; gap: 10px; }
.filters label { margin: 0; white-space: nowrap; }
.filters select { flex: 1; min-width: 0; padding: 8px 10px; font: inherit; color: inherit; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; }
.place-addr { margin: -2px 0 8px; text-align: center; color: var(--muted); }
.place-links { justify-content: center; margin: 0 0 4px; }
.place-links .c-note { align-self: center; }
.programs { list-style: none; margin: 10px 0 0; padding: 0; }
.prog { display: grid; gap: 4px; padding: 10px 0; border-top: 1px solid var(--line); }
.p-name { font-weight: 600; }
.badges { display: flex; flex-wrap: wrap; gap: 6px; }
/* the planner also has a .badge (line numbers), so these are scoped and reset every property that one sets */
.badges .badge { min-width: 0; padding: 2px 8px; border: 1px solid var(--line); border-radius: 999px; background: none;
  color: var(--muted); font-size: .75rem; font-weight: 400; text-align: left; }
.badges .b-kids { background: #ffd966; border-color: #ffd966; color: #3a2d00; font-weight: 600; }
.badges .b-adults { background: #cfe3ff; border-color: #cfe3ff; color: #0b2a55; font-weight: 600; }
.badges .b-all { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.p-note { color: var(--muted); font-size: .85rem; }
.place-note { margin: 0 0 8px; text-align: center; color: var(--muted); font-size: .92rem; }
.place-hours { margin: 0 0 8px; text-align: center; font-size: .92rem; }
.place-badges { justify-content: center; margin: 8px 0 0; }
.place-checked { margin: 10px 0 0; text-align: center; color: var(--muted); font-size: .78rem; }
.cat-h { margin: 22px 0 10px; font-size: 1.2rem; text-align: center; }
.cat-h a { color: inherit; text-decoration: none; }
.cat-h a:hover { text-decoration: underline; }
.back { margin: 0 0 12px; font-size: .92rem; }
.back a { color: var(--muted); }
.aud-filter button { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: none; color: var(--ink); font: inherit; font-size: .9rem; cursor: pointer; }
.aud-filter button[aria-pressed=true] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.aud-filter button:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
@media (max-width: 360px) { .aud-filter { gap: 6px; } .aud-filter button { padding: 6px 9px; font-size: .84rem; } }
.tile-n { display: block; margin-top: 8px; font-size: .8rem; font-weight: 700; color: var(--accent); }
.tile-soon .tile-n { color: var(--muted); font-weight: 400; }
.hub-search { position: relative; margin-bottom: 14px; }
.hub-search label { display: block; text-align: left; }
.hub-search input { width: 100%; padding: 10px 12px; font: inherit; color: inherit; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; }
.results-list { list-style: none; margin: 8px 0 0; padding: 0; }
.results-list li { border-top: 1px solid var(--line); }
.results-list a, .results-list .none { display: block; padding: 8px 4px; color: var(--ink); text-decoration: none; }
.results-list small { display: block; color: var(--muted); }
@media (min-width: 640px) { .tiles.cats { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.place-bus { margin: 12px 0 0; text-align: center; }
main { flex: 1; width: 100%; max-width: 960px; margin: 0 auto; padding: 12px 16px 24px; display: grid; align-content: start; gap: 14px;   /* start: rows keep their content height instead of stretching to fill the screen */
  grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) {
  /* form and map side by side, the results panel centred below them across the full width */
  main { grid-template-columns: minmax(0, 380px) minmax(0, 1fr); align-items: stretch; }
  main #map { grid-column: 2; grid-row: 1; height: auto; min-height: 420px; }   /* "main #map": must beat the later base #map { height: 360px } */
  #results { grid-column: 1 / -1; grid-row: 2; }
}
.panel { position: relative; z-index: 1; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px; }
.field { position: relative; }
label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 4px; }
.row { display: flex; gap: 8px; }
input[type=text], input[type=time] { width: 100%; min-width: 0; padding: 10px 12px; font: inherit; color: inherit;
  background: var(--bg); border: 1px solid var(--line); border-radius: 8px; }
input:focus-visible, button:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
button { font: inherit; cursor: pointer; }
.ghost { flex: none; width: 44px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--ink); }
.swap { display: block; margin: 6px auto; width: 44px; height: 32px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--ink); }
.suggest { position: absolute; z-index: 1000; left: 0; right: 0; margin: 4px 0 0; padding: 4px; list-style: none;
  background: var(--panel); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 6px 20px rgba(0,0,0,.18); max-height: 260px; overflow-y: auto; }
.suggest li { padding: 8px 10px; border-radius: 6px; cursor: pointer; }
.suggest li:hover, .suggest li[aria-selected=true] { background: var(--bg); }
.suggest small { color: var(--muted); display: block; }
.when { display: flex; align-items: center; gap: 12px; margin: 12px 0; flex-wrap: nowrap; white-space: nowrap; }
.when label { display: flex; align-items: center; gap: 6px; font-weight: 400; margin: 0; }
.when input[type=time] { width: auto; flex: 0 1 140px; min-width: 126px; padding-left: 8px; padding-right: 8px; }
.dayrow { display: flex; align-items: center; gap: 12px; margin: 0 0 12px; white-space: nowrap; }
.dayrow label { margin: 0; }
.dayrow input { width: auto; flex: 0 1 170px; min-width: 0; padding: 8px 10px; font: inherit; color: inherit;
  background: var(--bg); border: 1px solid var(--line); border-radius: 8px; }
.res-note { margin: 0 0 12px; text-align: center; font-weight: 600; font-size: 1.05rem; }
.opts { display: grid; gap: 10px; justify-content: center; grid-template-columns: minmax(0, 680px); }
.opts .opt { margin: 0; }
.note { margin: 0 0 10px; font-size: .9rem; color: var(--muted); }
.warn { margin: 6px 0 0; font-size: .85rem; color: #b3261e; }
@media (prefers-color-scheme: dark) { .warn { color: #ff8a80; } }
.go { width: 100%; padding: 12px; font-weight: 700; color: var(--accent-ink); background: var(--accent); border: 0; border-radius: 8px; }
.hint { color: var(--muted); font-size: .85rem; margin: 10px 0 0; }
#map { position: relative; z-index: 0; isolation: isolate; contain: paint; height: 360px; border-radius: 12px; border: 1px solid var(--line); }
#form { z-index: 2; }
.opt { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin: 0 0 10px; cursor: pointer; background: var(--bg); }
.opt[aria-current=true] { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.opt h3 { margin: 0 0 6px; font-size: 1rem; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 8px; }
.opt h3 span { white-space: nowrap; }
.opt h3 span:last-child { color: var(--muted); font-weight: 400; }
.leg { display: flex; gap: 8px; align-items: baseline; margin: 4px 0; font-size: .95rem; }
.badge { flex: none; min-width: 2.2em; text-align: center; font-weight: 700; padding: 1px 6px; border-radius: 6px;
  background: var(--accent); color: var(--accent-ink); }
.walk .badge { background: none; color: var(--walk); border: 1px dashed var(--walk); }
.walk { color: var(--muted); }
.msg { margin: 0; color: var(--muted); }
.stop-pin { background: var(--accent); border: 2px solid #fff; border-radius: 50%; }
.pin { font-weight: 700; color: #fff; text-align: center; border: 2px solid #fff; border-radius: 50%; line-height: 22px; }
/* phones and narrow tablets: suggestions take their own space instead of floating over the controls and the map */
@media (max-width: 899px) {
  .suggest { position: static; margin: 6px 0 0; box-shadow: none; max-height: 220px; }
}
footer { padding: 14px 16px 22px; color: var(--muted); font-size: .8rem; text-align: center; }
footer p { max-width: 760px; margin: 0 auto; }
footer a { color: inherit; }

/* the place name sits on a coloured band across the top of its card, so the organiser is easy to find in a long list */
.place > h2 { margin: -14px -14px 12px; padding: 10px 14px; border-radius: 11px 11px 0 0; background: #27508f; color: #fff;
  text-align: center; font-size: 1.1rem; line-height: 1.3; overflow-wrap: anywhere; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .place > h2 { background: #a9c4f2; color: #0f2240; } }
:root[data-theme="dark"] .place > h2 { background: #a9c4f2; color: #0f2240; }

/* the one-line description on the category tiles: a brighter colour than the grey of ordinary notes (same blue as the place bands) */
.tile-d { color: #27508f; font-weight: 600; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .tile-d { color: #a9c4f2; } }
:root[data-theme="dark"] .tile-d { color: #a9c4f2; }
