[hidden]{display:none!important}
.scanner-footer{flex-wrap:wrap}
dialog.scanner-dialog{width:min(900px,calc(100vw - 24px));max-height:calc(100dvh - 24px)}
.scanner-dialog .dialog-head h2{font-size:1.3rem}
.scan-session-options{display:flex;align-items:center;gap:24px;padding:15px 23px;background:#f5f8fd;border-bottom:1px solid var(--line);flex-wrap:wrap}
.scan-session-options .check-row{margin:0;font-size:.95rem;white-space:nowrap}
.scan-session-options label{font-size:.875rem}
.scan-session-options select{margin:4px 0 0;padding:7px 10px;min-height:38px}
.scan-session-options #vision-state{margin-left:auto}
.live-scanner{height:min(48dvh,450px);position:relative;background:#0b1728;display:grid;place-items:center;overflow:hidden}
.live-scanner video,.live-scanner canvas{width:100%;height:100%;object-fit:contain;position:absolute;inset:0}
.live-scanner canvas{pointer-events:none}
.live-scanner.mirrored-preview video,.live-scanner.mirrored-preview canvas{transform:scaleX(-1)}
.scan-live-status{position:absolute;bottom:12px;left:12px;right:12px;z-index:2;max-width:620px;margin:auto;padding:9px 13px;border-radius:9px;background:#0b1728e8;color:#fff;text-align:center;font-size:.875rem;line-height:1.4;pointer-events:none}
.scan-camera-placeholder{color:#bcd0ea;padding:30px;text-align:center;z-index:1}
.scan-status{padding:13px 23px;font-size:1rem;line-height:1.5;background:#edf4ff;color:#224877;border-bottom:1px solid #dae5f5;min-height:50px}
.scan-detector-recovery{padding:12px 23px;background:#edf4ff;border-bottom:1px solid #dae5f5}
.scan-tray{display:flex;gap:10px;overflow:auto;padding:15px 23px;align-items:center;background:#f8faff;scrollbar-width:thin}
.scan-shot{padding:5px;border:2px solid #dce4f0;border-radius:8px;background:white;flex-shrink:0;width:96px;text-align:center;color:#40516c}
.scan-shot:hover,.scan-shot.selected{border-color:var(--blue)}
.scan-shot img{display:block;width:82px;height:53px;object-fit:contain;background:#f1f4f9}
.scan-shot span{display:block;margin-top:4px;font-size:.8rem}
.scan-help{padding:12px 23px;font-size:.875rem}
.scan-discard{padding:18px 23px;background:#fff5e4;border-block:1px solid #efd3a5}
.scan-discard p{margin-bottom:12px}.scan-discard .btn{margin-right:10px}
.scanner-dialog .scan-actions{flex-wrap:wrap}.scanner-dialog .scan-actions .btn{min-height:44px}
.crop-editor{padding:18px 23px;background:#f5f8fc}
.crop-instructions{margin-bottom:14px}.crop-instructions strong{font-size:1rem}.crop-instructions p{margin-top:6px;line-height:1.5;font-size:.875rem}
.crop-surface{position:relative;max-width:620px;margin:0 auto;touch-action:none;user-select:none;line-height:0}
.crop-surface img{width:100%;height:auto;display:block;max-height:none}
.crop-surface svg{position:absolute;inset:0;width:100%;height:100%;overflow:visible}
.crop-polygon{fill:#285bea18;stroke:#5ef0b0;stroke-width:3;vector-effect:non-scaling-stroke;pointer-events:none}
.crop-surface circle{fill:#fff;stroke:#235cea;stroke-width:4;vector-effect:non-scaling-stroke;cursor:move;touch-action:none}
.crop-surface circle:focus{fill:#a6c5ff;stroke:#10233f;outline:none}
.invalid-crop .crop-polygon{stroke:#c33444;fill:#d5404030}
.crop-tools{display:flex;gap:9px;align-items:center;flex-wrap:wrap;margin-top:16px}
.crop-tools .btn{font-size:.875rem}.crop-tools #crop-rotation{margin-left:auto;color:var(--muted)}
@media(max-width:600px){.scan-session-options{padding:12px 15px;gap:12px 22px}.scan-session-options #vision-state{width:100%;margin-left:0}.scan-status{padding:12px 15px;font-size:.95rem}.scan-tray{padding:12px 15px}.scan-help{padding:10px 15px}.crop-editor{padding:14px 15px}.crop-tools .btn{font-size:.8125rem;padding:9px}.scanner-dialog .scan-actions .btn{font-size:.85rem}.crop-surface circle{r:27px}.scan-shot{width:84px}.scan-shot img{width:70px;height:48px}.live-scanner{height:37dvh}}

.crop-surface{width:fit-content;max-width:100%}.crop-surface img{width:auto;max-width:100%;max-height:42dvh;height:auto}
