.ah-doc-stage {
  position: relative;
  width: 100%;
  background:
    repeating-conic-gradient(#1e293b 0% 25%, #0f172a 0% 50%) 50% / 16px 16px;
  border-radius: 10px;
  overflow: hidden;
  touch-action: none;
  user-select: none;
}

.ah-doc-stage canvas {
  display: block;
  width: 100%;
  height: auto;
  vertical-align: middle;
  cursor: crosshair;
}

.ah-doc-handle {
  position: absolute;
  width: 18px;
  height: 18px;
  margin: -9px 0 0 -9px;
  border-radius: 50%;
  border: 2px solid #fff;
  background: #3d348b;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.45), 0 4px 12px rgba(0, 0, 0, 0.35);
  cursor: grab;
  z-index: 2;
}

.ah-doc-handle:active,
.ah-doc-handle.is-dragging {
  cursor: grabbing;
  transform: scale(1.15);
}

.ah-doc-handle::after {
  content: attr(data-label);
  position: absolute;
  left: 50%;
  top: -1.35rem;
  transform: translateX(-50%);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #e2e8f0;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
  pointer-events: none;
  white-space: nowrap;
}

.ah-doc-result {
  max-width: 100%;
  max-height: 420px;
  object-fit: contain;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.ah-doc-busy {
  opacity: 0.7;
  pointer-events: none;
}
