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

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

.scene {
  position: relative;
  box-sizing: border-box;
  width: min(100%, 240px);
  height: 152px;
  overflow: hidden;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 8px;
}

.seal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #ff4d1f;
  color: #fff;
  transform: scale(1);
}

.seal svg {
  width: 30px;
  height: 30px;
  display: block;
}

.seal {
  transform-origin: 50% 50%;
  rotate: 0deg;
}

.stage.is-demo .seal {
  animation: stamp 2s cubic-bezier(0.2, 1.4, 0.4, 1) infinite, settle 2s ease-in-out infinite;
}

.stage.is-demo .msg {
  animation: msg-pop 2s linear(0, 0.051, 0.176, 0.341, 0.518, 0.685, 0.831, 0.947, 1.032, 1.087, 1.117, 1.126, 1.121, 1.105, 1.085, 1.062, 1.041, 1.022, 1.008, 0.997, 1) infinite;
}

.msg {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  color: #17141a;
}

.bits {
  position: absolute;
  inset: 0;
}

.b {
  position: absolute;
  top: -12px;
  width: 6px;
  height: 10px;
  border-radius: 4px;
  opacity: 0;
}

.b1 {
  left: 6%;
  background: #ff4d1f;
  animation-delay: 0s;
  --r: 24deg;
}

.b2 {
  left: 16%;
  background: #ff9ebb;
  animation-delay: 0.09s;
  --r: -38deg;
}

.b3 {
  left: 26%;
  background: #2f6df6;
  animation-delay: 0.21s;
  --r: 61deg;
}

.b4 {
  left: 34%;
  background: #4cd4a6;
  animation-delay: 0.05s;
  --r: -17deg;
}

.b5 {
  left: 44%;
  background: #ff4d1f;
  animation-delay: 0.33s;
  --r: 44deg;
}

.b6 {
  left: 52%;
  background: #b9a0ff;
  animation-delay: 0.14s;
  --r: -55deg;
}

.b7 {
  left: 61%;
  background: #2f6df6;
  animation-delay: 0.27s;
  --r: 12deg;
}

.b8 {
  left: 69%;
  background: #4cd4a6;
  animation-delay: 0.4s;
  --r: -29deg;
}

.b9 {
  left: 77%;
  background: #ff4d1f;
  animation-delay: 0.17s;
  --r: 71deg;
}

.b10 {
  left: 85%;
  background: #ff9ebb;
  animation-delay: 0.3s;
  --r: -46deg;
}

.b11 {
  left: 92%;
  background: #6ec8ff;
  animation-delay: 0.11s;
  --r: 33deg;
}

.b12 {
  left: 47%;
  background: #6ec8ff;
  animation-delay: 0.45s;
  --r: -63deg;
}

.stage.is-demo .b {
  animation-name: fall;
  animation-duration: 2s;
  animation-timing-function: cubic-bezier(0.2, 1.4, 0.4, 1);
  animation-iteration-count: infinite;
}

@keyframes stamp {
  0% {
    transform: scale(1) rotate(0);
  }
  10% {
    transform: scale(0.8) rotate(-6deg);
  }
  26% {
    transform: scale(1.12) rotate(4deg);
  }
  36% {
    transform: scale(0.98) rotate(-2deg);
  }
  44% {
    transform: scale(1.02) rotate(1deg);
  }
  52%, 100% {
    transform: scale(1) rotate(0);
  }
}
@keyframes msg-pop {
  0% {
    transform: scale(1);
  }
  15% {
    transform: scale(0.96);
  }
  30% {
    transform: scale(1.06);
  }
  42% {
    transform: scale(0.99);
  }
  52%, 100% {
    transform: scale(1);
  }
}
@keyframes settle {
  0%, 56% {
    rotate: 0deg;
  }
  62% {
    rotate: 3.5deg;
  }
  74% {
    rotate: -2deg;
  }
  85% {
    rotate: 1deg;
  }
  93%, 100% {
    rotate: 0deg;
  }
}
@keyframes fall {
  0% {
    opacity: 0;
    transform: translateY(0) rotate(0deg);
  }
  12% {
    opacity: 1;
  }
  78% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translateY(168px) rotate(var(--r));
  }
}
@media (prefers-reduced-motion: reduce) {
  .stage.is-demo .seal {
    animation: none;
    transform: none;
    rotate: 0deg;
  }
  .stage.is-demo .msg {
    animation: none;
    transform: none;
  }
  .stage.is-demo .b {
    animation: none;
    opacity: 0;
  }
}
