:root { --bg:#0f172a; --card:#111827; --text:#e5e7eb; --muted:#94a3b8; --line:#334155; --blue:#2563eb; --green:#16a34a; --orange:#f97316; --red:#dc2626; }
* { box-sizing: border-box; }
body { margin: 0; font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; background: var(--bg); color: var(--text); padding-bottom: 100px; }
header { position: sticky; top: 0; z-index: 10; background: rgba(15,23,42,.96); backdrop-filter: blur(8px); padding: 14px; border-bottom: 1px solid var(--line); }
h1 { margin: 0 0 12px; font-size: 1.35rem; }
.tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 10px; }
button { border: 0; border-radius: 12px; padding: 12px 14px; color: white; font-weight: 700; font-size: .95rem; cursor: pointer; }
.tab { background: #1f2937; color: var(--muted); }
.tab.active { background: var(--blue); color: white; }
.tab span { display: inline-flex; justify-content: center; align-items: center; min-width: 24px; height: 24px; margin-left: 5px; background: rgba(255,255,255,.18); border-radius: 999px; }
input[type="search"] { width: 100%; border: 1px solid var(--line); border-radius: 12px; padding: 13px; background: #020617; color: var(--text); font-size: 1rem; }
main { padding: 12px; }
.category { background: var(--card); border: 1px solid var(--line); border-radius: 16px; margin-bottom: 12px; overflow: hidden; }
.category h2 { margin: 0; padding: 14px; font-size: 1.05rem; background: #1f2937; }
.item { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 10px 14px; border-top: 1px solid rgba(51,65,85,.7); }
.item input { width: 22px; height: 22px; flex: 0 0 auto; }
.item label { flex: 1; font-size: 1rem; }
.item.done label { text-decoration: line-through; color: var(--muted); }
.empty { color: var(--muted); text-align: center; padding: 40px 12px; }
footer { position: fixed; bottom: 0; left: 0; right: 0; padding: 10px; background: rgba(15,23,42,.96); border-top: 1px solid var(--line); }
.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.actions .full { grid-column: 1 / -1; }

.hidden,
.actions.hidden {
  display: none !important;
}
.orange { background: var(--orange); }
.red { background: var(--red); }
.green { background: var(--green); }
@media (min-width: 850px) { body { max-width: 900px; margin: 0 auto; } footer { max-width: 900px; margin: 0 auto; } }
