:root {
  --bg: #f7f7f5;
  --fg: #1c1c1c;
  --muted: #666;
  --card: #fff;
  --line: #dddcd7;
  --accent: #2563eb;
  --bar: #e7e6e1;
  --error: #b91c1c;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #151515;
    --fg: #ececec;
    --muted: #9a9a9a;
    --card: #1f1f1f;
    --line: #333;
    --accent: #60a5fa;
    --bar: #2c2c2c;
    --error: #f87171;
  }
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif;
}
main { max-width: 560px; margin: 0 auto; padding: 32px 16px 48px; }
h1 { font-size: 1.6rem; margin: 0 0 4px; }
.lead { color: var(--muted); margin: 0 0 24px; }

.drop {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 200px;
  padding: 16px;
  background: var(--card);
  border: 2px dashed var(--line);
  border-radius: 12px;
  cursor: pointer;
  text-align: center;
}
.drop.over, .drop:focus-within { border-color: var(--accent); }
.drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.drop img { max-width: 100%; max-height: 320px; border-radius: 8px; }
#drop-text { color: var(--muted); }

#result {
  margin-top: 20px;
  padding: 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.verdict { font-size: 1.25rem; font-weight: 600; margin: 0 0 12px; }
.verdict small { display: block; font-size: 0.9rem; font-weight: 400; color: var(--muted); }
.bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.bars li { display: grid; grid-template-columns: 1fr 3.5em; gap: 2px 8px; font-size: 0.9rem; }
.bars .track { grid-column: 1 / -1; height: 8px; background: var(--bar); border-radius: 4px; overflow: hidden; }
.bars .fill { height: 100%; background: var(--accent); }
.bars .pct { text-align: right; font-variant-numeric: tabular-nums; color: var(--muted); }
.bars li.top { font-weight: 600; }

.error { color: var(--error); margin-top: 16px; }
.note { color: var(--muted); font-size: 0.85rem; margin-top: 32px; }

.model { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; font-size: 0.9rem; color: var(--muted); }
.model select { font: inherit; color: var(--fg); background: var(--card); border: 1px solid var(--line); border-radius: 6px; padding: 4px 8px; }
.model[hidden] { display: none; }
