/* ELIE v5.2.7 — exact planet-centred rings, fixed RTL geometry, conditional scrollbars and cinematic dossier transitions. */
:root{--map-green:#32f33f}

/* --------------------------------------------------------------------------
   PLANET RINGS — the ring coordinate system is the rendered globe itself.
   No card, logo, stats block or organic offset participates in centring.
   -------------------------------------------------------------------------- */
.map-world-card .map-world-globe::before,
.map-world-card .map-world-globe::after{content:none!important;display:none!important}
.map-world-globe{overflow:visible!important;isolation:isolate!important}
.map-world-globe>.map-world-planet-image{position:relative!important;z-index:3!important;transform-origin:50% 50%!important}
.map-world-rings{
  position:absolute!important;
  left:50%!important;
  top:50%!important;
  width:var(--planet-disc-size,100%)!important;
  aspect-ratio:1/1!important;
  transform:translate(-50%,-50%)!important;
  transform-origin:50% 50%!important;
  pointer-events:none!important;
  z-index:2!important;
  opacity:0!important;
  visibility:hidden!important;
  transition:opacity .32s ease,visibility .32s ease!important;
}
.map-world-rings>i{
  position:absolute!important;
  left:50%!important;
  top:50%!important;
  width:100%!important;
  height:100%!important;
  border-radius:50%!important;
  transform:translate(-50%,-50%)!important;
  transform-origin:50% 50%!important;
  box-sizing:border-box!important;
  opacity:.78!important;
}
.map-world-rings>i:nth-child(1){
  width:108%!important;height:108%!important;
  border:clamp(2px,.24vw,5px) solid rgba(50,243,63,.94)!important;
  box-shadow:0 0 0 clamp(9px,.78vw,15px) rgba(50,243,63,.13)!important;
  animation:map527RingPulse 3.4s ease-in-out infinite!important;
}
.map-world-rings>i:nth-child(2){
  width:126%!important;height:126%!important;
  border:1px solid rgba(50,243,63,.54)!important;
  animation:map527RingPulse 3.4s -1.7s ease-in-out infinite!important;
}
.map-world-rings>i:nth-child(3){
  width:143%!important;height:143%!important;
  border:1px solid rgba(50,243,63,.25)!important;
  animation:map527RingPulse 4.5s -.9s ease-in-out infinite!important;
}
.map-world-select-screen .map-world-card[data-selected="1"] .map-world-rings,
.map-planets-screen .map-world-card:hover .map-world-rings,
.map-planets-screen .map-world-card:focus-visible .map-world-rings{
  opacity:1!important;visibility:visible!important;
}
@keyframes map527RingPulse{
  0%,100%{opacity:.34;scale:.985}
  50%{opacity:1;scale:1.025}
}

/* The start-game data remains present in every language. Text direction is
   local to the label; the card geometry always stays left-to-right. */
.map-world-select-screen .map-world-stats{
  display:grid!important;
  visibility:visible!important;
  opacity:1!important;
  direction:ltr!important;
  grid-auto-rows:minmax(0,auto)!important;
  width:min(86%,260px)!important;
  min-width:0!important;
  z-index:8!important;
}
.map-world-select-screen .map-world-stats li{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) auto!important;
  align-items:center!important;
  gap:.65em!important;
  min-width:0!important;
  direction:ltr!important;
}
.map-world-select-screen .map-world-stats span{
  display:block!important;
  min-width:0!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  white-space:nowrap!important;
  direction:ltr!important;
  unicode-bidi:plaintext!important;
  text-align:left!important;
}
.map-world-select-screen .map-world-stats span[dir="rtl"]{
  direction:rtl!important;
  text-align:right!important;
}
.map-world-select-screen .map-world-stats b{direction:ltr!important;unicode-bidi:isolate!important;white-space:nowrap!important}

/* --------------------------------------------------------------------------
   ARABIC — text is RTL, authored interface geometry is never mirrored.
   -------------------------------------------------------------------------- */
html.lang-rtl,
html.lang-rtl body,
html.lang-rtl .site-shell,
html.lang-rtl .screen,
html.lang-rtl [dir="rtl"]{direction:ltr!important}
html.lang-rtl :where(h1,h2,h3,h4,h5,h6,p,li,label,small,blockquote,figcaption,textarea,.page-copy,.story-copy,.book-copy,.how-command-manual,.planet-profile-copy,.detail-copy-panel,.species-detail-copy,.map-detail-copy,.map-planet-copy-scroll,.support-page,.game-modal,.signal-archive-heading-copy){
  direction:rtl!important;
  unicode-bidi:plaintext!important;
}
html.lang-rtl :where(.page-copy,.story-copy,.book-copy,.how-command-manual,.planet-profile-copy,.detail-copy-panel,.species-detail-copy,.map-detail-copy,.map-planet-copy-scroll,.support-page p,.game-modal p,.signal-archive-heading-copy p){text-align:right!important}
html.lang-rtl :where(.map-selection-heading,.map-corner-title,.map-back-button,.map-world-rail-track,.map-level-rail-track,.map-world-index-track,.map-archive-content-track,.topbar,.nav-cluster-left,.nav-cluster-right,.nav-row,.top-actions-dock){direction:ltr!important}
html.lang-rtl :where(.map-selection-heading strong,.map-world-stats b,.archive-count-stack b,.map-archive-world-header strong,.map-level-node>span,.map-level-node em,.codex-artwork-count strong){direction:ltr!important;unicode-bidi:isolate!important}
/* Neutralise old dir-based mirrored coordinates if an embedded module adds dir=rtl. */
html.lang-rtl .map-back-button{left:3.25%!important;right:auto!important;flex-direction:row!important}
html.lang-rtl .map-corner-title{right:4.2%!important;left:auto!important}

/* --------------------------------------------------------------------------
   VISUAL RECORDS — exactly the same centre line and width as codex buttons.
   -------------------------------------------------------------------------- */
.map-planet-navigation{justify-items:stretch!important;align-items:stretch!important}
.map-planet-detail-overlay .planet-codex-tabs,
.map-planet-artworks{
  width:100%!important;
  max-width:none!important;
  min-width:0!important;
  justify-self:stretch!important;
  margin-inline:0!important;
  transform:none!important;
  box-sizing:border-box!important;
}
.map-planet-artworks{display:grid!important;align-content:end!important;justify-items:stretch!important;text-align:center!important}
.map-planet-artworks>small{width:100%!important;margin:0!important;text-align:center!important;justify-self:stretch!important}
.map-planet-detail-overlay .planet-artwork-buttons{
  display:grid!important;
  grid-template-columns:repeat(5,minmax(0,1fr))!important;
  width:100%!important;
  max-width:none!important;
  margin:clamp(5px,.8vh,10px) 0 0!important;
  padding:0!important;
  gap:clamp(3px,.38vw,7px)!important;
  justify-content:stretch!important;
  justify-items:stretch!important;
  box-sizing:border-box!important;
}
.map-planet-detail-overlay .planet-artwork-button{
  width:100%!important;
  min-width:0!important;
  max-width:none!important;
  margin:0!important;
}

/* --------------------------------------------------------------------------
   CONDITIONAL SCROLLBARS AND EDGE FADES.
   -------------------------------------------------------------------------- */
.map-scrollbar[hidden],.map-scrollbar.is-static{display:none!important;opacity:0!important;visibility:hidden!important}
.map-world-rail-shell:not(.map-x-is-scrollable)::before,
.map-world-rail-shell:not(.map-x-is-scrollable)::after,
.map-world-index-shell:not(.map-x-is-scrollable)::before,
.map-world-index-shell:not(.map-x-is-scrollable)::after,
.map-archive-content-shell:not(.map-x-is-scrollable)::before,
.map-archive-content-shell:not(.map-x-is-scrollable)::after,
.map-level-rail-shell:not(.map-x-is-scrollable)::before,
.map-level-rail-shell:not(.map-x-is-scrollable)::after,
.map-detail-copy-shell:not(.map-y-is-scrollable)::before,
.map-detail-copy-shell:not(.map-y-is-scrollable)::after,
.map-planet-copy-shell:not(.map-y-is-scrollable)::before,
.map-planet-copy-shell:not(.map-y-is-scrollable)::after{opacity:0!important}
.map-detail-copy-shell.map-y-is-scrollable::before,
.map-detail-copy-shell.map-y-is-scrollable::after,
.map-planet-copy-shell.map-y-is-scrollable::before,
.map-planet-copy-shell.map-y-is-scrollable::after{
  left:0!important;right:35px!important;height:8%!important;
}
.map-detail-copy-shell.map-y-is-scrollable::before,
.map-planet-copy-shell.map-y-is-scrollable::before{background:linear-gradient(180deg,rgba(0,0,0,.92) 0,rgba(0,0,0,.48) 34%,transparent 100%)!important}
.map-detail-copy-shell.map-y-is-scrollable::after,
.map-planet-copy-shell.map-y-is-scrollable::after{background:linear-gradient(0deg,rgba(0,0,0,.92) 0,rgba(0,0,0,.48) 34%,transparent 100%)!important}

/* --------------------------------------------------------------------------
   PLANET DOSSIER — remove first-load profile flash and use a cinematic in/out.
   -------------------------------------------------------------------------- */
.map-planet-detail-overlay{
  opacity:0!important;
  visibility:hidden!important;
  background:#000!important;
  transition:opacity .46s ease,visibility .46s ease!important;
}
.map-planet-detail-overlay.is-open{opacity:1!important;visibility:visible!important}
.map-planet-detail-overlay.is-closing{opacity:0!important;visibility:visible!important;pointer-events:none!important}
.map-planet-detail-stage{
  opacity:0!important;
  clip-path:inset(0 100% 0 0)!important;
  transform:scale(1.025)!important;
  filter:blur(9px)!important;
  transition:clip-path .82s cubic-bezier(.16,.78,.18,1),transform .82s cubic-bezier(.16,.78,.18,1),filter .62s ease,opacity .42s ease!important;
}
.map-planet-detail-overlay.is-open .map-planet-detail-stage{
  opacity:1!important;
  clip-path:inset(0 0 0 0)!important;
  transform:scale(1)!important;
  filter:blur(0)!important;
}
.map-planet-detail-overlay.is-closing .map-planet-detail-stage{
  opacity:0!important;
  clip-path:inset(0 0 0 100%)!important;
  transform:scale(.985)!important;
  filter:blur(8px)!important;
}
.map-planet-visual,.map-planet-navigation,.map-planet-copy-panel{
  opacity:0!important;
  transition:opacity .58s ease,translate .78s cubic-bezier(.16,.78,.18,1)!important;
}
.map-planet-visual{translate:-5% 0!important}
.map-planet-navigation{translate:0 4%!important}
.map-planet-copy-panel{translate:5% 0!important}
.map-planet-detail-overlay.is-open :is(.map-planet-visual,.map-planet-navigation,.map-planet-copy-panel){opacity:1!important;translate:0 0!important}
.map-planet-detail-overlay.is-open .map-planet-visual{transition-delay:.13s!important}
.map-planet-detail-overlay.is-open .map-planet-navigation{transition-delay:.2s!important}
.map-planet-detail-overlay.is-open .map-planet-copy-panel{transition-delay:.27s!important}
.map-planet-detail-overlay.is-closing :is(.map-planet-visual,.map-planet-navigation,.map-planet-copy-panel){opacity:0!important;transition-delay:0s!important}
.map-planet-detail-overlay .planet-codex-content:not(.is-switching){animation:none!important}

@media (max-width:1100px),(max-height:620px){
  .map-world-select-screen .map-world-stats{width:min(84%,190px)!important}
  .map-planet-detail-overlay .planet-artwork-buttons{gap:3px!important}
  .map-detail-copy-shell.map-y-is-scrollable::before,
  .map-detail-copy-shell.map-y-is-scrollable::after,
  .map-planet-copy-shell.map-y-is-scrollable::before,
  .map-planet-copy-shell.map-y-is-scrollable::after{right:22px!important;height:10%!important}
}
@media (prefers-reduced-motion:reduce){
  .map-world-rings>i,.map-planet-detail-stage,.map-planet-visual,.map-planet-navigation,.map-planet-copy-panel{animation:none!important;transition:none!important}
}
