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

.sc {
  position: relative;
  box-sizing: border-box;
  width: min(300px, 92vw);
  border-radius: 16px;
  background: #fff7e6;
  color: #17141a;
  font-family: -apple-system, "Segoe UI", "Noto Sans KR", sans-serif;
  overflow: hidden;
}

.sc__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 12px 0;
}

.sc__title {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.3;
}

.sc__count {
  position: relative;
  display: inline-flex;
  align-items: baseline;
  gap: 0;
  margin: 0;
  padding: 4px 8px;
  border-radius: 999px;
  background: #17141a;
  color: #ffd23f;
  font-size: 12px;
  line-height: 1.2;
}

.sc__now {
  font-size: 14px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.sc__slash {
  opacity: 0.65;
  font-size: 10px;
}

.sc__num {
  display: none;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}

.sc__view {
  box-sizing: border-box;
  height: 128px;
  margin: 8px 8px 0;
  overflow-y: auto;
  scrollbar-width: none;
  scroll-snap-type: y mandatory;
}
.sc__view::-webkit-scrollbar {
  display: none;
}
.sc__view:focus-visible {
  outline: 2px solid #2f6df6;
  outline-offset: 2px;
}

.sc__track {
  display: grid;
}

.sc__sec {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 128px;
  padding: 0 12px;
  border-radius: 8px;
  background: rgba(23, 20, 26, 0.05);
  font-size: 12px;
  line-height: 1.4;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  opacity: 0.6;
  transition: opacity 220ms cubic-bezier(0.2, 0.8, 0.2, 1), background 220ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.sc__sec b {
  font-size: 12px;
  opacity: 0.5;
}

.sc__sec[aria-current=true] {
  opacity: 1;
  background: #2f6df6;
  color: #fff;
}

.sc__sec[aria-current=true] b {
  opacity: 0.85;
}

.sc__keys {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 12px;
}

.sc__key {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: #17141a;
  color: #ffd23f;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  transition: transform 140ms ease-out;
}
.sc__key:focus-visible {
  outline: 2px solid #2f6df6;
  outline-offset: 2px;
}
.sc__key:active {
  transform: scale(0.9);
}

.sc__hint {
  margin: 0;
  font-size: 10px;
  line-height: 1.4;
  color: rgba(23, 20, 26, 0.72);
}

@keyframes sc-flow {
  0%, 26% {
    transform: translateY(0);
  }
  34%, 54% {
    transform: translateY(-256px);
  }
  62%, 76% {
    transform: translateY(-640px);
  }
  84% {
    transform: translateY(-1024px);
  }
  88%, 100% {
    transform: translateY(0);
  }
}
@keyframes sc-n1 {
  0%, 29% {
    opacity: 1;
  }
  30%, 87% {
    opacity: 0;
  }
  88%, 100% {
    opacity: 1;
  }
}
@keyframes sc-n3 {
  0%, 33% {
    opacity: 0;
  }
  34%, 53% {
    opacity: 1;
  }
  54%, 100% {
    opacity: 0;
  }
}
@keyframes sc-n6 {
  0%, 61% {
    opacity: 0;
  }
  62%, 75% {
    opacity: 1;
  }
  76%, 100% {
    opacity: 0;
  }
}
@keyframes sc-n9 {
  0%, 83% {
    opacity: 0;
  }
  84%, 87% {
    opacity: 1;
  }
  88%, 100% {
    opacity: 0;
  }
}
.sc.is-demo .sc__now {
  color: transparent;
}
.sc.is-demo .sc__num {
  display: block;
  position: absolute;
  left: 8px;
}
.sc.is-demo .sc__num--1 {
  animation-name: sc-n1;
  animation-duration: 2s;
  animation-timing-function: steps(1, end);
  animation-iteration-count: infinite;
}
.sc.is-demo .sc__num--3 {
  animation-name: sc-n3;
  animation-duration: 2s;
  animation-timing-function: steps(1, end);
  animation-iteration-count: infinite;
}
.sc.is-demo .sc__num--6 {
  animation-name: sc-n6;
  animation-duration: 2s;
  animation-timing-function: steps(1, end);
  animation-iteration-count: infinite;
}
.sc.is-demo .sc__num--9 {
  animation-name: sc-n9;
  animation-duration: 2s;
  animation-timing-function: steps(1, end);
  animation-iteration-count: infinite;
}
.sc.is-demo .sc__track {
  animation-name: sc-flow;
  animation-duration: 2s;
  animation-timing-function: cubic-bezier(0.2, 0.8, 0.2, 1);
  animation-iteration-count: infinite;
  scroll-snap-type: none;
}
.sc.is-demo .sc__sec[data-i="0"] {
  opacity: 1;
  background: #2f6df6;
  color: #fff;
}
@keyframes sc-sec-0 {
  0%, 29% {
    opacity: 1;
    background: #2f6df6;
    color: #fff;
  }
  30%, 87% {
    opacity: 0.6;
    background: rgba(23, 20, 26, 0.05);
    color: #17141a;
  }
  88%, 100% {
    opacity: 1;
    background: #2f6df6;
    color: #fff;
  }
}
.sc.is-demo .sc__sec[data-i="0"] {
  animation-name: sc-sec-0;
  animation-duration: 2s;
  animation-timing-function: steps(1, end);
  animation-iteration-count: infinite;
}
@keyframes sc-sec-2 {
  0%, 33% {
    opacity: 0.6;
    background: rgba(23, 20, 26, 0.05);
    color: #17141a;
  }
  34%, 53% {
    opacity: 1;
    background: #2f6df6;
    color: #fff;
  }
  54%, 100% {
    opacity: 0.6;
    background: rgba(23, 20, 26, 0.05);
    color: #17141a;
  }
}
.sc.is-demo .sc__sec[data-i="2"] {
  animation-name: sc-sec-2;
  animation-duration: 2s;
  animation-timing-function: steps(1, end);
  animation-iteration-count: infinite;
}
@keyframes sc-sec-5 {
  0%, 61% {
    opacity: 0.6;
    background: rgba(23, 20, 26, 0.05);
    color: #17141a;
  }
  62%, 75% {
    opacity: 1;
    background: #2f6df6;
    color: #fff;
  }
  76%, 100% {
    opacity: 0.6;
    background: rgba(23, 20, 26, 0.05);
    color: #17141a;
  }
}
.sc.is-demo .sc__sec[data-i="5"] {
  animation-name: sc-sec-5;
  animation-duration: 2s;
  animation-timing-function: steps(1, end);
  animation-iteration-count: infinite;
}
@keyframes sc-sec-8 {
  0%, 83% {
    opacity: 0.6;
    background: rgba(23, 20, 26, 0.05);
    color: #17141a;
  }
  84%, 87% {
    opacity: 1;
    background: #2f6df6;
    color: #fff;
  }
  88%, 100% {
    opacity: 0.6;
    background: rgba(23, 20, 26, 0.05);
    color: #17141a;
  }
}
.sc.is-demo .sc__sec[data-i="8"] {
  animation-name: sc-sec-8;
  animation-duration: 2s;
  animation-timing-function: steps(1, end);
  animation-iteration-count: infinite;
}

@media (max-width: 340px) {
  .sc__view {
    height: 84px;
  }
  .sc__sec {
    height: 84px;
    font-size: 11px;
  }
  @keyframes sc-flow {
    0%, 26% {
      transform: translateY(0);
    }
    34%, 54% {
      transform: translateY(-168px);
    }
    62%, 76% {
      transform: translateY(-420px);
    }
    84% {
      transform: translateY(-672px);
    }
    88%, 100% {
      transform: translateY(0);
    }
  }
}
@media (prefers-reduced-motion: reduce) {
  .sc.is-demo .sc__track,
  .sc.is-demo .sc__num,
  .sc.is-demo .sc__sec {
    animation: none !important;
    transform: none !important;
  }
  .sc.is-demo .sc__num--1 {
    opacity: 1 !important;
  }
  .sc.is-demo .sc__num--3,
  .sc.is-demo .sc__num--6,
  .sc.is-demo .sc__num--9 {
    opacity: 0 !important;
  }
  .sc.is-demo .sc__sec[data-i="0"] {
    opacity: 1 !important;
    background: #2f6df6 !important;
    color: #fff !important;
  }
}
