/* Atlas Earth Explorer v14.4.2 — mobile-first, unobstructed globe viewport.
   Only affects screens 760px wide or narrower. Preserve the actual MapLibre
   map and all evidence, Koppen, scenario, and accessibility controls. */
@media (max-width: 760px) {
  /* The globe has its own viewing area; the year/science panel follows below.
     Avoid overlaying the lower hemisphere with a fixed cockpit. */
  #ev8-stage.ev8-map-stage {
    --atlas-mobile-globe-height: clamp(510px, 76svh, 690px);
    height: auto !important;
    min-height: 0 !important;
    padding: var(--atlas-mobile-globe-height) 0 7px !important;
  }
  #ev8-stage > #ev8-map {
    position: absolute !important;
    inset: 0 0 auto 0 !important;
    height: var(--atlas-mobile-globe-height) !important;
  }
  #ev8-stage > .ev8-timebar,
  #ev8-stage.ev14-science-mode > .ev8-timebar {
    position: relative !important;
    inset: auto !important;
    display: block !important;
    width: calc(100% - 14px) !important;
    max-width: none !important;
    max-height: none !important;
    margin: 0 7px !important;
    overflow: visible !important;
    padding: 12px 13px !important;
    z-index: 18;
  }
  /* The science mode's former fixed 740px stage and scrolling overlay
     must not re-obscure the globe when the evidence mode is selected. */
  #ev8-stage.ev14-science-mode { height: auto !important; }
  #ev8-stage .ev8-settings {
    max-height: calc(var(--atlas-mobile-globe-height) - 66px) !important;
  }
  #ev8-stage .ev8-map-corner {
    top: calc(var(--atlas-mobile-globe-height) - 37px) !important;
    bottom: auto !important;
  }
  #ev8-stage #ev13-epoch {
    min-height: 30px;
  }
  /* Fullscreen is intentionally globe-first. Exit fullscreen to explore
     the timeline and science selectors, which stay directly below the map. */
  body.ev8-immersive-on #ev8-stage.ev8-map-stage {
    height: 100dvh !important;
    padding: 0 !important;
  }
  body.ev8-immersive-on #ev8-stage > #ev8-map {
    inset: 0 !important;
    height: 100dvh !important;
  }
  body.ev8-immersive-on #ev8-stage > .ev8-timebar {
    display: none !important;
  }
}
@media (max-width: 760px) and (orientation: landscape) {
  #ev8-stage.ev8-map-stage {
    --atlas-mobile-globe-height: clamp(400px, 115svh, 600px);
  }
}
