:root{font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif;color:#172635;background:#e9edf1;font-synthesis:none;--surface: #fbfcfd;--paper: #ffffff;--line: #dce4ea;--muted: #607181;--accent: #1f5f8b;--accent-soft: #e9f2f7;--danger: #b42318}*{box-sizing:border-box}html{background:#e9edf1}body{margin:0;background:#e9edf1}button,input{font:inherit}button{min-height:48px;cursor:pointer}button:disabled{cursor:not-allowed;opacity:.52}:focus-visible{outline:3px solid #1f5f8b;outline-offset:3px}.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}.shell{width:min(100%,460px);min-height:100dvh;margin:0 auto;background:var(--surface);box-shadow:0 0 0 1px #dce4ea,0 18px 50px #17263514}.camera-shell{width:100%;max-width:none;min-height:100dvh;background:#000;box-shadow:none}.camera-page{margin:0;width:100%}.camera-shell>.workspace{width:100%;max-width:none;padding:0}.camera-shell .camera-view{width:100%}.topbar{position:relative;z-index:3;display:flex;align-items:center;gap:10px;min-height:70px;padding:max(12px,env(safe-area-inset-top)) 18px 12px;border-bottom:1px solid var(--line);background:var(--surface)}.brand{flex-shrink:0;white-space:nowrap;font-size:1rem;font-weight:780;letter-spacing:-.02em}.nav-tabs{position:fixed;z-index:10;right:0;bottom:0;left:0;width:min(100%,460px);margin-inline:auto;display:grid;grid-template-columns:1fr 1fr;gap:4px;padding:8px 12px max(8px,env(safe-area-inset-bottom));border-top:1px solid var(--line);background:#fbfcfdf5;box-shadow:0 -8px 20px #1726350b;-webkit-backdrop-filter:blur(14px);backdrop-filter:blur(14px)}.nav-tab{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:48px;border:0;border-radius:12px;background:transparent;color:var(--muted);font-weight:700}.nav-tab svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-linecap:round;stroke-linejoin:round;stroke-width:1.8}.nav-tab.active{color:var(--accent);background:var(--accent-soft)}.count{display:inline-grid;min-width:23px;height:23px;place-items:center;padding:0 5px;border-radius:999px;color:var(--accent);background:#d7e8f1;font-size:12px}.workspace{width:100%;margin:0 auto;padding:24px 16px calc(108px + env(safe-area-inset-bottom))}.camera-view,.list-view{width:100%}.camera-intro{margin:3px 4px 18px}.camera-intro h1,.section-heading h1{margin:2px 0 5px;font-size:1.6rem;letter-spacing:-.035em}.empty{margin:22px 0;padding:30px 20px;border:1px solid var(--line);border-radius:18px;background:var(--paper);text-align:center}.empty h2{margin:10px 0 6px;font-size:1.12rem}.actions,.button-row{display:flex;flex-wrap:wrap;gap:10px}.actions>.button,.capture-actions>.button{flex:1 1 190px}.capture-entry>.button{flex-basis:100%}.button{border:1px solid var(--accent);border-radius:12px;padding:10px 16px;color:#fff;background:var(--accent);font-weight:750}.button.secondary{color:var(--accent);background:var(--paper)}.button.tertiary{border-color:var(--line);color:#263b4b;background:var(--paper)}.section-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:3px 4px 18px}.receipt-list{display:grid;gap:9px}.receipt-row{display:flex;align-items:center;gap:11px;width:100%;min-height:80px;padding:10px;border:1px solid var(--line);border-radius:15px;background:var(--paper);color:#172635;text-align:left}.receipt-row img{flex:0 0 47px;width:47px;height:59px;border-radius:8px;object-fit:cover;background:#eef2f5}.receipt-row>span{display:grid;min-width:0;flex:1;gap:4px}.receipt-row strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:.92rem}.receipt-row small,.receipt-row em{color:var(--muted);font-size:.75rem;font-style:normal}.receipt-row em{white-space:nowrap}.row-chevron{flex:0 0 18px;width:18px;height:18px;fill:none;stroke:var(--muted);stroke-linecap:round;stroke-linejoin:round;stroke-width:2}.live-camera{position:relative;width:100%;height:100dvh;min-height:100svh;overflow:hidden;background:#000;color:#fff}.live-camera-video{position:absolute;top:0;right:0;bottom:0;left:0;width:100%;height:100%;object-fit:cover;background:#000}.live-camera-brand{position:absolute;z-index:1;top:max(14px,env(safe-area-inset-top));left:20px;padding:7px 9px;border-radius:8px;color:#fff;background:#0009;font-size:.95rem;font-weight:750}.live-camera-status{position:absolute;z-index:1;top:max(56px,calc(env(safe-area-inset-top) + 42px));left:20px;max-width:calc(100% - 40px);padding:7px 9px;border-radius:8px;color:#fff;background:#0009;font-size:.8rem}.live-camera-status:empty{display:none}.live-camera-controls{position:absolute;z-index:2;right:20px;bottom:max(22px,calc(env(safe-area-inset-bottom) + 14px));left:20px;display:grid;grid-template-columns:1fr auto 1fr;align-items:center}.live-camera-controls:before{position:absolute;z-index:-1;top:-24px;right:-20px;bottom:-40px;left:-20px;content:"";background:linear-gradient(transparent,#000b);pointer-events:none}.live-camera-controls button{color:#fff;text-shadow:0 1px 8px #0008}.live-camera-list,.live-camera-gallery{display:inline-flex;align-items:center;gap:7px;width:fit-content;min-width:48px;padding:8px;border:0;border-radius:12px;background:#0006;font-weight:700}.live-camera-list{justify-self:start}.live-camera-gallery{justify-self:end}.live-camera-list svg,.live-camera-gallery svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-linecap:round;stroke-linejoin:round;stroke-width:1.8}.live-camera-list b{display:inline-grid;min-width:22px;height:22px;place-items:center;border-radius:99px;color:#172635;background:#fff;font-size:.75rem;text-shadow:none}.live-camera-list span{display:none}.live-camera-shutter{display:inline-grid;width:76px;height:76px;place-items:center;border:4px solid #fff;border-radius:50%;background:#fff5}.live-camera-shutter svg{width:34px;height:34px;fill:none;stroke:#fff;stroke-linecap:round;stroke-linejoin:round;stroke-width:1.5}.live-camera-shutter:disabled{opacity:.42}.live-camera-error-actions{position:absolute;z-index:2;top:max(118px,calc(env(safe-area-inset-top) + 102px));right:20px;left:20px;display:flex;flex-wrap:wrap;gap:8px}.live-camera-retry,.live-camera-native,.live-camera-cancel{min-height:48px;border:1px solid #fff9;border-radius:12px;padding:8px 13px;color:#fff;background:#0009;font-weight:700}.live-camera-cancel{position:absolute;z-index:2;top:max(14px,env(safe-area-inset-top));right:20px}.live-camera :focus-visible,.camera-review :focus-visible{outline-color:#fff}.camera-review{position:relative;width:100%;height:100dvh;min-height:100svh;overflow:hidden;background:#000;color:#fff}.camera-review .photo-frame{position:absolute;top:0;right:0;bottom:0;left:0;display:flex;align-items:center;justify-content:center;width:100%;height:100%;min-height:0;max-height:none;padding:0;border-radius:0;overflow:hidden;background:#000}.camera-review .photo-frame img{width:100%;height:100%;max-width:100%;max-height:100%;margin:0;object-fit:contain;cursor:default}.camera-review-list{position:absolute;z-index:2;top:max(14px,env(safe-area-inset-top));right:16px;display:inline-flex;align-items:center;gap:6px;padding:8px 12px;border:0;border-radius:12px;background:#0009;color:#fff;font-weight:700}.camera-review-list svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.8}.camera-review-error{position:absolute;z-index:2;top:max(70px,calc(env(safe-area-inset-top) + 52px));left:20px;right:20px;margin:0;padding:10px 12px;border-radius:10px;background:#000b;color:#ffb4b4;font-size:.86rem}.camera-review-controls{position:absolute;z-index:2;right:0;bottom:0;left:0;display:grid;grid-template-columns:1fr 1fr;gap:12px;padding:28px 20px max(20px,calc(env(safe-area-inset-bottom) + 12px));background:linear-gradient(transparent,#000b)}.camera-review-controls .button{min-height:52px}.camera-review-controls .secondary{color:#fff;border-color:#fff9;background:#0006}.photo-panel,.form-panel{border:1px solid var(--line);border-radius:17px;background:var(--paper)}.photo-panel{padding:11px}.photo-frame{min-height:260px;max-height:54vh;display:flex;align-items:flex-start;justify-content:flex-start;overflow:auto;border-radius:12px;background:#eef2f5;padding:8px}.photo-frame img{flex-shrink:0;display:block;width:auto;max-width:100%;max-height:min(52vh,550px);height:auto;margin-inline:auto;object-fit:contain;cursor:zoom-in}.photo-frame img.zoomed{width:165%;max-width:none;max-height:none;margin:0;cursor:zoom-out}.camera-view>.photo-frame img{cursor:default}.photo-toolbar{display:flex;gap:7px;margin-top:9px}.photo-toolbar .button{flex:1 1 0}.photo-toolbar .button{min-width:0;padding-inline:7px;font-size:.83rem}.form-panel{padding:18px 16px}.form-panel h1{margin:0 0 18px;font-size:1.35rem;letter-spacing:-.025em}.field{display:grid;gap:7px;margin:0 0 15px}.field label{font-size:.86rem;font-weight:750}.field input{width:100%;min-height:48px;border:1px solid #b9c7d2;border-radius:11px;padding:10px 12px;color:#172635;background:#fff;font-size:16px}.field input[aria-invalid=true]{border-color:var(--danger)}.field-error{margin:-7px 0 0;color:var(--danger);font-size:.79rem}.field-label{display:flex;align-items:baseline;justify-content:space-between;gap:8px}.flag{margin:0 0 15px;padding:10px 12px;border-left:3px solid var(--accent);color:var(--muted);background:var(--accent-soft);font-size:.82rem}.status{margin:13px 0 0;color:var(--muted);font-size:.85rem;line-height:1.4}.error{color:var(--danger);font-size:.84rem;line-height:1.4}.diagnostic{margin-top:20px;color:var(--muted);font-size:.78rem}.diagnostic pre{max-height:180px;overflow:auto;white-space:pre-wrap}.detail-heading{display:flex;align-items:center;gap:9px;min-width:0;margin:0 2px 13px}.detail-heading .button{flex:0 0 auto;min-height:44px;padding-inline:11px}.review-grid{display:grid;gap:14px}.capture-actions{margin-top:12px}.capture-entry{display:grid;gap:14px;margin-top:20px}.capture-choice-primary,.capture-choice-gallery{width:100%;justify-content:center;touch-action:manipulation;transition:transform .12s ease-out}.capture-choice-primary:not(:disabled):active,.capture-choice-gallery:not(:disabled):active{transform:scale(.985)}.capture-choice-primary{min-height:clamp(190px,30dvh,240px);display:flex;flex-direction:column;align-items:center;gap:13px;border-radius:24px;font-size:1.1rem}.capture-choice-gallery{min-height:76px;display:flex;align-items:center;justify-content:flex-start;gap:12px;border-radius:20px;padding:10px 16px}.capture-icon-disc,.gallery-icon-disc{display:inline-grid;place-items:center;flex:0 0 auto;border-radius:50%;background:#e9f2f7;color:var(--accent)}.capture-icon-disc{width:88px;height:88px}.capture-icon-disc svg{width:52px;height:52px;fill:none;stroke:currentColor;stroke-linecap:round;stroke-linejoin:round;stroke-width:1.35}.gallery-icon-disc{width:48px;height:48px}.gallery-icon-disc svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-linecap:round;stroke-linejoin:round;stroke-width:1.7}.analysis-actions{margin:12px 0 0}.analysis-actions>.button{flex:1 1 170px}.secondary-actions{margin-top:4px}.secondary-actions>.button:first-child{flex:1 1 100%}.analysis-status,.analysis-error{margin:10px 2px 0}.dialog-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:20;display:grid;place-items:center;padding:20px;background:#17263555}.discard-dialog{width:min(100%,420px);padding:21px;border-radius:16px;background:var(--paper);box-shadow:0 16px 60px #17263522}.discard-dialog h2{margin:0 0 18px;font-size:1.15rem}.discard-dialog p{color:var(--muted);line-height:1.5}.reanalysis-confirm{margin-top:15px;padding:13px;border:1px solid var(--line);border-radius:12px}@media (hover: hover) and (pointer: fine){.button:not(:disabled):hover{filter:brightness(.96)}.receipt-row:not(:disabled):hover{border-color:#9bb9ca;background:#fcfeff}.nav-tab:not(:disabled):hover{background:#f0f5f8}}@media (min-width: 700px){.shell{min-height:100dvh;margin-block:0;border-radius:0;overflow:hidden}.nav-tabs{border-radius:0}}@media (prefers-reduced-motion: reduce){*,*:before,*:after{scroll-behavior:auto!important;transition-duration:.01ms!important;animation-duration:.01ms!important;animation-iteration-count:1!important}}
