:root {
  color-scheme: light;
  --ink: #17211c;
  --muted: #59655f;
  --line: #d8dfda;
  --paper: #f6f7f4;
  --panel: #ffffff;
  --leaf: #26735b;
  --leaf-dark: #174f43;
  --water: #2d6f92;
  --sun: #b8871e;
  --berry: #8a4f7d;
  --clay: #a65b3b;
  --soft: #edf2ed;
  --shadow: 0 18px 50px rgba(23, 33, 28, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

button,
input,
select {
  font: inherit;
}

a {
  color: var(--leaf-dark);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
  position: sticky;
  top: 0;
  z-index: 10;
}

.topbar h1,
.results h2,
.detail h2 {
  margin: 0;
  letter-spacing: 0;
}

.topbar h1 {
  font-size: 28px;
  line-height: 1;
}

.subtitle {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.topbar__meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.topbar__meta span,
.count-pill,
.tag,
.confidence,
.activity-type {
  display: inline-flex;
  margin-bottom: 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  padding: 6px 10px;
  white-space: nowrap;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--leaf-dark);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.shell {
  display: grid;
  grid-template-columns: minmax(230px, 280px) minmax(360px, 1fr) minmax(340px, 480px);
  gap: 18px;
  padding: 18px;
  min-height: calc(100vh - 91px);
}

.filters,
.results,
.detail-card,
.map-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.filters {
  align-self: start;
  padding: 16px;
  position: sticky;
  top: 109px;
}

.search {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.search input,
.results select,
.filters select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  padding: 10px 11px;
}

.filter-group {
  border-top: 1px solid var(--line);
  margin-top: 14px;
  padding-top: 12px;
}

.filter-group h2 {
  margin: 0 0 8px;
  font-size: 13px;
}

.filter-group label {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 30px;
  color: var(--muted);
  font-size: 14px;
}

.filter-group input {
  accent-color: var(--leaf);
}

.compact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 8px;
}

.compact-grid h2 {
  grid-column: 1 / -1;
}

.secondary-button {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--soft);
  color: var(--ink);
  cursor: pointer;
  margin-top: 16px;
  padding: 10px;
}

.results {
  min-width: 0;
  overflow: hidden;
}

.results__header,
.map-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid var(--line);
  padding: 16px;
}

.results__header h2,
.map-panel__header h2 {
  font-size: 20px;
}

.cards {
  display: grid;
  gap: 10px;
  max-height: calc(100vh - 182px);
  overflow: auto;
  padding: 12px;
}

.card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.card:hover,
.card.is-active {
  border-color: rgba(38, 115, 91, 0.58);
  box-shadow: 0 8px 22px rgba(23, 33, 28, 0.08);
}

.card-main {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 10px;
  width: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  padding: 12px;
  text-align: left;
}

.card h3 {
  margin: 0 0 5px;
  font-size: 18px;
}

.card p {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  padding: 9px 12px;
}

.inline-link,
.detail-action {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(38, 115, 91, 0.35);
  border-radius: 6px;
  background: rgba(38, 115, 91, 0.08);
  padding: 7px 9px;
  color: var(--leaf-dark);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  color: var(--leaf-dark);
  font-size: 11px;
  font-weight: 800;
}

.tag.warn {
  color: var(--sun);
}

.tag.neutral {
  color: var(--muted);
}

.type-dot,
.map-pin {
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--water);
  box-shadow: 0 2px 10px rgba(23, 33, 28, 0.26);
}

.type-dot {
  width: 14px;
  height: 14px;
  margin-top: 4px;
}

.storytime {
  background: var(--berry);
}

.nature,
.playground {
  background: var(--leaf);
}

.museum,
.summer {
  background: var(--sun);
}

.community,
.music,
.ranger {
  background: var(--clay);
}

.detail {
  display: grid;
  align-content: start;
  gap: 14px;
  min-width: 0;
}

.map-panel {
  overflow: hidden;
}

.mini-map {
  position: relative;
  min-height: 340px;
  height: 42vh;
  max-height: 460px;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.5) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, 0.5) 1px, transparent 1px),
    linear-gradient(135deg, #dfeadc, #d7e6ee 55%, #efe6d7);
  background-size: 54px 54px, 54px 54px, auto;
}

.mini-map::after {
  content: "Relative location preview";
  position: absolute;
  right: 12px;
  bottom: 10px;
  color: var(--muted);
  font-size: 12px;
}

.map-pin {
  position: absolute;
  width: 15px;
  height: 15px;
  transform: translate(-50%, -50%);
  cursor: pointer;
}

.map-pin.is-active {
  width: 23px;
  height: 23px;
  background: var(--clay);
  z-index: 2;
}

.detail-card {
  padding: 14px;
  box-shadow: var(--shadow);
}

.detail-card h2 {
  font-size: 22px;
  line-height: 1.12;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
  margin: 6px 0 10px;
}

.confidence {
  display: inline-flex;
  align-items: center;
  padding: 3px 7px;
  font-size: 11px;
}

.quick-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0 10px;
}

.quick-fact {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.2;
  padding: 4px 8px;
}

.quick-fact strong {
  color: var(--leaf-dark);
}

.preview-note {
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
  margin: 10px 0 0;
  padding-top: 10px;
}

.fine-print,
.muted {
  color: var(--muted);
  font-size: 12px;
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.site-title {
  color: inherit;
  text-decoration: none;
}

.page-shell {
  max-width: 1120px;
  margin: 0 auto;
  padding: 24px 18px 48px;
}

.breadcrumb {
  display: flex;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 18px;
}

.page-hero,
.detail-section {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  margin-bottom: 14px;
  padding: 18px;
}

.page-hero {
  display: flex;
  justify-content: space-between;
  gap: 18px;
}

.page-hero h2 {
  margin: 0;
  font-size: 32px;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.summary-grid,
.activity-mini-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.fact,
.activity-mini-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
}

.activity-mini-card .activity-zip {
  margin-bottom: 10px;
}

.fact strong,
.activity-mini-card h4 {
  display: block;
  margin: 0 0 4px;
}

.fact span,
.activity-mini-card p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
  margin: 0 0 5px;
}

.activity-disclaimer {
  color: var(--muted);
  font-size: 14px;
}

.photo-section {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  background: transparent;
  border: 0;
  padding: 0;
}

.photo-card {
  overflow: hidden;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.photo-card img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  max-height: 200px;
  object-fit: cover;
}

.photo-card figcaption {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  padding: 9px 10px;
}

.location-panel {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}

.location-panel strong {
  display: block;
  margin-bottom: 4px;
}

.location-panel span {
  color: var(--muted);
  font-size: 14px;
}

.map-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.inline-button {
  width: auto;
  margin-top: 0;
}

.nearby-grid {
  display: grid;
  gap: 8px;
}

.nearby-link {
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  text-decoration: none;
}

.nearby-link span {
  color: var(--muted);
  font-size: 13px;
}

.empty-state {
  color: var(--muted);
}

@media (max-width: 980px) {
  .topbar,
  .page-hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .shell {
    grid-template-columns: 1fr;
  }

  .filters {
    position: static;
  }

  .cards {
    max-height: none;
  }

  .summary-grid,
  .activity-mini-grid {
    grid-template-columns: 1fr;
  }

  .location-panel {
    flex-direction: column;
  }
}
