Smoothly animate elements into and out of the top layer.
Opening is pure CSS via @starting-style. In browsers that
support overlay and discrete display
transitions, light dismiss animates too; elsewhere, only the close
button below runs the animated exit fallback.