:root {
  --bg: var(--tg-theme-bg-color, #ffffff);
  --text: var(--tg-theme-text-color, #1a1a1a);
  --hint: var(--tg-theme-hint-color, #8a8a8a);
  --secondary-bg: var(--tg-theme-secondary-bg-color, #f2f2f5);
  --accent: var(--tg-theme-button-color, #b5651d);
  --accent-text: var(--tg-theme-button-text-color, #ffffff);
  --link: var(--tg-theme-link-color, #2481cc);
  --border: color-mix(in srgb, var(--text) 12%, transparent);
  /* Едва заметная подложка: ответы Юми и поля ввода. */
  --soft-bg: color-mix(in srgb, var(--secondary-bg) 40%, var(--bg));
  /* Масштаб шрифтов (класс ставит app.js по клиенту Telegram). Рядом с текстом
     самого Telegram наш выходил крупнее: на iPhone чуть, на Android заметно
     (WebView там увеличивает текст), на компьютере — сильно. */
  --fs: 1;

  /* ---- Единые размеры (DESIGN.md). Новое — только из этого набора. ---- */
  /* Шрифт (2026-10-11, по скриншотам рядом с Telegram): 13 подписи и вторичный ·
     14 основной, кнопки, вкладки, звёзды · 17 заголовки · 20 крупные числа.
     Поля ввода — 16 (меньше — iPhone увеличивает страницу при фокусе). */
  --fs-xs: calc(13px * var(--fs));
  --fs-s: calc(13px * var(--fs));
  --fs-m: calc(14px * var(--fs));
  --fs-l: calc(17px * var(--fs));
  --fs-xl: calc(20px * var(--fs));
  --fs-input: calc(16px * var(--fs));
  /* Скругления: 8 мелкое (миниатюры, значки) · 12 кнопки, поля, карточки · 16 пузыри и листы. */
  --r-s: 8px;
  --r-m: 12px;
  --r-l: 16px;
  /* Одна высота — 34 (с 2026-10-18): кнопка, поле и широкая кнопка, иконка-кнопка. */
  --h-btn: 34px;
  --h-field: 34px;
  --h-icon: 34px;
  --ava-s: 36px; /* аватар Юми: шапка до входа */
  --ava-l: 88px; /* «Как работает Юми», согласие */
  --danger: #d64532;
  /* Серый потемнее — неактивные вкладки: --hint на светлом фоне Telegram плохо виден. */
  --hint-strong: color-mix(in srgb, var(--text) 62%, var(--bg));
}
html.desktop { --fs: 0.87; }
/* Поле ввода — как основной текст (14) там, где страница не увеличивается при фокусе: Telegram на Android
   и компьютере (решение Александра 2026-10-25 — 16 выбивались крупнее всего на экране). Везде, где клиент
   не известен (сайт, iPhone в браузере), остаются 16. */
html.android, html.desktop { --fs-input: calc(14px * var(--fs)); }
/* iPhone: экран для страницы шире (iPhone 8 Plus — 414 против 360 у Android), один
   пиксель там физически мельче — те же 14 выглядят заметно меньше. Поле — ровно 16. */
html.ios { --fs: 1.07; --fs-input: 16px; }

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html, body {
  margin: 0;
  /* Двойной тап не увеличивает страницу (iPhone): касания — только нажатия.
     Работу во весь экран увеличивают пальцами — там свой touch-action. */
  touch-action: manipulation;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  /* 14 (--fs-m; на iPhone ×1.07 — 15) — как текст сообщения в Telegram на телефоне.
     Автоувеличение шрифта в Android WebView отключено, иначе оно раздувает длинные абзацы. */
  font-size: var(--fs-m);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  display: flex;
  flex-direction: column;
  height: 100vh;
}

.topbar {
  padding: 12px 16px calc(10px);
  border-bottom: 1px solid var(--border);
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.btn-feedback {
  flex: 0 0 auto;
  height: calc(28px * var(--fs));
  border: 1px solid var(--border);
  background: transparent;
  color: var(--hint);
  border-radius: var(--r-m);
  padding: 0 11px;
  font-size: var(--fs-s);
  cursor: pointer;
}
.btn-feedback[hidden] { display: none; }
/* Баланс в звёздах (у владельца скрыт). */
.balance {
  flex: 0 0 auto;
  border: none;
  background: transparent;
  padding: 4px 0;
  font: inherit;
  cursor: pointer;
  color: var(--hint);
  font-size: var(--fs-s);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.balance[hidden] { display: none; }
/* Аватар Юми (DESIGN.md → «Аватар Юми»): круг, без рамки, на --soft-bg до загрузки. */
.yumi-ava { display: block; flex: none; border-radius: 50%; object-fit: cover; background: var(--soft-bg); }
.yumi-ava.s { width: var(--ava-s); height: var(--ava-s); }
.yumi-ava.l { width: var(--ava-l); height: var(--ava-l); margin: 0 0 12px; }
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.title { font-size: var(--fs-l); font-weight: 600; }
/* Подпись под «Юми» — тем же шрифтом, что и вкладки (.tab). */
.subtitle { font-size: var(--fs-s); color: var(--hint); margin-top: 2px; }

.chat {
  flex: 1 1 auto;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.msg {
  max-width: 85%;
  padding: 9px 12px;
  border-radius: var(--r-l);
  font-size: var(--fs-m);
  line-height: 1.45;
  word-wrap: break-word;
}
.msg.user {
  align-self: flex-end;
  background: var(--accent);
  color: var(--accent-text);
  border-bottom-right-radius: 5px;
}
.msg.assistant {
  align-self: flex-start;
  max-width: 100%; /* ответы Юми — во всю ширину, экран телефона узкий */
  background: var(--soft-bg);
  color: var(--text);
  border-bottom-left-radius: 5px;
}

/* ---------- текст сообщения (лёгкий markdown) ---------- */
.md {
  white-space: pre-wrap;
  word-wrap: break-word;
}
.md:empty { display: none; }
.md strong { font-weight: 600; }
.md em { font-style: italic; }
.md code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.92em;
  background: color-mix(in srgb, currentColor 12%, transparent);
  padding: 1px 4px;
  border-radius: var(--r-s);
}
.md .md-h { font-weight: 600; }
.md .md-quote { opacity: 0.75; font-style: italic; }
.md hr {
  border: none;
  border-top: 1px solid color-mix(in srgb, currentColor 25%, transparent);
  margin: 6px 0;
}
.md a { color: inherit; }
.md .md-pre {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.8em;
  line-height: 1.3;
  white-space: pre;
  overflow-x: auto;
  margin: 6px 0;
  padding: 8px 10px;
  border-radius: var(--r-s);
  background: color-mix(in srgb, currentColor 6%, transparent);
}
.md .md-drawing { color: var(--hint); font-style: italic; }

/* Схемы Юми (scheme.js): стена и план зала, SVG по ширине пузыря. */
figure.ys {
  --ys-text: var(--text);
  --ys-hint: var(--hint);
  --ys-bg: var(--bg);
  --ys-accent: var(--accent);
  --ys-wall: color-mix(in srgb, var(--text) 3%, var(--bg));
  --ys-line: color-mix(in srgb, var(--text) 55%, var(--bg));
  --ys-furn: color-mix(in srgb, var(--text) 10%, var(--bg));
  --ys-art: color-mix(in srgb, var(--accent) 22%, var(--bg));
  --ys-person: color-mix(in srgb, var(--text) 22%, var(--bg));
  --ys-grid: color-mix(in srgb, var(--text) 10%, var(--bg));
  --ys-side: color-mix(in srgb, var(--text) 7%, var(--bg));
  --ys-sofa: color-mix(in srgb, var(--accent) 9%, color-mix(in srgb, var(--text) 12%, var(--bg)));
  --ys-win: color-mix(in srgb, var(--link) 14%, var(--bg));
  margin: 8px 0;
  padding: 4px 0;
  white-space: normal;
  border-radius: var(--r-m);
  background: var(--bg);
}
figure.ys svg { display: block; width: 100%; max-width: 440px; height: auto; margin: 0 auto; }
figure.ys figcaption { color: var(--hint-strong); font-size: var(--fs-xs); padding: 2px 8px 0; }
figure.ys .ys-legend { list-style: none; margin: 2px 0 0; padding: 0 8px; font-size: var(--fs-s); }
figure.ys .ys-legend b { display: inline-block; min-width: 28px; font-weight: 600; }
/* Переключатель видов зала: План · Перспектива · Стены (scheme.js). */
figure.ys .ys-tabs { display: flex; gap: 2px; margin: 2px 8px 6px; padding: 3px; border-radius: var(--r-m); background: var(--secondary-bg); }
figure.ys .ys-tabs button {
  flex: 1; height: 32px; border: 0; background: none; padding: 0; border-radius: var(--r-s);
  font: 500 var(--fs-s) -apple-system, BlinkMacSystemFont, sans-serif; color: var(--hint); cursor: pointer;
}
figure.ys .ys-tabs button.on { background: var(--bg); color: var(--text); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08); }
figure.ys .ys-wname { font-size: var(--fs-xs); color: var(--hint); margin: 8px 8px 0; }
.md a[href^="https://t.me/"], .empty a.tg-mention { color: var(--accent); text-decoration: none; }

.msg.assistant.typing .md::after {
  content: "▍";
  animation: blink 1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }
/* Ожидание разбора: «Юми проводит разбор.» → «..» → «...» и снова. */
.msg.assistant.waiting .md::after { content: none; }
.wait-line { color: var(--hint); }
.wait-dots i { font-style: normal; animation: 1.8s steps(1, end) infinite; }
.wait-dots i:nth-child(2) { animation-name: wait-dot2; }
.wait-dots i:nth-child(3) { animation-name: wait-dot3; }
@keyframes wait-dot2 { 0% { opacity: 0; } 33.3% { opacity: 1; } 100% { opacity: 1; } }
@keyframes wait-dot3 { 0% { opacity: 0; } 66.6% { opacity: 1; } 100% { opacity: 1; } }

/* ---------- работы внутри сообщения ---------- */
.gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}
.gallery:empty { display: none; }
.gallery figure { margin: 0; display: flex; flex-direction: column; gap: 3px; max-width: 100%; }
.gallery figcaption {
  font-size: var(--fs-xs);
  opacity: 0.75;
  max-width: 82px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.gallery.single figcaption { max-width: 100%; }
.gallery img {
  width: 82px;
  height: 82px;
  object-fit: cover;
  border-radius: var(--r-m);
  cursor: zoom-in;
  background: color-mix(in srgb, currentColor 10%, transparent);
}
/* Одна работа — миниатюрой ~160 px (крупно — по тапу): во всю ширину она
   занимала первый экран чата. */
.gallery.single img {
  width: auto;
  max-width: min(100%, 200px);
  height: auto;
  max-height: 160px;
  object-fit: contain;
}

/* ---------- просмотр работы во весь экран ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: #000; /* сплошной чёрный: цвет работы виден без примеси фона */
  display: flex;
  align-items: center;
  justify-content: center;
  overscroll-behavior: contain;
  touch-action: none;
  /* Сверху — полоса под крестик и подпись, по краям — чёрные поля:
     работа не залезает под крестик и не прилипает к краям экрана. */
  padding: calc(60px + env(safe-area-inset-top)) 12px calc(12px + env(safe-area-inset-bottom));
}
.lightbox img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  touch-action: none;
  transform-origin: center center;
  will-change: transform;
  -webkit-user-select: none;
  user-select: none;
  -webkit-user-drag: none;
}
.lb-close {
  position: absolute;
  /* Поверх работы и при увеличении пальцами (у неё свой слой из-за transform). */
  z-index: 2;
  top: calc(10px + env(safe-area-inset-top));
  right: 12px;
  width: var(--h-icon);
  height: var(--h-icon);
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  font-size: calc(22px * var(--fs));
  line-height: 1;
  cursor: pointer;
}

/* «Сохранить» у картинки в интерьере — слева от крестика, тот же круг. */
.lb-save {
  position: absolute;
  z-index: 2;
  top: calc(10px + env(safe-area-inset-top));
  right: calc(20px + var(--h-icon));
  width: var(--h-icon);
  height: var(--h-icon);
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.lb-save svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.lightbox img:not([src]) { visibility: hidden; }
.lightbox .lb-video { max-width: 100%; max-height: 100%; object-fit: contain; }
.lb-nav {
  position: absolute;
  z-index: 2;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 64px;
  border: none;
  border-radius: var(--r-m);
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: calc(30px * var(--fs));
  line-height: 1;
  cursor: pointer;
}
.lb-prev { left: 8px; }
.lb-next { right: 8px; }
/* На телефоне листают свайпом — стрелки только мешают смотреть. */
@media (hover: none) and (pointer: coarse) { .lb-nav { display: none; } }
.lb-info {
  position: absolute;
  z-index: 2;
  top: calc(16px + env(safe-area-inset-top));
  left: 16px;
  right: 60px;
  color: rgba(255, 255, 255, 0.85);
  font-size: var(--fs-s);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
}

.empty {
  margin: auto;
  text-align: center;
  color: var(--hint-strong);
  font-size: var(--fs-m);
  max-width: 260px;
  line-height: 1.45;
}

/* ---------- кнопка «вниз», когда читаешь вверху ---------- */
.jump {
  position: fixed;
  right: 14px;
  bottom: calc(74px + env(safe-area-inset-bottom));
  width: var(--h-icon);
  height: var(--h-icon);
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: var(--fs-input);
  line-height: 1;
  cursor: pointer;
  z-index: 12;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18);
}
.jump[hidden] { display: none; }

.thumbs {
  display: flex;
  gap: 8px;
  padding: 0 12px;
  overflow-x: auto;
  flex: 0 0 auto;
}
.thumbs:empty { display: none; }
.thumbs img {
  height: 56px;
  width: 56px;
  object-fit: cover;
  border-radius: var(--r-s);
  border: 1px solid var(--border);
}
.thumb-wrap { position: relative; flex: 0 0 auto; margin: 8px 0; }
.thumb-wrap button {
  position: absolute;
  top: -6px; right: -6px;
  width: 20px; height: 20px;
  border-radius: 50%;
  border: none;
  background: rgba(0,0,0,0.65);
  color: #fff;
  font-size: var(--fs-s);
  line-height: 1;
  cursor: pointer;
}

.composer {
  flex: 0 0 auto;
  display: flex;
  align-items: flex-end;
  gap: 6px;
  padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--border);
  background: var(--bg);
}
.attach {
  flex: 0 0 auto;
  width: var(--h-icon); height: var(--h-icon);
  border-radius: 50%;
  background: var(--secondary-bg);
  display: flex; align-items: center; justify-content: center;
  color: var(--hint-strong);
  border: none;
  padding: 0;
  cursor: pointer;
}
/* «＋» — вектором, не символом шрифта (DESIGN.md → «Скругления», 2026-10-25). */
.attach svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.attach:disabled { opacity: 0.4; cursor: default; }
.input {
  flex: 1 1 auto;
  min-height: var(--h-field);
  resize: none;
  max-height: 120px;
  border: 1px solid var(--border);
  border-radius: var(--r-m);
  padding: 5px 10px;
  font-family: inherit;
  /* 16px — ниже этого iOS зумит страницу при фокусе на поле ввода */
  font-size: var(--fs-input);
  line-height: 1.3;
  color: var(--text);
  background: var(--soft-bg);
  outline: none;
}
.btn-send {
  flex: 0 0 auto;
  width: var(--h-icon); height: var(--h-icon);
  border-radius: 50%;
  border: none;
  background: var(--accent);
  color: var(--accent-text);
  font-size: var(--fs-input);
  cursor: pointer;
  /* Стрелка вверх — вектором, ровно по центру (символ «▲» съезжал). */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.btn-send svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.btn-send:disabled { opacity: 0.5; cursor: default; }

.flash {
  position: fixed;
  left: 50%;
  bottom: 88px;
  transform: translateX(-50%) translateY(10px);
  background: rgba(0, 0, 0, 0.82);
  color: #fff;
  font-size: var(--fs-s);
  padding: 8px 14px;
  border-radius: var(--r-m);
  max-width: 88%;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
  z-index: 60;
}
.flash.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* Юми обновилась, пока приложение было открыто (2026-10-25): строка под вкладками, в потоке — экраны
   сдвигаются вниз, экраны поверх приложения встают под неё (--tabs-h). Кнопка — вид «Добавить». */
.update-bar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: var(--h-btn);
  margin: 8px 12px 0;
  padding: 0 4px 0 12px;
  border-radius: var(--r-m);
  background: var(--secondary-bg);
  color: var(--text);
  font-size: var(--fs-s);
}
/* «Новое в Юми»: абзацы новости из админки — переводы строк как написаны. */
.news-text { white-space: pre-line; }
.update-btn {
  height: var(--h-btn);
  padding: 0 8px;
  border: none;
  background: transparent;
  color: var(--accent);
  font: inherit;
  font-size: var(--fs-m);
  font-weight: 500;
}

/* ---------- служебные строки и id для доступа ---------- */
.notice {
  align-self: center;
  max-width: 300px;
  margin-top: 4px;
  padding: 8px 12px;
  background: var(--soft-bg); /* без пунктира (2026-10-25) */
  border-radius: var(--r-m);
  color: var(--hint-strong);
  font-size: var(--fs-s);
  line-height: 1.45;
  text-align: center;
}
.tg-id {
  display: block;
  margin: 10px auto 6px;
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: var(--r-m);
  background: var(--soft-bg);
  font-family: inherit;
  cursor: pointer;
  color: var(--text);
  font-size: var(--fs-xl);
  font-weight: 600;
  letter-spacing: 0.02em;
  -webkit-user-select: all;
  user-select: all;
}

/* ---------- форма отзыва ---------- */
.fb {
  position: fixed;
  inset: 0;
  top: var(--vv-top, 0px);
  bottom: auto;
  height: var(--vv-height, 100%);
  z-index: 55; /* под .flash (60), чтобы «Спасибо» было видно */
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
  background: rgba(0, 0, 0, 0.45);
}
.fb[hidden] { display: none; }
.fb-card {
  width: 100%;
  max-width: 480px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  border-radius: var(--r-l);
  background: var(--bg);
  color: var(--text);
}
.fb-title { font-size: var(--fs-l); font-weight: 600; }
.fb-text {
  min-height: 120px;
  resize: vertical;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--r-m);
  background: var(--soft-bg);
  color: var(--text);
  font-family: inherit;
  /* 16px — ниже этого iOS зумит страницу при фокусе на поле ввода */
  font-size: var(--fs-input);
  line-height: 1.45;
  outline: none;
}
/* «Отправить» — основная во всю ширину, под ней тихая «Отмена» (как у листов). */
.fb-actions { display: flex; flex-direction: column-reverse; align-items: stretch; gap: 4px; }
.fb-send { width: 100%; height: var(--h-field); }


/* ---------- вкладки и экраны ---------- */
/* Строка вкладок — она же шапка приложения: вкладки, звёзды, меню ☰. */
.tabs {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 2px 4px 2px 8px;
  border-bottom: 1px solid var(--border);
}
.tab {
  flex: 1 1 auto;
  min-width: 0;
  border: none;
  background: transparent;
  color: var(--hint-strong);
  font: inherit;
  font-size: var(--fs-m);
  padding: 5px 4px;
  border-radius: var(--r-s);
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tabs .balance { padding: 4px 6px; margin-left: 4px; font-size: var(--fs-m); color: var(--hint-strong); }
.btn-menu {
  flex: 0 0 auto;
  width: var(--h-icon);
  height: var(--h-icon);
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--hint-strong);
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.btn-menu svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.btn-menu:active { background: var(--soft-bg); }
.tab.active { background: var(--soft-bg); color: var(--text); font-weight: 600; }

.view, .pane {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

/* ---------- ветка: заголовок ---------- */
.chatbar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-bottom: 1px solid var(--border);
}
.chat-title {
  flex: 1 1 auto;
  min-width: 0;
  text-align: center;
  font-size: var(--fs-m);
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---------- список веток ---------- */
/* Сверху 10, как у .works-head: «Чатов: N» на той же высоте, что «Работ: N» (2026-10-26; было 12 — на 2 ниже). */
.list-pane { overflow-y: auto; padding: 10px 12px calc(12px + env(safe-area-inset-bottom)); gap: 8px; }
.list-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-bottom: 4px; } /* 4 снизу — как .works-head: список с той же высоты */
/* «Добавить» — текст цвета кнопки без рамки (с 2026-10-16, пунктир убран); справа. */
.new-chat {
  flex: 0 0 auto;
  align-self: flex-end;
  height: var(--h-btn);
  border: none;
  background: transparent;
  color: var(--accent);
  font: inherit;
  font-size: var(--fs-m);
  font-weight: 500;
  padding: 0 8px;
  margin-right: -8px;
  border-radius: var(--r-m);
  cursor: pointer;
}
.chat-list { display: flex; flex-direction: column; gap: 8px; }
.chat-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  width: 100%;
  border: none;
  background: var(--soft-bg);
  color: var(--text);
  font: inherit;
  text-align: left;
  padding: 11px 12px;
  border-radius: var(--r-m);
  cursor: pointer;
}
.chat-row.current { outline: 1px solid var(--border); }
.chat-row-title {
  flex: 1 1 auto;
  min-width: 0;
  font-size: var(--fs-m);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.chat-row-date { flex: 0 0 auto; color: var(--hint-strong); font-size: var(--fs-xs); }
/* Удаление из списка (2026-10-26, DESIGN.md → «Чаты: удаление из списка»): корзина после даты — иконка-кнопка 34
   --danger, как в карточке работы; смахнуть строку влево — под ней «Удалить» на --danger (88). */
.chat-item { position: relative; border-radius: var(--r-m); overflow: hidden; }
/* Красное — только пока строку тянут или она открыта: иначе по скруглённым углам строки проступала красная кайма. */
.chat-item:not(.swiping) .chat-swipe-del { visibility: hidden; }
.chat-swipe-del {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 88px;
  border: none;
  background: var(--danger);
  color: #fff;
  font: inherit;
  font-size: var(--fs-m);
  font-weight: 500;
}
.chat-row.with-tools { position: relative; align-items: center; padding: 4px 4px 4px 12px; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.chat-row.with-tools .chat-row-date { margin-right: -2px; transition: margin 0.15s; } /* 4 + зазор 10 − 2 = 12 от края, как у строк без корзины */
.chat-row.with-tools:hover .chat-row-date, .chat-row.with-tools:focus-within .chat-row-date { margin-right: -6px; }
/* Корзина — только у строки под курсором, серая, красная при наведении на неё (решение Александра 2026-10-26: ряд
   красных корзин мешал); место под неё в строке остаётся — дата не прыгает. На телефоне корзин нет — смахивание. */
/* Без наведения корзины нет и места под неё: дата у края; навели — дата плавно уезжает влево, корзина выходит
   (решение Александра 2026-10-26, вечер). */
.chat-row .chat-row-del { flex: 0 0 auto; color: var(--hint-strong); width: 0; min-width: 0; opacity: 0; overflow: hidden; padding: 0; transition: width 0.15s, opacity 0.15s; } /* .chatbar-icon ниже красит в --accent */
.chat-row:hover .chat-row-del, .chat-row:focus-within .chat-row-del { width: var(--h-icon); opacity: 1; }
.chat-row .chat-row-del:hover { color: var(--danger); }
@media (hover: none) {
  .chat-row .chat-row-del { display: none; }
  .chat-row.with-tools { padding: 11px 12px; }
  .chat-row.with-tools .chat-row-date { margin-right: 0; }
}

.empty p { margin: 0 0 12px; }
.empty .empty-note { font-size: var(--fs-xs); opacity: 0.85; }

/* Стартовый экран пустого чата «С чем вы пришли?» (DESIGN.md → «Стартовый экран»):
   заголовок 17, строка 14 серым, задачи — пункты листа с подписью 13. */
.empty.start {
  margin: 12px auto auto; /* у верха, а не по центру (2026-10-16) */
  max-width: 380px;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: var(--text);
}
.start-title { font-size: var(--fs-l); font-weight: 600; }
.empty .start-lead { margin: 0 0 8px; font-size: var(--fs-m); color: var(--hint-strong); line-height: 1.45; }
.menu-item.start-item { /* .menu-item ниже по файлу перебивал отступ — отсюда двойной класс */
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 10px 12px;
  text-align: left;
}
.start-item + .start-item { margin-top: 4px; } /* между задачами 12 (8 + 4) — больше воздуха */
/* Пункты — на цвете кнопки Telegram, белыми буквами (DESIGN.md → «Стартовый экран»). */
.menu-item.start-item { background: var(--accent); color: var(--accent-text); }
/* Пока работ нет: цветом кнопки — только «Загрузить первую работу», задачи на --soft-bg (2026-10-25). */
.no-works .menu-item.start-item { background: var(--soft-bg); color: var(--text); }
.empty .start-first-note { margin: 0 0 8px; font-size: var(--fs-s); color: var(--hint-strong); line-height: 1.45; }
.start-item-title { font-weight: 600; }
.start-item-sub { font-size: var(--fs-m); opacity: 0.85; line-height: 1.3; }
/* Карточка, открытая перед «Разбором»: что нужно заполнить. */
.ws-need { margin: 0; }

/* ---------- полный разбор ---------- */
/* Ход «Посмотреть все работы»: вместо галереи — «Работ: N». */
.msg-note { margin-top: 4px; font-size: var(--fs-xs); opacity: 0.75; }
.report-foot { margin-top: 12px; text-align: center; } /* «Открыть полный разбор» — по центру, как «Показать в интерьере» */
/* Картинка в интерьере: под схемой — кнопка (.report-open — второстепенная) и нарисованные картинки. */
.render-box { display: flex; flex-direction: column; align-items: center; gap: 8px; margin-top: 8px; }
.render-box:empty { display: none; }
.render-img { display: block; width: 100%; border-radius: var(--r-m); background: var(--soft-bg); cursor: zoom-in; min-height: 120px; }
.render-wait { font-size: var(--fs-m); min-height: var(--h-btn); display: inline-flex; align-items: center; }
.render-sheet { display: flex; flex-direction: column; gap: 8px; }
.render-tips { font-size: var(--fs-s); color: var(--hint); line-height: 1.45; }
.report-open {
  min-height: var(--h-btn);
  border: 1px solid var(--accent);
  background: var(--bg);
  color: var(--accent);
  font: inherit;
  font-size: var(--fs-m);
  font-weight: 500;
  padding: 0 16px;
  border-radius: var(--r-m);
  cursor: pointer;
}
.report-progress { color: var(--hint); font-size: var(--fs-s); font-style: italic; }

/* Экран разбора — под строкой вкладок (с 2026-10-16): она остаётся видна,
   нажатие на вкладку закрывает разбор. --tabs-h ставит app.js. */
.report {
  position: fixed;
  inset: var(--tabs-h, 0px) 0 0 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  background: var(--bg);
}
.report-bar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 2px;
  min-height: 44px;
  padding: 0 8px 0 4px;
  border-bottom: 1px solid var(--border);
}
.report-body {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 16px 16px calc(28px + env(safe-area-inset-bottom));
  font-size: var(--fs-m);
  line-height: 1.45;
  max-width: 720px;
  width: 100%;
  margin: 0 auto;
}
/* Документ (DESIGN.md → «Документ», 2026-10-25): 17/600 и 14/600 цветом текста, из шкалы. */
.report-body .md-h { display: inline-block; margin-top: 12px; color: var(--text); font-size: var(--fs-m); }
.report-body .md-h1 { font-size: var(--fs-l); margin-top: 0; }

/* ---------- кнопки общего вида ---------- */
.grow { flex: 1 1 auto; }
/* Три вида кнопок (DESIGN.md): основная — заливка акцентом; второстепенная —
   контур акцентом; тихая — серый текст. Удаление — красный текст. Высота 36,
   во всю ширину — 40; скругление 12; шрифт 15. */
.btn-primary, .btn-ghost, .btn-quiet, .notice-btn, .fb-send, .fb-cancel {
  flex: 0 0 auto;
  min-height: var(--h-btn);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font: inherit;
  font-size: var(--fs-m);
  font-weight: 500;
  padding: 0 16px;
  border-radius: var(--r-m);
  cursor: pointer;
  white-space: nowrap;
}
.btn-primary, .notice-btn, .fb-send { border: none; background: var(--accent); color: var(--accent-text); }
.btn-primary.danger { background: var(--danger); color: #fff; }
.btn-ghost { border: 1px solid var(--accent); background: transparent; color: var(--accent); }
.btn-quiet, .fb-cancel { border: none; background: transparent; color: var(--hint-strong); }
.btn-primary:disabled, .btn-ghost:disabled, .fb-send:disabled, .menu-item:disabled { opacity: 0.5; cursor: default; }
.notice-btn { display: flex; width: fit-content; margin: 8px auto 0; }
.link-danger {
  min-height: var(--h-btn);
  border: none;
  background: transparent;
  color: var(--danger);
  font: inherit;
  font-size: var(--fs-m);
  font-weight: 500;
  padding: 0 4px;
  cursor: pointer;
}

/* ---------- библиотека работ ---------- */
.works-head {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px 4px;
}
/* Строка над списком вкладки — высотой с кнопку «＋ …» (10 + 34 + 4), и когда кнопки нет («Разборов: N»):
   подпись слева на одной высоте во всех четырёх вкладках (2026-10-26; в «Разборах» была на 9 выше). */
.view > .works-head { min-height: calc(var(--h-btn) + 14px); }
.works-info { color: var(--hint-strong); font-size: var(--fs-s); }
.works-add {
  display: inline-flex;
  align-items: center;
  min-height: var(--h-btn);
  border: 1px solid var(--accent);
  color: var(--accent);
  border-radius: var(--r-m);
  padding: 0 16px;
  font-size: var(--fs-m);
  font-weight: 500;
  cursor: pointer;
}
/* Как «＋ Новый чат»: пунктирная обводка — вид «добавить». */
.works-add.new-work { border: none; padding: 0 8px; margin-right: -8px; }
.works-grid {
  flex: 1 1 auto;
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
  gap: 10px;
  align-content: start;
  padding: 8px 12px calc(76px + env(safe-area-inset-bottom));
}
.works-grid .empty { grid-column: 1 / -1; margin: 40px auto; }
/* «Работы» без работ: основная «Загрузить первую работу» над текстом (2026-10-25). */
.works-grid .empty.works-first { max-width: 380px; width: 100%; margin-top: 24px; display: flex; flex-direction: column; gap: 12px; }
.works-first p { margin: 0; }
/* Плитки библиотеки перетаскиваются удержанием: без выделения и меню картинки. */
#works-grid .work-card { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
#works-grid .work-card img { pointer-events: none; }
.work-card.placeholder { opacity: 0.25; }
.work-card { position: relative; cursor: pointer; min-width: 0; }
.work-card img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain; /* работа целиком — по высоте или ширине, на подложке, как на экране разбора */
  border-radius: var(--r-m);
  background: var(--soft-bg);
}

.work-check {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid #fff;
  background: rgba(0, 0, 0, 0.28);
  color: #fff;
  /* Галочка ровно по центру кружка. */
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--fs-l);
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}
/* Зона нажатия больше кружка — по нему легко попасть пальцем. */
.work-check::before { content: ""; position: absolute; inset: -10px; }
.work-card.selected .work-check { background: var(--accent); border-color: var(--accent); }
.work-cap { padding: 4px 2px 0; }
.work-title {
  font-size: var(--fs-s);
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.work-meta {
  font-size: var(--fs-xs);
  color: var(--hint-strong);
  min-height: 1.3em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.works-actions {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: calc(12px + env(safe-area-inset-bottom));
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: var(--r-l);
  background: var(--bg);
  border: 1px solid var(--border);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.16);
}
.sel-count { flex: 1 1 auto; font-size: var(--fs-s); color: var(--hint); }
.sel-btn {
  min-height: var(--h-btn);
  border: 1px solid var(--accent);
  background: transparent;
  color: var(--accent);
  font: inherit;
  font-size: var(--fs-m);
  font-weight: 500;
  padding: 0 14px;
  border-radius: var(--r-m);
  cursor: pointer;
}
.sel-btn.primary { background: var(--accent); color: var(--accent-text); }
.sel-btn:disabled { opacity: 0.45; cursor: default; }
.report .works-grid { padding-bottom: calc(80px + env(safe-area-inset-bottom)); }
.report .works-actions { z-index: 41; }
.report-bar .chat-title { text-align: left; }

/* ---------- карточка работы, меню ---------- */
.sheet {
  position: fixed;
  inset: 0;
  /* Клавиатура: лист — в видимой части экрана, а не под клавиатурой (iPhone
     не сжимает страницу, только видимую область). --vv-* ставит app.js. */
  top: var(--vv-top, 0px);
  bottom: auto;
  height: var(--vv-height, 100%);
  z-index: 45;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 16px 12px calc(12px + env(safe-area-inset-bottom));
  background: rgba(0, 0, 0, 0.45);
}
.sheet-card {
  width: 100%;
  max-width: 480px;
  max-height: 100%;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
  border-radius: var(--r-l);
  background: var(--bg);
  color: var(--text);
}
/* Главный снимок и «Заменить снимок» в правом верхнем углу серого поля: иконка-кнопка 34 без подложки, тёмно-серая
   стрелка --hint-strong (в тёмной теме — светло-серая), при наведении — цветом текста (2026-10-26, решение Александра). */
.ws-img-box { position: relative; line-height: 0; }
/* Ореол цвета фона: на сером поле не виден, а на самом снимке (горизонтальный во всю ширину) стрелка читается. */
.ws-img-box .ws-replace { position: absolute; top: 4px; right: 4px; background: transparent; color: var(--hint-strong); filter: drop-shadow(0 0 1px var(--bg)) drop-shadow(0 0 3px var(--bg)); }
.ws-img-box .ws-replace:hover { color: var(--text); }
.ws-img-box .ws-replace svg { width: 20px; height: 20px; }
.ws-img {
  width: 100%;
  max-height: 30vh;
  object-fit: contain;
  border-radius: var(--r-m);
  background: var(--soft-bg);
  cursor: zoom-in;
}
.field { display: flex; flex-direction: column; gap: 4px; min-width: 0; } /* подпись → поле — 4 везде (2026-10-25) */
.field > span { font-size: var(--fs-xs); color: var(--hint-strong); }
.field input, .field select {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--r-m);
  background: var(--soft-bg);
  color: var(--text);
  font-family: inherit;
  /* 16px — ниже этого iOS зумит страницу при фокусе на поле ввода */
  font-size: var(--fs-input);
  padding: 0 9px;
  /* Одна высота у полей и списков: списки браузер рисует по-своему. */
  height: var(--h-field);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}
.field select {
  padding-right: 28px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%238a8a8a' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
}
.field-row { display: flex; align-items: flex-end; gap: 8px; }
.field-row .field { flex: 1 1 0; }
.field-row .field.grow { flex: 2 1 0; }
.ws-price-row .ws-currency { flex: 0 0 76px; } /* «₽ €  $…» — узко; список цены и число делят остальное */
.times { padding-bottom: 9px; color: var(--hint); }
/* Карточка работы: поля обычные (34), подписи ближе к полям. */
#work-form { gap: 8px; }
/* Ничего не сжимается: высоту снимка app.js считает один раз при открытии (fitSheetImg),
   чтобы карточка помещалась без прокрутки. С клавиатурой карточка прокручивается к полю,
   а снимок не меняется — раньше он сжимался вместе с видимой частью экрана и скакал. */
#work-form > * { flex-shrink: 0; }
#work-form .times { padding-bottom: 6px; }
.sheet-actions { display: flex; align-items: center; gap: 8px; margin-top: 4px; }
/* Карточка работы (2026-10-18): × справа сверху, правки сохраняются сами; внизу
   корзина · «Обсудить с Юми» (второстепенная) · «Полный разбор» (основная) — поровну. */
/* «Сохранить» вместо «×» (2026-10-24): правки сохраняются сами, но крестик было страшно нажимать.
   Текстом цвета кнопки без рамки, справа сверху; после закрытия с правками — тост «Сохранено». */
.sheet-save {
  min-height: var(--h-btn); border: none; background: none; color: var(--accent); font: inherit;
  font-size: var(--fs-m); font-weight: 500; padding: 0 8px; cursor: pointer; flex: none;
}
/* Верхняя строка карточки: «＋ Контент для соцсетей» слева, «Сохранить» справа — оба вид «Добавить» (2026-10-25). */
#work-form .ws-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: -8px -8px -4px -8px; }
#work-form .ws-close { margin-left: auto; }
.ws-actions { margin-top: 8px; }
#work-form .ws-delete { color: var(--danger); margin-left: -7px; }
.ws-go { flex: 1 1 0; min-width: 0; padding: 0 8px; }
#work-form.in-picker .ws-go { display: none; }
/* Пункт листа: строка 44 px. .primary — главное действие листа (заливка акцентом),
   .muted — «Закрыть» / «Отмена» тихим текстом внизу. */
.menu-item {
  min-height: 44px;
  border: none;
  background: var(--soft-bg);
  color: var(--text);
  font: inherit;
  font-size: var(--fs-m);
  padding: 0 12px;
  border-radius: var(--r-m);
  cursor: pointer;
}
.prompt-form { display: flex; flex-direction: column; gap: 8px; }
.menu-item.primary { background: var(--accent); color: var(--accent-text); font-weight: 500; min-height: var(--h-btn); } /* 34, как все кнопки (2026-10-25) */
.menu-item.danger { color: var(--danger); }
.menu-item.muted { background: transparent; color: var(--hint-strong); font-weight: 500; min-height: var(--h-btn); } /* тихая: --hint-strong 500 (2026-10-25) */
/* Пакеты звёзд: строка «1000 ⭐   ~25 разборов и ~250 сообщений» — в одну строку на телефоне. */
.menu-item.pack { font-size: var(--fs-s); padding: 11px 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.menu-text { font-size: var(--fs-m); line-height: 1.45; }
.menu-text.menu-title { font-weight: 600; font-size: var(--fs-l); }
.menu-text.menu-note { font-size: var(--fs-s); color: var(--hint-strong); }


/* ---------- шапка чата без «‹ Чаты»: название слева, меню справа ---------- */
.chatbar { padding: 4px 6px 4px 14px; }
.chatbar .chat-title { text-align: left; }
.chatbar { gap: 2px; padding: 0 4px; }
.chatbar .chat-title { padding-left: 2px; }
/* ‹ все чаты, карандаш — новый чат, ⋯ в кружке — этот чат */
.chatbar-icon {
  flex: 0 0 auto;
  width: var(--h-icon);
  height: var(--h-icon);
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--accent);
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.chatbar-icon[hidden] { display: none; }
.chatbar-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
/* ⋯ «этот чат» — три точки без кружка, той же семьи, что карандаш и ‹
   (кружок рамкой на iPhone и Android выходил по-разному, 2026-10-11). */
.chatbar-icon svg.dots { fill: currentColor; stroke: none; }
.chatbar-icon:active { background: var(--soft-bg); }

/* «?» в шапке Юми: как работает Юми, данные */
/* Высота и контур — как у «Отзыв» и «Админка» */
/* Переключатель языка — левее «?»; он виден всегда (и на согласии), поэтому
   свободное место шапки отдаётся слева от него. */
.btn-lang {
  flex: 0 0 auto;
  height: calc(28px * var(--fs));
  margin-left: auto;
  border: 1px solid var(--border);
  border-radius: var(--r-m);
  background: transparent;
  color: var(--hint);
  padding: 0 8px;
  font: inherit;
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
}
.btn-lang:active { background: var(--soft-bg); }
.consent-lang { position: absolute; top: 12px; right: 16px; z-index: 1; }
/* Длинные тексты в разметке — в двух вариантах (см. i18n.js). */
html[lang="en"] .ru-only,
html:not([lang="en"]) .en-only { display: none !important; }

.btn-help {
  flex: 0 0 auto;
  width: calc(28px * var(--fs));
  height: calc(28px * var(--fs));
  border: 1px solid var(--border);
  border-radius: 50%;
  background: transparent;
  color: var(--hint);
  font: inherit;
  font-size: var(--fs-m);
  font-weight: 600;
  line-height: 1;
  padding: 0;
  cursor: pointer;
}
.btn-help[hidden] { display: none; }
.btn-help:active { background: var(--soft-bg); }

/* ---------- экран разбора: работы по две в ряд ---------- */
.report-works {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}
.report-works:empty { display: none; }
.report-works.single { grid-template-columns: 1fr; }
.report-works figure { margin: 0; min-width: 0; }
.report-works img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  background: var(--soft-bg);
  border-radius: var(--r-m);
  cursor: zoom-in;
}
.report-works.single img { aspect-ratio: auto; max-height: 50vh; }
.report-works figcaption {
  margin-top: 4px;
  font-size: var(--fs-xs);
  color: var(--hint-strong); /* под работой в документе — 13 серым (DESIGN.md → «Шрифт») */
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.report-body .md { white-space: pre-wrap; word-wrap: break-word; }
/* Обзор всех работ: абзацы блоками, под абзацем — миниатюры названных в нём
   работ. big — одна работа целиком на --soft-bg (как плитка), row — ряд мелких
   миниатюр 52, обрезанных в квадрат (как в строке серии). */
.report-body .ov-p { margin-bottom: 1.5em; }
.report-body .ov-p:last-child { margin-bottom: 0; }
.ov-works { display: flex; flex-wrap: wrap; gap: 8px; margin: -12px 0 20px; white-space: normal; line-height: 1.3; }
.ov-works figure { margin: 0; min-width: 0; }
.ov-works img { display: block; cursor: zoom-in; background: var(--soft-bg); }
.ov-works figcaption {
  width: 52px; margin-top: 2px; font-size: var(--fs-xs); color: var(--hint-strong); line-height: 1.3;
  text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ov-works.big img { width: 120px; height: 120px; object-fit: contain; border-radius: var(--r-m); }
.ov-works.row img { width: 52px; height: 52px; object-fit: cover; border-radius: var(--r-s); }
.report-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 22px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.report-actions:empty { display: none; }

/* ---------- вкладка «Разборы» ---------- */
.reports-list {
  flex: 1 1 auto;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 8px 12px calc(16px + env(safe-area-inset-bottom)); /* 8 сверху: первая строка — на той же высоте, что в «Работах» и «Сериях» */
}
.reports-list .empty { margin: 40px auto; }
.report-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  border: none;
  background: var(--soft-bg);
  color: var(--text);
  font: inherit;
  text-align: left;
  padding: 10px 12px;
  border-radius: var(--r-m);
  cursor: pointer;
}
.report-row-thumbs { display: flex; flex: 0 0 auto; }
.report-row-thumbs img {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: var(--r-s);
  border: 2px solid var(--bg);
  background: var(--bg);
}
.report-row-thumbs img + img { margin-left: -16px; }
.report-row-text { flex: 1 1 auto; min-width: 0; }

/* ---------- согласие и памятка о данных ---------- */
.consent-body { display: flex; flex-direction: column; justify-content: center; min-height: 100%; box-sizing: border-box; }
.consent-title { font-size: 1.3em; margin: 0 0 6px; }
.consent-text p { margin: 12px 0; }
.consent-list { margin: 12px 0; padding-left: 20px; }
.consent-list li { margin-bottom: 8px; }
.welcome-body .consent-title { margin-top: 0; }
.btn-primary[hidden] { display: none; }
.consent-ok { width: 100%; min-height: var(--h-field); margin-top: 12px; }
.link-btn { border: none; background: none; padding: 0; color: var(--accent); font: inherit; cursor: pointer; text-align: left; }
.privacy-body h1 { font-size: var(--fs-l); font-weight: 600; margin: 0 0 4px; }
.privacy-body h2 { font-size: var(--fs-m); font-weight: 600; margin: 20px 0 8px; color: var(--text); }
.privacy-body p, .privacy-body li { margin: 0 0 8px; }
.privacy-body ul { padding-left: 20px; margin: 0 0 8px; }
.privacy-body a { color: var(--accent); }
.privacy-body .updated { color: var(--hint-strong); font-size: var(--fs-s); margin-bottom: 12px; }
#privacy { z-index: 42; }
/* Общий лист меню — над просмотром во весь экран (50): из него открывается «Сохранить». */
#menu { z-index: 52; }

/* Ссылка-приглашение в меню «?» → «Пригласить друга». */
.invite-link {
  color: var(--hint);
  font-size: var(--fs-s);
  word-break: break-all;
  user-select: all;
  -webkit-user-select: all;
}
.muted-text { color: var(--hint); }

/* «Мои звёзды»: история баланса строками. */
.stars-line { font-variant-numeric: tabular-nums; padding: 2px 0; }
.stars-total { font-weight: 600; font-size: var(--fs-l); margin-bottom: 6px; }
.stars-line.muted-text { margin-top: 12px; font-size: var(--fs-s); color: var(--hint-strong); }
.stars-sum { font-weight: 600; margin-top: 4px; }

/* «Прежде чем начать»: кто пригласил и бонус. */
.consent-invite { font-weight: 600; }

/* Удалить себя: кнопка внизу «Данные и конфиденциальность» и экран после. */
.danger-btn {
  width: 100%;
  min-height: var(--h-field);
  margin: 24px 0 8px;
  padding: 0 16px;
  border: 1px solid var(--danger);
  border-radius: var(--r-m);
  background: transparent;
  color: var(--danger);
  font: inherit;
  cursor: pointer;
}
.deleted-screen { padding: 32px 20px; max-width: 480px; margin: 0 auto; }
.deleted-screen h1 { font-size: 1.3em; margin: 0 0 12px; }

/* ---------- ракурсы одной работы ---------- */
/* Пометка «3 снимка» поверх главного снимка — в сетке работ и в чате. */
.shots-badge {
  position: absolute;
  top: 6px;
  left: 6px;
  padding: 2px 7px;
  border-radius: var(--r-s);
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: var(--fs-xs);
  line-height: 1;
  pointer-events: none;
}
.gallery figure.has-badge { position: relative; }
.gallery .shots-badge { top: 4px; left: 4px; padding: 1px 6px; font-size: var(--fs-xs); }

/* Карточка работы: все снимки с подписями и «＋ Ракурс». */
/* Одной строкой. В карточке работы (с 2026-10-24) — до 5 ракурсов плитками 44 без подписей и «＋»:
   6 × 44 + 5 × 8 = 304 — ровно ширина карточки на 360 px. Этапы на экране контента — прежние 56 с подписью. */
.ws-shots { display: flex; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; gap: 8px; align-items: flex-start; }
.ws-shots::-webkit-scrollbar { display: none; }
.ws-shot { flex: none; }
.ws-shots:empty { display: none; }
.ws-shot {
  display: flex;
  flex-direction: column;
  gap: 3px;
  width: 56px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--text);
  font-family: inherit;
  cursor: pointer;
}
.ws-shot img {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: var(--r-s);
  border: 2px solid transparent;
  background: var(--soft-bg);
}
.ws-shot.main img { border-color: var(--accent); }
.ws-shot span {
  font-size: var(--fs-xs);
  color: var(--hint-strong);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ws-shot.add {
  height: 56px;
  align-items: center;
  justify-content: center;
  border: 1.5px dashed var(--border);
  border-radius: var(--r-s);
  color: var(--accent);
  font-size: var(--fs-s);
}
#ws-shots .ws-shot { width: 44px; }
#ws-shots .ws-shot img { width: 44px; height: 44px; }
#ws-shots .ws-shot.add.small { height: 44px; font-size: var(--fs-l); }
.ws-shots-hint { flex: 1 1 160px; font-size: var(--fs-xs); color: var(--hint); align-self: center; }

/* Экран разбора: ракурсы маленькими под главным снимком. */
.report-views { display: flex; gap: 6px; margin-top: 6px; justify-content: center; }
.report-views img,
.report-works.single .report-views img {
  width: 30%;
  max-width: 120px;
  aspect-ratio: 1;
  object-fit: cover;
  max-height: none;
}

/* ---------- сайт (data-platform="web") ---------- */
/* Только в Telegram / только на сайте. */
html[data-platform="web"] .tg-only,
html:not([data-platform="web"]) .web-only { display: none !important; }
.login-links { text-align: center; color: var(--hint); font-size: var(--fs-s); margin-top: 18px; }
.login-links a { color: var(--hint); }
.consent-text .web-only a { color: var(--accent); }
/* Кнопки входа — ссылки (уходят на Google / Telegram), вид как у кнопок. */
.login-btn { display: block; box-sizing: border-box; text-align: center; text-decoration: none; }
#login-buttons p { color: var(--hint); text-align: center; }
/* На широком экране — колонка по центру: приложение задумано под телефон.
   transform делает body опорой для position: fixed — окна, листы и экраны
   разбора остаются в колонке, а не растягиваются на всё окно. */
@media (min-width: 760px) {
  html[data-platform="web"] { background: var(--soft-bg); }
  html[data-platform="web"] body {
    max-width: 720px;
    margin: 0 auto;
    transform: translateZ(0);
    border-inline: 1px solid var(--border);
  }
}

/* ---------- серии (с 2026-10-15) ---------- */
.series-list {
  flex: 1 1 auto; display: flex; flex-direction: column; gap: 8px; overflow-y: auto;
  padding: 8px 12px calc(76px + env(safe-area-inset-bottom));
}
button.works-add { background: none; font-family: inherit; }
/* Пояснение, что такое серия, — над списком или вместо него. */
.series-about { font-size: var(--fs-m); color: var(--hint-strong); line-height: 1.45; margin: 0 2px 4px; }
/* Выбор работ для серии: в кружке — номер по порядку отметки. */
.work-check.num { font-size: var(--fs-s); font-weight: 600; color: var(--accent-text); display: flex; align-items: center; justify-content: center; }
.series-work { cursor: pointer; }
.series-list .empty { margin: 40px auto; }
/* Строка серии: миниатюры первых работ (первая — титульная) и название. */
.series-row {
  display: flex; flex-direction: column; align-items: stretch; gap: 8px; width: 100%;
  border: none; background: var(--soft-bg); color: var(--text); font: inherit; text-align: left;
  padding: 12px; border-radius: var(--r-m); cursor: pointer;
}
.series-thumbs { display: flex; gap: 4px; overflow: hidden; }
.series-thumbs img { width: 52px; height: 52px; flex: 0 0 auto; object-fit: cover; border-radius: var(--r-s); background: var(--bg); }
/* Название слева, «3 работы» справа — одной строкой. */
.series-row-line { display: flex; align-items: baseline; }
.series-row-title { flex: 0 1 auto; min-width: 0; font-size: var(--fs-m); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.series-row-sub { flex: 0 0 auto; font-size: var(--fs-s); color: var(--hint-strong); }
/* Лист серии: работы по порядку. */
.series-work { display: flex; align-items: center; gap: 12px; }
.series-work img { width: 44px; height: 44px; flex: 0 0 auto; object-fit: cover; border-radius: var(--r-s); background: var(--soft-bg); }
.series-work-title { font-size: var(--fs-m); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Серии на экране «＋»: строка кнопок, листается вбок. */
.picker-series { display: flex; gap: 8px; overflow-x: auto; padding: 0 12px 8px; scrollbar-width: none; }
.picker-series::-webkit-scrollbar { display: none; }
.picker-series button {
  flex: 0 0 auto; height: var(--h-btn); padding: 0 12px; border: 1px solid transparent; border-radius: var(--r-m);
  background: var(--soft-bg); color: var(--text); font: 500 var(--fs-s) -apple-system, BlinkMacSystemFont, sans-serif;
  white-space: nowrap; cursor: pointer;
}
.picker-series button.on { border-color: var(--accent); color: var(--accent); }
/* Под разбором: сохранить серию / принять порядок. */
.report-series { display: flex; flex-direction: column; align-items: center; gap: 8px; margin-top: 22px; }
.report-series:empty { display: none; }
.report-series .series-note { font-size: var(--fs-s); color: var(--hint-strong); text-align: center; }

/* ---------- экран серии: плитки по порядку, перетаскивание ---------- */
.series-body { flex: 1 1 auto; overflow-y: auto; padding: 12px 12px calc(84px + env(safe-area-inset-bottom)); }
.series-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 10px; }
.series-tile {
  position: relative; min-width: 0; cursor: grab;
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
  transition: opacity 0.15s;
}
.series-tile img {
  display: block; width: 100%; aspect-ratio: 1; object-fit: contain;
  border-radius: var(--r-m); background: var(--soft-bg); pointer-events: none;
}
/* Номер места — слева сверху; у первой под названием «титульная». */
/* Кружок номера — того же размера, что кружок «×» (20), и на той же высоте. */
.series-num {
  position: absolute; top: 8px; left: 8px; width: 20px; height: 20px; padding: 0;
  border-radius: 50%; background: var(--accent); color: var(--accent-text); /* круг, как значок (2026-10-25) */
  font-size: var(--fs-s); font-weight: 600; display: flex; align-items: center; justify-content: center;
}
/* «×» — убрать из серии: круглая зона нажатия 32, значок 14. */
.series-x {
  position: absolute; top: 2px; right: 2px; width: 32px; height: 32px; border: 0; padding: 0;
  border-radius: 50%; background: none; cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.series-x svg { width: 22px; height: 22px; }
.series-x circle { fill: rgba(0, 0, 0, 0.45); }
.series-x path { stroke: #fff; stroke-width: 1.8; stroke-linecap: round; fill: none; }
.series-cap { margin-top: 4px; font-size: var(--fs-s); font-weight: 600; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Перетаскивание: место плитки — блёклое, сама плитка едет за пальцем. */
.series-tile.placeholder { opacity: 0.25; }
.series-ghost {
  position: fixed; z-index: 70; pointer-events: none; transform: scale(1.06);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25); border-radius: var(--r-m); background: var(--bg);
}
.series-ghost .series-x { display: none; }
.works-actions .grow { flex: 1; }
/* «＋ Добавить работы» — справа вверху, вид «Добавить». */
.series-top { display: flex; justify-content: flex-end; margin: -4px 0 4px; }

/* ---------- оценка работы (закрытая проба с 2026-10-17; DESIGN.md → «Оценка работы») ---------- */
/* Пять строк уровней: ось 14/600, точки (круги 8, залитые — --accent), слово 13 --hint-strong;
   комментарий 14 под ними. «Смотрю» — 13 серым сверху, остальное — обычный текст ответа. */
.md.ev { white-space: normal; }
.ev-look { font-size: var(--fs-s); color: var(--hint-strong); margin-bottom: 12px; }
.ev-rows { display: flex; flex-direction: column; gap: 12px; }
.ev-head, .ws-eval-row { display: flex; align-items: center; gap: 8px; }
.ev-axis { font-weight: 600; }
.ev-word { font-size: var(--fs-s); color: var(--hint-strong); }
.ev-dots { display: inline-flex; gap: 4px; }
.ev-dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--border); }
.ev-dots i.on { background: var(--accent); }
.ev-text { margin-top: 2px; white-space: pre-wrap; }
.ev-rest { margin-top: 12px; white-space: pre-wrap; }
.ev-foot { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.ev-note { font-size: var(--fs-s); color: var(--hint-strong); text-align: center; }
.ev-btns { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
/* Лист «Не согласен»: с чем — кнопки как строка серий на «＋» (выбранная — рамка и текст --accent). */
.dis-lead { font-size: var(--fs-s); color: var(--hint-strong); }
.dis-targets { display: flex; flex-wrap: wrap; gap: 8px; }
.dis-targets button {
  height: var(--h-btn); padding: 0 12px; border: 1px solid transparent; border-radius: var(--r-m);
  background: var(--soft-bg); color: var(--text); font: 500 var(--fs-s) -apple-system, BlinkMacSystemFont, sans-serif; cursor: pointer;
}
.dis-targets button.on { border-color: var(--accent); color: var(--accent); }
.dis-note { min-height: 88px; }
/* Карточка работы: последняя оценка и кнопка. */
.ws-eval { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 12px; border-radius: var(--r-m); background: var(--soft-bg); }
.ws-eval-head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-bottom: 2px; }
.ws-eval-title { font-weight: 600; }
.ws-eval-sub { font-size: var(--fs-s); color: var(--hint-strong); }
.ws-eval-row .ev-axis { min-width: 104px; font-weight: 500; }
.ws-eval .report-open { margin-top: 6px; background: var(--bg); }

/* ---------- «Мой сайт» (этап 1, 2026-10-19; DESIGN.md → «Мой сайт») ---------- */
.site-body .works-head { padding: 16px 2px 8px; } /* 8 до строк: подпись группы не липнет к строке (решение Александра 2026-10-26; было 0) */
/* ↑↓ — порядок на странице: компактные (28, значок 18 — решение Александра 2026-10-26, исключение из 34), у всех строк
   в одном месте — слева от кружка отметки, по его центру; у крайних строк ненужная стрелка блёклая. */
.site-row { cursor: pointer; }
.site-row button.work-check { padding: 0; font: inherit; cursor: pointer; }
.site-row .site-move { position: absolute; top: 10px; right: 42px; display: flex; gap: 0; }
.site-move-btn { width: 28px; height: 28px; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--accent);
  display: flex; align-items: center; justify-content: center; cursor: pointer; }
.site-move-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.site-move-btn:disabled { opacity: 0.25; cursor: default; }
.site-move-btn:not(:disabled):active { background: var(--secondary-bg); }
.site-list { display: flex; flex-direction: column; gap: 8px; }
.site-addr { font-size: var(--fs-m); font-weight: 500; color: var(--accent); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Лист «Адрес страницы» (2026-10-27): полный адрес под полем одной строкой; занят или не те знаки — --accent. */
.site-slug-url { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu-text.menu-note.site-slug-warn { color: var(--accent); }
.series-row-note { font-size: var(--fs-s); color: var(--hint-strong); }
.series-row-note.todo { color: var(--accent); }
/* Серия на сайте — кружок отметки, как на плитке «＋». */
.site-row { position: relative; }
.site-row .work-check { top: 10px; right: 10px; font-size: var(--fs-m); }
.site-row.on .work-check { background: var(--accent); border-color: var(--accent); }
.site-line { display: flex; align-items: center; gap: 12px; }
.site-line img, .site-line .ph { width: 44px; height: 44px; object-fit: cover; border-radius: var(--r-s); flex: none; background: var(--secondary-bg); }
.site-line .t { font-size: var(--fs-m); font-weight: 500; }
.site-line .s { font-size: var(--fs-s); color: var(--hint-strong); }
.site-text { min-height: 88px; font-size: var(--fs-input); font-family: inherit; }
/* Заголовок листа и «×» одной строкой. */
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: -6px -6px 0 0; }
.sheet-head .sheet-save { margin-right: -2px; }
/* Цены и наличие */
.price-row { display: flex; gap: 12px; align-items: center; background: var(--soft-bg); border-radius: var(--r-m); padding: 8px 12px 8px 8px; }
.price-row > img { width: 44px; height: 44px; object-fit: cover; border-radius: var(--r-s); flex: none; background: var(--bg); }
.price-row .col { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.price-row .series-work-title { font-weight: 500; }
.price-row .field input, .price-row .field select { background-color: var(--bg); }
.price-row .field[hidden] { display: none; }
.site-currency select { width: 96px; } /* валюта над списком цен — узко, как в карточке */

/* Курс «Искусство видеть» (закрытый тест 2026-10-20, DESIGN.md → «Курс»): экраны как «Мой сайт». */
.series-row.locked { opacity: 0.55; }
.course-letter { font-size: var(--fs-m); line-height: 1.45; padding: 12px; background: var(--soft-bg); border-radius: var(--r-m); }
.course-task-body .works-head { padding: 16px 2px 4px; }
.course-text { font-size: var(--fs-m); line-height: 1.45; padding: 0 2px; }
.course-form { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }
.course-thumbs { padding: 0; }
.course-add { align-self: flex-start; padding: 0; height: var(--h-btn); }
.course-chat-btn { display: block; margin: 16px auto 0; }

/* Набор для соцсетей (с 2026-10-24, только владельцу; DESIGN.md → «Набор для соцсетей»).
   Экран — как «Мой сайт»: группы с подписью, строки на --soft-bg; слайды — лентой вбок. */
#work-form .ws-kit { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kit-form { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.kit-slides {
  display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x mandatory;
  margin: 0 -12px; padding: 0 12px; scroll-padding-inline: 12px; scrollbar-width: none;
}
.kit-slides::-webkit-scrollbar { display: none; }
.kit-slides img {
  flex: 0 0 auto; width: 62%; max-width: 280px; aspect-ratio: 4 / 5; object-fit: cover;
  border-radius: var(--r-m); background: var(--soft-bg); scroll-snap-align: start; cursor: zoom-in;
}
.kit-note { margin: 0 2px; font-size: var(--fs-s); color: var(--hint-strong); line-height: 1.45; }
.kit-block { padding: 12px; border-radius: var(--r-m); background: var(--soft-bg); font-size: var(--fs-m); line-height: 1.45; }
.kit-list { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; }
.kit-text { display: block; width: 100%; box-sizing: border-box; margin-top: 4px; min-height: 120px; }
#kit-screen .site-list > .report-open { align-self: center; margin-top: 4px; }
.kit-slides.story img { width: 42%; max-width: 190px; aspect-ratio: 9 / 16; }
/* Истории, обложка Reels и ролики — по центру экрана; карусель — лентой от левого края (Александр, 2026-10-24).
   Центр — полями у крайних картинок, а не justify-content: так лента не обрезается слева, если не влезет. */
.kit-slides.story > img:first-child { margin-left: auto; }
.kit-slides.story > img:last-child { margin-right: auto; }
.kit-video { display: block; margin: 0 auto; width: 52%; max-width: 230px; aspect-ratio: 9 / 16; border-radius: var(--r-m); background: var(--soft-bg); object-fit: cover;
  /* Safari (Telegram на iPhone и Mac) у <video> угол не скругляет — ролики выходили прямоугольными рядом со
     скруглёнными слайдами (2026-10-24); clip-path он соблюдает. */
  clip-path: inset(0 round var(--r-m)); }
.kit-stages { margin-top: 4px; }
/* Под подписью к посту (2026-10-25): поле → первая кнопка 16, между кнопками 12, до строки про канал — 8. */
.kit-channels { display: flex; flex-direction: column; align-items: center; gap: 12px; margin-top: 4px; }
.kit-channels > .kit-note { margin-top: -4px; }
#kit-screen .site-list > #kit-caption + .report-open { margin-top: 8px; }
.kit-channel { display: inline-flex; align-items: center; justify-content: center; max-width: 100%; white-space: pre; }
.kit-channel-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.kit-channels .kit-note { text-align: center; }
.kit-link { border: none; background: none; padding: 0; font: inherit; font-weight: 500; color: var(--accent); cursor: pointer; }
/* Экран набора (2026-10-24, ночь): заголовки групп жирные 14/600 цветом текста и с воздухом
   сверху и снизу — раньше подпись 13 серым прилипала к слайдам; под заголовком — строка «что это». */
#kit-body .works-head { padding: 24px 2px 4px; }
.group-title { font-size: var(--fs-m); font-weight: 600; color: var(--text); } /* заголовок группы контента (отдельный класс с 2026-10-25) */
.kit-desc { margin: 0 2px 4px; font-size: var(--fs-s); color: var(--hint-strong); line-height: 1.45; }
.kit-sub { margin-top: 8px; }
#kit-screen .site-list > .report-open { align-self: center; margin-top: 4px; }
/* «Подпись к посту…» — над полем на 4, как подписи полей (2026-10-25; было 22): «Скопировать» не раздвигает строку —
   зона нажатия 34 выходит за неё отрицательными полями. */
.kit-caption-head { display: flex; align-items: center; justify-content: space-between; margin: 8px 2px -8px; font-size: var(--fs-s); color: var(--hint-strong); }
.kit-caption-head .works-add { margin-top: -10px; margin-bottom: -10px; }

/* «Что на снимке?» — подписи снимка в две колонки (2026-10-24): кнопки 34 на --soft-bg, угол 12,
   14/500; длинная подпись переносится на вторую строку. Текущая — рамка и текст --accent. */
.label-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.label-chip {
  min-height: var(--h-btn); padding: 6px 10px; border: 1px solid transparent; border-radius: var(--r-m);
  background: var(--soft-bg); color: var(--text); font: inherit; font-size: var(--fs-m); font-weight: 500;
  line-height: 1.3; text-align: center; cursor: pointer;
}
.label-chip.on { border-color: var(--accent); color: var(--accent); }
.label-chip.wide { grid-column: span 2; }
/* Строка работы на экране контента: «Детали — …», «Интерьер — …»; подпись пункта — 500 цветом текста. */
.kit-row-item { line-height: 1.3; margin-top: 2px; }
.kit-row-item b { font-weight: 500; color: var(--text); }
.kit-row-note { margin-top: 8px; line-height: 1.3; }
.kit-work-row .site-line { align-items: flex-start; }

/* ---------- Маршруты (с 2026-10-26, за флагом YUMI_ROUTES; DESIGN.md → «Маршруты», public/routes-ui.js) ---------- */
/* Вопрос о цели: шесть целей — как задачи стартового экрана, «Свободно» — на --soft-bg цветом текста. */
.menu-item.start-item.free { background: var(--soft-bg); color: var(--text); }
/* Строка маршрута под вкладками — как «Юми обновилась», но на --soft-bg; тап по тексту — карточка маршрута. */
.route-bar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: var(--h-btn);
  margin: 8px 12px 0;
  padding: 0 4px 0 12px;
  border-radius: var(--r-m);
  background: var(--soft-bg);
}
.route-bar-text {
  flex: 1 1 auto;
  min-width: 0;
  height: var(--h-btn);
  padding: 0;
  border: none;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: var(--fs-s);
  line-height: 1.3;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.route-bar-go { flex: 0 0 auto; }
/* Карточка маршрута: шаги строками 14 — номер (или ✓), название, цена 13 справа. */
.route-steps { display: flex; flex-direction: column; gap: 4px; }
.route-step { display: flex; align-items: baseline; gap: 8px; font-size: var(--fs-m); line-height: 1.3; }
.route-step.now .route-step-name { font-weight: 600; }
.route-step-n { flex: 0 0 auto; min-width: 16px; color: var(--hint-strong); }
.route-step-n.ok { color: var(--accent); }
.route-step-name { flex: 1 1 auto; min-width: 0; }
.route-step-opt { font-size: var(--fs-s); color: var(--hint-strong); white-space: nowrap; }
.route-step-price { flex: 0 0 auto; font-size: var(--fs-s); color: var(--hint-strong); }
.menu-text.route-sum { font-weight: 600; }
.menu-text.menu-note.route-short { color: var(--accent); }
/* Строка пути у работы и серии: сделанное серым, следующий шаг — --accent 500. */
.path-line {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--hint-strong);
  font: inherit;
  font-size: var(--fs-s);
  line-height: 1.3;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.path-next { color: var(--accent); font-weight: 500; }
.path-line.tile { margin-top: 2px; }
.series-row .path-line { margin-top: -4px; } /* 4 под названием: у строки серии gap 8 */
.series-body > .path-line { margin: 0 2px 8px; }
#ws-path { min-height: 18px; }
/* Развилка под разбором: строка 13 по центру и второстепенные кнопки. */
.route-fork { display: flex; flex-direction: column; align-items: center; gap: 8px; margin-top: 16px; }
.route-fork .series-note { font-size: var(--fs-s); color: var(--hint-strong); text-align: center; line-height: 1.45; }
/* «Как работает Юми» под флагом: формула А′ вместо прежней. */
html:not(.routes) .routes-only, html:not(.talk) .talk-only { display: none !important; }
/* «Разговор»: в строке чата нет ‹ (к списку — вкладка «Чаты») и карандаша (новый чат — в «⋯»); строка той же высоты,
   и когда «⋯» нет (новый чат). */
html.talk #chat-back, html.talk #chat-new { display: none !important; }
html.talk .chatbar { min-height: calc(var(--h-icon) + 8px); padding-left: 12px; } /* название — от края экрана 12 */
/* Формула А′ — и у маршрутов, и у третьей версии «Разговор» (html.talk). */
html:not(.routes):not(.talk) .v2-only, html.routes .no-routes, html.talk .no-routes { display: none !important; }

/* «Что Юми помнит» (память о практике, с 2026-10-27): поля в две строки — как тексты «О вас», ниже. */
.mem-text { min-height: 56px; font-size: var(--fs-input); font-family: inherit; }

/* Ответ с поиском в интернете (с 2026-10-27, YUMI_WEB): строка 13 `--hint-strong` под пузырём — сколько поисков и
   сколько стоил ответ; «Юми ищет в интернете…» — та же строка ожидания, что «Юми думает». */
.web-note { margin-top: 8px; font-size: var(--fs-s); line-height: 1.3; color: var(--hint-strong); }
.msg .web-wait { display: block; margin-top: 8px; }

/* Эскиз по идее (с 2026-10-27, YUMI_SKETCH): картинки — как визуализация (.render-img), под ними подпись 13
   `--hint-strong` «Набросок ИИ»; в листе — число вариантов кнопками «Что на снимке?» в четыре колонки. */
.sketch-cap { margin-top: 4px; font-size: var(--fs-s); line-height: 1.3; color: var(--hint-strong); }
.label-grid.sketch-count { grid-template-columns: repeat(4, 1fr); }
