.ocr-dialog{width:min(1120px,calc(100vw - 28px));max-height:92vh;padding:20px;border:1px solid #cbd5e1;border-radius:14px;color:#172033;overflow:auto}.ocr-dialog::backdrop{background:rgba(15,23,42,.55)}.ocr-heading{display:flex;align-items:center;justify-content:space-between;gap:16px}.ocr-heading h2{margin:0}.ocr-dialog p{line-height:1.5}.ocr-controls{display:flex;align-items:end;gap:12px;flex-wrap:wrap}.ocr-controls label{display:grid;gap:5px}.ocr-controls select{max-width:100%;min-height:40px}.ocr-dialog button{min-height:40px}.ocr-dialog progress{width:100%;margin-top:16px}.ocr-review-actions{display:flex;gap:8px;flex-wrap:wrap;margin:12px 0}.ocr-review-actions[hidden]{display:none}.ocr-page{border-top:1px solid #cbd5e1;padding-top:8px}.ocr-page-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:18px}.ocr-preview{position:relative;align-self:start;background:#eee;border:1px solid #cbd5e1}.ocr-preview canvas{width:100%;height:auto;display:block}.ocr-preview-box{position:absolute;outline:1px solid #147AD6;pointer-events:none}.ocr-lines{max-height:540px;overflow:auto;display:grid;gap:12px;align-content:start}.ocr-line{border:1px solid #cbd5e1;border-radius:8px;padding:10px}.ocr-line label{display:flex;align-items:center;gap:8px;font-size:.85rem}.ocr-line textarea{box-sizing:border-box;width:100%;margin-top:8px;min-height:64px;resize:vertical;font:inherit}.ocr-low-confidence{border-color:#b45309;background:#fffbeb}.ocr-footer{margin-top:16px;border-top:1px solid #cbd5e1;padding-top:12px}.ocr-footer p{font-size:.86rem}.ocr-cover{position:absolute;pointer-events:none}.ocr-dialog [hidden]{display:none}@media(max-width:700px){.ocr-dialog{padding:14px}.ocr-page-grid{grid-template-columns:minmax(0,1fr)}.ocr-preview{max-height:none;overflow:visible}.ocr-lines{max-height:430px}.ocr-controls{align-items:stretch}.ocr-controls label{min-width:0;flex:1 1 160px}.ocr-controls button{flex:1 1 130px}}

.ocr-move-handle{position:absolute;right:0;top:-22px;width:24px;height:22px;min-height:22px!important;padding:0;background:#147AD6;color:white;cursor:move;font:16px/1 system-ui;display:grid;place-items:center;border:1px solid white;border-radius:4px}.ocr-move-handle::before{content:"↕"}.ocr-move-handle:focus-visible{outline:3px solid #f59e0b}

.text-object.ocr-text{overflow:visible;white-space:pre}.ocr-move-handle{display:none}.ocr-text.selected>.ocr-move-handle,.ocr-text:hover>.ocr-move-handle,.ocr-text:focus>.ocr-move-handle{display:block}

.ocr-safety{border:2px solid #b45309;border-left-width:6px;border-radius:9px;background:#fffbeb;color:#78350f;padding:12px 16px;margin:16px 0}.ocr-safety h3{margin:0 0 8px;font-size:1.05rem}.ocr-safety p{margin:8px 0}.ocr-safety a{color:#0A3476;text-decoration:underline}.ocr-safety summary{font-weight:700;cursor:pointer;min-height:36px;padding:6px 0}.ocr-safety li{margin:8px 0}.ocr-memory-choice{display:flex;align-items:center;gap:8px;margin-top:12px;font-weight:700}.ocr-memory-choice input{width:18px;height:18px}.visual-cover-warning{flex-shrink:0;padding:10px 14px;border-bottom:2px solid #b45309;background:#fffbeb;color:#78350f;font-size:.86rem;line-height:1.4}.visual-cover-warning a{color:#0A3476;font-weight:700;text-decoration:underline}.ocr-heading{position:sticky;top:-20px;background:#fff;z-index:3;padding-bottom:8px}@media(max-width:700px){.ocr-heading{top:-14px}.ocr-safety{padding:10px 12px}}
