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

.rf {
  box-sizing: border-box;
  width: min(312px, 92vw);
  border-radius: 16px;
  background: #f4f4f6;
  color: #17141a;
  font-family: -apple-system, "Segoe UI", "Noto Sans KR", sans-serif;
  border: 1px solid rgba(23, 20, 26, 0.08);
}

.rf__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 12px 0;
}

.rf__title {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.3;
}

.rf__state {
  margin: 0;
  font-size: 10px;
  line-height: 1.3;
  color: #0a4fe8;
  font-weight: 700;
}

.rf__body {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px;
  padding: 8px 12px 12px;
}

.rf__rail {
  position: relative;
  width: 8px;
  border-radius: 999px;
  background: rgba(23, 20, 26, 0.08);
}

.rf__dot {
  position: absolute;
  top: 2px;
  left: 0;
  display: block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #0a4fe8;
  transition: transform 220ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.rf__view {
  box-sizing: border-box;
  height: 148px;
  overflow-y: auto;
  scrollbar-width: none;
}
.rf__view::-webkit-scrollbar {
  display: none;
}
.rf__view:focus-visible {
  outline: 2px solid #0a4fe8;
  outline-offset: 2px;
}

.rf__pad {
  display: grid;
  gap: 12px;
  padding: 0 4px 64px;
}

.rf__p {
  margin: 0;
  font-size: 11px;
  line-height: 1.6;
  color: #17141a;
  opacity: 0.35;
  transition: opacity 220ms ease-out;
}

.rf__p.is-cur,
.rf__p[aria-current=true] {
  opacity: 1;
  font-weight: 700;
}

@keyframes rf-focus {
  0% {
    opacity: 0.35;
  }
  6% {
    opacity: 1;
  }
  14% {
    opacity: 1;
  }
  20%, 100% {
    opacity: 0.35;
  }
}
.rf.is-demo .rf__p:nth-child(1) {
  animation-name: rf-focus;
  animation-duration: 2s;
  animation-timing-function: ease-out;
  animation-iteration-count: infinite;
  animation-delay: 0s;
  animation-fill-mode: backwards;
}

.rf.is-demo .rf__p:nth-child(2) {
  animation-name: rf-focus;
  animation-duration: 2s;
  animation-timing-function: ease-out;
  animation-iteration-count: infinite;
  animation-delay: 0.4s;
  animation-fill-mode: backwards;
}

.rf.is-demo .rf__p:nth-child(3) {
  animation-name: rf-focus;
  animation-duration: 2s;
  animation-timing-function: ease-out;
  animation-iteration-count: infinite;
  animation-delay: 0.8s;
  animation-fill-mode: backwards;
}

.rf.is-demo .rf__p:nth-child(4) {
  animation-name: rf-focus;
  animation-duration: 2s;
  animation-timing-function: ease-out;
  animation-iteration-count: infinite;
  animation-delay: 1.2s;
  animation-fill-mode: backwards;
}

.rf.is-demo .rf__p:nth-child(5) {
  animation-name: rf-focus;
  animation-duration: 2s;
  animation-timing-function: ease-out;
  animation-iteration-count: infinite;
  animation-delay: 1.6s;
  animation-fill-mode: backwards;
}

@keyframes rf-dot-move {
  0%, 8% {
    transform: translateY(0);
  }
  28% {
    transform: translateY(20px);
  }
  48% {
    transform: translateY(40px);
  }
  68% {
    transform: translateY(60px);
  }
  88%, 90% {
    transform: translateY(80px);
  }
  98%, 100% {
    transform: translateY(0);
  }
}
.rf.is-demo .rf__dot {
  animation-name: rf-dot-move;
  animation-duration: 2s;
  animation-timing-function: cubic-bezier(0.2, 0.8, 0.2, 1);
  animation-iteration-count: infinite;
}

@keyframes rf-say {
  0%, 27% {
    opacity: 1;
  }
  28%, 47% {
    opacity: 0.4;
  }
  48%, 67% {
    opacity: 1;
  }
  68%, 87% {
    opacity: 0.4;
  }
  88%, 100% {
    opacity: 1;
  }
}
.rf.is-demo .rf__state {
  animation-name: rf-say;
  animation-duration: 2s;
  animation-timing-function: steps(1, end);
  animation-iteration-count: infinite;
}

@media (max-width: 340px) {
  .rf__view {
    height: 124px;
  }
  .rf__p {
    font-size: 10px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .rf.is-demo .rf__p,
  .rf.is-demo .rf__dot,
  .rf.is-demo .rf__state {
    animation: none !important;
    transform: none !important;
  }
  .rf.is-demo .rf__p:nth-child(3) {
    opacity: 1 !important;
    font-weight: 700;
  }
}
