/* The globe owns one stable control rail: status key, then Pause on the right. */
.map-status-controls {
  position: fixed;
  z-index: 8;
  /* Clear the fixed 4.25rem site header. Keeping this in the stage layer
     preserves the globe-relative stacking without hiding the controls under
     the global navigation. */
  top: 5rem;
  right: clamp(1rem, 3vw, 3rem);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.45rem;
  max-width: calc(100% - 2rem);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  touch-action: manipulation;
  transition: opacity 180ms ease, visibility 0s linear 180ms;
}

.map-status-controls.is-hero-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition-delay: 0s;
}

.map-status-controls .motion-toggle {
  flex: 0 0 auto;
  width: 2.75rem;
  min-width: 2.75rem;
  min-height: 2.75rem;
  padding: 0;
  border: 1px solid rgba(var(--ink-rgb), 0.16);
  border-radius: 999px;
  background: rgba(var(--paper-rgb), 0.9);
  color: var(--copy);
  box-shadow: 0 0.2rem 0.7rem rgba(var(--shadow-rgb), 0.08);
}

.map-status-controls .motion-toggle:hover,
.map-status-controls .motion-toggle:focus-visible { color: var(--ocean); }

.map-status-legend {
  display: grid;
  grid-template-columns: repeat(3, auto);
  flex: 0 1 auto;
  align-items: center;
  justify-content: flex-end;
  gap: 0.25rem 0.6rem;
  min-width: 0;
  margin: 0;
  padding: 0.42rem 0.58rem;
  border: 1px solid rgba(var(--ink-rgb), 0.14);
  border-radius: 0.6rem;
  background: var(--paper-2);
  color: #344a42;
  box-shadow: 0 0.2rem 0.7rem rgba(var(--shadow-rgb), 0.08);
  font: 650 0.73rem/1.15 var(--font-text);
  letter-spacing: 0.01em;
  white-space: nowrap;
  pointer-events: none;
}

.map-status-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.map-status-legend-caption {
  grid-column: 1 / -1;
  text-align: center;
  font-size: 0.61rem;
  font-weight: 450;
  letter-spacing: 0;
}

.map-status-sample {
  display: block;
  flex: none;
  width: 12px;
  height: 12px;
  overflow: visible;
}

/* Shared, opaque symbols stay crisp over light paper or textured terrain.
   This is a narrow keyline, never a glow or a transparent halo. */
.campus-marker-symbol { pointer-events: none; }
.campus-marker-symbol .campus-marker-keyline {
  fill: #fffdf7;
  stroke: #344a42;
  stroke-width: 0.65;
}
.campus-marker-symbol .dot-active,
.campus-marker-symbol .campus-marker-core {
  fill: var(--marker-color);
  fill-opacity: 1;
  stroke: none;
  opacity: 1;
}
.campus-marker-symbol .dot-forming {
  fill: #fffdf7;
  fill-opacity: 1;
  stroke: #344a42;
  stroke-width: 1.3;
  stroke-dasharray: 2.1 1.3;
  stroke-linecap: butt;
  opacity: 1;
}
.campus-marker-symbol .dot-unstarted {
  fill: #fffdf7;
  stroke: #344a42;
  stroke-width: 1.3;
  opacity: 1;
}

body.solar-mode .map-status-controls,
body.cosmos-mode .map-status-controls {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

@media (max-width: 800px) {
  .map-status-controls {
    position: absolute;
    top: 0.25rem;
    right: 0.75rem;
    left: 0.75rem;
    gap: 0.35rem;
    max-width: none;
  }

  .map-status-controls .motion-toggle {
    min-width: 2.75rem;
    min-height: 2.75rem;
    padding: 0;
    font-size: 0.7rem;
  }

  .map-status-controls .motion-toggle-noun { display: none; }

  .map-status-legend {
    gap: 0.2rem 0.4rem;
    padding: 0.4rem 0.48rem;
    font-size: 0.69rem;
  }

  .map-status-legend-item { gap: 0.2rem; }
  .map-status-sample { width: 12px; height: 12px; }
}

@media (max-width: 340px) {
  .map-status-controls { gap: 0.25rem; left: 0.25rem; right: 0.25rem; }
  .map-status-legend {
    gap: 0.28rem;
    padding-inline: 0.38rem;
    font-size: 0.62rem;
  }
  .map-status-legend-caption { font-size: 0.56rem; }
}

@media (prefers-reduced-transparency: reduce) {
  .map-status-controls .motion-toggle,
  .map-status-legend { background: var(--paper); }
}

@media (prefers-reduced-motion: reduce) {
  .map-status-controls { transition: none; }
}
