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

.kg {
  box-sizing: border-box;
  width: 264px;
  color: #fff7e6;
  font-family: -apple-system, "Segoe UI", "Noto Sans KR", sans-serif;
}

.kg__grid {
  position: relative;
  border: 1px solid rgb(20.8470588235%, 19.4156862745%, 20.5960784314%);
  border-radius: 12px;
  background: #17141a;
  overflow: hidden;
}

.kg__row {
  display: grid;
  grid-template-columns: repeat(3, 88px);
  height: 26px;
}

.kg__body .kg__row + .kg__row {
  box-shadow: inset 0 1px 0 rgba(255, 247, 230, 0.07);
}

.kg__h, .kg__c {
  padding: 0 8px;
  font-size: 12px;
  line-height: 26px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
}

.kg__h {
  background: rgb(16.2980392157%, 14.9647058824%, 16.5960784314%);
  color: rgba(255, 247, 230, 0.58);
  font-size: 11px;
  font-weight: 700;
}

.kg__c {
  outline: none;
  cursor: pointer;
}

.kg__ring {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 2;
  width: 88px;
  height: 26px;
  border: 3px solid #b9a0ff;
  border-radius: 4px;
  opacity: 0;
  transform: translate(0, 26px);
  pointer-events: none;
}

.kg__hint {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 8px 0 0;
  color: rgba(255, 247, 230, 0.5);
  font-size: 11px;
  line-height: 16px;
  font-weight: 600;
}

.kg__kic {
  display: inline-flex;
  width: 12px;
  height: 12px;
}

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

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

@keyframes kg-walk {
  0% {
    opacity: 1;
    transform: translate(0, 26px);
  }
  8% {
    opacity: 1;
    transform: translate(0, 26px);
  }
  22% {
    opacity: 1;
    transform: translate(88px, 26px);
  }
  36% {
    opacity: 1;
    transform: translate(176px, 26px);
  }
  50% {
    opacity: 1;
    transform: translate(176px, 52px);
  }
  64% {
    opacity: 1;
    transform: translate(0, 52px);
  }
  76% {
    opacity: 1;
    transform: translate(0, 78px);
  }
  88% {
    opacity: 1;
    transform: translate(0, 26px);
  }
  100% {
    opacity: 1;
    transform: translate(0, 26px);
  }
}
@keyframes kg-hint {
  0% {
    color: rgba(255, 247, 230, 0.5);
  }
  50% {
    color: #b9a0ff;
  }
  88% {
    color: rgba(255, 247, 230, 0.5);
  }
  100% {
    color: rgba(255, 247, 230, 0.5);
  }
}
@media (max-width: 340px) {
  .kg__hint {
    margin-top: 4px;
  }
  .kg__h, .kg__c {
    padding: 0 4px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .kg.is-demo .kg__ring,
  .kg.is-demo .kg__hint {
    animation: none !important;
  }
  .kg.is-demo .kg__ring {
    opacity: 1;
    transform: translate(0, 26px);
  }
}
