.toast-stack {
  position: fixed;
  right: var(--sp-4);
  bottom: var(--sp-4);
  z-index: var(--hc-z-toast);
  display: grid;
  gap: var(--sp-2);
  width: min(360px, calc(100vw - var(--sp-4) * 2));
}

.toast {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: var(--sp-3);
  align-items: start;
  overflow: hidden;
  padding: var(--sp-3);
  color: var(--hc-ink);
  background: var(--hc-bg);
  border: 1px solid var(--hc-line);
  border-radius: var(--radius);
  box-shadow: var(--hc-sh-3);
}

.toast.is-closing {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast-icon {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--hc-accent-soft);
  color: var(--accent-dark);
  font-weight: 700;
}

.toast-title {
  font-weight: 700;
}

.toast-msg {
  font-size: var(--hc-fs-sm);
  color: var(--ink-3);
}

.toast-close {
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.toast-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: var(--accent);
  transform-origin: left center;
  animation: hc-toast-progress 4.5s linear forwards;
}

.toast-progress--fast {
  animation-duration: 4.2s;
}

.toast.is-paused .toast-progress {
  animation-play-state: paused;
}

@keyframes hc-toast-progress {
  from { transform: scaleX(1); }
  to { transform: scaleX(0); }
}
