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

.scene {
  position: relative;
  width: 320px;
  height: 180px;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 14px 24px rgba(23, 20, 26, 0.32);
  background: linear-gradient(160deg, #ffd9c4, #ff4d1f 90%);
}

.frame {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 84px;
  height: 84px;
  margin: -42px;
}

.rotator {
  position: relative;
  width: 100%;
  height: 100%;
  transform-origin: 50% 50%;
  will-change: transform;
}

.subjectShape {
  position: absolute;
  inset: 8px;
  border-radius: 8px;
  background: linear-gradient(135deg, #b9a0ff, #ff9ebb);
  box-shadow: 0 6px 12px rgba(23, 20, 26, 0.32);
}

.stick {
  position: absolute;
  left: 50%;
  top: -22px;
  width: 2px;
  height: 22px;
  margin-left: -1px;
  background: rgba(23, 20, 26, 0.55);
}

.handle {
  position: absolute;
  left: 50%;
  top: -30px;
  width: 16px;
  height: 16px;
  margin: -8px 0 0 -8px;
  border-radius: 999px;
  background: #fff7e6;
  border: 3px solid #17141a;
  cursor: grab;
  touch-action: none;
}
.handle:active {
  cursor: grabbing;
}
.handle:focus-visible {
  outline: 2px solid #ff9ebb;
  outline-offset: 3px;
}

.readout {
  position: absolute;
  left: 12px;
  bottom: 12px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(23, 20, 26, 0.78);
  color: #fff7e6;
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 340px) {
  .scene {
    width: 220px;
    height: 124px;
  }
  .frame {
    width: 62px;
    height: 62px;
    margin: -31px;
  }
  .stick {
    top: -16px;
    height: 16px;
  }
  .handle {
    top: -22px;
    width: 13px;
    height: 13px;
    margin: -6px 0 0 -6px;
  }
  .readout {
    font-size: 9px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .handle {
    transition: none;
  }
}
