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

.su {
  user-select: none;
  -webkit-user-select: none;
}

.su__track {
  position: relative;
  box-sizing: border-box;
  width: min(248px, 84vw);
  height: 48px;
  background: #17141a;
  border-radius: 999px;
  box-shadow: 0 6px 12px rgba(23, 20, 26, 0.32);
}

.su__label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  padding-left: 48px;
  font-size: 12px;
  line-height: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.su__t1 {
  color: rgba(255, 247, 230, 0.72);
}

.su__t2 {
  position: absolute;
  left: 48px;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  overflow: hidden;
  white-space: nowrap;
  color: #fff7e6;
}

.su__lock {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 247, 230, 0.14);
  color: rgba(255, 247, 230, 0.6);
  transition: background 300ms cubic-bezier(0.2, 0.8, 0.2, 1), color 300ms cubic-bezier(0.2, 0.8, 0.2, 1), transform 300ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.su__ic {
  position: absolute;
  transition: opacity 220ms steps(1, end), transform 300ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.su__ic--open, .su__ic--done {
  opacity: 0;
}

.su__track.is-done .su__lock {
  background: #ffd23f;
  color: #17141a;
  transform: translateY(-50%) scale(1.12);
}

.su__track.is-done .su__ic--closed {
  opacity: 0;
}

.su__track.is-done .su__ic--open {
  opacity: 0;
}

.su__track.is-done .su__ic--done {
  opacity: 1;
}

.su__handle {
  position: absolute;
  left: 8px;
  top: 50%;
  transform: translateY(-50%) translateX(0);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 0;
  background: #fff7e6;
  color: #17141a;
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(23, 20, 26, 0.35);
  cursor: grab;
  touch-action: none;
  transition: transform 300ms cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 300ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.su__handle.is-drag {
  box-shadow: 0 4px 10px rgba(23, 20, 26, 0.45);
}

.su__handle:active {
  cursor: grabbing;
}

.su__handle:focus-visible {
  outline: 3px solid rgba(23, 20, 26, 0.55);
  outline-offset: 2px;
}

.su__state {
  margin: 12px 0 0;
  font-size: 11px;
  line-height: 14px;
  font-weight: 600;
  color: rgba(23, 20, 26, 0.72);
}

.su.is-demo .su__handle {
  animation: su-slide 2s cubic-bezier(0.2, 0.8, 0.2, 1) infinite;
}

@keyframes su-slide {
  0% {
    transform: translateY(-50%) translateX(0);
  }
  34% {
    transform: translateY(-50%) translateX(204px);
  }
  38% {
    transform: translateY(-50%) translateX(204px) scale(1.1, 0.9);
  }
  42%, 66% {
    transform: translateY(-50%) translateX(204px);
  }
  72% {
    transform: translateY(-50%) translateX(204px);
    opacity: 1;
  }
  78% {
    transform: translateY(-50%) translateX(204px);
    opacity: 0;
  }
  79% {
    transform: translateY(-50%) translateX(0);
    opacity: 0;
  }
  88%, 100% {
    transform: translateY(-50%) translateX(0);
    opacity: 1;
  }
}
.su.is-demo .su__t2 {
  animation: su-lit 2s linear infinite;
}

@keyframes su-lit {
  0% {
    width: 36px;
  }
  34%, 78% {
    width: 240px;
  }
  79% {
    width: 36px;
  }
  100% {
    width: 36px;
  }
}
.su.is-demo .su__lock {
  animation: su-lock 2s steps(1, end) infinite;
}

@keyframes su-lock {
  0%, 41% {
    background: rgba(255, 247, 230, 0.14);
    color: rgba(255, 247, 230, 0.6);
  }
  42%, 72% {
    background: #ffd23f;
    color: #17141a;
  }
  73%, 100% {
    background: rgba(255, 247, 230, 0.14);
    color: rgba(255, 247, 230, 0.6);
  }
}
@media (prefers-reduced-motion: reduce) {
  .su.is-demo .su__handle,
  .su.is-demo .su__t2,
  .su.is-demo .su__lock {
    animation: none !important;
  }
  .su__handle, .su__lock {
    transition: none;
  }
}
