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 --p1 {
  syntax: "<integer>";
  inherits: true;
  initial-value: 0;
}
@property --p2 {
  syntax: "<integer>";
  inherits: true;
  initial-value: 0;
}
@property --p3 {
  syntax: "<integer>";
  inherits: true;
  initial-value: 0;
}
.ar {
  --p1: 82;
  --p2: 64;
  --p3: 45;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: 16px;
  color: #fff7e6;
  font-family: -apple-system, "Segoe UI", "Noto Sans KR", sans-serif;
  transition: --p1 600ms cubic-bezier(0.2, 0.8, 0.2, 1), --p2 600ms cubic-bezier(0.2, 0.8, 0.2, 1), --p3 600ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.ar__svg {
  width: clamp(104px, 30vw, 120px);
  height: clamp(104px, 30vw, 120px);
  flex: 0 0 auto;
  transform: rotate(-90deg);
}

.ar__track circle {
  fill: none;
  stroke: rgba(255, 247, 230, 0.14);
  stroke-width: 10;
}

.ar__ring {
  fill: none;
  stroke-width: 10;
  stroke-linecap: round;
}

.ar__ring--move {
  stroke: #ff9ebb;
  stroke-dasharray: 326.726;
  stroke-dashoffset: calc(326.726 * (1 - var(--p1) / 100));
}

.ar__ring--burn {
  stroke: #4cd4a6;
  stroke-dasharray: 251.327;
  stroke-dashoffset: calc(251.327 * (1 - var(--p2) / 100));
}

.ar__ring--rest {
  stroke: #6ec8ff;
  stroke-dasharray: 175.929;
  stroke-dashoffset: calc(175.929 * (1 - var(--p3) / 100));
}

.ar__side {
  display: grid;
  gap: 12px;
}

.ar__legend {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.ar__item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 247, 230, 0.72);
}

.ar__ic {
  display: inline-flex;
}

.ar__item--move .ar__ic {
  color: #ff9ebb;
}

.ar__item--burn .ar__ic {
  color: #4cd4a6;
}

.ar__item--rest .ar__ic {
  color: #6ec8ff;
}

.ar__name {
  min-width: 32px;
}

.ar__pct {
  font-variant-numeric: tabular-nums;
  color: #fff7e6;
  font-size: 13px;
}

.ar__pct--move::after {
  counter-reset: p var(--p1);
  content: counter(p) "%";
}

.ar__pct--burn::after {
  counter-reset: p var(--p2);
  content: counter(p) "%";
}

.ar__pct--rest::after {
  counter-reset: p var(--p3);
  content: counter(p) "%";
}

.ar__btn {
  border: 0;
  border-radius: 999px;
  background: rgba(255, 247, 230, 0.12);
  color: #fff7e6;
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  padding: 8px 12px;
  cursor: pointer;
  transition: background 220ms ease-out;
}

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

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

@keyframes ar-wind {
  0% {
    --p1: 0;
    --p2: 0;
    --p3: 0;
  }
  45%, 55% {
    --p1: 82;
    --p2: 64;
    --p3: 45;
  }
  100% {
    --p1: 0;
    --p2: 0;
    --p3: 0;
  }
}
@media (max-width: 340px) {
  .ar {
    gap: 12px;
  }
  .ar__item {
    font-size: 11px;
  }
  .ar__name {
    min-width: 28px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .ar.is-demo {
    animation: none !important;
  }
  .ar, .ar__btn {
    transition: none;
  }
}
