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

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

.toast {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: min(280px, 84vw);
  padding: 16px;
  border-radius: 16px;
  background: #17141a;
  color: #fff7e6;
  box-shadow: 0 14px 24px rgba(23, 20, 26, 0.32);
  touch-action: pan-y;
  transform: translateX(var(--dx, 0px));
}

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

.toast__hint {
  flex: none;
  font-weight: 400;
  font-size: 11px;
  line-height: 1;
  font-family: inherit;
  opacity: 0.55;
}

.toast.is-swiped-left,
.toast.is-swiped-right {
  transition: transform 220ms ease-out, opacity 220ms ease-out;
  opacity: 0;
}

.toast.is-swiped-left {
  transform: translateX(-120%);
}

.toast.is-swiped-right {
  transform: translateX(120%);
}

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

@keyframes swipe-loop {
  0% {
    transform: translateX(0);
    opacity: 0;
  }
  10% {
    transform: translateX(0);
    opacity: 1;
  }
  55% {
    transform: translateX(0);
    opacity: 1;
  }
  85% {
    transform: translateX(120%);
    opacity: 0;
  }
  86% {
    transform: translateX(0);
    opacity: 0;
  }
  100% {
    transform: translateX(0);
    opacity: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .toast.is-demo {
    animation: none;
    opacity: 1;
    transform: translateX(0);
  }
  .toast.is-swiped-left, .toast.is-swiped-right {
    transition: opacity 220ms linear;
  }
}
