.ocr-intro { max-width: 760px; }
.ocr-workspace { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; margin-top: 28px; }
.ocr-pane { min-width: 0; padding: 24px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.ocr-pane h2 { margin: 0 0 18px; font-size: 24px; }
.ocr-pane label { display: block; margin-bottom: 8px; font-weight: 700; }
.ocr-pane input[type=file] { display: block; width: 100%; padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-soft); }
.ocr-pane input::file-selector-button { min-height: 44px; margin-right: 12px; padding: 8px 14px; border: 1px solid var(--accent); border-radius: 8px; color: var(--text); background: var(--surface); cursor: pointer; }
.ocr-help { color: var(--muted); line-height: 1.5; margin: 8px 0 20px; }
.ocr-preview-wrap { display: grid; place-items: center; min-height: 180px; padding: 12px; margin: 18px 0; border: 1px dashed var(--line); background: var(--surface-soft); border-radius: 8px; }
#ocr-preview { display: block; max-width: 100%; height: auto; }
#ocr-preview[hidden] { display: none; }
#ocr-detail { overflow-wrap: anywhere; line-height: 1.5; }
.ocr-controls { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.ocr-pane button, .ocr-pane select { min-height: 44px; }
.ocr-pane select { width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 10px; font: inherit; background: var(--surface); color: var(--text); }
#ocr-result { width: 100%; min-height: 360px; resize: vertical; border: 1px solid var(--line); border-radius: 8px; padding: 14px; font: 16px/1.5 Arial, sans-serif; color: var(--text); background: var(--surface); }
.ocr-pane :focus-visible { outline: 3px solid var(--accent-strong); outline-offset: 3px; }
#ocr-status { min-height: 48px; line-height: 1.5; margin: 18px 0 0; }
.ocr-error { color: var(--error); }
#ocr-progress { width: 100%; height: 14px; margin-top: 10px; accent-color: var(--accent); }
.ocr-notes { max-width: 920px; margin-top: 32px; line-height: 1.6; }
.ocr-notes h2 { font-size: 25px; }
.ocr-faq details { padding: 14px 0; border-bottom: 1px solid var(--line); }
.ocr-faq summary { cursor: pointer; font-weight: 700; min-height: 44px; }
.ocr-pane button:disabled { cursor: default; opacity: .55; }
@media (max-width: 767px) { .ocr-workspace { grid-template-columns: minmax(0,1fr); gap: 18px; } .ocr-pane { padding: 18px; } #ocr-result { min-height: 250px; } .ocr-controls button { flex: 1 1 auto; } }

.ocr-source-options { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 16px; }
.ocr-source-options label { margin: 0; }
.ocr-check { display: flex !important; align-items: flex-start; gap: 10px; min-height: 44px; font-weight: 400 !important; line-height: 1.5; padding-top: 12px; }
.ocr-check input { flex: 0 0 auto; width: 20px; height: 20px; margin: 2px 0; accent-color: var(--accent); }
.ocr-page-range { margin-top: 16px; border: 1px solid var(--line); border-radius: 8px; padding: 14px; }
.ocr-page-range[hidden] { display: none; }
.ocr-page-range legend { font-weight: 700; }
.ocr-page-range input[type=number] { width: 100%; min-height: 44px; font: inherit; border: 1px solid var(--line); border-radius: 8px; padding: 8px; }
#ocr-drop { outline-offset: 3px; }
#ocr-drop.is-dragover { border-color: var(--accent); background: var(--accent-soft); }
#ocr-result { min-height: 480px; tab-size: 4; white-space: pre-wrap; overflow-wrap: anywhere; }
#ocr-result:focus { outline: 3px solid var(--accent-strong); outline-offset: 2px; border-color: var(--accent-strong); }
#ocr-result[readonly] { background: var(--surface-soft); }
#ocr-stats { color: var(--muted); font-variant-numeric: tabular-nums; margin: 10px 0; }
.ocr-output-expanded .ocr-workspace { grid-template-columns: minmax(0,1fr); }
.ocr-output-expanded #ocr-result { min-height: 70vh; }
@media (max-width: 767px) { .ocr-source-options { grid-template-columns: minmax(0,1fr); gap: 12px; } #ocr-result { min-height: 340px; } }
