/* FreeTools Hub - OCR (Tesseract.js, all client-side) */
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; background: #f8fafc; color: #1e293b; line-height: 1.6; }
.wrap { max-width: 960px; margin: 0 auto; padding: 0 20px; }

.site-header { background: linear-gradient(135deg, #1d4ed8, #7c3aed); color: #fff; padding: 40px 0 32px; }
.crumb { color: #dbeafe; text-decoration: none; font-size: .9rem; }
.crumb:hover { text-decoration: underline; }
.site-header h1 { font-size: 2rem; margin: 8px 0 4px; }
.site-header .sub { opacity: .92; }
.estimate-badge { display: inline-block; margin-top: 14px; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.4); padding: 8px 16px; border-radius: 10px; font-weight: 700; font-size: .9rem; }

main.wrap { padding-top: 28px; padding-bottom: 40px; }
.card { background: #fff; border-radius: 14px; padding: 24px; margin-bottom: 20px; box-shadow: 0 2px 16px rgba(15,23,42,.06); }
.card h2 { font-size: 1.2rem; margin-bottom: 14px; }
.note { font-size: .88rem; color: #64748b; margin-top: 10px; }
.error { color: #b91c1c; font-weight: 600; margin-top: 10px; }

/* Dropzone */
.dropzone { border: 2px dashed #c7d2fe; border-radius: 14px; padding: 40px 20px; text-align: center; cursor: pointer; background: #f8faff; transition: border-color .15s, background .15s; }
.dropzone:hover, .dropzone.dragover { border-color: #1d4ed8; background: #eff6ff; }
.dz-icon { font-size: 2.6rem; }

/* Preview + options */
.preview-row { display: flex; gap: 24px; flex-wrap: wrap; }
.preview-box { flex: 1; min-width: 260px; max-height: 420px; overflow: auto; background: #f1f5f9; border-radius: 10px; display: flex; align-items: center; justify-content: center; padding: 12px; }
.preview-box img, .preview-box canvas { max-width: 100%; border-radius: 6px; box-shadow: 0 2px 10px rgba(15,23,42,.12); }
.opts { flex: 1; min-width: 240px; display: flex; flex-direction: column; gap: 14px; }
.opt-label { font-weight: 700; font-size: .92rem; display: flex; flex-direction: column; gap: 6px; }
.opt-label select { padding: 10px 12px; border: 2px solid #e2e8f0; border-radius: 10px; font-size: 1rem; background: #fff; }

/* Buttons */
.btn { border: none; border-radius: 10px; padding: 12px 22px; font-weight: 700; font-size: 1rem; cursor: pointer; }
.btn.primary { background: linear-gradient(135deg, #1d4ed8, #7c3aed); color: #fff; }
.btn.primary:disabled { opacity: .6; cursor: wait; }
.btn.secondary { background: #fff; border: 2px solid #c7d2fe; color: #1d4ed8; }

/* Progress */
.progress { height: 14px; background: #eef2ff; border-radius: 8px; overflow: hidden; }
.progress .bar { height: 100%; width: 0%; background: linear-gradient(90deg, #1d4ed8, #7c3aed); border-radius: 8px; transition: width .2s; }

/* Result */
#resultText { width: 100%; border: 2px solid #e2e8f0; border-radius: 10px; padding: 14px; font-size: .95rem; font-family: ui-monospace, Consolas, monospace; resize: vertical; }
.result-actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-top: 14px; }

/* FAQ */
.faq { border-bottom: 1px solid #f1f5f9; padding: 12px 0; }
.faq summary { font-weight: 700; cursor: pointer; }
.faq p { margin-top: 8px; color: #475569; font-size: .94rem; }

.site-footer { text-align: center; padding: 28px 0 40px; color: #64748b; font-size: .9rem; }
.site-footer a { color: #1d4ed8; text-decoration: none; font-weight: 700; }

@media (max-width: 640px) {
  .card { padding: 18px; }
  .site-header h1 { font-size: 1.6rem; }
}
