@font-face {
  font-family: "Mountains of Christmas";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../vendor/fonts/MountainsOfChristmas-Bold.woff2") format("woff2");
}

:root {
  --ink: #1C2E22;
  --ink-soft: #4A5C4E;
  --pine: #1F4D3A;
  --pine-dark: #16382B;
  --pine-light: #6FA08A;
  --cream: #F8F3E8;
  --snow: #FBF7F0;
  --paper: #FFFFFF;
  --gold: #C4A35A;
  --flotilla: #1B5C7A;
  --gold-dark: #8E6F2E;
  --berry: #8B2E3A;
  --nativity: #6B3FA0;
  --parade: #B33A3A;
  --market: #2E6B4F;
  --worship: #2C4A6E;
  --thanksgiving: #C46B1F;
  --muted: #5c6b7a;
  --shadow: 0 8px 24px rgba(28, 46, 34, 0.14);
  --radius: 10px;
  --header-h: 56px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --app-height: 100svh;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
html {
  height: 100%;
  height: 100svh;
  height: var(--app-height, 100svh);
}
body {
  height: 100%;
  height: 100svh;
  height: var(--app-height, 100svh);
  max-height: 100%;
  max-height: 100svh;
  max-height: var(--app-height, 100svh);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--cream);
  color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: "Trebuchet MS", "Segoe UI Rounded", ui-rounded, system-ui, sans-serif;
  margin: 0;
  line-height: 1.15;
  color: var(--ink);
}

a { color: var(--pine-dark); }
a:focus-visible, button:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

.skip {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--ink);
  color: #fff;
  padding: 8px 12px;
  z-index: 4000;
}
.skip:focus { left: 8px; top: 8px; }

.preview-banner {
  flex: 0 0 auto;
  background: var(--gold);
  color: var(--pine-dark);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-align: center;
  text-transform: uppercase;
  padding: 4px 10px;
  padding-top: max(4px, var(--safe-top));
}

/* ---------- Header ---------- */
header.app-header {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  flex: 0 0 auto;
  padding: 0;
  background:
    radial-gradient(circle at 12% 40%, rgba(255,255,255,0.9) 0 1.1px, transparent 1.4px),
    radial-gradient(circle at 48% 70%, rgba(255,255,255,0.85) 0 1px, transparent 1.3px),
    radial-gradient(circle at 78% 30%, rgba(255,255,255,0.9) 0 1.2px, transparent 1.5px),
    var(--snow);
  background-size: 42px 28px, 36px 24px, 50px 30px, auto;
  z-index: 20;
}
.light-strand {
  flex: 0 0 auto;
  height: 20px;
  overflow: visible;
  line-height: 0;
  pointer-events: none;
  z-index: 2;
}
.light-strand-svg {
  display: block;
  width: 100%;
  height: 20px;
  overflow: visible;
}
.c9-glow {
  animation: twinkle 2.4s ease-in-out infinite;
}
.c9-1 .c9-glow, .c9-4 .c9-glow { animation-delay: 0.4s; }
.c9-2 .c9-glow, .c9-5 .c9-glow { animation-delay: 1.1s; }
.c9-3 .c9-glow { animation-delay: 1.8s; }
@keyframes twinkle {
  0%, 100% { opacity: 0.35; }
  50% { opacity: 0.8; }
}
@media (prefers-reduced-motion: reduce) {
  .c9-glow { animation: none; opacity: 0.5; }
}
.header-main {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 1px 10px 3px;
  min-height: 42px;
  z-index: 1;
}
.header-festoon { flex: 0 0 auto; line-height: 0; }
.header-awning {
  height: 5px;
  background: repeating-linear-gradient(
    135deg,
    #8B2E3A 0 7px,
    #F8F3E8 7px 14px
  );
}
.header-treeline {
  height: 12px;
  background-color: transparent;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 160 14'%3E%3Cpath fill='%231F4D3A' d='M0 14 L0 11 L4 6 L8 11 L8 14 Z'/%3E%3Cpath fill='%2316382B' d='M10 14 L14 4.5 L18 14 Z'/%3E%3Cpath fill='%231F4D3A' d='M17 14 L22 7 L27 14 Z'/%3E%3Cpath fill='%237A2430' d='M30 14 L30 9 L36 5 L42 9 L42 14 Z'/%3E%3Crect x='32' y='9' width='8' height='5' fill='%237A2430'/%3E%3Cpath fill='%2316382B' d='M44 14 L49 3.5 L54 14 Z'/%3E%3Cpath fill='%231F4D3A' d='M53 14 L57 8 L61 14 Z'/%3E%3Cpath fill='%231F4D3A' d='M62 14 L68 5 L74 14 Z'/%3E%3Cpath fill='%237A2430' d='M76 14 L76 9.5 L81 6 L86 9.5 L86 14 Z'/%3E%3Cpath fill='%2316382B' d='M88 14 L93 4 L98 14 Z'/%3E%3Cpath fill='%231F4D3A' d='M97 14 L101 8.5 L105 14 Z'/%3E%3Cpath fill='%231F4D3A' d='M108 14 L114 5.5 L120 14 Z'/%3E%3Cpath fill='%2316382B' d='M119 14 L123 9 L127 14 Z'/%3E%3Cpath fill='%231F4D3A' d='M128 14 L134 3 L140 14 Z'/%3E%3Cpath fill='%237A2430' d='M142 14 L142 9 L148 5.5 L154 9 L154 14 Z'/%3E%3Cpath fill='%2316382B' d='M154 14 L158 8 L160 11 L160 14 Z'/%3E%3C/svg%3E");
  background-repeat: repeat-x;
  background-position: bottom;
  background-size: 160px 12px;
}
@media (max-width: 719px) {
  body.short-viewport .header-treeline { height: 8px; background-size: 140px 8px; }
  body.short-viewport .light-strand,
  body.short-viewport .light-strand-svg { height: 16px; }
}
header .brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
  color: inherit;
}
header .brand .titles { min-width: 0; }
header .brand h1 {
  font-family: "Mountains of Christmas", "Trebuchet MS", Georgia, serif;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--berry);
  line-height: 1.05;
}
@media (max-width: 390px) {
  header .brand h1 { font-size: 1.32rem; }
}
header .brand p {
  margin: 1px 0 0;
  font-size: 0.68rem;
  color: var(--ink-soft);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
@media (max-width: 520px) {
  header .brand p {
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
  }
  header .brand .sub-sep { display: none; }
  header .brand .sub-line { display: block; }
}
.header-actions { flex: 0 0 auto; }
.header-actions .primary {
  appearance: none;
  border: 0;
  background: var(--pine);
  color: #fff;
  font-weight: 700;
  font-size: 0.86rem;
  padding: 8px 14px;
  min-height: 40px;
  border-radius: 999px;
  cursor: pointer;
}

.ended-note {
  flex: 0 0 auto;
  background: var(--berry);
  color: #fff;
  text-align: center;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 6px 12px;
  line-height: 1.3;
}
.ended-note[hidden] { display: none; }

/* ---------- Map ---------- */
#map {
  flex: 1 1 auto;
  min-height: 0;
  position: relative;
  background: #d8e4dc;
}
.leaflet-container { font: inherit; background: #d8e4dc; }

.locate-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 1000;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  border: 1px solid #c9d6df;
  background: #fff;
  color: var(--ink);
  font-size: 18px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(28,46,34,0.15);
  line-height: 1;
}
#map.popup-open .locate-btn { z-index: 350; }

/* Pins */
.pin-wrap { background: transparent; border: 0; }
.pin {
  width: 30px;
  height: 30px;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  border: 2px solid #fff;
  box-shadow: 0 2px 6px rgba(28,46,34,0.35);
  display: flex;
  align-items: center;
  justify-content: center;
}
.pin-face {
  display: block;
  width: 16px;
  height: 16px;
  transform: rotate(45deg) translate(-1px, -1px);
  line-height: 0;
}
.type-glyph {
  display: block;
  width: 16px;
  height: 16px;
  fill: currentColor;
}
.pin.village { background: var(--pine); color: #fff; }
.pin.lights { background: var(--gold); color: var(--pine-dark); }
.pin.flotilla { background: var(--flotilla); color: #fff; }
.pin.nativity { background: var(--nativity); color: #fff; }
.pin.santa { background: var(--berry); color: #fff; }
.pin.parade { background: var(--parade); color: #fff; }
.pin.market { background: var(--market); color: #fff; }
.pin.worship { background: var(--worship); color: #fff; }
.pin.thanksgiving { background: var(--thanksgiving); color: #fff; }
.pin.is-dim { filter: grayscale(0.6) opacity(0.42); }
.leaflet-marker-pane .pin-wrap { background: transparent; border: 0; }

/* Popups */
.leaflet-popup-content-wrapper {
  border-radius: 12px;
  box-shadow: var(--shadow);
}
.leaflet-popup-content {
  margin: 12px 36px 14px 14px;
  min-width: 0;
  max-width: var(--popup-max-w, 260px);
  font-size: 0.88rem;
  max-height: var(--popup-max-h, none);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}
.leaflet-container a.leaflet-popup-close-button {
  width: 44px;
  height: 44px;
  padding: 0;
  font: 700 28px/44px system-ui, "Segoe UI", Tahoma, sans-serif;
  color: var(--ink);
  text-align: center;
  z-index: 2;
  -webkit-tap-highlight-color: transparent;
}
.leaflet-popup-scrolled {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}
.popup-card h3 {
  font-size: 1.02rem;
  font-weight: 800;
  margin: 0 0 2px;
}
.popup-card .host {
  margin: 0 0 6px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--pine-dark);
}
.popup-card .addr,
.popup-card .walk,
.popup-card .hours-note,
.popup-card .price,
.popup-card .notes {
  margin: 0 0 6px;
  font-size: 0.78rem;
  color: var(--ink-soft);
}
.popup-card .price { font-weight: 700; color: var(--ink); }
.popup-card .hours {
  list-style: none;
  margin: 0 0 8px;
  padding: 0;
  font-size: 0.8rem;
}
.popup-card .hours li {
  padding: 2px 0;
}
.popup-card .hours li.is-today {
  font-weight: 700;
  color: var(--ink);
  background: var(--cream);
  margin: 0 -6px;
  padding: 3px 6px;
  border-radius: 6px;
}
.popup-card .features {
  margin: 0 0 8px;
  padding: 0 0 0 1.1em;
  font-size: 0.8rem;
}
.popup-card .features li { margin: 0 0 2px; }
.popup-card .blurb {
  margin: 0 0 8px;
  font-size: 0.8rem;
}
.popup-card .links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-top: 4px;
}
.popup-card .links a {
  font-weight: 700;
  font-size: 0.82rem;
}

/* Legend locked to the map */
.leaflet-bottom.leaflet-left {
  max-width: calc(100% - 8.75rem);
}
.map-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  max-width: 100%;
  margin: 0 0 8px 8px;
  padding: 5px 8px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(28, 46, 34, 0.12);
  border-radius: 8px;
  box-shadow: 0 1px 6px rgba(28, 46, 34, 0.16);
  color: var(--ink);
  font-size: 0.68rem;
  font-weight: 650;
  line-height: 1.15;
  pointer-events: auto;
}
.map-legend .swatch {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  margin-right: 3px;
  vertical-align: -3px;
  border: 1px solid rgba(255,255,255,0.85);
  box-shadow: 0 0 0 1px rgba(28,46,34,0.15);
  color: #fff;
}
.map-legend .swatch .type-glyph {
  width: 11px;
  height: 11px;
}
.map-legend .swatch.village { background: var(--pine); }
.map-legend .swatch.lights { background: var(--gold); color: var(--pine-dark); }
.map-legend .swatch.flotilla { background: var(--flotilla); }
.map-legend .swatch.nativity { background: var(--nativity); }
.map-legend .swatch.santa { background: var(--berry); }
.map-legend .swatch.parade { background: var(--parade); }
.map-legend .swatch.market { background: var(--market); }
.map-legend .swatch.worship { background: var(--worship); }
.map-legend .swatch.thanksgiving { background: var(--thanksgiving); }

@media (max-width: 719px) {
  .leaflet-bottom.leaflet-left {
    max-width: calc(100% - 7.25rem);
  }
  .leaflet-bottom.leaflet-left .map-legend {
    flex-wrap: wrap;
    font-size: 0.6rem;
    gap: 3px 7px;
    padding: 3px 7px;
    margin: 0 8px 22px 8px;
    border-radius: 6px;
    max-width: calc(100vw - 24px);
  }
  .map-legend .swatch { width: 14px; height: 14px; }
  .map-legend .swatch .type-glyph { width: 10px; height: 10px; }
}
@media (min-width: 720px) {
  .map-legend {
    font-size: 0.72rem;
    gap: 8px 12px;
    padding: 6px 10px;
  }
}


/* Marker clusters */
.event-cluster {
  background: transparent;
  border: 0;
}
.event-cluster div {
  width: 32px;
  height: 32px;
  margin-left: 2px;
  margin-top: 2px;
  border-radius: 50%;
  background: var(--pine);
  color: #fff;
  border: 2px solid #fff;
  box-shadow: 0 2px 8px rgba(28, 46, 34, 0.4);
  font: 700 13px/28px system-ui, "Segoe UI", sans-serif;
  text-align: center;
}
.event-cluster.is-mid div { width: 36px; height: 36px; line-height: 32px; font-size: 14px; }
.event-cluster.is-lg div { width: 40px; height: 40px; line-height: 36px; font-size: 15px; }
.marker-cluster-spider-leg { stroke: #1F4D3A; stroke-opacity: 0.55; }

/* ---------- Dock ---------- */
.panel-toggle { display: none; }
.dock {
  background: var(--paper);
  border-top: 3px solid var(--pine);
  box-shadow: inset 0 2px 0 var(--gold);
  padding: 8px 12px 8px;
  z-index: 20;
  font-size: 0.85rem;
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.dock-body {
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1 1 auto;
}
.filters {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 8px 10px;
  margin-bottom: 6px;
}
.filters .cluster {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.group-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-right: 2px;
}
.seg {
  display: inline-flex;
  flex-wrap: wrap;
  background: var(--cream);
  border: 1px solid #e2d6c0;
  border-radius: 999px;
  padding: 2px;
  gap: 2px;
}
.seg.wrap { border-radius: 16px; }
.seg button {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--ink);
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  min-height: 36px;
}
.seg button[aria-pressed="true"] {
  background: var(--pine);
  color: #fff;
}
.results {
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1 1 auto;
}
.results-head {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  margin: 4px 0 6px;
  color: var(--ink-soft);
}
.results-list {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  min-height: 0;
}
.result-row {
  appearance: none;
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  border-bottom: 1px solid #efe6d6;
  background: transparent;
  color: inherit;
  padding: 8px 4px;
  cursor: pointer;
  font: inherit;
}
.result-row:last-child { border-bottom: 0; }
.result-row .name {
  font-weight: 800;
  font-size: 0.92rem;
}
.result-row .meta {
  font-size: 0.75rem;
  color: var(--ink-soft);
}
.result-row.is-focus {
  background: rgba(31, 77, 58, 0.07);
  box-shadow: inset 3px 0 0 var(--berry, #8B2E3A);
  border-radius: 8px;
  padding-left: 8px;
}
.result-row.is-dim { opacity: 0.48; }
.result-row.is-selected { background: var(--cream); border-radius: 8px; }
.result-row.is-focus.is-selected { background: rgba(31, 77, 58, 0.11); }

.empty {
  color: var(--ink-soft);
  font-size: 0.86rem;
  padding: 8px 4px 12px;
}

/* ---------- Footer ---------- */
footer.partners {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: var(--pine-dark);
  color: #fff;
  padding: 6px 12px;
  padding-bottom: max(6px, var(--safe-bottom));
  z-index: 20;
}
.partners .slot {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
}
.partners .slot.visit {
  background: #fff;
  border-radius: 8px;
  padding: 3px 6px;
}
.partners .slot.mcm { gap: 6px; }
.partners .credit { font-size: 11px; opacity: .8; white-space: nowrap; }
.partners img { display: block; width: auto; }
.partners .visit img { height: 36px; max-width: 42vw; }
.partners .mcm img { height: 30px; max-width: 14vw; }

/* ---------- Drawer ---------- */
.drawer-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(28, 46, 34, 0.4);
  z-index: 80;
}
.drawer-backdrop.show { display: block; }
.drawer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  max-height: min(88dvh, 88svh);
  overflow: auto;
  background: var(--paper);
  border-radius: 16px 16px 0 0;
  z-index: 90;
  transform: translateY(110%);
  transition: transform 0.28s ease;
  padding: 8px 16px 24px;
  padding-bottom: max(24px, var(--safe-bottom));
  box-shadow: var(--shadow);
}
.drawer.open { transform: translateY(0); }
.drawer .handle {
  width: 40px;
  height: 5px;
  border-radius: 999px;
  background: #c3d0d6;
  margin: 4px auto 8px;
}
.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
.drawer .close {
  appearance: none;
  border: 0;
  background: transparent;
  font-size: 28px;
  line-height: 1;
  width: 44px;
  height: 44px;
  cursor: pointer;
  color: var(--ink);
}
.drawer .body p { margin: 0 0 10px; }
.drawer .lede { font-size: 1.02rem; font-weight: 650; }
.drawer h3 { margin: 14px 0 6px; font-size: 0.95rem; }
.drawer .note { font-size: 0.78rem; color: var(--ink-soft); }
.drawer code { font-size: 0.86em; }
.drawer-cta {
  display: block;
  width: 100%;
  box-sizing: border-box;
  text-align: center;
  text-decoration: none;
  background: var(--pine);
  color: #fff;
  font-weight: 800;
  font-size: 1.05rem;
  line-height: 1.25;
  padding: 14px 18px;
  border-radius: 12px;
  margin: 16px 0 14px;
}
.drawer-cta:hover,
.drawer-cta:focus-visible {
  background: #16382b;
  color: #fff;
  outline: 2px solid var(--gold, #C4A35A);
  outline-offset: 2px;
}


/* ---------- Mobile layout ---------- */
@media (max-width: 719px) {
  #map {
    flex: 0 0 auto;
    height: var(--map-height, clamp(160px, min(40dvh, 40svh), calc(var(--app-height, 100svh) - 22rem)));
    min-height: 0;
    max-height: calc(var(--app-height, 100svh) - 16rem);
    transition: height 0.32s ease;
  }
  .dock {
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    padding: 0 10px 6px;
  }
  .dock-body {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
    max-height: 80svh;
    opacity: 1;
    transition: max-height 0.32s ease, opacity 0.2s ease;
  }
  .panel-toggle {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    appearance: none;
    border: 0;
    background: transparent;
    width: 100%;
    flex: 0 0 auto;
    margin: 0;
    padding: 8px 4px 6px;
    color: var(--ink);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    touch-action: none;
  }
  .panel-handle {
    display: block;
    width: 40px;
    height: 5px;
    border-radius: 999px;
    background: #c3d0d6;
  }
  .panel-toggle-text {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    min-height: 0;
  }
  .panel-summary {
    font-weight: 800;
    font-size: 0.84rem;
    color: var(--ink);
    text-align: left;
  }
  .panel-toggle-label {
    font-weight: 700;
    font-size: 0.75rem;
    color: var(--pine-dark);
    white-space: nowrap;
  }
  body.panel-expanded .panel-toggle-text {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
  }
  body.panel-expanded .panel-toggle { padding: 10px 4px 2px; }
  body.panel-compact .dock {
    flex: 0 0 auto;
    overflow: hidden;
    padding: 0 12px 8px;
  }
  body.panel-compact .dock-body {
    max-height: 0;
    opacity: 0;
    pointer-events: none;
    flex: 0 0 0;
    min-height: 0;
    overflow: hidden;
  }
  body.panel-compact .panel-toggle {
    padding: 8px 4px 4px;
    min-height: 48px;
  }
  body.panel-compact #map { max-height: none; }
  body.panel-compact footer.partners { display: none; }
  body.panel-expanded .seg button {
    min-height: 40px;
    padding: 6px 11px;
    font-size: 0.8rem;
  }
  footer.partners {
    padding: 4px 10px;
    padding-bottom: max(4px, var(--safe-bottom));
  }
  .partners .visit img { height: 28px; }
  .partners .mcm img { height: 24px; }
  .partners .credit { font-size: 10px; }
  body.short-viewport {
    height: auto;
    min-height: var(--app-height, 100svh);
    max-height: none;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  body.short-viewport .dock {
    flex: 0 0 auto;
    min-height: auto;
    overflow: visible;
  }
  body.short-viewport.panel-compact .dock { overflow: hidden; }
  body.short-viewport .results {
    flex: 0 0 auto;
    overflow: visible;
  }
  body.short-viewport .results-list {
    height: auto;
    max-height: none;
    overflow: visible;
  }
  @media (prefers-reduced-motion: reduce) {
    #map, .dock-body { transition: none; }
  }
}

@media (min-width: 720px) {
  .panel-toggle { display: none !important; }
  header .brand p { white-space: normal; }
  .results-list {
    height: min(30vh, 248px);
    max-height: none;
  }
  .leaflet-popup-content { max-width: var(--popup-max-w, 300px); }
  .partners img { max-width: none; }
  .drawer {
    left: auto;
    right: 16px;
    bottom: 16px;
    width: 400px;
    max-height: calc(100dvh - 32px);
    border-radius: 16px;
    padding-bottom: 8px;
  }
}

@media (min-width: 900px) {
  body {
    display: grid;
    grid-template-columns: minmax(320px, 1fr) 2fr;
    grid-template-rows: auto auto minmax(0, 1fr) auto;
    grid-template-areas:
      "banner banner"
      "header header"
      "dock   map"
      "footer footer";
  }
  .preview-banner { grid-area: banner; }
  header.app-header { grid-area: header; }
  #map {
    grid-area: map;
    min-height: 0;
    height: auto;
  }
  .dock {
    grid-area: dock;
    min-height: 0;
    overflow: hidden;
    border-top: 0;
    border-right: 3px solid var(--pine);
    padding: 12px 14px 8px;
  }
  .filters { flex-shrink: 0; }
  .results {
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
  }
  .results-head { flex-shrink: 0; }
  .results-list {
    flex: 1 1 auto;
    height: auto;
    min-height: 0;
    max-height: none;
  }
  footer.partners {
    grid-area: footer;
    gap: 8px;
    padding: 6px max(12px, calc((100% - 280px) / 2));
  }
  .partners .slot.visit { padding: 3px 5px; border-radius: 7px; }
  .partners .slot.mcm { gap: 5px; }
  .partners .visit img { height: 30px; }
  .partners .mcm img { height: 26px; }
}

@media (max-width: 719px) {
  body.panel-expanded .leaflet-bottom.leaflet-left .map-legend {
    margin: 0 8px 8px 8px;
    padding: 2px 6px;
    font-size: 0.56rem;
    gap: 2px 6px;
  }
  body.panel-expanded .map-legend .swatch { width: 13px; height: 13px; }
  body.panel-expanded .map-legend .swatch .type-glyph { width: 9px; height: 9px; }
}

.group-label .group-hint {
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink-soft);
  font-size: 0.9em;
}
