/* ELIE v5.2.6 — natural planet flow, exact rings, clipped level paths and dossier refinement. */
:root{--map-green:#32f33f}

/* --------------------------------------------------------------------------
   WORLD / PLANET RAILS — deterministic organic scale and placement.
   The globe wrapper owns the exact visual diameter, so rings and SVG anchors
   remain centered regardless of each planet's size or vertical offset.
   -------------------------------------------------------------------------- */
.map-world-select-screen .map-world-card,
.map-planets-screen .map-world-card{
  contain:layout style!important;
}
.map-world-select-screen .map-world-card{
  grid-template-rows:17% 58% 25%!important;
}
.map-planets-screen .map-world-card{
  grid-template-rows:18% 76% 6%!important;
}
.map-world-select-screen .map-world-logo,
.map-planets-screen .map-world-logo{
  transform:translateY(var(--world-logo-y,0%))!important;
}
.map-world-select-screen .map-world-globe,
.map-planets-screen .map-world-globe{
  position:relative!important;
  justify-self:center!important;
  align-self:center!important;
  width:var(--world-size,80%)!important;
  height:auto!important;
  aspect-ratio:1/1!important;
  transform:translate(var(--world-x,0%),var(--world-y,0%))!important;
  overflow:visible!important;
  isolation:isolate!important;
}
.map-world-select-screen .map-world-globe>img:first-child,
.map-planets-screen .map-world-globe>img:first-child{
  display:block!important;
  width:100%!important;
  height:100%!important;
  max-width:none!important;
  max-height:none!important;
  object-fit:contain!important;
  transform:none!important;
  transform-origin:50% 50%!important;
}
.map-world-select-screen .map-world-stats{
  position:absolute!important;
  left:50%!important;
  top:var(--world-stats-y,68%)!important;
  transform:translateX(-50%)!important;
  margin:0!important;
}
.map-world-select-screen .map-lock-image,
.map-planets-screen .map-lock-image{
  width:56%!important;
  height:56%!important;
  max-width:none!important;
  max-height:none!important;
  left:50%!important;
  top:50%!important;
  transform:translate(-50%,-50%)!important;
}

/* Remove the inherited universal selected ring. */
.map-world-card .map-world-globe::before,
.map-world-card .map-world-globe::after{
  content:none!important;
}

/* Start Game: rings belong only to the latest open planet and are centered on
   the exact globe wrapper, not on the card or grid cell. */
.map-world-select-screen .map-world-card[data-selected="1"] .map-world-globe::before,
.map-world-select-screen .map-world-card[data-selected="1"] .map-world-globe::after{
  content:""!important;
  position:absolute!important;
  left:50%!important;
  top:50%!important;
  aspect-ratio:1/1!important;
  border-radius:50%!important;
  pointer-events:none!important;
  z-index:-1!important;
  transform:translate(-50%,-50%)!important;
  animation:mapWorldExactPulse 3.8s ease-in-out infinite!important;
}
.map-world-select-screen .map-world-card[data-selected="1"] .map-world-globe::before{
  width:112%!important;
  border:5px solid rgba(50,243,63,.92)!important;
  outline:1px solid rgba(50,243,63,.42)!important;
  outline-offset:15px!important;
}
.map-world-select-screen .map-world-card[data-selected="1"] .map-world-globe::after{
  width:136%!important;
  border:1px solid rgba(50,243,63,.52)!important;
  outline:1px solid rgba(50,243,63,.23)!important;
  outline-offset:13px!important;
  animation-delay:-1.9s!important;
}
@keyframes mapWorldExactPulse{
  0%,100%{opacity:.38;scale:.985}
  50%{opacity:.92;scale:1.025}
}

/* Planet archive: rings appear only on rollover/focus. Planets rotate at
   independent, intentionally slow periods without shifting their anchors. */
.map-planets-screen .map-world-globe>img:first-child{
  rotate:0deg;
  animation:mapArchivePlanetSpin var(--world-spin,220s) linear infinite!important;
  animation-delay:var(--world-spin-delay,0s)!important;
  will-change:rotate;
}
.map-planets-screen .map-world-card:hover .map-world-globe::before,
.map-planets-screen .map-world-card:hover .map-world-globe::after,
.map-planets-screen .map-world-card:focus-visible .map-world-globe::before,
.map-planets-screen .map-world-card:focus-visible .map-world-globe::after{
  content:""!important;
  position:absolute!important;
  left:50%!important;
  top:50%!important;
  aspect-ratio:1/1!important;
  border-radius:50%!important;
  pointer-events:none!important;
  z-index:-1!important;
  transform:translate(-50%,-50%)!important;
  animation:mapWorldHoverPulse 3.4s ease-in-out infinite!important;
}
.map-planets-screen .map-world-card:hover .map-world-globe::before,
.map-planets-screen .map-world-card:focus-visible .map-world-globe::before{
  width:114%!important;
  border:3px solid rgba(50,243,63,.76)!important;
  outline:1px solid rgba(50,243,63,.34)!important;
  outline-offset:14px!important;
}
.map-planets-screen .map-world-card:hover .map-world-globe::after,
.map-planets-screen .map-world-card:focus-visible .map-world-globe::after{
  width:139%!important;
  border:1px solid rgba(50,243,63,.44)!important;
  outline:1px solid rgba(50,243,63,.2)!important;
  outline-offset:12px!important;
  animation-delay:-1.7s!important;
}
@keyframes mapArchivePlanetSpin{to{rotate:360deg}}
@keyframes mapWorldHoverPulse{0%,100%{opacity:.28;scale:.985}50%{opacity:.82;scale:1.018}}

/* Keep the connecting line behind every globe and use each transformed wrapper
   as the anchor. */
.map-world-rail-track .map-connection-layer{z-index:0!important}
.map-world-rail-track .map-world-card{z-index:2!important}
.map-world-rail-track .map-connection-layer path{
  stroke:rgba(50,243,63,.48)!important;
  stroke-width:1!important;
}

/* --------------------------------------------------------------------------
   LEVEL MAP — JavaScript clips every segment to the rendered circle radius.
   This CSS guarantees that the SVG remains behind and cannot bleed through.
   -------------------------------------------------------------------------- */
.map-level-rail-track .map-connection-layer{z-index:0!important}
.map-level-rail-track .map-level-node{z-index:2!important;isolation:isolate!important}
.map-level-rail-track .map-connection-layer path{
  stroke:rgba(50,243,63,.52)!important;
  stroke-width:1!important;
  stroke-linecap:round!important;
}

/* The retired Daily Journey, Endless Flight and separate Daily Boss controls
   no longer exist in the DOM. Hide any stale cached fragment defensively. */
.map-mission-dock,#daily-mode,#endless-mode,#daily-boss-mode,
[data-daily-cooldown="dailyJourney"],[data-daily-cooldown="endless"],[data-daily-cooldown="dailyBoss"]{
  display:none!important;
}

/* --------------------------------------------------------------------------
   PLANET DOSSIER — fixed-centre rotation and Map-10 text alignment.
   -------------------------------------------------------------------------- */
.map-planet-globe{
  transform-origin:50% 50%!important;
  animation:mapDossierPlanetSpin 190s linear infinite!important;
  will-change:transform;
}
@keyframes mapDossierPlanetSpin{from{transform:rotate(0deg)}to{transform:rotate(360deg)}}

.map-planet-artworks{
  align-self:end!important;
  justify-self:stretch!important;
  transform:none!important;
  display:grid!important;
  justify-items:center!important;
  text-align:center!important;
}
.map-planet-artworks>small{
  display:block!important;
  width:100%!important;
  text-align:center!important;
  color:rgba(50,243,63,.58)!important;
  letter-spacing:.02em!important;
}
.map-planet-detail-overlay .planet-artwork-buttons{
  width:max-content!important;
  max-width:100%!important;
  margin:10px auto 0!important;
  justify-content:center!important;
}

/* The copy begins level with the top edge of the Planet Profile button. */
.map-planet-copy-panel{
  padding:var(--planet-copy-top,24vh) 5.2% 5.8% 2.5%!important;
}
.map-planet-copy-scroll{
  padding:0 4.2% 10%!important;
  text-align:center!important;
}
.map-planet-copy-scroll .planet-intro{
  color:rgba(50,243,63,.9)!important;
  font:850 clamp(14px,1.14vw,22px)/1.18 Duplet,Arial,sans-serif!important;
  letter-spacing:-.012em!important;
  margin:0 0 1.35em!important;
}
.map-planet-copy-scroll .planet-copy-section h3{
  color:var(--map-green)!important;
  font:900 clamp(20px,1.62vw,31px)/1 Duplet,Arial,sans-serif!important;
  letter-spacing:-.025em!important;
  margin:0 0 .55em!important;
}
.map-planet-copy-scroll .planet-copy-section p{
  color:rgba(50,243,63,.68)!important;
  font:800 clamp(13px,1.04vw,20px)/1.2 Duplet,Arial,sans-serif!important;
  letter-spacing:-.008em!important;
  margin:0 0 1.45em!important;
}

/* Compact landscape keeps the same logic with a reduced dossier top line. */
@media (max-width:1100px),(max-height:620px){
  .map-world-select-screen .map-world-globe,
  .map-planets-screen .map-world-globe{width:var(--world-size,80%)!important}
  .map-world-select-screen .map-world-stats{top:calc(var(--world-stats-y,68%) - 2%)!important}
  .map-planet-copy-panel{padding-top:22vh!important}
  .map-planet-copy-scroll .planet-intro{font-size:1.2vw!important}
  .map-planet-copy-scroll .planet-copy-section h3{font-size:1.7vw!important}
  .map-planet-copy-scroll .planet-copy-section p{font-size:1.08vw!important}
}

@media (prefers-reduced-motion:reduce){
  .map-planets-screen .map-world-globe>img:first-child,
  .map-planet-globe{animation:none!important}
}
