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

@property --mx {
  syntax: "<length>";
  inherits: true;
  initial-value: 0px;
}
@property --my {
  syntax: "<length>";
  inherits: true;
  initial-value: 0px;
}
.sc-wrap {
  position: relative;
  width: min(280px, 84vw);
  height: min(176px, 58vh);
  border-radius: 16px;
  background: #17141a;
  overflow: hidden;
  --mx: 140px;
  --my: 88px;
}

.sc-piece {
  position: absolute;
  top: 0;
  left: 0;
  font-size: 14px;
  line-height: 1;
  opacity: 0;
  pointer-events: none;
}

.sc-piece:nth-child(1) {
  --ox: 0px;
  --oy: -28px;
  color: #ffd23f;
  animation-delay: 140ms;
}

.sc-piece:nth-child(2) {
  --ox: 24px;
  --oy: -14px;
  color: #2f6df6;
  animation-delay: 280ms;
}

.sc-piece:nth-child(3) {
  --ox: 24px;
  --oy: 14px;
  color: #ff4d1f;
  animation-delay: 0ms;
}

.sc-piece:nth-child(4) {
  --ox: 0px;
  --oy: 28px;
  color: #ffd23f;
  animation-delay: 140ms;
}

.sc-piece:nth-child(5) {
  --ox: -24px;
  --oy: 14px;
  color: #2f6df6;
  animation-delay: 280ms;
}

.sc-piece:nth-child(6) {
  --ox: -24px;
  --oy: -14px;
  color: #ff4d1f;
  animation-delay: 0ms;
}

@keyframes sc-twinkle {
  0%, 100% {
    transform: translate(calc(var(--mx) + var(--ox)), calc(var(--my) + var(--oy))) translate(-50%, -50%) scale(0);
    opacity: 0;
  }
  50% {
    transform: translate(calc(var(--mx) + var(--ox)), calc(var(--my) + var(--oy))) translate(-50%, -50%) scale(1);
    opacity: 1;
  }
}
@keyframes sc-drift {
  0% {
    --mx: 44px;
    --my: 40px;
  }
  25% {
    --mx: 236px;
    --my: 34px;
  }
  50% {
    --mx: 228px;
    --my: 140px;
  }
  75% {
    --mx: 52px;
    --my: 132px;
  }
  100% {
    --mx: 44px;
    --my: 40px;
  }
}
.sc-wrap.is-demo {
  animation: sc-drift 2s linear infinite;
}

.sc-wrap .sc-piece {
  animation: sc-twinkle 900ms ease-out infinite;
}

@media (prefers-reduced-motion: reduce) {
  .sc-wrap.is-demo {
    animation: none !important;
  }
  .sc-wrap .sc-piece {
    animation: none !important;
    opacity: 0 !important;
  }
}
