/* 动画模式词典 · 原生演示样式（限定在 .ap-stage 内，勿泄漏到页外） */

.ap-stage .ap-d-fade {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.ap-stage .ap-d-fade__box {
  display: inline-block;
  padding: 0.75rem 1.25rem;
  border-radius: 0.75rem;
  background: #111;
  color: #fff;
  opacity: 0;
  animation: ap-d-fade 0.4s ease-out forwards;
}

@keyframes ap-d-fade {
  to {
    opacity: 1;
  }
}

.ap-stage .ap-d-stag {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.5rem;
  width: min(100%, 420px);
}

.ap-stage .ap-d-stag__item {
  padding: 1rem 0.5rem;
  text-align: center;
  border-radius: 0.5rem;
  background: #e8eef8;
  color: #1a1a22;
  opacity: 0;
  animation: ap-d-fade 0.32s ease-out forwards;
}

.ap-stage .ap-d-stag__item:nth-child(1) {
  animation-delay: 0ms;
}

.ap-stage .ap-d-stag__item:nth-child(2) {
  animation-delay: 80ms;
}

.ap-stage .ap-d-stag__item:nth-child(3) {
  animation-delay: 160ms;
}

.ap-stage .ap-d-stag__item:nth-child(4) {
  animation-delay: 240ms;
}

.ap-stage--dark .ap-d-stag__item {
  background: #2a2a3a;
  color: #f4f4f8;
}

.ap-stage--mobile .ap-d-stag {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ap-stage .ap-d-slide,
.ap-stage .ap-d-scale,
.ap-stage .ap-d-exit,
.ap-stage .ap-d-pulse,
.ap-stage .ap-d-shake,
.ap-stage .ap-d-flash,
.ap-stage .ap-d-bounce {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.ap-stage .ap-d-slide__box,
.ap-stage .ap-d-scale__box,
.ap-stage .ap-d-shake__box {
  display: inline-block;
  padding: 0.75rem 1.25rem;
  border-radius: 0.75rem;
  background: #111;
  color: #fff;
}

.ap-stage .ap-d-slide__box {
  opacity: 0;
  transform: translateY(16px);
  animation: ap-d-slide-up 0.45s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes ap-d-slide-up {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.ap-stage .ap-d-scale__box {
  opacity: 0;
  transform: scale(0.92);
  animation: ap-d-scale-in 0.38s ease-out forwards;
}

@keyframes ap-d-scale-in {
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.ap-stage .ap-d-exit__box {
  display: inline-block;
  padding: 0.75rem 1.25rem;
  border-radius: 0.75rem;
  background: #374151;
  color: #fff;
  opacity: 1;
  animation: ap-d-exit 0.32s ease-in 1s forwards;
}

@keyframes ap-d-exit {
  to {
    opacity: 0.15;
  }
}

.ap-stage .ap-d-pulse {
  gap: 0.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: #1a1a22;
}

.ap-stage .ap-d-pulse__dot {
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 999px;
  background: #22c55e;
  animation: ap-d-pulse 0.9s ease-in-out 3;
}

@keyframes ap-d-pulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.35);
  }
}

.ap-stage--dark .ap-d-pulse {
  color: #f4f4f8;
}

.ap-stage .ap-d-shake__box {
  animation: ap-d-shake 0.42s ease-in-out;
}

@keyframes ap-d-shake {
  0%,
  100% {
    transform: translateX(0);
  }
  20% {
    transform: translateX(-6px);
  }
  40% {
    transform: translateX(6px);
  }
  60% {
    transform: translateX(-4px);
  }
  80% {
    transform: translateX(4px);
  }
}

.ap-stage .ap-d-flash__box {
  display: inline-block;
  padding: 0.75rem 1.25rem;
  border-radius: 0.75rem;
  background: #1a1a22;
  color: #fff;
  animation: ap-d-flash 0.6s ease-out;
}

@keyframes ap-d-flash {
  0% {
    background: #fde68a;
    color: #1a1a22;
  }
  100% {
    background: #1a1a22;
    color: #fff;
  }
}

.ap-stage--dark .ap-d-flash__box {
  background: #2a2a3a;
  color: #f4f4f8;
}

.ap-stage--dark .ap-d-flash__box {
  animation-name: ap-d-flash-dark;
}

@keyframes ap-d-flash-dark {
  0% {
    background: #713f12;
    color: #fef3c7;
  }
  100% {
    background: #2a2a3a;
    color: #f4f4f8;
  }
}

.ap-stage .ap-d-bounce__fab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 999px;
  background: #2563eb;
  color: #fff;
  font-size: 1.5rem;
  line-height: 1;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
  animation: ap-d-bounce 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) 3;
}

@keyframes ap-d-bounce {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

/* 库轨激活时暂停舞台内 CSS 动画，交给 GSAP / Motion */
.ap-stage.ap-stage--lib-active,
.ap-stage.ap-stage--lib-active * {
  animation: none !important;
}

.ap-stage.ap-stage--lib-active * {
  transition: none !important;
}

@media (prefers-reduced-motion: reduce) {
  .ap-stage .ap-d-fade__box,
  .ap-stage .ap-d-stag__item,
  .ap-stage .ap-d-slide__box,
  .ap-stage .ap-d-scale__box {
    animation: none;
    opacity: 1;
    transform: none;
  }

  .ap-stage .ap-d-exit__box {
    animation: none;
    opacity: 1;
  }

  .ap-stage .ap-d-pulse__dot {
    animation: none;
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
  }

  .ap-stage .ap-d-shake__box {
    animation: none;
    outline: 2px solid #dc2626;
  }

  .ap-stage .ap-d-flash__box {
    animation: none;
    border-left: 4px solid #f59e0b;
  }

  .ap-stage .ap-d-bounce__fab {
    animation: none;
  }

  .ap-stage .ap-d-stag-slide__item,
  .ap-stage .ap-d-timeline-seq__kicker,
  .ap-stage .ap-d-timeline-seq__title,
  .ap-stage .ap-d-timeline-seq__cta,
  .ap-stage .ap-d-hero-orch__bg,
  .ap-stage .ap-d-hero-orch__title,
  .ap-stage .ap-d-hero-orch__sub,
  .ap-stage .ap-d-hero-orch__cta,
  .ap-stage .ap-d-scroll-reveal__card,
  .ap-stage .ap-d-parallax__back,
  .ap-stage .ap-d-parallax__mid,
  .ap-stage .ap-d-parallax__front,
  .ap-stage .ap-d-sticky-scrub__step {
    animation: none;
    opacity: 1;
    transform: none;
  }

  .ap-stage .ap-d-scroll-prog__fill {
    animation: none;
    transform: scaleX(0.55);
  }

  .ap-stage .ap-d-view-fade__layer,
  .ap-stage .ap-d-shared__thumb,
  .ap-stage .ap-d-shared__hero,
  .ap-stage .ap-d-morph__shell,
  .ap-stage .ap-d-route-slide__page,
  .ap-stage .ap-d-spring-press__btn,
  .ap-stage .ap-d-drag-throw__card,
  .ap-stage .ap-d-magnetic__target,
  .ap-stage .ap-d-inertia-snap__pill {
    animation: none;
    opacity: 1;
    transform: none;
  }
}

/* ── stagger-slide ── */
.ap-stage .ap-d-stag-slide {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: min(100%, 260px);
}

.ap-stage .ap-d-stag-slide__item {
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  background: #dbeafe;
  color: #1e3a8a;
  font-weight: 600;
  opacity: 0;
  transform: translateY(20px);
  animation: ap-d-stag-slide 0.4s ease-out forwards;
}

.ap-stage .ap-d-stag-slide__item:nth-child(1) {
  animation-delay: 0ms;
}

.ap-stage .ap-d-stag-slide__item:nth-child(2) {
  animation-delay: 100ms;
}

.ap-stage .ap-d-stag-slide__item:nth-child(3) {
  animation-delay: 200ms;
}

@keyframes ap-d-stag-slide {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.ap-stage--dark .ap-d-stag-slide__item {
  background: #1e3a5f;
  color: #dbeafe;
}

/* ── timeline-sequence ── */
.ap-stage .ap-d-timeline-seq {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  padding: 1rem;
  border-radius: 0.75rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  width: min(100%, 280px);
}

.ap-stage .ap-d-timeline-seq__kicker {
  margin: 0;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #64748b;
  opacity: 0;
  animation: ap-d-tl-fade 0.3s ease-out 0.05s forwards;
}

.ap-stage .ap-d-timeline-seq__title {
  margin: 0;
  font-size: 1.25rem;
  color: #0f172a;
  opacity: 0;
  transform: translateY(12px);
  animation: ap-d-tl-up 0.4s ease-out 0.25s forwards;
}

.ap-stage .ap-d-timeline-seq__cta {
  margin-top: 0.35rem;
  padding: 0.4rem 0.9rem;
  border: none;
  border-radius: 999px;
  background: #2563eb;
  color: #fff;
  font-size: 0.85rem;
  cursor: default;
  opacity: 0;
  transform: scale(0.94);
  animation: ap-d-tl-scale 0.35s ease-out 0.55s forwards;
}

@keyframes ap-d-tl-fade {
  to {
    opacity: 1;
  }
}

@keyframes ap-d-tl-up {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes ap-d-tl-scale {
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.ap-stage--dark .ap-d-timeline-seq {
  background: #1e293b;
  border-color: #334155;
}

.ap-stage--dark .ap-d-timeline-seq__title {
  color: #f1f5f9;
}

/* ── orchestrate-hero ── */
.ap-stage .ap-d-hero-orch {
  position: relative;
  overflow: hidden;
  width: min(100%, 300px);
  min-height: 140px;
  padding: 1rem;
  border-radius: 0.75rem;
  display: grid;
  gap: 0.5rem;
}

.ap-stage .ap-d-hero-orch__bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #e0e7ff 0%, #fce7f3 100%);
  animation: ap-d-hero-bg 0.6s ease-out;
  z-index: 0;
}

.ap-stage .ap-d-hero-orch__copy {
  position: relative;
  z-index: 1;
}

.ap-stage .ap-d-hero-orch__title {
  margin: 0;
  font-size: 1.15rem;
  color: #1e1b4b;
  opacity: 0;
  animation: ap-d-tl-fade 0.45s ease-out 0.12s forwards;
}

.ap-stage .ap-d-hero-orch__sub {
  margin: 0.2rem 0 0;
  font-size: 0.8rem;
  color: #4338ca;
  opacity: 0;
  animation: ap-d-tl-fade 0.4s ease-out 0.2s forwards;
}

.ap-stage .ap-d-hero-orch__cta {
  position: relative;
  z-index: 1;
  align-self: start;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: #4f46e5;
  color: #fff;
  font-size: 0.8rem;
  opacity: 0;
  transform: translateY(8px);
  animation: ap-d-tl-up 0.38s ease-out 0.28s forwards;
}

@keyframes ap-d-hero-bg {
  from {
    transform: scale(1.05);
  }
  to {
    transform: scale(1);
  }
}

.ap-stage--dark .ap-d-hero-orch__bg {
  background: linear-gradient(135deg, #312e81 0%, #581c87 100%);
}

.ap-stage--dark .ap-d-hero-orch__title {
  color: #e0e7ff;
}

/* ── scroll-reveal（可滚动轨道示意） ── */
.ap-stage .ap-d-scroll-reveal__track {
  width: min(100%, 280px);
  max-height: 220px;
  overflow-y: auto;
  border-radius: 0.75rem;
  border: 1px dashed #cbd5e1;
  padding: 0.75rem;
  scroll-behavior: smooth;
}

.ap-stage .ap-d-scroll-reveal__ghost {
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  color: #94a3b8;
}

.ap-stage .ap-d-scroll-reveal__card {
  margin-bottom: 0.65rem;
  padding: 1rem;
  border-radius: 0.5rem;
  background: #111827;
  color: #f9fafb;
  text-align: center;
  font-weight: 600;
  opacity: 0;
  transform: translateY(24px);
  animation: ap-d-sr-in 0.5s ease-out forwards;
}

.ap-stage .ap-d-scroll-reveal__card--2 {
  animation-delay: 0.15s;
}

@keyframes ap-d-sr-in {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── parallax-layer ── */
.ap-stage .ap-d-parallax {
  width: min(100%, 300px);
}

.ap-stage .ap-d-parallax__scene {
  position: relative;
  height: 160px;
  border-radius: 0.75rem;
  overflow: hidden;
  background: #0f172a;
}

.ap-stage .ap-d-parallax__back,
.ap-stage .ap-d-parallax__mid {
  position: absolute;
  inset: 0;
  display: block;
}

.ap-stage .ap-d-parallax__back {
  background: linear-gradient(180deg, #1d4ed8, #7c3aed);
  animation: ap-d-para-back 4s ease-in-out infinite alternate;
}

.ap-stage .ap-d-parallax__mid {
  background: rgba(255, 255, 255, 0.12);
  animation: ap-d-para-mid 4s ease-in-out infinite alternate;
}

.ap-stage .ap-d-parallax__front {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  background: rgba(255, 255, 255, 0.92);
  color: #0f172a;
  font-weight: 700;
  animation: ap-d-para-front 4s ease-in-out infinite alternate;
}

.ap-stage .ap-d-parallax__hint {
  margin: 0.4rem 0 0;
  font-size: 0.72rem;
  color: #64748b;
  text-align: center;
}

@keyframes ap-d-para-back {
  from {
    transform: translateY(-6px) scale(1.06);
  }
  to {
    transform: translateY(6px) scale(1.02);
  }
}

@keyframes ap-d-para-mid {
  from {
    transform: translateY(-3px);
  }
  to {
    transform: translateY(9px);
  }
}

@keyframes ap-d-para-front {
  from {
    transform: translate(-50%, calc(-50% - 4px));
  }
  to {
    transform: translate(-50%, calc(-50% + 4px));
  }
}

/* ── scroll-progress ── */
.ap-stage .ap-d-scroll-prog {
  width: min(100%, 280px);
}

.ap-stage .ap-d-scroll-prog__bar {
  height: 4px;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
  margin-bottom: 0.65rem;
}

.ap-stage .ap-d-scroll-prog__fill {
  display: block;
  height: 100%;
  width: 100%;
  background: #2563eb;
  transform-origin: left center;
  transform: scaleX(0);
  animation: ap-d-prog-fill 2.5s ease-in-out infinite alternate;
}

.ap-stage .ap-d-scroll-prog__content {
  max-height: 140px;
  overflow-y: auto;
  padding: 0.5rem;
  border-radius: 0.5rem;
  background: #f1f5f9;
  font-size: 0.8rem;
  color: #334155;
  line-height: 1.6;
}

.ap-stage .ap-d-scroll-prog__content p {
  margin: 0 0 0.75rem;
}

@keyframes ap-d-prog-fill {
  to {
    transform: scaleX(0.72);
  }
}

.ap-stage--dark .ap-d-scroll-prog__content {
  background: #1e293b;
  color: #cbd5e1;
}

/* ── sticky-scrub ── */
.ap-stage .ap-d-sticky-scrub {
  width: min(100%, 280px);
  max-height: 240px;
  overflow-y: auto;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
}

.ap-stage .ap-d-sticky-scrub__pin {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 0.75rem;
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
}

.ap-stage .ap-d-sticky-scrub__frame {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  min-height: 72px;
  align-items: center;
}

.ap-stage .ap-d-sticky-scrub__step {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #e2e8f0;
  color: #64748b;
  font-weight: 700;
  opacity: 0.35;
  transform: scale(0.92);
}

.ap-stage .ap-d-sticky-scrub__step--1 {
  animation: ap-d-scrub-1 3s ease-in-out infinite;
}

.ap-stage .ap-d-sticky-scrub__step--2 {
  animation: ap-d-scrub-2 3s ease-in-out infinite;
}

.ap-stage .ap-d-sticky-scrub__step--3 {
  animation: ap-d-scrub-3 3s ease-in-out infinite;
}

.ap-stage .ap-d-sticky-scrub__rail {
  height: 320px;
  background: linear-gradient(180deg, #f8fafc 0%, #e0f2fe 50%, #f8fafc 100%);
}

@keyframes ap-d-scrub-1 {
  0%,
  15% {
    opacity: 1;
    transform: scale(1);
    background: #2563eb;
    color: #fff;
  }
  30%,
  100% {
    opacity: 0.35;
    transform: scale(0.92);
    background: #e2e8f0;
    color: #64748b;
  }
}

@keyframes ap-d-scrub-2 {
  0%,
  30% {
    opacity: 0.35;
    transform: scale(0.92);
  }
  45%,
  60% {
    opacity: 1;
    transform: scale(1);
    background: #2563eb;
    color: #fff;
  }
  75%,
  100% {
    opacity: 0.35;
    transform: scale(0.92);
    background: #e2e8f0;
    color: #64748b;
  }
}

@keyframes ap-d-scrub-3 {
  0%,
  60% {
    opacity: 0.35;
    transform: scale(0.92);
  }
  75%,
  90% {
    opacity: 1;
    transform: scale(1);
    background: #2563eb;
    color: #fff;
  }
  100% {
    opacity: 0.35;
    transform: scale(0.92);
    background: #e2e8f0;
    color: #64748b;
  }
}

.ap-stage--dark .ap-d-sticky-scrub__pin {
  background: #0f172a;
  border-color: #334155;
}

/* ── view-fade ── */
.ap-stage .ap-d-view-fade {
  position: relative;
  width: min(100%, 240px);
  height: 100px;
  border-radius: 0.75rem;
  overflow: hidden;
  background: #f1f5f9;
}

.ap-stage .ap-d-view-fade__layer {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.25rem;
}

.ap-stage .ap-d-view-fade__layer--a {
  background: #cbd5e1;
  color: #334155;
  animation: ap-d-vfade-a 2.4s ease-in-out infinite;
}

.ap-stage .ap-d-view-fade__layer--b {
  background: #2563eb;
  color: #fff;
  opacity: 0;
  animation: ap-d-vfade-b 2.4s ease-in-out infinite;
}

@keyframes ap-d-vfade-a {
  0%,
  40% {
    opacity: 1;
  }
  55%,
  100% {
    opacity: 0;
  }
}

@keyframes ap-d-vfade-b {
  0%,
  40% {
    opacity: 0;
  }
  55%,
  100% {
    opacity: 1;
  }
}

/* ── shared-element ── */
.ap-stage .ap-d-shared {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: min(100%, 280px);
}

.ap-stage .ap-d-shared__thumb,
.ap-stage .ap-d-shared__hero {
  padding: 0.65rem 0.85rem;
  border-radius: 0.5rem;
  background: #1e293b;
  color: #f8fafc;
  font-size: 0.8rem;
  font-weight: 600;
}

.ap-stage .ap-d-shared__thumb {
  animation: ap-d-shared-thumb 2.2s ease-in-out infinite;
}

.ap-stage .ap-d-shared__hero {
  flex: 1;
  text-align: center;
  animation: ap-d-shared-hero 2.2s ease-in-out infinite;
}

.ap-stage .ap-d-shared__arrow {
  color: #94a3b8;
  font-size: 0.85rem;
}

@keyframes ap-d-shared-thumb {
  0%,
  35% {
    transform: scale(1);
    opacity: 1;
  }
  50%,
  100% {
    transform: scale(1.35);
    opacity: 0;
  }
}

@keyframes ap-d-shared-hero {
  0%,
  35% {
    transform: scale(0.85);
    opacity: 0;
  }
  50%,
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* ── morph-container ── */
.ap-stage .ap-d-morph {
  display: flex;
  justify-content: center;
  width: min(100%, 280px);
}

.ap-stage .ap-d-morph__shell {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  width: 120px;
  border-radius: 12px;
  background: linear-gradient(135deg, #e0e7ff, #fbcfe8);
  animation: ap-d-morph-shell 2s ease-in-out infinite alternate;
}

.ap-stage .ap-d-morph__label {
  font-weight: 700;
  font-size: 0.85rem;
  color: #3730a3;
}

@keyframes ap-d-morph-shell {
  to {
    width: 220px;
    border-radius: 24px;
  }
}

/* ── route-slide ── */
.ap-stage .ap-d-route-slide__viewport {
  position: relative;
  width: min(100%, 260px);
  height: 88px;
  overflow: hidden;
  border-radius: 0.75rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.ap-stage .ap-d-route-slide__page {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.9rem;
}

.ap-stage .ap-d-route-slide__page--out {
  background: #e2e8f0;
  color: #475569;
  animation: ap-d-route-out 2.2s ease-in-out infinite;
}

.ap-stage .ap-d-route-slide__page--in {
  background: #2563eb;
  color: #fff;
  animation: ap-d-route-in 2.2s ease-in-out infinite;
}

@keyframes ap-d-route-out {
  0%,
  40% {
    transform: translateX(0);
    opacity: 1;
  }
  55%,
  100% {
    transform: translateX(-24%);
    opacity: 0;
  }
}

@keyframes ap-d-route-in {
  0%,
  40% {
    transform: translateX(100%);
    opacity: 1;
  }
  55%,
  100% {
    transform: translateX(0);
    opacity: 1;
  }
}

/* ── spring-press ── */
.ap-stage .ap-d-spring-press {
  display: flex;
  justify-content: center;
}

.ap-stage .ap-d-spring-press__btn {
  padding: 0.65rem 1.25rem;
  border: none;
  border-radius: 999px;
  background: #4f46e5;
  color: #fff;
  font-weight: 600;
  cursor: default;
  animation: ap-d-spring-press 1.2s cubic-bezier(0.34, 1.56, 0.64, 1) infinite;
}

@keyframes ap-d-spring-press {
  0%,
  70%,
  100% {
    transform: scale(1);
  }
  35% {
    transform: scale(0.92);
  }
}

/* ── drag-throw ── */
.ap-stage .ap-d-drag-throw {
  width: min(100%, 280px);
}

.ap-stage .ap-d-drag-throw__card {
  display: inline-block;
  padding: 0.75rem 1.1rem;
  border-radius: 0.65rem;
  background: #fef3c7;
  color: #92400e;
  font-weight: 700;
  animation: ap-d-drag-throw 1.8s ease-out infinite;
}

.ap-stage .ap-d-drag-throw__hint {
  margin: 0.5rem 0 0;
  font-size: 0.72rem;
  color: #64748b;
}

@keyframes ap-d-drag-throw {
  0% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(48px);
  }
  100% {
    transform: translateX(120px);
  }
}

/* ── magnetic-pull ── */
.ap-stage .ap-d-magnetic {
  position: relative;
  width: min(100%, 200px);
  height: 88px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ap-stage .ap-d-magnetic__target {
  padding: 0.55rem 1rem;
  border-radius: 999px;
  background: #0f172a;
  color: #fff;
  font-weight: 600;
  font-size: 0.85rem;
  animation: ap-d-magnetic 2s ease-in-out infinite;
}

.ap-stage .ap-d-magnetic__cursor {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #f97316;
  top: 30%;
  right: 28%;
  animation: ap-d-magnetic-cursor 2s ease-in-out infinite;
}

@keyframes ap-d-magnetic {
  0%,
  100% {
    transform: translate(0, 0);
  }
  50% {
    transform: translate(8px, -6px);
  }
}

@keyframes ap-d-magnetic-cursor {
  0%,
  100% {
    transform: translate(0, 0);
  }
  50% {
    transform: translate(-12px, 10px);
  }
}

/* ── inertia-snap ── */
.ap-stage .ap-d-inertia-snap__track {
  display: flex;
  gap: 0.5rem;
  width: min(100%, 260px);
  padding: 0.35rem;
  border-radius: 999px;
  background: #f1f5f9;
  overflow: hidden;
}

.ap-stage .ap-d-inertia-snap__pill {
  flex: 1;
  text-align: center;
  padding: 0.45rem 0;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.8rem;
  color: #64748b;
  background: transparent;
  animation: ap-d-inertia-pill 2.4s ease-in-out infinite;
}

.ap-stage .ap-d-inertia-snap__pill--active {
  animation-name: ap-d-inertia-pill-active;
}

@keyframes ap-d-inertia-pill {
  0%,
  100% {
    opacity: 0.5;
  }
  50% {
    opacity: 1;
  }
}

@keyframes ap-d-inertia-pill-active {
  0%,
  30% {
    background: transparent;
    color: #64748b;
    transform: translateX(0);
  }
  45% {
    transform: translateX(8px);
  }
  60%,
  100% {
    background: #2563eb;
    color: #fff;
    transform: translateX(0);
  }
}

.ap-stage--dark .ap-d-view-fade {
  background: #1e293b;
}

.ap-stage--dark .ap-d-route-slide__viewport {
  background: #0f172a;
  border-color: #334155;
}

.ap-stage--dark .ap-d-inertia-snap__track {
  background: #1e293b;
}