/* Palette mirrors the side panel (entrypoints/sidepanel/index.html); dark follows the system. */
:root {
  color-scheme: light dark;
  --bg: #f6f6f4;
  --card: #ffffff;
  --border: rgba(0, 0, 0, 0.09);
  --border-strong: rgba(0, 0, 0, 0.16);
  --text: #1b1b1a;
  --muted: #6d6d68;
  --accent: #4f46e5;
  --on-accent: #ffffff;
  --accent-soft: rgba(79, 70, 229, 0.1);
  --warn-bg: rgba(220, 160, 0, 0.14);
  --warn-fg: #8a5a00;
  --err-fg: #b42318;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1b1b1e;
    --card: #26262a;
    --border: rgba(255, 255, 255, 0.09);
    --border-strong: rgba(255, 255, 255, 0.16);
    --text: #ededed;
    --muted: #9a9a98;
    --accent: #a5a3f5;
    --on-accent: #1b1b1e;
    --accent-soft: rgba(120, 116, 240, 0.16);
    --warn-bg: rgba(220, 170, 40, 0.16);
    --warn-fg: #e6b450;
    --err-fg: #ff8a80;
  }
}
* { box-sizing: border-box; }
body {
  margin: 0; min-height: 100vh; display: grid; place-items: center; padding: 24px 16px;
  background: var(--bg); color: var(--text); font-size: 15px; line-height: 1.5;
}
main {
  width: 100%; max-width: 380px; background: var(--card); border: 1px solid var(--border);
  border-radius: 12px; padding: 28px 24px;
}
.brand { display: flex; align-items: center; gap: 10px; margin-bottom: 22px; font-weight: 600; }
.brand img { width: 28px; height: 28px; }
h1 { font-size: 19px; line-height: 1.3; margin: 0 0 8px; font-weight: 600; text-wrap: balance; }
p { margin: 0 0 14px; }
.muted { color: var(--muted); font-size: 14px; }
label { display: block; font-size: 13px; color: var(--muted); margin: 14px 0 4px; }
input {
  width: 100%; font: inherit; color: var(--text); background: transparent;
  border: 1px solid var(--border-strong); border-radius: 8px; padding: 9px 11px;
}
input:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.row { display: flex; gap: 10px; margin-top: 20px; }
button {
  flex: 1; font: inherit; font-weight: 500; cursor: pointer; border-radius: 8px; padding: 10px 14px;
  border: 1px solid var(--border-strong); background: transparent; color: var(--text);
}
button.primary { background: var(--accent); color: var(--on-accent); border-color: transparent; }
button:disabled { opacity: 0.55; cursor: default; }
ul.can { margin: 12px 0 0; padding: 0; list-style: none; }
ul.can li { padding: 7px 0 7px 26px; position: relative; font-size: 14px; border-top: 1px solid var(--border); }
ul.can li::before { content: "✓"; position: absolute; left: 4px; color: var(--accent); font-weight: 600; }
ul.can li.no::before { content: "✕"; color: var(--muted); }
.who { background: var(--accent-soft); border-radius: 8px; padding: 9px 11px; font-size: 14px; margin: 14px 0 0; overflow-wrap: anywhere; }
.warn { background: var(--warn-bg); color: var(--warn-fg); border-radius: 8px; padding: 10px 12px; font-size: 14px; margin-top: 14px; }
.err { color: var(--err-fg); font-size: 14px; margin-top: 12px; min-height: 1em; }
[hidden] { display: none !important; }
