.toast-stack {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 80;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  width: min(22rem, calc(100vw - 2rem));
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem;
  border-radius: 1rem;
  background: var(--bg-elev);
  color: var(--ink);
  border: 1px solid var(--line);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45);
  animation: toast-in 280ms var(--ease);
}

.toast.is-out {
  animation: toast-out 220ms var(--ease) forwards;
}

.toast-icon {
  flex: 0 0 1.15rem;
  width: 1.15rem;
  height: 1.15rem;
  margin-top: 0.1rem;
}

.toast-icon svg {
  display: block;
  width: 100%;
  height: 100%;
}

.toast-success .toast-icon { color: var(--olive); }
.toast-error .toast-icon { color: var(--danger); }
.toast-info .toast-icon { color: var(--yellow); }

.toast-text {
  flex: 1;
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.4;
  font-weight: 500;
}

.toast-close {
  flex: 0 0 1.4rem;
  width: 1.4rem;
  height: 1.4rem;
  margin: -0.15rem -0.2rem 0 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--faint);
  cursor: pointer;
  position: relative;
}

.toast-close::before,
.toast-close::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0.7rem;
  height: 1.5px;
  background: currentColor;
}

.toast-close::before { transform: translate(-50%, -50%) rotate(45deg); }
.toast-close::after { transform: translate(-50%, -50%) rotate(-45deg); }
.toast-close:hover { background: rgba(255, 255, 255, 0.08); color: var(--ink); }

@keyframes toast-in {
  from { opacity: 0; transform: translate(10px, 12px); }
  to { opacity: 1; transform: none; }
}

@keyframes toast-out {
  to { opacity: 0; transform: translate(12px, 8px); }
}
