#toast {
  position: fixed;
  z-index: 2147483646;
  top: calc(env(safe-area-inset-top, 0px) + 14px);
  right: auto;
  bottom: auto;
  left: 50%;
  display: flex;
  align-items: center;
  gap: 12px;
  width: max-content;
  max-width: min(520px, calc(100vw - 32px));
  box-sizing: border-box;
  padding: 14px 17px 16px;
  overflow: hidden;
  border: 1px solid rgba(123, 160, 194, .25);
  border-radius: 16px;
  color: #edf4fc;
  background: linear-gradient(145deg, rgba(23, 37, 53, .98), rgba(12, 22, 35, .98));
  box-shadow: 0 16px 42px rgba(0, 0, 0, .38), 0 3px 12px rgba(0, 0, 0, .2);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  font-size: .92rem;
  line-height: 1.45;
  text-align: left;
  overflow-wrap: anywhere;
  opacity: 0;
  transform: translate(-50%, -14px) scale(.98);
  transition: opacity .22s ease, transform .22s ease;
  pointer-events: none;
}

#toast.show {
  opacity: 1;
  transform: translate(-50%, 0) scale(1);
}

#toast .toast__icon {
  display: grid;
  flex: 0 0 29px;
  width: 29px;
  height: 29px;
  place-items: center;
  border: 1px solid rgba(74, 222, 166, .25);
  border-radius: 50%;
  color: #68e0b1;
  background: rgba(48, 190, 137, .13);
  font-size: 1rem;
  font-weight: 900;
}

#toast.toast--error {
  border-color: rgba(251, 113, 133, .3);
}

#toast.toast--error .toast__icon {
  border-color: rgba(251, 113, 133, .28);
  color: #ff9baa;
  background: rgba(225, 66, 91, .15);
}

#toast.toast--warning {
  border-color: rgba(251, 191, 36, .3);
}

#toast.toast--warning .toast__icon {
  border-color: rgba(251, 191, 36, .28);
  color: #ffd36d;
  background: rgba(217, 149, 24, .15);
}

#toast.toast--info .toast__icon {
  border-color: rgba(96, 165, 250, .28);
  color: #8bc4ff;
  background: rgba(55, 130, 218, .15);
}

#toast .toast__message {
  min-width: 0;
}

#toast .toast__progress {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 3px;
  background: rgba(255, 255, 255, .08);
}

#toast .toast__progress::after {
  display: block;
  width: 100%;
  height: 100%;
  background: #55d6a5;
  content: "";
  transform: scaleX(1);
  transform-origin: left center;
}

#toast.toast--error .toast__progress::after {
  background: #fb7185;
}

#toast.toast--warning .toast__progress::after {
  background: #fbbf24;
}

#toast.toast--info .toast__progress::after {
  background: #60a5fa;
}

#toast.show .toast__progress::after {
  animation: toast-progress var(--toast-duration, 3200ms) linear forwards;
}

#toast .toast-inline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}

#toast .toast-inline--score {
  align-items: flex-start;
}

#toast .toast-inline--score strong {
  display: block;
  color: #fff;
  font-size: 1.05rem;
  line-height: 1.15;
}

#toast .toast-score-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 5px;
}

#toast .toast-score-tags em {
  padding: 3px 7px;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 999px;
  color: rgba(237, 244, 255, .83);
  background: rgba(255, 255, 255, .06);
  font-size: .72rem;
  font-style: normal;
  font-weight: 650;
}

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

@media (max-width: 600px) {
  #toast {
    top: calc(env(safe-area-inset-top, 0px) + 10px);
    width: calc(100vw - 24px);
    max-width: 460px;
    gap: 10px;
    padding: 12px 14px 15px;
    border-radius: 15px;
    font-size: .88rem;
  }

  #toast .toast__icon {
    flex-basis: 27px;
    width: 27px;
    height: 27px;
  }
}

@media (prefers-reduced-motion: reduce) {
  #toast {
    transition: none;
  }

  #toast .toast__progress::after {
    animation-duration: .01ms !important;
  }
}
