.ascent-gate.opening { transition: none; }

.ascent-gate.near { border-top-color: var(--gold-light); box-shadow: inset 0 0 14px var(--gold); }
.ascent-gate.near .ascent-gate-progress { color: #fff; transform-origin: right center; }
.ascent-gate.near::after {
  content: "";
  position: absolute;
  inset: 0;
  box-shadow: inset 0 0 20px var(--gold-light);
  opacity: 0;
  pointer-events: none;
}

.app.ascent .cell.ascent-orb.locking { box-shadow: inset 0 0 0 2px var(--gold-light); }

@media (prefers-reduced-motion: no-preference) {
  .ascent-gate.near::after { animation: ascent-gate-near 1s ease-in-out infinite; animation-play-state: var(--idle-play, running); }
  .ascent-gate.near .ascent-gate-progress { animation: ascent-near-text 1s ease-in-out infinite; animation-play-state: var(--idle-play, running); }

  .ascent-gate.opening::before, .ascent-gate.opening::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 150%;
    box-shadow: none;
    pointer-events: none;
    opacity: 0;
    animation: ascent-dust-burst .8s ease-out both;
  }
  .ascent-gate.opening::before {
    background:
      radial-gradient(circle at 10% 60%, var(--ascent-sand-light) 0 3px, transparent 4px),
      radial-gradient(circle at 30% 40%, var(--ascent-sand) 0 4px, transparent 5px),
      radial-gradient(circle at 50% 65%, var(--ascent-sand-light) 0 2px, transparent 3px),
      radial-gradient(circle at 70% 45%, var(--ascent-sand) 0 3px, transparent 4px),
      radial-gradient(circle at 90% 60%, var(--ascent-sand-light) 0 4px, transparent 5px);
  }
  .ascent-gate.opening::after {
    animation-delay: .08s;
    background:
      radial-gradient(circle at 20% 50%, var(--ascent-sand) 0 2px, transparent 3px),
      radial-gradient(circle at 40% 70%, var(--ascent-sand-light) 0 3px, transparent 4px),
      radial-gradient(circle at 60% 40%, var(--ascent-sand) 0 4px, transparent 5px),
      radial-gradient(circle at 80% 65%, var(--ascent-sand-light) 0 2px, transparent 3px);
  }

  .app.ascent .grid.ascent-shake { animation: ascent-shake .45s linear; }

  .app.ascent .cell.kind-collector.impact::after, .app.ascent .cell.kind-boost.impact::after {
    content: "";
    position: absolute;
    inset: 6%;
    border-radius: 50%;
    border: 3px solid var(--ascent-ruby);
    box-shadow: 0 0 12px var(--ascent-ruby), inset 0 0 10px var(--ascent-ruby);
    pointer-events: none;
    animation: ascent-impact-ring .6s ease-out both;
  }
  .app.ascent .cell.kind-boost.impact::after {
    border-color: var(--ascent-turquoise);
    box-shadow: 0 0 12px var(--ascent-turquoise), inset 0 0 10px var(--ascent-turquoise);
  }

  .app.ascent .cell.ascent-orb.doubled { animation: ascent-charge-big .8s ease-out; }
  .app.ascent .cell.ascent-orb.locking { animation: ascent-lock .4s ease-out; }
}

.float-text.ascent-pop.big { font-size: 24px; color: #fff; text-shadow: 0 0 10px var(--ascent-turquoise); }

@keyframes ascent-gate-near { 50% { opacity: 1; } }
@keyframes ascent-near-text { 50% { scale: 1.14; } }
@keyframes ascent-dust-burst {
  0% { opacity: 0; translate: 0 -10%; scale: .6 1; }
  20% { opacity: 1; }
  100% { opacity: 0; translate: 0 40%; scale: 1.25 1.1; }
}
@keyframes ascent-shake {
  0%, 100% { translate: 0 0; }
  15% { translate: var(--ascent-shake) calc(var(--ascent-shake) * -.6); }
  35% { translate: calc(var(--ascent-shake) * -1) calc(var(--ascent-shake) * .5); }
  55% { translate: calc(var(--ascent-shake) * .6) calc(var(--ascent-shake) * -.3); }
  75% { translate: calc(var(--ascent-shake) * -.4) calc(var(--ascent-shake) * .2); }
}
@keyframes ascent-impact-ring {
  0% { opacity: 1; scale: .55; }
  100% { opacity: 0; scale: 1.5; }
}
@keyframes ascent-charge-big { 30% { transform: scale(1.3); filter: brightness(1.9); } }
@keyframes ascent-lock { 40% { transform: scale(1.16); filter: brightness(1.6); } }
