.toast-stack {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 1000;
  width: min(390px, calc(100vw - 36px));
  display: grid;
  gap: 10px;
  pointer-events: none
}

.app-toast {
  pointer-events: auto;
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 11px;
  min-height: 64px;
  padding: 13px 14px;
  border: 1px solid rgba(15, 110, 100, .18);
  border-radius: 16px;
  color: #163a33;
  background: rgba(247, 255, 252, .97);
  box-shadow: 0 18px 48px rgba(9, 62, 54, .2);
  backdrop-filter: blur(18px);
  font: 600 13px/1.5 'Public Sans', system-ui, sans-serif;
  animation: toast-in .35s cubic-bezier(.2, .8, .2, 1) both
}

.app-toast::before {
  content: '✓';
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  color: #fff;
  background: #0f9b7e;
  font-weight: 900
}

.app-toast.warning::before {
  content: '!';
  background: #e09a21
}

.app-toast.error::before {
  content: '×';
  background: #cf4261
}

.app-toast.info::before {
  content: 'i';
  background: #4a74d9
}

.toast-close {
  border: 0;
  background: transparent;
  color: #58736c;
  width: 30px;
  height: 30px;
  font-size: 20px;
  cursor: pointer;
  border-radius: 8px
}

.toast-close:hover {
  background: rgba(15, 110, 100, .08)
}

.toast-close:focus-visible {
  outline: 2px solid #0f6e64;
  outline-offset: 2px
}

.toast-leave {
  animation: toast-out .24s ease forwards !important
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateX(26px) scale(.96)
  }
}

@keyframes toast-out {
  to {
    opacity: 0;
    transform: translateX(30px) scale(.96)
  }
}

@media(max-width:640px) {
  .toast-stack {
    top: max(12px, env(safe-area-inset-top));
    right: 12px;
    width: calc(100vw - 24px)
  }
}

@media(prefers-reduced-motion:reduce) {

  .app-toast,
  .toast-leave {
    animation-duration: .001ms !important
  }
}