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

.rp {
  box-sizing: border-box;
  display: grid;
  width: min(300px, 88vw);
  overflow: hidden;
  border: 1px solid rgba(255, 247, 230, 0.16);
  border-radius: 16px;
  background: rgb(16.2980392157%, 14.9647058824%, 16.5960784314%);
  color: #fff7e6;
}

.rp * {
  box-sizing: border-box;
}

.rp__bar {
  height: 4px;
  background: rgba(255, 247, 230, 0.12);
}

.rp__fill {
  display: block;
  height: 100%;
  background: #2f6df6;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 220ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.rp.is-done .rp__fill {
  opacity: 0;
  transition: opacity 300ms linear 180ms;
}

.rp__tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 12px 12px 8px;
}

.rp__tab {
  position: relative;
  margin: 0;
  padding: 8px 4px;
  border: 0;
  border-radius: 999px;
  background: none;
  color: #fff7e6;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}

.rp__tab:focus-visible {
  outline: 2px solid #2f6df6;
  outline-offset: 2px;
}

.rp__pill {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: rgba(255, 247, 230, 0.14);
  opacity: 0;
}

.rp__tab.is-current .rp__pill {
  opacity: 1;
}

.rp__label {
  position: relative;
}

.rp__view {
  display: grid;
  gap: 8px;
  padding: 0 12px 12px;
}

.rp__head {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.2;
}

.rp__wait {
  margin: 0;
  color: #2f6df6;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  opacity: 0;
}

.rp__text {
  margin: 0;
  color: rgba(255, 247, 230, 0.66);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.5;
}

.rp__view[aria-busy=true] .rp__wait {
  opacity: 1;
}

.rp__view[aria-busy=true] .rp__text {
  opacity: 0.45;
}

@keyframes rp-trickle {
  0% {
    transform: scaleX(0);
    animation-timing-function: steps(1, end);
  }
  8% {
    transform: scaleX(0.12);
  }
  26% {
    transform: scaleX(0.38);
  }
  48% {
    transform: scaleX(0.66);
  }
  70% {
    transform: scaleX(0.88);
  }
  80% {
    transform: scaleX(0.88);
    animation-timing-function: steps(1, end);
  }
  88%, 100% {
    transform: scaleX(0);
  }
}
@keyframes rp-pill-home {
  0%, 7% {
    opacity: 1;
  }
  8%, 87% {
    opacity: 0;
  }
  88%, 100% {
    opacity: 1;
  }
}
@keyframes rp-pill-list {
  0%, 7% {
    opacity: 0;
  }
  8%, 87% {
    opacity: 1;
  }
  88%, 100% {
    opacity: 0;
  }
}
@keyframes rp-wait {
  0%, 7% {
    opacity: 0;
  }
  8%, 77% {
    opacity: 1;
  }
  78%, 100% {
    opacity: 0;
  }
}
@keyframes rp-text {
  0%, 7% {
    opacity: 1;
  }
  8%, 83% {
    opacity: 0.45;
  }
  84%, 100% {
    opacity: 1;
  }
}
.rp.is-demo .rp__fill {
  animation-name: rp-trickle;
  animation-duration: 2s;
  animation-timing-function: cubic-bezier(0.2, 0.8, 0.2, 1);
  animation-iteration-count: infinite;
}
.rp.is-demo .rp__tab:nth-child(1) .rp__pill {
  animation-name: rp-pill-home;
}
.rp.is-demo .rp__tab:nth-child(2) .rp__pill {
  animation-name: rp-pill-list;
}
.rp.is-demo .rp__wait {
  animation-name: rp-wait;
}
.rp.is-demo .rp__text {
  animation-name: rp-text;
}
.rp.is-demo .rp__pill,
.rp.is-demo .rp__wait,
.rp.is-demo .rp__text {
  animation-duration: 2s;
  animation-timing-function: steps(1, end);
  animation-iteration-count: infinite;
}

@media (max-width: 340px) {
  .rp__tabs {
    padding: 8px;
  }
  .rp__tab {
    padding: 4px;
    font-size: 11px;
  }
  .rp__view {
    gap: 4px;
    padding: 0 8px 8px;
  }
  .rp__head {
    font-size: 13px;
  }
  .rp__wait {
    font-size: 10px;
  }
  .rp__text {
    font-size: 11px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .rp.is-demo .rp__fill,
  .rp.is-demo .rp__pill,
  .rp.is-demo .rp__wait,
  .rp.is-demo .rp__text {
    animation: none !important;
    transition: none !important;
  }
  .rp.is-demo .rp__fill {
    transform: scaleX(0.88) !important;
  }
  .rp.is-demo .rp__tab:nth-child(1) .rp__pill {
    opacity: 0 !important;
  }
  .rp.is-demo .rp__tab:nth-child(2) .rp__pill {
    opacity: 1 !important;
  }
  .rp.is-demo .rp__wait {
    opacity: 1 !important;
  }
  .rp.is-demo .rp__text {
    opacity: 0.45 !important;
  }
}
