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

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

.rp__base {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin: 0;
}

.rp__baselab {
  font-size: 11px;
  line-height: 16px;
  font-weight: 600;
  opacity: 0.9;
}

.rp__basenum {
  font-size: 14px;
  line-height: 18px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.rp__chips {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.rp__chip {
  box-sizing: border-box;
  margin: 0;
  padding: 4px 8px;
  border: 2px solid #17141a;
  border-radius: 999px;
  background-color: transparent;
  color: #17141a;
  font-family: inherit;
  font-size: 13px;
  line-height: 18px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
}

.rp__chip:focus-visible {
  outline: 3px solid #17141a;
  outline-offset: 3px;
}

.rp:not(.is-demo) .rp__chip[aria-pressed=true] {
  background-color: #17141a;
  color: #fff7e6;
}

.rp__out {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px;
  border-radius: 16px;
  background-color: #17141a;
  color: #fff7e6;
}

.rp__cap {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  line-height: 14px;
  font-weight: 600;
  opacity: 0.82;
}

.rp__ic {
  display: inline-flex;
  flex: 0 0 auto;
}

.rp__ic svg {
  display: block;
}

.rp__slot {
  position: relative;
  display: block;
  height: 40px;
  overflow: hidden;
}

.rp__val,
.rp__f {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  display: flex;
  align-items: center;
  height: 40px;
  font-size: 26px;
  line-height: 30px;
  font-weight: 800;
  white-space: nowrap;
}

.rp__val--nxt {
  transform: translateY(100%);
}

.rp__slot.is-roll .rp__val {
  transition: transform 220ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.rp__slot.is-roll .rp__val--cur {
  transform: translateY(-100%);
}

.rp__slot.is-roll .rp__val--nxt {
  transform: translateY(0);
}

.rp__live {
  position: absolute;
  margin: 0;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.rp__f {
  display: none;
}

.rp.is-demo .rp__f {
  display: flex;
}

.rp.is-demo .rp__val {
  display: none;
}

.rp.is-demo .rp__chip[data-i="0"],
.rp.is-demo .rp__chip[data-i="3"] {
  animation-duration: 2s, 2s;
  animation-iteration-count: infinite, infinite;
  animation-timing-function: steps(1, end), cubic-bezier(0.2, 0.8, 0.2, 1);
  animation-fill-mode: backwards, backwards;
}

.rp.is-demo .rp__chip[data-i="0"] {
  animation-name: rp-skin-a, rp-pop-a;
}

.rp.is-demo .rp__chip[data-i="3"] {
  animation-name: rp-skin-b, rp-pop-b;
}

@keyframes rp-skin-a {
  0% {
    background-color: #17141a;
    color: #fff7e6;
  }
  32% {
    background-color: transparent;
    color: #17141a;
  }
  74% {
    background-color: #17141a;
    color: #fff7e6;
  }
  100% {
    background-color: #17141a;
    color: #fff7e6;
  }
}
@keyframes rp-skin-b {
  0% {
    background-color: transparent;
    color: #17141a;
  }
  32% {
    background-color: #17141a;
    color: #17141a;
  }
  74% {
    background-color: transparent;
    color: #17141a;
  }
  100% {
    background-color: transparent;
    color: #17141a;
  }
}
@keyframes rp-pop-a {
  0% {
    transform: scale(1);
  }
  72% {
    transform: scale(1);
  }
  76% {
    transform: scale(0.93);
  }
  82% {
    transform: scale(1.05);
  }
  88% {
    transform: scale(1);
  }
  100% {
    transform: scale(1);
  }
}
@keyframes rp-pop-b {
  0% {
    transform: scale(1);
  }
  30% {
    transform: scale(1);
  }
  34% {
    transform: scale(0.93);
  }
  40% {
    transform: scale(1.05);
  }
  46% {
    transform: scale(1);
  }
  100% {
    transform: scale(1);
  }
}
.rp.is-demo .rp__f {
  animation-duration: 2s, 2s;
  animation-iteration-count: infinite, infinite;
  animation-timing-function: steps(1, end), cubic-bezier(0.2, 0.8, 0.2, 1);
  animation-fill-mode: backwards, backwards;
}

.rp.is-demo .rp__f[data-k=a] {
  animation-name: rp-cut-a, rp-rise-a;
}

.rp.is-demo .rp__f[data-k=b] {
  animation-name: rp-cut-b, rp-rise-b;
}

@keyframes rp-cut-a {
  0% {
    opacity: 1;
  }
  32% {
    opacity: 0;
  }
  74% {
    opacity: 1;
  }
  100% {
    opacity: 1;
  }
}
@keyframes rp-cut-b {
  0% {
    opacity: 0;
  }
  32% {
    opacity: 1;
  }
  74% {
    opacity: 0;
  }
  100% {
    opacity: 0;
  }
}
@keyframes rp-rise-a {
  0% {
    transform: translateY(0);
  }
  69.9% {
    transform: translateY(0);
    animation-timing-function: steps(1, end);
  }
  70% {
    transform: translateY(5px);
  }
  74% {
    transform: translateY(5px);
  }
  84% {
    transform: translateY(0);
  }
  100% {
    transform: translateY(0);
  }
}
@keyframes rp-rise-b {
  0% {
    transform: translateY(5px);
  }
  32% {
    transform: translateY(5px);
  }
  42% {
    transform: translateY(0);
  }
  70% {
    transform: translateY(0);
  }
  100% {
    transform: translateY(0);
  }
}
@media (max-width: 340px) {
  .rp {
    gap: 4px;
  }
  .rp__chip {
    font-size: 12px;
    line-height: 16px;
  }
  .rp__slot,
  .rp__val,
  .rp__f {
    height: 34px;
  }
  .rp__val,
  .rp__f {
    font-size: 22px;
    line-height: 26px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .rp.is-demo .rp__chip,
  .rp.is-demo .rp__f {
    animation: none !important;
  }
  .rp__slot.is-roll .rp__val {
    transition: none !important;
  }
  .rp.is-demo .rp__f[data-k=b] {
    display: none;
  }
  .rp.is-demo .rp__chip[aria-pressed=true] {
    background-color: #17141a;
    color: #fff7e6;
  }
}
