:root{color-scheme:light;--bg:#f5f8f6;--text:#203c39;--muted:#627874;--cyan:#087f70;--purple:#71629f;--card:#fff;--border:#dce9e3;--radius:24px}
*{box-sizing:border-box}html,body{margin:0;padding:0}body{background:radial-gradient(ellipse at 0 0,#e2f4e9,transparent 50%),radial-gradient(ellipse at 100% 10%,#f0eafb,transparent 40%),var(--bg);color:var(--text);min-height:100vh;font-family:"Aptos","Segoe UI Variable","Yu Gothic UI","Hiragino Sans","Meiryo",sans-serif;line-height:1.6;-webkit-font-smoothing:antialiased}a{color:var(--cyan)}button{font:inherit}button,a{-webkit-tap-highlight-color:transparent}button:focus-visible,a:focus-visible,summary:focus-visible{outline:3px solid #8572b4;outline-offset:4px}[hidden]{display:none!important}.wrap{max-width:1120px;margin:0 auto;padding:28px 28px 64px}.topbar{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:40px}.home{font-size:13px;color:#506b65;text-decoration:none;padding:8px 0}.brand{display:flex;align-items:center;gap:10px;font-size:13px;font-weight:700;letter-spacing:.05em}.brand-icon{width:34px;height:34px;border-radius:11px;background:#dff1e9;color:#167e69;display:grid;place-items:center;font-size:23px}.hero{margin:0 0 28px;display:flex;align-items:flex-end;justify-content:space-between;gap:20px}.eyebrow{display:inline-block;font-size:11px;letter-spacing:.14em;color:#577e71;font-weight:700;margin-bottom:8px}.hero h1{margin:0;font-size:clamp(27px,4vw,42px);letter-spacing:-.03em;line-height:1.3}.hero .sub{margin:10px 0 0;color:var(--muted);font-size:14px}.privacy-pill{display:flex;align-items:center;gap:7px;padding:10px 15px;border:1px solid #d1e6d9;border-radius:999px;background:#ffffffa6;font-size:12px;color:#3d7461;white-space:nowrap}.workspace{display:grid;grid-template-columns:minmax(0,1.25fr) minmax(0,.85fr);gap:24px;align-items:start}.card{background:var(--card);border:1px solid var(--border);border-radius:var(--radius);box-shadow:0 8px 28px #30534408;padding:24px}.scanner-card{padding:24px}.card-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:20px}.card-head h2,.hist-head h2{font-size:16px;margin:0;font-weight:700}.card-head h2 small,.hist-head h2 small{display:block;font-weight:400;font-size:10px;letter-spacing:.06em;color:#62786d;margin-top:1px}.camera-state{display:flex;align-items:center;gap:6px;font-size:11px;border-radius:999px;padding:7px 10px;background:#f0f5f2;color:#607c70}.state-dot{width:6px;height:6px;background:#91a89c;border-radius:50%}.camera-state[data-state=live],.camera-state[data-state=detected]{background:#e2f4ec;color:#187a5d}.camera-state[data-state=live] .state-dot,.camera-state[data-state=detected] .state-dot{background:#238967}.camera-state[data-state=error]{color:#a34d35;background:#fff0e7}.stage{position:relative;width:100%;margin:0 auto;aspect-ratio:1/1;border-radius:20px;overflow:hidden;background:radial-gradient(ellipse at 50% 40%,#fff 0,#eaf7ee 65%,#e8edf5 100%);display:flex;align-items:center;justify-content:center;border:1px solid #e0eee5}.stage::before{content:"";position:absolute;inset:13%;border:1px dashed #bdd4c8;border-radius:22px;pointer-events:none}.stage.is-live{background:#173931;border:0}.stage.is-live::before{display:none}#canvas{width:100%;height:100%;object-fit:cover;display:block;opacity:0}.is-live #canvas{opacity:1}#video{position:absolute;width:1px;height:1px;opacity:0;pointer-events:none}.placeholder{position:absolute;text-align:center;padding:25px;color:#53746a;max-width:300px}.placeholder .qr-symbol{display:grid;place-items:center;margin:0 auto 20px;width:100px;height:100px;background:#fff;border:1px solid #d6e7de;border-radius:26px;box-shadow:0 14px 32px #32645112;color:#24816b;font-size:56px;line-height:1}.placeholder b{display:block;font-size:17px;color:#2e5749;margin-bottom:6px}.placeholder p{font-size:12px;margin:0;line-height:1.8}.placeholder small{display:block;font-size:10px;color:#5e796b;margin-top:10px}.scan-frame{position:absolute;inset:16%;pointer-events:none;border:2px solid #b9ffe0;border-radius:16px;box-shadow:0 0 0 100vmax #08241b45;display:none}.scan-frame.show{display:block}.scan-frame::after{content:"";position:absolute;left:8%;right:8%;top:50%;height:2px;background:#c2ffe2;box-shadow:0 0 8px #96dfb766}.scan-frame.show::after{animation:scan-line 3s ease-in-out infinite}@keyframes scan-line{0%,100%{top:12%;opacity:.4}50%{top:88%;opacity:.85}}.btn{appearance:none;border:0;cursor:pointer;font:inherit;font-weight:700;border-radius:14px;min-height:48px;padding:12px 18px;color:white;background:#158774;box-shadow:0 5px 12px #25827418;transition:background .15s,transform .15s}.btn:hover{background:#0d7563;transform:translateY(-1px)}.btn:disabled{opacity:.48;cursor:not-allowed;transform:none;box-shadow:none}.btn.ghost{background:#fff;color:#4e7166;border:1px solid #d9e6df;box-shadow:none}.btn.ghost:hover{background:#f2f8f4}.btn-row{display:flex;flex-wrap:wrap;gap:10px;align-items:center;margin-top:20px}#start-btn{flex:1;min-width:150px}#stop-btn{min-width:90px}.btn svg{width:18px;height:18px;vertical-align:-3px;margin-right:6px}#status{color:#607a70;font-size:12px;min-height:1.6em;margin:13px 0 0;overflow-wrap:anywhere}.result{margin-top:20px;border:1px solid #bdddcc;border-radius:18px;padding:18px;background:#f0faf4;display:none}.result.show{display:block}.result-top{display:flex;align-items:center;gap:8px;margin-bottom:10px;color:#247354;font-size:12px;font-weight:700}.result .lbl{color:#627b6d;font-size:10px;margin-bottom:6px;letter-spacing:.06em}.result .val{word-break:break-all;font-size:14px;line-height:1.7;color:#244b3c}.result .val a{font-weight:700;text-underline-offset:3px}.result .acts{display:flex;flex-wrap:wrap;gap:8px;margin-top:15px}.result .acts .btn{min-height:42px;padding:9px 13px;font-size:12px}.side-column{display:grid;gap:20px}.welcome-card{position:relative;overflow:hidden;background:linear-gradient(120deg,#fff,#f4f7fd);padding:24px}.welcome-card img{display:block;width:100%;height:180px;object-fit:contain;background:#eef8f3;border-radius:17px;margin-bottom:17px}.welcome-card h2{font-size:20px;line-height:1.5;margin:0 0 12px;letter-spacing:-.02em}.welcome-card p{font-size:12px;line-height:1.9;color:#698076;margin:0}.steps{list-style:none;margin:20px 0 0;padding:0;display:grid;gap:12px}.steps li{display:flex;align-items:center;gap:12px;font-size:12px;color:#45695c}.step-number{display:grid;place-items:center;width:30px;height:30px;background:#e4f0e9;border-radius:10px;color:#478269;font-size:11px;font-weight:700;flex-shrink:0}.steps small{display:block;font-size:10px;color:#60796c}.hist-head{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-bottom:14px}.hist-head .btn{min-height:36px;font-size:11px;padding:7px 11px}.history-count{display:inline-block;font-size:10px;font-weight:600;background:#e8f1ec;color:#52715e;padding:2px 7px;border-radius:7px;margin-left:6px}.hist{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:9px;max-height:320px;overflow-y:auto}.hist li{display:flex;align-items:center;gap:10px;padding:12px;border:1px solid #e1ebe5;border-radius:12px;background:#f9fbfa}.hist .history-symbol{display:grid;place-items:center;width:29px;height:29px;border-radius:8px;background:#e8f2ee;color:#59917b;font-size:14px;flex-shrink:0}.hist .txt{flex:1;min-width:0;word-break:break-all;font-size:12px}.hist .mini{appearance:none;min-height:36px;border:1px solid #d5e4da;background:#fff;color:#587264;border-radius:9px;padding:5px 9px;font:inherit;font-size:11px;cursor:pointer;flex-shrink:0}.hist .mini:hover{border-color:#83bba5;color:#20765c}.hist .empty{display:block;text-align:center;border:1px dashed #d8e6dd;background:#f9fcfa;padding:22px 12px;color:#60786a;font-size:12px}.hist .empty span{display:block;font-size:26px;color:#9fbdaa;margin-bottom:7px}.history-note{font-size:10px;color:#62776b;margin:13px 0 0}.footer{display:flex;justify-content:space-between;flex-wrap:wrap;gap:10px;align-items:center;margin-top:26px;font-size:11px;color:#5f7669}.tool-links{display:flex;gap:10px;flex-wrap:wrap}.tool-links a{text-decoration:none;color:#697b8e;background:#eef2f6;padding:8px 12px;border-radius:10px;border:1px solid #e0e6ed}.toast{position:fixed;left:50%;bottom:calc(24px + env(safe-area-inset-bottom));transform:translateX(-50%) translateY(15px);background:#fff;color:#305e4d;border:1px solid #c7ded1;padding:13px 20px;border-radius:16px;box-shadow:0 10px 40px #31564320;font-size:13px;opacity:0;pointer-events:none;transition:opacity .2s,transform .2s;z-index:50;max-width:90vw;text-align:center}.toast.show{opacity:1;transform:translateX(-50%) translateY(0)}
@media(max-width:720px){.wrap{padding:18px 16px 32px}.topbar{margin-bottom:24px}.brand{font-size:11px}.hero{display:block;margin-bottom:22px}.hero h1{font-size:28px}.hero .sub{font-size:12px;line-height:1.8}.privacy-pill{display:inline-flex;margin-top:14px;padding:7px 11px;font-size:10px}.workspace{grid-template-columns:1fr;gap:18px}.scanner-card{padding:18px;border-radius:24px}.card-head{margin-bottom:16px}.camera-state{font-size:10px}.stage{border-radius:18px}.placeholder .qr-symbol{width:84px;height:84px;border-radius:22px;font-size:46px}.placeholder b{font-size:15px}.btn-row{margin-top:16px;gap:8px}.btn{font-size:13px;padding:12px 14px}.welcome-card{padding:20px;display:grid;grid-template-columns:82px minmax(0,1fr);gap:15px;align-items:center}.welcome-card img{width:82px;height:95px;margin:0;border-radius:15px}.welcome-copy h2{font-size:16px;margin:0 0 6px}.welcome-copy p{font-size:11px}.steps{grid-column:1/-1;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:3px 0 0}.steps li{display:block;font-size:10px;line-height:1.7}.step-number{width:26px;height:26px;border-radius:8px;margin-bottom:7px}.steps small{font-size:9px}.card.history-card{padding:20px}.footer{font-size:10px;gap:13px}.tool-links{gap:8px}.tool-links a{padding:8px 10px}.toast{font-size:12px}}
@media(max-width:360px){.wrap{padding-left:12px;padding-right:12px}.scanner-card{padding:14px}.camera-state{padding:6px;font-size:9px}.hero h1{font-size:25px}.btn-row .btn{font-size:12px}.welcome-card{gap:12px;grid-template-columns:65px 1fr}.welcome-card img{width:65px;height:90px}.placeholder{padding:18px}.placeholder .qr-symbol{margin-bottom:14px}.brand{letter-spacing:0}}
@media(prefers-reduced-motion:reduce){*{transition:none!important;animation:none!important}}

.stage[data-state=detected] .scan-frame::after{display:none}