html, body {
  margin: 0;
  overflow: hidden;
}

.stage {
  box-sizing: border-box;
  min-height: 100vh;
  display: grid;
  place-items: center;
  margin: 0;
  background: #ffd23f;
  font-family: -apple-system, "Segoe UI", "Noto Sans KR", sans-serif;
  padding: clamp(8px, 4vw, 24px);
}

.rs {
  display: grid;
  place-items: center;
  width: 100%;
}

.rs__plate {
  box-sizing: border-box;
  width: clamp(136px, 44vw, 164px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 12px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(23, 20, 26, 0.06), rgba(23, 20, 26, 0) 26%, rgba(23, 20, 26, 0) 74%, rgba(23, 20, 26, 0.1)), #ffffff;
  box-shadow: 0 14px 24px rgba(23, 20, 26, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.rs__head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  height: 18px;
}

.rs__lamp {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex: 0 0 auto;
  background: rgba(23, 20, 26, 0.16);
  box-shadow: inset 0 1px 3px rgba(23, 20, 26, 0.5), 0 0 0 3px rgba(23, 20, 26, 0.82);
}

.rs__onWord {
  font-weight: 800;
  font-size: clamp(10px, 2.6vw, 12px);
  line-height: 1;
  letter-spacing: 0.2em;
  color: rgba(23, 20, 26, 0.74);
}

.rs__bezel {
  padding: 4px;
  border-radius: 12px;
  background: rgba(23, 20, 26, 0.26);
  box-shadow: inset 0 3px 6px rgba(23, 20, 26, 0.55), 0 1px 0 rgba(255, 255, 255, 0.8);
}

.rs__rocker {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
  border: 0;
  width: 84px;
  height: 132px;
  background: transparent;
  cursor: pointer;
}

.rs__rocker:focus-visible {
  outline: 2px solid #17141a;
  outline-offset: 2px;
  border-radius: 12px;
}

.rs__cap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 84px;
  height: 66px;
  transition: transform 220ms cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 220ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.rs__capTop {
  border-radius: 8px 8px 0 0;
  background: linear-gradient(180deg, #ffffff, rgba(23, 20, 26, 0.1)), #ffffff;
  transform: translateY(-3px);
  box-shadow: inset 0 -3px 6px rgba(23, 20, 26, 0.1), inset 0 2px 0 rgba(255, 255, 255, 0.85);
}

.rs__capBottom {
  border-radius: 0 0 8px 8px;
  background: linear-gradient(180deg, rgba(23, 20, 26, 0.05), rgba(23, 20, 26, 0.17)), #ffffff;
  transform: translateY(3px);
  box-shadow: inset 0 4px 8px rgba(23, 20, 26, 0.32), inset 0 -1px 0 rgba(255, 255, 255, 0.4);
}

.rs__io {
  font-weight: 800;
  font-size: 13px;
  line-height: 1;
  color: rgba(23, 20, 26, 0.76);
}

.rs.is-on .rs__capTop {
  transform: translateY(3px);
  box-shadow: inset 0 4px 8px rgba(23, 20, 26, 0.32), inset 0 -1px 0 rgba(255, 255, 255, 0.4);
}

.rs.is-on .rs__capBottom {
  transform: translateY(-3px);
  box-shadow: inset 0 -3px 6px rgba(23, 20, 26, 0.1), inset 0 2px 0 rgba(255, 255, 255, 0.85);
}

.rs.is-on .rs__lamp {
  background: #ff4d1f;
  box-shadow: 0 0 12px rgba(255, 77, 31, 0.8), 0 0 0 3px rgba(23, 20, 26, 0.82);
}

.rs.is-on .rs__onWord {
  color: #c93000;
}

.rs__state {
  position: relative;
  margin: 0;
  width: 60px;
  height: 16px;
}

.rs__wordOff, .rs__wordOn {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: clamp(11px, 2.8vw, 13px);
  line-height: 1;
}

.rs__wordOff {
  color: #17141a;
}

.rs__wordOn {
  display: none;
}

.rs.is-on .rs__wordOn {
  display: flex;
}

.rs.is-on .rs__wordOff {
  display: none;
}

.rs.is-demo .rs__capTop {
  animation-name: rsPressTop;
  animation-duration: 2s;
  animation-timing-function: cubic-bezier(0.2, 0.8, 0.2, 1);
  animation-iteration-count: infinite;
}

@keyframes rsPressTop {
  0% {
    transform: translateY(-3px);
    box-shadow: inset 0 -3px 6px rgba(23, 20, 26, 0.1), inset 0 2px 0 rgba(255, 255, 255, 0.85);
  }
  12% {
    transform: translateY(4px);
    box-shadow: inset 0 5px 9px rgba(23, 20, 26, 0.38), inset 0 -1px 0 rgba(255, 255, 255, 0.35);
  }
  18% {
    transform: translateY(3px);
    box-shadow: inset 0 4px 8px rgba(23, 20, 26, 0.32), inset 0 -1px 0 rgba(255, 255, 255, 0.4);
  }
  46% {
    transform: translateY(3px);
    box-shadow: inset 0 4px 8px rgba(23, 20, 26, 0.32), inset 0 -1px 0 rgba(255, 255, 255, 0.4);
  }
  58% {
    transform: translateY(-4px);
    box-shadow: inset 0 -4px 7px rgba(23, 20, 26, 0.08), inset 0 3px 0 rgba(255, 255, 255, 0.9);
  }
  64% {
    transform: translateY(-3px);
    box-shadow: inset 0 -3px 6px rgba(23, 20, 26, 0.1), inset 0 2px 0 rgba(255, 255, 255, 0.85);
  }
  100% {
    transform: translateY(-3px);
    box-shadow: inset 0 -3px 6px rgba(23, 20, 26, 0.1), inset 0 2px 0 rgba(255, 255, 255, 0.85);
  }
}
.rs.is-demo .rs__capBottom {
  animation-name: rsPressBottom;
  animation-duration: 2s;
  animation-timing-function: cubic-bezier(0.2, 0.8, 0.2, 1);
  animation-iteration-count: infinite;
}

@keyframes rsPressBottom {
  0% {
    transform: translateY(3px);
    box-shadow: inset 0 4px 8px rgba(23, 20, 26, 0.32), inset 0 -1px 0 rgba(255, 255, 255, 0.4);
  }
  12% {
    transform: translateY(-4px);
    box-shadow: inset 0 -4px 7px rgba(23, 20, 26, 0.08), inset 0 3px 0 rgba(255, 255, 255, 0.9);
  }
  18% {
    transform: translateY(-3px);
    box-shadow: inset 0 -3px 6px rgba(23, 20, 26, 0.1), inset 0 2px 0 rgba(255, 255, 255, 0.85);
  }
  46% {
    transform: translateY(-3px);
    box-shadow: inset 0 -3px 6px rgba(23, 20, 26, 0.1), inset 0 2px 0 rgba(255, 255, 255, 0.85);
  }
  58% {
    transform: translateY(4px);
    box-shadow: inset 0 5px 9px rgba(23, 20, 26, 0.38), inset 0 -1px 0 rgba(255, 255, 255, 0.35);
  }
  64% {
    transform: translateY(3px);
    box-shadow: inset 0 4px 8px rgba(23, 20, 26, 0.32), inset 0 -1px 0 rgba(255, 255, 255, 0.4);
  }
  100% {
    transform: translateY(3px);
    box-shadow: inset 0 4px 8px rgba(23, 20, 26, 0.32), inset 0 -1px 0 rgba(255, 255, 255, 0.4);
  }
}
.rs.is-demo .rs__lamp {
  animation-name: rsLamp;
  animation-duration: 2s;
  animation-timing-function: steps(1, end);
  animation-iteration-count: infinite;
}

@keyframes rsLamp {
  0% {
    background: rgba(23, 20, 26, 0.16);
    box-shadow: inset 0 1px 3px rgba(23, 20, 26, 0.5), 0 0 0 3px rgba(23, 20, 26, 0.82);
  }
  16% {
    background: #ff4d1f;
    box-shadow: 0 0 12px rgba(255, 77, 31, 0.8), 0 0 0 3px rgba(23, 20, 26, 0.82);
  }
  62% {
    background: rgba(23, 20, 26, 0.16);
    box-shadow: inset 0 1px 3px rgba(23, 20, 26, 0.5), 0 0 0 3px rgba(23, 20, 26, 0.82);
  }
  100% {
    background: rgba(23, 20, 26, 0.16);
    box-shadow: inset 0 1px 3px rgba(23, 20, 26, 0.5), 0 0 0 3px rgba(23, 20, 26, 0.82);
  }
}
.rs.is-demo .rs__onWord {
  animation-name: rsOnWord;
  animation-duration: 2s;
  animation-timing-function: steps(1, end);
  animation-iteration-count: infinite;
}

@keyframes rsOnWord {
  0% {
    color: rgba(23, 20, 26, 0.74);
  }
  16% {
    color: #c93000;
  }
  62% {
    color: rgba(23, 20, 26, 0.74);
  }
  100% {
    color: rgba(23, 20, 26, 0.74);
  }
}
.rs.is-demo .rs__wordOn {
  display: flex;
  opacity: 0;
}

.rs.is-demo .rs__wordOff {
  opacity: 1;
}

.rs.is-demo .rs__wordOn {
  animation-name: rsWordOn;
  animation-duration: 2s;
  animation-timing-function: steps(1, end);
  animation-iteration-count: infinite;
}

@keyframes rsWordOn {
  0% {
    opacity: 0;
  }
  16% {
    opacity: 1;
  }
  62% {
    opacity: 0;
  }
  100% {
    opacity: 0;
  }
}
.rs.is-demo .rs__wordOff {
  animation-name: rsWordOff;
  animation-duration: 2s;
  animation-timing-function: steps(1, end);
  animation-iteration-count: infinite;
}

@keyframes rsWordOff {
  0% {
    opacity: 1;
  }
  16% {
    opacity: 0;
  }
  62% {
    opacity: 1;
  }
  100% {
    opacity: 1;
  }
}
@media (max-width: 340px) {
  .rs__plate {
    gap: 4px;
    padding: 8px;
  }
  .rs__head {
    height: 14px;
  }
  .rs__rocker {
    width: 68px;
    height: 104px;
  }
  .rs__cap {
    width: 68px;
    height: 52px;
  }
  .rs__io {
    font-size: 11px;
  }
  .rs__state {
    height: 14px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .rs.is-demo .rs__capTop {
    animation: none !important;
    transform: translateY(-3px) !important;
  }
  .rs.is-demo .rs__capBottom {
    animation: none !important;
    transform: translateY(3px) !important;
  }
  .rs.is-demo .rs__lamp {
    animation: none !important;
  }
  .rs.is-demo .rs__onWord {
    animation: none !important;
  }
  .rs.is-demo .rs__wordOn {
    animation: none !important;
    opacity: 0 !important;
  }
  .rs.is-demo .rs__wordOff {
    animation: none !important;
    opacity: 1 !important;
  }
}
