.modal {
  /* Center in viewport: fixed removes it from normal flow, inset: 0 pins all
     four edges to the viewport boundary, margin: auto splits the remaining
     space equally on all sides — same trick as a centered fixed image. */
  position: fixed;
  inset: 0;
  margin: auto;
  /* Sizing: height must be fit-content or the dialog stretches top-to-bottom */
  max-width: 28rem;
  width: calc(100% - 2rem);
  height: fit-content;
  background: transparent;
  border: none;
  padding: 0;
}

.modal::backdrop {
  background: rgba(5, 5, 5, 0.7);
  backdrop-filter: blur(8px);
}

.modal[open] {
  animation: modal-enter 300ms var(--ease-spring);
}

.modal__overlay {
  position: absolute;
  inset: 0;
  z-index: -1;
}

.modal__panel {
  background: var(--color-surface-raised);
  box-shadow: var(--shadow-elevated);
  border-radius: var(--radius-card);
  padding: 2rem;
}

.modal__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-h2);
  letter-spacing: -0.015em;
  margin-bottom: 1rem;
  color: var(--color-ink);
}

.modal__body {
  color: var(--color-ink);
  line-height: 1.65;
  margin-bottom: 2rem;
  font-family: var(--font-body);
}

.modal__actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}

@keyframes modal-enter {
  from {
    transform: scale(0.96);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}
