:root {
  --bg: #e6e1d6;
  --bg-raise: #f7f4ee;
  --ink: #1b1914;
  --muted: #5f594e;
  --line: #d5cec2;
  --card: #fffdf8;
  --pine: #1c3530;
  --pine-2: #274840;
  --acid: #dff25a;
  --acid-ink: #1a2203;
  --gold: #f3d48a;
  --gold-deep: #8a6414;
  --shadow: 0 12px 32px rgba(40, 32, 18, 0.08);
  --sans: "Outfit", "Avenir Next", "Segoe UI", sans-serif;
  --serif: "Fraunces", "Iowan Old Style", Georgia, serif;
  --header: 72px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background:
    radial-gradient(1200px 400px at 10% -10%, rgba(223, 242, 90, 0.35), transparent 50%),
    var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.45;
}
img { max-width: 100%; }
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
:focus-visible {
  outline: 3px solid var(--pine);
  outline-offset: 2px;
}

.skip {
  position: absolute;
  left: 12px;
  top: -40px;
  background: var(--acid);
  color: var(--acid-ink);
  padding: 8px 12px;
  z-index: 20;
}
.skip:focus { top: 12px; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: var(--header);
  padding: 12px 20px;
  background: var(--pine);
  color: #f6f3ec;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  background: var(--acid);
  color: var(--acid-ink);
  border-radius: 50% 50% 50% 6px;
  transform: rotate(-8deg);
  font-family: var(--serif);
  font-weight: 680;
}
.brand-name {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}
.brand-name strong { font-size: 15px; letter-spacing: 0.08em; font-weight: 700; }
.brand-name span { color: #c9d5cf; font-size: 12px; letter-spacing: 0.02em; }
.nav { display: flex; gap: 8px; }
.nav a {
  text-decoration: none;
  color: #f6f3ec;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
}
.nav a[aria-current="page"], .nav a:hover { background: rgba(255, 255, 255, 0.1); }

.wrap { width: min(1120px, calc(100% - 32px)); margin: 0 auto; }
.page-intro { padding: 28px 0 8px; }
.eyebrow {
  margin: 0 0 8px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 12px;
  font-weight: 700;
  color: var(--pine);
}
h1, h2, h3 { font-family: var(--serif); font-weight: 560; letter-spacing: -0.02em; }
h1 { font-size: clamp(34px, 5vw, 58px); line-height: 0.98; margin: 0 0 12px; }
.lede { max-width: 62ch; margin: 0; color: var(--muted); font-size: 18px; }

.workspace {
  width: min(1280px, calc(100% - 20px));
  margin: 18px auto 28px;
  display: grid;
  grid-template-columns: minmax(320px, 440px) 1fr;
  grid-template-rows: auto minmax(0, 1fr);
  height: min(820px, calc(100vh - 36px));
  min-height: 560px;
  background: var(--bg-raise);
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.toolbar { grid-column: 1; grid-row: 1; }
.results { grid-column: 1; grid-row: 2; }
.map-pane { grid-column: 2; grid-row: 1 / span 2; }
.toolbar {
  position: sticky;
  top: 0;
  z-index: 2;
  display: grid;
  gap: 8px;
  padding: 14px;
  background: rgba(247, 244, 238, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(8px);
}
.toolbar-row { display: flex; gap: 8px; }
label.field { display: grid; gap: 4px; font-size: 12px; font-weight: 650; color: var(--muted); flex: 1; }
input[type="search"], select {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid #c9c1b3;
  border-radius: 10px;
  background: white;
}
.meta-row { display: flex; justify-content: space-between; gap: 8px; align-items: center; font-size: 13px; color: var(--muted); }
.linkish {
  border: 0;
  background: transparent;
  color: var(--pine);
  font-weight: 700;
  padding: 8px 0;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.results { overflow: auto; padding: 12px; display: grid; gap: 10px; align-content: start; flex: 1; min-height: 0; }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 12px 10px;
  text-align: left;
  cursor: pointer;
}
.card.is-active { border-color: var(--pine); box-shadow: inset 3px 0 0 var(--pine); }
.card.is-featured {
  background: linear-gradient(180deg, #fff4cc 0%, #fffdf8 48%);
  border-color: #ddb34a;
  padding: 16px 16px 14px;
}
.card.is-spotlight { padding: 20px 18px 16px; }
.kicker { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 6px; }
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.badge-featured { background: #1b1914; color: #f6e7b2; }
.badge-featured span { color: #dff25a; font-weight: 700; }
.distance { margin-left: auto; font-size: 13px; font-weight: 700; color: var(--pine); }
.card h3 { margin: 0; font-size: 22px; }
.card.is-featured h3 { font-size: 26px; }
.card.is-spotlight h3 { font-size: 30px; }
.where { margin: 2px 0 8px; color: var(--muted); }
.stock { margin: 0 0 10px; font-size: 14px; }
.stock strong { font-weight: 700; }
.actions { display: flex; flex-wrap: wrap; gap: 6px; }
.actions a, .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 0;
  background: var(--pine);
  color: white;
  text-decoration: none;
  font-size: 14px;
  font-weight: 650;
  cursor: pointer;
}
.actions a.ghost, a.ghost, button.ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid #c9c1b3;
}
.map-pane { min-height: 420px; position: relative; }
#map { height: 100%; min-height: 420px; background: #d5ddd4; }
.leaflet-div-icon.pin-wrap { background: transparent; border: 0; }
.pin-dot {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--pine);
  border: 2px solid #fffdf8;
  border-radius: 50%;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}
.pin-wrap.pin-featured .pin-dot {
  background: var(--acid);
  border-color: #1b1914;
  box-shadow: 0 0 0 5px rgba(223, 242, 90, 0.55), 0 2px 6px rgba(0, 0, 0, 0.3);
}
.pin-wrap.pin-active .pin-dot { box-shadow: 0 0 0 4px #1b1914; }

.empty, .error, .loading-note {
  margin: 8px;
  padding: 16px;
  border-radius: 12px;
  background: white;
  border: 1px dashed #c9c1b3;
  color: var(--muted);
}
.error { border-style: solid; border-color: #e3b4b0; color: #6d2c28; background: #fff5f4; }
.skeleton {
  height: 92px;
  border-radius: 14px;
  background: linear-gradient(90deg, #efeae1, #f7f4ee, #efeae1);
  background-size: 200% 100%;
  animation: shine 1.2s linear infinite;
}
@keyframes shine { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; animation: none !important; }
}

.directory, .prose { padding: 8px 0 48px; }
.directory h2, .prose h2 { font-size: 32px; margin: 0 0 8px; }
.state-block { border-top: 1px solid var(--line); padding: 12px 0; }
.state-block h3 { margin: 0 0 6px; font-size: 22px; }
.state-block ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.state-block a { text-underline-offset: 2px; }
.fine { color: var(--muted); font-size: 14px; }

.site-footer {
  background: var(--pine);
  color: #e4ece8;
  padding: 28px 0 36px;
}
.site-footer .wrap { display: grid; gap: 10px; }
.site-footer a { color: var(--acid); }
.disclaimer { margin: 0; max-width: 70ch; }

.prose { width: min(760px, calc(100% - 32px)); }
.prose p { font-size: 17px; }
form.stack { display: grid; gap: 10px; margin-top: 16px; }
form.stack input, form.stack textarea, form.stack select {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #c9c1b3;
  background: white;
}
textarea { min-height: 120px; resize: vertical; }
.form-note { font-size: 14px; color: var(--muted); }

@media (max-width: 860px) {
  .site-header { align-items: flex-start; flex-direction: column; gap: 8px; }
  .workspace {
    grid-template-columns: 1fr;
    width: min(100% - 12px, 1280px);
    min-height: 0;
  }
  .workspace {
    display: flex;
    flex-direction: column;
    height: auto;
    min-height: 0;
    overflow: visible;
  }
  .toolbar { order: 1; position: static; }
  .map-pane { order: 2; }
  .results { order: 3; overflow: visible; }
  .map-pane, #map { min-height: 280px; height: 42vh; }
  h1 { font-size: 36px; }
}
