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

@property --ring-angle {
  syntax: "<angle>";
  inherits: false;
  initial-value: 360deg;
}
.cd {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: 20px;
  color: #17141a;
  font-family: -apple-system, "Segoe UI", "Noto Sans KR", sans-serif;
}

.cd__ring {
  position: relative;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 124px;
  height: 124px;
  border-radius: 50%;
  background: conic-gradient(#2f6df6 0deg var(--ring-angle), rgba(23, 20, 26, 0.14) var(--ring-angle) 360deg);
}

.cd__hole {
  display: grid;
  place-items: center;
  width: 94px;
  height: 94px;
  border-radius: 50%;
  background-color: #ffffff;
}

.cd__num,
.cd__f {
  grid-area: 1/1;
  font-size: 26px;
  line-height: 30px;
  font-weight: 800;
  letter-spacing: 0.01em;
  font-variant-numeric: tabular-nums;
}

.cd__f {
  display: none;
}

.cd.is-demo .cd__f {
  display: block;
}

.cd.is-demo .cd__num {
  display: none;
}

.cd__side {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cd__cap {
  font-size: 11px;
  line-height: 14px;
  font-weight: 600;
  color: rgba(23, 20, 26, 0.62);
}

.cd__field {
  display: flex;
  align-items: center;
  gap: 4px;
}

.cd__step {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 8px;
  background-color: rgba(23, 20, 26, 0.08);
  color: #17141a;
  cursor: pointer;
}

.cd__step:focus-visible,
.cd__val:focus-visible,
.cd__go:focus-visible {
  outline: 3px solid #2f6df6;
  outline-offset: 2px;
}

.cd__step svg {
  display: block;
}

.cd__val {
  box-sizing: border-box;
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
  gap: 4px;
  padding: 4px 8px;
  min-width: 66px;
  border-radius: 8px;
  background-color: rgba(47, 109, 246, 0.1);
  cursor: ns-resize;
}

.cd__n {
  font-size: 20px;
  line-height: 24px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.cd__u {
  font-size: 11px;
  line-height: 14px;
  font-weight: 700;
  font-style: normal;
  color: rgba(23, 20, 26, 0.72);
}

.cd__go {
  box-sizing: border-box;
  margin: 0;
  padding: 4px 16px;
  border: 0;
  border-radius: 999px;
  background-color: #2f6df6;
  color: #ffffff;
  font-family: inherit;
  font-size: 13px;
  line-height: 20px;
  font-weight: 700;
  cursor: pointer;
}

.cd__tpl {
  display: none;
}

.cd.is-demo .cd__ring {
  animation-name: cd-drain;
  animation-duration: 2s;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
  animation-fill-mode: backwards;
}

@keyframes cd-drain {
  0% {
    --ring-angle: 360deg;
  }
  62% {
    --ring-angle: 72deg;
  }
  86% {
    --ring-angle: 360deg;
  }
  100% {
    --ring-angle: 360deg;
  }
}
.cd.is-demo .cd__f {
  animation-duration: 2s;
  animation-timing-function: steps(1, end);
  animation-iteration-count: infinite;
  animation-fill-mode: backwards;
}

.cd.is-demo .cd__f[data-k="1"] {
  animation-name: cd-n1;
}

.cd.is-demo .cd__f[data-k="2"] {
  animation-name: cd-n2;
}

.cd.is-demo .cd__f[data-k="3"] {
  animation-name: cd-n3;
}

@keyframes cd-n1 {
  0% {
    opacity: 1;
  }
  21% {
    opacity: 0;
  }
  62% {
    opacity: 1;
  }
  100% {
    opacity: 1;
  }
}
@keyframes cd-n2 {
  0% {
    opacity: 0;
  }
  21% {
    opacity: 1;
  }
  41% {
    opacity: 0;
  }
  100% {
    opacity: 0;
  }
}
@keyframes cd-n3 {
  0% {
    opacity: 0;
  }
  41% {
    opacity: 1;
  }
  62% {
    opacity: 0;
  }
  100% {
    opacity: 0;
  }
}
.cd.is-demo .cd__go {
  animation-name: cd-press;
  animation-duration: 2s;
  animation-timing-function: cubic-bezier(0.2, 0.8, 0.2, 1);
  animation-iteration-count: infinite;
  animation-fill-mode: backwards;
}

@keyframes cd-press {
  0% {
    transform: scale(0.92);
  }
  8% {
    transform: scale(1.04);
  }
  16% {
    transform: scale(1);
  }
  100% {
    transform: scale(1);
  }
}
@media (max-width: 340px) {
  .cd {
    gap: 12px;
  }
  .cd__ring {
    width: 100px;
    height: 100px;
  }
  .cd__hole {
    width: 76px;
    height: 76px;
  }
  .cd__num,
  .cd__f {
    font-size: 20px;
    line-height: 24px;
  }
  .cd__val {
    min-width: 56px;
    padding: 0 4px;
    gap: 0;
  }
  .cd__n {
    font-size: 17px;
    line-height: 22px;
  }
  .cd__step {
    width: 24px;
    height: 24px;
  }
  .cd__go {
    padding: 4px 12px;
    font-size: 12px;
    line-height: 18px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .cd.is-demo .cd__ring,
  .cd.is-demo .cd__f,
  .cd.is-demo .cd__go {
    animation: none !important;
  }
  .cd.is-demo .cd__f[data-k="2"],
  .cd.is-demo .cd__f[data-k="3"] {
    display: none;
  }
}
