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

.sc {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  max-width: 424px;
}

.sc__hint {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  font-weight: 700;
  font-size: clamp(10px, 2.8vw, 12px);
  color: #fff7e6;
}

.sc__ico {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  color: #ffd23f;
}

.sc__viewport {
  position: relative;
  height: 152px;
  border-radius: 16px;
  overflow: hidden;
  background: rgba(255, 247, 230, 0.05);
  box-shadow: inset 0 0 0 1px rgba(255, 247, 230, 0.12);
  cursor: grab;
  touch-action: pan-y;
}

.sc__viewport:active {
  cursor: grabbing;
}

.sc__viewport:focus-visible {
  outline: 2px solid #ffd23f;
  outline-offset: 2px;
}

.sc__track {
  position: absolute;
  left: 8px;
  top: 8px;
  display: flex;
  gap: 12px;
  will-change: transform;
}

.sc__card {
  flex: 0 0 120px;
  width: 120px;
  height: 120px;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 4px;
  border-radius: 16px;
  background: #fff7e6;
  color: #17141a;
}

.sc__card b {
  font-weight: 800;
  font-size: 24px;
  line-height: 1;
}

.sc__card i {
  font-style: normal;
  font-weight: 700;
  font-size: clamp(10px, 2.6vw, 11px);
}

.sc__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.sc__meter {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 4px;
}

.sc__meterLabel {
  font-weight: 700;
  font-size: clamp(10px, 2.6vw, 11px);
  color: rgba(255, 247, 230, 0.82);
}

.sc__meterBar {
  display: block;
  width: 96px;
  height: 6px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 247, 230, 0.16);
}

.sc__meterFill {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: #ffd23f;
  transform-origin: left center;
  transform: scaleX(0);
}

.sc__reset {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 0;
  border-radius: 999px;
  padding: 4px 12px;
  background: #ffd23f;
  color: #17141a;
  cursor: pointer;
  font-family: inherit;
  font-weight: 800;
  font-size: clamp(10px, 2.6vw, 11px);
  line-height: 1;
}

.sc__reset .sc__ico {
  color: #17141a;
}

.sc.is-demo .sc__track {
  animation-name: scGlide;
  animation-duration: 2s;
  animation-timing-function: ease-out;
  animation-iteration-count: infinite;
}

@keyframes scGlide {
  0% {
    transform: translate(0px, 0);
  }
  48% {
    transform: translate(-264px, 0);
  }
  64% {
    transform: translate(-264px, 0);
  }
  92% {
    transform: translate(0px, 0);
  }
  100% {
    transform: translate(0px, 0);
  }
}
.sc.is-demo .sc__meterFill {
  animation-name: scMeter;
  animation-duration: 2s;
  animation-timing-function: ease-out;
  animation-iteration-count: infinite;
}

@keyframes scMeter {
  0% {
    transform: scaleX(1);
  }
  48% {
    transform: scaleX(0);
  }
  64% {
    transform: scaleX(0);
  }
  78% {
    transform: scaleX(0.4);
  }
  92% {
    transform: scaleX(0);
  }
  100% {
    transform: scaleX(0);
  }
}
@media (max-width: 340px) {
  .sc {
    gap: 8px;
  }
  .sc__viewport {
    height: 112px;
  }
  .sc__track {
    left: 4px;
    top: 4px;
    gap: 8px;
  }
  .sc__card {
    flex: 0 0 92px;
    width: 92px;
    height: 92px;
  }
  .sc__card b {
    font-size: 20px;
  }
  .sc__meterBar {
    width: 64px;
  }
  .sc__hint {
    font-size: 10px;
    line-height: 1.25;
  }
}
@media (prefers-reduced-motion: reduce) {
  .sc.is-demo .sc__track,
  .sc.is-demo .sc__meterFill {
    animation: none !important;
  }
  .sc.is-demo .sc__track {
    transform: translate(0, 0) !important;
  }
  .sc.is-demo .sc__meterFill {
    transform: scaleX(0) !important;
  }
}
