/* Основа оформления Мирона: переменные, элементы и движение, из которых собраны чат, стенд
   и личный кабинет. Страница подключает этот файл и base.js и своих цветов, размеров
   и анимаций не заводит. Все элементы вживую — index.html рядом.
   Обводок у элементов нет: форму держат заливка, тень и вдавленность. */

@import url("patterns/patterns.css");

/* Подмены шрифта на лету нет (optional): текст не прыгает. Страницы предзагружают четыре файла: Inter и Lora, кириллицу
   и латиницу. У Inter один файл на все начертания: толщина — ось внутри файла, страница качает его один раз.
   Файлы inter-500, -600, -700 в папке — те же байты: их зовут по имени уже выданные людям файлы (шаблоны в backend/miron/content). */
@font-face { font-family:'Inter'; font-weight:400 600; font-display:optional; src:url('fonts/inter-400-cyrillic.woff2') format('woff2'); unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family:'Inter'; font-weight:400 600; font-display:optional; src:url('fonts/inter-400-latin.woff2') format('woff2'); unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+2000-206F,U+20AC,U+2122,U+2212; }
@font-face { font-family:'Lora'; font-weight:400 700; font-display:optional; src:url('fonts/lora-400-700-cyrillic.woff2') format('woff2'); unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family:'Lora'; font-weight:400 700; font-display:optional; src:url('fonts/lora-400-700-latin.woff2') format('woff2'); unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+2000-206F,U+20AC,U+2122,U+2212; }

/* =====================================================================
   ПЕРЕМЕННЫЕ
   Четыре ручки на <html>, их ставит base.js и помнит браузер:
   data-theme  — light | dark
   data-accent — цвет: имена и порядок кружков — раздел «Акценты» ниже
   data-scale  — xs | s | m | l | xl
   data-pattern — рисунок фона: имя из patterns/patterns.css или none. Пока человек не выбрал сам, равен акценту.
   ===================================================================== */
:root {
  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-heading: 'Lora', Georgia, 'Times New Roman', serif;
  --mono: ui-monospace, 'Cascadia Mono', Consolas, monospace;

  /* Бумага и чернила. */
  /* Бумага --paper, всё остальное залито цветом --wash: страница, блоки, поля, край окна.
     --wash — сам акцент; у акцента, чья заливка почти чёрная, своя краска (чёрно-белый, красно-чёрный).
     В светлой теме у цветных акцентов бумага и --wash — чистые тона оттенка акцента (правило в разделе «Акценты»).
     --tint — сколько цвета в правом верхнем углу страницы: к --tint-end он сходит к цвету страницы.
     --fog — чем залиты тени у верхнего и нижнего края окна: в светлой теме цвет страницы с долей акцента, в тёмной —
     сам акцент, затемнённый ниже страницы (светлость .12) с долей его насыщенности: тень темнее страницы и в цвет акцента.
     Тем же цветом красится полоска телефона над страницей (base.js, tint): тень у верха переходит в неё без шва.
     --page — копия фона .bg (цветной угол и темнота углов) для теней чата: размером с окно и против верха окна она ложится на фон без шва.
     Светлая бумага глушит цвет, поэтому светлая тема берёт его вдвое-втрое щедрее тёмной. */
  --wash: var(--accent); --paper: #ECECE9;
  --bg: color-mix(in oklab, var(--wash) 8%, var(--paper)); --tint: 22%; --tint-end: 70%;
  --fog: color-mix(in oklab, var(--wash) 12%, var(--bg));
  --page: radial-gradient(120% 90% at 50% 45%, transparent 55%, var(--edge) 100%), linear-gradient(to bottom left, color-mix(in oklab, var(--wash) var(--tint), var(--paper)), var(--bg) var(--tint-end));
  --surface: color-mix(in oklab, var(--wash) 12%, #F5F5F3); --card: color-mix(in oklab, var(--wash) 9%, #FFFFFF); --field: color-mix(in oklab, var(--wash) 15%, #EFEFEC);
  --text: #1E1F1C; --text-2: #5E615A; --muted: #7D8078; --hairline: rgba(28,38,20,.1);
  --green: #3F6A2A; --green-soft: rgba(63,106,42,.1);
  --red: #A33A2A; --red-soft: rgba(163,58,42,.1);
  --series-1: #2A78D6; --series-2: #EB6834; --series-3: #1BAF7A; --series-4: #EDA100; --series-5: #E87BA4; --series-6: #008300; --series-7: #6250D6; --series-8: #E34948; --series-9: #0F96A3; --series-10: #9A6B3C;   /* статьи круговой диаграммы: цвет за статьёй, порядок не меняется */
  --amber: #8A5A00; --amber-soft: rgba(176,120,0,.13);   /* «устарел», «спорно», «есть несохранённая правка»: внимание без беды */
  --shadow: 0 1px 2px rgba(28,38,20,.05), 0 10px 28px rgba(28,38,20,.08);
  /* Вдавленность: поле, тихая кнопка, вложенный блок. Заменяет обводку. */
  --inset: inset 0 2px 4px rgba(28,38,20,.07), inset 0 -1px 1px rgba(255,255,255,.9);
  --cover: #1A1508;

  /* Акцент. --accent — заливка: кнопка, реплика человека, полоса. --accent-ink — тот же цвет
     для тонкого: текст, значок, галочка, линия в 2–3 px. --on-accent — текст поверх заливки.
     Краска цвета: --pen-1 и --pen-2 (середина --pen-mid, наклон --pen-angle, текст поверх --on-pen) — кружок цвета,
     цветной рисунок фона и капли Мирона. Реплики человека: --bubble-1 и --bubble-2 — низ и верх общего градиента,
     --on-bubble — текст поверх, --bubble-red — красный поверх; их считает одно правило из оттенка цвета (раздел «Акценты»). Сами цвета — в разделе «Акценты» ниже, по одному правилу на цвет; золотой стоит по умолчанию. */
  --pen-mid: color-mix(in oklab, var(--pen-1), var(--pen-2)); --pen-angle: 0deg;
  --bubble-l1: .84; --bubble-l2: .78; --bubble-c: .12; --bubble-turn: 5; --bubble-ink: #1E1F1C;
  --bubble-mid: color-mix(in oklab, var(--bubble-1), var(--bubble-2)); --bubble-red: var(--red);
  --accent-soft: color-mix(in srgb, var(--accent) 16%, transparent);
  --accent-glow: color-mix(in srgb, var(--accent) 42%, transparent);
  /* Ореол акцента вокруг карточки и главной кнопки: ровный, по форме элемента, без сдвига вбок. */
  --halo: color-mix(in srgb, var(--accent) 22%, transparent);

  /* Фон: затемнение краёв и два цвета, в которые красятся рисунки из левого нижнего угла.
     --deep — сколько чернил подмешано в краску рисунка: на светлой бумаге яркий цвет линии выцветает.
     --paint-boost — во сколько раз светлая тема щедрее к цвету рисунка, чем его --paint в patterns.css; вместе с --deep и серым слоем --pat держит рисунок читаемым на светлой бумаге.
     Сам рисунок, его шаг, видимость и сила цвета — переменные из patterns/patterns.css. */
  --edge: color-mix(in srgb, var(--wash) 14%, rgba(28,38,20,.05)); --paint-1: #7A4A22; --paint-3: #5F8F3A; --deep: 30%; --paint-boost: 1.75;

  /* Размер текста. Всё в rem: человек меняет --scale, и вся страница растёт вместе. --pick — что он выбрал;
     страница обычно живёт этим же размером, а сайт держит свой: крупный на компьютере, обычный на телефоне. */
  --scale: 1; --pick: 1;
  --fs-2xs: .6875rem; --fs-xs: .78rem; --fs-sm: .875rem; --fs-md: 1rem; --fs-lg: 1.25rem;
  --fs-read: 1.125rem;   /* основной текст для чтения, один на всё: реплики чата, посты Молвы, записи дневника, карточки аккаунта, статьи, окна */
  --fs-h3: 1.375rem; --fs-h2: 1.875rem; --fs-h1: 2.75rem; --fs-stat: 2.125rem; --fs-num: 3.5rem;
  /* Скругления: мелкая деталь, поле, карточка, таблетка. */
  --r-sm: 8px; --r-md: 16px; --r-lg: 22px; --r-pill: 999px;
  /* Шаг отступов. */
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 24px; --s-6: 40px; --s-7: 64px;
  /* Наименьшая область нажатия. */
  --hit: 44px;

  /* Движение: четыре длительности, вязкость колеса и шесть кривых. Своих чисел нет ни у элементов, ни у движков:
     JS читает их через Miron.motion() (base.js). --t-fast — отклик, --t — смена, --t-slow — появление
     и уход, --t-long — перелёт через экран. --ease — замедление к концу, --ease-spring — с лёгким
     перелётом, --ease-in — разгон в уход, --ease-flight — разгон и торможение, --ease-bounce —
     выскакивает и чуть перелетает, --ease-jelly — желе: пружина перелетает цель на шестую часть пути
     и, качнувшись обратно, встаёт (затухание 0,5, полтора качания за время движения). */
  --t-fast: 160ms; --t: 320ms; --t-slow: 620ms; --t-long: 1400ms;
  /* Перекраска кнопок, полей и плиток идёт за --t-tint (равна --t-fast). Пока тема или цвет меняются, base.js ставит
     на <html> data-tinting, и перекраска встаёт сразу: переходы цвета не заводятся вовсе, движение играет как было. */
  --t-tint: var(--t-fast);
  /* Вязкость колеса: за сколько лента догоняет щелчок колеса компьютера — главная (deck.js) и лента чата (chat.js). */
  --t-glide: 130ms;
  --ease: cubic-bezier(.22, .8, .24, 1); --ease-spring: cubic-bezier(.3, 1.08, .4, 1);
  --ease-in: cubic-bezier(.5, 0, .8, .4); --ease-flight: cubic-bezier(.5, 0, .2, 1); --ease-bounce: cubic-bezier(.3, 1.3, .5, 1);
  --ease-jelly: linear(0, .034, .124, .249, .394, .544, .687, .817, .927, 1.016, 1.082, 1.127, 1.153, 1.163, 1.159, 1.146, 1.127, 1.104, 1.079, 1.055, 1.034, 1.015, 1, .988, .98, .976, .974, .974, .976, .979, .982, .986, 1);
}
:root[data-tinting] { --t-tint: 0s; }
:root[data-theme="dark"] {
  /* Тёмная тема нейтральная, без зелени. Блоки едва окрашены выбранным акцентом. */
  --paper: #0C0C0D; --bg: var(--paper); --tint: 11%; --tint-end: 62%;
  --fog: oklch(from var(--wash) .12 calc(c * .2) h);
  --surface: color-mix(in oklab, var(--accent) 4%, #151516); --card: color-mix(in oklab, var(--accent) 7%, #19191B); --field: color-mix(in oklab, var(--accent) 3%, #111112);
  --text: #EDEDEB; --text-2: #A3A3A0; --muted: #7D7D7A; --hairline: rgba(255,255,255,.08);
  --green: #8FBF63; --green-soft: rgba(143,191,99,.12);
  --red: #E08A78; --red-soft: rgba(224,138,120,.12);
  --series-1: #3987E5; --series-2: #D95926; --series-3: #199E70; --series-4: #C98500; --series-5: #D55181; --series-6: #008300; --series-7: #9085E9; --series-8: #E66767; --series-9: #2FB4C0; --series-10: #B98A5C;
  --amber: #E0B062; --amber-soft: rgba(224,176,98,.13);
  --shadow: 0 1px 2px rgba(0,0,0,.16), 0 8px 24px rgba(0,0,0,.2);
  --halo: color-mix(in srgb, var(--accent) 13%, transparent);
  --inset: inset 0 2px 4px rgba(0,0,0,.3), inset 0 -1px 1px rgba(255,255,255,.04);
  --edge: rgba(0,0,0,.42);
  --paint-1: #8A5A2B; --paint-3: #8FBF63; --deep: 0%; --paint-boost: 1;
  --bubble-l1: .50; --bubble-l2: .43; --bubble-c: .10; --bubble-ink: #FFFFFF;
}
/* Акценты на выбор человека. Золотой, чёрно-белый и красные — свои, остальные сняты с тем Телеграма:
   --accent — цвет кнопки воспроизведения у входящего голосового, --pen-1 и --pen-2 — краска цвета, --pen-mid —
   середина, когда цветов три, --pen-angle — наклон. Реплики человека считает правило под списком;
   своими цветами их задаёт только чёрно-белый: в светлой теме серая, в тёмной — тёмно-серая.
   Каждое правило красит и страницу (data-accent на <html>), и кружок этого цвета в выборе (.swatches,
   data-set-accent): кружок показывает краску цвета, страницы своих цветов не держат.
   Это и есть список цветов: правило светлой темы с --accent-name — один кружок, имя — его подпись,
   порядок правил — порядок кружков (base.js читает его отсюда, страницы списка не держат). Новый цвет —
   два правила здесь, светлое и тёмное, и строка его фона в patterns/patterns.css. Тёмное правило каждого
   цвета привязано к его data-accent, поэтому порядок правил на цвета друг друга не влияет. */
:root[data-accent="mono"], .swatches [data-set-accent="mono"]   { --accent-name: "Чёрно-белый"; --accent: #1C2614; --accent-ink: #1C2614; --on-accent: #FFFFFF; --pen-1: #2E3A25; --pen-2: #1C2614; --on-pen: #FFFFFF; --snake: rgba(255,255,255,.7); --wash: #B5B9AE; --bubble-1: #CDD0C7; --bubble-2: #BEC2B8; --on-bubble: #1C2614; }
:root[data-accent="green"], .swatches [data-set-accent="green"]  { --accent-name: "Зелёный"; --accent: #35B34C; --accent-ink: #1F7A33; --on-accent: #FFFFFF; --pen-1: #6CB544; --pen-2: #2E9645; --on-pen: #FFFFFF; }
:root, .swatches [data-set-accent="gold"] { --accent-name: "Золотой"; --accent: #F4AE1C; --accent-ink: #8F6200; --on-accent: #2A2205; --snake: rgba(255,255,255,.95); --pen-1: #F7B92B; --pen-2: #F08C1A; --on-pen: #2A2205; }
:root[data-accent="orange"], .swatches [data-set-accent="orange"] { --accent-name: "Оранжевый"; --accent: #EE8A24; --accent-ink: #9A4F00; --on-accent: #2B1500; --pen-1: #D2902E; --pen-2: #C35E2C; --on-pen: #FFFFFF; }
/* Хохлома: золото переходит в киноварь. Красно-чёрный: заливка почти чёрная, тонкое и реплики — красные,
   страница залита красным. Вишнёвый: вишня уходит в вино. */
:root[data-accent="khokhloma"], .swatches [data-set-accent="khokhloma"] { --accent-name: "Хохлома"; --accent: #CF3A21; --accent-ink: #A8260F; --on-accent: #FFFFFF; --pen-1: #DA950B; --pen-mid: #C52D1F; --pen-2: #8E1A10; --on-pen: #FFFFFF; --pen-angle: 40deg; }
:root[data-accent="palekh"], .swatches [data-set-accent="palekh"] { --accent-name: "Красно-чёрный"; --accent: #3C1713; --bubble-hue: #B71A18; --accent-ink: #AC1B18; --on-accent: #FFFFFF; --pen-1: #331513; --pen-2: #B71A18; --on-pen: #FFFFFF; --snake: rgba(255,255,255,.7); --wash: #B71A18; }
:root[data-accent="cherry"], .swatches [data-set-accent="cherry"] { --accent-name: "Вишнёвый"; --accent: #9F1746; --accent-ink: #8B173D; --on-accent: #FFFFFF; --pen-1: #C82D45; --pen-2: #731946; --on-pen: #FFFFFF; }
:root[data-accent="sunset"], .swatches [data-set-accent="sunset"] { --accent-name: "Закат"; --accent: #E2437B; --accent-ink: #B8245B; --on-accent: #FFFFFF; --pen-1: #F08219; --pen-2: #CD4F6B; --on-pen: #FFFFFF; --pen-angle: 40deg; }
:root[data-accent="pink"], .swatches [data-set-accent="pink"]   { --accent-name: "Розовый"; --accent: #C45EE4; --accent-ink: #9636B8; --on-accent: #FFFFFF; --pen-1: #4E69B0; --pen-2: #C26EC6; --on-pen: #FFFFFF; }
:root[data-accent="mauve"], .swatches [data-set-accent="mauve"]  { --accent-name: "Сиреневый"; --accent: #8468CC; --accent-ink: #6448B0; --on-accent: #FFFFFF; --pen-1: #C05E86; --pen-2: #A45798; --on-pen: #FFFFFF; }
:root[data-accent="berry"], .swatches [data-set-accent="berry"]  { --accent-name: "Ягодный"; --accent: #5660E8; --accent-ink: #3F47C4; --on-accent: #FFFFFF; --pen-1: #E26D65; --pen-mid: #DB5FB6; --pen-2: #6760C2; --on-pen: #FFFFFF; }
:root[data-accent="blue"], .swatches [data-set-accent="blue"]   { --accent-name: "Сине-фиолетовый"; --accent: #3478F0; --accent-ink: #2359C4; --on-accent: #FFFFFF; --pen-1: #3C68FF; --pen-2: #994FE1; --on-pen: #FFFFFF; }
/* Морозный — холодный синий, бирюзовый — морская волна: раньше оба шли от синего к бирюзе и сливались. */
:root[data-accent="frost"], .swatches [data-set-accent="frost"]  { --accent-name: "Морозный"; --accent: #2FA3C4; --accent-ink: #157A96; --on-accent: #FFFFFF; --pen-1: #4D97AE; --pen-2: #4077A3; --on-pen: #FFFFFF; }
:root[data-accent="aqua"], .swatches [data-set-accent="aqua"]   { --accent-name: "Бирюзовый"; --accent: #009A9A; --accent-ink: #006C6C; --on-accent: #FFFFFF; --pen-1: #067F94; --pen-2: #29B69E; --on-pen: #FFFFFF; --pen-angle: 40deg; }
:root[data-theme="dark"][data-accent="mono"], :root[data-theme="dark"] .swatches [data-set-accent="mono"]   { --accent: #EAECE4; --accent-ink: #EAECE4; --on-accent: #0A0E0B; --pen-1: #EAECE4; --pen-2: #C9CCC0; --on-pen: #0A0E0B; --snake: rgba(10,14,11,.6); --wash: var(--accent); --bubble-1: #3F403D; --bubble-2: #30312E; --on-bubble: #EEEFEA; }
:root[data-theme="dark"][data-accent="green"], :root[data-theme="dark"] .swatches [data-set-accent="green"]  { --accent: #4FD164; --accent-ink: #5CD46E; --on-accent: #06210C; --pen-1: #6BA63B; --pen-2: #2E8D3D; }
:root[data-theme="dark"][data-accent="gold"], :root[data-theme="dark"] .swatches [data-set-accent="gold"] { --accent: #E8C25A; --accent-ink: #E8C25A; --pen-1: #E8C25A; --pen-2: #D9983A; }
:root[data-theme="dark"][data-accent="orange"], :root[data-theme="dark"] .swatches [data-set-accent="orange"] { --accent: #F0A03C; --accent-ink: #F0A03C; }
:root[data-theme="dark"][data-accent="khokhloma"], :root[data-theme="dark"] .swatches [data-set-accent="khokhloma"] { --accent: #EB5E43; --accent-ink: #EB5E43; --pen-1: #DE9D16; --pen-mid: #D33E25; --pen-2: #A0261A; }
:root[data-theme="dark"][data-accent="palekh"], :root[data-theme="dark"] .swatches [data-set-accent="palekh"] { --accent: #DA4339; --accent-ink: #EA6B5E; --pen-1: #4F1A18; --pen-2: #C93029; --wash: var(--accent); }
:root[data-theme="dark"][data-accent="cherry"], :root[data-theme="dark"] .swatches [data-set-accent="cherry"] { --accent: #DB4B6D; --accent-ink: #EA728D; --pen-1: #CC3148; --pen-2: #832151; }
:root[data-theme="dark"][data-accent="sunset"], :root[data-theme="dark"] .swatches [data-set-accent="sunset"] { --accent: #E74D83; --accent-ink: #F06A98; }
:root[data-theme="dark"][data-accent="pink"], :root[data-theme="dark"] .swatches [data-set-accent="pink"]   { --accent: #D579F1; --accent-ink: #D579F1; --on-accent: #2A0833; }
:root[data-theme="dark"][data-accent="mauve"], :root[data-theme="dark"] .swatches [data-set-accent="mauve"]  { --accent: #927AD4; --accent-ink: #A892E6; }
:root[data-theme="dark"][data-accent="berry"], :root[data-theme="dark"] .swatches [data-set-accent="berry"]  { --accent: #626AF0; --accent-ink: #8E94FF; }
:root[data-theme="dark"][data-accent="blue"], :root[data-theme="dark"] .swatches [data-set-accent="blue"]   { --accent: #3F88F6; --accent-ink: #6BA4FF; }
:root[data-theme="dark"][data-accent="frost"], :root[data-theme="dark"] .swatches [data-set-accent="frost"]  { --accent: #3BC3EE; --accent-ink: #3BC3EE; --on-accent: #04222C; }
:root[data-theme="dark"][data-accent="aqua"], :root[data-theme="dark"] .swatches [data-set-accent="aqua"]   { --accent: #28C2BE; --accent-ink: #28C2BE; --on-accent: #04201F; }
/* Реплики человека у всех цветов, кроме чёрно-белого, считаются одним правилом: от цвета берётся только оттенок
   (--bubble-hue, без него — --accent), а светлота низа и верха (--bubble-l1, --bubble-l2), потолок насыщенности
   (--bubble-c) и текст (--bubble-ink) — у темы. Светлая тема: светлая сочная заливка и тёмный текст, тёмная: заливка
   глубже и белый текст. Верх и низ расходятся по оттенку на --bubble-turn градусов: градиент едва заметен. Жёлтый
   и оранжевый с белым текстом становятся коричневыми, поэтому в тёмной теме у них светлая заливка и тёмный текст,
   а красный поверх неё — тёмный, как в светлой теме. */
:root:not([data-accent="mono"]) {
  --bubble-1: oklch(from var(--bubble-hue, var(--accent)) var(--bubble-l1) min(c, var(--bubble-c)) calc(h - var(--bubble-turn)));
  --bubble-2: oklch(from var(--bubble-hue, var(--accent)) var(--bubble-l2) min(c, var(--bubble-c)) calc(h + var(--bubble-turn)));
  --on-bubble: var(--bubble-ink); }
:root[data-theme="dark"]:is([data-accent="gold"], [data-accent="orange"]) { --bubble-l1: .80; --bubble-l2: .74; --bubble-c: .12; --bubble-ink: #1E1F1C; --bubble-red: #A33A2A; }
/* Тёмная тема: зелёный, хохлома, красно-чёрный и закат сочнее (потолок насыщенности .15), и у каждого свой тон:
   хохлома — огненная, красно-чёрный — глубокий, закат — светлый розовый. На общем потолке пятый и шестой
   выходили одним бурым, а восьмой сливался с вишнёвым. */
:root[data-theme="dark"]:is([data-accent="green"], [data-accent="khokhloma"], [data-accent="palekh"], [data-accent="sunset"]) { --bubble-c: .15; }
:root[data-theme="dark"][data-accent="khokhloma"] { --bubble-hue: #D4471C; --bubble-turn: -14; --bubble-l1: .54; --bubble-l2: .47; }
:root[data-theme="dark"][data-accent="palekh"] { --bubble-l1: .42; --bubble-l2: .34; }
:root[data-theme="dark"][data-accent="sunset"] { --bubble-turn: -18; --bubble-l1: .60; --bubble-l2: .52; }
/* Красный поверх красной реплики тёмной темы — наполовину цвет её текста: красное на красном не читается. */
:root[data-theme="dark"]:is([data-accent="khokhloma"], [data-accent="palekh"], [data-accent="cherry"], [data-accent="sunset"]) { --bubble-red: color-mix(in oklab, var(--red), var(--on-bubble)); }
/* Светлая тема у цветных акцентов: бумага — пастель оттенка акцента, --wash — его чистый тон. Сам акцент у золота
   и оранжевого тёмный и землистый: подмешанный в серую бумагу, он давал бежево-серый фон, и огни на нём грязнили. */
:root:not([data-theme="dark"]):not([data-accent="mono"]) {
  --paper: oklch(from var(--bubble-hue, var(--accent)) .95 .02 h); --wash: oklch(from var(--bubble-hue, var(--accent)) .72 .15 h); --tint: 24%; }
/* Значки фона у золотого красятся в свои зелень и охру, у остальных — в краску цвета. */
:root:not([data-accent="gold"]) { --paint-1: var(--pen-1); --paint-3: var(--pen-1); }
:root[data-scale="xs"] { --scale: .8; --pick: .8; } :root[data-scale="s"] { --scale: .9; --pick: .9; } :root[data-scale="l"] { --scale: 1.15; --pick: 1.15; } :root[data-scale="xl"] { --scale: 1.3; --pick: 1.3; }
/* Сайт (data-site на <html>): на компьютере крупный, как «Очень крупный», на телефоне обычный.
   В чате (data-chat) — размер, что выбрал человек. */
:root[data-site]:not([data-chat]) { --scale: 1.3; }
/* Низкое окно компьютера: сайт мельче, чтобы самый высокий экран, анкета, влезал в окно вместе с кнопкой. */
@media (min-width: 801px) and (max-height: 800px) { :root[data-site]:not([data-chat]) { --scale: 1.15; } }
@media (min-width: 801px) and (max-height: 740px) { :root[data-site]:not([data-chat]) { --scale: 1; } }
@media (min-width: 801px) and (max-height: 670px) { :root[data-site]:not([data-chat]) { --scale: .9; } }
@media (min-width: 801px) and (max-height: 630px) { :root[data-site]:not([data-chat]) { --scale: .8; } }
@media (max-width: 800px) { :root[data-site]:not([data-chat]) { --scale: 1; } }

/* =====================================================================
   СТРАНИЦА
   ===================================================================== */
* { box-sizing: border-box; margin: 0; }
* { scrollbar-width: thin; scrollbar-color: color-mix(in srgb, var(--accent) 45%, transparent) transparent; }
/* Вся страница в rem и растёт от одной переменной. Плавность даёт не переход font-size (он
   перевёрстывает страницу каждый кадр и дёргается), а снимок страницы: см. смену вида внизу файла. */
html { font-size: calc(100% * var(--scale)); -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: 100%; color-scheme: light; }
html[data-theme="dark"] { color-scheme: dark; }
/* Тени, свечения и волны записи могут выходить за колонку и режутся только краем окна.
   Контейнеры страницы сами ничего не обрезают. */
/* Страница не подстраивает прокрутку под сдвиги разметки: иначе шрифт, пришедший после первого
   кадра, каждый раз сползал бы страницу на несколько пикселей. Все восемь файлов шрифтов предзагружены. */
/* Масштаба двумя пальцами и двойным касанием нет, как в приложении: мелко — есть свой размер букв в кабинете.
   Прокрутка в обе стороны остаётся. Safari масштаб от этого не отдаёт, его держит base.js (gesturestart). */
html { overflow-x: clip; overflow-anchor: none; touch-action: pan-x pan-y; }
body { font-family: var(--font); color: var(--text); background: var(--bg); line-height: 1.65; font-size: var(--fs-md); }
/* Разговор идёт крупным текстом. */
.roomy { font-size: var(--fs-read); }
button, input, select, textarea { font: inherit; color: inherit; }
button, a, summary, input, select, textarea { -webkit-tap-highlight-color: transparent; }
:where(button, a, summary, input, select, textarea):focus-visible { outline: 2px solid var(--accent-glow); outline-offset: 2px; }
a { color: var(--accent-ink); text-underline-offset: 4px; }

/* Фон: цвет страницы и узор значков. Светящихся пятен нет: цвет несут сами значки. Нижний слой
   узора серый и еле виден, верхний красит те же значки градиентом — акцент из правого верхнего
   угла, зелень из левого нижнего, к середине экрана цвет сходит на нет.
   На телефоне фон — свой слой (will-change). Без него браузер подмешивает в слой фона страницу над ним, и любая
   её перемена — курсор, кнопка, реплика — перерисовывает под собой узор. Отчёт ?fps со среднего Андроида без слоя:
   в покое чата рывки 50–80 мс, все — рисование браузера, а не скрипты. Цена — память видеочипа размером с окно.
   На компьютере слоя нет: рисование там дешёвое, а текст страницы над слоем терял цветное сглаживание и светлел. */
.bg { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; background: linear-gradient(to bottom left, color-mix(in oklab, var(--wash) var(--tint), var(--paper)), var(--bg) var(--tint-end)); }
@media (pointer: coarse) { .bg { will-change: transform; } }
.bg::after { content: ''; position: absolute; inset: 0; background: radial-gradient(120% 90% at 50% 45%, transparent 55%, var(--edge) 100%); }
/* Обои: плитка шириной --pat-size повторяется. Картина на весь экран задаёт в patterns.css
   --pat-fit: cover, --pat-pos: center, --pat-rep: no-repeat и обрезается по краям, как фотообои.
   Маска одна на фон: серый слой (::before) и цвет поверх него (::after) рисуются внутри первого .pat, и файл
   рисунка грузится один раз. Второй элемент страниц, .pat.paint, не рисуется. */
.bg .pat { position: absolute; inset: 0;
  -webkit-mask: var(--pat-img) var(--pat-pos, 0 0) / var(--pat-fit, var(--pat-size) auto) var(--pat-rep, repeat);
  mask: var(--pat-img) var(--pat-pos, 0 0) / var(--pat-fit, var(--pat-size) auto) var(--pat-rep, repeat); }
.bg .pat.paint { display: none; -webkit-mask: none !important; mask: none !important; }   /* маску ему пишет и base.js (syncPattern): без неё файл не грузится второй раз */
.bg .pat::before, .bg .pat::after { content: ''; position: absolute; inset: 0; --pat: inherit; --paint: inherit; }
.bg .pat::before { background: var(--text); opacity: var(--pat); }
.bg .pat::after { opacity: calc(var(--paint) * var(--paint-boost)); background:
    radial-gradient(75% 60% at 100% 0%, color-mix(in oklab, var(--pen-2), #1E1F1C var(--deep)) 0%, color-mix(in oklab, var(--accent), #1E1F1C var(--deep)) 35%, transparent 75%),
    radial-gradient(75% 60% at 0% 100%, color-mix(in oklab, var(--paint-3), #1E1F1C var(--deep)) 0%, color-mix(in oklab, var(--paint-1), #1E1F1C var(--deep)) 40%, transparent 78%); }
/* Тихий фон для рабочих страниц, где текст лежит прямо на странице: цвет значков вдвое слабее. */
.bg.quiet .pat::after { opacity: calc(var(--paint) * var(--paint-boost) * .5); }
@media (max-width: 600px) { .bg .pat { -webkit-mask-size: var(--pat-fit, calc(var(--pat-size) * .4) auto); mask-size: var(--pat-fit, calc(var(--pat-size) * .4) auto); } }   /* на телефоне плитка в 2,5 раза мельче, чем на компьютере: на экран входит целая сценка */
/* Человек выключил рисунок фона: остаётся ровный цвет страницы. */
:root[data-pattern="none"] .bg .pat { display: none; }

/* Колонка страницы: узкая для разговора, широкая для кабинета и стенда. */
.page { position: relative; z-index: 1; width: min(100%, 1080px); margin: 0 auto; padding: var(--s-5) var(--s-5) var(--s-7); }
.page.narrow { width: min(100%, 720px); }
@media (max-width: 600px) { .page { padding: var(--s-4) var(--s-4) 96px; } }
/* Раскладка: ряд, две колонки, столбик. */
.row { display: flex; gap: var(--s-3); align-items: center; flex-wrap: wrap; }
.cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-4); align-items: start; }
.stack { display: grid; gap: var(--s-4); }
@media (max-width: 800px) { .cols { grid-template-columns: 1fr; } }

/* =====================================================================
   ТЕКСТ
   ===================================================================== */
h1, h2, h3 { font-family: var(--font-heading); font-weight: 600; letter-spacing: .005em; text-wrap: balance; }
h1 { font-size: var(--fs-h1); line-height: 1.1; }
h2 { font-size: var(--fs-h2); line-height: 1.2; }
h3 { font-size: var(--fs-h3); line-height: 1.25; }
@media (max-width: 600px) { h1 { font-size: calc(var(--fs-h1) * .78); } h2 { font-size: calc(var(--fs-h2) * .84); } }
/* Абзац для чтения: как в файле разбора — крупнее, просторнее, полным цветом. Серые только подписи. */
.lead { font-size: var(--fs-lg); line-height: 1.72; max-width: 640px; text-wrap: pretty; }
.small { font-size: var(--fs-sm); color: var(--text-2); }
.muted { color: var(--muted); }
.eyebrow { font-size: var(--fs-xs); font-weight: 600; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); }
.num { font-family: var(--font-heading); font-weight: 600; font-size: var(--fs-num); line-height: 1; color: var(--accent-ink); opacity: .75; font-variant-numeric: tabular-nums; }
code, .mono { font-family: var(--mono); font-size: .9em; }
/* Цитата: мягкая подложка и акцентная черта слева. */
/* Полоса акцента слева — фоном, а не внутренней тенью: тень на скруглённых краях при дробном сдвиге (лента едет)
   рисовала по контуру тёмную линию, которая то появлялась, то пропадала. */
.quote { padding: 20px 24px; border-radius: var(--r-md); background: linear-gradient(90deg, var(--accent) 4px, var(--field) 4px); font-weight: 500; line-height: 1.55; text-wrap: pretty; }
.quote p + p { margin-top: .8em; }
.quote cite { display: block; margin-top: var(--s-3); font-style: normal; font-weight: 400; font-size: var(--fs-sm); color: var(--muted); }
/* Документ для чтения (договор, политика): разделы с заголовком, абзацы и пункты списком с точкой акцента. */
.doc > section { display: grid; gap: var(--s-3); margin-top: var(--s-4); }
.doc h1 { hyphens: auto; overflow-wrap: anywhere; }   /* «конфиденциальности» шире телефона */
.doc h2 { font-size: var(--fs-h3); line-height: 1.25; }
.doc p, .doc li { line-height: 1.6; text-wrap: pretty; }
.doc ul { padding-left: 1.25em; display: grid; gap: var(--s-2); }
.doc li::marker { color: var(--accent-ink); }
.doc a { overflow-wrap: anywhere; }

/* =====================================================================
   КНОПКИ
   Состояния: покой, наведение (.is-hover), нажатие (.is-press), ожидание (.busy), недоступна.
   ===================================================================== */
.btn { position: relative; border: 0; cursor: pointer; border-radius: var(--r-pill); min-height: var(--hit); padding: 10px 22px; font-weight: 600; font-size: 1em; line-height: 1.3; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  background: var(--accent); color: var(--on-accent); box-shadow: 0 8px 18px -8px var(--accent-glow), inset 0 1px 0 rgba(255,255,255,.3);
  transition: transform var(--t-fast) var(--ease), filter var(--t-fast), background var(--t-tint), opacity var(--t-fast); }
.btn:not(:disabled):hover, .btn.is-hover { transform: translateY(-1px); filter: brightness(1.06) saturate(1.08); }
.btn:not(:disabled):active, .btn.is-press { transform: scale(.97); filter: brightness(.96); }
.btn:disabled { opacity: .45; cursor: default; box-shadow: none; }
/* Тихая кнопка: вдавлена в поверхность, без обводки. */
.btn.ghost { background: var(--field); color: var(--text); font-weight: 500; box-shadow: var(--inset); }
.btn.ghost:not(:disabled):hover, .btn.ghost.is-hover { background: var(--accent-soft); filter: none; }
/* Совсем тихая: только текст. */
.btn.quiet { background: transparent; color: var(--text-2); font-weight: 500; box-shadow: none; }
.btn.quiet:not(:disabled):hover, .btn.quiet.is-hover { background: var(--accent-soft); color: var(--text); filter: none; }
/* Опасная: то, что нельзя вернуть (удалить аккаунт, сбросить пин-код). */
.btn.bad { background: var(--red); color: var(--bg); box-shadow: none; }   /* буквы цвета бумаги: в тёмной теме красный светлый, и буквы на нём тёмные */
.btn.sm { min-height: 36px; padding: 6px 16px; font-size: var(--fs-sm); }
/* Большая: единственное действие экрана — вход, оплата. .block тянет кнопку на ширину поля над ней. */
.btn.lg { min-height: 3.75rem; padding: 14px 32px; font-size: var(--fs-lg); }
.btn.block, .glow.block { display: flex; width: 100%; } .glow.block > .btn { flex: 1; }
/* Ожидание: текст уходит, на его месте бегут столбики. Внутри кнопки — <span class="bars"> с шестью <i>. */
.btn .bars { display: none; }
.btn.busy { pointer-events: none; }
.btn.busy > :not(.bars) { visibility: hidden; }
.btn.busy .bars { display: inline-flex; position: absolute; inset: 0; justify-content: center; }
/* Круглая кнопка со значком: тема, закрыть, назад. */
.icon-btn { width: var(--hit); height: var(--hit); flex: none; border: 0; border-radius: 50%; cursor: pointer; display: inline-grid; place-items: center; background: var(--field); color: var(--text); box-shadow: var(--inset); font-size: var(--fs-lg); line-height: 1; transition: background var(--t-tint), transform var(--t-fast) var(--ease); }
.icon-btn > svg { width: 1.1em; height: 1.1em; }
.icon-btn:hover, .icon-btn.is-hover { background: var(--accent-soft); }
.icon-btn:active, .icon-btn.is-press { transform: scale(.94); }
/* Значки из двух палочек: плюс, крестик. */
.ic-plus, .ic-close { position: relative; display: inline-block; width: 18px; height: 18px; flex: none; }
.ic-plus::before, .ic-plus::after, .ic-close::before, .ic-close::after { content: ''; position: absolute; left: 1px; top: 8px; width: 16px; height: 2px; border-radius: 1px; background: currentColor; transition: transform var(--t) var(--ease); }
.ic-plus::after { transform: rotate(90deg); }
.ic-close::before { transform: rotate(45deg); } .ic-close::after { transform: rotate(-45deg); }
/* Главная кнопка страницы: по кромке бежит змейка. Обёртка .glow вокруг .btn, внутри — <i class="snake">. */
.glow { position: relative; display: inline-flex; vertical-align: top; border-radius: var(--r-pill); isolation: isolate; box-shadow: 0 5px 16px var(--halo); transition: transform var(--t-fast) var(--ease); }
.glow:hover { transform: translateY(-1px); } .glow:active { transform: scale(.97); }
.glow > .btn, .glow > .btn:not(:disabled):hover, .glow > .btn:not(:disabled):active { transform: none; box-shadow: inset 0 1px 0 rgba(255,255,255,.3); }
.snake { position: absolute; inset: 0; border-radius: inherit; z-index: 1; pointer-events: none; overflow: hidden; padding: 2px;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); mask-composite: exclude; }
.snake::before { content: ''; position: absolute; left: 50%; top: 50%; width: 320%; aspect-ratio: 1; margin: -160% 0 0 -160%; background: conic-gradient(transparent 0 55%, var(--snake) 72%, transparent 88% 100%); animation: spin 3.2s linear infinite; will-change: transform; }

/* =====================================================================
   ПОЛЯ
   ===================================================================== */
.field { display: grid; gap: 6px; min-width: 0; }
.field > span { font-size: var(--fs-sm); color: var(--text-2); }
.field input, .field select, .field textarea { width: 100%; min-height: var(--hit); border: 0; border-radius: var(--r-md); padding: 11px 16px; background: var(--field); color: var(--text); box-shadow: var(--inset); outline: none; transition: box-shadow var(--t-tint), background var(--t-tint); }
.field input::placeholder, .field textarea::placeholder { color: var(--muted); opacity: 1; }
.field input:focus, .field select:focus, .field textarea:focus, .field .is-focus { box-shadow: var(--inset), 0 0 0 1.5px color-mix(in srgb, var(--accent) 75%, transparent); }
.field [aria-invalid="true"], .field input[aria-invalid="true"]:focus { box-shadow: var(--inset), 0 0 0 1.5px color-mix(in srgb, var(--red) 60%, transparent); background: color-mix(in srgb, var(--red) 6%, var(--field)); }
.field .err { font-size: var(--fs-sm); color: var(--red); }
.field input[type="number"] { appearance: textfield; -moz-appearance: textfield; }
.field input::-webkit-inner-spin-button, .field input::-webkit-outer-spin-button { appearance: none; margin: 0; }
.field.lg input, .field.lg select { min-height: 3.75rem; padding: 14px 24px; font-size: var(--fs-lg); border-radius: var(--r-pill); }   /* в пару к .btn.lg */
.field select { appearance: none; padding-right: 40px; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 21px) 50%, calc(100% - 16px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
.fields { display: flex; gap: var(--s-3); align-items: end; flex-wrap: wrap; }
.fields > .field { flex: 1 1 200px; }
/* Переключатель из нескольких положений: размер шрифта, период. */
/* Бегунок .thumb ставит base.js. Он тянется: передний край уходит быстро, задний догоняет с пружиной. */
.seg { position: relative; display: inline-flex; max-width: 100%; padding: 4px; gap: 2px; border-radius: var(--r-pill); background: var(--field); box-shadow: var(--inset); }
.seg .thumb { position: absolute; top: 4px; bottom: 4px; border-radius: var(--r-pill); background: var(--card); box-shadow: var(--shadow); pointer-events: none; }
.seg[data-dir="r"] .thumb { transition: right .26s var(--ease), left .56s cubic-bezier(.3, 1.45, .45, 1); }
.seg[data-dir="l"] .thumb { transition: left .26s var(--ease), right .56s cubic-bezier(.3, 1.45, .45, 1); }
.seg button { position: relative; z-index: 1; border: 0; background: none; cursor: pointer; flex: 0 1 auto; min-width: 0; min-height: 36px; padding: 6px clamp(8px, .9em, 16px); border-radius: var(--r-pill); font-size: var(--fs-sm); font-weight: 500; white-space: nowrap; color: var(--text-2); transition: background var(--t-tint), color var(--t-tint), box-shadow var(--t-tint); }
.seg button:hover { color: var(--text); }
.seg button[aria-pressed="true"] { color: var(--text); }
.seg:not([data-ready]) button[aria-pressed="true"] { background: var(--card); box-shadow: var(--shadow); }
/* Ужимается на узком экране: переключатель не шире строки, у кнопок поля меньше, не влезло слово — троеточие. */
.seg.squeeze { min-width: 0; }
@media (max-width: 600px) { .seg.squeeze button { padding-inline: 7px; overflow: hidden; text-overflow: ellipsis; } }
/* Выбор акцента: кружки, выбранный крупнее и с галочкой. */
.swatches { display: flex; gap: var(--s-3); flex-wrap: wrap; }
/* Кружок цвета — краска этого цвета: свои --pen-1 и --pen-2 ему даёт правило акцента,
   середину он считает сам, у трёхцветного она своя. Тень и галочка — тоже из его цветов. */
.swatches button { width: 40px; height: 40px; border-radius: 50%; border: 0; cursor: pointer; --pen-angle: 0deg; --pen-mid: color-mix(in oklab, var(--pen-1), var(--pen-2)); background: linear-gradient(var(--pen-angle), var(--pen-1), var(--pen-mid), var(--pen-2)); display: grid; place-items: center; transition: transform var(--t) var(--ease-spring); }
.swatches button:hover { transform: scale(1.08); }
.swatches button[aria-pressed="true"] { transform: scale(1.18); box-shadow: 0 8px 18px -6px var(--pen-mid); }
/* Выбор рисунка фона: плитка показывает сам рисунок и его название. Рисунок и название плитка берёт
   из patterns/patterns.css по своему data-pattern. В кнопке видна самая крупная сцена рисунка —
   готовая квадратная картинка --peek-img, её снимает peek.js из скила risovka-fona. Полный SVG фона кнопка
   не рисует: 22 рисунка перерисовывались на каждом кадре, пока экран едет при прокрутке. Сцена в картинке
   стоит на 40% высоты, поэтому и в кнопке 4:3, и в квадратной на телефоне она встаёт на 40% высоты. */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(6.5rem, 1fr)); gap: var(--s-3); }
.tiles button { position: relative; width: auto; aspect-ratio: 4 / 3; border: 0; border-radius: var(--r-md); cursor: pointer; overflow: hidden; --tile: var(--field); background: var(--tile); box-shadow: var(--inset); color: var(--text-2); font-size: var(--fs-2xs); display: grid; align-items: end; padding: 0; transition: transform var(--t) var(--ease-spring), background var(--t-tint), box-shadow var(--t-tint); }
.tiles button::before { content: ''; position: absolute; inset: 0; background: var(--text); opacity: .5; -webkit-mask: var(--peek-img) 50% 40% / 100% auto no-repeat; mask: var(--peek-img) 50% 40% / 100% auto no-repeat; }
.tiles button[data-pattern="none"]::before { display: none; }
.tiles button::after { content: var(--pat-name); position: relative; padding: 16px 4px 6px; background: linear-gradient(to top, var(--tile) 58%, transparent); }
.tiles button[data-set-pattern="auto"]::after { content: "Как у акцента"; }
.tiles button:hover { transform: scale(1.04); }
.tiles button[aria-pressed="true"] { transform: scale(1.1); --tile: var(--card); box-shadow: var(--shadow); color: var(--accent-ink); font-weight: 600; }
.tiles button[aria-pressed="true"]::before { background: var(--accent-ink); opacity: .75; }
.swatches button[aria-pressed="true"]::after { content: ''; width: 7px; height: 13px; margin-top: -3px; border: solid var(--on-pen); border-width: 0 2.4px 2.4px 0; transform: rotate(45deg); }
@media (max-width: 600px) { .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } .tiles button { aspect-ratio: 1; } }   /* на телефоне три колонки во всю ширину */
/* Лента выбора (base.js, strip): кружки цвета или плитки фона в одну полосу —
   <div class="strip"><div class="swatches" data-swatches></div></div>. Полоса выходит почти до краёв карточки (--edge —
   на два пикселя меньше её отступа, иначе полоса вылезет за скруглённый угол) и гаснет к ним краской карточки
   (--strip-bg): видно, что предметов больше. Режется лента только по бокам:
   рост выбранного и тени сверху и снизу целы. Сколько предметов в окне (--per), считает base.js по ширине окна
   ленты и желанной ширине предмета --item: на телефоне три плитки и пять кружков, в широкой карточке больше;
   предметы делят окно поровну, и слева всегда целый. Кружки крупнее, чем в сетке. */
.strip { --edge: 22px; --gap: var(--s-3); --strip-bg: var(--card); position: relative; margin-inline: calc(-1 * var(--edge)); padding-inline: var(--edge); overflow-x: clip; container-type: inline-size; touch-action: pan-y; user-select: none; -webkit-user-select: none; cursor: grab; }
.strip::before, .strip::after { content: ''; position: absolute; z-index: 1; top: 0; bottom: 0; width: var(--edge); pointer-events: none; background: linear-gradient(90deg, var(--strip-bg), transparent); }
.strip::before { left: 0; }
.strip::after { right: 0; transform: scaleX(-1); }
.strip.held, .strip.held button { cursor: grabbing; }
.strip > .swatches, .strip > .tiles { position: relative; display: flex; flex-wrap: nowrap; gap: var(--gap); width: max-content; }
.strip > .swatches { --per: 5; --item: 54px; }
.strip > .tiles { --per: 3; --item: 6.5rem; }
.strip > * > button { flex: none; width: calc((100cqi - (var(--per) - 1) * var(--gap)) / var(--per)); }
.strip > .swatches > button { height: auto; aspect-ratio: 1; }
.strip > .tiles > [data-set-pattern="auto"] { display: none; }   /* выбор прямой: рисунок или без него */
@media (max-width: 600px) { .strip { --edge: 16px; } }

/* =====================================================================
   КАРТОЧКА, ВЛОЖЕННЫЙ БЛОК, СПОЙЛЕР
   ===================================================================== */
[hidden] { display: none !important; }   /* hidden сильнее display у класса: скрытая карточка не занимает места */
.card { background: var(--card); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: 22px 24px 20px; display: grid; gap: var(--s-4); }
.card p { color: var(--text-2); }
.card ul { list-style: none; padding: 0; display: grid; gap: var(--s-3); }
/* Карточка-предложение: вместо кромки — тёплое свечение под ней. */
.card.edge { box-shadow: var(--shadow), 0 4px 30px var(--halo); }
.well { background: var(--field); border-radius: var(--r-md); padding: var(--s-4); box-shadow: var(--inset); }
@media (max-width: 600px) { .card { padding: 18px 18px 16px; } }
.dots li { position: relative; padding-left: 22px; color: var(--text-2); }
.dots li::before { content: ''; position: absolute; left: 2px; top: .58em; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
/* Спойлер: плюс поворачивается в минус, блок раскрывается как желе (движение ведёт base.js).
   Разметка: <details class="spoiler"><summary><i class="ic-plus"></i>Название</summary><div class="wrap"><div class="in">…</div></div></details> */
.spoiler { border-radius: var(--r-md); background: var(--field); box-shadow: var(--inset); transform-origin: 50% 0; }
.spoiler > summary { cursor: pointer; list-style: none; min-height: var(--hit); padding: 14px 18px; display: flex; align-items: center; gap: var(--s-3); font-weight: 500; border-radius: inherit; }
.spoiler > summary::-webkit-details-marker { display: none; }
.spoiler > summary .ic-plus { color: var(--accent-ink); }
.spoiler[data-open="true"] > summary .ic-plus::after { transform: rotate(0); }
.spoiler > summary .side { margin-left: auto; font-size: var(--fs-xs); color: var(--muted); font-weight: 400; }
.spoiler.title > summary { font-family: var(--font-heading); font-size: var(--fs-lg); font-weight: 600; }
.spoiler > .wrap { overflow: hidden; }
.spoiler .in { padding: 0 18px 18px 48px; color: var(--text-2); }
@media (max-width: 600px) { .spoiler .in { padding-left: 18px; } }

/* =====================================================================
   РАЗГОВОР
   ===================================================================== */
.feed-in { display: flex; flex-direction: column; gap: var(--s-3); }
.msg { max-width: 88%; padding: 12px 17px; border-radius: 20px; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg.miron { align-self: flex-start; background: var(--card); box-shadow: var(--shadow); border-bottom-left-radius: 6px; }
/* Реплики человека красит один общий градиент на видимую высоту ленты, как в Telegram: внизу --bubble-1, вверху
   --bubble-2. Реплика — окошко в него: у низа экрана светлая, у верха густая, при прокрутке цвет едет по ней.
   Кусок градиента сдвигает сам браузер по месту реплики в ленте (animation-timeline: view()), скрипт ничего не
   считает; высоту ленты даёт чат-контейнер (100cqh). Градиент лежит в подслое ::before: каждый кадр прокрутки
   перерисовывается только он, а не реплика с текстом и кромкой (с кромкой в самой реплике телефон ×6 терял
   до половины кадров). Шкалу даёт сама реплика (view-timeline --me), подслой едет по ней: своё место у подслоя
   Safari не считает, и каждая реплика показывала свой кусок. Анимация метки (--slice) на самой реплике вместо
   этого пересчитывала стили всех реплик каждый кадр: телефон ×6, 60 → 23 кадра/с.
   Реплика может ехать и расти через transform: кусок берётся по её месту в вёрстке.
   Капля пузыря (bubble.js) красится тем же градиентом по рамке ленты. Где браузер так не умеет (старый Safari),
   подслой несёт свой градиент целиком. */
.chat { container-type: size; }
/* В чате выделяется только текст реплик и поля ввода: касание фона, кромки поля или кнопки ничего не выделяет. */
.chat { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.chat .msg, .chat textarea { -webkit-user-select: text; user-select: text; -webkit-touch-callout: default; }
.chat .feed { -webkit-tap-highlight-color: transparent; }   /* лента слушает нажатия (выбор, значок ошибки): Андроид иначе заливает её синим */
/* Разделы кабинета (Дневник, Аккаунт, статьи) лежат в том же чате, но это чтение: их текст выделяется, кнопки — нет. */
.chat .cab-pane { -webkit-user-select: text; user-select: text; -webkit-touch-callout: default; }
.chat .cab-pane :is(button, .btn, .seg, [role="button"]) { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.msg.me { align-self: flex-end; position: relative; color: var(--on-bubble); border-bottom-right-radius: 6px; box-shadow: var(--shadow); }
.msg.me:not(.skel) { isolation: isolate; }
.msg.me:not(.skel)::before { content: ''; position: absolute; inset: 0; z-index: -1; border-radius: inherit; pointer-events: none;
  background: var(--bubble-mid) linear-gradient(to top, var(--bubble-1), var(--bubble-mid), var(--bubble-2)); }
@supports (animation-timeline: view()) {
  .msg.me:not(.skel) { view-timeline: --me block; }
  .msg.me:not(.skel)::before { background-size: 100% 100cqh; background-repeat: no-repeat; animation: slice linear both; animation-timeline: --me; }
  .chat.ringed .msg.me:not(.skel)::after { will-change: transform; }
}
/* Кромка реплики человека — рисунок фона полосой в 7px по краю, цветом текста реплики на 45 %, поверх градиента.
   Файл рисунка --ring-img и класс ringed ставит чату chat.js: переменные рисунка не наследуются, и цепочка через
   всю страницу пересчитывала бы её вид. Без рисунка класса нет и кромки нет. Плитка --ring-size мелкая:
   в полосе должны читаться фигурки. Где градиент едет за прокруткой (@supports выше), кромка — свой слой (will-change):
   рисуется раз, а не каждый кадр прокрутки. В Safari градиент стоит, и слой на каждую реплику только утяжелял сборку кадра. */
.chat.ringed .msg.me:not(.skel)::after { content: ''; position: absolute; inset: 0; z-index: -1; padding: 7px; border-radius: inherit; pointer-events: none;
  background: var(--on-bubble); opacity: .45;
  -webkit-mask: var(--ring-img) 0 0 / var(--ring-size, 100px) auto repeat, linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: source-in, xor;
  mask: var(--ring-img) 0 0 / var(--ring-size, 100px) auto repeat, linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: intersect, exclude; }
/* Та же кромка у реплик Мирона — цветом текста на 25 %, подслоем ::before. */
.chat.ringed .msg.miron:not(.skel) { position: relative; isolation: isolate; }
.chat.ringed .msg.miron:not(.skel)::before { content: ''; position: absolute; inset: 0; z-index: -1; padding: 7px; border-radius: inherit; pointer-events: none;
  background: var(--text); opacity: .25;
  -webkit-mask: var(--ring-img) 0 0 / var(--ring-size, 100px) auto repeat, linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: source-in, xor;
  mask: var(--ring-img) 0 0 / var(--ring-size, 100px) auto repeat, linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: intersect, exclude; }
@keyframes slice { from { background-position: 0 calc(0% - 100cqh); } to { background-position: 0 calc(100% + 100cqh); } }
/* Голосовое ушло на расшифровку: в реплике человека бегут столбики. */
.msg.pending { display: flex; align-items: center; justify-content: center; min-width: 96px; min-height: 42px; }
.msg.me.pending .bars { color: inherit; opacity: .8; }
/* Звёздочка избранного (chat.js, mark): в правом нижнем углу реплики, на последней строке, если там есть место
   (как время у сообщения Молвы); цвет текста реплики, тише. Обычно она внутри времени (ниже); здесь — пока
   времени у реплики нет: серединой на середине будущего времени, низом там же, где его низ. */
.msg-star { float: right; display: block; width: 1em; height: 1em; margin: calc(var(--fs-2xs) * 1.5 - .5em) -7px calc(var(--fs-2xs) * .5 - .5em - 3px) 10px; opacity: .55; }
.msg-star > svg { display: block; width: 100%; height: 100%; }
.msg.rich > :is(.msg-star, .msg-rate), .msg.voice > :is(.msg-star, .msg-rate) { margin-top: calc(4px + var(--fs-2xs) * .5 - .5em); }
/* Время реплики (chat-miron.js, «время»): справа внизу, на последней строке, если там есть место, как в Молве.
   Тише цветом букв, а не прозрачностью: красный значок рядом остаётся в полную силу. Оценка и звёздочка стоят
   внутри времени перед его словами: группа одна, в узкой последней строке значок не падает строкой ниже один.
   Значок — высотой с букву реплики (--msg-em, посчитано в точках на самой реплике), серединой на середине
   времени; лишняя высота уходит в отрицательные отступы, и время со значком не выше времени без него. */
@property --msg-em { syntax: '<length>'; inherits: true; initial-value: 16px; }
.msg { --msg-em: 1em; }
.msg-time { float: right; display: flex; align-items: center; margin: 1em -5px -3px 12px; font-size: var(--fs-2xs); line-height: 1; color: color-mix(in srgb, currentColor 55%, transparent); font-variant-numeric: tabular-nums; }
.msg.rich > .msg-time, .msg.voice > .msg-time { margin-top: 4px; }
.msg-time > :is(.msg-star, .msg-rate) { float: none; flex: none; width: var(--msg-em); height: var(--msg-em); margin: calc((1em - var(--msg-em)) / 2) 10px calc((1em - var(--msg-em)) / 2) 0; }
.msg-time > .msg-star { opacity: 1; }   /* время уже тише цветом */
.msg-time > .msg-rate:has(+ .msg-star) { margin-right: 8px; }
.msg-time, .voice-row { -webkit-user-select: none; user-select: none; }   /* нажатия рядом не выделяют время */
/* Недоехавшая реплика человека (chat-miron.js, «недоехавшее»): красный значок линией и слово «ошибка» слева от времени —
   кнопка без заливки, как у недоехавшего в Молве; цвет — красный поверх реплики (--bubble-red). Время со значком
   уходит строкой под текст: реплика не становится шире текста. */
.msg.unsent > .msg-time { float: none; clear: both; justify-content: flex-end; margin: .5em -5px -3px 0; }
.msg-bad { position: relative; display: inline-flex; align-items: center; gap: 3px; margin: -.3em 6px -.3em 0; border: 0; padding: 0; background: none; color: var(--bubble-red); font: inherit; line-height: 1; cursor: pointer; }
.msg-bad > svg { flex: none; width: 1.3em; height: 1.3em; }
.msg-bad::after { content: ''; position: absolute; inset: -12px; }   /* палец попадает и рядом со значком */
/* Выбор реплик (chat-miron.js, «Выбрать»): реплики Мирона стоят правее на ширину кружка (36px), кружок у каждой
   слева, посередине высоты реплики, маленьким пузырём; отмеченный — залит акцентом, в нём белая галочка.
   Текст не выделяется. */
.feed-in.picking, .feed-in.picking .msg { user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.feed-in.picking > .msg { position: relative; cursor: pointer; }
.feed-in.picking > .msg.shift { translate: 36px 0; }
.pick-dot { position: absolute; top: calc(50% - 12px); width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center;
  background: var(--card); box-shadow: var(--shadow); color: transparent; pointer-events: none; transition: background var(--t-tint), box-shadow var(--t-tint), color var(--t-tint); }
.pick-dot > svg { width: 16px; height: 16px; }
.picked > .pick-dot { background: var(--accent); box-shadow: none; color: var(--on-accent); }
/* Реплика, на которой что-то сломалось (видит только стенд): под текстом причина на красной подложке. */
.msg .why { display: block; margin: 10px -5px -2px; padding: 8px 12px; border-radius: 12px; background: var(--red-soft); font-family: var(--mono); font-size: var(--fs-xs); line-height: 1.5; color: var(--red); }
.divider { align-self: center; font-size: var(--fs-xs); color: var(--muted); padding: 6px 12px; border-radius: var(--r-pill); background: var(--accent-soft); margin: 6px 0; }
.divider b { color: var(--text-2); font-weight: 500; }
/* Плашка дня (chat.js, days) и дата под шапкой, пока человек листает (.day-float): лежит в шапке чата поверх её дымки
   и под её кнопками, две плашки — нынешний день и следующий, въехавший в дымку. Копия встаёт ровно на место плашки
   из ленты, поэтому обе залиты одинаково и без просвета. Плашка ленты спрятана, пока её показывает дата (.pinned),
   и когда день начался выше загруженного (.open). --day-lift — сколько низа шапки занимает дымка под кнопками:
   на столько дата стоит выше низа шапки, в 6px под кнопками; у чата раздела шапка-место на 8px ниже. */
.chat { --day-lift: 20px; }
.chat.molva-room { --day-lift: 12px; }
.chat .divider.day, .day-float > .divider { background: linear-gradient(var(--accent-soft), var(--accent-soft)), var(--bg); }
.feed-in > .divider.day:is(.pinned, .open) { visibility: hidden; }
.day-float { position: absolute; left: 0; top: 0; z-index: -1; pointer-events: none; opacity: 0; transition: opacity var(--t); }
.day-float.on { opacity: 1; }
.day-float > .divider { position: absolute; left: 0; top: 0; margin: 0; white-space: nowrap; }
.day-float > .divider:first-child { translate: 0 -.5rem; transition: translate var(--t) var(--ease); }   /* нынешний день выходит из-под шапки */
.day-float.on > .divider:first-child { translate: none; }
.day-float.still, .day-float.still > .divider { transition: none; }   /* плашка ленты уже стояла в дымке: копия встаёт на её место сразу */
.chat.cab:not([data-at="chat"]) > .chat-head > .day-float[data-own] { visibility: hidden; }   /* дата чата с Мироном в другой раздел не едет */
.note { align-self: center; font-size: var(--fs-xs); color: var(--muted); text-align: center; max-width: 80%; }
.note.bad { color: var(--red); }   /* что пошло не так: строка под кнопкой входа (signin.js) */
/* Карточка в ленте (chat.js, card): не реплика, а вещь между ними, например выбор размера букв. Слова в ней
   идут размером реплик: они и есть образец. */
.chat-card { align-self: center; max-width: 88%; padding: 14px 18px 16px; border-radius: 20px; background: var(--card); box-shadow: var(--shadow); display: grid; justify-items: center; gap: 12px; text-align: center; }
.chat-card p { color: var(--text); }
/* Карточка вида (chat-miron.js) и меню тестового чата — подложка и поля карточки ленты (.widget), слова по левому краю. */
.chat-card.look, .chat-card.test-menu { width: min(100%, 30rem); max-width: 100%; padding: 16px 18px; gap: 10px; border-radius: var(--r-lg); justify-items: stretch; text-align: left; }
.chat-card.look > p, .chat-card.test-menu > p { font-size: var(--fs-md); line-height: 1.45; }
/* Карточка вида: слова, размер букв и тема в ряд, под ними ленты цвета и фона (parts.js, «вид»). */
.looks > .row { justify-self: center; }
/* Тестовый чат (test-chat.js): меню этапов — кнопки в несколько рядов; сцены — карточки дизайна во всю ширину колонки. */
.test-stages { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.chat-card.test-menu .test-stages { justify-content: flex-start; }
.test-stages .side { font-size: var(--fs-xs); color: var(--muted); font-weight: 400; }
.bare.test-scene { align-self: center; width: min(100%, 30rem); }
/* Карточка ленты чата — один вид на все (parts.js, Miron.widget; образцы — вкладка «Виджеты», widgets.html).
   Спокойная вещь ленты: не громче реплики рядом. Подложка — цвет карточки и обычная тень. Видов текста четыре:
   тихая строка над заголовком, заголовок на ступень крупнее текста, основной текст полным цветом, кнопка.
   Значок слева (art) — круг 2,5rem вровень с заголовком. Кнопки — в ряд под текстом, от его левого края, обычного
   роста (--hit); одна кнопка — во всю ширину текста. Главная — акцентом, вторая (alt) — тихое слово рядом, одна тихая —
   заливкой поля, два равных выбора (pair) — две одинаковые кнопки-поля. --pad и --foot — поля карточки: ими же
   ровняются вещи, которым нужен край карточки (quiz, series-card). */
.widget { --pad: 18px; --foot: 16px; gap: 10px; padding: var(--foot) var(--pad); box-shadow: var(--shadow); text-align: left; }
.widget p, .widget li, .widget .spoiler .in { color: var(--text); font-size: var(--fs-md); line-height: 1.45; }
.widget p.small { font-size: var(--fs-xs); font-weight: 500; color: var(--text-2); }
.widget h3 { font-size: 1.125rem; line-height: 1.3; text-wrap: balance; }
.widget .dots { gap: 6px; }
.widget .dots li { padding-left: 18px; }
.widget .dots li::before { width: 6px; height: 6px; top: .6em; }
.widget-top { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--s-3); align-items: center; }
.widget-top > div { display: grid; gap: 2px; }
.widget .way-ic, .widget .mic-seal { width: 2.5rem; height: 2.5rem; }
.widget .way-ic > svg, .widget .mic-seal > svg { width: 1.25rem; height: 1.25rem; }
.widget .mic-seal > i { width: 18px; height: 18px; right: -4px; bottom: -4px; }
.widget .mic-seal > i svg { width: 10px; height: 10px; }
.widget .file-art { zoom: .7; }
/* Карточка с ценой: цена справа от заголовка ростом с него — в строку, в две (--lines ставит parts.js по высоте заголовка). */
.widget-price { display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); }
.widget-price .num { opacity: 1; white-space: nowrap; font-size: calc(var(--lines, 1) * 1.4625rem); line-height: 1; }
.widget-body, .widget .spoiler .in { display: grid; gap: 8px; }
.widget-body > ol { margin: 0; }
.widget-go { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); margin-top: var(--s-1); }
.widget-go > .btn { flex: none; min-height: var(--hit); padding: 0 20px; font-size: var(--fs-md); box-shadow: none; }
.widget-go > .btn:only-child { flex: 1; }   /* одна кнопка — во всю ширину текста */
.widget-go > .btn:not(:disabled):hover, .widget-go > .btn:not(:disabled):active { transform: none; }
.widget-go > .btn.alt { background: transparent; color: var(--text-2); font-weight: 500; padding-inline: 14px; }
.widget-go > .btn.alt:only-child { background: var(--field); color: var(--text); box-shadow: var(--inset); padding-inline: 20px; }
.widget.stack .widget-go { flex-direction: column; align-items: stretch; }   /* надписи длинные: главная во всю ширину, тихая под ней */
.widget.pair .widget-go > .btn { background: var(--field); color: var(--text); font-weight: 500; box-shadow: var(--inset); padding-inline: 18px; }
/* Одна фраза и короткий ответ: кнопка справа в той же строке. */
.widget .acc-line b { font-size: var(--fs-md); }
/* Тарифы плитками (pay.js): в карточке тарифов чата и в Аккаунте. Плитка — кнопка целиком, цена в ней — вид кнопки.
   Выделенный тариф приподнят и светится, над именем подпись «Чаще выбирают»; в тёмной теме карточка и подложка почти
   одного цвета, поэтому у него свой оттенок акцента. */
.pay-tiles { display: grid; gap: 10px; }
.pay-tile { position: relative; display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); width: 100%; margin: 0; padding: 12px 14px;
  border: 0; border-radius: var(--r-md); background: var(--field); box-shadow: var(--inset); color: var(--text); font: inherit; text-align: left; cursor: pointer;
  transition: transform var(--t-fast) var(--ease); }
.pay-tile:active { transform: scale(.985); }
.pay-tile.top { padding-top: 1.75rem; background: var(--card); box-shadow: var(--shadow), 0 0 28px var(--halo); }
:root[data-theme="dark"] .pay-tile.top { background: color-mix(in oklab, var(--accent) 10%, var(--card)); box-shadow: var(--shadow), 0 0 32px var(--halo); }
.pay-badge { position: absolute; top: 8px; left: 14px; font-size: var(--fs-2xs); font-weight: 600; letter-spacing: .02em; text-transform: uppercase; color: var(--accent-ink); }
.pay-what, .pay-price { display: grid; gap: 2px; min-width: 0; }
.pay-what b { font-family: var(--font-heading); font-size: var(--fs-md); font-weight: 600; line-height: 1.25; }
.pay-what > span { font-size: var(--fs-sm); line-height: 1.4; }
.pay-price { flex: none; justify-items: end; text-align: right; }
.pay-price .btn { min-width: 5.5rem; min-height: 2.25rem; padding: 0 14px; font-size: var(--fs-sm); white-space: nowrap; pointer-events: none; }
.pay-price small { font-size: var(--fs-xs); white-space: nowrap; }
/* Тарифы в Аккаунте (account.js, .acc-fares): общей карточки нет — заголовок на бумаге, каждый тариф своей карточкой,
   ниже цены ответов. Выделенный — с оттенком акцента и светом, цена в таблетке акцента; у остальных цена словом.
   Образец — «кабинет/тарифы» на витрине. */
.acc-fares { display: grid; gap: 10px; }
.acc-fares > b { padding: 10px 6px 2px; font-family: var(--font-heading); font-size: var(--fs-h3); font-weight: 600; line-height: 1.2; }
.acc-fares > .pay-cost { list-style: none; margin: 0; padding: 4px 6px 0; display: grid; gap: var(--s-3); }   /* без карточки .card ul не действует */
.acc-fares > .note { padding: 0 6px; }
.pay-tiles.loose .pay-tile { padding: 16px 18px; border-radius: var(--r-lg); background: var(--card); box-shadow: var(--shadow); }
.pay-tiles.loose .pay-tile.top { padding-top: 2.2rem; background: color-mix(in oklab, var(--accent) 20%, var(--card)); box-shadow: var(--shadow), 0 0 30px var(--halo); }
:root[data-theme="dark"] .pay-tiles.loose .pay-tile.top { background: color-mix(in oklab, var(--accent) 12%, var(--card)); }
.pay-tiles.loose .pay-badge { top: 12px; left: 18px; }
.pay-tiles.loose .pay-what b { font-size: var(--fs-lg); }
.pay-tiles.loose .pay-what > span { font-size: var(--fs-md); }
.pay-tiles.loose .pay-price .btn { font-size: var(--fs-read); }
.pay-tiles.loose .pay-price .btn.ghost { min-width: 0; min-height: 0; padding: 0; background: none; box-shadow: none; font-weight: 600; }
.pay-tiles.loose .pay-price small { font-size: var(--fs-sm); }
/* Вторая часть с подарком (pay.js, giftTiles): те же плитки стоят в карточке предложения не кнопками (still) — что человек
   покупает и что получает подарком; у подарка значок перед подписью и зачёркнутая цена. Под плитками строка итога:
   слева слова, справа зачёркнутая сумма обеих вещей и цена. */
.pay-tiles.still .pay-tile { cursor: default; }
.pay-tiles.still .pay-tile:active { transform: none; }
.pay-tiles.still .pay-what { flex: 1; }
.pay-badge.gift { display: inline-flex; align-items: center; gap: 5px; }
.pay-badge.gift > i { display: inline-flex; }
.pay-badge.gift svg { width: .95rem; height: .95rem; }
.pay-total { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 4px 2px 0; color: var(--text); }
.pay-total > span { font-size: var(--fs-md); }
.pay-total > b { display: inline-flex; align-items: baseline; gap: 10px; white-space: nowrap; }
.pay-total s { font-size: var(--fs-md); font-weight: 400; }
.pay-total .num { font-size: 1.75rem; opacity: 1; }
.pay-cost { gap: 6px; }
.pay-cost li { color: var(--text); }
/* «Все тарифы» в карточке чата — спойлер без подложки: кнопка стоит на месте, надпись меняется на «Свернуть». */
.pay-more { flex: 1; background: none; box-shadow: none; }
.pay-more > summary { justify-content: center; padding: 0 20px; border-radius: var(--r-pill); background: var(--field); box-shadow: var(--inset); color: var(--text); font-size: var(--fs-md); }
.pay-more[data-open="true"] > summary > :first-child, .pay-more:not([data-open="true"]) > summary > :last-child { display: none; }
.widget .pay-more .in { padding: 12px 0 0; gap: 12px; }
.looks { display: grid; gap: var(--s-4); }
.looks > .row { justify-content: center; gap: var(--s-3); }
.chat-card .strip { --edge: 16px; }
/* Микрофон закрыт (chat.js, «разрешение микрофона»): значок микрофона с замочком, заголовок, строка и кнопка; ширина
   по словам. Змейки у кнопки нет: она одна на экране, у голосового чата. Микрофон отключил телефон — значок красный (shut). */
.mic-seal { position: relative; flex: none; width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-ink); }
.mic-seal > svg { width: 26px; height: 26px; }
.mic-seal > i { position: absolute; right: -3px; bottom: -3px; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--card); color: var(--accent-ink); box-shadow: 0 1px 2px rgba(0,0,0,.12), 0 4px 10px rgba(0,0,0,.1); }
.mic-seal > i svg { width: 13px; height: 13px; }
.mic-ask.shut .mic-seal { background: var(--red-soft); color: var(--red); }
.mic-ask.shut .mic-seal > i { color: var(--red); }
/* Отправка заперта (chat.js, hold): пока Мирон говорит у кнопки, кнопка записи гаснет, кнопка голосового чата не жмётся. */
.chat.held .island-main { cursor: default; }
.chat.held .island:not(.on) .island-main:hover { transform: none; }
/* Поле спит (chat.js, sleep): серые слова в одну строку, без полосы прокрутки; кнопка голосового чата бледнеет вместе с кнопкой записи. */
.chat.asleep .input textarea { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.chat.asleep:not(.voicing) .island-main { opacity: .5; }   /* в голосовом режиме поле спит, а остров — нет (chat.js, voiceWords) */
.typing { align-self: flex-start; display: flex; gap: 4px; padding: 12px 14px; background: var(--card); border-radius: 18px; border-bottom-left-radius: 6px; box-shadow: var(--shadow); }
.typing i, .me-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); animation: blink 1.2s ease-in-out infinite; }
.typing i:nth-child(2), .me-dots i:nth-child(2) { animation-delay: .2s; } .typing i:nth-child(3), .me-dots i:nth-child(3) { animation-delay: .4s; }
/* Те же точки в реплике человека, пока сервер пишет её слова (голосовой режим, chat.js, pending): цвет — текста пузыря. */
.me-dots { display: inline-flex; gap: 4px; }
.me-dots i { background: currentColor; }
/* Тихая строка: что Мирон сейчас делает — словами рядом с точками (chat.js, typing). */
.typing small { margin-left: 6px; font-size: var(--fs-xs); line-height: 1.2; color: var(--muted); }
.typing small:empty { display: none; }
.typing:has(small:not(:empty)) { align-items: center; }
/* Дорожка тем: пройденные, текущая, будущие. Капсулы с круглыми концами и заметным зазором: не линейка. */
.progress { display: flex; gap: 8px; }
.progress i { flex: 1; height: 5px; border-radius: 99px; background: var(--hairline); transition: background var(--t); }
.progress i.done { background: color-mix(in srgb, var(--accent-ink) 50%, transparent); }
.progress i.now { background: var(--accent-ink); box-shadow: 0 0 10px var(--accent-glow); }
/* Поле разговора и кнопка справа: стрелка, микрофон, запись. */
.input { position: relative; display: flex; align-items: flex-end; gap: 8px; background: var(--card); border-radius: 24px; padding: 6px 6px 6px 16px; box-shadow: var(--shadow); transition: box-shadow var(--t-tint); }
.input:focus-within { box-shadow: var(--shadow), 0 0 0 1.5px color-mix(in srgb, var(--accent) 75%, transparent); }
.input textarea { flex: 1; min-width: 0; border: 0; background: none; outline: none; resize: none; max-height: 160px; padding: 7px 0; line-height: 1.4; }
.input textarea::placeholder { color: var(--muted); }
.send { position: relative; width: 38px; height: 38px; border-radius: 50%; border: 0; background: var(--accent); color: var(--on-accent); cursor: pointer; display: grid; place-items: center; flex: none; transition: transform var(--t-fast); }
/* Кнопка стоит по середине поля в одну строку при любом размере букв; поле выросло в несколько строк — она у нижней. */
.send { margin-bottom: max(0px, calc(.7em - 12px)); }
.send { touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.send svg { width: 18px; height: 18px; grid-area: 1 / 1; transition: opacity var(--t-fast), transform var(--t) var(--ease-spring); }
/* Пустое поле — микрофон (.mic), есть хоть один знак — стрелка. Оба значка лежат в кнопке. */
.send .i-mic { opacity: 0; transform: scale(.6); }
.send.mic .i-mic { opacity: 1; transform: none; }
.send.mic .i-arrow { opacity: 0; transform: scale(.6); }
.send:disabled { opacity: .35; cursor: default; }
/* Микрофон спит (гость надиктовал и не отправил, guest-door.js, nap): серый, как выключенная кнопка; стрелка — обычная. */
.send.mic.nap { opacity: .35; cursor: default; }
/* Кнопка ждёт сервер (chat.busy): на месте стрелки бегут столбики. */
.send .bars { display: none; grid-area: 1 / 1; color: inherit; }
.send.busy { pointer-events: none; }
.send.busy .bars { display: inline-flex; }
.send.busy :is(.i-arrow, .i-mic) { opacity: 0; transform: scale(.6); }
/* Идёт запись: вокруг кнопки дышат волны, размах — по громкости, переменная --lv от 0 до 1. */
.send.rec { transform: scale(3); z-index: 2; transition: transform var(--t) var(--ease-spring); }
/* Сама кнопка не меняется. Под ней два круга разной прозрачности: в тишине едва видны и чуть
   гуляют краями, от голоса растут. Ближний отзывается быстро, дальний — с запозданием.
   Край гуляет поворотом неровного круга, а не сменой скругления: поворот идёт видеокартой,
   смена скругления перерисовывала круги каждый кадр. */
.send.rec::before, .send.rec::after { content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: var(--accent); border-radius: 46% 54% 52% 48% / 52% 46% 54% 48%; }
.send.rec::before { opacity: .32; scale: calc(1.1 + var(--lv, 0) * .4); transition: scale .11s ease-out; animation: blob 3.1s linear infinite; }
.send.rec::after { border-radius: 53% 47% 46% 54% / 47% 54% 46% 53%; opacity: .15; scale: calc(1.2 + var(--lv, 0) * .8); transition: scale .22s ease-out; animation: blob 4.3s linear infinite reverse; }
/* Полоса записи встаёт вместо поля (.input.rec): точка, время, «Отмена». Протяжка влево (.toss): точка
   становится корзинкой, справа появляется скомканный шарик и бежит за пальцем (--dx), время тускнеет
   (--fade). Стирание (.cancelling), с пальца или по «Отмена»: крышка открыта, шарик и время влетают
   в корзинку (--far — путь шарика), крышка захлопывается, корзинка тает. Протяжка вверх (--dy) — замок. */
.rec-bar { flex: 1; display: none; align-items: center; min-height: calc(1.4em + 14px); gap: 10px; position: relative; }   /* высота поля в одну строку: поле не дёргается */
.input.rec .rec-bar { display: flex; }
.input.rec textarea { display: none; }
.rec-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--red); animation: blink 1.1s ease-in-out infinite; flex: none; transition: opacity .15s, transform .15s; }
.rec-time { font-variant-numeric: tabular-nums; font-size: var(--fs-sm); color: var(--text-2); min-width: 40px; opacity: var(--fade, 1); transform-origin: left center; transition: opacity .15s; }
.bin { position: absolute; left: -7px; top: 50%; width: 24px; height: 24px; color: var(--red); opacity: 0; transform: translateY(-50%) scale(0); pointer-events: none; transition: opacity .2s, transform .25s var(--ease-spring); }
.bin svg { position: absolute; left: 0; top: 0; width: 24px; height: 24px; }
.bin .lid { top: -2px; transform-origin: left bottom; }
.ball { position: absolute; right: 8px; top: 50%; width: 14px; height: 14px; background: var(--muted); border-radius: 30% 50% 40% 60% / 50% 30% 60% 40%; opacity: 0; pointer-events: none; transform: translate(var(--dx, 0px), -50%); transition: opacity .12s; }
.input.toss .rec-dot, .input.cancelling .rec-dot { opacity: 0; transform: scale(0); animation: none; }
.input.full .rec-dot { animation: none; }   /* запись встала на пределе: точка больше не мигает */
.input.toss .bin, .input.cancelling .bin { opacity: 1; transform: translateY(-50%) scale(1); }
.input.toss .ball { opacity: .85; }
.rec-hint { margin-left: auto; margin-right: 46px; font-size: var(--fs-2xs); color: var(--muted); white-space: nowrap; transition: opacity var(--t-fast); }
.input.locked .rec-hint { opacity: 0; }
@media (max-width: 480px) { .rec-hint { display: none; } }
.lock { position: absolute; right: 8px; bottom: 92px; width: 34px; height: 52px; border-radius: 17px; background: var(--card); box-shadow: var(--shadow); display: none; flex-direction: column; align-items: center; justify-content: flex-end; padding-bottom: 8px; gap: 5px; color: var(--muted); transform: translateY(calc(var(--dy, 0px) * .35)); }
.lock svg { width: 16px; height: 16px; }
.lock i { width: 9px; height: 9px; border-left: 2px solid currentColor; border-top: 2px solid currentColor; transform: rotate(45deg); animation: nudge 1.2s ease-in-out infinite; }
.input.rec:not(.locked) .lock { display: flex; }
/* Кнопка «вниз» над кнопкой записи, по середине высоты кнопки голосового чата (зазор 10px, кнопка 45px). Галочка —
   та же, что над записью, повёрнутая вниз; есть новые реплики — вместо галочки «+N». Видна с классом on (chat.js).
   Тень только вверх: общая --shadow ложилась на тень поля под кнопкой тёмным пятном.
   Над полем встала строка (ответ или правка в Молве) — кнопка поднимается над ней: высоту строки низ чата
   держит в --over (molva.js), иначе кнопка ложилась на крестик строки.
   С классом on видимость берётся у родителя: спрятан низ чата (кабинет ушёл в дневник, поиск) — спрятана и кнопка. */
.down { position: absolute; right: 6px; bottom: calc(100% + 13px + var(--over, 0px)); transition: bottom var(--t) var(--ease); width: 38px; height: 38px; border-radius: 50%; border: 0; padding: 0;
  background: var(--card); color: var(--text-2); box-shadow: 0 -3px 12px -5px rgba(28,38,20,.22); cursor: pointer; display: grid; place-items: center;
  visibility: hidden; pointer-events: none; -webkit-user-select: none; user-select: none; }
:root[data-theme="dark"] .down { box-shadow: 0 -3px 12px -5px rgba(0,0,0,.6); }
.down.on { visibility: inherit; pointer-events: auto; }
.input.rec .down { visibility: hidden; }
/* Диктовка в поле чата (dictation.js): слова встают в поле, пока человек говорит. Слой в форме поля держит курсор
   и тень слева от него; текст поля лежит выше слоя. */
.input.dict textarea { position: relative; z-index: 1; }
.dict-layer { position: absolute; inset: 0; border-radius: inherit; overflow: hidden; pointer-events: none; opacity: 0; transition: opacity var(--t) var(--ease); }
.input.dict .dict-layer { opacity: 1; }
.dict-mirror { position: absolute; left: 0; top: 0; visibility: hidden; pointer-events: none; white-space: pre-wrap; overflow-wrap: break-word; }
.dict-caret { position: absolute; left: 0; top: 0; width: 2px; height: 1.2em; border-radius: 1px; background: var(--accent); transition: transform var(--t) var(--ease); animation: dict-caret 1.2s ease-in-out infinite; }
/* Тень слева от курсора (.dict-glow): ярче и шире от голоса — opacity и transform ей пишет кадр dictation.js, без перехода. */
.dict-glow, .dict-caret::after { content: ''; position: absolute; right: 0; top: 50%; width: 7em; height: 3em; translate: 0 -50%; transform-origin: 100% 50%; border-radius: 50%; background: radial-gradient(ellipse at 100% 50%, color-mix(in srgb, var(--accent) 60%, transparent), var(--accent-soft) 45%, transparent 70%); }
.dict-glow { opacity: .36; transform: scaleX(.5); will-change: transform, opacity; }
/* Закрытый кусок ждёт слов: вторая тень дышит, пока они не пришли. */
.dict-caret::after { opacity: 0; }
.input.busy .dict-caret::after { animation: dict-breath 1.1s ease-in-out infinite; }
/* Тени слов за курсором: штрихи на месте слов, которых модель ещё не вернула; последний светит от голоса. */
.dict-ghost { position: absolute; left: 0; top: 0; white-space: pre-wrap; overflow-wrap: break-word; color: transparent; pointer-events: none; }
.dict-ghost i { display: inline-block; height: .5em; margin-left: .35em; border-radius: 999px; background: var(--accent); opacity: .22; vertical-align: middle; transform-origin: 0 50%; animation: dict-ghost .35s var(--ease) both; }
.input.ghosted textarea::placeholder { color: transparent; }
@keyframes dict-ghost { from { transform: scaleX(0); opacity: 0; } }
@keyframes dict-caret { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@keyframes dict-breath { 0%, 100% { opacity: 0; scale: .5 1; } 50% { opacity: .55; scale: 1.15 1; } }
/* Кнопка в диктовке остаётся микрофоном и не растёт: вокруг неё кольцо по громкости. */
.send.dict .i-mic { opacity: 1; transform: none; }
.send.dict .i-arrow { opacity: 0; transform: scale(.6); }
/* Кольцо — круг .dict-ring под значком (isolation держит его над заливкой кнопки), dictation.js растит его
   transform-ом: кольцо 2px в тишине, до 9px от голоса, как прежняя тень box-shadow, но без перерисовки. */
.send.dict { isolation: isolate; transition: transform var(--t-fast), opacity var(--t-fast); }
.dict-ring { display: none; }
.send.dict .dict-ring { display: block; position: absolute; inset: 0; z-index: -1; border-radius: 50%; background: var(--accent-glow); pointer-events: none; transform: scale(1.105); will-change: transform; transition: opacity .12s ease-out; animation: dict-ring .12s ease-out; }
@keyframes dict-ring { from { opacity: 0; } }
.send.dict:not(.live) .dict-ring { opacity: 0; }   /* кольцо зажигается, когда микрофон правда слушает */
.send.dict.wait { opacity: .5; }
.send.dict.wait .dict-ring { opacity: 0; }
/* Палец на кнопке: над ней замок из чата — знак «потяни вверх»; кнопка здесь не растёт, замок стоит ниже. На замке
   кнопка — квадрат «стоп». */
.input.dict-hold .lock { display: flex; bottom: 56px; }
.send.dict.locked .i-mic { opacity: 0; transform: scale(.6); }
.send.dict.locked::after { content: ''; position: absolute; inset: 0; margin: auto; width: 13px; height: 13px; border-radius: 3px; background: currentColor; }
@media (prefers-reduced-motion: reduce) { .dict-ghost i { animation: none; } .dict-caret, .input.busy .dict-caret::after { animation: none; } .dict-caret, .send.dict .dict-ring { transition: none; } .send.dict .dict-ring { animation: none; } }
.down i { width: 9px; height: 9px; margin-top: -4px; border-left: 2px solid currentColor; border-top: 2px solid currentColor; transform: rotate(225deg); }
.down .count { color: var(--accent-ink); font-size: var(--fs-sm); font-weight: 700; letter-spacing: -.02em; }
.down .count:empty, .down .count:not(:empty) ~ i { display: none; }
.input.cancelling .rec-hint, .input.cancelling .rec-cancel { opacity: 0; }
.input.cancelling .bin .lid { animation: lid .64s forwards; }
.input.cancelling .bin { animation: bin-out .35s cubic-bezier(.4, 0, .2, 1) .6s forwards; }
.input.cancelling .ball { opacity: .85; animation: ball-fly .35s cubic-bezier(.4, 0, .2, 1) forwards; }
.input.cancelling .rec-time { animation: time-suck .4s cubic-bezier(.4, 0, .2, 1) forwards; }
.input.cancelling .send { animation: shake .38s ease-in-out; }
.input.back textarea { animation: rise .28s ease-out; }
.rec-cancel { position: absolute; left: 50%; transform: translateX(-50%); border: 0; background: none; padding: 8px 12px; font-size: var(--fs-sm); font-weight: 500; color: var(--accent-ink); cursor: pointer; transition: opacity var(--t-fast); }
/* Остров: таблетка без кромки, кромку рисует только бегущая змейка. В голосе (.on) змейка быстрее
   и появляется «Выйти»; когда говорит Мирон (.talking), змейка шире и ещё быстрее. */
.island { position: relative; border-radius: var(--r-pill); display: inline-flex; align-items: center; isolation: isolate; overflow: hidden; color: var(--text); box-shadow: 0 0 calc(var(--lv, 0) * 34px) calc(var(--lv, 0) * 4px) var(--accent-glow); }
.island::before { content: ''; position: absolute; left: 50%; top: 50%; width: 320%; aspect-ratio: 1; margin: -160% 0 0 -160%; z-index: -2; background: conic-gradient(transparent 0 55%, var(--accent) 72%, transparent 88% 100%); animation: spin 3.2s linear infinite; will-change: transform; }
.island.on::before { animation-duration: 2.2s; }
.island.talking::before { background: conic-gradient(transparent 0 30%, var(--accent) 50%, transparent 70% 100%); animation-duration: 1.4s; }
.island::after { content: ''; position: absolute; inset: 1.5px; z-index: -1; border-radius: inherit; background: var(--card); }
.island-main { border: 0; background: none; cursor: pointer; padding: 11px 20px 11px 16px; font-weight: 500; font-size: var(--fs-sm); display: flex; align-items: center; gap: 9px; color: inherit; transition: transform var(--t-fast); }
.island:not(.on) .island-main:hover { transform: translateY(-1px) scale(1.02); }
.island-main svg { width: 18px; height: 18px; flex: none; color: var(--accent-ink); }
.island.on .island-main { cursor: default; padding-right: 14px; }
.island.on .island-main svg { animation: breathe 1.6s ease-in-out infinite; }
.island-exit { display: none; border: 0; background: none; cursor: pointer; padding: 11px 16px 11px 12px; font-size: var(--fs-sm); color: var(--text-2); align-items: center; gap: 6px; box-shadow: inset 1px 0 0 var(--hairline); transition: box-shadow var(--t-tint); }
.island.on .island-exit, .island.closing .island-exit { display: flex; }   /* closing — «Выйти» уходит под край сужающегося острова (chat.js) */
.island.opening .island-exit, .island.closing .island-exit { box-shadow: none; transition: none; }   /* без черты, пока край открывает и закрывает «Выйти»: у скругления она торчала бы сквозь кромку; потом проявляется */
.island-exit:hover { color: var(--text); }
/* Слова острова (chat.js, morph): старые уходят вверх (out), новые поднимаются (in), обе в одной клетке, посередине.
   Уходящие места не держат (ширина 0, текст свисает поровну в обе стороны), поэтому клетка с первого кадра по новым
   словам, и остров едет к новой ширине сразу. Клетка уже слов, пока едет, — слова тают к её краям: у клетки поля
   12px вширь и 8px ввысь (отрицательный отступ их возвращает) и маска с мягкими боками; размытие смены выходит
   чуть за слово и гаснет без жёсткого края. */
.island .morph { display: inline-grid; justify-content: center; justify-items: center; padding: 8px 12px; margin: -8px -12px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12px, #000 calc(100% - 12px), transparent); mask-image: linear-gradient(90deg, transparent, #000 12px, #000 calc(100% - 12px), transparent); }
.island .morph > span { grid-area: 1 / 1; white-space: nowrap; }
.island .morph > .out { width: 0; display: flex; justify-content: center; animation: morph-out var(--t) var(--ease) forwards; } .island .morph > .in { animation: morph-in var(--t) var(--ease) both; }
/* Мирон думает (chat.js, thinking): человек договорил — за островом колышется свет в красках светлячков (trail.js),
   сверху сильнее, и разгорается за 2,5 с; из-за верхнего края летят искры (.island-fx, их ведёт chat.js), на острове
   сменяются фразы. Мирон заговорил (cooling) — свет гаснет за 0,7 с. Сила — число --heat (0…1), колыхание — --f1…--f3
   с разными периодами. На светлой теме краски чистым тоном и гуще. Уровень 4 — свет не колышется. */
@property --heat { syntax: '<number>'; inherits: true; initial-value: 0; }
@property --f1 { syntax: '<number>'; inherits: false; initial-value: .5; }
@property --f2 { syntax: '<number>'; inherits: false; initial-value: .5; }
@property --f3 { syntax: '<number>'; inherits: false; initial-value: .5; }
:is(.island, .island-fx) { --fire-1: var(--miron-drop-1); --fire-2: var(--miron-drop-5); --fire-3: var(--miron-drop-6); --fire-4: var(--miron-drop-7); --fire-k: 55%; }
[data-accent="mono"] :is(.island, .island-fx) { --fire-2: var(--miron-drop-2); --fire-3: var(--miron-drop-3); --fire-4: var(--miron-drop-4); }
:root:not([data-theme="dark"]) :is(.island, .island-fx) { --fire-k: 70%; }
:root[data-accent="mono"]:not([data-theme="dark"]) :is(.island, .island-fx) { --fire-k: 34%; }
@supports (color: oklch(from red l c h)) {
  :root:not([data-theme="dark"]):not([data-accent="mono"]) :is(.island, .island-fx) {
    --fire-1: oklch(from var(--miron-drop-1) .64 clamp(.14, c, .19) h); --fire-2: oklch(from var(--miron-drop-5) .64 clamp(.14, c, .19) h);
    --fire-3: oklch(from var(--miron-drop-6) .64 clamp(.14, c, .19) h); --fire-4: oklch(from var(--miron-drop-7) .64 clamp(.14, c, .19) h); }
}
.island:is(.thinking, .cooling):not(.hatch) { box-shadow:
  0 0 calc(var(--lv, 0) * 34px) calc(var(--lv, 0) * 4px) var(--accent-glow),
  calc((var(--f1) - .5) * 12px) calc((-5px - 9px * var(--f2)) * (.4 + .6 * var(--heat))) calc(16px + 8px * var(--f3)) -3px color-mix(in srgb, var(--fire-1) calc(var(--fire-k) * var(--heat)), transparent),
  calc(-11px - 10px * var(--f3)) calc(-4px - 5px * var(--f1)) calc(18px + 6px * var(--f2)) -5px color-mix(in srgb, var(--fire-2) calc(var(--fire-k) * var(--heat)), transparent),
  calc(11px + 10px * var(--f2)) calc(-2px - 8px * var(--f3)) calc(18px + 8px * var(--f1)) -5px color-mix(in srgb, var(--fire-3) calc(var(--fire-k) * var(--heat)), transparent),
  calc((var(--f2) - .5) * 8px) calc(5px + 2px * var(--f1)) 16px -8px color-mix(in srgb, var(--fire-4) calc(var(--fire-k) * var(--heat)), transparent);
  animation: think-f1 2.6s ease-in-out infinite alternate, think-f2 1.9s ease-in-out infinite alternate, think-f3 3.3s ease-in-out infinite alternate; }
.island.thinking { --heat: .75; transition: --heat 2.5s ease-out; }
.island.cooling { transition: --heat .7s ease-in-out; }
html[data-quality="4"] .island:is(.thinking, .cooling) { animation: none; }
@media (prefers-reduced-motion: reduce) { .island:is(.thinking, .cooling) { animation: none; } }
@keyframes think-f1 { from { --f1: 0; } to { --f1: 1; } }
@keyframes think-f2 { 0% { --f2: .15; } 35% { --f2: .9; } 50% { --f2: .55; } 78% { --f2: 1; } 100% { --f2: .3; } }
@keyframes think-f3 { from { --f3: 0; } to { --f3: 1; } }
.island-fx { position: absolute; inset: 0; pointer-events: none; }
.chat .composer > .island-fx { pointer-events: none; }
/* Голосовой чат кнопкой (chat.js, ptt): пока палец не на кнопке, Мирон не слышит. Всё здесь живёт только в голосовом
   режиме (.voicing); обычная запись голосового — выше, у .send.rec и .rec-bar.
   Остров без пальца на кнопке тихий (idle, «Твоя очередь»): змейка приглушена, значок не дышит. Держишь (listen) —
   змейка в полную силу, заливка теплеет акцентом. Остров выше светлячков: огни пролетают за ним. */
.island.on.idle::before { opacity: .3; }
.island.on.idle .island-main svg { animation: none; }
.island::after { transition: background var(--t) var(--ease); }
.island.listen::after { background: color-mix(in srgb, var(--accent) 16%, var(--card)); }
:root[data-theme="dark"] .island.listen::after { background: color-mix(in srgb, var(--accent) 10%, var(--card)); }
.chat.voicing .composer > .island { z-index: 4; }
.chat.voicing .composer > .island-fx { z-index: 2; }
/* Кнопка микрофона. Держишь (rec) — чуть растёт, вокруг волны от громкости (--lv); тянешь влево — едет за пальцем (--dx).
   Рост — transform, сдвиг — translate: сдвиг идёт за пальцем без запаздывания, рост — с пружиной. */
.chat.voicing .input .send { transition: transform var(--t) var(--ease-spring), translate var(--t) var(--ease-spring), opacity var(--t-fast); }
.chat.voicing .input.drag .send { transition: transform var(--t) var(--ease-spring), opacity var(--t-fast); }
.chat.voicing .input .send.press { transform: scale(.92); }
.chat.voicing .input .send.rec { transform: scale(1.5); translate: calc(var(--dx, 0px) * .45) 0; z-index: 3; }
.chat.voicing .input .send.rec.press { transform: scale(1.38); }
.chat.voicing .input .send.rec::before { scale: calc(1.12 + var(--lv, 0) * .7); }
.chat.voicing .input .send.rec::after { scale: calc(1.25 + var(--lv, 0) * 1.35); }
/* Строка слов в поле: слова встают справа, старые уезжают влево и тают у края. Слева — красная точка записи;
   тянешь влево — слова бледнеют и чуть едут за пальцем (--pc — сколько осталось до отмены, 0…1). */
.ptt-live, .ptt-dot, .ptt-left, .ptt-bin, .ptt-lock, .crumbs, .ptt-flies { display: none; }
.chat.voicing :is(.ptt-live, .ptt-dot, .ptt-left, .ptt-bin, .ptt-lock, .crumbs, .ptt-flies) { display: revert; }
.chat.voicing .ptt-live { position: absolute; left: 38px; right: 82px; top: 0; bottom: 0; display: flex; align-items: center; overflow: hidden; pointer-events: none;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 28px); mask-image: linear-gradient(90deg, transparent, #000 28px);
  opacity: calc(1 - var(--pc, 0) * .5); translate: calc(var(--dx, 0px) * .25) 0; }
.ptt-live > span { display: inline-flex; gap: .28em; white-space: nowrap; line-height: 1.4; transition: transform var(--t-slow) var(--ease); }
.ptt-live .w { animation: morph-in var(--t) var(--ease) both; }
.ptt-live > span.gone { animation: morph-out var(--t) var(--ease) forwards; }
.input.crumble .ptt-live { visibility: hidden; }
.chat.voicing .ptt-dot { position: absolute; left: 16px; top: 50%; width: 9px; height: 9px; margin-top: -4.5px; border-radius: 50%; background: var(--red); pointer-events: none;
  opacity: 0; transform: scale(0); transition: opacity var(--t-fast), transform var(--t) var(--ease-spring); }
.input.hold:not(.locked, .toss, .crumble) .ptt-dot { opacity: 1; transform: none; transition-delay: .12s; }
.input.hold:not(.locked, .toss, .crumble) .ptt-dot > i { position: absolute; inset: 0; border-radius: 50%; background: var(--card); opacity: 0; animation: ptt-blink 1.1s ease-in-out infinite; }
@keyframes ptt-blink { 50% { opacity: .75; } }
/* Отмена влево: стрелка у кнопки зовёт, корзина слева растёт из точки записи по мере протяжки и краснеет.
   На замке корзина — кнопка «стереть». Стёрли — буквы рассыпаются в неё (.crumbs), крышка захлопывается, корзина тает. */
.chat.voicing .ptt-left { position: absolute; right: 60px; top: 50%; width: 18px; height: 18px; margin-top: -9px; display: grid; place-items: center; color: var(--muted); pointer-events: none;
  opacity: 0; translate: calc(var(--dx, 0px) * .8) 0; transition: opacity var(--t-fast); }
.ptt-left i { width: 8px; height: 8px; margin-left: 3px; border-left: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); animation: ptt-nudge-left 1.2s ease-in-out infinite; }
.input.hold:not(.locked, .crumble) .ptt-left { opacity: calc(1 - var(--pl, 0) * 1.6 - var(--pc, 0) * .6); transition: opacity var(--t) var(--ease) .15s; }
.input.drag .ptt-left { transition: none; }
@keyframes ptt-nudge-left { 0%, 100% { transform: rotate(45deg); opacity: 1; } 50% { transform: translateX(-4px) rotate(45deg); opacity: .35; } }
.chat.voicing .ptt-bin { position: absolute; left: 4px; top: 50%; width: 34px; height: 34px; margin-top: -17px; border: 0; padding: 0; background: none; border-radius: 50%; color: var(--text-2); cursor: pointer;
  opacity: 0; transform: scale(.3); pointer-events: none; transition: opacity var(--t-fast), transform var(--t) var(--ease-spring), color var(--t-fast); }
.ptt-bin > span { position: absolute; left: 6px; top: 6px; width: 22px; height: 22px; }
.ptt-bin svg { position: absolute; left: 0; top: 0; width: 22px; height: 22px; }
.ptt-bin .lid { top: -1px; transform-origin: 3px 6px; transition: transform var(--t) var(--ease-spring); }
.input.toss .ptt-bin { opacity: calc(var(--pc, 0) * 2.5); transform: scale(calc(.5 + var(--pc, 0) * .5)); color: var(--red); transition: none; }
.input.toss .ptt-bin .lid { transform: rotate(calc(var(--pc, 0) * -38deg)); transition: none; }
.input.locked .ptt-bin { opacity: 1; transform: none; pointer-events: auto; }
.input.crumble .ptt-bin { opacity: 1; transform: none; color: var(--red); }
.input.crumble .ptt-bin .lid { transform: rotate(-38deg); }
.input.crumble .ptt-bin.shut .lid { transform: none; }
.input.crumble .ptt-bin.gone { opacity: 0; transform: scale(0); transition: opacity var(--t) var(--ease), transform var(--t) var(--ease); }
.ptt-bin.press { transform: scale(.9); }
.chat.voicing .crumbs { position: absolute; inset: 0; pointer-events: none; z-index: 2; }
.crumbs b { position: absolute; left: 0; top: 0; font-weight: 400; white-space: pre; line-height: normal; color: var(--text); will-change: transform, opacity; }
/* Замок над кнопкой: выходит из неё, пока держишь, стрелка вверх кивает. Тянешь вверх — замок едет за пальцем (--dy)
   и стрелка гаснет (--pl); дотянул — дужка защёлкивается, замок уходит обратно в кнопку. */
.chat.voicing .ptt-lock { position: absolute; right: 8px; bottom: 62px; z-index: 4; width: 34px; height: 54px; box-sizing: border-box; border-radius: 17px; background: var(--card); box-shadow: var(--shadow);
  display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 7px; padding-bottom: 9px; color: var(--muted); pointer-events: none;
  opacity: 0; transform: translateY(60px) scale(.3); transition: opacity var(--t-fast) var(--ease), transform var(--t) var(--ease); }
.ptt-lock.on { opacity: 1; transform: translateY(calc(var(--dy, 0px) * .35)); transition: opacity var(--t) var(--ease) .15s, transform var(--t) var(--ease-spring) .15s, color var(--t-fast); }
.input.drag .ptt-lock.on { transition: none; }
.ptt-lock .up { width: 8px; height: 8px; border-left: 2px solid currentColor; border-top: 2px solid currentColor; transform: rotate(45deg); opacity: calc(1 - var(--pl, 0)); animation: nudge 1.2s ease-in-out infinite; }
.ptt-lock svg { width: 16px; height: 16px; overflow: visible; }
.ptt-lock .shackle { transform: translateY(-3.5px); transition: transform var(--t) var(--ease-spring); }
.ptt-lock.shut { color: var(--accent-ink); transition: opacity var(--t-fast) var(--ease), transform var(--t) var(--ease-spring), color var(--t-fast); }
.ptt-lock.shut .shackle { transform: none; }
.ptt-lock.shut .up { opacity: 0; animation: none; transition: opacity var(--t-fast); }
/* Светлячки и рой: холст над полем, кнопка выше него. */
.chat.voicing .composer > .ptt-flies { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 300px; z-index: 2; pointer-events: none; }
.chat.voicing .input .send.call { z-index: 2; box-shadow: 0 0 16px 2px var(--accent-glow); }
/* Глоток: нырнувший огонь кнопка «глотает» — вздувается и вспыхивает его цветом (--gulp ставит chat.js). */
.send { --gulp-a: 1; }
:root[data-theme="dark"] .send { --gulp-a: .65; }
.chat.voicing .input .send.call.gulp { animation: call-gulp .8s var(--ease) both; }
@keyframes call-gulp { 0% { scale: 1; box-shadow: 0 0 16px 2px var(--accent-glow); } 28% { scale: 1.1; box-shadow: 0 0 30px 10px rgb(var(--gulp) / var(--gulp-a)); }
  58% { scale: .98; } 100% { scale: 1; box-shadow: 0 0 16px 2px var(--accent-glow); } }
.island-fx > i { position: absolute; left: 0; top: 0; width: 4px; height: 4px; margin: -2px 0 0 -2px; border-radius: 50%; background: currentColor; box-shadow: 0 0 8px 2px currentColor; will-change: transform, opacity; }
/* Остров выходит каплей из поля и уходит в него (chat.js, lift и land): пока растёт или сжимается, он простая плашка —
   без змейки, свечения и черты у «Выйти»; значок и слова сразу своего цвета. Встал — змейка плавно загорается. */
.chat .island::before { transition: opacity var(--t-slow); }
.island.hatch { box-shadow: none; }
.chat .island.hatch::before { opacity: 0; transition: none; }
.island.hatch .island-exit { box-shadow: none; transition: none; }
.island.hatch .island-main svg { animation: none; }
/* Змейка в чате. Пока кнопка голосового чата стоит над полем, змейка бежит по её краю всегда. Кругляшом в строке
   ввода (round) кнопка спокойная: змейка горит волной (chat.js, lit) в начале каждой темы и пока идёт переезд,
   в голосовом режиме — всё время. */
.chat .island.round:not(.on, .lit)::before { opacity: 0; animation-play-state: paused; }   /* невидимая змейка не крутится: под размытием меню и в ленте она будила сборку слоёв каждый кадр */
.chat .island.round.fading::before { animation-play-state: running; transition: opacity calc(var(--t-slow) * 2) var(--ease); }   /* гаснет на бегу (chat.js, unlit) */
/* Кнопка голосового чата кругляшом (chat.js, dock): надпись свёрнута, значок посередине. Размер --orb ставит chat.js:
   над полем — высота острова, в строке ввода — как у кнопки записи. */
.island.round .island-main { width: var(--orb); height: var(--orb); padding: 0 0 0 calc((var(--orb) - 18px) / 2); gap: 0; }
.island.round .morph { width: 0; opacity: 0; overflow: hidden; }
.island.moving { pointer-events: none; }   /* кругляш едет в гнездо — не нажимается (chat.js, dock) */
/* Гнездо в строке ввода слева от кнопки записи: в нём живёт кругляш. Кругляш прижат к правому краю гнезда, поэтому,
   пока гнездо раскрывается, он стоит на месте. Ямка — вдавленность цвета акцента, видна, пока гнездо пустое.
   Ямка касаний не ловит: гнездо в поле с текстом сжато в ноль, а ямка висит над концом текста. */
.input > .voice-socket { position: relative; flex: none; width: 38px; height: 38px; margin-bottom: max(0px, calc(.7em - 12px)); transition: width var(--t) var(--ease), margin-left var(--t) var(--ease); }
.voice-socket > i { position: absolute; right: 0; top: 0; width: 38px; height: 38px; border-radius: 50%; background: color-mix(in srgb, var(--accent) 16%, var(--field)); box-shadow: var(--inset); pointer-events: none; transition: opacity var(--t); }
.voice-socket.taken > i { opacity: 0; }
/* В поле кругляш залит лёгким акцентом: белый кругляш на белом поле не виден. */
.voice-socket > .island { position: absolute; right: 0; top: 0; transition: scale var(--t) var(--ease-spring), opacity var(--t-fast); }
.island::after { transition: background var(--t-slow); }
.voice-socket > .island::after, .input > .island.inside::after { background: color-mix(in srgb, var(--accent) 14%, var(--card)); }
.input.rec > .voice-socket { display: none; }   /* запись: кнопка записи растёт поверх гнезда */
/* В поле любой знак — кругляш тает на месте, чуть сжимаясь, поле забирает его место (chat.js, typed): двух кнопок
   с делом рядом нет. Поле пустое — вырастает обратно с пружиной. Никуда не едет: ни на что не ложится.
   Диктовка (dict) прячет его так же и сразу, до первых слов; громкость голоса (--lv у поля) до него не доходит. */
.input.typed > .voice-socket, .input.dict > .voice-socket { width: 0; margin-left: -8px; }
.input.dict > .voice-socket > .island { --lv: 0; }
.input.typed > .voice-socket > .island, .input.dict > .voice-socket > .island { scale: .5; opacity: 0; pointer-events: none; transition: scale var(--t-fast) var(--ease), opacity var(--t-fast); }
/* Смайлик в строке ввода — только с мышью (chat.js, раздел «смайлики»): на телефоне смайлики есть в клавиатуре.
   Стоит на месте кругляша, у кнопки записи: в поле любой знак — кругляш тает, а на этом месте вырастает смайлик; поле
   пустое — наоборот. Пока открыта панель (emo-open), смайлик стоит и в пустом поле. Диктовка и запись его прячут.
   Место смайлику поле отдаёт отступом текста тем же ходом, каким сжимается гнездо кругляша: ширина текста не меняется,
   строки не перескакивают. */
.input > .smile-btn { display: none; }
@media (hover: hover) and (pointer: fine) {
  .input.smiles > textarea { transition: opacity var(--t-slow) var(--ease), margin-right var(--t) var(--ease); }
  .input.smiles:is(.typed, .emo-open):not(.dict, .rec) > textarea { margin-right: 46px; }
  .input.smiles.emo-open > .voice-socket { width: 0; margin-left: -8px; }
  .input.smiles.emo-open > .voice-socket > .island { scale: .5; opacity: 0; pointer-events: none; transition: scale var(--t-fast) var(--ease), opacity var(--t-fast); }
  .input.smiles > .smile-btn { position: absolute; right: 52px; bottom: calc(6px + max(0px, calc(.7em - 12px))); width: 38px; height: 38px; display: grid; place-items: center;
    border: 0; padding: 0; border-radius: 50%; background: none; color: var(--text-2); cursor: pointer; scale: .5; opacity: 0; pointer-events: none;
    transition: scale var(--t-fast) var(--ease), opacity var(--t-fast), background var(--t-tint), color var(--t-tint); }
  .input.smiles:is(.typed, .emo-open):not(.dict, .rec) > .smile-btn { scale: 1; opacity: 1; pointer-events: auto;
    transition: scale var(--t) var(--ease-spring), opacity var(--t-fast), background var(--t-tint), color var(--t-tint); }
  .input > .smile-btn:hover, .input.emo-open > .smile-btn { background: var(--accent-soft); color: var(--accent-ink); }
  .input > .smile-btn > svg { width: 22px; height: 22px; }
}
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: reduce) {   /* смайлик встаёт и уходит сразу */
  .input.smiles > .smile-btn, .input.smiles:is(.typed, .emo-open):not(.dict, .rec) > .smile-btn { transition: none; } }
/* Панель смайликов (разметка — parts.js, кусок «смайлики»; поведение — chat.js): ряд недавних, под ним набор. В чате стоит
   над полем справа, над смайликом, и выходит каплей из него (bubble.js, data-from). Смайлик — буква:
   размеры в rem, растут с размером букв. */
.emoji-panel { display: grid; gap: var(--s-2); width: max-content; padding: 6px; border-radius: var(--r-lg); background: var(--card); box-shadow: var(--shadow); }
.emoji-panel > div { display: grid; grid-template-columns: repeat(8, 2.5rem); gap: 2px; }
.emoji-panel button { width: 2.5rem; height: 2.5rem; border: 0; border-radius: 50%; padding: 0; display: grid; place-items: center; background: none; font-size: 1.5rem; line-height: 1; cursor: pointer;
  transition: background var(--t-tint), transform var(--t-fast) var(--ease); }
.emoji-panel button:hover { background: var(--field); }
.emoji-panel button:active { transform: scale(.88); }
.chat .composer > .emoji-panel { position: absolute; right: 0; bottom: calc(100% + var(--s-1)); }
.chat.full .composer > .emoji-panel { right: 16px; }
/* Кругляш в середине поля — шаг переезда (chat.js, dock); подсказка поля в это время погашена. */
.input > .island.inside { position: absolute; left: 50%; top: 50%; margin: calc(var(--orb) / -2) 0 0 calc(var(--orb) / -2); z-index: 1; }
.input > .voice-mouth { position: absolute; left: 50%; top: 50%; width: 44px; height: 24px; margin: -12px 0 0 -22px; pointer-events: none; }   /* середина поля: отсюда выходит и сюда уходит всё, что встаёт над полем (chat.js, fromField) */
.input > .reply-mouth { position: absolute; left: 16px; top: 50%; width: 44px; height: 24px; margin-top: -12px; pointer-events: none; }   /* левый край поля: отсюда в обычном чате выходит то, что пишет Мирон (chat.js, bubble.js) */
.input textarea { transition: opacity var(--t-slow) var(--ease); }
.input textarea.quiet-hint, .input textarea.ptt-quiet { opacity: 0; }   /* подсказка поля плавно гаснет: quiet-hint — в поле сцена кругляша, ptt-quiet — в поле бегут слова записи (chat.js) */
.input > .send { z-index: 1; }   /* кнопка отправки всегда выше кругляша */
/* Пузырь «Поговорить голосом — сюда» на месте кнопки (chat.js, hint): той же формы и роста, что кнопка, без змейки —
   змейка в это время бежит по кругляшу в поле, на него и смотрит стрелка. */
.voice-hint { position: relative; display: inline-flex; background: var(--card); align-items: center; gap: 9px; box-sizing: border-box; padding: 0 18px 0 20px; border-radius: var(--r-pill);
  isolation: isolate; overflow: hidden; box-shadow: var(--shadow); color: var(--text); font-weight: 500; font-size: var(--fs-sm); white-space: nowrap; pointer-events: none; }
.voice-hint svg { width: 18px; height: 18px; flex: none; color: var(--accent-ink); }   /* фон на самом пузыре: текст без фона не бывает ни в одном кадре */
/* Голосовой режим и голос экскурсии: края окна едва светятся акцентом. */
.veil { position: fixed; inset: 0; pointer-events: none; z-index: 5; opacity: 0; transition: opacity 1.2s ease; background:
    linear-gradient(to right, color-mix(in srgb, var(--accent) 7%, transparent), transparent 7%),
    linear-gradient(to left, color-mix(in srgb, var(--accent) 7%, transparent), transparent 7%),
    linear-gradient(to top, color-mix(in srgb, var(--accent) 9%, transparent), transparent 12%); }
.veil.on { opacity: 1; animation: veil 7s ease-in-out infinite; }
.veil.tour { z-index: 100; transition: none; will-change: opacity; }   /* говорит Мирон экскурсии: силу света каждый кадр пишет excursion.js (glow); выше всех слоёв — видна и над меню сообщения */

/* Виджет разговора. Разметку и поведение собирает chat.js: Miron.chat(элемент, связь). Страница
   даёт ему место и связь с сервером, своей ленты не рисует. Лента прокручивается внутри;
   поля по бокам оставляют место теням реплик. .chat.full — на весь экран. */
.chat { position: relative; display: flex; flex-direction: column; height: min(46rem, 86vh); font-size: var(--fs-read); }
/* --kb — клавиатура-имитация в рамке предпросмотра. Под настоящей клавиатурой chat.js пишет высоту
   самому чату, не меняя унаследованные стили каждой реплики. */
.chat.full { height: calc(100dvh - var(--kb, 0px)); max-width: 46rem; margin: 0 auto; z-index: 1; }
/* Чат на весь экран: кнопка записи и её волны вылезают за край окна, документ от этого не прокручивается.
   Страница не ниже экрана: с клавиатурой чат ниже ростом и сдвинут вниз к видимой полосе (chat.js), и страница
   высотой с чат обрезала его — в приложении на айфоне оставалась полоска шапки. */
body:has(> .chat.full) { overflow: clip; min-height: 100dvh; }
/* Айфон тянет резинкой всю страницу, если палец не на ленте: шапка уезжала под полоску со временем, поле — за низ экрана.
   Страница с чатом стоит; резинка — у самой ленты (chat.js). */
html:has(> body > .chat.full), body:has(> .chat.full) { overscroll-behavior: none; }
/* Айфон пружинит ленту, только если ей есть куда листаться: пустая лента на лишний пиксель выше окна
   и тянется под пальцем так же, как полная. Другим браузерам резинку рисует chat.js. */
@supports (-webkit-touch-callout: none) { .chat.full .feed-in { min-height: calc(100% + 1px); } }
/* Шапка и низ лежат поверх ленты. Реплики не тают: поверх них лежит затемнение цветом фона.
   Сверху оно плотное под именем и дорожкой тем и сходит на нет к низу шапки. Снизу начинается
   у верхнего края острова и густеет к краю экрана, но до конца не доходит: реплики уходят под поле.
   Отступы ленты сверху и снизу ставит chat.js по высоте шапки и низа. */
.chat-head { position: absolute; top: 0; left: 0; right: 0; z-index: 3; pointer-events: none; display: grid; grid-template-columns: auto 1fr; align-items: baseline; gap: 8px 12px; padding: 0 4px 26px; }
.chat.full .chat-head { padding: calc(14px + env(safe-area-inset-top)) 20px 26px; }
.chat-head b { font-family: var(--font-heading); font-size: var(--fs-h3); font-weight: 600; }
.chat-head .topic { font-size: var(--fs-xs); color: var(--muted); text-align: right; }
.chat-head .progress { grid-column: 1 / -1; }
/* Кнопка «Договорим позже?» на месте темы, пока идёт первый разговор (home-help.js, later): приподнята, как кнопка
   голосового чата; тема в это время только плашкой в ленте. С кабинетом её нет. */
.chat-head .later { pointer-events: auto; justify-self: end; align-self: center; white-space: nowrap; background: var(--card); color: var(--text); box-shadow: var(--shadow); font-weight: 500; }
.chat-head .later svg { flex: none; width: 1.15em; height: 1.15em; }
.chat-head:has(.later) .topic, .chat.cab .chat-head .later { display: none; }
/* Шапка ждёт ответа, кабинет это или первый разговор (screens/chat.html): на месте темы и дорожки тушки того же размера. */
.chat-head .topic.skel { justify-self: end; width: 7rem; height: .85em; border-radius: var(--r-pill); }
.chat-head .progress.skel { height: 5px; border-radius: var(--r-pill); }
.chat-head::before, .chat .composer::before { content: ""; position: absolute; z-index: -1; left: -28px; right: -28px; pointer-events: none;
  -webkit-mask: linear-gradient(to right, transparent, #000 28px, #000 calc(100% - 28px), transparent); mask: linear-gradient(to right, transparent, #000 28px, #000 calc(100% - 28px), transparent); }
.chat-head::before { top: -12px; bottom: 0;
  background: linear-gradient(to bottom, var(--bg) 0, var(--bg) 56%, color-mix(in srgb, var(--bg) 72%, transparent) 74%, color-mix(in srgb, var(--bg) 30%, transparent) 89%, transparent 100%); }
/* Под полем дымка цвета --fog (страница с долей акцента), выше поля на 2,5rem: поле не сливается с карточками под ним. */
.chat .composer::before { top: -2.5rem; bottom: 0;
  background: linear-gradient(to bottom, transparent 0, color-mix(in srgb, var(--fog) 22%, transparent) 25%, color-mix(in srgb, var(--fog) 58%, transparent) 50%, color-mix(in srgb, var(--fog) 84%, transparent) 75%, color-mix(in srgb, var(--fog) 94%, transparent) 100%); }
/* На весь экран затемнение идёт от края до края окна, без боковых кромок. */
.chat.full .chat-head::before, .chat.full .composer::before { left: calc(50% - 50vw); right: calc(50% - 50vw); -webkit-mask: none; mask: none; }
/* Сверху на весь экран — мягкая дымка цвета --fog без сплошной полосы: густая у кромки, за шапкой плавно сходит
   на нет маской, почти на половину шапки ниже неё. */
.chat.full .chat-head::before { top: 0; bottom: -45%;
  background: color-mix(in srgb, var(--fog) 94%, transparent);
  -webkit-mask: linear-gradient(to bottom, #000 0, rgba(0,0,0,.9) 38%, rgba(0,0,0,.62) 58%, rgba(0,0,0,.3) 76%, rgba(0,0,0,.1) 90%, transparent);
  mask: linear-gradient(to bottom, #000 0, rgba(0,0,0,.9) 38%, rgba(0,0,0,.62) 58%, rgba(0,0,0,.3) 76%, rgba(0,0,0,.1) 90%, transparent); }
/* Кабинет (cabinet.js): в шапке слева имя раздела, в середине разделы значками, справа поиск и подарки; дорожки тем
   нет. Боковые части равны, поэтому меню стоит по середине экрана; на узком телефоне правая не уже своих кнопок.
   Имена разделов лежат в одной клетке: прежнее и новое перекатываются друг через друга. Разделы лежат слоями
   поверх ленты; чат скрыт, пока человек в другом разделе, но остаётся на странице. Кнопки — в px и долях ширины
   окна: в них нет текста, с размером букв они не растут и шапку не распирают. */
.chat.cab .chat-head { grid-template-columns: minmax(0, 1fr) auto minmax(max-content, 1fr); align-items: center; gap: 0 8px; }
.chat.cab .chat-head .topic, .chat.cab .chat-head .progress { display: none; }
.cab-name { display: grid; justify-items: start; min-width: 0; white-space: nowrap; line-height: 1.2; }
/* Узкий чат (телефон): имя раздела берёт всё место слева от меню, кнопки справа — ровно своё; буквы имени крупнее (cabinet.js, fit). */
@container (max-width: 560px) { .chat.cab > .chat-head { grid-template-columns: minmax(0, 1fr) auto max-content; gap: 0 6px; } }
/* Шапка «внутри» разговора раздела (cabinet.js, inside): имя раздела и меню спрятаны, место не теряют; на их месте —
   стрелка назад и название разговора с подписью. */
.chat.cab > .chat-head > .cab-name { grid-area: 1 / 1; pointer-events: auto; }   /* три нажатия на «Аккаунт» — номер сборки (account.js) */
.chat.cab > .chat-head > .cab-menu { grid-area: 1 / 2; }
.chat.cab > .chat-head > .cab-side { grid-area: 1 / 3; }
.cab-in { grid-area: 1 / 1 / 2 / 3; min-width: 0; display: flex; align-items: center; gap: 4px; margin-left: -10px; pointer-events: auto; visibility: hidden; }
.chat[data-deep] > .chat-head > .cab-in { visibility: visible; }
html[data-covered] .chat[data-deep] > .chat-head > .cab-in { visibility: hidden; }   /* под окном поверх страницы шапка спрятана со всей страницей */
.chat[data-deep] > .chat-head > :is(.cab-name, .cab-menu) { visibility: hidden; }
.cab-title { min-width: 0; display: grid; grid-template-columns: auto minmax(0, 1fr); line-height: 1.25; }
.cab-title > b, .cab-title > small { grid-column: 2; }
/* Кружок собеседника слева от названия (личный чат Молвы; cabinet.js, inside с face): на обе строки названия. С tap
   название и кружок нажимаются. */
.cab-face { grid-column: 1; grid-row: 1 / 3; align-self: center; position: relative; overflow: hidden; width: 2.25rem; height: 2.25rem; margin: 0 8px 0 0; }
.cab-face[hidden] { display: none; }
.cab-face img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cab-face > svg { width: 100%; height: 100%; }
.cab-title.tap { cursor: pointer; -webkit-tap-highlight-color: transparent; }
/* Выбор сообщений (cabinet.js, inside с done): стрелки нет, шапка «внутри» во всю ширину, справа слово-кнопка вместо
   поиска и подарков. */
.cab-done { display: none; margin-left: auto; padding: 8px 6px 8px 12px; border: 0; background: none; color: var(--accent-ink); font: inherit; font-weight: 600; cursor: pointer; }
.cab-in.done { margin-left: 0; }
.cab-in.done > .cab-back { display: none; }
.cab-in.done > .cab-done { display: block; }
.chat[data-done] > .chat-head > .cab-in { grid-column-end: 4; }
.chat[data-done] > .chat-head > .cab-side { visibility: hidden; }
.chat-head .cab-title b { font-size: var(--fs-md); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cab-title small { font-size: var(--fs-xs); color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Поиск раздела: на месте названия — поле. Буквы не мельче 16 px: иначе айфон приближает страницу к полю. */
.cab-find { flex: 1; min-width: 0; height: 40px; margin-right: 2px; padding: 0 14px; border: 0; border-radius: var(--r-pill); background: var(--field); box-shadow: var(--inset); color: var(--text); font: inherit; font-size: max(16px, 1rem); -webkit-appearance: none; appearance: none; outline: none; -webkit-user-select: text; user-select: text; }
.cab-find::-webkit-search-cancel-button { -webkit-appearance: none; }
.cab-find::placeholder { color: var(--muted); }
.cab-in:not(.find) > .cab-find, .cab-in.find > .cab-title { display: none; }
.cab-name > span { grid-area: 1 / 1; }
/* Имя Молвы (molva.js, name): «Молва» — как имя любого раздела, под ним мелко «Лента · Чаты». Где человек —
   обычным цветом, соседняя — бледно. Всё имя вместе со строкой под ним — одна кнопка: нажатие куда угодно ведёт
   в соседнюю вкладку. Строка вкладок висит под именем и места в шапке не берёт: высота имени та же, что у других
   разделов, при смене раздела ничего не съезжает. Шапка пропускает нажатия насквозь, имя — нет. У бледной вкладки
   число нового; у своей его нет: человек и так там. */
.molva-name { position: relative; pointer-events: auto; cursor: pointer; outline: none; -webkit-tap-highlight-color: transparent; }
.molva-tabs { position: absolute; left: 0; top: 100%; display: flex; margin: -2px 0 0 -4px; }
.molva-tabs > span { display: inline-flex; align-items: center; gap: .35em; padding: 4px; border-radius: var(--r-pill);
  font: 500 var(--fs-sm)/1.2 var(--font); color: var(--text-2); transition: color var(--t-tint); }
.molva-tabs > span + span::before { content: "·"; margin: 0 .45em 0 -.05em; color: var(--text-2); opacity: .7; }   /* точка склеивает два слова в одну подпись */
.molva-tabs > [data-now] { color: var(--text); }
.molva-name:hover .molva-tabs > :not([data-now]), .molva-name:focus-visible .molva-tabs > :not([data-now]) { color: var(--text); }
.molva-tabs i { min-width: 1.6em; padding: 0 .35em; border-radius: var(--r-pill); background: var(--accent); color: var(--on-accent); font: 600 .625rem/1.6 var(--font); font-style: normal; text-align: center; }
.molva-tabs i:empty { min-width: 0; width: .45rem; height: .45rem; padding: 0; }   /* точка: новое есть, а сколько — неизвестно (личный чат с Михаилом) */
.molva-tabs > [data-now] > i, .molva-tabs i[hidden] { display: none; }
.cab-menu, .cab-side { pointer-events: auto; display: flex; align-items: center; }
/* Превращение простой шапки в шапку кабинета (cabinet.js, reveal): отрезки дорожки и подпись темы — тени на прежних местах. */
.chat-head .cab-ghost { position: absolute; display: block; margin: 0; border-radius: 99px; pointer-events: none; white-space: nowrap; }
.cab-side { justify-content: flex-end; gap: 2px; }
.cab-tabs.seg button { display: grid; place-items: center; width: clamp(30px, 9vw, 40px); min-height: 40px; padding: 0; }
.cab-tabs svg, .cab-act svg { width: 22px; height: 22px; }
.cab-tabs [data-tab="molva"] svg { width: 26px; height: 26px; }   /* сорока мельче соседей: в квадрате значка её вытягивает хвост */
/* Бегунок гаснет, когда открыт поиск или подарки, и загорается на возврате в меню. */
.cab-tabs.seg .thumb { transition: opacity var(--t-fast); }
.cab-tabs.seg[data-dir="r"] .thumb { transition: right .26s var(--ease), left .56s cubic-bezier(.3, 1.45, .45, 1), opacity var(--t-fast); }
.cab-tabs.seg[data-dir="l"] .thumb { transition: left .26s var(--ease), right .56s cubic-bezier(.3, 1.45, .45, 1), opacity var(--t-fast); }
.cab-act { position: relative; flex: none; width: clamp(34px, 9.2vw, 40px); height: 40px; border: 0; border-radius: var(--r-pill); padding: 0; display: grid; place-items: center; cursor: pointer; background: none; color: var(--text-2); transition: background var(--t-tint), color var(--t-tint), box-shadow var(--t-tint); }
.cab-act:hover { color: var(--text); }
.cab-act[aria-pressed="true"] { background: var(--card); color: var(--text); box-shadow: var(--shadow); }
.cab-count { position: absolute; top: 2px; right: 0; min-width: 1.6em; padding: 0 .35em; border-radius: var(--r-pill); background: var(--accent); color: var(--on-accent); font-size: calc(.625rem * var(--z, 1)); font-style: normal; font-weight: 600; line-height: 1.6; text-align: center; }
.cab-tabs .cab-count { top: -3px; right: -5px; animation: dot var(--t-slow) var(--ease) both; }   /* число новых постов у сороки */
/* Плашка «Мирон ответил» (cabinet.js, шапка): карточка под шапкой кабинета, как уведомление мессенджера. Слева значок Мирона,
   справа имя и время, под ними начало ответа: место под две строки всегда, поэтому смена текста высоту не дёргает. Ручка
   снизу подсказывает, что плашку можно смахнуть. Место по высоте ставит cabinet.js (top). */
.cab-note { position: absolute; z-index: 4; left: 8px; right: 8px; max-width: 34rem; margin-inline: auto; display: grid; grid-template-columns: 2.5rem minmax(0, 1fr); gap: 2px 12px; align-items: center;
  padding: 12px 14px 14px; border-radius: var(--r-lg); background: var(--card); box-shadow: var(--shadow), 0 14px 34px rgba(0,0,0,.14);
  cursor: pointer; touch-action: none; -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent; }
.cab-note > img { grid-row: 1 / 3; align-self: start; width: 2.5rem; height: 2.5rem; border-radius: 12px; }
.cab-note-top { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.cab-note-top b { font-size: var(--fs-md); font-weight: 600; }
.cab-note-top small { font-size: var(--fs-xs); color: var(--muted); }
.cab-note-text { position: relative; min-width: 0; min-height: calc(2 * 1.35em); font-size: var(--fs-sm); line-height: 1.35; color: var(--text); }
.cab-note-text > span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cab-note-text > span + span { position: absolute; inset: 0; }   /* новый текст встаёт поверх уходящего */
.cab-note::after { content: ''; position: absolute; left: 50%; bottom: 5px; width: 32px; height: 4px; margin-left: -16px; border-radius: 2px; background: var(--hairline); }
.cab-lead { color: var(--text-2); padding: 0 4px; text-align: center; }
/* Подарок — карточка-виджет, как в чате (parts.js, Miron.widget): слева плюс с числом сообщений, над заголовком —
   сколько дарят, ниже — что сделать, кнопка — дно карточки. У сериала вместо кнопки серии под спойлером. */
.cab-gift .gift-num { font-family: var(--font-heading); font-size: .875rem; font-weight: 600; letter-spacing: -.01em; }
/* Серии под спойлером сериала: имя серии слева, справа слово — «Читать» или когда откроется. */
.cab-serial > summary .ic-plus { margin-left: auto; }
.cab-serial .in.cab-series { padding: 0 18px 12px; color: inherit; }
/* Полученные подарки — тихие строки под словами «Уже твои»: галочка, что сделано, сколько получено. */
.cab-mine { margin-top: var(--s-3); }
.cab-got { display: flex; align-items: center; gap: var(--s-3); min-height: var(--hit); padding: 10px 18px; border-radius: var(--r-md); background: var(--field); box-shadow: var(--inset); color: var(--text-2); }
.cab-got svg { flex: none; width: 1.1rem; height: 1.1rem; color: var(--accent-ink); }
.cab-got span { flex: 1; min-width: 0; }
.cab-got b { font-family: var(--font-heading); font-weight: 600; color: var(--text); }
.cab-series { display: grid; gap: var(--s-2); padding: 0 var(--s-3); }
.cab-serial .cab-serie, .cab-serial .cab-serie.shut, .cab-serial .cab-serie.next { background: none; box-shadow: none; border-radius: 0; padding: 6px 0; }
.cab-serial .cab-serie.skel { background: var(--field); border-radius: var(--r-sm); }
.cab-serie { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); min-height: var(--hit); padding: 10px 18px; border-radius: var(--r-md); background: var(--card); box-shadow: var(--shadow); color: var(--text); text-decoration: none; font-size: var(--fs-md); }
.cab-serie b { font-weight: 600; }
.cab-serie span { color: var(--accent); font-weight: 500; }
.cab-serie.shut { background: var(--field); box-shadow: var(--inset); color: var(--text-2); }
.cab-serie.shut span { color: var(--muted); font-weight: 400; }
.cab-serie span { display: inline-flex; align-items: center; gap: 6px; }
.cab-serie svg { width: 1.1rem; height: 1.1rem; }
.cab-serie.done span { color: var(--text-2); font-weight: 400; }
.cab-serie.next { background: var(--accent-soft); box-shadow: none; color: var(--text); }
.cab-serie.next span { color: var(--accent); font-weight: 500; }
.cab-serie.hollow span { width: 6rem; } .cab-serie.hollow span > .skel { flex: 1; }   /* срок серии тушкой — строка своей ширины */
.quiz.hollow .quiz-facts .skel { margin-inline: auto; }   /* число вступления тушкой — по середине, как число */
/* Карточка серии в ленте чата (series.js, widget): сериал, серия, подводка, сообщение под спойлером. Слова — полным цветом,
   приглушена только строка над заголовком. Кнопка — дно карточки: во всю ширину, без отступов, сверху прямая,
   нижние углы — углы карточки. */
/* Страница серии (series.js, screens/series.html): текст для чтения в одну колонку. Абзацы лежат на подложках
   (series-sheet), полным цветом; заголовки глав, цитаты и картинки стоят на фоне. Картинка держит место тушкой
   и проступает, когда пришла; карусель листается вбок, следующая картинка выглядывает справа. */
.series { font-size: var(--fs-read); line-height: 1.6; overflow-wrap: anywhere; }
.series-sheet, .help-sheet { padding: 20px 18px; }   /* та же подложка — у статьи базы знаний (help.js) */
.series-sheet > p, .help-sheet > p { white-space: pre-line; text-wrap: pretty; color: var(--text); }
.series > h2, .series-part > h2 { font-size: var(--fs-h2); line-height: 1.15; font-weight: 700; margin-top: var(--s-6); }
.series > .quote, .series-part > .quote { white-space: pre-line; }
.series-sheet > ul, .help-sheet > ul { list-style: disc; gap: var(--s-2); padding-left: 1.35em; }
.series-img { margin: 0; border-radius: var(--r-lg); overflow: hidden; background: color-mix(in oklab, var(--text) 6%, var(--card)); aspect-ratio: 3 / 2; }
.series-img.is-in { aspect-ratio: auto; background: none; box-shadow: var(--shadow); }
.series-img img { display: block; width: 100%; height: auto; opacity: 0; transition: opacity var(--t-slow) var(--ease); }
.series-img.is-in img { opacity: 1; }
.series-slides { display: flex; gap: var(--s-3); margin: 0 -8px; padding: 8px 8px var(--s-4); overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; }
.series-slides::-webkit-scrollbar { display: none; }
.series-slides .series-img { flex: 0 0 82%; scroll-snap-align: center; align-self: center; }
/* Снимок экрана в новости (строка «[Снимок: …]» её исходника): высокий снимок телефона стоит в квадрате целиком,
   за ним — он же, растянутый и размытый. До прихода файла квадрат — тушка, снимок проступает (is-in). Нажал — снимок
   на весь экран (Miron.picture, base.js). У светлой и тёмной темы свой снимок; чужой теме он не грузится (loading=lazy). */
.series-shot { margin: 0; display: grid; }
.series-shot > button { position: relative; display: flex; aspect-ratio: 1; padding: 0; border: 0; border-radius: var(--r-lg); overflow: hidden; background: color-mix(in oklab, var(--text) 6%, var(--card)); box-shadow: var(--shadow); cursor: zoom-in; }
.series-shot img { opacity: 0; transition: opacity var(--t-slow) var(--ease); }
.series-shot > button.is-in img { opacity: 1; }
.series-shot .shot-blur { position: absolute; inset: -10%; width: 120%; height: 120%; object-fit: cover; filter: blur(24px) saturate(1.2); }
.series-shot .shot-pic { position: relative; display: block; height: calc(100% - 2 * var(--s-4)); width: auto; margin: auto; border-radius: var(--r-md); box-shadow: var(--shadow); }
:root:not([data-theme="dark"]) .series-shot > [data-look="dark"], :root[data-theme="dark"] .series-shot > [data-look="light"] { display: none; }
.series-row { display: flex; align-items: center; justify-content: center; gap: var(--s-4); font-family: var(--font-heading); font-weight: 600; color: var(--text-2); }
.series-row .series-img { flex: 0 0 4.5rem; aspect-ratio: auto; background: none; box-shadow: none; border-radius: 0; }
:root[data-theme="dark"] .series-row img { filter: invert(1); }   /* стрелка нарисована чёрным */
/* Разбор — вторая часть серии: тот же фон и те же листы, перед ней отступ побольше. */
.series-part { margin-top: var(--s-7); }
.series-part > h2:first-child { margin-top: 0; }
/* Тизер следующей серии: заголовок на фоне, под ним обычная карточка — начало анонса в четыре строки, картинка и таймер. */
.series-next { display: grid; gap: var(--s-4); margin-top: var(--s-5); }
.series-next h2 { font-size: 1.125rem; text-align: center; }
.series-next-in { display: grid; gap: var(--s-3); padding: 16px 18px; border-radius: var(--r-lg); background: var(--card); box-shadow: var(--shadow); }
.series-next-text { white-space: pre-line; color: var(--text); font-size: var(--fs-md); line-height: 1.45; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4; line-clamp: 4; overflow: hidden; }
.series-next-row { display: flex; align-items: center; gap: var(--s-3); font-size: var(--fs-md); font-weight: 500; }
.series-next-row .series-img { flex: 0 0 4.5rem; aspect-ratio: 1; border-radius: var(--r-md); }
.series-next-row .series-img img { height: 100%; object-fit: cover; }
/* Таймер до следующей серии (вошедшему): три окошка — часы, минуты, секунды. */
.series-timer-side { flex: 1; display: grid; gap: var(--s-2); min-width: 0; }   /* справа от картинки: слова и под ними таймер или кнопка «Читать» во всю ширину */
.series-timer { display: flex; gap: var(--s-2); }
.series-timer span { display: grid; justify-items: center; gap: 2px; min-width: 3rem; padding: 6px 4px 4px; border-radius: var(--r-md); background: var(--field); box-shadow: var(--inset); }
.series-timer b { font-family: var(--font-heading); font-size: 1.125rem; line-height: 1; font-variant-numeric: tabular-nums; }
/* Минуты и секунды — граница вёрстки: ширину двух цифр series.js меряет один раз (--digits, в em), высота строки — 1em.
   Смена цифр раз в секунду перекладывает только окошко, а не страницу; вид тот же. */
.series-timer[data-sized] span:nth-child(n+2) b { width: var(--digits); height: 1em; contain: size layout; }
.series-timer small { font-size: var(--fs-xs); font-weight: 400; color: var(--text-2); }
/* Дорожка из семи серий внизу страницы (вошедшему): отрезок, под ним номер серии и подарок. */
.series-track { display: grid; gap: var(--s-3); margin-top: var(--s-6); text-align: center; }
.series-track h2 { font-size: 1.125rem; }
.series-track > p { font-size: var(--fs-md); }
.series-track-line { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; margin-top: var(--s-2); }
.series-track-line span { display: grid; gap: 4px; justify-items: center; color: var(--text-2); }
.series-track-line i { width: 100%; height: 6px; border-radius: var(--r-pill); background: var(--field); box-shadow: var(--inset); }
.series-track-line small { font-size: var(--fs-xs); }
.series-track-line b { font-size: var(--fs-sm); font-weight: 600; }
.series-track-line .now i { background: var(--accent-soft); }
.series-track-line .now { color: var(--text); }
.series-track-line .on i { background: var(--accent); box-shadow: none; }
.series-track-line .on b { color: var(--accent-ink); }
.series-track-line [aria-current] small { font-weight: 600; color: var(--text); }
/* Карточка серии — поля и кнопки как у карточек чата (.widget, .widget-go). */
.series-card { --pad: 18px; --foot: 16px; gap: 10px; padding: var(--foot) var(--pad); margin-top: var(--s-4); scroll-margin-top: 5rem; }
.series-card p { white-space: pre-line; color: var(--text); font-size: var(--fs-md); line-height: 1.45; }
.series-enter form .widget-go { order: 1; }   /* строка об ошибке входа встаёт над кнопкой, а не под ней */
/* Предложение под итогом вопросов — карточка чата (.widget) на странице серии: свой здесь только отступ сверху. */
.series-offer { margin-top: var(--s-4); }
/* Вопросы в конце серии (series.js): карточка-квиз, по левому краю, как карточка чата. Значок — рядом с заголовком
   (или с числом подарка), сверху вопроса номер и жизни сердечками, дорожка из отрезков, вопрос и ответы во всю ширину.
   Нажатый ответ подсвечен, мимо — гаснет. */
.quiz { gap: var(--s-3); text-align: left; justify-items: stretch; grid-template-columns: auto minmax(0, 1fr); column-gap: var(--s-3); align-items: center; }
.quiz > * { min-width: 0; grid-column: 1 / -1; }
.quiz > .quiz-ic { grid-column: 1; }
.quiz > .quiz-ic + h3, .quiz > .quiz-ic + .num { grid-column: 2; }
.quiz h3 { font-size: 1.125rem; line-height: 1.3; color: var(--text); }
.quiz .num { font-size: 1.5rem; opacity: 1; }
.quiz-ic { width: 2.5rem; height: 2.5rem; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.quiz-ic svg { width: 1.25rem; height: 1.25rem; }
.quiz-ic.off { background: var(--field); color: var(--muted); }
.quiz-facts { width: 100%; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-2) !important; }
.quiz-facts li { display: grid; gap: 2px; align-content: start; padding: 8px 6px; border-radius: var(--r-md); background: var(--field); box-shadow: var(--inset); font-size: var(--fs-xs); line-height: 1.3; color: var(--text-2); text-align: center; }
.quiz-facts b { font-family: var(--font-heading); font-size: 1.125rem; font-weight: 600; color: var(--text); }
.quiz-top { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); }
.quiz-lives { display: inline-flex; gap: 4px; color: var(--red); }
.quiz-lives i { display: grid; transition: opacity var(--t-slow) var(--ease), transform var(--t-slow) var(--ease); }
.quiz-lives svg { width: 1rem; height: 1rem; }
.quiz-lives .off { opacity: .22; transform: scale(.8); color: var(--muted); }
.quiz-track { width: 100%; display: flex; gap: 6px; }
.quiz-track i { flex: 1; height: 6px; border-radius: var(--r-pill); background: var(--field); box-shadow: var(--inset); transition: background var(--t-slow) var(--ease); }
.quiz-track .on { background: var(--accent); box-shadow: none; }
.quiz-track .now { background: var(--accent-soft); }
.quiz-opts { width: 100%; display: grid; gap: var(--s-2); }
.quiz-opt { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); width: 100%; min-height: var(--hit); padding: 10px 16px; border: 0; border-radius: var(--r-md); background: var(--field); box-shadow: var(--inset); color: var(--text); font: inherit; font-size: var(--fs-md); line-height: 1.35; text-align: left; cursor: pointer; transition: background var(--t-tint), color var(--t-tint), opacity var(--t-fast); }
.quiz-opt.wrong { opacity: .45; text-decoration: line-through; cursor: default; }
.quiz.wait .quiz-opt { pointer-events: none; }
.quiz-opt.picked { background: var(--accent-soft); }
/* Итог вопросов (series.js, end): подложки нет, строка и под ней пузырь подарка «+10 сообщений» (погасший — «Жизни закончились»);
   карточка-предложение встаёт сразу под ним, как обычная карточка. */
.series-card.quiz-done { display: grid; gap: var(--s-3); justify-items: center; text-align: center; padding: var(--s-2) 0 0; }
.series-card.quiz-done > p { margin: 0; }
.quiz-pill { display: inline-flex; align-items: center; gap: 8px; min-height: var(--hit); padding: 8px 18px; border-radius: var(--r-pill); background: var(--accent-soft); color: var(--accent-ink); font-size: var(--fs-md); font-weight: 500; line-height: 1; }
.quiz-pill svg { width: 1.125rem; height: 1.125rem; }
.quiz-pill b { font-family: var(--font-heading); font-size: 1.25rem; font-weight: 600; }
.quiz-pill.off { background: var(--field); color: var(--text-2); box-shadow: var(--inset); }
/* Приёмы внимания экскурсии, кроме света: значок подпрыгивает (a-lift), буквы текста волной приподнимаются
   и вспыхивают акцентом (a-letters: текст на время разбит на слова a-word в одной a-line, слова — на буквы <i style="--i:номер">). */
.a-lift { animation: lift .7s var(--ease); transform-origin: 50% 100%; }
@keyframes lift { 0%, 100% { transform: none; } 35% { transform: translateY(-6px) scale(1.12); } 65% { transform: translateY(1px) scale(.98); } }
.a-word, .a-line.one { white-space: nowrap; }
.a-letters i { display: inline-block; font-style: normal; animation: letter .6s calc(var(--i) * 45ms) var(--ease) both; }
@keyframes letter { 0%, 100% { transform: none; } 40% { transform: translateY(-4px); color: var(--accent); } }
.dia-sample { text-align: center; }
/* Компьютер: кабинет — колонка посередине окна, а разделы и ленты — во всю ширину окна, содержимое в той же колонке
   (поля по бокам, --bleed — сколько от колонки до края окна). То, что едет вбок — волна разделов, свайп сообщения, тени, —
   режет только край окна, а не стена колонки. На телефоне колонка во всю ширину, --bleed — ноль. */
body > .chat.full { --bleed: max(0px, (100vw - 46rem) / 2); }
.cab-panes { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.chat.full .cab-pane { left: calc(-1 * var(--bleed, 0px)); right: calc(-1 * var(--bleed, 0px)); }
.cab-pane { position: absolute; inset: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; pointer-events: auto; display: flex; flex-direction: column; gap: var(--s-3); padding: 0 4px 24px; }
.cab-pane > * { flex: none; }
.cab-pane::-webkit-scrollbar { display: none; }
.cab-pane[hidden] { display: none; }
/* Обновление пальцем (cabinet.js): лента едет вниз за пальцем, кружок стоит посередине открывшегося места; отпустили — крутится, пока раздел спрашивает сервер. */
.cab-pull { position: absolute; left: 50%; top: calc(var(--cab-top, 5rem) - 8px); z-index: 3; width: 2.6rem; height: 2.6rem; border-radius: 50%; display: grid; place-items: center;
  background: var(--card); box-shadow: var(--shadow); color: var(--accent); pointer-events: none; transform: translate(-50%, 0); opacity: 0; will-change: transform, opacity; }
.cab-pull[hidden] { display: none; }
[data-pull]:not([data-pull-free]) { overscroll-behavior-y: none !important; }   /* в покое наверху ленту вниз ведёт сайт: резинка браузера сдвинула бы её второй раз; сдвинулась (cabinet.js) — резинка снова есть */
.cab-pull svg { width: 1.35rem; height: 1.35rem; }
.cab-pull.spin svg { animation: spin .8s linear infinite; }
@media (prefers-reduced-motion: reduce) { .cab-pull.spin svg { animation: none; } }
.chat.full .cab-pane { padding: 0 calc(20px + var(--bleed, 0px)) calc(24px + env(safe-area-inset-bottom)); }
.chat.cab:not([data-at="chat"]) > :is(.feed, .composer, .chat-find) { visibility: hidden; pointer-events: none; }   /* поиск чата, открытый лупой из Подарков, ждёт чат */
/* Молва (molva.js) — мессенджер в разделе кабинета. В слое раздела лежат список разговоров и переписки; каждая
   переписка — тот же виджет чата (.chat.full.plain), вложенный в чат кабинета: своя лента, своё поле, своя шапка —
   кнопка-пилюля «назад» под шапкой кабинета (высота шапки кабинета — --cab-top, cabinet.js). Тень низа экрана
   у переписки своя, тень чата кабинета на это время снята (data-room): она легла бы поверх поля. */
.cab-pane.molva, .cab-pane.account, .cab-pane.diary { display: block; overflow: hidden; padding: 0 !important; }
/* Аккаунт (account.js): один экран — кто вошёл, лента разделов, открытый раздел. Буквы как в чате: слова — --fs-read. */
.acc-page { position: absolute; inset: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; overflow-x: hidden; display: flex; flex-direction: column; gap: var(--s-3); padding: calc(var(--cab-top, 5rem) - 8px) 4px 24px; font-size: var(--fs-read); }
.chat.full .acc-page { padding: calc(var(--cab-top, 5rem) - 8px) calc(20px + var(--bleed, 0px)) calc(24px + env(safe-area-inset-bottom)); }
.acc-page::-webkit-scrollbar { display: none; }
.acc-page > * { flex: none; }
.acc-me { display: grid; grid-template-columns: minmax(0, 1fr); justify-items: center; gap: 4px; padding: 4px 0 8px; text-align: center; }   /* длинное имя не раздвигает колонку за экран */
.acc-me b { min-width: 0; max-width: 100%; font-family: var(--font-heading); font-size: var(--fs-h2); font-weight: 600; line-height: 1.15; overflow-wrap: break-word; -webkit-hyphens: auto; hyphens: auto; text-wrap: balance; }   /* имя целиком, переносом с дефисом */
.acc-me p { max-width: 100%; color: var(--text-2); overflow-wrap: anywhere; }
.acc-me .tag { margin-top: 6px; font-size: var(--fs-sm); min-height: 32px; }   /* ростом кнопки короны (button.tag): тариф, корона и тушка ярлыка одной высоты, шапка не дрогнет */
.acc-me .acc-face { width: 6rem; height: 6rem; margin-bottom: 8px; overflow: hidden; font-family: var(--font-heading); font-size: var(--fs-h1); font-weight: 600; }
.acc-me .acc-face img { display: block; width: 100%; height: 100%; object-fit: cover; }   /* референс человека вместо буквы */
.acc-face-box { position: relative; margin-bottom: 8px; padding: 0; border: 0; border-radius: 50%; background: none; color: inherit; font: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }   /* кружок нажимается: окно аватара */
.acc-me .acc-face-box .acc-face { margin-bottom: 0; }
.way-ic.acc-face > svg { width: 100%; height: 100%; }   /* значок на аватаре во весь кружок, рисунок в нём на 80% (Miron.icon.fit); без .way-ic перебил бы .way-ic > svg ниже */
.acc-face-pen { position: absolute; right: -2px; bottom: -2px; width: 2rem; height: 2rem; border-radius: 50%; display: grid; place-items: center; background: var(--card); box-shadow: var(--shadow); color: var(--text-2); }
.acc-face-pen svg { width: 1rem; height: 1rem; }
/* Окно аватара (account.js, avaOpen): кружок крупно, «Своё фото», значки закладками, как в окне раздела дневника. */
.acc-ava { display: grid; gap: var(--s-4); font-size: var(--fs-read); }
.acc-ava > p { color: var(--text-2); }
.acc-ava-now { display: grid; justify-items: center; }
.acc-ava-now .acc-face { width: 8rem; height: 8rem; overflow: hidden; font-family: var(--font-heading); font-size: var(--fs-h1); font-weight: 600; }
.acc-ava-now .acc-face img { display: block; width: 100%; height: 100%; object-fit: cover; }
.acc-ava-photo { display: grid; gap: var(--s-3); }
.acc-ava-photo > p { color: var(--text-2); }
.acc-ava .dia-box { display: grid; gap: var(--s-3); }
.acc-ava .dia-menu { margin-inline: -22px; padding-inline: 22px; } .acc-ava .dia-slides { margin-inline: -22px; } .acc-ava .dia-slide { padding-inline: 22px; }
/* Обрезка своего фото — слой во всё окно аватара: фото, квадрат посередине, вне квадрата фон страницы сквозь фото,
   углы квадрата за кругом аватара чуть приглушены — видно, что встанет в кружок. */
.overlay:has(> .acc-crop) { overflow-y: hidden; }   /* полоса прокрутки окна не встаёт поверх слоя */
.acc-crop { position: fixed; inset: 0; z-index: 6; display: grid; grid-template-rows: minmax(0, 1fr) auto; gap: var(--s-3); padding: calc(env(safe-area-inset-top) + 16px) 16px calc(env(safe-area-inset-bottom) + 16px); background: var(--bg); font-size: var(--fs-read); text-align: center; }
.acc-crop-stage { position: relative; overflow: hidden; touch-action: none; cursor: grab; user-select: none; -webkit-user-select: none; }
.acc-crop-stage:active { cursor: grabbing; }
.acc-crop-stage canvas { position: absolute; left: 50%; top: 50%; max-width: none; transform-origin: 50% 50%; }
.acc-crop-frame { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); pointer-events: none; box-shadow: 0 0 0 100vmax color-mix(in srgb, var(--bg) 80%, transparent); }
.acc-crop-frame::after { content: ""; position: absolute; inset: 0; background: radial-gradient(circle closest-side, transparent 99.5%, color-mix(in srgb, var(--bg) 35%, transparent) 100%); }
.acc-crop-bar { display: grid; gap: var(--s-3); width: 100%; max-width: 26rem; margin: 0 auto; }
.acc-crop-acts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
/* Бегунок значения (input type=range): дорожка вдавлена, ручка — кружок с тенью, как у тумблера; пройденное — акцент. */
.range { -webkit-appearance: none; appearance: none; width: 100%; height: 1.9rem; margin: 0; background: none; cursor: pointer; accent-color: var(--accent); }
.range::-webkit-slider-runnable-track { height: 6px; border-radius: var(--r-pill); background: var(--field); box-shadow: var(--inset); }
.range::-moz-range-track { height: 6px; border-radius: var(--r-pill); background: var(--field); box-shadow: var(--inset); }
.range::-moz-range-progress { height: 6px; border-radius: var(--r-pill); background: var(--accent); }
.range::-webkit-slider-thumb { -webkit-appearance: none; width: 1.5rem; height: 1.5rem; margin-top: calc(3px - .75rem); border: 0; border-radius: 50%; background: var(--card); box-shadow: var(--shadow); }
.range::-moz-range-thumb { width: 1.5rem; height: 1.5rem; border: 0; border-radius: 50%; background: var(--card); box-shadow: var(--shadow); }
.acc-me.hollow b.skel { width: 4.5rem; } .acc-me.hollow p .skel { width: 12rem; }   /* тушка имени и почты (account.js) */
.acc-name { display: inline-flex; align-items: center; gap: 10px; max-width: 100%; padding: 0 0 0 calc(1.1rem + 10px); border: 0; background: none; color: inherit; font: inherit; cursor: pointer; }   /* поле слева равно карандашу: имя стоит по середине */
.acc-name svg { flex: none; width: 1.1rem; height: 1.1rem; color: var(--muted); }
.acc-rename { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; width: 100%; max-width: 24rem; text-align: left; }
.acc-rename .note { grid-column: 1 / -1; max-width: none; }
.acc-row { font-size: var(--fs-md); }
.talk-row.acc-row b { grid-row: 1; grid-column: 2; font-size: var(--fs-lg); white-space: normal; overflow-wrap: break-word; }   /* заголовок строки на крупном шрифте переносится, а не режется */
.talk-row.acc-row p { grid-row: 2; grid-column: 2; font-size: var(--fs-md); color: var(--text); white-space: normal; overflow-wrap: anywhere; }   /* строка под именем переносится и стоит полным цветом: сильнее общего правила .talk-row p ниже */
.talk-row.acc-row { grid-template-columns: auto minmax(0, 1fr); }   /* стрелки справа нет: текст до правого края */
/* База знаний (help.js): строка статьи без значка; статья — слой поверх раздела, читается как серия сериала. */
.talk-row.help-row { grid-template-columns: minmax(0, 1fr); }
.talk-row.help-row b { white-space: normal; overflow-wrap: anywhere; text-wrap: pretty; line-height: 1.3; }   /* заголовок статьи целиком, без троеточия */
.talk-row.help-row b, .talk-row.help-row p { grid-column: 1; }   /* сильнее .talk-row.acc-row b: значка у статьи нет */
/* Первый экран базы знаний (help.js): заголовки «С чего начать» и «Все темы» на бумаге; три статьи строками через линию —
   заголовок, справа минуты чтения, под ним описание в две строки; темы плитками в два столбца — значок линией, имя темы,
   сколько статей. Экран темы ставит статьи теми же строками (help-list). Образец — «кабинет/темы» на витрине. */
.help-head { padding: 10px 6px 0; font-family: var(--font-heading); font-size: var(--fs-h3); font-weight: 600; line-height: 1.2; }
.help-list { line-height: 1.65; }   /* как у ленты Аккаунта: в экране темы (help-read, 1.55) строки той же высоты */
.help-list > .help-row { grid-template-columns: minmax(0, 1fr) auto; column-gap: 14px; }
.help-list > .help-row > b { grid-row: 1; }
.help-list > .help-row > p { grid-row: 2; white-space: normal; font-size: var(--fs-md); color: var(--text); display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; }
.help-min { grid-column: 2; grid-row: 1; align-self: start; margin-top: .25em; font-size: var(--fs-sm); color: var(--muted); white-space: nowrap; }
.help-themes { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.help-theme { display: grid; align-content: start; gap: 6px; min-height: 7.5rem; padding: 16px; border: 0; border-radius: var(--r-lg); background: var(--card); box-shadow: var(--shadow); color: var(--text); font: inherit; text-align: left; cursor: pointer; transition: transform var(--t-fast) var(--ease); }
.help-theme:not(.hollow):active { transform: scale(.97); }
.help-theme > i { display: inline-flex; min-height: 1.6rem; margin-bottom: 4px; color: var(--accent-ink); }
.help-theme > i > svg { width: 1.6rem; height: 1.6rem; }
.help-theme > b { font-family: var(--font-heading); font-size: var(--fs-md); font-weight: 600; line-height: 1.25; }
.help-theme > small { font-size: var(--fs-sm); color: var(--muted); }
.help-read { position: absolute; inset: 0; z-index: 1; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; scrollbar-width: none; display: flex; flex-direction: column; gap: var(--s-4);
  padding: calc(var(--cab-top, 5rem) + 4px) 4px 32px; font-size: var(--fs-read); line-height: 1.55; overflow-wrap: anywhere; }
.chat.full .help-read { padding: calc(var(--cab-top, 5rem) + 4px) calc(20px + var(--bleed, 0px)) calc(32px + env(safe-area-inset-bottom)); }   /* края — как у карточек Аккаунта под статьёй */
.help-read::-webkit-scrollbar { display: none; }
.help-read[hidden] { display: none; }
.help-read { touch-action: pan-y; }   /* вбок статью ведёт свайп назад (help.js), а не браузер */
.help-read > * { flex: none; margin: 0; }
.help-read h1 { font-size: var(--fs-h2); text-wrap: balance; }
.help-read h2 { font-size: var(--fs-h3); margin-top: var(--s-3); }
.help-read h3 { font-family: inherit; font-size: var(--fs-lg); font-weight: 600; margin-top: var(--s-2); }
.help-read .help-lead { color: var(--text-2); }
.help-read ul, .help-read ol { display: grid; gap: var(--s-2); padding-left: 1.35em; }
.help-read figure { display: grid; gap: var(--s-2); }
.help-read img { display: block; width: 100%; height: auto; border-radius: var(--r-lg); box-shadow: var(--shadow); }
.help-read figcaption { color: var(--muted); font-size: var(--fs-md); text-align: center; }
/* Места патронов в статье (help.js, строка «[места патронов]»): слева «Занято мест» и крупно «65 из 100», справа
   «Осталось» и крупно «35», под ними полоса. Числа короткие и не переносятся при любом размере шрифта, подписи — слово
   в строку, поэтому ничего не наезжает. Число держит высоту и тушкой: встаёт без прыжка. Полоса — как дорожка серий:
   вдавленная, занятое ровно залито цветом сайта, без блика и свечения. */
.seats { display: grid; gap: var(--s-3); }
.seats-nums { display: flex; justify-content: space-between; align-items: flex-end; gap: var(--s-3); }
.seats-nums > span { display: grid; gap: 2px; min-width: 0; }
.seats-nums > span + span { justify-items: end; text-align: right; }
.seats-nums small { font-size: var(--fs-sm); color: var(--text); }
.seats-nums b { font-family: var(--font-heading); font-size: var(--fs-stat); font-weight: 600; line-height: 1.1; height: 1.1em; white-space: nowrap; font-variant-numeric: tabular-nums; }
.seats-nums b em { font-style: normal; font-size: .5em; font-weight: 500; }
.seats-nums b .skel { display: inline-block; width: 1.8em; height: .8em; vertical-align: -.05em; }
.seats-line { display: block; height: 10px; border-radius: var(--r-pill); background: var(--field); box-shadow: var(--inset); }
.seats-line i { display: block; height: 100%; border-radius: inherit; background: var(--accent); }
.help-sheet > ol { list-style: decimal; }   /* подложка статьи — та же, что у серии (.series-sheet выше); цитата — .quote */
/* Дневник (diary.js), макет: списки разделов, записи и планы карточками, ежедневник. Лента видов, строки и слой открытого раздела — те же, что у Аккаунта и базы знаний. */
.dia-group { display: flex; flex-direction: column; gap: var(--s-3); }
.dia-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); min-height: 36px; padding: 0 6px; margin-top: var(--s-2); }
.dia-head h3 { font-size: var(--fs-h3); }
.dia-head small { font-size: var(--fs-sm); color: var(--muted); }
.dia-head .btn { gap: 6px; padding-inline: 12px 16px; }
.dia-head .btn svg, .dia-edit svg { width: 1.1rem; height: 1.1rem; }
.dia-row .way-ic { font-family: var(--font-heading); font-size: var(--fs-lg); font-weight: 600; }
.dia-row p .tag { margin-right: 8px; vertical-align: 1px; }
.dia-day { padding: 4px 6px 0; font-size: var(--fs-sm); font-weight: 600; color: var(--text-2); }
.dia-card { grid-template-columns: minmax(0, 1fr); gap: var(--s-3); padding: 16px 18px; font-size: var(--fs-read); }   /* колонка — ширина карточки: длинная строка внутри не распирает её за край */
.dia-card .dia-text { color: var(--text); line-height: 1.5; overflow-wrap: anywhere; }
.dia-name { font-family: var(--font-heading); font-size: var(--fs-lg); font-weight: 600; line-height: 1.2; }
.dia-foot { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; min-height: 28px; }
.dia-foot small { margin-left: auto; font-size: var(--fs-xs); color: var(--muted); }
.dia-foot .tag { max-width: 100%; white-space: normal; overflow-wrap: anywhere; }   /* длинное имя раздела переносится, а не вылезает */
.dia-foot .dia-move { margin-left: auto; }
.dia-edit { flex: none; width: 32px; height: 32px; margin: -2px -6px -2px 0; border: 0; border-radius: 50%; display: grid; place-items: center; background: none; color: var(--muted); cursor: pointer; }
.dia-when { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s-3); }
.dia-when b { font-family: var(--font-heading); font-weight: 600; }
.dia-when span { font-weight: 600; color: var(--accent-ink); font-variant-numeric: tabular-nums; }
.dia-say { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 10px 12px 10px 14px; border-radius: var(--r-md); background: var(--field); box-shadow: var(--inset); }
.dia-say > svg { width: 1.25rem; height: 1.25rem; color: var(--accent-ink); }
.dia-say small { display: block; font-size: var(--fs-xs); color: var(--text-2); }
.dia-say p { font-size: var(--fs-sm); line-height: 1.4; color: var(--text); }
.dia-acts { display: flex; gap: 8px; }
.dia-acts .btn { flex: 1 1 0; min-width: 0; padding-inline: 6px; }
/* Дневник кабинета: строки одного списка — одной карточкой через тонкую линию, как .card.rows в Аккаунте (люди, цели,
   сферы, метафоры, табу, задачи одного дня). Каждая строка остаётся своей карточкой со своим ключом: diary.js
   перестраивает их на месте и ведёт каждую на новое место сама, поэтому край общей карточки едет вместе со строками.
   Соседние встают вплотную: у первой скруглён верх, у последней низ, между ними линия по ширине текста. Тень строки
   не лезет вверх на соседа — верх обрезан. Образец — «дневник/строки» на витрине. */
.dia-page .dia-row + .dia-row, .dia-page .dia-line + .dia-line, .dia-page .dia-plan + .dia-plan {
  position: relative; margin-top: calc(-1 * var(--s-3) - 1px); border-top-left-radius: 0; border-top-right-radius: 0; clip-path: inset(0 -48px calc(-48px - var(--hem, 0px))); }   /* внахлёст на 1 px: на дробном пикселе края строк полупрозрачные, и сквозь стык проступала тень; --hem — Miron.hem */
.dia-page .dia-row + .dia-row::before, .dia-page .dia-line + .dia-line::before, .dia-page .dia-plan + .dia-plan::before {
  content: ''; position: absolute; top: 0; left: 18px; right: 18px; height: 1px; background: var(--hairline); pointer-events: none; }
.dia-page .dia-row:has(+ .dia-row), .dia-page .dia-line:has(+ .dia-line), .dia-page .dia-plan:has(+ .dia-plan) { border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.dia-page .dia-fresh { clip-path: none; }   /* ореол новой строки виден целиком */
.dia-page .dia-unline::before { opacity: 0; transition: opacity 200ms ease-in; }   /* строка уходит — её линия гаснет вместе с ней */
.dia-page .dia-row { column-gap: 14px; }
.dia-page .dia-row .way-ic { width: 2.75rem; height: 2.75rem; }
.dia-page .dia-row b { font-size: var(--fs-read); }
/* Напоминание в задаче — строка под линией, а не вдавленное поле; просьба Мирона над списком — простой текст на бумаге. */
.dia-page .dia-plan .dia-say { padding: 12px 0 0; border-radius: 0; background: none; box-shadow: inset 0 1px 0 var(--hairline); }
.dia-page .dia-say.dia-rule { padding: 2px 6px; border-radius: 0; background: none; box-shadow: none; }
/* Верх ежедневника (diary.js): главная кнопка «Запланировать» во всю ширину, под ней строка-ссылка в чат полным цветом —
   подчёркнута акцентом, как ссылка в тексте. */
.dia-add { display: grid; gap: var(--s-2); justify-items: center; }
.dia-add > .link { padding: 4px 8px; color: var(--text); font-size: var(--fs-sm); line-height: 1.4; text-align: center; text-wrap: balance; text-decoration-color: var(--accent); -webkit-tap-highlight-color: transparent; }
/* Просьба к Мирону (diary.js, rule): вопрос Мирона под заголовком — тихая кнопка у левого края (mid — по середине)
   или вопрос и ответ блоком. */
.dia-rule.btn { align-self: flex-start; justify-self: start; gap: 6px; margin: -6px 0 0 -6px; text-align: left; }
.dia-rule.btn.mid { align-self: center; justify-self: center; margin: 0; }
.dia-slot { display: contents; }
.dia-more { display: flex; justify-content: center; }
.dia-more .btn { gap: 6px; padding-inline: 12px 16px; }
.dia-more .btn svg { width: 1.1rem; height: 1.1rem; }
.dia-rule.btn svg { width: 1.1rem; height: 1.1rem; }
.dia-rule.dia-say { cursor: pointer; }
.dia-left { font-size: var(--fs-sm); color: var(--muted); text-align: right; }
/* Инструкция Мирона: начало текста в две строки (блок в дневнике, строка «Настроек Мирона»). Весь текст полным цветом:
   приглушённых подводок нет. Ошибка проверки — красным со словом. */
.dia-clip { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; }
[data-sec="miron"] .acc-card p { color: var(--text); }
.acc-warn, .dia-rule small .acc-warn { color: var(--red); }
/* «Настройки Мирона» (account.js): карточки «Душа», «Образ и роль», «Как вести дневник»; так же «Обо мне» и «Промокод
   от друга». Строки через тонкую линию, у строки нет своей заливки: значок линией без кружка, название и пометка
   словом; текст под названием — от названия, а не от значка. Выбранная душа — зелёная галочка и зелёная цена, строка
   с ошибкой — красный значок и красная пометка. Под именем выбранной души — что она умеет (acc-soul-say). */
.acc-texts { gap: 0; padding-bottom: 6px; }
.acc-texts > b { margin-bottom: 6px; }
/* Справа от «Душа» — «Сохранено» с галочкой (account.js, soulSaved): место под слово занято всегда, слово проявляется
   и гаснет, заголовок не двигается. */
.acc-souls > b { display: flex; align-items: baseline; gap: 10px; }
.acc-saved { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; font-family: var(--font); font-size: var(--fs-sm); font-weight: 500; line-height: 1.2; color: var(--green); white-space: nowrap;
  opacity: 0; visibility: hidden; transition: opacity var(--t) var(--ease), visibility 0s linear var(--t); }
.acc-saved.on { opacity: 1; visibility: visible; transition: opacity var(--t) var(--ease); }
.acc-saved > svg { width: 1.1em; height: 1.1em; }
@media (prefers-reduced-motion: reduce) { .acc-saved, .acc-saved.on { transition: none; } }
button.acc-text { display: grid; gap: 6px; margin: 0; padding: 15px 0; border: 0; border-radius: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer;
  transition: transform var(--t-fast) var(--ease); -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
button.acc-text + button.acc-text { box-shadow: inset 0 1px 0 var(--hairline); }
button.acc-text:active { transform: scale(.985); }
.acc-text-top { display: flex; align-items: center; gap: 10px; min-width: 0; }
.acc-text-ic { flex: none; width: 2rem; height: 2rem; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-ink); }
.acc-text-ic > svg { width: 1.1rem; height: 1.1rem; }
.acc-texts .acc-text-top { gap: 14px; }
.acc-texts .acc-text-ic { width: 1.5rem; height: 1.5rem; border-radius: 0; background: none; color: var(--text); }   /* значок строки — линией, без кружка */
.acc-texts .acc-text-ic > svg { width: 1.35rem; height: 1.35rem; }
.acc-texts .acc-soul[aria-pressed="true"] .acc-text-ic { color: var(--green); }
.acc-texts .acc-text.bad .acc-text-ic { color: var(--red); }
.acc-text-top > b { flex: 1 1 auto; min-width: 0; font-family: var(--font-heading); font-size: var(--fs-read); font-weight: 600; line-height: 1.2; overflow-wrap: anywhere; text-wrap: pretty; }
.acc-text-top > .tag { flex: none; padding: 0; background: none; font-size: var(--fs-sm); color: var(--text); }   /* пометка — словом, без таблетки */
.acc-text-top > .tag::before { content: none; }
.acc-text-top > .tag.good { background: none; color: var(--green); }   /* сильнее .tag.good и .tag.bad с их заливкой */
.acc-text-top > .tag.acc-warn { background: none; color: var(--red); }
.acc-card .acc-text p { padding-left: calc(1.5rem + 14px); font-size: var(--fs-md); line-height: 1.45; color: var(--text); overflow-wrap: anywhere; }   /* сильнее .acc-card p */
.acc-texts [data-looks] > .dia-clip { -webkit-line-clamp: 1; line-clamp: 1; }   /* образ — одной строкой */
.acc-soul-say[hidden] { display: none; }   /* текст души свёрнут у всех, кроме выбранной (account.js, soulTurn) */
/* Экран «Образ» из строки «Настроек Мирона» (account.js): заголовок и вопрос прямо на бумаге, ниже плитки в два столбца —
   сверху Мирон в настроении образа (.acc-look-face, рисунок — miron/), под ним имя и сколько людей сейчас на образе.
   Пока рисунок Мирона не догружен, на его месте значок в кружке. Первая — «Свой образ», пустой лист: плитка вдавлена
   в страницу, без своего текста Мирон бледный (.blank). У выбранной заливка мягким акцентом (.acc-look-fill — слой под
   содержимым; круг заливки от пальца при долгом нажатии ведёт account.js), в углу зелёная галочка. */
.acc-looks-box { display: grid; gap: var(--s-2); }
.acc-looks-box > p:not(.note) { margin: 0 0 var(--s-2); color: var(--text); font-size: var(--fs-read); line-height: 1.45; }
.acc-looks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-3); }
@media (min-width: 600px) { .acc-looks { grid-template-columns: repeat(3, minmax(0, 1fr)); } }   /* шире телефона — три столбца: плитки не растягиваются */
.acc-look { position: relative; isolation: isolate; display: grid; justify-items: center; align-content: center; gap: 6px; min-height: 10rem; margin: 0;
  padding: 6px 10px 16px; border: 0; border-radius: var(--r-lg); background: var(--card); box-shadow: var(--shadow); color: var(--text); font: inherit;
  text-align: center; cursor: pointer; -webkit-tap-highlight-color: transparent; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; touch-action: manipulation; }
.acc-look-fill { position: absolute; inset: 0; z-index: -1; border-radius: inherit; background: var(--accent-soft); clip-path: circle(0 at 50% 50%); pointer-events: none; }
.acc-look[aria-pressed="true"] .acc-look-fill { clip-path: none; }
.acc-look-face { --miron-size: 8.5rem; display: grid; place-items: center; width: min(100%, 8.5rem); aspect-ratio: 1; margin-bottom: -6px; pointer-events: none; }
.acc-look.blank .acc-look-face > canvas { opacity: .5; }
/* Мирон в окне образа (account.js, lookOpen) — первая вещь ленты окна, над текстом, в полтора раза больше, чем в плитке.
   В перелёте его коробку несёт слой поверх экрана (.acc-look-fly): размер окна, сжат сдвигом до места, откуда и куда летит. */
.bare.acc-look-win { align-self: center; width: 12.75rem; max-width: 100%; aspect-ratio: 1; margin: calc(-1 * var(--s-3)) 0 calc(-1 * var(--s-2)); }
.acc-look-win > .acc-look-face, .acc-look-fly > .acc-look-face { --miron-size: 12.75rem; margin: 0; }
.acc-look-fly { position: fixed; left: 0; top: 0; z-index: 3; transform-origin: 0 0; pointer-events: none; will-change: transform; }
.acc-look-ic { width: 3.25rem; height: 3.25rem; margin-bottom: 4px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-ink);
  transition: background var(--t-tint), color var(--t-tint); }
.acc-look-ic > svg { width: 1.55rem; height: 1.55rem; }
.acc-look.own { background: var(--field); box-shadow: var(--inset); }
.acc-look.own .acc-look-ic { background: var(--card); box-shadow: var(--shadow); }
.acc-look[aria-pressed="true"] .acc-look-ic { background: var(--accent); color: var(--on-accent); }   /* выбор виден с первого взгляда и в светлой теме; у своего — тоже */
/* Имя — размером --fs-md: самое длинное слово («Саркастичный») влезает в плитку и на самом крупном шрифте; длиннее —
   перенос по слогам, где браузер его знает, и только потом разрыв слова. */
.acc-look > b { max-width: 100%; font-family: var(--font-heading); font-size: var(--fs-md); font-weight: 600; line-height: 1.2; text-wrap: balance; hyphens: auto; -webkit-hyphens: auto; overflow-wrap: anywhere; }
/* Число людей — счётчик: значок стоит строкой с числом; на крупном шрифте слово «человек» переносится, а не вылезает. */
.acc-look-n { display: block; max-width: 100%; color: var(--text-2); font-size: var(--fs-sm); line-height: 1.35; text-wrap: balance; }
.acc-look-n > svg { width: 1rem; height: 1rem; margin-right: 5px; vertical-align: -.2em; }
.acc-look-on { position: absolute; top: 10px; right: 10px; width: 1.75rem; height: 1.75rem; border-radius: 50%; display: grid; place-items: center;
  background: var(--green-soft); color: var(--green); opacity: 0; scale: .4; }
.acc-look-on > svg { width: 1rem; height: 1rem; }
.acc-look[aria-pressed="true"] .acc-look-on { opacity: 1; scale: 1; }
/* Окно инструкции (diary-kit.js, textWin): карточки «Как писать», «Эталон инструкции» и красная «Ошибка» под сообщением.
   Шапка карточки — маленький значок и заголовок; примеры, эталон и «Не сюда» — цитаты на вдавленной подложке. */
.dia-how { gap: 10px; padding: 16px 18px; }
.dia-how-top { display: flex; align-items: center; gap: 10px; }
.dia-how-top > b { font-family: var(--font-heading); font-size: var(--fs-lg); font-weight: 600; line-height: 1.2; }
.card.dia-how p { margin: 0; font-size: var(--fs-md); line-height: 1.45; color: var(--text); overflow-wrap: anywhere; }   /* сильнее .card p */
.dia-cite { display: grid; gap: 4px; padding: 10px 14px; border-radius: var(--r-md); background: var(--field); box-shadow: var(--inset); }
.dia-cite > small { display: flex; align-items: center; gap: 6px; font-size: var(--fs-sm); font-weight: 600; color: var(--text); }
.dia-cite > small > svg { flex: none; width: 1rem; height: 1rem; color: var(--muted); }
.dia-cite.good > small > svg { color: var(--green); }
.dia-cite.bad > small > svg { color: var(--red); }
.dia-cite q { quotes: "«" "»"; }
.dia-cite .dia-memo-text { white-space: pre-line; }
.card.dia-how > [data-etalon] { justify-self: start; }
.card.dia-fault { background: color-mix(in srgb, var(--red) 9%, var(--card)); }
.dia-fault .dia-how-top > b { color: var(--red); }
.dia-fault .acc-text-ic { background: var(--red-soft); color: var(--red); }
.acc-win.dia-win > p.dia-fail { margin: -6px 0 0; text-align: center; color: var(--accent-ink); }   /* дверь не сохранила текст */
.acc-win.dia-win > p { text-align: center; text-wrap: balance; color: var(--text); }   /* сильнее .acc-win > p ниже: подводка окна дневника полным цветом */
.dia-wait { display: flex; align-items: center; gap: 4px; }
.dia-wait i { width: 4px; height: 4px; border-radius: 50%; background: currentColor; animation: blink 1.2s ease-in-out infinite; }
.dia-wait i:first-of-type { margin-left: 3px; } .dia-wait i:nth-of-type(2) { animation-delay: .2s; } .dia-wait i:nth-of-type(3) { animation-delay: .4s; }
.dia-list { display: flex; flex-direction: column; gap: var(--s-3); }
.dia-list > * { flex: none; }
.dia-plan [data-do="edit"] { cursor: pointer; }
.dia-say.off > svg, .dia-say.off > div { opacity: .45; }
.dia-acts .dia-edit { margin: 0; align-self: center; }
/* Карточка только что появилась или переехала: мягкий ореол, чтобы глаз её нашёл. */
.dia-fresh { animation: dia-fresh 1.8s ease-out; }
@keyframes dia-fresh { 0%, 35% { box-shadow: var(--shadow), 0 0 0 3px var(--accent-soft), 0 4px 30px var(--halo); } 100% { box-shadow: var(--shadow), 0 0 0 3px transparent, 0 4px 30px transparent; } }
/* Окна дневника (Miron.overlay): план, запись, раздел. Каждая часть окна — своя карточка с названием (.dia-box):
   поля не сливаются с бумагой. Календарь — месяц сеткой. */
.dia-win h2 { font-size: var(--fs-h2); text-align: center; text-wrap: balance; }
.dia-win textarea { resize: none; font: inherit; line-height: 1.5; }
.dia-box { padding: 18px 18px 20px; }
/* Окно с текстом человека (diary-kit.js, sayWin): в окне поверх страницы — чат на весь экран (chat.js), как разговор
   с Мироном. Окно не листается и своих теней у краёв не кладёт: у чата свои. Крестик окна стоит в шапке чата справа
   от заголовка. Карточки ленты (памятка, эталон) — шириной реплики. */
.overlay:has(> .say-win) { overflow: clip; }   /* не прокручивается и кодом: айфон, растягивая выделение в поле, прокручивал бы окно */
.overlay:has(> .say-win)::before, .overlay:has(> .say-win)::after { display: none; }
.overlay > .page.say-win { position: absolute; inset: 0; width: auto; max-width: none; margin: 0; padding: 0; }
.say-win > .chat.full { position: absolute; left: 0; right: 0; top: 0; }
.say-win .chat-head { grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
.say-win .chat-head > b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.say-win .chat-head > .page-close { position: static; pointer-events: auto; }
.say-win .chat.asleep .input textarea { white-space: normal; }   /* «Поменять можно кнопкой выше» переносится: айфон не ставит троеточие в подсказке и обрезал её */
.bare.say-card { align-self: stretch; min-width: 0; }   /* карточки окна — во всю ширину колонки чата, как поле */
.bare.say-card > [data-back] { justify-self: start; }
/* «Отредактировать» под своим сообщением в окне с текстом (diary-kit.js, sayWin): у правого края, вплотную к сообщению. */
.bare.say-edit { align-self: flex-end; display: flex; gap: 2px; margin-top: calc(var(--s-1) - var(--s-3)); }   /* у пожеланий слева «Удалить» */
.bare.say-edit > .btn { min-height: 32px; padding: 4px 10px; gap: 6px; color: var(--text); }
.bare.say-edit > .btn > svg { width: 1.05em; height: 1.05em; flex: none; }
.bare.say-edit > .btn:not(.quiet) { margin-right: 6px; color: var(--on-accent); }   /* «Выбрать» в окне образа — залитая, перед тихой «Отредактировать» */
.bare.say-edit > .tag { align-self: center; margin-right: 6px; }   /* образ уже выбран — зелёная пометка «Выбран» на месте кнопки */
/* Нажал на спящее поле — по кромке «Отредактировать» два круга бежит змейка акцентом: проступает, бежит и гаснет. */
.say-lit { --snake: var(--accent-ink); animation: say-lit 2.8s var(--ease) forwards; }
[data-theme="dark"] .say-lit { --snake: var(--accent); }
.say-lit::before { animation-duration: 1.4s; animation-iteration-count: 2; }
@keyframes say-lit { 0% { opacity: 0; } 12% { opacity: 1; } 80% { opacity: 1; } 100% { opacity: 0; } }
.dia-box > b + p { margin-top: -6px; }
.dia-box .acc-line p { font-size: var(--fs-sm); }
.dia-pair { flex: none; display: flex; align-items: center; gap: 2px; }
.dia-pair .dia-edit { margin: 0; }
/* Время: плашка со словами («18:30» или «Без времени»), поле телефона лежит поверх неё невидимым. */
.dia-clock { position: relative; flex: none; display: grid; place-items: center; min-width: 5.5rem; min-height: var(--hit); padding: 0 16px; border-radius: var(--r-pill); background: var(--field); box-shadow: var(--inset); font-size: var(--fs-md); font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--text); cursor: pointer; }
.dia-clock.none > span { color: var(--muted); }
.dia-clock input { position: absolute; inset: 0; width: 100%; height: 100%; min-height: 0; margin: 0; padding: 0; border: 0; opacity: 0; appearance: none; -webkit-appearance: none; cursor: pointer; }
.dia-clock:has(input:focus-visible) { box-shadow: var(--inset), 0 0 0 1.5px color-mix(in srgb, var(--accent) 75%, transparent); }
/* Когда напомнить: ответы столбиком, слева кружок выбора, справа час. Выключено — ответы бледнее; нажал — включилось. */
.dia-opts { display: grid; }
.dia-opt { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; min-height: 3.25rem; font-size: var(--fs-md); cursor: pointer; outline: none; -webkit-tap-highlight-color: transparent; }
.dia-opt > i { display: grid; place-items: center; width: 1.5rem; height: 1.5rem; border-radius: 50%; background: var(--field); box-shadow: var(--inset); transition: background var(--t-tint); }
.dia-opt > i::after { content: ''; width: .55rem; height: .55rem; border-radius: 50%; background: var(--on-accent); transform: scale(0); transition: transform var(--t-fast) var(--ease); }
.dia-opt[aria-checked="true"] > i { background: var(--accent); box-shadow: none; }
.dia-opt[aria-checked="true"] > i::after { transform: scale(1); }
.dia-opt:focus-visible > i { box-shadow: var(--inset), 0 0 0 1.5px color-mix(in srgb, var(--accent) 75%, transparent); }
.dia-opt > small { font-size: var(--fs-md); color: var(--text-2); font-variant-numeric: tabular-nums; }
.dia-opt[aria-disabled="true"] { cursor: default; }
.dia-opt[aria-disabled="true"] > i, .dia-opt[aria-disabled="true"] > span { opacity: .4; }
.dia-opt[aria-disabled="true"] > small { font-size: var(--fs-sm); color: var(--muted); }
.dia-opts.off > .dia-opt > * { opacity: .5; }
.dia-cal { display: grid; gap: 6px; }
.dia-cal-top { display: flex; align-items: center; justify-content: space-between; }
.dia-cal-top b { font-family: var(--font-heading); font-size: var(--fs-lg); font-weight: 600; }
.dia-cal-top .icon-btn svg { width: 1.2rem; height: 1.2rem; }
.dia-cal-top .icon-btn:last-child svg { transform: scaleX(-1); }
.dia-cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; justify-items: center; }
.dia-cal-grid i { padding: 4px 0; font-style: normal; font-size: var(--fs-xs); color: var(--muted); }
.dia-cal-grid button { width: 100%; max-width: 2.75rem; aspect-ratio: 1; border: 0; border-radius: 50%; padding: 0; background: none; color: var(--text); font: inherit; font-size: var(--fs-md); font-variant-numeric: tabular-nums; cursor: pointer; }
.dia-cal-grid button:disabled { color: var(--muted); opacity: .4; cursor: default; }
.dia-cal-grid button.today { background: var(--field); box-shadow: var(--inset); }
.dia-cal-grid button[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); font-weight: 600; box-shadow: none; }
.dia-line { grid-template-columns: minmax(0, 1fr) auto; align-items: start; cursor: pointer; }
.dia-line .dia-edit { margin: -4px -8px 0 0; }
.dia-line > div { display: grid; gap: 4px; min-width: 0; align-self: center; }
.dia-line b { font-size: var(--fs-lg); }
.dia-line p { color: var(--text-2); line-height: 1.45; }
/* Архив (diary.js): день — одна карточка, в ней события ниткой: слева кружок-знак, от него вниз тонкая нить к следующему.
   Правка Мирона — тихая строка с кнопкой «Вернуть». */
.dia-filter { align-self: center; }
.dia-daycard { gap: 14px; }
.dia-daytitle { font-family: var(--font-heading); font-weight: 600; }
.dia-ev { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: start; gap: 12px; }
.dia-ev[role="button"] { cursor: pointer; }
.dia-ev > div { display: grid; gap: 2px; min-width: 0; align-self: center; }
.dia-ev small { font-size: var(--fs-xs); color: var(--muted); }
.dia-ev:not(:last-child)::before { content: ''; position: absolute; left: calc(.875rem - 1px); top: 1.75rem; bottom: -14px; width: 2px; border-radius: 1px; background: var(--field); }
.dia-dot { width: 1.75rem; height: 1.75rem; border-radius: 50%; display: grid; place-items: center; background: var(--field); color: var(--text-2); font-family: var(--font-heading); font-size: var(--fs-sm); font-weight: 600; }
.dia-dot svg { width: 1rem; height: 1rem; }
.dia-dot.sec, .dia-dot.gold { background: var(--accent-soft); color: var(--accent-ink); }
.dia-dot.good { background: var(--green-soft); color: var(--green); }
.dia-ev.quiet p { font-size: var(--fs-sm); line-height: 1.4; color: var(--text-2); }
.dia-ev.quiet .btn { align-self: center; }
.dia-ev.off p { text-decoration: line-through; color: var(--muted); }
/* Правка дневника в ленте чата (diary-chat.js): короткая строка у левого края, как реплики Мирона; по нажатию
   под ней встаёт карточка дневника. Отменённая правка — слова зачёркнуты. */
.bare.dia-chat { align-self: flex-start; width: min(100%, 30rem); display: flex; flex-direction: column; gap: 8px; }
.bare.deed { align-self: center; max-width: min(80%, 30rem); text-align: center; font-size: var(--fs-xs); }   /* что человек сам сделал в ежедневнике (chat-miron.js, deed): текст полным цветом */
.bare.voice-mark { align-self: center; display: flex; align-items: center; gap: 8px; max-width: min(80%, 30rem); text-align: center; font-size: var(--fs-xs); font-weight: 600; color: var(--accent-ink); }   /* граница голосового чата (chat-miron.js, voice_mark) */
.bare.voice-mark > svg { width: 1.15em; height: 1.15em; flex: none; }
/* Оценка ответа Мирона (chat-miron.js, «оценка ответа»): значок у ответа как звёздочка (.msg-rate, ставит chat.mark);
   окно оценки — обычное окно дневника (.acc-win.dia-win). */
.msg-rate { float: right; display: block; width: 1em; height: 1em; margin: calc(var(--fs-2xs) * 1.5 - .5em) -7px calc(var(--fs-2xs) * .5 - .5em - 3px) 10px; color: var(--accent-ink); }
.msg-rate > svg { display: block; width: 100%; height: 100%; }
.dia-chat-it { display: flex; flex-direction: column; gap: 8px; }
.dia-chat-it[hidden], .dia-chat-body[hidden] { display: none; }
.dia-chat-line { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; width: 100%; min-height: var(--hit); padding: 8px 12px 8px 10px; border: 0; border-radius: var(--r-md); background: var(--field); box-shadow: var(--inset); font: inherit; color: var(--text); text-align: left; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.dia-chat-line > span:nth-child(2) { display: grid; gap: 1px; min-width: 0; }
.dia-chat-line small { font-size: var(--fs-xs); color: var(--text-2); }
.dia-chat-line b { font-size: var(--fs-sm); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dia-chat-line .acc-go { display: grid; color: var(--muted); }
.dia-chat-line .acc-go svg { width: 1.1rem; height: 1.1rem; transform: rotate(-90deg); transition: transform var(--t-fast) var(--ease); }
.dia-chat-line[aria-expanded="true"] .acc-go svg { transform: rotate(90deg); }
.dia-chat-line[aria-disabled="true"] { cursor: default; }
.dia-chat-line[aria-disabled="true"] .acc-go { visibility: hidden; }
.dia-chat-it.off .dia-chat-line b { text-decoration: line-through; color: var(--muted); }
.dia-chat-it.off .dia-dot { background: var(--card); color: var(--muted); }
.dia-chat-body { display: flex; flex-direction: column; gap: 8px; }
.dia-chat-was { padding: 2px 12px; font-size: var(--fs-sm); line-height: 1.4; color: var(--muted); overflow-wrap: anywhere; }
.dia-chat-was small { display: block; font-size: var(--fs-xs); }
.dia-chat-acts { display: flex; justify-content: flex-end; }
.dia-chat-more { align-self: flex-start; }
/* Полоса дней над лентой архива: карточка, в ней по середине месяц и под ним дни столбиками — выше, если в дне
   больше событий. Листается вбок, у краёв дни тают. Первое число месяца стоит с отступом. */
.dia-days { gap: 8px; padding: 12px 0 10px; }
.dia-month { min-height: 1.4em; text-align: center; font-family: var(--font-heading); font-weight: 600; }
.dia-strip { display: flex; gap: 2px; padding: 0 16px; overflow-x: auto; scrollbar-width: none; overscroll-behavior-x: contain;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 18px, #000 calc(100% - 18px), transparent); mask-image: linear-gradient(90deg, transparent, #000 18px, #000 calc(100% - 18px), transparent); }
.dia-strip::-webkit-scrollbar { display: none; }
.dia-strip button.first { margin-left: 14px; }
.dia-strip button { flex: none; width: 2.25rem; display: grid; justify-items: center; align-content: end; gap: 3px; border: 0; padding: 0; background: none; color: var(--text); font: inherit; cursor: pointer; }
.dia-strip i { width: .5rem; height: calc(4px + var(--n) * 9px); margin-top: calc((4 - var(--n)) * 9px); border-radius: var(--r-pill); background: var(--accent); }
.dia-strip b { font-size: var(--fs-sm); font-weight: 500; font-variant-numeric: tabular-nums; }
.dia-strip small { font-size: var(--fs-2xs); color: var(--muted); }
.dia-strip button:disabled { cursor: default; }
.dia-strip button:disabled i { background: var(--field); box-shadow: var(--inset); }
.dia-strip button:disabled b { color: var(--muted); }
.dia-strip button.today b { color: var(--accent-ink); font-weight: 700; }
/* «Я в цифрах»: карточка графика — имя и срок, строка о том, что нарисовано, и сам график. Вывод делает рисунок: связь
   видна по длине полосы за чёрточкой «обычно», по двум полосам «раньше — теперь», по пустым кружкам тишины.
   Цвет один — акцент (a); серый (fall) — то, с чем сравнивают; пустое — вдавленное поле (none); начатое — поле с точкой
   акцента (half). Доли одной полосы — три шага того же оттенка (k0 — главный): светлота у шагов своя в каждой теме,
   чтобы и самый слабый был виден на карточке при любом цвете сайта. Подписи и числа — цветом текста, не графика.
   Сетка — волосок; линия 2 px; столбик у основания прямой, на конце скруглён; между кусками полосы зазор 2 px;
   у точки кольцо цвета карточки. */
.dia-chart { gap: 14px; --k0: oklch(from var(--bubble-hue, var(--accent)) .5 min(c, .15) h); --k1: oklch(from var(--bubble-hue, var(--accent)) .62 min(c, .15) h); --k2: oklch(from var(--bubble-hue, var(--accent)) .74 min(c, .15) h); }
:root[data-theme="dark"] .dia-chart { --k0: oklch(from var(--bubble-hue, var(--accent)) .82 min(c, .15) h); --k1: oklch(from var(--bubble-hue, var(--accent)) .64 min(c, .15) h); --k2: oklch(from var(--bubble-hue, var(--accent)) .47 min(c, .15) h); }
.dia-ctop { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.dia-ctop small { flex: none; font-size: var(--fs-sm); color: var(--muted); }
.dia-hint { margin-top: -8px; font-size: var(--fs-md); line-height: 1.4; color: var(--text-2); }
.dia-fig { display: grid; gap: 10px; min-width: 0; }
.dia-chart i { display: block; font-style: normal; }
.dia-chart i.a { background: var(--accent); }
.dia-chart i.k0 { background: var(--k0); }
.dia-chart i.k1 { background: var(--k1); }
.dia-chart i.k2 { background: var(--k2); }
.dia-chart i.none { background: var(--field); box-shadow: var(--inset); }
.dia-chart i.half { background: radial-gradient(circle, var(--accent) 0 36%, transparent 40%), var(--field); box-shadow: var(--inset); }
.dia-chart i.fall { background: color-mix(in srgb, var(--text-2) 62%, var(--card)); }
.dia-xs { font-size: var(--fs-xs); line-height: 1.2; color: var(--muted); }
.dia-xs { display: flex; justify-content: space-between; gap: 8px; }
.dia-xs.at { position: relative; display: block; height: 1.2em; }
.dia-xs.at span { position: absolute; left: var(--x); transform: translateX(-50%); }
.dia-xs.at span:first-child { transform: none; }
.dia-xs.at span:last-child { left: auto; right: 0; transform: none; }
.dia-sub { font-size: var(--fs-sm); color: var(--muted); }
/* Выбор, о чём считать карточку «Я в цифрах»: плашка в её правом верхнем углу, по нажатию телефон даёт свой список. */
.dia-scope { flex: none; position: relative; display: inline-flex; align-items: center; }
.dia-scope button { overflow: hidden; white-space: nowrap; text-align: left; }
.dia-scope select, .dia-scope button { appearance: none; -webkit-appearance: none; max-width: 9.5rem; min-height: 2rem; padding: 4px 30px 4px 14px; border: 0; border-radius: var(--r-pill); outline: none; background: var(--accent-soft); color: var(--text); font: inherit; font-size: var(--fs-sm); font-weight: 500; text-overflow: ellipsis; cursor: pointer; }
.dia-scope select:focus-visible, .dia-scope button:focus-visible { box-shadow: 0 0 0 1.5px color-mix(in srgb, var(--accent) 75%, transparent); }
.dia-scope svg { position: absolute; right: 9px; width: 1rem; height: 1rem; transform: rotate(-90deg); color: var(--text-2); pointer-events: none; }
/* Цифры в открытом воспоминании: меню слайдов (лента кнопок, листается вбок) и слайды под ним — по одному на экран,
   листаются пальцем и встают ровно. Высота у всех слайдов одна — по самому высокому: карточка не прыгает. */
.dia-menu { position: relative; display: flex; gap: 6px; margin: 0 -18px; padding: 2px 18px; overflow-x: auto; scrollbar-width: none; overscroll-behavior-x: contain; }
.dia-menu::-webkit-scrollbar, .dia-slides::-webkit-scrollbar { display: none; }
.dia-menu button { flex: none; min-height: 2.25rem; padding: 6px 14px; border: 0; border-radius: var(--r-pill); background: var(--field); box-shadow: var(--inset); color: var(--text-2); font: inherit; font-size: var(--fs-sm); font-weight: 500; cursor: pointer; -webkit-tap-highlight-color: transparent; transition: background var(--t-tint), color var(--t-tint); }
.dia-menu button[aria-pressed="true"] { background: var(--accent-soft); box-shadow: none; color: var(--text); }
.dia-slides { display: flex; margin: 0 -18px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; }
.dia-tip { font-size: var(--fs-sm); line-height: 1.4; color: var(--text-2); }
.dia-slide { flex: 0 0 100%; min-width: 0; padding: 2px 18px; scroll-snap-align: start; scroll-snap-stop: always; display: grid; align-content: start; gap: 10px; }
/* Цифры в разделах: тихая строка под заголовком части воспоминаний и полоса дел недели в ежедневнике. */
.dia-sum { padding: 0 6px; margin-top: calc(-1 * var(--s-2)); }
.dia-week { display: grid; gap: 6px; padding: 0 6px; }
.dia-week .dia-stack { height: .5rem; }
/* Подписи цветов: квадратик, кружок (dot) или чёрточка (tick) и слово. list — столбиком, число у правого края. */
.dia-keys { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: var(--fs-sm); color: var(--text-2); }
.dia-keys span { display: inline-flex; align-items: center; gap: 6px; }
.dia-keys i { width: .625rem; height: .625rem; border-radius: 3px; }
.dia-keys i.dot { width: .75rem; height: .75rem; border-radius: 50%; }
.dia-keys i.tick, .dia-bul u { width: 2px; border-radius: 1px; background: var(--text); }
.dia-keys i.tick { height: .875rem; }
.dia-keys b { font-weight: 600; font-variant-numeric: tabular-nums; color: var(--text); }
.dia-keys.list { flex-direction: column; gap: 8px; font-size: var(--fs-md); }
.dia-keys.list b { margin-left: auto; }
/* Настроение светофором (diary.js, bothFig): подписи шкалы лежат над своими линиями у левого края поля (--y — высота линии), клетка на день. Столбик растёт от дна, высота —
   --v (0…1), цвет — m-r красный (до 4), m-y жёлтый (до 7), m-g зелёный (от 7). Число над столбиком — <b> внутри клетки.
   m-none — настроения не видно, точка на дне. at — выбранная клетка. Число настроения за срок в выводе — .dia-mtone. */
.dia-mgrid { position: relative; display: grid; gap: 6px; }
.dia-maxs { position: absolute; left: 0; right: 0; top: 0; height: 9rem; padding-top: 1.1rem; box-sizing: content-box; pointer-events: none;
  font-size: var(--fs-xs); line-height: 1; color: var(--muted); font-variant-numeric: tabular-nums;
  background: linear-gradient(var(--hairline), var(--hairline)) 0 1.1rem / 100% 1px no-repeat, linear-gradient(var(--hairline), var(--hairline)) 0 calc(1.1rem + 2.25rem) / 100% 1px no-repeat,
    linear-gradient(var(--hairline), var(--hairline)) 0 calc(1.1rem + 4.5rem) / 100% 1px no-repeat, linear-gradient(var(--hairline), var(--hairline)) 0 calc(1.1rem + 6.75rem) / 100% 1px no-repeat,
    linear-gradient(var(--hairline), var(--hairline)) 0 100% / 100% 1px no-repeat; }
.dia-maxs span { position: absolute; left: 0; bottom: calc(var(--y) * 9rem + 3px); }
.dia-mgrid .dia-mood, .dia-mgrid .dia-xs { margin-left: 2.5rem; }
.dia-chart .dia-hint.one { font-size: var(--fs-sm); }
.dia-mood { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); height: 9rem; padding-top: 1.1rem; box-sizing: content-box; }
.dia-chart .dia-mood i { position: relative; border-radius: 4px; }
.dia-mood i::before { content: ""; position: absolute; left: 50%; bottom: 0; width: min(64%, 1.5rem); height: max(4px, calc(var(--v) * 100%)); transform: translateX(-50%); border-radius: 3px 3px 1px 1px; background: var(--tone); }
.dia-mood i b { position: absolute; left: 50%; bottom: calc(var(--v) * 100% + 3px); transform: translateX(-50%); font-size: var(--fs-xs); font-weight: 600; line-height: 1; color: var(--text); white-space: nowrap; font-variant-numeric: tabular-nums; }
.dia-mood i.fs::before { display: none; }
.dia-mood i > span { position: absolute; left: 50%; bottom: 0; width: min(64%, 1.5rem); height: max(4px, calc(var(--v) * 100%)); transform: translateX(-50%);
  display: flex; flex-direction: column-reverse; gap: 1px; border-radius: 3px 3px 1px 1px; overflow: hidden; }
.dia-mood u { display: block; min-height: 2px; }
.dia-mood i b { display: none; }
.dia-mood i.at b { display: block; }
.dia-mood i:first-child b { left: 0; transform: none; }
.dia-mood i:last-child b { left: auto; right: 0; transform: none; }
.dia-mood i.m-none::before { width: 4px; height: 4px; bottom: -2px; border-radius: 50%; background: var(--muted); opacity: .6; }
.dia-chart .dia-mood i.at { background: color-mix(in srgb, var(--text) 8%, transparent); }
.m-r { --tone: oklch(.63 .2 28); }
.m-y { --tone: oklch(.82 .15 85); }
.m-g { --tone: oklch(.7 .17 150); }
.dia-mtone { color: var(--tone); }
.dia-mtone.m-y { color: oklch(.66 .14 75); }
:root[data-theme="dark"] .dia-mtone.m-y { color: var(--tone); }
/* Цвет чувства вне огней (класс fc): кусочки «Чувств по дням», полосы времени, ключи под ними. */
.dia-chart .fc { background: var(--c); }
/* «Чувства по дням» (diary.js, daysCard): клетка на день, столбик от дна высотой --h (доля самого высокого), внутри
   кусочки чувств снизу вверх; число над столбиком — <b>. empty — чувств не было, точка на дне. */
.dia-fdays { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); height: 9rem; padding-top: 1.1rem; box-sizing: content-box; align-items: end;
  background: linear-gradient(var(--hairline), var(--hairline)) 0 100% / 100% 1px no-repeat; }
.dia-chart .dia-fdays > i { position: relative; height: max(4px, calc(var(--h) * 100%)); }
.dia-fdays > i > span { position: absolute; inset: 0 0 0 50%; width: min(64%, 1.5rem); transform: translateX(-50%); display: flex; flex-direction: column-reverse; gap: 1px; border-radius: 3px 3px 1px 1px; overflow: hidden; }
.dia-fdays u { display: block; min-height: 2px; }
.dia-fdays u.a { background: var(--accent); }
.dia-fdays b { position: absolute; left: 50%; bottom: calc(100% + 3px); transform: translateX(-50%); font-size: var(--fs-xs); font-weight: 600; line-height: 1; color: var(--text); font-variant-numeric: tabular-nums; }
.dia-chart .dia-fdays > i.empty { height: 4px; }
.dia-fdays > i.empty::before { content: ""; position: absolute; left: calc(50% - 2px); bottom: -2px; width: 4px; height: 4px; border-radius: 50%; background: var(--muted); opacity: .6; }
/* Время и чувства (diary.js, timeFeels): у времени имя и число чувств, полоса из кусочков чувств, фраза под ней. */
.dia-tfeels { display: grid; gap: 14px; margin-top: 6px; }
.dia-tfeel { display: grid; gap: 6px; }
.dia-tfeel p { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.dia-tfeel p b { font-weight: 600; }
.dia-tfeel p small { font-size: var(--fs-sm); color: var(--text-2); }
.dia-tfeel > span { font-size: var(--fs-md); line-height: 1.4; }
.dia-fbar { display: flex; gap: 2px; height: .75rem; border-radius: 6px; overflow: hidden; }
.dia-fbar i { min-width: 3px; }
.dia-ratio { font-family: var(--font-heading); font-size: var(--fs-lg); font-weight: 600; line-height: 1.25; color: var(--text); }
.dia-mends { font-size: var(--fs-md); line-height: 1.4; color: var(--text); }
/* График слушает палец: нажал или провёл — подсветка встаёт на ближайший день, под графиком этот день: число
   и настроение, строка человека, тема и чувства. Страница под пальцем листается только вверх-вниз. */
.dia-pick { display: grid; gap: 12px; min-width: 0; }
.dia-pick .dia-fig { touch-action: pan-y; cursor: pointer; user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent; }
.dia-info { display: grid; gap: 8px; padding-top: 12px; box-shadow: 0 -1px 0 var(--hairline); }
.dia-info p { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; font-size: var(--fs-md); }
.dia-info p b { font-weight: 600; }
.dia-info p small { flex: none; font-size: var(--fs-sm); color: var(--text-2); }
.dia-info p.dia-said { display: block; min-height: 2.8em; line-height: 1.4; }
.dia-chips { display: flex; flex-wrap: wrap; gap: 6px; }
/* Связь строкой: что → с чем и во сколько раз чаще; под ней полоса с чёрточкой «обычно». tight — без полос. */
.dia-ties { display: grid; gap: 14px; }
.dia-ties.tight { gap: 8px; margin-top: 4px; }
.dia-ties > div { display: grid; gap: 6px; min-width: 0; }
.dia-ties p { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 6px; font-size: var(--fs-md); }
.dia-ties p.one { flex-wrap: nowrap; }   /* одна длинная тема переносится внутри себя, цифра остаётся справа */
.dia-ties p b { font-weight: 600; }
.dia-ties p svg { flex: none; width: 1rem; height: 1rem; color: var(--muted); }
.dia-ties p small { flex: none; margin-left: auto; padding-left: 8px; font-size: var(--fs-sm); font-weight: 600; white-space: nowrap; color: var(--text-2); }
.dia-bul { position: relative; height: 1rem; }
.dia-bul i { position: absolute; left: 0; top: 50%; width: calc(100% * var(--w)); height: .625rem; margin-top: -.3125rem; border-radius: 2px 6px 6px 2px; background: var(--accent); }
.dia-bul u { position: absolute; left: calc(100% * var(--x)); top: 0; bottom: 0; margin-left: -1px; box-shadow: 0 0 0 1.5px var(--card); }
/* Раньше и теперь: две полосы друг под другом от одного края. */
.dia-pair { display: grid; gap: 3px; }
.dia-pair i { width: calc(100% * var(--w)); min-width: 4px; height: .5rem; border-radius: 2px 6px 6px 2px; }
/* Под полосой на двоих: слева одно число, справа другое. */
.dia-vs { display: flex; justify-content: space-between; gap: 8px; font-size: var(--fs-sm); color: var(--text-2); }
.dia-vs b { font-weight: 600; color: var(--text); }
/* Строки «имя — рисунок — число»; two — без числа. */
.dia-rows { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px 12px; font-size: var(--fs-md); margin-top: 6px; }
.dia-rows small { font-size: var(--fs-sm); color: var(--text-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.dia-rows .dia-stack { height: .75rem; }
.dia-rows.two { grid-template-columns: auto minmax(0, 1fr); margin-top: 0; }
.dia-dots { display: flex; flex-wrap: wrap; gap: 6px; }
.dia-dots i { width: .875rem; height: .875rem; border-radius: 50%; }
.dia-bars { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 12px; }
.dia-bars.pics { grid-template-columns: auto minmax(0, max-content) minmax(5rem, 1fr); }
.dia-bars > span:not(.dia-dot) { font-size: var(--fs-md); }
.dia-bars > div { display: flex; align-items: center; gap: 8px; }
.dia-bars i { flex: none; width: calc((100% - 2.25rem) * var(--w)); height: .75rem; border-radius: 2px 6px 6px 2px; background: var(--accent); }
.dia-bars.pct i { width: calc((100% - 3.25rem) * var(--w)); }
.dia-bars b { font-size: var(--fs-sm); font-weight: 600; color: var(--text-2); font-variant-numeric: tabular-nums; }
.dia-stack { display: flex; gap: 2px; height: .875rem; }
.dia-stack i { min-width: 4px; border-radius: 2px; }
.dia-stack i:first-child { border-radius: 6px 2px 2px 6px; }
.dia-stack i:last-child { border-radius: 2px 6px 6px 2px; }
.dia-stack i:only-child { border-radius: 6px; }
.dia-cols { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); align-items: end; justify-items: center; height: 8rem; padding-top: 1.5rem; box-shadow: 0 1px 0 var(--hairline); }
.dia-cols i { position: relative; width: min(.5rem, 70%); height: calc(var(--h) * 100%); border-radius: 4px 4px 0 0; background: var(--accent); }
.dia-cols i[data-v]::after { content: attr(data-v); white-space: nowrap; position: absolute; left: 50%; bottom: calc(100% + 4px); transform: translateX(-50%); font-size: var(--fs-xs); color: var(--text-2); }
/* Столбики темы внутри воспоминания: пустая клетка — точка, черта — обычный уровень человека. */
.dia-tcols { position: relative; }
.dia-tcols i.tone, .dia-keys i.tone { background: var(--tone); }
.dia-tcols i.stack { display: flex; flex-direction: column-reverse; gap: 1px; overflow: hidden; background: none; }
.dia-tcols i.stack b { display: block; min-height: 2px; }
.dia-tcols i.none { width: 4px; height: 4px; border-radius: 50%; background: var(--muted); opacity: .5; }
.dia-avgt { position: absolute; right: 0; bottom: calc(var(--y) * (100% - 1.5rem) + 3px); padding: 0 4px; border-radius: 4px; background: var(--card); font-size: var(--fs-xs); color: var(--text-2); pointer-events: none; }
.dia-avg { position: absolute; left: 0; right: 0; bottom: calc(var(--y) * (100% - 1.5rem)); border-top: 2px dashed var(--text-2); opacity: .7; pointer-events: none; }
/* Нажатие на столбик, строку или ключ чувства открывает окно сообщений (diary.js, msgsWin). */
.dia-tcols, .dia-tap { cursor: pointer; -webkit-tap-highlight-color: transparent; }
.dia-tap:active, .dia-tcols:active { opacity: .7; }
.dia-tapsay { margin-top: -6px; }
.dia-cardmsgs { display: flex; justify-content: space-between; align-items: center; width: 100%; min-height: 2.25rem; margin-top: 4px; padding: 6px 12px 6px 16px; }
.dia-cardmsgs svg { flex: none; width: 1rem; height: 1rem; transform: rotate(180deg); }
/* Окно сообщений темы: день — заголовок, сообщение — карточка с текстом как написан, ниже время. */
.dia-msglist { display: grid; gap: 10px; }
.dia-msglist .dia-daytitle { margin-top: 10px; }
.dia-msg p { white-space: pre-wrap; overflow-wrap: anywhere; font-size: var(--fs-read); line-height: 1.5; }
.dia-msg small { display: flex; align-items: center; gap: 6px; margin-top: 8px; font-size: var(--fs-xs); color: var(--muted); font-variant-numeric: tabular-nums; }
/* Три доли под общей полосой: число и слово с квадратиком своего цвета; первая у левого края, последняя у правого. */
.dia-look { display: flex; justify-content: space-between; gap: 8px; }
.dia-look > div { display: grid; gap: 2px; }
.dia-look b { font-family: var(--font-heading); font-size: var(--fs-lg); font-weight: 600; line-height: 1.1; }
.dia-look small { display: flex; align-items: center; gap: 6px; font-size: var(--fs-sm); color: var(--text-2); }
.dia-look small i { width: .625rem; height: .625rem; border-radius: 3px; }
.dia-hero { display: flex; align-items: center; gap: 14px; }
.dia-hero b { font-family: var(--font-heading); font-size: var(--fs-num); font-weight: 600; line-height: 1; }
.dia-hero.sm b { font-size: var(--fs-stat); }
.dia-hero span { color: var(--text-2); line-height: 1.3; }

/* «Портрет»: «Психология говорит» — мягкая плашка под рисунком. */
.dia-tip { display: grid; gap: 6px; padding: 12px 14px; border-radius: 12px; background: color-mix(in srgb, var(--accent) 10%, var(--card)); }
.dia-tip b { font-size: var(--fs-xs); font-weight: 600; letter-spacing: .02em; text-transform: uppercase; color: var(--accent-ink); }
:root[data-theme="dark"] .dia-tip b { color: var(--accent); }
.dia-tip p { font-size: var(--fs-md); line-height: 1.45; color: var(--text); }
/* Огни «Главного чувства»: у чувства свой цвет (--c) и цвет подписи на нём (--on). Огонь — плоский круг ровной
   заливки, без блика и объёма, как остальные графики портрета; размер — доля чувства; не звучало — контур. Главный в центре с подписью внутри. Огонь берут
   пальцем (diary.js, grab): страница под ним не листается, взятый лежит поверх соседей. */
.dia-fires { position: relative; width: 100%; height: 19rem; }
.dia-fire { position: absolute; display: grid; justify-items: center; gap: 4px; transform: translate(-50%, calc(var(--d) / -2));
  touch-action: none; cursor: grab; user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent; }
.dia-fire.held { z-index: 2; cursor: grabbing; }
.dia-fires.few .dia-fire { cursor: default; touch-action: auto; }
.dia-fire.up { transform: translate(-50%, calc(-100% + var(--d) / 2)); }
.dia-fire.up i { order: 2; }
.dia-fire i { width: var(--d); height: var(--d); border-radius: 50%; background: var(--c); }
.dia-fire small { display: grid; justify-items: center; font-size: var(--fs-sm); line-height: 1.15; color: var(--text); white-space: nowrap; }
.dia-fire small b { font-size: var(--fs-xs); font-weight: 600; color: var(--text-2); }
.dia-fire.main { transform: translate(-50%, -50%); }
.dia-fire.main small { position: absolute; inset: 0; align-content: center; font-size: var(--fs-lg); font-weight: 600; color: var(--on); }
.dia-fire.main small b { font-size: var(--fs-md); color: var(--on); opacity: .85; }
.dia-fire.off i { background: none; box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--c) 55%, transparent); }
.dia-fire.off small { color: var(--muted); }
.dia-fires.few .dia-fire.main small { position: static; font-size: var(--fs-sm); font-weight: 400; color: var(--muted); }
.dia-fire.joy, .fc.joy { --c: oklch(.86 .16 92); --on: #2A2205; }
.dia-fire.calm, .fc.calm { --c: oklch(.76 .13 160); --on: #0E2A18; }
.dia-fire.anx, .fc.anx { --c: oklch(.6 .17 300); --on: #FFFFFF; }
.dia-fire.anger, .fc.anger { --c: oklch(.62 .2 28); --on: #FFFFFF; }
.dia-fire.sad, .fc.sad { --c: oklch(.6 .14 252); --on: #FFFFFF; }
.dia-fire.tired, .fc.tired { --c: oklch(.7 .02 260); --on: #1E1F1C; }
.dia-fire.guilt, .fc.guilt { --c: oklch(.72 .12 62); --on: #2B1500; }
.dia-fire.lonely, .fc.lonely { --c: oklch(.7 .1 200); --on: #0B2226; }
.dia-more .btn.plain { padding-inline: 16px; }
.dia-top { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: var(--s-3); }
.dia-pic { border: 0; padding: 0; cursor: pointer; font: inherit; font-family: var(--font-heading); font-size: var(--fs-lg); font-weight: 600; }
/* Набор значков в окне воспоминания: шесть в ряд, выбранный залит цветом. */
.dia-pics { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; justify-items: center; }
.dia-pics button, .dia-letter button { width: 100%; max-width: 3rem; aspect-ratio: 1; border: 0; padding: 0; border-radius: 50%; display: grid; place-items: center; background: var(--field); box-shadow: var(--inset); color: var(--text-2); font: inherit; font-family: var(--font-heading); font-size: var(--fs-lg); font-weight: 600; cursor: pointer; transition: background var(--t-tint), color var(--t-tint); }
.dia-pics button svg, .dia-letter button svg { width: 1.45rem; height: 1.45rem; }
.dia-letter button { flex: none; width: 2.75rem; }
.dia-pics button[aria-pressed="true"], .dia-letter button[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); box-shadow: none; }
.dia-win .dia-menu { margin-inline: -22px; padding-inline: 22px; }
.dia-win .dia-slides { margin-inline: -22px; }
.dia-win .dia-slide { padding-inline: 22px; }
.dia-letter { display: flex; align-items: center; gap: 10px; font-size: var(--fs-sm); color: var(--text-2); }
.dia-letter span { cursor: pointer; }
.dia-letter small { margin-left: auto; color: var(--muted); text-align: right; }
.dia-state { align-self: flex-start; }
.dia-about { font-size: var(--fs-read); line-height: 1.55; color: var(--text-2); }
/* Тексты дневника правятся окном с полем внизу (diaryKit.sayWin): заголовок и описание воспоминания нажимаются
   целиком, «Как прошло?» у закрытого плана — строка-кнопка видом поля, слова в ней полным цветом. */
.dia-top h1[data-sec-edit], .dia-about[data-sec-about] { cursor: pointer; }
.dia-add-about { justify-self: start; align-self: flex-start; }
.dia-card .dia-ask { width: 100%; min-height: var(--hit); border: 0; border-radius: var(--r-md); padding: 11px 16px; background: var(--field); box-shadow: var(--inset); color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.acc-patrons, .acc-win { display: grid; gap: var(--s-4); font-size: var(--fs-read); }
.acc-patrons > p, .acc-win > p { color: var(--text-2); }
.acc-win > p b { color: var(--text); font-weight: 500; overflow-wrap: anywhere; }
.acc-win > .note { max-width: none; font-size: var(--fs-sm); }
.acc-digits input { text-align: center; font-size: var(--fs-lg); letter-spacing: .3em; font-variant-numeric: tabular-nums; }
.acc-patrons [data-list] { display: grid; gap: var(--s-4); justify-items: start; }
.acc-patrons [data-list] > .btn, .acc-patrons [data-list] > .note, .acc-patrons [data-list] > .skel { justify-self: stretch; }
.acc-patrons ol { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-3); justify-self: stretch; }
/* Патрон — плашка, как строка канала в Молве (.talk-row), только не кнопка; «кто он» идёт в две строки. */
.talk-row.acc-patron { cursor: default; -webkit-user-select: auto; user-select: auto; }
.talk-row.acc-patron:active { transform: none; }
.talk-row.acc-patron .way-ic { font-family: var(--font-heading); font-size: var(--fs-lg); font-weight: 600; }
.talk-row.acc-patron b { font-size: var(--fs-lg); white-space: normal; overflow-wrap: break-word; -webkit-hyphens: auto; hyphens: auto; }   /* имя на крупном шрифте переносится */
.talk-row.acc-patron b:last-child, .talk-row.acc-patron b:has(+ .tag:last-child) { grid-row: 1 / 3; }
.talk-row.acc-patron .tag { grid-column: 3; grid-row: 1; }
.talk-row.acc-patron p { font-size: var(--fs-md); white-space: normal; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.talk-row.acc-patron.anon b { font-family: inherit; font-weight: 500; color: var(--text-2); }
.acc-patrons .acc-mine { justify-self: stretch; display: grid; gap: var(--s-3); }
/* Лента разделов: листается вбок от края до края экрана, кнопки уходят за край целиком, а не режутся у полей. Сам экран вбок не листается (overflow-x у .acc-page).
   position: relative — место кнопки (offsetLeft) считается от ленты, а не от страницы: иначе на широком окне подкат кнопки к середине улетал в конец ленты. */
.acc-tabs { position: relative; display: flex; gap: 8px; margin: -10px -20px; padding: 16px 20px 20px; overflow-x: auto; scrollbar-width: none; overscroll-behavior-x: contain; }
.acc-tabs::-webkit-scrollbar { display: none; }
.acc-tabs.dragging, .dia-menu.dragging { cursor: grabbing; scroll-behavior: auto; }
.acc-tabs.dragging button, .dia-menu.dragging button { pointer-events: none; }
.acc-tabs button { flex: none; display: inline-flex; align-items: center; gap: 8px; min-height: var(--hit); padding: 8px 16px; font-size: var(--fs-md); border: 0; border-radius: var(--r-pill); background: var(--field); box-shadow: var(--inset); color: var(--text-2); font-family: inherit; font-weight: 500; cursor: pointer; transition: background .2s var(--ease), color .2s var(--ease), box-shadow .2s var(--ease); }
.acc-tabs button svg { width: 1.25rem; height: 1.25rem; }
.acc-tabs button[aria-pressed="true"] { background: var(--card); box-shadow: var(--shadow); color: var(--text); }
.acc-tabs button[aria-pressed="true"] svg { color: var(--accent-ink); }
/* Кнопку ленты, которую экскурсия просит нажать (excursion.js, beckon), видно, как выбранную. */
.acc-tabs button.ex-want { background: var(--card); box-shadow: var(--shadow); color: var(--text); }
.acc-tabs button.ex-want svg { color: var(--accent-ink); }
.molva-tabs > span.ex-want { color: var(--accent); transform-origin: left center; }   /* «Чаты», которые экскурсия просит нажать */
.molva-tabs .a-letters i { min-width: 0; padding: 0; border-radius: 0; background: none; color: inherit; font: inherit; }   /* буквы волны, а не кружки счётчика */
/* Блеск по кнопкам ленты (excursion.js, shine): полоса света проходит кнопку слева направо один раз. */
.acc-tabs button.ex-sheen { position: relative; overflow: hidden; }
.acc-tabs button.ex-sheen::after { content: ""; position: absolute; inset: 0; pointer-events: none; transform: translateX(-100%);
  background: linear-gradient(100deg, transparent 25%, color-mix(in srgb, var(--accent) 30%, transparent) 50%, transparent 75%); animation: ex-sheen .7s var(--ease) forwards; }
@keyframes ex-sheen { to { transform: translateX(100%); } }
.acc-sec { display: flex; flex-direction: column; gap: var(--s-3); }
.acc-sec[hidden] { display: none; }
.acc-out { margin-top: var(--s-3); }
.acc-legal { font-size: var(--fs-sm); text-decoration: underline; text-underline-offset: 2px; }
.acc-card { gap: var(--s-3); padding: 20px 22px; }
.acc-card > b, .acc-line b { font-family: var(--font-heading); font-size: var(--fs-h3); font-weight: 600; line-height: 1.2; }
.acc-card p { color: var(--text); font-size: var(--fs-read); }   /* текст для человека — полным цветом */
.acc-big { font-size: var(--fs-lg); }
.acc-card .note { max-width: none; font-size: var(--fs-sm); }
.acc-line { display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); }
.acc-line > div { display: grid; gap: 2px; min-width: 0; }
.acc-line b { font-size: var(--fs-lg); }
.acc-sec .acc-line b { font-size: var(--fs-read); }
.acc-card > .acc-line + .acc-line { padding-top: 14px; box-shadow: inset 0 1px 0 var(--hairline); }   /* тумблеры подряд — строки через линию */
.acc-big { line-height: 1.1; }
.acc-big b { font-family: var(--font-heading); font-size: var(--fs-num); font-weight: 600; color: var(--text); }
.acc-use { display: grid; gap: 6px; font-size: var(--fs-md); }
.acc-use .acc-line > span:last-child { color: var(--text-2); white-space: nowrap; }
.acc-use small { font-size: var(--fs-sm); color: var(--muted); }
.acc-bar { display: block; height: 8px; border-radius: 4px; background: var(--field); box-shadow: var(--inset); overflow: hidden; }
.acc-bar > i { display: block; height: 100%; border-radius: 4px; background: var(--accent); transform-origin: left; }
/* Срок входа: четыре равные кнопки во всю ширину карточки, текст посередине в одну строку. При крупном шрифте кнопка
   не уже своего текста, соседи делят остаток поровну; где и так не влезает (узкий экран и самый крупный шрифт),
   слова переносятся внутри кнопок. Карточка за край экрана не вылезает. */
.acc-stay { display: flex; container-type: inline-size; font-size: var(--fs-md); }
.acc-stay button { flex: 1 1 0; min-width: min-content; font-size: var(--fs-md); padding-inline: 4px; }
@container (max-width: 14em) { .acc-stay button { min-width: 0; white-space: normal; line-height: 1.2; } }
.acc-promo { display: grid; gap: var(--s-3); }
/* Своя ссылка и свой промокод («Позови друга») — строки через линию, не вдавленные поля. */
.acc-copy { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 2px var(--s-3); padding: 12px 0; border: 0; border-radius: 0; background: none; box-shadow: inset 0 1px 0 var(--hairline); color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.acc-copy + .acc-copy { margin-top: calc(-1 * var(--s-3)); }   /* две строки подряд — без зазора карточки между ними */
.acc-copy small { font-size: var(--fs-sm); color: var(--text-2); }
.acc-copy b { grid-column: 1; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acc-copy svg { grid-row: 1 / 3; grid-column: 2; width: 1.3rem; height: 1.3rem; color: var(--muted); }
/* Тумблер: включено — акцент, бегунок справа. Образец — «поле/тумблер» на витрине. */
.switch { position: relative; flex: none; width: 3.1rem; height: 1.9rem; border: 0; border-radius: var(--r-pill); background: var(--field); box-shadow: var(--inset); cursor: pointer; transition: background .18s var(--ease); }
.switch > i { position: absolute; top: 3px; left: 3px; width: calc(1.9rem - 6px); height: calc(1.9rem - 6px); border-radius: 50%; background: var(--card); box-shadow: var(--shadow); transition: transform .26s var(--ease); }
.switch[aria-checked="true"] { background: var(--accent); }
.switch[aria-checked="true"] > i { transform: translateX(1.2rem); }
.switch:disabled { opacity: .45; cursor: default; }
.molva-list { position: absolute; inset: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; display: flex; flex-direction: column; gap: var(--s-3); padding: calc(var(--cab-top, 5rem) + 8px) 4px 24px; }   /* верх списка — ниже густой дымки шапки: карточка не подлезает под неё */
.molva-list::-webkit-scrollbar { display: none; }
.molva-list > * { flex: none; }
.chat.full .molva-list { padding-left: calc(20px + var(--bleed, 0px)); padding-right: calc(20px + var(--bleed, 0px)); padding-bottom: calc(24px + env(safe-area-inset-bottom)); }
.molva-find[hidden], .molva-gate[hidden] { display: none; }
/* Спрятанный экран Молвы (лента, список чатов, разговор под комментариями) стоит на месте невидимым и пропускается
   (content-visibility), а не вынимается (display: none): вынутый при возврате раскладывался заново и заново
   декодировал картинки — после свайпа назад айфона лента под снимком Safari моргала. */
.molva-list[hidden], .molva-room[hidden] { display: flex !important; visibility: hidden; content-visibility: hidden; pointer-events: none; }
/* Список чатов Молвы (и личных чатов у админа) — одной карточкой, как строки дневника: строка остаётся своей карточкой,
   видимые соседи встают вплотную (внахлёст на 1 px), у первой скруглён верх, у последней низ, линия между ними
   начинается от кружка. Строки, которых ещё нет (hidden), не в счёт. Копия строки в меню соседей не имеет — целая
   карточка. Образец — «молва/чаты» на витрине. */
.molva-list > .talk-row { column-gap: 14px; padding: 13px 18px; }
.molva-list > .talk-row .way-ic { width: 2.75rem; height: 2.75rem; }
.molva-list > .talk-row:not([hidden]) ~ .talk-row {
  position: relative; margin-top: calc(-1 * var(--s-3) - 1px); border-top-left-radius: 0; border-top-right-radius: 0; clip-path: inset(0 -48px -48px); }
.molva-list > .talk-row:not([hidden]) ~ .talk-row::before {
  content: ''; position: absolute; top: 0; left: calc(18px + 2.75rem + 14px); right: 18px; height: 1px; background: var(--hairline); pointer-events: none; }
.molva-list > .talk-row:has(~ .talk-row:not([hidden])) { border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
/* Экран с замком на месте чата патронов: карточка посередине — значок, слова, кнопка во всю ширину.
   Движение вбок экран отдаёт странице (pan-y), как лента переписки: по нему идёт свайп «назад». */
.molva-gate { position: absolute; inset: 0; display: grid; place-items: center; padding: var(--cab-top, 5rem) 4px 24px; touch-action: pan-y; }
.chat.full .molva-gate { padding-left: calc(20px + var(--bleed, 0px)); padding-right: calc(20px + var(--bleed, 0px)); padding-bottom: calc(24px + env(safe-area-inset-bottom)); }
.molva-gate > .card { width: min(100%, 26rem); justify-items: center; text-align: center; }
.molva-gate > .card p { color: var(--text); font-size: var(--fs-read); text-wrap: balance; }
/* Пустой личный чат с Михаилом: приветствие посередине ленты — фото, имя, слова. Лежит поверх ленты и места в ней
   не занимает: первое сообщение встаёт как в пустой чат, карточка тает (molva.js). Выше экрана — прижата к верху. */
.molva-hello { position: absolute; inset: 0; display: grid; place-items: center; align-items: safe center; }
.molva-hello > .chat-card { width: min(100%, 24rem); max-width: 100%; padding: 20px 22px 22px; }
.molva-hello .way-ic { overflow: hidden; }
.molva-hello b { font-family: var(--font-heading); font-size: var(--fs-lg); font-weight: 600; }
.molva-hello p { color: var(--text); text-wrap: pretty; }
/* Поиск в Молве: пока ищут, список и лента спрятаны (место в ленте не теряется), поверх — найденное. */
.cab-pane.finding > :not(.molva-find) { visibility: hidden; pointer-events: none; }   /* поиск раздела: Молва, Дневник, Аккаунт */
.molva-find { position: absolute; inset: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; display: flex; flex-direction: column; gap: var(--s-2); padding: calc(var(--cab-top, 5rem) - 8px) 4px 24px; }
.molva-find::-webkit-scrollbar { display: none; }
.molva-find > * { flex: none; }
.chat.full .molva-find { padding-left: calc(20px + var(--bleed, 0px)); padding-right: calc(20px + var(--bleed, 0px)); padding-bottom: calc(24px + env(safe-area-inset-bottom)); }
/* Поиск в чате с Мироном (chat-miron.js): тот же список поверх ленты; лента и поле на это время спрятаны. */
.chat-find { z-index: 2; }
.chat.finding > .feed, .chat.finding > .composer { visibility: hidden; pointer-events: none; }
.find-row b svg { width: .9em; height: .9em; vertical-align: -.1em; opacity: .7; }
.find-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: 2px var(--s-3); padding: 12px 16px; border: 0; border-radius: var(--r-md); background: var(--card); box-shadow: var(--shadow); color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.find-row b { font-size: var(--fs-sm); font-weight: 600; color: var(--accent-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.find-row time { font-size: var(--fs-xs); color: var(--muted); }
.find-row p { grid-column: 1 / -1; font-size: var(--fs-sm); color: var(--text-2); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.find-row mark { border-radius: 3px; background: var(--accent-soft); box-shadow: 0 0 0 2px var(--accent-soft); color: var(--accent-ink); font-weight: 600; }   /* заливка шире слова тенью: отступ раздвинул бы буквы внутри слова */
/* Строка разговора в списке: кружок, имя и время, под именем — начало последнего сообщения в одну строку. */
.talk-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 2px var(--s-4); padding: 14px 18px; border: 0; border-radius: var(--r-lg); background: var(--card); box-shadow: var(--shadow); color: var(--text); font: inherit; text-align: left; cursor: pointer; transition: transform var(--t-fast) var(--ease); }
.talk-row:not(:disabled):active { transform: scale(.985); }
/* Строки одной карточкой (.card.rows; Аккаунт: пин-код, почта, Telegram, патроны, удаление): у строки нет своей заливки
   и тени, между строками тонкая линия. Значок строки Аккаунта — линией, без кружка. Образец — «кабинет/строки». */
.card.rows { display: flex; flex-direction: column; gap: 0; padding: 0 18px; }
.rows > .talk-row { padding: 15px 0; border-radius: 0; background: none; box-shadow: none; }
.rows > .talk-row + .talk-row { box-shadow: inset 0 1px 0 var(--hairline); }
.rows > .acc-row { column-gap: 14px; }
.rows > .acc-row .way-ic { width: 1.6rem; height: 1.6rem; align-self: start; margin-top: 1px; border-radius: 0; background: none; color: var(--text); }
.rows > .acc-row .way-ic > svg { width: 1.4rem; height: 1.4rem; }
.rows > .acc-row b { font-size: var(--fs-read); }
.talk-row:disabled { cursor: default; }
.talk-row[hidden] { display: none; }   /* личный чат с Михаилом: строки нет, пока сервер его не отдал */
.talk-row[data-person] .way-ic { font-family: var(--font-heading); font-size: var(--fs-lg); font-weight: 600; }   /* человек в списке личных чатов: буква имени */
.talk-row:disabled > .way-ic, .talk-row:disabled > b { opacity: .5; }
.talk-row .way-ic { grid-row: 1 / 3; width: 3rem; height: 3rem; overflow: hidden; }
.talk-row .way-ic img, .molva-hello .way-ic img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }   /* фото поверх значка: не открылось — виден значок */
.talk-row b { font-family: var(--font-heading); font-size: var(--fs-md); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.talk-row time { font-size: var(--fs-xs); color: var(--muted); }
.talk-row time > svg { display: block; width: 1.1rem; height: 1.1rem; }   /* замок у закрытого чата */
.talk-row p { grid-column: 2 / -1; font-size: var(--fs-sm); color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.talk-row p.skel { width: 70%; }
.talk-row { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }   /* долгое нажатие — меню строки, а не выделение */
.talk-row b svg { display: inline-block; width: .85em; height: .85em; margin-left: .4em; vertical-align: -.06em; color: var(--muted); }   /* колокольчик: уведомления строки не как у всех */
.talk-row.quiet .talk-count { background: var(--muted); }   /* уведомления канала выключены — число серое */
.talk-row.news p { grid-column: 2; }
.talk-count { grid-column: 3; grid-row: 2; justify-self: end; min-width: 1.6em; padding: 0 .4em; border-radius: var(--r-pill); background: var(--accent); color: var(--on-accent); font-size: var(--fs-xs); font-style: normal; font-weight: 600; line-height: 1.6; text-align: center; animation: dot var(--t-slow) var(--ease) both; }   /* число новых постов */
.talk-count[hidden] { display: none; }
.talk-count:empty { min-width: 0; width: .7rem; height: .7rem; padding: 0; align-self: center; }   /* точка: новое есть, а сколько — неизвестно (личный чат с Михаилом) */
.chat.full.molva-room { position: absolute; left: 0; right: 0; top: 0; }
.chat[data-room]::after { content: none; }
.chat.plain .island { display: none; }
.chat.full.molva-room .chat-head { display: block; padding: 0; height: calc(var(--cab-top, 5rem) - 8px); }   /* пустая: держит место под шапку кабинета */
/* Канал: писать в нём нельзя, поля нет — лента до низа экрана. */
.molva-room.mute .composer { display: none; }
.chat.full.molva-room.mute .feed { padding-bottom: calc(20px + env(safe-area-inset-bottom)) !important; }
/* Лента канала читается сверху, свежие посты наверху: короткая лента и тушки загрузки стоят у верха, а не у низа,
   как в переписке. Тушка даты — та же полоса, что у разделителя дня. */
.chat.molva-channel .feed-in { justify-content: flex-start; padding-top: 16px; }   /* дата свежего поста — ниже густой дымки шапки */
.molva-channel .divider.skel { border-radius: var(--r-pill); }
/* Лента разговора листается только вверх-вниз; движение вбок достаётся странице — свайпу «назад» от левого края (molva.js). */
.chat.full.molva-room .feed { touch-action: pan-y; }
/* Пост: фото или видео во всю ширину карточки, текст, реакции, строка просмотров и времени, кнопка комментариев. */
/* Пост окрашен лёгким оттенком цвета человека (--post-tint; светлая тема берёт цвета щедрее тёмной). Реакции и кнопка
   комментариев на нём полупрозрачные: берут оттенок поста, а не стоят серыми пятнами. */
.post { --post-tint: 14%; --post-bg: color-mix(in oklab, var(--accent) var(--post-tint), var(--card)); align-self: stretch; display: grid; gap: var(--s-3); padding-bottom: 16px; border-radius: var(--r-lg); background: var(--post-bg); box-shadow: var(--shadow); }
:root[data-theme="dark"] .post { --post-tint: 9%; }
.post .react:not(.mine) { background: color-mix(in srgb, var(--text) 8%, transparent); box-shadow: none; }
.post > * { margin: 0 18px; min-width: 0; }
.post > :first-child:not(.post-media) { margin-top: 16px; }
.post > .post-media { margin: 0; display: grid; gap: 2px; border-radius: var(--r-lg) var(--r-lg) 0 0; overflow: hidden; }
.post-media.many { grid-template-columns: 1fr 1fr; }
.post-media.many > :first-child:nth-last-child(odd) { grid-column: 1 / -1; }
.post-media img, .post-media video { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: color-mix(in oklab, var(--text) 6%, var(--card)); }
.post-media.many img, .post-media.many video { aspect-ratio: 1; }
.post-media img { cursor: zoom-in; }
/* Фото во весь экран (molva.js): темнота под фото чёрная в обеих темах — на светлой бумаге фото блёкнет. */
.shot { position: fixed; inset: 0; z-index: 40; touch-action: none; cursor: zoom-out; -webkit-user-select: none; user-select: none; }
.shot > i { position: absolute; inset: 0; background: #000; }
.shot > img { position: absolute; display: block; object-fit: cover; will-change: transform; }
.post-media.many > :first-child:nth-last-child(odd) { aspect-ratio: 16 / 9; }
/* Голосовое поста: круглая кнопка, дорожка столбиками (маска --bars ставит molva.js), под ней время; дорожку можно тянуть. */
/* Средняя линия волны идёт через середину кнопки: над дорожкой пустая строка той же высоты, что время под ней. */
.sound { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 1px 14px; }
.sound::before { content: ''; grid-area: 1 / 2; height: var(--fs-2xs); }
.sound-btn { grid-area: 1 / 1 / 4 / 2; flex: none; width: 48px; height: 48px; border: 0; border-radius: 50%; padding: 0; display: grid; place-items: center; background: var(--accent); color: var(--on-accent); cursor: pointer; transition: transform var(--t-fast) var(--ease); }
.sound-line { grid-area: 2 / 2; position: relative; height: 24px; overflow: hidden; background: color-mix(in srgb, var(--accent-ink) 32%, transparent); -webkit-mask: var(--bars) 0 0 / 100% 100% no-repeat; mask: var(--bars) 0 0 / 100% 100% no-repeat; cursor: pointer; touch-action: pan-y; }
.sound-line i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: var(--accent-ink); transition: width .25s linear; }
.sound time { grid-area: 3 / 2; align-self: end; font-size: var(--fs-2xs); line-height: 1; color: color-mix(in srgb, currentColor 55%, transparent); font-variant-numeric: tabular-nums; }   /* длина звука выглядит так же, как время отправки */
.sound audio { display: none; }
.sound-btn:active { transform: scale(.92); }
.sound-btn svg { width: 22px; height: 22px; }
.sound-line.drag i { transition: none; }
.sound.bad .sound-btn { opacity: .4; pointer-events: none; }
.sound.wait .sound-btn { opacity: .55; pointer-events: none; }   /* звук ещё идёт с сервера */
/* Голосовой ответ Мирона (chat.js, voiced): проигрыватель и справа кнопка текста. Слова ответа раскрываются под
   дорожкой в той же реплике; строка с кнопкой своей ширины не меняет — кнопка остаётся под пальцем. Пока слова закрыты,
   время отправки стоит в строке с длиной звука, у правого края дорожки; реплика высотой с проигрыватель. */
.msg.voice { white-space: normal; }
.msg.voice:has(> .voice-words[hidden]) > .msg-time { margin-top: -1em; margin-bottom: 0; }
.msg.voice:has(> .voice-words[hidden]) > :is(.msg-star, .msg-rate) { margin-top: calc(var(--fs-2xs) * -.5 - .5em); margin-bottom: calc(var(--fs-2xs) * .5 - .5em); }
.msg.voice:has(> .voice-words[hidden]) > .msg-time { margin-right: 50px; }   /* кнопка текста 38 и зазор 12 */
.voice-row { display: flex; align-items: center; gap: 12px; width: 19rem; max-width: 100%; }
.voice-row > .sound { flex: 1; min-width: 0; }
.voice-text { flex: none; width: 38px; height: 38px; border: 0; border-radius: 12px; padding: 0; display: grid; place-items: center; background: color-mix(in srgb, var(--accent) 16%, var(--field)); box-shadow: var(--inset); color: var(--accent-ink); cursor: pointer; transition: transform var(--t-fast) var(--ease); }
.voice-text:active { transform: scale(.92); }
.voice-text svg { width: 20px; height: 20px; }
.voice-words { margin-top: 12px; }
.post h3 { font-family: var(--font-heading); font-size: 1em; font-weight: 600; }
/* Текст поста с разметкой: абзацы, заголовки, цитата с полосой акцента, списки, блок кода, черта, скрытое. */
.post-text { overflow-wrap: anywhere; -webkit-user-select: text; user-select: text; -webkit-touch-callout: default; }
/* Между абзацами — отступ: у постов и у размеченной реплики Мирона в чате (chat.js, markup) один и тот же. */
.post-text > * + *, .post-text blockquote > * + *,
.msg.rich > :is(p, ul, ol, blockquote, h4) + :is(p, ul, ol, blockquote, h4) { margin-top: .75em; }
.post-text :is(h4, h5, h6) { font-family: var(--font-heading); font-weight: 600; line-height: 1.3; text-wrap: balance; }
.post-text h4 { font-size: 1.2em; } .post-text h5 { font-size: 1.1em; } .post-text h6 { font-size: 1em; }
.post-text blockquote { padding: 10px 14px 10px 18px; border-radius: 12px; background: linear-gradient(90deg, var(--accent) 4px, var(--accent-soft) 4px); }   /* полоса фоном, как у .quote: тень мигала линией по краю */
/* Списки — один вид у постов, текста голосового и размеченной реплики Мирона (образец — разговор/реплика-со-списком).
   Цифра и точка стоят у края текста, отступ только под них: в узкой реплике телефона тексту нужна вся ширина.
   Пункты, разделённые пустой строкой, приходят отдельными списками (chat.js, markup: start) и стоят ближе абзацев;
   список стоит ближе к абзацу, который его вводит. */
.post-text :is(ul, ol), .msg.rich > :is(ul, ol) { display: grid; gap: .3em; padding-left: 1.35em; }
.post-text ul, .msg.rich > ul { list-style: disc; padding-left: 1.05em; }
.post-text ol, .msg.rich > ol { list-style: decimal; }
.post-text li::marker, .msg.rich > :is(ul, ol) > li::marker { color: var(--accent-ink); font-weight: 600; }
.msg.rich > ol + ol { margin-top: .5em; }
.msg.rich > p + :is(ul, ol) { margin-top: .45em; }
.post-text code { padding: 1px 5px; border-radius: 6px; background: var(--field); }
.post-text pre { padding: 10px 14px; border-radius: 12px; background: var(--field); box-shadow: var(--inset); overflow-x: auto; }
.post-text pre code { padding: 0; background: none; }
.post-text hr { border: 0; height: 1px; background: var(--hairline); }
.post-text u { text-underline-offset: 3px; }
/* Скрытое: закрашено, пока не нажали. */
.hid { border-radius: 5px; background: color-mix(in srgb, var(--text) 24%, transparent); color: transparent; cursor: pointer; -webkit-user-select: none; user-select: none; transition: color var(--t), background var(--t); }
.hid:not(.seen) a { color: transparent; pointer-events: none; }
.hid.seen { background: none; color: inherit; cursor: auto; -webkit-user-select: text; user-select: text; }
.post-foot { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); font-size: var(--fs-xs); color: var(--muted); }
.post-foot > div { display: flex; gap: var(--s-3); }
.post-foot span { display: inline-flex; align-items: center; gap: 4px; }
.post-foot svg { width: 15px; height: 15px; }
/* Строка комментариев — нижняя кромка поста, как в Телеграме: лица последних авторов, число, стрелка. Обводки нет:
   от поста её отделяет чуть более плотная заливка. Лица заходят друг на друга, кромка лица — цветом поста. */
.post > .post-talk { margin: 0 0 -16px; width: 100%; min-height: var(--hit); padding: 9px 12px 9px 18px; border: 0; border-radius: 0 0 var(--r-lg) var(--r-lg); display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; background: color-mix(in srgb, var(--text) 6%, transparent); color: var(--accent-ink); font: inherit; font-size: var(--fs-sm); text-align: left; cursor: pointer; transition: background var(--t-tint); -webkit-tap-highlight-color: transparent; }
.post > .post-talk:active { background: color-mix(in srgb, var(--text) 12%, transparent); }
.post-talk b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.post-talk > svg { width: 20px; height: 20px; }
.post-talk > svg:last-child { transform: scaleX(-1); opacity: .7; }
.post-talk .faces { display: flex; padding-left: 7px; }
.post-talk .faces .ava { position: relative; overflow: hidden; width: 1.7rem; height: 1.7rem; margin: 0 0 0 -7px; background: color-mix(in oklab, var(--accent) 34%, var(--card)); font-size: var(--fs-2xs); font-style: normal; box-shadow: 0 0 0 2px var(--post-bg); }
.post-talk .faces .ava:nth-child(1) { z-index: 2; }
.post-talk .faces .ava:nth-child(2) { z-index: 1; }
.post-talk .faces .ava img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* Опрос в посте. Пока человек выбирает (.asks) — варианты кнопками с кружком (несколько ответов — с квадратом).
   Итог — строка: процент, текст, число голосов; под текстом полоса на долю голосов (--part), у своего выбора галочка.
   .grow — итог только что открылся, полосы растут от нуля. */
.poll { display: grid; gap: var(--s-2); }
.poll > b { font-family: var(--font-heading); font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
.poll > small { margin-top: -4px; font-size: var(--fs-xs); color: var(--muted); }
.poll ul { display: grid; gap: var(--s-2); margin: 0; padding: 0; list-style: none; }
.poll.asks ul { gap: 6px; }
.poll-opt { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border: 0; border-radius: 14px; font: inherit; line-height: 1.3; text-align: left; color: inherit; background: color-mix(in srgb, var(--text) 8%, transparent); cursor: pointer; transition: background var(--t-tint) var(--ease), transform var(--t-fast) var(--ease); }
.poll-opt:active { transform: scale(.985); }
.poll-opt.on { background: color-mix(in oklab, var(--accent) 22%, transparent); }
.poll-opt span, .poll-row span { min-width: 0; overflow-wrap: anywhere; }
.poll-mark { flex: none; display: grid; place-items: center; width: 1.25rem; height: 1.25rem; border-radius: 50%; color: transparent; background: var(--card); box-shadow: var(--inset); }
.poll-mark.box { border-radius: 6px; }
.poll-mark svg { width: 70%; height: 70%; }
.poll-opt.on .poll-mark, .poll-mark.on { color: var(--on-accent, #fff); background: var(--accent); box-shadow: none; }
.poll-row { display: grid; grid-template-columns: 2.9rem 1fr auto; column-gap: 8px; row-gap: 6px; align-items: start; line-height: 1.3; }
.poll-row em { font-style: normal; font-weight: 600; font-variant-numeric: tabular-nums; }
.poll-row u { align-self: center; text-decoration: none; font-size: var(--fs-xs); color: var(--muted); font-variant-numeric: tabular-nums; }
.poll-row .poll-mark { justify-self: end; width: 1rem; height: 1rem; margin-top: -4px; visibility: hidden; }
.poll-row.mine .poll-mark { visibility: visible; }
.poll-row s { grid-column: 2 / -1; position: relative; height: 5px; border-radius: 3px; overflow: hidden; background: color-mix(in srgb, var(--text) 10%, transparent); }
.poll-row s::before { content: ''; position: absolute; inset: 0 auto 0 0; width: var(--part, 0%); min-width: 5px; border-radius: inherit; background: var(--accent); }
.poll.grow .poll-row s::before { animation: poll-grow var(--t-slow) var(--ease) backwards; }
.poll.grow .poll-row :is(em, u) { animation: fade-new var(--t) var(--ease) backwards; }
@keyframes poll-grow { from { width: 0; min-width: 0; } }
.poll > .poll-go { width: auto; }
.poll-foot { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); font-size: var(--fs-xs); color: var(--muted); }
.poll-again { padding: 0; border: 0; font: inherit; color: var(--accent-ink); background: none; cursor: pointer; }
@media (prefers-reduced-motion: reduce) { .poll.grow .poll-row :is(em, u), .poll.grow .poll-row s::before { animation: none; } }
/* Реакции: смайлик с числом; своя — цветом акцента; смайлик с плюсом — выбор реакции. */
.reacts { display: flex; flex-wrap: wrap; gap: 6px; }
.reacts:empty { display: none; }
.react { display: inline-flex; align-items: center; gap: 5px; min-height: 30px; padding: 3px 11px 3px 8px; border: 0; border-radius: var(--r-pill); background: var(--field); box-shadow: var(--inset); color: var(--text-2); font: inherit; font-size: var(--fs-sm); line-height: 1; cursor: pointer; }
.react b { font-size: var(--fs-xs); font-weight: 600; }
.react span, .pop-emoji [data-emoji], .emoji-panel [data-emoji] { font-family: 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji', sans-serif; }   /* смайлик из двух частей рисуется одним */
.react.mine { background: var(--accent-soft); box-shadow: none; color: var(--accent-ink); }
.react.add { padding: 3px 8px; color: var(--muted); }
.react.add svg { width: 18px; height: 18px; }
/* Сообщение переписки: чужое слева с кружком-буквой и именем, своё справа. Ряд шириной со своё содержимое:
   пузырь (bubble.js) раздувает его из кнопки отправки. Свайп влево везёт ряд его left, без переноса: градиент
   своей реплики привязан к ленте и дальше края ленты ряд не уходит (menu.js). Мышью текст выделяется как обычно;
   на сенсорном экране долгое нажатие открывает меню, слова выделяются в его копии (.pop-rows ниже). */
.mrow { position: relative; align-self: flex-start; max-width: 92%; display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 8px; align-items: end; touch-action: pan-y; }
.mrow.me { align-self: flex-end; max-width: 88%; grid-template-columns: minmax(0, 1fr); }
.molva-direct .mrow { grid-template-columns: minmax(0, 1fr); }   /* личный чат: кружка у сообщений нет, он в шапке (molva.js) */
/* Страница человека (molva.js): фото лежит поверх буквы, как в списке людей; кружок нажимается и вырастает в большой круг (.face-big). */
.molva-person .acc-face { cursor: zoom-in; -webkit-tap-highlight-color: transparent; }
.molva-person .acc-face img, .face-big img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.face-shot > i { background: rgba(0, 0, 0, .88); }
.face-shot > .face-big { position: absolute; overflow: hidden; margin: 0; font-family: var(--font-heading); font-weight: 600; will-change: transform; }
.mrow.joined { margin-bottom: -7px; }
.mrow.joined .ava { visibility: hidden; }
.mrow.cont .who { display: none; }
.mrow .ava { position: relative; overflow: hidden; }
.mrow .ava img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.mrow .ava > svg { width: 100%; height: 100%; }   /* значок, который человек сайта поставил себе на аватар: рисунок на 80% кружка (Miron.icon.fit) */
.mrow .msg .att { display: block; font-style: italic; opacity: .7; }
/* Фото и стикер в сообщении: ширина — своя, не больше 17rem (стикер — 9rem) и не шире сообщения; высота держится по размерам с сервера (--w, aspect-ratio). */
.mrow .msg .pic { display: block; width: min(17rem, calc(var(--w, 320) * 1px)); margin: -4px -9px 8px; max-width: calc(100% + 18px); overflow: hidden; border-radius: 13px; background: color-mix(in srgb, currentColor 8%, transparent); }
.mrow .msg .pic img { display: block; width: 100%; height: 100%; object-fit: cover; }
/* Голосовое в сообщении — проигрыватель поста, своей ширины. Сообщение из одного голосового (voiceonly): время отправки
   стоит в строке с длиной звука, справа. В своём сообщении кнопка и дорожка — цветом букв на акценте: на цвете сообщения их видно. */
.mrow .msg .sound { width: 14.5rem; max-width: 100%; margin: 2px 0 6px; }
.mrow .msg.voiceonly .sound { margin: 0; }
.mrow .msg .sound time { margin: 0; color: inherit; }
.mrow .msg.voiceonly > time { margin-top: -1em; margin-bottom: 0; }
.mrow .msg.me .sound-btn { background: var(--on-accent); color: var(--accent); }
.mrow .msg.me .sound-line { background: color-mix(in srgb, var(--on-accent) 42%, transparent); }
.mrow .msg.me .sound-line i { background: var(--on-accent); }
/* Скрепка в поле переписки: приложить фото. Приложенное фото — строкой над полем, как строка ответа, с уменьшенным фото. */
.input.clipped { padding-left: 6px; gap: 4px; }
.input .clip { flex: none; width: 38px; height: 38px; margin-bottom: max(0px, calc(.7em - 12px)); border: 0; border-radius: 50%; padding: 0; background: none; color: var(--muted); cursor: pointer; display: grid; place-items: center; transition: transform var(--t-fast), color var(--t-tint); }
.input .clip svg { width: 22px; height: 22px; }
.input.rec .clip { display: none; }   /* запись голосового: скрепка уступает место строке записи */
.input.clipped.rec { padding-left: 16px; }   /* строка записи стоит как в чате с Мироном */
.input .clip:active { transform: scale(.9); color: var(--accent-ink); }
.pic-bar { cursor: default; padding-left: 4px; }
.pic-bar > img { width: 44px; height: 44px; border-radius: 16px; object-fit: cover; }
.mrow .msg .pic.sticker { width: min(9rem, calc(var(--w, 320) * 1px)); max-width: 100%; margin: 0 0 6px; border-radius: 0; background: none; }
/* Отметка у времени своего сообщения: справа часы — едет на сервер, галочка — сервер принял. Не доехало — слева от времени
   красный значок линией и слово «ошибка»: вместе они кнопка без заливки, цвет — красный поверх реплики (--bubble-red).
   Время недоехавшего бледнеет цветом букв, а не прозрачностью: красный остаётся в полную силу. */
.mrow .msg time .mark { display: inline-block; width: 1.3em; height: 1.3em; margin: -.3em 0 -.3em 3px; vertical-align: middle; }
.mrow .msg time .mark svg { display: block; width: 100%; height: 100%; }
.mrow.failed .msg > time { opacity: 1; color: color-mix(in srgb, var(--on-bubble) 55%, transparent); }
.mrow .msg time .mark.bad { position: relative; display: inline-flex; align-items: center; gap: 3px; width: auto; height: 1.3em; margin: -.3em 6px -.3em 0; border: 0; padding: 0; background: none; color: var(--bubble-red); font: inherit; line-height: 1; cursor: pointer; }
.mrow .msg time .mark.bad svg { flex: none; width: 1.3em; height: 1.3em; }
.mrow .msg time .mark.bad::after { content: ''; position: absolute; inset: -12px; }   /* палец попадает и рядом со значком */
.ava { width: 2rem; height: 2rem; margin-bottom: 2px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-ink); font-size: var(--fs-sm); font-weight: 600; }
.mcol { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-width: 0; }
.mrow.me .mcol { align-items: flex-end; }
.mrow .who { padding: 0 14px; font-size: var(--fs-xs); font-weight: 600; color: var(--muted); }
.chat .mrow .msg { max-width: 100%; }
.mrow .msg time { float: right; margin: .7em -5px -3px 12px; font-size: var(--fs-2xs); line-height: 1; opacity: .55; font-variant-numeric: tabular-nums; }
/* Реакции сообщения — внутри пузыря, под текстом; в своей реплике они цветом её текста. */
.mrow .reacts { clear: both; padding-top: 8px; margin: 0 -5px; }
.msg.me .react { background: color-mix(in srgb, currentColor 14%, transparent); box-shadow: none; color: inherit; }
.msg.me .react.mine { background: color-mix(in srgb, currentColor 32%, transparent); }
/* Цитата в ответе: имя и начало сообщения, на которое ответили; полоска слева — цветом текста реплики. */
.requote { position: relative; display: grid; gap: 1px; width: 100%; margin: 0 0 6px; padding: 5px 10px 5px 15px; border: 0; border-radius: 10px; background: color-mix(in srgb, currentColor 9%, transparent); color: inherit; font: inherit; font-size: var(--fs-sm); text-align: left; white-space: normal; cursor: pointer; }
.requote::before { content: ''; position: absolute; left: 6px; top: 6px; bottom: 6px; width: 3px; border-radius: 3px; background: currentColor; opacity: .55; }
.requote b { font-size: var(--fs-xs); font-weight: 600; }
.requote span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; opacity: .8; }
/* Строка «ответ на…» над полем и кружок-стрелка, который проступает справа, пока сообщение тянут влево. */
.reply-bar { cursor: pointer; width: 100%; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 4px 4px 4px 14px; border-radius: 20px; background: var(--card); box-shadow: var(--shadow); font-size: var(--fs-sm); overflow: hidden; }
.reply-bar > svg { width: 20px; height: 20px; color: var(--accent-ink); }
.reply-bar b { display: block; font-size: var(--fs-xs); font-weight: 600; color: var(--accent-ink); }
.reply-bar span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-2); }
.swipe-hint { position: fixed; z-index: 5; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--card); box-shadow: var(--shadow); color: var(--muted); pointer-events: none; }
.swipe-hint.on { color: var(--accent-ink); }
.swipe-hint svg { width: 18px; height: 18px; }
/* Меню сообщения (menu.js, Miron.menu), как в Телеграме. Под меню вся страница размывается и темнеет (.pop-veil);
   поверх — слой .pop: копия сообщения (.pop-held), над ней ряд реакций (.pop-emoji), под ней действия (.pop-items).
   Копия — та же разметка под теми же классами предков; её подслой с градиентом реплики человека стоит тем куском,
   что у оригинала (--pop-bs, --pop-bp), анимации внутри копии не идут. Оригинал на это время спрятан (.pop-src).
   Обрезанное сообщение (.cut) листается внутри. Панели — свой цвет --pop, без обводок; опасное действие — красным.
   Размытие во всё окно — самое дорогое на экране: с уровня качества 3 и где браузер не умеет — туман без размытия.
   Меню встаёт под пальцем, который ещё лежит на экране: его слова и слой не выделяются, иначе айфон выделит их сам. */
/* Открытие — пружина Телеграма (запись с айфона): перелёт 2,5% на 180 мс, второй отскок 0,06%, покой к 430 мс.
   Закрытие короче и без перелёта (--ease-flight), как там же: сообщение ложится на место за 200 мс. */
:root { --pop-spring: linear(0, .0747, .2381, .4255, .6001, .7445, .8538, .9302, .9792, 1.0074, 1.0211, 1.0253, 1.0241, 1.0202, 1.0155, 1.0109, 1.0071, 1.0042, 1.0021, 1.0007, .9999, .9995, .9994, .9994, .9995, .9996, .9997, 1);
  --pop-in: 432ms; --pop-out: 200ms; }
.pop-veil, .pop { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.pop-veil { position: fixed; inset: 0; z-index: 30; touch-action: none; background: color-mix(in srgb, var(--text) 16%, transparent); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); }
:root[data-theme="dark"] .pop-veil { background: color-mix(in srgb, var(--paper) 55%, transparent); }
:root[data-quality="3"] .pop-veil, :root[data-quality="4"] .pop-veil { background: color-mix(in srgb, var(--bg) 58%, transparent); -webkit-backdrop-filter: none; backdrop-filter: none; }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) { .pop-veil { background: color-mix(in srgb, var(--bg) 58%, transparent); } }
.pop { --pop: var(--card); position: fixed; inset: 0; z-index: 31; pointer-events: none; padding: max(12px, env(safe-area-inset-top)) 12px max(12px, env(safe-area-inset-bottom)); }
:root[data-theme="dark"] .pop { --pop: color-mix(in oklab, var(--card) 88%, var(--text)); }
.pop > * { position: absolute; pointer-events: auto; will-change: transform; }   /* свой слой всю жизнь меню: на конце движения копия не перерисовывается */
.pop-veil.gone, .pop.gone, .pop.gone > * { pointer-events: none; }   /* меню уходит: касания идут мимо него */
.pop-src { visibility: hidden !important; }
/* Лента с меню на сенсорном экране: долгое нажатие на сообщение открывает меню, слова не выделяются (копирует пункт
   меню). Мышью текст выделяется как обычно. */
@media (pointer: coarse) { .pop-rows .msg, .pop-rows .msg * { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; } }
.pop-held .msg, .pop-held .msg * { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
/* Палец, открывший меню, поднят (.sel, menu.js) — слова копии выделяются, как в Телеграме: зажал слово, потянул ручки.
   Время, кнопки, реакции и цитата не выделяются. */
.pop-held.sel .msg, .pop-held.sel .msg * { -webkit-user-select: text; user-select: text; -webkit-touch-callout: default; pointer-events: auto !important; }
.pop-held.sel .msg :is(time, button, .reacts, .requote), .pop-held.sel .msg :is(time, button, .reacts, .requote) * { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
/* Слои копии (menu.js): окно обрезанного (.pop-clip, включено у .cut), маска тумана, листалка. Каждый — свой слой
   у видеочипа: всё движение меню — их сдвиги. Открылось обрезанное (.still) — листалка встаёт окном и листается. */
.pop-fold { will-change: transform; }
.pop-held.cut .pop-clip { overflow: hidden; }
.pop-held .pop-scroll { pointer-events: auto !important; }
.pop-held.still .pop-scroll { position: absolute; left: 0; right: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; touch-action: pan-y; }
.pop-scroll::-webkit-scrollbar { display: none; }
.pop-held *, .pop-held *::before, .pop-held *::after { pointer-events: none !important; animation: none !important; transition: none !important; }
.pop-held .pop-paint::before { background-size: var(--pop-bs) !important; background-position: var(--pop-bp) !important; }
/* Полоса градиента у копии длинной реплики: за полосой — её крайние цвета, верхний и нижний, без края (menu.js, --pop-cut). */
.pop-held .pop-paint.pop-cut::before { background-image: var(--pop-bi), linear-gradient(var(--bubble-2) var(--pop-cut), var(--bubble-1) var(--pop-cut)) !important;
  background-size: var(--pop-bs), 100% 100% !important; background-position: var(--pop-bp), 0 0 !important; background-repeat: no-repeat !important; }
.pop-wrap::before, .pop-wrap::after { content: none !important; }   /* предки копии несут классы ради правил, но не свои тени и подслои (у чата на весь экран — туман у низа окна) */
.pop-emoji { display: grid; grid-template-columns: repeat(var(--per, 6), auto); gap: 2px; padding: 5px; border-radius: 26px; background: var(--pop); box-shadow: var(--shadow); }
.pop-emoji button { width: 42px; height: 42px; border: 0; border-radius: 50%; padding: 0; display: grid; place-items: center; background: none; color: var(--muted); font-size: 1.5rem; line-height: 1; cursor: pointer; }
.pop-emoji button.mine { background: var(--accent-soft); }
.pop-emoji button svg { width: 20px; height: 20px; }
.pop-emoji:not(.all) [data-more] { display: none; }
.pop-emoji.all { grid-template-columns: repeat(5, auto); }
.pop-emoji.all .more { display: none; }
.pop-items { display: grid; width: max-content; min-width: 14rem; max-width: calc(100vw - 24px); padding: 6px; border-radius: var(--r-md); background: var(--pop); box-shadow: var(--shadow); }
.pop-items button { display: flex; align-items: center; gap: 12px; min-height: var(--hit); padding: 8px 14px; border: 0; border-radius: 10px; background: none; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.pop-items button:active { background: var(--accent-soft); }
@media (hover: hover) { .pop-items button:hover { background: var(--accent-soft); } }
.pop-items svg { width: 20px; height: 20px; color: var(--muted); }
.pop-items button:not(:has(svg))::before { content: ''; flex: none; width: 20px; }
.pop-items .danger, .pop-items .danger svg { color: var(--red); }
/* Строка пунктов поровну (row) — оценка ответа; выбранный пункт (on) подсвечен акцентом. */
.pop-items .pop-row { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin-bottom: 4px; }
.pop-items .pop-row button { justify-content: center; gap: 8px; padding: 8px 10px; text-align: center; white-space: nowrap; }
.pop-items button.on { background: var(--accent-soft); color: var(--accent-ink); }
.pop-items button.on svg { color: var(--accent-ink); }
.pop-note { margin: 0; padding: 8px 14px 6px; max-width: 17rem; font-size: var(--fs-sm); line-height: 1.4; color: var(--text); }   /* подводка для человека — полным цветом */
.pop-note b { display: block; color: var(--text); }
/* Лента — свой слой наложения (isolation): реплики (isolate, relative) рисуются в слой самой прокрутки. Без него
   Safari выносил каждую реплику в отдельный слой, который едет за прокруткой, и сборка слоёв брала 50–90 мс
   на кадр листания (запись с айфона: 16–27 кадров/с). Внутри ленты нет ничего с z-index выше шапки и поля.
   Прокрутку ленты держит только сайт (chat.js, bubble.js), как в Safari, где подкрутки браузера нет: overflow-anchor
   у <html> на ленту не наследуется. С подкруткой Firefox принимал подъём реплик переносом (bubble.js) за сдвиг
   и докручивал ленту вверх на его высоту, а при следующей раскладке — разом: ответ Мирона уходил под поле. */
.chat .feed { flex: 1; min-height: 0; overflow-y: auto; overflow-anchor: none; overscroll-behavior: contain; scrollbar-width: none; margin: 0 -28px; padding: 62px 28px 126px; isolation: isolate; }
.chat.full .feed { margin: 0 calc(-1 * var(--bleed, 0px)); padding-left: calc(20px + var(--bleed, 0px)); padding-right: calc(20px + var(--bleed, 0px)); }   /* во всю ширину окна (--bleed выше) */
.chat .feed::-webkit-scrollbar { display: none; }
.chat .feed-in { position: relative; min-height: 100%; justify-content: flex-end; }   /* top — лента уступает место новому (bubble.js) */
.chat .composer { position: absolute; left: 0; right: 0; bottom: 0; z-index: 3; display: grid; justify-items: center; gap: 10px; padding-top: 6px; pointer-events: none; }
.chat .composer > * { pointer-events: auto; }
.chat.full .composer { padding: 6px 16px calc(12px + env(safe-area-inset-bottom)); }
.chat.full[data-keys] .composer { padding-bottom: 12px; }   /* снизу клавиатура, полоски «домой» там нет (chat.js) */
.chat .composer .input { width: 100%; min-width: 0; }   /* на крупном шрифте поле не шире экрана: кнопка микрофона не уезжает за край */
/* Холст капли (bubble.js): новое в ленте выходит из кнопки. Лежит под кнопкой, полем и Мироном, над затемнением;
   место и размер ставит bubble.js на время выхода. */
.chat .composer > .bubble-sky { position: absolute; z-index: -1; pointer-events: none; }

/* =====================================================================
   МИРОН
   Живой персонаж на холсте. Рисует его miron/miron.js: Miron.face(элемент, настройки), эмоции лежат
   в miron/moods.js. Все краски Мирона — здесь: движок своих цветов не держит и читает эти переменные
   заново при смене темы и акцента. В светлой теме Мирон тёмный, в тёмной светлый, тело едва окрашено акцентом.
   ===================================================================== */
:root {
  --miron-ink: color-mix(in oklab, var(--accent) 7%, #53594F);      /* тело и черты лица */
  --miron-hi: color-mix(in oklab, var(--accent) 8%, #737A6A);       /* мягкий свет на ушах */
  --miron-shine: #EEEADD;                                            /* блик в глазу, подушечки лап */
  --miron-eye: color-mix(in oklab, var(--accent) 9%, var(--text-2));   /* глаза следуют выбранной палитре */
  --miron-eye-shine: color-mix(in oklab, var(--accent) 4%, var(--card)); /* светлый блик */
  --miron-tear-hi: #8A8C84;                                          /* блик на слезе */
  --miron-hand-shadow: rgba(0, 0, 0, .3);                            /* тень машущей лапки */
  --miron-cheek: color-mix(in srgb, color-mix(in oklab, var(--accent) 25%, #D4A38C) 55%, transparent); /* щёчки */
  --miron-glow: var(--accent);                                       /* светлячки, мяч, волны от стука, ветер, ореол сферы */
  --miron-balloon: var(--accent);                                    /* воздушный шарик образа «Ты в 9 лет» (miron/looks.js) */
  --miron-potion: #5DBE35;                                           /* зелье и портал образа «Безумный учёный» (miron/looks.js) */
  --miron-cherry: #D9443A;                                           /* вишенка на торте образа «Дворецкий» (miron/looks.js) */
  --miron-swamp: #8A9A5B;                                            /* болото образа «Барон» (miron/looks.js) */
  --miron-swamp-water: color-mix(in srgb, var(--miron-swamp) 55%, var(--card));   /* вода болота «Барона»: сплошная, половины пруда сходятся без шва */
  --miron-gold: #D4A72C;                                             /* золото образов «Ланнистер», «Остап» и «Психолог» (miron/looks.js) */
  --miron-tennis: #D4E157;                                           /* теннисный мячик образа «Психолог» (miron/looks.js) */
  --miron-petal: #F2A2B4;                                            /* лепестки персика образа «Старый учитель» (miron/looks.js) */
  /* Капли краски, из которых Мирон собирается на первом экране (miron/arrival.js): акцент, акцент
     с чернилами, светом и текстом, низ и верх градиента реплик, акцент с краской фона. */
  --miron-drop-1: var(--accent);
  --miron-drop-2: color-mix(in oklab, var(--accent) 38%, var(--miron-ink));
  --miron-drop-3: color-mix(in oklab, var(--accent) 45%, var(--miron-hi));
  --miron-drop-4: color-mix(in oklab, var(--accent) 26%, var(--text));
  --miron-drop-5: var(--pen-1);
  --miron-drop-6: var(--pen-2);
  --miron-drop-7: color-mix(in oklab, var(--accent) 55%, var(--paint-3));
  --miron-fly-spread: .5;       /* путь волны распада от касания до соседних частей рисунка */
  --miron-fly-feather: .09;     /* ширина мягкого края в долях оставшегося пути */
  --miron-fly-grain: .38;       /* неравномерность края */
  --miron-fly-fade: var(--t-fast);
  --miron-fly-flight: var(--t-slow);
  --miron-fly-settle: var(--t-slow);
  --miron-fly-finish: .6666667; /* после двух третей распада ныряет до конца; сборка следует за прокруткой */
  --miron-fly-size: .11rem;    /* радиус частицы */
  --miron-fly-drift: .14;      /* разлёт в долях ширины Мирона */
  --miron-fly-count: 320;
  --miron-depth-plane: var(--surface);
  --miron-depth-strength: .32;
  --orb-1: #FFFFFF; --orb-2: var(--surface); --orb-3: color-mix(in oklab, var(--accent) 14%, #CFCFCB); --orb-spec: rgba(255,255,255,.8);
}
[data-theme="dark"] {
  --miron-ink: color-mix(in oklab, var(--accent) 7%, #B8BAAF);
  --miron-hi: color-mix(in oklab, var(--accent) 6%, #CDCEC2);
  --miron-shine: #484E44;
  --miron-eye: color-mix(in oklab, var(--accent) 10%, color-mix(in oklab, var(--text) 55%, var(--surface)));
  --miron-eye-shine: color-mix(in oklab, var(--accent) 4%, var(--text));
  --miron-tear-hi: #8A8C84;
  --orb-1: color-mix(in oklab, var(--accent) 8%, #2A2A2D); --orb-2: var(--card); --orb-3: color-mix(in oklab, var(--accent) 10%, #0E0E0F); --orb-spec: rgba(255,255,255,.14);
}
/* Шарик в светлой теме на чёрно-белом и красно-чёрном акценте: сам акцент там почти чёрный, и шарик вышел бы тёмным пятном. */
:root[data-accent="mono"]:not([data-theme="dark"]) { --miron-balloon: color-mix(in oklab, var(--accent) 14%, var(--card)); }
:root[data-accent="palekh"]:not([data-theme="dark"]) { --miron-balloon: var(--accent-ink); }
/* Вид «набросок» (miron/soft.js, penLook), он по умолчанию: тело цветом текста с долей акцента, как заголовок рядом.
   Прежний мягкий Мирон — data-miron-look="soft" на <html>, переключатель в лаборатории. */
:root:not([data-miron-look="soft"]) {
  --miron-ink: color-mix(in oklab, var(--text) 86%, var(--accent) 14%);
  --miron-hi: color-mix(in oklab, var(--text) 92%, var(--accent) 8%);
}
.miron-face { position: relative; width: var(--miron-size, 15rem); max-width: 100%; aspect-ratio: 1; flex: none; }
.miron-face canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
/* Сфера: необязательная оболочка. Светится акцентом, свечение дышит вместе с эмоцией. */
.miron-face.orb { border-radius: 50%; overflow: hidden; background: radial-gradient(120% 120% at 32% 26%, var(--orb-1) 0%, var(--orb-2) 58%, var(--orb-3) 100%);
  box-shadow: 0 0 var(--glow-blur, 34px) var(--glow-spread, 4px) var(--halo), inset 0 -18px 40px color-mix(in srgb, var(--accent) 14%, transparent), inset 0 14px 30px color-mix(in srgb, #fff 12%, transparent); }
.miron-face.orb::after { content: ""; position: absolute; left: 12%; top: 8%; width: 52%; height: 42%; pointer-events: none; background: radial-gradient(closest-side, var(--orb-spec), transparent 72%); }
/* Мысль Мирона: всплывает над головой, держится три секунды и тает. */
.miron-face .speech { position: absolute; left: 50%; top: 9%; z-index: 2; max-width: 92%; transform: translateX(-50%); font-size: var(--fs-sm); font-weight: 600; line-height: 1.15; text-align: center; white-space: nowrap; color: var(--text); opacity: 0; pointer-events: none; }
.miron-face.orb .speech { top: 16%; max-width: 85%; }
.miron-face .speech.show { animation: thought 3.2s ease-out forwards; }
/* Смена экрана воздуходувкой (miron/sweep.js): новое содержимое скрыто, пока не готов его первый прозрачный кадр. */
[data-sweep-entering] [data-sweep]:not([data-keep]):not([data-keep] *):not(:has([data-keep])) { visibility: hidden !important; }
@keyframes thought {
  0% { opacity: 0; transform: translate(-50%, 12px) scale(.8); }
  10% { opacity: 1; transform: translate(-50%, 0) scale(1.06); }
  18% { transform: translate(-50%, 0) scale(1); }
  62% { opacity: 1; transform: translate(-50%, -3px) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -18px) scale(1.06); }
}
/* Щекотка (Miron.face с ticklish: true): Мирон становится кнопкой, палец видит это по курсору, клавиатура — по рамке. */
.miron-face[role="button"] { cursor: pointer; -webkit-tap-highlight-color: transparent; outline: none; }
.miron-face[role="button"][data-keyboard-focus]:focus { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 2rem; }
/* Появление на первом экране (miron/arrival.js, Miron.arrival): холст Мирона занимает середину места,
   вокруг летают слова и капли на холсте .arrival-ink во весь экран; мысль пером стоит над головой
   и следует за её покачиванием (arrival.js двигает .arrival-thought-anchor). */
.arrival { isolation: isolate; }
.arrival > canvas { inset: 14%; width: 72%; height: 72%; }
.arrival-thought-anchor { position: absolute; z-index: 2; left: 0; top: 0; width: 38%; pointer-events: none; user-select: none; transform-origin: 50% 50%; will-change: transform; }
.arrival-thought { display: block; width: 100%; aspect-ratio: 138 / 31; opacity: 0; transform: translateY(7px) scale(.24); transform-origin: 50% 100%; will-change: transform, opacity; }
.arrival-thought > svg { display: block; width: 100%; height: 100%; overflow: visible; }
.has-thought .arrival-thought { animation: arrival-thought 5.2s both; }
.arrival.fly-away .arrival-thought { visibility: hidden; }   /* Мирон у заголовка «Сделки» (miron/fly.js): мысль не показывается */
.screen:not([data-on]) .arrival-thought { animation-play-state: paused; }
@keyframes arrival-thought {
  0%, 100% { opacity: 0; transform: translateY(7px) scale(.24); }
  23%, 77% { opacity: 1; transform: translateY(1px) scale(.95); }
  36%, 64% { opacity: 1; transform: translateY(0) scale(1); }
}
.deck .screen > canvas.arrival-ink { position: absolute; inset: 0; width: 100%; height: 200%; max-width: none; margin: 0; z-index: 0; pointer-events: none; }   /* два экрана: Мирон собирается и там, куда его увезла прокрутка */
@media (prefers-reduced-motion: reduce) { .has-thought .arrival-thought { animation: none; } }

/* =====================================================================
   ГЛУБИНА
   Страница листается как обычная, а экраны сайта лежат волной вдоль неё: каждый следующий ниже,
   дальше и чуть в стороне, камера идёт к нему по изгибу (deck.js, Miron.deck). Экраны живут
   в сцене .stage, она прилипает к окну; длину страницы задаёт высота .deck, метки .stop — начала экранов.
   Движок ставит экрану transform с теми же величинами, что --d (расстояние от камеры в экранах: 0 — перед
   зрителем, 1 — следующий, -1 — пройден) и --dx (сдвиг вбок от камеры в vw) в правиле ниже; переменные
   остаются для страницы без движка (смена переменной пересчитывала бы стили всего экрана каждый кадр),
   и data-on тому, что перед зрителем. Как глубина выглядит, решает только этот блок: экраны едут
   как обычная страница, пройденный остаётся на месте и уходит вверх, следующий подходит снизу,
   и вся лента при этом плывёт вбок по волне. Ничего не тает и не сжимается: для глаза это одна страница.
   Шапка .deck-top: тень у верхнего края окна цвета --fog, остаётся на всех экранах, а имя сайта в ней
   едет вместе с первым экраном (движок ставит шапке те же --d и --dx, что и первому экрану).
   Экран не ниже окна и высотой со свои слова: слова из экрана не вылезают, выше окна — экран длиннее.
   Дорога светлячков (trail.js) на двух холстах во всё окно: canvas.trail-ink над фоном, за экранами,
   canvas.trail-ink.over над экранами, под шапкой и тенью низа. Рой идёт из заголовка в заголовок
   (data-trail-from, data-trail). Куда огонь залетел, там элемент загорается: буквам trail.js красит
   сам текст через --trail-lit (.trail-lit-text), блоку кладёт свет сверху ([data-trail-lit]).
   ===================================================================== */
.deck { position: relative; z-index: 1; }
/* Сцена только обрезает край: собственной прокрутки к полю у неё нет. Для старых браузеров остаётся hidden. */
.deck .stage { position: sticky; top: 0; height: 100dvh; overflow: hidden; overflow: clip; }
.deck .stop { position: absolute; left: 0; width: 1px; height: 1px; pointer-events: none; }
/* Колонка экрана ровно в окно: в Safari галактика (ширина через min() с процентом) раздвигала её шире телефона,
   и слова «Сообщений» вылезали за правый край. */
.deck .screen { position: absolute; inset: 0 0 auto; min-height: var(--deck-h, 100%); box-sizing: border-box; display: grid; grid-template-columns: minmax(0, 1fr); align-content: safe center; justify-items: start; gap: var(--s-4); padding: max(var(--s-7), env(safe-area-inset-top)) var(--s-5) max(var(--s-7), env(safe-area-inset-bottom)); pointer-events: none; will-change: transform;
  --d: 0; --dx: 0;
  transform: translate3d(calc(var(--dx) * 1vw), calc(var(--d) * 100dvh), 0); }
/* Пока движок не расставил экраны по готовым шрифтам, колоды не видно: иначе экраны на миг ложатся друг на друга,
   а следующий заголовок выскакивает позже остальных. Всплывают блоки по правилу загрузки страницы, см. «Движение». */
.deck:not([data-ready]) { visibility: hidden; }
/* Экран за краем окна (data-away ставит движок только при смене видимости) и вещь ленты пробы переписки за краем
   ленты (talk.js): вечные анимации стоят, вернулся — идут с того же места. Скрытое не рисуется, но его анимации всё
   равно пересчитывались каждый кадр. */
:is(.screen, .feed-in > *)[data-away] :is(.snake, .island, .voice-hint, .file-card .ring, .tag.live, .flow > .now, .send.rec)::before,
:is(.screen, .feed-in > *)[data-away] :is(.skel, .send.rec)::after,
:is(.screen, .feed-in > *)[data-away] :is(.way-ic i, .bars i, .typing i, .me-dots i, .rec-dot, .lock i, .island.on .island-main svg, .veil.on, .a-breathe) { animation-play-state: paused; }
/* Пока открыто меню сообщения (data-menu ставит menu.js), вечные анимации под его размытием стоят: каждый их кадр
   заставлял видеочип пересчитывать размытие во весь экран. Меню закрылось — идут с того же места. */
html[data-menu] :is(.snake, .island, .voice-hint, .file-card .ring, .tag.live, .send.rec)::before,
html[data-menu] :is(.dict-caret, .bars i, .typing i, .me-dots i, .rec-dot, .lock i, .a-breathe, .island.thinking, .island.cooling) { animation-play-state: paused; }
.deck-top { position: fixed; top: 0; left: 0; right: 0; z-index: 3; padding: max(var(--s-4), env(safe-area-inset-top)) var(--s-4) var(--s-6); text-align: center; pointer-events: none; --d: 0; --dx: 0;
  font-family: var(--font-heading); font-weight: 600; font-size: var(--fs-md); color: var(--text); }
/* Тень у края окна: полная только у самого края и сразу плавно сходит на нет, сплошной полосы нет. */
.deck-top::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 2.2rem; z-index: -1;
  background: linear-gradient(to bottom, var(--fog) 0, color-mix(in srgb, var(--fog) 50%, transparent) 25%, color-mix(in srgb, var(--fog) 20%, transparent) 55%, transparent 100%); }
.deck-top b { display: inline-block; font-weight: inherit; will-change: transform; transform: translate3d(calc(var(--dx) * 1vw), calc(var(--d) * 100dvh), 0); }
.deck-top span { color: var(--muted); font-weight: 400; }
/* Такая же тень у нижнего края окна, на всех экранах и всегда: следующий экран выходит из неё. Тень прибита
   к окну (fixed на колоде, не на сцене): резинка запертой ленты двигает сцену, а тень стоит. */
.deck::after { content: ''; position: fixed; left: 0; right: 0; bottom: 0; height: 3.5rem; z-index: 3; pointer-events: none;
  background: linear-gradient(to top, var(--fog) 0, color-mix(in srgb, var(--fog) 50%, transparent) 25%, color-mix(in srgb, var(--fog) 20%, transparent) 55%, transparent 100%);
  transition: opacity var(--t); }
/* На последнем экране следующего нет, и тень гасла бы кнопку анкеты у нижнего края: её там нет. */
.deck:has(.stage > section.screen:last-of-type[data-on])::after { opacity: 0; }
/* При входе и у клавиатуры сцена сама сдвигается: её внутренняя кромка не срезает голову Мирона. */
.deck[data-locked] .stage, .deck[data-held] .stage { overflow: visible; }
input[data-entry-moving], textarea[data-entry-moving] { caret-color: transparent; }
canvas.trail-ink { position: fixed; inset: 0; width: 100%; height: 100%; height: 100lvh; max-width: none; margin: 0; z-index: 0; pointer-events: none; }
canvas.trail-ink.over { z-index: 2; }
.trail-lit-text { -webkit-background-clip: text; background-clip: text; color: transparent; background-image: var(--trail-lit, none); padding-block: .14em; margin-block: -.14em; }   /* краска только внутри рамки: запас под хвосты букв */
/* Цвет текста и пятна одной картинкой (trail-paint.js): обрезка по буквам одна, край буквы чистый. */
.trail-lit-text.trail-lit-one { background-image: paint(trail-lit); }
[data-trail-lit] { position: relative; }
[data-trail-lit]::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; background: var(--trail-lit, none); }
.deck .screen > * { width: min(100%, 36rem); margin-inline: auto; }
/* Широкий экран (первый и анкета) — тот же слайд, только справа Мирон: колонка слов шириной с карточку слайда,
   заголовок того же размера, под словами один предмет на карточке. Первая строка первого экрана на той же высоте
   от верха, что у слайдов; анкета выше всех экранов и стоит по центру окна, чтобы кнопка была видна сразу.
   На телефоне столбик, всё по центру, Мирон между заголовком и текстом. */
.deck .screen.wide:not(.enter) { align-content: start; padding-top: max(5.5rem, 14svh); }
.deck .screen.wide > * { width: min(100%, 64rem); }
.hero { display: grid; grid-template-columns: minmax(0, 36rem) minmax(0, 1fr); gap: var(--s-7); align-items: center; }
.hero > .stack { position: relative; z-index: 1; gap: var(--s-4); }   /* слова и карточка поверх Мирона: в перелёте он проходит под ними */
.hero h1, .hero h2 { font-size: calc(var(--fs-h1) * 1.25); line-height: 1.08; text-wrap: balance; }
.hero .lead { max-width: none; line-height: 1.6; }   /* во всю колонку, как карточка под ним */
.hero > .stack > .card { margin-top: var(--s-3); }
.hero .form.card { grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: var(--s-3); }   /* почта и «Войти» одним рядом */
.hero .form.card .glow > .btn { min-width: 10rem; }   /* «Войти» в полтора раза шире своих слов */
.hero .side { display: grid; justify-items: center; --miron-size: 20rem; }
.hero .way { display: none; }   /* место перелёта Мирона на телефоне (miron/fly.js), на компьютере его нет */
.hero .arrival { width: 100%; }
.hero .arrival > canvas { inset: 3%; width: 94%; height: 94%; }   /* Мирон ростом с текст слева: от заголовка до кнопок */
.deck .screen.wide > .hero { position: relative; z-index: 1; }   /* слова над холстом с каплями */
.arrival { will-change: transform, opacity; }   /* полёт за камерой (miron/fly.js) двигает место Мирона целиком */
/* Слайды: сделка, отзывы, выгрузка. Одна схема на все: заголовок, строка текста, под ними один предмет
   на подложке (карточка условий, карточка отзыва, три способа). Всё в одной колонке по центру шириной с карточку,
   заголовок у всех одного размера, и первая строка слайда стоит на одной высоте от его верха: у слайда
   с надзаголовком это надзаголовок, заголовок под ним; текст в карточках — по левому краю.
   Между словами соседних слайдов один и тот же зазор (deck.js, { gap }). */
.deck .screen.slide { align-content: start; justify-items: center; text-align: center; padding-top: max(5.5rem, 14svh); }
.slide h2 { font-size: calc(var(--fs-h1) * 1.25); line-height: 1.08; text-wrap: balance; }
.deck .screen.slide > h2 { width: min(100%, 46rem); }   /* заголовок шире колонки: длинный ложится в две строки, а не в три */
.slide .lead { line-height: 1.6; text-wrap: balance; }
.slide > .card, .slide > .ways { margin-top: var(--s-3); text-align: left; }
.slide .row, .slide .rating { justify-content: center; }
/* Сделка: условия — строки одной карточки, у каждой свой значок; последняя — итог на подложке акцента во всю ширину. */
.terms { gap: var(--s-4); padding-bottom: 0; overflow: hidden; }
.terms > p, .fares > p { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--s-4); align-items: center; color: var(--text); line-height: 1.5; }
.terms .way-ic, .fares .way-ic { width: 2.75rem; height: 2.75rem; }
.terms .way-ic > svg, .fares .way-ic > svg { width: 1.3rem; height: 1.3rem; }
.terms > .free { margin: var(--s-1) -24px 0; padding: var(--s-4) 24px; background: var(--accent-soft); font-weight: 600; }
.terms > .free .way-ic, .fares > .free .way-ic, .steps > .free::before { background: var(--accent); color: var(--on-accent); }
/* Файл о себе (file-drum.js) — лид-магнит рекламных лендингов: карточка .card.terms, в ней предложение, барабан
   названий состояний, слова Мирона цитатой, что внутри файла строками со значками и итог «бесплатно».
   Барабан — цилиндр прямо на карточке, без ниши: колесо отодвинуто на радиус назад, поэтому строка в окошке в настоящий
   размер, а верхние и нижние уходят назад и сплющиваются; края гаснут маской. Окошко — мягкая плашка без тени.
   Перспектива слабая (70rem): при сильной строки над и под окошком заваливались, как курсив. */
.lead-file { width: min(100%, 30rem); }
.lead-file h3 { font-family: var(--font-heading); font-size: var(--fs-h3); font-weight: 700; line-height: 1.25; text-wrap: balance; }
.lead-file .quote p { color: var(--text); }
.drum { --lh: 1.92rem; position: relative; height: 7.2rem; overflow: hidden; perspective: 70rem;
  font-family: var(--font-heading); font-size: 1.2rem; font-weight: 500; color: var(--text);
  -webkit-mask-image: linear-gradient(transparent, #000 32%, #000 68%, transparent); mask-image: linear-gradient(transparent, #000 32%, #000 68%, transparent); }
.drum::before { content: ''; position: absolute; left: 0; right: 0; top: calc(50% - var(--lh) / 2); height: var(--lh); border-radius: var(--r-pill); background: var(--field); }
.drum-wheel { position: absolute; left: 0; right: 0; top: 50%; height: 0; transform-style: preserve-3d; will-change: transform; }
.drum-line { position: absolute; left: 0; right: 0; top: calc(var(--lh) / -2); height: var(--lh); line-height: var(--lh); padding: 0 .5rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: center; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
/* Надзаголовок: вопрос над заголовком, тем же шрифтом, но меньше и тише. */
.slide .over { font-family: var(--font-heading); font-weight: 600; font-size: calc(var(--fs-h1) * .72); line-height: 1.15; color: var(--text-2); text-wrap: balance; margin-bottom: calc(-1 * var(--s-2)); }
/* Остановки разговора: номер в кружке, название и строка под ним; кружки связаны линией; последняя — итог на подложке акцента. */
.steps { list-style: none; counter-reset: step; gap: var(--s-4); padding-bottom: 0; overflow: hidden; }
.steps > li { counter-increment: step; position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: var(--s-4); align-items: start; }
.steps > li::before { content: counter(step); grid-row: 1 / span 2; width: 2.75rem; height: 2.75rem; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-ink); font-family: var(--font-heading); font-weight: 600; font-size: var(--fs-lg); line-height: 1; }
.steps > li::after { content: ''; position: absolute; left: calc(1.375rem - 1px); top: calc(2.75rem + 5px); bottom: calc(-1 * var(--s-4) + 5px); width: 2px; background: var(--hairline); }   /* от кружка до кружка с зазором 5px с обеих сторон */
.steps > li:nth-last-child(2)::after { bottom: calc(-1 * (var(--s-4) + var(--s-1) + var(--s-4)) + 5px); }   /* до кружка итога: его подложка начинается выше кружка */
.steps > li:last-child::after { display: none; }
.steps > li > b { font-weight: 600; color: var(--text); line-height: 1.35; padding-top: .3rem; }
.steps > li > span { color: var(--text-2); font-size: var(--fs-sm); line-height: 1.5; }
.steps > .free { margin: var(--s-1) -24px 0; padding: var(--s-4) 24px; background: var(--accent-soft); }
/* Тарифы: значок, что, цена; подарок первой строкой на подложке акцента, последняя строка — где говорить. */
.fares { gap: var(--s-4); padding-top: 0; overflow: hidden; }
.fares > p { grid-template-columns: auto minmax(0, 1fr) auto; }
.fares > p > b { font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.fares > .free { margin: 0 -24px var(--s-1); padding: var(--s-4) 24px; background: var(--accent-soft); font-weight: 600; }
.fares > .where { color: var(--text-2); }
.fares > .where > span:last-child { grid-column: 2 / -1; }   /* цены нет — слова до правого края */
/* Стиль: цвет и рисунок фона на одной карточке — лентами (parts.js, «вид»; лента — .strip), переключатель темы
   на главной у вопроса про цвет. Подпись-вопрос — .ask. */
.style { gap: var(--s-5); }
.style .pick, .looks .pick { display: grid; gap: var(--s-3); }
.style .row.apart, .sheet .row.apart { justify-content: space-between; }
/* Размер букв и тема (.letters, чат и кабинет) стоят одной строкой: на узком экране пять кнопок размера ужимаются,
   а тема не уходит вниз. */
.row.letters { flex-wrap: nowrap; gap: var(--s-2); }
.looks > .row.letters { justify-self: stretch; }   /* ряд во всю ширину: ему есть куда ужиматься */
.row.letters .seg { flex: 0 1 calc(5 * 2.8rem + 16px); }   /* пять ровных кнопок по 3,2 буквы */
.row.letters .seg button { flex: 1 1 0; min-width: auto; padding-inline: 4px; }   /* тесно — ужимаются, но не уже букв */
.row.letters .icon-btn { flex: none; }
.ask { font-weight: 500; color: var(--text); }
/* Анкета: «О тебе» с меткой «можно позже» — имя, возраст и пол в ряд одной высоты, пол переключателем; почта и кнопка во всю ширину. */
.sheet { gap: var(--s-4); }
.sheet .row.apart { margin-bottom: calc(-1 * var(--s-2)); }
.sheet .fields { display: grid; grid-template-columns: minmax(0, 1fr) 6.5rem auto; gap: var(--s-3); align-items: stretch; }   /* имя тянется, возрасту хватает четырёх цифр, полу — своих слов */
.sheet .fields .field { grid-template-rows: auto 1fr; }
.sheet .seg { display: flex; width: 100%; box-sizing: border-box; }
.sheet .seg button { flex: 1 1 0; padding-inline: 12px; }
.sheet .glow { margin-top: var(--s-2); }
/* Анкета стоит на широком экране: слова и поля слева, Мирон справа, как на первом экране. Он проступает, когда
   к нему слетаются светлячки (site.html); на компьютере ростом с анкету и серединой против середины видимой
   карточки (ставит site.html); на телефоне стоит между словами и полями. Поле кода (.pin) встаёт
   на место анкеты, когда её сдуло (entry.js). */
.deck .screen.enter { padding-bottom: max(2.5rem, env(safe-area-inset-bottom)); }   /* экран пониже: чаще влезает в окно целиком */
.enter .hero { align-items: start; }
.enter .side { align-self: start; --miron-size: 20rem; }
/* Мирон анкеты появляется, как на первом экране (miron/arrival.js), но ростом с анкету, а не с колонку. */
.enter .hero .arrival { width: var(--miron-size); }
.enter .hero .arrival > canvas { inset: 0; width: 100%; height: 100%; pointer-events: auto; }
/* Конец ленты без анкеты (рекламный лендинг): один Мирон посередине, у низа экрана, над полем почты. */
.deck .screen.enter.alone { align-content: end; }
.enter.alone .hero { grid-template-columns: minmax(0, 1fr); justify-items: center; }
.enter.alone .side { align-self: end; --miron-size: min(18rem, 40svh); }
.pin { gap: var(--s-4); }
.pin .mail { max-width: none; }
.link { background: none; border: 0; padding: 0; color: var(--accent); font: inherit; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.pin p { line-height: 1.5; }
.pin input { text-align: center; font-size: var(--fs-lg); letter-spacing: .3em; font-variant-numeric: tabular-nums; }
.secret { -webkit-text-security: disc; }   /* пин-код: цифры точками, а поле обычное — браузер не предлагает сохранить пароль */
/* Вход в чат (entry.js): чат лежит под лентой и открывается, когда экран уехал; гость — маленький Мирон в кармане
   над кнопкой голосового чата, карман с hid прячет его ниже кнопки; змейка у кнопки загорается, когда он в ней исчез. */
/* Страница входа (screens/signin.html): один экран без ленты. Мирон, заголовок и одна фраза стоят столбиком по середине
   места над полем почты (mail-door.js) и не двигаются: почта и код пишутся в поле внизу. На телефоне столбик занимает
   верхнюю половину окна: клавиатура его не закрывает. Столбик прибит к окну, а поле — чат на весь экран прямо в теле
   страницы, от которого видно только низ: тело страницы, как у чата, не листается и под клавиатурой не уезжает. */
.signin ~ .chat.full > .chat-head, .signin ~ .chat.full > .feed { visibility: hidden; }
.signin { position: fixed; inset: 0; margin: 0 auto; box-sizing: border-box; display: grid; align-content: center; justify-items: center; gap: var(--s-3); text-align: center; padding-bottom: 9rem; --miron-size: 12rem; }
.signin h1 { font-size: var(--fs-h1); line-height: 1.1; text-wrap: balance; }
.signin .lead { max-width: 26rem; text-wrap: balance; }
@media (pointer: coarse) { .signin { padding-bottom: 50dvh; --miron-size: 8rem; } .signin h1 { font-size: var(--fs-h2); } }
.entry-chat { position: fixed; inset: 0; z-index: 0; }
.entry-pocket { position: fixed; z-index: 4; pointer-events: none; }   /* слой полёта поверх всего */
.entry-spark { position: fixed; left: 0; top: 0; z-index: 4; pointer-events: none; }   /* светлячок из лапы Мирона к его словам (entry.js, fling) */
/* Змейка от удара светлячка о кнопку (entry.js, ring): тонкая рамка поверх кнопки на один пробег отблеска, без
   тёплого пятна под ним — пятно легло бы на слова кнопки. */
.island > .entry-ring, .island > .entry-ring.a-glint:not(.live) { position: absolute; inset: 0; border-radius: inherit; pointer-events: none; }
.island > .entry-ring.a-glint::after { content: none; }
/* Мирон анкеты в слое полёта рисуется во всю рамку, как на экране (.enter .hero .arrival > canvas): иначе в кадр взлёта
   он сжимался до 72 % и прыгал на 77 px, а на кнопке рос обратно. */
.entry-pocket .arrival > canvas { inset: 0; width: 100%; height: 100%; }
/* Линза: крупный сайт ещё на экране, а чат уже в размере человека. rem у страницы один, поэтому в чате с .lens
   всё, что в rem, умножено на --z — долю размера чата от размера сайта (entry.js): размеры букв (те же, что в :root)
   и ширины. Пиксели не трогаются. Мирон приземлился — .lens снимается, и в тот же кадр на <html> встаёт
   data-chat: вёрстка та же до пикселя. Новое rem в чате — строка и сюда. */
.entry-chat.lens { --fs-2xs: calc(.6875rem * var(--z)); --fs-xs: calc(.78rem * var(--z)); --fs-sm: calc(.875rem * var(--z)); --fs-md: calc(1rem * var(--z)); --fs-lg: calc(1.25rem * var(--z)); --fs-read: calc(1.125rem * var(--z));
  --fs-h3: calc(1.375rem * var(--z)); --fs-h2: calc(1.875rem * var(--z)); --fs-h1: calc(2.75rem * var(--z)); --fs-stat: calc(2.125rem * var(--z)); --fs-num: calc(3.5rem * var(--z)); }
.entry-chat.lens .chat.full { max-width: calc(46rem * var(--z)); }
.entry-chat.lens .composer > .entry-perch { --miron-size: calc(5.5rem * var(--z)); }
/* Насест гостя (entry.js, guest): стоит в низу чата над кнопкой голосового чата и занимает место, лента
   отодвигается. Низ насеста — верх кнопки: стойки Мирона (у него на холсте запас снизу) стоят на ней. С tuck всё ниже кнопки спрятано. Зазор низа чата
   между насестом и кнопкой кнопка забирает себе: насест высотой в ноль — низ чата той же высоты, что без насеста,
   поэтому насест встаёт и уходит без скачка ленты. */
.chat .composer > .entry-perch { --miron-size: 5.5rem; position: relative; width: var(--miron-size); height: calc(var(--miron-size) - 12px); pointer-events: none; }
.chat .composer > .entry-perch ~ .island { margin-top: -10px; }
.entry-perch.tuck { overflow: hidden; }   /* не hid: так зовётся скрытый текст Молвы, он красит фон */
/* Нырок (entry.js, dive): всё ниже насеста срезано, выше и по бокам — нет, прыжок над кнопкой виден целиком. */
.entry-perch.dive { clip-path: inset(-100vh -100vw 0 -100vw); }
.island::before { transition: opacity var(--t-slow); }
.chat.hush .island::before { opacity: 0; }
/* Тень шва. Пока Мирон летит и говорит (hush), шов сцены и чата — одна мягкая тень, одинаковая вверх и вниз:
   над швом её несёт .entry-seam (entry.js кладёт его поверх сцены и двигает вместе с чатом), под швом —
   зеркало в шапке чата; плотная часть обычной тени шапки в это время спрятана. Мирон стал змейкой —
   остаётся обычная тень шапки. Высота — как у тени низа сцены, в размере чата (--z). Залита фоном страницы --page
   размером с окно; пока шов и чат едут, entry.js сдвигает заливку навстречу (background-position), и под тенью
   тот же фон, что вокруг, плашки нет. fixed здесь не годится: внутри сдвинутого чата он едет вместе с чатом. На нет сходит маской. */
.entry-seam { position: fixed; left: 0; right: 0; top: 0; z-index: 3; height: calc(7rem * var(--z, 1)); margin-top: calc(-7rem * var(--z, 1)); pointer-events: none;
  background: var(--page); background-size: 100vw 100vh; background-repeat: no-repeat;
  -webkit-mask: linear-gradient(to top, #000 22%, rgba(0,0,0,.72) 50%, rgba(0,0,0,.3) 78%, transparent); mask: linear-gradient(to top, #000 22%, rgba(0,0,0,.72) 50%, rgba(0,0,0,.3) 78%, transparent); }
.entry-chat .chat-head::before { transition: opacity var(--t-slow); }
.entry-chat .chat.hush .chat-head::before { opacity: 0; }
.entry-chat .chat-head::after { content: ''; position: absolute; z-index: -1; left: calc(50% - 50vw); right: calc(50% - 50vw); top: 0; height: calc(7rem * var(--z, 1)); pointer-events: none; opacity: 0; transition: opacity var(--t-slow);
  background: var(--page); background-size: 100vw 100vh; background-repeat: no-repeat;
  -webkit-mask: linear-gradient(to bottom, #000 22%, rgba(0,0,0,.72) 50%, rgba(0,0,0,.3) 78%, transparent); mask: linear-gradient(to bottom, #000 22%, rgba(0,0,0,.72) 50%, rgba(0,0,0,.3) 78%, transparent); }
.entry-chat .chat.hush .chat-head::after { opacity: 1; }
/* Поле почты вместо поля разговора (chat.js, mail; вход — mail-door.js): то же поле чата с той же кнопкой отправки,
   только без острова голосового чата. */
.chat.mail .island { display: none; }
/* Панель вместо поля (chat.js, bar): выбраны сообщения — на месте поля «Скопировать» и «Удалить». Форма поля,
   место поля; само поле под ней спрятано (benched). */
.chat .composer > .input.benched { visibility: hidden; pointer-events: none; }
/* Облачко экскурсии (excursion.js): сверху имя раздела, волна голоса Мирона, полоска хода по разделам, голос и крестик;
   ниже слова, под ними справа «Дальше». Место ставит экскурсия:
   рядом с тем, о чём речь; лежит в <body> над пеленой меню сообщения (.pop — 31). Поле, пока экскурсия его убрала
   (chat.js, bench), прячется, кнопка голосового чата над ним гаснет. */
.field-panel { position: fixed; z-index: 32; box-sizing: border-box; display: flow-root;
  padding: 14px 18px 16px 20px; background: var(--card); border-radius: var(--r-lg); box-shadow: 0 18px 50px rgba(0, 0, 0, .16), var(--shadow), 0 0 26px var(--halo);
  color: var(--text); font-size: var(--fs-md); line-height: 1.45; text-wrap: pretty; }
.field-panel > p { margin: 0; min-height: 2.9em; }   /* две строки: субтитры сменяются, облачко не прыгает */
.field-panel > p > span { display: inline-block; }
.ex-top { display: flex; align-items: center; gap: 10px; min-height: 36px; margin: 0 -8px 8px 0; }
.ex-ch { display: grid; flex: none; color: var(--accent-ink); font-size: var(--fs-sm); font-weight: 600; letter-spacing: .02em; }
.ex-ch > span { grid-area: 1 / 1; white-space: nowrap; }
/* Волна голоса: Мирон говорит (talking) — бежит в полный рост; замолчал — плавно опадает и бледнеет; голос выключен — тает. */
.ex-wave { flex: none; transition: opacity var(--t-slow) var(--ease), transform var(--t-slow) var(--ease); }
.ex-wave i { height: 12px; }
.field-panel:not(.talking) .ex-wave { opacity: .35; transform: scaleY(.45); }
.field-panel.quiet .ex-wave { opacity: 0; transform: scaleY(.2); }
html[data-menu] .field-panel .ex-wave i { animation-play-state: running; }   /* облачко над пеленой меню: его волна идёт */
.ex-bar { flex: 1; display: flex; gap: 4px; min-width: 0; }
.ex-bar i { position: relative; flex: 1; height: 4px; border-radius: 2px; overflow: hidden; background: var(--field); }
.ex-bar i::after { content: ''; position: absolute; inset: 0; border-radius: inherit; background: var(--accent); transform: scaleX(var(--k, 0)); transform-origin: 0 50%; transition: transform var(--t-slow) var(--ease); }
.ex-top > button { flex: none; display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--text-2); cursor: pointer; transition: background var(--t-fast), color var(--t-fast); }
.ex-top > button + button { margin-left: -8px; }
@media (hover: hover) { .ex-top > button:hover { background: var(--field); color: var(--text); } }
.ex-top svg { width: 20px; height: 20px; }
/* Пока идёт экскурсия, ленту листает только она. */
html[data-excursion] .chat .feed { overscroll-behavior: none; }
.field-panel > .btn { display: flex; width: max-content; min-height: 44px; margin: 14px 0 0 auto; padding: 8px 22px; }
.field-panel > .btn[hidden] { display: none; }
/* То, о чём говорит экскурсия, — пункт меню сообщения: загорается подложкой акцента. */
.pop-items button.ex-lit, .pop-items .pop-row.ex-lit { background: var(--accent-soft); }
html[data-excursion] .pop-items :is(button, .pop-row) { transition: background-color var(--t-slow) var(--ease); }   /* подложка пункта загорается и гаснет плавно */
.pop-items .pop-row.ex-lit { border-radius: 10px; }
/* Змейка экскурсии (excursion.js, snake): своя рамка поверх вещи на один пробег отблеска, без тёплого пятна. */
.ex-ring, .ex-ring.a-glint:not(.live) { position: absolute; inset: 0; border-radius: inherit; pointer-events: none; }
.ex-ring.a-glint::after { content: none; }
/* Куда нажать, чтобы закрыть меню (excursion.js, tap): кружок-палец на пустом месте раз в полторы секунды нажимает —
   сжимается, от него расходится кольцо и тает. Нажатие он не ловит. */
/* Звёздочка избранного, которую экскурсия выводит из кнопки поиска (excursion.js, star). */
.ex-star { position: fixed; z-index: 32; display: grid; place-items: center; width: 22px; height: 22px; margin: -11px 0 0 -11px; border-radius: 50%;
  background: var(--card); box-shadow: var(--shadow); color: var(--accent-ink); pointer-events: none; }
.ex-star > svg { width: 14px; height: 14px; }
.ex-tap { position: fixed; z-index: 32; width: 44px; height: 44px; margin: -22px 0 0 -22px; border-radius: 50%; pointer-events: none;
  background: color-mix(in srgb, var(--accent) 35%, transparent); animation: tap-press 1.5s ease-in-out infinite; }
.ex-tap::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--accent); opacity: 0; animation: tap-ring 1.5s ease-out infinite; }
.ex-tap.still, .ex-tap.still::after { animation: none; }
@keyframes tap-press { 0%, 30%, 100% { transform: scale(1); } 12% { transform: scale(.8); } }
@keyframes tap-ring { 0%, 12% { opacity: 0; transform: scale(.8); } 16% { opacity: .8; transform: scale(1); } 70%, 100% { opacity: 0; transform: scale(2.4); } }
.chat .composer.paneled > .island { opacity: 0; pointer-events: none; transition: opacity var(--t) var(--ease); }
.chat .composer > .field-bar { position: absolute; display: flex; align-items: center; justify-content: space-between; gap: var(--s-2); padding: 0 6px;
  background: var(--card); border-radius: 24px; box-shadow: var(--shadow); }
.field-bar > button { display: inline-flex; align-items: center; gap: var(--s-2); min-height: 38px; padding: 0 var(--s-3); border: 0; border-radius: var(--r-pill);
  background: none; color: var(--accent-ink); font: 500 var(--fs-sm)/1 var(--font); cursor: pointer; touch-action: manipulation; transition: opacity var(--t-fast); }
.field-bar > button > svg { width: 1.25em; height: 1.25em; }
.field-bar > button.danger { color: var(--red); }
.field-bar > button:disabled { opacity: .4; cursor: default; }
/* Плашка над полем (chat.js, plate): куда ушло письмо — тап возвращает почту в поле; ошибка — красная на время.
   Стоит над полем сама по себе, по середине: низ чата с ней не растёт. align-self — край для раздувания (bubble.js). */
.chat .composer > .plate, .door-spot > .plate { position: absolute; left: 0; right: 0; bottom: calc(100% + var(--s-1)); margin-inline: auto; width: fit-content; align-self: center;
  max-width: calc(100% - 32px); display: inline-flex; align-items: baseline; gap: var(--s-2); padding: var(--s-2) var(--s-4); border: 0; border-radius: var(--r-pill);
  background: var(--card); box-shadow: var(--shadow); color: var(--text-2); font: 400 var(--fs-sm)/1.35 var(--font); touch-action: manipulation;
  transition: background var(--t-tint), color var(--t-tint); }
.chat .composer > .plate[role="button"] { cursor: pointer; }
.chat .composer > .plate > span, .door-spot > .plate > span { text-align: center; text-wrap: balance; }   /* согласие в две строки */
.chat .composer > .plate b, .door-spot > .plate b { font-weight: 400; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.chat .composer > .plate .edit, .door-spot > .plate .edit { align-self: center; flex: none; display: grid; color: var(--accent-ink); }
.chat .composer > .plate .edit > svg, .door-spot > .plate .edit > svg { width: 1.1em; height: 1.1em; }
/* Галочка в плашке «Сохранено» (окно с текстом, diary-kit.js) — в строку со словом, цветом акцента. */
.chat .composer > .plate > svg { flex: none; align-self: center; width: 1.1em; height: 1.1em; color: var(--accent-ink); }
/* Сколько знаков ещё влезает в поле (chat.js, max): справа над кнопкой, мелко; меньше сотни — цветом акцента. */
.chat .composer > .left { position: absolute; right: 30px; bottom: calc(100% - 4px); font-size: var(--fs-xs); color: var(--muted); font-variant-numeric: tabular-nums; pointer-events: none; transition: opacity var(--t-fast); }
.chat .composer > .left.low { color: var(--accent-ink); }
.chat .composer:has(textarea.landing) > .left { opacity: 0; }   /* капля летит в кнопку — счётчик не под ней (chat.js, back) */
.chat .composer:has(> .plate) > .left { opacity: 0; }   /* над полем плашка — счётчик тает, а не лежит под её краем */
.chat .composer > .plate.wrong { background: color-mix(in srgb, var(--red) 14%, var(--card)); color: var(--red); }
/* «Вернуть» после удаления (chat.js, undoHtml): круг тает за 5 с, в нём секунды; «Вернуть» — цветом акцента. Стоит
   в плашке над полем чата и строкой на месте убранной карточки дневника (.undo-in, diary.js): карточка рассыпана
   песком и невидима, строка видна поверх её места. */
.undo-ring { align-self: center; position: relative; flex: none; display: grid; place-items: center; width: 1.7em; height: 1.7em; }
.undo-ring svg { position: absolute; inset: 0; width: 100%; height: 100%; rotate: -90deg; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-dasharray: 62.83; }
.chat .composer > .plate .undo-ring b, .undo-ring b { font-weight: 600; font-size: var(--fs-2xs); line-height: 1; color: var(--text); overflow: visible; }
.undo-back { font-weight: 600; color: var(--accent-ink); }
.undo-in { position: absolute; inset: 0; visibility: visible !important; display: flex; flex-wrap: wrap; align-content: center; align-items: center; justify-content: center; gap: 2px 10px; padding: 0 12px; border: 0; border-radius: inherit;
  background: none; color: var(--text-2); font: inherit; font-size: var(--fs-sm); cursor: pointer; animation: fade-new var(--t) var(--ease) both; }
.undo-in > span { white-space: nowrap; }
@media (prefers-reduced-motion: reduce) { .undo-in { animation: none; } }
.chat .input textarea.landing::placeholder { color: transparent; }   /* слова летят в поле: адрес почты, реплика на правку (chat.js) */
/* Тень за полем почты — дымка цвета --fog, как в чате, но выше: начинается у строки над полем и густеет к краю
   экрана, до конца не доходит — то, что под полем, едва видно и не сливается с ним. */
.chat.full.mail .composer::before { top: -3rem;
  background: linear-gradient(to bottom, transparent 0, color-mix(in srgb, var(--fog) 30%, transparent) 22%, color-mix(in srgb, var(--fog) 62%, transparent) 40%, color-mix(in srgb, var(--fog) 78%, transparent) 65%, color-mix(in srgb, var(--fog) 86%, transparent) 100%); }
/* Взято поле анкеты на странице (data-card-keys ставит страница) — поле почты с тенью и плашкой уезжает вниз,
   за клавиатуру, и возвращается, когда поле отпустили: два поля разом путают. */
.chat.mail .composer { transition: translate var(--t) var(--ease); }
.chat.mail[data-card-keys] .composer { translate: 0 calc(100% + 3rem); }
/* Поле почты поверх главной (screens/site.html): чат на весь экран, от которого видно только низ с полем. Шапки
   и ленты нет, всё мимо поля достаётся странице под ним. Размер — человека, как у чата (линза ниже). */
/* Статья и новость (articles/<адрес>/, news/<адрес>/, ../article-door.js). Лента статьи листается в своём слое, тело страницы стоит, как у чата:
   айфон, поднимая клавиатуру, страницу не подкручивает. Поле почты спрятано и лежит наготове (data-shut), в тексте стоит
   его копия .door-spot с той же плашкой. Вместо пола и кромки низа — одна тень --door-halo: она всегда при поле и при копии. */
.tape { position: fixed; inset: 0; z-index: 1; overflow: hidden auto; overscroll-behavior: contain; }
body:has(> .tape) { overflow: clip; min-height: 100dvh; }   /* палец не тащит страницу: при клавиатуре жест уходил в неё, и лента не листалась */
html:has(> body > .tape), body:has(> .tape) { overscroll-behavior: none; }
.tape > .page { padding-top: var(--s-2); padding-bottom: 6rem; }
.tape > .deck-top { position: relative; z-index: 1; padding-bottom: var(--s-2); }   /* шапка уезжает с текстом: на месте она легла бы на заголовок */
.tape > .deck-top::before { content: none; }
.deck-top a { pointer-events: auto; color: inherit; text-decoration: none; }
.door-spot, .entry-chat.door { --door-halo: 0 0 1.25rem .75rem var(--bg); }
.door-spot { grid-template-rows: calc(var(--fs-sm) * 1.35 + 2 * var(--s-2)) auto auto; display: grid; gap: var(--s-3); justify-items: center; font-size: var(--fs-read); margin-inline: calc((100% - var(--door-w, 100%)) / 2); }
.door-spot > .plate { position: relative; z-index: 1; left: auto; right: auto; bottom: auto; align-self: end; margin: 0 auto calc(6px + var(--s-1) - var(--s-3)); cursor: text; }
.door-spot > .input { width: 100%; box-sizing: border-box; border: 0; color: inherit; font: inherit; text-align: left; cursor: text; box-shadow: var(--shadow), var(--door-halo); }
.entry-chat.door .composer > .plate { z-index: 1; }
.entry-chat.door .chat.full .composer .input { box-shadow: var(--shadow), var(--door-halo); }
.entry-chat.door .chat.full .composer .input:focus-within { box-shadow: var(--shadow), var(--door-halo), 0 0 0 1.5px color-mix(in srgb, var(--accent) 75%, transparent); }
.door-spot > .input > span:first-child { flex: 1; min-width: 0; padding: 7px 0; line-height: 1.4; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.door-spot > .input[data-typed] > span:first-child { color: var(--text); }
.door-spot[data-lent] > .input, .door-spot[data-lent] > .plate { visibility: hidden; }
.door-what { font-size: var(--fs-sm); }
.stati-row { text-decoration: none; }   /* список статей: строка базы знаний, ссылкой */
.talk-row.stati-row p { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }   /* весь текст остаётся в странице, на экране две строки */
.entry-chat.bar[data-shut] .composer { opacity: 0; pointer-events: none; }
.entry-chat.bar[data-shut] .composer > * { pointer-events: none; }   /* спрятанное поле палец не ловит: под ним листается текст */
.entry-chat.bar { z-index: 3; pointer-events: none; }
.entry-chat.bar .chat.full { pointer-events: none; }
.entry-chat.bar .chat.full > .chat-head, .entry-chat.bar .chat.full > .feed { visibility: hidden; }
/* Под полем — та же тень, что за полем в чате человека: дымка цвета --fog (страница с долей акцента), сквозь неё
   видно и рисунок фона, и то, что уходит под поле (.chat.full.mail .composer::before). У самой кромки окна — тень низа
   чата (.chat.full::after); своя тень ленты у низа (.deck::after) при поле снята, иначе у кромки тень двойная. */
body:has(> .entry-chat.bar) .deck::after { content: none; }
/* Поле в гнезде первого экрана (рекламный лендинг, sputnik/24miron.ru/1.html): страница сдвигает поле к гнезду .mail-spot
   под словами (--fx, --fy), а тень остаётся у низа окна. Высоту гнезду ставит страница — высоту поля. */
.entry-chat.bar .chat.full.mail .composer::before { translate: calc(-1 * var(--fx, 0px)) calc(-1 * var(--fy, 0px)); }
.hero .mail-spot { margin-top: var(--s-2); pointer-events: none; }
.entry-chat.door .chat.full.mail .composer::before, .entry-chat.door .chat.full::after { content: none; }
.entry-chat.door .chat.full > * { animation: none; }   /* всплытие страницы показало бы спрятанное поле: анимация сильнее его прозрачности */
/* Низ окна занят полем: анкета, последний экран ленты, кончается над ним, выше тумана. --foot — высота низа чата
   с полем (site.html). */
.deck[data-foot] .screen.enter { padding-bottom: calc(var(--foot) + 2rem); }
/* Отзывы: оценка — строка под заголовком, отзыв пишется в карточке. */
.praise .reviews { text-align: left; }
/* Рамка карточки и кнопки «Прочитать все отзывы»: высоту ей ставит reviews.js — под 14 строк отзыва на узкой
   карточке и 8 на широкой. Карточка растёт и сжимается внутри, кнопка едет за ней, экран высоты не меняет. */
.praise .reviews-room { display: grid; gap: var(--s-4); align-content: start; margin-top: var(--s-3); }
/* Выгрузка: три способа сказать Мирону — три одинаковые карточки в ряд шириной с колонку; на телефоне — три строки.
   В значке каждой живая деталь: точки печати в облачке, столбики голоса, разговор — две речи по очереди.
   Карточки всплывают по одной, когда страница ставит списку .is-seen. */
.ways { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-4); }
.way { justify-items: center; align-content: start; gap: var(--s-3); padding: var(--s-5) var(--s-4); font-weight: 500; line-height: 1.3; text-align: center; text-wrap: balance; }
.ways > .way { opacity: 0; }
.ways.is-seen > .way { animation: rise var(--t-slow) var(--ease) both; }
.ways.is-seen > :nth-child(2) { animation-delay: .15s; } .ways.is-seen > :nth-child(3) { animation-delay: .3s; }
.way-ic { position: relative; flex: none; width: 3.5rem; height: 3.5rem; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-ink); }
.way-ic > svg { width: 1.6rem; height: 1.6rem; }
.way-ic.write > b { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 3px; padding-bottom: 1px; }
.way-ic.write i { width: 3.5px; height: 3.5px; border-radius: 50%; background: currentColor; animation: blink 1.2s ease-in-out infinite; }
.way-ic.write i:nth-child(2) { animation-delay: .2s; } .way-ic.write i:nth-child(3) { animation-delay: .4s; }
.way-ic.voice { display: flex; align-items: center; justify-content: center; gap: 3px; }
.way-ic.voice i { width: 3px; height: 1.3rem; border-radius: 2px; background: currentColor; animation: bars .9s ease-in-out infinite; }
.way-ic.voice i:nth-child(2) { animation-delay: .15s; } .way-ic.voice i:nth-child(3) { animation-delay: .3s; } .way-ic.voice i:nth-child(4) { animation-delay: .45s; } .way-ic.voice i:nth-child(5) { animation-delay: .6s; }
/* Разговор: слева три столбика — твой голос, справа три — голос Мирона, говорите по очереди. */
.way-ic.talk { display: flex; align-items: center; justify-content: center; gap: 2.5px; }
.way-ic.talk i { width: 3px; height: 1.2rem; border-radius: 2px; background: currentColor; transform: scaleY(.25); animation: turn 2.4s ease-in-out infinite; }
.way-ic.talk b { width: 4px; }
.way-ic.talk i:nth-child(2) { animation-delay: .12s; } .way-ic.talk i:nth-child(3) { animation-delay: .24s; }
.way-ic.talk b ~ i { color: var(--text-2); animation-delay: 1.2s; }
.way-ic.talk b ~ i:nth-child(6) { animation-delay: 1.32s; } .way-ic.talk b ~ i:nth-child(7) { animation-delay: 1.44s; }
@media (max-width: 800px) {
  .slide h2 { font-size: calc(var(--fs-h1) * .8); }
  .slide .over { font-size: calc(var(--fs-h1) * .5); }
  .slide .lead, .hero .lead { font-size: calc(var(--fs-md) * 1.06); }
  .deck .screen.slide { padding-top: max(4.5rem, 12svh); }
  .sheet .fields { grid-template-columns: minmax(0, 1fr) 5.5rem; }   /* имя и возраст в ряд, пол своей строкой во всю ширину */
  .sheet .field.sex { grid-column: 1 / -1; }
  .ways { grid-template-columns: minmax(0, 1fr); gap: var(--s-3); width: 100%; }
  .way { grid-template-columns: auto minmax(0, 1fr); align-items: center; justify-items: start; gap: var(--s-4); text-align: left; padding: var(--s-3) var(--s-4); }
  .way-ic { width: 3rem; height: 3rem; }
  .hero { grid-template-columns: 1fr; gap: var(--s-4); text-align: center; justify-items: center; }
  .hero > .stack { display: contents; }   /* на телефоне столбик: заголовок, текст, кнопки, Мирон под всем */
  /* На телефоне столбик: Мирон, заголовок, текст, кнопки, под ними пустое место way, куда он перелетает
     (miron/fly.js). Слова выше Мирона по слою: в перелёте он проходит под ними. */
  .hero .side { order: 0; --miron-size: 8rem; position: relative; z-index: 0; }
  .hero h1, .hero h2 { font-size: calc(var(--fs-h1) * .8); }   /* как заголовок слайда на телефоне */
  .hero h1 { order: 1; } .hero .lead { order: 2; } .hero .form, .hero .mail-spot { order: 3; } .hero .mail-spot { width: 100%; }
  .hero h1, .hero .lead, .hero .form { position: relative; z-index: 1; }
  .hero .way { display: block; order: 4; width: 100%; height: 7rem; margin-top: .5rem; }
  .hero .form.card { grid-template-columns: 1fr; } .hero .form.card .glow { display: flex; } .hero .form.card .glow > .btn { flex: 1; }   /* на телефоне «Войти» под почтой во всю ширину */
  /* На телефоне первый экран плотнее: место под шапку сверху, меньше воздуха снизу, Мирон шире места, холст выходит за него. */
  .deck .screen.wide { padding: max(4rem, env(safe-area-inset-top)) var(--s-5) max(1.5rem, env(safe-area-inset-bottom)); }
  .deck .screen.wide > .hero { width: min(100%, 30rem); gap: .75rem; }
  .hero .side { width: 100%; margin-block: 0 .25rem; }
  .hero .arrival { width: 50%; }   /* Мирон на телефоне поменьше */
  .hero .arrival > canvas { inset: -22%; width: 144%; height: 144%; pointer-events: none; }
  .hero .card, .hero .form { width: 100%; max-width: none; margin-top: .5rem; }
  .hero .card { text-align: left; }   /* текст в карточке по левому краю, как на слайдах */
  .hero .lead { line-height: 1.5; }
  /* Анкета на телефоне: заголовок, слова, Мирон, поля. */
  .enter .hero h2 { order: 1; } .enter .hero .lead { order: 2; } .enter .hero .side { order: 3; --miron-size: 14rem; width: 100%; } .enter .hero .card { order: 4; }
}
/* Подложка акцента до краёв карточки: её поля 18px там же, где у .card (до 600px). На узком телефоне цена в тарифах
   ложится строкой под словами, иначе слова ломаются в четыре строки. */
@media (max-width: 600px) { .terms > .free, .fares > .free, .steps > .free { margin-inline: -18px; padding-inline: 18px; } }
@media (max-width: 360px) { .fares > p > b { grid-column: 2; } }
/* Сам экран клики пропускает: экраны накладываются друг на друга, а жать надо на то, что видно. */
.deck .screen > * { pointer-events: auto; }
.deck .screen > canvas { pointer-events: none; }
canvas.fly-ink { position: fixed; inset: 0; width: 100%; height: 100%; height: 100lvh; max-width: none; margin: 0; z-index: 0; pointer-events: none; }   /* капли Мирона (miron/fly.js) */
.miron-face canvas.fly-source { opacity: 0; }   /* рисунок с прорехами — на копии в той же рамке */
.arrival.fly-away, .arrival.fly-away canvas, .arrival[data-gathering], .arrival[data-gathering] canvas { pointer-events: none; }   /* Мирон в перелёте (miron/fly.js) и несобранный (arrival.js) не ловит мышь: под ним выделяется текст */
.miron-face canvas.fly-body { pointer-events: none; }   /* копия рисунка в полёте (miron/fly.js), капли — на общем холсте fly-ink */
@media (prefers-reduced-motion: reduce) {
  .deck { position: static; height: auto !important; }
  .deck .screen { position: relative; min-height: 100dvh; transform: none !important; pointer-events: auto; }
  .deck-top b { transform: none !important; }
  canvas.trail-ink { display: none; }
}

/* =====================================================================
   ГАЛАКТИКА
   Млечный Путь из светлячков (galaxy.js, Miron.galaxy): <div class="galaxy" data-galaxy aria-hidden="true"></div>.
   Элемент пустой и держит место под заголовком: светлячков галактики рисует дорога (trail.js) на своём холсте.
   Галактика круглая, рукава кончаются на краях элемента по ширине. Раскрытая, она выше элемента и рукавами заходит
   за заголовок; наклонённая, верхом стоит у верха элемента. Стоя на своём холсте (витрина и тем, кому система
   убавила движение), она наклонена и лежит в элементе 2 : 1 целиком; холст больше элемента: ореолам крайних огней
   есть куда светить. На живом слайде элемент ниже, 2 : 0,55 (galaxy.js, SPAN): наклонённая галактика низом рукавов
   лежит в зазоре до следующего экрана, и пустоты под ней меньше. Ширина на слайде — чуть больше половины окна.
   ===================================================================== */
.galaxy { position: relative; aspect-ratio: 2 / 1; }
.galaxy > canvas { position: absolute; z-index: -1; inset: -20%; width: 140%; height: 140%; pointer-events: none; }
.deck .screen > .galaxy { width: min(100%, 36rem, 56svh); margin-top: var(--s-3); }
@media (prefers-reduced-motion: no-preference) { .deck .screen > .galaxy { aspect-ratio: 2 / .55; } }

/* =====================================================================
   ОТЗЫВЫ
   Витрина одного отзыва (reviews.js, Miron.reviews): текст, под ним мордочка, имя, дата и кнопка «Другой
   отзыв». Разметка — <div class="card reviews"></div>, остальное строит скрипт. Отзывы не приехали —
   карточки нет. Высота сцены едет к новому отзыву плавно, без пружины. Ненаписанный отзыв стоит дымкой:
   слова на местах, бледные и размытые, тушью Мирона. Перо пишет — слово проступает из дымки и темнеет
   до цвета текста; под лентой обрывка слова проступают так же, пока она растворяется. «Другой отзыв» — старый
   гаснет целиком, одним слоем.
   Огни и ленты пером — на холсте .reviews-sky, он шире карточки на --sky-y сверху и снизу и на --sky-l,
   --sky-r по бокам (их ставит скрипт). Оценка приложения — число и пять звёзд, закрашенных на долю
   оценки: <div class="rating"><b>4,8</b><div><i class="stars" style="--v: 4.8"></i><span class="small">подпись</span></div></div>.
   ===================================================================== */
.reviews { position: relative; gap: var(--s-5); }
.reviews:empty { display: none; }
.reviews-stage { position: relative; transition: height var(--t-slow) var(--ease); }
.reviews-inner { position: relative; }
.reviews .reviews-text { margin: 0; font-size: var(--fs-md); line-height: 1.65; color: var(--text); overflow-wrap: anywhere; }
.reviews-text.is-leaving { position: absolute; top: 0; left: 0; right: 0; pointer-events: none; }
.reviews-text .word { display: inline-block; opacity: var(--haze, .16); filter: blur(5px); color: var(--miron-ink);
  transition: opacity var(--t-slow) var(--ease), filter var(--t-slow) var(--ease), transform var(--t-slow) var(--ease), color var(--t-slow) var(--ease) var(--t); }
.reviews-text.is-new .word { opacity: 0; }
.reviews-text .word.is-written { opacity: 1; filter: none; color: var(--text); transform: none; }
/* Смена отзыва: старый гаснет целиком, одним слоем, и чуть поднимается; слова при этом не двигаются и не размываются
   (по слову с размытием смена стоила вшестеро больше отрисовок). */
.reviews-text.is-leaving { transition: opacity var(--t-slow) var(--ease), transform var(--t-slow) var(--ease); }
.reviews-text.is-leaving .word { transition: none; }
.reviews-text.is-fading { opacity: 0; transform: translateY(-.3em); }
/* Тема и цвет перекрашивают слова сразу (data-tinting, base.js): иначе каждое нажатие заводило переход цвета у всех ~40 слов. */
:root[data-tinting] .reviews-text .word { transition-property: opacity, filter, transform; }
/* Уровень качества 3 и ниже (base.js): слова проступают и тают без размытия — размытие каждого слова дорого телефону.
   Дымка тогда почти прозрачная (--haze): без размытия она читалась бы раньше, чем отзыв напечатан (reviews.js). */
html[data-quality="3"] .reviews-text .word, html[data-quality="4"] .reviews-text .word { filter: none; }
html[data-quality="3"] .reviews-text, html[data-quality="4"] .reviews-text { --haze: .05; }
.reviews-sky { position: absolute; left: calc(-1 * var(--sky-l, 0px)); top: calc(-1 * var(--sky-y, 0px));
  width: calc(100% + var(--sky-l, 0px) + var(--sky-r, 0px)); height: calc(100% + 2 * var(--sky-y, 0px));
  max-width: none; margin: 0; pointer-events: none; color: var(--accent); }   /* color — краска подсветки огней */
.reviews-foot { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); flex-wrap: wrap; }
.reviews-who { display: flex; align-items: center; gap: var(--s-3); opacity: 0; transition: opacity var(--t-slow) var(--ease); }
.reviews-who.is-in { opacity: 1; }
.reviews-face { width: 2.25rem; height: 2.25rem; flex: none; border-radius: 50%; display: grid; place-items: center; }
.reviews-face svg { width: 1.3rem; height: 1.3rem; }
.reviews-name { font-weight: 600; font-size: var(--fs-sm); }
.reviews-date { font-size: var(--fs-xs); color: var(--muted); }
.reviews-swap svg { width: 1.1em; height: 1.1em; transition: transform var(--t-slow) var(--ease); }   /* обороты стрелки скрипт растягивает на время смены */
.rating { display: flex; align-items: center; gap: var(--s-4); }
.rating > b { font-family: var(--font-heading); font-weight: 600; font-size: var(--fs-num); line-height: 1; font-variant-numeric: tabular-nums; }
.rating > div { display: grid; gap: var(--s-1); text-align: left; }
.stars { --v: 5; display: block; width: 7.5rem; height: 1.5rem;
  background: linear-gradient(90deg, var(--accent) calc(var(--v) / 5 * 100%), color-mix(in srgb, var(--text) 14%, transparent) 0);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m12 2.6 2.8 5.9 6.4.8-4.7 4.5 1.2 6.4L12 17.1l-5.7 3.1 1.2-6.4-4.7-4.5 6.4-.8Z'/%3E%3C/svg%3E") left center / 1.5rem 1.5rem repeat-x;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m12 2.6 2.8 5.9 6.4.8-4.7 4.5 1.2 6.4L12 17.1l-5.7 3.1 1.2-6.4-4.7-4.5 6.4-.8Z'/%3E%3C/svg%3E") left center / 1.5rem 1.5rem repeat-x; }
/* Страница всех отзывов (screens/reviews.html): лента карточек .card.review из Miron.reviews.card(отзыв).
   Карточка всплывает, когда до неё долистали (.is-in). Строка .review-open ведёт к отзыву в открытый чат. */
.review-list { display: grid; gap: var(--s-4); margin-top: var(--s-6); }
.review { opacity: 0; }
.review.is-in { animation: rise var(--t-slow) var(--ease) both; }
.review .review-text { color: var(--text); white-space: pre-wrap; overflow-wrap: anywhere; }
.review-likes { font-size: var(--fs-sm); color: var(--muted); }
.review-open { display: flex; align-items: center; gap: var(--s-3); color: var(--text); text-decoration: none; font-size: var(--fs-sm); font-weight: 500; transition: color var(--t-tint); }
.review-open:hover { color: var(--accent-ink); }
.review-open span { flex: 1; }
.review-open svg { width: 1.25rem; height: 1.25rem; flex: none; }
.review-open svg:first-child { color: var(--accent-ink); }
.review-open svg:last-child { opacity: .4; }
/* Крестик страницы, которую открыли поверх другой, стоит по сетке .page.narrow: у правого края колонки,
   напротив первой строки заголовка, и не уезжает при прокрутке. Заголовок оставляет ему место. */
.page-close { position: fixed; z-index: 5; top: calc(var(--s-5) + (var(--fs-h1) * 1.1 - var(--hit)) / 2); right: calc((100% - min(100%, 720px)) / 2 + var(--s-5)); }
.page-close ~ .page > h1:first-child { padding-right: calc(var(--hit) + var(--s-3)); }
@media (max-width: 600px) { .page-close { top: max(calc(var(--s-4) + (var(--fs-h1) * .78 * 1.1 - var(--hit)) / 2), env(safe-area-inset-top)); right: var(--s-4); } }
.page-close svg { width: 1.25rem; height: 1.25rem; }
/* Окно поверх страницы (Miron.overlay, base.js): та же колонка и крестик, что у отдельной страницы, но своя прокрутка,
   а страница под ним остаётся. Выезжает справа и уезжает вправо, как статья базы знаний. Пока окно стоит (data-covered),
   страницу под ним не рисуют и её анимации стоят; фон страницы виден сквозь окно. */
.overlay { position: fixed; inset: 0; z-index: 70; overflow-y: auto; overscroll-behavior: contain; }
html[data-covered] body > :not(.overlay, .file-sheet, .bg, .pinpad, .pop-veil, .pop, [data-fps-panel], [data-edge-guard]) { visibility: hidden; }   /* полоска у края (base.js, ownSwipe) — над окном тоже */
/* Под окном с чатом (sayWin) реплики чата страницы не раскладываются: тысячи пикселей ленты иначе пересчитывались бы
   при каждой мерке окна. Место прокрутки чат помнит сам и возвращает, когда окно закрыли (chat.js). Лента пропускается
   (content-visibility), а не вынимается (display: none): вынутая при возврате раскладывалась и рисовалась заново целиком,
   её CSS-анимации начинались сначала (рамка карточки файла загоралась снова), картинки декодировались заново —
   на айфоне кадр возврата шёл 230 мс, и чат под уезжающим окном моргал. */
html[data-covered]:has(.overlay > .say-win) body > :not(.overlay) .feed-in { content-visibility: hidden; }
html[data-covered] body > :not(.overlay, .file-sheet, .pinpad) *, html[data-covered] body > :not(.overlay, .file-sheet, .pinpad) *::before, html[data-covered] body > :not(.overlay, .file-sheet, .pinpad) *::after { animation-play-state: paused !important; }
/* Тени у верхнего и нижнего края окна, как на главной (.deck-top, .deck::after): цвета --fog, полные только у самой
   кромки и сразу сходят на нет. Стоят на отдельных страницах (main.page прямо в body), в окне поверх страницы и внизу
   чата на весь экран; над содержимым, под крестиком. */
body:has(> main.page)::before, body:has(> main.page)::after, .overlay::before, .overlay::after, .chat.full::after {
  content: ''; position: fixed; left: 0; right: 0; z-index: 4; pointer-events: none;
  background: linear-gradient(to bottom, var(--fog) 0, color-mix(in srgb, var(--fog) 50%, transparent) 25%, color-mix(in srgb, var(--fog) 20%, transparent) 55%, transparent 100%); }
body:has(> main.page)::before, .overlay::before { top: 0; height: 2.2rem; }
body:has(> main.page)::after, .overlay::after, .chat.full::after { bottom: 0; height: 3.5rem; transform: scaleY(-1); }
/* В чате тень низа под полем и кнопками: ложится на ленту, а не на поле. */
.chat.full::after { z-index: 2; }
/* Окно, в котором чат на весь экран (окно с текстом, sayWin): тени у краёв дают шапка и низ чата, под своими кнопками
   и полем; свои тени окна легли бы поверх поля и заголовка. */
.overlay:has(> .page > .chat.full)::before, .overlay:has(> .page > .chat.full)::after { content: none; }
/* Текст окна — размером разговора (--fs-read), пояснения под шагом на ступень меньше. */
.overlay .page { font-size: var(--fs-read); }
/* Окно из шагов (account.js, flow): слова и кнопки стоят по середине экрана, а не под верхним краем; высокий шаг
   начинается сверху и листается. */
.overlay .page:has(> .acc-win) { min-height: 100%; align-content: safe center; }
/* Замок с цифрами (lock.js): окно пин-кода на весь экран, всё по середине. Пока оно стоит (data-locked), страницу
   под ним не рисуют — виден только фон. Клавиша — круг-подложка; размер клавиш убавляется на низком и узком экране. */
html[data-locked] body > :not(.pinpad, .bg, [data-edge-guard]) { visibility: hidden; }
.pinpad { position: fixed; inset: 0; z-index: 90; overflow-y: auto; overscroll-behavior: contain; display: grid; align-content: safe center; justify-items: center;
  padding: max(var(--s-5), env(safe-area-inset-top)) var(--s-5) max(var(--s-5), env(safe-area-inset-bottom)); -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent; }
.pinpad-box { --key: min(4.75rem, 21vw, 10.5dvh); width: min(100%, 23rem); display: grid; justify-items: center; gap: var(--s-4); text-align: center; font-size: var(--fs-read); }
.pinpad-box > h1 { font-size: var(--fs-h2); }
.pinpad-box > p { color: var(--text-2); text-wrap: pretty; }
.pinpad-box > .note { max-width: none; min-height: 1.5em; font-size: var(--fs-md); }
.pinpad-box.read { justify-items: stretch; text-align: left; }   /* шаг со словами (сброс): читается, как окно шага в Аккаунте */
.pinpad-box > .btn { margin-top: var(--s-2); }
.pinpad-dots { display: flex; gap: 1.1rem; padding-top: var(--s-2); }
.pinpad-dots i { width: 1rem; height: 1rem; border-radius: 50%; background: color-mix(in oklab, var(--text) 16%, transparent); transition: background var(--t-tint), transform var(--t-fast) var(--ease); }
.pinpad-dots i.on { background: var(--accent); transform: scale(1.15); }
.pinpad-dots.bad i { background: var(--red); }
.pinpad.busy .pinpad-dots i { animation: breathe 1s ease-in-out .2s infinite; }
.pinpad.busy .pinpad-dots i:nth-child(2) { animation-delay: .3s; } .pinpad.busy .pinpad-dots i:nth-child(3) { animation-delay: .4s; } .pinpad.busy .pinpad-dots i:nth-child(4) { animation-delay: .5s; } .pinpad.busy .pinpad-dots i:nth-child(5) { animation-delay: .6s; } .pinpad.busy .pinpad-dots i:nth-child(6) { animation-delay: .7s; }
.pinpad-keys { display: grid; grid-template-columns: repeat(3, var(--key)); gap: calc(var(--key) * .22) calc(var(--key) * .36); }
.pinpad-key { width: var(--key); height: var(--key); border: 0; border-radius: 50%; padding: 0; display: grid; place-items: center; cursor: pointer; touch-action: manipulation;
  background: var(--card); box-shadow: var(--shadow); color: var(--text); font: inherit; font-size: calc(var(--key) * .42); font-weight: 500; font-variant-numeric: tabular-nums; line-height: 1;
  transition: transform var(--t-fast) var(--ease), background var(--t-tint); }
.pinpad-key:active { transform: scale(.92); background: var(--accent-soft); }
.pinpad-key.quiet { background: none; box-shadow: none; color: var(--text-2); }
.pinpad-key svg { width: 54%; height: 54%; }
.pinpad-more { display: grid; justify-items: center; align-content: start; gap: var(--s-3); min-height: calc(3em + var(--s-3)); margin-top: var(--s-2); font-size: var(--fs-md); }
.overlay .steps > li > span { font-size: var(--fs-md); }
/* Файл окном поверх чата (file-sheet.js): страницы файлов загружены заранее и свёрстаны невидимо, видна та, что открыта;
   крестик проявляется, когда окно уже встало. Летящая обложка — над окном, с тем же затемнением, что у карточки файла. */
.file-sheet { position: fixed; inset: 0; z-index: 70; background: var(--bg); visibility: hidden; opacity: 0; }
.file-sheet.on { visibility: visible; opacity: 1; }
.file-sheet iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; visibility: hidden; opacity: 0; transition: opacity var(--t) var(--ease); }
.file-sheet.on iframe.now { visibility: visible; } .file-sheet iframe.now.ready { opacity: 1; }
.file-sheet .page-close { opacity: 0; transition: opacity var(--t) var(--t); } .file-sheet.on .page-close { opacity: 1; }
.file-fly { position: fixed; z-index: 72; display: none; overflow: hidden; pointer-events: none; will-change: transform; }
.file-fly img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.file-fly i { position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 64px 14px rgba(0,0,0,.5), inset 0 -110px 80px -50px rgba(0,0,0,.55); }
.file-fly b { position: absolute; left: 0; right: 0; bottom: 0; height: 60%; background: var(--cap-shade); }
/* Шаги внутри спойлера: простой нумерованный список, что сделать и строка пояснения под ним. */
.help-steps { margin: var(--s-3) 0 0; padding-left: 1.3em; display: grid; gap: var(--s-3); }
.help-steps b { font-weight: 500; color: var(--text); }
.help-steps span { display: block; font-size: var(--fs-md); }
@media (prefers-reduced-motion: reduce) {
  .reviews-stage, .reviews-swap svg { transition: none; }
  .reviews-who { opacity: 1; transition: none; }
  .reviews-text .word { transition: none; }
}

/* =====================================================================
   ЗАГРУЗКА
   Пока данных нет, их место держит примитив той же формы и того же размера: строка, заголовок,
   карточка, реплика, кнопка. Примитив тихо переливается. Настоящий элемент встаёт на его место,
   а примитив тает над ним (parts.js, у hollow). Класс .skel можно повесить и на готовый элемент: тогда всё внутри прячется.
   ===================================================================== */
.skel { position: relative; overflow: hidden; border-radius: var(--r-md); background: color-mix(in oklab, var(--text) 6%, var(--card)); box-shadow: none; color: transparent !important; pointer-events: none; user-select: none; }
.skel > * { visibility: hidden; }
.skel::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(100deg, transparent 30%, color-mix(in srgb, var(--text) 5%, transparent) 50%, transparent 70%); animation: shimmer 1.8s ease-in-out infinite; }
.skel.line { height: .85em; border-radius: var(--r-pill); } .skel.line.short { width: 58%; } .skel.line.tiny { width: 32%; }
.skel.title { height: 1.3em; width: 62%; border-radius: var(--r-pill); }
.skel.block { min-height: 10rem; border-radius: var(--r-lg); }
.skel.round { width: 2.5rem; height: 2.5rem; border-radius: 50%; }
.skel.btn { height: 44px; width: 11rem; border-radius: var(--r-pill); }
.skel:is(.way-ic, .dia-dot) { border-radius: 50%; }   /* кружок значка, аватара и события и тушкой остаётся кружком */
.skel::before { visibility: hidden; }   /* точка метки и прочее нарисованное на вещи прячется вместе со словами */
.skels { display: grid; gap: var(--s-3); }
/* Тушка внутри вещи (.hollow). Вещь стоит в своём настоящем виде — реплика своим цветом и на своей стороне, карточка
   с тенью, кружок значка, полоса остатка, — а на местах слов переливаются строки .skel.line ростом в строку своего
   места (1lh). Тушка — разметка самой вещи, где слова заменены строками, поэтому у неё тот же размер, что у вещи с тем
   же числом строк: вещь встаёт на её место без сдвига. Готовые куски — Miron.hollow (parts.js), образцы — раздел
   «Загрузка» витрины. Строки берут цвет слов вещи (--ink): на реплике человека — цвет её слов. Слово на метке или
   кнопке прячет .skel на ней самой: метка остаётся своего размера. */
.hollow { pointer-events: none; -webkit-user-select: none; user-select: none; white-space: normal; }
.hollow .skel { background: color-mix(in oklab, var(--ink, var(--text)) 8%, transparent); }
.hollow .skel::after { background: linear-gradient(100deg, transparent 30%, color-mix(in srgb, var(--ink, var(--text)) 7%, transparent) 50%, transparent 70%); }
.hollow .skel.line { display: block; margin-block: .4em; margin-block: calc((1lh - .85em) / 2); }
.hollow .skel.line + .skel.line { margin-top: .8em; margin-top: calc(1lh - .85em); }   /* поля соседних строк сливаются: без этого абзац тушкой ниже абзаца слов */
.skel.line.long { width: 86%; } .skel.line.half { width: 45%; }
.hollow .pay-what { flex: 1; }   /* строки плитки тарифа берут ширину от неё, а не от слов */
.hollow .pay-price .btn.skel { width: auto; height: auto; }   /* цена тушкой — ростом настоящей кнопки цены */
.hollow .dia-ctop small .skel { width: 4.5rem; }   /* срок карточки цифр тушкой — своей шириной */
.bk-count.hollow > span { flex: 1; }   /* счёт глав тушкой — строка от ширины страницы */
.file-card.hollow .skel { background: rgba(255, 255, 255, .16); }   /* на тёмной обложке файла строки светлые, как его слова */
.hollow .acc-use .acc-line > span:first-child { flex: 1; } .hollow .acc-use .acc-line > span:last-child { width: 4.5rem; }   /* остаток: имя от ширины полосы, «сколько из скольких» своей */
.msg.hollow { width: 88%; }
.msg.me.hollow { --ink: var(--on-bubble); width: 64%; }
.hollow .post-foot time .skel { width: 2.6rem; }   /* время поста тушкой — шириной «12:40» */
.divider.hollow .skel { width: 4rem; }   /* полоса даты тушкой — шириной «Сегодня» */
.divider.hollow .skel.fit { width: auto; }   /* …или шириной своего дня: слова спрятаны в строке (molva.js, wait) */
.talk-row.hollow:disabled > :is(.way-ic, b) { opacity: 1; }   /* строка чата тушкой — в настоящем виде, не бледная */
.talk-row.hollow b svg { visibility: hidden; }   /* колокольчика нет, пока сервер не сказал, включён ли он */
.mrow.hollow { width: 80%; } .mrow.hollow.me { width: 55%; }   /* сообщение Молвы тушкой — шириной сообщения */
.mrow.hollow :is(.msg, .who) { align-self: stretch; }
.mrow.hollow .msg.me { --ink: var(--on-bubble); }
.find-row.hollow time .skel { width: 3rem; }   /* время находки тушкой — шириной «12 ноя» */
.hollow .acc-mine .switch { visibility: hidden; }   /* выключатель карточки патрона ждёт своё положение */
.skels.msgs { display: flex; flex-direction: column; }   /* тушки реплик ленты: человек справа, как в ленте */
/* Тушка тает (parts.js, у hollow): копия ушедшей тушки в слое [data-melt] поверх страницы гаснет над готовой вещью.
   Предки копии — пустые рамки: их классы дают шрифт, цвет и переменные, а фона, полей и раскладки нет. */
[data-melt] { position: fixed !important; z-index: 2147483000; overflow: hidden !important; pointer-events: none !important; margin: 0 !important; padding: 0 !important; }
[data-melt-up] { display: block !important; position: static !important; margin: 0 !important; padding: 0 !important; border: 0 !important; background: none !important; box-shadow: none !important; outline: 0 !important;
  transform: none !important; translate: none !important; scale: none !important; rotate: none !important; filter: none !important; backdrop-filter: none !important; -webkit-backdrop-filter: none !important;
  opacity: 1 !important; visibility: visible !important; overflow: visible !important; clip-path: none !important; -webkit-mask: none !important; mask: none !important; contain: none !important;
  animation: none !important; transition: none !important; min-width: 0 !important; max-width: none !important; min-height: 0 !important; max-height: none !important; }
[data-melt-up]::before, [data-melt-up]::after { content: none !important; display: none !important; }
:is([data-melt-it], [data-melt-it] *) { animation: none !important; transition: none !important; }
@keyframes shimmer { from { transform: translateX(-100%); } to { transform: translateX(100%); } }

/* =====================================================================
   ХОД ЗАДАЧИ
   Пройденный шаг — галочка, текущий — бегущие столбики, будущий — точка, упавший — крестик.
   ===================================================================== */
.task li { display: grid; grid-template-columns: 34px 1fr; gap: 10px; align-items: start; color: var(--muted); transition: color var(--t); }
.task li.done { color: var(--text-2); }
.task li.now { color: var(--text); }
.task li.fail { color: var(--red); }
.task .ic { width: 34px; height: 1.5em; display: flex; align-items: center; color: var(--accent-ink); }
.task li.done .ic::before { content: ''; width: 7px; height: 13px; margin: -4px 0 0 4px; border: solid currentColor; border-width: 0 2.2px 2.2px 0; transform: rotate(45deg); }
.task li.next .ic::before { content: ''; width: 6px; height: 6px; margin-left: 5px; border-radius: 50%; background: var(--hairline); }
.task li.fail .ic { color: var(--red); } .task li.fail .ic::before { content: '×'; margin-left: 3px; font-weight: 600; font-size: 1.2em; line-height: 1; }
.task .side { display: block; font-size: var(--fs-xs); color: var(--muted); font-variant-numeric: tabular-nums; }
.widget.task li, .widget.task li.done { color: var(--text); }
.widget.task li { grid-template-columns: 1.75rem 1fr; gap: 8px; }   /* шаги в карточке: значок шага уже */
.widget.task .ic { width: 1.75rem; }
.widget.task .ic .bars { gap: 2px; }
.widget.task .ic .bars i { height: 11px; width: 2px; }
.widget.task li.now { font-weight: 500; }
.widget.task li.fail { color: var(--red); }
/* Бегущие столбики: шесть <i> внутри .bars или внутри .ic текущего шага. Цвет берут у текста. */
.bars { display: inline-flex; align-items: center; gap: 2.5px; color: var(--accent-ink); }
.btn .bars, .msg.me .bars { color: inherit; }
.bars i { flex: none; width: 3px; height: 14px; border-radius: 2px; background: currentColor; animation: bars .9s ease-in-out infinite; }
.bars i:nth-child(2) { animation-delay: .1s; } .bars i:nth-child(3) { animation-delay: .2s; } .bars i:nth-child(4) { animation-delay: .3s; }
.bars i:nth-child(5) { animation-delay: .4s; } .bars i:nth-child(6) { animation-delay: .5s; }

/* =====================================================================
   ФАЙЛ В ЛЕНТЕ
   ===================================================================== */
/* Маленький лист со строчками. */
/* Просьба о фото: две кнопки в один ряд при обычном размере букв — у тихой «Без фото» узкие поля, подложки у неё нет. */
.file-art { width: 54px; height: 68px; border-radius: 8px; background: var(--field); position: relative; flex: none; box-shadow: var(--inset), 0 8px 20px rgba(0,0,0,.14); }
.file-art::before { content: ''; position: absolute; left: 11px; right: 11px; top: 14px; height: 4px; border-radius: 2px; background: var(--accent); box-shadow: 0 10px 0 -1px var(--muted), 0 20px 0 -1px var(--muted), 0 30px 0 -1px var(--muted); opacity: .9; }
/* Карточка файла: разворачивается из маленького листа, по кромке три круга бежит змейка и гаснет. Под подписью —
   затемнение снизу вверх, чтобы белые буквы читались на любой обложке. */
:root { --cap-shade: linear-gradient(to top, rgba(0,0,0,.72), rgba(0,0,0,.42) 40%, rgba(0,0,0,.12) 75%, transparent); }
.file-card { position: relative; border-radius: 20px; overflow: hidden; isolation: isolate; aspect-ratio: 16 / 10; box-shadow: var(--shadow); cursor: pointer; transform-origin: 28px 36px;
  background: radial-gradient(90% 70% at 12% 8%, color-mix(in srgb, var(--accent) 34%, var(--cover)) 0%, transparent 60%), radial-gradient(70% 60% at 92% 92%, color-mix(in srgb, var(--accent) 18%, var(--cover)) 0%, transparent 60%), var(--cover); }
.file-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.file-card::after { content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none; border-radius: inherit; box-shadow: inset 0 0 64px 14px rgba(0,0,0,.5), inset 0 -110px 80px -50px rgba(0,0,0,.55); }
.file-card .cap { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; padding: 80px 18px 16px; color: #fff; background: var(--cap-shade); display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 14px; }
.file-card .cap small { display: block; font-size: var(--fs-xs); opacity: .82; margin-bottom: 6px; }
.file-card .cap h3 { font-size: 1.125rem; text-shadow: 0 1px 10px rgba(0,0,0,.5); display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; overflow: hidden; }   /* заголовок карточки — фраза с обложки файла: длиннее трёх строк режется */
/* Без размытия фона под кнопкой: оно поднимало подпись в отдельный слой видеокарты, и в Яндекс.Браузере подпись целиком пропадала с карточки. */
.file-card .cap .open { border-radius: var(--r-pill); padding: 10px 18px; background: rgba(255,255,255,.22); font-size: var(--fs-sm); font-weight: 600; white-space: nowrap; }
.file-card .ring { position: absolute; inset: 0; border-radius: inherit; z-index: 3; pointer-events: none; overflow: hidden; padding: 2px; -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); mask-composite: exclude; animation: fadeout .9s ease-out 8.2s forwards; }
.file-card .ring::before { content: ''; position: absolute; left: 50%; top: 50%; width: 260%; aspect-ratio: 1; margin: -130% 0 0 -130%; background: conic-gradient(transparent 0 58%, var(--accent) 74%, transparent 88% 100%); animation: spin 2.6s linear 4; will-change: transform; }   /* четыре круга — 10,4 с: рамка гаснет к 9,1 с, дальше невидимое не крутится (запись с айфона: вечное вращение под карточкой файла, лента перерисовывалась на каждом шаге прокрутки) */
/* «Поделиться» в окне файла — слева от крестика (file-sheet.js); его меню встаёт над окном файла, а не под ним. */
.page-close.page-share { margin-right: calc(var(--hit) + var(--s-2)); }
body:has(.file-sheet.on) .pop-veil { z-index: 71; }
body:has(.file-sheet.on) .pop { z-index: 72; }
/* Меню своего сообщения в окне с текстом (diary-kit.js, sayWin) — тоже над окном. */
body:has(.overlay > .say-win) .pop-veil { z-index: 71; }
body:has(.overlay > .say-win) .pop { z-index: 72; }
/* Вкладка «Файлы» дневника (diary-files.js): карточки файлов как в чате, «Поделиться» в правом верхнем углу карточки,
   под ней тихая строка о ссылке; книга — карточка и разделы строками воспоминаний; разговоры главы — карточки. */
.dfi-file { display: grid; gap: var(--s-3); }
.dfi-file + .dfi-file { margin-top: var(--s-4); }
.dfi-file .file-card .cap { padding-right: 18px; }
.dfi-share.icon-btn { position: absolute; top: 12px; right: 12px; z-index: 4; color: #fff; background: rgba(0,0,0,.28); box-shadow: none; backdrop-filter: blur(6px); }
.dfi-share svg { width: 1.2rem; height: 1.2rem; }
.dfi-note { display: flex; align-items: center; gap: 8px; padding: 0 6px; }
.dfi-note svg { width: 1rem; height: 1rem; flex: none; }
.dfi-file > .dia-wait { padding: 0 6px; color: var(--muted); }

/* ---------- «Моя книга» (book.js): страница книги поверх кабинета ---------- */
.bk-sheet { position: fixed; inset: 0; z-index: 69; overflow-y: auto;   /* ниже .file-sheet: письмо о практикуме открывается поверх книги */ overscroll-behavior: contain; background: var(--bg); scrollbar-width: none; }
.bk-sheet::-webkit-scrollbar { display: none; }
.bk-sheet[hidden] { display: none; }
.bk-page { position: relative; width: min(100%, 46rem); margin: 0 auto; padding: calc(var(--s-4) + env(safe-area-inset-top)) 20px var(--s-7); }   /* колонка кабинета (.chat.full, .cab-pane) */
.bk-flow { display: grid; gap: var(--s-3); }
.bk-flow > * { min-width: 0; }
.bk-top { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: var(--s-3); }
.bk-top h1 { font-size: var(--fs-h3); line-height: 1.25; text-wrap: balance; }
.bk-top .btn { white-space: nowrap; }
.bk-read svg { width: 1.2rem; height: 1.2rem; }
.bk-head { font-size: var(--fs-h3); padding: var(--s-3) 6px 0; }
.bk-note { padding: 0 6px; color: var(--text); line-height: 1.5; }
.bk-count { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px var(--s-3); padding: 0 6px; color: var(--text); font-size: var(--fs-sm); }
.bk-flow .spoiler.title > summary { line-height: 1.3; }
.bk-flow .spoiler .in { display: grid; gap: var(--s-3); padding: 0 18px 18px; color: var(--text); line-height: 1.5; }
.bk-flow .spoiler .in p { margin: 0; }
.bk-flow .spoiler .dots { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-2); }
.bk-flow .spoiler .dots li { color: var(--text); }
.bk-flow .spoiler .side { color: var(--text); font-size: var(--fs-xs); flex: none; }
.bk-flow .spoiler .side svg { width: 1.1rem; height: 1.1rem; display: block; color: var(--accent-ink); }
/* Кусок книги: карандаш и стрелки в правом верхнем углу, текст их обтекает. */
.bk { display: block; position: relative; padding: 14px 16px 16px 18px; transition: background var(--t), box-shadow var(--t); }
.bk-moves { float: right; display: flex; gap: 2px; margin: -6px -8px 2px 10px; transition: opacity var(--t); }
.bk-moves .icon-btn { width: 36px; height: 36px; font-size: var(--fs-md); background: var(--field); position: relative; }
.bk-moves .icon-btn::after { content: ''; position: absolute; inset: -4px -1px; }   /* место нажатия не меньше --hit */
.bk-moves .icon-btn[aria-disabled="true"] { opacity: .35; pointer-events: none; }
.bk-moves [data-edit] { margin-right: 6px; }
.bk-body h3 { font-family: var(--font-heading); font-size: var(--fs-h3); line-height: 1.3; font-weight: 600; }
.bk-body p { margin: 0; color: var(--text); font-size: var(--fs-read); line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.bk[data-type="quote"] { background: var(--field); box-shadow: var(--inset); }
.bk[data-type="quote"] .bk-body p { font-family: var(--font-heading); font-style: italic; }
.bk[data-type="picture"] { padding: 10px; }
.bk[data-type="picture"] .bk-moves { position: absolute; float: none; top: 16px; right: 18px; margin: 0; z-index: 1; }
.bk[data-type="picture"] .bk-moves .icon-btn { background: var(--card); box-shadow: var(--shadow); }
.bk-pic { aspect-ratio: 16 / 10; border-radius: var(--r-md); overflow: hidden; position: relative; background: var(--field); }
.bk-pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bk-pic .skel { position: absolute; inset: 0; border-radius: 0; }
.bk-wait { padding-top: var(--s-2); text-align: center; color: var(--text); font-size: var(--fs-sm); }
.bk-empty { color: var(--text-2) !important; }
.bk.is-open { box-shadow: var(--shadow), 0 0 0 1.5px color-mix(in srgb, var(--accent) 75%, transparent); }
.bk.is-lift { z-index: 2; box-shadow: var(--shadow), 0 10px 34px color-mix(in srgb, var(--accent-glow) 50%, transparent); }
.bk[data-type="quote"].is-lift { box-shadow: var(--inset), 0 10px 34px color-mix(in srgb, var(--accent-glow) 50%, transparent); }   /* та же вдавленность: иначе тень гаснет не плавно, а скачком */
.bk.is-settle { z-index: 2; transition: background var(--t), box-shadow calc(var(--t) * 2); }   /* тень гаснет вдвое дольше, кусок до конца над соседями */
/* Чтение: шаблон файла рамкой поверх страницы, оглавление шторкой. */
.bk-view { position: fixed; inset: 0; z-index: 10; background: var(--bg); }
.bk-view iframe { width: 100%; height: 100%; border: 0; display: block; }
.bk-view > .icon-btn { position: absolute; top: calc(var(--s-3) + 11px + env(safe-area-inset-top));   /* одна линия с луной шаблона */ left: var(--s-3); z-index: 1; background: var(--card); box-shadow: var(--shadow); }
.bk-view > [data-toc-open] { left: calc(var(--s-3) + 3.25rem); }
.bk-fog { position: absolute; inset: 0; z-index: 2; background: color-mix(in srgb, var(--fog) 55%, transparent); }
.bk-toc { position: absolute; z-index: 3; left: 50%; bottom: 0; width: min(100%, 46rem); translate: -50% 0; max-height: 80%; overflow-y: auto; padding: var(--s-4) var(--s-3) calc(var(--s-4) + env(safe-area-inset-bottom)); display: grid; gap: var(--s-2); background: var(--card); border-radius: var(--r-lg) var(--r-lg) 0 0; box-shadow: var(--shadow); }
.bk-toc h3 { font-size: var(--fs-h3); padding: 0 6px var(--s-1); }
.bk-toc .talk-row.acc-row.dia-row { display: flex; align-items: center; gap: var(--s-4); text-align: left; }
.bk-toc [aria-current="true"] { box-shadow: var(--shadow), 0 0 0 1.5px color-mix(in srgb, var(--accent) 75%, transparent); }
.bk-view > .bk-undo, .bk-float { position: absolute; z-index: 1; left: 50%; bottom: calc(var(--s-4) + env(safe-area-inset-bottom)); translate: -50% 0; white-space: nowrap; }
.bk-float { position: fixed; z-index: 11; }
.bk-add { display: grid; gap: var(--s-2); }
.bk-kinds { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-2); }
.bk-kinds .btn { gap: 6px; }
.bk-kinds svg, .bk-add > .btn svg { width: 1.1rem; height: 1.1rem; }
/* Поле правки внизу экрана. */
.bk-bar { position: fixed; z-index: 5; left: 0; right: 0; bottom: 0; padding: var(--s-5) max(var(--s-3), calc(50% - 23rem + 20px)) calc(var(--s-3) + env(safe-area-inset-bottom));   /* пелена на всё окно, поле в колонке страницы */
  display: grid; gap: var(--s-2); background: linear-gradient(to top, var(--fog) calc(100% - var(--s-5)), transparent); }
.bk-tools { display: flex; align-items: center; gap: var(--s-2); }
.bk-tools .seg { flex: 1 1 auto; min-width: 0; }
.bk-tools .icon-btn { width: 40px; height: 40px; font-size: var(--fs-md); margin-left: auto; }
.bk-tools .icon-btn + .icon-btn { margin-left: 0; }
.bk-tools .small { flex: 1; color: var(--text); padding-left: 4px; }
.bk-bar .input textarea { font-size: var(--fs-md); }
.bk-who-say { color: var(--text); font-size: var(--fs-sm); line-height: 1.4; }
.bk-who { display: flex; gap: var(--s-2); overflow-x: auto; scrollbar-width: none; padding: 2px; margin: -2px; }
.bk-who button { flex: none; display: flex; align-items: center; gap: 6px; border: 0; cursor: pointer; border-radius: var(--r-pill); padding: 4px 12px 4px 4px; background: var(--field); color: var(--text); box-shadow: var(--inset); font-size: var(--fs-sm); transition: background var(--t-tint); }
.bk-who button[aria-pressed="true"] { background: var(--card); box-shadow: var(--shadow), 0 0 0 1.5px color-mix(in srgb, var(--accent) 75%, transparent); }
.bk-face { width: 2rem; height: 2rem; border-radius: 50%; object-fit: cover; object-position: 50% 0; flex: none; display: block; background: var(--field); }
/* Персонажи. */
.bk-char { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: var(--s-3); padding: 12px 16px 12px 12px; }
.bk-char .bk-face { width: 3.5rem; height: 3.5rem; }
.bk-char b { font-size: var(--fs-md); display: block; line-height: 1.3; cursor: pointer; }
.bk-char p { margin: 0; color: var(--text); font-size: var(--fs-sm); line-height: 1.35; }
/* Ожидание рисунка (Miron.drawWait): цветной туман плывёт сколько нужно, карандаш один раз обводит людей. */
.draw-wait { position: absolute; inset: 0; overflow: hidden; background: var(--field); }
.draw-wait > i { position: absolute; width: 90%; height: 130%; border-radius: 50%; animation: draw-drift 5s ease-in-out infinite alternate; }
.draw-wait > i:nth-child(1) { left: -20%; top: -30%; background: radial-gradient(closest-side, #D9A566, transparent); }
.draw-wait > i:nth-child(2) { left: 40%; top: -10%; background: radial-gradient(closest-side, #8FA38B, transparent); animation-delay: -1.2s; }
.draw-wait > i:nth-child(3) { left: 10%; top: 30%; background: radial-gradient(closest-side, #C78F5E, transparent); animation-delay: -2.4s; }
.draw-wait > i:nth-child(4) { left: 50%; top: 40%; background: radial-gradient(closest-side, #6E8A86, transparent); animation-delay: -3.6s; }
@keyframes draw-drift { from { transform: translate(-14%, -8%) scale(1); } to { transform: translate(16%, 10%) scale(1.2); } }
.draw-pen { position: absolute; inset: 8% 10%; width: 80%; height: 84%; fill: none; stroke: var(--text); stroke-width: .9; stroke-linecap: round; stroke-linejoin: round; }
.draw-pen path { stroke-dasharray: 1; stroke-dashoffset: 1; opacity: 0; animation: draw-line 1s linear forwards; }
@keyframes draw-line { 0% { opacity: 0; stroke-dashoffset: 1; } 1% { opacity: 1; } 100% { opacity: 1; stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) { .draw-wait > i { animation: none; } .draw-pen path { animation-duration: .01s; animation-delay: 0s !important; } }
/* Картинка на весь экран (Miron.picture). */
.pic-veil { z-index: 109; }
.pic-view { position: fixed; inset: 0; z-index: 110; display: flex; align-items: center; justify-content: center; padding: max(16px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom)); cursor: zoom-out; }
.pic-view > img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 12px; box-shadow: var(--shadow); background: var(--field); }
.pic-close, .pic-save { position: absolute; right: 16px; }
.pic-redo { position: absolute; left: 16px; bottom: max(16px, env(safe-area-inset-bottom)); }
.pic-close { top: max(16px, env(safe-area-inset-top)); }
.pic-save { bottom: max(16px, env(safe-area-inset-bottom)); }
.bk-pic img, .bk-crop img { cursor: zoom-in; }
/* Лицо персонажа в кружке: рисунок в полный рост, виден верх с головой. */
.bk-crop { position: relative; overflow: hidden; background: var(--field); }
.bk-crop img { position: absolute; width: 260%; max-width: none; left: -80%; top: -6%; }
.bk-pic.tall { aspect-ratio: 3 / 4; width: min(100%, 16rem); justify-self: center; margin-inline: auto; }
.bk-make { gap: var(--s-3); }
.bk-make p { margin: 0; color: var(--text); line-height: 1.45; }
.bk-make h3 { font-size: 1.125rem; }
.bk-photo { display: flex; align-items: center; gap: var(--s-3); }
.bk-photo .btn { white-space: nowrap; }
.bk-photo .btn svg, .bk-make > .btn svg, .pic-redo svg { width: 1.1rem; height: 1.1rem; }
.bk-photo input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.bk-row { display: flex; gap: var(--s-2); flex-wrap: wrap; }
.bk-row .btn { flex: 1; }
.bk-undo { display: flex; align-items: center; justify-content: space-between; gap: var(--s-2); padding: 6px 8px 6px 16px; background: var(--card); border-radius: var(--r-pill); box-shadow: var(--shadow); }
.bk-undo span { color: var(--text); font-size: var(--fs-sm); }

/* =====================================================================
   МЕТКИ
   Цвет всегда идёт вместе со словом.
   ===================================================================== */
.tag { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: var(--r-pill); font-size: var(--fs-xs); font-weight: 500; white-space: nowrap; background: var(--field); color: var(--text-2); }
.tag::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--muted); flex: none; }
.tag.gold { background: var(--accent-soft); color: var(--text); } .tag.gold::before { background: var(--accent); }
.tag.signed::before { content: none; } .tag.signed svg { flex: none; width: 1.15em; height: 1.15em; color: var(--accent-ink, var(--accent)); }   /* вместо точки свой знак: звезда, корона */
.tag.good { background: var(--green-soft); color: var(--text); } .tag.good::before { background: var(--green); }
.tag.bad { background: var(--red-soft); color: var(--text); } .tag.bad::before { background: var(--red); }
.tag.live::before { background: var(--accent); animation: blink 1.2s ease-in-out infinite; }
.tag.code { font-family: var(--mono); text-transform: uppercase; letter-spacing: .06em; font-size: var(--fs-2xs); }
button.tag { border: 0; cursor: pointer; min-height: 32px; transition: background var(--t-tint); }
button.tag:hover { background: var(--accent-soft); }
button.tag.on { background: var(--accent-soft); color: var(--text); }

/* =====================================================================
   СТЕНД: ЦИФРЫ, ВОРОНКА, ЛЮДИ, ЖУРНАЛ, ТАБЛИЦА, ПУТЬ
   ===================================================================== */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(10.5rem, 1fr)); gap: var(--s-3); }
.stat { background: var(--card); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: 18px 20px; display: grid; gap: 4px; align-content: start; }
.stat b { font-family: var(--font-heading); font-weight: 600; font-size: var(--fs-stat); line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat b small { font-family: var(--font); font-size: var(--fs-sm); font-weight: 500; color: var(--muted); margin-left: 4px; }
.stat .small { font-size: var(--fs-xs); }

/* Строка — ступень: название, полоса от числа пришедших, люди, доля от прошлой ступени, сколько ушло. */
.funnel { display: grid; gap: 2px; }
.funnel .step { display: grid; grid-template-columns: minmax(7rem, 12.5rem) minmax(60px, 1fr) 2.6rem 3.2rem 3.2rem; gap: var(--s-3); align-items: center; padding: 9px 10px; border-radius: var(--r-sm); cursor: pointer; transition: background var(--t-tint); }
.funnel .step:hover, .funnel .step.on { background: var(--accent-soft); }
.funnel .name { font-size: var(--fs-sm); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.funnel .bar { height: 10px; border-radius: 4px; background: var(--hairline); overflow: hidden; }
.funnel .bar i { display: block; height: 100%; width: calc(var(--v) * 1%); border-radius: 4px; background: var(--accent); transition: width var(--t-slow) var(--ease); }
.funnel .n { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.funnel .pc, .funnel .lost { text-align: right; font-size: var(--fs-xs); color: var(--muted); font-variant-numeric: tabular-nums; }
.funnel .lost.some { color: var(--red); }
.funnel .head { cursor: default; padding-top: 0; padding-bottom: 4px; }
.funnel .head:hover { background: none; }
.funnel .head > * { font-size: var(--fs-2xs); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.funnel .part { padding: 14px 10px 4px; }
@media (max-width: 600px) { .funnel .step { grid-template-columns: 1fr 40px 48px; row-gap: 6px; } .funnel .name { grid-column: 1 / -1; } .funnel .lost, .funnel .head { display: none; } }
/* Разбор: те же строки без счёта ушедших — имя, полоса доли, доля, «сколько из скольких». Строка не нажимается. */
.funnel.cut .step { grid-template-columns: minmax(6rem, 11rem) minmax(48px, 1fr) 2.8rem 5.5rem; cursor: default; }
.funnel.cut .step:hover { background: none; }
@media (max-width: 600px) { .funnel.cut .step { grid-template-columns: 1fr 2.8rem 5.5rem; } }
/* Те же строки, но строка нажимается и отмечается: её показывает график рядом («Статистика» админки, stats.js). */
.funnel.cut.pick .step { cursor: pointer; }
/* Длинные числа (токены, «140 407»): столбец числа шире. */
.funnel.cut.long .step { grid-template-columns: minmax(6rem, 11rem) minmax(48px, 1fr) 4.6rem 5.5rem; }
@media (max-width: 600px) { .funnel.cut.long .step { grid-template-columns: 1fr 4.6rem 5.5rem; } }
/* Строка-число без полосы: имя, число, подпись справа. */
.funnel.cut .step.fact { grid-template-columns: minmax(6rem, 1fr) auto 5.5rem; }
.funnel.cut .step.fact .bar { display: none; }
.funnel.cut .step.fact .name { grid-column: auto; }
.funnel.cut .step.fact .n { white-space: nowrap; }
/* Круговая диаграмма: кольцо, в середине итог или кусок под мышью, рядом подпись на каждый кусок (stats.js). Куски разделяет просвет, цвет — --series-N. */
.pie-wrap { display: grid; grid-template-columns: minmax(7rem, 12rem) minmax(min-content, 1fr); gap: var(--s-4); align-items: center; margin-top: var(--s-3); }
.pie { position: relative; aspect-ratio: 1; }
.pie svg { display: block; width: 100%; height: 100%; }
.pie circle { fill: none; stroke: var(--c); stroke-width: 18; transition: opacity var(--t-fast) var(--ease); }
.pie-wrap.lit .pie circle:not(.on) { opacity: .3; }
.pie-mid { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; gap: 2px; padding: 18%; pointer-events: none; }
.pie-mid b { font-family: var(--font-heading); font-weight: 600; font-size: var(--fs-h3); line-height: 1.1; font-variant-numeric: tabular-nums; white-space: nowrap; }   /* сумма со знаком — одной строкой */
.pie-mid span { font-size: var(--fs-2xs); line-height: 1.15; }
.pie-list { display: grid; gap: 2px; min-width: 0; }
.pie-row { display: grid; grid-template-columns: .7rem minmax(min-content, 1fr) auto 2.6rem; gap: var(--s-2); align-items: center; padding: 5px 8px; border-radius: var(--r-sm); font-size: var(--fs-sm); }
.pie-row.on { background: var(--accent-soft); }
.pie-row i { width: .7rem; height: .7rem; border-radius: 3px; background: var(--c); }
.pie-row b { font-weight: 600; font-variant-numeric: tabular-nums; }
.pie-row span:last-child { text-align: right; font-size: var(--fs-xs); font-variant-numeric: tabular-nums; }
@media (max-width: 600px) { .pie-wrap { grid-template-columns: 1fr; } .pie { width: min(13rem, 100%); justify-self: center; } }
/* Таблица моделей: строка на модель и вид ответа, нажатая показывает свой кэш на графике рядом. */
.models { display: grid; gap: 2px; margin-top: var(--s-2); }
.funnel.cut.sum .step { grid-template-columns: minmax(6rem, 11rem) minmax(48px, 1fr) 4.5rem; }
.funnel.cut.sum .pc { display: none; }
.funnel.cut.sum .n { white-space: nowrap; }
@media (max-width: 600px) { .funnel.cut.sum .step { grid-template-columns: 1fr 4.5rem; } .funnel.cut.sum .name { grid-column: 1; } .funnel.cut.sum .n { grid-column: 2; grid-row: 1; } .funnel.cut.sum .bar { grid-column: 1 / -1; grid-row: 2; } }
.models .row { display: grid; grid-template-columns: minmax(7rem, 1fr) 3.6rem 4.6rem 4.6rem 3.6rem 3.6rem 3.6rem 3.6rem; gap: var(--s-2); align-items: center; padding: 8px 10px; border-radius: var(--r-sm); font-size: var(--fs-sm); cursor: pointer; }
.models .row:hover, .models .row.on { background: var(--accent-soft); }
.models .row > span:first-child { min-width: 0; overflow-wrap: anywhere; }
.models .row > span:not(:first-child) { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.models .head { cursor: default; padding-bottom: 2px; }
.models .head:hover { background: none; }
.models .head > span { font-size: var(--fs-2xs); font-weight: 600; }
@media (max-width: 600px) { .models .row { grid-template-columns: repeat(4, 1fr); } .models .row > span:first-child { grid-column: 1 / -1; } .models .head > span:first-child { display: none; } }
.funnel.cut.pick .step:hover, .funnel.cut.pick .step.on { background: var(--accent-soft); }
/* Доска воронки (приставка fb-, funnel-board.js): сверху выбор срока и разреза, плитки денег, таблица шагов и график
   по времени. Полоса доли всегда в канавке: --v — доля в процентах, пределы --lo/--hi. Выводов словами доска не пишет:
   цифры, доли и пределы говорят сами. Группа меньше 30 человек — бледная (pale). */
.fb-head { display: grid; gap: var(--s-2); }
.fb-head h2 { margin: 0; font-size: var(--fs-h2); }
.fb-say { margin: 0; font-size: var(--fs-md); line-height: 1.5; color: var(--text); max-width: 46rem; }
.fb-say b { font-weight: 600; }
.fb-note { margin: 0; font-size: var(--fs-sm); color: var(--text); }
.fb-none { font-size: var(--fs-xs); color: var(--text); }
.fb-n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
/* Выбор сверху: подпись и переключатель в строку; на телефоне подпись над переключателем. */
.fb-controls { display: grid; gap: var(--s-2); }
.fb-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2) var(--s-3); }
.fb-row .seg { flex-wrap: wrap; }
.fb-lab { font-size: var(--fs-sm); color: var(--text); min-width: 4.2rem; }
.fb-card { display: grid; gap: var(--s-3); }
.fb-card h3, .fb-exp h3 { margin: 0; }
/* Цвет группы разреза: квадратик цвета её линии на графике (--series-N). */
.fb-sw { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }

/* Числа сверху: подпись, число, строка под ним; значок в вдавленном кружке справа. */
.fb-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); gap: var(--s-3); }
.fb-tile { position: relative; background: var(--card); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: 16px 18px 15px; display: grid; gap: 3px; align-content: start; }
.fb-tile > span { font-size: var(--fs-sm); color: var(--text); }
.fb-tile b { font-weight: 600; font-size: var(--fs-stat); line-height: 1.12; letter-spacing: -.01em; }
.fb-tile em { font-style: normal; font-size: var(--fs-xs); color: var(--text); }
.fb-tic { position: absolute; top: 14px; right: 14px; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--field); box-shadow: var(--inset); color: var(--text); }
.fb-tic svg { width: 18px; height: 18px; }
.fb-tic + span { padding-right: 38px; }

/* Метка: значок линией и слово; цвет только у «в пути», «лучше», «хуже». В сером блоке простая метка — светлая. */
.fb-tag { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: var(--r-pill); font-size: var(--fs-xs); font-weight: 500; white-space: nowrap; color: var(--text); background: var(--field); }
.fb-tag svg { width: 13px; height: 13px; flex: none; color: var(--text); }
.fb-tag.bad { background: var(--red-soft); } .fb-tag.bad svg { color: var(--red); }
.fb-tag.good { background: var(--green-soft); } .fb-tag.good svg { color: var(--green); }
.fb-tag.wait { background: var(--amber-soft); } .fb-tag.wait svg { color: var(--amber); }
.fb-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.fb-table [class="fb-tag"] { background: var(--card); }

/* Канавка с полосой доли: вдавленная дорожка, выпуклая полоса, пределы поверх. */
.fb-gauge { position: relative; height: 18px; border-radius: var(--r-pill); background: var(--field); box-shadow: var(--inset); }
.fb-gauge.thin { height: 16px; }
.fb-gauge .fill { position: absolute; left: 3px; top: 3px; bottom: 3px; width: calc((100% - 6px) * var(--v) / 100); min-width: 8px; border-radius: var(--r-pill);
  background: linear-gradient(to bottom, color-mix(in oklab, var(--accent) 78%, #fff), var(--accent)); box-shadow: 0 1px 3px rgba(0,0,0,.18); }
.fb-ci { position: absolute; top: 50%; height: 2px; margin-top: -1px; left: calc(3px + (100% - 6px) * var(--lo) / 100); width: calc((100% - 6px) * (var(--hi) - var(--lo)) / 100); background: var(--text); }
.fb-ci::before, .fb-ci::after { content: ''; position: absolute; top: -4px; width: 2px; height: 10px; background: var(--text); }
.fb-ci::before { left: -1px; } .fb-ci::after { right: -1px; }

/* Таблица шагов: строка — шаг, серая полоса со скруглёнными краями; первый столбец стоит на месте, когда таблицу
   двигают вбок на телефоне. Нажатая строка — шаг графика, она подсвечена. Внизу строки денег без подложки. */
.fb-scroll { overflow-x: auto; margin: 0 calc(var(--s-2) * -1); padding: 0 var(--s-2); }
.fb-table { width: 100%; border-collapse: separate; border-spacing: 0 4px; font-size: var(--fs-sm); color: var(--text); }
.fb-table th { text-align: left; font-weight: 600; font-size: var(--fs-xs); padding: 0 10px 4px; vertical-align: bottom; white-space: nowrap; }
.fb-table :is(th, td) small { display: block; font-weight: 400; font-size: var(--fs-xs); }
.fb-table td { padding: 9px 10px; vertical-align: middle; background: var(--field); }
.fb-table td:first-child { border-radius: var(--r-sm) 0 0 var(--r-sm); position: sticky; left: 0; z-index: 1; }
.fb-table td:last-child { border-radius: 0 var(--r-sm) var(--r-sm) 0; }
.fb-table tr[data-step] { cursor: pointer; }
.fb-table tr[data-step]:hover td { background: color-mix(in oklab, var(--accent) 10%, var(--field)); }
.fb-table tr.on td { background: color-mix(in oklab, var(--accent) 24%, var(--field)); }
.fb-table tr[data-step="came"] { cursor: default; }
.fb-table .fb-n b { font-weight: 600; font-size: var(--fs-md); }
.fb-table .fb-tag { margin-top: 4px; }
.fb-table .pale { opacity: .45; }
.fb-sum td { background: transparent; font-size: var(--fs-xs); }
.fb-sum td:first-child { background: var(--card); font-weight: 600; }
.fb-step { display: flex; gap: 10px; align-items: center; min-width: 12.5rem; }
.fb-step svg { width: 18px; height: 18px; flex: none; }
.fb-mini { display: grid; grid-template-columns: minmax(6rem, 9rem) auto; gap: 10px; align-items: center; min-width: 13rem; }
.fb-mini small { font-size: var(--fs-xs); }

/* Опыт (разрез с началом): сколько людей уже набралось в каждой группе из нужного числа. */
.fb-exp { display: grid; gap: var(--s-2); }
.fb-need { display: grid; grid-template-columns: minmax(7rem, 10rem) 1fr auto; gap: var(--s-3); align-items: center; font-size: var(--fs-sm); }

/* График по времени: сверху столбики «Пришли», под ними линии доли дошедших — одна ось на каждую часть. Пустая точка —
   люди ещё в пути; пунктир — день перемены из хронологии. Подсказка идёт за курсором. */
.fb-chart { position: relative; }
.fb-chart svg { display: block; width: 100%; height: auto; overflow: visible; touch-action: pan-y; }
.fb-c-t { font-size: 12px; font-weight: 600; fill: var(--text); }
.fb-c-y { font-size: 11px; fill: var(--text); text-anchor: end; font-variant-numeric: tabular-nums; }
.fb-c-x { font-size: 11px; fill: var(--text); text-anchor: middle; }
.fb-c-lab { font-size: 12px; fill: var(--text); }
.fb-c-bar { fill: var(--accent); }
.fb-c-grid { stroke: var(--hairline); stroke-width: 1; }
.fb-c-base { stroke: color-mix(in oklab, var(--text) 30%, transparent); stroke-width: 1; }
.fb-c-line { stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.fb-c-dot { stroke: var(--card); stroke-width: 2; }
.fb-c-dot.wait { fill: var(--card); stroke-width: 2; }
.fb-c-cur { stroke: var(--text); stroke-width: 1; stroke-dasharray: 3 3; }
.fb-c-mark { stroke: color-mix(in oklab, var(--text) 45%, transparent); stroke-width: 1; stroke-dasharray: 2 4; }
.fb-c-tip { position: absolute; z-index: 3; pointer-events: none; background: var(--card); color: var(--text); box-shadow: var(--shadow); border-radius: var(--r-sm); padding: 8px 10px; font-size: var(--fs-xs); white-space: nowrap; display: grid; gap: 3px; }
.fb-c-tip b { font-weight: 600; }
.fb-c-wait, .fb-c-note { display: flex; gap: 6px; align-items: center; }
.fb-c-wait svg { width: 13px; height: 13px; color: var(--amber); }
.fb-c-note svg { width: 13px; height: 13px; }
.fb-c-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: var(--fs-xs); color: var(--text); }
.fb-c-legend i { display: inline-block; width: 16px; height: 3px; border-radius: 2px; margin-right: 6px; vertical-align: middle; }
@media (max-width: 640px) { .fb-lab { min-width: 100%; } .fb-need { grid-template-columns: 1fr auto; } .fb-need .fb-gauge { grid-column: 1 / -1; grid-row: 2; } }

/* Столбики по дням: высота — доля от верха шкалы (--v), слева три отметки шкалы. Столбик — вся высота колонки, чтобы
   навести было легко; день без «да» — серая черта, день без сообщений — пусто. Наведённый столбик ярок, остальные бледнеют. */
.day-bars { position: relative; height: 11rem; display: flex; align-items: stretch; gap: 2px; padding-left: 2.6rem; margin-top: var(--s-3); }
.day-bars.skel { border-radius: var(--r-md); }
.day-bars .y { position: absolute; left: 2.6rem; right: 0; bottom: calc(var(--v) * 1%); height: 0; border-top: 1px solid var(--hairline); pointer-events: none; }
.day-bars .y b { position: absolute; right: calc(100% + 6px); white-space: nowrap; top: -.6em; font-size: var(--fs-2xs); font-weight: 500; line-height: 1.2; color: var(--muted); font-variant-numeric: tabular-nums; }
.day-bars .col { position: relative; flex: 1 1 0; min-width: 0; display: flex; align-items: flex-end; }
.day-bars .col i { display: block; width: 100%; height: calc(var(--v) * 1%); min-height: 2px; border-radius: 4px 4px 0 0; background: var(--accent); transition: height var(--t-slow) var(--ease), opacity var(--t-fast); }
.day-bars .col.zero i { background: var(--hairline); }
.day-bars .col.none i { background: none; }
.day-bars.lit .col:not(.on) i { opacity: .45; }
.day-bars-x { display: flex; justify-content: space-between; padding: 6px 0 0 2.6rem; font-size: var(--fs-2xs); color: var(--muted); font-variant-numeric: tabular-nums; }
/* Те же столбики стопкой: в столбике кусок на ряд снизу вверх, цвет куска — --c, высота — его доля от верха шкалы.
   Куски разделяет просвет цвета карточки, скруглён только верхний. Ряды подписывает .legend под графиком. */
.day-bars.stack .col { flex-direction: column-reverse; align-items: stretch; }
.day-bars.stack .col i { min-height: 0; border-radius: 0; background: var(--c); }
.day-bars.stack .col i:last-child { min-height: 2px; border-radius: 4px 4px 0 0; }
.day-bars.stack .col i + i { box-shadow: 0 2px 0 var(--card); }
/* Подписи рядов графика: цвет ряда и имя в строку. */
.legend { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: var(--s-2); font-size: var(--fs-xs); color: var(--text-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: .7rem; height: .7rem; border-radius: 3px; background: var(--c); }
/* Неделя на часы: строка — день недели, клетка — час. Пять ступеней цвета (data-l от 1 до 5) по долям часов, а не по доле
   от самого большого числа: один пиковый час не гасит остальные. Ступени идут от карточки к --hot — акценту, сдвинутому
   к цвету текста (в светлой теме темнее, в тёмной светлее): так соседние ступени различимы на любом акценте. Час без
   сообщений — точка. Над клетками часы через три, слева дни. Наведённая клетка обведена, остальные бледнеют.
   Шкала (.heat-key) — те же пять ступеней от одного до самого большого числа. */
.heat, .heat-key { --hot: color-mix(in oklab, var(--accent) 60%, var(--text)); }
:root[data-theme="dark"] :is(.heat, .heat-key) { --hot: color-mix(in oklab, var(--accent) 75%, var(--text)); }
.heat { display: grid; grid-template-columns: 1.8rem repeat(24, minmax(0, 1fr)); gap: 2px; margin-top: var(--s-3); font-size: var(--fs-2xs); color: var(--muted); font-variant-numeric: tabular-nums; }
.heat > span { display: flex; align-items: center; line-height: 1.2; }
.heat .hr { grid-column: span 3; padding-bottom: 2px; }
.heat i { height: 1.4rem; border-radius: 3px; background: radial-gradient(circle, color-mix(in oklab, var(--muted) 45%, transparent) 0 1.5px, transparent 2px); transition: opacity var(--t-fast); }
:is(.heat, .heat-key) i[data-l="1"] { background: color-mix(in oklab, var(--hot) 22%, var(--card)); }
:is(.heat, .heat-key) i[data-l="2"] { background: color-mix(in oklab, var(--hot) 42%, var(--card)); }
:is(.heat, .heat-key) i[data-l="3"] { background: color-mix(in oklab, var(--hot) 62%, var(--card)); }
:is(.heat, .heat-key) i[data-l="4"] { background: color-mix(in oklab, var(--hot) 82%, var(--card)); }
:is(.heat, .heat-key) i[data-l="5"] { background: var(--hot); }
.heat i.on { position: relative; z-index: 1; box-shadow: 0 0 0 2px var(--card), 0 0 0 4px var(--text); }   /* зазор цвета карточки: кольцо видно и на самой светлой клетке */
.heat.lit i:not(.on) { opacity: .45; }
.heat-key { display: inline-flex; align-items: center; gap: 3px; font-size: var(--fs-2xs); color: var(--muted); font-variant-numeric: tabular-nums; }
.heat-key > span:first-child { margin-right: 3px; }
.heat-key > span:last-child { margin-left: 3px; }
.heat-key i { width: .8rem; height: .8rem; border-radius: 3px; }
@media (max-width: 600px) { .heat { grid-template-columns: 1.5rem repeat(24, minmax(0, 1fr)); gap: 1px; } .heat i { height: 1rem; border-radius: 2px; } }
/* Свой срок рядом с переключателем срока (period.js): два поля дат через тире. */
.period [data-v="own"] svg { display: none; }
@media (max-width: 600px) { .period [data-v="own"] svg { display: block; width: 1.25em; height: 1.25em; } .period [data-v="own"] span { display: none; } }
.period-own { display: flex; align-items: center; gap: var(--s-2); color: var(--muted); }
.period-own[hidden] { display: none; }
.period-own input { min-height: 40px; border: 0; border-radius: var(--r-pill); padding: 6px 14px; background: var(--field); color: var(--text); box-shadow: var(--inset); font: inherit; font-size: var(--fs-sm); outline: none; color-scheme: light; }
.period-own input:focus { box-shadow: var(--inset), 0 0 0 1.5px color-mix(in srgb, var(--accent) 75%, transparent); }
:root[data-theme="dark"] .period-own input { color-scheme: dark; }
/* Две карточки в ряд; на узком экране встают друг под друга. */
.duo { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 21rem), 1fr)); gap: var(--s-4); align-items: start; }
.duo > * { min-width: 0; }
/* Первая карточка главная: ей три доли ширины из пяти. */
@media (min-width: 861px) { .duo.major { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); } }
/* Шесть чисел в один ряд на широком экране. */
.stats.tight { grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr)); }
/* Широкая таблица на узком экране листается вбок внутри своей карточки. */
.table-scroll { overflow-x: auto; }
/* Колонка не шире своего места: широкая таблица внутри не раздвигает страницу. */
.stack.fit { grid-template-columns: minmax(0, 1fr); }
.stack.fit .card > * { min-width: 0; }

.people { display: grid; gap: 2px; }
.person { display: grid; grid-template-columns: 2.5rem minmax(0, 1.4fr) minmax(0, 1fr) auto 4.5rem; gap: var(--s-3); align-items: center; padding: 10px; border-radius: var(--r-md); cursor: pointer; text-decoration: none; color: inherit; transition: background var(--t-tint); }
.person:hover, .person.on { background: var(--accent-soft); }
.ava { width: 2.5rem; height: 2.5rem; border-radius: 50%; background: var(--accent-soft); color: var(--accent-ink); display: grid; place-items: center; font-family: var(--font-heading); font-weight: 600; font-size: var(--fs-md); object-fit: cover; }
.person .who { min-width: 0; }
.person .who b { display: block; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person .who span, .person .where span { display: block; font-size: var(--fs-xs); color: var(--muted); }
.person .where { min-width: 0; font-size: var(--fs-sm); color: var(--text-2); }
.person .where .progress { display: flex; gap: 4px; margin-top: 6px; max-width: 160px; }
.person .cost { text-align: right; font-size: var(--fs-sm); color: var(--text-2); font-variant-numeric: tabular-nums; }
@media (max-width: 600px) { .person { grid-template-columns: 40px 1fr auto; row-gap: 6px; } .person .where { grid-column: 2 / -1; grid-row: 2; } .person .cost { display: none; } }
/* Люди в Админке: переписку открывает только тот, у кого есть аккаунт (data-talk), гость не нажимается. */
.people.talks .person:not([data-talk]) { cursor: default; } .people.talks .person:not([data-talk]):hover { background: none; }
/* Раздел «Переписка» Админки (admin-talk.js): поле номера с кнопкой и лента днями, новое сверху. */
.adm-talk-pick { align-items: flex-end; } .adm-talk-pick .field { flex: 1 1 18rem; }
.adm-talk-feed { max-width: 48rem; }
.adm-talk-day { align-self: center; margin-top: var(--s-3); }

/* Журнал читают и человек, и агент: время, уровень, что случилось. */
.log { font-family: var(--mono); font-size: var(--fs-xs); line-height: 1.55; background: var(--field); border-radius: var(--r-md); box-shadow: var(--inset); padding: 12px 4px; overflow-x: auto; max-height: 360px; }
.log div { display: grid; grid-template-columns: 5rem 3.4rem 1fr; gap: 10px; width: max-content; min-width: 100%; box-sizing: border-box; padding: 1px 12px; white-space: pre; color: var(--text-2); }   /* строка длиной в свой текст: подложка сбоя не обрывается при прокрутке вбок */
.log div > :first-child { color: var(--muted); }
.log .err { background: var(--red-soft); color: var(--text); } .log .err > :nth-child(2) { color: var(--red); }
.log .ok > :nth-child(2) { color: var(--green); }

.table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.table th { text-align: left; font-size: var(--fs-2xs); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 0 10px 8px; }
.table td { padding: 10px; color: var(--text-2); }
.table td:first-child { color: var(--text); border-radius: var(--r-sm) 0 0 var(--r-sm); } .table td:last-child { border-radius: 0 var(--r-sm) var(--r-sm) 0; }
.table tr:hover td { background: var(--accent-soft); }
.table .r { text-align: right; font-variant-numeric: tabular-nums; }

/* Одна линия связи на весь стенд: сплошная тонкая слева, на ней узлы. Золотой узел — шаг модели,
   зелёный — решение кода, пустой — ещё не запускался, мигающий — идёт сейчас, красный — упал. */
.flow { position: relative; display: grid; gap: var(--s-5); padding-left: 34px; }
/* Узел стоит по середине своей карточки. Линия идёт от узла к узлу и вокруг узла прерывается. */
.flow > * { position: relative; --gap: 15px; }
.flow > *::after { content: ''; position: absolute; left: -24px; width: 2px; top: calc(var(--s-5) / -2); bottom: calc(var(--s-5) / -2); pointer-events: none;
  background: linear-gradient(to bottom, var(--hairline) calc(50% - var(--gap)), transparent calc(50% - var(--gap)), transparent calc(50% + var(--gap)), var(--hairline) calc(50% + var(--gap))); }
.flow > :first-child::after { background: linear-gradient(to bottom, transparent calc(50% + var(--gap)), var(--hairline) calc(50% + var(--gap))); }
.flow > :last-child::after { background: linear-gradient(to bottom, var(--hairline) calc(50% - var(--gap)), transparent calc(50% - var(--gap))); }
.flow > *::before { content: ''; position: absolute; left: -30px; top: 50%; margin-top: -7px; width: 14px; height: 14px; border-radius: 50%; background: var(--bg); box-shadow: inset 0 0 0 2px var(--muted); }
.flow > .model::before { background: var(--accent); box-shadow: none; }
.flow > .code::before { background: var(--green); box-shadow: none; }
.flow > .now::before { background: var(--accent); box-shadow: 0 0 0 5px var(--accent-soft); animation: blink 1.2s ease-in-out infinite; }
.flow > .fail::before { background: var(--red); box-shadow: none; }
@media (max-width: 600px) { .flow { padding-left: 24px; } .flow > *::after { left: -19px; } .flow > *::before { left: -25px; } }

/* Конвейер файлов на стенде (вкладка «Тесты»). Длинная карточка шага держит узел у заголовка: .flow.top.
   «Устарел» — янтарный: шаг готов, но шаг, из которого он берёт вход, прошёл заново позже. */
.flow.top > *::before { top: 26px; margin-top: 0; }
.flow.top > *::after { --at: calc(var(--s-5) / 2 + 33px);
  background: linear-gradient(to bottom, var(--hairline) calc(var(--at) - var(--gap)), transparent calc(var(--at) - var(--gap)), transparent calc(var(--at) + var(--gap)), var(--hairline) calc(var(--at) + var(--gap))); }
.flow.top > :first-child::after { background: linear-gradient(to bottom, transparent calc(var(--at) + var(--gap)), var(--hairline) calc(var(--at) + var(--gap))); }
.flow.top > :last-child::after { background: linear-gradient(to bottom, var(--hairline) calc(var(--at) - var(--gap)), transparent calc(var(--at) - var(--gap))); }
.flow > .stale::before { background: var(--bg); box-shadow: inset 0 0 0 2px var(--amber); }
.tag.warn { background: var(--amber-soft); color: var(--text); } .tag.warn::before { background: var(--amber); }
.task li.stale { color: var(--text-2); } .task li.stale .ic { color: var(--amber); }
.task li.stale .ic::before { content: ''; width: 9px; height: 9px; margin-left: 3px; border-radius: 50%; box-shadow: inset 0 0 0 2px currentColor; }
.progress i.stale { background: color-mix(in srgb, var(--amber) 70%, transparent); }
.progress i.fail { background: var(--red); }
.log .warn > :nth-child(2) { color: var(--amber); }
/* Вкладыш строками (.well.tight): заголовок, текст и метка друг под другом — правка редактора, проверка книги, вариант
   развилки. Сработавший вариант — зелёный; когда ветка известна, остальные гаснут. */
.well.tight { display: grid; gap: 6px; min-width: 0; padding: 12px 14px; }
.well.tight > * { min-width: 0; overflow-wrap: anywhere; }
.well.on { background: var(--green-soft); box-shadow: inset 3px 0 0 var(--green); }
.wells { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: var(--s-2); }
.wells.known > .well:not(.on) { opacity: .55; }
/* Правка «было — стало» по словам: убранное зачёркнуто красным, новое подсвечено зелёным. */
.diff del { background: var(--red-soft); color: var(--text); text-decoration: line-through; text-decoration-color: var(--red); border-radius: 3px; }
.diff ins { background: var(--green-soft); color: var(--text); text-decoration: none; border-radius: 3px; }
/* Ответ модели текстом, а не JSON-ом: имя поля — подписью, значение — абзацем. */
.tree { display: grid; gap: 10px; margin: 0; font-size: var(--fs-sm); line-height: 1.55; }
.tree dt { font-family: var(--mono); font-size: var(--fs-xs); color: var(--muted); }
.tree dd { margin: 2px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--text); }
.tree dd .tree { padding-left: 12px; box-shadow: inset 2px 0 0 var(--hairline); }
/* Окно правки промпта: текст, который уйдёт модели; за меткой {{МЕТКА}} в скобках то, что код поставит на её место. */
.prompt-edit { min-height: 22rem; max-height: 70vh; overflow: auto; padding: 14px 16px; border-radius: var(--r-md); background: var(--field); box-shadow: var(--inset);
  white-space: pre-wrap; overflow-wrap: anywhere; font-size: var(--fs-md); line-height: 1.65; color: var(--text); outline: none; }
.prompt-edit:focus { box-shadow: var(--inset), 0 0 0 1.5px color-mix(in srgb, var(--accent) 75%, transparent); }
.prompt-edit .val, .doc mark { background: var(--accent-soft); color: var(--text); border-radius: 4px; padding: 0 3px; user-select: none; }
.prompt-edit .val.unknown { background: var(--red-soft); }
.field textarea.code { min-height: 22rem; max-height: 70vh; resize: vertical; font-family: var(--mono); font-size: var(--fs-xs); line-height: 1.55; }
/* Картинки прогона: сетка, подпись под каждой. */
.shots { display: grid; grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr)); gap: var(--s-3); }
.shots figure { margin: 0; display: grid; gap: 6px; align-content: start; }
.shots img { display: block; width: 100%; border-radius: var(--r-md); box-shadow: var(--shadow); }
.shots figcaption { font-size: var(--fs-xs); color: var(--muted); }

/* =====================================================================
   НАВИГАЦИЯ
   На компьютере — строка сверху, на телефоне — полоса снизу под большой палец.
   ===================================================================== */
/* Шапка без кромки: цвет страницы и размытие под ней плавно сходят на нет ниже самой шапки. */
.nav { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: var(--s-5); padding: 12px var(--s-5); isolation: isolate; }
.nav::before { content: ''; position: absolute; inset: 0 0 -36px; z-index: -1; pointer-events: none; background: linear-gradient(to bottom, color-mix(in srgb, var(--bg) 72%, transparent) 30%, transparent); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); -webkit-mask: linear-gradient(to bottom, #000 50%, transparent); mask: linear-gradient(to bottom, #000 50%, transparent); }
.nav .brand { font-family: var(--font-heading); font-weight: 600; font-size: var(--fs-lg); }
.nav .tabs { position: relative; display: flex; gap: 4px; }
.nav .tabs a { padding: 8px 16px; border-radius: var(--r-pill); text-decoration: none; color: var(--text-2); font-size: var(--fs-sm); font-weight: 500; white-space: nowrap; transition: background var(--t-tint), color var(--t-tint); }
.nav .tabs a:hover { color: var(--text); }
.nav .tabs a.on { background: var(--accent-soft); color: var(--text); }
/* Плашку выбранной вкладки ставит base.js как бегунок .thumb: она едет к новой вкладке, как в .seg. */
.nav .tabs .thumb { position: absolute; border-radius: var(--r-pill); background: var(--accent-soft); pointer-events: none; }
.nav .tabs[data-dir="r"] .thumb { transition: right .26s var(--ease), left .56s cubic-bezier(.3, 1.45, .45, 1); }
.nav .tabs[data-dir="l"] .thumb { transition: left .26s var(--ease), right .56s cubic-bezier(.3, 1.45, .45, 1); }
.nav .tabs[data-ready] a { position: relative; z-index: 1; }
.nav .tabs[data-ready] a.on { background: none; }
.nav .tabs a[aria-disabled="true"] { opacity: .45; pointer-events: none; }
.nav .end { margin-left: auto; display: flex; gap: var(--s-2); align-items: center; }
/* На узком экране вкладки не толкают страницу вширь: их полоса листается вбок. */
@media (max-width: 860px) { .nav .tabs { flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; } .nav .tabs::-webkit-scrollbar { display: none; } }
@media (max-width: 600px) {
  .nav { padding: 10px var(--s-4); }
  .nav .tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; justify-content: space-around; padding: 8px 8px calc(8px + env(safe-area-inset-bottom)); background: var(--bg); box-shadow: 0 -10px 28px rgba(0,0,0,.08); }
}
/* Вторая строка: разделы внутри вкладки. */
.subnav { display: flex; gap: 6px; flex-wrap: wrap; }

/* =====================================================================
   ДВИЖЕНИЕ
   Готовые анимации. Элемент получает класс a-… или имя из @keyframes, своих не пишет.
   Бесконечные анимации пишут начало и конец явно: с домысленным началом Safari не отдаёт движение видеокарте
   и пересчитывает стили всей страницы каждый кадр (запись с айфона: змейка острова — 2,5 мс кадра в покое).
   ===================================================================== */
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes dot { from { opacity: 0; transform: scale(0); } }
@keyframes emerge { from { opacity: 0; transform: translateY(48px) scale(.55); filter: blur(3px); } }
@keyframes jelly { 0% { transform: scale(1); } 28% { transform: scale(1.05, .93); } 52% { transform: scale(.975, 1.035); } 76% { transform: scale(1.012, .99); } 100% { transform: scale(1); } }
/* В элемент нырнули: он расплёскивается вширь, как вода, качается и затихает; вокруг на миг расходится свечение. */
@keyframes plunge { 0% { transform: scale(1); } 22% { transform: scale(1.03, .9); } 52% { transform: scale(.992, 1.025); } 78% { transform: scale(1.003, .995); } 100% { transform: scale(1); } }
@keyframes splash { 0% { box-shadow: 0 0 0 0 var(--accent-glow); } 25% { box-shadow: 0 0 36px 10px var(--accent-glow); } 100% { box-shadow: 0 0 60px 24px transparent; } }
@keyframes unfold { 0% { transform: scale(.14); opacity: 0; filter: blur(8px); border-radius: 48px; } 50% { opacity: 1; filter: blur(0); } 100% { transform: none; opacity: 1; filter: blur(0); } }
/* Тряска идёт своими translate и rotate, а не transform: иначе она на время подменяет размер вещи (кнопка записи
   при отмене сжималась рывком и после тряски раздувалась снова). */
@keyframes shake { 25% { translate: -3px 0; rotate: -8deg; } 75% { translate: 3px 0; rotate: 8deg; } }
@property --glint { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
@keyframes glint { 0% { --glint: 0deg; opacity: 0; } 15% { opacity: .45; } 70% { opacity: .3; } 100% { --glint: 180deg; opacity: 0; } }
@keyframes glint-halo { 0% { opacity: 0; transform: scale(.5); } 25% { opacity: .3; } 100% { opacity: 0; transform: scale(1.15); } }
/* Стирание голосового: крышка открыта и захлопывается, шарик и время влетают в корзинку, корзинка тает. */
@keyframes lid { 0%, 70% { transform: rotate(-45deg) translateY(-2px); } 100% { transform: none; } }
@keyframes bin-out { 30% { transform: translateY(-50%) scale(1.1); opacity: .8; } 100% { transform: translateY(-50%) scale(0); opacity: 0; } }
@keyframes ball-fly { 60% { opacity: .7; transform: translate(calc(var(--far, -200px) * .6), calc(-50% - 5px)) scale(.5) rotate(320deg); } 100% { opacity: 0; transform: translate(var(--far, -200px), calc(-50% - 10px)) scale(.15) rotate(540deg); } }
@keyframes time-suck { 40% { opacity: .7; transform: translate(-5px, -4px) scale(.6) rotate(-10deg); } 70% { opacity: .4; transform: translate(-10px, -8px) scale(.3) rotate(-20deg); } 100% { opacity: 0; transform: translate(-16px, -12px) scale(.05) rotate(-30deg); } }
@keyframes morph-in { from { opacity: 0; filter: blur(6px); transform: translateY(7px); } }
@keyframes morph-out { to { opacity: 0; filter: blur(6px); transform: translateY(-7px); } }
@keyframes nudge { 0%, 100% { transform: rotate(45deg); opacity: 1; } 50% { transform: translateY(-4px) rotate(45deg); opacity: .35; } }
@keyframes veil { 0%, 100% { opacity: 1; } 50% { opacity: .6; } }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: .2; } }
@keyframes breathe { 0%, 100% { transform: none; opacity: 1; } 50% { transform: scale(1.15); opacity: .7; } }
@keyframes bars { 0%, 100% { transform: none; } 50% { transform: scaleY(.35); } }
/* Реплика в разговоре: столбик говорит первую половину круга и молчит вторую. */
@keyframes turn { 0%, 50%, 100% { transform: scaleY(.25); } 10% { transform: scaleY(1); } 20% { transform: scaleY(.5); } 30% { transform: scaleY(.9); } 40% { transform: scaleY(.4); } }
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes fadeout { to { opacity: 0; } }
@keyframes blob { from { rotate: 0deg; } to { rotate: 360deg; } }
/* Появление. */
.a-rise { animation: rise var(--t) ease-out both; }
.a-emerge { animation: emerge .5s cubic-bezier(.2, .8, .2, 1) both; transform-origin: 50% 100%; }
.a-unfold { animation: unfold .9s var(--ease-spring) both; }
.a-morph-in { animation: morph-in .38s ease-out both; }
/* Отклик. */
.a-jelly { animation: jelly .65s cubic-bezier(.3, .9, .4, 1); }
.a-plunge { animation: plunge .9s cubic-bezier(.3, .9, .4, 1), splash 1s ease-out; }
.a-shake { animation: shake .38s ease-in-out; }
/* Отблеск: от места (--gx, --gy; без них — середина низа) по краю вещи один раз мягко расходится свет — два огонька
   змейки кнопки бегут в обе стороны и гаснут, под ними едва заметно теплеет. --ga — угол места от середины вещи.
   Так Мирон показывает лапой на свои слова (entry.js); ставит Miron.glint (base.js). --gw — половина огонька (36°),
   --gtail — окантовка, что проступает за огоньками от места (без неё за огоньками пусто): их ставит glint с draw. */
.a-glint:not(.live) { position: relative; isolation: isolate; }
.a-glint:not(.live)::before { content: ''; position: absolute; inset: 0; border-radius: inherit; padding: 1.5px; pointer-events: none; opacity: 0;
  background: conic-gradient(from var(--ga, 180deg), var(--gtail, transparent) 0deg, var(--gtail, transparent) calc(var(--glint) - var(--gw, 36deg)),
    var(--accent) var(--glint), transparent calc(var(--glint) + var(--gw, 36deg)),
    transparent calc(360deg - var(--glint) - var(--gw, 36deg)), var(--accent) calc(360deg - var(--glint)),
    var(--gtail, transparent) calc(360deg - var(--glint) + var(--gw, 36deg)), var(--gtail, transparent) 360deg);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); mask-composite: exclude;
  animation: glint calc(var(--t-slow) * 3) linear forwards; }   /* огоньки бегут ровно, как змейка кнопки */
.a-glint:not(.live)::after { content: ''; position: absolute; z-index: -1; left: var(--gx, 50%); top: var(--gy, 100%); width: 9rem; height: 9rem;
  margin: -4.5rem 0 0 -4.5rem; border-radius: 50%; pointer-events: none; opacity: 0;
  background: radial-gradient(closest-side, var(--accent-glow), transparent); animation: glint-halo calc(var(--t-slow) * 3) ease-out forwards; }
/* Состояние, идёт всё время. */
.a-breathe { animation: breathe 1.6s ease-in-out infinite; }

/* Переход между вкладками ведёт base.js, Miron.go(url): фон и шапка стоят на месте, старые блоки
   тают, плашка вкладки едет бегунком, новая страница приходит по сети и всплывает блоками сверху
   вниз. Пока она едет дольше 150 мс, её место держат примитивы skel. */
/* Блоки страницы всплывают сверху вниз, по одному, и после этого не несут transform. */
.page > * { animation: rise .42s cubic-bezier(.3, 1.3, .45, 1) backwards; }
.page > :nth-child(2) { animation-delay: .05s; } .page > :nth-child(3) { animation-delay: .1s; } .page > :nth-child(4) { animation-delay: .15s; }
.page > :nth-child(5) { animation-delay: .2s; } .page > :nth-child(6) { animation-delay: .25s; } .page > :nth-child(n + 7) { animation-delay: .3s; }
.page.leaving > * { animation: fade-old .14s ease-out forwards; }
/* Загрузка любой страницы по тому же правилу: пока её скрипты не отработали, на <html> стоит data-boot (ставит и
   снимает base.js) и содержимое спрятано, размеры при этом считаются. Потом блоки всплывают сверху вниз: у страницы
   .page её блоки, у колоды — заголовок, текст и предмет слайда и стопка первого экрана. Чат на весь экран — шапка,
   лента и поле — всплывает весь разом и вдвое быстрее (.21 с): его открывают каждый день, и готов он должен быть
   сразу. Пока спрятано, анимации нет, чтобы она началась в момент показа, а не отыграла невидимой. */
html[data-boot] .page, html[data-boot] .deck, html[data-boot] .chat.full { visibility: hidden; }
.deck .slide > *, .deck .hero .stack > * { animation: rise .42s cubic-bezier(.3, 1.3, .45, 1) backwards; }
.chat.full > * { animation: rise .21s cubic-bezier(.3, 1.3, .45, 1) backwards; }
.deck .slide > :nth-child(2), .deck .hero .stack > :nth-child(2) { animation-delay: .05s; }
.deck .slide > :nth-child(3), .deck .hero .stack > :nth-child(3) { animation-delay: .1s; }
.deck .slide > :nth-child(n + 4), .deck .hero .stack > :nth-child(n + 4) { animation-delay: .15s; }
html[data-boot] .page > *, html[data-boot] .deck .slide > *, html[data-boot] .deck .hero .stack > *, html[data-boot] .chat.full > *,
.deck:not([data-ready]) .slide > *, .deck:not([data-ready]) .hero .stack > * { animation: none; }
/* Главная вернулась «назад» из кэша браузера (screens/site.html ставит data-risen, уходя со страницы): Safari заводит
   анимации страницы заново, и блоки экрана и поле входа всплыли бы второй раз — экран мигал. Всплытие уже сыграно. */
.deck[data-risen] .slide > *, .deck[data-risen] .hero .stack > *, .entry-chat[data-risen] .chat.full > * { animation: none; }

/* Смена темы: новый вид расходится кругом от кнопки, на которую нажали, за .75 с. Круг ведёт base.js (turn)
   анимацией самого снимка: точка и радиус не ставятся переменными на корень — их унаследовала бы вся страница
   и пересчитала стили до смены темы. Там, где браузер так не умеет, вид меняется сразу. */
:root.waving::view-transition-old(root), :root.waving::view-transition-new(root) { animation: none; }
:root.waving::view-transition-group(root) { animation-duration: .75s; }
/* Холсты светлячков, капель и сборки Мирона в круге не участвуют: у каждого своё имя, и пока круг идёт по
   фотографии старого вида, они живут поверх неё, огни не замирают. Имена холстам сборки ставит arrival.js. */
canvas.trail-ink { view-transition-name: trail-ink; view-transition-class: live; }
canvas.trail-ink.over { view-transition-name: trail-ink-over; }
canvas.fly-ink { view-transition-name: fly-ink; view-transition-class: live; }
canvas.arrival-ink { view-transition-class: live; }
:root.waving::view-transition-old(*.live) { display: none; }
:root.waving::view-transition-new(*.live), :root.waving::view-transition-group(*.live) { animation: none; }
/* Размер букв — желе (base.js, turn и morph): вещи на виду — реплики и карточки ленты, шапка, низ чата с затемнением,
   кнопка, поле и Мирон на кнопке — разом едут на новое место и растут или сжимаются по пружине --ease-jelly. Видна только
   вещь в новом размере, сжатая в рамку старой: перетекание старого снимка в новый двоило буквы, где строки легли по-новому.
   Снимок растянут по рамке вещи — за рамку ничто не вылезает и на соседа не наезжает. Фон страницы от размера букв
   не зависит и стоит. С каплями ленты желе не встречается: они ходят по очереди (base.js, stage). */
:root.resizing::view-transition-group(*) { animation-duration: var(--t-slow); animation-timing-function: var(--ease-jelly); }
:root.resizing::view-transition-old(*) { animation: none; opacity: 0; }
:root.resizing::view-transition-new(*) { animation: none; height: 100%; object-fit: fill; }
/* Остальная страница — без желе: старый вид коротко тает, новый проявляется. В чате это только фон, он не меняется. */
:root.resizing::view-transition-old(root) { opacity: 1; animation: fade-old .22s ease-out both; }
:root.resizing::view-transition-new(root) { animation: fade-new .22s ease-out both; }
@keyframes fade-old { to { opacity: 0; } }
@keyframes fade-new { from { opacity: 0; } }

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

/* =====================================================================
   СТАРЫЕ БРАУЗЕРЫ
   Chrome до 119 (и браузеры на его старом движке), Safari до 16.4 и Firefox до 128 не умеют смешивать цвета
   (color-mix) и строить цвет от цвета (oklch from). У них всё, что залито такими цветами, — страница, карточки, поля,
   облачко экскурсии, дымка под шапкой и над полем, реплики человека — стало бы прозрачным, и текст лёг бы на текст.
   Им — готовые цвета без оттенка акцента: страница и блоки серые, реплика человека — заливкой акцента, ореолов нет.
   Тени у краёв и шапки — те же переходы, цвет дымки берут из --fog-rgb и --bg-rgb. Мелкие подсветки (фокус поля,
   реакции, выделение) у них бледнее или пропадают: читать и нажимать это не мешает.
   ===================================================================== */
@supports not (color: oklch(from red l c h)) {
  :root {
    --bg: #ECECE9; --bg-rgb: 236, 236, 233; --fog: #E3E3DF; --fog-rgb: 227, 227, 223;
    --page: radial-gradient(120% 90% at 50% 45%, transparent 55%, var(--edge) 100%), linear-gradient(var(--bg), var(--bg));
    --surface: #F5F5F3; --card: #FFFFFF; --field: #EFEFEC; --edge: rgba(28, 38, 20, .05);
    --pen-mid: var(--pen-1); --bubble-mid: var(--bubble-1);
    --accent-soft: rgba(30, 31, 28, .08); --accent-glow: transparent; --halo: transparent;
    --miron-ink: #53594F; --miron-hi: #737A6A; --miron-eye: var(--text-2); --miron-eye-shine: var(--card);
    --miron-cheek: rgba(212, 163, 140, .55); --miron-drop-2: var(--accent-ink); --miron-drop-3: var(--pen-2);
    --miron-drop-4: var(--text); --miron-drop-7: var(--paint-3); --orb-3: #CFCFCB;
  }
  :root:not([data-theme="dark"]):not([data-accent="mono"]) { --paper: #ECECE9; --wash: var(--accent); }
  :root[data-theme="dark"] {
    --bg-rgb: 12, 12, 13; --fog: #070708; --fog-rgb: 7, 7, 8;
    --surface: #151516; --card: #19191B; --field: #111112;
    --accent-soft: rgba(237, 237, 235, .1); --halo: transparent;
    --miron-ink: #B8BAAF; --miron-hi: #CDCEC2; --miron-eye: #898987; --miron-eye-shine: var(--text);
    --orb-1: #2A2A2D; --orb-3: #0E0E0F;
  }
  :root:not([data-miron-look="soft"]) { --miron-ink: var(--text); --miron-hi: var(--text); }
  :root:not([data-accent="mono"]) { --bubble-1: var(--accent); --bubble-2: var(--accent); --on-bubble: var(--on-accent); --bubble-red: var(--on-accent); }
  :root[data-theme="dark"]:is([data-accent="khokhloma"], [data-accent="palekh"], [data-accent="cherry"], [data-accent="sunset"]) { --bubble-red: var(--on-accent); }
  .swatches button { --pen-mid: var(--pen-1); }
  .dia-chart { --k0: var(--accent-ink); --k1: var(--accent); --k2: var(--pen-1); }
  :root[data-theme="dark"] .dia-chart { --k0: var(--accent-ink); --k1: var(--accent); --k2: var(--pen-2); }
  .post { --post-bg: var(--card); }
  :root[data-theme="dark"] .pop { --pop: var(--card); }

  .bg { background: var(--bg); }
  .chat-head::before { background: linear-gradient(to bottom, var(--bg) 0, var(--bg) 56%, rgba(var(--bg-rgb), .72) 74%, rgba(var(--bg-rgb), .3) 89%, transparent 100%); }
  .chat .composer::before { background: linear-gradient(to bottom, transparent 0, rgba(var(--fog-rgb), .22) 25%, rgba(var(--fog-rgb), .58) 50%, rgba(var(--fog-rgb), .84) 75%, rgba(var(--fog-rgb), .94) 100%); }
  .chat.full .chat-head::before { background: rgba(var(--fog-rgb), .94); }
  .deck-top::before, .overlay::before, .overlay::after, .chat.full::after {
    background: linear-gradient(to bottom, var(--fog) 0, rgba(var(--fog-rgb), .5) 25%, rgba(var(--fog-rgb), .2) 55%, transparent 100%); }
  body:has(> main.page)::before, body:has(> main.page)::after {   /* отдельно: браузер без :has() выбросил бы всё правило */
    background: linear-gradient(to bottom, var(--fog) 0, rgba(var(--fog-rgb), .5) 25%, rgba(var(--fog-rgb), .2) 55%, transparent 100%); }
  .deck::after { background: linear-gradient(to top, var(--fog) 0, rgba(var(--fog-rgb), .5) 25%, rgba(var(--fog-rgb), .2) 55%, transparent 100%); }
  .chat.full.mail .composer::before { background: linear-gradient(to bottom, transparent 0, rgba(var(--fog-rgb), .3) 22%, rgba(var(--fog-rgb), .62) 40%, rgba(var(--fog-rgb), .78) 65%, rgba(var(--fog-rgb), .86) 100%); }
  .nav::before { background: linear-gradient(to bottom, rgba(var(--bg-rgb), .72) 30%, transparent); }
  .pop-veil { background: rgba(30, 31, 28, .16); }
  :root[data-theme="dark"] .pop-veil { background: rgba(12, 12, 13, .55); }
  :root[data-quality="3"] .pop-veil, :root[data-quality="4"] .pop-veil { background: rgba(var(--bg-rgb), .58); }
  .bk-fog { background: rgba(var(--fog-rgb), .55); }
}
