:root {
  --bg: #fff; --fg: #1d1d1f; --muted: #6e6e73; --line: #e5e5e7; --hover: #f2f2f4; --accent: #0a84ff; --ok: #1a7f37; --err: #b3261e;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #1e1e1e; --fg: #ececec; --muted: #9a9a9a; --line: #333; --hover: #2a2a2a; }
}
* { box-sizing: border-box; }
body { margin: 0; font: 13px/1.4 system-ui, -apple-system, "Segoe UI", sans-serif; background: var(--bg); color: var(--fg); }
header { position: sticky; top: 0; padding: 8px; background: var(--bg); border-bottom: 1px solid var(--line); z-index: 1; }
#q { width: 100%; padding: 7px 10px; border: 1px solid var(--line); border-radius: 6px; font: inherit; background: var(--bg); color: var(--fg); }
#q:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
details { border-bottom: 1px solid var(--line); }
summary { padding: 7px 10px; cursor: pointer; font-weight: 600; user-select: none; display: flex; justify-content: space-between; }
summary .n { color: var(--muted); font-weight: 400; }
.part { display: flex; align-items: center; gap: 10px; width: 100%; padding: 5px 10px; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.part:hover, .part:focus-visible { background: var(--hover); outline: none; }
.part:disabled { opacity: .5; cursor: progress; }
.part img { width: 40px; height: 40px; object-fit: contain; border-radius: 4px; background: #fff; flex: none; }
.part .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.part .sku { color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.part.done { background: color-mix(in srgb, var(--ok) 15%, transparent); }
section { padding: 24px 16px; text-align: center; color: var(--muted); }
button#connect { padding: 8px 14px; border: 0; border-radius: 6px; background: var(--accent); color: #fff; font: inherit; cursor: pointer; }
#toast { position: fixed; left: 8px; right: 8px; bottom: 8px; padding: 8px 12px; border-radius: 6px; background: var(--fg); color: var(--bg); font-size: 12px; }
#toast.err { background: var(--err); color: #fff; }
.empty { padding: 16px; color: var(--muted); text-align: center; }
