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

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

.ps {
  width: min(400px, 88vw);
  height: clamp(150px, 62vh, 216px);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 14px 24px rgba(23, 20, 26, 0.32);
}

.ps__scroll {
  height: 100%;
  overflow-y: auto;
  scroll-timeline: --ps-scroll block;
  scrollbar-width: none;
}
.ps__scroll::-webkit-scrollbar {
  display: none;
}

.ps__inner {
  height: 300%;
}

.ps__pin {
  position: sticky;
  top: 0;
  height: 33.3333333333%;
  display: grid;
}

.ps__scene {
  grid-area: 1/1;
  display: grid;
  place-items: center;
}

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

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

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

.ps__cap {
  padding: 4px 16px;
  border-radius: 999px;
  background: rgba(23, 20, 26, 0.4);
  color: #fff7e6;
  font: 700 13px/1.4 -apple-system, "Segoe UI", "Noto Sans KR", sans-serif;
}

.ps__hint {
  grid-area: 1/1;
  align-self: end;
  justify-self: center;
  margin-bottom: 12px;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(23, 20, 26, 0.5);
  color: rgba(255, 255, 255, 0.92);
  font: 600 11px/1.4 -apple-system, "Segoe UI", "Noto Sans KR", sans-serif;
}

@supports (animation-timeline: scroll()) {
  .ps__scene--1:not(.is-demo) {
    animation: ps-1 linear both;
    animation-timeline: --ps-scroll;
  }
  .ps__scene--2:not(.is-demo) {
    animation: ps-2 linear both;
    animation-timeline: --ps-scroll;
  }
  .ps__scene--3:not(.is-demo) {
    animation: ps-3 linear both;
    animation-timeline: --ps-scroll;
  }
}
@supports not (animation-timeline: scroll()) {
  .ps__scene--2:not(.is-demo), .ps__scene--3:not(.is-demo) {
    opacity: 0;
  }
}
@keyframes ps-1 {
  0% {
    opacity: 1;
  }
  33%, 100% {
    opacity: 0;
  }
}
@keyframes ps-2 {
  0%, 30% {
    opacity: 0;
  }
  38% {
    opacity: 1;
  }
  62% {
    opacity: 1;
  }
  70%, 100% {
    opacity: 0;
  }
}
@keyframes ps-3 {
  0%, 64% {
    opacity: 0;
  }
  74%, 100% {
    opacity: 1;
  }
}
.ps__scene--2.is-demo {
  animation: ps-loop-2 2s linear infinite;
}

.ps__scene--3.is-demo {
  animation: ps-loop-3 2s linear infinite;
}

@keyframes ps-loop-2 {
  0%, 14% {
    opacity: 0;
  }
  26%, 46% {
    opacity: 1;
  }
  58%, 100% {
    opacity: 0;
  }
}
@keyframes ps-loop-3 {
  0%, 58% {
    opacity: 0;
  }
  70%, 92% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .ps__scene.is-demo {
    animation: none !important;
  }
  .ps__scene--2.is-demo, .ps__scene--3.is-demo {
    opacity: 0 !important;
  }
  .ps__scroll {
    scroll-behavior: auto;
  }
}
