@charset "UTF-8";
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 --a {
  syntax: "<integer>";
  inherits: true;
  initial-value: 0;
}
@property --b {
  syntax: "<integer>";
  inherits: true;
  initial-value: 0;
}
@property --d {
  syntax: "<integer>";
  inherits: true;
  initial-value: 0;
}
.bp {
  --a: 72;
  --b: 58;
  --d: 14;
  box-sizing: border-box;
  display: grid;
  justify-items: center;
  gap: 12px;
  color: #17141a;
  font-family: -apple-system, "Segoe UI", "Noto Sans KR", sans-serif;
  transition: --a 600ms cubic-bezier(0.2, 0.8, 0.2, 1), --b 600ms cubic-bezier(0.2, 0.8, 0.2, 1), --d 600ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

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

.bp__cell {
  margin: 0;
  display: grid;
  justify-items: center;
  gap: 4px;
}

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

.bp__svg {
  width: clamp(72px, 23vw, 88px);
  height: clamp(72px, 23vw, 88px);
  transform: rotate(-90deg);
}

.bp__track {
  fill: none;
  stroke: rgba(23, 20, 26, 0.12);
  stroke-width: 10;
}

.bp__ring {
  fill: none;
  stroke-width: 10;
  stroke-linecap: round;
  stroke-dasharray: 226.195;
}

.bp__cell--now .bp__ring {
  stroke: #2f6df6;
  stroke-dashoffset: calc(226.195 * (1 - var(--a) / 100));
}

.bp__cell--prev .bp__ring {
  stroke: rgba(23, 20, 26, 0.38);
  stroke-dashoffset: calc(226.195 * (1 - var(--b) / 100));
}

.bp__num {
  position: absolute;
  font-size: clamp(15px, 4.6vw, 17px);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.bp__cell--now .bp__num::after {
  counter-reset: n var(--a);
  content: counter(n) "%";
}

.bp__cell--prev .bp__num::after {
  counter-reset: n var(--b);
  content: counter(n) "%";
}

.bp__cell--prev .bp__num {
  color: rgba(23, 20, 26, 0.5);
}

.bp__cap {
  font-size: 10px;
  font-weight: 700;
  color: rgba(23, 20, 26, 0.72);
}

.bp__delta {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(47, 109, 246, 0.12);
  color: #2f6df6;
  font-size: 11px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.bp__ic {
  display: inline-flex;
}

.bp__delta::after {
  counter-reset: d var(--d);
  content: "+" counter(d) "%";
}

.bp.is-down .bp__delta {
  background: #ffe0d8;
  color: #c2361a;
}

.bp.is-down .bp__ic {
  transform: scaleY(-1);
}

.bp.is-down .bp__delta::after {
  content: "−" counter(d) "%";
}

.bp__btn {
  border: 0;
  border-radius: 999px;
  background: #17141a;
  color: #fff7e6;
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  padding: 8px 16px;
  cursor: pointer;
  transition: transform 220ms cubic-bezier(0.2, 1.4, 0.4, 1);
}

.bp__btn:hover, .bp__btn:focus-visible {
  transform: translateY(-2px);
}

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

@keyframes bp-fill {
  0% {
    --a: 0;
    --b: 0;
    --d: 0;
  }
  45%, 55% {
    --a: 72;
    --b: 58;
    --d: 14;
  }
  100% {
    --a: 0;
    --b: 0;
    --d: 0;
  }
}
@media (max-width: 340px) {
  .bp__delta {
    font-size: 10px;
    padding: 4px;
  }
  .bp__pair {
    gap: 4px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .bp.is-demo {
    animation: none !important;
  }
  .bp {
    transition: none;
  }
  .bp__btn {
    transition: none;
  }
}
