.toast-container {
  bottom: calc(86px + env(safe-area-inset-bottom));
  gap: 10px;
  width: min(calc(100vw - 24px), 420px);
  max-width: none;
  padding: 0;
}

.toast-item {
  position: relative;
  overflow: hidden;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 18px;
  border-left: none;
  border: 1px solid rgba(211, 205, 255, 0.78);
  background: rgba(241, 239, 255, 0.8);
  color: #1d2140;
  box-shadow:
    0 18px 40px rgba(74, 68, 181, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(22px) saturate(1.35);
  -webkit-backdrop-filter: blur(22px) saturate(1.35);
  animation: toastIn .24s cubic-bezier(.2,.8,.2,1);
}

.toast-item::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.32), rgba(255, 255, 255, 0));
  pointer-events: none;
}

.toast-item .toast-icon {
  position: relative;
  z-index: 1;
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-size: 14px;
  opacity: 1;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.toast-item .toast-msg {
  position: relative;
  z-index: 1;
  flex: 1;
  min-width: 0;
  font-size: 14px;
  line-height: 1.45;
  font-weight: 600;
  letter-spacing: -0.15px;
}

.toast-item.success {
  background: rgba(241, 247, 243, 0.84);
  color: #20382a;
  border-color: rgba(198, 225, 207, 0.9);
}

.toast-item.success .toast-icon {
  background: rgba(52, 199, 89, 0.16);
  color: #218242;
}

.toast-item.error {
  background: rgba(248, 240, 244, 0.84);
  color: #4f2b38;
  border-color: rgba(233, 206, 219, 0.92);
}

.toast-item.error .toast-icon {
  background: rgba(255, 69, 58, 0.14);
  color: #cb3b34;
}

.toast-item.warn {
  background: rgba(248, 244, 238, 0.84);
  color: #5a4325;
  border-color: rgba(233, 220, 202, 0.92);
}

.toast-item.warn .toast-icon {
  background: rgba(255, 159, 10, 0.16);
  color: #c77708;
}

.toast-item.info {
  background: rgba(236, 234, 255, 0.84);
  color: #332f78;
  border-color: rgba(206, 198, 255, 0.94);
}

.toast-item.info .toast-icon {
  background: rgba(97, 88, 216, 0.14);
  color: #4b44b5;
}

.toast-item.hide {
  animation: toastOut .22s ease-in forwards;
}

@media (max-width: 640px) {
  .toast-container {
    bottom: calc(78px + env(safe-area-inset-bottom));
    width: calc(100vw - 20px);
  }

  .toast-item {
    padding: 13px 14px;
    border-radius: 16px;
  }
}
