:root { color-scheme: light; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: #172336; background: #f5f7fa; }
* { box-sizing: border-box; }
body { margin: 0; }
main { max-width: 520px; margin: auto; padding: max(24px, env(safe-area-inset-top)) 20px max(24px, env(safe-area-inset-bottom)); }
.eyebrow { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .09em; color: #526174; }
h1 { font-size: 29px; line-height: 1.15; letter-spacing: -.04em; margin: 8px 0 12px; }
p { font-size: 15px; line-height: 1.5; color: #526174; margin: 0 0 16px; }
.viewfinder { position: relative; aspect-ratio: 4/3; width: 100%; background: #172336; color: #e7edf5; border-radius: 20px; overflow: hidden; }
video { width: 100%; height: 100%; display: block; object-fit: cover; }
.zoom-control { margin: 18px 0 0; font-size: 14px; }
.zoom-control output { display: inline; font-size: 14px; }
input[type="range"] { width: 100%; min-height: 44px; accent-color: #1660b5; }
.placeholder { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 20px; flex-direction: column; font-size: 13px; }
.scan-frame { position: absolute; inset: 24% 8%; border: 2px solid #e7edf5; border-radius: 10px; pointer-events: none; }
#status { margin: 16px 0; min-height: 46px; }
#status.error { color: #a32222; }
button, .file-button { font: inherit; font-weight: 650; border-radius: 12px; min-height: 50px; padding: 14px 18px; cursor: pointer; text-align: center; }
button { width: 100%; border: 1px solid #1660b5; color: #ffffff; background: #1660b5; }
button:active { background: #104781; }
button:disabled { background: #526174; border-color: #526174; color: #ffffff; cursor: wait; }
button.secondary { background: #ffffff; color: #172336; border-color: #6c7a8c; }
.actions { display: flex; gap: 10px; }
.actions > * { flex: 1; }
.torch-button { margin-top: 12px; }
button.torch-button[aria-pressed="true"] { background: #e4eefb; color: #104781; border-color: #1660b5; }
.result { background: #e7f4ee; border: 1px solid #49785e; border-radius: 16px; padding: 18px; margin-top: 20px; color: #163c2a; }
h2 { font-size: 16px; margin: 0 0 10px; }
output { display: block; font-family: ui-monospace, monospace; font-size: 25px; letter-spacing: .02em; word-break: break-all; }
.result p { color: #28563b; font-size: 14px; margin: 10px 0 0; }
.result button { margin-top: 16px; }
.fallback { margin-top: 24px; }
.file-button { display: block; border: 1px solid #6c7a8c; background: #ffffff; }
.fallback p { font-size: 13px; margin-top: 10px; }
details { border-top: 1px solid #ccd4df; margin-top: 20px; padding-top: 8px; }
summary { cursor: pointer; font-size: 14px; min-height: 44px; padding: 12px 0; }
label { display: block; font-size: 14px; margin: 0 0 8px; }
input[type="text"] { width: 100%; font: inherit; background: #ffffff; color: #172336; border: 1px solid #6c7a8c; border-radius: 10px; padding: 14px 12px; margin-bottom: 10px; }
input::placeholder { color: #526174; }
.environment { margin: 20px 0 0; font-size: 12px; }
:focus-visible { outline: 3px solid #1660b5; outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.file-button:has(+ input:focus-visible) { outline: 3px solid #1660b5; outline-offset: 3px; }
[hidden] { display: none !important; }
