/* ═══════════════════════════════════════════════════════════════
   ALLWALLET — семейный кошелёк · стили
   ═══════════════════════════════════════════════════════════════
   Идея: кошелёк сделан из того же, из чего деньги. Баланс — купюра
   с гильошем и серийным номером, суммы набраны антиквой как номинал,
   служебные подписи — микротекстом. Цвета категорий — от купюр евро.

   1. Токены          5. Блоки главной      9.  Шторки и формы
   2. Основа          6. Купюра             10. Редакторы «под себя»
   3. Каркас          7. Списки             11. Экраны
   4. Кнопки, чипы    8. Графики            12. Мелочи и анимации
   ═══════════════════════════════════════════════════════════════ */

/* ── 1. Токены ──────────────────────────────────────────────── */

:root {
  --bg:        #0E1714;   /* тушь с зеленцой, как у банкнотной печати */
  --s1:        #15211D;
  --s2:        #1C2B26;
  --s3:        #243631;
  --line:      #2A3B35;
  --text:      #E8EFEA;
  --muted:     #8EA39A;
  --faint:     #5E7169;
  --accent:    #4FD6A8;   /* мятный: оранжевый у нас Изи — на тёмном он сливался с кнопками (04.11.2026) */
  --on-accent: #05261A;
  --accent-bright: #4FD6A8;
  --inc:       #63D297;   /* зелёная «сотня» */
  --warn:      #F07A6A;   /* красная «десятка» */
  --fam:       #8FB4FF;   /* синяя «двадцатка» */
  --note-a:    #1F3530;
  --note-b:    #132420;
  --backdrop:  rgba(3, 8, 6, .58);
  --shadow:    0 10px 30px rgba(0, 0, 0, .35);

  --f-display: 'Prata', 'Georgia', serif;
  --f-body:    'Onest', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --f-mono:    'JetBrains Mono', ui-monospace, 'SF Mono', monospace;

  --r-lg: 22px; --r-md: 16px; --r-sm: 12px;
  --tab-h:  74px;      /* нижнее меню — капсула 62px и 12px воздуха под ней: «+», Изи и подсказки считаются от этой высоты */
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  color-scheme: dark;
}

:root[data-theme="lavender"] {
  --bg:        #EFEBFA;   /* лаванда */
  --s1:        #F8F6FE;
  --s2:        #FFFFFF;
  --s3:        #ECE7FA;
  --line:      #DCD4F1;
  --text:      #221B38;   /* чернила с фиолетовым */
  --muted:     #6B6488;
  --faint:     #A39DBD;
  --accent:    #6A4BD0;
  --on-accent: #FFFFFF;
  --inc:       #157546;
  --warn:      #B23A26;
  --fam:       #3561C9;
  --note-a:    #E2D8FF;
  --note-b:    #F8F5FF;
  --backdrop:  rgba(34, 27, 56, .38);
  --shadow:    0 10px 30px rgba(60, 40, 120, .12);
  color-scheme: light;
}

:root[data-theme="turquoise"] {
  --bg:        #E4F4F2;   /* бирюза */
  --s1:        #F3FBFA;
  --s2:        #FFFFFF;
  --s3:        #DAEFEB;
  --line:      #C5E2DC;
  --text:      #0F2F2B;
  --muted:     #4D6F69;
  --faint:     #93B2AC;
  --accent:    #0C7686;
  --on-accent: #FFFFFF;
  --inc:       #157546;
  --warn:      #B23A26;
  --fam:       #3561C9;
  --note-a:    #CBEDE7;
  --note-b:    #F1FAF8;
  --backdrop:  rgba(10, 40, 36, .38);
  --shadow:    0 10px 30px rgba(10, 80, 70, .12);
  color-scheme: light;
}

:root[data-theme="sky"] {
  --bg:        #E9F1FB;   /* нежно-голубая */
  --s1:        #F5F9FE;
  --s2:        #FFFFFF;
  --s3:        #DFEAF8;
  --line:      #CCDBF0;
  --text:      #15233B;
  --muted:     #566885;
  --faint:     #9AAAC4;
  --accent:    #2A5FCC;
  --on-accent: #FFFFFF;
  --inc:       #157546;
  --warn:      #B23A26;
  --fam:       #3561C9;
  --note-a:    #D5E5FA;
  --note-b:    #F4F8FF;
  --backdrop:  rgba(16, 30, 60, .36);
  --shadow:    0 10px 30px rgba(30, 60, 120, .12);
  color-scheme: light;
}

:root[data-theme="green"] {
  --bg:        #E3F3E6;   /* зелёная: вкладка «Семья» */
  --s1:        #F2FAF3;
  --s2:        #FFFFFF;
  --s3:        #D9EEDD;
  --line:      #C4E2CA;
  --text:      #12291A;
  --muted:     #4A6853;
  --faint:     #8FAD97;
  --accent:    #0A7352;
  --on-accent: #FFFFFF;
  --inc:       #0F6B3E;
  --warn:      #B23A26;
  --fam:       #3561C9;
  --note-a:    #CDEBD3;
  --note-b:    #F1FAF3;
  --backdrop:  rgba(12, 40, 20, .38);
  --shadow:    0 10px 30px rgba(15, 80, 40, .12);
  color-scheme: light;
}

:root[data-theme="midnight"] {
  --bg:        #0C1220;   /* полночь */
  --s1:        #121A2C;
  --s2:        #192336;
  --s3:        #212D44;
  --line:      #29354E;
  --text:      #E7ECF6;
  --muted:     #8E9AB4;
  --faint:     #5D6984;
  --note-a:    #1C2842;
  --note-b:    #0F1728;
  --backdrop:  rgba(0, 0, 0, .6);
  --shadow:    0 10px 30px rgba(0, 0, 0, .4);
}


:root[data-theme="plum"] {
  --bg:        #15101F;   /* слива: вкладка «Я» на тёмном телефоне */
  --s1:        #1D162B;
  --s2:        #261D37;
  --s3:        #302545;
  --line:      #3A2E52;
  --text:      #EEEAF8;
  --muted:     #A196BC;
  --faint:     #6F6589;
  --note-a:    #2A2040;
  --note-b:    #181226;
  --backdrop:  rgba(0, 0, 0, .6);
  --shadow:    0 10px 30px rgba(0, 0, 0, .42);
}

:root[data-theme="terracotta"] {
  --bg:        #1A0F0B;   /* терракота */
  --s1:        #231511;
  --s2:        #2D1B16;
  --s3:        #37221C;
  --line:      #432A23;
  --text:      #F6ECE7;
  --muted:     #B9998D;
  --faint:     #84665B;
  --note-a:    #36201A;
  --note-b:    #1E110D;
  --backdrop:  rgba(0, 0, 0, .62);
  --shadow:    0 10px 30px rgba(0, 0, 0, .45);
}

/* 12.11.2026: ещё две светлые и две тёмные (Саша) — песочная с золотом, пудровая; графит, чёрное золото */
:root[data-theme="sand"] {
  --bg:        #F3ECE1;   /* песок у моря */
  --s1:        #FAF6EF;
  --s2:        #FFFFFF;
  --s3:        #EDE3D4;
  --line:      #E0D3BF;
  --text:      #2A2016;
  --muted:     #75664F;
  --faint:     #ADA08A;
  --accent:    #8A650C;
  --on-accent: #FFFFFF;
  --inc:       #2F7A3E;
  --warn:      #B23A26;
  --fam:       #3561C9;
  --note-a:    #EADFCB;
  --note-b:    #FBF7F0;
  --backdrop:  rgba(40, 28, 10, .36);
  --shadow:    0 10px 30px rgba(90, 60, 20, .12);
  color-scheme: light;
}

:root[data-theme="powder"] {
  --bg:        #F6EAEE;   /* пудровая */
  --s1:        #FCF6F8;
  --s2:        #FFFFFF;
  --s3:        #F0E0E6;
  --line:      #E7CFD8;
  --text:      #2B1820;
  --muted:     #7D5D69;
  --faint:     #B798A4;
  --accent:    #B02C66;
  --on-accent: #FFFFFF;
  --inc:       #1F7A4A;
  --warn:      #B23A26;
  --fam:       #3561C9;
  --note-a:    #F1DCE4;
  --note-b:    #FCF5F8;
  --backdrop:  rgba(50, 15, 30, .36);
  --shadow:    0 10px 30px rgba(120, 40, 70, .12);
  color-scheme: light;
}

:root[data-theme="graphite"] {
  --bg:        #121316;   /* графит */
  --s1:        #1A1C20;
  --s2:        #22252A;
  --s3:        #2B2F35;
  --line:      #33373E;
  --text:      #ECEEF1;
  --muted:     #9AA1AB;
  --faint:     #636A74;
  --note-a:    #262A31;
  --note-b:    #16181C;
  --backdrop:  rgba(0, 0, 0, .6);
  --shadow:    0 10px 30px rgba(0, 0, 0, .45);
}

:root[data-theme="blackgold"] {
  --bg:        #0E0C08;   /* чёрное золото — под золотого Изи */
  --s1:        #16130E;
  --s2:        #1F1A13;
  --s3:        #29231A;
  --line:      #352D20;
  --text:      #F4ECDD;
  --muted:     #B5A68C;
  --faint:     #7B6F5A;
  --note-a:    #2A2318;
  --note-b:    #14110C;
  --backdrop:  rgba(0, 0, 0, .62);
  --shadow:    0 10px 30px rgba(0, 0, 0, .5);
}

/* Узор и рамка купюры — цветом акцента: выбрал цвет — купюра перекрасилась */
:root { --gl: color-mix(in srgb, var(--accent) 24%, transparent); --soft-k: 58%; }
/* Неон (Саша 24.11.2026): свечение выбранной вкладки и «+». В тёмных темах акцент и так яркий; в светлых — тот же цвет, но светлее и
   насыщеннее (тёмная бирюза светилась мутно). Где браузер не умеет «цвет от цвета» — мягкая светлая версия акцента */
:root { --neon: var(--accent); }
:root:is([data-theme="lavender"], [data-theme="turquoise"], [data-theme="sky"], [data-theme="green"], [data-theme="sand"], [data-theme="powder"]) { --neon: color-mix(in srgb, var(--accent) 55%, #fff); }
@supports (color: oklch(from red l c h)) {
  :root:is([data-theme="lavender"], [data-theme="turquoise"], [data-theme="sky"], [data-theme="green"], [data-theme="sand"], [data-theme="powder"]) { --neon: oklch(from var(--accent) .8 min(calc(c * 1.4), .12) h); }
}
:root:is([data-theme="lavender"], [data-theme="turquoise"], [data-theme="sky"], [data-theme="green"], [data-theme="sand"], [data-theme="powder"]) { --gl: color-mix(in srgb, var(--accent) 30%, transparent); --soft-k: 40%; }

/* ── 2. Основа ──────────────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); }
body {
  margin: 0; min-height: 100dvh;
  background: var(--bg); color: var(--text);
  font: 15px/1.45 var(--f-body);
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none;
}
body.locked { overflow: hidden; }
/* Вверх-вниз прокручивает браузер, вбок — листаем сами (main.js): без этого Chrome на Android успевал забрать движение под прокрутку
   (25.11.2026). Полосы, которые ездят вбок, и окна свою прокрутку не теряют: у них она своя */
body:not(.onb-mode), body:not(.onb-mode) #view { touch-action: pan-y pinch-zoom; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
button:disabled { opacity: .45; cursor: default; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 8px; }
h1, h2, h3 { margin: 0; font-weight: 400; }
p { margin: 0; }
.ic { flex: none; display: block; }
.micro { font: 500 10px/1.2 var(--f-mono); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.inc  { color: var(--inc) !important; }
.warn { color: var(--warn) !important; }
.muted { color: var(--muted); }
.center { text-align: center; }

/* ── 3. Каркас ──────────────────────────────────────────────── */

#app { max-width: 540px; margin: 0 auto; }
/* внизу — место под «+» и Изи над ним (96px): последнюю строку страницы можно прокрутить выше них */
.view { padding: calc(var(--safe-t) + 14px) 16px calc(var(--tab-h) + var(--safe-b) + 188px); min-height: 100dvh; }
.onb-mode .view { padding-bottom: 40px; }
.onb-mode .fab, .onb-mode .tabbar { display: none; }

.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 4px 0 12px; }
.topbar.home-top { align-items: flex-end; margin-bottom: 14px; }
/* Строка «AllWallet» над названием раздела (макет 10.11.2026); нажал — на главную */
.tb-brand { display: flex; align-items: center; gap: 9px; min-width: 0; color: var(--text); text-decoration: none; }
.tb-brand .brand-mark { flex: none; }
.tb-brand .brand-word { display: block; height: 20px; width: auto; }
.page-head { min-width: 0; margin: 0 0 14px; }
.page-head .micro { display: block; margin-bottom: 6px; }
.page-head h1 { font: 400 30px/1.1 var(--f-display); letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tb-t { min-width: 0; }
.tb-t .micro { display: block; margin-bottom: 6px; }
.topbar h1 { font: 400 30px/1.1 var(--f-display); letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.page-head h1 .tb-ic { display: inline-flex; vertical-align: -2px; margin-right: 10px; color: var(--accent); }
.tb-sub { margin: 6px 0 0; color: var(--muted); font-size: 14.5px; line-height: 1.3; }
.tb-r { display: flex; gap: 8px; }

.icon-btn { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; color: var(--muted); }
.icon-btn:hover { color: var(--text); background: var(--s2); }
.icon-btn.round { border-radius: 50%; background: var(--s1); border: 1px solid var(--line); color: var(--text); width: 42px; height: 42px; }
/* «Меню» — кнопкой с подписью, в две ширины (Таня 19.11.2026: значок-сетку не замечали); на узком телефоне — только значок */
.icon-btn.menu-btn { width: auto; height: 42px; padding: 0 16px 0 13px; display: inline-flex; align-items: center; gap: 7px; border-radius: 21px;
  background: color-mix(in srgb, var(--accent) 12%, var(--s1)); border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--line)); color: var(--accent); font-weight: 700; font-size: 15px; }
.icon-btn.menu-btn:hover { background: color-mix(in srgb, var(--accent) 18%, var(--s1)); color: var(--accent); }
@media (max-width: 359px) { .icon-btn.menu-btn { width: 42px; padding: 0; justify-content: center; } .icon-btn.menu-btn span { display: none; } }

/* Вкладка, в которой находимся, — неоновая: залита цветом темы, светится (просьба 10.11.2026). Свечение небольшое: полоса
   вкладок прокручивается и обрезает всё, что шире её отступа */
/* Вкладки «Я · Семья · Бизнес · Совместный бюджет  +» (макет 11.11.2026): ширина — по названию, лишнее место делят поровну;
   длинное название из нескольких слов — в две строки помельче, чтобы четыре вкладки и «+» влезли в телефон.
   Не влезли (узкий экран, свои группы) — полоса листается пальцем, «+» прилип справа */
.scope { display: flex; padding: 4px; gap: 1px; background: var(--s1); border: 1px solid var(--line); border-radius: 999px; margin-bottom: 14px; overflow-x: auto; scrollbar-width: none; }
/* Вкладки держатся сверху при прокрутке на любом экране (Саша 13.11.2026). Обёртка — прозрачная и нажатия пропускает к шапке */
.scope-dock { position: sticky; top: 0; z-index: 40; margin: calc(-1 * (var(--safe-t) + 8px)) -16px 14px; padding: calc(var(--safe-t) + 8px) 16px 8px; pointer-events: none; }
.scope-dock .scope { pointer-events: auto; margin-bottom: 0; transition: background-color .2s, box-shadow .2s; }
/* Прилипли — ходит только сами вкладки (Саша 14.11.2026: без полосы-«отдела» сверху): прозрачное стекло, под ним видно, что ниже */
.scope-dock.stuck .scope { background: color-mix(in srgb, var(--s1) 62%, transparent); -webkit-backdrop-filter: blur(14px) saturate(1.3); backdrop-filter: blur(14px) saturate(1.3);
  border-color: color-mix(in srgb, var(--line) 70%, transparent); box-shadow: 0 10px 26px -14px rgb(0 0 0 / .5); }
.scope::-webkit-scrollbar { display: none; }
/* Шрифт и поля вкладок — от ширины экрана (14.11.2026, нашёл CI на Linux): на 360 точках (частые Android) «+» уезжал за край,
   на Linux и 390 было мало. Теперь ужимаются плавно: на 397 и шире — как было (13,5 px), на 390 — 13,3, на 360 — 12,2 */
.scope button { flex: 1 0 auto; display: flex; align-items: center; justify-content: center; gap: clamp(2px, .8vw, 3px); padding: 7px clamp(3px, 1vw, 6px); border-radius: 999px; color: var(--muted); font-weight: 600; font-size: clamp(11.5px, 3.4vw, 13.5px); white-space: nowrap; transition: background .2s, color .2s, box-shadow .2s; }
.scope button .two { white-space: normal; max-width: 6em; font-size: 12px; line-height: 1.12; text-align: left; text-wrap: balance; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.scope .sc-add { flex: none; display: grid; place-items: center; width: clamp(22px, 6.7vw, 26px); border-radius: 999px; color: var(--muted); text-decoration: none; }   /* «+» — новая вкладка (13.11.2026) */
.scope .sc-add:hover, .scope .sc-add:focus-visible { color: var(--text); background: color-mix(in srgb, var(--text) 8%, transparent); }
.scope button.on { background: var(--accent); color: var(--on-accent); box-shadow: 0 0 0 1px color-mix(in srgb, #fff 30%, transparent) inset, 0 0 6px color-mix(in srgb, var(--accent) 75%, transparent); }
.scope button[style*="--tab"]:not(.on) .ic { color: var(--tab); }

/* Нижнее меню — капсула над краем экрана; открытый раздел светится неоном: значок и подпись цвета темы, полоска сверху */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; padding: 0 12px max(12px, var(--safe-b)); pointer-events: none; }
.tb-in {
  pointer-events: auto; max-width: 540px; margin: 0 auto; display: flex; height: calc(var(--tab-h) - 12px); padding: 0 4px; border-radius: 26px;
  background: color-mix(in srgb, var(--s1) 88%, transparent);
  backdrop-filter: blur(18px) saturate(1.3); -webkit-backdrop-filter: blur(18px) saturate(1.3);
  border: 1px solid var(--line); box-shadow: 0 10px 30px rgb(0 0 0 / .25);
}
.tb-side { flex: 1; min-width: 0; display: flex; }   /* две равные половины — «+» ровно посередине при любом числе разделов */
.tb-gap { flex: none; width: 70px; }   /* «+» 56 и воздух по бокам (24.11.2026; было 80 — под «+» 70 с кольцом) */
/* Бугорок под «+» (24.11.2026, вариант Б): форма и контур — из main.js (shapeBar); пока формы нет — обычная капсула */
.tb-in.humped { position: relative; height: calc(var(--tab-h) - 12px + 18px); padding-top: 18px; border-color: transparent; box-shadow: none; pointer-events: none; }
/* Касания ловит только сама капсула (ниже бугорка) и «+»: прозрачные 18px бугорка пропускают палец к блокам под ними (24.11.2026, t17) */
.tb-in.humped::before { content: ''; position: absolute; left: 0; right: 0; top: 18px; bottom: 0; border-radius: 26px; pointer-events: auto; z-index: -1; }
.tb-in.humped .tab { pointer-events: auto; }
.tb-line { position: absolute; left: 0; top: 0; pointer-events: none; overflow: visible; }
.tb-line path { fill: none; stroke: var(--line); stroke-width: 2; }
.tb-shade { position: absolute; pointer-events: none; transform: translateY(8px); filter: blur(11px); opacity: .9; }
.tb-shade path { fill: rgb(0 0 0 / .22); }
.tab { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--faint); font-size: clamp(10px, 2.85vw, 11px); letter-spacing: -.01em; font-weight: 600; position: relative; }
.tab.on { color: var(--accent); }
/* Выбранная вкладка — неоном (24.11.2026, вариант 1 «Ярче»): значок светится в два слоя, полоска сверху толще, под вкладкой — пятно света */
.tab.on .ic { filter: drop-shadow(0 0 5px var(--neon)) drop-shadow(0 0 12px var(--neon)); }
.tab.on span { font-weight: 700; text-shadow: 0 0 10px color-mix(in srgb, var(--neon) 70%, transparent); }
.tab.on::before { content: ''; position: absolute; top: -1px; width: 38px; height: 4px; border-radius: 0 0 4px 4px; background: var(--neon);
  box-shadow: 0 0 10px var(--neon), 0 0 24px var(--neon), 0 4px 22px color-mix(in srgb, var(--neon) 80%, transparent); }
.tab.on::after { content: ''; position: absolute; inset: 6px 4px; z-index: -1; border-radius: 18px; background: radial-gradient(75% 70% at 50% 30%, color-mix(in srgb, var(--neon) 34%, transparent), transparent 78%); }

/* «+» — посередине нижнего меню, в бугорке капсулы (Саша 24.11.2026, вариант Б): 56, а не 70, и чуть выше середины — в бугорке.
   Неоновое кольцо, и ореол медленно «дышит» — раз в ~3 с (::after, меняется только прозрачность: телефону легко). «Меньше движения» — ровный */
.fab {
  position: fixed; z-index: 21;
  left: 50%; bottom: calc(max(12px, var(--safe-b)) + (var(--tab-h) - 12px) / 2 + 9px);
  width: 56px; height: 56px; border-radius: 20px; transform: translate(-50%, 50%);
  display: grid; place-items: center;
  background: var(--accent); color: var(--on-accent);
  box-shadow: 0 0 0 1.5px color-mix(in srgb, #fff 55%, var(--accent)) inset, 0 0 0 2px var(--neon), 0 0 14px 2px var(--neon), 0 6px 16px color-mix(in srgb, var(--accent) 40%, transparent);
  transition: transform .15s;
}
.fab svg { filter: drop-shadow(0 0 4px rgb(255 255 255 / .85)); }
.fab::after { content: ''; position: absolute; inset: -4px; border-radius: 24px; pointer-events: none;
  box-shadow: 0 0 30px 8px color-mix(in srgb, var(--neon) 65%, transparent), 0 0 12px 2px var(--neon); opacity: .3; animation: fab-breathe 2.8s ease-in-out infinite; }
@keyframes fab-breathe { 0%, 100% { opacity: .3; } 50% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .fab::after { animation: none; opacity: .65; } }
.fab:active { transform: translate(-50%, 50%) scale(.94); }
body[data-route="assist"] .tb-gap, body:has(.pick-bar) .tb-gap { display: none; }   /* там «+» нет — и места под него нет */

/* ── 4. Кнопки, чипы, поля ──────────────────────────────────── */

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 18px; border-radius: 14px; font-weight: 600; background: var(--s2); border: 1px solid var(--line); transition: transform .12s, background .2s; }
.btn:active { transform: scale(.98); }
.btn.primary { background: var(--accent); color: var(--on-accent); border-color: transparent; }
.btn.danger  { background: var(--warn); color: #fff; border-color: transparent; }
.btn.ghost   { background: transparent; }
.btn.small   { min-height: 34px; padding: 6px 12px; font-size: 13px; border-radius: 11px; }
.btn.big     { min-height: 54px; font-size: 16px; border-radius: 16px; }
.btn.wide    { width: 100%; margin-top: 10px; }
.danger-text { color: var(--warn) !important; }
.row-btns { display: flex; gap: 10px; margin-top: 14px; }
.row-btns .btn { flex: 1; }
.customize { margin-top: 18px; color: var(--muted); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips.scroll { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -20px; padding: 0 20px; }
.chips.scroll::-webkit-scrollbar { display: none; }
.card .chips.scroll { margin: 0 -16px; padding: 0 16px; }     /* в карточке — ровно по её отступу, иначе строка вылезает за рамку */
.chip { display: inline-flex; align-items: center; gap: 7px; flex: none; min-height: 38px; padding: 7px 13px; border-radius: 12px; background: var(--s2); border: 1px solid var(--line); font-size: 14px; font-weight: 500; white-space: nowrap; }
.chip i { width: 9px; height: 9px; border-radius: 3px; }
.chip small { color: var(--muted); }
.chip.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, var(--s2)); }
.chip.date { color-scheme: inherit; min-width: 0; width: 150px; }
.filters { margin: 12px 0; }

.field { margin-top: 16px; }
.field > label:not(.switch-row) { display: block; font-size: 12px; font-weight: 600; color: var(--muted); margin: 0 0 8px 2px; letter-spacing: .02em; }
.inp { width: 100%; min-height: 48px; padding: 12px 14px; border-radius: 14px; background: var(--s2); border: 1px solid var(--line); outline: none; transition: border-color .2s; }
.inp:focus { border-color: var(--accent); }
.inp.big { font-size: 17px; }
.inp.code { font: 500 22px/1 var(--f-mono); letter-spacing: .2em; text-align: center; text-transform: uppercase; }
.inp.code-in { font: 500 30px/1 var(--f-mono); letter-spacing: .45em; text-align: center; padding-left: .45em; }
.inp::placeholder { color: var(--faint); }
.inp-cur { position: relative; display: flex; align-items: center; }
.inp-cur > span, .inp-cur > .cur-btn { position: absolute; right: 8px; color: var(--muted); }
.inp-cur .inp { padding-right: 56px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.hint { color: var(--muted); font-size: 13px; margin-top: 6px; }
.hint .ic { display: inline-block; vertical-align: -3px; }
.lead { font-size: 15px; color: var(--text); margin-bottom: 8px; }
.note-box { padding: 12px 14px; border-radius: 14px; background: color-mix(in srgb, var(--accent) 10%, var(--s2)); border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--line)); font-size: 14px; margin-top: 14px; }
/*  «Общие расходы выключены, N трат скрыто» — под вкладками «Семьи», кнопка «Включить» справа (screens/common.js, sharedOffNote)  */
.note-box.fam-off { display: flex; align-items: center; gap: 12px; margin: 10px 0 4px; }
.note-box.fam-off span { flex: 1; line-height: 1.35; }
.note-box.fam-off .btn { flex: none; }

.seg { display: flex; padding: 4px; gap: 4px; border-radius: 14px; background: var(--s2); border: 1px solid var(--line); }
.seg button { flex: 1; min-height: 38px; padding: 6px 8px; border-radius: 10px; font-weight: 600; font-size: 14px; color: var(--muted); display: flex; align-items: center; justify-content: center; gap: 6px; }
.seg button.on { background: var(--s3); color: var(--text); box-shadow: 0 1px 0 rgba(255, 255, 255, .04) inset; }
.seg button.on.expense { color: var(--text); }
.seg button.on.income  { color: var(--inc); }
.seg button.on.transfer { color: var(--fam); }
.seg.small { margin-bottom: 14px; }

.switch-row { display: flex; align-items: center; gap: 14px; padding: 10px 0; cursor: pointer; }
.switch-row + .switch-row { border-top: 1px solid var(--line); }
.sw-text { flex: 1; display: flex; flex-direction: column; }
.sw-text small { color: var(--muted); font-size: 13px; }
.switch-row input, .sw-only input { position: absolute; opacity: 0; pointer-events: none; }
.sw { flex: none; width: 46px; height: 28px; border-radius: 99px; background: var(--s3); border: 1px solid var(--line); position: relative; transition: background .2s; }
.sw::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--muted); transition: transform .22s cubic-bezier(.3, 1.4, .5, 1), background .2s; }
input:checked + .sw { background: var(--accent); border-color: transparent; }
input:checked + .sw::after { transform: translateX(18px); background: var(--on-accent); }
input:focus-visible + .sw { outline: 2px solid var(--accent); outline-offset: 2px; }
.sw-only { position: relative; display: block; cursor: pointer; }

/* ── 5. Блоки главной ───────────────────────────────────────── */

.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.w { grid-column: span 2; min-width: 0; }
.w.half { grid-column: span 1; }
.card { background: var(--s1); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px; }
.view > .card, .view > section.card { margin-bottom: 12px; }
.w-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; font-size: 13px; font-weight: 600; color: var(--muted); }
.w-title > span:first-child { display: flex; align-items: center; gap: 6px; }
.w-link { display: inline-flex; align-items: center; gap: 2px; color: var(--accent); font-size: 13px; font-weight: 600; }
/* «Подробно», «Все» — внизу карточки слева (Саша 14.11.2026) */
.w > .w-foot { display: flex; width: max-content; margin-top: 12px; padding: 4px 0; }
/* Нажал на блок главной — копия карточки медленно вырастает до экрана, под ней открывается раздел */
.zoom-ghost { position: fixed; z-index: 95; overflow: hidden; pointer-events: none; background: var(--s1); box-shadow: 0 24px 60px -24px rgb(0 0 0 / .5);
  --zoom: .72s cubic-bezier(.32, .72, 0, 1);
  transition: left var(--zoom), top var(--zoom), width var(--zoom), height var(--zoom), border-radius var(--zoom), background-color .72s, opacity .44s ease; }
.zoom-ghost > * { margin: 0 !important; transform-origin: 0 0; transition: transform var(--zoom), opacity .3s .36s; }
.zoom-ghost.grow { background: var(--bg); }
.zoom-ghost.grow > * { opacity: 0; }
.zoom-ghost.done { opacity: 0; }
@media (prefers-reduced-motion: reduce) { .zoom-ghost { transition: none; } }
.fam-rename { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-top: 14px; font-size: 13px; color: var(--muted); }
.stat { font: 400 26px/1.15 var(--f-display); margin-top: 2px; }
.stat-sub { color: var(--muted); font-size: 13px; margin-top: 6px; }
.w.half .w-title { margin-bottom: 6px; }

.quick { display: flex; gap: 6px; overflow-x: auto; margin: 0 -16px; padding: 0 16px 2px; scrollbar-width: none; }
.quick::-webkit-scrollbar { display: none; }
.q { flex: none; width: 66px; display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 11.5px; color: var(--muted); }
.q span:last-child { max-width: 66px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.q:active .cat-dot { transform: scale(.92); }

.cat-dot { display: grid; place-items: center; flex: none; border-radius: 50%; background: color-mix(in srgb, var(--c) 20%, var(--s2)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 35%, transparent); line-height: 1; transition: transform .15s; }
.cat-dot.d3 img { display: block; width: 84%; height: 84%; object-fit: contain; filter: drop-shadow(0 1px 1.5px rgba(0, 0, 0, .18)); }   /* наш 3D-значок в кружке цвета категории */
.cat-mini { display: inline-block; width: 18px; height: 18px; object-fit: contain; vertical-align: -4px; }
.emoji-grid button img { display: block; width: 30px; height: 30px; object-fit: contain; margin: auto; filter: drop-shadow(0 2px 2px rgb(0 0 0 / .2)); }
.cat-dot.plus { --c: var(--muted); color: var(--muted); }
.cat-dot.plus.inc { --c: var(--inc); }

.trio { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.trio.small { grid-template-columns: repeat(2, 1fr); margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line); }
.trio small { display: block; font-size: 12px; color: var(--muted); }
.trio b { font: 400 18px/1.3 var(--f-display); }

.meter { display: block; height: 8px; border-radius: 99px; background: var(--s3); overflow: hidden; margin-top: 12px; }
.meter i { display: block; height: 100%; border-radius: inherit; background: var(--accent); transition: width .6s cubic-bezier(.2, .8, .2, 1); }
.meter.near i { background: var(--accent); }
.meter.over i, .meter i.over { background: var(--warn); }
.meter.thin { height: 5px; margin-top: 6px; }
/* Цвет категории в полоске, кольце и легенде — мягкий, как кружок её значка рядом (Саша 14.11.2026: «как возле домика»):
   смесь с фоном карточки и тонкий ободок того же оттенка. В тёмных темах смесь гуще (--soft-k): иначе полоска тонет в фоне */
.meter.soft i, .legend li i.soft { background: color-mix(in srgb, var(--c) var(--soft-k), var(--s1)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 40%, transparent); }
.donut.soft circle[style] { stroke: color-mix(in srgb, var(--c) var(--soft-k), var(--s1)); }

.cat-split { display: flex; align-items: center; gap: 18px; }
.legend { list-style: none; margin: 0; padding: 0; flex: 1; min-width: 0; display: grid; gap: 8px; }
.legend li { display: flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; }
.legend li i { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.legend li span { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.legend li b { font-weight: 600; color: var(--muted); font-size: 13px; }

.acc-strip { display: flex; gap: 10px; overflow-x: auto; margin: 0 -16px; padding: 0 16px; scrollbar-width: none; }
.acc-strip::-webkit-scrollbar { display: none; }
.acc-mini { flex: none; min-width: 128px; text-align: left; padding: 12px 14px; border-radius: 16px; background: var(--s2); border: 1px solid var(--line); border-top: 3px solid var(--c); }
.acc-mini small { display: flex; gap: 4px; align-items: center; color: var(--muted); font-size: 12px; }
.acc-mini b { font: 400 18px/1.4 var(--f-display); white-space: nowrap; }

.fam-cta p { color: var(--muted); font-size: 14px; margin-bottom: 12px; }
.verdict { text-align: center; font-size: 14px; color: var(--muted); margin-top: 4px; }
.fam-bars { display: grid; gap: 10px; }
.fb { display: grid; grid-template-columns: auto 72px 1fr auto; gap: 10px; align-items: center; font-size: 14px; }
.fb .meter { margin: 0; }
.debt-list { display: grid; gap: 10px; }
.debt { display: flex; align-items: center; gap: 6px; }
.debt .arrow { color: var(--faint); }
.debt-t { flex: 1; display: flex; flex-direction: column; margin-left: 6px; min-width: 0; }
.debt-t small { color: var(--muted); font-size: 12px; }
.settled { display: flex; align-items: center; gap: 8px; color: var(--inc); font-weight: 600; }
.rates { display: grid; gap: 6px; }
.rates div { display: flex; justify-content: space-between; font-size: 14px; }
.rates span { color: var(--muted); }
.goal-half { cursor: pointer; }
.goal-half > span { font-size: 14px; }
.keys { display: flex; align-items: center; gap: 6px; font-weight: 500; font-size: 12px; }
.keys i { width: 8px; height: 8px; border-radius: 2px; display: inline-block; }
.k-inc { background: var(--inc); } .k-exp { background: var(--text); }
.empty-home { text-align: center; padding: 28px; }
.empty-home p { color: var(--muted); margin-top: 4px; }

/* ── 6. Купюра ──────────────────────────────────────────────── */

.note {
  position: relative; overflow: hidden; isolation: isolate;
  padding: 18px 20px 20px; min-height: 196px; border-radius: 24px;
  background:
    radial-gradient(120% 90% at 85% 40%, color-mix(in srgb, var(--accent) 9%, transparent), transparent 60%),
    linear-gradient(155deg, var(--note-a), var(--note-b));
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  cursor: pointer;
}
.note::before { /* рамка-кант, как на купюре */
  content: ''; position: absolute; inset: 7px; border-radius: 18px; pointer-events: none;
  border: 1px solid var(--gl);
}
.guilloche { position: absolute; inset: 0; width: 100%; height: 100%; color: var(--gl); z-index: -1; }
.note-top { display: flex; justify-content: space-between; }
.note-sum { margin: 26px 0 16px; }
.amt-big { font-family: var(--f-display); letter-spacing: -.02em; line-height: 1; white-space: nowrap; }
.amt-big .int { font-size: clamp(40px, 12vw, 52px); }
.amt-big .dec { font-size: 24px; color: var(--muted); }
.amt-big .cur { font-size: 26px; margin-left: 6px; color: var(--accent); }
.amt-big .cur.pre { margin: 0 4px 0 0; }
.note-row { display: flex; gap: 14px; font-size: 14px; font-weight: 600; flex-wrap: wrap; }
.note-row .muted { font-weight: 400; }
.note-serial { position: absolute; right: 20px; bottom: 16px; font: 500 12px/1 var(--f-mono); letter-spacing: .14em; color: var(--accent); opacity: .9; }
.note:active { transform: scale(.995); }
/* «Скрыть все суммы»: глаз на купюре, точки вместо цифр */
.note-top .micro { display: inline-flex; align-items: center; gap: 6px; }
.note-top .note-label { display: block; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-right: 10px; }   /* месяц — справа, подпись в одну строку */
.note-eye { display: inline-grid; place-items: center; width: 30px; height: 30px; margin: -8px -8px -8px 0; border: 0; border-radius: 50%; background: transparent; color: var(--muted); cursor: pointer; }
.note-eye:hover, .note-eye:focus-visible { color: var(--text); background: color-mix(in srgb, var(--text) 8%, transparent); }
.amt-big.veil .int { letter-spacing: .08em; }
.veil-on { color: var(--accent); }

/* ── 7. Списки ──────────────────────────────────────────────── */

.tx-list { display: grid; grid-template-columns: minmax(0, 1fr); }      /*  длинная строка не распирает карточку */
.tx-list.card { padding: 4px 14px; }
.tx { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 0; text-align: left; }
.tx + .tx { border-top: 1px solid var(--line); }
.tx-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.tx-main b { font-weight: 600; font-size: 15px; }
.tx-main small { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tx-main em { font-style: normal; color: var(--fam); }
.tx-side { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
.tx-side b { font-weight: 600; white-space: nowrap; }
.tx-side small { display: flex; gap: 4px; align-items: center; color: var(--fam); min-height: 16px; }
.shared-mark { display: inline-flex; color: var(--fam); vertical-align: middle; }
.ava { display: inline-grid; place-items: center; flex: none; border-radius: 50%; background: var(--c); color: #0E1714; font-weight: 700; line-height: 1; }
.ava.photo { object-fit: cover; background: var(--s3); display: inline-block; }
.ava.emo { font-weight: 400; background: color-mix(in srgb, var(--c) 55%, var(--s2)); }
/* Аватар в окне участника: фото, картинка или буква; обрезка фото по кругу */
.ava-edit { display: grid; justify-items: center; gap: 10px; margin: 4px 0 10px; }
.ava-btns { justify-content: center; flex-wrap: wrap; }
.ava-grid { width: 100%; }
.crop { position: relative; width: 280px; height: 280px; margin: 4px auto 12px; border-radius: 18px; overflow: hidden; background: #000; touch-action: none; }
.crop-cv { width: 280px; height: 280px; display: block; cursor: grab; touch-action: none; }
.crop-cv:active { cursor: grabbing; }
.crop-ring { position: absolute; inset: 14px; border-radius: 50%; box-shadow: 0 0 0 999px rgba(0, 0, 0, .55); border: 2px solid rgba(255, 255, 255, .85); pointer-events: none; }
.crop-zoom { display: flex; align-items: center; gap: 10px; color: var(--muted); max-width: 320px; margin: 0 auto 6px; }
.crop-zoom input { flex: 1; accent-color: var(--accent); }

.day { margin-bottom: 14px; }
.day-h { display: flex; justify-content: space-between; padding: 0 4px 8px; font-size: 13px; color: var(--muted); }
.day-h b { color: var(--text); font-weight: 600; }
.tot-line { display: flex; gap: 14px; font-size: 13px; color: var(--muted); margin-bottom: 14px; padding: 0 4px; flex-wrap: wrap; }
.tot-line b { color: var(--text); font-weight: 600; }
/* Режим «Выбрать»: кружок слева у строки, отмеченные подсвечены, сумма — в плашке над меню */
.picking .tx { position: relative; padding-left: 34px; }
.picking .tx::before { content: ''; position: absolute; left: 2px; top: 50%; width: 20px; height: 20px; margin-top: -10px; border-radius: 50%; border: 2px solid var(--faint); box-sizing: border-box; }
.picking .tx.picked::before { border-color: var(--accent); background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230E1714' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 14px no-repeat; }
.picking .tx.picked { background: color-mix(in srgb, var(--accent) 7%, transparent); }
.pick-bar { position: fixed; z-index: 22; left: 50%; transform: translateX(-50%); bottom: calc(var(--tab-h) + var(--safe-b) + 12px); width: min(508px, calc(100vw - 32px)); display: flex; align-items: center; gap: 8px; padding: 10px 12px 10px 16px; border-radius: 18px; background: var(--s2); border: 1px solid var(--line); box-shadow: var(--shadow); }
.pick-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pick-t small { color: var(--muted); font-size: 13px; }
.pick-t small:first-of-type { color: var(--text); font-weight: 600; font-size: 14px; }
.pick-t small.muted { color: var(--muted); font-weight: 400; font-size: 12px; display: inline-flex; gap: 4px; align-items: center; }
body:has(.pick-bar) .fab { display: none; }
.search { display: flex; align-items: center; gap: 8px; padding: 0 14px; border-radius: 14px; background: var(--s1); border: 1px solid var(--line); color: var(--muted); }
.search input { flex: 1; min-height: 46px; background: none; border: 0; outline: none; color: var(--text); }
.month-nav { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.month-nav b { font: 400 20px/1 var(--f-display); }

.bud-list, .goal-list, .rec-list { display: grid; gap: 4px; }
.bud { display: flex; gap: 12px; width: 100%; text-align: left; padding: 8px 0; }
.bud-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.bud-top { display: flex; justify-content: space-between; gap: 8px; }
.bud-top small { color: var(--muted); font-size: 13px; white-space: nowrap; }
.bud .meter { margin-top: 8px; }
.bud-left { font-size: 12px; color: var(--muted); margin-top: 5px; }
.bud-left.near { color: var(--accent); } .bud-left.over { color: var(--warn); }

.goal { padding: 10px 0; }
.goal + .goal { border-top: 1px solid var(--line); }
.goal-main { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; }
.goal-ico { width: 40px; height: 40px; flex: none; display: grid; place-items: center; font-size: 20px; border-radius: 14px; background: color-mix(in srgb, var(--c) 22%, var(--s2)); }
.goal-t { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.goal-t small { color: var(--muted); font-size: 13px; }
.goal-pct { font: 400 20px/1 var(--f-display); }
.goal .meter { margin: 10px 0 8px; }

.rec { display: flex; align-items: center; gap: 10px; padding: 8px 0; }
.rec + .rec { border-top: 1px solid var(--line); }
.rec-main { flex: 1; display: flex; align-items: center; gap: 12px; text-align: left; min-width: 0; }
.rec-t { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.rec-t small { color: var(--muted); font-size: 13px; }
.rec.due .rec-t small { color: var(--accent); }

.empty { text-align: center; padding: 18px 8px; }
.empty-mark { width: 52px; height: 52px; margin: 0 auto 10px; display: grid; place-items: center; border-radius: 18px; background: var(--s2); color: var(--muted); }
.empty b { font-weight: 600; }
.empty p { color: var(--muted); font-size: 14px; margin: 4px 0 12px; }

/* ── 8. Графики ─────────────────────────────────────────────── */

.donut { position: relative; flex: none; }
.donut svg { width: 100%; height: 100%; display: block; }
.donut-c { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.donut-c small { color: var(--muted); font-size: 11px; }
.donut-c b { font: 400 17px/1.2 var(--f-display); }
.donut-wide { display: flex; justify-content: center; margin: 4px 0 16px; }
.donut-wide .donut-c b { font-size: 22px; }

.bars { width: 100%; height: 150px; display: block; overflow: visible; }
.bars .ax { font: 500 10px var(--f-mono); fill: var(--faint); letter-spacing: .06em; }
.bars .ax.cur { fill: var(--text); }

.hm-head, .hm { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.hm-head b { font: 500 10px var(--f-mono); color: var(--faint); text-align: center; text-transform: uppercase; margin-bottom: 4px; }
.hm-cell { aspect-ratio: 1; border-radius: 8px; position: relative; background: color-mix(in srgb, var(--accent) calc(var(--k) * 100%), var(--s2)); display: grid; place-items: center; }
.hm-cell span { font: 500 10px var(--f-mono); color: var(--muted); }
.hm-cell.today { box-shadow: 0 0 0 2px var(--text); }
.hm-cell.future { opacity: .4; }

.beam { width: 100%; height: auto; display: block; margin: -4px 0 0; overflow: visible; }
.beam .arm { transform: rotate(var(--deg)); }
.beam .pan { transform: translate(var(--dx), var(--dy)); }
.beam.anim .arm { animation: tilt 1.1s cubic-bezier(.3, 1.5, .5, 1) both .15s; }
.beam.anim .pan { animation: swing 1.1s cubic-bezier(.3, 1.5, .5, 1) both .15s; }
@keyframes tilt  { from { transform: rotate(0deg); } }
@keyframes swing { from { transform: translate(0, 0); } }
.pan-ini { font: 700 13px var(--f-body); fill: #0E1714; }
.pan-sum { font: 400 15px var(--f-display); fill: var(--text); }
.pan-name { font: 500 11px var(--f-body); fill: var(--muted); }

/* ── 9. Шторки и формы ──────────────────────────────────────── */

.layer { position: fixed; inset: 0 0 var(--kb, 0px); z-index: 100; display: flex; align-items: flex-end; justify-content: center; }
.backdrop { position: absolute; inset: 0; background: var(--backdrop); opacity: 0; transition: opacity .25s; backdrop-filter: blur(2px); }
.sheet {
  position: relative; width: 100%; max-width: 540px; max-height: calc(100dvh - var(--kb, 0px) - var(--safe-t) - 24px);
  display: flex; flex-direction: column;
  background: var(--s1); border: 1px solid var(--line); border-bottom: 0;
  border-radius: 26px 26px 0 0;
  transform: translateY(100%); transition: transform .32s cubic-bezier(.2, .85, .25, 1);
  box-shadow: 0 -12px 40px rgba(0, 0, 0, .35);
}
.layer.open .backdrop { opacity: 1; }
.layer.open .sheet { transform: none; }
.sheet-head { padding: 8px 20px 4px; touch-action: none; cursor: grab; }
.grabber { width: 40px; height: 5px; border-radius: 3px; background: var(--line); margin: 0 auto 8px; }
.sheet-title { display: flex; align-items: center; justify-content: space-between; }
.sheet-title h2 { font: 400 22px/1.2 var(--f-display); }
.sheet-body { overflow-y: auto; padding: 8px 20px calc(24px + var(--safe-b)); overscroll-behavior: contain; }
.sheet-actions { margin-top: 22px; display: grid; gap: 8px; }
.sheet-actions .btn { width: 100%; }
.sub-h { font: 600 12px/1 var(--f-body); color: var(--muted); letter-spacing: .06em; text-transform: uppercase; margin: 22px 4px 10px; }

.amount-box { display: flex; align-items: center; gap: 10px; margin-top: 18px; padding: 6px 6px 6px 16px; border-radius: 20px; background: var(--s2); border: 1px solid var(--line); }
.amount-box:focus-within { border-color: var(--accent); }
.amount-in { flex: 1; min-width: 0; background: none; border: 0; outline: none; font: 400 44px/1.15 var(--f-display); letter-spacing: -.02em; padding: 6px 0; }
.amount-in::placeholder { color: var(--faint); }
.amount-box.income .amount-in { color: var(--inc); }
.amount-box.transfer .amount-in { color: var(--fam); }
.cur-btn { flex: none; min-width: 52px; height: 52px; padding: 0 12px; border-radius: 14px; background: var(--s3); font: 400 22px/1 var(--f-display); color: var(--accent); }
.cur-btn.small { min-width: 40px; height: 36px; font-size: 16px; }
.cur-btn.static { display: grid; place-items: center; }
.amt-hint { min-height: 20px; margin: 6px 4px 0; font-size: 13px; color: var(--muted); }
.shake { animation: shake .4s; }
@keyframes shake { 25% { transform: translateX(-6px); } 50% { transform: translateX(6px); } 75% { transform: translateX(-3px); } }

.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(70px, 1fr)); gap: 6px 4px; margin-top: 14px; }
.cat { display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 6px 2px; border-radius: 14px; font-size: 11.5px; color: var(--muted); }
.cat span:last-child { max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cat.on { color: var(--text); background: color-mix(in srgb, var(--c, var(--accent)) 12%, transparent); }
.cat.on .cat-dot { box-shadow: 0 0 0 2px var(--c, var(--accent)); }
/* «Новая запись» по макету (10.11.2026): только «Расход / Доход», неоновые (перевод — в «Счетах»); плитки категорий — квадраты цвета
   категории с 3D-значком (выбранная — белая рамка и свечение); «Добавить расход ✓» — неоновая */
.seg.kind { padding: 5px; border-radius: 999px; }
.seg.kind button { min-height: 44px; border-radius: 999px; font-size: 15px; transition: background .2s, color .2s, box-shadow .2s; }
.seg.kind button.on, .seg.kind button.on.income { color: var(--on-accent); background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 86%, #fff), color-mix(in srgb, var(--accent) 88%, #000));
  box-shadow: 0 0 0 1px color-mix(in srgb, #fff 30%, transparent) inset, 0 0 10px color-mix(in srgb, var(--accent) 60%, transparent); }
.cat-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px 7px; }
.cat-grid .cat { gap: 6px; padding: 0; min-width: 0; background: none; color: var(--text); }
.cat-tile { width: 100%; aspect-ratio: 1; display: grid; place-items: center; border-radius: 18px; transition: box-shadow .2s, transform .15s;
  background: radial-gradient(circle at 28% 16%, rgb(255 255 255 / .5), rgb(255 255 255 / 0) 52%), linear-gradient(155deg, color-mix(in srgb, var(--c) 48%, var(--s2)), color-mix(in srgb, var(--c) 88%, var(--s2)));
  border: 1px solid color-mix(in srgb, var(--c) 90%, transparent);
  box-shadow: 0 0 0 1px rgb(255 255 255 / .3) inset, 0 0 8px color-mix(in srgb, var(--c) 40%, transparent), 0 5px 12px color-mix(in srgb, var(--c) 25%, transparent); }
.cat-tile img { width: 88%; height: auto; filter: drop-shadow(0 4px 5px rgb(0 0 0 / .2)); }
.cat-tile i { font-style: normal; font-size: 28px; line-height: 1; }
.cat-tile.plus { border-style: dashed; border-color: var(--line); background: var(--s2); box-shadow: none; color: var(--muted); }
.cat-grid .cat span:last-child { font-size: 11px; font-weight: 600; letter-spacing: -.02em; line-height: 1.15; text-align: center; white-space: normal; max-height: 2.3em; overflow: hidden; -webkit-hyphens: auto; hyphens: auto; }
.cat-grid .cat:active .cat-tile { transform: scale(.95); }
.cat-grid .cat.on { background: none; }
.cat-grid .cat.on .cat-tile { border: 2px solid #fff; box-shadow: 0 0 0 2px var(--c), 0 0 14px color-mix(in srgb, var(--c) 85%, transparent), 0 0 30px color-mix(in srgb, var(--c) 45%, transparent); }
/* Поля «Новой записи» — строками в одной карточке, как в макете: значок, название, справа значение; заметка — ниже */
.tx-sub { margin: -6px 0 12px; color: var(--muted); font-size: 14.5px; }
.tx-phrase { min-height: 42px; }
.cur-btn { display: inline-flex; align-items: center; gap: 3px; white-space: nowrap; }
.cur-btn .ic { opacity: .7; }
.sheet .cats-h { display: flex; justify-content: space-between; align-items: baseline; margin: 18px 0 2px; }
.sheet .cats-h b { font-size: 17px; }
.sheet .cats-h .link { display: inline-flex; align-items: center; gap: 2px; font-size: 14px; font-weight: 600; text-decoration: none; }
.tx-card { margin-top: 18px; padding: 0 14px; border-radius: 20px; background: var(--s1); border: 1px solid var(--line); }
.f-blk { border-bottom: 1px solid var(--line); }
.f-blk:last-child { border-bottom: 0; }
.f-row { position: relative; display: flex; align-items: center; gap: 12px; min-height: 54px; padding: 8px 0; }
.f-tap { cursor: pointer; }
.f-ic { flex: none; width: 24px; display: grid; place-items: center; color: var(--accent); }
.f-t { flex: 1; min-width: 0; }
.f-t b { font-weight: 600; font-size: 15.5px; }
.f-v { flex: none; display: inline-flex; align-items: center; gap: 7px; font-weight: 600; font-size: 15px; white-space: nowrap; }
.f-v > .ic:last-child { color: var(--muted); }
.f-pill { padding: 6px 10px 6px 14px; border-radius: 12px; background: color-mix(in srgb, var(--accent) 12%, var(--s2)); }
/* Дата: прозрачное поле даты — во всю строку, нажатие приходит прямо в него, и календарь открывает сам телефон: showPicker()
   iPhone не выполняет — с точкой 1×1 дату было не выбрать (Таня, 18.11.2026). 16px — чтобы iPhone не увеличивал экран */
.f-date-in { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; margin: 0; padding: 0; border: 0; opacity: 0; font-size: 16px; cursor: pointer; }
.f-pick, .f-chips { margin: 0 0 12px 36px; }
.f-pick[hidden] { display: none; }
/* Общий бюджет (19.11.2026): «За кого ещё» под «Кто внёс»; «Общий котёл» в «Кто платил» — золотистой каймой */
.f-for { margin: -4px 0 10px 36px; }
.f-for-h { display: inline-flex; align-items: center; gap: 6px; padding: 6px 0; border: 0; background: none; color: var(--accent); font: inherit; font-weight: 600; font-size: 14.5px; cursor: pointer; }
.f-for .f-pick { margin: 4px 0 0; }
.f-for-note { margin: 6px 0 0; }
.chip.f-pot { border-color: color-mix(in srgb, #D9B44A 60%, var(--line)); }
.f-pick .seg { margin: 0; }
.f-pick .hint { margin: 8px 0 0; }
.f-chips.scroll { margin-right: -14px; padding-right: 14px; margin-left: 36px; padding-left: 0; }
.f-row .switch-row { flex: 1; min-width: 0; padding: 0; }
.f-row .inp.f-in { flex: 1; border: 0; background: none; padding: 8px 0; min-height: 0; }
.f-sub-in { display: block; width: calc(100% - 36px); margin: 0 0 12px 36px; }
.tx-note { margin-top: 12px; display: flex; align-items: center; gap: 12px; padding: 4px 14px; border-radius: 18px; background: var(--s1); border: 1px solid var(--line); color: var(--accent); }
.tx-note .inp { flex: 1; border: 0; background: none; padding: 12px 0; }
.btn.go-neon { gap: 10px; border-radius: 999px; background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 86%, #fff), color-mix(in srgb, var(--accent) 88%, #000));
  box-shadow: 0 0 0 1px color-mix(in srgb, #fff 30%, transparent) inset, 0 0 14px color-mix(in srgb, var(--accent) 55%, transparent), 0 8px 20px color-mix(in srgb, var(--accent) 30%, transparent); }

.pick-list { display: grid; }
.pick { display: flex; align-items: center; gap: 14px; padding: 12px 4px; text-align: left; }
.pick + .pick { border-top: 1px solid var(--line); }
.pick .sym { width: 42px; font: 400 20px/1 var(--f-display); color: var(--accent); text-align: center; }
.pick span { flex: 1; }
.pick small { font: 500 12px var(--f-mono); color: var(--muted); }
.pick.on { color: var(--accent); }

.emoji-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(42px, 1fr)); gap: 6px; }
.emoji-grid button { aspect-ratio: 1; border-radius: 12px; font-size: 21px; background: var(--s2); border: 1px solid transparent; }
.emoji-grid button.on { border-color: var(--accent); }
.emoji-own { grid-column: span 2; min-height: 0; text-align: center; }
.swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.swatches button { width: 34px; height: 34px; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 2px rgba(0, 0, 0, .15); }
.swatches button.on { box-shadow: 0 0 0 3px var(--s1), 0 0 0 5px var(--c); }
.cat-preview { display: flex; justify-content: center; margin: 4px 0 6px; }

.choice { display: flex; gap: 14px; align-items: center; padding: 14px; border-radius: 16px; border: 1px solid var(--line); background: var(--s2); margin-bottom: 8px; cursor: pointer; }
.choice.on { border-color: var(--accent); }
.choice span { display: flex; flex-direction: column; }
.choice small { color: var(--muted); font-size: 13px; }

.toast {
  position: fixed; left: 50%; bottom: calc(var(--tab-h) + var(--safe-b) + 90px); z-index: 200;
  transform: translate(-50%, 16px); opacity: 0; transition: opacity .2s, transform .25s;
  display: flex; align-items: center; gap: 14px; max-width: calc(100vw - 32px); width: max-content;
  padding: 12px 16px; border-radius: 14px; background: var(--text); color: var(--bg); font-weight: 500; font-size: 14px;
  box-shadow: var(--shadow);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
/* «На экран телефона» — плашка над нижним меню, а не окно на весь экран (install.js, 15.11.2026): значок, две строки,
   «Поставить» и ✕. Под шторками (.layer — 100): открыли окно — плашка не мешает */
.install-bar { position: fixed; left: 12px; right: 12px; bottom: calc(var(--tab-h) + var(--safe-b) + 14px); z-index: 90; max-width: 520px; margin: 0 auto;
  display: grid; grid-template-columns: 44px minmax(0, 1fr) auto auto; align-items: center; gap: 12px; padding: 10px 8px 10px 12px;
  border-radius: 20px; background: var(--s2); border: 1px solid var(--line); box-shadow: var(--shadow);
  transform: translateY(24px); opacity: 0; transition: opacity .2s, transform .25s; }
.install-bar.open { transform: none; opacity: 1; }
.install-bar img { width: 44px; height: 44px; border-radius: 11px; }
.install-bar .ib-t { display: grid; gap: 1px; min-width: 0; }
.install-bar .ib-t b { font-size: 15px; color: var(--text); }
.install-bar .ib-t small { font-size: 12.5px; line-height: 1.3; color: var(--muted); }
.install-bar .btn { white-space: nowrap; }
.install-bar .icon-btn { color: var(--muted); }
.kb-open .install-bar { display: none; }
.toast button { color: var(--accent); font-weight: 700; white-space: nowrap; }
/* Идёт запись голоса: сверху плашка, что делать дальше; поверх шторок — микрофон есть и в форме записи */
/* Печатают — нижнее меню, «+» и Изи не занимают и без того маленький экран над клавиатурой */
.kb-open .tabbar, .kb-open .fab, .kb-open .izi-float { display: none; }
body[data-locked="1"] .tabbar, body[data-locked="1"] .fab, body[data-locked="1"] .izi-float,
body[data-locked="1"] .topbar .tb-r { display: none; }   /* после пробного без подписки (js/plus.js): ни меню, ни колокольчика, ни «+», ни Изи */

/* Время колёсиками (timewheel.js): три строки, по центру — выбранное. Цифры — Onest: в Prata единица похожа на букву l */
.tw { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.tw-box { position: relative; display: flex; align-items: center; justify-content: center; width: 112px; height: 96px; border-radius: 14px; background: var(--s2); border: 1px solid var(--line); overflow: hidden; }
.tw-box::before { content: ''; position: absolute; left: 6px; right: 6px; top: 32px; height: 32px; border-radius: 9px; background: color-mix(in srgb, var(--accent) 16%, transparent); pointer-events: none; }
.tw-box > b { font: 400 21px/32px var(--f-body); color: var(--text); margin-top: -2px; }
.tw-col { position: relative; width: 48px; height: 96px; overflow-y: auto; padding: 32px 0; scroll-snap-type: y mandatory; scrollbar-width: none; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; text-align: center; font: 400 21px/32px var(--f-body); font-variant-numeric: tabular-nums; letter-spacing: .02em; color: var(--faint); outline: none;
  -webkit-mask-image: linear-gradient(transparent, #000 34%, #000 66%, transparent); mask-image: linear-gradient(transparent, #000 34%, #000 66%, transparent); }
.tw-col::-webkit-scrollbar { display: none; }
.tw-col:focus-visible { box-shadow: inset 0 0 0 2px var(--accent); border-radius: 9px; }
.tw-i { height: 32px; scroll-snap-align: center; cursor: pointer; user-select: none; -webkit-user-select: none; }
.tw-i.on { color: var(--text); }
.tw.idle .tw-i.on { color: var(--muted); }

/* Окно события: заголовок поменьше, дата — по размеру даты, рядом время; новое событие умещается на экране целиком */
.ev-sheet .sheet-title h2 { font-size: 17px; }
.ev-sheet .sheet-head { padding-bottom: 0; }
.ev-sheet .sheet-title .icon-btn { width: 34px; height: 34px; margin-right: -6px; }
.ev-sheet .sheet-body { padding-top: 2px; padding-bottom: calc(12px + var(--safe-b)); }
.ev-sheet .field { margin-top: 12px; }
.ev-sheet .inp.big { min-height: 44px; padding: 9px 14px; }
.ev-sheet .switch-row { padding: 2px 0; }
.ev-sheet .sheet-actions { margin-top: 12px; }
.ev-sheet .btn.big { min-height: 48px; }
@media (max-height: 680px) { .ev-sheet .field { margin-top: 10px; } .ev-sheet .sheet-actions { margin-top: 10px; } }
textarea.inp.ev-note-in { display: block; min-height: 44px; max-height: 120px; padding: 10px 14px; line-height: 1.4; resize: none; overflow: hidden; }
.ev-new-h { font: 400 17px/1.2 var(--f-display); margin: 18px 0 -6px; }
.ev-new-h[hidden] { display: none; }
.ev-when { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 12px 16px; }
.ev-when label { display: block; font-size: 12px; font-weight: 600; color: var(--muted); margin: 0 0 8px 2px; letter-spacing: .02em; }
.ev-when-d { display: grid; justify-items: start; gap: 8px; }
.ev-when-d label { margin-bottom: 0; }
.inp.ev-date { width: 156px; min-width: 0; min-height: 44px; padding: 10px 12px; font-size: 16px; }
.ev-date::-webkit-date-and-time-value { text-align: left; }
.tw-none { min-height: 34px; padding: 5px 11px; font-size: 13px; }

/* Цвет события — кружки, всегда одной строкой */
.ev-colors { display: flex; flex-wrap: nowrap; align-items: center; gap: 8px; }   /* не растягивать по высоте: на узком экране кружок сжимается и остаётся кругом (CI на Linux: 27×26) */
.ev-color { flex: 0 1 30px; min-width: 0; aspect-ratio: 1; border-radius: 50%; background: var(--c); display: grid; place-items: center; color: #14211D; border: 2px solid transparent; padding: 0; }
.ev-color.on { box-shadow: 0 0 0 2px var(--s1), 0 0 0 4px var(--c); }

/* Строка с выбором: нажал — появился список (повтор, напоминание) */
.opt-head { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding: 8px 12px 8px 14px; border-radius: 14px; background: var(--s2); border: 1px solid var(--line); text-align: left; }
.opt-head span { font-weight: 500; }
.opt-head b { margin-left: auto; font-weight: 400; color: var(--muted); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.opt-head .ic { flex: none; color: var(--muted); transition: transform .2s; }
.opt-head[aria-expanded="true"] .ic { transform: rotate(180deg); }
.opt-list { display: grid; margin-top: 6px; border-radius: 14px; background: var(--s2); border: 1px solid var(--line); overflow: hidden; }
.opt-list[hidden] { display: none; }
.opt-i { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 44px; padding: 8px 14px; text-align: left; }
.opt-i + .opt-i { border-top: 1px solid var(--line); }
.opt-i.on { color: var(--accent); font-weight: 600; }

/* Поддержка: переписка */
.sup-thread { display: flex; flex-direction: column; gap: 10px; max-height: 46vh; overflow-y: auto; margin-bottom: 14px; padding-right: 2px; }
.sup-msg { max-width: 86%; padding: 10px 12px; border-radius: 16px; background: var(--s3); align-self: flex-start; border-bottom-left-radius: 6px; }
.sup-msg.me { align-self: flex-end; background: color-mix(in srgb, var(--accent) 16%, var(--s2)); border-bottom-left-radius: 16px; border-bottom-right-radius: 6px; }
.sup-msg b { display: block; font-size: 12.5px; color: var(--accent); margin-bottom: 2px; }
.sup-msg p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.sup-msg small { display: block; margin-top: 4px; font-size: 11.5px; color: var(--muted); }
.sup-files { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
.sup-msg b + .sup-files { margin-top: 2px; }
.sup-media { display: block; padding: 0; border: 0; background: none; border-radius: 12px; overflow: hidden; max-width: 100%; cursor: zoom-in; }
.sup-media img, .sup-media video { display: block; max-width: 100%; max-height: 260px; border-radius: 12px; background: var(--s2); }
.sup-vid { cursor: default; }
.sup-vid video { width: 100%; }
.sup-retry { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: pointer; }
.sup-wait { display: grid; place-items: center; width: min(240px, 60vw); aspect-ratio: 4 / 3; border-radius: 12px; padding: 10px; font-size: 12.5px; color: var(--muted); text-align: center;
  background: linear-gradient(100deg, var(--s2) 30%, color-mix(in srgb, var(--s2) 70%, var(--s3)) 50%, var(--s2) 70%) 0 0 / 300% 100%; animation: sup-wait 1.4s linear infinite; }
.sup-wait:not(:empty) { animation: none; }
@keyframes sup-wait { to { background-position: -150% 0; } }
@media (prefers-reduced-motion: reduce) { .sup-wait { animation: none; } }
.sup-file { display: flex; align-items: center; gap: 8px; width: 100%; padding: 9px 11px; border: 1px solid var(--line); border-radius: 12px; background: var(--s2); color: inherit; font: inherit; text-align: left; cursor: pointer; }
.sup-file span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sup-file small { margin: 0; flex: none; }
.sup-full { display: block; width: 100%; max-height: 70vh; object-fit: contain; border-radius: 12px; margin-bottom: 12px; background: var(--s2); }

/* Мини-обучение (coach.js): экран темнеет, в центре Изи и крупный текст. Белый на затемнении — на любой теме */
.coach { position: fixed; inset: 0; z-index: 300; display: flex; flex-direction: column; align-items: center; gap: 16px; overflow-y: auto; overscroll-behavior: contain;
  padding: calc(var(--safe-t) + 24px) 24px calc(var(--safe-b) + 24px); text-align: center; color: #FFFFFF;
  background: rgba(8, 10, 14, .78); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); animation: coachIn .22s ease-out; }
.coach > :first-child { margin-top: auto; }
.coach > :last-child { margin-bottom: auto; }
.coach h2 { margin: 0; font-size: 29px; line-height: 1.18; font-weight: 700; color: #FFFFFF; }
.coach p { margin: 0; max-width: 480px; font-size: 21px; line-height: 1.42; color: #FFFFFF; }
.coach .btn { flex: none; max-width: 420px; margin-top: 8px; }
.coach-izi { flex: none; width: 150px; height: 150px; }
.coach-izi canvas, .coach-izi img { width: 150px; height: 150px; display: block; }
.coach-step { display: flex; flex-direction: column; align-items: center; gap: 16px; width: 100%; }

/* Подсказка по желанию (coach.js): плашка выезжает сверху, нажал — подсказки, крестик — здесь больше не предлагаем */
.tip-bar { position: fixed; z-index: 250; top: calc(var(--safe-t) + 8px); left: 50%; width: min(560px, calc(100% - 24px)); display: flex; align-items: center; gap: 10px;
  padding: 6px 6px 6px 8px; border-radius: 18px; background: var(--s1); color: var(--text); border: 1px solid var(--line); box-shadow: var(--shadow);
  transform: translate(-50%, calc(-100% - 24px)); transition: transform .38s cubic-bezier(.2, .8, .2, 1); }
.tip-bar.in { transform: translate(-50%, 0); }
.tip-bar-izi { flex: none; width: 40px; height: 40px; }
.tip-bar-go { flex: 1; min-width: 0; text-align: left; background: none; border: 0; padding: 4px 2px; color: inherit; font: inherit; cursor: pointer; }
.tip-bar-go b { display: block; font-size: 15px; }
.tip-bar-go span { display: block; font-size: 13.5px; color: var(--muted); line-height: 1.3; }
.tip-bar-x { flex: none; }
@media (prefers-reduced-motion: reduce) { .tip-bar { transition: none; } }
/* «Чеки»: фото чеков лентой (19.11.2026) — миниатюра, сумма, дата; ★ — храним всегда */
.rc-gal[hidden] { display: none; }
.rc-strip { display: flex; gap: 10px; overflow-x: auto; margin: 0 -16px; padding: 2px 16px 6px; scroll-snap-type: x proximity; }
.rc-tile { position: relative; flex: none; width: 104px; display: grid; gap: 6px; padding: 0; border: 0; background: none; color: inherit; text-align: left; scroll-snap-align: start; cursor: pointer; }
.rc-tile img { width: 104px; height: 132px; object-fit: cover; border-radius: 12px; border: 1px solid var(--line); background: var(--s2); }
.rc-tile.fav img { border-color: color-mix(in srgb, var(--accent) 60%, var(--line)); }
.rc-tile span { display: grid; line-height: 1.2; }
.rc-tile b { font-size: 13.5px; } .rc-tile small { color: var(--muted); font-size: 12px; }
.rc-tile i { position: absolute; top: 6px; right: 6px; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--accent); color: var(--on-accent); }
.rc-full { display: block; width: 100%; max-height: 62vh; object-fit: contain; border-radius: 14px; background: var(--s2); margin-bottom: 12px; }
.rc-ops { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
/* «Общие деньги» — что здесь можно делать: окошко выезжает сверху, держится 8 с (полоска убывает) и уходит (Таня 19.11.2026) */
.sh-about { position: fixed; z-index: 240; top: calc(var(--safe-t) + 10px); left: 50%; width: min(560px, calc(100% - 24px)); display: flex; align-items: flex-start; gap: 12px;
  padding: 14px 10px 16px 16px; border-radius: 20px; background: var(--s1); color: var(--text); border: 1px solid var(--line); box-shadow: var(--shadow); overflow: hidden;
  transform: translate(-50%, calc(-100% - 30px)); opacity: 0; transition: transform .5s cubic-bezier(.2, .9, .25, 1.08), opacity .3s; cursor: pointer; }
.sh-about.in { transform: translate(-50%, 0); opacity: 1; }
.sh-about.out { transform: translate(-50%, calc(-100% - 30px)); opacity: 0; transition-duration: .35s; }
.sh-about > .ic:first-child { flex: none; margin-top: 1px; color: var(--accent); }
.sh-about p { flex: 1; margin: 0; font-size: 14.5px; line-height: 1.42; }
.sh-about .icon-btn { flex: none; width: 32px; height: 32px; margin: -6px 0 0; }
.sh-about-bar { position: absolute; left: 0; bottom: 0; width: 100%; height: 3px; background: var(--accent); opacity: .55; transform-origin: left; animation: sh-about-time 8s linear forwards; }
@keyframes sh-about-time { to { transform: scaleX(0); } }
@media (prefers-reduced-motion: reduce) { .sh-about, .sh-about.in, .sh-about.out { transition: opacity .2s; } .sh-about-bar { animation: none; } }
.ph-info { display: inline-grid; place-items: center; width: 30px; height: 30px; margin-left: 10px; vertical-align: 5px; border-radius: 50%; border: 1px solid var(--line); background: var(--s1); color: var(--accent); }
.coach-dots { display: flex; gap: 8px; }
.coach-dots i { width: 8px; height: 8px; border-radius: 50%; background: rgba(255, 255, 255, .35); }
.coach-dots i.on { background: #FFFFFF; }
@keyframes coachIn { from { opacity: 0; } }
@media (max-height: 640px) { .coach h2 { font-size: 25px; } .coach p { font-size: 19px; } .coach-izi { display: none; } }

.mic-hint { position: fixed; top: calc(var(--safe-t) + 10px); left: 50%; transform: translateX(-50%); z-index: 150; display: inline-flex; align-items: center; gap: 8px; max-width: calc(100vw - 32px); padding: 9px 16px 9px 12px; border-radius: 999px; background: var(--text); color: var(--bg); font: 600 13.5px/1.25 var(--f-body); text-align: left; box-shadow: var(--shadow); }
.mic-hint::before { content: ''; flex: none; width: 9px; height: 9px; border-radius: 50%; background: #F0564A; animation: mic-dot 1.2s ease-in-out infinite; }
.mic-hint:disabled::before { animation: none; opacity: .4; }
@keyframes mic-dot { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .mic-hint::before { animation: none; } }
:root:is([data-theme="lavender"], [data-theme="turquoise"], [data-theme="sky"], [data-theme="green"], [data-theme="sand"], [data-theme="powder"]) .toast button { color: var(--accent-bright); }

/* ── 10. Редакторы «под себя» ───────────────────────────────── */

.edit-list { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 8px; }
.edit-list li { display: flex; align-items: center; gap: 12px; padding: 10px 12px 10px 6px; border-radius: 16px; background: var(--s2); border: 1px solid var(--line); position: relative; }
.edit-list li.off { opacity: .55; }
.edit-list li.dragging { z-index: 5; box-shadow: var(--shadow); border-color: var(--accent); opacity: 1; }
.grip { width: 30px; height: 36px; display: grid; place-items: center; color: var(--faint); touch-action: none; cursor: grab; flex: none; }
.dragging .grip { cursor: grabbing; color: var(--accent); }
.el-ico { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 11px; background: var(--s3); color: var(--accent); flex: none; }
.el-t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.el-t small { color: var(--muted); font-size: 12.5px; }
.size-btn { width: 36px; height: 30px; border-radius: 9px; border: 1px solid var(--line); font: 600 13px var(--f-mono); color: var(--muted); }
.size-btn.half { color: var(--accent); border-color: var(--accent); }
.catalog { display: grid; gap: 8px; }
.cat-card { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 16px; border: 1px dashed var(--line); text-align: left; }
.cat-card .add { color: var(--accent); }
.nav-preview { display: flex; margin-top: 16px; padding: 10px 6px; border-radius: 16px; background: var(--bg); border: 1px solid var(--line); }
.nav-preview span { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; color: var(--muted); font-size: 10.5px; }
.acc-list { list-style: none; margin: 0 0 12px; padding: 4px 8px 4px 2px; }
.acc-list li { display: flex; align-items: center; }
.acc-list li + li { border-top: 1px solid var(--line); }
.acc-list li.dragging { background: var(--s2); border-radius: 14px; box-shadow: var(--shadow); z-index: 5; position: relative; }
.acc-row { flex: 1; display: flex; align-items: center; gap: 12px; padding: 12px 0; text-align: left; min-width: 0; }
.acc-chip { width: 40px; height: 40px; flex: none; display: grid; place-items: center; border-radius: 13px; background: color-mix(in srgb, var(--c) 22%, var(--s2)); color: var(--c); font: 400 17px var(--f-display); }
.acc-t { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.acc-t small { color: var(--muted); font-size: 13px; }
.acc-v { display: flex; flex-direction: column; align-items: flex-end; }
.acc-v b { font-weight: 600; white-space: nowrap; }
.acc-v small { color: var(--muted); font-size: 12px; }

/* ── 11. Экраны ─────────────────────────────────────────────── */

.hero-line { display: flex; flex-direction: column; gap: 2px; }
.hero-line small { color: var(--muted); font-size: 13px; }
.hero-line b { font: 400 32px/1.15 var(--f-display); }
.hero-line span { color: var(--muted); font-size: 13px; }

.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px 10px; }
.kpis small { display: block; color: var(--muted); font-size: 12px; }
.kpis b { font: 400 18px/1.3 var(--f-display); }
.kpis div:nth-child(4) { grid-column: span 2; }
.cat-rows { display: grid; }
.cat-row { display: flex; align-items: center; gap: 12px; padding: 8px 0; text-align: left; width: 100%; }
.cr-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.cr-top { display: flex; justify-content: space-between; gap: 8px; }
.cr-top b:first-child { font-weight: 600; } .cr-top b:last-child { font-weight: 600; white-space: nowrap; }
.cr-pct { width: 36px; text-align: right; color: var(--muted); font-size: 12px; }

.fam-intro { text-align: left; padding: 22px 20px; }
.fam-intro > .ic { color: var(--accent); }
.fam-intro h2 { font: 400 24px/1.2 var(--f-display); margin: 12px 0 14px; }
.ticks { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 10px; }
/*  Первые шаги нового человека (home.js, 22.11.2026): «Что купили сегодня?» с фразой и примерами; «Позовите партнёра»  */
.first-step { padding: 20px 18px 16px; margin-bottom: 14px; }
.first-step h2 { font: 400 24px/1.2 var(--f-display); margin: 0 0 6px; }
.first-step > .hint { margin: 0 0 12px; }
.first-step .phrase-bar { margin-bottom: 2px; }
.fs-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 4px; }
.fs-chips .chip { font-size: 14px; }
.fs-look { margin-top: 10px; }
.invite-card { margin-bottom: 14px; }
.invite-card h2 { margin-top: 0; }
.fs-shots { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 6px 0 14px; }
.fs-shots img { width: 100%; height: auto; border-radius: 16px; border: 1px solid var(--line); background: var(--s2); }
.ticks li { display: flex; gap: 10px; font-size: 14.5px; }
.ticks .ic { color: var(--inc); margin-top: 2px; }
.members { display: grid; gap: 4px; margin-bottom: 4px; }
.member { display: flex; align-items: center; gap: 12px; padding: 8px 0; text-align: left; width: 100%; }
.member > span:not(.ava) { display: flex; flex-direction: column; }
.member small { color: var(--muted); font-size: 13px; }
/*  Участник семьи на сервере без карточки: заметная строка — никто не сидит в семье незаметно  */
.member.ghost { padding: 8px 10px; margin: 2px -10px; border-radius: 12px; background: color-mix(in srgb, var(--warn, #F07A6A) 12%, var(--s2)); border: 1px dashed var(--warn, #F07A6A); }
.member.ghost b { color: var(--warn, #F07A6A); }
.member.ghost .ava { background: color-mix(in srgb, var(--warn, #F07A6A) 35%, var(--s2)); color: var(--text); }
.pocket-ask { margin-top: 12px; } .pocket-ask p { margin: 0 0 10px; }
.fam-rules .switch-row { padding: 12px 0; }
.invite-code { margin: 18px 0 6px; padding: 22px 10px; border-radius: 18px; text-align: center; font: 500 32px/1 var(--f-mono); letter-spacing: .14em; color: var(--accent); background: var(--s2); border: 1px dashed var(--accent); user-select: all; }
.settle-who { display: flex; justify-content: center; align-items: center; gap: 14px; color: var(--muted); margin: 8px 0 10px; }
.hist { display: grid; gap: 6px; font-size: 14px; }
.hist div { display: flex; align-items: center; gap: 10px; }
.hist span:first-child { flex: 1; color: var(--muted); font-family: var(--f-mono); font-size: 12px; }

.set-group { padding: 4px 16px; }
/* Изи в Настройках (19.11.2026): строка «название — выбор по нажатию», подсказки Изи — в том же блоке */
.set-sel { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-top: 1px solid var(--line); }
.set-sel > span { flex: 1 0 auto; font-weight: 600; white-space: nowrap; }
.set-sel select.inp { flex: 0 1 auto; width: auto; min-width: 0; max-width: 56%; min-height: 40px; padding: 6px 10px; font-size: 15px; text-overflow: ellipsis; }
.izi-set + .set-sel { border-top: 0; }
.btn.izi-hear { margin: 6px 0 4px; }
.izi-tips { margin-top: 8px; border-top: 1px solid var(--line); }
.izi-tips .switch-row { padding: 12px 0; }
.set-snd { border-top: 1px solid var(--line); }
.set-snd .switch-row { padding: 12px 0; }
.set-row { display: flex; align-items: center; gap: 14px; width: 100%; padding: 13px 0; text-align: left; color: var(--text); }
.set-row + .set-row { border-top: 1px solid var(--line); }
.set-row > .ic:first-child { color: var(--muted); }
.set-row.theme-auto { padding-top: 4px; }
.set-row > span:not(.ava) { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.set-row > span.sw-only { flex: none; display: block; }
.set-row small { color: var(--muted); font-size: 13px; }
.set-row > .ic:last-child { color: var(--faint); }
.pill { padding: 4px 10px; border-radius: 99px; background: var(--s3); color: var(--accent); font: 400 15px var(--f-display); }
.cloud .btn.wide:first-of-type { margin-top: 14px; }
.cloud-st { display: flex; gap: 12px; align-items: center; }
.cloud-st span:last-child { display: flex; flex-direction: column; min-width: 0; }
.cloud-st small { color: var(--muted); font-size: 13px; }
.cloud-st .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--inc); flex: none; box-shadow: 0 0 0 4px color-mix(in srgb, var(--inc) 20%, transparent); }
.cloud-st.syncing .dot { background: var(--accent); animation: pulse 1s infinite alternate; }
.cloud-st.error .dot { background: var(--warn); }
@keyframes pulse { to { opacity: .35; } }
.acc-del { margin-top: 6px; font-weight: 500; font-size: 14px; min-height: 38px; }
/* Аккаунты этого телефона — переход без кода (Таня 20.11.2026, «как в Instagram») */
.acc-list { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); display: grid; gap: 6px; }
.acc-list .micro { margin: 0 0 2px; color: var(--muted); }
.acc-sw { border-radius: var(--r-sm); background: var(--s2); }
.footnote { text-align: center; color: var(--faint); font-size: 12px; margin: 22px 0 0; }
.steps { padding-left: 20px; display: grid; gap: 10px; }
.steps .ic { display: inline-block; vertical-align: -3px; }

/* Разделы — объёмные значки на тёмной плитке, как на макете (14.11.2026, js/appicons.js): пять в ряд, подпись под плиткой.
   Тень — у плитки (под ней) и у предмета (на плитке). Плитка чуть подкрашена цветом темы */
.aic { --s: 50px; position: relative; display: block; flex: none; width: var(--s); height: var(--s); border-radius: 30%;
  background: linear-gradient(165deg, color-mix(in srgb, var(--accent) 16%, #213a46), color-mix(in srgb, var(--accent) 7%, #0f1b25));
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .10), inset 0 0 0 1px rgb(255 255 255 / .05), 0 calc(var(--s) * .17) calc(var(--s) * .3) calc(var(--s) * -.13) rgb(0 0 0 / .55); }
.aic img { position: absolute; left: 50%; top: 50%; width: calc(var(--s) * 1.2267); height: calc(var(--s) * 1.2267); max-width: none; transform: translate(-50%, -50%);
  filter: drop-shadow(0 calc(var(--s) * .05) calc(var(--s) * .045) rgb(0 0 0 / .42)); pointer-events: none; }   /* холст значка 184 — плитка 150 в нём */
.aic.own { display: grid; place-items: center; background: linear-gradient(165deg, color-mix(in srgb, var(--own) 70%, #fff), var(--own)); }
.aic-emo { font-size: calc(var(--s) * .5); line-height: 1; filter: drop-shadow(0 2px 2px rgb(0 0 0 / .3)); }
.aic-wd { position: absolute; inset: 29% 0 auto; text-align: center; font: normal 800 calc(var(--s) * .13)/1 var(--f-body); letter-spacing: .05em; color: #F4F1EA; }
.aic-day { position: absolute; inset: 48.5% 0 auto; text-align: center; font: 700 calc(var(--s) * .37)/1 var(--f-body); letter-spacing: -.02em; color: #1B5E57; }
.menu-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px 4px; padding: 6px 0 8px; }
.menu-tile { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 4px 1px; border-radius: 16px; font-size: 11px; font-weight: 600; line-height: 1.18; text-align: center; color: var(--text); -webkit-tap-highlight-color: transparent; }
/* Подписи — словами целиком, без переносов «До-кументы» (Таня 20.11.2026): не влезает — у всех плиток шрифт чуть мельче (main.js, fitMenu) */
.menu-tile > span:not(.aic) { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; max-width: 100%; overflow-wrap: normal; word-break: keep-all; -webkit-hyphens: manual; hyphens: manual; }
.menu-tile .aic { transition: transform .15s ease; }
.menu-tile:active .aic { transform: scale(.92); }
.menu-tile.on .aic { outline: 2px solid var(--accent); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { .menu-tile .aic { transition: none; } }

.onb { padding-top: 8vh; }
.onb-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.lang-btn { display: inline-flex; align-items: center; gap: 3px; min-height: 38px; padding: 7px 12px 7px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--s2); color: var(--text); font-size: 14px; font-weight: 500; }
.onb h1 { font: 400 54px/1 var(--f-display); letter-spacing: -.02em; }
.onb-lead { font-size: 17px; color: var(--muted); margin: 14px 0 10px; max-width: 30em; }
/* Что стало с письмом (js/mailcheck.js, 26.11.2026): ящика нет — красным и «Исправить почту»; доставлено — спокойно, цветом темы */
.mail-st { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0 0 12px; padding: 11px 14px; border-radius: 14px; font-size: 15px; line-height: 1.35;
  border: 1px solid var(--line); background: var(--s2); max-width: 30em; animation: mailIn .25s ease-out; }
.mail-st span { flex: 1 1 14em; }
.mail-st b { font-weight: 750; }
.mail-st.bad { color: var(--warn); font-weight: 600; border-color: color-mix(in srgb, var(--warn) 45%, var(--line)); background: color-mix(in srgb, var(--warn) 9%, var(--s1)); }
.mail-st.ok { color: var(--text); border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); background: color-mix(in srgb, var(--accent) 9%, var(--s1)); }
.mail-st .btn.small { flex: none; color: var(--text); }
@keyframes mailIn { from { opacity: 0; transform: translateY(-4px); } }
@media (prefers-reduced-motion: reduce) { .mail-st { animation: none; } }
.onb .btn.big { margin-top: 26px; }
.onb-key { color: var(--muted); font-weight: 500; }

.qr { width: min(240px, 70vw); margin: 16px auto 4px; padding: 10px; border-radius: 20px; background: #F6F8F4; }
.qr svg { display: block; width: 100%; height: auto; }
.key-box { margin: 14px 0 6px; padding: 14px; border-radius: 14px; background: var(--s2); border: 1px dashed var(--accent); font: 500 13px/1.5 var(--f-mono); word-break: break-all; user-select: all; }
.key-in { font: 500 13px/1.5 var(--f-mono); resize: none; }
.demo-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: -4px 0 14px; padding: 10px 12px 10px 14px; border-radius: 14px; background: color-mix(in srgb, var(--accent) 12%, var(--s1)); border: 1px solid color-mix(in srgb, var(--accent) 40%, var(--line)); font-size: 13px; }
.demo-bar button { flex: none; padding: 7px 10px; border-radius: 10px; background: var(--accent); color: var(--on-accent); font-weight: 700; font-size: 12.5px; }

/* Оформление: карточки тем и цвета акцента */
.theme-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.tab-look-reset { display: block; margin: -6px 0 12px; }
.theme-card { display: flex; flex-direction: column; align-items: stretch; width: 100%; min-width: 0; gap: 8px; padding: 8px 8px 10px; border-radius: 18px; border: 2px solid var(--line); background: var(--s2); text-align: left; }
.theme-card.on { border-color: var(--accent); }
.theme-card b { padding: 0 4px; font-weight: 600; font-size: 14px; display: flex; align-items: center; justify-content: space-between; }
.theme-card b .ic { color: var(--accent); }
.tc-prev { display: block; width: 100%; align-self: stretch; box-sizing: border-box; border-radius: 12px; padding: 10px; height: 92px; position: relative; overflow: hidden; }
.tc-note { display: block; height: 38px; border-radius: 9px; position: relative; overflow: hidden; }
.tc-note::after { content: ''; position: absolute; right: -14px; top: -14px; width: 60px; height: 60px; border-radius: 50%; border: 1.5px solid var(--tc-acc); opacity: .45; box-shadow: 0 0 0 6px transparent, inset 0 0 0 8px transparent; }
.tc-line { display: block; height: 7px; border-radius: 4px; margin-top: 8px; width: 70%; }
.tc-line.short { width: 40%; margin-top: 6px; }
.tc-fab { position: absolute; right: 10px; bottom: 10px; width: 22px; height: 22px; border-radius: 7px; }
.accents { display: grid; grid-template-columns: repeat(8, 1fr); gap: 8px; }
.acc-dot { aspect-ratio: 1; border-radius: 50%; background: var(--c); position: relative; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12); transition: transform .15s; }
.acc-dot.on { box-shadow: 0 0 0 3px var(--s1), 0 0 0 5px var(--c); }
.acc-dot:active { transform: scale(.9); }
.acc-name { margin-top: 10px; font-size: 13px; color: var(--muted); }

/* Запись фразой и голосом */
.phrase-bar { display: flex; align-items: center; gap: 6px; padding: 4px 4px 4px 14px; border-radius: 16px; background: var(--s2); border: 1px solid var(--line); }
.phrase-bar:focus-within { border-color: var(--accent); }
.phrase-bar input { flex: 1; min-width: 0; min-height: 44px; background: none; border: 0; outline: none; color: var(--text); font-size: 15px; }
.phrase-bar input::placeholder { color: var(--faint); }
.phrase-bar.diary-in { margin-bottom: 14px; }
.mic, .phrase-go { flex: none; width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; color: var(--muted); background: var(--s3); }
.phrase-go { background: var(--accent); color: var(--on-accent); }
.mic.on { color: #fff; background: var(--warn); animation: pulse .8s infinite alternate; }
.phrase-prev { min-height: 18px; margin: 8px 4px 0; font-size: 13px; color: var(--muted); }
.phrase-prev.ready { color: var(--text); }
.sheet-body > .phrase-prev { margin-bottom: 14px; }

/* Значки в строке операции: ≈ в основной валюте, вопросы, секрет */
.tx-eq { font-style: normal; font-size: 11.5px; color: var(--muted); margin-right: 2px; }
/*  Скрытая сумма: размытая заглушка; у автора — замочек «видите только вы» */
.amt-hidden > span { filter: blur(5px); opacity: .7; user-select: none; }
.tx-lock, .day-veil { display: inline-flex; vertical-align: -1px; margin-left: 5px; color: var(--muted); font-style: normal; }
.hidden-card { display: flex; align-items: center; gap: 14px; padding: 6px 0 4px; }
.hidden-card b { display: block; font: 400 34px/1.1 var(--f-display); }
.hidden-card small { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); font-size: 13px; margin-top: 4px; }
/*  Купить: список и напоминание */
.shop-in { margin-bottom: 8px; }
.shop-in .mic { flex: none; }
.shop { margin-bottom: 12px; }
.shop-when { display: inline-flex; align-items: center; gap: 5px; font-style: normal; font-size: 12px; color: var(--accent); }
.shop-when.done { color: var(--muted); }
/* Постоянный список (19.11.2026): метка у названия */
.shop-keep { margin-left: 6px; padding: 2px 8px; border-radius: 8px; font-size: 11.5px; font-weight: 700; letter-spacing: .02em; color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); vertical-align: 2px; }
.shop-items { list-style: none; margin: 4px 0 10px; padding: 0; display: grid; gap: 4px; }
.shop-items label { display: flex; align-items: center; gap: 10px; padding: 7px 0; cursor: pointer; }
.shop-items input { width: 20px; height: 20px; accent-color: var(--accent); }
.shop-items li.done span { color: var(--muted); text-decoration: line-through; }
.shop-done { padding: 6px 16px; }
.shop-past { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: center; width: 100%; padding: 10px 0; text-align: left; color: var(--muted); }
.shop-past + .shop-past { border-top: 1px solid var(--line); } .shop-past span { color: var(--inc); }
.stat.small { font-size: 18px; line-height: 1.3; }
.msg-in .mic.on { color: var(--warn); }
textarea.inp { resize: vertical; min-height: 96px; font: inherit; }

/*  Помощник */
.chat { display: grid; gap: 10px; margin: 12px 0; max-height: 58vh; overflow-y: auto; padding: 2px; }
.chat-empty { text-align: center; color: var(--muted); padding: 24px 8px; } .chat-empty svg { margin: 0 auto 10px; color: var(--faint); }
.chat .bubble p { margin: 0 0 6px; } .chat .bubble p:last-child { margin-bottom: 0; } .chat .bubble ul { margin: 4px 0 6px; padding-left: 18px; }
.chat .typing { color: var(--muted); letter-spacing: .2em; }
.link { background: none; border: 0; color: var(--accent); font: inherit; padding: 0; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.ctx-raw pre { font: 11px/1.4 var(--f-mono); white-space: pre-wrap; word-break: break-word; background: var(--s2); border-radius: 12px; padding: 10px; max-height: 50vh; overflow: auto; }
.ctx-raw summary { cursor: pointer; color: var(--muted); margin: 10px 0; }

/*  Аренда и бизнес */
.obj-list { display: grid; gap: 10px; margin-bottom: 14px; }
.obj { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; text-decoration: none; color: inherit; border-left: 4px solid var(--c); }
.obj-ico { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; font-size: 22px; background: color-mix(in srgb, var(--c) 18%, var(--s2)); }
.obj-t { min-width: 0; display: flex; flex-direction: column; } .obj-t b { font-weight: 600; } .obj-t small { color: var(--muted); } .obj-t em.warn { font-style: normal; }
.obj-v { text-align: right; display: flex; flex-direction: column; } .obj-v b { font: 400 20px/1.2 var(--f-display); } .obj-v small { color: var(--muted); font-size: 12px; }
.trio .wide { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: baseline; padding-top: 10px; border-top: 1px dashed var(--line); }
.trio .wide b { font-size: 24px; }
.back-link { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); text-decoration: none; font-size: 14px; margin: -6px 0 10px; }
.lease-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; margin: 6px 0 12px; }
.lease-grid small { display: block; color: var(--muted); font-size: 12px; } .lease-grid b { font-weight: 600; } .lease-grid b small { display: inline; font-weight: 400; }
.hint.warn { color: var(--warn); }
/* Пример в пустом разделе («Документы», «Входящие»): штриховая рамка и метка — видно, что это не ваши данные */
.ex-card { display: grid; gap: 14px; padding: 14px 16px; border-style: dashed; border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); }
.ex-tag { justify-self: start; margin-bottom: -4px; padding: 2px 8px; border-radius: 999px; background: color-mix(in srgb, var(--accent) 12%, transparent); font: 600 10.5px/1.3 var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }
.ex-card > .hint { margin: 0; }
.ex-step { display: grid; grid-template-columns: 22px 1fr; gap: 10px; align-items: start; }
.ex-step small { display: block; color: var(--muted); font-size: 12.5px; margin: 2px 0 6px; }
.ex-n { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: var(--on-accent); font: 600 12px/1 var(--f-mono); }
.ex-say { margin: 0; display: inline-block; padding: 8px 12px; border-radius: 14px 14px 14px 4px; background: color-mix(in srgb, var(--accent) 12%, var(--s2)); font-size: 15px; }
.ex-push { display: grid; gap: 2px; padding: 10px 12px; border-radius: 14px; background: var(--s2); border: 1px solid var(--line); box-shadow: 0 6px 18px rgba(0, 0, 0, .14); font-size: 13.5px; }
.ex-push-h { display: flex; align-items: center; gap: 6px; margin-bottom: 2px; color: var(--muted); font-size: 11.5px; }
.ex-push-h img { border-radius: 4px; }
.ex-push b { font-weight: 600; }
.ex-push > span:last-child { color: var(--muted); }
/* Чек на фото: бумага всегда бумажная, в любой теме; справа — как Изи его разложил */
.ib-ex-row { display: grid; grid-template-columns: auto auto 1fr; gap: 8px; align-items: center; }
.ex-receipt { width: 118px; padding: 10px 9px 14px; background: #FBFAF5; color: #2A2723; transform: rotate(-2.5deg); box-shadow: 0 6px 16px rgba(0, 0, 0, .18); font: 500 10px/1.55 var(--f-mono);
  -webkit-mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / 8px 100%; mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / 8px 100%; }
.ex-receipt b { display: block; text-align: center; letter-spacing: .14em; margin-bottom: 4px; font-size: 10.5px; }
.ex-receipt span { display: flex; justify-content: space-between; gap: 6px; }
.ex-receipt span i { font-style: normal; }
.ex-receipt .tot { margin-top: 4px; padding-top: 3px; border-top: 1px dashed #8C857B; font-weight: 700; }
.ex-arrow { color: var(--accent); }
.ex-split { display: grid; gap: 6px; min-width: 0; }
.ex-split > small { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12.5px; }
.ex-cat { display: grid; gap: 1px; padding: 7px 10px; border-radius: 12px; background: var(--s2); border: 1px solid var(--line); }
.ex-cat span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12.5px; color: var(--muted); }
.ex-cat b { font: 600 16px/1.2 var(--f-body); white-space: nowrap; }
.doc-list { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 8px; }
.doc-list li { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; } .doc-list li svg { color: var(--muted); }
.doc-list li small { color: var(--muted); } .doc-list li.soon small { color: var(--accent); } .doc-list li.over small { color: var(--warn); }
.doc-in { display: grid; grid-template-columns: 1fr 150px auto; gap: 8px; align-items: center; margin-bottom: 8px; }
.chip.wide { width: 100%; justify-content: center; min-height: 46px; }
.remind-text { white-space: pre-wrap; background: var(--s2); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.ticket-sheet .remind-text { background: #f4f4f4; border-color: #ddd; color: #111; }
.obj-mini { display: grid; gap: 2px; }
.om { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; padding: 8px 0; text-decoration: none; color: inherit; } .om + .om { border-top: 1px solid var(--line); }
.om em { font: 400 18px/1 var(--f-display); font-style: normal; } .om em.warn { color: var(--warn); }

/*  Скидочные карты: плитки как пластик, показ — белый билет для сканера */
.lcards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
.lcards.mini { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 0; }
.lcard { position: relative; aspect-ratio: 1.6; border-radius: 16px; padding: 14px; text-align: left; display: flex; flex-direction: column; justify-content: space-between; color: #1A120B;
  background: linear-gradient(135deg, color-mix(in srgb, var(--c) 92%, #fff), color-mix(in srgb, var(--c) 78%, #000)); box-shadow: var(--shadow); overflow: hidden; }
.lcard::after { content: ''; position: absolute; right: -18px; top: -18px; width: 70px; height: 70px; border-radius: 50%; background: rgba(255,255,255,.18); }
.lcard-n { font: 600 15px/1.25 var(--f-body); overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.lcard-num { font: 500 12px/1 var(--f-mono); letter-spacing: .08em; opacity: .8; }
.lcard .shared-mark { position: absolute; right: 12px; bottom: 12px; color: #1A120B; opacity: .7; }
.lcards.mini .lcard { aspect-ratio: 2.1; padding: 10px 12px; border-radius: 13px; }
.lcards.mini .lcard-n { font-size: 13px; }
.ticket-sheet .sheet-body { background: #fff; color: #111; border-radius: 0 0 26px 26px; }
.ticket-sheet .sheet-head { background: #fff; } .ticket-sheet h2 { color: #111; }
.ticket { background: #fff; border-radius: 16px; padding: 18px 8px 12px; display: grid; gap: 14px; justify-items: center; border-top: 6px solid var(--c); margin: 4px 0 12px; }
.ticket.small { padding: 12px 8px; margin: 0 0 14px; background: #fff; }
.ticket svg { width: 100%; max-width: 320px; height: 96px; display: block; }
.ticket .ticket-qr { width: 200px; height: 200px; }
.ticket.small svg { height: 60px; } .ticket.small .ticket-qr { width: 120px; height: 120px; }
.ticket-num { font: 500 20px/1 var(--f-mono); letter-spacing: .16em; color: #111; word-break: break-all; text-align: center; }
.ticket-sheet .hint { color: #555; } .ticket-sheet .btn.ghost { color: #111; border-color: #ddd; background: #f4f4f4; }
.inp-scan { display: flex; gap: 8px; align-items: center; } .inp-scan .inp { flex: 1; min-width: 0; }
.inp.mono { font-family: var(--f-mono); letter-spacing: .06em; }
.scan-box { position: relative; border-radius: 16px; overflow: hidden; background: #000; margin: 0 0 14px; display: grid; }
.scan-box[hidden] { display: none; }
.scan-box video { width: 100%; max-height: 260px; object-fit: cover; display: block; }
.scan-box span { position: absolute; left: 0; right: 0; top: 12px; text-align: center; color: #fff; font-size: 13px; text-shadow: 0 1px 4px #000; }
.scan-box .btn { position: absolute; right: 10px; bottom: 10px; }

/*  Цель-сюрприз */
.goal-secret-box { display: flex; align-items: center; gap: 10px; }
.goal-secret-box .btn { margin-left: auto; }

/*  Хотим купить */
.wish-list { display: grid; gap: 12px; }
.wish { display: grid; gap: 10px; }
.wish-main { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; text-align: left; }
.wish-main b { font: 600 18px/1.3 var(--f-body); }
.wish-sum { font: 400 24px/1 var(--f-display); white-space: nowrap; }
.wish .hint { margin: -4px 0 0; }
.wish-impact { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); }
.wish-impact svg { flex: none; color: var(--accent); }
.wish-impact.warn { color: var(--warn); }
.wish-votes { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; }
.wish-votes .chip { min-height: 34px; font-size: 15px; }
.voters { display: inline-flex; margin-right: 6px; }
.voters > * + * { margin-left: -6px; }
.wish-done { padding: 6px 16px; }
.wish-past { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; width: 100%; padding: 10px 0; text-align: left; color: var(--muted); }
.wish-past + .wish-past { border-top: 1px solid var(--line); }
.wish-past span.bought { color: var(--inc); } .wish-past span.dropped { color: var(--faint); }
.wish-mini { display: grid; gap: 2px; }
.wm { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 8px 0; text-decoration: none; color: inherit; }
.wm + .wm { border-top: 1px solid var(--line); }
.wm span { grid-row: 2; color: var(--muted); font-size: 13px; }
.wm small { grid-row: 1 / 3; grid-column: 2; align-self: center; font: 400 20px/1 var(--f-display); }

/*  Договорённости и личные карманы */
.agree .rule { display: flex; align-items: center; gap: 10px; margin: 4px 0 6px; font-weight: 500; }
.agree .rule svg { color: var(--accent); flex: none; }
.pockets { display: grid; gap: 14px; margin: 10px 0 8px; }
.pocket { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; align-items: center; }
.pocket .meter { grid-column: 2; }
.pocket-t { display: flex; flex-direction: column; }
.pocket-t b small { font-weight: 400; color: var(--muted); }
.pocket-t > small { color: var(--muted); }
.pocket-t > small.warn { color: var(--warn); }
.pocket-in { display: grid; grid-template-columns: auto 1fr 150px; gap: 12px; align-items: center; }
.priv-f .seg { width: 100%; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.tx-q { display: inline-flex; align-items: center; gap: 2px; font-style: normal; font-size: 11.5px; color: var(--muted); }
.tx-q.unseen { color: var(--accent); font-weight: 700; }
.tx-secret { display: inline-flex; align-items: center; gap: 3px; margin-left: 6px; padding: 1px 7px; border-radius: 99px; font: 600 11px var(--f-body); font-style: normal; color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent); vertical-align: 1px; }
.secret-f input[type=date] { margin-top: 8px; }
.secret-f > * + .switch-row { margin-top: 14px; }

/* Вопросы к трате */
.thread { margin-top: 22px; padding-top: 16px; border-top: 1px dashed var(--line); }
.thread-h { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 10px; }
.msg { display: flex; gap: 8px; align-items: flex-end; margin-bottom: 10px; }
.msg.me { flex-direction: row-reverse; }
.bubble { max-width: 78%; padding: 8px 12px; border-radius: 16px 16px 16px 6px; background: var(--s2); border: 1px solid var(--line); }
.msg.me .bubble { border-radius: 16px 16px 6px 16px; background: color-mix(in srgb, var(--accent) 14%, var(--s2)); border-color: color-mix(in srgb, var(--accent) 30%, var(--line)); }
.bubble b { display: block; font-size: 12px; font-weight: 600; color: var(--muted); }
.bubble p { margin: 2px 0; font-size: 15px; }
.bubble small { font-size: 11px; color: var(--faint); }
.quick-asks { margin: 6px 0 10px; }
.quick-asks .chip { min-height: 32px; font-size: 13px; }
.msg-in { display: flex; gap: 8px; align-items: center; }
.icon-btn.send { flex: none; width: 46px; height: 46px; border-radius: 14px; background: var(--accent); color: var(--on-accent); }
.toast button + button { margin-left: -4px; }

/* ── 12. Мелочи ─────────────────────────────────────────────── */

@media (min-width: 600px) {
  .view { padding-top: 32px; }
  .sheet { border-radius: 26px; margin-bottom: 16px; border-bottom: 1px solid var(--line); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ── Свои модули ─────────────────────────────────────────────── */
.emo { font-style: normal; line-height: 1; }
.obj-ico.emo, .el-ico.emo { font-size: 22px; }
.ic.emo { display: inline-grid; place-items: center; width: 22px; height: 22px; }
.mod-tot { margin-top: 12px; }
.mod-tot.two { grid-template-columns: repeat(2, 1fr); }
.ent-list { display: grid; gap: 6px; margin-bottom: 4px; }
.ent { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 10px; align-items: center; width: 100%; padding: 10px 10px; border-radius: 14px; background: var(--s2); text-align: left; }
.ent-d { font: 500 12px/1.2 var(--f-mono); color: var(--muted); }
.ent-v { display: flex; flex-wrap: wrap; gap: 4px 14px; min-width: 0; }
.ent-kv { display: inline-flex; flex-direction: column; min-width: 0; }
.ent-kv small { color: var(--muted); font-size: 11px; }
.ent-kv b { font-weight: 500; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 180px; }
.ent-note { flex-basis: 100%; font-style: normal; color: var(--muted); font-size: 13px; }
.ent-who { font-size: 12px; color: var(--muted); }
.edit-list.fields li, .edit-list.totals li { align-items: flex-start; padding-top: 8px; padding-bottom: 8px; }
.edit-list.totals li { padding-left: 12px; }
.edit-list .el-t .inp.small, .edit-list .el-t select.inp.small { min-height: 36px; padding: 6px 10px; font-size: 14px; border-radius: 10px; }
.fl-row { display: flex; gap: 6px; margin-top: 6px; }
.fl-row .inp.small { flex: 1; min-width: 0; }
.fl-row .unit { flex: 0 0 76px; }
.inp.mono { font-family: var(--f-mono); font-size: 13px; }
.req { display: flex; align-items: center; gap: 6px; margin-top: 6px; font-size: 12px; color: var(--muted); }
.mono-keys code { font: 500 12px var(--f-mono); color: var(--text); background: var(--s2); padding: 1px 5px; border-radius: 6px; }
.mod-w { display: grid; gap: 6px; }
.mod-w.full { grid-template-columns: repeat(3, 1fr); }
.mod-w small { display: block; color: var(--muted); font-size: 12px; }
.mod-w .stat { font-size: 22px; }
.mod-w-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; }
.mod-w-foot small { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mod-w-foot .btn.small { flex: none; padding: 6px 10px; }
.hint.center { text-align: center; margin-top: 14px; }

/* ── Перестановка блоков прямо на главной и разделов в меню ──── */
.grid.moving .w, .menu-grid.moving .menu-tile { touch-action: none; user-select: none; -webkit-user-select: none; cursor: grab; outline: 1.5px dashed color-mix(in srgb, var(--accent) 55%, transparent); outline-offset: 3px; animation: outline-pulse 1.1s ease-in-out infinite alternate; }
.grid.moving .w > *, .menu-grid.moving .menu-tile > * { pointer-events: none; }
.grid.moving .w.dragging, .menu-grid.moving .menu-tile.dragging { animation: none; z-index: 5; box-shadow: var(--shadow); outline-color: var(--accent); opacity: .96; }
@keyframes outline-pulse { from { outline-color: color-mix(in srgb, var(--accent) 30%, transparent); } to { outline-color: color-mix(in srgb, var(--accent) 80%, transparent); } }
.menu-tile { position: relative; }
.menu-tools { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 14px; }
.menu-tools .btn { min-width: 0; padding: 10px 6px; gap: 6px; font-size: 13px; line-height: 1.2; white-space: normal; text-align: center; }

/* ── Авторам ─────────────────────────────────────────────────── */
.thanks-hero { text-align: center; padding: 22px 18px; }
.thanks-mark { width: 54px; height: 54px; margin: 0 auto 12px; display: grid; place-items: center; border-radius: 50%; background: color-mix(in srgb, var(--accent) 16%, var(--s2)); color: var(--accent); }
.thanks-hero .lead { margin-bottom: 6px; }
.chips.amounts { align-items: center; }
.inp-cur.own { width: 118px; }
.inp-cur.own .inp { min-height: 38px; padding: 7px 36px 7px 12px; border-radius: 12px; font-size: 14px; }
.ways { display: grid; gap: 8px; margin-top: 14px; }
.ways .btn.wide { margin-top: 0; }
.copy-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.copy-row code { font: 500 13px var(--f-mono); word-break: break-all; }
.copy-row .btn { flex: none; }
.ticket { background: #fff; border-radius: 16px; padding: 14px; margin: 12px auto; max-width: 240px; }
.ticket .ticket-qr { width: 100%; height: auto; display: block; }

/* ── Помощник наверху ────────────────────────────────────────── */
.icon-btn.round.ai { color: var(--accent); text-decoration: none; }

/* ── Изи: золотая монетка с лицом, руками и ногами (js/izi.js) ─ */
.izi { display: inline-block; width: var(--izi); height: var(--izi); flex: none; line-height: 0; }
.izi svg { width: 100%; height: 100%; overflow: visible; display: block; }
.izi .izi-body, .izi .izi-wave, .izi .ie-n, .izi .ie-w, .izi .im-o, .izi .iz-bulb, .izi .iz-spark { transform-box: view-box; }
/* Что видно в каком состоянии: глаза (ie-), брови (ib-), рот (im-), значки над головой (iz-) */
.izi .ie-w, .izi .ie-h, .izi .ie-s, .izi .ie-t, .izi .ib-s, .izi .ib-c, .izi .ib-t, .izi .im-g, .izi .im-o, .izi .im-r, .izi .im-f, .izi .iz-bulb, .izi .iz-q, .izi .iz-spark { display: none; }
.izi-think .ie-n, .izi-happy .ie-n, .izi-listen .ie-n, .izi-surprise .ie-n { display: none; }
.izi-think .ie-t, .izi-happy .ie-w, .izi-listen .ie-s, .izi-surprise .ie-s { display: inline; }
.izi-idea .ib-n, .izi-listen .ib-n, .izi-surprise .ib-n, .izi-concern .ib-n, .izi-think .ib-n { display: none; }
.izi-idea .ib-s, .izi-listen .ib-s, .izi-surprise .ib-s, .izi-concern .ib-c, .izi-think .ib-t { display: inline; }
.izi-idea .im-s, .izi-happy .im-s, .izi-talk .im-s, .izi-listen .im-s, .izi-surprise .im-s, .izi-concern .im-s { display: none; }
.izi-idea .im-g, .izi-happy .im-g, .izi-talk .im-o, .izi-listen .im-r, .izi-surprise .im-r, .izi-concern .im-f { display: inline; }
.izi-idea .iz-bulb, .izi-think .iz-q, .izi-happy .iz-spark { display: inline; }
/* Движение */
.izi .izi-body { transform-origin: 124px 214px; animation: izi-bob 3.4s ease-in-out infinite; }
.izi .izi-wave { transform-origin: 66px 126px; animation: izi-wave 7s ease-in-out infinite; }
.izi .ie-n, .izi .ie-w { transform-origin: 126px 98px; animation: izi-blink 4.8s infinite; }
.izi-think .izi-body { animation: izi-tilt 1.4s ease-in-out infinite; }
.izi-idea .izi-body, .izi-surprise .izi-body { animation: izi-pop .6s ease-out 1; }
.izi-idea .iz-bulb { transform-origin: 126px 30px; animation: izi-pop .6s ease-out 1; }
.izi-happy .izi-body { animation: izi-hop .8s ease-in-out infinite; }
.izi-happy .iz-spark { transform-origin: 56px 52px; animation: izi-spark .8s ease-in-out infinite alternate; }
.izi-talk .im-o { transform-origin: 126px 131px; animation: izi-talk .24s ease-in-out infinite alternate; }
.izi-talk .izi-wave { animation: izi-wave-talk 1.6s ease-in-out infinite; }
.izi-concern .izi-body { animation: none; transform: rotate(-4deg); }
/* Разовые жесты (iziDo) */
.izi-do-nod .izi-body { animation: izi-nod .9s ease-in-out 1; }
.izi-do-wave .izi-wave, .izi-do-thumbs .izi-wave { animation: izi-wave-now 1.6s ease-in-out 1; }
.izi-do-boop .izi-body, .izi-do-jump .izi-body { animation: izi-boop .6s ease-out 1; }
.izi-do-shrug .izi-body { animation: izi-tilt .8s ease-in-out 2; }
.izi-still *, .izi-still .izi-body, .izi-still .izi-wave, .izi-still .ie-n, .izi-still .ie-w { animation: none !important; }
@keyframes izi-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes izi-wave { 0%, 72%, 100% { transform: rotate(0); } 77% { transform: rotate(24deg); } 82% { transform: rotate(-6deg); } 87% { transform: rotate(20deg); } 92% { transform: rotate(-4deg); } }
@keyframes izi-wave-talk { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(14deg); } }
@keyframes izi-wave-now { 0%, 100% { transform: rotate(0); } 20% { transform: rotate(22deg); } 40% { transform: rotate(-8deg); } 60% { transform: rotate(20deg); } 80% { transform: rotate(-6deg); } }
@keyframes izi-blink { 0%, 94%, 100% { transform: scaleY(1); } 96% { transform: scaleY(.1); } }
@keyframes izi-tilt { 0%, 100% { transform: rotate(-7deg); } 50% { transform: rotate(7deg); } }
@keyframes izi-pop { 0% { transform: scale(.9); } 60% { transform: scale(1.07); } 100% { transform: scale(1); } }
@keyframes izi-hop { 0%, 100% { transform: translateY(0); } 40% { transform: translateY(-16px); } }
@keyframes izi-talk { from { transform: scaleY(.35); } to { transform: scaleY(1.1); } }
@keyframes izi-nod { 0%, 50%, 100% { transform: none; } 25%, 75% { transform: translateY(4px) scaleY(.97); } }
@keyframes izi-boop { 0% { transform: scale(1); } 30% { transform: scale(1.08, .9); } 60% { transform: scale(.96, 1.06); } 100% { transform: scale(1); } }
@keyframes izi-spark { from { opacity: .45; transform: scale(.85); } to { opacity: 1; transform: scale(1.08); } }
@media (prefers-reduced-motion: reduce) { .izi .izi-body, .izi .izi-wave, .izi .ie-n, .izi .ie-w, .izi .im-o, .izi .iz-spark, .izi .iz-bulb { animation: none !important; } }
.icon-btn.round.ai { background: none; border-color: transparent; }
.ai-izi { flex: none; margin: -8px -2px -8px -6px; }
.izi-hero { display: block; margin: 0 auto; background: none; border: 0; padding: 2px 8px; border-radius: 24px; cursor: pointer; }
.izi-hero:focus-visible { outline: 2px solid var(--accent); }
.izi-tip { text-align: center; color: var(--muted); font-size: 13px; margin: -2px 0 12px; }
.msg-av { flex: none; margin-bottom: -2px; }
.bubble .say { float: right; margin: -2px -6px 2px 8px; padding: 4px; border: 0; background: none; color: var(--muted); border-radius: 8px; }
.izi-set { display: flex; align-items: center; gap: 12px; margin-bottom: 4px; }

/* ── Первый экран: тема ─────────────────────────────────────── */
.onb-theme { display: inline-flex; gap: 2px; padding: 3px; margin-left: auto; border-radius: 13px; border: 1px solid var(--line); background: var(--s2); }
.onb-theme button { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 11px; border: 0; border-radius: 10px; background: none; color: var(--muted); font: 500 13px/1 var(--f-body); }
.onb-theme button.on { background: var(--accent); color: var(--on-accent); }

/* ── Список валют: поиск и разделитель ──────────────────────── */
.pick-q { margin-bottom: 6px; }
.pick-sep { margin: 14px 4px 2px; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.pick[hidden], .pick-sep[hidden] { display: none; }

.ai-hero { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.ai-mark { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; background: color-mix(in srgb, var(--accent) 18%, var(--s2)); color: var(--accent); flex: none; }
.ai-t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ai-t b { font-weight: 600; }
.ai-t small { color: var(--muted); font-size: 12.5px; }
.ai-quick { margin-top: 10px; }
.ai-quick .chip { min-height: 32px; font-size: 13px; }

/* ── Календарь ───────────────────────────────────────────────── */
.cal-head, .cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-head b { font: 500 10px var(--f-mono); color: var(--faint); text-align: center; text-transform: uppercase; margin-bottom: 4px; }
.cal-cell { aspect-ratio: 1; border-radius: 10px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 14px; color: var(--text); background: var(--s2); }
.cal-cell.blank { background: transparent; }
.cal-cell.today { box-shadow: inset 0 0 0 1.5px var(--accent); }
.cal-cell.sel { background: color-mix(in srgb, var(--accent) 24%, var(--s2)); font-weight: 600; }
.cal-cell .dots { display: flex; gap: 2px; height: 5px; }
.cal-cell .dots b { width: 5px; height: 5px; border-radius: 50%; background: var(--c); }
.ev-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; }
.ev-day { font: 600 11.5px/1 var(--f-body); color: var(--muted); letter-spacing: .05em; text-transform: uppercase; margin: 8px 2px 2px; }
.ev { display: flex; align-items: center; gap: 6px; min-width: 0; border-radius: 14px; background: var(--s2); padding: 0 8px 0 0; text-decoration: none; color: inherit; }
.ev-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 10px 10px; text-align: left; color: inherit; text-decoration: none; }
.ev-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--c); flex: none; }
.ev-time { font: 500 12px/1.2 var(--f-mono); color: var(--muted); flex: 0 0 58px; }
.ev-t { min-width: 0; display: flex; flex-direction: column; }
.ev-t b { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev-t small { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Повторяющиеся события */
.ev-rep { display: inline-flex; vertical-align: -1px; color: var(--muted); }
.rep-days { margin-top: 8px; }
.rep-days .chip { min-width: 40px; justify-content: center; }
.rep-until { margin-top: 8px; align-items: end; }
.rep-label { margin: 0 0 10px; color: var(--accent); }
.ev.done .ev-t b { text-decoration: line-through; color: var(--muted); }
.ev-chk { position: relative; width: 30px; height: 30px; flex: none; }
.ev-chk input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.ev-chk i { position: absolute; inset: 3px; border-radius: 50%; border: 1.5px solid var(--line); display: grid; place-items: center; color: color-mix(in srgb, var(--muted) 45%, transparent); }   /* бледная галочка: видно, что это «сделано» */
.ev-chk input:checked + i { background: var(--c); border-color: var(--c); color: #0E1714; }
.field.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ev-mini { display: grid; gap: 6px; }
.em { display: flex; align-items: center; gap: 8px; text-decoration: none; color: inherit; min-width: 0; }
.em span { min-width: 0; display: flex; flex-direction: column; }
.em b { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.em small { color: var(--muted); font-size: 12px; }

/* ── Документы и сроки ───────────────────────────────────────── */
.doc-list { display: grid; gap: 10px; margin-bottom: 14px; }
.doc-row { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; text-align: left; width: 100%; }
.doc-ico { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; font-size: 22px; background: var(--s2); }
.doc-t { min-width: 0; display: flex; flex-direction: column; }
.doc-t b { font-weight: 600; }
.doc-t small { color: var(--muted); font-size: 12.5px; display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.doc-st { font: 500 12px var(--f-mono); font-style: normal; padding: 4px 8px; border-radius: 8px; background: var(--s2); color: var(--muted); white-space: nowrap; }
.doc-row.over .doc-st, .doc-row.soon .doc-st { background: color-mix(in srgb, var(--warn) 16%, var(--s2)); color: var(--warn); }
.doc-row.near .doc-st { color: var(--text); }
.doc-mini { display: grid; gap: 6px; }
.dm { display: flex; align-items: center; gap: 8px; text-decoration: none; color: inherit; min-width: 0; }
.dm b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.dm em { font: 500 12px var(--f-mono); font-style: normal; color: var(--muted); white-space: nowrap; }
.dm.over em, .dm.soon em { color: var(--warn); }
.field.in-card { margin: 8px 4px 4px; }
.hint.in-card { padding: 4px 6px 6px; }

/* ── Замок на экране ─────────────────────────────────────────── */
.lock { position: fixed; inset: 0; z-index: 400; background: var(--bg); display: flex; align-items: center; justify-content: center; padding: 24px; transition: opacity .22s; }
.lock.out { opacity: 0; pointer-events: none; }
.lock-in { width: min(320px, 100%); text-align: center; }
.lock-mark { width: 60px; height: 60px; margin: 0 auto 14px; border-radius: 20px; display: grid; place-items: center; background: var(--s1); border: 1px solid var(--line); color: var(--accent); }
.lock h1 { font: 400 30px/1.1 var(--f-display); }
.lock-sub { color: var(--muted); margin: 8px 0 18px; min-height: 20px; }
.lock-dots { display: flex; justify-content: center; gap: 14px; margin-bottom: 22px; }
.lock-dots i { width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid var(--line); }
.lock-dots i.on { background: var(--accent); border-color: var(--accent); }
.lock-pad { display: grid; grid-template-columns: repeat(3, 72px); gap: 12px; justify-content: center; }
.lock-pad button { width: 72px; height: 72px; border-radius: 50%; background: var(--s1); border: 1px solid var(--line); font: 500 26px var(--f-body); color: var(--text); display: grid; place-items: center; }
.lock-pad button:active { background: var(--s3); }
.lock-forgot { margin-top: 22px; color: var(--muted); }
.lock-box { margin-top: 16px; padding: 14px; border-radius: 16px; background: var(--s1); border: 1px solid var(--line); text-align: left; font-size: 14px; }
.lock-box .row-btns { margin-top: 10px; }
.lock-in.shake { animation: shake .4s; }
@keyframes shake { 0%, 100% { transform: translateX(0); } 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
.lock .btn.primary.big.wide { margin-top: 14px; }
.ev-chk i { pointer-events: none; }
.ev.ev-note .ev-t b { white-space: normal; font-weight: 400; }   /* запись дневника читается целиком */
.ev.ev-note .ev-main { align-items: flex-start; padding: 8px 10px; }
.ev.ev-note .ev-time { flex: 0 0 auto; margin-top: 1px; }         /* у записи нет времени — карандаш не держит колонку, текст сразу за ним */
.ev.ev-note .ev-dot { margin-top: 5px; }
/* Подсказка «скажите Изи …» на календаре и в дневнике: видна сразу */
.cal-share { padding: 2px 14px; margin-bottom: 12px; }
.cal-share .switch-row { padding: 8px 0; }

/* ── Входящие: операции с телефона ───────────────────────────── */
.inbox-list { display: grid; gap: 10px; margin-bottom: 14px; }
/* Свайп карточки: под ней — что произойдёт; вертикаль остаётся прокруткой */
.ib-swipe { position: relative; border-radius: var(--r-lg); }
.ib-swipe > .ib { position: relative; touch-action: pan-y; transition: transform .18s ease-out; }
.ib-under { position: absolute; inset: 0; display: flex; justify-content: space-between; align-items: center; padding: 0 18px; border-radius: var(--r-lg); font-weight: 600; font-size: 14px; opacity: 0; }
.ib-under span { display: inline-flex; align-items: center; gap: 6px; opacity: 0; }
.ib-swipe[data-dir] .ib-under { opacity: 1; }
.ib-swipe[data-dir=right] .ib-under { background: color-mix(in srgb, var(--inc) 22%, var(--s1)); color: var(--inc); }
.ib-swipe[data-dir=left] .ib-under { background: var(--s2); color: var(--muted); }
.ib-swipe[data-dir=right] .ib-r, .ib-swipe[data-dir=left] .ib-l { opacity: 1; }
.ib-swipe-hint { margin-top: -4px; }
.ib-head { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.ib-src { font: 500 11px var(--f-mono); letter-spacing: .06em; text-transform: uppercase; }
.ib-main { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.ib-amt { font: 400 26px/1.1 var(--f-display); }
.ib.inc .ib-amt { color: var(--inc); }
.ib-m { font-weight: 600; min-width: 0; }
.ib-m small { color: var(--muted); font-weight: 400; }
.ib-main .ib-rename { width: 30px; height: 30px; margin-left: -6px; align-self: center; color: var(--muted); }
.ib-bank { margin: -4px 0 8px; font: 500 11px/1.3 var(--f-mono); color: var(--faint); letter-spacing: .02em; word-break: break-word; }
.m-names { padding: 6px 14px; display: grid; gap: 2px; }
.m-names .ib-row { align-items: center; padding: 4px 0; }
.m-names .ib-row span { color: var(--text); }
.m-names small { color: var(--faint); font-family: var(--f-mono); font-size: 11px; }
.ib .chips { margin-bottom: 4px; }
.ib .chip.muted { color: var(--muted); border-style: dashed; }
.ib-raw { font-size: 14px; word-break: break-word; }
.ib-details { margin-top: 8px; }
.ib-details summary { font-size: 12px; color: var(--muted); cursor: pointer; }
.ib-details pre { font: 12px/1.4 var(--f-mono); white-space: pre-wrap; word-break: break-word; color: var(--muted); margin: 6px 0 0; }
.inbox-done { display: grid; gap: 6px; }
.ib-row { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; }
.ib-row span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
/* «Записано» — строка нажимается: снимок чека или сама запись (Таня 20.11.2026) */
.ib-open { width: 100%; padding: 6px 0; border: 0; background: none; font: inherit; color: inherit; text-align: left; cursor: pointer; align-items: center; }
.ib-open span { display: inline-flex; align-items: center; gap: 6px; }
.ib-open + .ib-open { border-top: 1px solid var(--line); }
.key-box { display: flex; align-items: center; gap: 8px; }
.key-box code { flex: 1; min-width: 0; font: 500 13px var(--f-mono); word-break: break-all; }
.key-box code.mask { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }   /* скрытый ключ — одной строкой */
.steps-h { font-weight: 600; margin: 16px 0 6px; }
.steps code { font: 500 12.5px var(--f-mono); background: var(--s2); padding: 1px 6px; border-radius: 6px; word-break: break-all; }
.steps li + li { margin-top: 6px; }
.w-inbox .ib-mini { display: grid; gap: 6px; }
.w-inbox .im { display: flex; align-items: center; gap: 8px; }
.w-inbox .im b { flex: none; }
.w-inbox .im span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 13px; }
.w-inbox .im .btn.small { flex: none; padding: 4px 10px; min-height: 30px; }

/* ── Денежная механика: период, перенос, редкие траты, раскладка, платежи в календаре ── */
.period-chip { margin: 2px 0 12px; }
.day-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin: 10px 0; }
.day-grid button { height: 40px; border-radius: 12px; background: var(--s2); font: 600 15px var(--f-body); color: var(--text); }
.day-grid button.on { background: var(--accent); color: var(--on-accent); }
.goal.fund .goal-t small + small { margin-top: 2px; }
.goal.fund .meter.thin { margin: 0 0 6px 52px; }
.inp-cur > .cur-in { position: absolute; right: 6px; padding: 6px 8px; border-radius: 10px; font: 600 15px var(--f-body); color: var(--muted); }
.sort-list { display: grid; gap: 8px; margin: 12px 0; }
.sort-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border-radius: 14px; background: var(--s2); }
.sort-row > span:first-child { display: grid; gap: 2px; min-width: 0; }
.sort-row small { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sort-row.info { background: transparent; border: 1px dashed var(--line); }
.sort-row .inp-cur.sm { width: 128px; flex: none; }
.sort-row .inp-cur.sm .inp { padding: 8px 10px; }
.sort-free { text-align: center; font-weight: 600; margin: 4px 0 8px; }
.ev.pay .ev-main { flex: 1; min-width: 0; }
.ev.pay > .btn { flex: none; margin-left: 8px; align-self: center; }
.ev.pay.late .ev-t small { color: var(--warn); }
.refund-f .hint { margin-top: 6px; }

/* ── Журнал изменений операции ── */
.tx-log { margin: 14px 0 4px; border-top: 1px solid var(--line); padding-top: 10px; }
.tx-log summary { cursor: pointer; color: var(--muted); font-size: 13px; display: flex; align-items: center; gap: 6px; list-style: none; }
.tx-log summary::-webkit-details-marker { display: none; }
.tx-log ul { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 8px; }
.tx-log li { display: grid; gap: 2px; font-size: 13px; }
.tx-log li small { color: var(--muted); font-size: 11.5px; }

/* ── Задания детям ── */
.kid { display: grid; gap: 10px; }
.kid-top { display: flex; align-items: center; gap: 12px; }
.kid-name { flex: 1; min-width: 0; display: grid; gap: 2px; }
.kid-name small { color: var(--muted); font-size: 12.5px; }
.kid-bal { display: grid; justify-items: end; gap: 2px; }
.kid-bal b { font: 700 18px var(--f-body); }
.kid-bal small { color: var(--muted); font-size: 12.5px; }
.chore-list { display: grid; gap: 6px; }
.chore-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px; border-radius: 14px; background: var(--s2); }
.chore-row.ok { opacity: .72; }
.chore-row.ok .chore-t b { text-decoration: line-through; }
.chore-row > span:first-child { display: flex; align-items: center; gap: 8px; min-width: 0; }
.chore-t { flex: 1; min-width: 0; display: grid; gap: 2px; text-align: left; }
.chore-t small, .chore-row small { color: var(--muted); font-size: 12px; }
.chore-chk { flex: none; width: 36px; height: 36px; border-radius: 12px; border: 1.5px solid var(--line); display: grid; place-items: center; color: var(--muted); }
.chore-chk.on { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.chore-wait { flex: none; font: 600 12px var(--f-body); color: var(--accent); padding: 6px 10px; border-radius: 99px; border: 1px dashed color-mix(in srgb, var(--accent) 60%, transparent); background: color-mix(in srgb, var(--accent) 8%, transparent); }
.chore-row .row-btns { flex: none; gap: 6px; }
.chore-more summary { cursor: pointer; color: var(--muted); font-size: 13px; margin: 2px 0 6px; }
.chore-more .link-row { width: 100%; margin-top: 6px; }
.chores-wait .chore-row { flex-wrap: wrap; }
.chips.wd { margin-top: 8px; }
.reward-list { display: grid; gap: 6px; }
.reward { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; padding: 10px 12px; border-radius: 14px; background: var(--s2); text-align: left; }
.reward.off { opacity: .55; }
.reward small { color: var(--muted); font-size: 12px; }
.chore-mini { display: grid; gap: 8px; }
.cm { display: grid; gap: 6px; }
.cm > span { display: flex; align-items: center; gap: 8px; }
.cm em { font-style: normal; color: var(--muted); font-size: 13px; margin-left: auto; }
.cm-t { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 12px; background: var(--s2); text-align: left; font-size: 14px; }
.cm small { color: var(--muted); font-size: 12px; }
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 99; }
.confetti i { position: absolute; left: 50%; bottom: 30%; font-style: normal; font-size: 22px; animation: kw-pop var(--d) cubic-bezier(.2, .8, .2, 1) forwards; }
@keyframes kw-pop { from { transform: translate(-50%, 0) scale(.4); opacity: 1; } to { transform: translate(calc(-50% + var(--x)), -55vh) rotate(var(--r)) scale(1); opacity: 0; } }

/* ── Документы: скан и поездка ── */
.doc-tools { margin: 10px 0 8px; flex-wrap: wrap; }
.doc-tools .btn { white-space: nowrap; }
.doc-tools label.btn { cursor: pointer; }
.spinner { width: 34px; height: 34px; margin: 14px auto; border-radius: 50%; border: 3px solid var(--s3); border-top-color: var(--accent); animation: kw-spin .9s linear infinite; }
@keyframes kw-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 3s; } }
.trip-panel { display: grid; gap: 10px; }
.trip-who { padding: 10px 12px; border-radius: 14px; background: var(--s2); display: grid; gap: 6px; border-left: 3px solid #63D297; color: var(--text); }
.trip-who.tw-warn { border-left-color: var(--accent); }
.trip-who.tw-bad { border-left-color: var(--warn); }
.trip-who > b { display: flex; align-items: center; gap: 6px; }
.trip-row { display: grid; gap: 1px; }
.trip-row small { color: var(--muted); font-size: 12px; }
.trip-row.tr-bad small { color: var(--warn); }
.trip-row.tr-warn small { color: var(--accent); }

/* ── «Перешли или сфоткай» ── */
.ib-import { margin: 4px 0 2px; flex-wrap: wrap; }
.ib-import .btn, .ev-draft .row-btns .btn { white-space: nowrap; }
.ev-draft .row-btns { flex-wrap: wrap; }
.ib-import label.btn { cursor: pointer; }
.ib.ev-draft { border-left: 3px solid var(--accent); }
.ib .ib-title { font: 600 16px/1.3 var(--f-body); }

/* ── Переезд ── */
.move-step { margin: 14px 0; padding: 14px; border-radius: 16px; background: var(--s2); display: grid; gap: 8px; }
.move-step.focus { outline: 2px solid var(--accent); }
.move-step h3 { margin: 0; font: 600 15px var(--f-body); display: flex; align-items: center; gap: 8px; }
.move-step label.btn { cursor: pointer; }
.move-link { display: flex; align-items: center; gap: 6px; margin: 10px 4px; color: var(--muted); font-size: 13px; }

/* Половинный блок документов: статус под названием, чтобы название не сжималось в букву */
.w.half .dm { display: grid; grid-template-columns: auto 1fr; column-gap: 8px; row-gap: 0; }
.w.half .dm em { grid-column: 2; }
.kid .row-btns:empty { display: none; }

/* ── Прогноз остатка ───────────────────────────────────────── */
.fc { display: grid; gap: 2px; cursor: pointer; }
.fc-h { font: 400 22px/1.2 var(--f-display); }
.fc.neg .fc-h { color: var(--warn); }
.fc small { color: var(--muted); font-size: 13px; }
.spark { width: 100%; height: 72px; margin-top: 10px; overflow: visible; }
.fc.big .spark { height: 120px; }
.spark .ln { fill: none; stroke: var(--accent); stroke-width: 2; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.spark .ln.neg { stroke: var(--warn); }
.spark .zero { stroke: var(--line); stroke-width: 1; stroke-dasharray: 3 4; vector-effect: non-scaling-stroke; }
.spark circle.in { fill: var(--inc); }
.spark circle.out { fill: var(--muted); }
.fc-axis { display: flex; justify-content: space-between; margin-top: 4px; font: 500 11px var(--f-mono); color: var(--faint); }
.fc-how, .fc-pays { padding: 10px 14px; display: grid; gap: 8px; margin-top: 12px; }
.fc-how .ib-row span, .fc-pays .ib-row span { color: var(--muted); }
.fc-pays em.warn { font-style: normal; color: var(--warn); font-size: 12px; }

/* ── Помощник заметил ──────────────────────────────────────── */
.ins-list { display: grid; gap: 10px; }
.ins { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border-radius: 16px; background: var(--s2); border: 1px solid var(--line); }
.ins-ico { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent); }
.ins-dup .ins-ico, .ins-growth .ins-ico { background: color-mix(in srgb, var(--warn) 16%, transparent); color: var(--warn); }
.ins-t { flex: 1; min-width: 0; display: grid; gap: 4px; }
.ins-t b { font-weight: 600; }
.ins-t small { color: var(--muted); font-size: 13px; line-height: 1.4; }
.ins-t .row-btns { margin-top: 6px; }

/* ── Карточка участника и ссылки для людей без приложения ──── */
.pf-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 10px; }
.pf-f { display: grid; gap: 4px; font-size: 13px; color: var(--muted); }
.pf-health { color: #F07A6A; }
.pf-link { display: flex; align-items: center; gap: 6px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.pf-link span { flex: 1; min-width: 0; }
.pf-open { margin-top: 6px; }
.ask-box { padding: 12px; border-radius: 14px; background: var(--s2); border: 1px solid var(--line); }
.ask-st { margin: 4px 0 8px; font-weight: 600; }
.ask-st.take { color: var(--inc); }
.ask-st.decline { color: var(--warn); }
.ask-st.wait { color: var(--muted); font-weight: 500; }
.gift-list { display: grid; gap: 6px; margin: 6px 0 10px; }
.gift-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 14px; }
.gift-row span { display: grid; min-width: 0; }
.gift-row small { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gift-row em { font-style: normal; color: var(--inc); font-size: 12px; }
.link-box code, .mcp-url { word-break: break-all; font-size: 12px; }
.mcp-list { padding: 8px 14px; display: grid; gap: 6px; }
.mcp-list .ib-row span { white-space: normal; color: var(--muted); }


/* ── Изи поверх всех экранов (js/izi3d.js) ──────────────────── */
.izi-float { position: fixed; z-index: 30; width: 96px; height: 96px; right: max(0px, calc(50vw - 270px)); bottom: calc(var(--tab-h) + var(--safe-b) + 80px);
  pointer-events: none; user-select: none; display: grid; place-items: center; }
.izi-float > * { grid-area: 1 / 1; }
.izi-float .izi-hit { pointer-events: auto; width: 62px; height: 78px; margin-top: 4px; border-radius: 40%; touch-action: none; cursor: pointer; -webkit-tap-highlight-color: transparent; z-index: 1; }
.izi-float canvas { display: block; width: 120px; height: 120px; margin: -12px; }   /* шире своего места: в жесте кисть выходит за него */
.izi-float:focus-within { outline: none; }
.izi-float .izi-hit:focus-visible { outline: 2px solid var(--accent); }
.izi-float.drag .izi-hit { cursor: grabbing; }
.izi-float { transition: transform .25s ease; }
.izi-float.drag { transition: none; }
/* На экране Изи своя строка ввода: «+» стоял бы прямо на кнопке «Отправить» */
body[data-route="assist"] .fab { display: none; }
.onb-mode .izi-float, .izi-float[hidden] { display: none; }

/* ── Первый экран: варианты темы ────────────────────────────── */
.onb-var-row { display: flex; gap: 6px; margin: -6px 0 18px; }   /* три варианта — всегда одной строкой */
.onb-var { flex: 0 1 auto; min-width: 0; display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 11px 0 5px; border-radius: 999px; border: 1px solid var(--line); background: var(--s1); color: var(--muted); font: 500 13px/1 var(--f-body); }
.onb-var span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.onb-var i { flex: none; width: 22px; height: 22px; border-radius: 50%; background: radial-gradient(circle at 70% 70%, var(--sa) 0 34%, transparent 36%), var(--sw); border: 1px solid color-mix(in srgb, var(--text) 18%, transparent); }
@media (max-width: 370px) { .onb-var { gap: 5px; padding-right: 9px; font-size: 12.5px; } .onb-var i { width: 20px; height: 20px; } }
@media (max-width: 350px) { .onb-var-row { gap: 4px; } .onb-var { gap: 4px; padding: 0 7px 0 4px; font-size: 12px; } .onb-var i { width: 18px; height: 18px; } }
.onb-var.on { border-color: var(--accent); color: var(--text); box-shadow: 0 0 0 1px var(--accent) inset; }
.theme-group { margin: 4px 0 6px; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.theme-group ~ .theme-group { margin-top: 14px; }

/* ── Реплика над Изи (js/izi3d.js, iziSay) ──────────────────── */
.izi-say { position: absolute; bottom: calc(100% - 8px); right: 4px; width: max-content; max-width: min(250px, 72vw); padding: 9px 13px;
  border-radius: 16px 16px 4px 16px; background: var(--s2); color: var(--text); border: 1px solid var(--line); box-shadow: var(--shadow);
  font: 500 14px/1.35 var(--f-body); pointer-events: none; opacity: 0; visibility: hidden; transform: translateY(6px) scale(.96); transform-origin: bottom right; transition: opacity .2s, transform .2s, visibility .2s; }
.izi-say.on { opacity: 1; visibility: visible; transform: none; }
.izi-say.left { right: auto; left: 4px; border-radius: 16px 16px 16px 4px; transform-origin: bottom left; }

/* ── «Семья+» (js/screens/plus.js) ──────────────────────────── */
.plus-hero { display: flex; align-items: center; gap: 14px; }
.plus-hero b { font-size: 17px; }
.plus-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.plus-list li { display: flex; align-items: center; gap: 10px; }
.plus-links { display: flex; justify-content: center; gap: 24px; margin: 18px 0 0; font-size: 14px; }   /* закрыто подпиской: куда ещё можно */
.plus-links a { color: var(--muted); text-decoration: none; padding: 8px 4px; }
.plus-list li .ic { color: var(--accent); flex: none; }
.plus-list.free li .ic { color: var(--inc); }
/* «Год» — наклейка «2 месяца в подарок» (Саша 14.11.2026: крупно, красочно, по диагонали, с выходом за пределы): наискосок
   над правым краем переключателя, вылезает за него вправо и вверх; «Год» под ней остаётся виден. Появляется с лёгким покачиванием,
   по ней изредка пробегает блик */
.plus-period { margin-top: 36px; }
.plus-period button { position: relative; }
.plus-gift { position: absolute; right: -12px; top: -24px; z-index: 2; display: inline-flex; align-items: center; gap: 6px; padding: 7px 13px 7px 9px;
  border-radius: 13px; border: 2px solid #fff; overflow: hidden; white-space: nowrap; pointer-events: none;
  font: 800 16px/1 var(--f-body); letter-spacing: .005em; color: #fff; text-shadow: 0 1px 2px rgb(140 30 0 / .35);
  background: linear-gradient(115deg, #FF3D7F 0%, #FF7A45 52%, #FFC23D 100%);
  box-shadow: 0 8px 18px rgb(255 80 70 / .36), 0 2px 5px rgb(0 0 0 / .14);
  transform: rotate(7deg); transform-origin: 60% 50%; animation: gift-in .7s cubic-bezier(.3, 1.5, .5, 1) .15s both; }
.plus-gift img { width: 22px; height: 22px; margin: -5px 0; filter: drop-shadow(0 2px 2px rgb(120 20 0 / .35)); }
.plus-gift b { font: inherit; }
.plus-gift::after { content: ''; position: absolute; inset: -2px auto -2px -40%; width: 30%; transform: skewX(-20deg);
  background: linear-gradient(90deg, transparent, rgb(255 255 255 / .55), transparent); animation: gift-shine 4.5s ease-in-out 1.2s infinite; }
@keyframes gift-in { from { opacity: 0; transform: rotate(-8deg) scale(.55); } 70% { opacity: 1; transform: rotate(10deg) scale(1.05); } to { opacity: 1; transform: rotate(7deg) scale(1); } }
@keyframes gift-shine { 0%, 72% { left: -40%; } 100% { left: 120%; } }
@media (max-width: 374px) { .plus-gift { font-size: 14.5px; } }
@media (max-width: 359px) { .plus-gift { font-size: 13.5px; right: -8px; padding: 6px 10px 6px 7px; } .plus-gift img { width: 19px; height: 19px; } }
.plus-plans { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 18px 0 12px; }
.plus-plan { position: relative; display: flex; flex-direction: column; gap: 4px; align-items: flex-start; text-align: left; padding: 14px 12px; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--s1); color: var(--text); }
.plus-plan b { font: 600 22px/1.1 var(--f-body); }
.plus-plan .plus-name { font-weight: 600; }
.plus-plan em { margin-top: 6px; font-style: normal; font-size: 12.5px; line-height: 1.35; color: var(--text); }
.plus-plan small { color: var(--muted); font-size: 12px; line-height: 1.3; }
.plus-plan.best { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.plus-tag { position: absolute; top: -9px; right: 10px; padding: 2px 8px; border-radius: 999px; background: var(--accent); color: var(--on-accent) !important; font-weight: 600; }

/* ── Поездки с друзьями: вкладка, полоса сверху, список ── */
.tab-space { background: none; border: 0; font: inherit; font-size: 11px; font-weight: 600; color: var(--faint); min-width: 0; }
.tab-space span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Подпись в нижнем меню: не влезла (360 и уже, рядом «+») — второй строкой, а не «Дневник д…» */
.tab span { max-width: 100%; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.08; text-align: center; }
.tab-emo, .trip-emo { font-style: normal; font-size: 19px; line-height: 22px; }
.trip-emo { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; background: var(--s2); font-size: 21px; flex: none; }
.trip-bar { background: color-mix(in srgb, var(--accent) 18%, var(--s1)); }
.trip-bar span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trip-bar span > .ic { display: inline-block; vertical-align: -3px; margin-right: 2px; }
.demo-bar button.trip-edit { padding: 4px; margin-right: auto; background: none; color: var(--muted); }
.trips .row-btns { margin-top: 10px; }
.trip-emojis { margin: 4px 0 6px; }
.trip-emojis .chip { font-size: 18px; padding: 6px 10px; }

/* Изи на главной — коротко: строка и поле (подсказки сменяются в поле) */
.ai-row { display: flex; align-items: center; gap: 8px; margin: -4px 0 10px; }
.ai-row .ai-izi { margin: -6px -2px -6px -4px; }
.ai-row .ai-t { flex: 1; min-width: 0; font-weight: 650; font-size: 15px; line-height: 1.25; }
.w-assist .msg-in .inp::placeholder { transition: opacity .3s; }

/* Шапка главной: знак и слово AllWallet */
.home-top .brand { display: flex; align-items: center; gap: 9px; margin: 2px 0 0; line-height: 1; }
.home-top .brand-mark { flex: none; }
.home-top .brand-word { display: block; height: 22px; width: auto; }

/* «Я · Семья · группы · +»: когда групп много — листается вбок */
.scope .sc-add { position: sticky; right: 0; background: var(--s1); flex: 0 0 auto !important; width: clamp(22px, 6.7vw, 26px); padding: 7px 0 !important; color: var(--faint); }   /* вкладок больше, чем влезает: «+» всегда виден */
.scope .sc-emo { font-style: normal; font-size: 15px; }

/* План трат */
.plan-sum .ps-row, .mn-total .ps-row { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 4px 0; color: var(--muted); }
.plan-sum .ps-row b, .mn-total .ps-row b { color: var(--text); font-weight: 650; }
.plan-sum .ps-row.big, .mn-total .ps-row.big { font-size: 17px; padding-top: 8px; margin-top: 4px; border-top: 1px dashed var(--line); }
.plan-sum .ps-row.big b, .mn-total .ps-row.big b { font-size: 20px; }
.ps-row.warn b { color: var(--warn, #F07A6A); }
.plan-day { margin: 8px 0 0; font-size: 13px; color: var(--muted); }
.plan-list { display: flex; flex-direction: column; gap: 2px; }
.plan-row { display: flex; align-items: center; gap: 11px; padding: 9px 2px; text-align: left; border-bottom: 1px solid var(--line); }
.plan-row:last-of-type { border-bottom: 0; }
.plan-dot { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: var(--s2); color: var(--muted); flex: none; }
.plan-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.plan-t b { font-weight: 600; }
.plan-t small { color: var(--muted); font-size: 12.5px; }
.plan-v { font-weight: 650; white-space: nowrap; }
.meter.thin { height: 5px; margin-top: 4px; }
.plan-tpl { margin-bottom: 10px; }

/* Денежное свидание */
.md-who { display: flex; align-items: center; gap: 6px; margin: -4px 0 10px; flex-wrap: wrap; }
.md-who > span { position: relative; opacity: .55; }
.md-who > span.done { opacity: 1; }
.md-who > span .ic { position: absolute; right: -4px; bottom: -3px; background: var(--accent); color: var(--on-accent); border-radius: 50%; padding: 1px; }
.md-who small { color: var(--muted); font-size: 12.5px; margin-left: 4px; }
.md-dots { display: flex; gap: 6px; justify-content: center; margin: 4px 0 12px; }
.md-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--line); }
.md-dots i.past { background: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.md-dots i.on { background: var(--accent); width: 20px; border-radius: 4px; }
.md-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.md-head b { flex: 1; font-size: 17px; }
.md-izi { flex: none; margin: -6px -2px; }
.md-big b { display: block; font-family: var(--f-display); font-size: 40px; line-height: 1.05; }
.md-big span { color: var(--muted); font-size: 13px; }
.md-cmp { margin: 8px 0; font-weight: 600; }
.md-cmp.warn { color: var(--warn, #F07A6A); }
.md-cmp.good { color: var(--good, #63D297); }
.md-list, .md-goals, .md-hist { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.md-list li, .md-hist li { display: flex; justify-content: space-between; gap: 10px; }
.md-list li span, .md-hist li span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.md-list small, .md-hist small { color: var(--muted); }
.md-goals li { display: flex; flex-direction: column; gap: 3px; }
.md-goals small { display: block; color: var(--muted); font-size: 12.5px; }
.md-last, .md-ins { margin: 10px 0 0; padding: 8px 10px; border-radius: 12px; background: var(--s2); font-size: 13.5px; }
.md-last p { margin: 0; }
.md-last.good { background: color-mix(in srgb, var(--inc) 12%, var(--s2)); }
.md-last.warn { background: color-mix(in srgb, var(--warn) 11%, var(--s2)); }
.md-res { margin-top: 6px !important; font-weight: 600; }
.md-res-b { margin-top: 8px; }
/* Свидание 24.11.2026: день недели у дел, лимиты у края, движения по копилке и долгам */
.md-list li span { display: inline-flex; align-items: baseline; gap: 6px; }
.md-list li span:has(.md-day) { flex-direction: column; align-items: flex-start; gap: 1px; white-space: normal; }
.md-day { display: block; font-size: 12px; color: var(--muted); }
.md-when { flex: none; text-align: right; font-size: 12.5px; }
.md-list li.near b { color: var(--warn); }
.md-lims { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.md-lims li > span:first-child { display: flex; flex-direction: column; gap: 2px; }
.md-lims small { color: var(--muted); font-size: 12.5px; }
.md-lims li.near small, .md-lims li.over small { color: var(--warn); }
.md-sub { margin: 14px 0 0; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; }
.md-ideas { margin: 8px 0; }
.md-nav { margin-top: 12px; }
.md-intro { text-align: center; }
.md-intro .ticks { text-align: left; }
.md-intro .md-days { justify-content: center; margin-bottom: 8px; }
.md-banner { display: flex; align-items: center; gap: 10px; color: var(--text); }
.md-banner span:nth-child(2) { flex: 1; display: flex; flex-direction: column; }
.md-banner small { color: var(--muted); font-size: 12.5px; }

/* Меню на неделю */
.mn-pref-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.stepper { display: inline-flex; align-items: center; gap: 6px; }
.stepper b { min-width: 22px; text-align: center; }
.stepper .icon-btn { width: 32px; height: 32px; font-size: 18px; }
.mn-prefs .chips { margin-bottom: 6px; }
.mn-week { display: flex; flex-direction: column; gap: 2px; padding-top: 6px; padding-bottom: 6px; }
.mn-day { display: flex; gap: 10px; align-items: flex-start; padding: 7px 0; border-bottom: 1px solid var(--line); }
.mn-day:last-child { border-bottom: 0; }
.mn-day.today .mn-dow b { color: var(--accent); }
.mn-dow { width: 30px; flex: none; display: flex; flex-direction: column; align-items: center; padding-top: 4px; }
.mn-dow small { color: var(--faint); font-size: 11px; }
.mn-slots { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.mn-slot { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 12px; background: var(--s2); text-align: left; font-size: 14px; }
.mn-slot span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mn-slot small { color: var(--muted); font-size: 12px; flex: none; }
.mn-slot.empty { background: none; border: 1px dashed var(--line); color: var(--faint); }
.mn-dishes { display: flex; flex-direction: column; gap: 4px; margin: 10px 0; }
.mn-dish { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 10px; border-radius: 12px; background: var(--s2); text-align: left; }
.mn-dish span { display: flex; flex-direction: column; }
.mn-dish small { color: var(--warn, #F07A6A); font-size: 12px; }
.mn-dish.no { opacity: .6; }
.mn-dish.on { outline: 2px solid var(--accent); }

/* Календарь по макету (10.11.2026): месяц стрелками-кружками и «сеткой / списком»; в дне — номер и плашки со значком;
   сегодня — неоновая рамка и залитый номер; ниже — выбранный день (время плашкой, значок по смыслу) и темы-фильтр */
.cal-nav { gap: 6px; }
.cal-nav .icon-btn.round { flex: none; width: 38px; height: 38px; color: var(--accent); }
.mn-title { flex: 1; min-width: 0; display: inline-flex; align-items: center; justify-content: center; gap: 3px; padding: 8px 0; background: none; border: 0; color: var(--text); }
.mn-title b { font: 700 clamp(14.5px, 4.15vw, 18px)/1.1 var(--f-body); letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mn-title .ic { flex: none; color: var(--accent); }
.cal-view { flex: none; display: flex; gap: 2px; padding: 3px; margin-left: 2px; border-radius: 999px; background: var(--s1); border: 1px solid var(--line); }
.cal-view button { width: 36px; height: 34px; display: grid; place-items: center; border-radius: 999px; color: var(--muted); transition: background .2s, color .2s; }
.cal-view button.on { background: var(--accent); color: var(--on-accent); box-shadow: 0 0 10px color-mix(in srgb, var(--accent) 55%, transparent); }

.card.cal { padding: 8px 4px 6px; }
.cal-grid { gap: 2px; }
.cal-head b.sat, .cal-cell.sat .cd-n { color: #5B8DEF; }
.cal-head b.sun, .cal-cell.sun .cd-n { color: #E5484D; }
.cal-cell { aspect-ratio: auto; min-height: 58px; padding: 4px 1px 5px; gap: 3px; align-items: stretch; justify-content: flex-start; border-radius: 10px; min-width: 0; overflow: hidden; }
.cal-cell.out { opacity: .38; }
.cal-cell.sel { background: var(--s2); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--text) 55%, transparent); font-weight: inherit; }
.cal-cell.today, .cal-cell.today.sel { box-shadow: inset 0 0 0 1.5px var(--accent), 0 0 12px color-mix(in srgb, var(--accent) 45%, transparent); }
.cal-cell .cd-n { align-self: center; min-width: 24px; padding: 0 4px; border-radius: 8px; font-size: 13.5px; font-weight: 600; line-height: 22px; text-align: center; }
.cal-cell.today .cd-n { background: var(--accent); color: var(--on-accent); box-shadow: 0 0 10px color-mix(in srgb, var(--accent) 65%, transparent); }
.cd-ev { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cd-ev i { font-style: normal; display: flex; align-items: center; gap: 2px; min-width: 0; padding: 2px 3px 2px 2px; border-radius: 6px; background: var(--c); color: var(--ink); font-size: 9px; font-weight: 650; letter-spacing: -.01em; line-height: 1.3; text-align: left; }
.cd-ev i .ic { flex: none; stroke-width: 2.2; }
.cd-ev i span { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cd-ev i b { flex: none; font-weight: 800; letter-spacing: -.03em; }
/* у события со временем — две строки: время, под ним название (иначе от названия остаётся буква) */
.cd-ev i.tm { flex-wrap: wrap; }
.cd-ev i.tm span { flex-basis: 100%; }
.cd-ev small { font-size: 10px; color: var(--muted); text-align: center; line-height: 1; }

.cal-day .w-title { font-size: 16px; color: var(--text); }
.cal-day .w-title > span:first-child { flex-wrap: wrap; }
.cal-all { flex: none; display: inline-flex; align-items: center; gap: 2px; font-size: 14px; font-weight: 600; text-decoration: none; }
.ev.ev-cal .ev-main { gap: 10px; padding: 9px 8px; }
.ev .ev-time.pill { flex: 0 0 auto; min-width: 56px; padding: 7px 8px; border-radius: 10px; text-align: center; white-space: nowrap; background: color-mix(in srgb, var(--c) 24%, var(--s2)); color: var(--text); font: 600 13px/1 var(--f-body); }
.ev .ev-ic { flex: none; display: grid; place-items: center; color: var(--c); }
.card.cal.is-list { padding: 12px 12px 14px; }
/* Неделя: полоска из семи дней (сегодня — неон, выбранный — рамка, точки — события), под ней дни по порядку */
.card.cal.is-week { padding: 10px 10px 12px; }
.wk-strip { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; margin-bottom: 4px; }
.wk-d { display: grid; justify-items: center; gap: 3px; padding: 7px 0 6px; border-radius: 14px; background: var(--s2); color: var(--text); }
.wk-d small { font: 500 10px var(--f-mono); color: var(--faint); text-transform: uppercase; }
.wk-d b { min-width: 28px; padding: 0 3px; border-radius: 9px; font-size: 15px; font-weight: 650; line-height: 26px; text-align: center; }
.wk-d.sat b { color: #5B8DEF; }
.wk-d.sun b { color: #E5484D; }
.wk-d.sel { box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--text) 55%, transparent); }
.wk-d.today { box-shadow: inset 0 0 0 1.5px var(--accent), 0 0 12px color-mix(in srgb, var(--accent) 45%, transparent); }
.wk-d.today b { background: var(--accent); color: var(--on-accent); box-shadow: 0 0 10px color-mix(in srgb, var(--accent) 60%, transparent); }
.wk-dots { display: flex; gap: 3px; height: 6px; }
.wk-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--c); }
.wk-day { scroll-margin-top: 90px; }
.wk-day .ev-day { margin: 14px 2px 6px; }
.wk-free { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 12px; border: 1px dashed var(--line); background: none; color: var(--muted); font-size: 13px; }
.card.cal.is-list .ev-day:first-child { margin-top: 0; }
.ev-day.now { color: var(--accent); }

/* Темы под календарём: «Все · Семья · Дела · Учёба…» — выбранная неоновая; полоса прокручивается, свечению оставлен отступ */
.cal-topics { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 4px -16px -6px; padding: 10px 16px; }
.cal-topics::-webkit-scrollbar { display: none; }
.cal-topics button { flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 0 14px; border-radius: 999px; background: var(--s1); border: 1px solid var(--line); color: var(--text); font-weight: 600; font-size: 14px; white-space: nowrap; }
.cal-topics button .ic { color: var(--accent); }
.cal-topics button.on { background: var(--accent); border-color: transparent; color: var(--on-accent); box-shadow: 0 0 10px color-mix(in srgb, var(--accent) 55%, transparent); }
.cal-topics button.on .ic { color: inherit; }

/* Выбор месяца: год стрелками, месяцы сеткой 3×4 */
.mp-year { display: flex; align-items: center; justify-content: space-between; margin: 4px 0 14px; }
.mp-year b { font: 700 20px/1 var(--f-body); }
.mp-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding-bottom: 6px; }
.mp-grid button { min-height: 46px; border-radius: 14px; background: var(--s2); border: 1px solid var(--line); font-weight: 600; font-size: 14.5px; color: var(--text); }
.mp-grid button.now { border-color: var(--accent); }
.mp-grid button.on { background: var(--accent); border-color: transparent; color: var(--on-accent); box-shadow: 0 0 10px color-mix(in srgb, var(--accent) 50%, transparent); }

/* ── Аналитика: траты по дням (теплокарта) ──────────────────────────────────── */
/* Аналитика → «По дням» (решение 05.11.2026): расходы — все дни жёлтые, три самых крупных красные; доходы — все дни светло-зелёные, три самых крупных тёмно-зелёные */
.heat-card { --h0: color-mix(in srgb, #F2C94C 30%, var(--s2)); --t1: #D93F36; --t2: #D93F36; --t3: #D93F36; }
.heat-card.inc { --h0: color-mix(in srgb, #4CC38A 28%, var(--s2)); --t1: #12734C; --t2: #12734C; --t3: #12734C; }
.heat-seg { margin: 2px 0 12px; }
.heat-head, .heat { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.heat-head b { font: 500 10px var(--f-mono); color: var(--faint); text-align: center; text-transform: uppercase; margin-bottom: 4px; }
.heat-head b.we { color: var(--muted); }
.heat .hd { position: relative; aspect-ratio: 1 / 1.08; border-radius: 10px; background: var(--h0); color: var(--text); display: flex; flex-direction: column; justify-content: space-between; align-items: flex-start; padding: 5px 6px; min-width: 0; border: 0; font: inherit; }
.heat .hd b { font: 500 10px var(--f-mono); color: var(--muted); }
.heat .hd span { font: 650 12px/1 var(--f-mono); letter-spacing: -.02em; align-self: flex-end; }
.heat .hd.t1 { background: var(--t1); color: #fff; }
.heat .hd.t2 { background: var(--t2); color: #fff; }
.heat .hd.t3 { background: var(--t3); color: #fff; }
.heat .hd.t1 b, .heat .hd.t2 b, .heat .hd.t3 b { color: rgba(255, 255, 255, .85); }
.heat .hd .rk { position: absolute; top: 4px; right: 5px; font: 700 9px var(--f-mono); font-style: normal; opacity: .8; }
.heat .hd.now { box-shadow: inset 0 0 0 1.5px var(--text); }
.heat .hd.fut { opacity: .35; }
.heat-key { display: inline-flex; align-items: center; gap: 3px; font-size: 11px; color: var(--muted); }
.heat-key i { width: 10px; height: 10px; border-radius: 3px; }
.heat-key i.t1 { background: var(--t1); margin-left: 5px; }
.heat-key i.t2 { background: var(--t2); }
.heat-key i.t3 { background: var(--t3); }
.heat-note { margin: 10px 2px 0; }

/* Календарь: месяц, пролистанный пальцем, въезжает с той стороны, куда листали */
.cal-grid.slide-next { animation: cal-in-next .22s ease-out; }
.cal-grid.slide-prev { animation: cal-in-prev .22s ease-out; }
@keyframes cal-in-next { from { transform: translateX(28px); opacity: .25; } to { transform: none; opacity: 1; } }
@keyframes cal-in-prev { from { transform: translateX(-28px); opacity: .25; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .cal-grid.slide-next, .cal-grid.slide-prev { animation: none; } }
.card.cal { touch-action: pan-y; }

/* Вход: ссылки на условия и политику — главной страницы больше нет, они здесь */
.onb-legal { margin-top: 10px; }
.onb-mail { margin-top: 10px; }
.onb-mail label { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; color: var(--muted); }
.onb-mail input { width: 14px; height: 14px; margin: 0; accent-color: var(--accent); }
/* Колокольчик «Новое от семьи» (js/feed.js): число непросмотренного и список по дням */
.icon-btn.bell { position: relative; }
.bell-n { position: absolute; top: 1px; right: 1px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: var(--warn); color: #fff; font: 700 10px/17px var(--f-mono); font-style: normal; text-align: center; box-shadow: 0 0 0 2px var(--bg); }
.feed-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.feed-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; background: var(--s1); border: 1px solid var(--line); color: var(--text); text-align: left; font: inherit; cursor: pointer; }
.feed-row.new { border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); background: color-mix(in srgb, var(--accent) 8%, var(--s1)); }
.feed-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.feed-t small { color: var(--muted); font-size: 12px; }
.feed-t b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feed-side { font: 600 13px var(--f-mono); white-space: nowrap; }
.feed-side.inc { color: var(--inc); }
.feed-ico { width: 32px; height: 32px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--s2); }
/* Долгое нажатие (data-hold): без системного меню и выделения текста на iPhone */
[data-hold] { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
/* Значок на экране телефона: тёмный или светлый (js/install.js) */
.icon-pick { display: flex; gap: 10px; margin: 6px 0 14px; }
.icon-pick button { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 8px; border-radius: 16px; border: 2px solid var(--line); background: var(--s1); color: var(--text); font: inherit; font-size: 13px; cursor: pointer; }
.icon-pick button.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, var(--s1)); font-weight: 600; }
.icon-pick img { width: 56px; height: 56px; display: block; }
.set-icon { padding: 12px 14px 2px; border-top: 1px solid var(--line); }
.set-icon > span { display: block; font-size: 13px; color: var(--muted); }
.onb-legal a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }

/* Изи уточняет: вопрос и варианты кнопками (js/izido.js choose) */
.izi-ask { margin: 0 0 14px; font-size: 16px; line-height: 1.4; }
.izi-opts { display: grid; gap: 10px; }
.izi-opt { justify-content: flex-start; text-align: left; white-space: normal; }
.onb-hook { display: block; margin-bottom: 6px; color: var(--text); font-weight: 650; }
.cur-pick { display: flex; align-items: center; gap: 8px; text-align: left; cursor: pointer; }
.cur-pick b { min-width: 1.4em; }
.cur-pick span { margin-left: auto; color: var(--muted); }

/* ── Погода в календаре (weather.js): события бледнеют, в дне — значок и температура днём / ночью; ниже — подробно ── */
.cal-tools { display: flex; align-items: center; justify-content: flex-end; gap: 12px; margin: -2px 2px 8px; }
.wx-toggle { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--s1); color: var(--text); font: inherit; font-size: 14px; cursor: pointer; }
.wx-toggle.on { background: var(--accent); color: var(--on-accent); border-color: transparent; }
.cal.wx .cd-ev { opacity: .28; }
.cal.wx .cal-cell.has, .cal.wx .cal-cell.sel.has { background: color-mix(in srgb, var(--tint) 7%, var(--s2)); }
.cd-wx { display: flex; flex-direction: column; align-items: center; line-height: 1.05; }
.cd-wx i { font-style: normal; font-size: 16px; line-height: 1.1; }
.cd-wx b { font-size: 11.5px; font-weight: 650; }
.cd-wx small { font-size: 10.5px; color: var(--muted); }
.wx-main { display: flex; align-items: center; gap: 12px; margin: 4px 0 10px; }
.wx-big { font-size: 40px; line-height: 1; }
.wx-main b { display: block; font-size: 17px; }
.wx-main small { color: var(--muted); }
.wx-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 14px; margin: 0 0 6px; }
.wx-grid dt { font-size: 12px; color: var(--muted); }
.wx-grid dd { margin: 0; font-weight: 600; }
.wx-src { font-size: 11.5px; }
.wx-src a { color: inherit; }


/* Аренда и бизнес: операции по дням, клиенты, записи с фото — строка: галочка, знак, кто и за что, сумма */
.obj-day + .obj-day { margin-top: 12px; }
.obj-day .day-h { padding: 0 2px 6px; }
.obj-clients li > span { min-width: 0; }
.obj-clients li > span small { display: block; font-size: 12px; }
.led-day { margin: 6px 0 16px; }
.led-row { display: grid; grid-template-columns: 22px 32px minmax(0, 1fr) 118px; align-items: center; gap: 8px; padding: 7px 0; border-top: 1px solid var(--line); }
.led-row.off { opacity: .45; }
.led-row input[type=checkbox] { width: 20px; height: 20px; margin: 0; accent-color: var(--accent); }
.led-sign { width: 32px; height: 32px; border-radius: 50%; border: 0; background: var(--s2); color: var(--text); font: 700 18px/1 var(--f-body); cursor: pointer; }
.led-sign.income { color: var(--inc); }
.led-t { min-width: 0; display: flex; flex-direction: column; }
.led-t b, .led-t small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.led-t b { font-weight: 600; }
.led-t b::first-letter { text-transform: uppercase; }
.led-t small { font-size: 12px; color: var(--muted); }
.led-amt .inp { padding: 8px 28px 8px 10px; text-align: right; }
.led-amt > span { right: 10px; }
/* Записи с фото: фото страниц над строками (нажатие — крупно), итог из тетради, «?» у неуверенных строк, «уже есть», «в долг» */
.led-pics { display: flex; gap: 8px; overflow-x: auto; margin: 0 0 4px; scroll-snap-type: x mandatory; }
.led-pics img { height: 96px; border-radius: 10px; border: 1px solid var(--line); cursor: zoom-in; scroll-snap-align: start; flex: none; }
.led-pics.big img { height: auto; width: 100%; max-height: 70vh; object-fit: contain; cursor: zoom-out; }
.led-pics-hint { margin: 0 0 10px; font-size: 12px; }
.led-sum { margin: 0 0 6px; font-size: 12.5px; padding: 6px 10px; border-radius: 10px; background: var(--s2); }
.led-sum.ok { color: var(--inc); }
.led-sum.warn { color: var(--warn); }
.led-row.unsure { background: color-mix(in srgb, var(--warn) 9%, transparent); border-radius: 10px; }
.led-q { display: inline-grid; place-items: center; width: 17px; height: 17px; border-radius: 50%; background: var(--warn); color: #fff; font: 700 11px/1 var(--f-body); font-style: normal; vertical-align: 1px; }
.led-t small { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; white-space: normal; }
.led-dup { font-style: normal; font-size: 11px; color: var(--muted); border: 1px dashed var(--line); border-radius: 6px; padding: 0 5px; }
.led-owe { border: 1px solid var(--line); background: none; color: var(--muted); border-radius: 999px; padding: 1px 8px; font: 500 11.5px var(--f-body); cursor: pointer; }
.led-owe.on { background: var(--warn); border-color: var(--warn); color: #fff; }
/* Должны: строка — кто, с какого дня, сумма; кнопки под ней. Старше месяца — красным */
.obj-debts li { grid-template-columns: auto minmax(0, 1fr) auto; row-gap: 8px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.obj-debts li:last-child { border-bottom: 0; }
.obj-debts li > span small { display: block; font-size: 12px; }
.obj-debts li > .row-btns { grid-column: 1 / -1; margin: 0; }
.obj-debts li.over > b { color: var(--warn); }
.send-to { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin: 12px 0 8px; }
.send-to .btn { justify-content: center; text-decoration: none; }
.obj-tools { flex-wrap: wrap; }
.obj-tools [data-act=obj-csv] { flex-basis: 100%; order: 3; }
/* Погода дня в окне: лента по часам — листается вбок, у каждого часа значок, температура и вероятность дождя */
.wx-hours { display: flex; gap: 6px; overflow-x: auto; margin: 0 -4px 12px; padding: 2px 4px 6px; scroll-snap-type: x proximity; }
.wx-h { flex: none; width: 52px; display: grid; justify-items: center; gap: 2px; padding: 8px 0; border-radius: 12px; background: var(--s2); scroll-snap-align: start; }
.wx-h i { font-style: normal; font-size: 20px; line-height: 1.2; }
.wx-h b { font-size: 14px; }
.wx-h small { font-size: 11px; color: var(--muted); }
.wx-h .wx-rain { color: var(--accent); min-height: 13px; }
/* Записи клиентов: как «Должны» — строка, под ней кнопки; сделанная — бледнее. Имя клиента и строки «Клиентов» открывают карточку */
.obj-visits li { grid-template-columns: auto minmax(0, 1fr) auto; row-gap: 8px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.obj-visits li:last-child { border-bottom: 0; }
.obj-visits li > .row-btns { grid-column: 1 / -1; margin: 0; }
.obj-visits li.done { opacity: .55; }
.obj-visits li > span small, .obj-clients li > span small { display: block; font-size: 12px; }
.obj-who, .obj-clients li[data-act] { cursor: pointer; }
.visit-all { margin: 2px 0 12px; }
.remind-list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 14px; }
.remind-list li { display: grid; gap: 2px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.remind-list li small { color: var(--muted); font-size: 12px; }
.send-to.compact { grid-template-columns: repeat(4, auto); justify-content: start; gap: 6px; margin: 6px 0 0; }
/* Вкладки переставляются удержанием: без меню «Копировать» на долгом нажатии; поднятая — с тенью */
.scope [data-tab] { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
.scope [data-tab].lift { position: relative; z-index: 1; background: var(--s3); color: var(--text); box-shadow: 0 6px 16px rgba(0, 0, 0, .18); transform: scale(1.05); }
/* Блок «Чек по фото»: вся карточка — кнопка выбора снимка */
.scan-w { display: flex; align-items: center; gap: 12px; cursor: pointer; }
.scan-ic { flex: none; width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: var(--accent); color: var(--on-accent, #fff); }
.scan-t b { display: block; font-size: 16px; }
.scan-t small { color: var(--muted); font-size: 13px; }
/* Лист проверки чека: галочка, что и категория, сумма */
.rc-row { grid-template-columns: 22px minmax(0, 1fr) 118px; }
.rc-cat { margin-top: 6px; padding: 5px 8px; font-size: 13px; min-height: 0; }

/* ── Первый экран по макету (10.11.2026): слово, фраза с жёлтым мазком, пять плиток, три галочки, почта, две кнопки, защита ── */
.onb { position: relative; }
.onb .onb-word { margin: 6px 0 0; }
.onb-head { font: 700 25px/1.25 var(--f-body); letter-spacing: -.01em; color: var(--text); margin: 14px 0 18px; max-width: 18em; }
.swoosh { position: relative; white-space: nowrap; }
.swoosh svg { position: absolute; left: -2%; bottom: -.32em; width: 104%; height: .5em; overflow: visible; }
.swoosh path { fill: none; stroke: #F2A93B; stroke-width: 3.2; stroke-linecap: round; }
.onb-feats { list-style: none; margin: 0 -6px 16px; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.onb-feats li { display: grid; grid-template-columns: minmax(0, 1fr); justify-items: center; align-content: start; gap: 2px; padding: 4px 0 10px; border-radius: 18px; text-align: center;
  background: linear-gradient(160deg, color-mix(in srgb, var(--accent) 6%, var(--s1)), color-mix(in srgb, var(--accent) 18%, var(--s1)));
  border: 1px solid color-mix(in srgb, var(--accent) 14%, transparent); box-shadow: 0 6px 14px color-mix(in srgb, var(--accent) 12%, transparent); }
/* золотой 3D-значок с макета; Изи (последний) чуть выглядывает над плиткой. Отступы сверху и снизу в сумме у всех
   одинаковые (−6px) — подписи плиток на одной линии */
.onb-feats img { display: block; width: min(64px, 100%); height: auto; aspect-ratio: 1; margin: -2px 0 -4px; filter: drop-shadow(0 4px 4px rgb(0 0 0 / .16)); }
.onb-feats li:last-child img { margin: -8px 0 2px; }
/* слова целиком: длинное — мельче шрифтом (main.js, fitFeats); не влезает и так — .hy, перенос по слогам (lang у страницы — язык приложения) */
.onb-feats li span { justify-self: stretch; color: var(--text); font-size: 10.5px; line-height: 1.25; font-weight: 600; letter-spacing: -.02em; -webkit-hyphens: manual; hyphens: manual; overflow-wrap: normal; }
.onb-feats li span.hy { -webkit-hyphens: auto; hyphens: auto; }
.onb-checks { list-style: none; margin: 0 0 18px; padding: 0; display: grid; gap: 8px; }
.onb-checks li { display: flex; align-items: center; gap: 10px; font-size: 15.5px; color: var(--text); }
.onb-checks li svg { flex: none; color: var(--accent); stroke-width: 2.4; }
.inp-ic { position: relative; }
.inp-ic > svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.inp-ic .inp { padding-left: 46px; }
.onb .onb-go { margin-top: 14px; display: flex; align-items: center; justify-content: center; gap: 10px; border-radius: 999px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 86%, #fff), color-mix(in srgb, var(--accent) 88%, #000)); box-shadow: 0 8px 18px color-mix(in srgb, var(--accent) 28%, transparent); }
.onb-how { margin-top: 10px; display: flex; align-items: center; justify-content: center; gap: 10px; font-weight: 600; border-radius: 999px; }
.onb-how svg { color: var(--text); }
.onb-how-t { display: grid; justify-items: start; line-height: 1.2; text-align: left; }
.onb-how-t small { font-weight: 500; font-size: 12.5px; color: var(--muted); }
.onb-safe { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 22px 0 0; color: var(--muted); font-size: 13.5px; line-height: 1.35; text-align: left; }
.onb-safe svg { flex: none; color: var(--accent); }
.onb-safe span { max-width: 17em; }
.onb-wave { display: block; width: calc(100% + 32px); height: 70px; margin: 18px -16px -40px; fill: var(--accent); opacity: .07; }
.onb-wave path + path { opacity: .7; }
@media (max-width: 370px) { .onb-head { font-size: 22px; } .onb-feats { gap: 5px; } .onb-feats li { padding: 4px 0 8px; } .onb-feats li span { font-size: 10px; } }
/* узкий телефон (Android 360–400): знак, тема и «English» — в одну строку, не вылезая за край */
.onb-mark svg { display: block; }
@media (max-width: 400px) {
  .onb-top { gap: 8px; } .onb-mark svg { width: 52px; height: 52px; }
  .onb-theme button { gap: 5px; padding: 0 9px; font-size: 12.5px; } .lang-btn { padding: 7px 11px; }
}
/* короткий экран (Таня 13.11.2026, Android): main.js (fitOnb) включает ступени по очереди, пока строка о защите
   не окажется на экране. 1 — убираем воздух; 2 — мельче заголовки, значки и галочки; 3 — без галочек и подписи «Почта» */
.onb.fit1 { padding-top: 1.5vh; }
.onb.fit1 .onb-top { margin-bottom: 12px; }
.onb.fit1 .onb-var-row { margin: -4px 0 10px; }
.onb.fit1 .onb-head { margin: 10px 0 14px; }
.onb.fit1 .onb-feats { margin-bottom: 12px; }
.onb.fit1 .onb-checks { gap: 6px; margin-bottom: 12px; }
.onb.fit1 .onb-go { margin-top: 12px; }
.onb.fit1 .onb-safe { margin-top: 14px; }
.onb.fit2 .onb-mark svg { width: 46px; height: 46px; }
.onb.fit2 .onb-word { font-size: 44px; }
.onb.fit2 .onb-head { font-size: 20px; }
.onb.fit2 .onb-feats img { width: min(54px, 100%); }
.onb.fit2 .onb-checks li { font-size: 14px; }
.onb.fit3 .onb-word { font-size: 38px; }
.onb.fit3 .onb-checks { display: none; }
.onb.fit3 .onb-mail-f > label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
/* fit4 (24.11.2026): с кнопкой Google первый экран длиннее — на маленьких (360×640, iPhone SE) плотнее Google и «или по почте»,
   кнопки ниже, строка о защите мельче; варианты темы кружками прячем — переключатель «Светлая / Тёмная» остаётся */
.onb.fit4 .onb-var-row { display: none; }
.onb.fit4 .onb-sso { margin-top: 8px; }
.onb.fit4 .sso-btn { min-height: 44px; }
.onb.fit4 .onb-or { margin: 6px 0 0; }
.onb.fit4 .onb-go { margin-top: 8px; min-height: 48px; }
.onb.fit4 .onb-how { margin-top: 8px; padding-top: 6px; padding-bottom: 6px; }
.onb.fit4 .onb-safe { margin-top: 8px; font-size: 12.5px; gap: 8px; }
.onb.fit4 .onb-safe svg { width: 24px; height: 24px; }

/* «Общие деньги» (screens/shared.js, 11.11.2026): карточки бюджетов с цифрами и полосой сбора, плитки видов, «Сбор» на главной бюджета */
.sh-list { display: grid; gap: 10px; margin-bottom: 14px; }
.sh-card { display: flex; gap: 12px; align-items: flex-start; width: 100%; text-align: left; padding: 14px; color: var(--text); -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
.sh-ic { flex: none; width: 48px; height: 48px; border-radius: 15px; display: grid; place-items: center; font-size: 25px; background: color-mix(in srgb, var(--accent) 16%, var(--s2)); border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent); }
.sh-main { flex: 1; min-width: 0; display: grid; gap: 3px; }
.sh-name { font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sh-main > small, .sh-goal { color: var(--muted); font-size: 12.5px; }
.sh-goal b { color: var(--inc); }
.sh-go { flex: none; align-self: center; color: var(--faint); }
.sh-nums { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 6px; font-weight: 700; font-variant-numeric: tabular-nums; }
.sh-nums span { display: grid; gap: 1px; }
.sh-nums i { font-style: normal; font-weight: 500; font-size: 11.5px; color: var(--muted); }
.sh-nums .neg { color: var(--warn); }
.sh-bar { display: block; height: 8px; border-radius: 99px; background: var(--s3); overflow: hidden; margin-top: 8px; }
.sh-bar i { display: block; height: 100%; border-radius: inherit; background: var(--accent); box-shadow: 0 0 8px color-mix(in srgb, var(--accent) 60%, transparent); }
.sh-intro { margin-bottom: 14px; }
.sh-intro > b { font-size: 17px; }
.sh-intro p { color: var(--muted); margin: 6px 0 14px; line-height: 1.45; }
.sh-kinds { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.sh-kind { display: grid; justify-items: center; gap: 5px; padding: 12px 4px 10px; border-radius: 16px; background: var(--s2); border: 1px solid var(--line); font-size: 12px; font-weight: 600; color: var(--text); }
.sh-kind i { font-style: normal; font-size: 26px; line-height: 1; }
.sh-kind:active { transform: scale(.97); }
.sh-actions { display: grid; gap: 8px; margin: 4px 0 10px; }
.sh-fund { margin-bottom: 14px; display: grid; gap: 8px; }
.sh-fund-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.sh-fund-h > b { font-size: 17px; }
.sh-big { display: flex; align-items: baseline; gap: 6px; }
.sh-big b { font-size: 28px; font-variant-numeric: tabular-nums; }
.sh-big span { color: var(--muted); }
.sh-who { display: grid; gap: 8px; margin-top: 4px; }
.sh-who > small { color: var(--muted); }
.sh-who-r { display: flex; align-items: center; gap: 10px; }
.sh-who-n { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sh-who-r b { font-variant-numeric: tabular-nums; }
.sh-fund > .btn.ghost { justify-self: start; }
.sh-goal-in { display: flex; align-items: center; gap: 10px; }
.sh-goal-in .inp { flex: 1; }
.sh-goal-in b { color: var(--muted); font-size: 18px; }

/* «Общие деньги» 13.11.2026: форма нового бюджета на первом экране, сводка сбора для всех, подтверждение взносов, чат */
.tb-sub.long, .page-head .tb-sub { max-width: 62ch; }
.sh-new { display: grid; gap: 12px; margin-bottom: 14px; }
/* Объёмные значки видов и групп (13.11.2026): в чипах, в выборе значка, в карточке бюджета и во вкладках */
img.g3d { display: inline-block; object-fit: contain; vertical-align: middle; flex: none; }
.group-kinds .chip img.g3d { margin: -6px 0 -6px -6px; }
.trip-emojis .chip img.g3d { margin: -4px; }
.sh-ic img.g3d { width: 38px; height: 38px; }
.scope img.g3d, .trip-bar img.g3d { margin: -3px 0; }
.wx-plans { margin: 10px 0 4px; }
.sh-new-h { font: 400 24px/1.15 var(--f-display); margin: 0; }
.sh-new .field { margin: 0; }
.sh-more { display: grid; gap: 10px; margin-bottom: 12px; }
.sh-more > b { font-size: 16px; }
.sh-wait { font-style: normal; color: var(--accent); font-weight: 600; }
.sh-pct { margin-left: auto; font-style: normal; font-weight: 700; font-size: 13px; padding: 3px 9px; border-radius: 99px; color: var(--inc); background: color-mix(in srgb, var(--inc) 15%, transparent); }
.sh-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 2px; }
.sh-stats.n4 { grid-template-columns: repeat(2, 1fr); }   /* четыре плитки — 2×2: «ждут подтверждения» целиком */
.sh-stats span { display: grid; gap: 1px; padding: 8px 10px; border-radius: 14px; background: var(--s2); }
.sh-stats b { font-size: 20px; font-variant-numeric: tabular-nums; }
.sh-stats i { font-style: normal; font-size: 11.5px; color: var(--muted); line-height: 1.2; }
.sh-stats .ok b { color: var(--inc); }
.sh-stats .wait b { color: var(--accent); }
.sh-share { margin: 0; }
.sh-who-n { display: flex; align-items: center; gap: 6px; }
.sh-who-n .st, .tx-st { flex: none; font-style: normal; font-weight: 600; font-size: 11px; padding: 1px 7px; border-radius: 99px; white-space: nowrap; }
.st.ok { color: var(--inc); background: color-mix(in srgb, var(--inc) 15%, transparent); }
.st.wait, .tx-st.wait { color: var(--accent); background: color-mix(in srgb, var(--accent) 15%, transparent); }
.st.none, .tx-st.no { color: var(--muted); background: var(--s3); }
.tx-st { margin-left: 6px; vertical-align: 1px; }
.sh-who-r b { display: grid; justify-items: end; }
.sh-who-r b small { font-weight: 600; font-size: 11px; color: var(--accent); }
.sh-pend { display: grid; gap: 8px; padding: 10px; border-radius: 16px; background: color-mix(in srgb, var(--accent) 8%, var(--s2)); border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--line)); }
.sh-pend > small { color: var(--accent); font-weight: 700; }
.sh-pend-r { display: flex; align-items: center; gap: 8px; }
.sh-pend-n { flex: 1; min-width: 0; display: grid; }
.sh-pend-n b, .sh-pend-n small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sh-pend-n small { color: var(--muted); font-size: 12px; }
.sh-pend-v { font-variant-numeric: tabular-nums; }
.sh-pend .icon-btn { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; }
.sh-pend .icon-btn.ok { color: #fff; background: var(--inc); }
.sh-pend .icon-btn.no { color: var(--muted); background: var(--s3); }
.sh-remind { border-top: 1px solid var(--line); padding-top: 4px; }
.sh-chat { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 14px; margin-bottom: 14px; color: var(--text); }
.sh-chat > svg:first-child { flex: none; color: var(--accent); }
.sh-chat-t { flex: 1; min-width: 0; display: grid; gap: 2px; }
.sh-chat-t small { color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sh-chat-n { flex: none; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 99px; display: grid; place-items: center; font: 700 12px var(--f-body); font-style: normal; color: #fff; background: var(--accent); }
.chat-list { display: grid; gap: 8px; max-height: min(56vh, 520px); overflow-y: auto; padding: 4px 2px 10px; }
.chat-m { display: flex; align-items: flex-end; gap: 8px; max-width: 86%; }
.chat-m.mine { margin-left: auto; flex-direction: row-reverse; }
.chat-b { padding: 8px 12px; border-radius: 16px 16px 16px 4px; background: var(--s2); border: 1px solid var(--line); min-width: 0; }
.chat-m.mine .chat-b { border-radius: 16px 16px 4px 16px; background: color-mix(in srgb, var(--accent) 16%, var(--s2)); border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); }
.chat-b b { display: block; font-size: 12px; color: var(--accent); }
.chat-b p { margin: 2px 0; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.35; }
.chat-b small { display: block; font-size: 10.5px; color: var(--muted); text-align: right; }
.chat-in { display: flex; gap: 8px; position: sticky; bottom: 0; padding-top: 8px; background: var(--s1, var(--bg)); }
.chat-in .inp { flex: 1; }
/* Операция общего бюджета: подтверждена, ждёт, отклонена */
.tx-status { display: grid; gap: 6px; padding: 12px 14px; border-radius: 16px; margin-top: 10px; background: var(--s2); border: 1px solid var(--line); }
.tx-status b { display: inline-flex; align-items: center; gap: 6px; }
.tx-status small { color: var(--muted); line-height: 1.35; }
.tx-status.ok b { color: var(--inc); }
.tx-status.wait { border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); background: color-mix(in srgb, var(--accent) 8%, var(--s2)); }
.tx-status.wait b { color: var(--accent); }
.tx-status .row-btns { margin-top: 2px; }
.tx-off { opacity: .55; text-decoration: line-through; text-decoration-thickness: 1px; }
.draw-hint { display: flex; gap: 8px; align-items: flex-start; margin: 6px 2px 10px; }
.draw-hint svg { flex: none; margin-top: 2px; color: var(--accent); }
.seg.kind button.on.draw { color: #fff; background: var(--accent); }

/* Главная 13.11.2026: крупно — итог месяца, по желанию — нарастающий итог; «Итоги» — по месяцам и с начала учёта */
.note-total { display: flex; align-items: baseline; gap: 8px; margin: -8px 0 12px; font-size: 14px; }
.note-total span { color: var(--muted); }
.note-total b { font-variant-numeric: tabular-nums; }
/* «Итоги»: нарастающий итог — кнопкой, с какого дня (19.11.2026) */
.bal-from { display: grid; gap: 2px; min-width: 0; padding: 0 0 0 12px; border: 0; border-left: 1px solid var(--line); background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.bal-from i { color: var(--accent) !important; font-weight: 600; }
.bal-from i .ic { vertical-align: -1px; }
.cum-opts { display: grid; gap: 8px; margin: 4px 0 12px; }
.cum-opt { display: flex; align-items: center; gap: 12px; width: 100%; padding: 13px 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--s1); color: var(--text); text-align: left; font: inherit; cursor: pointer; }
.cum-opt span { flex: 1; display: flex; flex-direction: column; }
.cum-opt small { color: var(--muted); font-size: 13px; }
.cum-opt.on { border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); background: color-mix(in srgb, var(--accent) 9%, var(--s1)); }
.cum-opt.on > .ic { color: var(--accent); }
.cum-date { margin-bottom: 12px; font-size: 16px; }
.bal-top { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 10px; }
.bal-top > div { display: grid; gap: 2px; min-width: 0; }
.bal-top small { color: var(--muted); font-size: 13px; }
.bal-top b { font: 400 30px/1.1 var(--f-display); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.bal-top i { font-style: normal; font-size: 12px; color: var(--muted); }
.bal-top > div + div { padding-left: 12px; border-left: 1px solid var(--line); }
.bal-sw { margin-bottom: 10px; padding: 4px 14px; }
.bal-periods { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 10px; margin-bottom: 10px; }
.bal-periods > div { display: grid; gap: 2px; }
.bal-periods small { color: var(--muted); font-size: 12.5px; }
.bal-periods b { font-size: 19px; font-variant-numeric: tabular-nums; }
.bal-months { display: grid; gap: 0; margin-bottom: 10px; }
.bal-m { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(40px, 1fr) auto; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); }
.bal-m:first-of-type { border-top: 0; }
.bal-ym { display: grid; font-weight: 600; min-width: 0; }
.bal-ym small { font-weight: 400; font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bal-ym small i { font-style: normal; color: var(--inc); }
.bal-bar { display: block; height: 8px; border-radius: 99px; background: var(--s3); overflow: hidden; }
.bal-bar i { display: block; height: 100%; border-radius: inherit; background: var(--inc); }
.bal-bar.neg i { background: var(--warn); }
.bal-m b, .bal-periods b, .bal-top b { white-space: nowrap; }
.bal-top .pos, .bal-periods .pos, .bal-m .pos { color: var(--inc); }
.bal-top .neg, .bal-periods .neg, .bal-m .neg { color: var(--warn); }

/* «Новая запись» 12.11.2026: два ряда плиток поменьше; «Расход / Доход» без значков, справа — чек по фото (Изи разносит по расходам) */
.cat-grid .cat-tile { width: 86%; margin: 0 auto; border-radius: 16px; }
.cat-grid .cat span:last-child { font-size: 10.5px; }

/* Календарь 12.11.2026 (Саша): «Ноябрь 2026» на всю строку; «Месяц / 2 недели» и погода — строкой ниже; «Списком» убран */
.cal-nav .mn-title b { font-size: clamp(16px, 4.6vw, 19px); }
.cal-tools { justify-content: space-between; gap: 8px; margin: 0 2px 10px; }
.cal-view { margin-left: 0; }
.cal-view button { width: auto; height: 34px; display: inline-flex; align-items: center; gap: 6px; padding: 0 12px; font-size: 13px; font-weight: 600; }
.cal-wx { display: inline-flex; align-items: center; gap: 10px; margin-left: auto; }

/* 2 недели (12.11.2026): та же сетка, что у месяца, две строки; клетки выше, до пяти плашек, название в две строки.
   24.11.2026 (Таня): без номера недели; пустой в обе недели день — узкий, по дате (--wk2-cols из calendar.js), место — дням с делами */
.card.cal.is-2w { padding: 10px 6px; }
.wk2-head, .wk2-row { grid-template-columns: var(--wk2-cols, repeat(7, minmax(0, 1fr))); gap: 2px; }
.wk2-row { display: grid; }
.wk2-row + .wk2-row { margin-top: 2px; }
.wk2-head b.slim { font-size: 10px; letter-spacing: -.02em; }
.is-2w .cal-cell { min-height: 168px; padding: 5px 2px 6px; gap: 4px; }
.is-2w .cd-ev { gap: 3px; }
.is-2w .cd-ev i { display: block; font-size: 9.5px; line-height: 1.25; padding: 3px 3px 3px 4px; }
.is-2w .cd-ev i b { display: block; }
.is-2w .cd-ev i > .ic { display: block; margin-bottom: 1px; }
.is-2w.roomy .cd-ev i { font-size: 11px; padding: 4px 4px 4px 5px; }
.is-2w.roomy2 .cd-ev i { font-size: 12.5px; padding: 5px 5px 5px 6px; }
.is-2w:is(.roomy, .roomy2) .cd-ev i span { -webkit-line-clamp: 4; }
.is-2w .cd-ev i span { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; white-space: normal; overflow: hidden; overflow-wrap: anywhere; -webkit-hyphens: auto; hyphens: auto; }

/* День крупно: ячейка выезжает к экрану карточкой (FLIP), всё читается целиком */
.day-zoom { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: calc(var(--safe-t) + 16px) 14px calc(var(--safe-b) + 16px); }
.dz-back { position: absolute; inset: 0; background: var(--backdrop); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); opacity: 0; transition: opacity .3s; }
.day-zoom.open .dz-back { opacity: 1; }
.dz-card { position: relative; width: min(100%, 470px); max-height: 86vh; overflow-y: auto; overscroll-behavior: contain; display: grid; gap: 14px; padding: 18px 16px 16px; border-radius: 26px;
  background: var(--s1); border: 1px solid var(--line); box-shadow: var(--shadow), 0 0 26px color-mix(in srgb, var(--accent) 22%, transparent); transform-origin: 0 0; transition: transform .72s cubic-bezier(.22, .61, .21, 1); }
.dz-card > * { transition: opacity .3s .26s; }
.day-zoom:not(.open) .dz-card > * { opacity: 0; transition-delay: 0s; }
.day-zoom:not(.open) { pointer-events: none; }   /* уезжает 0,72 с — нажатия уже идут в календарь под ней */
.dz-h { display: flex; align-items: center; gap: 12px; }
.dz-num { font: 400 48px/1 var(--f-display); color: var(--accent); min-width: 1.1em; text-align: center; }
.dz-wd { flex: 1; min-width: 0; display: grid; gap: 2px; }
.dz-wd b { font-size: 19px; }
.dz-wd small { color: var(--muted); font-size: 13px; }
.dz-wx { color: var(--muted); font-size: 14px; }
.dz-list { display: grid; gap: 8px; }
.dz-list .ev-t b { font-size: 16.5px; white-space: normal; overflow-wrap: anywhere; display: block; }   /* в дне крупно название целиком (13.11.2026) */
.dz-list .ev-t small { white-space: normal; }
.dz-list .ev-main { align-items: flex-start; }
.ev.ev-cal .ev-t b { white-space: normal; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow-wrap: anywhere; }
.dz-list .ev-time.pill { font-size: 14px; }
@media (prefers-reduced-motion: reduce) { .dz-card, .dz-back, .dz-card > * { transition: none; } }
/* Раздел карточкой (14.11.2026): так же выезжает с места блока главной; шапка стоит, раздел под ней листается */
.sec-zoom { inset: 0 0 var(--kb, 0px); }                         /* поле в разделе (список покупок) — карточка над клавиатурой */
.sec-zoom .dz-back { touch-action: none; }                        /* фон под карточкой пальцем не листается */
.sz-card { width: min(100%, 520px); max-height: min(88vh, 920px, 100%); overflow: hidden; display: flex; flex-direction: column; gap: 12px; }
.sz-card .dz-h .aic { --s: 46px; }
.sz-body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; margin: 0 -16px -16px; padding: 2px 16px 18px; }
.sz-body > .topbar, .sz-body > .page-head, .sz-body > .scope-dock { display: none; }
.sz-body > .card, .sz-body > section.card { margin-bottom: 12px; background: color-mix(in srgb, var(--s2) 55%, var(--s1)); }

/* Вкладки листаются, как страницы книги (15–17.11.2026): лист — снимок экрана (ровно экран, не вся страница), поворачивается
   вокруг края за пальцем; под ним уже соседняя вкладка. Лист темнеет, отворачиваясь, и бросает тень на открывшуюся страницу.
   Ниже нижнего меню, «+» и Изи — они остаются на месте. В снимке ничего не движется и нет размытия фона — слой не перерисовывается */
.page-turn { position: fixed; inset: 0; z-index: 15; pointer-events: none; overflow: hidden; }
.pt-leaf { position: absolute; inset: 0; overflow: hidden; background: var(--bg); color: var(--text); will-change: transform; }
.pt-page { position: absolute; margin: 0; will-change: transform; }
/* Под листом — имя вкладки, которую откроем, когда отпустят (её ещё нет, или экран не её) */
.pt-under { position: fixed; inset: 0; z-index: 14; pointer-events: none; display: grid; place-items: center; background: var(--bg); }
.pt-under > * { font-size: 20px !important; pointer-events: none; }
body.turning .fab::after { animation-play-state: paused; }
.pt-leaf *, .pt-leaf *::before, .pt-leaf *::after { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; animation: none !important; transition: none !important; }
.pt-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
body.turning .scope-dock { z-index: 10; }                         /* вкладки открывшейся страницы — под листом */

/* «Новая вкладка» (14.11.2026): три вида — семья, бизнес, общие деньги; значок тот же, что будет у вкладки */
.nt-modes { display: grid; gap: 10px; margin-top: 4px; }
.nt-mode { display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px 12px 14px 14px; border-radius: 20px; text-align: left; color: var(--text);
  background: color-mix(in srgb, var(--s2) 70%, var(--s1)); border: 1px solid var(--line); transition: transform .15s, border-color .2s; }
.nt-mode:active { transform: scale(.98); }
.nt-mode:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.nt-mode > .ic:last-child { color: var(--muted); flex: none; }
.nt-ic { flex: none; width: 50px; height: 50px; border-radius: 16px; display: grid; place-items: center; color: var(--accent);
  background: color-mix(in srgb, var(--accent) 14%, var(--s1)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 30%, transparent); }
.nt-t { flex: 1; min-width: 0; display: grid; gap: 3px; }
.nt-t b { font-size: 17px; font-weight: 650; }
.nt-t small { color: var(--muted); font-size: 13px; line-height: 1.35; }
.nt-sheet .sheet-actions { margin-top: 14px; }

/* «Полезное» (screens/useful.js, 15.11.2026): финансовая библиотека — материал месяца крупно, темы плитками, гайды списком;
   в гайде — чек-листы с галочками, совет Изи и в конце карточка «Сделать в AllWallet» с неоновой кнопкой */
.ul-feat { position: relative; display: grid; gap: 8px; padding: 18px 124px 18px 18px; margin-bottom: 14px; border-radius: var(--r-lg); overflow: hidden; color: var(--text);
  background: radial-gradient(120% 140% at 100% 0%, color-mix(in srgb, var(--accent) 26%, transparent), transparent 60%), linear-gradient(160deg, color-mix(in srgb, var(--accent) 12%, var(--s1)), var(--s1));
  border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--line)); box-shadow: var(--shadow); }
.ul-feat-tag { justify-self: start; padding: 6px 10px; border-radius: 99px; font: 650 11.5px/1 var(--f-body); letter-spacing: .03em; color: var(--accent); background: color-mix(in srgb, var(--accent) 16%, var(--s1)); }
.ul-feat-t { font: 400 26px/1.15 var(--f-display); }
.ul-feat-s { color: var(--muted); font-size: 14.5px; line-height: 1.4; }
.ul-feat-m { display: inline-flex; align-items: center; gap: 6px; margin-top: 4px; font-size: 14px; font-weight: 650; color: var(--accent); }
.ul-feat-ic { position: absolute; right: -4px; top: 30px; transform: rotate(8deg); filter: drop-shadow(0 12px 14px rgb(0 0 0 / .22)); pointer-events: none; }
.ul-feat-ic img { display: block; width: 112px; height: 112px; }
@media (max-width: 374px) { .ul-feat { padding-right: 96px; } .ul-feat-ic img { width: 88px; height: 88px; } .ul-feat-t { font-size: 23px; } }
.ul-topics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.ul-topic { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 10px; align-items: center; padding: 12px; border-radius: 18px; text-align: left; color: var(--text);
  background: var(--s1); border: 1px solid var(--line); transition: border-color .2s, background .2s; }
.ul-topic img { grid-row: span 2; width: 38px; height: 38px; filter: drop-shadow(0 3px 4px rgb(0 0 0 / .18)); }
.ul-topic b { font-size: 14.5px; font-weight: 650; line-height: 1.2; }
.ul-topic small { color: var(--muted); font-size: 12.5px; }
.ul-topic.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, var(--s1)); box-shadow: 0 0 0 1px var(--accent) inset; }
.ul-list { display: grid; gap: 10px; }
.ul-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; color: var(--text); }
.ul-row-ic { flex: none; width: 54px; height: 54px; border-radius: 17px; display: grid; place-items: center; background: color-mix(in srgb, var(--accent) 10%, var(--s2)); }
.ul-row-ic img { width: 42px; height: 42px; filter: drop-shadow(0 3px 4px rgb(0 0 0 / .18)); }
.ul-row-t { flex: 1; min-width: 0; display: grid; gap: 3px; }
.ul-row-t b { font-size: 15.5px; font-weight: 650; line-height: 1.25; }
.ul-row-t small { color: var(--muted); font-size: 13px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ul-row-m { font-style: normal; font-size: 12px; font-weight: 650; color: var(--accent); }
.ul-row > .ic:last-child { flex: none; color: var(--muted); }
.ul-read { flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; color: var(--on-accent); background: var(--accent); }
.ul-back { display: inline-flex; align-items: center; gap: 4px; color: var(--accent); }
.page-head:has(.ul-back) h1 { white-space: normal; overflow: visible; text-overflow: clip; font-size: 28px; line-height: 1.14; }   /* название гайда — целиком, в несколько строк */
.ul-hero { display: flex; align-items: center; gap: 14px; margin: 0 0 14px; }
.ul-hero-ic { flex: none; width: 92px; height: 92px; border-radius: 26px; display: grid; place-items: center; border: 1px solid var(--line); box-shadow: var(--shadow);
  background: radial-gradient(circle at 30% 25%, color-mix(in srgb, var(--accent) 24%, var(--s1)), var(--s1)); }
.ul-hero-ic img { width: 72px; height: 72px; filter: drop-shadow(0 6px 8px rgb(0 0 0 / .2)); }
.ul-hero-t { min-width: 0; }
.ul-hero-t p { margin: 5px 0 0; color: var(--muted); font-size: 15px; line-height: 1.45; }
.ul-body { padding: 4px 18px 16px; margin-bottom: 12px; }
.ul-body h3 { margin: 18px 0 6px; font: 650 17.5px/1.3 var(--f-body); }
.ul-body p { margin: 0 0 4px; font-size: 15.5px; line-height: 1.6; }
.ul-check { list-style: none; margin: 6px 0 2px; padding: 0; display: grid; }
.ul-check label { position: relative; display: flex; align-items: flex-start; gap: 12px; padding: 8px 2px; font-size: 15px; line-height: 1.45; cursor: pointer; }
.ul-check input { position: absolute; opacity: 0; pointer-events: none; }
.ul-check i { flex: none; width: 22px; height: 22px; margin-top: 1px; border-radius: 7px; display: grid; place-items: center; color: transparent; border: 2px solid color-mix(in srgb, var(--accent) 55%, var(--line)); transition: background .15s, border-color .15s, color .15s; }
.ul-check input:checked + i { color: var(--on-accent); background: var(--accent); border-color: var(--accent); }
.ul-check input:checked ~ span { color: var(--muted); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--muted) 60%, transparent); }
.ul-check input:focus-visible + i { outline: 2px solid var(--accent); outline-offset: 2px; }
.ul-tip { display: flex; align-items: center; gap: 12px; margin: 14px 0 6px; padding: 12px 14px; border-radius: 16px; background: color-mix(in srgb, var(--accent) 9%, var(--s2)); border: 1px solid color-mix(in srgb, var(--accent) 25%, var(--line)); }
.ul-tip .izi { flex: none; }
.ul-body .ul-tip p { margin: 0; font-size: 14.5px; line-height: 1.45; }
.ul-do { display: grid; gap: 10px; padding: 18px; margin-bottom: 4px; border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); background: linear-gradient(160deg, color-mix(in srgb, var(--accent) 14%, var(--s1)), var(--s1)); }
.ul-do p { margin: 0; color: var(--muted); font-size: 14.5px; line-height: 1.45; }
.ul-do .btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-align: center; }
.onb-deep { display: flex; align-items: center; gap: 8px; max-width: 36ch; margin: 10px auto 0; padding: 8px 12px; border-radius: 12px; font-size: 13.5px; line-height: 1.35; text-align: left; color: var(--text);
  background: color-mix(in srgb, var(--accent) 12%, var(--s1)); border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--line)); }
.onb-deep .ic { flex: none; color: var(--accent); }

/* «Я» (screens/me.js): профиль, моя карточка, мои счета, плитки разделов */
.me-card { display: grid; gap: 4px; padding: 10px 12px; }
.me-head { display: flex; align-items: center; gap: 14px; width: 100%; padding: 8px 4px 12px; text-align: left; border-bottom: 1px solid var(--line); }
.me-t { flex: 1; min-width: 0; display: grid; gap: 2px; }
.me-head b { font: 400 24px/1.15 var(--f-display); }
.me-head small { color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-head > .ic { color: var(--muted); }
.me-more { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px 4px; margin: 4px 0 12px; }

/* «Новое событие» по макету Саши 12.11.2026: поле со значком и неоновой рамкой, дата пилюлей, время в стеклянной карточке,
   «Весь день» с солнцем, «Цвет события», «Повтор · Напомнить · Заметка · Общее событие» — строками со значками, неоновая «Добавить» */
.ev-title-f { position: relative; }
.ev-title-f .ev-in-ic { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); display: grid; color: var(--accent); font-style: normal; pointer-events: none; }
.ev-sheet .ev-title-f .inp.big { padding-left: 46px; border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 20%, transparent), 0 0 16px color-mix(in srgb, var(--accent) 22%, transparent); }
.ev-when-d { gap: 10px; }
.ev-date-pill { position: relative; display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 10px 0 12px; border-radius: 14px; background: var(--s2); border: 1px solid var(--line); color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; cursor: pointer; }
.ev-date-pill > .ic:first-child { color: var(--accent); }
.ev-date-pill > .ic:nth-of-type(2) { color: var(--muted); }
.ev-date-pill input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; border: 0; padding: 0; margin: 0; cursor: pointer; }
.tw-none { display: inline-flex; align-items: center; gap: 6px; }
.ev-sheet .tw-none.on { background: var(--accent); color: var(--on-accent); border-color: transparent; box-shadow: 0 0 0 1px color-mix(in srgb, #fff 30%, transparent) inset, 0 0 12px color-mix(in srgb, var(--accent) 55%, transparent); }
.ev-time-card { display: flex; align-items: center; gap: 6px; padding: 4px 8px 4px 12px; border-radius: 18px; border: 1px solid var(--line);
  background: linear-gradient(180deg, color-mix(in srgb, var(--s2) 92%, #fff 8%), var(--s2)); box-shadow: inset 0 1px 0 color-mix(in srgb, #fff 12%, transparent); }
.ev-time-card > .ic { flex: none; color: var(--accent); }
.ev-time-card .tw-box { background: none; border: 0; }
.ev-time-card .tw-box::before { background: color-mix(in srgb, var(--accent) 20%, transparent); box-shadow: 0 0 10px color-mix(in srgb, var(--accent) 25%, transparent); }
.opt-ic { flex: none; display: grid; color: var(--accent); font-style: normal; }
.opt-head b { margin-left: auto; color: var(--muted); font-weight: 500; }
.ev-note-f { display: flex; align-items: center; gap: 10px; padding-left: 14px; border-radius: 14px; background: var(--s2); border: 1px solid var(--line); }
.ev-note-f textarea.inp.ev-note-in { flex: 1; border: 0; background: none; padding-left: 0; box-shadow: none; }
.ev-shared-f { display: flex; align-items: center; gap: 10px; padding: 6px 12px 6px 14px; border-radius: 14px; background: var(--s2); border: 1px solid var(--line); }
.ev-shared-f .switch-row { flex: 1; }
.ev-sheet [data-save] { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }


.cat-big { flex: none; width: 46px; height: 46px; object-fit: contain; margin: -4px 0; filter: drop-shadow(0 3px 4px rgba(0, 0, 0, .22)); }
/* дата пилюлей — в одну строку, слева; время — справа (макет «Новое событие») */
.ev-sheet .ev-when { flex-wrap: nowrap; justify-content: space-between; }
.ev-sheet .ev-when-d { flex: 1; min-width: 0; }
.ev-when .ev-date-pill { display: inline-flex; margin: 0; font-size: 15px; font-weight: 600; letter-spacing: 0; color: var(--text); white-space: nowrap; }
.edit-list li.pickable { cursor: pointer; }
.edit-list li.pickable:active { transform: scale(.99); }
.edit-list li.pickable.on { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
/*  Перестановка в списках (Таня 27.11.2026): ручек у строк нет — порядок меняют кнопкой «Переставить» (ui.moveBtn); в этом режиме
    у каждой строки справа ручка вместо карандаша и переключателя. Категории, счета, блоки главной, разделы и меню, поля записи  */
.ro-list li { padding-left: 12px; }
.ro-list.moving li { outline: 1.5px dashed color-mix(in srgb, var(--accent) 45%, transparent); outline-offset: -1px; }
.ro-list.moving li.dragging { outline-color: var(--accent); }
.grip.end { width: 44px; height: 40px; margin: 0 -6px 0 auto; color: var(--accent); }
.ro-tools { flex-wrap: wrap; }
.ro-tools .btn { min-width: 0; white-space: nowrap; }
/*  Счета — строки внутри одной карточки, с чертой между ними: без пунктира, ручка у правого края  */
.acc-list.ro-list { padding-left: 14px; }
.acc-list.ro-list li { padding-left: 0; }
.acc-list.ro-list.moving li { outline: none; }
.acc-list.moving .acc-row { pointer-events: none; }
@media (max-height: 680px) {
  .ev-sheet .field { margin-top: 8px; }
  .ev-sheet .ev-when label { margin-bottom: 6px; }
  .ev-when .ev-date-pill { min-height: 38px; }
  .ev-sheet .opt-head { min-height: 40px; padding-top: 6px; padding-bottom: 6px; }
  .ev-sheet textarea.inp.ev-note-in { min-height: 40px; padding-top: 8px; padding-bottom: 8px; }
  .ev-shared-f { padding-top: 3px; padding-bottom: 3px; }
}

/* «Новая запись» на одном экране (Саша 12.11.2026): без подписи и пустых строк, сумма ниже, чек — рядом с валютой и светится,
   редкие поля — по «Ещё ›», «Добавить» всегда видна внизу */
.tx-sheet .tx-phrase { min-height: 44px; }
.tx-sheet .phrase-prev:empty, .tx-sheet .amt-hint:empty { display: none; }
.tx-sheet .phrase-prev { margin: 4px 4px 0; }
.tx-sheet .seg.kind { margin-top: 10px; }
.tx-sheet .seg.kind button { min-height: 40px; }
.tx-sheet .amount-box { margin-top: 10px; padding: 4px 4px 4px 16px; gap: 8px; }
.tx-sheet .amount-in { font-size: 38px; padding: 2px 0; }
.tx-sheet .cur-btn { height: 46px; min-width: 50px; font-size: 20px; }
.rcpt-btn { flex: none; width: 46px; height: 46px; display: grid; place-items: center; border-radius: 14px; cursor: pointer; color: var(--accent);
  background: color-mix(in srgb, var(--accent) 14%, var(--s2)); border: 1.5px solid var(--accent);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 25%, transparent), 0 0 12px color-mix(in srgb, var(--accent) 55%, transparent), inset 0 0 8px color-mix(in srgb, var(--accent) 20%, transparent);
  transition: transform .15s, box-shadow .2s; }
.rcpt-btn:active { transform: scale(.94); }
.rcpt-btn:focus-within { box-shadow: 0 0 0 2px var(--accent), 0 0 16px color-mix(in srgb, var(--accent) 65%, transparent); }
.tx-sheet .cats-h { margin: 12px 0 0; }
.tx-sheet .cat-grid { margin-top: 8px; gap: 8px 7px; }
.tx-sheet .tx-card { margin-top: 12px; }
.f-more { width: 100%; text-align: left; background: none; border: 0; color: var(--text); }
.f-more .f-t small { display: block; color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.f-more > .ic:last-child { flex: none; color: var(--muted); margin-left: auto; }
.tx-sheet .f-row { min-height: 46px; padding: 5px 0; }
.tx-sheet .tx-note { margin-top: 8px; padding: 0 14px; }
.tx-sheet .tx-note .inp { padding: 9px 0; }
.tx-sheet .tx-phrase { min-height: 42px; }
.tx-sheet .phrase-bar .mic { width: 36px; height: 36px; }
.tx-sheet .cat-grid .cat { gap: 4px; }
.tx-sheet .sheet-body { padding-bottom: calc(10px + var(--safe-b)); }
.tx-sheet .sheet-actions { position: sticky; bottom: calc(-10px - var(--safe-b)); z-index: 2; margin: 6px -20px 0; padding: 8px 20px calc(10px + var(--safe-b));
  background: linear-gradient(to bottom, transparent, var(--bg-sheet, var(--s1)) 30%); }
.tx-sheet .sheet-actions .btn.big { min-height: 48px; }
/* запас под полосу жеста iPhone: форма помещается и с ней */
.tx-sheet .phrase-bar input { min-height: 38px; }
.tx-sheet .seg.kind { padding: 4px; }
.tx-sheet .seg.kind button { min-height: 38px; }
.tx-sheet .amount-in { font-size: 34px; }
.tx-sheet .cur-btn, .tx-sheet .rcpt-btn { height: 44px; }
.tx-sheet .rcpt-btn { width: 44px; }
.tx-sheet .cat-grid .cat-tile { width: 80%; }
.tx-sheet .f-row { min-height: 44px; padding: 4px 0; }
.tx-sheet .tx-note .inp { padding: 8px 0; }
.tx-sheet .cats-h { margin-top: 10px; }
/* iPhone с вырезом: окно ≤ 773 px вместе с полосой жеста — ещё компактнее */
.tx-sheet .sheet-head { padding-top: 6px; padding-bottom: 0; }
.tx-sheet .sheet-title h2 { font-size: 20px; }
.tx-sheet .f-row .sw-text small { display: none; }          /* «Попадёт в общие расходы» — видно по самому переключателю */
.tx-sheet .cats-h { margin-top: 8px; }
.tx-sheet .cats-h b { font-size: 15px; }
.tx-sheet .cat-grid { margin-top: 6px; gap: 6px 7px; }
.tx-sheet .tx-card { margin-top: 10px; }
.tx-sheet .tx-note .inp { padding: 6px 0; }
.tx-sheet .sheet-actions { padding-top: 6px; }
.tx-sheet .sheet-actions .btn.big { min-height: 46px; }
.tx-sheet .seg.kind button { min-height: 36px; }
.tx-sheet .amount-in { font-size: 32px; }
.tx-sheet .f-row { min-height: 42px; padding: 3px 0; }
.tx-sheet .phrase-bar input { min-height: 36px; }
.tx-sheet .cats-h { margin-top: 6px; }
.tx-sheet .tx-card { margin-top: 8px; }
.tx-sheet .tx-note { margin-top: 6px; }
.tx-sheet .sheet-actions { padding-top: 4px; }
.tx-sheet .sheet-actions .btn.big { min-height: 44px; }
.tx-sheet .cat-grid .cat-tile { width: 76%; border-radius: 15px; }
.tx-sheet .cat-grid .cat span:last-child { font-size: 10px; line-height: 1.1; }
@media (max-height: 830px) { .tx-sheet .seg.kind button { min-height: 34px; } .tx-sheet .f-row { min-height: 40px; } }

/* Тени у наших значков — как на макете Саши (12.11.2026): предмет «стоит» на плитке — плотная тень у основания и мягкая
   рассеянная ниже, оттенка самой плитки (серая на цветном фоне выглядит грязной). Сначала — серая для старых браузеров */
.cat-tile img { filter: drop-shadow(0 2px 1.5px rgb(0 0 0 / .3)) drop-shadow(0 8px 7px rgb(0 0 0 / .2));
  filter: drop-shadow(0 2px 1.5px color-mix(in srgb, var(--c) 30%, rgb(0 0 0 / .5))) drop-shadow(0 9px 8px color-mix(in srgb, var(--c) 45%, rgb(0 0 0 / .4))); }
.cat-tile i { text-shadow: 0 2px 2px rgb(0 0 0 / .18), 0 7px 8px rgb(0 0 0 / .16); }
.cat-dot.d3 img { filter: drop-shadow(0 1px 1px rgb(0 0 0 / .3)) drop-shadow(0 3px 3px rgb(0 0 0 / .2));
  filter: drop-shadow(0 1px 1px color-mix(in srgb, var(--c) 30%, rgb(0 0 0 / .45))) drop-shadow(0 3px 3px color-mix(in srgb, var(--c) 45%, rgb(0 0 0 / .3))); }
.cat-big { filter: drop-shadow(0 2px 2px rgb(0 0 0 / .26)) drop-shadow(0 7px 7px rgb(0 0 0 / .18)); }

/* Окна — карточкой посередине (Саша 14.11.2026: «все открываются плавно, как остальное»): вырастают с места нажатия, как день
   в календаре и разделы, и встают по центру; фон размыт так же. Нижний край экрана карточку не касается — отступ от выреза
   и полоски iPhone у самой карточки, внутри --safe-b не нужен. Темп — как у дня в календаре, чуть быстрее: 0,56 с
   (13.11 шторка снизу за 0,72 с «медленно подъезжала», за 0,46 с с резким стартом — «не плавно») */
.layer.float { align-items: center; padding: calc(var(--safe-t) + 12px) 12px calc(var(--safe-b) + 12px); }
.kb-open .layer.float { padding-bottom: 8px; }                     /* над клавиатурой полоска iPhone не мешает — карточке больше места */
.layer.float .backdrop { -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.layer.float .sheet { --safe-b: 0px; max-height: 100%; margin: 0; overflow: hidden; border-radius: 26px; border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow), 0 0 26px color-mix(in srgb, var(--accent) 18%, transparent);
  transform: scale(.94); opacity: 0; transition: transform .3s cubic-bezier(.2, .85, .25, 1), opacity .22s; }
.layer.float.open .sheet { transform: none; opacity: 1; }
.layer.float .sheet-head { padding-top: 14px; }
.layer.float .grabber { display: none; }
.layer.float.grow .sheet { opacity: 1; transition: transform .56s cubic-bezier(.22, .61, .21, 1); }
.layer.float.grow .sheet > * { transition: opacity .24s .2s; }
.layer.float.grow:not(.open) .sheet > * { opacity: 0; transition-delay: 0s; }
.layer.float.grow:not(.open) .sheet { transition-duration: .34s; }   /* закрывается — быстро, обратно к кнопке */
@media (prefers-reduced-motion: reduce) { .layer.float .sheet, .layer.float .sheet > * { transition: none; } }

/* План трат (Татьяна 13.11.2026): справа — план, под ним «осталось …» или «+3 € сверх» красным; категории со значками — наверху формы */
.plan-v { display: grid; justify-items: end; gap: 1px; flex: none; }
.plan-v b { font-weight: 700; }
.plan-v small { font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.plan-v small.over { color: var(--warn); font-weight: 700; }
.plan-cats { max-height: 210px; overflow-y: auto; }
.plan-cats .chip.add { border-style: dashed; }

/* ── Автоввод — шаги под свой телефон (Таня 13.11.2026: «должно быть легко»): номер в кружке, сделанный шаг — галочка;
   ключ, адрес, ручная настройка — в «Для продвинутых» ── */
.as-steps { list-style: none; counter-reset: as; margin: 6px 0 14px; padding: 0; display: grid; gap: 14px; }
.as-steps li { counter-increment: as; position: relative; display: grid; gap: 3px; padding-left: 40px; }
.as-steps li::before { content: counter(as); position: absolute; left: 0; top: -3px; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  font: 700 14px/1 var(--f-body); color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent); border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent); }
.as-steps li.done::before { content: '✓'; color: var(--on-accent); background: var(--accent); border-color: var(--accent); }
.as-steps li b { font-weight: 650; }
.as-steps li > span, .as-steps li > small { color: var(--muted); font-size: 14px; line-height: 1.4; }
.as-steps li > small a { color: var(--accent); }
.as-steps li > .btn { margin-top: 6px; }
.as-adv { margin: 10px 0 4px; border-top: 1px solid var(--line); padding-top: 4px; }
.as-adv > summary { cursor: pointer; display: flex; align-items: center; min-height: 44px; font-weight: 600; color: var(--muted); list-style: none; }
.as-adv > summary::-webkit-details-marker { display: none; }
.as-adv > summary::after { content: '›'; margin-left: auto; font-size: 20px; transition: transform .2s; }
.as-adv[open] > summary::after { transform: rotate(90deg); }

/* Дневник (Таня 17.11.2026): заметку пишут длинную — поле растёт с текстом почти на весь экран (над клавиатурой — сколько есть
   места), дальше листается внутри; видно, что написано выше. В списке у записи — до четырёх строк заметки, с переносами, как написали */
.ev-sheet.ev-diary textarea.inp.ev-note-in { min-height: 132px; max-height: max(132px, calc(100dvh - var(--kb, 0px) - var(--safe-t) - 240px)); overflow-y: auto; line-height: 1.45; }
.ev-sheet.ev-diary .ev-note-f { align-items: flex-start; }
.ev-sheet.ev-diary .ev-note-f .opt-ic { margin-top: 12px; }
.ev.ev-note .ev-note-txt { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; margin-top: 3px; white-space: pre-line; overflow-wrap: anywhere;
  color: var(--muted); font-size: 13.5px; line-height: 1.4; }

/* ── Вход через Google (js/sso.js): кнопкой первой, почта — под ней (24.11.2026; раньше — окошком над полем почты).
      Кнопка — светлый вариант из правил Google (белая, серый контур, знак G в цветах Google) — одинаково узнаваема на любой теме */
.onb-sso { margin-top: 18px; }
.onb-or { display: flex; align-items: center; gap: 12px; margin: 14px 0 2px; color: var(--muted); font-size: 13px; }
.onb-or::before, .onb-or::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.sso-btn { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 48px; padding: 0 16px; border-radius: 999px;
  background: #FFFFFF; color: #1F1F1F; border: 1px solid #747775; font: 600 15.5px/1.2 var(--f-body); cursor: pointer; }
.sso-btn svg { flex: none; }
.sso-btn:active { background: #F2F2F2; }
.sso-btn:disabled { opacity: .7; cursor: default; }
.sso-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.sso-btn + .sso-btn { margin-top: 8px; }
/* После возврата от Google — три точки, пока сервер выдаёт сеанс */
.onb-wait { display: flex; gap: 8px; justify-content: center; margin: 26px 0; }
.onb-wait i { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); animation: onb-wait 1s ease-in-out infinite; }
.onb-wait i:nth-child(2) { animation-delay: .15s; } .onb-wait i:nth-child(3) { animation-delay: .3s; }
@keyframes onb-wait { 0%, 100% { opacity: .25; transform: scale(.8); } 50% { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .onb-wait i { animation: none; opacity: .7; } }

/* Первый экран после «Добавить аккаунт»: вернуться в прежний одним касанием */
.onb-known { display: grid; gap: 6px; margin: 4px 0 14px; }
.onb-known .micro { margin: 0; color: var(--muted); }
.onb-known-b { justify-content: space-between; gap: 8px; }

/* ── Почта в два касания (js/mailhint.js, 21.11.2026): форма не меняет раскладку (display: contents) — она нужна браузеру,
      чтобы запомнить и подставить почту. Подсказки доменов и исправление опечатки — над полем, как окошко Google: под полем
      их закрыла бы клавиатура телефона. Строка чипов прокручивается вбок, если не влезла */
.onb-form { display: contents; }
.mh-host { position: relative; }
.mh-pop { position: absolute; left: 0; right: 0; bottom: calc(100% + 6px); z-index: 31; display: flex; align-items: center; gap: 6px;
  padding: 6px; border-radius: 999px; background: var(--s2); border: 1px solid var(--line); box-shadow: var(--shadow); animation: sso-in .14s ease-out; }
/* не влезло — край строки тает (видно, что листается вбок), долистали до конца — край чёткий */
.mh-row { flex: 1; min-width: 0; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; border-radius: 999px;
  -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 26px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 26px), transparent); }
.mh-row.end { -webkit-mask-image: none; mask-image: none; }
.mh-row::-webkit-scrollbar { display: none; }
.mh-chip { flex: none; min-height: 36px; padding: 0 13px; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
  background: color-mix(in srgb, var(--accent) 12%, var(--s1)); color: var(--text); font: 600 14px/1 var(--f-body); white-space: nowrap; cursor: pointer; }
.mh-chip:active { background: color-mix(in srgb, var(--accent) 24%, var(--s1)); }
.mh-chip:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.mh-fix { border-color: color-mix(in srgb, var(--warn) 45%, var(--line)); }
.mh-lead { flex: none; padding: 0 4px 0 8px; font-size: 13px; font-weight: 600; color: var(--muted); white-space: nowrap; }
@media (prefers-reduced-motion: reduce) { .mh-pop { animation: none; } }
/* Мелкая строка под кнопками окна подтверждения (confirmSheet, fine): разбор фото ИИ — Саша 21.11.2026 «очень маленькими буквами в конце» */
.sheet-fine { margin: 12px 4px 0; font-size: 11px; line-height: 1.4; color: var(--muted); text-align: center; }
/* «До зарплаты» (widgets.js, paydayOffer, 21.11.2026): Изи угадал день зарплаты по доходам — предложение одним касанием */
.pd-offer { display: grid; gap: 8px; margin-top: 10px; padding: 10px 12px; border-radius: var(--r-sm); font-size: 13px; line-height: 1.35; color: var(--text);
  background: color-mix(in srgb, var(--accent) 10%, var(--s1)); border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent); }
.pd-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.pd-set { margin-top: 8px; }
/* Копилки: «Отложить» в новой записи (forms.js, piggyPick, 21.11.2026) — сумма в цвете дохода, выбор копилки чипами, правило «N % от дохода» */
.amount-box.save .amount-in { color: var(--inc); }
.piggy-f .chips { margin-bottom: 8px; }
.piggy-f .chip small { margin-left: 4px; color: var(--muted); font-weight: 500; }
.piggy-f .f-sub-in { margin: 0 0 8px; }
.piggy-rate { display: grid; gap: 6px; margin-top: 10px; font-size: 13px; color: var(--muted); }
.piggy-rate .seg button { min-height: 34px; font-size: 13px; }
.kpi-pct { font-style: normal; font-size: 12px; font-weight: 600; color: var(--muted); }

/* ── «Долги» (screens/debts.js, 21.11.2026): итоги «Мне должны · Мои долги», строки с буквой имени, крупный остаток в карточке ── */
.debt-sum-card { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 16px; }
.debt-sum-card > div { display: grid; gap: 4px; }
.debt-sum-card small { color: var(--muted); font-size: 12.5px; font-weight: 600; }
.debt-sum-card b { font-size: 24px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.debt-add { margin: 12px 0 4px; }
.debt-add .btn { display: flex; align-items: center; justify-content: center; gap: 8px; }
.debt-list { display: grid; padding: 4px 0; }
.debt-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; text-align: left; color: var(--text); background: none; border: 0; }
.debt-row + .debt-row { border-top: 1px solid var(--line); }
.debt-ava { flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 17px;
  color: var(--inc); background: color-mix(in srgb, var(--inc) 15%, var(--s2)); }
.debt-ava.borrowed { color: var(--warn); background: color-mix(in srgb, var(--warn) 14%, var(--s2)); }
.debt-t { flex: 1; min-width: 0; display: grid; gap: 2px; }
.debt-t b { font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.debt-t small { color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.debt-row.late .debt-t small { color: var(--warn); }
.debt-sum { flex: none; font-size: 16px; font-variant-numeric: tabular-nums; color: var(--inc); }
.debt-sum.borrowed { color: var(--warn); }
.debt-done { margin-top: 16px; }
.debt-done summary { cursor: pointer; color: var(--muted); font-weight: 600; font-size: 14px; padding: 6px 2px; }
.debt-done .debt-row { opacity: .7; }
.debt-dir { margin: 0; text-align: center; color: var(--muted); font-size: 14px; font-weight: 600; }
.debt-big { margin: 2px 0 0; text-align: center; font: 600 42px/1.1 var(--f-display, inherit); font-variant-numeric: tabular-nums; color: var(--inc); }
.debt-big.borrowed { color: var(--warn); }
.debt-note { margin: 10px 0; }
.debt-reply { display: grid; gap: 8px; margin: 10px 0; }
.debt-reply > div { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.debt-names { margin-top: 8px; }
.debt-tools { margin-top: 18px; }
.amount-box.small .amount-in { font-size: 32px; }
/* Маленький Изи — кадр объёмной модели (js/izi.js, iziPic, 21.11.2026): дышит и откликается целиком, без рисованных глаз и рук */
.izi .izi-pic { width: 100%; height: 100%; display: block; object-fit: contain; -webkit-user-drag: none; user-select: none; pointer-events: none; }
.izi-idle .izi-pic, .izi-talk .izi-pic { animation: izi-bob 3.2s ease-in-out infinite; }
.izi-do-nod .izi-pic { animation: izi-nod .9s ease-in-out 1; }
.izi-do-wave .izi-pic, .izi-do-thumbs .izi-pic, .izi-do-boop .izi-pic, .izi-do-jump .izi-pic { animation: izi-pop .6s ease-out 1; }
.izi-do-shrug .izi-pic { animation: izi-tilt .8s ease-in-out 2; }
.izi-still .izi-pic { animation: none !important; }
@media (prefers-reduced-motion: reduce) { .izi .izi-pic { animation: none !important; } }
/* Изи радуется возврату долга (screens/debts.js, cheer, 21.11.2026): окошко сверху — Изи, «минус 25 % долга», полоса «закрыто» */
.cheer { position: fixed; left: 50%; top: calc(env(safe-area-inset-top, 0px) + 12px); z-index: 90; width: min(420px, calc(100% - 24px)); display: flex; align-items: center; gap: 12px;
  padding: 10px 16px 10px 8px; border-radius: 20px; background: var(--s2); border: 1px solid color-mix(in srgb, var(--inc) 35%, var(--line)); box-shadow: var(--shadow);
  transform: translate(-50%, -140%); opacity: 0; transition: transform .45s cubic-bezier(.2, 1.3, .4, 1), opacity .3s; cursor: pointer; }
.cheer.show { transform: translate(-50%, 0); opacity: 1; }
.cheer .izi { animation: cheer-hop .9s ease-out 1; }
.cheer-t { flex: 1; min-width: 0; display: grid; gap: 3px; }
.cheer-t b { font-size: 15.5px; line-height: 1.25; color: var(--text); }
.cheer-t small { font-size: 13px; color: var(--muted); }
.cheer-bar { display: block; height: 7px; margin-top: 4px; border-radius: 99px; background: var(--s3); overflow: hidden; }
.cheer-bar i { display: block; height: 100%; border-radius: inherit; background: var(--inc); transition: width .8s ease-out; }
.cheer.done { border-color: color-mix(in srgb, #F2A93B 55%, var(--line)); }
.cheer.done .cheer-bar i { background: linear-gradient(90deg, var(--inc), #F2A93B); }
@keyframes cheer-hop { 0% { transform: translateY(0) rotate(0); } 30% { transform: translateY(-10px) rotate(-8deg); } 60% { transform: translateY(0) rotate(6deg); } 100% { transform: none; } }
@media (prefers-reduced-motion: reduce) { .cheer { transition: opacity .2s; } .cheer .izi { animation: none; } }
/* PDF-гайд в «Полезном» (screens/useful.js, 21.11.2026): на карточке — первый лист, внутри — страницы одна под другой и «Скачать PDF» */
.ul-row-ic.ul-cover { width: 56px; height: auto; padding: 0; border-radius: 8px; background: none; overflow: hidden; box-shadow: 0 4px 10px rgb(0 0 0 / .16); border: 1px solid var(--line); }
.ul-row-ic.ul-cover img { width: 56px; height: auto; display: block; filter: none; }
.ul-hero-ic.ul-cover { width: 92px; height: auto; padding: 0; border-radius: 10px; overflow: hidden; background: none; }
.ul-hero-ic.ul-cover img { width: 92px; height: auto; display: block; filter: none; }
.ul-author { display: block; margin-top: 6px; color: var(--muted); font-size: 12.5px; font-weight: 600; }
.ul-pdf { margin: 4px 0 14px; display: flex; align-items: center; justify-content: center; gap: 8px; }
.ul-pages { display: grid; gap: 12px; margin-bottom: 16px; }
.ul-pages img { width: 100%; height: auto; display: block; border-radius: 12px; background: #fff; box-shadow: var(--shadow); border: 1px solid var(--line); }
/* «Копить на это» у желания (screens/plan.js, 22.11.2026): полоса «накоплено из» — касание пополняет накопление */
.wish-pot { display: grid; gap: 6px; width: 100%; margin: 8px 0 2px; padding: 8px 10px; border-radius: var(--r-sm); background: color-mix(in srgb, var(--accent) 8%, var(--s1)); border: 1px solid var(--line); color: var(--text); text-align: left; font-size: 13px; }
.wish-pot span:first-child { display: flex; align-items: center; gap: 6px; }
/* «Копилка» и «Долги» в сетке категорий — как остальные, без рамки (Таня 22.11.2026: «коричневая обводка лишняя»), во втором ряду */
/* Изи откликается на события (js/izi.js, iziReact, 22.11.2026): монетки сыплются на доход, монета летит в копилку на «Накопления» */
.izi-fx { position: absolute; inset: -40px -10px 20px; pointer-events: none; overflow: visible; z-index: 2; }
.izi-fx-income i { position: absolute; top: 0; left: var(--x); font-size: 18px; font-style: normal; opacity: 0; animation: izi-coin 1.3s ease-in var(--d) 1 forwards; }
@keyframes izi-coin { 0% { transform: translateY(-20px) rotate(0); opacity: 0; } 15% { opacity: 1; } 100% { transform: translateY(110px) rotate(320deg); opacity: 0; } }
.izi-fx-savings b { position: absolute; right: -6px; top: 20px; font-size: 30px; animation: izi-pig 1.6s ease-out 1 forwards; }
.izi-fx-savings i { position: absolute; left: 30%; top: 10px; font-size: 18px; font-style: normal; animation: izi-drop 1s cubic-bezier(.5, -0.4, .6, 1) .2s 1 forwards; opacity: 0; }
@keyframes izi-pig { 0% { transform: scale(.4); opacity: 0; } 25% { transform: scale(1.1); opacity: 1; } 70% { transform: scale(1); opacity: 1; } 100% { transform: scale(.9); opacity: 0; } }
@keyframes izi-drop { 0% { transform: translate(0, 0) scale(1); opacity: 1; } 100% { transform: translate(52px, 22px) scale(.4); opacity: 0; } }
/* Объёмные значки копилок (ui.js goalIcon, 22.11.2026) — вместо смайликов в выборе значка и в списках */
.goal-3d { display: inline-block; vertical-align: middle; object-fit: contain; filter: drop-shadow(0 2px 3px rgb(0 0 0 / .18)); }
.emoji-grid button .goal-3d { width: 34px; height: 34px; }
.chip .goal-3d { margin: -4px 0; }
.debt-w { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 4px; }
.debt-w small { display: block; color: var(--muted); font-size: 12px; }
.debt-w b { font-size: 20px; font-variant-numeric: tabular-nums; }
/* Материал месяца — наш PDF-гайд: обложка вместо значка (22.11.2026) */
.ul-feat-ic.ul-cover img { width: 96px; height: auto; border-radius: 10px; box-shadow: 0 10px 22px rgb(0 0 0 / .22); transform: rotate(4deg); filter: none; }

/* ── Долги: чей долг, проценты и график погашения (Таня 24.11.2026) ── */
.debt-whose { flex-wrap: wrap; }
.debt-plan-f { margin: 4px 0 12px; border: 1px solid var(--line); border-radius: var(--r-md); padding: 10px 12px; background: var(--s1); }
.debt-plan-f > summary { display: flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 600; font-size: 14.5px; list-style: none; }
.debt-plan-f > summary::-webkit-details-marker { display: none; }
.debt-plan-f[open] > summary { margin-bottom: 10px; }
.debt-remind { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; line-height: 1.35; margin: 4px 0 8px; }
.debt-remind input { margin-top: 2px; accent-color: var(--accent); width: 18px; height: 18px; flex: none; }
.debt-tip { display: flex; gap: 8px; align-items: flex-start; margin: 6px 0 0; font-size: 13.5px; line-height: 1.4; color: var(--text); }
.debt-tip svg { flex: none; margin-top: 2px; color: var(--accent); }
.debt-plan { margin: 12px 0 4px; }
.debt-plan .sub-h { display: flex; align-items: center; gap: 8px; }
.debt-izi { display: inline-flex; align-items: center; gap: 4px; font: 500 12px var(--f-body); color: var(--muted); text-transform: none; letter-spacing: 0; }
.debt-now { margin: 0 0 6px; padding: 10px 12px; border-radius: 14px; font-size: 14px; line-height: 1.4; background: color-mix(in srgb, var(--accent) 12%, var(--s1)); }
.debt-now.warn { background: color-mix(in srgb, var(--warn, #C0582F) 12%, var(--s1)); }
.debt-rows { display: grid; gap: 2px; margin-top: 10px; }
.debt-r { display: grid; grid-template-columns: 1fr auto 1fr auto; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; background: var(--s1); font-size: 14px; }
.debt-r small { color: var(--muted); font-size: 12px; text-align: right; }
.debt-r i { font-style: normal; font-size: 12px; color: var(--muted); min-width: 64px; text-align: right; }
.debt-r.ok { opacity: .62; } .debt-r.ok i { color: var(--inc, #2E8B57); }
.debt-r.now { box-shadow: inset 0 0 0 1.5px var(--accent); } .debt-r.now i { color: var(--accent); font-weight: 600; }
.debt-r.late i, .debt-r.part i { color: var(--warn, #C0582F); font-weight: 600; }

/* «Разнести на месяцы» (24.11.2026) */
.f-spread-h { margin: 6px 0 0 44px; }
