:root{color-scheme:light;--bg: #f5f7f4;--surface: #ffffff;--surface-soft: #eef3ef;--surface-warm: #fbfaf6;--text: #14211d;--muted: #66736f;--border: #d7ded9;--border-strong: #afbeb6;--accent: #2f6f60;--accent-strong: #20574a;--blue: #5686c8;--amber: #c9902c;--red: #b84a4a;--green-soft: #e4f3ee;--amber-soft: #fff5df;--red-soft: #fbe8e8;--shadow: 0 16px 40px rgba(31, 48, 42, .12);font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif}*{box-sizing:border-box}body{margin:0;min-width:320px;background:var(--bg);color:var(--text)}button,select,input{font:inherit}button{min-height:40px;display:inline-flex;align-items:center;justify-content:center;gap:8px;border:1px solid var(--border-strong);border-radius:8px;background:var(--surface);color:var(--text);padding:0 12px;cursor:pointer;font-size:.9rem;font-weight:650}.file-button{position:relative;min-height:40px;display:inline-flex;align-items:center;justify-content:center;gap:8px;border:1px solid var(--border-strong);border-radius:8px;background:var(--surface);color:var(--text);padding:0 12px;cursor:pointer;font-size:.9rem;font-weight:650}.file-button:hover{border-color:var(--accent);color:var(--accent-strong)}.file-button input{position:absolute;width:1px;height:1px;opacity:0;pointer-events:none}button svg,.file-button svg{width:17px;height:17px;flex:0 0 auto}button:hover:not(:disabled){border-color:var(--accent);color:var(--accent-strong)}button:focus-visible,select:focus-visible,input:focus-visible{outline:3px solid rgba(47,111,96,.26);outline-offset:2px}button:disabled{cursor:not-allowed;color:#9aa49f;background:#f0f2ef}select,input[type=number]{width:100%;min-height:40px;border:1px solid var(--border-strong);border-radius:8px;background:var(--surface);color:var(--text);padding:0 10px}.app-shell{min-height:100vh}.topbar{max-width:1440px;margin:0 auto;padding:22px 24px 14px;display:flex;align-items:center;justify-content:space-between;gap:16px}.brand{display:flex;align-items:center;gap:14px;min-width:0}.brand-mark{width:44px;height:44px;display:grid;place-items:center;border-radius:8px;background:var(--accent);color:#fff;box-shadow:0 10px 24px #2f6f6038}.brand-mark svg,.privacy-chip svg{width:21px;height:21px}.brand h1{margin:0;font-size:clamp(1.4rem,2.2vw,2.1rem);line-height:1.05;letter-spacing:0}.brand p{margin:5px 0 0;color:var(--muted);font-size:.94rem}.privacy-chip{display:inline-flex;align-items:center;gap:8px;min-height:38px;border:1px solid var(--border);border-radius:8px;padding:0 12px;color:var(--accent-strong);background:var(--green-soft);font-weight:700;font-size:.88rem;white-space:nowrap}.workspace{max-width:1440px;margin:0 auto;padding:10px 24px 32px;display:grid;grid-template-columns:minmax(0,1.55fr) minmax(360px,.85fr);gap:18px}.canvas-panel,.side-panel{border:1px solid var(--border);border-radius:8px;background:var(--surface);box-shadow:var(--shadow)}.side-panel{overflow:hidden}.panel-header,.panel-section,.result-empty,.result-header{padding:18px}.panel-header{display:flex;justify-content:space-between;gap:16px;border-bottom:1px solid var(--border);background:var(--surface-warm)}.panel-header h2,.section-heading h2,.result-empty h2,.result-header h2{margin:0;font-size:1.02rem;line-height:1.25}.panel-header p,.result-empty p,.result-header p{margin:6px 0 0;color:var(--muted);font-size:.92rem}.image-meta{min-width:150px;display:grid;justify-items:end;gap:4px;color:var(--muted);font-size:.8rem;text-align:right}.image-meta strong{color:var(--text);font-size:.9rem}.upload-zone{margin:16px 18px 0;min-height:74px;display:grid;grid-template-columns:auto minmax(260px,360px) 1fr;align-items:center;gap:14px;border:1px dashed var(--border-strong);border-radius:8px;padding:12px;background:var(--surface-soft)}.upload-zone>svg{color:var(--accent)}.upload-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.camera-button{background:var(--accent);border-color:var(--accent);color:#fff}.upload-zone p{margin:0;color:var(--muted);font-size:.88rem}.camera-capture,.capture-guide-card{margin:12px 18px 0;border:1px solid var(--border);border-radius:8px;background:var(--surface-warm);overflow:hidden}.camera-preview{position:relative;min-height:360px;display:grid;place-items:center;background:#18231f}.camera-video{width:100%;max-height:68vh;display:block;object-fit:contain}.camera-actions{display:flex;flex-wrap:wrap;gap:8px;border-top:1px solid var(--border);padding:12px}.camera-shutter{background:var(--accent);border-color:var(--accent);color:#fff}.recording-button{background:var(--red);border-color:var(--red);color:#fff}.capture-guide-card{display:grid;grid-template-columns:minmax(260px,.9fr) minmax(220px,1fr);align-items:center}.guide-illustration{position:relative;min-height:230px;overflow:hidden;background:radial-gradient(circle at 28% 24%,rgba(255,255,255,.8),transparent 28%),linear-gradient(135deg,#e1e6df,#f7f7f1)}.guide-hand{position:absolute;right:22px;bottom:-16px;width:168px;height:220px}.guide-finger,.guide-thumb,.guide-palm{position:absolute;display:block;background:linear-gradient(180deg,#d3a98e,#bd876e);box-shadow:inset 0 0 0 1px #5f3b2d1f}.guide-finger{bottom:72px;width:36px;height:160px;border-radius:999px}.guide-finger-one{left:16px;transform:rotate(-4deg)}.guide-finger-two{left:58px;height:178px}.guide-finger-three{left:100px;height:150px;transform:rotate(4deg)}.guide-thumb{right:-8px;bottom:36px;width:40px;height:110px;border-radius:999px;transform:rotate(28deg)}.guide-palm{left:12px;right:18px;bottom:0;height:94px;border-radius:42px 42px 20px 20px}.guide-wallet-card{position:absolute;left:26px;top:42px;width:166px;aspect-ratio:1.586 / 1;border-radius:7px;background:linear-gradient(135deg,#153b54,#223246);box-shadow:0 14px 30px #14211d2e}.guide-copy{display:grid;gap:6px;padding:18px}.guide-copy strong{font-size:1rem}.guide-copy span{color:var(--muted);font-size:.9rem;line-height:1.4}.capture-guide-overlay{position:absolute;inset:18px;pointer-events:none;border:2px solid rgba(255,255,255,.52);border-radius:10px;box-shadow:inset 0 0 0 1px #14211d2e}.guide-corner{position:absolute;width:30px;height:30px;border-color:#f5c35b;border-style:solid}.guide-corner-tl{top:-2px;left:-2px;border-width:4px 0 0 4px}.guide-corner-tr{top:-2px;right:-2px;border-width:4px 4px 0 0}.guide-corner-bl{bottom:-2px;left:-2px;border-width:0 0 4px 4px}.guide-corner-br{right:-2px;bottom:-2px;border-width:0 4px 4px 0}.guide-card-target{position:absolute;left:8%;top:20%;width:34%;aspect-ratio:1.586 / 1;border:3px solid rgba(169,222,209,.92);border-radius:8px;background:#a9ded11a}.guide-ring-target{position:absolute;left:56%;top:46%;width:25%;border-top:4px solid rgba(86,134,200,.96)}.guide-card-target span,.guide-ring-target span{position:absolute;left:0;top:-30px;display:inline-flex;min-height:24px;align-items:center;border-radius:999px;background:#14211dc7;color:#fff;padding:0 9px;font-size:.75rem;font-weight:800;white-space:nowrap}.guide-ring-target span{top:8px;background:#1f4569d1}.protocol-controls{margin:12px 18px 0;display:grid;grid-template-columns:minmax(220px,320px) 1fr;align-items:end;gap:12px;border:1px solid var(--border);border-radius:8px;background:var(--surface-warm);padding:12px}.protocol-controls p,.protocol-empty{margin:0;color:var(--muted);font-size:.88rem}.guided-steps{margin:12px 18px 0;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}.guided-step{min-height:88px;display:grid;grid-template-columns:28px 1fr;gap:8px;border:1px solid var(--border);border-radius:8px;background:var(--surface);padding:10px}.guided-step strong,.guided-step span{display:block}.guided-step strong{font-size:.82rem}.guided-step div>span{margin-top:4px;color:var(--muted);font-size:.76rem;line-height:1.25}.step-index{width:26px;height:26px;display:grid;place-items:center;border-radius:999px;background:var(--surface-soft);color:var(--muted);font-size:.78rem;font-weight:850}.step-complete{border-color:#9bcbbd;background:var(--green-soft)}.step-complete .step-index{background:var(--accent);color:#fff}.step-active{border-color:#e1bd74;background:var(--amber-soft)}.step-locked{color:#7d8984;background:#f7f8f5}.error-banner{margin:12px 18px 0;border:1px solid #e0aaaa;border-radius:8px;background:var(--red-soft);color:#7e2f2f;padding:10px 12px;font-size:.9rem;font-weight:650}.replacement-banner{margin:12px 18px 0;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:12px;align-items:center;border:1px solid #e1bd74;border-radius:8px;background:var(--amber-soft);color:#744e12;padding:11px 12px}.replacement-banner strong,.replacement-banner span{display:block}.replacement-banner span{margin-top:3px;font-size:.86rem;line-height:1.35}.replacement-actions,.auto-detect-actions{display:flex;flex-wrap:wrap;gap:8px}.replacement-actions{justify-content:flex-end}.auto-detect-banner{margin:12px 18px 0;display:grid;grid-template-columns:22px 1fr;gap:10px;align-items:flex-start;border:1px solid #9bcbbd;border-radius:8px;background:var(--green-soft);color:var(--accent-strong);padding:11px 12px}.auto-detect-banner svg{width:20px;height:20px;margin-top:1px}.auto-detect-banner strong,.auto-detect-banner span{display:block}.auto-detect-banner span{margin-top:3px;font-size:.86rem;line-height:1.35}.finger-diameter-row{display:flex;flex-wrap:wrap;gap:6px;margin-top:9px}.auto-detect-banner .finger-diameter-chip{min-height:28px;display:inline-flex;align-items:center;border:1px solid rgba(47,111,96,.28);border-radius:999px;background:#ffffff9e;color:var(--text);padding:0 9px;font-size:.78rem;font-weight:850}.auto-detect-banner button.finger-diameter-chip:hover:not(:disabled){border-color:var(--accent);background:#fff;color:var(--accent-strong)}.auto-detect-banner .finger-diameter-target{border-color:#20574a9e;background:#fff;color:var(--accent-strong)}.auto-detect-actions{margin-top:10px}.auto-detect-actions .confirm-target-button{background:var(--accent);border-color:var(--accent);color:#fff}.auto-detect-partial{border-color:#e1bd74;background:var(--amber-soft);color:#744e12}.auto-detect-failed{border-color:#e0aaaa;background:var(--red-soft);color:#7e2f2f}.video-status-banner,.video-candidate-panel{margin:12px 18px 0;border:1px solid var(--border);border-radius:8px;background:var(--surface-warm)}.video-status-banner{display:grid;grid-template-columns:22px 1fr;gap:10px;align-items:flex-start;color:var(--text);padding:11px 12px}.video-status-banner svg{width:20px;height:20px;color:var(--blue)}.video-status-banner strong,.video-status-banner span,.video-candidate-heading strong,.video-candidate-heading span{display:block}.video-status-banner span,.video-candidate-heading span{margin-top:3px;color:var(--muted);font-size:.86rem;line-height:1.35}.video-candidate-panel{padding:12px}.video-candidate-heading{display:flex;justify-content:space-between;gap:12px;margin-bottom:10px}.video-candidate-grid{display:grid;grid-template-columns:repeat(5,minmax(110px,1fr));gap:8px}.video-candidate-card{position:relative;min-height:148px;display:grid;grid-template-rows:82px auto auto;align-content:start;justify-items:start;gap:4px;overflow:hidden;padding:8px;text-align:left}.video-candidate-card img{width:100%;height:82px;display:block;object-fit:cover;border-radius:6px;background:var(--surface-soft)}.video-candidate-card strong{font-size:.9rem}.video-rank,.video-time{position:absolute;top:14px;min-height:22px;display:inline-flex;align-items:center;border-radius:999px;background:#14211dc7;color:#fff;padding:0 7px;font-size:.72rem;font-weight:850}.video-rank{left:14px}.video-time{right:14px}.video-confidence{display:inline-flex;min-height:24px;align-items:center;border-radius:999px;padding:0 8px;font-size:.72rem;font-weight:850;text-transform:capitalize}.confidence-high{background:var(--green-soft);color:var(--accent-strong)}.confidence-medium{background:var(--amber-soft);color:#744e12}.confidence-low{background:var(--red-soft);color:#7e2f2f}.canvas-tip,.canvas-tools{margin:12px 18px 0;display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:10px;border:1px solid var(--border);border-radius:8px;background:var(--surface-warm);padding:10px 12px}.canvas-tip{justify-content:flex-start;border-color:#9bcbbd;background:var(--green-soft);color:var(--accent-strong)}.canvas-tip p,.canvas-tools p{margin:0;color:var(--muted);font-size:.86rem}.canvas-tip p{color:var(--accent-strong);font-weight:700}.zoom-controls{display:flex;align-items:center;gap:8px}.zoom-controls span{min-width:42px;text-align:center;color:var(--muted);font-size:.86rem;font-weight:800}.canvas-frame{min-height:420px;margin:16px 18px;display:grid;place-items:center;overflow:auto;border:1px solid var(--border);border-radius:8px;background:linear-gradient(45deg,rgba(47,111,96,.06) 25%,transparent 25%),linear-gradient(-45deg,rgba(47,111,96,.06) 25%,transparent 25%),linear-gradient(45deg,transparent 75%,rgba(47,111,96,.06) 75%),linear-gradient(-45deg,transparent 75%,rgba(47,111,96,.06) 75%);background-position:0 0,0 11px,11px -11px,-11px 0;background-size:22px 22px}.empty-canvas{max-width:360px;display:grid;justify-items:center;gap:8px;padding:36px;text-align:center;color:var(--muted)}.empty-canvas svg{width:32px;height:32px;color:var(--accent)}.empty-canvas strong{color:var(--text)}.measurement-canvas{display:none;max-width:100%;height:auto;cursor:crosshair}.measurement-canvas.is-visible{display:block}.precision-panel{margin:-4px 18px 16px;display:grid;grid-template-columns:180px 1fr;gap:12px;align-items:start}.loupe-panel{display:grid;gap:6px;color:var(--muted);font-size:.8rem;font-weight:800}.loupe-canvas{width:160px;height:160px;border:1px solid var(--border-strong);border-radius:8px;background:var(--surface-soft)}.coordinate-entry{margin-top:10px;display:grid;grid-template-columns:repeat(2,minmax(120px,1fr)) auto;gap:10px;align-items:end;border:1px solid var(--border);border-radius:8px;background:var(--surface-warm);padding:12px}.coordinate-disclosure{border:1px solid var(--border);border-radius:8px;background:var(--surface-warm);padding:12px}.coordinate-disclosure summary{cursor:pointer;color:var(--text);font-size:.9rem;font-weight:800}.coordinate-disclosure>p{margin:8px 0 0;color:var(--muted);font-size:.84rem}.coordinate-disclosure:not([open])>p,.coordinate-disclosure:not([open]) .coordinate-entry{display:none}.primary-actions,.toolbar{display:flex;flex-wrap:wrap;gap:8px;padding:0 18px 18px}.primary-actions{border-top:1px solid var(--border);padding-top:16px}.primary-actions button:last-child{background:var(--accent);border-color:var(--accent);color:#fff}.primary-actions button:last-child:disabled{background:#f0f2ef;border-color:var(--border-strong);color:#9aa49f}.advanced-panel,.review-panel,.simple-disclosure,.result-details{margin:0 18px 18px;border:1px solid var(--border);border-radius:8px;background:var(--surface-warm)}.advanced-panel{margin-top:-4px}.review-panel,.simple-disclosure,.result-details{margin-top:12px}.review-panel,.simple-disclosure{margin-left:18px;margin-right:18px}.advanced-panel>summary,.review-panel>summary,.simple-disclosure>summary,.result-details>summary{min-height:44px;display:flex;align-items:center;cursor:pointer;color:var(--text);font-size:.9rem;font-weight:800;padding:0 12px}.advanced-panel:not([open])>:not(summary),.review-panel:not([open])>:not(summary),.simple-disclosure:not([open])>:not(summary),.result-details:not([open])>:not(summary){display:none}.advanced-panel .protocol-controls,.advanced-panel .canvas-tools,.advanced-panel .precision-panel{margin-left:12px;margin-right:12px}.advanced-panel .toolbar{padding:0 12px 12px}.simple-disclosure{background:transparent}.simple-disclosure .disclosure-grid{padding:0 12px 12px}.result-details{background:transparent}.result-details .status,.result-details .metric-grid,.result-details .kit-box,.result-details .measurement-list,.result-details .finding-list,.blocker-list{margin-left:0;margin-right:0;padding-left:12px;padding-right:12px}.blocker-list h3{margin:0 0 8px;font-size:.92rem}.blocker-list ul{margin:0;padding-left:18px;color:var(--muted);font-size:.86rem}.danger-button:hover:not(:disabled){border-color:var(--red);color:var(--red)}.result-empty{display:flex;gap:12px;align-items:flex-start;border-bottom:1px solid var(--border)}.result-empty svg{width:22px;height:22px;color:var(--amber);flex:0 0 auto}.result-header{border-bottom:1px solid var(--border)}.eyebrow{display:block;color:var(--muted);font-size:.76rem;font-weight:800;text-transform:uppercase}.result-header h2{margin-top:6px;font-size:1.42rem;line-height:1.15}.status,.simple-result{margin:16px 18px 0;display:flex;align-items:flex-start;gap:10px;border-radius:8px;padding:12px;border:1px solid}.simple-result{border-color:#e1bd74;background:var(--amber-soft);color:#744e12}.simple-result-ready{border-color:#9bcbbd;background:var(--green-soft);color:var(--accent-strong)}.simple-result svg{width:20px;height:20px;flex:0 0 auto}.simple-result strong,.simple-result span{display:block}.simple-result span{margin-top:3px;font-size:.88rem}.routing-gate{margin:16px 18px 0;display:flex;align-items:flex-start;gap:10px;border:1px solid #e1bd74;border-radius:8px;background:var(--amber-soft);color:#744e12;padding:12px}.routing-gate-ready{border-color:#9bcbbd;background:var(--green-soft);color:var(--accent-strong)}.routing-gate svg{width:20px;height:20px;flex:0 0 auto}.routing-gate strong,.routing-gate span{display:block}.routing-gate span{margin-top:3px;font-size:.88rem}.routing-gate ul{margin:8px 0 0;padding-left:18px;font-size:.84rem}.status svg{width:20px;height:20px;flex:0 0 auto}.status strong,.status span{display:block}.status span{margin-top:3px;font-size:.88rem}.status-good{background:var(--green-soft);border-color:#9bcbbd;color:var(--accent-strong)}.status-warn{background:var(--amber-soft);border-color:#e1bd74;color:#744e12}.status-bad{background:var(--red-soft);border-color:#e0aaaa;color:#7e2f2f}.metric-grid,.simple-metrics{padding:16px 18px 0;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.simple-metrics{padding-bottom:4px}.metric{min-height:74px;border:1px solid var(--border);border-radius:8px;background:var(--surface-warm);padding:12px}.metric span{display:block;color:var(--muted);font-size:.78rem;font-weight:800;text-transform:uppercase}.metric strong{display:block;margin-top:6px;font-size:1.25rem}.kit-box,.measurement-list,.finding-list{padding:16px 18px 0}.kit-title{display:flex;align-items:center;gap:8px}.kit-title svg{width:18px;height:18px;color:var(--accent)}.kit-title h3,.measurement-list h3,.finding-list h3{margin:0;font-size:.96rem}.pill-row{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px}.pill{min-width:38px;min-height:34px;display:inline-flex;align-items:center;justify-content:center;border-radius:8px;border:1px solid var(--border-strong);background:var(--surface-soft);font-weight:800}.pill-muted{color:#87918d;background:#f0f2ef;border-color:var(--border)}.kit-note{margin:10px 0 0;color:var(--muted);font-size:.86rem}.measurement-row{min-height:34px;display:flex;align-items:center;justify-content:space-between;gap:12px;border-bottom:1px solid var(--border);color:var(--muted);font-size:.9rem}.measurement-row strong{color:var(--text)}.finding{display:grid;grid-template-columns:72px 1fr;gap:10px;border-top:1px solid var(--border);padding:10px 0;font-size:.88rem}.finding span{font-size:.72rem;font-weight:800;text-transform:uppercase}.finding p{margin:0;color:var(--muted)}.finding-critical span{color:var(--red)}.finding-warning span{color:#91600f}.finding-info span{color:var(--accent)}.panel-section{border-top:1px solid var(--border)}.section-heading{margin-bottom:12px}.field-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.field{display:grid;gap:6px;color:var(--muted);font-size:.84rem;font-weight:750}.field-wide{grid-column:1 / -1}.capture-list{margin:0;padding-left:22px;color:var(--muted);font-size:.9rem}.capture-list li{margin:8px 0}.protocol-summary{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.protocol-summary>div{min-height:60px;border:1px solid var(--border);border-radius:8px;background:var(--surface-warm);padding:10px}.protocol-summary span{display:block;color:var(--muted);font-size:.76rem;font-weight:800;text-transform:uppercase}.protocol-summary strong{display:block;margin-top:5px}.capture-stack{margin-top:12px;border-top:1px solid var(--border)}.capture-row{min-height:34px;display:flex;justify-content:space-between;align-items:center;gap:12px;border-bottom:1px solid var(--border);color:var(--muted);font-size:.88rem}.capture-row strong{color:var(--text)}.qa-list{display:grid;gap:8px}.qa-row{min-height:42px;display:grid;grid-template-columns:54px 1fr;align-items:center;gap:10px;border:1px solid var(--border);border-radius:8px;background:var(--surface-warm);padding:8px 10px}.qa-row span{color:#91600f;font-size:.72rem;font-weight:850;text-transform:uppercase}.qa-row strong{font-size:.9rem}.qa-row-good{border-color:#9bcbbd;background:var(--green-soft)}.qa-row-good span{color:var(--accent-strong)}.review-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px}@media(max-width:1040px){.workspace{grid-template-columns:1fr}}@media(max-width:720px){.topbar{align-items:flex-start;flex-direction:column;padding:18px 14px 10px}.workspace{padding:8px 14px 24px}.panel-header,.upload-zone,.protocol-controls,.guided-steps,.capture-guide-card,.precision-panel,.coordinate-entry,.upload-actions{grid-template-columns:1fr}.video-candidate-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.panel-header{display:grid}.image-meta{justify-items:start;text-align:left}.canvas-frame{min-height:300px}.camera-preview{min-height:280px}.capture-guide-overlay{inset:12px}.guide-card-target{left:6%;top:22%;width:38%}.guide-ring-target{left:54%;width:30%}.metric-grid,.field-grid,.protocol-summary{grid-template-columns:1fr}}
