html, body {
  margin: 0;
  overflow: hidden;
}

.stage {
  box-sizing: border-box;
  min-height: 100vh;
  display: grid;
  place-items: center;
  margin: 0;
  background: #17141a;
  font-family: -apple-system, "Segoe UI", "Noto Sans KR", sans-serif;
  padding: clamp(8px, 4vw, 24px);
}

.toast {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: min(300px, 88vw);
  padding: 16px;
  border-radius: 16px;
  background: #fff7e6;
  color: #17141a;
  box-shadow: 0 14px 24px rgba(23, 20, 26, 0.32);
  transform-origin: top center;
}

.toast__text {
  margin: 0;
  font-weight: 600;
  font-size: 13px;
  line-height: 1.4;
  font-family: inherit;
}

.toast__undo {
  flex: none;
  border: 0;
  background: transparent;
  color: #0a4fe8;
  font-weight: 700;
  font-size: 13px;
  line-height: 1;
  font-family: inherit;
  padding: 8px 4px;
  cursor: pointer;
}
.toast__undo:hover, .toast__undo:focus-visible {
  text-decoration: underline;
}

.toast.is-cancelled .toast__undo {
  visibility: hidden;
}

.toast.is-demo {
  animation: undo-loop 2s ease-out infinite;
}

@keyframes undo-loop {
  0% {
    transform: translateY(16px) scaleY(1);
    opacity: 0;
  }
  15% {
    transform: translateY(0) scaleY(1);
    opacity: 1;
  }
  70% {
    transform: translateY(0) scaleY(1);
    opacity: 1;
  }
  92% {
    transform: translateY(0) scaleY(0.35);
    opacity: 0.3;
  }
  100% {
    transform: translateY(0) scaleY(0);
    opacity: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .toast.is-demo {
    animation: none;
    transform: none;
    opacity: 1;
  }
}
