@charset "UTF-8";
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);
}

@property --row {
  syntax: "<integer>";
  inherits: true;
  initial-value: 0;
}
.sr {
  --row: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.sr__frame {
  position: relative;
  display: flex;
  width: min(300px, 88vw);
  height: 152px;
  border-radius: 16px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.06);
}

.sr__rail {
  position: relative;
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.06);
}

.sr__dot {
  position: absolute;
  top: 20px;
  left: 2px;
  width: 3px;
  height: 16px;
  border-radius: 999px;
  background: #4cd4a6;
  transform: translateY(calc(var(--row) * 36px));
  transition: transform 220ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.sr__btn {
  position: relative;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: none;
  color: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  transition: color 220ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.sr__btn svg {
  width: 20px;
  height: 20px;
  display: block;
}

.sr__btn:focus-visible {
  outline: 2px solid #4cd4a6;
  outline-offset: 2px;
}

.sr__btn[aria-current=page] {
  color: #fff;
}

.sr__label {
  position: absolute;
  top: 50%;
  left: calc(100% + 4px);
  padding: 4px 8px;
  border-radius: 4px;
  background: #4cd4a6;
  color: #10231c;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.4;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translateY(-50%) translateX(-6px);
  transition: transform 220ms cubic-bezier(0.2, 0.8, 0.2, 1), opacity 220ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.sr__btn:hover .sr__label,
.sr__btn:focus-visible .sr__label {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

.sr__body {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
  padding: 16px;
}

.sr__line {
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}

.sr__line--short {
  width: 60%;
}

.sr__cap {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.62);
}

/* 자동 재생 — 이름표가 위에서부터 차례로 밀려 나오고 점이 따라 내려간다 */
.is-demo .sr__label {
  animation-name: sr-slide;
  animation-duration: 2s;
  animation-timing-function: cubic-bezier(0.2, 0.8, 0.2, 1);
  animation-iteration-count: infinite;
}

.is-demo .sr__btn:nth-of-type(2) .sr__label {
  animation-delay: 0.4s;
}

.is-demo .sr__btn:nth-of-type(3) .sr__label {
  animation-delay: 0.8s;
}

.is-demo .sr__btn:nth-of-type(4) .sr__label {
  animation-delay: 1.2s;
}

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

.is-demo .sr__btn {
  animation-name: sr-lit;
  animation-duration: 2s;
  animation-timing-function: steps(1, end);
  animation-iteration-count: infinite;
}

.is-demo .sr__btn:nth-of-type(2) {
  animation-delay: 0.4s;
}

.is-demo .sr__btn:nth-of-type(3) {
  animation-delay: 0.8s;
}

.is-demo .sr__btn:nth-of-type(4) {
  animation-delay: 1.2s;
}

@keyframes sr-slide {
  0% {
    opacity: 0;
    transform: translateY(-50%) translateX(-6px);
  }
  6% {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
  }
  16% {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
  }
  20% {
    opacity: 0;
    transform: translateY(-50%) translateX(-6px);
  }
  100% {
    opacity: 0;
    transform: translateY(-50%) translateX(-6px);
  }
}
@keyframes sr-dot {
  0%, 16% {
    transform: translateY(0);
  }
  20%, 36% {
    transform: translateY(36px);
  }
  40%, 56% {
    transform: translateY(72px);
  }
  60%, 76% {
    transform: translateY(108px);
  }
  88%, 100% {
    transform: translateY(0);
  }
}
@keyframes sr-lit {
  0% {
    color: rgba(255, 255, 255, 0.55);
  }
  6% {
    color: #fff;
  }
  20% {
    color: rgba(255, 255, 255, 0.55);
  }
  100% {
    color: rgba(255, 255, 255, 0.55);
  }
}
@media (max-width: 340px) {
  .sr__frame {
    height: 128px;
  }
  .sr__body {
    padding: 12px;
    gap: 8px;
  }
  .sr__cap {
    font-size: 12px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .is-demo .sr__label,
  .is-demo .sr__dot,
  .is-demo .sr__btn {
    animation-name: none;
  }
  .sr__label,
  .sr__dot,
  .sr__btn {
    transition: none;
  }
}
