:root{
  --bg:#11101d;
  --bg-raised:#1a1930;
  --bg-card:#201f3a;
  --line:#312f52;
  --text:#f2f1fb;
  --text-dim:#a8a6c6;
  --accent:#7c9fff;
  --accent-strong:#5b7fff;
  --good:#4fd1a5;
  --danger:#ff6b7d;
  --radius:16px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

*{box-sizing:border-box;}
html,body{margin:0;padding:0;}
body{
  background:var(--bg);
  color:var(--text);
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
  min-height:100vh;
  display:flex;
  flex-direction:column;
}

/* ---------------- topbar ---------------- */
.topbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:calc(14px + var(--safe-top)) 20px 14px;
  border-bottom:1px solid var(--line);
  position:sticky;
  top:0;
  background:rgba(17,16,29,0.92);
  backdrop-filter:blur(8px);
  z-index:10;
}
.brand{display:flex;align-items:center;gap:10px;font-weight:700;font-size:17px;}
.brand-shield{width:22px;height:22px;fill:var(--accent);}
.tag{
  font-size:11px;
  letter-spacing:.04em;
  text-transform:uppercase;
  color:var(--good);
  background:rgba(79,209,165,0.12);
  border:1px solid rgba(79,209,165,0.35);
  padding:4px 9px;
  border-radius:999px;
  white-space:nowrap;
}

/* ---------------- main / views ---------------- */
#app{flex:1;width:100%;max-width:620px;margin:0 auto;padding:0 20px 40px;}
.view.hidden{display:none;}

.hero{text-align:center;padding:36px 4px 20px;}
.hero-shield{width:64px;height:64px;stroke:var(--accent);stroke-width:1.4;fill:rgba(124,159,255,0.08);margin-bottom:16px;}
.hero-check{fill:none;stroke:var(--good);stroke-width:2;stroke-linecap:round;stroke-linejoin:round;}
.hero h1{font-size:24px;line-height:1.3;margin:0 0 12px;}
.hero .lede{color:var(--text-dim);font-size:15px;line-height:1.55;margin:0 auto;max-width:440px;}

.pick-btn{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  background:var(--accent-strong);
  color:#fff;
  font-size:16px;
  font-weight:600;
  padding:15px 24px;
  border-radius:999px;
  border:none;
  cursor:pointer;
  text-align:center;
  margin:22px auto 0;
  max-width:320px;
  box-shadow:0 8px 24px rgba(91,127,255,0.35);
}
.pick-btn svg{width:20px;height:20px;stroke:#fff;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;}
.pick-btn.wide{max-width:none;width:100%;margin:10px 0 0;}
.pick-btn.secondary{background:var(--bg-card);color:var(--text);box-shadow:none;border:1px solid var(--line);}

.fineprint{
  text-align:center;
  color:var(--text-dim);
  font-size:13px;
  margin:14px 0 0;
}

.why-list{
  list-style:none;
  margin:32px 0 0;
  padding:0;
  display:grid;
  gap:10px;
}
.why-list li{
  background:var(--bg-raised);
  border:1px solid var(--line);
  border-radius:12px;
  padding:13px 15px;
  font-size:14px;
  color:var(--text-dim);
  line-height:1.4;
}
.why-list li strong{color:var(--text);}

/* ---------------- results view ---------------- */
.results-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:18px 0 6px;
}
.results-head h2{font-size:18px;margin:0;}
.icon-btn{
  background:var(--bg-card);
  border:1px solid var(--line);
  width:38px;height:38px;
  border-radius:50%;
  display:flex;align-items:center;justify-content:center;
  cursor:pointer;
}
.icon-btn svg{width:18px;height:18px;stroke:var(--text);fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;}

.card-list{display:grid;gap:14px;margin-top:10px;}
.card{
  background:var(--bg-card);
  border:1px solid var(--line);
  border-radius:var(--radius);
  overflow:hidden;
}
.card-top{display:flex;gap:12px;padding:12px;}
.card-thumb{
  width:64px;height:64px;
  border-radius:10px;
  object-fit:cover;
  background:var(--bg-raised);
  flex-shrink:0;
}
.card-info{flex:1;min-width:0;}
.card-name{font-size:13.5px;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.card-status{font-size:12.5px;margin-top:3px;display:flex;align-items:center;gap:6px;}
.card-status.cleaned{color:var(--good);}
.card-status.clean-already{color:var(--text-dim);}
.dot{width:6px;height:6px;border-radius:50%;background:currentColor;flex-shrink:0;}

.card-found{
  border-top:1px solid var(--line);
  padding:10px 12px 12px;
  display:grid;
  gap:6px;
}
.found-row{display:flex;gap:8px;font-size:12.5px;color:var(--text-dim);}
.found-row .k{color:var(--danger);min-width:78px;flex-shrink:0;font-weight:600;}
.found-row .v{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.found-none{font-size:12.5px;color:var(--text-dim);}

.card-actions{
  display:flex;
  gap:8px;
  padding:0 12px 12px;
}
.mini-btn{
  flex:1;
  background:var(--bg-raised);
  border:1px solid var(--line);
  color:var(--text);
  font-size:13px;
  font-weight:600;
  padding:9px 10px;
  border-radius:9px;
  cursor:pointer;
  text-align:center;
}

.results-actions{margin-top:4px;padding-bottom:8px;}

/* ---------------- toast ---------------- */
.toast{
  position:fixed;
  left:50%;
  bottom:calc(22px + var(--safe-bottom));
  transform:translateX(-50%) translateY(0);
  background:#2a2950;
  border:1px solid var(--line);
  color:var(--text);
  font-size:13.5px;
  padding:11px 18px;
  border-radius:999px;
  box-shadow:0 10px 30px rgba(0,0,0,0.4);
  z-index:50;
  transition:opacity .25s ease, transform .25s ease;
}
.toast.hidden{opacity:0;pointer-events:none;transform:translateX(-50%) translateY(8px);}

/* ---------------- footer ---------------- */
.footer{
  text-align:center;
  color:var(--text-dim);
  font-size:11.5px;
  padding:14px 0 calc(14px + var(--safe-bottom));
  letter-spacing:.02em;
}

@media (min-width:480px){
  .hero h1{font-size:27px;}
}

/* ---------------- "what gets removed" list ---------------- */
.removed{margin:18px 0 6px;border:1px solid var(--line);border-radius:12px;background:var(--bg-raised);padding:4px 14px;}
.removed summary{cursor:pointer;padding:10px 0;font-weight:600;color:var(--accent);}
.removed p{color:var(--text-dim);margin:8px 0;font-size:14px;line-height:1.5;}
.removed ul{margin:0 0 10px 18px;padding:0;color:var(--text-dim);font-size:14px;line-height:1.6;}
.footer a{color:var(--text-dim);}
