:root {
  --accent: #ff681f;
  --ink: #111111;
  --muted: #6d6d6d;
  --line: #dedede;
  --panel: #ffffff;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

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

.map-topbar {
  position: fixed;
  inset: 0 0 auto;
  z-index: 1000;
  display: grid;
  grid-template-columns: minmax(180px, 0.8fr) minmax(360px, 760px) minmax(120px, 0.8fr);
  gap: 22px;
  align-items: center;
  min-height: 70px;
  padding: 12px 18px;
  color: #fff;
  background: rgba(8, 8, 8, 0.96);
  border-bottom: 1px solid #272727;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  text-decoration: none;
}

.brand span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--accent);
  font-weight: 800;
}

.brand strong {
  font-size: 22px;
}

.map-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 80px;
  gap: 8px;
  justify-self: center;
  width: min(760px, 100%);
}

.map-search input,
.map-search button,
.map-topbar a:not(.brand) {
  height: 42px;
  border: 1px solid #555;
  background: #171717;
  color: #fff;
  font: inherit;
}

.map-search input {
  padding: 0 12px;
}

.map-search button,
.map-topbar a:not(.brand) {
  display: grid;
  place-items: center;
  padding: 0 14px;
  text-decoration: none;
  background: #232323;
  cursor: pointer;
}

.map-layout {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  height: 100%;
  padding-top: 70px;
}

.map-panel {
  z-index: 500;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 18px;
  padding: 20px;
  background: var(--panel);
  border-right: 1px solid var(--line);
  overflow: auto;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: 26px;
}

#mapStats {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.4;
}

.place-list {
  display: grid;
  gap: 8px;
  align-content: start;
}

.place-button {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  background: #fff;
  text-align: left;
  padding: 8px 10px;
  cursor: pointer;
}

.place-button strong {
  font-size: 14px;
}

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

#map {
  min-height: 100%;
}

.photo-marker {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 3px solid #fff;
  border-radius: 50%;
  color: #fff;
  background: var(--accent);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.32);
  font-weight: 800;
}

.street-marker {
  border-color: #111;
  background: var(--accent);
}

.photo-marker:not(.street-marker) {
  background: #111;
}

.popup {
  width: min(360px, 72vw);
}

.popup h2 {
  margin: 0 0 4px;
  font-size: 18px;
}

.popup p {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.popup-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  max-height: 380px;
  overflow: auto;
}

.popup-card {
  color: var(--ink);
  text-decoration: none;
}

.popup-card img {
  display: block;
  width: 100%;
  height: 94px;
  object-fit: contain;
  background: #f1f1f1;
}

.popup-card strong {
  display: -webkit-box;
  margin-top: 5px;
  overflow: hidden;
  font-size: 12px;
  line-height: 1.25;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.popup-card span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.2;
}

@media (max-width: 820px) {
  .map-topbar {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .map-layout {
    grid-template-columns: 1fr;
    padding-top: 156px;
  }

  .map-panel {
    max-height: 240px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  #map {
    min-height: calc(100vh - 396px);
  }
}
