@media (prefers-reduced-motion: no-preference) {
  #dialog[open]::backdrop { animation: dialog-backdrop-in 260ms cubic-bezier(.22,.8,.26,1); }
  #dialog[open][data-closing]::backdrop { animation: dialog-backdrop-out 170ms cubic-bezier(.5,0,.72,.38) forwards; }
}

@keyframes dialog-backdrop-in {
  from { opacity: var(--dialog-backdrop-from,0); }
  to { opacity: 1; }
}

@keyframes dialog-backdrop-out {
  from { opacity: var(--dialog-backdrop-from,1); }
  to { opacity: 0; }
}

@media print {
  #dialog { opacity: 1 !important; transform: none !important; }
}
