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

.rp {
  display: flex;
  width: 100%;
  max-width: 424px;
}

.rp__card {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  border-radius: 16px;
  padding: 16px;
  background: #ffffff;
  box-shadow: 0 6px 20px rgba(23, 20, 26, 0.1), inset 0 0 0 1px rgba(23, 20, 26, 0.08);
}

.rp__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.rp__title {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  font-weight: 800;
  font-size: clamp(12px, 3.2vw, 14px);
  color: #17141a;
}

.rp__bell {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  color: #2f6df6;
  transform-origin: 50% 15%;
}

.rp__swWrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.rp__swText {
  font-weight: 700;
  font-size: clamp(9px, 2.4vw, 11px);
  color: rgba(23, 20, 26, 0.62);
}

.rp__switch {
  position: relative;
  width: 40px;
  height: 22px;
  flex: 0 0 auto;
  border: 0;
  border-radius: 999px;
  padding: 0;
  background: rgba(23, 20, 26, 0.2);
  cursor: pointer;
}

.rp__switch[aria-checked=true] {
  background: #2f6df6;
}

.rp__knob {
  position: absolute;
  left: 3px;
  top: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #ffffff;
}

.rp__switch[aria-checked=true] .rp__knob {
  transform: translateX(18px);
}

.rp__switch:focus-visible {
  outline: 2px solid #17141a;
  outline-offset: 2px;
}

.rp__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.rp__chip {
  border: 2px solid rgba(23, 20, 26, 0.18);
  border-radius: 999px;
  padding: 4px 12px;
  background: transparent;
  color: #17141a;
  cursor: pointer;
  font-family: inherit;
  font-weight: 800;
  font-size: clamp(10px, 2.6vw, 12px);
  line-height: 1.6;
}

.rp__chip[aria-pressed=true] {
  border-color: #2f6df6;
  background: #2f6df6;
  color: #ffffff;
}

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

.rp__say {
  margin: 0;
  font-weight: 700;
  font-size: clamp(10px, 2.6vw, 12px);
  color: rgba(23, 20, 26, 0.68);
}

.rp.is-demo .rp__chip {
  animation-name: rpHop;
  animation-duration: 2s;
  animation-timing-function: steps(1, end);
  animation-iteration-count: infinite;
  animation-delay: calc(var(--i) * 400ms);
}

@keyframes rpHop {
  0% {
    border-color: #2f6df6;
    background-color: #2f6df6;
    color: #ffffff;
  }
  20% {
    border-color: rgba(23, 20, 26, 0.18);
    background-color: transparent;
    color: #17141a;
  }
  100% {
    border-color: rgba(23, 20, 26, 0.18);
    background-color: transparent;
    color: #17141a;
  }
}
.rp.is-demo .rp__bell {
  animation-name: rpRing;
  animation-duration: 2s;
  animation-timing-function: cubic-bezier(0.2, 0.8, 0.2, 1);
  animation-iteration-count: infinite;
}

@keyframes rpRing {
  0% {
    transform: rotate(0deg);
  }
  10% {
    transform: rotate(-14deg);
  }
  24% {
    transform: rotate(12deg);
  }
  38% {
    transform: rotate(-8deg);
  }
  52% {
    transform: rotate(6deg);
  }
  70% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(0deg);
  }
}
.rp.is-demo .rp__knob {
  animation-name: rpKnob;
  animation-duration: 2s;
  animation-timing-function: cubic-bezier(0.2, 0.8, 0.2, 1);
  animation-iteration-count: infinite;
}

@keyframes rpKnob {
  0% {
    transform: translateX(18px);
  }
  46% {
    transform: translateX(18px);
  }
  58% {
    transform: translateX(0);
  }
  84% {
    transform: translateX(18px);
  }
  100% {
    transform: translateX(18px);
  }
}
@media (max-width: 340px) {
  .rp__card {
    padding: 12px;
    gap: 8px;
  }
  .rp__chips {
    gap: 4px;
  }
  .rp__chip {
    padding: 4px 8px;
  }
  .rp__switch {
    width: 32px;
    height: 18px;
  }
  .rp__knob {
    width: 12px;
    height: 12px;
  }
  .rp__switch[aria-checked=true] .rp__knob {
    transform: translateX(14px);
  }
}
@media (prefers-reduced-motion: reduce) {
  .rp.is-demo .rp__chip,
  .rp.is-demo .rp__bell,
  .rp.is-demo .rp__knob {
    animation: none !important;
  }
  .rp.is-demo .rp__bell {
    transform: none !important;
  }
}
