html, body {
  margin: 0;
  overflow: hidden;
}

.stage {
  box-sizing: border-box;
  min-height: 100vh;
  display: grid;
  place-items: center;
  margin: 0;
  background: #ff4d1f;
  font-family: -apple-system, "Segoe UI", "Noto Sans KR", sans-serif;
  padding: clamp(8px, 4vw, 24px);
}

.rm {
  --h: clamp(148px, 58vh, 176px);
  width: min(340px, 92vw);
}

.rm__scroller {
  height: var(--h);
  overflow-y: auto;
  scrollbar-width: none;
}
.rm__scroller::-webkit-scrollbar {
  display: none;
}

.rm__pad {
  height: calc(var(--h) * 2.2);
}

.rm__pin {
  position: sticky;
  top: 0;
  display: grid;
  place-items: center;
  height: var(--h);
}

.rm__map {
  position: relative;
  width: 248px;
  height: 120px;
  border-radius: 16px;
  background: rgba(23, 20, 26, 0.72);
}

.rm__svg {
  position: absolute;
  top: 0;
  left: 0;
}

.rm__guide {
  fill: none;
  stroke: rgba(255, 247, 230, 0.3);
  stroke-width: 2;
  stroke-dasharray: 3 3;
}

.rm__line {
  fill: none;
  stroke: #ffd23f;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  animation-name: rm-draw;
  animation-duration: 1s;
  animation-timing-function: linear;
  animation-fill-mode: both;
  animation-timeline: scroll(nearest block);
}

@keyframes rm-draw {
  from {
    stroke-dashoffset: 100;
  }
  to {
    stroke-dashoffset: 0;
  }
}
.rm__mark {
  position: absolute;
  top: 0;
  left: 0;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #ffd23f;
  color: #17141a;
  offset-path: path("M20 96C62 96 58 34 100 34C142 34 138 92 180 92C206 92 214 60 228 36");
  offset-distance: 0%;
  offset-rotate: 0deg;
  animation-name: rm-run;
  animation-duration: 1s;
  animation-timing-function: linear;
  animation-fill-mode: both;
  animation-timeline: scroll(nearest block);
}

@keyframes rm-run {
  from {
    offset-distance: 0%;
  }
  to {
    offset-distance: 100%;
  }
}
.rm__stop {
  position: absolute;
  width: 12px;
  height: 12px;
  border: 2px solid rgba(255, 247, 230, 0.5);
  border-radius: 50%;
  background: rgba(23, 20, 26, 0.9);
  animation-name: rm-lit;
  animation-duration: 1s;
  animation-timing-function: linear;
  animation-fill-mode: both;
  animation-timeline: scroll(nearest block);
}

.rm__stop--1 {
  left: 12px;
  top: 88px;
  animation-range: 0% 12%;
}

.rm__stop--2 {
  left: 92px;
  top: 26px;
  animation-range: 34% 46%;
}

.rm__stop--3 {
  left: 220px;
  top: 28px;
  animation-range: 84% 96%;
}

@keyframes rm-lit {
  from {
    border-color: rgba(255, 247, 230, 0.5);
    background: rgba(23, 20, 26, 0.9);
  }
  to {
    border-color: #4cd4a6;
    background: #4cd4a6;
  }
}
.rm__name {
  position: absolute;
  color: #fff7e6;
  font-size: 10px;
  line-height: 14px;
  font-weight: 700;
}

.rm__name--1 {
  left: 32px;
  top: 90px;
}

.rm__name--2 {
  left: 82px;
  top: 4px;
}

.rm__name--3 {
  left: 198px;
  top: 6px;
}

.rm.is-demo .rm__line,
.rm.is-demo .rm__mark,
.rm.is-demo .rm__stop {
  animation-duration: 1s;
  animation-direction: alternate;
  animation-iteration-count: infinite;
  animation-timeline: auto;
}

.rm.is-demo .rm__stop--1 {
  animation-name: rm-lit-a;
}

.rm.is-demo .rm__stop--2 {
  animation-name: rm-lit-b;
}

.rm.is-demo .rm__stop--3 {
  animation-name: rm-lit-c;
}

@keyframes rm-lit-a {
  0%, 8% {
    border-color: rgba(255, 247, 230, 0.5);
    background: rgba(23, 20, 26, 0.9);
  }
  12%, 100% {
    border-color: #4cd4a6;
    background: #4cd4a6;
  }
}
@keyframes rm-lit-b {
  0%, 36% {
    border-color: rgba(255, 247, 230, 0.5);
    background: rgba(23, 20, 26, 0.9);
  }
  42%, 100% {
    border-color: #4cd4a6;
    background: #4cd4a6;
  }
}
@keyframes rm-lit-c {
  0%, 84% {
    border-color: rgba(255, 247, 230, 0.5);
    background: rgba(23, 20, 26, 0.9);
  }
  90%, 100% {
    border-color: #4cd4a6;
    background: #4cd4a6;
  }
}
@media (prefers-reduced-motion: reduce) {
  .rm__line {
    animation: none !important;
    stroke-dashoffset: 0;
  }
  .rm__mark {
    animation: none !important;
    offset-distance: 100%;
  }
  .rm__stop {
    animation: none !important;
    border-color: #4cd4a6;
    background: #4cd4a6;
  }
}
