body.map-page {
  font-family: var(--font-body);
  background: var(--ivory);
  color: var(--pine);
}

body.map-page > header.site-header {
  background: var(--ivory);
  color: var(--pine);
  padding: 0;
  display: block;
}

.map-toolbar {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  padding: 0 0 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.map-toolbar #search {
  flex: 1;
  min-width: 200px;
  max-width: 420px;
  width: auto;
  padding: 10px 14px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--pine);
  font-size: .9rem;
  font-family: inherit;
}

.map-toolbar #search:focus {
  outline: 2px solid rgba(181, 148, 91, .45);
  outline-offset: 1px;
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--pine);
  padding: 7px 10px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .04em;
}

.chip button {
  border: 0;
  background: transparent;
  color: var(--slate);
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  padding: 0;
}

.chip button:hover { color: var(--terracotta); }

aside {
  width: 300px;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--line);
  background: #fff;
}

#count {
  padding: 10px 14px;
  font-size: .75rem;
  color: var(--slate);
  border-bottom: 1px solid var(--line);
  letter-spacing: .02em;
}

#list {
  flex: 1;
  overflow-y: auto;
  margin: 0;
  padding: 0;
  list-style: none;
}

#list li {
  padding: 12px 14px;
  cursor: pointer;
  border-bottom: 1px solid var(--line);
}

#list li:hover,
#list li.active { background: rgba(27, 59, 43, .06); }

#list small {
  color: var(--slate);
  display: block;
  margin-top: 3px;
  font-size: .75rem;
}

.map-stage {
  flex: 1;
  position: relative;
  min-width: 0;
  min-height: 0;
  /* Soft underlay while basemap tiles paint in */
  background:
    radial-gradient(ellipse at 55% 40%, rgba(181, 148, 91, .10), transparent 55%),
    linear-gradient(160deg, #c5cec3 0%, #d7ded5 45%, #b8c3b6 100%);
}

#map.map-canvas {
  position: absolute;
  inset: 0;
}

.sk-count {
  min-height: 1.2em;
}

#list .sk-row {
  cursor: default;
  pointer-events: none;
}

#list .sk-row:hover {
  background: transparent;
}

#list .sk-row .sk-line {
  margin: .28em 0;
}

#list .sk-row .sk-line + .sk-line {
  height: .55em;
}

.maplibregl-popup-content {
  padding: 14px 18px 16px;
  border-radius: 2px;
  box-shadow: var(--shadow);
  font-family: inherit;
}

.maplibregl-popup-close-button {
  font-size: 20px;
  padding: 2px 9px;
  color: var(--slate);
}

.tip { pointer-events: none; }
.tip .maplibregl-popup-content {
  padding: 6px 10px;
  font-size: .85rem;
  font-weight: 600;
  color: var(--pine);
  white-space: nowrap;
}

.popup h3 {
  margin: 0 14px 2px 0;
  font-size: 1.05rem;
  font-family: var(--font-display);
  font-weight: 500;
  color: var(--pine);
}

.popup a.popup-name {
  color: inherit;
  text-decoration: none;
  border: 0;
  outline: none;
  box-shadow: none;
  background: none;
  padding: 0;
}

.popup a.popup-name:hover,
.popup a.popup-name:focus-visible {
  color: var(--brass);
  text-decoration: underline;
}

.popup .where {
  color: var(--slate);
  font-size: .85rem;
  margin-bottom: 8px;
}

.popup a.popup-phone {
  display: block;
  color: var(--pine);
  font-size: .9rem;
  font-weight: 600;
  text-decoration: none;
  margin: 0 0 12px;
}

.popup a.popup-phone:hover {
  color: var(--brass);
  text-decoration: underline;
}

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

.popup a.btn {
  display: inline-block;
  background: var(--pine);
  color: var(--ivory);
  padding: 7px 14px;
  border-radius: 0;
  text-decoration: none;
  font-weight: 600;
  font-size: .85rem;
}

.popup a.btn:hover { background: #142d21; }

.popup a.btn.secondary {
  background: #fff;
  color: var(--pine);
  border: 1.5px solid var(--pine);
}

.popup a.btn.secondary:hover { background: var(--ivory); }

@media (max-width: 700px) {
  body.map-page main { flex-direction: column-reverse; }
  aside {
    width: 100%;
    height: 40%;
    border-right: 0;
    border-top: 1px solid var(--line);
  }
  .map-toolbar { width: min(100% - 34px, 520px); }
}

@media (max-width: 650px) {
  body.map-page { position: relative; }
}

