/* Memory Capsule v720: calm, direct Recent Memory opening. */

html body .app-shell .memory-bottom-sheet.open,
html body main.app-shell .memory-bottom-sheet.open {
  /* The capsule owns its motion; the full-screen scrim should not scale or
     blur into place as though the whole app is being pulled forward. */
  animation: memory-capsule-scrim-in 260ms ease-out both !important;
}

html body .app-shell .memory-bottom-sheet.open #memorySheetContent,
html body main.app-shell .memory-bottom-sheet.open #memorySheetContent {
  animation: memory-capsule-calm-in 440ms cubic-bezier(0.22, 0.82, 0.26, 1) both !important;
  transform-origin: 50% 54% !important;
  will-change: opacity, transform !important;
}

/* Chapter Relive keeps its authored arrival beat instead of receiving two
   simultaneous entrance animations. */
html body .app-shell .memory-bottom-sheet.relive-opening.open #memorySheetContent,
html body main.app-shell .memory-bottom-sheet.relive-opening.open #memorySheetContent {
  animation: none !important;
  transform: none !important;
  opacity: 1 !important;
}

@keyframes memory-capsule-scrim-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes memory-capsule-calm-in {
  0% {
    opacity: 0;
    transform: translateY(14px) scale(0.992);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  html body .app-shell .memory-bottom-sheet.open,
  html body main.app-shell .memory-bottom-sheet.open,
  html body .app-shell .memory-bottom-sheet.open #memorySheetContent,
  html body main.app-shell .memory-bottom-sheet.open #memorySheetContent {
    animation: none !important;
    transform: none !important;
    filter: none !important;
  }
}
