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

.pd {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  max-width: 424px;
}

.pd__hint {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  font-weight: 700;
  font-size: clamp(10px, 2.8vw, 12px);
  color: #17141a;
}

.pd__ico {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  color: #17141a;
}

.pd__field {
  position: relative;
  height: 176px;
  border-radius: 16px;
  background: rgba(23, 20, 26, 0.42);
  box-shadow: inset 0 0 0 1px rgba(255, 247, 230, 0.22);
  cursor: grab;
  overflow: hidden;
  touch-action: none;
}

.pd__field:focus-visible {
  outline: 2px solid #fff7e6;
  outline-offset: 2px;
}

.pd__pivot {
  position: absolute;
  left: 50%;
  top: 0;
  width: 20px;
  height: 20px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: #fff7e6;
  box-shadow: 0 6px 12px rgba(23, 20, 26, 0.32);
}

.pd__arm {
  position: absolute;
  left: 50%;
  top: 10px;
  width: 0;
  height: 118px;
  transform-origin: 50% 0;
}

.pd__rod {
  position: absolute;
  left: -1px;
  top: 0;
  width: 2px;
  height: 100%;
  background: rgba(255, 247, 230, 0.8);
}

.pd__bob {
  position: absolute;
  left: -16px;
  bottom: -12px;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: #fff7e6;
  color: #ff4d1f;
  cursor: grab;
  padding: 0;
  box-shadow: 0 6px 12px rgba(23, 20, 26, 0.32);
  touch-action: none;
}

.pd__bob:active {
  cursor: grabbing;
}

.pd__bobIco {
  width: 16px;
  height: 16px;
  pointer-events: none;
}

.pd__angle {
  position: absolute;
  right: 8px;
  bottom: 0;
  margin: 0;
  font-weight: 800;
  font-size: clamp(10px, 2.6vw, 11px);
  color: #fff7e6;
}

.pd__bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.pd__pull, .pd__reset {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 0;
  border-radius: 999px;
  padding: 4px 12px;
  background: #fff7e6;
  color: #17141a;
  cursor: pointer;
  font-family: inherit;
  font-weight: 800;
  font-size: clamp(10px, 2.6vw, 11px);
  line-height: 1;
}

.pd.is-demo .pd__arm {
  animation-name: pdSwing;
  animation-duration: 2s;
  animation-timing-function: ease-in-out;
  animation-iteration-count: infinite;
}

@keyframes pdSwing {
  0% {
    transform: rotate(26deg);
  }
  25% {
    transform: rotate(0deg);
  }
  50% {
    transform: rotate(-26deg);
  }
  75% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(26deg);
  }
}
.pd__angleLoop {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center end;
  visibility: hidden;
}

.pd__angleLoop i {
  grid-area: 1/1;
  font-style: normal;
  visibility: hidden;
}

.pd.is-demo .pd__angleVal {
  color: transparent;
}

.pd.is-demo .pd__angleLoop {
  visibility: visible;
}

.pd.is-demo .pd__angleLoop i {
  animation-name: pdAngle;
  animation-duration: 2s;
  animation-timing-function: steps(1, end);
  animation-iteration-count: infinite;
}

.pd.is-demo .pd__angleLoop i:nth-child(2) {
  animation-delay: 500ms;
}

.pd.is-demo .pd__angleLoop i:nth-child(3) {
  animation-delay: 1000ms;
}

.pd.is-demo .pd__angleLoop i:nth-child(4) {
  animation-delay: 1500ms;
}

@keyframes pdAngle {
  0%, 24% {
    visibility: visible;
  }
  25%, 100% {
    visibility: hidden;
  }
}
@media (max-width: 340px) {
  .pd {
    gap: 8px;
  }
  .pd__field {
    height: 104px;
  }
  .pd__arm {
    height: 64px;
    top: 8px;
  }
  .pd__bob {
    width: 26px;
    height: 26px;
    left: -13px;
    bottom: -8px;
  }
  .pd__bobIco {
    width: 13px;
    height: 13px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .pd.is-demo .pd__arm {
    animation: none !important;
    transform: rotate(0deg) !important;
  }
  .pd.is-demo .pd__angleVal {
    color: #fff7e6 !important;
  }
  .pd.is-demo .pd__angleLoop {
    visibility: hidden !important;
  }
  .pd.is-demo .pd__angleLoop i {
    animation: none !important;
  }
}
