.map {
  position: fixed;
  inset: 0;
  z-index: 1;
}

/* small non-interactive/lightly-interactive embeds on index.html (About)/stages.html */
.about-map .mapboxgl-map,
.stage-minimap .mapboxgl-map {
  border-radius: var(--radius-md);
}

.style-switcher {
  position: fixed;
  right: var(--space-4);
  bottom: calc(var(--space-4) + 220px);
  z-index: var(--z-panel);
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.style-btn {
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  min-height: 36px;
  color: var(--color-text-muted);
  white-space: nowrap;
}

.style-btn.is-active { background: var(--color-accent); color: #fff; }

/* ---------- elevation panel ---------- */

.elevation-panel {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: var(--z-panel);
  background: var(--color-surface);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid var(--color-border);
}

.elevation-handle {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-2) 0;
  min-height: var(--tap-target);
}

.handle-bar {
  width: 40px;
  height: 4px;
  border-radius: 2px;
  background: var(--color-border);
}

.handle-label { font-size: 0.75rem; color: var(--color-text-muted); }

.elevation-body {
  height: 160px;
  padding: 0 var(--space-4) var(--space-4);
}

.elevation-panel.is-collapsed .elevation-body { display: none; }

/* ---------- media markers ---------- */

.media-marker {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid #fff;
  background-size: cover;
  background-position: center;
  background-color: #333;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
  transition: transform 0.15s ease;
  position: relative;
}

/* invisible hit-area padding so the tap target meets 44x44px regardless of the visual circle size */
.media-marker::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: var(--tap-target);
  height: var(--tap-target);
  transform: translate(-50%, -50%);
}

.media-marker:hover,
.media-marker:focus-visible,
.media-marker.is-hovered {
  transform: scale(1.15);
  z-index: 5;
}

.media-marker.is-dimmed {
  opacity: 0.25;
  pointer-events: none;
}

.media-marker.is-video::before {
  content: "\25B6";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 0.8rem;
  background: rgba(0, 0, 0, 0.35);
  border-radius: 50%;
}

.cluster-marker {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--color-accent);
  border: 2px solid #fff;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.marker-tooltip {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translate(-50%, -8px);
  background: rgba(10, 10, 12, 0.92);
  color: #fff;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.media-marker.is-hovered .marker-tooltip,
.media-marker:hover .marker-tooltip,
.media-marker:focus-visible .marker-tooltip {
  opacity: 1;
}

/* trek start/finish flags (route.js) — decorative, not interactive */
.route-endpoint {
  font-size: 28px;
  line-height: 1;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.5));
  cursor: default;
}
