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

.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, #201c2c, #17141a 70%);
}

.grid {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 20px 20px;
}

.draggable {
  position: absolute;
  top: 50%;
  left: 50%;
  margin-top: -34px;
  margin-left: -48px;
  width: 96px;
  height: 68px;
  cursor: grab;
  touch-action: none;
  will-change: transform;
}
.draggable.isDragging {
  cursor: grabbing;
}
.draggable:focus-visible .selectBox {
  outline: 2px solid #b9a0ff;
  outline-offset: 3px;
}

.selectBox {
  position: relative;
  width: 100%;
  height: 100%;
  border: 1px dashed rgba(255, 247, 230, 0.4);
  border-radius: 8px;
  box-sizing: border-box;
  display: grid;
  place-items: center;
}

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

.readout {
  position: absolute;
  left: 12px;
  bottom: 12px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(5, 4, 9, 0.5);
  color: rgba(255, 247, 230, 0.82);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

@media (max-width: 340px) {
  .scene {
    width: 220px;
    height: 124px;
  }
  .draggable {
    width: 68px;
    height: 48px;
    margin-top: -24px;
    margin-left: -34px;
  }
  .subjectShape {
    width: 52px;
    height: 34px;
  }
  .readout {
    font-size: 9px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .draggable {
    transition: none;
  }
}
