.overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(26, 42, 20, 0.55);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: fadeIn 0.2s ease;
}

.modal {
  background-color: var(--white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  animation: scaleIn 0.25s ease;
}

.sm { max-width: 400px; }
.md { max-width: 520px; }
.lg { max-width: 680px; }
.xl { max-width: 900px; }

.header {
  padding: 24px 24px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  background: var(--white);
  z-index: 1;
}

.title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--sage-500);
}

.closeBtn {
  background: var(--sage-50);
  border: 1px solid var(--sage-100);
  border-radius: var(--radius-md);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--sage-400);
  cursor: pointer;
  transition: all 0.2s;
}

.closeBtn:hover {
  background: var(--sage-100);
  color: var(--sage-500);
}

.body {
  padding: 20px 24px;
}

.footer {
  padding: 0 24px 24px;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

@media (max-width: 480px) {
  .modal {
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    max-height: 95vh;
  }
  .overlay {
    align-items: flex-end;
    padding: 0;
  }
  .header { padding: 20px 16px 0; }
  .body { padding: 16px; }
  .footer { padding: 0 16px 24px; }
}