/* Тёмная тема Ритма: песочный акцент, спокойные поверхности. Светлая — по настройке iPhone. */
:root {
  --bg: #1c1b19; --card: #262522; --line: rgba(255,255,255,0.08); --text: #f2efe9; --muted: rgba(242,239,233,0.6);
  --accent: #e3a63f; --onAccent: #1c1712; --tint: rgba(227,166,63,0.14); --risk: #e5615a; --done: #4cc38a;
}
@media (prefers-color-scheme: light) {
  :root { --bg: #f5f3ef; --card: #ffffff; --line: rgba(0,0,0,0.08); --text: #1d1c1a; --muted: rgba(29,28,26,0.6);
          --accent: #9a6412; --onAccent: #ffffff; --tint: rgba(154,100,18,0.12); --risk: #c2362f; --done: #1f8a4c; }
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text);
  font: 17px/1.35 -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif; -webkit-text-size-adjust: 100%; }
body { padding: env(safe-area-inset-top) 16px calc(150px + env(safe-area-inset-bottom)); }
.top { display: flex; align-items: baseline; justify-content: space-between; padding: 12px 0 8px; }
.top h1 { font-size: 28px; font-weight: 600; margin: 0; }
.muted { color: var(--muted); font-size: 13px; }
h2 { font-size: 13px; font-weight: 500; color: var(--muted); margin: 20px 0 8px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin-bottom: 8px; }
.row { display: flex; align-items: center; gap: 12px; min-height: 44px; }
.row .title { flex: 1; min-width: 0; }
.row .title .sub { display: block; color: var(--muted); font-size: 13px; }
.time { font-variant-numeric: tabular-nums; color: var(--muted); font-size: 15px; width: 48px; flex: none; }
.btn { min-width: 44px; min-height: 44px; border-radius: 22px; border: 0; background: transparent; color: var(--muted);
  font-size: 20px; display: inline-flex; align-items: center; justify-content: center; }
.btn.primary { background: var(--accent); color: var(--onAccent); font-size: 17px; font-weight: 600; padding: 0 20px; }
.check { width: 26px; height: 26px; border-radius: 13px; border: 2px solid var(--muted); flex: none; }
.check.on { background: var(--done); border-color: var(--done); }
.done .title { text-decoration: line-through; color: var(--muted); }
.late { border-left: 3px solid var(--risk); }
.now-card { background: var(--tint); border-color: var(--accent); }
.timer { font-size: 56px; font-weight: 300; font-variant-numeric: tabular-nums; text-align: center; margin: 8px 0; }
.timer.over { color: var(--risk); }
.actions { display: flex; gap: 12px; justify-content: center; }
.pay { color: var(--muted); font-size: 13px; }
.capture { position: fixed; left: 0; right: 0; bottom: calc(56px + env(safe-area-inset-bottom)); display: flex; gap: 8px;
  padding: 8px 16px; background: var(--bg); border-top: 1px solid var(--line); }
.capture input { flex: 1; font-size: 17px; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--card); color: var(--text); }
.capture button { width: 44px; border-radius: 12px; border: 0; background: var(--accent); color: var(--onAccent); font-size: 22px; }
.tabs { position: fixed; left: 0; right: 0; bottom: 0; display: flex; background: var(--bg); border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom); }
.tabs button { flex: 1; height: 56px; border: 0; background: none; color: var(--muted); font-size: 15px; }
.tabs button[aria-selected="true"] { color: var(--accent); font-weight: 600; }
.toast { position: fixed; left: 16px; right: 16px; bottom: calc(130px + env(safe-area-inset-bottom)); background: var(--card);
  border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; text-align: center; }
details > summary { list-style: none; cursor: pointer; padding: 10px 0; color: var(--muted); font-size: 15px; }
details > summary::-webkit-details-marker { display: none; }
.empty { color: var(--muted); text-align: center; padding: 24px 0; }
.dots { display: flex; gap: 10px; justify-content: space-between; margin-top: 8px; }
.dots span { display: flex; flex-direction: column; align-items: center; font-size: 11px; color: var(--muted); }
.dots i { width: 10px; height: 10px; border-radius: 5px; background: var(--line); margin: 4px 0; }
.dots i.on { background: var(--accent); }
.pending { opacity: 0.6; }
.pair { padding: 32px 0; text-align: center; }
