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

.rs {
  box-sizing: border-box;
  width: min(320px, 88vw);
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-family: -apple-system, "Segoe UI", "Noto Sans KR", sans-serif;
  color: #17141a;
}

.rs__map {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  width: 100%;
  aspect-ratio: 12/5;
  background: repeating-linear-gradient(90deg, #fffdf7 0 7px, transparent 7px 30px), repeating-linear-gradient(0deg, #fffdf7 0 6px, transparent 6px 26px), radial-gradient(circle at 16% 22%, #c9e0bd 0 30px, transparent 30px), linear-gradient(101deg, transparent 0 78%, #bcd9ea 78% 90%, transparent 90%), #efe9dc;
}

.rs__map::before,
.rs__map::after {
  content: "";
  position: absolute;
  z-index: 0;
  background: #e2dac9;
}

.rs__map::before {
  left: 6%;
  top: 58%;
  width: 15%;
  height: 30%;
}

.rs__map::after {
  left: 76%;
  top: 12%;
  width: 12%;
  height: 34%;
}

.rs__ring {
  position: absolute;
  z-index: 1;
  left: 50%;
  top: 50%;
  box-sizing: border-box;
  height: 100%;
  aspect-ratio: 1;
  border: 2px solid rgba(47, 109, 246, 0.6);
  border-radius: 50%;
  background: rgba(47, 109, 246, 0.12);
  transform: translate(-50%, -50%) scale(var(--k, 0.55));
  transition: transform 220ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.rs__me {
  position: absolute;
  z-index: 3;
  left: 50%;
  top: 50%;
  width: 8px;
  height: 8px;
  border: 2px solid #ffffff;
  border-radius: 50%;
  background: #17141a;
  transform: translate(-50%, -50%);
}

.rs__pin {
  position: absolute;
  z-index: 2;
  display: block;
  color: #2f6df6;
  opacity: 0.26;
  transform: translate(-50%, -100%);
  transition: opacity 220ms steps(1, end);
}

.rs__pin.is-in {
  opacity: 1;
}

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

.rs__cap {
  flex: 0 0 auto;
  font-size: 11px;
  line-height: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: rgba(23, 20, 26, 0.62);
}

.rs__range {
  flex: 1 1 auto;
  min-width: 0;
  height: 16px;
  margin: 0;
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  cursor: pointer;
}

.rs__range::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 999px;
  background: rgba(23, 20, 26, 0.14);
}

.rs__range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  margin-top: -4px;
  border: 0;
  border-radius: 50%;
  background: #2f6df6;
}

.rs__range::-moz-range-track {
  height: 6px;
  border-radius: 999px;
  background: rgba(23, 20, 26, 0.14);
}

.rs__range::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border: 0;
  border-radius: 50%;
  background: #2f6df6;
}

.rs__range:focus-visible {
  outline: 2px solid #2f6df6;
  outline-offset: 2px;
  border-radius: 999px;
}

.rs__read {
  position: relative;
  flex: 0 0 auto;
  width: 44px;
  height: 16px;
  text-align: right;
}

.rs__km,
.rs__cut {
  position: absolute;
  right: 0;
  top: 0;
  font-size: 12px;
  line-height: 16px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: #2f6df6;
  white-space: nowrap;
}

.rs__cut {
  opacity: 0;
}

.rs.is-demo .rs__km {
  opacity: 0;
}

.rs__hint {
  margin: 0;
  font-size: 10px;
  line-height: 14px;
  font-weight: 600;
  color: rgba(23, 20, 26, 0.72);
}

.rs.is-demo .rs__ring {
  transition: none;
  animation-name: rs-ring;
  animation-duration: 2s;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
}

.rs.is-demo .rs__pin {
  transition: none;
  animation-duration: 2s;
  animation-timing-function: steps(1, end);
  animation-iteration-count: infinite;
}

.rs.is-demo .rs__pin[data-dist="33"] {
  animation-name: rs-pin-33;
}

.rs.is-demo .rs__pin[data-dist="47"] {
  animation-name: rs-pin-47;
}

.rs.is-demo .rs__pin[data-dist="79"] {
  animation-name: rs-pin-79;
}

.rs.is-demo .rs__pin[data-dist="95"] {
  animation-name: rs-pin-95;
}

.rs.is-demo .rs__cut {
  animation-duration: 2s;
  animation-timing-function: steps(1, end);
  animation-iteration-count: infinite;
}

.rs.is-demo .rs__cut--a {
  animation-name: rs-km-a;
}

.rs.is-demo .rs__cut--b {
  animation-name: rs-km-b;
}

.rs.is-demo .rs__cut--c {
  animation-name: rs-km-c;
}

@keyframes rs-ring {
  0% {
    transform: translate(-50%, -50%) scale(0.3);
  }
  50% {
    transform: translate(-50%, -50%) scale(1);
  }
  85% {
    transform: translate(-50%, -50%) scale(0.3);
  }
  100% {
    transform: translate(-50%, -50%) scale(0.3);
  }
}
@keyframes rs-pin-33 {
  0% {
    opacity: 0.26;
  }
  2.14% {
    opacity: 1;
  }
  83.5% {
    opacity: 0.26;
  }
  100% {
    opacity: 0.26;
  }
}
@keyframes rs-pin-47 {
  0% {
    opacity: 0.26;
  }
  12.14% {
    opacity: 1;
  }
  76.5% {
    opacity: 0.26;
  }
  100% {
    opacity: 0.26;
  }
}
@keyframes rs-pin-79 {
  0% {
    opacity: 0.26;
  }
  35% {
    opacity: 1;
  }
  60.5% {
    opacity: 0.26;
  }
  100% {
    opacity: 0.26;
  }
}
@keyframes rs-pin-95 {
  0% {
    opacity: 0.26;
  }
  46.43% {
    opacity: 1;
  }
  52.5% {
    opacity: 0.26;
  }
  100% {
    opacity: 0.26;
  }
}
@keyframes rs-km-a {
  0% {
    opacity: 1;
  }
  14.29% {
    opacity: 0;
  }
  75% {
    opacity: 1;
  }
  100% {
    opacity: 1;
  }
}
@keyframes rs-km-b {
  0% {
    opacity: 0;
  }
  14.29% {
    opacity: 1;
  }
  35.71% {
    opacity: 0;
  }
  60% {
    opacity: 1;
  }
  75% {
    opacity: 0;
  }
  100% {
    opacity: 0;
  }
}
@keyframes rs-km-c {
  0% {
    opacity: 0;
  }
  35.71% {
    opacity: 1;
  }
  60% {
    opacity: 0;
  }
  100% {
    opacity: 0;
  }
}
@media (max-width: 360px) {
  .rs {
    gap: 4px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .rs.is-demo .rs__ring,
  .rs.is-demo .rs__pin,
  .rs.is-demo .rs__cut {
    animation: none !important;
  }
  .rs.is-demo .rs__km {
    opacity: 1;
  }
  .rs__ring, .rs__pin {
    transition: none;
  }
}
