:root { color-scheme: light; --ink:#14243b; --navy:#16283b; --muted:#58697b; --bg:#eff3f7; --surface:#fff; --accent:#2675bd; --border:#d9e2e8; --warn:#af4a26; }
* { box-sizing:border-box; }
html { width:100%; height:100%; background:var(--bg); overscroll-behavior:none; }
body { margin:0; font-family:system-ui,-apple-system,"Noto Sans KR","Malgun Gothic",sans-serif; color:var(--ink); }
button, input, label { font:inherit; }
button { cursor:pointer; touch-action:manipulation; -webkit-tap-highlight-color:transparent; }
button:disabled { opacity:.44; cursor:not-allowed; }
.app { height:100vh; height:100dvh; min-height:470px; display:flex; flex-direction:column; max-width:940px; margin:auto; background:var(--surface); }
.topbar { display:flex; flex:0 0 auto; justify-content:space-between; align-items:center; gap:12px; min-height:58px; padding:8px max(16px,env(safe-area-inset-right)) 8px max(16px,env(safe-area-inset-left)); background:var(--navy); color:#fff; }
.brand { display:flex; gap:9px; align-items:baseline; font-size:23px; letter-spacing:-.03em; font-weight:800; }
.brand-icon { color:#b7e6ff; font-size:22px; }
.brand-sub { font-size:11px; font-weight:600; letter-spacing:.1em; opacity:.65; }
.icon-btn { min-width:46px; min-height:42px; border:0; border-radius:12px; background:#eff5f9; color:#213448; font-size:21px; }
.status { flex:0 0 auto; padding:10px 16px; background:#e4f1fa; min-height:44px; font-size:14px; font-weight:650; line-height:1.45; }
.status.error { background:#fff0e9; color:#963a1f; }
.view { min-height:0; flex:1; display:flex; flex-direction:column; }
[hidden] { display:none !important; }
.camera-frame { position:relative; flex:1; min-height:0; background:#141e2b; display:flex; justify-content:center; overflow:hidden; }
.camera-frame video { width:100%; height:100%; object-fit:contain; background:#14202a; }
.camera-empty { position:absolute; inset:0; display:flex; flex-direction:column; align-items:center; justify-content:center; text-align:center; padding:24px; color:#ebf4fa; pointer-events:none; }
.camera-glyph { font-size:60px; font-weight:300; line-height:1; color:#9fd3f4; }
.muted { color:var(--muted); }
.camera-empty .muted { color:#aabecb; }
.small { font-size:12px; line-height:1.5; }
.guide-corners { position:absolute; inset:9% 7%; border:2px solid rgba(255,255,255,.32); border-radius:15px; pointer-events:none; }
.controls { flex:0 0 auto; display:grid; grid-template-columns:1fr 1.25fr; gap:10px; padding:12px 14px calc(12px + env(safe-area-inset-bottom)); background:#fff; border-top:1px solid var(--border); }
.action { min-height:58px; border:2px solid transparent; border-radius:16px; display:flex; align-items:center; justify-content:center; padding:12px; font-weight:790; font-size:18px; text-align:center; line-height:1.25; user-select:none; -webkit-user-select:none; }
.primary { background:var(--accent); color:#fff; }
.secondary { background:#e6edf3; color:var(--ink); }
.ghost { background:#fff; border-color:#b8cfdf; color:#315c7c; }
.file-control { grid-column:1/-1; font-size:16px; min-height:48px; }
.visually-hidden,.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
.reading-intro { padding:10px 15px; background:#f9fbfe; font-size:15px; text-align:center; flex:0 0 auto; }
.picture-scroll { flex:1; min-height:0; overflow:auto; background:#e2e8ed; display:block; text-align:center; overscroll-behavior:contain; }
.picture-stage { display:block; position:relative; width:100%; max-width:760px; margin:auto; background:#dce3e9; cursor:crosshair; touch-action:pan-y; -webkit-user-select:none; user-select:none; }
.picture-stage img { display:block; width:100%; height:auto; pointer-events:none; -webkit-user-drag:none; }
.line-overlay { pointer-events:none; position:absolute; inset:0; }
.line-mark { position:absolute; border:2px solid rgba(31,129,194,.7); background:rgba(51,156,220,.08); border-radius:6px; }
.line-mark.selected { border:3px solid #f08020; background:rgba(255,198,77,.24); box-shadow:0 0 0 1px rgba(80,42,0,.12); }
.line-overlay.quiet .line-mark:not(.selected) { border-color:transparent; background:transparent; }
.read-info { flex:0 0 auto; padding:8px 14px; border-top:1px solid var(--border); max-height:130px; overflow:auto; }
.selection-label { font-size:15px; min-height:22px; font-weight:670; line-height:1.4; }
.ocr-details { margin-top:7px; font-size:13px; }
.ocr-details summary { color:#42627d; cursor:pointer; touch-action:manipulation; }
.ocr-result { white-space:pre-wrap; padding:6px 0; line-height:1.5; margin:2px 0; }
.read-controls { grid-template-columns:1.3fr 1fr 1fr; }
.read-controls .action { font-size:15px; min-height:58px; }
.settings-view { padding:14px 18px 30px; background:var(--surface); overflow:auto; flex:1; }
.settings-heading { display:flex; justify-content:space-between; align-items:center; }
.settings-heading h2 { font-size:21px; margin:0; }
.setting-row { display:flex; gap:16px; align-items:center; justify-content:space-between; padding:22px 0; border-bottom:1px solid var(--border); }
.setting-row span { max-width:75%; }
.setting-row strong,.setting-block strong { display:block; font-size:17px; }
.setting-row small { display:block; font-size:13px; margin-top:5px; color:var(--muted); line-height:1.45; }
.setting-row input { width:29px; height:29px; accent-color:var(--accent); }
.setting-block { padding:24px 0; }
.setting-block p { font-size:14px; line-height:1.6; }
.setting-block .action { width:100%; }
:focus-visible { outline:3px solid #e99c2f; outline-offset:3px; }
@media (orientation:landscape) and (max-height:550px) {
 .topbar { min-height:43px; padding-top:3px; padding-bottom:3px; }
 .brand { font-size:18px; }
 .status { min-height:30px; padding:5px 14px; font-size:12px; }
 .controls { padding:7px 12px calc(7px + env(safe-area-inset-bottom)); }
 .action,.read-controls .action { min-height:44px; font-size:14px; }
 .file-control { min-height:40px; }
 .reading-intro { padding:5px 12px; font-size:12px; }
 .read-info { max-height:70px; padding:5px 12px; }
}
