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

.sc {
  box-sizing: border-box;
  width: min(420px, 92vw);
  font-family: -apple-system, "Segoe UI", "Noto Sans KR", sans-serif;
}

.sc__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.sc__title {
  font-weight: 800;
  font-size: 13px;
  color: #17141a;
}

.sc__switch {
  display: flex;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(23, 20, 26, 0.06);
}

.sc__period {
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 4px 12px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 10px;
  font-family: inherit;
  color: rgba(23, 20, 26, 0.72);
  transition: background 300ms ease-out, color 300ms ease-out;
}

.sc__period.is-active {
  background: #17141a;
  color: #fff7e6;
}

.sc__row {
  display: flex;
  gap: 12px;
}

.sc__card {
  box-sizing: border-box;
  flex: 1 1 0;
  min-width: 0;
  border-radius: 16px;
  padding: 12px;
  background: #fff;
  box-shadow: 0 14px 24px rgba(23, 20, 26, 0.32);
  position: relative;
  overflow: hidden;
}

.sc__label {
  display: block;
  font-size: 10px;
  font-weight: 700;
  color: rgba(23, 20, 26, 0.72);
  margin-bottom: 4px;
}

.sc__value {
  display: block;
  font-size: clamp(14px, 4vw, 18px);
  font-weight: 800;
  color: #17141a;
  transition: opacity 220ms ease-out;
}

.sc__value.is-swap {
  opacity: 0;
}

.sc__spark {
  display: block;
  width: 100%;
  height: 24px;
  margin-top: 8px;
  overflow: visible;
}

.sc__spark-path {
  fill: none;
  stroke: #2f6df6;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
}

.sc__card.is-demo .sc__spark-path {
  animation: sc-draw 2s ease-out infinite;
}

@keyframes sc-draw {
  0% {
    stroke-dashoffset: 100;
  }
  60% {
    stroke-dashoffset: 0;
  }
  100% {
    stroke-dashoffset: 0;
  }
}
@media (max-width: 340px) {
  .sc__row {
    gap: 8px;
  }
  .sc__card {
    padding: 8px;
  }
  .sc__label {
    font-size: 9px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .sc__card.is-demo .sc__spark-path {
    animation: none !important;
    stroke-dashoffset: 0;
  }
  .sc__value {
    transition: none;
  }
}
