.toast-stack {
  position: fixed;
  top: 18px;
  right: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 90;
  pointer-events: none;
}

.toast {
  width: min(340px, 92vw);
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid var(--stroke);
  background: color-mix(in srgb, var(--panel) 92%, transparent);
  color: var(--text);
  box-shadow: var(--shadow);
  cursor: pointer;
  pointer-events: auto;
  text-align: left;
  font-family: inherit;
  animation: toastIn var(--anim-fast) var(--ease-out);
}

.toast.is-leaving {
  animation: toastOut var(--anim-fast) var(--ease-in-out) forwards;
}

.toast.error {
  border-color: color-mix(in srgb, var(--danger) 45%, transparent);
  background: color-mix(in srgb, var(--danger) 12%, transparent);
}

.toast-avatar {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  border: 1px solid var(--stroke);
  background: var(--panel-2);
  display: grid;
  place-items: center;
  font-weight: 600;
  flex: 0 0 auto;
  overflow: hidden;
}

.toast-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.toast-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.toast-title {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
}

.toast-body {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
  word-break: break-word;
}

.toast-meta {
  font-size: 11px;
  color: var(--muted);
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(-6px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes toastOut {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  to {
    opacity: 0;
    transform: translateY(-6px) scale(0.98);
  }
}
