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

.cs {
  width: min(400px, 92vw);
  overflow: hidden;
  border-radius: 16px;
}

.cs__viewport {
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.cs__viewport::-webkit-scrollbar {
  display: none;
}

.cs__track {
  display: flex;
  width: 500%;
}

.cs__slide {
  flex: 0 0 20%;
  scroll-snap-align: start;
  aspect-ratio: 16/9;
  margin-right: 12px;
  border-radius: 16px;
  position: relative;
  overflow: hidden;
  display: grid;
  place-items: end start;
  box-sizing: border-box;
}

.cs__slide:last-child {
  margin-right: 0;
}

.cs__slide::before {
  content: "";
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
}

.cs__slide::after {
  content: "";
  position: absolute;
  left: -8%;
  right: -8%;
  bottom: -6%;
  height: 52%;
  background: rgba(23, 20, 26, 0.28);
  clip-path: polygon(0% 100%, 20% 38%, 40% 64%, 58% 24%, 76% 58%, 100% 32%, 100% 100%);
}

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

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

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

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

.cs__cap {
  position: relative;
  z-index: 1;
  margin: 16px;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(23, 20, 26, 0.38);
  color: #fff7e6;
  font-weight: 600;
  font-size: clamp(12px, 3.2vw, 14px);
  line-height: 1;
  font-family: inherit;
}

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

@keyframes cs-loop {
  0%, 8% {
    transform: translateX(0%);
  }
  23%, 31% {
    transform: translateX(calc(-20% - 12px));
  }
  46%, 54% {
    transform: translateX(calc(-40% - 24px));
  }
  69%, 77% {
    transform: translateX(calc(-60% - 36px));
  }
  92%, 100% {
    transform: translateX(calc(-80% - 48px));
  }
}
@media (prefers-reduced-motion: reduce) {
  .cs.is-demo .cs__track {
    animation: none !important;
  }
  .cs__viewport {
    scroll-behavior: auto;
  }
}
