:root { --accent: #b90c30; --bg: #fff; --fg: #1a1a1a; --muted: #6b6b6b; --line: #e6e6e6; --card: #f7f7f7; }
@media (prefers-color-scheme: dark) { :root { --bg: #111; --fg: #eee; --muted: #999; --line: #2a2a2a; --card: #1c1c1c; } }
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--fg); font: 17px/1.4 -apple-system, "Helvetica Neue", Arial, sans-serif; }
header { display: flex; align-items: center; gap: 10px; padding: calc(env(safe-area-inset-top) + 10px) 16px 10px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--bg); z-index: 2; }
header h1 { font-size: 20px; margin: 0; color: var(--accent); flex: 1; }
.where { font-size: 13px; color: var(--muted); }
button.icon { background: none; border: 0; font-size: 22px; color: var(--muted); padding: 4px 6px; }
main { padding: 12px 16px calc(env(safe-area-inset-bottom) + 80px); max-width: 720px; margin: 0 auto; }
nav { position: fixed; bottom: 0; left: 0; right: 0; display: flex; border-top: 1px solid var(--line); background: var(--bg); padding-bottom: env(safe-area-inset-bottom); }
nav button { flex: 1; padding: 12px 4px; border: 0; background: none; color: var(--muted); font-size: 14px; }
nav button.active { color: var(--accent); font-weight: 600; }
h2 { font-size: 15px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin: 18px 0 8px; }
.item { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--line); }
.item input[type=checkbox] { width: 24px; height: 24px; margin-top: 2px; accent-color: var(--accent); flex: none; }
.item .t { flex: 1; min-width: 0; }
.item .title { font-weight: 500; overflow-wrap: anywhere; }
.item .sub { font-size: 14px; color: var(--muted); }
.item .due { font-size: 13px; color: var(--accent); }
.item.done .title { text-decoration: line-through; color: var(--muted); }
.item .badge { font-size: 12px; color: var(--muted); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; white-space: nowrap; }
.decision { background: var(--card); border-radius: 12px; padding: 12px; margin: 8px 0; }
.decision .q { font-weight: 500; margin-bottom: 8px; }
.decision .ctx { font-size: 14px; color: var(--muted); margin-bottom: 8px; white-space: pre-wrap; }
.row { display: flex; gap: 8px; flex-wrap: wrap; }
button.opt, button.primary { border: 1px solid var(--accent); background: none; color: var(--accent); border-radius: 10px; padding: 8px 14px; font-size: 15px; }
button.primary { background: var(--accent); color: #fff; }
button.opt.later { border-color: var(--line); color: var(--muted); }
.list-card { display: flex; justify-content: space-between; padding: 14px 4px; border-bottom: 1px solid var(--line); font-size: 18px; }
.list-card .n { color: var(--muted); }
form.add label { display: block; font-size: 13px; color: var(--muted); margin: 12px 0 4px; }
form.add input, form.add select, form.add textarea, .search input { width: 100%; font-size: 17px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: var(--fg); }
form.add .check { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
form.add .check input { width: 22px; height: 22px; }
.empty { color: var(--muted); padding: 24px 0; text-align: center; }
.login { max-width: 420px; margin: 40px auto; }
.login input { width: 100%; font-size: 17px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; margin: 10px 0; }
.toast { position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%); background: var(--fg); color: var(--bg); padding: 10px 16px; border-radius: 20px; font-size: 14px; opacity: 0; transition: opacity .2s; pointer-events: none; }
.toast.show { opacity: .95; }
.settings p { margin: 8px 0; }
.muted { color: var(--muted); font-size: 14px; }
a.back { color: var(--accent); text-decoration: none; font-size: 15px; display: inline-block; margin-bottom: 8px; }
