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

.kb {
  width: 100%;
  max-width: 380px;
}

.kb__title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0 0 12px;
  color: #fff7e6;
  font-weight: 800;
  font-size: clamp(12px, 3.4vw, 15px);
  line-height: 1.2;
}

.kb__ico {
  width: clamp(16px, 5vw, 22px);
  height: clamp(16px, 5vw, 22px);
  flex: 0 0 auto;
  color: #ffd23f;
}

.kb__titleText {
  line-height: 1.2;
}

.kb__cols {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  align-items: start;
}

.kb__col {
  min-width: 0;
}

.kb__head {
  margin: 0 0 8px;
  text-align: center;
  font-weight: 800;
  font-size: clamp(10px, 3vw, 12px);
  line-height: 1.2;
  letter-spacing: 0.02em;
}

.kb__head--making {
  color: #9a93a6;
}

.kb__head--ready {
  color: #ffd23f;
}

.kb__list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.kb__num {
  display: block;
  width: 100%;
  margin: 0;
  padding: clamp(4px, 2.4vw, 8px) 4px;
  border-radius: 12px;
  text-align: center;
  font-family: inherit;
  font-weight: 800;
  font-size: clamp(15px, 4.6vw, 22px);
  line-height: 1.2;
  letter-spacing: 0.04em;
}

.kb__num--making {
  border: 2px solid rgba(255, 247, 230, 0.14);
  background: #231f28;
  color: #9a93a6;
  cursor: pointer;
}

.kb__num--ready {
  border: 2px solid #ffd23f;
  background: #ffd23f;
  color: #17141a;
  cursor: default;
}

.kb__num:focus-visible {
  outline: 3px solid #fff7e6;
  outline-offset: 3px;
}

.kb.is-demo .kb__num--go {
  animation-name: kbGo, kbArrive;
  animation-duration: 2s, 2s;
  animation-timing-function: cubic-bezier(0.2, 0.8, 0.2, 1), steps(1, end);
  animation-iteration-count: infinite, infinite;
  animation-fill-mode: backwards, backwards;
}

@keyframes kbGo {
  0% {
    transform: translateX(0);
    animation-timing-function: cubic-bezier(0.2, 0.8, 0.2, 1);
  }
  26% {
    transform: translateX(0);
    animation-timing-function: cubic-bezier(0.2, 0.8, 0.2, 1);
  }
  52% {
    transform: translateX(calc(100% + 12px));
    animation-timing-function: steps(1, end);
  }
  88% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(0);
  }
}
@keyframes kbArrive {
  0% {
    border-color: rgba(255, 247, 230, 0.14);
    background: #231f28;
    color: #9a93a6;
  }
  52% {
    border-color: #ffd23f;
    background: #ffd23f;
    color: #17141a;
  }
  58% {
    border-color: #fff7e6;
    background: #fff7e6;
    color: #17141a;
  }
  66% {
    border-color: #ffd23f;
    background: #ffd23f;
    color: #17141a;
  }
  70% {
    border-color: #fff7e6;
    background: #fff7e6;
    color: #17141a;
  }
  78% {
    border-color: #ffd23f;
    background: #ffd23f;
    color: #17141a;
  }
  88% {
    border-color: rgba(255, 247, 230, 0.14);
    background: #231f28;
    color: #9a93a6;
  }
  100% {
    border-color: rgba(255, 247, 230, 0.14);
    background: #231f28;
    color: #9a93a6;
  }
}
.kb.is-demo .kb__num--up1,
.kb.is-demo .kb__num--up2 {
  animation-name: kbUp;
  animation-duration: 2s;
  animation-timing-function: cubic-bezier(0.2, 0.8, 0.2, 1);
  animation-iteration-count: infinite;
  animation-fill-mode: backwards;
}

@keyframes kbUp {
  0% {
    transform: translateY(0);
    animation-timing-function: cubic-bezier(0.2, 0.8, 0.2, 1);
  }
  34% {
    transform: translateY(0);
    animation-timing-function: cubic-bezier(0.2, 0.8, 0.2, 1);
  }
  58% {
    transform: translateY(calc(-100% - 8px));
    animation-timing-function: steps(1, end);
  }
  88% {
    transform: translateY(0);
  }
  100% {
    transform: translateY(0);
  }
}
.kb.is-demo .kb__num--down {
  animation-name: kbDown;
  animation-duration: 2s;
  animation-timing-function: cubic-bezier(0.2, 0.8, 0.2, 1);
  animation-iteration-count: infinite;
  animation-fill-mode: backwards;
}

@keyframes kbDown {
  0% {
    transform: translateY(0);
    animation-timing-function: cubic-bezier(0.2, 0.8, 0.2, 1);
  }
  8% {
    transform: translateY(0);
    animation-timing-function: cubic-bezier(0.2, 0.8, 0.2, 1);
  }
  24% {
    transform: translateY(calc(100% + 8px));
    animation-timing-function: steps(1, end);
  }
  88% {
    transform: translateY(0);
  }
  100% {
    transform: translateY(0);
  }
}
@media (max-width: 340px) {
  .kb__title {
    margin: 0 0 8px;
  }
  .kb__head {
    margin: 0 0 4px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .kb.is-demo .kb__num--go,
  .kb.is-demo .kb__num--up1,
  .kb.is-demo .kb__num--up2,
  .kb.is-demo .kb__num--down {
    animation: none !important;
  }
  .kb.is-demo .kb__num {
    transform: none !important;
  }
}
