:root {
  --bg: #111418; --card: #1b2027; --text: #e8eaed; --muted: #9aa3ad;
  --accent: #4f8cff; --danger: #ff5c5c; --radius: 12px;
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.5 -apple-system, system-ui, sans-serif;
  padding-bottom: calc(64px + env(safe-area-inset-bottom));
}
main { padding: 12px; max-width: 900px; margin: 0 auto; }
h1 { font-size: 22px; margin: 8px 0 12px; }
h2 { font-size: 14px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin: 0 0 8px; }
.card { background: var(--card); border-radius: var(--radius); padding: 14px; margin-bottom: 12px; }
.top { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; position: sticky; top: 0; background: var(--bg); z-index: 5; }
.brand { font-size: 20px; color: var(--accent); }
.ws a { color: var(--muted); text-decoration: none; padding: 6px 12px; border-radius: 8px; font-weight: 600; }
.ws a.on { background: var(--accent); color: #fff; }
.tabs { position: fixed; bottom: 0; left: 0; right: 0; display: flex; background: var(--card); padding-bottom: env(safe-area-inset-bottom); z-index: 5; }
.tabs a { flex: 1; text-align: center; padding: 14px 0; color: var(--muted); text-decoration: none; font-size: 13px; }
.tabs a.on { color: var(--accent); font-weight: 700; }
.tasklist { list-style: none; margin: 0; padding: 0; }
.tasklist li { display: flex; gap: 8px; align-items: center; padding: 10px 0; border-bottom: 1px solid #262c35; }
.tasklist li:last-child { border-bottom: 0; }
.tasklist input[type=checkbox] { width: 22px; height: 22px; accent-color: var(--accent); flex-shrink: 0; }
.tag { background: #2a3340; color: var(--accent); border-radius: 6px; padding: 1px 8px; font-size: 12px; text-decoration: none; }
.due { color: var(--muted); font-size: 12px; margin-left: auto; white-space: nowrap; }
.big { font-size: 28px; font-weight: 700; margin: 0; }
.muted { color: var(--muted); }
.alert { background: #3a2326; color: var(--danger); padding: 8px 14px; border-radius: 8px; margin: 8px 12px; }
#quicknote-btn {
  position: fixed; right: 16px; bottom: calc(76px + env(safe-area-inset-bottom));
  width: 56px; height: 56px; border-radius: 50%; border: 0; background: var(--accent);
  color: #fff; font-size: 30px; box-shadow: 0 4px 16px rgba(0,0,0,.4); z-index: 6;
}
dialog { background: var(--card); color: var(--text); border: 0; border-radius: var(--radius); width: min(480px, 92vw); }
dialog::backdrop { background: rgba(0,0,0,.6); }
dialog textarea, dialog select, .login input {
  width: 100%; background: #10141a; color: var(--text); border: 1px solid #2a3340;
  border-radius: 8px; padding: 10px; margin-bottom: 10px; font: inherit;
}
dialog .row { display: flex; gap: 8px; justify-content: flex-end; }
button { background: var(--accent); color: #fff; border: 0; border-radius: 8px; padding: 10px 16px; font: inherit; font-weight: 600; }
button[value=cancel] { background: #2a3340; }
.login-page { display: grid; place-items: center; min-height: 100vh; padding: 0; }
.login { width: min(360px, 92vw); text-align: center; }
input[type=date] { color-scheme: dark; }
form.inline { display: flex; gap: 8px; flex-wrap: wrap; }
form.inline input[type=text] { flex: 1; min-width: 160px; }
form.inline input, form.inline select {
  background: #10141a; color: var(--text); border: 1px solid #2a3340; border-radius: 8px; padding: 10px; font: inherit;
}
