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 {
  position: relative;
  box-sizing: border-box;
  width: min(300px, 92vw);
  border-radius: 16px;
  background: #ffffff;
  color: #17141a;
  font-family: -apple-system, "Segoe UI", "Noto Sans KR", sans-serif;
  border: 1px solid rgba(23, 20, 26, 0.08);
  overflow: hidden;
}

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

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

.rs__state {
  margin: 0;
  font-size: 10px;
  line-height: 1.3;
  color: rgba(23, 20, 26, 0.72);
}

.rs__view {
  box-sizing: border-box;
  height: 148px;
  margin: 8px 8px 0;
  padding-right: 8px;
  overflow-y: auto;
  scrollbar-width: none;
}
.rs__view::-webkit-scrollbar {
  display: none;
}
.rs__view:focus-visible {
  outline: 2px solid #2f6df6;
  outline-offset: 2px;
}

.rs__pad {
  position: relative;
  display: grid;
  gap: 8px;
  padding: 4px 4px 160px;
}

.rs__p {
  margin: 0;
  font-size: 11px;
  line-height: 1.55;
}

.rs__mark {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 0;
  border-top: 2px dashed #2f6df6;
  pointer-events: none;
}

.rs__pill {
  position: absolute;
  right: 12px;
  bottom: 24px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 4px 12px;
  border: 0;
  border-radius: 999px;
  background: #17141a;
  color: #ffd23f;
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.4;
  cursor: pointer;
  box-shadow: 0 6px 12px rgba(23, 20, 26, 0.32);
  transform: translateY(150%);
  opacity: 0;
  transition: transform 300ms cubic-bezier(0.2, 0.8, 0.2, 1), opacity 220ms ease-out;
}
.rs__pill:focus-visible {
  outline: 2px solid #2f6df6;
  outline-offset: 2px;
}

.rs__pill.is-up {
  transform: translateY(0);
  opacity: 1;
}

.rs__pill svg {
  font-size: 14px;
}

.rs__live {
  position: absolute;
  left: 12px;
  bottom: 4px;
  margin: 0;
  font-size: 9px;
  line-height: 1.4;
  color: rgba(23, 20, 26, 0.72);
}

@keyframes rs-flow {
  0%, 24% {
    transform: translateY(0);
  }
  56%, 78% {
    transform: translateY(-28%);
  }
  88%, 100% {
    transform: translateY(0);
  }
}
@keyframes rs-mark {
  0%, 24% {
    opacity: 0;
  }
  28%, 82% {
    opacity: 1;
  }
  84%, 100% {
    opacity: 0;
  }
}
@keyframes rs-pill-up {
  0%, 36% {
    transform: translateY(150%);
    opacity: 0;
  }
  42% {
    opacity: 1;
  }
  48%, 78% {
    transform: translateY(0);
    opacity: 1;
  }
  88%, 100% {
    transform: translateY(150%);
    opacity: 0;
  }
}
@keyframes rs-say {
  0%, 36% {
    opacity: 0.3;
  }
  40%, 82% {
    opacity: 1;
  }
  86%, 100% {
    opacity: 0.3;
  }
}
.rs.is-demo .rs__pad {
  animation-name: rs-flow;
  animation-duration: 2s;
  animation-timing-function: ease-out;
  animation-iteration-count: infinite;
}
.rs.is-demo .rs__mark {
  top: 96px;
  animation-name: rs-mark;
  animation-duration: 2s;
  animation-timing-function: steps(1, end);
  animation-iteration-count: infinite;
}
.rs.is-demo .rs__pill {
  animation-name: rs-pill-up;
  animation-duration: 2s;
  animation-timing-function: cubic-bezier(0.2, 0.8, 0.2, 1);
  animation-iteration-count: infinite;
  animation-fill-mode: backwards;
}
.rs.is-demo .rs__state {
  animation-name: rs-say;
  animation-duration: 2s;
  animation-timing-function: steps(1, end);
  animation-iteration-count: infinite;
}

@media (max-width: 340px) {
  .rs__view {
    height: 124px;
  }
  .rs__p {
    font-size: 10px;
  }
  .rs__pill {
    bottom: 20px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .rs.is-demo .rs__pad,
  .rs.is-demo .rs__pill,
  .rs.is-demo .rs__state {
    animation: none !important;
    transform: none !important;
  }
  .rs.is-demo .rs__pad {
    transform: translateY(-14%) !important;
  }
  .rs.is-demo .rs__mark {
    opacity: 1 !important;
    top: 96px;
  }
  .rs.is-demo .rs__pill {
    transform: translateY(0) !important;
    opacity: 1 !important;
  }
}
