:root {
  --bg: #0f1115; --card: #181b22; --line: #272b35; --text: #eef0f4; --muted: #9aa1b0;
  --accent: #5b8def; --ok: #34c38f; --warn: #f2b84b; --bad: #ef6b6b; --radius: 16px;
}
@media (prefers-color-scheme: light) {
  :root { --bg: #f4f5f8; --card: #fff; --line: #e2e5ec; --text: #14171d; --muted: #667085; --accent: #3a6fe0; }
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body { font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans Hebrew", sans-serif;
  -webkit-text-size-adjust: 100%; padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
button, input { font: inherit; color: inherit; }
header.top { position: sticky; top: 0; z-index: 5; background: var(--bg); border-bottom: 1px solid var(--line);
  padding: calc(12px + env(safe-area-inset-top)) 16px 12px; display: flex; align-items: center; justify-content: space-between; }
header.top h1 { font-size: 20px; margin: 0; }
main { max-width: 640px; margin: 0 auto; padding: 14px 14px 24px; display: grid; gap: 12px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; display: grid; gap: 8px; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.badge { font-size: 13px; padding: 2px 10px; border-radius: 999px; background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--accent); }
.badge.event { background: color-mix(in srgb, var(--ok) 18%, transparent); color: var(--ok); }
.badge.reminder { background: color-mix(in srgb, var(--warn) 20%, transparent); color: var(--warn); }
.badge.jellyfin_request, .badge.jellyfin_issue { background: color-mix(in srgb, #b07cff 20%, transparent); color: #b07cff; }
.title { font-weight: 650; font-size: 17px; overflow-wrap: anywhere; }
.muted { color: var(--muted); font-size: 14px; overflow-wrap: anywhere; }
.when { color: var(--ok); font-weight: 600; }
.draft { border-inline-start: 3px solid var(--line); padding-inline-start: 10px; color: var(--muted); font-size: 15px; white-space: pre-wrap; overflow-wrap: anywhere; }
.btn { border: 0; border-radius: 12px; padding: 10px 16px; background: var(--accent); color: #fff; font-weight: 600; cursor: pointer; text-decoration: none; display: inline-block; }
.btn.ghost { background: transparent; border: 1px solid var(--line); color: var(--text); }
.btn.ok { background: var(--ok); color: #06251a; }
.btn.bad { background: transparent; border: 1px solid var(--line); color: var(--bad); }
.btn.big { padding: 16px 28px; font-size: 18px; width: 100%; }
.btn:disabled { opacity: .5; }
input[type=text], input[type=datetime-local] { width: 100%; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 10px; }
.empty { text-align: center; color: var(--muted); padding: 40px 10px; }
.center { min-height: 70vh; display: grid; place-content: center; gap: 14px; text-align: center; padding: 24px; }
.center .logo { width: 96px; height: 96px; margin: 0 auto; }
nav.tabs { position: fixed; inset-inline: 0; bottom: 0; background: var(--card); border-top: 1px solid var(--line);
  display: grid; grid-template-columns: repeat(4, 1fr); padding-bottom: env(safe-area-inset-bottom); }
nav.tabs button { background: none; border: 0; padding: 10px 4px 8px; color: var(--muted); display: grid; gap: 2px; justify-items: center; font-size: 12px; cursor: pointer; }
nav.tabs button .ic { font-size: 22px; line-height: 1; }
nav.tabs button.on { color: var(--accent); }
nav.tabs .dot { position: absolute; }
.err { color: var(--bad); }
.sw { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.sw:last-child { border-bottom: 0; }
.sw input { width: 22px; height: 22px; }
h2 { font-size: 15px; color: var(--muted); margin: 8px 2px 0; font-weight: 600; }
.ltr { direction: ltr; unicode-bidi: isolate; display: inline-block; }
