/* Sugar Plum Momoo – list pages (events, treats, activities, winter magic).
   Separate from the home page's styles.css. Mobile first; breakpoints at
   600, 700, 900 and 1000px. Pages are generated by tools/build-lists.mjs. */

:root {
  /* Warm beige page, cream cards, crimson and soft pink accents (from the editor's mock). */
  --bg: #efe2d2;
  --bg-footer: #e9d9c6;
  --topbar-bg: #f7efe5;
  --card: #fcf8f2;
  --tile: #f9f2e9;
  --field: #fffcf8;
  --line: #e2cfbd;
  --line-soft: #ead9c9;

  --ink: #4b362d;            /* headings, names: 8.8:1 on the page */
  --text: #594840;           /* body copy: 8.2:1 on cards, 6.8:1 on the page */
  --muted: #6c5a50;          /* counts, notes: 5.1:1 on the page */
  --crimson: #a52a24;        /* script title, icons, links: 5.6:1 on the page */
  --crimson-deep: #8f201b;
  --brand-gold: #a6662c;     /* masthead wordmark (a logo): the Canva file's golden-brown sign lettering */
  --gold: #c8962f;

  --chip-bg: #f7eae0;
  --chip-active: #f1d4c5;
  --chip-line: #c9675a;
  --pill-bg: #f8eee6;
  --pill-active: #f4d9cf;
  --tag-bg: #f5e2d7;
  --tag-text: #84402f;       /* 6.0:1 on the tag pink */
  --tip-bg: #f6ece0;

  --ok-bg: #e2eedc;  --ok-text: #2a5d34;
  --rep-bg: #f6e6bf; --rep-text: #694507;
  --pend-bg: #ebe3db; --pend-text: #564a43;

  --focus: #1d3b57;
  --shadow-card: 0 1px 2px rgb(110 70 40 / 0.07), 0 8px 22px rgb(110 70 40 / 0.11);
  --shadow-soft: 0 2px 8px rgb(140 90 60 / 0.10);

  --font-display: "Merriweather", "Merriweather Fallback", Georgia, serif;
  --font-body: "Scheherazade New", "Scheherazade Fallback", "Times New Roman", Times, serif;
  --font-script: "Sacramento", "Snell Roundhand", "Segoe Script", cursive;

  --gutter: 16px;
  --maxw: 1080px;
  --radius: 16px;
}

/* Width-matched local fallbacks (same approach as the home page). */
@font-face {
  font-family: "Merriweather Fallback";
  src: local("Times New Roman"), local("TimesNewRomanPSMT"), local("Liberation Serif"), local("Tinos");
  font-weight: 400;
  size-adjust: 98%;
}
@font-face {
  font-family: "Scheherazade Fallback";
  src: local("Times New Roman"), local("TimesNewRomanPSMT"), local("Liberation Serif"), local("Tinos");
  font-weight: 400 700;
  size-adjust: 95%;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 1.125rem;
  line-height: 1.3;            /* Scheherazade New has very tall default metrics */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg { display: block; }
img { max-width: 100%; height: auto; }
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
/* Zero specificity, so list components (.chips, .featured-list …) can set their own
   margins and padding. */
:where(ul[class], .topbar-nav ul, .footer-nav ul) { list-style: none; margin: 0; padding: 0; }
[hidden] { display: none !important; }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 6px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 1em; height: 1em; flex: none; }
.icon--sm { width: 0.9em; height: 0.9em; }

/* Without JS the filters, hearts and bookmarks can't work, so they're hidden. */
html:not(.js) .needs-js { display: none !important; }

.skip-link {
  position: absolute;
  left: 12px;
  top: -100px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--crimson);
  color: #fff;
  text-decoration: none;
}
.skip-link:focus { top: 12px; }

.wrap {
  width: min(100% - 2 * var(--gutter), var(--maxw));
  margin-inline: auto;
}

/* =========================================================================
   Top bar
   ========================================================================= */

.topbar {
  background: var(--topbar-bg);
  border-bottom: 1px solid var(--line-soft);
}
.topbar-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0 20px;
  padding-block: 6px 0;
}
.topbar-brand {
  display: block;
  padding-block: 5px;
  border-radius: 8px;
}
.topbar-brand img { width: auto; height: 34px; }

.topbar-nav { flex: 1 1 100%; }
.topbar-nav ul {
  display: flex;
  justify-content: space-between;
  gap: 2px;
  overflow-x: auto;
  scrollbar-width: none;
}
.topbar-nav a {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 8px;
  color: var(--ink);
  font-size: 1.0625rem;
  text-decoration: none;
  white-space: nowrap;
}
.topbar-nav a:hover { color: var(--crimson); }
.topbar-nav a[aria-current="page"] {
  color: var(--crimson);
  font-weight: 700;
}
.topbar-nav a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 6px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
}

@media (min-width: 640px) {
  .topbar-inner { flex-wrap: nowrap; padding-block: 6px; }
  .topbar-nav { flex: 0 1 auto; }
  .topbar-nav ul { gap: 6px; }
  .topbar-nav a { padding: 0 12px; }
  .topbar-nav a[aria-current="page"]::after { left: 12px; right: 12px; }
}

/* =========================================================================
   Header band: bear · masthead · tree and village
   ========================================================================= */

.band {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-areas:
    "left right"
    "copy copy";
  align-items: end;
  column-gap: 8px;
  padding-top: 14px;
}
.band-art { pointer-events: none; user-select: none; }
.band-art--left { grid-area: left; justify-self: start; width: auto; height: 116px; }
.band-art--right { grid-area: right; justify-self: end; width: auto; height: 116px; }

.band-copy {
  grid-area: copy;
  text-align: center;
  padding-top: 6px;
}
.band-copy p { margin: 0; }

/* The home page logo (crown + wordmark), painted in the mock's golden brown. */
.band-logo {
  display: none;
  position: relative;
  width: clamp(230px, 28vw, 330px);
  aspect-ratio: 129.2 / 30.8;   /* logo.svg's frame */
  margin: 0 auto;
}
.band-crown {
  position: absolute;
  left: 42.67%;
  top: 0;
  width: 18.23%;
  height: auto;
}
.band-wordmark {
  position: absolute;
  inset: auto 0 0 0;
  width: 100%;
  height: 61.85%;
  color: var(--brand-gold);
}

.band-city {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 0.8125rem;
  letter-spacing: 0.42em;
  padding-left: 0.42em;          /* balance the trailing letter-space */
  text-transform: uppercase;
  color: var(--muted);
}

.band-title {
  margin: 0.14em 0 0;           /* the script's tall ascenders clear "NEW YORK CITY" */
  font-family: var(--font-script);
  font-weight: 400;
  font-size: clamp(2.45rem, 2.05rem + 1.5vw, 3.15rem);
  line-height: 1.12;
  color: var(--crimson);
  -webkit-text-stroke: 0.012em currentColor;   /* Sacramento's hairlines need a little weight */
}
.band-script { display: inline; }
.band-script .nowrap, .band-tagline .nowrap { white-space: nowrap; }
.band-heart {
  display: inline-block;
  width: 0.3em;
  height: 0.27em;
  margin-left: 0.3em;
  vertical-align: 0.12em;
  fill: currentColor;
}

.band-tagline {
  margin-top: 4px !important;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 0.75rem;
  line-height: 1.6;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text);
  text-wrap: balance;
}

/* The list intro sits under the "All …" heading, so the header stays compact. */
.intro {
  margin: -6px 0 18px;
  max-width: 70ch;
  color: var(--text);
  font-size: 1.0625rem;
  line-height: 1.35;
  text-wrap: pretty;
}

@media (min-width: 600px) {
  .band {
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    grid-template-areas: "left copy right";
    column-gap: 12px;
    padding-top: 16px;
  }
  .band-art--left, .band-art--right { width: 100%; height: auto; align-self: end; }
  .band-art--left { max-width: 170px; }
  .band-art--right { max-width: 200px; }
  .band-copy { align-self: center; padding: 0 0 6px; }
  .band-logo { display: block; width: clamp(200px, 26vw, 330px); }
  .band-city { margin-top: 6px !important; }
}
/* Desktop: a slim band like the editor's mock, so the featured row shows on the first screen. */
@media (min-width: 900px) {
  .band { padding-top: 8px; }
  .band-art--left { max-width: 178px; }
  .band-art--right { max-width: 198px; }
  .band-logo { width: clamp(220px, 19vw, 262px); }
  .band-copy { padding-bottom: 0; }
  .band-title { line-height: 1.06; }
  .band-tagline { font-size: 0.8125rem; }
}

/* =========================================================================
   Filters: chips, search, pills
   ========================================================================= */

.filters { margin-top: 18px; }
@media (min-width: 900px) { .filters { margin-top: 12px; } }

/* Scrollers are positioned so absolutely positioned descendants (visually hidden
   labels) stay inside them and never widen the page. */
.chips,
.pills,
.featured-list,
.topbar-nav ul { position: relative; }

.chips {
  display: flex;
  gap: 4px 14px;
  padding-top: 4px;
  padding-bottom: 6px;
}
.chips > li { flex: none; }
.chip {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  min-width: 76px;
  padding: 2px 4px 11px;
  border: 0;
  border-radius: 14px;
  background: none;
  color: var(--text);
  cursor: pointer;
}
.chip-icon {
  display: grid;
  place-items: center;
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: var(--chip-bg);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.7), var(--shadow-soft);
  transition: background-color 0.15s ease, transform 0.15s ease;
}
.chip-img {
  width: 76%;
  height: 76%;
  object-fit: contain;
}
.chip-label {
  font-size: 1rem;
  line-height: 1.1;
  white-space: nowrap;
}
.chip:hover .chip-icon { transform: translateY(-2px); }
.chip[aria-pressed="true"] .chip-icon { background: var(--chip-active); }
.chip[aria-pressed="true"] .chip-label { color: var(--ink); font-weight: 700; }
.chip[aria-pressed="true"]::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 2px;
  height: 3px;
  border-radius: 3px;
  background: var(--chip-line);
}

.search-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
}
.search-field {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 50px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--field);
  box-shadow: inset 0 1px 3px rgb(120 80 50 / 0.06), 0 1px 0 rgb(255 255 255 / 0.6);
}
.search-field:focus-within {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}
.search-icon {
  position: absolute;
  left: 17px;
  width: 20px;
  height: 20px;
  color: var(--muted);
  pointer-events: none;
}
.search-input {
  flex: 1;
  min-width: 0;
  height: 48px;
  padding: 0 6px 0 46px;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 1.0625rem;
}
.search-input:focus { outline: none; }
.search-input::placeholder { color: #75614f; opacity: 1; }   /* 5.7:1 */
.search-go {
  display: grid;
  place-items: center;
  flex: none;
  width: 44px;
  height: 44px;
  margin-right: 3px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.search-go svg { width: 22px; height: 22px; }
.search-go:hover { background: var(--chip-bg); color: var(--crimson); }

.pills {
  display: flex;
  gap: 10px;
  padding-top: 2px;
  padding-bottom: 4px;
}
.pill {
  position: relative;
  flex: none;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--pill-bg);
  color: var(--ink);
  font-size: 1rem;
  box-shadow: var(--shadow-soft);
}
.pill select {
  -webkit-appearance: none;
  appearance: none;
  min-height: 44px;
  padding: 0 34px 0 38px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
  field-sizing: content;       /* size to the chosen option where supported */
}
.pill select:focus { outline: none; }
.pill--select:focus-within { outline: 3px solid var(--focus); outline-offset: 2px; }
.pill-icon {
  position: absolute;
  left: 14px;
  width: 18px;
  height: 18px;
  color: var(--crimson);
  pointer-events: none;
}
.pill-caret {
  position: absolute;
  right: 12px;
  width: 16px;
  height: 16px;
  color: var(--ink);
  pointer-events: none;
}
.pill--select.is-set { background: var(--pill-active); border-color: #d9a597; }
.pill--toggle {
  gap: 8px;
  padding: 0 16px 0 14px;
  cursor: pointer;
}
a.pill { text-decoration: none; }
.pill--toggle .pill-icon { position: static; }
.pill-heart { fill: currentColor; }
.pill--toggle[aria-pressed="true"] {
  background: var(--pill-active);
  border-color: var(--crimson);
  font-weight: 700;
}
.pill--toggle:disabled {
  cursor: default;
  opacity: 0.6;
  box-shadow: none;
}
.pill-count { margin-left: -3px; font-weight: 400; }  /* the pill's 8px gap is too wide inside "Saved (2)" */

.filter-status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 18px;
  margin-top: 6px;
}
/* The aria-live status stays rendered even when empty (an empty <p> takes no space),
   so screen readers hear its first message. */
.status-text { margin: 0; color: var(--muted); font-size: 1rem; }
.status-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 44px;
  color: var(--crimson);
  font-size: 1rem;
  font-weight: 700;
  text-underline-offset: 3px;
}

@media (max-width: 759px) {
  .chips, .pills { overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none;
    margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter); scroll-padding-inline: var(--gutter); }
  /* A scroller clips overflow, so give focus rings (3px + 3px offset) room above and
     below; the negative margins keep the layout where it was. */
  .chips { padding-top: 8px; padding-bottom: 8px; margin-top: -4px; margin-bottom: -2px; }
  .pills { padding-top: 8px; padding-bottom: 8px; margin-top: -6px; margin-bottom: -4px; }
  .chips::-webkit-scrollbar, .pills::-webkit-scrollbar { display: none; }
  /* lists.js adds has-more while part of the row is hidden off the right edge. */
  .chips.has-more, .pills.has-more {
    -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 56px), transparent);
    mask-image: linear-gradient(to right, #000 calc(100% - 56px), transparent);
  }
}
@media (min-width: 760px) {
  .chips { gap: 4px 20px; padding-top: 0; padding-bottom: 0; }
  .chip { min-width: 84px; gap: 6px; padding-bottom: 9px; }
  .chip-icon { width: 64px; height: 64px; }
  .pills { flex-wrap: wrap; padding: 0; }
}
@media (min-width: 960px) {
  .search-row { flex-direction: row; align-items: center; gap: 14px; }
  .search-field { flex: 1 1 340px; max-width: 560px; }
}

/* While filtering, the page becomes a results list. */
.is-filtered .featured { display: none; }

/* =========================================================================
   Sections
   ========================================================================= */

.section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.45rem, 1.2rem + 0.9vw, 1.9rem);
  line-height: 1.2;
  color: var(--ink);
  font-variation-settings: "wdth" 87;
}
.section-title[tabindex="-1"]:focus { outline: none; }
.section-star { width: 20px; height: auto; margin-left: 4px; }
.section-bow { width: 34px; height: auto; margin-right: -2px; }

.featured { margin-top: 26px; }
@media (min-width: 900px) {
  .featured { margin-top: 14px; }
  .featured .section-title { margin-bottom: 10px; }
}
.areas { margin-top: 34px; }
.results { margin-top: 42px; scroll-margin-top: 12px; }
.results-count { color: var(--muted); font-size: 0.72em; }

/* =========================================================================
   Cards
   ========================================================================= */

.card {
  position: relative;          /* contains the visually hidden labels inside the carousel */
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow-card);
}
.card-media {
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--tile);
}
/* Absolutely placed, so the frame's aspect ratio (4:3, or 16:9 for featured cards on
   desktop) sets the height and the picture is cropped to it. */
.card-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.save-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: rgb(255 255 255 / 0.93);
  box-shadow: 0 2px 8px rgb(60 30 20 / 0.18);
  cursor: pointer;
  transition: transform 0.15s ease;
}
.save-btn svg {
  width: 22px;
  height: 20px;
  fill: transparent;
  stroke: var(--crimson);
  stroke-width: 2.3;
}
.save-btn[aria-pressed="true"] svg { fill: var(--crimson); }
.save-btn:hover { transform: scale(1.06); }

.hood-pill {
  position: absolute;
  left: 10px;
  bottom: 10px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: calc(100% - 20px);
  margin: 0;
  padding: 5px 12px 5px 8px;
  border-radius: 999px;
  background: rgb(255 255 255 / 0.95);
  box-shadow: 0 1px 6px rgb(60 30 20 / 0.14);
  color: var(--ink);
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1.2;
}
.hood-pill svg { width: 15px; height: 15px; color: var(--crimson); }

.card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 10px;
  padding: 13px 16px 14px;
}
.card-head { display: flex; align-items: flex-start; gap: 6px; }
.card-title {
  flex: 1;
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.2rem;
  line-height: 1.28;
  color: var(--ink);
  text-wrap: pretty;
}
.card-desc {
  margin: 0;
  color: var(--text);
  font-size: 1.0625rem;
  line-height: 1.3;
}

.meta-list { display: grid; gap: 5px; }
.meta {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 0;
  color: var(--text);
  font-size: 1rem;
  line-height: 1.25;
}
.meta svg {
  width: 18px;
  height: 18px;
  margin-top: 0.05em;
  color: var(--crimson);
}

.status {
  display: inline-flex;
  align-self: flex-start;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 3px 11px 3px 9px;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1.3;
}
.status-dot { flex: none; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status--confirmed { background: var(--ok-bg); color: var(--ok-text); }
.status--reported { background: var(--rep-bg); color: var(--rep-text); }
.status--pending,
.status--unconfirmed { background: var(--pend-bg); color: var(--pend-text); }

.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tags li {
  padding: 3px 11px;
  border-radius: 999px;
  background: var(--tag-bg);
  color: var(--tag-text);
  font-size: 0.875rem;
  line-height: 1.35;
}

.tip {
  margin: 0;
  padding: 8px 12px;
  border-radius: 10px;
  background: var(--tip-bg);
  color: var(--text);
  font-size: 1rem;
  line-height: 1.3;
}
.tip-label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-right: 2px;
  color: var(--crimson);
  font-weight: 700;
}
.tip-label svg { color: var(--gold); }

.official,
.details-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 44px;
  color: var(--crimson);
  font-size: 1rem;
  font-weight: 700;
  text-underline-offset: 3px;
}
.official { align-self: flex-start; margin-top: auto; margin-bottom: -8px; }
.official:hover, .details-link:hover { color: var(--crimson-deep); }

/* Featured: same card, bigger image, a gold edge. */
.card--featured {
  box-shadow: 0 0 0 1px #ead3a6, var(--shadow-card);
}
.card--featured .card-title { font-size: 1.28rem; }
/* Desktop: a wide, short picture and a two-line blurb, as in the editor's mock. The
   full description is on the item's card in the list below ("Details"). */
@media (min-width: 900px) {
  .card--featured .card-media { aspect-ratio: 2 / 1; }
  .card--featured .card-body { gap: 8px; padding: 11px 16px 12px; }
  .card--featured .card-title { font-size: 1.2rem; }
  .card--featured .card-desc {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
  }
  /* One row of tags; the full card below has them all. */
  .card--featured .tags { max-height: calc(1.35 * 0.875rem + 6px); overflow: hidden; }
  .card--featured .card-foot { gap: 2px 10px; }
  .card--featured .meta--dates { font-size: 0.9375rem; }
}
.card-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 12px;
  margin-top: auto;
  margin-bottom: -8px;
}
.card-foot .meta { flex: 1 1 auto; }
.details-link { margin-left: auto; }

.featured-list {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 86%;
  gap: 16px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  margin-inline: calc(-1 * var(--gutter));
  padding: 4px var(--gutter) 16px;
  scroll-padding-inline: var(--gutter);
}
.featured-list::-webkit-scrollbar { display: none; }
.featured-list > li { scroll-snap-align: start; }

@media (min-width: 600px) {
  .featured-list { grid-auto-columns: 46%; }
}
@media (min-width: 900px) {
  .featured-list {
    grid-auto-flow: row;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    overflow: visible;
    margin-inline: 0;
    padding: 0;
  }
}

/* =========================================================================
   By Neighborhood tiles
   ========================================================================= */

/* Flex rather than grid so a short last row (5, 6 or 7 areas) sits centred. */
.area-grid {
  --cols: 2;
  --gap: 12px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--gap);
}
.area-grid > li {
  flex: 0 0 calc((100% - (var(--cols) - 1) * var(--gap)) / var(--cols));
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.area-map-link { display: grid; place-items: center; min-height: 44px; padding: 5px 4px; color: var(--crimson); text-align: center; text-underline-offset: 3px; }
.area-grid > li > .area-tile { flex: 1; height: auto; }
.area-tile {
  isolation: isolate;          /* the multiply blend only mixes with the tile */
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  padding: 10px 10px 14px;
  border-radius: var(--radius);
  background: var(--tile);
  box-shadow: var(--shadow-card);
  color: var(--ink);
  text-align: center;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.area-art { display: block; width: 100%; aspect-ratio: 3 / 2; }
.area-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  mix-blend-mode: multiply;    /* the art's cream ground melts into the tile */
  filter: brightness(1.03);
  /* Soften the image edge so a ground that's a shade off the tile never shows a box. */
  -webkit-mask-image: radial-gradient(ellipse 58% 60% at 50% 50%, #000 72%, transparent 100%);
  mask-image: radial-gradient(ellipse 58% 60% at 50% 50%, #000 72%, transparent 100%);
}
.area-name {
  margin-top: 6px;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.05rem;
  line-height: 1.25;
}
.area-count { margin-top: 2px; color: var(--muted); font-size: 0.9375rem; }
.area-arrow {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin-top: 8px;
  border-radius: 50%;
  background: var(--chip-active);
  color: var(--crimson);
}
.area-arrow svg { width: 18px; height: 18px; }
.area-tile:hover { transform: translateY(-2px); box-shadow: 0 2px 4px rgb(110 70 40 / 0.08), 0 12px 26px rgb(110 70 40 / 0.14); }
.area-tile:focus-visible { outline-offset: 4px; border-radius: var(--radius); }

@media (min-width: 700px) {
  .area-grid { --cols: 4; --gap: 16px; }
  .area-name { font-size: 1.2rem; }
}
@media (min-width: 1000px) {
  .area-art { aspect-ratio: 2 / 1; }
  .area-name { font-size: 1.3rem; }
  .area-count { font-size: 1rem; }
}

/* =========================================================================
   All items
   ========================================================================= */

.card-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
}
@media (min-width: 640px) {
  .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1000px) {
  .card-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
}

.no-results {
  margin: 0;
  padding: 22px 18px;
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow-card);
  text-align: center;
}
.no-results a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--crimson);
  font-weight: 700;
  text-underline-offset: 3px;
}

.list-note {
  margin-top: 34px;
  padding: 16px 8px 0;
  border-top: 1px dashed var(--line);
  color: var(--muted);
  font-size: 1rem;
  text-align: center;
}
.list-note p { margin: 0 0 4px; }

/* =========================================================================
   Footer
   ========================================================================= */

.list-footer {
  margin-top: 44px;
  padding-bottom: 26px;
  border-top: 1px solid var(--line-soft);
  background: var(--bg-footer);
  text-align: center;
}
.footer-garland {
  width: min(380px, 86%);
  height: auto;
  margin: -22px auto 0;
  pointer-events: none;
}
.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding-top: 8px;
}
.footer-logo { display: block; padding: 4px; border-radius: 8px; }
.footer-logo img { width: 210px; height: auto; }
.footer-tagline {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1rem;
  color: var(--ink);
}
.footer-nav ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0 4px;
}
.footer-nav a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 10px;
  color: var(--ink);
  text-underline-offset: 3px;
}
.footer-nav a:hover { color: var(--crimson); }
.footer-copy { margin: 0; color: var(--muted); font-size: 0.9375rem; }

/* =========================================================================
   Motion and print
   ========================================================================= */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition: none !important;
    animation: none !important;
    scroll-behavior: auto !important;
  }
}

@media print {
  .topbar-nav, .filters, .save-btn, .areas, .footer-garland { display: none !important; }
  body, html { background: #fff; }
  .card, .area-tile { box-shadow: none; border: 1px solid #ccc; }
  .is-filtered .featured { display: block; }
}
