dialog.dialog {
  --duration: 200ms;
  
  transition: 
    opacity    var(--duration) ease-in-out,
    scale     var(--duration) ease-in-out,
    display   var(--duration) ease-in-out allow-discrete;
  
  overflow: hidden;
  position: fixed; 
  
  top: 50%; 
  transform: translateY(-50%);
  bottom: auto;
  height: auto;
  padding: 2.5rem 2rem 2rem 2rem;

  border-radius: 0.5rem; 
  width: auto;
  max-width: none; 
  height: auto;
  max-height: calc(100vh - 2rem);
  background-color: #ffffff;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  left: 0;
  border-radius: 1rem; 
  max-width: min(42rem, calc(100vw - 2rem));
    
  &[open] {
    /* Pre-Entry State */
    @starting-style {
      opacity: 0;
      scale: 0.90;
    }
  }
  /* Exiting State */
  &:not([open]) {
    opacity: 0;
    scale: 0.90;
  }

  &::backdrop {
    background-color: rgba(0, 0, 0, 0);
    transition: background-color 300ms ease;
  }
  &[open]::backdrop {
    background-color: rgba(0, 0, 0, 0.2);
    @starting-style {
      background-color: rgba(0, 0, 0, 0);
    }
  }
}
