:root{--bg:#f6f4ef;--card:#fff;--ink:#1d1d1b;--mut:#6b6b66;--line:#e3e0d8;--ok:#1b8a3f;--mid:#c27c0e;--bad:#b3261e;--old:#555;--acc:#0f5c4d}
@media(prefers-color-scheme:dark){:root{--bg:#161615;--card:#222221;--ink:#f1efe9;--mut:#a3a29b;--line:#38372f;--acc:#3fb59e}}
*{box-sizing:border-box}
body{margin:0;background:var(--bg);color:var(--ink);font-family:"Segoe UI",Tahoma,Arial,sans-serif;line-height:1.6}
header,main,footer{max-width:900px;margin:auto;padding:0 16px}
header{padding-top:24px}h1{margin:0;color:var(--acc)}header p{color:var(--mut);margin:.3rem 0 1rem}
#drop{border:2px dashed var(--line);border-radius:16px;background:var(--card);min-height:170px;display:flex;align-items:center;justify-content:center;gap:16px;padding:16px;text-align:center;flex-wrap:wrap;outline:none}
#drop.over,#drop:focus{border-color:var(--acc)}
#dropText{display:flex;flex-direction:column;gap:8px;align-items:center}
#dropText span{color:var(--mut)}
.btn{background:var(--acc);color:#fff;padding:8px 18px;border-radius:10px;cursor:pointer;display:inline-block;margin:2px}
button.btn{border:0;font:inherit}
.btn.alt{background:transparent;color:var(--acc);border:1px solid var(--acc)}
#preview{max-height:220px;max-width:100%;border-radius:10px}
#status{margin:12px 0;color:var(--mut);min-height:1.6em}
.group{margin:18px 0}
.group>h2{font-size:1rem;color:var(--mut);margin:0 0 8px}
.card{display:flex;gap:14px;background:var(--card);border:1px solid var(--line);border-radius:14px;padding:12px;margin-bottom:10px}
.card.best{border-width:2px}
.card img{width:130px;height:130px;object-fit:cover;border-radius:10px;background:var(--line);flex:none}
.info{flex:1;min-width:0}.info h3{margin:0 0 4px;font-size:1.05rem}
.info a{color:var(--acc)}
.badge{display:inline-block;padding:2px 10px;border-radius:99px;font-size:.82rem;color:#fff;margin-inline-end:6px}
.b-ok{background:var(--ok)}.b-mid{background:var(--mid)}.b-bad{background:var(--bad)}.b-old{background:var(--old)}.b-av{background:var(--acc)}
.bar{height:8px;background:var(--line);border-radius:6px;margin:8px 0 2px;overflow:hidden}.bar i{display:block;height:100%}
.verdict{font-weight:600;margin:4px 0}
.small{color:var(--mut);font-size:.85rem}
footer{color:var(--mut);font-size:.85rem;padding-bottom:30px}
@media(max-width:520px){.card img{width:96px;height:96px}}
.queryRow{border-top:1px solid var(--line);margin-top:20px;padding-top:10px}
.queryRow>img{height:80px;border-radius:8px}
.colorline{margin:8px 0 4px}
.chips{display:flex;gap:8px;flex-wrap:wrap;margin:6px 0}
.chip{display:flex;flex-direction:column;align-items:center;width:78px;border:1px solid var(--line);border-radius:10px;padding:4px;font-size:.78rem;text-align:center}
.chip.top{border:2px solid var(--acc)}
.card .chip img{width:64px;height:64px;border-radius:8px}
.chip small{color:var(--mut)}
.fix{margin:14px 0 4px}.fixsel{max-width:100%;padding:8px;border-radius:8px;border:1px solid var(--line);background:var(--card);color:var(--ink);font:inherit}
#fixinfo a{color:var(--acc);cursor:pointer}
.ocr{margin:8px 0}.textmatch{border:2px solid var(--ok);border-radius:12px;padding:10px;background:var(--card)}
.item{border-top:1px dashed var(--line);margin-top:14px;padding-top:8px}.item:first-child{border-top:0;margin-top:6px}
.itemtitle{font-size:1.05rem;color:var(--acc);margin:6px 0}
img.crop{height:150px;border-radius:10px;float:inline-start;margin-inline-end:12px;margin-bottom:6px}
.colorbox{background:var(--bg);border-radius:10px;padding:6px 10px;margin:8px 0}
.queryRow>img.qimg{height:90px;border-radius:8px}
.stage{margin:6px 0}
.smart{margin:14px 0;border-top:1px dashed var(--line);padding-top:10px}.smartitem{background:var(--card);border:1px solid var(--line);border-radius:10px;padding:8px 12px;margin:8px 0}
/* progress */
.prog{margin:8px 0}.track{height:10px;background:var(--line);border-radius:8px;overflow:hidden}
.fill{display:block;height:100%;width:0;border-radius:8px;background:repeating-linear-gradient(45deg,var(--acc) 0 12px,#2a8c78 12px 24px);background-size:34px 34px;animation:mv .8s linear infinite;transition:width .25s}
@keyframes mv{to{background-position:34px 0}}
.pline{display:flex;justify-content:space-between;font-size:.9rem;color:var(--mut);margin-top:4px}
/* hero result */
.hero{display:flex;gap:16px;background:var(--card);border:3px solid var(--acc);border-radius:16px;padding:14px;margin:10px 0;box-shadow:0 4px 18px rgba(0,0,0,.08)}
.heroimg{width:200px;height:260px;object-fit:cover;border-radius:12px;flex:none;background:var(--line)}
.herobody{flex:1;min-width:0}.herotitle{font-size:1.5rem;margin:2px 0 6px}
.hrow{display:flex;gap:10px;align-items:center;margin:6px 0;font-size:1.05rem}.hlabel{color:var(--mut);min-width:84px}.hval{font-size:1.15rem}
.dot{display:inline-block;width:18px;height:18px;border-radius:50%;border:1px solid var(--line);vertical-align:middle;margin-inline-end:6px}
.badge.b-price{background:#6b4f9e}
a.btn.go{display:inline-block;margin-top:10px;font-size:1.1rem;padding:12px 22px;text-decoration:none}
@media(max-width:560px){.hero{flex-direction:column}.heroimg{width:100%;height:300px}}
