/* ELIE v5.2.1 — planet-first archives and world-coded level selection */

.archive-category-wrap{
  position:absolute;
  inset:0;
}
.archive-catalog-head{
  position:absolute;
  left:7.2%;
  right:7.2%;
  top:17.2%;
  height:calc(var(--u)*4.35);
  z-index:12;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:calc(var(--u)*1.2);
  color:var(--green);
  text-transform:uppercase;
  pointer-events:none;
}
.archive-current-world{
  min-width:0;
  height:100%;
  display:flex;
  align-items:center;
  gap:calc(var(--u)*.72);
}
.archive-current-world>b{
  flex:0 0 auto;
  width:calc(var(--u)*2.65);
  height:calc(var(--u)*2.65);
  display:grid;
  place-items:center;
  border:1px solid rgba(46,241,58,.62);
  border-radius:50%;
  background:rgba(0,10,2,.82);
  color:#fff;
  font-size:calc(var(--u)*.72);
  letter-spacing:.06em;
  box-shadow:inset 0 0 calc(var(--u)*.65) rgba(46,241,58,.08),0 0 calc(var(--u)*.7) rgba(46,241,58,.08);
}
.archive-current-world>img{
  width:calc(var(--u)*10.8);
  height:calc(var(--u)*3.25);
  object-fit:contain;
  object-position:left center;
}
.archive-current-world>div{
  min-width:0;
  display:flex;
  flex-direction:column;
  justify-content:center;
  gap:calc(var(--u)*.12);
  border-left:1px solid rgba(46,241,58,.34);
  padding-left:calc(var(--u)*.8);
}
.archive-current-world small{
  color:rgba(183,255,191,.58);
  font-size:calc(var(--u)*.54);
  letter-spacing:.17em;
  line-height:1;
}
.archive-current-world strong{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  color:#fff;
  font-size:calc(var(--u)*1.02);
  letter-spacing:.07em;
  line-height:1.05;
}
.archive-count-stack{
  flex:0 0 auto;
  display:flex;
  align-items:stretch;
  gap:calc(var(--u)*.45);
}
.archive-count-stack>span{
  min-width:calc(var(--u)*5.3);
  padding:calc(var(--u)*.38) calc(var(--u)*.58);
  display:flex;
  flex-direction:column;
  align-items:flex-end;
  justify-content:center;
  border:1px solid rgba(46,241,58,.3);
  background:linear-gradient(180deg,rgba(10,35,13,.48),rgba(0,5,1,.78));
  clip-path:polygon(7% 0,100% 0,100% 78%,92% 100%,0 100%,0 22%);
}
.archive-count-stack small{
  color:rgba(183,255,191,.58);
  font-size:calc(var(--u)*.43);
  letter-spacing:.15em;
  line-height:1;
}
.archive-count-stack b{
  color:#fff;
  font-size:calc(var(--u)*.9);
  line-height:1.05;
  letter-spacing:.04em;
}
.archive-world-filter{
  position:absolute;
  left:7.2%;
  right:7.2%;
  top:25.2%;
  height:calc(var(--u)*4.25);
  z-index:13;
  display:grid;
  grid-template-columns:repeat(20,minmax(0,1fr));
  gap:calc(var(--u)*.22);
  direction:ltr;
}
.archive-world-chip{
  position:relative;
  min-width:0;
  height:100%;
  border:1px solid rgba(46,241,58,.24);
  border-radius:calc(var(--u)*.18);
  background:linear-gradient(180deg,rgba(3,18,5,.76),rgba(0,4,1,.94));
  padding:calc(var(--u)*.35) calc(var(--u)*.18) calc(var(--u)*.16);
  overflow:hidden;
  cursor:pointer;
  opacity:.7;
  transition:opacity .2s ease,border-color .2s ease,background-color .2s ease,transform .2s ease,box-shadow .2s ease;
}
.archive-world-chip::after{
  content:"";
  position:absolute;
  inset:auto 12% 0;
  height:1px;
  background:var(--green);
  opacity:.25;
  transform:scaleX(.35);
  transition:opacity .2s ease,transform .2s ease;
}
.archive-world-chip img{
  width:100%;
  height:100%;
  object-fit:contain;
  pointer-events:none;
  filter:saturate(.72) brightness(.78);
  transition:filter .2s ease,transform .2s ease;
}
.archive-world-chip span{
  position:absolute;
  left:calc(var(--u)*.18);
  top:calc(var(--u)*.12);
  z-index:2;
  color:rgba(203,255,209,.56);
  font-size:calc(var(--u)*.34);
  letter-spacing:.04em;
  line-height:1;
}
.archive-world-chip:hover,
.archive-world-chip:focus-visible{
  opacity:1;
  border-color:rgba(46,241,58,.75);
  transform:translateY(calc(var(--u)*-.1));
  outline:none;
}
.archive-world-chip.is-active{
  opacity:1;
  border-color:var(--green);
  background:linear-gradient(180deg,rgba(30,112,37,.48),rgba(0,12,2,.95));
  box-shadow:0 0 calc(var(--u)*.7) rgba(46,241,58,.24),inset 0 0 calc(var(--u)*.55) rgba(46,241,58,.13);
}
.archive-world-chip.is-active::after{opacity:1;transform:scaleX(1)}
.archive-world-chip.is-active img{filter:none;transform:scale(1.06)}
.archive-world-chip.is-active span{color:#fff}

.archive-category-screen .species-counter,
.archive-category-screen .bosses-heading{display:none!important}
.archive-category-screen .species-viewport{
  top:36.5%!important;
  height:calc(var(--u)*28.9)!important;
}
.archive-category-screen .species-arrow{top:57.2%!important}
.archive-category-screen .species-track{padding-inline:calc(var(--u)*.12)}
.archive-category-screen .archive-filtered-card{will-change:transform}

/* Level selection now belongs visually to the selected planet. */
.levels-screen .level-world-shell{
  background-color:#000!important;
  background-image:var(--level-world-ground),url('../assets/images/SpaceBackground.png')!important;
  background-repeat:no-repeat,no-repeat!important;
  background-size:100% auto,cover!important;
  background-position:center bottom,center center!important;
}
.level-world-identity{
  position:absolute;
  right:3.4%;
  top:5.4%;
  width:calc(var(--u)*20.2);
  height:calc(var(--u)*6.4);
  z-index:10;
  display:grid;
  grid-template-columns:calc(var(--u)*2.3) minmax(0,1fr);
  grid-template-rows:1fr auto;
  align-items:center;
  column-gap:calc(var(--u)*.5);
  color:var(--green);
  text-align:right;
  text-transform:uppercase;
  pointer-events:none;
}
.level-world-identity>span{
  grid-row:1/3;
  width:calc(var(--u)*2.15);
  height:calc(var(--u)*2.15);
  display:grid;
  place-items:center;
  justify-self:end;
  border:1px solid rgba(46,241,58,.58);
  border-radius:50%;
  background:rgba(0,8,1,.72);
  color:#fff;
  font-size:calc(var(--u)*.62);
  letter-spacing:.05em;
}
.level-world-identity>img{
  grid-column:2;
  width:100%;
  height:calc(var(--u)*4.55);
  object-fit:contain;
  object-position:right center;
}
.level-world-identity>small{
  grid-column:2;
  justify-self:end;
  margin-top:calc(var(--u)*-.2);
  color:rgba(190,255,198,.62);
  font-size:calc(var(--u)*.48);
  letter-spacing:.15em;
  line-height:1;
}

@media (max-width:1100px) and (orientation:landscape){
  .archive-catalog-head{left:5.5%;right:5.5%}
  .archive-world-filter{left:5.5%;right:5.5%;gap:2px}
  .archive-current-world>img{width:calc(var(--u)*9.2)}
  .archive-current-world strong{font-size:calc(var(--u)*.9)}
  .archive-count-stack>span{min-width:calc(var(--u)*4.7)}
}

@media (orientation:landscape) and (pointer:coarse){
  html.phone-landscape .archive-category-screen .site-shell{
    background-image:url('../assets/images/Down.png'),url('../assets/images/SpaceBackground.png')!important;
    background-size:100% auto,cover!important;
    background-position:center bottom,center center!important;
  }
  html.phone-landscape .archive-catalog-head{
    left:42px;
    right:7px;
    top:4px;
    height:34px;
    gap:6px;
  }
  html.phone-landscape .archive-current-world{gap:5px}
  html.phone-landscape .archive-current-world>b{
    width:27px;
    height:27px;
    font-size:9px;
  }
  html.phone-landscape .archive-current-world>img{
    width:82px;
    height:27px;
  }
  html.phone-landscape .archive-current-world>div{padding-left:6px}
  html.phone-landscape .archive-current-world small{font-size:6px}
  html.phone-landscape .archive-current-world strong{font-size:10px;max-width:118px}
  html.phone-landscape .archive-count-stack{gap:3px}
  html.phone-landscape .archive-count-stack>span{
    min-width:48px;
    padding:3px 5px;
  }
  html.phone-landscape .archive-count-stack small{font-size:5px}
  html.phone-landscape .archive-count-stack b{font-size:9px}
  html.phone-landscape .archive-world-filter{
    left:42px;
    right:7px;
    top:42px;
    height:34px;
    display:flex;
    gap:4px;
    overflow-x:auto;
    overflow-y:hidden;
    padding:0 2px 3px;
    scrollbar-width:none;
    scroll-snap-type:x proximity;
    -webkit-overflow-scrolling:touch;
  }
  html.phone-landscape .archive-world-filter::-webkit-scrollbar{display:none}
  html.phone-landscape .archive-world-chip{
    flex:0 0 52px;
    width:52px;
    height:31px;
    padding:3px 3px 1px;
    scroll-snap-align:center;
  }
  html.phone-landscape .archive-world-chip span{font-size:5px;left:2px;top:2px}
  html.phone-landscape .archive-category-screen .species-viewport{
    top:82px!important;
    bottom:28px!important;
    height:auto!important;
  }
  html.phone-landscape .archive-category-screen .species-arrow{top:55%!important}

  html.phone-landscape .levels-screen .level-world-shell{
    background-image:var(--level-world-ground),url('../assets/images/SpaceBackground.png')!important;
    background-size:100% auto,cover!important;
    background-position:center bottom,center center!important;
  }
  html.phone-landscape .level-world-identity{
    right:max(7px,var(--safe-right));
    top:2px;
    width:155px;
    height:35px;
    grid-template-columns:25px minmax(0,1fr);
    column-gap:4px;
  }
  html.phone-landscape .level-world-identity>span{
    width:23px;
    height:23px;
    font-size:8px;
  }
  html.phone-landscape .level-world-identity>img{height:28px}
  html.phone-landscape .level-world-identity>small{display:none}
}

@media (orientation:landscape) and (pointer:coarse) and (max-height:390px){
  html.phone-landscape .archive-current-world>div{display:none}
  html.phone-landscape .archive-current-world>img{width:74px}
  html.phone-landscape .archive-count-stack>span{min-width:44px}
  html.phone-landscape .archive-category-screen .species-viewport{top:77px!important}
}

html[dir="rtl"] .archive-current-world>div{
  border-left:0;
  border-right:1px solid rgba(46,241,58,.34);
  padding-left:0;
  padding-right:calc(var(--u)*.8);
}
html[dir="rtl"] .archive-current-world>img{object-position:right center}
