.modal[hidden] {
  display: none;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: var(--s-4);
}

@media (min-width: 640px) {
  .modal {
    align-items: center;
  }
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(31, 27, 28, 0.45);
}

.modal__dialog {
  position: relative;
  width: min(28rem, 100%);
  background: var(--surface);
  border: 1px solid rgba(208, 199, 201, 0.85);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-2);
  padding: var(--s-5) var(--s-5) var(--s-4);
  z-index: 1;
}

.modal__title {
  font-family: var(--font-sans);
  font-size: var(--fs-lg);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: var(--s-2);
}

.modal__body {
  color: var(--ink-700);
  font-size: var(--fs-sm);
  margin-bottom: var(--s-5);
}

.modal__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: var(--s-2);
}

body.modal-open {
  overflow: hidden;
}
