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

@property --num {
  syntax: "<integer>";
  inherits: true;
  initial-value: 0;
}
.hg {
  --num: 62;
  box-sizing: border-box;
  display: grid;
  justify-items: center;
  gap: 12px;
  color: #fff7e6;
  font-family: -apple-system, "Segoe UI", "Noto Sans KR", sans-serif;
}

.hg__dial {
  position: relative;
  display: grid;
  place-items: center;
}

.hg__svg {
  width: clamp(132px, 42vw, 152px);
  height: auto;
}

.hg__track {
  fill: none;
  stroke: rgba(255, 247, 230, 0.14);
  stroke-width: 12;
  stroke-linecap: round;
}

.hg__arc {
  fill: none;
  stroke: #4cd4a6;
  stroke-width: 12;
  stroke-linecap: round;
  stroke-dasharray: 194.779;
  stroke-dashoffset: calc(194.779 * (1 - var(--num) / 100));
}

.hg__needle {
  stroke: #fff7e6;
  stroke-width: 3;
  stroke-linecap: round;
  fill: #fff7e6;
  transform: rotate(calc(-90deg + var(--num) * 1.8deg));
  transform-origin: 76px 76px;
}

.hg__read {
  position: absolute;
  bottom: 0;
  display: flex;
  align-items: center;
  gap: 4px;
  pointer-events: none;
}

.hg__ic {
  display: inline-flex;
  color: #4cd4a6;
}

.hg__num {
  font-size: clamp(17px, 5.5vw, 20px);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.hg__num::after {
  counter-reset: n var(--num);
  content: counter(n) "%";
}

.hg__ctrl {
  display: flex;
  align-items: center;
  gap: 12px;
}

.hg__cap {
  font-size: 10px;
  font-weight: 700;
  color: rgba(255, 247, 230, 0.55);
}

.hg__btn {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 247, 230, 0.12);
  color: #fff7e6;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition: background 220ms ease-out;
}

.hg__btn:hover, .hg__btn:focus-visible {
  background: rgba(255, 247, 230, 0.26);
}

.hg.is-demo {
  animation: hg-sweep 2s cubic-bezier(0.2, 0.8, 0.2, 1) infinite;
}

@keyframes hg-sweep {
  0% {
    --num: 8;
  }
  45%, 55% {
    --num: 88;
  }
  100% {
    --num: 8;
  }
}
@media (max-width: 340px) {
  .hg__ctrl {
    gap: 8px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .hg.is-demo {
    animation: none !important;
    --num: 62;
  }
  .hg__btn {
    transition: none;
  }
}
