:root {
  --bg: #ffffff;
  --fg: #1b1f24;
  --muted: #59636e;
  --line: #d1d9e0;
  --accent: #1f6feb;
  --surface: #f6f8fa;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d1117;
    --fg: #e6edf3;
    --muted: #9198a1;
    --line: #30363d;
    --accent: #4493f8;
    --surface: #161b22;
  }
}

* { 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;
  padding: env(safe-area-inset-top) 16px env(safe-area-inset-bottom);
}
header, main { max-width: 640px; margin: 0 auto; }
header { display: flex; align-items: center; justify-content: space-between; padding: 16px 0; }
h1 { font-size: 1.4rem; margin: 0; }

form { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
label { width: 100%; color: var(--muted); font-size: .9rem; }
input:not([type="checkbox"]) {
  flex: 1 1 200px;
  font: inherit;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--fg);
}
button {
  font: inherit;
  padding: 10px 16px;
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
}
button.link { background: none; color: var(--accent); padding: 6px 8px; }

ul { list-style: none; padding: 0; margin: 0; }
li {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 0; border-bottom: 1px solid var(--line);
}
li span { flex: 1; overflow-wrap: anywhere; }
li.done span { text-decoration: line-through; color: var(--muted); }
input[type="checkbox"] { width: 20px; height: 20px; accent-color: var(--accent); }

.muted { color: var(--muted); }
code { background: var(--surface); padding: 2px 6px; border-radius: 4px; }
