.toast-stack {
  position: fixed;
  top: 88px;
  right: 20px;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: min(360px, calc(100vw - 40px));
  pointer-events: none;
}
.toast-slot { width: 100%; }
.toast {
  position: relative;
  width: 100%;
  min-height: 58px;
  padding: 17px 17px 13px;
  overflow: hidden;
  border: 1px solid #52606d;
  border-radius: var(--card-radius);
  background: #24313d;
  box-shadow: 0 12px 34px #0005;
  color: var(--text);
  font-size: .84rem;
  line-height: 1.45;
  text-align: left;
  cursor: pointer;
  pointer-events: auto;
  transition: filter .2s ease;
  --toast-accent: var(--brand-color);
}
.toast:hover, .toast:focus-visible { filter: brightness(1.1); }
.toast[data-tone="success"] { border-color: #548b6c; background: #20392e; --toast-accent: #90d8a8; }
.toast[data-tone="warning"] { border-color: #a48142; background: #42351e; --toast-accent: #f1d084; }
.toast[data-tone="error"] { border-color: #955767; background: #4b2631; --toast-accent: #f4a8b8; }
.toast-progress {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 3px;
  background: var(--toast-accent);
  transform: scaleX(0);
  transform-origin: left;
  animation: toast-countdown var(--toast-duration) linear forwards;
}
@keyframes toast-countdown { to { transform: scaleX(1); } }

@media (max-width: 700px) {
  .toast-stack { top: 80px; right: 16px; width: min(360px, calc(100vw - 32px)); }
}
@media (prefers-reduced-motion: reduce) {
  .toast-progress { animation-timing-function: steps(4, end) !important; animation-duration: var(--toast-duration) !important; }
}
