.mappage {
  min-height: 100svh;
  background: var(--bg-deep);
  padding-bottom: var(--space-6);
}

.mappage__header {
  width: var(--container);
  max-width: 74rem;
  margin: 0 auto;
  padding: var(--space-5) 0 var(--space-4);
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: var(--space-3);
  flex-wrap: wrap;
}
.mappage__eyebrow { color: var(--cyan); }
.mappage__title {
  font-family: var(--font-display);
  text-transform: uppercase;
  font-size: clamp(2.4rem, 6vw, 4rem);
  line-height: 0.95;
}
.mappage__title span { color: var(--magenta); }
.mappage__lede { max-width: 46ch; opacity: 0.75; margin-top: 0.6rem; font-size: 0.95rem; }

.mappage__stat {
  border: 1px solid rgba(20,230,230,0.35);
  border-radius: 3px;
  padding: 0.7rem 1.2rem;
  text-align: center;
  flex-shrink: 0;
}
.mappage__stat-label { font-size: 0.62rem; letter-spacing: 0.1em; color: var(--muted); }
.mappage__stat-value {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--cyan);
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
}
.mappage__stat-dot {
  width: 0.5em;
  height: 0.5em;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 8px var(--cyan);
  animation: mappage-pulse 1.6s ease-in-out infinite;
}
@keyframes mappage-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.7); }
}
@media (prefers-reduced-motion: reduce) {
  .mappage__stat-dot { animation: none; }
}

/* ===== the map panel ===== */
.mappage__panel {
  position: relative;
  width: var(--container);
  max-width: 74rem;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(20,230,230,0.28);
  border-radius: 10px;
  overflow: hidden;
  background: var(--bg-deep);
}

.mappage__toolbar {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  padding: 0.65rem 1rem;
  background: rgba(255,255,255,0.03);
  border-bottom: 1px solid rgba(20,230,230,0.2);
}
.mappage__toolbar-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--cyan);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mappage__toolbar-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
}
.mappage__toolbar-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  color: var(--cyan);
  border: 1px solid rgba(20,230,230,0.35);
  border-radius: 6px;
  padding: 0.4em 0.75em;
  background: rgba(20,230,230,0.06);
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}
.mappage__toolbar-btn:hover {
  background: var(--cyan);
  color: var(--bg-deep);
  border-color: var(--cyan);
}

.mappage__frame-wrap {
  position: relative;
  flex: 1;
  min-height: min(80vh, 860px);
  background: var(--bg-deep);
}
.mappage__iframe {
  display: block;
  width: 100%;
  height: 100%;
  min-height: min(80vh, 860px);
  border: 0;
}

/* native Fullscreen API — fullscreen the whole panel (toolbar stays visible
   so the exit button and credit are still reachable, not just the bare
   iframe) */
.mappage__panel:fullscreen,
.mappage__panel:-webkit-full-screen {
  width: 100vw;
  max-width: none;
  height: 100vh;
  border-radius: 0;
  border: 0;
}
.mappage__panel:fullscreen .mappage__frame-wrap,
.mappage__panel:-webkit-full-screen .mappage__frame-wrap {
  min-height: 0;
}
.mappage__panel:fullscreen .mappage__iframe,
.mappage__panel:-webkit-full-screen .mappage__iframe {
  min-height: 0;
}

.mappage__loading {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  background: var(--bg-deep);
  transition: opacity 0.3s ease;
}
.mappage__loading[hidden] { display: none; }
.mappage__loading-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.mappage__loading-bar {
  width: 12rem;
  height: 2px;
  background: rgba(255,255,255,0.1);
  border-radius: 2px;
  overflow: hidden;
}
.mappage__loading-bar::after {
  content: '';
  display: block;
  width: 40%;
  height: 100%;
  background: var(--cyan);
  animation: mappage-loading-sweep 1.1s ease-in-out infinite;
}
@keyframes mappage-loading-sweep {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(350%); }
}
@media (prefers-reduced-motion: reduce) {
  .mappage__loading-bar::after { animation: none; width: 100%; transform: none; }
}

.mappage__credit {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  flex-wrap: wrap;
  padding: 0.55rem 1rem;
  background: rgba(255,255,255,0.03);
  border-top: 1px solid rgba(20,230,230,0.16);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--muted);
}
.mappage__credit a { color: var(--cyan); }
.mappage__credit a:hover { text-decoration: underline; }

.mappage__note {
  width: var(--container);
  max-width: 74rem;
  margin: var(--space-3) auto 0;
  font-size: 0.82rem;
  color: var(--muted);
  max-width: 60ch;
}

@media (max-width: 640px) {
  .mappage__toolbar { flex-wrap: wrap; }
  .mappage__toolbar-label { white-space: normal; }
  .mappage__frame-wrap, .mappage__iframe { min-height: 78vh; }
}

/* The embedded map's own bottom-anchored UI (first-load cookie banner,
   etc.) is fixed within the IFRAME's own box, which — given the iframe's
   height — can coincide with our real fixed player's screen position
   before the visitor dismisses it. Lift the player clear of that zone
   only on this page; left-alignment and the playlist's rightward flyout
   (player.css) are untouched, only the bottom offset changes. */
body.leonida-map-page .s4s-player {
  bottom: calc(var(--space-3) + 3.5rem);
}
@media (max-width: 480px) {
  body.leonida-map-page .s4s-player {
    bottom: calc(var(--space-2) + 4.5rem);
  }
}
