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);
}

.thread {
  display: grid;
  gap: 10px;
  justify-items: end;
  width: min(220px, 78vw);
}

.bubble {
  padding: 12px 18px;
  border-radius: 16px;
  font-weight: 600;
  font-size: clamp(13px, 4vw, 15px);
  line-height: 1.4;
  font-family: inherit;
  max-width: 80%;
}

.bubble--in {
  justify-self: start;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.bubble--out {
  background: #fff7e6;
  color: #17141a;
  transform-origin: bottom center;
}
.bubble--out.is-demo {
  animation: pin-in-loop 2s ease-out infinite;
}

@keyframes pin-in-loop {
  0% {
    transform: translateY(46px);
    opacity: 0;
  }
  28% {
    transform: translateY(0);
    opacity: 1;
  }
  84% {
    transform: translateY(0);
    opacity: 1;
  }
  100% {
    transform: translateY(46px);
    opacity: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .bubble--out.is-demo {
    animation: none !important;
    transform: none;
    opacity: 1;
  }
}
