

#app #jackpots .plaque.jackpot::before,
#app .lagoon-jackpot::before,
#app .stampede-jackpot::before,
#app .aurora-jackpot::before,
#app .frontier-jackpot::before,
#app .express-jackpot::before,
#app .phoenix-jackpot::before,
#app .ascent-jackpot::before,
#app .mischief-jackpot::before,
#app .studio-jackpot::before {
  content: "";
  position: absolute;
  top: -7px;
  right: 5px;
  z-index: 1;
  width: 18px;
  height: 18px;
  background:
    radial-gradient(circle, #fff 0 1.3px, rgba(255, 236, 170, 0.9) 2.2px, transparent 4.5px),
    linear-gradient(90deg, transparent, rgba(255, 246, 214, 0.95) 50%, transparent) center / 100% 1.5px no-repeat,
    linear-gradient(180deg, transparent, rgba(255, 246, 214, 0.95) 50%, transparent) center / 1.5px 100% no-repeat;
  opacity: 0;
  scale: 0.2;
  pointer-events: none;
}

#app .lagoon-jackpot,
#app .aurora-jackpot {
  position: relative;
}

#app #jackpots .plaque.jackpot::before,
#app .lagoon-jackpot::before,
#app .stampede-jackpot::before,
#app .aurora-jackpot::before,
#app .frontier-jackpot::before,
#app .express-jackpot::before,
#app .phoenix-jackpot::before,
#app .ascent-jackpot::before,
#app .mischief-jackpot::before,
#app .studio-jackpot::before {
  animation: idle-plaque-glint 4.4s ease-in-out var(--idle-delay, 0s) infinite;
  animation-play-state: var(--idle-play, running);
}

#app :is(.plaque.jackpot, .lagoon-jackpot, .stampede-jackpot, .aurora-jackpot, .express-jackpot, .phoenix-jackpot, .ascent-jackpot, .frontier-jackpot, .mischief-jackpot, .studio-jackpot).major { --idle-delay: -3.3s; }
#app :is(.plaque.jackpot, .lagoon-jackpot, .stampede-jackpot, .aurora-jackpot, .express-jackpot, .phoenix-jackpot, .ascent-jackpot, .frontier-jackpot, .mischief-jackpot, .studio-jackpot).minor { --idle-delay: -2.2s; }
#app :is(.plaque.jackpot, .lagoon-jackpot, .stampede-jackpot, .aurora-jackpot, .express-jackpot, .phoenix-jackpot, .ascent-jackpot, .frontier-jackpot, .mischief-jackpot, .studio-jackpot).mini { --idle-delay: -1.1s; }

#app #tower .roof::after {
  animation: idle-crystal 3.6s ease-in-out infinite;
  animation-play-state: var(--idle-play, running);
}

@media (prefers-reduced-motion: no-preference) {
  #grid:not(:has(.spinning, .cell-spin)) .cell.idle-on:not(.win, .hit) :is(.sym-face:not(.has-idle-pose, .pose-on), .koi-pearl-orb) {
    animation: var(--idle-sym) 9s ease-in-out var(--idle-delay, 0s) infinite;
    animation-play-state: var(--idle-play, running);
  }
}

#grid .cell[data-idle="breathe"] { --idle-sym: idle-sym-breathe; }
#grid .cell[data-idle="sway"] { --idle-sym: idle-sym-sway; }
#grid .cell[data-idle="flick"] { --idle-sym: idle-sym-flick; }
#grid .cell[data-idle="turn"] { --idle-sym: idle-sym-turn; }
#grid .cell[data-idle="spin"] { --idle-sym: idle-sym-spin; }

body.in-lobby #app .idle-on,
body.destination-active #app .idle-on,
body.scene-motion-paused #app .idle-on,
body:has(> [aria-hidden="false"]:not(#app, #lobby, #planet-tip, #fx-layer)) #app .idle-on {
  --idle-play: paused;
}

#app .spin-button::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: 0 0 14px 3px rgba(125, 255, 90, 0.8);
  opacity: 0;
  pointer-events: none;
}

#app .spin-button:where(:not(.stop, .auto, .broke, .busy, :disabled))::after {
  animation: idle-spin-breathe 2.8s ease-in-out infinite;
  animation-play-state: var(--idle-play, running);
}


:root {
  --parallax-drift: 6px;
  --parallax-spin: 6px;
  --parallax-land: 2.5px;
  --parallax-reach: 12px;
}

[data-parallax] {
  --parallax-depth: 0;
  --parallax-bleed: calc(var(--parallax-reach) * var(--parallax-depth));
  pointer-events: none;
  animation: idle-parallax 26s ease-in-out var(--idle-delay, 0s) infinite;
  animation-play-state: var(--idle-play, running);
}

[data-parallax="far"] { --parallax-depth: 0.25; }
[data-parallax="mid"] { --parallax-depth: 0.55; }
[data-parallax="frame"] { --parallax-depth: 1; }


.express-pick.show .express-choice-art {
  animation: idle-float 3.8s ease-in-out var(--idle-delay, 0s) infinite;
  animation-play-state: var(--idle-play, running);
}

.express-choice.line { --idle-delay: -1.9s; }

.express-show.show .express-show-hero,
.studio-show.show .studio-show-hero,
.ascent-show.show .ascent-show-hero,
.stampede-show.show .stampede-show-hero,
.phoenix-show.show .phoenix-show-hero,
.mischief-show.show .mischief-show-hero {
  animation: idle-breathe-scale 3.2s ease-in-out infinite;
  animation-play-state: var(--idle-play, running);
}

.aurora-show.show .aurora-show-pot.on {
  animation: idle-float 3.6s ease-in-out var(--idle-delay, 0s) infinite;
  animation-play-state: var(--idle-play, running);
}

.aurora-show-pot:nth-child(2) { --idle-delay: -1.2s; }
.aurora-show-pot:nth-child(3) { --idle-delay: -2.4s; }

.express-show-panel button,
.studio-show-panel button,
.ascent-show-panel button,
.stampede-show-panel button,
.aurora-show-panel button,
.mischief-show-panel button,
.auto-count {
  position: relative;
  overflow: hidden;
}

.express-show-panel button::after,
.studio-show-panel button::after,
.ascent-show-panel button::after,
.stampede-show-panel button::after,
.aurora-show-panel button::after,
.mischief-show-panel button::after,
.auto-count::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 32%, rgba(255, 255, 255, 0.45) 50%, transparent 68%);
  translate: -101% 0;
  pointer-events: none;
}

.express-show.show .express-show-panel button::after,
.studio-show.show .studio-show-panel button::after,
.ascent-show.show .ascent-show-panel button::after,
.stampede-show.show .stampede-show-panel button::after,
.aurora-show.show .aurora-show-panel button::after,
.mischief-show.show .mischief-show-panel button::after {
  animation: idle-glint 3.6s ease-in-out 1.2s infinite;
  animation-play-state: var(--idle-play, running);
}

.auto-picker.open .auto-count::after {
  animation: idle-glint-wave 4.8s ease-in-out var(--idle-delay, 0.8s) infinite;
  animation-play-state: var(--idle-play, running);
}

.auto-count:nth-child(2) { --idle-delay: 0.95s; }
.auto-count:nth-child(3) { --idle-delay: 1.1s; }
.auto-count:nth-child(4) { --idle-delay: 1.25s; }
.auto-count:nth-child(5) { --idle-delay: 1.4s; }
.auto-count:nth-child(6) { --idle-delay: 1.55s; }


@keyframes idle-sym-breathe {
  0%, 25%, 100% { scale: 1; }
  12% { scale: 1.06; }
}

@keyframes idle-sym-sway {
  0%, 25%, 100% { rotate: 0deg; }
  8% { rotate: -4deg; }
  17% { rotate: 3deg; }
}

@keyframes idle-sym-flick {
  0%, 18%, 100% { rotate: 0deg; translate: 0 0; }
  4% { rotate: -5deg; translate: 0 -2px; }
  9% { rotate: 4deg; translate: 0 0; }
  13% { rotate: -2deg; }
}

@keyframes idle-sym-turn {
  0% { rotate: 0deg; }
  25%, 100% { rotate: 360deg; }
}

@keyframes idle-sym-spin {
  0% { rotate: y 0deg; }
  14%, 100% { rotate: y 360deg; }
}

@keyframes idle-glint-wave {
  0% { translate: -101% 0; }
  22%, 100% { translate: 101% 0; }
}

@keyframes idle-plaque-glint {
  0%, 62%, 100% { opacity: 0; scale: 0.2; rotate: 0deg; }
  72% { opacity: 1; scale: 1; rotate: 45deg; }
  86% { opacity: 0; scale: 0.3; rotate: 90deg; }
}

@keyframes idle-spin-breathe {
  0%, 100% { opacity: 0.1; }
  50% { opacity: 0.85; }
}

@keyframes idle-crystal {
  0%, 100% { scale: 1; rotate: 0deg; }
  50% { scale: 1.14; rotate: 6deg; }
}

@keyframes idle-drift-a {
  0%, 100% { translate: 0 0; opacity: 0.45; }
  50% { translate: 14% 9%; opacity: 1; }
}

@keyframes idle-drift-b {
  0%, 100% { translate: 0 0; opacity: 0.4; }
  50% { translate: -12% -10%; opacity: 0.95; }
}

@keyframes idle-rise-a {
  from { translate: 0 0; }
  to { translate: 0 -220px; }
}

@keyframes idle-rise-b {
  from { translate: 0 0; }
  to { translate: 0 -260px; }
}

@keyframes idle-twinkle {
  0%, 100% { opacity: 0.25; }
  50% { opacity: 1; }
}

@keyframes idle-float {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -5px; }
}

@keyframes idle-sway {
  0%, 100% { translate: 0 0; rotate: -2deg; }
  50% { translate: 0 -5px; rotate: 2deg; }
}

@keyframes idle-breathe {
  0%, 100% { opacity: 0.35; }
  50% { opacity: 1; }
}

@keyframes idle-breathe-scale {
  0%, 100% { scale: 1; }
  50% { scale: 1.05; }
}

@keyframes idle-spark {
  0%, 100% { scale: 1; rotate: 0deg; }
  45% { scale: 1.14; rotate: 10deg; }
  60% { scale: 1.04; rotate: 4deg; }
}

@keyframes idle-blink {
  0%, 100% { opacity: 1; }
  45% { opacity: 0.4; }
}

@keyframes idle-glint {
  0% { translate: -101% 0; }
  40%, 100% { translate: 101% 0; }
}

@keyframes idle-parallax {
  0%, 50%, 100% { translate: 0 0; }
  25% { translate: calc(var(--parallax-drift) * var(--parallax-depth)) calc(var(--parallax-drift) * var(--parallax-depth) / -3); }
  75% { translate: calc(var(--parallax-drift) * var(--parallax-depth) * -1) calc(var(--parallax-drift) * var(--parallax-depth) / -3); }
}

@keyframes idle-capsule {
  0%, 79%, 86%, 100% { opacity: 0; }
  82.5% { opacity: 0.65; }
}

@media (prefers-reduced-motion: reduce) {
  .idle-ambient { display: none; }
  #voyage-sheet.open .voyage-medal-ring,
  #voyage-sheet.open .voyage-medal.ready .voyage-medal-ring::after,
  #voyage-sheet.open .voyage-rank-claim:not([hidden])::after,
  #atlas-sheet.open .atlas-album-art,
  #atlas-sheet.open .atlas-medal:not(.complete) .atlas-medal-ring,
  #inbox-sheet.open .inbox-envelope,
  #rank-sheet.open .rank-star::after,
  #profile-sheet.open .profile-preview,
  #league-sheet.open .league-tier.current .league-mark,
  #pearl-sheet.open .pearl-feature-stage::before,
  #rush-sheet.open .rush-meter-mark,
  .sheet.open:not(.destination-screen) .sheet-title::after,
  .sheet.open .refill-buy::after,
  .sheet.open .deal-yes.intro-play::after,
  .sheet.open .refill-art,
  .intro-sheet.open .intro-coin,
  .streak-sheet.open .streak-pip.break,
  .deal.open .deal-chest:not(:disabled, .mine, .opening, .opened, .chosen) .chest::after,
  #app #jackpots .plaque.jackpot::before,
  #app .lagoon-jackpot::before,
  #app .stampede-jackpot::before,
  #app .aurora-jackpot::before,
  #app .frontier-jackpot::before,
  #app .express-jackpot::before,
  #app .phoenix-jackpot::before,
  #app .ascent-jackpot::before,
  #app .mischief-jackpot::before,
  #app .studio-jackpot::before,
  #app #tower .roof::after,
  #app .spin-button::after,
  .express-pick.show .express-choice-art,
  .express-show.show .express-show-hero,
  .studio-show.show .studio-show-hero,
  .ascent-show.show .ascent-show-hero,
  .stampede-show.show .stampede-show-hero,
  .phoenix-show.show .phoenix-show-hero,
  .mischief-show.show .mischief-show-hero,
  .aurora-show.show .aurora-show-pot.on,
  .express-show.show .express-show-panel button::after,
  .studio-show.show .studio-show-panel button::after,
  .ascent-show.show .ascent-show-panel button::after,
  .stampede-show.show .stampede-show-panel button::after,
  .aurora-show.show .aurora-show-panel button::after,
  .mischief-show.show .mischief-show-panel button::after,
  .auto-picker.open .auto-count::after {
    animation: none;
  }
}

#app .jackpot-qualifiable { position: relative; overflow: visible; }
#app .jackpot-locked { border-color: #a794ae; box-shadow: none; }
#app .jackpot-locked > :not(.jackpot-qualify) { filter: saturate(0.55) brightness(0.88); }
#app .jackpot-qualify {
  position: absolute;
  z-index: 2;
  inset-inline: 0;
  top: 50%;
  transform: translateY(-50%);
  min-width: 44px;
  height: max(100%, calc(44.2px * var(--tower-type-scale, 1)));
  border: 0;
  border-radius: inherit;
  padding: 0;
  background: transparent;
  box-shadow: none;
  cursor: pointer;
}

html.landscape #app:has(> :not([hidden]) .jackpot-qualifiable) { --ls-strip: 46px; }


html:not(.landscape) #app .lagoon-jackpot.jackpot-locked {
  flex-direction: column;
  align-items: center;
  gap: 0;
  padding-block: 5px;
}

@container studio-sign (max-height: 200px) {
  html:not(.landscape) #app .studio-jackpot.jackpot-locked { padding-block: 4px; }
}

@media (max-height: 700px) {

  #app:has(> .tower:not([hidden])) {
    --nebula-min-cell: 44px;
    --nebula-chrome: 434px;
  }
  #app .tower .jackpot-qualifiable {
    min-height: calc(45px * var(--tower-type-scale, 1));
    justify-content: center;
  }
}
#app .jackpot-qualify:focus-visible { outline: 2px solid white; outline-offset: -2px; }
#app .jackpot-qualify[hidden], #app .jackpot-lock-badge[hidden] { display: none; }
#app .jackpot-lock-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-inline-start: 4px;
  padding: 1px 3px;
  border-radius: 4px;
  background: #251e36;
  color: #fff4db;
  font: 600 max(11.2px, calc(11.2px * var(--tower-type-scale, 1)))/1 var(--body);
  letter-spacing: 0;
  vertical-align: middle;
  white-space: nowrap;
}
#app .jackpot-lock-badge::after { content: attr(data-minimum); }
#app .jackpot-lock-badge::before {
  content: "";
  width: 7px;
  height: 5px;
  margin-top: 4px;
  border-radius: 1px;
  background: currentColor;
  box-shadow: 0 -3px 0 -1px #251e36, 0 -4px 0 -1px currentColor;
}
