@charset "UTF-8";
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);
}

@property --h {
  syntax: "<integer>";
  inherits: true;
  initial-value: 212;
}
.hw {
  box-sizing: border-box;
  display: grid;
  justify-items: center;
  width: 288px;
  max-width: 100%;
  padding: 12px;
  border-radius: 16px;
  background: #17141a;
  color: #fff7e6;
  font-family: inherit;
}

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

.hw__ring {
  position: relative;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  cursor: pointer;
  touch-action: none;
  background-image: conic-gradient(from 90deg, #ff0000, #ffff00, #00ff00, #00ffff, #0000ff, #ff00ff, #ff0000);
}

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

.hw__core {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background: hsl(var(--h), 92%, 52%);
  box-shadow: 0 0 0 4px #17141a;
}

.hw__arm {
  position: absolute;
  inset: 0;
  transform: rotate(calc((var(--h) + 90) * 1deg));
}

.hw__arm::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff7e6;
  box-shadow: 0 6px 12px rgba(23, 20, 26, 0.32);
  transform: translate(-50%, -50%) translateY(-51px);
}

.hw__read {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 4px 0 0;
}

.hw__cap {
  font-size: 11px;
  font-weight: 500;
  line-height: 1.2;
  color: rgba(255, 247, 230, 0.66);
}

.hw__val {
  counter-set: ch calc(var(--h));
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.04em;
}

.hw__val::after {
  content: counter(ch) "°";
}

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

@keyframes hwSpin {
  0% {
    --h: 212;
  }
  45% {
    --h: 344;
  }
  90%, 100% {
    --h: 212;
  }
}
@media (prefers-reduced-motion: reduce) {
  .hw.is-demo {
    animation: none !important;
  }
}
