:root{color-scheme:dark;--bg:#101611;--panel:#19201a;--ink:#f4f6ee;--muted:#a4afa2;--line:#303b30;--accent:#d6ec9b;--warm:#f3b67a;--danger:#ffb0a7;--safe-top:env(safe-area-inset-top,0px);--safe-bottom:env(safe-area-inset-bottom,0px)}
*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--ink);font-family:-apple-system,BlinkMacSystemFont,"Hiragino Sans","Noto Sans JP",sans-serif;-webkit-font-smoothing:antialiased}button,input{font:inherit}button{cursor:pointer;color:inherit;touch-action:manipulation;-webkit-tap-highlight-color:transparent}button:disabled{opacity:.4;cursor:default}button:focus-visible,a:focus-visible,input:focus-visible,summary:focus-visible{outline:3px solid var(--warm);outline-offset:4px}button{border:0}button svg{width:23px;fill:none;stroke:currentColor;stroke-width:1.5}h1,h2,h3,p{margin-top:0}button,.pill{user-select:none}body:has(dialog[open]){overflow:hidden}.app-shell{width:min(100%,560px);margin:auto;padding-top:var(--safe-top)}.topbar{height:77px;display:flex;align-items:center;justify-content:space-between;padding:0 24px}.brand{display:flex;gap:10px;align-items:center;font-size:14px;font-weight:700;letter-spacing:.06em}.brand-dot{width:11px;height:11px;border-radius:50%;background:var(--accent);box-shadow:0 0 0 5px #d6ec9b0b}.brand small{display:block;font-size:9px;letter-spacing:.28em;font-weight:500;color:var(--muted);margin-top:5px}.icon-button{display:flex;gap:7px;align-items:center;background:none;padding:10px 0 10px 14px;font-size:12px;color:var(--muted)}.icon-button svg{width:22px}.camera-stage{height:min(52dvh,540px);min-height:320px;position:relative;overflow:hidden;background:#20271f;margin:0 12px;border-radius:22px}.camera-stage video{width:100%;height:100%;object-fit:contain;background:#101611;display:block}.camera-shade{position:absolute;inset:0;background:linear-gradient(180deg,#10161170,transparent 30%,transparent 75%,#10161195);pointer-events:none}.welcome{position:absolute;inset:0;padding:64px 30px 28px;display:flex;flex-direction:column;align-items:flex-start;justify-content:center;background:radial-gradient(ellipse at 85% 15%,#4a5636 0,transparent 55%),#20291f;z-index:2}.eyebrow{font-size:10px;letter-spacing:.16em;color:var(--muted);text-transform:uppercase}.welcome h1{font-size:clamp(29px,8.2vw,43px);line-height:1.4;letter-spacing:-.05em;font-weight:600;margin:15px 0}.welcome em{font-style:normal;color:var(--accent)}.welcome p{font-size:12px;line-height:1.9;color:#bfc9b8;margin-bottom:22px}.primary{display:flex;align-items:center;justify-content:space-between;gap:35px;background:var(--accent);color:#1a2415;border-radius:100px;padding:15px 20px;font-weight:700;font-size:14px;min-height:48px}.primary span{font-size:20px;font-weight:400}.text-button{padding:14px 0;background:none;color:#bbc4b3;font-size:11px}.camera-top{position:absolute;z-index:3;top:17px;left:18px;right:18px;display:flex;justify-content:space-between;align-items:center;pointer-events:none}.pill{border-radius:20px;background:#101611aa;backdrop-filter:blur(8px);font-size:10px;padding:6px 9px;letter-spacing:.02em}.pill:empty{display:none}.viewfinder-corners{position:absolute;inset:24% 9% 20%;pointer-events:none;opacity:0}.camera-stage.active .viewfinder-corners{opacity:.5}.viewfinder-corners i{position:absolute;width:17px;height:17px;border-color:#edf3e6;border-style:solid}.viewfinder-corners i:nth-child(1){left:0;top:0;border-width:1px 0 0 1px}.viewfinder-corners i:nth-child(2){right:0;top:0;border-width:1px 1px 0 0}.viewfinder-corners i:nth-child(3){right:0;bottom:0;border-width:0 1px 1px 0}.viewfinder-corners i:nth-child(4){left:0;bottom:0;border-width:0 0 1px 1px}.focus-hint{position:absolute;bottom:18px;width:100%;text-align:center;color:#e4eadf;font-size:10px;letter-spacing:.06em;opacity:0}.camera-stage.active .focus-hint{opacity:1}.capture-flash{position:absolute;inset:0;background:white;opacity:0;pointer-events:none}.capture-flash.flash{animation:flash .16s ease-out}@keyframes flash{from{opacity:.3}to{opacity:0}}.capture-panel{padding:16px 26px 10px}.state-line{display:flex;align-items:center;justify-content:space-between;font-size:10px;min-height:28px;color:var(--muted)}#connectionState{display:flex;gap:7px;align-items:center}.status-dot{height:5px;width:5px;border-radius:50%;display:inline-block;background:var(--accent)}.connect-button{border:1px solid var(--line);background:none;font-size:11px;padding:8px 12px;border-radius:22px;color:var(--accent);min-height:36px}.capture-controls{display:flex;justify-content:space-between;align-items:center;margin:17px 0 12px;padding:0 17px}.shutter{width:81px;height:81px;border-radius:50%;padding:5px;border:1.5px solid #c5d1bd;background:transparent;display:grid;place-items:center;transition:transform .1s}.shutter span{background:var(--ink);width:100%;height:100%;border-radius:50%;box-shadow:inset 0 0 0 1px #fff4}.shutter:active:not(:disabled){transform:scale(.94)}.shutter.saving span{background:var(--accent)}.last-shot{width:45px;height:51px;background:#283026;border:1px solid #43503f;border-radius:9px;overflow:hidden;padding:0;color:#b4bfae;font-size:10px}.last-shot img{width:100%;height:100%;object-fit:cover}.round-button{border:1px solid var(--line);background:none;border-radius:50%;height:42px;width:42px;display:grid;place-items:center;color:#b0baa8}.round-button svg{width:20px}.capture-caption{font-size:10px;color:var(--muted);text-align:center;min-height:30px;line-height:1.7}.queue-strip{display:grid;grid-template-columns:repeat(3,1fr);padding:16px 0 9px;border-top:1px solid var(--line);margin-top:9px}.queue-strip div{display:flex;align-items:baseline;justify-content:center;gap:7px;border-right:1px solid var(--line)}.queue-strip div:last-child{border:0}.queue-strip b{font-size:17px;font-weight:500;font-variant-numeric:tabular-nums}.queue-strip span{font-size:9px;color:var(--muted)}footer{display:flex;justify-content:space-between;gap:12px;color:#7e8d79;font-size:9px;padding:12px 24px calc(15px + var(--safe-bottom));line-height:1.6}.notice{margin:7px 20px;padding:12px 14px;background:#422c23;color:#ffd6b1;font-size:12px;line-height:1.6;border-radius:10px}.sheet{width:min(100%,560px);max-width:560px;max-height:92dvh;max-height:calc(100dvh - var(--safe-top));border:1px solid #394535;border-bottom:0;border-radius:23px 23px 0 0;background:#1b241b;color:var(--ink);position:fixed;margin:auto auto 0;padding:26px 22px calc(30px + var(--safe-bottom));overscroll-behavior:contain}.sheet::backdrop{background:#070d09b8;backdrop-filter:blur(4px)}.sheet-head{display:flex;justify-content:space-between;align-items:flex-start;gap:15px}.sheet h2{font-size:23px;font-weight:500;letter-spacing:-.04em;margin:7px 0 16px}.sheet .eyebrow{font-size:9px}.close-button{background:#2e382b;width:35px;height:35px;border-radius:50%;font-size:25px;font-weight:200;line-height:1}.sheet-note{font-size:11px;color:#a5b09e;line-height:1.8}.shot-list{display:grid;gap:10px}.shot-row{display:flex;gap:14px;text-align:left;background:#222d21;border:1px solid #354131;border-radius:13px;padding:11px;width:100%;align-items:center}.shot-row img{width:62px;height:76px;object-fit:cover;border-radius:7px;background:#111}.shot-row .shot-info{min-width:0;flex:1}.shot-row time{font-size:10px;color:var(--muted)}.shot-row strong{display:block;font-size:13px;line-height:1.5;font-weight:500;margin:7px 0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.shot-row small{font-size:10px;color:var(--warm);display:block;line-height:1.7}.shot-row.verified small{color:var(--accent)}.empty-state{padding:50px 15px;text-align:center;font-size:13px;color:var(--muted);line-height:1.8}.detail-image-wrap{background:#0b100c;position:relative;overflow:auto;border-radius:12px;max-height:48dvh;text-align:center}.detail-image-wrap img{max-width:100%;display:block;margin:auto;height:auto}.detail-image-wrap.zoomed img{max-width:none;width:200%}.detail-image-wrap svg{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;display:none}.detail-image-wrap.overlay svg{display:block}.detail-image-wrap.zoomed svg{width:200%}.detail-image-wrap polygon{fill:#eecf4920;stroke:#f5d64d;stroke-width:2;vector-effect:non-scaling-stroke}.detail-toolbar{display:flex;gap:10px;justify-content:space-between;align-items:center;font-size:10px;color:var(--muted);margin:11px 0 20px}.detail-toolbar label{display:flex;align-items:center;gap:4px}.detail-toolbar input{accent-color:var(--accent)}.small-button{padding:9px 10px;border-radius:20px;background:#2e3b29;font-size:10px;white-space:nowrap}.detail-status{font-size:11px;color:var(--accent);line-height:1.8;padding-bottom:14px}.extracted{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:20px}.extracted span{background:#394630;color:#dfeecb;border-radius:6px;font-size:12px;padding:7px 10px}.detail-subhead{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-bottom:12px}.detail-subhead h3{font-size:14px;font-weight:500;margin:0}.ocr-text{font:12px/1.9 ui-monospace,SFMono-Regular,monospace;white-space:pre-wrap;overflow-wrap:anywhere;background:#131b13;border:1px solid #303c2b;border-radius:12px;padding:16px;max-height:340px;overflow:auto}details{font-size:11px;color:#b7c3ad;margin:18px 0}summary{cursor:pointer;padding:8px 0}#lineDetails p{padding:9px 0;border-top:1px solid var(--line);line-height:1.6;overflow-wrap:anywhere}#lineDetails .low{color:var(--warm)}.export-buttons{display:flex;flex-wrap:wrap;gap:8px;margin-top:20px}.secondary{background:#2d3b27;border:1px solid #46573b;border-radius:10px;padding:12px 14px;font-size:12px;min-height:44px}.export-buttons .secondary{flex:1;white-space:nowrap}.howto{counter-reset:steps;list-style:none;padding:0;margin:5px 0 26px}.howto li{position:relative;padding:10px 0 17px 36px;counter-increment:steps}.howto li::before{content:"0" counter(steps);position:absolute;left:0;top:12px;color:var(--accent);font-size:11px}.howto b{display:block;font-size:13px;font-weight:500;margin-bottom:7px}.howto span,.info-card p{font-size:11px;color:var(--muted);line-height:1.9}.info-card{border-top:1px solid var(--line);padding:19px 0 8px}.info-card b{font-size:13px;font-weight:500}.info-card p{margin-top:9px}.error-text{color:var(--danger)}[hidden]{display:none!important}
@media(min-width:700px){body{padding:25px 0;background:radial-gradient(ellipse at 20% 0,#263024,#101611 65%)}.app-shell{border:1px solid #344031;border-radius:30px;overflow:hidden;box-shadow:0 35px 100px #0006}.camera-stage{height:480px}.topbar{height:85px}.capture-panel{padding-bottom:18px}}
@media(max-height:740px){.topbar{height:60px}.camera-stage{min-height:280px;height:46dvh}.welcome{padding:40px 25px 15px}.welcome h1{font-size:29px;margin:10px 0}.welcome p{margin-bottom:10px}.capture-controls{margin-top:10px}.shutter{width:70px;height:70px}.queue-strip{padding-top:10px}.capture-panel{padding-top:9px}.capture-caption{min-height:25px}}
@media(prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}