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

.stage {
  position: relative;
  overflow: hidden;
  cursor: none;
}

.cursor {
  position: absolute;
  top: 0;
  left: 0;
  width: 10px;
  height: 10px;
  margin: -5px 0 0 -5px;
  border-radius: 50%;
  background: #17141a;
  pointer-events: none;
}
.cursor.is-demo {
  animation: cursor-path 2s cubic-bezier(0.2, 0.8, 0.2, 1) infinite;
}

.trail span {
  position: absolute;
  top: 0;
  left: 0;
  width: 8px;
  height: 8px;
  margin: -4px 0 0 -4px;
  border-radius: 50%;
  background: #17141a;
  pointer-events: none;
}

.trail.is-demo span:nth-child(1) {
  opacity: 0.87;
  animation: cursor-path 2s cubic-bezier(0.2, 0.8, 0.2, 1) infinite;
  animation-delay: -90ms;
}

.trail.is-demo span:nth-child(2) {
  opacity: 0.74;
  animation: cursor-path 2s cubic-bezier(0.2, 0.8, 0.2, 1) infinite;
  animation-delay: -180ms;
}

.trail.is-demo span:nth-child(3) {
  opacity: 0.61;
  animation: cursor-path 2s cubic-bezier(0.2, 0.8, 0.2, 1) infinite;
  animation-delay: -270ms;
}

.trail.is-demo span:nth-child(4) {
  opacity: 0.48;
  animation: cursor-path 2s cubic-bezier(0.2, 0.8, 0.2, 1) infinite;
  animation-delay: -360ms;
}

.trail.is-demo span:nth-child(5) {
  opacity: 0.35;
  animation: cursor-path 2s cubic-bezier(0.2, 0.8, 0.2, 1) infinite;
  animation-delay: -450ms;
}

.trail.is-demo span:nth-child(6) {
  opacity: 0.22;
  animation: cursor-path 2s cubic-bezier(0.2, 0.8, 0.2, 1) infinite;
  animation-delay: -540ms;
}

@keyframes cursor-path {
  0% {
    transform: translate(40px, 200px);
  }
  30% {
    transform: translate(140px, 60px);
  }
  60% {
    transform: translate(260px, 180px);
  }
  100% {
    transform: translate(40px, 200px);
  }
}
@media (pointer: coarse) {
  .cursor, .trail {
    display: none;
  }
  .stage {
    cursor: auto;
  }
}
@media (prefers-reduced-motion: reduce) {
  .cursor.is-demo {
    animation: none;
    transform: translate(40px, 200px);
  }
  .trail.is-demo span {
    animation: none;
    opacity: 0;
  }
}
