/* SPHERA OS — дизайн-система дашборда. Три темы на одних компонентах:
   a — «Фарфор» (светлая, спокойная), b — «Графит» (тёмная, контрастная), c — «Песок» (тёплая, журнальная). */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url(/static/fonts/inter-cyrillic-wght-normal.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url(/static/fonts/inter-latin-wght-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
/* ---------- токены ---------- */
:root, [data-theme="a"] {
  --bg: #f4f4f1; --bg2: #ecece8; --card: #ffffff; --text: #0f1217; --muted: #6b7280; --faint: #9aa1ad;
  --line: rgba(15, 23, 42, .07); --grid: rgba(15, 23, 42, .08); --track: rgba(15, 23, 42, .07);
  --accent: #3d5afe; --accent-soft: rgba(61, 90, 254, .1); --on-accent: #fff;
  --good: #10b981; --warn: #f59e0b; --bad: #ef4444;
  --c1: #3d5afe; --c2: #10b981; --c3: #8b5cf6; --c4: #f59e0b; --c5: #f43f5e; --c6: #0ea5e9; --c7: #14b8a6; --c8: #64748b;
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 12px 32px -12px rgba(16, 24, 40, .10);
  --r: 22px; --r-sm: 14px; --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; --display: var(--font);
  --hero-bg: radial-gradient(120% 140% at 100% 0%, rgba(61, 90, 254, .10) 0%, rgba(139, 92, 246, .06) 35%, transparent 60%), var(--card);
  color-scheme: light;
}
[data-theme="b"] {
  --bg: #0a0b0e; --bg2: #101217; --card: #13151b; --text: #f2f4f7; --muted: #8b93a3; --faint: #5d6474;
  --line: rgba(255, 255, 255, .06); --grid: rgba(255, 255, 255, .07); --track: rgba(255, 255, 255, .08);
  --accent: #7c9cff; --accent-soft: rgba(124, 156, 255, .14); --on-accent: #0a0b0e;
  --good: #34d399; --warn: #fbbf24; --bad: #fb7185;
  --c1: #7c9cff; --c2: #34d399; --c3: #a78bfa; --c4: #fbbf24; --c5: #fb7185; --c6: #22d3ee; --c7: #2dd4bf; --c8: #94a3b8;
  --shadow: 0 0 0 1px rgba(255, 255, 255, .04), 0 20px 40px -20px rgba(0, 0, 0, .8);
  --hero-bg: radial-gradient(90% 120% at 100% 0%, rgba(124, 156, 255, .22) 0%, rgba(167, 139, 250, .12) 30%, transparent 62%),
             radial-gradient(60% 80% at 0% 100%, rgba(52, 211, 153, .10) 0%, transparent 60%), var(--card);
  color-scheme: dark;
}
/* «Авто»: светлая днём, тёмная — когда на телефоне/компьютере включена тёмная тема */
@media (prefers-color-scheme: dark) { [data-theme="auto"] {
  --bg: #0a0b0e; --bg2: #101217; --card: #13151b; --text: #f2f4f7; --muted: #8b93a3; --faint: #5d6474;
  --line: rgba(255, 255, 255, .06); --grid: rgba(255, 255, 255, .07); --track: rgba(255, 255, 255, .08);
  --accent: #7c9cff; --accent-soft: rgba(124, 156, 255, .14); --on-accent: #0a0b0e;
  --good: #34d399; --warn: #fbbf24; --bad: #fb7185;
  --c1: #7c9cff; --c2: #34d399; --c3: #a78bfa; --c4: #fbbf24; --c5: #fb7185; --c6: #22d3ee; --c7: #2dd4bf; --c8: #94a3b8;
  --shadow: 0 0 0 1px rgba(255, 255, 255, .04), 0 20px 40px -20px rgba(0, 0, 0, .8);
  --hero-bg: radial-gradient(90% 120% at 100% 0%, rgba(124, 156, 255, .22) 0%, rgba(167, 139, 250, .12) 30%, transparent 62%),
             radial-gradient(60% 80% at 0% 100%, rgba(52, 211, 153, .10) 0%, transparent 60%), var(--card);
  color-scheme: dark;
} }
body.wa { --bg: var(--tg-theme-secondary-bg-color, var(--bg)); }

/* ---------- основа ---------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.45 var(--font); font-feature-settings: "tnum" 1, "cv11" 1;
  -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; letter-spacing: -.01em; }
.muted { color: var(--muted); } .bad { color: var(--bad); } .good { color: var(--good); }
.inline { display: inline; }

/* ---------- каркас ---------- */
.shell { display: flex; min-height: 100vh; }
.rail { width: 248px; flex-shrink: 0; position: sticky; top: 0; height: 100vh; overflow-y: auto; padding: 22px 16px; display: flex; flex-direction: column; gap: 6px; scrollbar-width: thin; }
.logo { display: flex; align-items: center; gap: 10px; font: 700 19px/1 var(--display); padding: 4px 8px 14px; }
.mark { width: 34px; height: 34px; border-radius: 10px; display: block; box-shadow: 0 4px 12px -4px rgba(79, 107, 255, .5); }
.rail-search input { width: 100%; border: 1px solid var(--line); background: var(--card); border-radius: 12px; padding: 9px 12px; font: inherit; color: inherit; margin-bottom: 10px; }
.main-nav a, .sub-nav a { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 12px; color: var(--muted); font-weight: 500; transition: background .15s, color .15s; }
.main-nav a svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.main-nav a:hover, .sub-nav a:hover { background: var(--card); color: var(--text); }
.main-nav a.on { background: var(--card); color: var(--text); box-shadow: var(--shadow); }
.sub-nav a { font-size: 14px; padding: 5px 12px; }
.rail-sep { margin: 16px 12px 6px; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--faint); }
.content { flex: 1; min-width: 0; padding: 26px 30px 60px; max-width: 1360px; }
.topbar { display: none; }
.tabbar, .sheet { display: none; }

/* ---------- сетка карточек ---------- */
.bento { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; }
.span-12 { grid-column: span 12; } .span-8 { grid-column: span 8; } .span-7 { grid-column: span 7; } .span-6 { grid-column: span 6; }
.span-5 { grid-column: span 5; } .span-4 { grid-column: span 4; }
.card { background: var(--card); border-radius: var(--r); padding: 20px 22px; box-shadow: var(--shadow); min-width: 0; }
.ch { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.ch h3 { font: 600 16px/1.2 var(--display); }
.ch .more { margin-left: auto; font-size: 13px; color: var(--muted); padding: 4px 10px; border-radius: 999px; transition: background .15s; }
.ch .more:hover { background: var(--accent-soft); color: var(--accent); }
.pill { font-size: 12px; padding: 3px 9px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.pill-bad { font-size: 11px; padding: 2px 8px; border-radius: 999px; background: color-mix(in srgb, var(--bad) 14%, transparent); color: var(--bad); font-weight: 600; margin-left: 8px; }
.eyebrow { font-size: 13px; color: var(--muted); font-weight: 500; letter-spacing: .01em; }
.sub { font-size: 12px; text-transform: uppercase; letter-spacing: .07em; color: var(--faint); margin: 16px 0 6px; font-weight: 600; }
.empty { color: var(--muted); font-size: 14px; padding: 18px; text-align: center; border: 1px dashed var(--line); border-radius: var(--r-sm); }
.hint { margin-top: 14px; padding: 12px 14px; border-radius: var(--r-sm); background: var(--accent-soft); font-size: 14px; }
.hint a { color: var(--accent); font-weight: 600; }

/* ---------- кнопки ---------- */
.btn { font: 600 14px/1 var(--font); border: 0; border-radius: 12px; padding: 11px 16px; cursor: pointer; background: var(--bg2); color: var(--text); transition: transform .08s, opacity .15s; }
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--accent); color: var(--on-accent); }
.btn.ghost { background: transparent; border: 1px solid var(--line); }
.btn.tiny { padding: 6px 10px; font-size: 13px; border-radius: 10px; }

/* ---------- герой: приветствие и оценка дня ---------- */
.hero { background: var(--hero-bg); display: flex; gap: 28px; align-items: center; justify-content: space-between; padding: 28px 30px; overflow: hidden; }
.hero h1 { font: 700 34px/1.1 var(--display); margin: 6px 0 8px; letter-spacing: -.02em; }
.lead { margin: 0 0 20px; color: var(--muted); font-size: 16px; max-width: 520px; }
.hero-stats { display: grid; grid-template-columns: repeat(4, auto); gap: 10px 28px; justify-content: start; }
.hero-stats b { display: block; font: 700 26px/1 var(--font); letter-spacing: -.02em; }
.hero-stats span { font-size: 12px; color: var(--muted); }
.hero-r { display: flex; align-items: center; gap: 22px; }
.ring { position: relative; flex-shrink: 0; }
.ring svg { display: block; }
.ring-in { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; line-height: 1.1; }
.ring-in b { font-weight: 700; font-size: 15px; }
.ring-in span { font-size: 11px; color: var(--muted); margin-top: 2px; }
.gauge .sv { font: 700 46px/1 var(--font); letter-spacing: -.03em; }
.gauge .sl { font-size: 12px; color: var(--muted); margin-top: 4px; }
.breakdown { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; min-width: 210px; }
.breakdown li { display: grid; grid-template-columns: 70px 1fr 40px; align-items: center; gap: 10px; font-size: 13px; }
.breakdown span { color: var(--muted); } .breakdown b { text-align: right; }
.meter { height: 6px; border-radius: 999px; background: var(--track); overflow: hidden; }
.meter i { display: block; height: 100%; border-radius: 999px; }

/* ---------- фокус ---------- */
.focus { display: flex; align-items: center; gap: 18px; justify-content: space-between; border-left: 4px solid var(--accent); }
.focus .ft { font: 600 20px/1.3 var(--display); margin: 4px 0; }
.focus .fa { display: flex; gap: 8px; flex-shrink: 0; }

/* ---------- задачи ---------- */
.tasks { list-style: none; margin: 0; padding: 0; }
.task { display: flex; align-items: center; gap: 12px; padding: 11px 4px; border-bottom: 1px solid var(--line); }
.task:last-child { border-bottom: 0; }
.task a { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.task .tt { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.task .tm { font-size: 12px; color: var(--muted); }
.check { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--faint); background: none; cursor: pointer; padding: 0; transition: all .15s; }
.check:hover { border-color: var(--good); background: color-mix(in srgb, var(--good) 15%, transparent); }
.task.p1 .check { border-color: var(--bad); } .task.p2 .check { border-color: var(--warn); }
.chance { font-size: 12px; font-weight: 700; padding: 3px 8px; border-radius: 999px; }
.c-g { color: var(--good); background: color-mix(in srgb, var(--good) 13%, transparent); }
.c-y { color: var(--warn); background: color-mix(in srgb, var(--warn) 15%, transparent); }
.c-r { color: var(--bad); background: color-mix(in srgb, var(--bad) 13%, transparent); }
.foot { display: flex; justify-content: space-between; gap: 10px; margin-top: 12px; font-size: 13px; color: var(--muted); flex-wrap: wrap; }

/* ---------- расписание ---------- */
.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.timeline li { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border-radius: var(--r-sm); background: var(--bg2); }
.timeline time { font-weight: 700; font-size: 14px; color: var(--accent); min-width: 44px; }

/* ---------- привычки ---------- */
.habit-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.habit { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 16px 10px; border-radius: var(--r-sm); background: var(--bg2); }
.hn { font-weight: 600; } .hv { font-size: 13px; color: var(--muted); } .hs { font-size: 12px; color: var(--faint); }
.ha { display: flex; gap: 6px; margin-top: 4px; min-height: 30px; align-items: center; }
.src { font-size: 12px; color: var(--muted); }
.dots { display: flex; gap: 4px; }
.dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--track); }
.dots i.on { background: var(--good); } .dots i.na { background: transparent; border: 1px dashed var(--track); }

/* ---------- показатели ---------- */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.kpis.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.kpi { padding: 14px 16px; border-radius: var(--r-sm); background: var(--bg2); min-width: 0; }
.kl { font-size: 12px; color: var(--muted); font-weight: 500; }
.kv { font: 700 24px/1.15 var(--font); letter-spacing: -.02em; margin: 4px 0 2px; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.ks { font-size: 12px; color: var(--faint); }
.delta { font-size: 12px; font-weight: 700; } .delta.good { color: var(--good); } .delta.bad { color: var(--bad); }
.spark { margin-top: 6px; display: block; }
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

/* ---------- графики ---------- */
.chart { display: block; overflow: visible; height: auto; }
.chart text { fill: var(--faint); font: 500 11px var(--font); } .chart text.on { fill: var(--text); font-weight: 700; }
.chart .gl { fill: var(--muted); font-size: 10px; }
.legend { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 7px; font-size: 14px; }
.legend li { display: grid; grid-template-columns: 10px 1fr auto; gap: 10px; align-items: center; }
.legend i { width: 10px; height: 10px; border-radius: 3px; } .legend b { font-weight: 600; }
.donut-wrap { display: flex; justify-content: center; }
.donut-wrap .ring-in b { font-size: 17px; }
.budget { display: flex; align-items: center; gap: 12px; margin-top: 14px; font-size: 13px; color: var(--muted); }
.budget .meter { flex: 1; height: 8px; }

/* ---------- списки ---------- */
.plist, .glist, .mini { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.pn { display: flex; align-items: center; font-weight: 600; margin-bottom: 7px; }
.pm { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-top: 6px; }
.glist li { display: flex; gap: 12px; align-items: center; } .glist li div { display: flex; flex-direction: column; }
.mini { gap: 10px; font-size: 14px; } .mini li { display: flex; gap: 8px; align-items: baseline; }
.mini li span, .mini li em { margin-left: auto; color: var(--muted); font-style: normal; font-size: 13px; white-space: nowrap; }
.mini li.wait div { display: flex; flex-direction: column; min-width: 0; } .mini li.wait small { color: var(--muted); font-size: 12px; }

/* ---------- планшет ---------- */
@media (max-width: 1180px) {
  .span-8, .span-7, .span-6, .span-5, .span-4 { grid-column: span 6; }
  .span-8.money { grid-column: span 12; } .span-4.cats { grid-column: span 6; }
  .rail { width: 220px; }
}
/* ---------- телефон ---------- */
@media (max-width: 860px) {
  .rail { display: none; }
  .content { padding: 0 14px calc(92px + env(safe-area-inset-bottom)); }
  .topbar { display: flex; align-items: center; gap: 10px; position: sticky; top: 0; z-index: 5; padding: calc(10px + env(safe-area-inset-top)) 2px 10px;
    background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
  .topbar h2 { font: 700 18px/1 var(--display); flex: 1; }
  .icon-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
  .bento { grid-template-columns: 1fr; gap: 12px; }
  [class*="span-"] { grid-column: 1 / -1 !important; }
  .card { padding: 16px; border-radius: 20px; }
  .hero { flex-direction: column; align-items: stretch; padding: 20px; gap: 18px; }
  .hero h1 { font-size: 28px; }
  .hero-stats { grid-template-columns: repeat(4, 1fr); gap: 8px; }
  .hero-stats b { font-size: 21px; }
  .hero-r { justify-content: space-between; }
  .breakdown { min-width: 0; flex: 1; }
  .breakdown li { grid-template-columns: 58px 1fr 34px; }
  .focus { flex-direction: column; align-items: stretch; } .focus .fa .btn { flex: 1; } .focus form { flex: 1; display: flex; }
  .kpis { grid-template-columns: 1fr 1fr; gap: 10px; }
  .kv { font-size: 21px; }
  .duo { grid-template-columns: 1fr; gap: 6px; }
  .habit-row { grid-template-columns: 1fr 1fr; gap: 10px; }
  .tabbar { display: flex; position: fixed; left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 10; padding: 6px;
    border-radius: 22px; background: color-mix(in srgb, var(--card) 88%, transparent); backdrop-filter: blur(20px) saturate(1.4);
    -webkit-backdrop-filter: blur(20px) saturate(1.4); box-shadow: 0 10px 30px -10px rgba(0, 0, 0, .25), 0 0 0 1px var(--line); }
  .tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 7px 0; border-radius: 16px; font-size: 11px; color: var(--muted); font-weight: 600; }
  .tabbar a svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
  .tabbar a.on { color: var(--accent); background: var(--accent-soft); }
  .tabbar a svg circle { fill: currentColor; stroke: none; }
  .sheet { display: block; position: fixed; inset: 0; z-index: 20; background: rgba(0, 0, 0, 0); pointer-events: none; visibility: hidden; transition: background .2s, visibility .25s; }
  .sheet-in { position: absolute; left: 0; right: 0; bottom: 0; background: var(--card); border-radius: 24px 24px 0 0; padding: 10px 16px calc(24px + env(safe-area-inset-bottom));
    transform: translateY(105%); transition: transform .25s cubic-bezier(.2, .8, .2, 1); }
  body.sheet-open .sheet { background: rgba(0, 0, 0, .35); pointer-events: auto; visibility: visible; }
  body.sheet-open .sheet-in { transform: none; }
  .grabber { width: 40px; height: 5px; border-radius: 3px; background: var(--track); margin: 0 auto 16px; }
  .sheet-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .sheet-grid a { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 6px; border-radius: 16px; background: var(--bg2); font-size: 24px; }
  .sheet-grid a span { font-size: 13px; font-weight: 600; }
}

/* ---------- время и фокус ---------- */
.timecard { display: flex; gap: 18px; align-items: center; }
.timecard .tl { flex: 1; min-width: 0; }
.hbar { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; font-size: 13px; margin-bottom: 9px; }
.hbar .meter { grid-column: 1 / -1; height: 7px; }
.hbar b { font-weight: 600; }
@media (max-width: 860px) { .timecard { flex-direction: column; align-items: stretch; } .timecard .ring { align-self: center; } }

/* ---------- каркас: шапка страницы, поиск по проектам, тема ---------- */
.page-head { display: flex; align-items: center; gap: 12px; margin: 2px 0 18px; flex-wrap: wrap; }
.page-head h1 { font: 700 28px/1.15 var(--display); letter-spacing: -.02em; }
.ph-act { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.rail-tree summary { cursor: pointer; margin: 14px 12px 6px; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--faint); list-style: none; }
.rail-tree a { display: block; padding: 6px 12px; border-radius: 10px; font-size: 14px; color: var(--muted); }
.rail-tree a.t2 { padding-left: 26px; font-size: 13px; } .rail-tree a:hover { background: var(--card); color: var(--text); }
.sub-nav a.on { background: var(--card); color: var(--text); box-shadow: var(--shadow); }
.rail-foot { margin-top: auto; padding: 16px 8px 0; display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 13px; }
.theme-switch { display: inline-flex; background: var(--bg2); border-radius: 10px; padding: 3px; gap: 2px; }
.theme-switch button { border: 0; background: none; color: var(--muted); font: 600 12px/1 var(--font); padding: 6px 9px; border-radius: 8px; cursor: pointer; }
.theme-switch button.on { background: var(--card); color: var(--text); box-shadow: var(--shadow); }
.theme-switch.wide { display: flex; margin-top: 16px; } .theme-switch.wide button { flex: 1; padding: 10px; font-size: 13px; }
.flash { background: var(--accent-soft); color: var(--accent); padding: 10px 14px; border-radius: var(--r-sm); margin-bottom: 14px; font-weight: 500; }

/* ---------- формы ---------- */
input, select, textarea { font: inherit; color: var(--text); background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 9px 12px;
  transition: border-color .15s, box-shadow .15s; max-width: 100%; }
input:focus, select:focus, textarea:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
textarea { width: 100%; min-height: 90px; resize: vertical; }
label { font-size: 13px; color: var(--muted); }
button:not(.btn):not(.check):not(.tab):not([class*="theme"]):not(.chip):not(.mini):not(.mic):not(.rchip):not(.linkbtn):not(.plain) { font: 600 14px/1 var(--font); border: 0; border-radius: 12px; padding: 10px 15px;
  background: var(--accent); color: var(--on-accent); cursor: pointer; }
button.ghost, a.btn.ghost, .btn.ghost { background: var(--card) !important; color: var(--text) !important; border: 1px solid var(--line) !important; }
button.danger, .btn.danger { background: color-mix(in srgb, var(--bad) 12%, var(--card)) !important; color: var(--bad) !important; }
a.btn { display: inline-flex; align-items: center; gap: 6px; font: 600 14px/1 var(--font); padding: 10px 15px; border-radius: 12px; background: var(--accent); color: var(--on-accent); }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 10px 0; }
form.card { display: flex; flex-direction: column; gap: 10px; }
form.card.row { flex-direction: row; }
details.card > summary { cursor: pointer; font-weight: 600; list-style: none; }
details.card > summary::before { content: "＋ "; color: var(--accent); }
details.card[open] > summary { margin-bottom: 12px; }

/* ---------- таблицы ---------- */
.tablewrap { overflow-x: auto; background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; font-size: 14px; }
th { color: var(--faint); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; background: var(--card); }
tr:last-child td { border-bottom: 0; }
tbody tr:hover td, table tr:hover td { background: color-mix(in srgb, var(--accent) 3%, transparent); }
td a { color: var(--text); font-weight: 500; } td a:hover { color: var(--accent); }

/* ---------- прежние компоненты в новом стиле ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; margin-bottom: 14px; }
.card h3 { font: 600 15px/1.3 var(--display); margin: 0 0 8px; }
h2 { font: 650 18px/1.3 var(--display); margin: 26px 0 12px; letter-spacing: -.01em; }
.small { font-size: 13px; }
.big { font: 700 26px/1.15 var(--font); letter-spacing: -.02em; }
span.p1, td.p1 { color: var(--bad); } span.p2, td.p2 { color: var(--warn); } span.p3, td.p3 { color: var(--good); }
.kanban { display: grid; grid-template-columns: repeat(4, minmax(240px, 1fr)); gap: 14px; overflow-x: auto; padding-bottom: 6px; }
.kanban .col { background: var(--bg2); border-radius: var(--r); padding: 12px; min-height: 160px; }
.kanban .col h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 4px 4px 10px; }
.kanban .item { background: var(--card); border-radius: var(--r-sm); padding: 11px 12px; margin: 8px 0; box-shadow: var(--shadow); font-size: 14px; }
.matrix { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.matrix > div { background: var(--card); border-radius: var(--r); padding: 16px; box-shadow: var(--shadow); }
.bar { height: 8px; border-radius: 999px; background: var(--accent); margin-top: 8px; }
.progress { height: 8px; border-radius: 999px; background: var(--track); overflow: hidden; margin: 8px 0 4px; }
.progress i { display: block; height: 100%; background: var(--accent); border-radius: 999px; }
.grid-habits td, .grid-habits th { text-align: center; padding: 8px 4px; }
.grid-habits td.done { background: color-mix(in srgb, var(--good) 22%, transparent); color: var(--good); font-weight: 700; }
.grid-habits td:first-child, .grid-habits th:first-child { text-align: left; padding-left: 14px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 7px 12px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); font-size: 14px; }
.chip.done { background: color-mix(in srgb, var(--good) 14%, var(--card)); border-color: transparent; }
.chip .mini { border: 0; border-radius: 8px; padding: 3px 8px; font: 600 12px/1 var(--font); background: var(--accent-soft); color: var(--accent); cursor: pointer; margin-left: 4px; }
svg text { fill: var(--faint); font: 500 11px var(--font); }
.today { display: grid; grid-template-columns: 2fr 1fr; gap: 14px; }
@media (max-width: 860px) {
  .page-head h1 { display: none; } .page-head { margin: 4px 0 12px; } .page-head .ph-act { margin-left: 0; width: 100%; }
  .kanban { grid-template-columns: repeat(4, 82vw); } .matrix, .today { grid-template-columns: 1fr; }
  th, td { padding: 10px 11px; }
  .rail-foot { display: none; }
}

/* ---------- вкладки, фильтры, быстрое добавление ---------- */
.seg-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.segs { display: inline-flex; background: var(--bg2); border-radius: 14px; padding: 4px; gap: 2px; overflow-x: auto; max-width: 100%; scrollbar-width: none; }
.segs .seg { padding: 8px 14px; border-radius: 10px; font-weight: 600; font-size: 14px; color: var(--muted); white-space: nowrap; display: inline-flex; gap: 6px; align-items: center; }
.segs .seg.on { background: var(--card); color: var(--text); box-shadow: var(--shadow); }
.segs .seg i { font-style: normal; font-size: 11px; background: var(--accent-soft); color: var(--accent); border-radius: 999px; padding: 1px 7px; }
.segs.sm .seg { padding: 7px 11px; font-size: 13px; }
.fchips { display: flex; gap: 6px; overflow-x: auto; padding: 2px 0 12px; scrollbar-width: none; }
.fchip { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); font-size: 13px; font-weight: 500; white-space: nowrap; color: var(--muted); }
.fchip.on { background: var(--text); color: var(--bg); border-color: transparent; }
form.quick-add { flex-direction: row; }
.quick-add { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; padding: 12px 12px 12px 16px; margin-bottom: 14px; }
.quick-add input[name=text] { flex: 1; min-width: 200px; border: 0; background: transparent; font-size: 15px; padding: 8px 0; box-shadow: none !important; }
.qa-hint { flex-basis: 100%; font-size: 12px; color: var(--faint); margin-top: -2px; }
.list-card { padding: 8px 20px 12px; margin-bottom: 14px; }
.group + .group { margin-top: 6px; }
.gh { display: flex; justify-content: space-between; align-items: center; font-size: 12px; text-transform: uppercase; letter-spacing: .07em; color: var(--faint);
  font-weight: 700; padding: 14px 4px 4px; }
.gh span { font-weight: 600; } .gh.bad { color: var(--bad); }
.task.is-done .tt { color: var(--muted); text-decoration: line-through; }
.check.done, .task .check.done { display: grid; place-items: center; font-size: 12px; color: #fff; background: var(--good); border-color: var(--good) !important; }
.kanban .col h3 span { color: var(--faint); margin-left: 4px; }
.kanban .item { border-left: 3px solid var(--line); } .kanban .item.p1 { border-left-color: var(--bad); } .kanban .item.p2 { border-left-color: var(--warn); }
.kanban .item a { font-weight: 600; display: block; } .kanban .item .tm { font-size: 12px; color: var(--muted); margin: 3px 0 6px; }
@media (max-width: 860px) { .seg-row { flex-direction: column; align-items: stretch; } .segs { width: 100%; } .segs .seg { flex: 1; justify-content: center; }
  .list-card { padding: 4px 14px 10px; } }
@media (max-width: 860px) { .desk-only { display: none !important; } .page-head:has(.ph-act:empty) { display: none; } }

/* ---------- деньги ---------- */
.month-nav { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.month-nav b { font: 650 18px/1 var(--display); min-width: 150px; text-align: center; }
.month-nav .btn { padding: 8px 14px; font-size: 18px; } .btn.dis { opacity: .35; pointer-events: none; }
.kpis.five { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.blist { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.bl { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; margin-bottom: 6px; } .bl span { color: var(--muted); }
.bs { font-size: 12px; color: var(--muted); margin-top: 4px; } .bs.bad { color: var(--bad); font-weight: 600; }
.txlist { list-style: none; margin: 0; padding: 0; }
.txlist li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.txlist li:last-child { border-bottom: 0; }
.txlist a { flex: 1; min-width: 0; display: flex; flex-direction: column; } .txlist small { color: var(--muted); font-size: 12px; }
.txlist em { font-style: normal; font-weight: 700; white-space: nowrap; }
.ti { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; background: color-mix(in srgb, var(--c5) 13%, transparent); color: var(--c5); font-weight: 700; }
.ti.in { background: color-mix(in srgb, var(--good) 14%, transparent); color: var(--good); }
.links { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
.links a { font-size: 13px; padding: 6px 11px; border-radius: 999px; background: var(--bg2); color: var(--muted); font-weight: 500; }
.links a:hover { color: var(--accent); background: var(--accent-soft); }
.bm { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
@media (max-width: 1180px) { .kpis.five { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 860px) { .kpis.five { grid-template-columns: 1fr 1fr; } .bm { flex-direction: column; align-items: stretch; } }

/* ---------- здоровье ---------- */
.medcard > summary { font: 600 16px/1.2 var(--display); }
.formgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; margin-top: 8px; }
.formgrid label { display: flex; flex-direction: column; gap: 5px; }
.formgrid input { width: 100%; }

/* ---------- привычки ---------- */
.hcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 16px; margin-bottom: 16px; }
.hc-top { display: flex; gap: 16px; align-items: center; }
.hc-t h3 { font: 650 18px/1.2 var(--display); }
.hc-v { font: 700 24px/1.2 var(--font); margin: 4px 0 8px; letter-spacing: -.02em; } .hc-v span { font-size: 14px; color: var(--muted); font-weight: 500; }
.hc-a { display: flex; gap: 6px; flex-wrap: wrap; }
.hc-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 16px; }
.hc-stats div { background: var(--bg2); border-radius: 12px; padding: 10px; text-align: center; }
.hc-stats b { display: block; font-size: 17px; } .hc-stats span { font-size: 11px; color: var(--muted); }
.heat { display: flex; gap: 4px; }
.hw { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.heat i { display: block; aspect-ratio: 1; border-radius: 4px; background: var(--track); }
.heat i.l1 { background: color-mix(in srgb, var(--hc) 30%, transparent); } .heat i.l2 { background: color-mix(in srgb, var(--hc) 60%, transparent); }
.heat i.l3 { background: var(--hc); } .heat i.na { background: transparent; border: 1px dashed var(--track); } .heat i.fut { background: transparent; }
.hc-off { margin-top: 14px; text-align: right; } .hc-off .btn { color: var(--faint) !important; }

/* ---------- проекты ---------- */
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; margin-bottom: 16px; }
.pcard { display: block; border-top: 3px solid var(--pc); transition: transform .15s, box-shadow .15s; }
.pcard:hover { transform: translateY(-2px); }
.pc-top { display: flex; gap: 14px; align-items: center; } .pc-top h3 { font: 650 18px/1.2 var(--display); margin-bottom: 3px; }
.pc-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 16px; }
.pc-stats div { background: var(--bg2); border-radius: 12px; padding: 9px 6px; text-align: center; }
.pc-stats b { display: block; font-size: 17px; } .pc-stats span { font-size: 10.5px; color: var(--muted); line-height: 1.2; display: block; }
.pkids, .pchips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.pchip { font-size: 13px; padding: 5px 11px; border-radius: 999px; background: var(--bg2); font-weight: 500; }
.inbox-strip { display: block; margin-bottom: 16px; font-weight: 600; }
.phead { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 14px; background: var(--hero-bg); }
.phead h1 { font: 700 30px/1.15 var(--display); letter-spacing: -.02em; } .phead p { margin: 6px 0 0; }
.crumbs { font-size: 13px; color: var(--muted); margin-bottom: 4px; } .crumbs a:hover { color: var(--accent); }
.mlist { list-style: none; margin: 0 0 10px; padding: 0; } .mlist li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.mlist em { margin-left: auto; color: var(--muted); font-style: normal; font-size: 13px; }
.meet { padding: 12px 0; border-bottom: 1px solid var(--line); } .meet p { margin: 4px 0 0; font-size: 14px; }
@media (max-width: 860px) { .pgrid { grid-template-columns: 1fr; } .phead { flex-direction: column-reverse; align-items: flex-start; } .phead h1 { font-size: 24px; } }

/* ---------- списки разделов (общий шаблон) ---------- */
.intro { margin-bottom: 14px; }
.addbox { margin-bottom: 14px; } .addbox > summary { font-weight: 600; }
.formgrid .wide { grid-column: 1 / -1; }
.formgrid textarea { min-height: 80px; }
.record { margin-bottom: 14px; } .formbtns { display: flex; gap: 8px; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.rows { padding: 4px 20px; }
.rrow { display: flex; gap: 14px; align-items: center; padding: 13px 0; border-bottom: 1px solid var(--line); }
.rrow:last-child { border-bottom: 0; }
.rmain { flex: 1; min-width: 0; }
.rtitle { font-weight: 600; display: block; } a.rtitle:hover { color: var(--accent); }
.rmeta { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 3px; font-size: 13px; color: var(--muted); }
.rmeta i { font-style: normal; color: var(--faint); }
.racts { display: flex; gap: 6px; flex-shrink: 0; } .racts form { display: inline; }
@media (max-width: 860px) { .rows { padding: 2px 14px; } .rrow { flex-wrap: wrap; } .racts { width: 100%; justify-content: flex-end; } }

/* ---------- цели, люди, команда ---------- */
.gcard { border-top: 3px solid var(--gc); } .gcard.proposed { border-style: dashed; }
.gc-top { display: flex; gap: 16px; align-items: center; } .gc-top h3 { font: 650 18px/1.25 var(--display); }
.gc-top .why { margin: 6px 0; font-size: 14px; color: var(--muted); } .gc-top form { margin-top: 8px; display: block; }
.gc-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(72px, 1fr)); gap: 8px; margin-top: 16px; }
.gc-facts div { background: var(--bg2); border-radius: 12px; padding: 10px; text-align: center; }
.gc-facts b { display: block; font-size: 17px; } .gc-facts span { font-size: 11px; color: var(--muted); }
.pgrid.people { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.person { display: flex; gap: 14px; align-items: center; padding: 16px 18px; }
.ava { width: 46px; height: 46px; border-radius: 50%; flex-shrink: 0; display: grid; place-items: center; font-weight: 700; font-size: 16px;
  background: linear-gradient(135deg, var(--accent-soft), color-mix(in srgb, var(--c3) 22%, transparent)); color: var(--accent); }
.tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.tag { font-size: 11.5px; padding: 2px 8px; border-radius: 999px; background: var(--bg2); color: var(--muted); font-weight: 600; }
.tag.warm { background: color-mix(in srgb, var(--warn) 16%, transparent); color: var(--warn); }
.emp-top { display: flex; gap: 12px; align-items: center; } .pc-stats.three { grid-template-columns: repeat(3, 1fr); }
.emp-tasks { margin-top: 12px; } .emp-tasks li a { font-size: 14px; }
.intro .hcards, .intro .pgrid { margin-bottom: 16px; }

/* ---------- дневник, календарь, английский ---------- */
.jday { display: flex; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); } .jday:last-child { border-bottom: 0; }
.jd { width: 52px; flex-shrink: 0; text-align: center; background: var(--bg2); border-radius: 14px; padding: 8px 0; height: fit-content; }
.jd b { display: block; font-size: 20px; } .jd span { font-size: 11px; color: var(--muted); text-transform: uppercase; }
.jb p { margin: 6px 0 0; font-size: 14px; } .jm { font-size: 13px; color: var(--muted); } .jb .val { color: var(--accent); }
.cweek { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.cday.is-today { box-shadow: 0 0 0 2px var(--accent), var(--shadow); }
.cdh { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 12px; } .cdh b { font: 650 17px/1 var(--display); } .cdh span { color: var(--muted); font-size: 13px; }
.timeline li span { flex: 1; display: flex; flex-direction: column; } .timeline small { color: var(--muted); font-size: 12px; } .timeline em { font-style: normal; color: var(--faint); font-size: 12px; }
.words { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); display: grid; }

/* ---------- карточка задачи ---------- */
.thead { margin-bottom: 16px; border-left: 4px solid var(--line); } .thead.p1 { border-left-color: var(--bad); } .thead.p2 { border-left-color: var(--warn); } .thead.p3 { border-left-color: var(--good); }
.th-top { display: flex; gap: 10px; align-items: center; } .thead h1 { font: 700 28px/1.2 var(--display); letter-spacing: -.02em; margin: 10px 0 8px; }
.th-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; color: var(--muted); font-size: 14px; } .th-meta a:hover { color: var(--accent); }
.th-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; } .th-acts form { display: inline; }
.stack { display: grid; gap: 16px; align-content: start; }
.fc { display: flex; gap: 18px; align-items: center; } .fcl { margin: 0; padding-left: 18px; font-size: 14px; display: grid; gap: 4px; }
.ctx { white-space: pre-wrap; margin: 0; font-size: 15px; }
.formgrid.one { grid-template-columns: 1fr; }
@media (max-width: 860px) { .fc { flex-direction: column; align-items: flex-start; } .thead h1 { font-size: 22px; } }

/* ---------- тексты-отчёты ---------- */
pre.card, .card pre { font: 15px/1.75 var(--font); white-space: pre-wrap; margin: 0; }
@media (max-width: 860px) { .budget { flex-wrap: wrap; } .budget .meter { flex-basis: 100%; } }

/* ---------- вход ---------- */
.login { max-width: 360px; margin: 14vh auto; padding: 0 18px; text-align: center; }
.login-logo { width: 72px; height: 72px; border-radius: 20px; box-shadow: 0 12px 30px -10px rgba(79, 107, 255, .6); }
.login h1 { font: 700 30px/1 var(--display); margin: 16px 0 4px; } .login > p { margin: 0 0 20px; }
.login form { display: flex; flex-direction: column; gap: 10px; } .login input { width: 100%; }

/* ---------- деньги: счета, операции, отчёты ---------- */
.accgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; }
.acc { display: flex; flex-direction: column; gap: 8px; }
.acc-top { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; } .acc-top .tag { margin-left: auto; }
.acc-ic { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; font-size: 22px; background: var(--bg2); }
.acc-bal { font: 700 28px/1.1 var(--font); letter-spacing: -.02em; }
.acc-acts { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.acc-edit summary { cursor: pointer; font-size: 13px; color: var(--muted); margin-top: 4px; } .acc-edit[open] summary { margin-bottom: 10px; }
.k-credit { border-top: 3px solid var(--warn); } .k-savings, .k-deposit { border-top: 3px solid var(--good); } .k-invest { border-top: 3px solid var(--c3); }
label.chk { flex-direction: row !important; align-items: center; gap: 8px !important; color: var(--text); font-size: 14px; } label.chk input { width: auto; }
.opform .kinds { display: flex; gap: 6px; margin: 4px 0 14px; }
.opform .kinds label { padding: 8px 14px; border-radius: 10px; background: var(--bg2); cursor: pointer; font-weight: 600; color: var(--muted); font-size: 14px; }
.opform .kinds label:has(input:checked) { background: var(--accent); color: var(--on-accent); } .opform .kinds input { display: none; }
.opform .only-tr, .opform .only-inc { display: none; }
.opform:has(input[value=transfer]:checked) .only-tr { display: flex; } .opform:has(input[value=transfer]:checked) .only-exp,
.opform:has(input[value=transfer]:checked) .not-tr { display: none; }
.opform:has(input[value=income]:checked) .only-inc { display: flex; } .opform:has(input[value=income]:checked) .only-exp { display: none; }
.opsum { display: flex; gap: 22px; flex-wrap: wrap; padding: 12px 4px 4px; font-size: 14px; color: var(--muted); }
.ti.tr { background: var(--bg2); color: var(--muted); }
.debts { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.debts li { display: flex; justify-content: space-between; gap: 10px; align-items: center; flex-wrap: wrap; }
.debts li div { display: flex; flex-direction: column; } .debts em { font-style: normal; font-size: 13px; }
.debts input { width: 120px; padding: 6px 9px; } .debts .row { margin: 0; flex-wrap: nowrap; }
.leg2 { display: flex; gap: 16px; font-size: 13px; color: var(--muted); margin-bottom: 6px; } .leg2 i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; }
.tablewrap.flat { box-shadow: none; background: transparent; }
.heatt td, .heatt th { text-align: right; } .heatt td:first-child, .heatt th:first-child { text-align: left; }
.hm { display: inline-block; padding: 3px 8px; border-radius: 8px; background: color-mix(in srgb, var(--c5) calc(var(--a) * 38%), transparent); font-size: 13px; }
.month-nav .segs { margin-left: auto; }
@media (max-width: 860px) { .month-nav { flex-wrap: wrap; } .month-nav .segs { margin-left: 0; width: 100%; } }
.acc-bal small { font-size: 14px; color: var(--muted); font-weight: 500; margin-left: 8px; }

/* ---------- дела: выбор и массовые действия ---------- */
.task .sel { width: 18px; height: 18px; accent-color: var(--accent); flex-shrink: 0; opacity: .35; transition: opacity .15s; }
.task:hover .sel, .task .sel:checked { opacity: 1; }
.bulkbar { display: none; position: fixed; left: 50%; transform: translateX(-50%); bottom: 22px; z-index: 15; gap: 8px; align-items: center; flex-wrap: wrap;
  padding: 10px 14px; border-radius: 18px; background: var(--card); box-shadow: 0 16px 40px -12px rgba(0, 0, 0, .35), 0 0 0 1px var(--line); max-width: calc(100% - 24px); }
.bulkbar span { font-weight: 600; font-size: 14px; } .bulkbar select { padding: 6px 9px; font-size: 13px; }
body:has(.task .sel:checked) .bulkbar { display: flex; }
@media (max-width: 860px) { .bulkbar { bottom: calc(96px + env(safe-area-inset-bottom)); } .task .sel { opacity: 1; } }
.heat i.sk { background: repeating-linear-gradient(45deg, var(--track), var(--track) 3px, transparent 3px, transparent 6px); }
.heat i.rel { background: color-mix(in srgb, var(--bad) 55%, transparent); }

/* ---------- дневник ---------- */
.jrow { display: flex; gap: 28px; flex-wrap: wrap; }
.scale { display: flex; gap: 6px; } .scale input, .achip input { display: none; }
.scale span { display: grid; place-items: center; min-width: 42px; height: 42px; border-radius: 12px; background: var(--bg2); cursor: pointer; font-size: 18px; font-weight: 600; }
.scale input:checked + span { background: var(--accent); color: var(--on-accent); }
.achips { display: flex; flex-wrap: wrap; gap: 6px; }
.achip span { display: inline-block; padding: 7px 12px; border-radius: 999px; background: var(--bg2); cursor: pointer; font-size: 14px; }
.achip input:checked + span { background: var(--accent-soft); color: var(--accent); font-weight: 600; box-shadow: inset 0 0 0 1px var(--accent); }
.infl { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.infl li { display: grid; grid-template-columns: 150px 1fr 44px 110px; gap: 10px; align-items: center; font-size: 14px; }
.infl .ib { height: 8px; background: var(--track); border-radius: 999px; overflow: hidden; } .infl .ib i { display: block; height: 100%; border-radius: 999px; }
.infl .ib i.pos { background: var(--good); } .infl .ib i.neg { background: var(--bad); } .infl em { font-style: normal; color: var(--faint); font-size: 12px; }
.pixels { display: grid; gap: 3px; } .prow { display: grid; grid-template-columns: 30px repeat(31, 1fr); gap: 2px; align-items: center; }
.prow span { font-size: 11px; color: var(--faint); } .prow i { aspect-ratio: 1; border-radius: 3px; background: var(--track); }
.prow i.x { background: transparent; } .prow i.m1 { background: #ef4444; } .prow i.m2 { background: #f59e0b; } .prow i.m3 { background: #a3a3a3; }
.prow i.m4 { background: #34d399; } .prow i.m5 { background: #10b981; }
.otd { padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; } .otd:last-child { border-bottom: 0; }
@media (max-width: 860px) { .infl li { grid-template-columns: 1fr 60px 40px; } .infl em { display: none; } }

/* ---------- люди ---------- */
.ava.big { width: 72px; height: 72px; font-size: 24px; }
.pfacts { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 10px; font-size: 13px; color: var(--muted); }
.tline { list-style: none; margin: 0; padding: 0; position: relative; }
.tline li { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); } .tline li:last-child { border-bottom: 0; }
.tl-ic { width: 32px; height: 32px; border-radius: 10px; background: var(--bg2); display: grid; place-items: center; flex-shrink: 0; }
.tline small { color: var(--faint); margin-left: 8px; font-size: 12px; } .tline p { margin: 3px 0 0; font-size: 14px; color: var(--muted); }
.pinfo { padding: 8px 0; border-bottom: 1px solid var(--line); } .pinfo:last-child { border-bottom: 0; }
.pinfo span { font-size: 12px; color: var(--faint); } .pinfo p { margin: 2px 0 0; font-size: 14px; white-space: pre-wrap; }
.plist2 li { justify-content: space-between; } .plist2 li span { margin: 0 !important; color: var(--text) !important; white-space: normal !important; }

/* ---------- цели ---------- */
.areas { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; margin-bottom: 16px; }
.area { background: var(--card); border-radius: 16px; padding: 12px 14px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 6px; border: 1px solid transparent; }
.area b { font-size: 14px; text-transform: capitalize; } .area span { font-size: 12px; color: var(--muted); } .area.on { border-color: var(--accent); }
.krs li { list-style: none; } .kr-ci { display: flex; gap: 6px; margin-top: 8px; } .kr-ci input { padding: 6px 9px; font-size: 13px; min-width: 0; flex: 1; }
.kr-ci input[name=value] { max-width: 110px; } .lastnote { font-size: 13px; margin: 10px 0 0; }
.recovery { display: flex; gap: 22px; align-items: center; background: var(--hero-bg); }
@media (max-width: 860px) { .recovery { flex-direction: column; align-items: flex-start; } }

/* ---------- таймер ---------- */
.timer .trow { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; } .timer .trow input[name=label] { flex: 1; min-width: 200px; }
.timer.on { display: flex; align-items: center; gap: 20px; justify-content: space-between; flex-wrap: wrap; background: var(--hero-bg); }
.timer.on h2 { margin: 4px 0; } .tclock { font: 700 40px/1 var(--font); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }

/* ---------- карточки ---------- */
.review { max-width: 620px; margin: 10px auto; text-align: center; padding: 40px 28px; }
.review .front { font: 700 38px/1.2 var(--display); letter-spacing: -.02em; margin-bottom: 26px; }
.review .back { font-size: 24px; margin: 22px 0 8px; } .review .ex { color: var(--muted); font-style: italic; }
.review .answer > summary { list-style: none; display: inline-block; } .review .answer > summary::before { content: none; }
.review .answer[open] > summary { display: none; }
.grades { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 18px; }
.grades .btn { min-width: 100px; display: flex; flex-direction: column; gap: 3px; } .grades small { font-size: 11px; opacity: .7; font-weight: 500; }
.grades .g1 { color: var(--bad) !important; } .rv-top { text-align: center; font-size: 13px; }
.rv-cta { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; background: var(--hero-bg); }

/* ---------- заметки ---------- */
.notes-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.note { display: flex; flex-direction: column; gap: 8px; min-height: 150px; transition: transform .15s; } .note:hover { transform: translateY(-2px); }
.note.pinned { box-shadow: 0 0 0 2px var(--accent-soft), var(--shadow); }
.note .nt { font-weight: 650; font-size: 16px; } .note p { margin: 0; color: var(--muted); font-size: 14px; flex: 1; }
.nm { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; } .nm span:last-child { margin-left: auto; font-size: 12px; color: var(--faint); }
.fchip i { font-style: normal; opacity: .6; }
.note-view { max-width: 820px; margin-bottom: 14px; } .nv-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; flex-wrap: wrap; }
.nv-head h1 { font: 700 28px/1.2 var(--display); }
.md { font-size: 16px; line-height: 1.65; margin: 14px 0; } .md p { margin: 0 0 10px; } .md a { color: var(--accent); }
.wl { color: var(--accent); border-bottom: 1px dashed currentColor; } .wl.missing { color: var(--faint); }

/* ---------- календарь: месяц ---------- */
.month-grid { padding: 12px; } .mg { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.ch7 { text-align: center; font-size: 12px; color: var(--faint); text-transform: uppercase; padding: 4px 0 8px; font-weight: 600; }
.cd { min-height: 96px; border-radius: 12px; background: var(--bg2); padding: 6px; display: flex; flex-direction: column; gap: 3px; overflow: hidden; }
.cd.out { opacity: .45; } .cd.today { box-shadow: inset 0 0 0 2px var(--accent); } .cn { font-size: 12px; font-weight: 700; color: var(--muted); }
.cd.today .cn { color: var(--accent); }
.ce { font-size: 11.5px; line-height: 1.3; padding: 2px 5px; border-radius: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ce.ev { background: var(--accent-soft); color: var(--accent); } .ce.tk { background: var(--card); } .ce.tk.dn { text-decoration: line-through; opacity: .6; }
.cmore { font-size: 11px; color: var(--faint); }
@media (max-width: 860px) { .cd { min-height: 64px; } .ce { font-size: 10px; } }
.krs .bl { flex-wrap: wrap; } .kr-ci input { width: 0; flex: 1 1 0; } .kr-ci input[name=value] { flex: 0 0 90px; } .gcard { min-width: 0; overflow: hidden; }

/* ---------- файлы ---------- */
.fgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.fcard { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.fprev { display: block; height: 170px; background: var(--bg2); overflow: hidden; }
.fprev img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.fprev:has(audio) { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; } .fprev:has(audio) .fic { height: auto; }
.fic { height: 100%; display: grid; place-items: center; font-size: 56px; }
.fbody { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; } .fbody .row { margin: 6px 0 0; }

/* ---------- согласование ---------- */
.devchat { display: flex; flex-direction: column; height: calc(100vh - 150px); min-height: 480px; background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); overflow: hidden; }
.dc-head { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.dc-feed { flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 10px; background: var(--bg); }
.cday-sep { align-self: center; font-size: 12px; color: var(--faint); background: var(--card); padding: 3px 10px; border-radius: 999px; margin: 6px 0; }
.msg { display: flex; gap: 8px; align-items: flex-end; max-width: 78%; } .msg.me { align-self: flex-end; } .msg.sys, .msg.rel { align-self: center; max-width: 92%; }
.msg .bub { padding: 10px 14px; border-radius: 18px; font-size: 15px; line-height: 1.45; position: relative; overflow-wrap: anywhere; }
.msg.me .bub { background: var(--accent); color: var(--on-accent); border-bottom-right-radius: 6px; } .msg.me .bub a { color: inherit; text-decoration: underline; }
.msg.ai .bub { background: var(--card); border-bottom-left-radius: 6px; box-shadow: var(--shadow); }
.msg.sys .bub { background: var(--bg2); font-size: 13px; } .msg.rel .bub { background: var(--card); box-shadow: 0 0 0 2px var(--accent-soft), var(--shadow); }
.msg.rel p { margin: 6px 0; } .msg pre { white-space: pre-wrap; font-size: 12px; background: var(--bg2); padding: 8px; border-radius: 8px; margin: 6px 0; }
.msg time { display: block; font-size: 11px; opacity: .6; margin-top: 4px; text-align: right; } .msg .pend { font-size: 11px; opacity: .7; }
.ava.sm { width: 28px; height: 28px; font-size: 13px; flex-shrink: 0; background: linear-gradient(135deg, #4f6bff, #8b5cf6); color: #fff; }
.atts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; } .atts img { max-width: 180px; max-height: 140px; border-radius: 10px; display: block; }
.fatt { display: inline-block; padding: 4px 8px; background: rgba(255, 255, 255, .2); border-radius: 8px; font-size: 13px; }
.typing { display: flex; gap: 4px; padding: 14px 16px !important; } .typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--faint); animation: tp 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: .2s; } .typing i:nth-child(3) { animation-delay: .4s; }
@keyframes tp { 0%, 60%, 100% { opacity: .3; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }
.dc-form { display: flex; gap: 8px; align-items: flex-end; padding: 12px; border-top: 1px solid var(--line); background: var(--card); }
.dc-form textarea { flex: 1; min-height: 44px; max-height: 180px; resize: none; } .dc-att { cursor: pointer; padding: 11px 13px; }
@media (max-width: 860px) { .devchat { height: calc(100vh - 190px); } .msg { max-width: 92%; } }

/* ---------- настройки ---------- */
.setform { margin-bottom: 14px; } .conngrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 14px; }
.conn .how { font-size: 14px; } .conn code, .status { font-size: 13px; }
.conn ol.how { padding-left: 20px; margin: 8px 0; } .conn ol.how li { margin: 6px 0; line-height: 1.5; }
.modgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px; margin-bottom: 12px; }
.modc span { display: block; padding: 12px 14px; border-radius: 12px; background: var(--bg2); cursor: pointer; font-weight: 600; }
.modc input { display: none; } .modc input:checked + span { background: var(--accent-soft); color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.modc input:checked + span::before { content: "✓ "; }
@media (max-width: 860px) { .conngrid { grid-template-columns: 1fr; } }
/* знакомство */
.welcome { max-width: 860px; margin: 0 auto; }
.wdots { display: flex; gap: 6px; margin-bottom: 14px; flex-wrap: wrap; }
.wdot { width: 28px; height: 6px; border-radius: 3px; background: var(--bg2); }
.wdot.done { background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); } .wdot.on { background: var(--accent); }
.wstep { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--faint); font-weight: 600; }
.welcome h1 { margin: 4px 0 6px; }
.wgoal + .wgoal { border-top: 1px solid var(--line); margin-top: 14px; padding-top: 6px; }
.wnav { display: flex; gap: 8px; justify-content: flex-end; margin-top: 14px; flex-wrap: wrap; }
.wnav .btn.ghost:first-child { margin-right: auto; }
.wbanner { display: flex; gap: 14px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-bottom: 16px;
  background: linear-gradient(120deg, var(--accent-soft), var(--card)); }
/* обучение */
.guide { display: grid; grid-template-columns: 220px 1fr; gap: 24px; align-items: start; }
.guide-toc { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 16px); display: flex; flex-direction: column; gap: 2px; font-size: 14px; }
.guide-toc a { padding: 6px 10px; border-radius: 8px; color: var(--muted); } .guide-toc a:hover { background: var(--bg2); color: var(--text); }
.guide section { scroll-margin-top: 16px; } .guide section h2 { margin-top: 0; }
.guide .say { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.guide .say code { background: var(--bg2); padding: 5px 10px; border-radius: 999px; font-size: 13px; font-family: inherit; }
.guide dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; } .guide dt { font-weight: 600; } .guide dd { margin: 0; color: var(--muted); }
@media (max-width: 860px) { .guide { grid-template-columns: 1fr; } .guide dl { grid-template-columns: 1fr; gap: 2px; } .guide dd { margin-bottom: 8px; } .guide-toc { position: static; flex-direction: row; flex-wrap: wrap; } }
/* матрица Эйзенхауэра */
.mxgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.mxq { border-top: 3px solid var(--q); padding-top: 14px; }
.mxh { display: flex; align-items: baseline; gap: 8px; margin-bottom: 6px; } .mxh h3 { margin: 0; font-size: 16px; }
.mxh b { margin-left: auto; font-size: 13px; background: var(--bg2); border-radius: 999px; padding: 2px 9px; }
.mxq ul { list-style: none; margin: 0; padding: 0; max-height: 460px; overflow-y: auto; }
.mxq li { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); } .mxq li:last-child { border-bottom: 0; }
.mx-t { flex: 1; min-width: 0; } .mx-t a { display: block; color: var(--text); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mx-t small { color: var(--muted); font-size: 12px; }
.mx-move { display: flex; gap: 4px; flex-shrink: 0; }
.mx-move button.mxb { border: 0; box-shadow: none; color: var(--text); min-width: 0; height: auto; background: var(--bg2); border-radius: 8px; padding: 5px 7px; cursor: pointer; font-size: 13px; line-height: 1; }
.mx-move button.mxb:hover { background: var(--accent-soft); }
@media (max-width: 860px) { .mxgrid { grid-template-columns: 1fr; } }
.sec-tabs { margin-bottom: 16px; }
@media (max-width: 860px) { .segs.sec-tabs .seg { flex: 0 0 auto; } .segs.sec-tabs { width: auto; max-width: 100%; } }
.mini.act li { align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); } .mini.act li:last-child { border-bottom: 0; }
.mini.act li .grow, .mini li .grow { flex: 1; min-width: 0; margin-left: 0; color: var(--text); white-space: normal; font-size: 14px; }
.mini.act li em { white-space: nowrap; }
.ibx p { margin: 4px 0 8px; white-space: pre-line; }

/* анализы */
.labrows { display: flex; flex-direction: column; }
.labrow { display: grid; grid-template-columns: minmax(150px, 1.3fr) minmax(120px, .9fr) minmax(170px, 1.4fr) 120px 140px; gap: 14px; align-items: center;
  padding: 11px 6px; border-top: 1px solid var(--line); color: inherit; text-decoration: none; border-radius: 10px; }
.labrow:first-child { border-top: 0; } .labrow:hover { background: var(--bg2); }
.labrow .ln, .labrow .lv { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.labrow .lv b { font-size: 17px; } .labrow .lb { display: flex; flex-direction: column; gap: 6px; }
.labrow .lt { display: flex; align-items: center; gap: 8px; font-size: 18px; } .labrow .ld { text-align: right; }
.rbar { position: relative; height: 8px; border-radius: 6px; background: var(--track); }
.rbar .zone { position: absolute; top: 0; bottom: 0; background: color-mix(in srgb, var(--good) 45%, transparent); border-radius: 6px; }
.rbar .dot { position: absolute; top: 50%; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; background: var(--good);
  border: 2px solid var(--card); box-shadow: 0 0 0 1px var(--line); }
.rbar .dot.low, .rbar .dot.high { background: var(--bad); }
.lpill { align-self: flex-start; font-size: 12px; padding: 2px 8px; border-radius: 999px; background: var(--bg2); color: var(--muted); }
.lpill.ok { color: var(--good); } .lpill.warn { color: var(--warn); background: color-mix(in srgb, var(--warn) 14%, transparent); }
.lpill.bad { color: var(--bad); background: color-mix(in srgb, var(--bad) 14%, transparent); }
.ltodo li.bad { border-left: 3px solid var(--bad); padding-left: 10px; } .ltodo li.warn { border-left: 3px solid var(--warn); padding-left: 10px; }
.ltodo li { flex-wrap: wrap; }
.lupload { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.lupload p { margin: 4px 0 0; }
@media (max-width: 860px) {
  .labrow { grid-template-columns: 1fr auto; gap: 6px 12px; }
  .labrow .lb { grid-column: 1 / -1; } .labrow .lt { justify-content: flex-start; } .labrow .ld { text-align: left; }
  .labrow .lv { align-items: flex-end; text-align: right; }
  .lupload { flex-direction: column; align-items: flex-start; }
}

/* анкета */
.anketa .aq { display: flex; flex-direction: column; gap: 8px; }
.anketa .aq > span { font-weight: 500; line-height: 1.45; }
.anketa textarea { width: 100%; min-height: 76px; resize: vertical; }
.scroll-x { overflow-x: auto; max-width: 100%; -webkit-overflow-scrolling: touch; }
.lmatrix td, .lmatrix th { text-align: center; white-space: nowrap; } .lmatrix th.mname { text-align: left; font-weight: 500; }
.lmatrix td.bad, tr.bad td { color: var(--bad); font-weight: 600; }
.visits { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 14px; margin-bottom: 14px; }
.visit p { margin: 8px 0; line-height: 1.5; } .visit ul { margin: 4px 0 8px; padding-left: 18px; }
@media (max-width: 860px) { .visits { grid-template-columns: 1fr; } }

/* Здоровье: фильтры, выводы, отчёт */
.hfilters { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.hrange { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.hfrom { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 4px 6px; border-radius: 14px; background: var(--bg2); }
.hfrom.on { box-shadow: inset 0 0 0 2px var(--accent); }
.hfrom input[type=date] { border: 0; background: var(--card); border-radius: 10px; padding: 6px 8px; font: inherit; font-size: 13px; color: var(--text); max-width: 9.5em; }
.hfrom span { color: var(--muted); }
.hins { margin: 0; padding-left: 1.1em; display: grid; gap: 8px; line-height: 1.45; }
.hrep td:first-child a { font-weight: 600; }
.hrep td, .hrep th { white-space: nowrap; }
.hchips { overflow-x: auto; flex-wrap: nowrap; padding-bottom: 6px; margin-bottom: 12px; scrollbar-width: none; }
.hchips .chip { white-space: nowrap; }
.hbw { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 520px) { .hbw { grid-template-columns: 1fr; } }

/* кнопки-значки действий: ✏️ изменить, 🗑 удалить */
.ico-btn { min-width: 36px; height: 36px; padding: 0 8px !important; display: inline-flex; align-items: center; justify-content: center;
  font-size: 16px; line-height: 1; border-radius: 10px; white-space: nowrap; }
.btn.tiny.ico-btn { min-width: 30px; height: 30px; font-size: 14px; }
.ph-actions { display: flex; gap: 6px; margin-top: 10px; }
.ph-actions form, .note-view form.inline { display: inline; margin: 0; }
.record-del { margin-top: 10px; display: flex; justify-content: flex-end; }

/* «Разработка» */
.dev-list { list-style: none; margin: 0; padding: 0; }
.dev-item { display: flex; gap: 10px; align-items: flex-start; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--line, rgba(127,127,127,.15)); }
.dev-item:last-child { border-bottom: 0; }
.dev-main { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.dev-main .tag { margin-right: 6px; }
.dev-acts { display: flex; gap: 4px; flex-shrink: 0; }
.dev-acts form { display: inline; margin: 0; }
.dev-item.st-done .dev-main span, .dev-item.st-no .dev-main span { opacity: .6; text-decoration: line-through; }
.dev-add select { max-width: 220px; }
@media (max-width: 640px) { .dev-item { flex-direction: column; } .dev-add select { max-width: 100%; } }

/* формы в ряд: обещания, разработка */
.prom-add, .dev-add { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.prom-add input[name=text], .dev-add input[name=text] { flex: 1 1 240px; }
.prom-add input[name=person] { flex: 0 1 180px; }
.prom-add .qa-hint, .dev-add .qa-hint { flex-basis: 100%; }

/* боковое меню по областям: сворачиваемые группы */
.rail-grp { margin: 2px 0; }
.rail-grp summary { display: flex; align-items: center; gap: 10px; cursor: pointer; list-style: none; padding: 8px 12px; border-radius: 12px;
  color: var(--muted); font-weight: 600; font-size: 14px; user-select: none; }
.rail-grp summary::-webkit-details-marker { display: none; }
.rail-grp summary::after { content: "›"; margin-left: auto; transition: transform .15s; opacity: .6; }
.rail-grp[open] summary::after { transform: rotate(90deg); }
.rail-grp summary:hover { background: var(--card); color: var(--text); }
.rail-grp summary i { font-style: normal; width: 20px; text-align: center; }
.rail-grp .sub-nav { padding: 2px 0 6px 30px; }

/* «Дела» на телефоне: без переключателя вида (канбан на узком экране неудобен) — меньше лент кнопок над задачами */
@media (max-width: 640px) { .seg-row > .segs.sm { display: none; } }

/* выбор нескольких задач: квадрат появляется при наведении (кружок — «готово»), на телефоне скрыт */
.task .sel { opacity: 0; transition: opacity .15s; }
.task:hover .sel, .task .sel:checked, .task .sel:focus { opacity: 1; }
@media (hover: none), (max-width: 640px) { .task .sel { display: none; } }
.rail-grp .sub-nav a.t2 { padding-left: 22px; font-size: 13px; }

/* ===================== Календарь (по образцу Яндекс Календаря) ===================== */
.cal-wrap { display: grid; grid-template-columns: 236px 1fr; gap: 18px; align-items: start; }
.cal-side { position: sticky; top: 16px; display: flex; flex-direction: column; gap: 14px; }
.cal-new { width: 100%; justify-content: center; }
.mm { background: var(--card); border-radius: 16px; padding: 12px; box-shadow: var(--shadow); }
.mm-h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; font-size: 14px; }
.mm-h a { padding: 2px 8px; border-radius: 8px; color: var(--muted); }
.mm-h a:hover { background: var(--bg); color: var(--text); }
.mm-g { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; font-size: 12px; }
.mm-g i { font-style: normal; color: var(--faint); font-size: 11px; padding-bottom: 4px; }
.mm-g a { position: relative; padding: 5px 0; border-radius: 8px; color: var(--text); }
.mm-g a:hover { background: var(--bg); }
.mm-g a.out { color: var(--faint); }
.mm-g a.today { color: #e5484d; font-weight: 700; }
.mm-g a.sel { background: var(--text); color: var(--bg); }
.mm-g a.has::after { content: ""; position: absolute; left: 50%; bottom: 1px; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: var(--accent); }
.cal-list { background: var(--card); border-radius: 16px; padding: 12px; box-shadow: var(--shadow); }
.cl-h { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--faint); margin-bottom: 6px; }
.cal-list ul { list-style: none; margin: 0; padding: 0; }
.cal-list li { display: flex; align-items: center; gap: 8px; padding: 4px 0; }
.cal-list form.inline { display: inline; margin: 0; }
.cal-chk { width: 18px; height: 18px; border-radius: 5px; border: 2px solid var(--c); background: transparent; padding: 0; cursor: pointer; }
.cal-chk.on { background: var(--c); }
.cal-n { color: var(--text); font-size: 14px; }
.cal-n:hover { text-decoration: underline; }
.cal-add summary { cursor: pointer; color: var(--muted); font-size: 13px; margin-top: 6px; list-style: none; }
.cal-add form { margin-top: 8px; gap: 6px; flex-wrap: wrap; }
.cal-add input[name=name] { flex: 1 1 120px; }
.cal-add input[type=color] { width: 36px; height: 32px; padding: 0; border: 0; background: none; }
.cal-main { min-width: 0; }
.cal-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.cal-bar h2 { margin: 0 8px; font-size: 20px; flex: 1 1 auto; }
.cgrid { background: var(--card); border-radius: 16px; box-shadow: var(--shadow); overflow: hidden; }
.cg-head, .cg-allday { display: grid; grid-template-columns: 56px repeat(var(--days), 1fr); border-bottom: 1px solid var(--line, rgba(127,127,127,.18)); }
.cg-dh { padding: 8px 4px; text-align: center; color: var(--muted); display: flex; flex-direction: column; align-items: center; }
.cg-dh span { font-size: 12px; text-transform: uppercase; }
.cg-dh b { font-size: 20px; color: var(--text); }
.cg-dh.today b { background: #e5484d; color: #fff; border-radius: 50%; width: 34px; height: 34px; display: grid; place-items: center; }
.cg-adl { font-size: 10px; color: var(--faint); padding: 6px 4px; text-align: right; line-height: 1.1; }
.cg-ad { position: relative; padding: 3px; min-height: 30px; border-left: 1px solid var(--line, rgba(127,127,127,.12)); display: flex; flex-direction: column; gap: 2px; }
.cg-adplus { position: absolute; right: 4px; top: 4px; font-size: 13px; color: var(--faint); opacity: 0; }
.cg-ad:hover .cg-adplus { opacity: 1; }
.cg-body { display: grid; grid-template-columns: 56px repeat(var(--days), 1fr); max-height: 68vh; overflow-y: auto; position: relative; }
.cg-hours .cg-hl { height: var(--hp); position: relative; }
.cg-hl span { position: absolute; top: -7px; right: 6px; font-size: 11px; color: var(--faint); }
.cg-hl:first-child span { display: none; }
.cg-col { position: relative; border-left: 1px solid var(--line, rgba(127,127,127,.12)); }
.cg-col.today { background: color-mix(in srgb, var(--accent) 4%, transparent); }
.cg-slot { display: block; height: var(--hp); border-top: 1px solid var(--line, rgba(127,127,127,.10)); }
.cg-slot:hover { background: color-mix(in srgb, var(--accent) 10%, transparent); }
.cev { position: absolute; z-index: 2; overflow: hidden; border-radius: 8px; padding: 3px 6px; font-size: 12px; line-height: 1.25;
  background: color-mix(in srgb, var(--c) 18%, var(--card)); border-left: 3px solid var(--c); color: var(--text); box-shadow: 0 1px 2px rgba(0,0,0,.06); }
.cev:hover { z-index: 3; box-shadow: 0 4px 14px rgba(0,0,0,.14); }
.cev b { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cev span { color: var(--muted); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.cev.free { background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--c) 10%, var(--card)) 0 6px, var(--card) 6px 12px); }
.cev.ad { position: static; padding: 2px 6px; white-space: nowrap; text-overflow: ellipsis; }
.cg-now { position: absolute; left: 0; right: 0; height: 2px; background: #e5484d; z-index: 4; pointer-events: none; }
.cg-now::before { content: ""; position: absolute; left: -5px; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: #e5484d; }
.cmonth { display: grid; grid-template-columns: repeat(7, 1fr); background: var(--card); border-radius: 16px; box-shadow: var(--shadow); overflow: hidden; }
.cm-wd { padding: 8px; font-size: 12px; text-transform: uppercase; color: var(--faint); text-align: center; border-bottom: 1px solid var(--line, rgba(127,127,127,.18)); }
.cm-day { min-height: 108px; padding: 4px 5px 6px; border-left: 1px solid var(--line, rgba(127,127,127,.10)); border-top: 1px solid var(--line, rgba(127,127,127,.10)); display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cm-day.out { background: color-mix(in srgb, var(--bg) 60%, transparent); }
.cm-day.out .cm-n { color: var(--faint); }
.cm-top { display: flex; align-items: center; justify-content: space-between; }
.cm-n { font-size: 13px; color: var(--text); padding: 1px 6px; border-radius: 999px; }
.cm-day.today .cm-n { background: #e5484d; color: #fff; }
.cm-plus { color: var(--faint); opacity: 0; font-size: 13px; }
.cm-day:hover .cm-plus { opacity: 1; }
.cm-ev { font-size: 12px; padding: 1px 5px; border-radius: 6px; background: color-mix(in srgb, var(--c) 16%, var(--card)); border-left: 3px solid var(--c);
  color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cm-more { font-size: 11px; color: var(--muted); padding-left: 5px; }
.cagenda { background: var(--card); border-radius: 16px; box-shadow: var(--shadow); padding: 6px 16px 12px; }
.ca-day { display: flex; align-items: baseline; gap: 10px; margin: 14px 0 6px; }
.ca-day b { font-size: 22px; }
.ca-day span { color: var(--muted); }
.ca-day.today b { color: #e5484d; }
.ca-ev { display: grid; grid-template-columns: 10px 96px 1fr; gap: 2px 10px; align-items: center; padding: 8px 6px; border-radius: 10px; color: var(--text); }
.ca-ev:hover { background: var(--bg); }
.ca-ev i { width: 10px; height: 10px; border-radius: 50%; background: var(--c); grid-row: span 2; }
.ca-ev em { font-style: normal; color: var(--muted); font-size: 13px; grid-row: span 2; }
.ca-ev span { color: var(--muted); font-size: 12px; grid-column: 3; }
.cal-form .dt { display: flex; gap: 6px; }
.cal-form .dt input { flex: 1; min-width: 0; }
.cal-form.allday .tm { display: none; }
.cal-form label.chk { flex-direction: row; align-items: center; gap: 8px; align-self: end; padding-bottom: 10px; }
.cal-scope { border: 1px solid var(--line, rgba(127,127,127,.2)); border-radius: 12px; padding: 8px 12px; display: flex; gap: 18px; }
.cal-scope legend { font-size: 13px; color: var(--muted); padding: 0 4px; }
@media (max-width: 900px) {
  .cal-wrap { grid-template-columns: 1fr; }
  .cal-side { position: static; order: 2; }
  .cal-bar h2 { flex-basis: 100%; order: -1; margin: 0 0 4px; font-size: 18px; }
  .cg-body { max-height: 62vh; }
  .cm-day { min-height: 64px; }
  .cm-ev { font-size: 10px; padding: 0 3px; }
  .cal-new { position: fixed; right: 16px; bottom: 96px; width: auto; z-index: 20; border-radius: 999px; box-shadow: 0 8px 24px rgba(0,0,0,.25); }
}

/* календарь: исправления после просмотра */
.cal-list button.cal-chk, .cal-list button.cal-chk:hover { width: 18px; height: 18px; min-width: 0; min-height: 0; padding: 0; border-radius: 5px;
  background: transparent; border: 2px solid var(--c); box-shadow: none; flex: 0 0 18px; }
.cal-list button.cal-chk.on { background: var(--c); }
.cg-ad { min-width: 0; overflow: hidden; max-height: 104px; overflow-y: auto; }
.cev.ad { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mm-g a { display: block; text-align: center; }
.cg-col.today { background: color-mix(in srgb, var(--accent) 3%, transparent); }

/* ===================== Главная — один день (по образцу MyLife) ===================== */
.day { display: flex; flex-direction: column; gap: 14px; }
.dtop { display: flex; align-items: flex-end; justify-content: space-between; }
.dtop span { color: var(--muted); font-size: 14px; }
.dtop h1 { margin: 2px 0 0; font-size: 30px; }
.dstreak { font-size: 18px; font-weight: 700; padding: 8px 14px; border-radius: 999px; background: var(--card); box-shadow: var(--shadow); color: var(--text); }
.dhint { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 16px 18px; border-radius: 18px;
  background: color-mix(in srgb, var(--accent) 10%, var(--card)); box-shadow: var(--shadow); }
.dhint > div { flex: 1 1 260px; display: flex; flex-direction: column; gap: 3px; }
.dhint b { font-size: 16px; } .dhint span { color: var(--muted); font-size: 14px; }
.dhint form.inline { display: inline; margin: 0; }
.dhint.eve { background: color-mix(in srgb, #8b5cf6 12%, var(--card)); }
.moods { display: flex; gap: 8px; margin: 0; }
.moods button.mood { font-size: 26px; width: 48px; height: 48px; border-radius: 14px; border: 2px solid transparent; background: var(--card); cursor: pointer; padding: 0; }
.moods button.mood:hover { transform: scale(1.06); }
.moods button.mood.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, var(--card)); }
.dkpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.dkpi { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border-radius: 16px; background: var(--card); box-shadow: var(--shadow); color: var(--text); min-width: 0; }
.dkpi i { font-style: normal; font-size: 18px; } .dkpi small { color: var(--muted); font-size: 12px; } .dkpi b { font-size: 20px; }
.dbar { display: block; height: 5px; border-radius: 3px; background: color-mix(in srgb, var(--muted) 18%, transparent); margin-top: 6px; overflow: hidden; }
.dbar span { display: block; height: 100%; background: var(--accent); border-radius: 3px; }
.dgrid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 14px; align-items: start; }
.dgrid > div { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.dcard { padding: 14px 16px; }
.dhead { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.dhead h3 { margin: 0; font-size: 16px; }
.dsub { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--faint); margin: 12px 0 4px; }
.dplan { list-style: none; margin: 0; padding: 0; }
.drow { display: grid; grid-template-columns: 52px 22px 1fr; align-items: center; gap: 6px; padding: 7px 0; border-bottom: 1px solid var(--line, rgba(127,127,127,.12)); }
.drow:last-child { border-bottom: 0; }
.drow em { font-style: normal; color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.drow a { color: var(--text); min-width: 0; overflow-wrap: anywhere; }
.drow a small { display: block; color: var(--muted); font-size: 12px; }
.drow.done a { color: var(--muted); text-decoration: line-through; }
.drow form.inline { display: inline; margin: 0; }
.dchk, .plain.dchk { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--muted); background: transparent; padding: 0; cursor: pointer; display: inline-grid; place-items: center; font-size: 12px; }
.plain.dchk:hover { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent); }
.dchk.done { border-color: var(--good, #22a06b); background: var(--good, #22a06b); color: #fff; }
.evbar { width: 4px; height: 26px; border-radius: 2px; background: var(--c); justify-self: center; }
.drow.ev.cur { background: color-mix(in srgb, var(--c) 10%, transparent); border-radius: 10px; }
.drow.ev.ad em { font-size: 11px; }
.pdot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #e5484d; margin-right: 6px; vertical-align: middle; }
.dnow { position: relative; height: 0; border-top: 2px solid #e5484d; margin: 6px 0; list-style: none; }
.dnow span { position: absolute; left: 0; top: -10px; background: #e5484d; color: #fff; font-size: 11px; padding: 1px 6px; border-radius: 8px; font-variant-numeric: tabular-nums; }
.dfold { margin-top: 8px; }
.dfold summary { cursor: pointer; color: var(--muted); font-size: 14px; list-style: none; padding: 6px 0; }
.dfold summary::-webkit-details-marker { display: none; }
.dfold summary::before { content: "› "; display: inline-block; transition: transform .15s; }
.dfold[open] summary::before { transform: rotate(90deg); }
.dhabits { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.dhab { display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: 10px; }
.dhab b { display: block; font-size: 14px; } .dhab small { color: var(--muted); font-size: 12px; }
.dhab form.inline { display: inline; margin: 0; }
.ring .rbg { fill: none; stroke: color-mix(in srgb, var(--muted) 20%, transparent); stroke-width: 4; }
.ring .rfg { fill: none; stroke: var(--accent); stroke-width: 4; stroke-linecap: round; }
.dhab.ok .ring .rfg { stroke: var(--good, #22a06b); }
.ring text { font-size: 10px; fill: var(--text); font-weight: 600; }
.plain.hbtn { min-width: 40px; height: 34px; border-radius: 10px; border: 1px solid var(--line, rgba(127,127,127,.2)); background: var(--card); color: var(--text); cursor: pointer; font-weight: 600; padding: 0 8px; }
.plain.hbtn:hover { border-color: var(--accent); }
.dmoney { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.dmoney small { color: var(--muted); font-size: 12px; display: block; } .dmoney b { font-size: 20px; }
.dsoon { list-style: none; margin: 0; padding: 0; }
.dsoon li { display: grid; grid-template-columns: 96px 1fr auto; gap: 8px; padding: 6px 0; font-size: 14px; border-bottom: 1px solid var(--line, rgba(127,127,127,.12)); }
.dsoon li:last-child { border-bottom: 0; }
.dsoon span { color: var(--muted); font-size: 13px; } .dsoon a { color: var(--text); } .dsoon i { font-style: normal; font-size: 12px; }
.dmore { text-align: center; }
/* профиль */
.prof-head { display: flex; align-items: center; gap: 14px; }
.prof-head h2 { margin: 0; }
.prof-head > div:nth-child(2) { flex: 1; }
.prof-ava { width: 56px; height: 56px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; font-size: 24px; font-weight: 700; }
.prof-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.prof-tile { display: flex; flex-direction: column; gap: 4px; padding: 14px; border-radius: 16px; background: color-mix(in srgb, var(--bg) 60%, var(--card)); color: var(--text); }
.prof-tile i { font-style: normal; font-size: 22px; } .prof-tile small { color: var(--muted); font-size: 12px; }
.prof-tile:hover { box-shadow: var(--shadow); }
@media (max-width: 900px) {
  .dgrid { grid-template-columns: 1fr; }
  .dkpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dtop h1 { font-size: 26px; }
}

/* главная: карточки на телефоне — лентой, точка приоритета в строке */
.drow a .pdot { display: inline-block; vertical-align: 2px; }
@media (max-width: 900px) { .dkpis { display: flex; overflow-x: auto; gap: 10px; scroll-snap-type: x mandatory; padding-bottom: 4px; } .dkpis .dkpi { flex: 0 0 42%; scroll-snap-align: start; } }
@media (max-width: 900px) { .prof-tiles { grid-template-columns: 1fr 1fr; } .prof-tile { padding: 10px; } .prof-tile small { display: none; } }

/* календарь: перетаскивание (как в MyLife) */
.cev[data-kind] { touch-action: none; cursor: grab; user-select: none; }
.cev.dragging { opacity: .85; box-shadow: 0 8px 24px rgba(0,0,0,.22); z-index: 6; cursor: grabbing; }
.cev .rz { position: absolute; left: 0; right: 0; bottom: 0; height: 7px; cursor: ns-resize; }
.cev .rz::after { content: ''; position: absolute; left: 50%; bottom: 2px; width: 22px; height: 3px; margin-left: -11px; border-radius: 2px; background: color-mix(in srgb, var(--c) 60%, transparent); opacity: 0; }
.cev:hover .rz::after { opacity: 1; }
.cev.k-task { background: color-mix(in srgb, var(--muted) 14%, var(--card)); border-left-color: var(--muted); }
.cev.k-habit { background: transparent; border: 1px dashed var(--c); border-left: 3px solid var(--c); }
.cev.k-habit.done b { text-decoration: line-through; color: var(--muted); }
.cg-draw { position: absolute; left: 2px; right: 2px; z-index: 5; border-radius: 8px; background: color-mix(in srgb, var(--accent) 22%, transparent); border: 1px dashed var(--accent); pointer-events: none; }
.cg-tip { position: fixed; z-index: 1000; background: var(--text); color: var(--bg); font-size: 12px; padding: 3px 8px; border-radius: 8px; pointer-events: none; font-variant-numeric: tabular-nums; }
.dallow { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line, rgba(127,127,127,.2)); }
.dmoney b.good { color: var(--good); } .dmoney b.bad { color: var(--bad); }
a.dsub { display: block; text-decoration: none; }
.aacts { list-style: none; margin: 0; padding: 0; }
.aact { display: flex; gap: 12px; align-items: center; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--line, rgba(127,127,127,.2)); }
.aact > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.aact small { overflow-wrap: anywhere; } .aact.undone b { text-decoration: line-through; opacity: .6; }
.debts { list-style: none; margin: 0; padding: 0; }
.debt { padding: 12px 0; border-bottom: 1px solid var(--line); }
.debt-head { display: flex; gap: 10px; align-items: flex-start; }
.debt-head > div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.debt-head small { color: var(--muted); overflow-wrap: anywhere; }
.debt .tag.bad { background: color-mix(in srgb, var(--bad) 16%, var(--card)); color: var(--bad); }
.debt .tag.warn { background: color-mix(in srgb, #e0a020 18%, var(--card)); }
.debt.st-overdue .progress i { background: var(--bad); }
.debt-op { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 6px 0; }
.debt-op input { width: 120px; } .debt-op select { max-width: 170px; }
.debt-hist summary { cursor: pointer; color: var(--muted); font-size: 13px; }
.debt-hist ul { list-style: none; padding: 0; margin: 6px 0 0; }
.debt-hist li { display: grid; grid-template-columns: 130px 1fr auto; gap: 8px; font-size: 13px; padding: 3px 0; }
.dlvl { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; margin-left: auto; margin-right: 8px; }
.dlvl b { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: #fff; font-size: 14px; }
.dlvl .dbar { width: 54px; }
.lvl { display: flex; gap: 14px; align-items: center; }
.lvl-badge { width: 56px; height: 56px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; font: 700 24px/1 var(--font); flex: none; }
.lvl-body { flex: 1; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.sp-wrap { display: flex; gap: 18px; flex-wrap: wrap; align-items: center; }
.radar { width: 100%; max-width: 300px; height: auto; flex: none; }
.rd-ring { fill: none; stroke: var(--line); } .rd-axis { stroke: var(--line); }
.rd-shape { fill: color-mix(in srgb, var(--accent) 28%, transparent); stroke: var(--accent); stroke-width: 2; }
.rd-lab { font: 600 11px var(--font); fill: var(--text, currentColor); }
.sp-list { list-style: none; padding: 0; margin: 0; flex: 1; min-width: 240px; }
.sp-list li { display: flex; gap: 10px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--line); }
.sp-list li > div { flex: 1; display: flex; flex-direction: column; min-width: 0; } .sp-list em { font-style: normal; font-weight: 700; }
.sp-ic { font-size: 20px; }
.sp-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 6px 0; border-bottom: 1px solid var(--line); }
.sp-row span { flex: 1; min-width: 160px; }
.dr-facts { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.dr-form { display: flex; flex-direction: column; gap: 12px; } .dr-form textarea { width: 100%; }
.dr-form .moods { display: flex; gap: 10px; }
.dr-form .mood { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 16px; border-radius: 14px; border: 1px solid var(--line); cursor: pointer; }
.dr-form .mood input { position: absolute; opacity: 0; pointer-events: none; }
.dr-form .mood span { font-size: 28px; } .dr-form .mood:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
ul.debts > li.debt { display: block; }
.debt-head { justify-content: space-between; } .debt-head .tag { flex: none; margin-top: 2px; }
ul.debts .debt-head { display: flex; flex-direction: row; align-items: flex-start; gap: 10px; }
ul.debts .debt-acts { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 6px 0; }
ul.debts .debt-acts .debt-op { margin: 0; }
.fp-month { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; } .fp-month b { font-size: 18px; min-width: 150px; text-align: center; }
.fp-list { list-style: none; padding: 0; margin: 0 0 10px; }
.fp-item { display: flex; gap: 6px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--line); }
.fp-edit, .fp-add { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; flex: 1; }
.fp-name { flex: 1; min-width: 140px; display: flex; flex-direction: column; } .fp-name small { font-size: 12px; }
.fp-amt { width: 120px; } .fp-day { width: 74px; }
.fp-total { margin: 10px 0; }
.fp-result { display: flex; flex-direction: column; gap: 4px; } .fp-result b { font-size: 30px; }
.fp-result.fp-good b { color: var(--good); } .fp-result.fp-bad b { color: var(--bad); } .fp-result.fp-warn b { color: #c98a10; }
.fp-tab { width: 100%; border-collapse: collapse; } .fp-tab td, .fp-tab th { padding: 6px 8px; border-bottom: 1px solid var(--line); text-align: right; }
.fp-tab td:first-child, .fp-tab th:first-child { text-align: left; }
.fp-cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.fp-wd { text-align: center; font-size: 12px; color: var(--muted); }
.fp-d { min-height: 64px; border: 1px solid var(--line); border-radius: 8px; padding: 3px; display: flex; flex-direction: column; gap: 2px; overflow: hidden; }
.fp-d.on { border-color: var(--accent); } .fp-d small { color: var(--muted); font-size: 11px; }
.fp-p { font-style: normal; font-size: 10px; line-height: 1.2; background: var(--accent-soft); border-radius: 4px; padding: 1px 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fp-p.income { background: color-mix(in srgb, var(--good) 18%, var(--card)); }
.fp-f { font-style: normal; font-size: 11px; color: var(--muted); } .fp-f.good { color: var(--good); }

.hpart { grid-column: 1 / -1; margin: 10px 0 0; font-size: 16px; }
.hwhy { margin: 8px 0 0; color: var(--muted); font-size: 13px; }
.hterm { margin-top: 8px; } .hterm small { color: var(--muted); }
.hset summary { cursor: pointer; color: var(--muted); font-size: 13px; margin-top: 8px; }
.hc-off { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.hfin { list-style: none; padding: 0; margin: 8px 0 0; } .hfin li { display: flex; flex-direction: column; padding: 6px 0; border-bottom: 1px solid var(--line); }

.gfocus { display: flex; flex-direction: column; gap: 6px; border: 2px solid var(--accent); }
.gfocus h2 { margin: 0; font-size: 20px; } .gfocus a { text-decoration: none; color: inherit; }
.gtasks { list-style: none; padding: 0; margin: 4px 0; } .gtasks li { display: flex; align-items: center; gap: 6px; padding: 3px 0; }
.gtasks li.done a { text-decoration: line-through; opacity: .6; } .gt-chk { font-size: 16px; padding: 0 4px; }
.gt-add { display: flex; gap: 6px; flex-wrap: wrap; } .gt-add input[name=title] { flex: 1; min-width: 160px; }
.dfocus { display: flex; flex-direction: column; gap: 4px; text-decoration: none; color: inherit; margin-bottom: 12px; }
.dfocus b { font-size: 16px; }

.piggy .pg-top { display: flex; gap: 10px; align-items: center; } .piggy .pg-top > div { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.pg-ic { font-size: 30px; } .pg-sum { display: flex; align-items: baseline; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.pg-sum b { font-size: 24px; } .pg-sum span { color: var(--muted); }
.piggy.done { border: 2px solid var(--good); }

.nchk { display: flex; align-items: flex-start; gap: 8px; margin: 4px 0; } .nchk.on span:last-child { text-decoration: line-through; opacity: .6; }
.nchk-b { font-size: 20px; line-height: 1; padding: 0; cursor: pointer; background: none; border: 0; }
.nfold-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 12px 0 6px; } .nfold-form input { max-width: 220px; }
.nfold { margin-bottom: 6px; }

.fw { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.fw-list { list-style: none; padding: 0; margin: 6px 0 0; display: grid; gap: 6px; }
.fw-list a { text-decoration: none; color: inherit; } .fw-list li.done { opacity: .6; } .fw-day.lock { opacity: .55; }
.fw.done { border: 2px solid var(--good); }
