:root{--purple:#6b46a5;--purple-dark:#51317f;--purple-light:#f0eaf8;--ink:#292235;--muted:#817b8a;--line:#ebe7ef;--bg:#f5f4f7;--green:#31805d;--red:#b23b4e;--font:-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif}
*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;background:var(--bg);color:var(--ink);font:14px/1.5 var(--font);-webkit-tap-highlight-color:transparent}button,input{font:inherit}button,a,input{touch-action:manipulation}button{cursor:pointer}button:disabled{cursor:wait;opacity:.6}button:focus-visible,a:focus-visible{outline:3px solid #b5a0d4;outline-offset:3px}button{border:0}a{color:inherit;text-decoration:none}svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;flex:none}.svg-defs{position:absolute;width:0;height:0;overflow:hidden}[hidden]{display:none!important}.app-shell{max-width:600px;margin:auto;padding:0 20px calc(30px + env(safe-area-inset-bottom))}.app-header{display:flex;align-items:center;justify-content:space-between;padding:27px 0 24px}.brand{display:flex;align-items:center;gap:12px}.brand-mark{display:grid;place-items:center;width:43px;height:43px;border-radius:13px;background:var(--purple);color:white;font-size:28px;font-weight:750;letter-spacing:-2px;padding-right:2px}.brand strong{display:block;font-size:20px;letter-spacing:.5px;line-height:1.4}.brand small{display:block;color:var(--muted);font-size:11px;letter-spacing:1.2px;margin-top:2px}.header-actions{display:flex;gap:5px}.icon-button{position:relative;width:42px;height:42px;border-radius:50%;background:transparent;display:inline-grid;place-items:center;color:#6c6476}.icon-button:hover{background:var(--purple-light)}.count{position:absolute;top:0;right:0;border-radius:9px;font-size:9px;min-width:16px;height:16px;padding:1px 4px;background:var(--purple);color:white}.scanner-card{padding:22px;background:white;border:1px solid var(--line);border-radius:22px;box-shadow:0 5px 22px #30223f03}.section-title{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-bottom:18px}h1,h2,h3,p{margin:0}h1{font-size:17px;font-weight:650}.source-badge{display:flex;gap:6px;align-items:center;background:#f7f6f9;color:#857c91;border:1px solid #f0edf4;padding:4px 8px;border-radius:7px;font-size:10px;white-space:nowrap}.source-badge>span{width:5px;height:5px;background:#9981b9;border-radius:50%}.viewfinder{position:relative;overflow:hidden;background:#f3f0f7;border:1px solid #e9e2f0;border-radius:14px;aspect-ratio:1.75;isolation:isolate}.viewfinder.is-active{background:#161319;border-color:#322b3c}.viewfinder video{width:100%;height:100%;object-fit:cover;display:none}.viewfinder.is-active video{display:block}.camera-placeholder{height:100%;display:flex;align-items:center;justify-content:center;flex-direction:column}.camera-icon{width:52px;height:52px;display:grid;place-items:center;border-radius:16px;color:var(--purple);background:#e8e0f1;margin-bottom:13px}.camera-icon svg{width:29px;height:29px}.camera-placeholder p{font-size:14px;color:#6d5b83;font-weight:550}.camera-placeholder small{margin-top:6px;color:#9a8ea9;font-size:11px}.scan-overlay{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center}.scan-target{position:relative;width:83%;height:40%;box-shadow:0 0 0 200px #0004;border-radius:8px}.scan-target i{position:absolute;width:24px;height:24px;border-color:#e3d3ff;border-style:solid;border-width:0}.scan-target i:nth-child(1){top:0;left:0;border-top-width:3px;border-left-width:3px;border-radius:6px 0 0}.scan-target i:nth-child(2){top:0;right:0;border-top-width:3px;border-right-width:3px;border-radius:0 6px 0 0}.scan-target i:nth-child(3){bottom:0;left:0;border-bottom-width:3px;border-left-width:3px;border-radius:0 0 0 6px}.scan-target i:nth-child(4){bottom:0;right:0;border-bottom-width:3px;border-right-width:3px;border-radius:0 0 6px}.scan-line{position:absolute;inset:30% 8px auto;height:2px;background:#caa6ff;box-shadow:0 0 10px #ba8dff;animation:sweep 2.4s ease-in-out infinite}.viewfinder-hint{position:absolute;bottom:15px;font-size:11px;color:white;text-shadow:0 1px 3px #000}.camera-tools{position:absolute;top:10px;right:10px;display:flex;gap:7px}.camera-tool{width:33px;height:33px;background:#0007;border:1px solid #ffffff3a;color:white;display:grid;place-items:center;border-radius:50%}.camera-tool svg{width:17px;height:17px}.camera-tool[aria-pressed=true]{background:#f5e1a9;color:#51401c}.camera-message{text-align:center;color:var(--muted);font-size:11px;min-height:36px;padding:12px 0 10px}.camera-message.error{color:var(--red)}.primary-button{height:52px;display:flex;align-items:center;justify-content:center;gap:10px;width:100%;border-radius:12px;background:var(--purple);color:white;font-weight:600;font-size:15px;box-shadow:0 4px 8px #6b46a518}.primary-button:hover{background:var(--purple-dark)}.primary-button svg{width:21px;height:21px}.alternative-actions{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:12px}.text-button{display:inline-flex;align-items:center;gap:6px;color:#7b688f;font-size:11px;background:none;padding:6px 0}.text-button svg{width:15px;height:15px}.fine-print{font-size:10px;color:#b0a8ba}.manual-area{border-top:1px solid var(--line);margin-top:13px;padding-top:16px}.manual-area label{display:block;color:#87808f;font-size:11px;margin-bottom:9px}.manual-area form{height:45px;display:flex;border:1px solid #e7e1ec;border-radius:10px;overflow:hidden;background:#fdfcfe}.manual-area form:focus-within{border-color:#ac92c8;box-shadow:0 0 0 3px #6b46a50a}.manual-area input{min-width:0;flex:1;width:100%;padding:0 12px;outline:none;border:0;color:var(--ink);background:transparent;letter-spacing:1px;font:15px ui-monospace,SFMono-Regular,Consolas,monospace;text-transform:uppercase}.manual-area input::placeholder{color:#b4aaba;font-size:12px;letter-spacing:.4px}.manual-area form button{display:flex;align-items:center;gap:7px;flex-shrink:0;background:transparent;color:var(--purple);font-size:12px;font-weight:600;padding:0 13px}.manual-area form button svg{width:16px;height:16px}.lookup-feedback{color:var(--red);font-size:11px;margin-top:8px}.results-section{margin-top:24px;scroll-margin-top:15px}.results-heading{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:0 3px 12px}.results-heading h2{font-size:14px;font-weight:600}.results-heading>span{font-size:10px;color:var(--muted)}.empty-state{border:1px dashed #dfd8e8;border-radius:18px;padding:36px 14px;text-align:center;color:var(--muted)}.empty-icon{display:grid;place-items:center;width:42px;height:42px;margin:0 auto 12px;border:1px solid #e5dfeb;border-radius:13px;background:#f9f7fc;color:#b9aacb}.empty-icon svg{width:21px;height:21px}.empty-state h3{font-size:13px;font-weight:500;color:#9b90a7}.empty-state p{font-size:10px;margin-top:6px;color:#b0a6ba}.product-card{overflow:hidden;border-radius:20px;border:1px solid var(--line);background:white;margin-bottom:14px}.product-image-button{display:block;position:relative;width:100%;background:white;padding:16px 20px;border-bottom:1px solid #f2eef5;aspect-ratio:1.12;overflow:hidden}.product-image-button img{display:block;width:100%;height:100%;object-fit:contain}.image-hint{position:absolute;bottom:12px;right:12px;font-size:10px;background:#f4f1f8e8;color:#8d7d9b;border-radius:7px;padding:4px 8px}.product-copy{padding:20px}.match-pill{display:inline-flex;align-items:center;gap:5px;color:var(--green);font-size:10px;font-weight:500;background:#eef6f0;padding:3px 7px;border-radius:5px;margin-bottom:12px}.match-pill svg{width:12px;height:12px}.product-topline{display:flex;justify-content:space-between;align-items:center;gap:10px}.inactive-pill{background:#fff2df;color:#976a24;font-size:10px;padding:3px 7px;border-radius:5px;margin-bottom:12px}.asin-label{color:var(--muted);font-size:10px;letter-spacing:1.6px}.asin-row{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:2px}.asin-code{font:650 clamp(23px,6vw,29px)/1.5 ui-monospace,SFMono-Regular,Consolas,monospace;letter-spacing:1px;overflow-wrap:anywhere}.asin-row .icon-button{width:34px;height:34px}.asin-row .icon-button svg{width:17px;height:17px}.product-name{font-size:16px;font-weight:550;line-height:1.6;margin-top:7px;overflow-wrap:anywhere}.product-details{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin-top:17px;padding-top:15px;border-top:1px solid var(--line)}.product-details dt{color:#a297ad;font-size:10px;margin-bottom:4px}.product-details dd{margin:0;color:#6d6278;font-size:12px;overflow-wrap:anywhere}.product-details dd.mono{font-family:ui-monospace,SFMono-Regular,Consolas,monospace;letter-spacing:.3px}.missing-image{height:100%;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:10px;color:#a79ab7;font-size:12px;background:#faf8fc;border-radius:10px}.missing-image svg{width:35px;height:35px}.match-warning{padding:13px 15px;margin-bottom:12px;border-radius:12px;font-size:12px;background:#fff5e5;color:#916622;line-height:1.7}.result-state{border:1px solid var(--line);border-radius:18px;background:white;padding:28px 20px;text-align:center}.result-state h3{font-size:15px;margin:12px 0 7px}.result-state p{font-size:12px;color:var(--muted);line-height:1.8;overflow-wrap:anywhere}.result-state code{color:var(--purple);background:var(--purple-light);display:inline-block;padding:6px 12px;border-radius:7px;letter-spacing:1px;font-size:14px;margin:7px 0}.result-state .text-button{margin-top:12px}.state-mark{display:grid;place-items:center;width:40px;height:40px;margin:auto;color:var(--purple);background:var(--purple-light);border-radius:13px;font-size:23px}.spinner{width:25px;height:25px;border:2px solid #ede6f4;border-top-color:var(--purple);border-radius:50%;animation:spin .75s linear infinite;margin:6px auto 16px}.page-footer{display:flex;align-items:center;justify-content:center;gap:9px;font-size:9px;letter-spacing:.1px;color:#b2a9bc;margin-top:26px}.page-footer i{width:3px;height:3px;background:#c4bbce;border-radius:50%}.next-bar{position:fixed;bottom:0;left:0;right:0;z-index:5;background:#faf9fceF;border-top:1px solid #e9e3ef;backdrop-filter:blur(12px);padding:10px 20px calc(10px + env(safe-area-inset-bottom))}.next-bar .primary-button{max-width:558px;margin:auto}.has-result .app-shell{padding-bottom:calc(105px + env(safe-area-inset-bottom))}dialog{padding:0;border:0;color:var(--ink);font-family:var(--font)}dialog::backdrop{background:#21152e6b;backdrop-filter:blur(2px)}.sheet-dialog{width:min(560px,calc(100% - 24px));max-height:85dvh;border-radius:22px;box-shadow:0 18px 80px #25133226}.dialog-header{padding:20px 22px 15px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--line);position:sticky;top:0;background:white;z-index:1}.dialog-header h2{font-size:17px}.dialog-header p{font-size:10px;color:var(--muted);margin-top:4px}.dialog-header .icon-button{width:34px;height:34px}.history-item{display:flex;align-items:center;gap:12px;text-align:left;padding:15px 22px;width:100%;background:white;border-bottom:1px solid #f2eef5}.history-item:hover{background:#faf7fd}.history-item>svg{width:18px;height:18px;color:#b8aac8}.history-item .history-copy{flex:1;min-width:0}.history-item strong{font:550 13px/1.5 ui-monospace,SFMono-Regular,Consolas,monospace;letter-spacing:.5px}.history-item p{font-size:11px;color:#8a7d96;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-top:3px}.history-item time{color:#b1a6bb;font-size:10px;flex-shrink:0}.clear-history{width:100%;padding:19px;background:white;color:#9a6c83;font-size:12px}.history-empty{padding:42px 20px;color:var(--muted);font-size:12px;text-align:center}.help-content{padding:20px 23px;font-size:12px;color:#776b83}.help-content ol{padding-left:18px;margin:0}.help-content li{padding-left:3px;margin-bottom:14px;line-height:1.9}.help-note{background:#f7f4fa;border-radius:12px;padding:14px;margin-top:17px}.help-note strong{font-size:12px;color:#75618a}.help-note p{font-size:11px;line-height:1.9;margin-top:5px}.help-version{text-align:center;color:#c0b6ca;font-size:10px;margin-top:20px}.image-dialog{background:white;width:min(900px,100%);max-width:100%;height:auto;max-height:100dvh;border-radius:14px}.image-dialog>img{display:block;max-width:100%;width:100%;height:auto;max-height:85dvh;object-fit:contain;padding:36px 8px 12px}.image-close{position:absolute;right:8px;top:8px;background:#f0ebf6;z-index:2}.image-dialog>p{text-align:center;font-size:12px;color:var(--muted);padding:8px 15px 20px}.toast{position:fixed;z-index:20;left:50%;bottom:110px;transform:translateX(-50%);background:#33273feF;color:white;padding:11px 18px;border-radius:11px;max-width:90%;font-size:12px;white-space:normal;text-align:center;box-shadow:0 5px 20px #0001}.noscript-message{padding:20px;text-align:center;color:var(--red)}@keyframes sweep{0%,100%{top:22%}50%{top:76%}}@keyframes spin{to{transform:rotate(360deg)}}
.lens-controls{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:12px}.lens-controls label{display:flex;align-items:center;gap:8px;min-width:0;flex:1;font-size:11px;color:#83728f}.lens-controls input{min-width:0;max-width:180px;flex:1;accent-color:var(--purple)}.lens-controls output{font-size:11px;min-width:31px}.lens-controls button{background:var(--purple-light);color:var(--purple);border-radius:7px;padding:6px 11px;font-size:11px;white-space:nowrap}
@media(min-width:760px){.app-shell{padding-top:20px}.app-header{padding-bottom:28px}.scanner-card{padding:26px}.viewfinder{aspect-ratio:1.9}.empty-state{padding:45px 20px}.product-image-button{aspect-ratio:1.3}.brand strong{font-size:22px}}
@media(max-width:360px){.app-shell{padding-left:12px;padding-right:12px}.scanner-card{padding:16px}.brand strong{font-size:18px}.section-title{gap:5px}h1{font-size:15px}.source-badge{font-size:9px;padding:3px 5px}.camera-placeholder small{font-size:10px}.fine-print{display:none}}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}.scan-line{animation:none}.spinner{animation-duration:1.8s}}
