:root {
  --cluster-small: #a0c4ff; /* up to ~10 */
  --cluster-med: #5aa9e6; /* up to ~25 */
  --cluster-big: #1b6ca8; /* above */
  --accent: #ff6b6b; /* single point */
}

html,
body {
  height: 100%;
  margin: 0;
}
#map {
  position: absolute;
  inset: 0;
}

/* Popup image */
.photo-popup img {
  display: block;
  max-width: 220px;
  height: auto;
  border-radius: 8px;
}
.photo-popup .meta {
  margin-top: 6px;
  word-wrap: break-word;
  max-width: 220px;
  font: 12px/1.35 system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial,
    "Apple Color Emoji", "Segoe UI Emoji";
}

/* Style unclustered point */
.photo-marker {
  /* background: var(--accent); */
  width: 60px;
  height: 60px;
  border-radius: 6px;
  background-size: cover;
  background-position: 50% 50%;
  border: 2px solid #fff;
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.15);
}

.photo-thumb {
  width: 60px;
  height: 60px;
  border-radius: 6px;
  background-size: cover;
  background-position: 50% 50%;
  border: 2px solid #fff;
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.15);
}

.photo-thumb img {
  width: 60;
  height: 50;
}

/* Optional: nicer cluster colors */
.marker-cluster-small {
  background: color-mix(in srgb, var(--cluster-small) 80%, #fff);
}
.marker-cluster-small div {
  background: var(--cluster-small);
}
.marker-cluster-medium {
  background: color-mix(in srgb, var(--cluster-med) 80%, #fff);
}
.marker-cluster-medium div {
  background: var(--cluster-med);
}
.marker-cluster-large {
  background: color-mix(in srgb, var(--cluster-big) 80%, #fff);
}
.marker-cluster-large div {
  background: var(--cluster-big);
}

/* Fallback for browsers without color-mix */
@supports not (background: color-mix(in srgb, #000 50%, #fff)) {
  .marker-cluster-small {
    background: #d6e8ff;
  }
  .marker-cluster-medium {
    background: #b9daf6;
  }
  .marker-cluster-large {
    background: #8ebee3;
  }
}

/* Tiny help badge */
.help {
  position: fixed;
  right: 10px;
  left: 40px;
  bottom: 40px;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 10px;
  padding: 8px 10px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  font: 12px/1.4 system-ui;
}

/* Date range control */
.leaflet-control.date-control {
  background: rgba(255, 255, 255, 0.95);
  padding: 10px 12px;
  border-radius: 10px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  min-width: 220px;
  font: 12px/1.4 system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
}
.date-control .row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 8px;
}
.date-control .years {
  font-weight: 600;
  margin-bottom: 6px;
}
.date-control input[type="range"] {
  width: 100%;
  margin: 6px 0;
}
.date-control .btns {
  display: flex;
  gap: 8px;
  margin-top: 6px;
}
.date-control button {
  border: 0;
  border-radius: 8px;
  padding: 6px 8px;
  background: #f2f2f2;
  cursor: pointer;
}
.date-control button:hover {
  background: #e9e9e9;
}

/* Optional: tiny empty-state banner */
.empty-banner {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  top: 14px;
  z-index: 1001;
  background: #fff7d6;
  color: #6b4b00;
  border: 1px solid #ffe08a;
  padding: 8px 12px;
  border-radius: 10px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  font: 12px/1.4 system-ui;
  display: none;
}
