.desk-toast-stack {
  pointer-events: none;
  position: fixed;
  left: 1rem;
  bottom: 1rem;
  z-index: 1300;
  display: flex;
  width: min(24rem, calc(100vw - 2rem));
  flex-direction: column;
  gap: 0.55rem;
}

.desk-toast {
  pointer-events: auto;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 0.7rem;
  padding: 0.78rem 0.8rem;
  color: #f4f6fa;
  text-align: left;
  background: rgba(24, 27, 34, 0.96);
  box-shadow: 0 0.8rem 2rem rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(0, 0, 0, 0.12);
  backdrop-filter: blur(12px);
  cursor: pointer;
  font: inherit;
  animation: desk-toast-bounce-in 0.5s both;
  transition: border-color 140ms ease, filter 140ms ease;
}

.desk-toast:hover {
  border-color: rgba(255, 255, 255, 0.3);
  filter: brightness(1.08);
}

.desk-toast:focus-visible {
  outline: 1px solid var(--wt-purple, #9a7cff);
  outline-offset: 2px;
}

.desk-toast--ok {
  border-color: rgba(52, 211, 153, 0.28);
}

.desk-toast--warn {
  border-color: rgba(251, 146, 60, 0.34);
}

.desk-toast--err {
  border-color: rgba(248, 113, 113, 0.4);
}

.desk-toast__icon {
  display: grid;
  width: 1.85rem;
  height: 1.85rem;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 999px;
  color: #6ee7b7;
  background: rgba(16, 185, 129, 0.14);
}

.desk-toast--warn .desk-toast__icon {
  color: #fdba74;
  background: rgba(249, 115, 22, 0.14);
}

.desk-toast--err .desk-toast__icon {
  color: #fca5a5;
  background: rgba(239, 68, 68, 0.15);
}

.desk-toast__content {
  min-width: 0;
  flex: 1;
}

.desk-toast__heading {
  display: flex;
  align-items: baseline;
  gap: 0.45rem;
  min-width: 0;
}

.desk-toast__title {
  min-width: 0;
  overflow: hidden;
  font-size: 0.75rem;
  font-weight: 650;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.desk-toast__source,
.desk-toast__time {
  color: rgba(226, 232, 240, 0.5);
  font-size: 0.6rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.desk-toast__time {
  margin-left: auto;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
  text-transform: none;
}

.desk-toast__body {
  display: block;
  margin-top: 0.2rem;
  overflow: hidden;
  color: rgba(226, 232, 240, 0.72);
  font-size: 0.68rem;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.desk-toast__close {
  display: grid;
  width: 1.3rem;
  height: 1.3rem;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 0.35rem;
  color: rgba(226, 232, 240, 0.5);
}

.desk-toast__close:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.desk-toast__progress {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 2px;
  transform-origin: left;
  background: rgba(52, 211, 153, 0.65);
  animation: desk-toast-progress var(--desk-toast-duration, 4.5s) linear both;
}

.desk-toast--warn .desk-toast__progress {
  background: rgba(251, 146, 60, 0.7);
}

.desk-toast--err .desk-toast__progress {
  background: rgba(248, 113, 113, 0.75);
}

.desk-toast-stack.is-paused .desk-toast,
.desk-toast-stack.is-paused .desk-toast__progress {
  animation-play-state: paused;
}

@keyframes desk-toast-bounce-in {
  0% { opacity: 0; transform: translate3d(-110%, 0, 0); }
  60% { opacity: 1; transform: translate3d(24px, 0, 0); }
  75% { transform: translate3d(-10px, 0, 0); }
  90% { transform: translate3d(4px, 0, 0); }
  100% { opacity: 1; transform: translate3d(0, 0, 0); }
}

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

@media (prefers-reduced-motion: reduce) {
  .desk-toast,
  .desk-toast__progress {
    animation-duration: 1ms;
    animation-iteration-count: 1;
  }
}
