/* ELIE v5.2.11 — isolate the planet bitmap/ring geometry from legacy direct-child rules.
   The planet, rings and lock now live in one local square coordinate system. */

#app :is(.map-world-select-screen,.map-planets-screen) .map-world-card .map-world-globe{
  position:relative!important;
  display:grid!important;
  place-items:center!important;
  width:var(--world-size,80%)!important;
  height:auto!important;
  aspect-ratio:1/1!important;
  overflow:visible!important;
  isolation:isolate!important;
  transform:translate(var(--world-x,0%),var(--world-y,0%))!important;
  transform-origin:50% 50%!important;
}

/* This nested core is deliberately new. Older selectors that targeted
   .map-world-globe > img:first-child can no longer move the planet artwork. */
#app :is(.map-world-select-screen,.map-planets-screen) .map-world-core{
  position:relative!important;
  display:block!important;
  width:100%!important;
  height:100%!important;
  aspect-ratio:1/1!important;
  inset:auto!important;
  margin:0!important;
  padding:0!important;
  overflow:visible!important;
  transform:none!important;
  transform-origin:50% 50%!important;
  box-sizing:border-box!important;
  isolation:isolate!important;
}

#app :is(.map-world-select-screen,.map-planets-screen) .map-world-core > .map-world-planet-image{
  position:absolute!important;
  inset:0!important;
  left:0!important;
  top:0!important;
  display:block!important;
  width:100%!important;
  height:100%!important;
  min-width:0!important;
  min-height:0!important;
  max-width:none!important;
  max-height:none!important;
  margin:0!important;
  padding:0!important;
  object-fit:contain!important;
  object-position:50% 50%!important;
  transform:none!important;
  transform-origin:50% 50%!important;
  z-index:3!important;
  pointer-events:none!important;
}

/* The archive planets may rotate, but their x/y geometry never changes. */
#app .map-planets-screen .map-world-core > .map-world-planet-image{
  rotate:0deg;
  scale:1;
  animation:mapArchivePlanetSpin var(--world-spin,220s) linear infinite!important;
  animation-delay:var(--world-spin-delay,0s)!important;
  transition:scale .55s cubic-bezier(.2,.8,.2,1),filter .35s ease!important;
  will-change:rotate;
}
#app .map-planets-screen .map-world-card:hover .map-world-core > .map-world-planet-image,
#app .map-planets-screen .map-world-card:focus-visible .map-world-core > .map-world-planet-image{
  scale:1.035;
  filter:brightness(1.08) drop-shadow(0 0 18px rgba(50,243,63,.16))!important;
}

/* Rings use the exact same 0/0/100% square as the bitmap. */
#app :is(.map-world-select-screen,.map-planets-screen) .map-world-core > .map-world-rings{
  position:absolute!important;
  inset:0!important;
  left:0!important;
  top:0!important;
  right:0!important;
  bottom:0!important;
  width:100%!important;
  height:100%!important;
  aspect-ratio:1/1!important;
  margin:0!important;
  padding:0!important;
  transform:none!important;
  transform-origin:50% 50%!important;
  box-sizing:border-box!important;
  pointer-events:none!important;
  z-index:2!important;
  opacity:0!important;
  visibility:hidden!important;
}
#app :is(.map-world-select-screen,.map-planets-screen) .map-world-core > .map-world-rings > i{
  position:absolute!important;
  inset:auto!important;
  left:50%!important;
  top:50%!important;
  right:auto!important;
  bottom:auto!important;
  margin:0!important;
  padding:0!important;
  border-radius:50%!important;
  transform:translate(-50%,-50%)!important;
  transform-origin:50% 50%!important;
  box-sizing:border-box!important;
}
#app :is(.map-world-select-screen,.map-planets-screen) .map-world-core > .map-world-rings > i:nth-child(1){
  width:107%!important;
  height:107%!important;
}
#app :is(.map-world-select-screen,.map-planets-screen) .map-world-core > .map-world-rings > i:nth-child(2){
  width:126%!important;
  height:126%!important;
}
#app :is(.map-world-select-screen,.map-planets-screen) .map-world-core > .map-world-rings > i:nth-child(3){
  width:143%!important;
  height:143%!important;
}
#app .map-world-select-screen .map-world-card[data-selected="1"] .map-world-core > .map-world-rings,
#app .map-planets-screen .map-world-card:hover .map-world-core > .map-world-rings,
#app .map-planets-screen .map-world-card:focus-visible .map-world-core > .map-world-rings{
  opacity:1!important;
  visibility:visible!important;
}

#app :is(.map-world-select-screen,.map-planets-screen) .map-world-core > .map-lock-image{
  position:absolute!important;
  inset:auto!important;
  left:50%!important;
  top:50%!important;
  margin:0!important;
  transform:translate(-50%,-50%)!important;
  transform-origin:50% 50%!important;
  z-index:5!important;
}

/* PLANET DETAIL — the legacy global .planet-artwork-buttons transform shifted
   the entire visual-record block half a column to the left. Reset every old
   absolute coordinate and centre the heading and both button rows together. */
#app .map-planet-detail-overlay .map-planet-navigation{
  min-width:0!important;
}
#app .map-planet-detail-overlay .map-planet-artworks{
  position:relative!important;
  inset:auto!important;
  left:auto!important;
  right:auto!important;
  top:auto!important;
  bottom:auto!important;
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  margin:0 auto!important;
  padding:0!important;
  transform:none!important;
  justify-self:center!important;
  align-self:end!important;
  display:grid!important;
  justify-items:center!important;
  align-content:end!important;
  text-align:center!important;
  box-sizing:border-box!important;
}
#app .map-planet-detail-overlay .map-planet-artworks > small{
  display:block!important;
  width:100%!important;
  margin:0!important;
  padding:0!important;
  text-align:center!important;
  justify-self:center!important;
}
#app .map-planet-detail-overlay .map-planet-artworks .planet-artwork-buttons{
  position:relative!important;
  inset:auto!important;
  left:auto!important;
  right:auto!important;
  top:auto!important;
  bottom:auto!important;
  transform:none!important;
  transform-origin:50% 50%!important;
  width:max-content!important;
  max-width:100%!important;
  min-width:0!important;
  margin:clamp(5px,.8vh,10px) auto 0!important;
  padding:0!important;
  justify-content:center!important;
  justify-items:center!important;
  align-content:center!important;
  box-sizing:border-box!important;
}

@media (max-width:1100px),(max-height:620px){
  #app .map-planet-detail-overlay .map-planet-artworks .planet-artwork-buttons{
    margin-top:4px!important;
  }
}

@media (prefers-reduced-motion:reduce){
  #app .map-planets-screen .map-world-core > .map-world-planet-image{
    animation:none!important;
  }
}
