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

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

.pf {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 100%;
  max-width: 352px;
}

.pf__hint {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  font-weight: 700;
  font-size: clamp(10px, 2.8vw, 12px);
  color: #17141a;
}

.pf__ico {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  color: #2f6df6;
}

.pf__well {
  position: relative;
  overflow: hidden;
  width: 100%;
  height: clamp(72px, 20vw, 88px);
  border: 0;
  border-radius: 16px;
  padding: 0;
  cursor: grab;
  touch-action: none;
  background: linear-gradient(180deg, rgba(255, 247, 230, 0.16), rgba(255, 247, 230, 0) 42%), #17141a;
  box-shadow: 0 14px 24px rgba(23, 20, 26, 0.32), inset 0 1px 0 rgba(255, 247, 230, 0.22), inset 0 -2px 0 rgba(0, 0, 0, 0.45);
}

.pf__well:focus-visible {
  outline: 2px solid #2f6df6;
  outline-offset: 2px;
}

.pf__well:active {
  cursor: grabbing;
}

.pf__slot {
  position: absolute;
  left: 8px;
  right: 8px;
  top: 50%;
  height: clamp(14px, 4vw, 18px);
  transform: translateY(-50%);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.5);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.7), inset 0 -1px 0 rgba(255, 247, 230, 0.14);
}

.pf__capWrap {
  position: absolute;
  left: 8px;
  right: 8px;
  top: 4px;
  bottom: 4px;
  transform: translateX(calc(var(--x, 0px)));
}

.pf__cap {
  position: absolute;
  left: 0;
  top: 0;
  width: 48px;
  height: 100%;
  border-radius: 12px;
  background: linear-gradient(90deg, rgba(23, 20, 26, 0.38) 0 4px, rgba(23, 20, 26, 0) 4px 10px), linear-gradient(180deg, white 0 18%, rgba(23, 20, 26, 0.22) 52%, rgba(255, 255, 255, 0.92) 100%);
  box-shadow: 0 6px 10px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.9), inset 0 -2px 0 rgba(0, 0, 0, 0.25);
  transition: transform 220ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.pf__cap.is-press {
  transform: scaleX(0.82);
}

.pf__stripe {
  position: absolute;
  left: 10px;
  right: 10px;
  top: 50%;
  height: 4px;
  transform: translateY(-50%);
  border-radius: 999px;
  background: #2f6df6;
  box-shadow: inset 0 1px 0 rgba(255, 247, 230, 0.55), 0 1px 2px rgba(0, 0, 0, 0.4);
}

.pf__scale {
  display: flex;
  width: 100%;
  padding: 0 8px;
  box-sizing: border-box;
}

.pf__num {
  flex: 1;
  text-align: center;
  margin: 0;
  border-radius: 4px;
  font-weight: 700;
  font-size: clamp(9px, 2.4vw, 11px);
  line-height: 1.6;
  color: rgba(23, 20, 26, 0.78);
}

.pf__num.is-on {
  font-weight: 800;
  color: #17141a;
  box-shadow: inset 0 -2px 0 #2f6df6;
}

.pf.is-demo .pf__capWrap {
  animation-name: pfTravel;
  animation-duration: 2s;
  animation-timing-function: cubic-bezier(0.2, 0.8, 0.2, 1);
  animation-iteration-count: infinite;
}

.pf.is-demo .pf__cap {
  animation-name: pfCushion;
  animation-duration: 2s;
  animation-timing-function: cubic-bezier(0.2, 0.8, 0.2, 1);
  animation-iteration-count: infinite;
}

@keyframes pfTravel {
  0% {
    transform: translateX(0);
  }
  5% {
    transform: translateX(0);
  }
  44% {
    transform: translateX(calc(100% - 48px));
  }
  55% {
    transform: translateX(calc(100% - 48px));
  }
  89% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(0);
  }
}
@keyframes pfCushion {
  0% {
    transform: scaleX(1);
  }
  3% {
    transform: scaleX(0.82);
  }
  9% {
    transform: scaleX(1);
  }
  44% {
    transform: scaleX(1);
  }
  48% {
    transform: scaleX(0.82);
  }
  54% {
    transform: scaleX(1);
  }
  89% {
    transform: scaleX(1);
  }
  93% {
    transform: scaleX(0.82);
  }
  97% {
    transform: scaleX(1);
  }
  100% {
    transform: scaleX(1);
  }
}
@media (max-width: 340px) {
  .pf {
    gap: 8px;
  }
  .pf__well {
    height: 64px;
  }
  .pf__slot {
    height: 12px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .pf.is-demo .pf__capWrap {
    animation: none !important;
  }
  .pf.is-demo .pf__cap {
    animation: none !important;
  }
  .pf__cap {
    transition: none !important;
  }
}
