/* Original Nexora brand-sheet assets — lossless PNGs */
:root{
  --nx-brand-atmosphere:url('/assets/brand-original/backgrounds/purple-atmosphere.png');
}
body{
  background-image:var(--nx-brand-atmosphere),radial-gradient(ellipse at 75% -5%,#6841a53b,transparent 35%),radial-gradient(ellipse at 0% 60%,#266e8020,transparent 35%),linear-gradient(#080711,#080711);
  background-repeat:no-repeat;
  background-position:right -110px top -55px,center,center,center;
  background-size:min(760px,88vw) auto,auto,auto,auto;
}
.brand img{object-fit:contain}
.hero-visual{min-height:0;padding:14px}
.lapotatu-hero{
  display:block;width:min(100%,620px);height:auto;aspect-ratio:696/306;object-fit:cover;
  border:1px solid #a98cff55;border-radius:22px;
  box-shadow:0 24px 70px #0008,0 0 45px #9169ff25;
  animation:brand-banner-float 7s ease-in-out infinite;
}
@keyframes brand-banner-float{0%,100%{transform:translateY(0)}50%{transform:translateY(-7px)}}
.card-icon img{width:42px;height:42px;object-fit:contain}
.lapatatu-band{background-image:linear-gradient(90deg,#211a37f2,#111321e8),var(--nx-brand-atmosphere);background-size:auto,min(430px,65%) auto;background-position:center,right center;background-repeat:no-repeat}
.lapatatu-band:after{background:url('/assets/brand-original/mascot/lapatatu-watermark.png') center/contain no-repeat;border:0;box-shadow:none;width:260px;height:142px;right:3%;top:8%;opacity:.14;pointer-events:none}
footer{background-image:url('/assets/brand-original/ui/brand-footer-strip.png');background-repeat:no-repeat;background-position:center bottom;background-size:min(100%,1100px) auto;padding-bottom:78px}
.nx-pet-bubble{background-image:linear-gradient(145deg,#211a35ed,#100e1bf2),url('/assets/brand-original/mascot/lapatatu-watermark.png');background-position:center,right -18px bottom -8px;background-size:auto,100px auto;background-repeat:no-repeat}
@media(max-width:650px){
  .hero-visual{padding:0;min-height:0}
  .lapotatu-hero{border-radius:16px}
  .lapatatu-band:after{width:170px;height:92px;right:0;top:4%;opacity:.1}
  footer{background-size:100% auto;padding-bottom:55px}
}
@media(prefers-reduced-motion:reduce){.lapotatu-hero{animation:none}}
/* Nexori Market original product banners */
.market-brand-logo{width:42px;height:42px;object-fit:contain;filter:drop-shadow(0 0 14px #a98aff66)}
.market-product-icon{width:82px;height:82px;object-fit:contain}
.cover.optimizer-cover{background:url('/assets/brand-original/banners/optimizer-product.png') center/cover no-repeat}
.cover.studio-cover,.cover.green{background:url('/assets/brand-original/banners/studio-product.png') center/cover no-repeat}
.cover.blue{background:url('/assets/brand-original/banners/market-product.png') center/cover no-repeat}

/* Account pages: keep the original Nexora identity */
.nx-auth-showcase{background-image:linear-gradient(145deg,#151024ed,#0c0a15e8),url('/assets/brand-original/backgrounds/purple-atmosphere.png');background-position:center,right center;background-size:auto,cover;background-repeat:no-repeat}
.nx-auth-brand img,.brand-mark{object-fit:contain;filter:drop-shadow(0 0 14px #a98aff66)}
.nx-auth-showcase:after{content:"";position:absolute;right:5%;bottom:5%;width:180px;height:98px;background:url('/assets/brand-original/mascot/lapatatu-watermark.png') center/contain no-repeat;opacity:.13;pointer-events:none}
@media(max-width:850px){.nx-auth-showcase:after{width:120px;height:65px}}

.footer{background-image:url('/assets/brand-original/ui/brand-footer-strip.png');background-repeat:no-repeat;background-position:center bottom;background-size:min(100%,1100px) auto;padding-bottom:70px}

/* Final original PNG banner mapping: keep each product tied to its own supplied artwork. */
.cover.optimizer-cover{background-image:url('/assets/brand-original/banners/optimizer-product.png')!important;background-size:cover!important;background-position:center!important}
.cover.blue.studio-cover{background-image:url('/assets/brand-original/banners/market-product.png')!important;background-size:cover!important;background-position:center!important}
.cover.green{background-image:url('/assets/brand-original/banners/studio-product.png')!important;background-size:cover!important;background-position:center!important}
.cover .cover-icon{width:64px;height:64px;object-fit:contain;right:18px;bottom:12px}
.nav .brand .logo{background:transparent;border:0;box-shadow:none;padding:0;overflow:visible}
.nav .brand .logo img{width:42px;height:42px;object-fit:contain;border-radius:0}
.nx-auth-brand img{width:42px;height:42px}


/* Mobile-first cleanup: keep the companion clear of content and controls. */
.nx-pet{
  right:12px!important;bottom:12px!important;width:76px!important;gap:3px!important;
}
.nx-pet-button{
  width:68px!important;height:68px!important;
}
.nx-pet-button img{
  width:100%;height:100%;object-fit:contain;
}
.nx-pet-controls{
  display:none!important;
}
.nx-pet-bubble{
  position:absolute;right:0;bottom:74px;width:max-content;max-width:180px;
  opacity:0;pointer-events:none;
}
.nx-pet.is-reacting .nx-pet-bubble,.nx-pet:focus-within .nx-pet-bubble{
  opacity:1;transform:none;
}
.nx-pet-button:focus-visible{outline:2px solid #bba5ff;outline-offset:4px;border-radius:50%}
.lapatatu-pet{right:12px!important;bottom:12px!important;width:78px!important}
.pet-character{width:68px!important;height:68px!important}
.pet-actions{display:none!important}
.pet-bubble{position:absolute;right:0;bottom:74px;width:max-content;max-width:180px}
.card-icon,.ico,.market-product-icon{
  border-radius:18px!important;overflow:hidden;
}
.card-icon{
  width:62px!important;height:62px!important;
  background:linear-gradient(145deg,#352451,#171426)!important;
  border:1px solid #a98cff66!important;
  box-shadow:inset 0 1px #ffffff22,0 8px 24px #7654c433!important;
}
.card-icon img{width:46px!important;height:46px!important;object-fit:contain!important}
.cover .cover-icon{display:none!important}
.cover.optimizer-cover,.cover.studio-cover,.cover.blue,.cover.green{
  background-size:100% 100%!important;background-position:center!important;
}
@media(max-width:650px){
  .nx-pet{right:8px!important;bottom:8px!important;width:60px!important}
  .nx-pet-button{width:54px!important;height:54px!important}
  .nx-pet-bubble{bottom:58px;max-width:150px}
  .lapatatu-pet{right:8px!important;bottom:8px!important;width:60px!important}
  .pet-character{width:54px!important;height:54px!important}
  .pet-bubble{bottom:58px;max-width:150px}
  .card-icon{width:58px!important;height:58px!important;border-radius:17px!important}
  .card-icon img{width:43px!important;height:43px!important}
}


/* Final mobile layout repair */
@media(max-width:650px){
  body{
    background-image:
      radial-gradient(ellipse at 82% 0%,#6841a52b,transparent 32%),
      radial-gradient(ellipse at 0% 60%,#266e8018,transparent 34%),
      linear-gradient(#080711,#080711)!important;
    background-position:center!important;
    background-size:auto!important;
  }
  .hero{display:flex!important;flex-direction:column!important;align-items:stretch!important;gap:22px!important;padding-top:34px!important}
  .hero-copy{order:0;width:100%;min-width:0}
  .hero-visual{order:1;width:100%;min-height:0!important;height:auto!important;padding:0!important;margin:0!important;display:block!important}
  .lapotatu-hero{width:100%!important;max-width:100%!important;height:auto!important;aspect-ratio:696/306!important;object-fit:contain!important;transform:none!important}
  .lapatatu-band{display:grid!important;grid-template-columns:1fr!important;gap:16px!important;padding:25px!important;overflow:hidden}
  .lapatatu-band>img{display:none!important}
  footer,.footer{background-image:none!important;padding-bottom:24px!important}
  .nx-pet{right:8px!important;bottom:8px!important;width:54px!important;z-index:25}
  .nx-pet-button{width:52px!important;height:52px!important;background:transparent!important;border:0!important;box-shadow:none!important;padding:0!important}
  .nx-pet-button img{width:100%!important;height:100%!important;object-fit:contain!important;border-radius:0!important;background:transparent!important;filter:drop-shadow(0 4px 8px #08051088)!important}
  .nx-pet-glow,.nx-pet-spark,.nx-pet-controls{display:none!important}
  .nx-pet-bubble{right:0!important;bottom:58px!important;max-width:155px!important}
  .cover{height:auto!important;min-height:0!important;aspect-ratio:400/96!important;padding:0!important;background-size:100% 100%!important;background-position:center!important;border-radius:16px 16px 0 0!important}
  .cover label{display:none!important}
  .cover .cover-icon{display:none!important}
}
@media(min-width:651px){
  .cover{height:auto!important;min-height:0!important;aspect-ratio:400/96!important;background-size:100% 100%!important}
  .cover label{display:none!important}
  .cover .cover-icon{display:none!important}
}
.card-icon{overflow:hidden!important;border-radius:18px!important}
.card-icon img{border-radius:14px!important;object-fit:contain!important}
.nx-pet,.nx-pet-button{background:transparent!important;box-shadow:none!important}
.nx-pet-button img{background:transparent!important;border-radius:0!important;object-fit:contain!important}

@media(max-width:650px){
 footer,.footer{border-top:0!important}
}
.lapatatu-band:after{display:none!important}

/* Companion sizing: visible, clear, and independent from the Market hero artwork. */
@media(max-width:650px){
  .nx-pet{width:116px!important;right:9px!important;bottom:8px!important}
  .nx-pet-button{width:106px!important;height:106px!important}
  .nx-pet-bubble{bottom:110px!important}
}
@media(min-width:651px){
  .nx-pet{width:142px!important}
  .nx-pet-button{width:130px!important;height:130px!important}
}

/* Lapatatu animation states — image assets are loaded from /assets/lapatatu/. */
.nx-pet-button img{transform-origin:50% 82%;will-change:transform}
.nx-pet[data-pose="walk"] .nx-pet-button{animation:nx-lap-walk .29s ease-in-out infinite alternate}
.nx-pet[data-pose="dance"] .nx-pet-button{animation:nx-lap-dance .48s ease-in-out infinite alternate}
.nx-pet[data-pose="sleep"] .nx-pet-button{animation:nx-lap-sleep 3.2s ease-in-out infinite}
.nx-pet[data-pose="walk"] .nx-pet-button img{filter:drop-shadow(0 7px 12px #080510aa)}
.nx-pet[data-pose="dance"] .nx-pet-spark{opacity:1;animation:nx-pet-twinkle .7s ease-in-out infinite}
@keyframes nx-lap-walk{from{transform:translateY(1px) rotate(-2deg)}to{transform:translateY(-3px) rotate(2deg)}}
@keyframes nx-lap-dance{0%{transform:translateY(0) rotate(-9deg)}50%{transform:translateY(-7px) rotate(8deg)}100%{transform:translateY(0) rotate(-7deg)}}
@keyframes nx-lap-sleep{0%,100%{transform:translateY(2px) scale(.97)}50%{transform:translateY(5px) scale(.94)}}
@media(max-width:650px){
 .nx-pet{width:124px!important;right:8px!important;bottom:8px!important}
 .nx-pet-button{width:112px!important;height:112px!important}
 .nx-pet-controls{display:flex!important;opacity:.85!important}
 .nx-pet-controls button{width:27px;height:27px;border-radius:10px}
}
@media(prefers-reduced-motion:reduce){.nx-pet[data-pose] .nx-pet-button{animation:none!important}}

/* Lapatatu: real side-walk sprite frames and short autonomous roaming. */
.nx-pet.is-walking-left{animation:nx-pet-roam-left 3.2s ease-in-out both}
.nx-pet.is-walking-right{animation:nx-pet-roam-right 3.2s ease-in-out both}
.nx-pet[data-pose="walk"] .nx-pet-button{animation:nx-lap-step .29s ease-in-out infinite alternate}
.nx-pet[data-pose="walk"] #nx-pet-image{transform:scaleX(-1)!important}
.nx-pet[data-pose="dance"] .nx-pet-button{animation:nx-lap-dance .48s ease-in-out infinite}
.nx-pet[data-pose="sleep"] .nx-pet-button{animation:nx-lap-sleep 3.2s ease-in-out infinite}
@keyframes nx-pet-roam-left{0%{translate:0 0}45%,65%{translate:calc(-1 * var(--nx-walk-distance,56px)) 0}100%{translate:0 0}}
@keyframes nx-pet-roam-right{0%{translate:calc(-1 * var(--nx-walk-distance,56px)) 0}45%,65%{translate:0 0}100%{translate:0 0}}
@keyframes nx-lap-step{from{transform:translateY(1px) rotate(-2deg)}to{transform:translateY(-3px) rotate(2deg)}}
@keyframes nx-lap-dance{0%,100%{transform:translateY(0) rotate(-8deg)}50%{transform:translateY(-8px) rotate(8deg)}}
@keyframes nx-lap-sleep{0%,100%{transform:translateY(2px) scale(.97)}50%{transform:translateY(5px) scale(.94)}}
@media(prefers-reduced-motion:reduce){.nx-pet.is-walking-left,.nx-pet.is-walking-right,.nx-pet[data-pose] .nx-pet-button{animation:none!important}}

.nx-pet[data-pose="walk"][data-direction="left"] #nx-pet-image{transform:scaleX(-1)!important}
.nx-pet[data-pose="walk"][data-direction="right"] #nx-pet-image{transform:none!important}

/* Reliable side-to-side movement: animate the fixed pet wrapper itself. */
.nx-pet.is-walking-left{animation:nx-lap-roam-left 3s ease-in-out both!important}
.nx-pet.is-walking-right{animation:nx-lap-roam-right 3s ease-in-out both!important}
.nx-pet[data-pose="walk"] .nx-pet-button{animation:nx-lap-step .36s ease-in-out infinite alternate!important}
.nx-pet[data-pose="walk"] #nx-pet-image{transition:filter .15s}
.nx-pet[data-pose="dance"] .nx-pet-button{animation:nx-lap-dance .48s ease-in-out infinite!important}
.nx-pet[data-pose="sleep"] .nx-pet-button{animation:nx-lap-sleep 3.2s ease-in-out infinite!important}
@keyframes nx-lap-roam-left{0%{transform:translateX(0)}42%,62%{transform:translateX(calc(-1 * var(--nx-walk-distance,60px)))}100%{transform:translateX(0)}}
@keyframes nx-lap-roam-right{0%{transform:translateX(0)}42%,62%{transform:translateX(var(--nx-walk-distance,60px))}100%{transform:translateX(0)}}
@keyframes nx-lap-step{from{transform:translateY(1px) rotate(-3deg)}to{transform:translateY(-4px) rotate(3deg)}}
@media(prefers-reduced-motion:reduce){.nx-pet.is-walking-left,.nx-pet.is-walking-right,.nx-pet[data-pose] .nx-pet-button{animation:none!important}}

/* Lapatatu sprite-sheet replacement: use real transparent frame sequences, avoid wrapper animation conflicts. */
#nx-pet.is-walking-left,#nx-pet.is-walking-right{animation:none!important;transform:none!important}
#nx-pet{will-change:right}
#nx-pet[data-pose="walk"] .nx-pet-button{animation:nx-lap-step .36s ease-in-out infinite alternate!important}
#nx-pet[data-pose="dance"] .nx-pet-button{animation:nx-lap-dance .48s ease-in-out infinite!important}
#nx-pet[data-pose="sleep"] .nx-pet-button{animation:nx-lap-sleep 3.2s ease-in-out infinite!important}
#nx-pet[data-pose="walk"] #nx-pet-image{transform:none!important}
@media(prefers-reduced-motion:reduce){
  #nx-pet[data-pose] .nx-pet-button{animation:none!important}
  #nx-pet.is-walking-left,#nx-pet.is-walking-right{animation:none!important}
}


/* One animation source of truth: the controller swaps a single image element. */
#nx-pet .nx-pet-button,
#nx-pet #nx-pet-image {
  animation: none !important;
}
#nx-pet .nx-pet-button {
  transform: none !important;
}


/* Lapatatu sleep state: a gentle breathing loop on the selected sleep pose */
#nx-pet[data-pose="sleep"] .nx-pet-button{animation:nx-pet-sleep-breathe 3.8s ease-in-out infinite!important}
@keyframes nx-pet-sleep-breathe{0%,100%{transform:translateY(2px) scale(.985)}50%{transform:translateY(5px) scale(1.015)}}
