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

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

.pw__col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.pw__assembly {
  position: relative;
  width: 150px;
  height: 150px;
}

.pw__bezel {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  pointer-events: none;
  background: linear-gradient(145deg, rgba(255, 247, 230, 0.38), rgba(255, 247, 230, 0.1) 42%, rgba(23, 20, 26, 0.9) 78%), #17141a;
  box-shadow: 0 22px 26px -8px rgba(0, 0, 0, 0.8), 0 2px 3px rgba(255, 247, 230, 0.18), inset 0 1px 0 rgba(255, 247, 230, 0.4);
}

.pw__groove {
  position: absolute;
  inset: 12px;
  border-radius: 50%;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.85), rgba(0, 0, 0, 0.55));
  box-shadow: inset 0 4px 8px rgba(0, 0, 0, 0.9), inset 0 -1px 0 rgba(255, 247, 230, 0.14);
}

.pw__cap {
  position: absolute;
  inset: 30px;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  background: linear-gradient(180deg, rgba(255, 247, 230, 0.22), rgba(255, 247, 230, 0.02) 34%, rgba(23, 20, 26, 0.5) 88%), #17141a;
  box-shadow: 0 6px 10px rgba(0, 0, 0, 0.66), inset 0 1px 0 rgba(255, 247, 230, 0.3), inset 0 -2px 4px rgba(0, 0, 0, 0.6);
  transform: translateY(0) scale(1);
  transition: transform 220ms cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 220ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.pw__cap:active {
  transform: translateY(4px) scale(0.98);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 247, 230, 0.22), inset 0 -2px 4px rgba(0, 0, 0, 0.6);
}

.pw__cap:focus-visible {
  outline: 2px solid #ffd23f;
  outline-offset: 3px;
}

.pw__mark {
  width: 34px;
  height: 34px;
  color: #9a93a6;
  transition: color 220ms ease-out;
}

.pw__led {
  position: absolute;
  inset: 22px;
  z-index: 2;
  border-radius: 50%;
  pointer-events: none;
  box-shadow: inset 0 0 0 3px rgba(255, 210, 63, 0.14);
  transition: box-shadow 220ms ease-out;
}

.pw__shade {
  position: absolute;
  inset: 25px;
  z-index: 3;
  border-radius: 50%;
  pointer-events: none;
  box-shadow: inset 0 7px 9px rgba(0, 0, 0, 0.75);
  opacity: 0.3;
  transition: opacity 220ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.pw__cap:active ~ .pw__shade {
  opacity: 0.8;
}

.pw.is-on .pw__led {
  box-shadow: inset 0 0 0 3px #ffd23f, 0 0 16px rgba(255, 210, 63, 0.6), 0 0 34px rgba(255, 210, 63, 0.28);
  transition: box-shadow 300ms ease-out 220ms;
}

.pw.is-on .pw__mark {
  color: #ffd23f;
  transition: color 300ms ease-out 220ms;
}

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

.pw__wordOn, .pw__wordOff {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: clamp(12px, 3vw, 14px);
  line-height: 1;
  color: #fff7e6;
}

.pw__wordOn {
  display: none;
  color: #ffd23f;
}

.pw.is-on .pw__wordOn {
  display: flex;
}

.pw.is-on .pw__wordOff {
  display: none;
}

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

@keyframes pwPress {
  0%, 6% {
    transform: translateY(0) scale(1);
  }
  11% {
    transform: translateY(4px) scale(0.98);
  }
  16% {
    transform: translateY(0) scale(1);
  }
  57% {
    transform: translateY(0) scale(1);
  }
  62% {
    transform: translateY(4px) scale(0.98);
  }
  68%, 100% {
    transform: translateY(0) scale(1);
  }
}
.pw.is-demo .pw__shade {
  animation-name: pwShade;
  animation-duration: 2s;
  animation-timing-function: steps(1, end);
  animation-iteration-count: infinite;
}

@keyframes pwShade {
  0% {
    opacity: 0.3;
  }
  7% {
    opacity: 0.8;
  }
  16% {
    opacity: 0.3;
  }
  57% {
    opacity: 0.8;
  }
  68% {
    opacity: 0.3;
  }
  100% {
    opacity: 0.3;
  }
}
.pw.is-demo .pw__led {
  animation-name: pwLed;
  animation-duration: 2s;
  animation-timing-function: ease;
  animation-iteration-count: infinite;
}

@keyframes pwLed {
  0%, 16% {
    box-shadow: inset 0 0 0 3px rgba(255, 210, 63, 0.14);
  }
  28%, 58% {
    box-shadow: inset 0 0 0 3px #ffd23f, 0 0 16px rgba(255, 210, 63, 0.6), 0 0 34px rgba(255, 210, 63, 0.28);
  }
  63%, 100% {
    box-shadow: inset 0 0 0 3px rgba(255, 210, 63, 0.14);
  }
}
.pw.is-demo .pw__mark {
  animation-name: pwMark;
  animation-duration: 2s;
  animation-timing-function: ease;
  animation-iteration-count: infinite;
}

@keyframes pwMark {
  0%, 16% {
    color: #9a93a6;
  }
  28%, 58% {
    color: #ffd23f;
  }
  63%, 100% {
    color: #9a93a6;
  }
}
.pw.is-demo .pw__wordOn {
  display: flex;
  opacity: 0;
}

.pw.is-demo .pw__wordOff {
  opacity: 1;
}

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

@keyframes pwWordOn {
  0%, 18% {
    opacity: 0;
  }
  24% {
    opacity: 1;
  }
  60% {
    opacity: 0;
  }
  100% {
    opacity: 0;
  }
}
.pw.is-demo .pw__wordOff {
  animation-name: pwWordOff;
  animation-duration: 2s;
  animation-timing-function: steps(1, end);
  animation-iteration-count: infinite;
}

@keyframes pwWordOff {
  0%, 18% {
    opacity: 1;
  }
  24% {
    opacity: 0;
  }
  60% {
    opacity: 1;
  }
  100% {
    opacity: 1;
  }
}
@media (max-width: 340px) {
  .pw__col {
    gap: 8px;
  }
  .pw__assembly {
    width: 118px;
    height: 118px;
  }
  .pw__groove {
    inset: 10px;
  }
  .pw__cap {
    inset: 24px;
  }
  .pw__led {
    inset: 18px;
  }
  .pw__shade {
    inset: 20px;
  }
  .pw__mark {
    width: 26px;
    height: 26px;
  }
  .pw__state {
    width: 48px;
    height: 14px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .pw .pw__cap {
    transition: none !important;
  }
  .pw .pw__shade {
    transition: none !important;
  }
  .pw.is-demo .pw__cap {
    animation: none !important;
    transform: translateY(0) scale(1) !important;
  }
  .pw.is-demo .pw__shade {
    animation: none !important;
    opacity: 0.3 !important;
  }
  .pw.is-demo .pw__led {
    animation: none !important;
  }
  .pw.is-demo .pw__mark {
    animation: none !important;
  }
  .pw.is-demo .pw__wordOn {
    animation: none !important;
    opacity: 0 !important;
  }
  .pw.is-demo .pw__wordOff {
    animation: none !important;
    opacity: 1 !important;
  }
}
