.toast-stack {
  position: fixed;
  right: var(--space-4);
  bottom: var(--space-4);
  z-index: var(--z-toast);
  display: grid;
  gap: var(--space-3);
  width: min(42rem, calc(100vw - 3.2rem));
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-4);
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: .1rem solid var(--border);
  border-left: .6rem solid var(--info);
  box-shadow: var(--shadow-lg);
  pointer-events: auto;
  animation: toast-in .3s var(--ease) both;
}

.toast.is-leaving {
  animation: toast-out .25s var(--ease) both;
}

.toast--success { border-left-color: var(--success); }
.toast--error { border-left-color: var(--danger); }
.toast--warning { border-left-color: var(--warning); }

.toast__icon { margin-top: .2rem; font-size: var(--fs-lg); }
.toast--success .toast__icon { color: var(--success); }
.toast--error .toast__icon { color: var(--danger); }
.toast--warning .toast__icon { color: var(--warning); }
.toast--info .toast__icon { color: var(--info); }

.toast__body { flex: 1; font-size: var(--fs-sm); }

.toast__close {
  border: 0;
  background: transparent;
  color: var(--text-faint);
  font-size: var(--fs-md);
  padding: .2rem .6rem;
  border-radius: var(--radius-sm);
}

.toast__close:hover { color: var(--text); background: var(--surface-2); }

@keyframes toast-in {
  from { opacity: 0; transform: translateY(1.6rem) scale(.98); }
  to { opacity: 1; transform: none; }
}

@keyframes toast-out {
  to { opacity: 0; transform: translateX(2rem); }
}
