@keyframes sheet-rise { from { transform: translateY(100%); } }
@keyframes sheet-dim { from { opacity: 0; } }
@keyframes speaking-success { 40% { transform: scale(var(--scale-success)); } }

.motion-count { display: inline-block; font-variant-numeric: tabular-nums; }
.cinema-home .toast, .cinema-player .toast {
  transform: translate(-50%, 32px);
  transition: opacity var(--duration-toast-out) ease, transform var(--duration-toast-out) var(--ease-out-standard);
}
.cinema-home .toast.on, .cinema-player .toast.show {
  transform: translate(-50%, 0);
  transition: opacity var(--duration-fast) ease, transform var(--duration-toast-in) var(--ease-spring-pop);
}
.sheet-grab {
  display: grid;
  place-items: center;
  width: calc(var(--size-sheet-grab) + var(--space-5));
  height: var(--size-sheet-grab-target);
  padding: 0;
  margin-inline: auto;
  touch-action: none;
  cursor: grab;
}
.sheet-grab::before {
  content: '';
  width: var(--size-sheet-grab);
  height: var(--space-1);
  border-radius: var(--r-pill);
  background: var(--ivory-50);
}
.sheet-grab:active { cursor: grabbing; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after, .access-dialog::backdrop {
    animation-duration: 0s !important;
    animation-delay: 0s !important;
    transition-duration: 0s !important;
    transition-delay: 0s !important;
    scroll-behavior: auto !important;
  }
}

.mg-result-confetti { position: absolute; inset: 0 0 auto; height: min(40vh, 290px); overflow: hidden; z-index: 2; pointer-events: none; }
.mg-result-confetti i {
  position: absolute; left: var(--x); top: 0; width: 6px; height: 9px; border-radius: 2px;
  background: var(--accent); animation: mg-falling-confetti .9s var(--delay) ease-in both;
}
.mg-result-confetti i:nth-child(3n + 2) { background: var(--rose); }
.mg-result-confetti i:nth-child(3n + 3) { background: var(--status-warning); }
@keyframes mg-falling-confetti {
  0% { transform: translateY(-16px) rotate(0); opacity: 0; }
  25% { opacity: 1; }
  100% { transform: translate(var(--drift), 230px) rotate(400deg); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) { .mg-result-confetti { display: none; } }
