html, body {
  margin: 0;
  overflow: hidden;
}

.stage {
  box-sizing: border-box;
  min-height: 100vh;
  display: grid;
  place-items: center;
  margin: 0;
  background: #ffffff;
  font-family: -apple-system, "Segoe UI", "Noto Sans KR", sans-serif;
  padding: clamp(8px, 4vw, 24px);
}

.kl {
  width: 100%;
  max-width: 400px;
}

.kl__head {
  margin: 0 0 8px;
  font-weight: 800;
  font-size: clamp(13px, 3.6vw, 17px);
  line-height: 1.2;
  color: #17141a;
}

.kl__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.kl__cell {
  display: block;
}

.kl__opt {
  box-sizing: border-box;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 16px 12px;
  cursor: pointer;
  border: 2px solid rgba(23, 20, 26, 0.18);
  border-radius: 12px;
  background: #fff7e6;
  color: #17141a;
  font-family: inherit;
  font-weight: 800;
  font-size: clamp(12px, 3.6vw, 17px);
  line-height: 1.2;
  text-align: left;
}

.kl__opt:focus-visible {
  outline: 3px solid #2f6df6;
  outline-offset: 2px;
}

.kl__name::after {
  content: attr(data-name);
}

.kl__check {
  width: clamp(14px, 4.4vw, 20px);
  height: clamp(14px, 4.4vw, 20px);
  flex: 0 0 auto;
  opacity: 0;
}

.kl__opt[aria-pressed=true] {
  border-width: 4px;
  border-color: #2f6df6;
  background: #17141a;
  color: #fff7e6;
}

.kl__opt[aria-pressed=true] .kl__check {
  opacity: 1;
}

.kl__hint {
  margin: 8px 0 0;
  font-weight: 700;
  font-size: clamp(11px, 3vw, 13px);
  line-height: 1.3;
  color: #17141a;
}

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

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

.kl.is-demo .kl__cell--2 .kl__opt,
.kl.is-demo .kl__cell--2 .kl__check {
  animation-delay: calc(2s / -4 * 3);
}

.kl.is-demo .kl__cell--3 .kl__opt,
.kl.is-demo .kl__cell--3 .kl__check {
  animation-delay: calc(2s / -2);
}

.kl.is-demo .kl__cell--4 .kl__opt,
.kl.is-demo .kl__cell--4 .kl__check {
  animation-delay: calc(2s / -4);
}

@keyframes klSel {
  0% {
    border-width: 4px;
    border-color: #2f6df6;
    background: #17141a;
    color: #fff7e6;
  }
  25%, 100% {
    border-width: 2px;
    border-color: rgba(23, 20, 26, 0.18);
    background: #fff7e6;
    color: #17141a;
  }
}
@keyframes klCheck {
  0% {
    opacity: 1;
  }
  25%, 100% {
    opacity: 0;
  }
}
.kl.is-demo .kl__cell {
  animation-name: klRise;
  animation-duration: 2s;
  animation-timing-function: cubic-bezier(0.2, 0.8, 0.2, 1);
  animation-iteration-count: infinite;
  animation-fill-mode: backwards;
}

.kl.is-demo .kl__cell--2 {
  animation-delay: 80ms;
}

.kl.is-demo .kl__cell--3 {
  animation-delay: 160ms;
}

.kl.is-demo .kl__cell--4 {
  animation-delay: 240ms;
}

@keyframes klRise {
  0% {
    transform: translateY(8px);
  }
  22%, 74% {
    transform: translateY(0);
  }
  88%, 100% {
    transform: translateY(8px);
  }
}
@media (max-width: 340px) {
  .kl__opt {
    padding: 8px;
  }
  .kl__hint {
    margin-top: 4px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .kl.is-demo .kl__opt,
  .kl.is-demo .kl__check,
  .kl.is-demo .kl__cell {
    animation: none !important;
  }
  .kl.is-demo .kl__cell {
    transform: translateY(0) !important;
  }
}
