/* Палитра и метрики – как у SEO-помощника и list. Экран рассчитан на телефон: смотрят утром, закрывают одним нажатием. */
:root {
  --bg: #ffffff; --soft: #f2f4f7; --hover: rgba(16, 24, 40, .06);
  --text: #212630; --muted: #5d6879; --faint: #8b93a1; --line: #e8eaee; --line-strong: #d5d9e0;
  --accent: #2368cc; --accent-hover: #1d58ad; --on-accent: #ffffff;
  --ok: #1d7f47; --bad: #a8261c; --bad-soft: #fdecea;
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 6px 20px rgba(16, 24, 40, .06);
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #191b20; --soft: #262930; --hover: rgba(255, 255, 255, .07);
    --text: #eceef3; --muted: #a8afbb; --faint: #7d8592; --line: #2c3038; --line-strong: #3a3f49;
    --accent: #5b9bf0; --accent-hover: #7db0f4; --on-accent: #10131a;
    --ok: #5bc98a; --bad: #ff8a80; --bad-soft: #3a1f22;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 20px rgba(0, 0, 0, .25);
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.4 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.page { max-width: 640px; margin: 0 auto; padding: max(12px, env(safe-area-inset-top)) 16px calc(32px + env(safe-area-inset-bottom)); }
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 40px; }
.top h1 { display: flex; align-items: center; gap: 8px; font-size: 20px; margin: 0; font-weight: 650; }
.link { color: var(--muted); font-size: 14px; min-height: 44px; padding: 0 4px; }
.add { display: flex; gap: 8px; margin: 8px 0 4px; }
.add input { flex: 1; min-width: 0; height: 46px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--bg); }
.add button, .primary { height: 46px; padding: 0 16px; border-radius: 12px; background: var(--accent); color: var(--on-accent); font-weight: 600; }
.mic { flex: none; width: 46px; height: 46px; border-radius: 12px; background: var(--soft); color: var(--text); display: grid; place-items: center; padding: 0; }
.add .mic { padding: 0; background: var(--soft); color: var(--text); }
.add .mic[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); }
.mic i { width: 22px; height: 22px; background: currentColor; -webkit-mask: url(/static/mic.svg) center / contain no-repeat; mask: url(/static/mic.svg) center / contain no-repeat; }
.hint { color: var(--muted); font-size: 13px; margin: 0 2px 12px; }
.tabs { display: flex; gap: 4px; background: var(--soft); border-radius: 10px; padding: 3px; margin-bottom: 8px; }
.tabs button { flex: 1; height: 40px; border-radius: 8px; color: var(--muted); font-size: 14px; }
.tabs button[aria-pressed="true"] { background: var(--bg); color: var(--text); font-weight: 600; box-shadow: var(--shadow); }
section h2 { font-size: 13px; font-weight: 650; color: var(--muted); margin: 18px 2px 2px; display: flex; gap: 6px; }
h2 .n { color: var(--muted); font-weight: 500; }
section.over h2 { color: var(--bad); }
.row { display: flex; align-items: flex-start; border-bottom: 1px solid var(--line); }
.tick { flex: none; width: 44px; height: 48px; display: grid; place-items: center; }
.tick i { width: 22px; height: 22px; border: 2px solid var(--faint); border-radius: 50%; display: block; }
.tick:hover i { border-color: var(--accent); }
.done .tick i { background: var(--ok); border-color: var(--ok); position: relative; }
.done .tick i::after { content: ""; position: absolute; left: 5px; top: 1px; width: 5px; height: 10px; border: solid var(--bg); border-width: 0 2px 2px 0; transform: rotate(45deg); }
.body { flex: 1; min-width: 0; text-align: left; padding: 11px 4px 11px 0; overflow-wrap: anywhere; }
.body .t { display: block; }
.body .m { display: block; color: var(--muted); font-size: 13px; margin-top: 1px; }
.body .late { color: var(--bad); }
.body .note { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; color: var(--text); font-size: 14px; margin-top: 3px; }
.done .body .note { color: var(--muted); }
.done .body .t { color: var(--muted); text-decoration: line-through; }
details > summary { list-style: none; cursor: pointer; display: flex; align-items: center; min-height: 44px; margin-top: 10px; }
details > summary h2 { font-size: 13px; font-weight: 650; color: var(--muted); margin: 0 2px; display: flex; gap: 6px; }
details > summary::-webkit-details-marker { display: none; }
details > summary h2::after { content: "›"; margin-left: 2px; }
details[open] > summary h2::after { content: "⌄"; }
.empty { color: var(--muted); text-align: center; padding: 40px 12px; }
.empty p { margin: 0 0 16px; }
.tick:disabled { cursor: default; }
.login { text-align: center; padding-top: 14vh; }
.login .app-icon { display: block; margin: 0 auto 14px; }
.top .logo { display: block; }
.login h1 { font-size: 24px; margin: 0 0 8px; }
.login p { color: var(--muted); margin: 0 0 20px; }
.login form { display: grid; gap: 10px; max-width: 320px; margin: 0 auto; }
.login input { width: 100%; height: 44px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--bg); color: var(--text); font-size: 16px; }
.login .err { color: var(--bad); margin: 0; }
.primary { display: inline-grid; place-items: center; text-decoration: none; }
.toast span { min-width: 0; overflow-wrap: anywhere; }
.toast { position: fixed; left: 16px; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); max-width: 480px; margin: 0 auto;
  background: var(--text); color: var(--bg); border-radius: 12px; padding: 12px 14px; display: flex; justify-content: space-between;
  gap: 12px; align-items: center; box-shadow: var(--shadow); font-size: 15px; }
.toast[hidden] { display: none; }
.update { position: fixed; z-index: 20; top: max(8px, env(safe-area-inset-top)); left: 50%; transform: translateX(-50%); width: max-content; max-width: calc(100vw - 24px); display: flex; align-items: center; gap: 10px; padding: 4px 6px 4px 14px; border-radius: 12px; background: var(--text); color: var(--bg); box-shadow: var(--shadow); font-size: 14px; }
.update button { min-height: 40px; padding: 0 8px; font-weight: 650; color: inherit; text-decoration: underline; }
.toast button { font-weight: 650; color: inherit; text-decoration: underline; min-height: 44px; padding: 0 4px; flex: none; }
.err { color: var(--bad); font-size: 14px; margin: 0 0 10px; }
.sheet h2:focus { outline: none; }
.sheet { border: 1px solid var(--line); border-radius: 16px; padding: 16px; width: min(480px, calc(100vw - 24px)); background: var(--bg); color: var(--text); box-shadow: var(--shadow); }
.sheet { max-height: calc(100dvh - 24px); overflow-y: auto; }
.notes { list-style: none; margin: -4px 0 12px; padding: 0; font-size: 14px; }
.notes li { padding: 4px 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.notes .d { color: var(--muted); font-size: 13px; margin-right: 6px; }
.tail { margin: 0 0 12px; }
.tail > summary, .more > summary { min-height: 44px; margin: 0; color: var(--accent); font-size: 14px; }
.tail > summary::after, .more > summary::after { content: "›"; margin-left: 4px; }
.tail[open] > summary::after, .more[open] > summary::after { content: "⌄"; }
.ghost-line { width: 100%; height: 44px; border: 1px solid var(--line-strong); border-radius: 10px; font-size: 14px; }
.review .item { padding: 10px 0; border-bottom: 1px solid var(--line); }
.review .two { display: grid; grid-template-columns: minmax(0, 1fr) 150px 36px; gap: 6px; margin-top: 6px; align-items: end; }
.review .two label { margin: 0; min-width: 0; }
.review .two input { min-width: 0; padding: 0 8px; font-size: 16px; }
.review .drop { height: 44px; color: var(--muted); font-size: 22px; }
.sheet::backdrop { background: rgba(16, 24, 40, .4); }
.sheet h2 { font-size: 17px; margin: 0 0 12px; }
.sheet label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 10px; }
.sheet input { display: block; width: 100%; height: 44px; margin-top: 3px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--bg); color: var(--text); font-size: 16px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: -2px 0 14px; }
.chips button { height: 40px; padding: 0 10px; border-radius: 18px; background: var(--soft); font-size: 14px; }
.acts { position: sticky; bottom: -16px; display: flex; justify-content: space-between; align-items: center; gap: 8px; margin: 0 -16px -16px; padding: 10px 16px; background: var(--bg); border-top: 1px solid var(--line); }
.acts .right { display: flex; gap: 8px; }
.ghost { height: 46px; padding: 0 14px; border-radius: 12px; color: var(--muted); }
.danger { height: 46px; padding: 0 4px; color: var(--bad); font-size: 14px; }
