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

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

@property --sweep {
  syntax: "<angle>";
  inherits: false;
  initial-value: 360deg;
}
@property --left {
  syntax: "<integer>";
  inherits: false;
  initial-value: 20;
}
.kt {
  display: grid;
  justify-items: center;
  gap: 8px;
  width: 100%;
  max-width: 400px;
}

.kt__top {
  display: flex;
  align-items: center;
  gap: 8px;
}

.kt__ico {
  width: clamp(20px, 5vw, 24px);
  height: clamp(20px, 5vw, 24px);
  flex: 0 0 auto;
  color: #17141a;
}

.kt__ring {
  position: relative;
  flex: 0 0 auto;
  width: clamp(76px, 26vw, 104px);
  height: clamp(76px, 26vw, 104px);
  border-radius: 50%;
  background: conic-gradient(#17141a var(--sweep), rgba(23, 20, 26, 0.16) 0);
}

.kt__face {
  position: absolute;
  inset: 10px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: #fff7e6;
}

.kt__win {
  display: block;
  height: clamp(24px, 8vw, 32px);
  overflow: hidden;
}

.kt__nums {
  display: block;
  transform: translateY(calc((20 - var(--left)) * -100% / 21));
}

.kt__num {
  display: block;
  height: clamp(24px, 8vw, 32px);
  line-height: clamp(24px, 8vw, 32px);
  text-align: center;
  font-style: normal;
  font-weight: 800;
  font-size: clamp(17px, 5.6vw, 23px);
  color: #17141a;
}

.kt__unit {
  font-style: normal;
  font-weight: 700;
  font-size: clamp(10px, 3vw, 12px);
  line-height: 1;
  color: #17141a;
}

.kt__note {
  margin: 0;
  text-align: center;
  font-weight: 700;
  font-size: clamp(11px, 3.2vw, 13px);
  line-height: 1.3;
  color: #17141a;
}

.kt__home {
  padding: 8px 16px;
  cursor: pointer;
  border: 0;
  border-radius: 12px;
  background: #17141a;
  color: #fff7e6;
  font-family: inherit;
  font-weight: 800;
  font-size: clamp(11px, 3vw, 13px);
  transition: transform 220ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.kt__home:active {
  transform: translateY(2px);
}

.kt__home:focus-visible {
  outline: 3px solid #17141a;
  outline-offset: 3px;
}

.kt.is-demo .kt__ring {
  animation-name: ktSweep;
  animation-duration: 2s;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
}

@keyframes ktSweep {
  0% {
    --sweep: 360deg;
  }
  60% {
    --sweep: 0deg;
  }
  75% {
    --sweep: 0deg;
  }
  87.5% {
    --sweep: 360deg;
  }
  100% {
    --sweep: 360deg;
  }
}
.kt.is-demo .kt__nums {
  animation-name: ktLeft;
  animation-duration: 2s;
  animation-timing-function: steps(1, end);
  animation-iteration-count: infinite;
}

@keyframes ktLeft {
  0% {
    --left: 20;
  }
  15% {
    --left: 15;
  }
  30% {
    --left: 10;
  }
  45% {
    --left: 5;
  }
  60% {
    --left: 0;
  }
  87.5% {
    --left: 20;
  }
  100% {
    --left: 20;
  }
}
@media (max-width: 340px) {
  .kt {
    gap: 4px;
  }
  .kt__home {
    padding: 4px 12px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .kt.is-demo .kt__ring,
  .kt.is-demo .kt__nums {
    animation: none !important;
  }
  .kt.is-demo .kt__ring {
    --sweep: 234deg !important;
  }
  .kt.is-demo .kt__nums {
    --left: 13 !important;
  }
}
