/* Toddle Chch: Kindy Art Wall. Flat sugar paper on white, ink navy type, Andika. */
@font-face { font-family: Andika; font-style: normal; font-weight: 400; font-display: swap;
  src: url(assets/fonts/andika-400-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: Andika; font-style: normal; font-weight: 400; font-display: swap;
  src: url(assets/fonts/andika-400-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: Andika; font-style: normal; font-weight: 700; font-display: swap;
  src: url(assets/fonts/andika-700-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: Andika; font-style: normal; font-weight: 700; font-display: swap;
  src: url(assets/fonts/andika-700-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  /* Peach & Oat (Mitch's palette) on near-white paper, with deeper accents of the same family for contrast.
     Pins: coral (play), sage (outdoors), apricot (splash and learn), cocoa (coffee). Text and pressed states in ink cocoa. */
  --vanilla: #faf3e8; --oat: #e8d8c5; --peach: #f1c4ad; --rose: #d8a39d; --cocoa: #96766a;
  --coral: #d06a62; --sage: #6f8c5c; --apricot: #e9a06e; --cocoa-deep: #7a5c51; --ink: #4a3630; --ink-2: #6e5850;
  --paper: #fffdf9; --card: #fff; --line: #ecdfd1; --wash: var(--vanilla);
  --ok: #4f7a3a; --warn: #98581a; --stop: #a8453a;
  --dot-open: #6f9c55; --dot-closing: #e39b4f; --dot-closed: var(--coral);
  --cut: 13px 10px 12px 9px;
  --lift: 1px 2px 0 rgb(74 54 48 / .08), 2px 5px 12px rgb(74 54 48 / .18);
  --peek: calc(72px + env(safe-area-inset-bottom, 0px)); /* grip + count row only; keep app.js snapPx in step */
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font: 400 16px/1.45 Andika, system-ui, sans-serif; color: var(--ink); background: var(--paper);
  overflow: hidden; -webkit-tap-highlight-color: transparent; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--cocoa-deep); text-underline-offset: 2px; }
svg { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }

/* ---------- frame ---------- */
.app { height: 100dvh; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto minmax(0, 1fr); grid-template-areas: "band" "picks" "map"; }
.band { grid-area: band; background: var(--peach); color: var(--ink); padding: calc(env(safe-area-inset-top) + 8px) 14px 10px; }
.band-top { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.brand { margin: 0; flex: none; font-size: 22px; line-height: 1.2; font-weight: 700; letter-spacing: .01em; }
.brand span { display: inline-block; background: var(--card); color: var(--ink); padding: 1px 9px 2px; margin-right: 3px;
  border-radius: var(--cut); transform: rotate(-2.5deg); box-shadow: 1px 2px 0 rgb(74 54 48 / .18); }
.ages { display: flex; align-items: center; gap: 6px; }
.ages-label { font-size: 15px; margin-right: 2px; }
.ages button { min-height: 40px; padding: 0 9px; border: 0; border-radius: var(--cut); background: rgb(255 255 255 / .7);
  color: var(--ink); font-weight: 700; font-size: 15px; transition: background .15s, transform .15s; }
.ages button[aria-pressed="true"] { background: var(--ink); color: #fff; transform: rotate(-1.5deg); box-shadow: 1px 2px 0 rgb(74 54 48 / .25); }

.picks { grid-area: picks; display: flex; gap: 8px; padding: 8px 12px; overflow-x: auto; scrollbar-width: none;
  border-bottom: 1px solid var(--line); background: var(--paper); position: relative; z-index: 2; }
.picks::-webkit-scrollbar { display: none; }
.picks { mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent); scroll-padding-inline: 12px 36px; }
.picks-row { display: contents; }
.chip { flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px;
  border: 2px solid var(--line); border-radius: var(--cut); background: var(--card); font-weight: 700; font-size: 15px;
  white-space: nowrap; transition: background .15s, border-color .15s, transform .15s; }
.chip svg { width: 18px; height: 18px; }
.chip[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: transparent;
  box-shadow: var(--lift); transform: rotate(-1deg); }
.chip-filters b { min-width: 22px; height: 22px; border-radius: 11px; background: var(--cocoa-deep); color: #fff; font-size: 13px;
  display: inline-grid; place-items: center; padding: 0 6px; }

.mapwrap { grid-area: map; position: relative; min-height: 0; }
#map { position: absolute; inset: 0; background: var(--vanilla); }
.near-me { position: absolute; right: 12px; bottom: calc(var(--peek) + 14px); z-index: 2; display: inline-flex; align-items: center;
  gap: 6px; min-height: 44px; padding: 0 14px; border: 0; border-radius: var(--cut); background: var(--card);
  font-weight: 700; box-shadow: var(--lift); }
.near-me[aria-pressed="true"] { background: var(--cocoa-deep); color: #fff; }
.maplibregl-ctrl-attrib { font-family: Andika, system-ui, sans-serif; }

/* ---------- sheet (mobile) ---------- */
.sheet { grid-area: map; align-self: end; position: relative; z-index: 3; height: var(--peek); max-height: 100%; display: flex; flex-direction: column;
  background: var(--paper); border-radius: 18px 18px 0 0; box-shadow: 0 -2px 0 rgb(74 54 48 / .05), 0 -6px 20px rgb(74 54 48 / .14);
  transition: height .26s cubic-bezier(.2,.8,.2,1); padding-bottom: env(safe-area-inset-bottom); }
.sheet[data-state="half"] { height: 56dvh; }
.sheet[data-state="full"] { height: 100%; }
@media (max-width: 899px) {
  .app:has(.sheet[data-state="half"]) .near-me { bottom: calc(56dvh + 14px); }
  .app:has(.sheet[data-state="full"]) .mapwrap { visibility: hidden; }
  .list-head .towns { flex-wrap: nowrap; overflow-x: auto; }
}
.sheet.dragging { transition: none; }
.sheet[data-state="peek"] #count small { display: none; } /* peek stays one line: handle + count */
.sheet[data-state="peek"] #list-view { overflow: hidden; }
.grip { flex: none; height: 24px; display: grid; place-items: center; touch-action: none; cursor: grab; border: 0; background: none; }
.grip span { width: 44px; height: 5px; border-radius: 3px; background: var(--oat); }
#list-view, .card { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }

.list-head { padding: 0 16px; }
.search { flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 10px; border-radius: var(--cut);
  background: var(--card); color: var(--ink); border: 2px solid transparent; }
.search:focus-within { border-color: var(--cocoa-deep); }
.search svg { color: var(--ink-2); }
.search input { flex: 1; min-width: 0; border: 0; background: none; padding: 8px 0; outline: none; font-size: 16px; }
.search input::placeholder { color: var(--ink-2); }
.count-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 44px; touch-action: none; }
#count { margin: 0; font-weight: 700; }
#count small { display: block; font-weight: 400; color: var(--ink-2); font-size: 14px; }
.icon-btn { width: 44px; height: 44px; display: grid; place-items: center; border: 0; border-radius: var(--cut); background: none; }
.icon-btn:hover { background: var(--wash); }
.note { margin: 0 0 8px; font-size: 14px; color: var(--ink-2); }
.note .link-btn { display: inline; min-height: 0; padding: 0; font-size: 14px; color: var(--ink); }
.towns { display: flex; flex-wrap: wrap; gap: 6px; padding: 2px 0 8px; }
.towns .chip { min-height: 36px; padding: 0 12px; font-size: 14px; }

/* list rows: strict grid so distance, price, status and facilities line up */
.list { list-style: none; margin: 0; padding: 0; }
.row { width: 100%; display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; column-gap: 12px;
  grid-template-areas: "tile name dist" "tile meta price" "tile status amen"; align-items: baseline;
  padding: 12px 16px; border: 0; border-top: 1px solid var(--line); background: none; text-align: left; }
.row:hover { background: var(--wash); }
.tile { grid-area: tile; align-self: start; width: 44px; height: 44px; display: grid; place-items: center; border-radius: var(--cut);
  background: var(--c); color: var(--on); transform: rotate(var(--r, -2deg)); box-shadow: 1px 2px 0 rgb(74 54 48 / .12); }
.tile svg { width: 24px; height: 24px; stroke-width: 2.25; }
.row .name { grid-area: name; font-weight: 700; font-size: 17px; line-height: 1.25; }
.row .meta { grid-area: meta; color: var(--ink-2); font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .dist { grid-area: dist; font-weight: 700; font-size: 15px; font-variant-numeric: tabular-nums; text-align: right; }
.row .price { grid-area: price; font-size: 14px; text-align: right; color: var(--ink-2); white-space: nowrap; max-width: 6.5em; overflow: hidden; text-overflow: ellipsis; }
.row .price.free { color: var(--ok); font-weight: 700; }
.row .status { grid-area: status; margin-top: 4px; min-width: 0; }
.row .status span, .row .status { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.row .status:empty::before { display: none; }
.row .status.ses { white-space: normal; } /* session times never truncate */
.row .status::before { display: inline-block; margin: 0 6px 0 0; vertical-align: 1px; }
.row .amen { grid-area: amen; margin-top: 4px; display: flex; gap: 6px; justify-content: flex-end; color: var(--ink-2); }
.row .amen svg { width: 18px; height: 18px; }
.row.bulk { padding-block: 9px; grid-template-areas: "tile name dist" "tile meta price"; }
.row.bulk .tile { width: 32px; height: 32px; margin-left: 6px; }
.row.bulk .tile svg { width: 18px; height: 18px; }
.row.bulk .name { font-size: 16px; }
.gem-mark { color: var(--cocoa-deep); width: 16px; height: 16px; vertical-align: -2px; margin-left: 4px; }
.group-head { padding: 16px 16px 6px; margin: 0; font-size: 15px; color: var(--ink-2); border-top: 1px solid var(--line); }

.status { font-size: 14px; color: var(--ink-2); display: inline-flex; align-items: flex-start; gap: 6px; }
.status::before { content: ""; width: 9px; height: 9px; margin-top: .5em; border-radius: 50%; background: var(--oat); flex: none; }
.st-open, .st-access { color: var(--ok); } .st-open::before, .st-access::before { background: var(--dot-open); }
.st-closing { color: var(--warn); } .st-closing::before { background: var(--dot-closing); }
.st-closed { color: var(--stop); } .st-closed::before { background: var(--dot-closed); }

.empty { margin: 8px 16px 16px; padding: 14px; border-radius: var(--cut); background: var(--wash); }
.more, .link-btn { display: block; margin: 8px auto 16px; min-height: 44px; padding: 0 18px; border: 2px solid var(--line);
  border-radius: var(--cut); background: var(--card); font-weight: 700; }
.link-btn { border: 0; text-decoration: underline; text-underline-offset: 3px; margin: 0; }
.foot { padding: 12px 16px 24px; font-size: 13px; color: var(--ink-2); border-top: 1px solid var(--line); }
.foot a#suggest { display: inline-block; font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.foot p { margin: 0; }

/* ---------- card ---------- */
.card { padding: 0 16px 28px; }
.card-nav { display: flex; justify-content: space-between; align-items: center; margin: 0 -8px; position: sticky; top: 0;
  background: var(--paper); z-index: 1; }
.back { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; padding: 0 8px; border: 0; background: none; font-weight: 700; }
.title:focus { outline: none; }
.title { display: inline-block; margin: 6px 0 8px; padding: 6px 14px 7px; font-size: 24px; line-height: 1.2; font-weight: 700;
  background: var(--c); color: var(--on); border-radius: var(--cut); transform: rotate(-1.2deg); box-shadow: var(--lift); max-width: 100%; }
.sub { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; color: var(--ink-2); font-size: 15px; margin-bottom: 12px; }
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border-radius: var(--cut); background: var(--cocoa-deep);
  color: #fff; font-weight: 700; font-size: 13px; }
.badge svg { width: 14px; height: 14px; }
.google { margin: 4px -4px 14px; min-height: 40px; }
.g-photo { margin: 6px 0 14px; min-height: 220px; border-radius: var(--cut); overflow: hidden; background: var(--wash); box-shadow: var(--lift); }
.g-photo gmp-place-details-compact { width: 100%; color-scheme: light; --gmp-mat-font-family: Andika, system-ui, sans-serif; }
.google gmp-place-details { width: 100%; --gmp-mat-font-family: Andika, system-ui, sans-serif; --gmp-mat-color-primary: var(--cocoa-deep);
  --gmp-mat-color-on-surface: var(--ink); --gmp-mat-color-surface: var(--card); border-radius: var(--cut); color-scheme: light; }
.why { font-size: 17px; line-height: 1.5; margin: 0 0 14px; }
.pg-photo { margin: 6px 0 14px; }
.pg-photo a { display: block; transform: rotate(.8deg); }
.pg-photo img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--cut); box-shadow: var(--lift); background: var(--wash); }
.pg-photo figcaption { font-size: 13px; color: var(--ink-2); margin-top: 8px; }
.no-photo { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; width: 100%;
  aspect-ratio: 4 / 3; margin: 6px 0 14px; padding: 0; border: 0; border-radius: var(--cut); box-shadow: var(--lift);
  background: color-mix(in srgb, var(--c) 16%, var(--wash)); color: var(--ink-2); font: inherit; font-size: 15px; transform: rotate(-.6deg); }
.no-photo svg { width: 56px; height: 56px; stroke: var(--c); }
button.no-photo { cursor: pointer; color: var(--ink); font-weight: 700; }
.kit { margin: -4px 0 14px; font-size: 16px; }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 16px; margin: 0 0 14px; padding: 12px 14px;
  background: var(--wash); border-radius: var(--cut); }
.facts div { min-width: 0; }
.facts dt { font-size: 13px; color: var(--ink-2); }
.facts dd { margin: 0; font-weight: 700; font-size: 15px; }
.facts .wide { grid-column: 1 / -1; }
.facts .status { font-weight: 700; font-size: 15px; }
.sessions { margin: 0 0 14px; padding: 12px 14px; background: var(--wash); border-radius: var(--cut); }
.sessions h3 { margin: 0 0 2px; font-size: 13px; font-weight: 400; color: var(--ink-2); }
.sessions .status { display: flex; margin: 0 0 8px; font-weight: 700; font-size: 15px; }
.sessions ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; font-size: 15px; }
.sessions small { display: block; color: var(--ink-2); font-size: 13px; }
.has { display: flex; flex-wrap: wrap; gap: 6px 14px; list-style: none; padding: 0; margin: 0 0 14px; font-size: 15px; }
.has li { display: inline-flex; align-items: center; gap: 6px; }
.has svg { width: 18px; height: 18px; color: var(--ok); }
.has .no { color: var(--ink-2); }
.has .no svg { color: var(--ink-2); }
.tip { margin: 0 0 16px; padding: 12px 14px; background: #fde2d2; border-radius: 3px 4px 3px 5px; transform: rotate(.6deg);
  box-shadow: 1px 3px 8px rgb(74 54 48 / .14); }
.tip b { display: block; font-size: 14px; }
.actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 8px; margin-bottom: 14px; }
.actions a, .actions button { display: inline-flex; justify-content: center; align-items: center; gap: 6px; min-height: 48px;
  padding: 0 10px; border-radius: var(--cut); border: 2px solid var(--line); background: var(--card); color: var(--ink);
  font-weight: 700; text-decoration: none; }
.actions .primary { background: var(--cocoa-deep); border-color: var(--cocoa-deep); color: #fff; }
.wide-btn { width: 100%; justify-content: center; }
.fine { font-size: 13px; color: var(--ink-2); margin: 10px 0 0; }

/* ---------- filters dialog ---------- */
.filters { width: 100%; max-width: 100%; max-height: 88dvh; margin: auto 0 0; padding: 0; border: 0;
  border-radius: 18px 18px 0 0; color: var(--ink); background: var(--paper); box-shadow: var(--lift); }
.filters::backdrop { background: rgb(74 54 48 / .42); }
.filters form { display: flex; flex-direction: column; max-height: 88dvh; }
.filters header, .filters footer { display: flex; align-items: center; justify-content: space-between; padding: 8px 8px 8px 20px; }
.filters h2 { margin: 0; font-size: 20px; }
.filters-body { overflow-y: auto; padding: 0 20px 8px; }
.filters fieldset { border: 0; margin: 0 0 14px; padding: 0; min-width: 0; }
.filters legend { font-weight: 700; padding: 0; margin-bottom: 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.filters footer { border-top: 1px solid var(--line); padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); gap: 12px; }
.go { flex: 1; min-height: 48px; border: 0; border-radius: var(--cut); background: var(--cocoa-deep); color: #fff; font-weight: 700; font-size: 17px; }

.toast { position: fixed; left: 50%; bottom: calc(var(--peek) + 72px); z-index: 10; margin: 0; transform: translate(-50%, 8px);
  padding: 10px 16px; border-radius: var(--cut); background: var(--ink); color: #fff; font-weight: 700; opacity: 0;
  pointer-events: none; transition: opacity .2s, transform .2s; max-width: calc(100vw - 32px); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* map popup-free marker label font comes from tiles; keep MapLibre controls on paper */
.maplibregl-ctrl-group { border-radius: var(--cut) !important; box-shadow: var(--lift) !important; }

/* ---------- desktop ---------- */
@media (min-width: 900px) {
  .app { grid-template-columns: 440px 1fr; grid-template-rows: auto auto 1fr;
    grid-template-areas: "band map" "picks map" "sheet map"; }
  .picks { flex-wrap: wrap; overflow: visible; gap: 6px; mask-image: none; }
  .picks .chip { min-height: 36px; padding: 0 10px; font-size: 14px; }
  .sheet, .sheet[data-state] { grid-area: sheet; align-self: stretch; position: static; height: auto; min-height: 0; border-radius: 0; box-shadow: none;
    border-right: 1px solid var(--line); transition: none; }
  .picks, .band { border-right: 1px solid var(--line); }
  .grip { display: none; }
  .list-head { padding-top: 8px; }
  .row .price { max-width: 10em; }
  .near-me { bottom: 28px; right: 16px; }
  .toast { bottom: 32px; left: calc(440px + (100vw - 440px) / 2); }
  .filters { max-width: 520px; margin: auto; border-radius: 18px; }
}

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