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

.sp {
  width: min(360px, 88vw);
  timeline-scope: --sp-progress;
}

.sp__bar {
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  overflow: hidden;
  margin-bottom: 12px;
}

.sp__fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: #2f6df6;
  animation-name: sp-fill;
  animation-timeline: --sp-progress;
  animation-fill-mode: both;
}

@keyframes sp-fill {
  from {
    width: 0%;
  }
  to {
    width: 100%;
  }
}
.sp__viewport {
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-timeline: --sp-progress inline;
  border-radius: 16px;
  scrollbar-width: none;
}
.sp__viewport::-webkit-scrollbar {
  display: none;
}

.sp__track {
  display: flex;
  width: max-content;
}

.sp__slide {
  flex: 0 0 190px;
  aspect-ratio: 4/3;
  scroll-snap-align: start;
  margin-right: 12px;
  border-radius: 16px;
}
.sp__slide:last-child {
  margin-right: 0;
}

.sp__slide--1 {
  background: linear-gradient(135deg, #2f6df6, #d6ddeb);
}

.sp__slide--2 {
  background: linear-gradient(135deg, #ff4d1f, #ebdbd6);
}

.sp__slide--3 {
  background: linear-gradient(135deg, #c2ae82, #ffd23f);
}

.sp__slide--4 {
  background: linear-gradient(135deg, #17141a, #4a3f5c);
}

.sp.is-demo .sp__track {
  animation: sp-loop 2s cubic-bezier(0.2, 0.8, 0.2, 1) infinite;
}

@keyframes sp-loop {
  0%, 8% {
    transform: translateX(0px);
  }
  23%, 31% {
    transform: translateX(-202px);
  }
  46%, 54% {
    transform: translateX(-404px);
  }
  69%, 77% {
    transform: translateX(-606px);
  }
  92%, 100% {
    transform: translateX(-808px);
  }
}
@media (prefers-reduced-motion: reduce) {
  .sp.is-demo .sp__track {
    animation: none !important;
  }
  .sp__viewport {
    scroll-behavior: auto;
  }
}
