:root {
  --bg: #f1f5f3;
  --surface: #ffffff;
  --ink: #0f2227;
  --muted: #4e6a70;
  --border: #d7e4e7;
  --shadow: 0 8px 24px rgba(15, 34, 39, 0.08);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
}

body {
  font-family: "Manrope", sans-serif;
  color: var(--ink);
  background: linear-gradient(120deg, #f7faf9, var(--bg));
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1.4rem;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow);
  z-index: 2;
}

.topbar h1 {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.4rem;
}

.subline {
  margin: 0.2rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  align-items: center;
}

.legend-row {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.55rem;
  background: #edf4f8;
  border-radius: 999px;
  font-size: 0.88rem;
  cursor: pointer;
  user-select: none;
}

.legend-row input[type="checkbox"] {
  margin: 0 0 0 0.2rem;
  cursor: pointer;
}

.swatch {
  display: inline-block;
  width: 20px;
  height: 4px;
  border-radius: 2px;
}

.swatch.thick {
  height: 7px;
}

.map-wrap {
  flex: 1;
  position: relative;
  min-height: 60vh;
}

#map {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.meta {
  padding: 0.5rem 1.4rem;
  font-size: 0.78rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.7);
  overflow-wrap: anywhere;
}

@media (max-width: 720px) {
  .topbar {
    padding: 0.7rem 0.9rem;
  }

  .topbar h1 {
    font-size: 1.15rem;
  }
}

.swatch.dashed {
  background: repeating-linear-gradient(90deg, currentColor 0 3px, transparent 3px 6px) !important;
}

.leaflet-tooltip.place-tooltip {
  padding: 0.5rem 0.65rem;
  border-radius: 10px;
  box-shadow: var(--shadow);
}

.place-card {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  font-family: "Manrope", sans-serif;
  font-size: 0.78rem;
  line-height: 1.3;
  color: var(--ink);
}

.place-logos {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.25rem;
}

.place-logos img {
  height: 34px;
  width: auto;
}

.place-card span {
  color: var(--muted);
}

.photo-pin {
  overflow: visible;
  border-radius: 50%;
  border: 3px solid #ffffff;
  box-shadow: 0 4px 14px rgba(15, 34, 39, 0.35);
  background: #ffffff;
  cursor: pointer;
}

/* Gilt in jeder Ebene und schlägt Leaflets ".leaflet-marker-pane img { width: auto }" */
.leaflet-container .leaflet-pane .photo-pin img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.photo-pin span {
  position: absolute;
  left: 50%;
  bottom: -9px;
  transform: translateX(-50%);
  padding: 0 0.35rem;
  font-family: "Manrope", sans-serif;
  font-size: 0.65rem;
  font-weight: 700;
  white-space: nowrap;
  color: #ffffff;
  background: #e5007d;
  border-radius: 999px;
}

.photo-popup {
  margin: 0;
  font-family: "Manrope", sans-serif;
}

.photo-popup img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 6px;
}

.photo-popup figcaption {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  margin-top: 0.4rem;
  font-size: 0.8rem;
  line-height: 1.35;
  color: var(--ink);
}

.photo-popup figcaption span {
  color: var(--muted);
}

.photo-popup .photo-credit {
  font-size: 0.72rem;
}

.meta a {
  color: inherit;
}

.photo-cluster b {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 22px;
  height: 22px;
  padding: 0 5px;
  font-family: "Manrope", sans-serif;
  font-size: 0.75rem;
  line-height: 22px;
  text-align: center;
  color: #ffffff;
  background: #1f1f1e;
  border: 2px solid #ffffff;
  border-radius: 999px;
}
