.scan-drop { padding: 16px; border: 1px dashed #a1a583; border-radius: 14px; background: #f5f7ec; }
.scan-drop p { margin: 0 0 12px; }
.scan-drop p:last-child { margin: 12px 0 0; }
.scan-workspace fieldset { border: 0; padding: 10px 0 0; margin: 14px 0 0; min-width: 0; border-top: 1px solid #d9d4c9; }
.scan-workspace legend { font-weight: 700; padding: 0 7px 0 0; }
.scan-workspace fieldset label { display: inline-block; margin-right: 6px; }
.scan-workspace #quality-label { display: flex; align-items: center; gap: 6px; margin: 8px 0; }
.scan-stage { position: relative; width: fit-content; max-width: 100%; margin: 12px auto; background: #f5f5f2; }
.scan-stage img { display: block; max-width: 100%; max-height: min(70vh, 660px); user-select: none; width: auto; height: auto; }
.scan-stage svg, .scan-handles { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.scan-stage polygon { fill: #214b3b33; stroke: #fff; stroke-width: 2px; stroke-dasharray: 4 4; pointer-events: all; cursor: pointer; vector-effect: non-scaling-stroke; touch-action: none; }
.scan-stage polygon.is-current { fill: #e7bd5240; stroke: #f7ca40; stroke-width: 3px; stroke-dasharray: none; cursor: move; }
.scan-stage text { font-weight: 900; fill: white; stroke: #152a22; stroke-width: 3; paint-order: stroke; pointer-events: none; }
.scan-handles .scan-handle { position: absolute; translate: -50% -50%; width: 44px; height: 44px; min-height: 44px; padding: 0; border: 0; border-radius: 50%; background: transparent; pointer-events: auto; cursor: grab; touch-action: none; }
.scan-handle span { display: grid; place-items: center; width: 25px; height: 25px; background: #f7ca40; border: 2px solid #171b17; border-radius: 50%; color: #171b17; font-size: 12px; }
.scan-handle:active { cursor: grabbing; }
.scan-photos { display: flex; flex-wrap: wrap; gap: 8px; padding-block: 4px 12px; }
.scan-photos button[aria-pressed=true] { border-color: #2a634b; background: #dceee3; }
.scan-frame-panel { display: grid; grid-template-columns: minmax(0, .75fr) minmax(0, 1fr); gap: 18px; border-top: 1px solid #d9d4c9; padding: 16px 0 0; }
.scan-frame-panel h3 { margin: 0 0 6px; }
.scan-frame-panel canvas { display: block; width: auto; max-width: 100%; max-height: 172px; background: #f4f6f2; }
.scan-frame-panel input[type=text] { display: block; width: 100%; }
.scan-frame-panel summary { min-height: 44px; cursor: pointer; padding: 9px 0; font-weight: 650; }
.scan-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.scan-fields label { display: grid; gap: 2px; }
.scan-fields fieldset { margin: 0; }
@media (max-width: 530px) { .scan-frame-panel { grid-template-columns: 1fr; } }
