/* ELIE v5.1.15 — clean rebuild on the user's v5.1.7 package.
   This file intentionally moves only complete components. It never changes
   the coordinates or animations of ELIE's internal logo layers. */

/* -------------------------------------------------------------------------- */
/* 1. Stable HUD + dual-row navigation                                         */
/* -------------------------------------------------------------------------- */
@media (min-width:900px) and (min-height:520px),
       (hover:hover) and (pointer:fine){
  .site-shell{
    --hud-right:max(2.4%,var(--safe-right));
    --share-width:calc(var(--u)*10.4);
    --hud-height:calc(var(--u)*4.6);
  }

  .screen .home-share-launch{
    display:flex!important;
    visibility:visible!important;
    opacity:1!important;
    pointer-events:auto!important;
    left:auto!important;
    right:var(--hud-right)!important;
    top:1.18%!important;
    bottom:auto!important;
    width:var(--share-width)!important;
    min-width:var(--share-width)!important;
    height:var(--hud-height)!important;
    min-height:var(--hud-height)!important;
    padding:calc(var(--u)*.34) calc(var(--u)*.56)!important;
    gap:calc(var(--u)*.38)!important;
    justify-content:center!important;
    box-sizing:border-box!important;
    transform:none!important;
    z-index:38!important;
  }
  .screen .home-share-launch:hover,
  .screen .home-share-launch:focus-visible{transform:translateY(-1px)!important}
  .screen .home-share-launch img{
    width:calc(var(--u)*2.75)!important;
    height:calc(var(--u)*2.75)!important;
    flex:0 0 auto!important;
  }
  .screen .home-share-launch span{
    min-width:0!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
    white-space:nowrap!important;
    font-size:clamp(8px,calc(var(--u)*.65),12px)!important;
  }
  .screen .career.career-cyber{
    right:calc(var(--hud-right) + var(--share-width) + 10px)!important;
    width:calc(var(--u)*25.6)!important;
    z-index:37!important;
  }

  .topbar.topbar-v518{
    left:max(3.1%,var(--safe-left))!important;
    right:max(3.1%,var(--safe-right))!important;
    top:calc(1.18% + var(--hud-height) + 10px)!important;
    width:auto!important;
    height:calc(var(--u)*9.7)!important;
    display:grid!important;
    grid-template-columns:minmax(0,1fr) calc(var(--u)*15.84) minmax(0,1fr)!important;
    column-gap:calc(var(--u)*1.05)!important;
    align-items:start!important;
    transform:none!important;
    z-index:32!important;
  }
  .topbar-v518 .nav-cluster{
    display:flex!important;
    flex-direction:column!important;
    justify-content:flex-start!important;
    width:100%!important;
    min-width:0!important;
    gap:calc(var(--u)*.52)!important;
    padding-top:calc(var(--u)*1.22)!important;
  }
  .topbar-v518 .nav-row,
  .topbar-v518 .nav-cluster-left .nav-row-primary,
  .topbar-v518 .nav-cluster-right .nav-row-primary,
  .topbar-v518 .nav-row-secondary{
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    width:100%!important;
    gap:calc(var(--u)*.68)!important;
  }
  .topbar-v518 .nav-btn{
    min-width:calc(var(--u)*9.15)!important;
    max-width:calc(var(--u)*13.1)!important;
    height:calc(var(--u)*2.72)!important;
    padding:0 calc(var(--u)*.72)!important;
    font-size:clamp(10px,calc(var(--u)*.73),14px)!important;
  }

  /* Move and scale the complete logo. Internal UFO/body/text/hand/atom layers
     keep the exact original v5.1.7 coordinates and animation. */
  .topbar-v518 .nav-logo-button{
    width:calc(var(--u)*15.84)!important;
    height:calc(var(--u)*9.46)!important;
    min-height:0!important;
    justify-self:center!important;
    align-self:start!important;
    transform:translateY(calc(var(--u)*-.72))!important;
    overflow:visible!important;
  }
  .topbar-v518 .nav-logo.elie-logo-assembly{
    width:100%!important;
    height:100%!important;
    transform:scale(1.034)!important;
    transform-origin:50% 14%!important;
  }
  .topbar-v518 .nav-logo-button:hover .nav-logo,
  .topbar-v518 .nav-logo-button:focus-visible .nav-logo{
    transform:scale(1.105)!important;
  }

  .language-logo.elie-logo-assembly{
    top:3.25%!important;
    width:calc(var(--u)*35.42)!important;
    height:calc(var(--u)*33.77)!important;
  }
  .v3-levelstart-logo.elie-logo-assembly{
    top:2.65%!important;
    width:calc(var(--u)*14.74)!important;
    height:calc(var(--u)*14.08)!important;
  }
}

/* Tablet uses the same geometry without runtime measurements. */
@media (orientation:landscape) and (pointer:coarse) and (min-width:900px) and (min-height:520px){
  .topbar.topbar-v518{
    top:68px!important;
    height:100px!important;
    grid-template-columns:minmax(0,1fr) 132px minmax(0,1fr)!important;
  }
  .topbar-v518 .nav-cluster{padding-top:13px!important;gap:7px!important}
  .topbar-v518 .nav-row{gap:7px!important}
  .topbar-v518 .nav-btn{height:35px!important;font-size:clamp(9px,1.28vw,12px)!important}
  .topbar-v518 .nav-logo-button{width:132px!important;height:92px!important;transform:translateY(-8px)!important}
  .topbar-v518 .nav-logo.elie-logo-assembly{transform:scale(.902)!important}
  .topbar-v518 .nav-logo-button:hover .nav-logo,
  .topbar-v518 .nav-logo-button:focus-visible .nav-logo{transform:scale(.95)!important}
}

/* Phone: preserve the established two-column mobile menu and keep top HUD clear. */
@media (orientation:landscape) and (pointer:coarse) and (max-width:899px),
       (orientation:landscape) and (pointer:coarse) and (max-height:519px){
  .topbar.topbar-v518{display:none!important}
  .screen .career.career-cyber{
    right:calc(max(3px,var(--safe-right)) + 122px)!important;
    width:104px!important;
  }
  .screen .home-share-launch{
    display:flex!important;
    left:auto!important;
    right:calc(max(3px,var(--safe-right)) + 42px)!important;
    top:calc(max(4px,var(--safe-top)) + 1px)!important;
    bottom:auto!important;
    width:76px!important;
    min-width:76px!important;
    height:38px!important;
    min-height:38px!important;
    padding:3px 7px 3px 4px!important;
    gap:4px!important;
    justify-content:center!important;
    border-radius:10px!important;
    transform:none!important;
    z-index:61!important;
  }
  .screen .home-share-launch img{width:25px!important;height:25px!important}
  .screen .home-share-launch span{display:block!important;font-size:7px!important;white-space:nowrap!important}
  .home-screen .mobile-home-logo{
    top:20.5%!important;
    width:clamp(143px,22vw,209px)!important;
    height:clamp(130px,35vh,187px)!important;
  }
}

/* -------------------------------------------------------------------------- */
/* 2. Home controls, Passport species and banners                              */
/* -------------------------------------------------------------------------- */
.home-screen .home-myra-launch,
.home-screen .home-passport-launch,
.home-screen .home-share-launch,
.home-screen .home-banner-cinema{
  visibility:visible!important;
  opacity:1!important;
  pointer-events:auto!important;
}
.home-screen .home-myra-launch{
  display:grid!important;
  left:var(--myra-left,max(2.5%,calc(var(--safe-left) + 10px)))!important;
  right:auto!important;
  top:auto!important;
  bottom:var(--myra-bottom,132px)!important;
  z-index:24!important;
}
.home-screen .home-passport-launch{
  display:block!important;
  left:var(--passport-left,max(2.5%,calc(var(--safe-left) + 10px)))!important;
  right:auto!important;
  top:var(--passport-top,50%)!important;
  bottom:auto!important;
  z-index:25!important;
}
.home-screen .home-passport-species-layer{z-index:23!important;pointer-events:none!important}
.home-screen .home-passport-species-peek{transform:none!important;overflow:hidden!important}
.home-screen .home-passport-species-peek>img{
  object-position:left center!important;
  transform-origin:0 50%!important;
  animation:passportSpeciesPeekRightV515 2.65s cubic-bezier(.18,.82,.22,1) forwards!important;
}
@keyframes passportSpeciesPeekRightV515{
  0%{opacity:0;transform:translate3d(-102%,0,0) rotate(var(--peek-tilt)) scale(.92)}
  18%{opacity:1;transform:translate3d(2%,0,0) rotate(var(--peek-tilt)) scale(1)}
  66%{opacity:1;transform:translate3d(2%,0,0) rotate(var(--peek-tilt)) scale(1)}
  100%{opacity:0;transform:translate3d(-104%,0,0) rotate(var(--peek-tilt)) scale(.93)}
}
.home-screen .home-banner-cinema{transform:none!important;z-index:18!important}
.home-screen .home-banner-frame{
  opacity:0!important;
  transform:none!important;
  animation:none!important;
  transition:opacity .9s ease!important;
  will-change:opacity!important;
}
.home-screen .home-banner-frame.is-active{opacity:1!important}
.home-screen .home-banner-scan{display:none!important}

@media (orientation:landscape) and (pointer:coarse) and (max-width:899px),
       (orientation:landscape) and (pointer:coarse) and (max-height:519px){
  .home-screen .home-myra-launch{display:grid!important;bottom:var(--myra-bottom,80px)!important}
  .home-screen .home-passport-launch{display:block!important}
}

/* -------------------------------------------------------------------------- */
/* 3. Update Archive — natural content height, no overlap                      */
/* -------------------------------------------------------------------------- */
.update-center-modal{
  overflow:hidden!important;
  padding:0!important;
}
.update-center-window{
  position:relative!important;
  width:min(95vw,1540px)!important;
  height:min(92dvh,900px)!important;
  min-height:520px!important;
  display:grid!important;
  grid-template-rows:auto minmax(0,1fr) auto!important;
  gap:14px!important;
  padding:26px 30px 18px!important;
  overflow:hidden!important;
  box-sizing:border-box!important;
}
.update-center-header{
  position:relative!important;
  min-height:112px!important;
  height:auto!important;
  display:grid!important;
  align-items:center!important;
  overflow:visible!important;
}
.update-history-scroll{
  position:relative!important;
  inset:auto!important;
  width:100%!important;
  min-width:0!important;
  min-height:0!important;
  height:auto!important;
  max-height:none!important;
  display:block!important;
  overflow-y:auto!important;
  overflow-x:hidden!important;
  padding:4px 12px 8px 2px!important;
  box-sizing:border-box!important;
  scroll-behavior:smooth!important;
  overscroll-behavior:contain!important;
}
.update-history-card{
  position:relative!important;
  inset:auto!important;
  top:auto!important;
  left:auto!important;
  right:auto!important;
  bottom:auto!important;
  display:grid!important;
  grid-template-columns:minmax(158px,188px) minmax(0,1fr)!important;
  gap:24px!important;
  align-items:start!important;
  width:100%!important;
  height:auto!important;
  min-height:0!important;
  max-height:none!important;
  margin:0 0 14px!important;
  padding:20px 24px 22px!important;
  transform:none!important;
  overflow:hidden!important;
  box-sizing:border-box!important;
  flex:none!important;
  flex-shrink:0!important;
  contain:none!important;
}
.update-history-card:last-child{margin-bottom:0!important}
.update-version{
  position:relative!important;
  inset:auto!important;
  top:auto!important;
  display:flex!important;
  flex-direction:column!important;
  align-items:flex-start!important;
  justify-content:flex-start!important;
  width:auto!important;
  min-width:0!important;
  height:auto!important;
  margin:0!important;
  padding:1px 0 0!important;
  transform:none!important;
  border:0!important;
}
.update-version strong,
.update-version time{position:relative!important;inset:auto!important;height:auto!important;line-height:1.05!important}
.update-scope{
  position:relative!important;
  inset:auto!important;
  display:flex!important;
  flex-wrap:wrap!important;
  gap:5px!important;
  width:100%!important;
  height:auto!important;
  margin:8px 0 0!important;
}
.update-copy{
  position:relative!important;
  inset:auto!important;
  display:block!important;
  width:100%!important;
  min-width:0!important;
  height:auto!important;
  min-height:0!important;
  max-height:none!important;
  margin:0!important;
  padding:0!important;
  transform:none!important;
  overflow:visible!important;
}
.update-copy h3,
.update-copy p,
.update-copy ul,
.update-copy li{
  position:relative!important;
  inset:auto!important;
  width:auto!important;
  height:auto!important;
  min-height:0!important;
  max-height:none!important;
  transform:none!important;
  overflow:visible!important;
}
.update-copy h3{margin:1px 0 9px!important;line-height:1.15!important}
.update-copy p{display:block!important;margin:0!important;line-height:1.5!important}
.update-copy ul{
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  grid-auto-rows:auto!important;
  gap:8px 18px!important;
  margin:14px 0 0!important;
  padding:14px 0 0!important;
  list-style:none!important;
  border-top:1px solid rgba(46,241,58,.13)!important;
}
.update-copy li{display:block!important;margin:0!important;padding-left:15px!important;line-height:1.42!important}
html[dir="rtl"] .update-history-card{grid-template-columns:minmax(0,1fr) minmax(158px,188px)!important}
html[dir="rtl"] .update-version{grid-column:2!important;align-items:flex-end!important}
html[dir="rtl"] .update-copy{grid-column:1!important;grid-row:1!important;text-align:right!important}
html[dir="rtl"] .update-copy li{padding-left:0!important;padding-right:15px!important}

@media (orientation:landscape) and (pointer:coarse){
  .update-center-window{
    width:99%!important;
    height:98%!important;
    min-height:0!important;
    padding:10px 12px 8px!important;
    gap:8px!important;
  }
  .update-center-header{min-height:64px!important;padding-bottom:7px!important}
  .update-history-scroll{padding:2px 5px 5px 1px!important}
  .update-history-card{
    grid-template-columns:110px minmax(0,1fr)!important;
    gap:12px!important;
    margin-bottom:8px!important;
    padding:11px 13px 13px!important;
    border-radius:11px!important;
  }
  .update-copy h3{margin-bottom:4px!important}
  .update-copy p{line-height:1.34!important}
  .update-copy ul{gap:4px 9px!important;margin-top:7px!important;padding-top:7px!important}
  .update-copy li{line-height:1.32!important;padding-left:10px!important}
  html[dir="rtl"] .update-history-card{grid-template-columns:minmax(0,1fr) 110px!important}
  html[dir="rtl"] .update-copy li{padding-left:0!important;padding-right:10px!important}
}
@media (max-width:760px){
  .update-history-card{display:block!important;padding:14px 16px 16px!important}
  .update-version{
    flex-direction:row!important;
    align-items:center!important;
    flex-wrap:wrap!important;
    gap:7px 10px!important;
    margin:0 0 12px!important;
    padding:0 0 11px!important;
    border-bottom:1px solid rgba(46,241,58,.16)!important;
  }
  .update-scope{width:auto!important;flex:1 1 180px!important;margin:0!important}
  .update-copy ul{grid-template-columns:1fr!important}
}

/* -------------------------------------------------------------------------- */
/* 4. Boss archive and credits                                                 */
/* -------------------------------------------------------------------------- */
.boss-card.locked{cursor:not-allowed!important}
.boss-card.locked .archive-card-world-logo{opacity:.38!important}
.boss-card.locked .lock-cross{
  position:absolute!important;
  left:50%!important;
  top:50%!important;
  width:72%!important;
  height:76%!important;
  object-fit:contain!important;
  transform:translate(-50%,-50%)!important;
  z-index:5!important;
  opacity:1!important;
}
.boss-detail .boss-detail-copy{grid-template-rows:minmax(0,20%) auto minmax(0,1fr)!important}
.boss-detail .boss-detail-copy .detail-title-zone{justify-content:flex-end!important;padding:0 0 calc(var(--u)*.22)!important}
.boss-detail .boss-detail-copy .detail-description-zone,
.species-detail.boss-detail .archive-detail-copy.archive-detail-with-world .detail-description-zone{
  position:relative!important;
  top:calc(var(--u)*-.42)!important;
  margin:0 0 calc(var(--u)*-.42)!important;
  padding-top:0!important;
  align-self:start!important;
}
.credits-email-v5110{position:relative!important;z-index:3!important}

/* Reduced motion keeps all critical controls visible. */
@media (prefers-reduced-motion:reduce){
  .home-screen .home-banner-frame{transition:none!important}
  .home-screen .home-passport-species-layer{display:none!important}
}
