@keyframes grain-shift {
  0% { transform: translate(0, 0); }
  20% { transform: translate(-2%, 1%); }
  40% { transform: translate(1%, -2%); }
  60% { transform: translate(-1%, 2%); }
  80% { transform: translate(2%, -1%); }
  100% { transform: translate(0, 0); }
}

@keyframes spin-pulse {
  0%, 100% { box-shadow: 0 0 0 7px rgba(242, 169, 59, 0.045), 0 20px 50px rgba(0, 0, 0, 0.55); }
  50% { box-shadow: 0 0 0 11px rgba(242, 169, 59, 0.09), 0 20px 50px rgba(0, 0, 0, 0.55); }
}

@keyframes card-sheen {
  0% { transform: translateX(-120%); }
  100% { transform: translateX(120%); }
}

@keyframes stamp-in {
  0% { transform: rotate(-8deg) scale(1.4); opacity: 0; }
  60% { transform: rotate(-8deg) scale(0.96); opacity: 1; }
  100% { transform: rotate(-8deg) scale(1); opacity: 1; }
}

@keyframes result-in {
  0% { opacity: 0; transform: translateY(12px); }
  100% { opacity: 1; transform: translateY(0); }
}

@keyframes archive-shake {
  0%, 100% { transform: translateX(0) rotate(0); }
  18% { transform: translateX(-4px) rotate(-0.35deg); }
  36% { transform: translateX(4px) rotate(0.35deg); }
  54% { transform: translateX(-3px) rotate(-0.2deg); }
  72% { transform: translateX(2px) rotate(0.15deg); }
}

@keyframes card-rise {
  0% { opacity: 0; transform: translateY(90px) scale(0.86); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes view-in {
  0% { opacity: 0; transform: translateY(6px); }
  100% { opacity: 1; transform: translateY(0); }
}

@keyframes member-in {
  0% { opacity: 0; transform: translateX(8px); }
  100% { opacity: 1; transform: translateX(0); }
}

.view:not([hidden]) {
  animation: view-in 0.22s var(--ease-out);
}

.result-live.is-in {
  animation: result-in 0.26s var(--ease-out);
}

.archive.is-shaking {
  animation: archive-shake 0.32s ease-out;
}

.drawn-card.is-rise .card {
  animation: card-rise 0.52s var(--ease-mech);
}

.member {
  animation: member-in 0.16s var(--ease-out);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  #grain {
    animation: none;
  }

  .card.is-flipped .card-inner {
    transform: none;
  }

  .card-front {
    transform: none;
  }

  .card-back {
    display: none;
  }
}
