.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center;
  z-index: var(--z-modal);
  animation: fade-in var(--t-base) ease forwards;
}

.modal {
  background: var(--bg-overlay);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-modal);
  padding: var(--sp-6);
  width: min(90vw, 560px);
  max-height: 85vh;
  overflow-y: auto;
  animation: modal-in var(--t-slow) cubic-bezier(0.34, 1.2, 0.64, 1) forwards;
}

.modal--lg { width: min(90vw, 800px); }
.modal--sm { width: min(90vw, 380px); }

.modal__header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: var(--sp-5);
}
.modal__title { font-size: var(--text-md); font-weight: 600; }
.modal__close {
  background: none; border: none; cursor: pointer;
  color: var(--text-muted); font-size: 20px; line-height: 1; padding: 0;
}
.modal__footer {
  display: flex; gap: var(--sp-3); justify-content: flex-end;
  margin-top: var(--sp-5); padding-top: var(--sp-4);
  border-top: 1px solid var(--border-subtle);
}

@keyframes fade-in {
  from { opacity: 0; } to { opacity: 1; }
}
@keyframes modal-in {
  from { opacity: 0; transform: scale(0.96) translateY(8px); }
  to   { opacity: 1; transform: scale(1)    translateY(0);   }
}
