:root{--bg:#0f172a;--surface:#1e293b;--surface-2:#334155;--text:#f1f5f9;--muted:#94a3b8;--accent:#38bdf8;--danger:#f87171;--radius:16px;--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark;color:var(--text);background:var(--bg);-webkit-font-smoothing:antialiased;-webkit-tap-highlight-color:transparent;font-family:system-ui,-apple-system,Segoe UI,Roboto,sans-serif;line-height:1.5}*,:before,:after{box-sizing:border-box}html,body,#root{height:100%;margin:0}h1,h2,p{margin:0}button{font:inherit;cursor:pointer}button:disabled{opacity:.4;cursor:default}.app{max-width:640px;height:100dvh;padding:env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);flex-direction:column;margin:0 auto;display:flex}.app__header{align-items:center;gap:12px;padding:12px 16px;display:flex}.app__title{letter-spacing:.02em;font-size:1.125rem;font-weight:600}.app__main{flex-direction:column;flex:1;min-height:0;display:flex}.camera{flex-direction:column;flex:1;gap:16px;min-height:0;padding:0 16px 16px;display:flex}.viewfinder{border-radius:var(--radius);background:#000;flex:1;min-height:0;position:relative;overflow:hidden}.viewfinder video{object-fit:cover;width:100%;height:100%;display:block}.viewfinder video.mirrored{transform:scaleX(-1)}.overlay{text-align:center;color:var(--text);background:#0f172ab3;flex-direction:column;justify-content:center;align-items:center;gap:12px;padding:24px;display:flex;position:absolute;inset:0}.overlay--error p{max-width:32ch}.controls{justify-content:space-around;align-items:center;padding:4px 0 8px;display:flex}.shutter{border:4px solid var(--text);background:var(--text);width:76px;height:76px;box-shadow:inset 0 0 0 4px var(--bg);border-radius:50%;transition:transform .1s}.shutter:active:not(:disabled){transform:scale(.92)}.btn{color:var(--text);background:var(--surface-2);border:none;border-radius:999px;padding:12px 20px;font-weight:600}.btn--primary{background:var(--accent);color:var(--bg)}.btn--ghost{border:1px solid var(--surface-2);background:0 0}.btn--icon{background:var(--surface);place-items:center;width:52px;height:52px;padding:12px;display:grid}.btn--icon svg{width:100%;height:100%}.result{flex-direction:column;flex:1;gap:16px;min-height:0;padding:0 16px 16px;display:flex;overflow-y:auto}.result__image{border-radius:var(--radius);background:#000;flex-shrink:0;position:relative;overflow:hidden}.result__image img{object-fit:contain;width:100%;max-height:45dvh;display:block}.card{background:var(--surface);border-radius:var(--radius);flex-direction:column;gap:10px;padding:20px;display:flex}.card h2{font-size:1.25rem}.muted{color:var(--muted)}.confidence{color:var(--accent);font-size:.875rem;font-weight:600}.fields{gap:8px;margin:6px 0 0;display:grid}.fields>div{border-top:1px solid var(--surface-2);justify-content:space-between;gap:16px;padding-top:8px;display:flex}.fields dt{color:var(--muted)}.fields dd{text-align:right;font-variant-numeric:tabular-nums;margin:0}.actions{justify-content:flex-end;gap:12px;margin-top:auto;display:flex}.spinner{border:3px solid var(--surface-2);border-top-color:var(--accent);border-radius:50%;width:32px;height:32px;animation:.8s linear infinite spin}@keyframes spin{to{transform:rotate(360deg)}}.btn--small{width:40px;height:40px;padding:8px}.btn--block{width:100%;padding:16px 20px;font-size:1.0625rem}.link{color:var(--accent);background:0 0;border:none;padding:8px 0;font-weight:600}code{background:var(--surface-2);white-space:nowrap;border-radius:6px;padding:1px 6px;font-family:ui-monospace,SF Mono,Menlo,monospace;font-size:.95em}.start{flex-direction:column;flex:1;justify-content:space-between;gap:32px;padding:48px 24px 24px;display:flex}.start__hero{text-align:center;flex-direction:column;flex:1;justify-content:center;align-items:center;gap:16px;display:flex}.start__tire{width:min(64vw,260px);height:auto;margin-bottom:16px}.start__hero h1{letter-spacing:-.01em;font-size:2rem}.start__hero p{max-width:30ch;font-size:1.0625rem}.guide{flex-direction:column;flex:1;min-height:0;padding:0 0 16px;display:flex}.guide__top{justify-content:space-between;align-items:center;min-height:40px;padding:0 24px;font-size:.875rem;display:flex}.guide__viewport{touch-action:pan-y;-webkit-user-select:none;user-select:none;flex:1;min-height:0;overflow:hidden}.guide__track{height:100%;transition:transform .35s cubic-bezier(.22,1,.36,1);display:flex}.guide__page{flex-direction:column;flex:0 0 100%;gap:16px;min-width:0;padding:16px 24px;display:flex;overflow-y:auto}.guide__page h2{font-size:1.5rem}.guide__visual{align-self:center;width:min(48vw,180px);height:auto;margin-bottom:8px}.guide__body{color:#cbd5e1;flex-direction:column;gap:16px;display:flex}.steps-list{flex-direction:column;gap:10px;margin:0;padding-left:1.25em;display:flex}.steps-list strong{color:var(--text)}.legend{gap:8px;margin:0;display:grid}.legend>div{grid-template-columns:4.5em 1fr;align-items:baseline;gap:12px;display:grid}.legend dt{color:var(--accent);font-family:ui-monospace,SF Mono,Menlo,monospace;font-weight:700}.legend dd{margin:0}.tips{flex-direction:column;gap:12px;margin:0;padding:0;list-style:none;display:flex}.tips li{background:var(--surface);border-radius:12px;gap:12px;padding:14px 16px;display:flex}.dots{justify-content:center;gap:4px;padding:12px 0;display:flex}.dot{background:0 0;border:none;place-items:center;width:24px;height:24px;padding:0;display:grid}.dot:before{content:"";background:var(--surface-2);border-radius:999px;width:8px;height:8px;transition:width .25s,background-color .25s}.dot[aria-current=step]:before{background:var(--accent);width:22px}.guide__nav{justify-content:space-between;gap:12px;padding:0 24px;display:flex}.guide__nav .btn{flex:1;padding:14px 20px}@media (prefers-reduced-motion:reduce){.guide__track,.dot:before{transition:none}}.control{min-width:72px;color:var(--text);background:0 0;border:none;flex-direction:column;align-items:center;gap:6px;padding:0;display:flex}.control__label{color:var(--muted);font-size:.75rem}.overlay--panel{background:var(--surface)}.overlay__actions{flex-direction:column;align-items:stretch;gap:10px;width:min(100%,260px);display:flex}.hint{color:var(--muted);font-size:.875rem}.overlay--drop{border:2px dashed var(--accent);border-radius:var(--radius);pointer-events:none;background:#38bdf826;font-weight:600}.banner{border-radius:12px;padding:12px 16px;font-size:.9375rem}.banner--error{color:var(--danger);background:#f871711f}.crop{flex-direction:column;flex:1;gap:12px;min-height:0;padding:0 16px 16px;display:flex}.crop__status{color:#cbd5e1;min-height:3em;font-size:.9375rem}.crop__stage{border-radius:var(--radius);background:#000;flex:1;min-height:0;position:relative;overflow:hidden}.crop__stage img{-webkit-user-select:none;user-select:none;-webkit-touch-callout:none;position:absolute}.crop__overlay{touch-action:none;cursor:move;outline:none;position:absolute;inset:0}.crop__overlay:focus-visible{box-shadow:inset 0 0 0 3px var(--accent)}.frame-guide{aspect-ratio:1;pointer-events:none;border:2px dashed #ffffff8c;border-radius:50%;width:min(80%,80vh);max-height:85%;margin:auto;position:absolute;inset:0}.frame-guide__label{text-align:center;color:#ffffffd9;text-shadow:0 1px 3px #000c;pointer-events:none;font-size:.8125rem;position:absolute;bottom:12px;left:0;right:0}.btn--pill{background:var(--surface);align-items:center;gap:6px;margin-left:auto;padding:8px 14px 8px 10px;font-size:.875rem;display:inline-flex}.btn--pill svg{width:20px;height:20px}.card h3{text-transform:uppercase;letter-spacing:.06em;color:var(--muted);margin:0;font-size:.8125rem;font-weight:600}.fields dd small{color:var(--muted);font-size:.8125rem;display:block}.items{flex-direction:column;gap:6px;margin:0;padding-left:1.2em;display:flex}.banner--warning{color:#fbbf24;background:#fbbf241f}.progress{background:var(--surface-2);border-radius:999px;width:min(70%,240px);height:6px;overflow:hidden}.progress>div{background:var(--accent);height:100%;transition:width .2s}.raw summary{cursor:pointer;font-weight:600}.raw[open] summary{margin-bottom:4px}.raw textarea{resize:vertical;width:100%;color:var(--text);background:var(--bg);border:1px solid var(--surface-2);text-transform:uppercase;border-radius:10px;padding:10px 12px;font:.9375rem/1.4 ui-monospace,SF Mono,Menlo,monospace}.raw .btn{align-self:flex-end}.raw{display:block}.raw>*+*{margin-top:10px}.result__image{aspect-ratio:1;align-self:center;width:min(100%,45dvh)}.result__image img{object-fit:cover;width:100%;height:100%;max-height:none}.markers{pointer-events:none;width:100%;height:100%;position:absolute;inset:0}.marker-arc{fill:#38bdf824;stroke:var(--accent);stroke-width:3px;transition:fill .2s,stroke-width .2s}.marker-arc.is-active{fill:#facc1538;stroke:#facc15;stroke-width:6px}.marker-badge{pointer-events:auto;cursor:pointer;outline:none}.marker-badge circle{fill:var(--accent);stroke:var(--bg);stroke-width:5px}.marker-badge text{fill:var(--bg);text-anchor:middle;font-size:40px;font-weight:800}.marker-badge.is-active circle,.marker-badge:focus-visible circle{fill:#facc15}.findings{flex-direction:column;gap:10px;margin:0;padding:0;list-style:none;display:flex}.finding{border-radius:var(--radius);background:var(--surface);border:2px solid #0000;gap:14px;padding:16px;scroll-margin:16px;transition:border-color .2s;display:flex}.finding.is-active{border-color:#facc15}.finding__badge{background:var(--accent);width:30px;height:30px;color:var(--bg);border-radius:50%;flex-shrink:0;place-items:center;font-size:.875rem;font-weight:800;display:grid}.finding.is-active .finding__badge{background:#facc15}.finding__badge--unplaced{color:var(--accent);border:2px dashed var(--accent);background:0 0}.finding__body{flex-direction:column;flex:1;gap:8px;min-width:0;display:flex}.finding__head{justify-content:space-between;align-items:flex-start;gap:12px;display:flex}.finding__label{color:var(--muted);align-items:center;gap:8px;font-size:.8125rem;display:flex}.finding__value{overflow-wrap:anywhere;font-size:1.125rem;font-weight:600}.finding__details{gap:4px;margin:0;font-size:.875rem;display:grid}.finding__details>div{grid-template-columns:minmax(7.5em,auto) 1fr;gap:10px;display:grid}.finding__details dt{color:var(--muted)}.finding__details dd{margin:0}.finding__hint{color:var(--muted);font-size:.8125rem}.finding__error{color:var(--danger);font-size:.8125rem}.finding__edit{flex-direction:column;gap:8px;display:flex}.finding__edit input{text-transform:uppercase;width:100%;color:var(--text);background:var(--bg);border:1px solid var(--surface-2);border-radius:10px;padding:10px 12px;font:1rem/1.4 ui-monospace,SF Mono,Menlo,monospace}.finding__edit input[aria-invalid=true]{border-color:var(--danger)}.finding__edit-actions{align-items:center;gap:8px;display:flex}.finding__edit-actions .link{margin-right:auto}.link--danger{color:var(--danger)}.tag{background:var(--surface-2);color:var(--text);border-radius:999px;padding:1px 6px;font-size:.6875rem;font-weight:600}.raw__ocr summary{color:var(--muted);font-size:.875rem;font-weight:400}.raw__ocr pre{white-space:pre-wrap;overflow-wrap:anywhere;color:var(--muted);margin:8px 0 0;font-size:.8125rem}.processed{flex-direction:column;gap:6px;margin-top:8px;display:flex}.processed img{border-radius:6px;width:100%}
