/* Independent movement belongs to the celestial artwork; labels and hit areas stay still. */
.planet-art.body{--planet-float:11s;--planet-delay:-2.4s;--planet-spin:68s;--planet-direction:normal;--planet-glow:7.3s;--ring-angle:-25deg}
.planet-art.relations{--planet-float:13.6s;--planet-delay:-8.1s;--planet-spin:59s;--planet-direction:reverse;--planet-glow:8.7s;--ring-angle:-25deg}
.planet-art.energy{--planet-float:10.2s;--planet-delay:-5.7s;--planet-spin:43s;--planet-direction:normal;--planet-glow:6.6s;--ring-angle:-25deg}
.planet-art.money{--planet-float:15.1s;--planet-delay:-10.3s;--planet-spin:76s;--planet-direction:reverse;--planet-glow:9.4s;--ring-angle:-22deg}

.app-shell.cosmic-motion-on .view:is([data-page="home"],[data-page="planet"]) .planet-art{
  animation:resource-planet-float var(--planet-float,12s) ease-in-out var(--planet-delay,-3s) infinite;
  transform-origin:50% 55%;
  will-change:transform;
}
.app-shell.cosmic-motion-on .view:is([data-page="home"],[data-page="planet"]) .planet-img{
  animation:resource-planet-spin var(--planet-spin,65s) linear var(--planet-delay,-3s) infinite var(--planet-direction,normal);
  transform-origin:50% 50%;
  will-change:transform;
}
.app-shell.cosmic-motion-on .view:is([data-page="home"],[data-page="planet"]) .planet-art:before{
  animation:resource-planet-glow var(--planet-glow,8s) ease-in-out var(--planet-delay,-3s) infinite;
  will-change:opacity,transform;
}
.app-shell.cosmic-motion-on .view:is([data-page="home"],[data-page="planet"]) .orbit{
  animation:resource-orbit-sway 24s ease-in-out var(--planet-delay,-3s) infinite;
  transform-origin:50% 50%;
}
.app-shell.cosmic-motion-on .view:is([data-page="home"],[data-page="planet"]) .orbit:after{
  content:"";
  position:absolute;
  left:100%;top:50%;
  width:4px;height:4px;
  margin:-2px 0 0 -2px;
  border-radius:50%;
  background:#fff0d9;
  box-shadow:0 0 4px #fff0dfcc,0 0 11px #e7b2ef99;
  pointer-events:none;
  animation:resource-ring-light 13s linear var(--planet-delay,-3s) infinite;
}
.app-shell.cosmic-motion-on .view:is([data-page="home"],[data-page="planet"]) .planet-art.money .orbit:after{
  animation-duration:17s;
  animation-direction:reverse;
  background:#fff0bc;
  box-shadow:0 0 4px #ffefc8cc,0 0 11px #e9be7299;
}
.app-shell.cosmic-motion-on .bottom-nav .nav-center img.heart-icon{
  animation:resource-navigation-light 8.5s ease-in-out -2s infinite;
}

@keyframes resource-planet-float{
  0%,100%{transform:translate3d(-2px,2px,0) rotate(-1.1deg)}
  25%{transform:translate3d(2px,-3px,0) rotate(.5deg)}
  50%{transform:translate3d(3px,-6px,0) rotate(1.5deg)}
  75%{transform:translate3d(-1px,-2px,0) rotate(-.3deg)}
}
@keyframes resource-planet-spin{
  from{transform:rotate(0deg)}
  to{transform:rotate(360deg)}
}
@keyframes resource-planet-glow{
  0%,100%{opacity:.48;transform:scale(.92)}
  45%{opacity:.95;transform:scale(1.15)}
  70%{opacity:.72;transform:scale(1.04)}
}
@keyframes resource-orbit-sway{
  0%,100%{transform:rotate(calc(var(--ring-angle,-25deg) - 2deg))}
  50%{transform:rotate(calc(var(--ring-angle,-25deg) + 2.5deg))}
}
@keyframes resource-ring-light{
  0%,100%{left:100%;top:50%;opacity:.7}
  12.5%{left:85.36%;top:85.36%;opacity:1}
  25%{left:50%;top:100%;opacity:1}
  37.5%{left:14.64%;top:85.36%;opacity:.95}
  50%{left:0%;top:50%;opacity:.7}
  62.5%{left:14.64%;top:14.64%;opacity:.25}
  75%{left:50%;top:0%;opacity:.2}
  87.5%{left:85.36%;top:14.64%;opacity:.35}
}
@keyframes resource-navigation-light{
  0%,100%{filter:drop-shadow(0 0 1px #d7a0ed15)}
  50%{filter:drop-shadow(0 0 6px #ddabe94d)}
}

/* The app offers explicit movement opt-in when the system requests less motion. */
@media(prefers-reduced-motion:reduce){
  .app-shell:not(.motion-opt-in) .view:is([data-page="home"],[data-page="planet"]) .planet-art,
  .app-shell:not(.motion-opt-in) .view:is([data-page="home"],[data-page="planet"]) .planet-img,
  .app-shell:not(.motion-opt-in) .view:is([data-page="home"],[data-page="planet"]) .planet-art:before,
  .app-shell:not(.motion-opt-in) .view:is([data-page="home"],[data-page="planet"]) .orbit,
  .app-shell:not(.motion-opt-in) .view:is([data-page="home"],[data-page="planet"]) .orbit:after,
  .app-shell:not(.motion-opt-in) .bottom-nav .nav-center img.heart-icon{animation:none!important}

  .app-shell.motion-opt-in.cosmic-motion-on .view:is([data-page="home"],[data-page="planet"]) .planet-art{animation-duration:var(--planet-float,12s)!important;animation-iteration-count:infinite!important}
  .app-shell.motion-opt-in.cosmic-motion-on .view:is([data-page="home"],[data-page="planet"]) .planet-img{animation-duration:var(--planet-spin,65s)!important;animation-iteration-count:infinite!important}
  .app-shell.motion-opt-in.cosmic-motion-on .view:is([data-page="home"],[data-page="planet"]) .planet-art:before{animation-duration:var(--planet-glow,8s)!important;animation-iteration-count:infinite!important}
  .app-shell.motion-opt-in.cosmic-motion-on .view:is([data-page="home"],[data-page="planet"]) .orbit{animation-duration:24s!important;animation-iteration-count:infinite!important}
  .app-shell.motion-opt-in.cosmic-motion-on .view:is([data-page="home"],[data-page="planet"]) .orbit:after{animation-duration:13s!important;animation-iteration-count:infinite!important}
  .app-shell.motion-opt-in.cosmic-motion-on .view:is([data-page="home"],[data-page="planet"]) .planet-art.money .orbit:after{animation-duration:17s!important}
  .app-shell.motion-opt-in.cosmic-motion-on .bottom-nav .nav-center img.heart-icon{animation-duration:8.5s!important;animation-iteration-count:infinite!important}
}
