:root {
  --bg: #f6f5f1; --card: #ffffff; --ink: #1d1d1b; --muted: #6b6a66; --line: #e4e2dc;
  --accent: #e4572e; --accent-ink: #fff; --dot-empty: #e4e2dc; --ok: #2e7d4f;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #161615; --card: #20201e; --ink: #f1efe9; --muted: #a3a19b; --line: #34332f; --dot-empty: #3b3a36; }
}
* { box-sizing: border-box; }
body { margin: 0; font: 16px/1.45 system-ui, -apple-system, "Segoe UI", sans-serif; background: var(--bg); color: var(--ink); }
main { max-width: 720px; margin: 0 auto; padding: 24px 16px 120px; }
h1 { font-size: 1.6rem; margin: 0 0 4px; }
p.lead { color: var(--muted); margin: 0 0 20px; white-space: pre-line; }
.search { width: 100%; padding: 12px 14px; font: inherit; border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: var(--ink); margin-bottom: 12px; }
.tools { display: flex; gap: 8px; align-items: center; justify-content: space-between; margin-bottom: 12px; color: var(--muted); font-size: .9rem; flex-wrap: wrap; }
ul.opts { list-style: none; padding: 0; margin: 0; }
li.opt { display: flex; align-items: center; gap: 12px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin-bottom: 8px; }
li.opt.has { border-color: var(--accent); }
.label { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.total { color: var(--muted); font-size: .85rem; }
.ctrl { display: flex; align-items: center; gap: 6px; }
button { font: inherit; cursor: pointer; border: 1px solid var(--line); background: var(--card); color: var(--ink); border-radius: 8px; padding: 6px 12px; }
button:disabled { opacity: .4; cursor: default; }
button.round { width: 36px; height: 36px; padding: 0; border-radius: 50%; font-size: 1.2rem; line-height: 1; }
button.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.count { min-width: 1.4em; text-align: center; font-weight: 600; }
.bar { position: sticky; bottom: 0; background: var(--card); border-top: 1px solid var(--line); padding: 12px 16px; }
.bar-inner { max-width: 720px; margin: 0 auto; display: flex; align-items: center; gap: 12px; justify-content: space-between; flex-wrap: wrap; }
.dots { display: flex; gap: 5px; flex-wrap: wrap; }
.dot { width: 14px; height: 14px; border-radius: 50%; background: var(--dot-empty); }
.dot.on { background: var(--accent); }
.status { color: var(--muted); font-size: .9rem; }
.notice { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 16px; margin-bottom: 16px; }
.meter { height: 6px; border-radius: 3px; background: var(--accent); margin-top: 4px; }
/* admin */
label.f { display: block; margin: 12px 0 4px; font-weight: 600; font-size: .9rem; }
input[type=text], input[type=number], textarea { width: 100%; font: inherit; padding: 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); color: var(--ink); }
textarea { min-height: 240px; }
.row { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; }
.row > * { flex: 1; min-width: 140px; }
table { width: 100%; border-collapse: collapse; margin-top: 12px; }
td, th { text-align: left; padding: 6px 4px; border-bottom: 1px solid var(--line); vertical-align: top; }
td.n { text-align: right; font-variant-numeric: tabular-nums; width: 4em; }
section { margin-top: 28px; }
