/* ═══ ФОРУМ — ВИД «ВОПРОС-ОТВЕТ» ═══════════════════════════════════════════
   Как GitHub Discussions / Stack Overflow, а не как чат: слева список
   вопросов со статусом (решён / есть ответы / ждёт ответа), справа открытый
   вопрос — карточкой сверху, под ним ответ-решение, дальше остальные ответы
   с голосом «полезно» (▲) слева. Личные сообщения остаются перепиской
   пузырями — это разговор двоих, а не вопрос для всех.

   Один файл и для программы на компьютере, и для телефона (блок body.m в
   конце). Подключается ПОСЛЕ style.css и перекрывает старый вид форума;
   mobile.css отвечает только за раскладку на два экрана.

   Правила:
   • цвета — только из темы программы (--bg, --card, --card2, --text,
     --muted, --acc2, --green), поэтому форум подходит к любой теме, в том
     числе к светлой;
   • акцент (--acc2) — только у «Задать вопрос» и кнопки отправки,
     зелёный — только у решённого;
   • рамок почти нет: блоки отделяются фоном и воздухом. */

.fx-wrap {
  --fx-line: color-mix(in srgb, var(--text) 8%, transparent);
  --fx-hover: color-mix(in srgb, var(--text) 4%, transparent);
  --fx-soft: color-mix(in srgb, var(--text) 55%, var(--bg));
  --fx-col: 860px;                     /* ширина колонки чтения */
  --fx-search-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23889' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-3.5-3.5'/%3E%3C/svg%3E");
  /* «есть ответы» — цветом акцента темы; на телефоне акцент красный, а
     красный значок читается как ошибка, поэтому там он нейтральный */
  --fx-ans: color-mix(in srgb, var(--acc2) 70%, var(--text));
  --fx-ans-bg: color-mix(in srgb, var(--acc2) 16%, transparent);
}
.fx-wrap, .fx-wrap button, .fx-wrap input, .fx-wrap textarea {
  font-family: var(--sans);
  letter-spacing: 0; text-transform: none;
}
/* Форум растянут на всю область отрицательными полями под отступы .content
   (22px 30px). Высоту добавляем на те же поля — иначе под полем ввода
   оставалась пустая полоса. */
.fx-wrap { height: calc(100% + 44px); border-top: 0; background: var(--bg); }

/* ── Левая колонка: навигация и список вопросов ─────────────────────────── */
.fx-side {
  width: 348px; padding: 22px 14px 10px; gap: 0;
  background: var(--bg); border-right: 1px solid var(--fx-line);
}
.fx-side-head { margin: 0 6px 16px; }
.fx-side-title { display: block; font-size: 21px; font-weight: 700; letter-spacing: -.02em; color: var(--text); }
.fx-side-sub { font-size: 13px; margin-top: 3px; color: var(--muted); letter-spacing: 0; }

/* «Вопросы / Личные» — сегмент с бегунком-подложкой */
.fx-mode {
  display: flex; padding: 3px; margin: 0 0 12px; gap: 0;
  background: var(--card); border: 0; border-radius: 12px;
}
.fx-mode-btn {
  position: relative; z-index: 1; flex: 1; display: flex; align-items: center; justify-content: center;
  gap: 6px; min-height: 34px; padding: 0 8px; border: 0 !important; border-radius: 9px;
  background: transparent !important; color: var(--muted); cursor: pointer;
  font-size: 13.5px; font-weight: 500; white-space: nowrap;
}
.fx-mode-btn:hover { color: var(--text); }
.fx-mode-btn.active { color: var(--text); font-weight: 600; }
.fx-mode-ind {
  top: 3px; bottom: 3px; height: auto; border-radius: 9px; z-index: 0;
  background: var(--card2) !important; box-shadow: 0 1px 2px rgba(0, 0, 0, .18);
}
.fx-mode-badge {
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--acc2); color: #fff; font-size: 11px; font-weight: 600; line-height: 18px; text-align: center;
}

/* «Задать вопрос» — главная кнопка колонки */
.fx-new {
  width: 100%; min-height: 42px; margin: 0 0 12px; border-radius: 12px;
  background: var(--acc2) !important; color: #fff !important;
  font-size: 14px; font-weight: 600; letter-spacing: 0; white-space: nowrap;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .08) inset; transform: none !important;
}
.fx-new:hover { filter: brightness(1.08); }
.fx-new:active { filter: brightness(.95); }

/* Поиск: лупа нарисована фоном (цвет подходит и тёмным, и светлой теме).
   Селектор из трёх классов — светлая тема в style.css переписывает фон
   полей правилом :root.light .fx-search (вес трёх классов), и лупа пропадала. */
.fx-wrap .fx-side .fx-search {
  height: 40px; margin: 0 0 10px; padding: 0 14px 0 38px; border-radius: 12px;
  background: var(--card) no-repeat 13px 50% / 16px var(--fx-search-ico);
  border: 1px solid transparent; font-size: 14px; color: var(--text);
}
.fx-wrap .fx-side .fx-search:focus { border-color: color-mix(in srgb, var(--acc2) 55%, transparent); outline: none; }

/* Фильтры «Все / Без ответа / Решённые» — пилюли с числом */
.fx-tabs { display: flex; gap: 6px; margin: 0 0 8px; padding: 0; background: transparent; }
.fx-tab {
  position: relative; flex: 0 0 auto; display: flex; align-items: center; gap: 6px;
  min-height: 30px; padding: 0 12px; border: 1px solid var(--fx-line) !important; border-radius: 999px;
  background: transparent !important; color: var(--muted); cursor: pointer;
  font-size: 12.5px; font-weight: 500; letter-spacing: 0; white-space: nowrap;
}
.fx-tab:hover { color: var(--text); background: var(--fx-hover) !important; }
.fx-tab.active {
  color: var(--text); font-weight: 600;
  background: var(--card2) !important; border-color: transparent !important;
}
.fx-tab-n { font-size: 11.5px; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
.fx-tab.active .fx-tab-n { color: var(--text); opacity: .7; }
.fx-tab-ind { display: none; }

/* Список вопросов */
.fx-topics { gap: 1px; margin: 0 -4px; padding: 0 4px; }
.fx-topic {
  position: relative; gap: 12px; padding: 11px 10px; border: 0 !important; border-radius: 12px;
  align-items: flex-start; transition: background .12s ease;
}
.fx-topic:hover { background: var(--fx-hover); }
.fx-topic.active { background: var(--card); }
.fx-topic-main { padding-top: 1px; }
.fx-topic-title {
  font-size: 14px; font-weight: 500; line-height: 1.35; color: var(--text); letter-spacing: 0;
  white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.fx-topic-meta { font-size: 12px; margin-top: 4px; color: var(--muted); }
.fx-topic-author { color: var(--fx-soft); }
/* непрочитанное — жирный заголовок и точка у значка статуса */
.fx-topic.unread .fx-topic-title { font-weight: 700; }
.fx-topic.unread::before {
  content: ""; position: absolute; left: 6px; top: 10px; z-index: 1;
  width: 8px; height: 8px; margin: 0; border-radius: 50%;
  background: var(--acc2); box-shadow: 0 0 0 2px var(--bg);
}

/* Значок статуса вопроса */
.fx-status {
  width: 32px; height: 32px; flex-shrink: 0; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
}
.fx-status svg { display: block; }
.fx-status.solved { background: color-mix(in srgb, var(--green) 16%, transparent); color: var(--green); }
.fx-status.answered { background: var(--fx-ans-bg); color: var(--fx-ans); }
.fx-status.open {
  background: transparent; color: var(--muted);
  box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--muted) 45%, transparent);
}

/* Число ответов справа */
.fx-count {
  flex-shrink: 0; display: flex; align-items: center; gap: 4px; margin-top: 2px;
  font-size: 12px; font-weight: 600; color: var(--fx-soft); font-variant-numeric: tabular-nums;
}
.fx-count svg { opacity: .75; }
.fx-count.zero { color: var(--muted); opacity: .6; }
.fx-topic-del { margin-top: 2px; }

/* Бейдж непрочитанных в личных */
.fx-badge {
  min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; align-self: center;
  display: flex; align-items: center; justify-content: center;
  background: var(--acc2); color: #fff; font-size: 11.5px; font-weight: 600;
}

/* Кружки с инициалами */
.fx-ava {
  width: 36px; height: 36px; font-size: 13px; font-weight: 600;
  background: var(--card2) !important; color: var(--text) !important;
}
.fx-topic .fx-ava { width: 38px; height: 38px; }
.fx-ava-hidden, .fx-ava.fx-ava-hidden { background: none !important; }

.fx-solved-tag, .fx-solution-tag {
  display: inline-flex; align-items: center; gap: 4px; border-radius: 999px;
  font-size: 11.5px; font-weight: 600; letter-spacing: 0; text-transform: none;
  font-family: inherit; padding: 2px 9px;
  background: color-mix(in srgb, var(--green) 16%, transparent); color: var(--green);
}

/* ── Правая часть ───────────────────────────────────────────────────────── */
.fx-main { background: var(--bg); }

/* Шапка открытого вопроса: крупный заголовок по колонке чтения */
.fx-head {
  gap: 12px; align-items: flex-start; background: var(--bg);
  padding: 20px max(32px, calc((100% - var(--fx-col)) / 2)) 16px;
  border-bottom: 1px solid var(--fx-line);
}
.fx-head-main { min-width: 0; flex: 1; }
.fx-head-title {
  font-size: 20px; font-weight: 700; line-height: 1.3; letter-spacing: -.01em; color: var(--text);
}
.fx-head-title .fx-solved-tag { margin-right: 8px; vertical-align: 3px; }
.fx-head-sub { font-size: 13px; margin-top: 5px; color: var(--muted); }
.fx-back {
  width: 34px; height: 34px; flex-shrink: 0; padding: 0; margin-top: -1px;
  border: 0 !important; border-radius: 10px;
  background: var(--card) !important; color: var(--text); font-size: 18px;
}
.fx-back:hover { background: var(--card2) !important; }
.fx-ghost {
  border: 0; border-radius: 10px; background: var(--card); color: var(--text);
  font-size: 13px; font-weight: 500; padding: 9px 16px; white-space: nowrap;
}
.fx-ghost:hover { background: var(--card2); color: var(--text); }

/* Лента — колонкой чтения по центру */
.fx-feed { padding: 22px 32px 16px; gap: 8px; }
.fx-feed > * { width: 100%; max-width: var(--fx-col); margin-left: auto; margin-right: auto; }

/* Общие части сообщения */
.fx-bubble { position: relative; border: 0 !important; box-shadow: none; min-width: 0; }
.fx-msg-head { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; margin-bottom: 6px; }
.fx-msg-author { font-size: 13.5px; font-weight: 600; color: var(--text); letter-spacing: 0; }
.fx-msg-date { font-size: 12px; color: var(--muted); }
.fx-rating { font-size: 11.5px; font-weight: 600; color: var(--warn); }
.fx-edited { font-size: 11.5px; font-style: normal; color: var(--muted); }
.fx-text { font-size: 14.5px; line-height: 1.6; color: var(--text); }
.fx-files { gap: 8px; margin-top: 10px; }
.fx-img { max-width: 280px; max-height: 200px; border-radius: 10px; }
.fx-file {
  gap: 8px; padding: 8px 12px; border: 1px solid var(--fx-line); border-radius: 10px;
  background: color-mix(in srgb, var(--bg) 50%, transparent); font-size: 12.5px; color: var(--text);
}
.fx-file:hover { color: var(--text); background: var(--fx-hover); border-color: color-mix(in srgb, var(--text) 18%, transparent); }
.fx-file-ico { color: var(--acc2); }

/* ── Вопрос и ответы (.fx-qa) ───────────────────────────────────────────── */
.fx-qa .fx-msg {
  max-width: var(--fx-col); align-self: stretch; align-items: flex-start;
  flex-direction: row; gap: 12px;
}
.fx-qa .fx-bubble, .fx-qa .fx-msg.own .fx-bubble { flex: 1; max-width: none; background: var(--card) !important; }

/* Сам вопрос — главная карточка */
.fx-question .fx-bubble { padding: 18px 22px 20px; border-radius: 16px; }
.fx-question .fx-msg-head { margin-bottom: 12px; }
.fx-question .fx-ava { width: 36px; height: 36px; }
.fx-question .fx-text { font-size: 15px; line-height: 1.65; }

/* «3 ответа» — разделитель между вопросом и ответами */
.fx-qa-count {
  display: flex; align-items: center; gap: 5px; margin-top: 14px; padding: 0 0 6px 2px;
  font-size: 14px; font-weight: 600; color: var(--text);
}
.fx-qa-count::after { content: ""; flex: 1; height: 1px; margin-left: 8px; background: var(--fx-line); }
.fx-qa-none { font-weight: 500; color: var(--muted); }

/* Ответ: голос слева, карточка справа */
.fx-answer .fx-bubble { padding: 14px 18px; border-radius: 14px; }
.fx-answer .fx-ava-sm, .fx-ava.fx-ava-sm { width: 24px; height: 24px; font-size: 10px; }
.fx-answer.own .fx-bubble { box-shadow: inset 3px 0 0 color-mix(in srgb, var(--acc2) 70%, transparent) !important; }
.fx-answer.solution .fx-bubble {
  background: color-mix(in srgb, var(--green) 6%, var(--card)) !important;
  box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--green) 50%, transparent) !important;
}
.fx-answer .fx-solution-tag { margin-bottom: 10px; }

.fx-vote {
  width: 46px; flex-shrink: 0; display: flex; flex-direction: column; align-items: center; gap: 0;
  padding: 6px 0 8px; border-radius: 12px; cursor: pointer; user-select: none;
  border: 1px solid var(--fx-line) !important; background: transparent !important; color: var(--muted);
  font-size: 13px; font-weight: 600; min-height: 0;
}
.fx-vote svg { display: block; }
.fx-vote .fx-like-ico { font-size: 0; line-height: 0; }
.fx-vote-n { font-variant-numeric: tabular-nums; line-height: 1; color: var(--text); }
.fx-vote:hover { color: var(--text); background: var(--fx-hover) !important; border-color: color-mix(in srgb, var(--text) 20%, transparent) !important; }
.fx-vote.on {
  color: var(--text); background: color-mix(in srgb, var(--text) 12%, transparent) !important;
  border-color: color-mix(in srgb, var(--text) 30%, transparent) !important;
}
.fx-vote.off { cursor: default; opacity: .55; }
.fx-vote.off:hover { background: transparent !important; border-color: var(--fx-line) !important; }

/* Действия под ответом — тихие пилюли */
.fx-actions { gap: 6px; margin-top: 12px; flex-wrap: wrap; }
.fx-thanks, .fx-solve, .fx-got {
  display: inline-flex; align-items: center; gap: 5px; min-height: 28px; padding: 0 12px;
  border: 1px solid var(--fx-line) !important; border-radius: 999px; background: transparent;
  color: var(--muted); font-size: 12.5px; font-weight: 500; letter-spacing: 0; text-transform: none; white-space: nowrap;
}
.fx-thanks:hover { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 45%, transparent) !important; background: color-mix(in srgb, var(--warn) 8%, transparent); }
.fx-tok-ico { font-size: 11px; color: var(--warn); }
.fx-solve:hover { color: var(--green); border-color: color-mix(in srgb, var(--green) 50%, transparent) !important; }
.fx-solve.on {
  color: var(--green); background: color-mix(in srgb, var(--green) 12%, transparent);
  border-color: color-mix(in srgb, var(--green) 40%, transparent) !important;
}
.fx-got {
  color: var(--warn); font-weight: 600; border-color: transparent !important;
  background: color-mix(in srgb, var(--warn) 12%, transparent);
}

/* Всплывашка «Спасибо мастеру» и перевод/счёт в личных */
.fx-thanks-pop {
  width: 284px; padding: 14px; border-radius: 14px;
  background: var(--card2); border: 1px solid var(--fx-line);
  box-shadow: 0 16px 40px rgba(0, 0, 0, .35);
}
.fx-thanks-title { font-family: inherit; font-size: 13px; font-weight: 600; margin-bottom: 10px; }
.fx-thanks-row { gap: 6px; }
.fx-thanks-sum {
  min-width: 38px; padding: 7px 10px; border-radius: 9px; text-align: center;
  background: var(--bg); border: 1px solid var(--fx-line); font-size: 12.5px; font-weight: 600;
}
.fx-thanks-input { border-radius: 9px; border-color: var(--fx-line); font-size: 12.5px; padding: 7px 8px; }
.fx-thanks-ok { border-radius: 9px; padding: 7px 12px; font-size: 12.5px; }
.fx-thanks-hint { font-size: 11.5px; }

/* ── Личные сообщения: переписка пузырями ──────────────────────────────── */
.fx-feed:not(.fx-qa) { gap: 4px; }
.fx-feed:not(.fx-qa) .fx-msg { max-width: min(78%, 640px); align-items: flex-end; gap: 8px; margin-left: 0; margin-right: 0; }
.fx-feed:not(.fx-qa) .fx-msg:not(.own) { align-self: flex-start; }
.fx-feed:not(.fx-qa) .fx-msg.own { align-self: flex-end; flex-direction: row-reverse; }
.fx-feed:not(.fx-qa) .fx-msg.own .fx-ava { display: none; }
.fx-feed:not(.fx-qa) .fx-ava { width: 30px; height: 30px; font-size: 11px; }
.fx-feed:not(.fx-qa) .fx-bubble {
  padding: 8px 13px; border-radius: 18px 18px 18px 6px; background: var(--card);
}
.fx-feed:not(.fx-qa) .fx-msg.own .fx-bubble {
  border-radius: 18px 18px 6px 18px;
  background: color-mix(in srgb, var(--acc2) 22%, var(--card)) !important;
}
.fx-feed:not(.fx-qa) .fx-msg-head { margin-bottom: 2px; }
.fx-feed:not(.fx-qa) .fx-msg.own .fx-msg-author { display: none; }
.fx-feed:not(.fx-qa) .fx-text { font-size: 14.5px; line-height: 1.5; }
/* лента личных — узкой колонкой, но пузыри прижаты к своим краям колонки */
.fx-feed:not(.fx-qa) { padding-left: max(32px, calc((100% - var(--fx-col)) / 2)); padding-right: max(32px, calc((100% - var(--fx-col)) / 2)); }
.fx-feed:not(.fx-qa) > * { max-width: none; width: auto; margin-left: 0; margin-right: 0; }
.fx-feed:not(.fx-qa) > .fx-msg { max-width: min(78%, 640px); }
.fx-read { font-size: 11px; }

/* ── Поле ввода: одна капсула, скрепка и отправка внутри ────────────────── */
.fx-composer { padding: 10px 32px 18px; background: var(--bg); border-top: 0; }
.fx-composer > * { max-width: var(--fx-col); margin-left: auto; margin-right: auto; }
.fx-composer-row {
  gap: 4px; align-items: flex-end; padding: 5px; border-radius: 16px;
  background: var(--card); border: 1px solid var(--fx-line);
  transition: border-color .15s ease;
}
.fx-composer-row:focus-within { border-color: color-mix(in srgb, var(--acc2) 55%, transparent); }
.fx-composer-area {
  min-height: 40px; max-height: 160px; padding: 10px 6px; border: 0 !important; border-radius: 0;
  background: transparent !important; color: var(--text); font-size: 14.5px; box-shadow: none !important;
}
.fx-composer-area:focus { outline: none; }
.fx-icon-btn {
  width: 40px; height: 40px; border: 0 !important; border-radius: 12px;
  background: transparent !important; color: var(--muted); font-size: 20px;
}
.fx-icon-btn:hover { color: var(--text); background: var(--card2) !important; }
.fx-send {
  width: 40px; height: 40px; border-radius: 12px !important; font-size: 15px;
  background: var(--acc2) !important; color: #fff !important; transform: none !important;
}
.fx-send:hover { filter: brightness(1.08); }
.fx-chip { border-radius: 999px; background: var(--card); border: 1px solid var(--fx-line); font-size: 12px; }

/* ── Приветствие, форма нового вопроса, выбор собеседника ───────────────── */
.fx-welcome { gap: 8px; }
.fx-welcome-ico {
  width: 64px; height: 64px; margin-bottom: 8px; border-radius: 20px;
  display: flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--acc2) 14%, var(--card));
  color: color-mix(in srgb, var(--acc2) 70%, var(--text));
}
.fx-welcome-title { display: block; font-size: 22px; font-weight: 700; letter-spacing: -.02em; }
.fx-welcome-text { font-size: 14px; line-height: 1.65; }
.fx-new-big { width: auto; padding: 0 24px; margin-top: 14px; }

.fx-form { width: 100%; max-width: 760px; margin: 0 auto; padding: 32px; gap: 12px; }
.fx-form-title { display: block; font-size: 22px; font-weight: 700; letter-spacing: -.01em; text-transform: none; margin-bottom: 6px; }
.fx-input, .fx-area {
  border: 1px solid var(--fx-line); border-radius: 12px; background: var(--card);
  font-size: 14.5px; padding: 12px 14px; color: var(--text);
}
.fx-form > .fx-input:first-of-type { font-size: 16px; font-weight: 600; padding: 14px 16px; }
.fx-input:focus, .fx-area:focus { border-color: color-mix(in srgb, var(--acc2) 60%, transparent); outline: none; }
.fx-form .fx-icon-btn { width: 44px; height: 44px; border: 1px dashed color-mix(in srgb, var(--text) 18%, transparent) !important; font-size: 20px; }
.fx-send-btn {
  border-radius: 12px; min-height: 42px; padding: 0 24px; font-size: 14px; font-weight: 600; letter-spacing: 0;
  background: var(--acc2) !important; color: #fff !important; white-space: nowrap;
}
.fx-picker .fx-topic { align-items: center; }
.fx-empty { color: var(--muted); font-size: 13.5px; }

/* Регистр надписей приводит fxFixCase (app.js): «ВОПРОСЫ» → «Вопросы». */
.fx-side-title, .fx-welcome-title, .fx-form-title, .fx-top-title { display: block; }

/* ── Изменить / удалить сообщение ────────────────────────────────────────
   Панель в правом верхнем углу карточки. На компьютере видна при наведении,
   на телефоне скрыта — её открывает долгое нажатие (mobile.js). */
.fx-tools {
  position: absolute; top: 8px; right: 8px; display: flex; gap: 2px;
  padding: 2px; border-radius: 10px; background: var(--card2);
  opacity: 0; pointer-events: none; transition: opacity .12s ease;
}
.fx-msg:hover .fx-tools, .fx-tools:focus-within { opacity: 1; pointer-events: auto; }
.fx-tool {
  width: 28px; height: 28px; display: flex; align-items: center; justify-content: center;
  border: 0; border-radius: 8px; background: transparent; color: var(--muted);
  font-size: 13px; cursor: pointer;
}
.fx-tool:hover { background: var(--bg); color: var(--text); }
.fx-tool.fx-del:hover { color: #e5484d; }

/* ═══ УДОБСТВА ═════════════════════════════════════════════════════════════ */

/* Фильтров может быть четыре («Мои») — в одну строку, компактнее; если
   перевод длиннее, строка листается вбок, а не переносится */
.fx-tabs { gap: 4px; overflow-x: auto; scrollbar-width: none; flex-shrink: 0; }
.fx-tabs::-webkit-scrollbar { display: none; }
.fx-tabs .fx-tab { padding: 0 10px; gap: 5px; }

/* Строки списка не сжимаются: в колонке фиксированной высоты флекс
   сплющивал их, и текст налезал на соседнюю строку */
.fx-topic { flex-shrink: 0; }
.fx-topic-meta { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fx-topic-side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex-shrink: 0; margin-top: 1px; }
.fx-topic-time { font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.fx-topic-side .fx-count { margin-top: 0; }
.fx-topic.unread .fx-topic-time { color: var(--text); font-weight: 600; }

/* файл рядом с фото не растягивается на высоту фото */
.fx-files { align-items: flex-start; }

/* Список: начало текста вопроса и кто ответил последним */
.fx-topic-ex {
  margin-top: 3px; font-size: 12.5px; line-height: 1.4; color: var(--muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.fx-topic-last { color: var(--muted); }
.fx-topic-last > span:first-child { color: var(--muted); }
.fx-mark {
  background: color-mix(in srgb, var(--warn) 30%, transparent); color: inherit;
  border-radius: 3px; padding: 0 1px;
}

/* Личные: время и непрочитанные справа */
.fx-dlg-side { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; flex-shrink: 0; align-self: center; }
.fx-dlg-time { font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.fx-dlg-last { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* «Ответить» — такая же тихая пилюля, как «Спасибо» */
.fx-reply {
  display: inline-flex; align-items: center; min-height: 28px; padding: 0 12px; cursor: pointer;
  border: 1px solid var(--fx-line); border-radius: 999px; color: var(--muted);
  font-size: 12.5px; font-weight: 500; white-space: nowrap; transition: color .15s ease, background .15s ease;
}
.fx-reply::before { content: "↩"; margin-right: 5px; font-size: 13px; }
.fx-reply:hover { color: var(--text); background: var(--fx-hover); }
.fx-question .fx-actions { margin-top: 14px; }

/* Кнопка «↓» над полем ввода */
.fx-main { position: relative; }
.fx-jump {
  position: absolute; right: max(40px, calc((100% - var(--fx-col)) / 2 + 8px)); bottom: 96px; z-index: 5;
  width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--fx-line);
  background: var(--card2); color: var(--text); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .3);
  opacity: 0; transform: translateY(8px) scale(.9); pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
}
.fx-jump svg { transform: rotate(180deg); }
.fx-jump.show { opacity: 1; transform: none; pointer-events: auto; }
.fx-jump-n:empty { display: none; }
.fx-jump-n {
  position: absolute; top: -6px; right: -4px; min-width: 20px; height: 20px; padding: 0 5px;
  border-radius: 10px; background: var(--acc2); color: #fff;
  font-size: 11px; font-weight: 700; line-height: 20px; text-align: center;
}

/* Вложения до отправки: у картинок — миниатюра */
.fx-chip { padding: 4px 10px 4px 12px; gap: 8px; }
.fx-chip-img { padding-left: 4px; }
.fx-chip-thumb { width: 30px; height: 30px; object-fit: cover; border-radius: 999px; display: block; }
.fx-chip-name { max-width: 220px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fx-form-hint { font-size: 12.5px; color: var(--muted); }

/* Файл тащат мышью на поле — подсвечиваем, куда отпускать */
.fx-drop { outline: 2px dashed color-mix(in srgb, var(--acc2) 70%, transparent); outline-offset: 4px; border-radius: 16px; }
.fx-composer.fx-drop { outline-offset: -6px; }

/* Просмотр фото на весь экран */
.fx-lb {
  position: fixed; inset: 0; z-index: 3000; display: flex; flex-direction: column;
  background: rgba(8, 9, 11, .92); animation: atFadeUp .15s ease both;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.fx-lb-bar {
  display: flex; align-items: center; gap: 8px; padding: 12px 16px;
  padding-top: calc(12px + env(safe-area-inset-top)); color: #fff;
}
.fx-lb-name { flex: 1; min-width: 0; font: 500 14px "Inter", sans-serif; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: .85; }
.fx-lb-btn {
  width: 40px; height: 40px; border: 0; border-radius: 12px; cursor: pointer;
  background: rgba(255, 255, 255, .1); color: #fff; font-size: 16px;
}
.fx-lb-btn:hover { background: rgba(255, 255, 255, .2); }
.fx-lb-stage { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 8px 16px 24px; }
.fx-lb-img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 8px; box-shadow: 0 20px 60px rgba(0, 0, 0, .5); }
.fx-img { cursor: zoom-in; }

/* ═══ ТЕЛЕФОН (body.m ставит mobile.js) ═════════════════════════════════════
   Раскладку на два экрана (список ↔ открытое) делает mobile.css, здесь —
   только вид: крупнее пальцу, во всю ширину, круглая «✎» в углу. */
body.m .fx-wrap { --fx-col: 100%; --fx-ans: var(--text); --fx-ans-bg: var(--card2); }
body.m .fx-side { background: var(--bg); padding: 10px 12px 0; }
body.m .fx-side-head { display: none; }                  /* заголовок уже в шапке */
body.m .fx-mode { border-radius: 999px; margin-bottom: 10px; }
body.m .fx-mode-btn { min-height: 38px; border-radius: 999px; font-size: 14px; }
body.m .fx-mode-ind { border-radius: 999px; }
/* общие поля телефона (mobile.css) задают свой фон и отступ — лупу возвращаем */
body.m .fx-wrap .fx-side .fx-search {
  height: 44px; border-radius: 999px; font-size: 16px; padding: 0 16px 0 40px;
  background: var(--card) no-repeat 15px 50% / 17px var(--fx-search-ico); border-color: transparent;
}
body.m .fx-tabs { overflow-x: auto; scrollbar-width: none; margin-bottom: 6px; }
body.m .fx-tabs::-webkit-scrollbar { display: none; }
body.m .fx-tab { min-height: 34px; padding: 0 14px; font-size: 13.5px; }
body.m .fx-topics { margin: 0 -12px; padding: 0 0 96px; gap: 0; }
body.m .fx-topic {
  border-radius: 0; padding: 12px 16px; gap: 12px; min-height: 68px;
  border-bottom: 1px solid var(--fx-line) !important;
}
body.m .fx-topic:active, body.m .fx-topic.active { background: var(--card); }
body.m .fx-topic.unread::before { left: 12px; top: 11px; }
body.m .fx-status { width: 38px; height: 38px; border-radius: 12px; }
body.m .fx-status svg { width: 18px; height: 18px; }
body.m .fx-topic-title { font-size: 15.5px; }
body.m .fx-topic-meta { font-size: 13px; }
body.m .fx-count { font-size: 13px; }
body.m .fx-topic .fx-ava { width: 46px; height: 46px; font-size: 16px; }
/* «Задать вопрос» — круглая кнопка в правом нижнем углу */
body.m .fx-side .fx-new {
  position: fixed; right: 18px; bottom: calc(78px + env(safe-area-inset-bottom)); z-index: 30;
  width: 58px; height: 58px; min-height: 0; margin: 0; padding: 0; border-radius: 50%;
  box-shadow: 0 8px 22px rgba(0, 0, 0, .4); font-size: 0; color: #fff !important;
}
body.m .fx-side .fx-new::after { content: "✎"; font-size: 24px; line-height: 58px; }

/* Открытый вопрос */
body.m .fx-head {
  padding: calc(8px + env(safe-area-inset-top)) 12px 10px 6px; gap: 6px; align-items: center;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
body.m .fx-back { background: transparent !important; font-size: 28px; width: 40px; height: 40px; }
body.m .fx-head-title {
  font-size: 16px; line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
body.m .fx-head-title .fx-solved-tag { font-size: 11px; padding: 1px 7px; margin-right: 6px; vertical-align: 1px; }
body.m .fx-head-sub { font-size: 12.5px; margin-top: 2px; }
body.m .fx-feed { padding: 12px 12px 8px; gap: 8px; }
body.m .fx-text { font-size: 15px; line-height: 1.55; }
body.m .fx-img { max-width: 62vw; max-height: 40vh; }
body.m .fx-question .fx-bubble { padding: 14px 16px 16px; }
body.m .fx-qa-count { margin-top: 8px; }
body.m .fx-qa .fx-msg { gap: 8px; }
body.m .fx-vote { width: 40px; padding: 5px 0 7px; }
body.m .fx-answer .fx-bubble { padding: 12px 14px; }
body.m .fx-actions { gap: 6px; }
body.m .fx-thanks, body.m .fx-solve, body.m .fx-got { min-height: 32px; font-size: 13px; }

body.m .fx-jump { right: 16px; bottom: calc(80px + env(safe-area-inset-bottom)); }
body.m .fx-reply { min-height: 32px; font-size: 13px; }
body.m .fx-topic-time { font-size: 12.5px; }
body.m .fx-topic-ex { font-size: 13.5px; }
body.m .fx-dlg-time { font-size: 12.5px; }
body.m .fx-lb-btn { width: 44px; height: 44px; }

/* Личные на телефоне */
body.m .fx-feed:not(.fx-qa) { padding: 10px 10px 6px; gap: 4px; }
body.m .fx-feed:not(.fx-qa) > .fx-msg { max-width: 86%; }
body.m .fx-feed:not(.fx-qa) .fx-text { font-size: 15.5px; line-height: 1.4; }

/* Поле ввода */
body.m .fx-composer { padding: 6px 10px calc(8px + env(safe-area-inset-bottom)); }
body.m .fx-composer-row { border-radius: 24px; padding: 4px; gap: 2px; }
body.m .fx-composer-area { font-size: 16px; padding: 11px 8px; max-height: 120px; }
body.m .fx-icon-btn { width: 42px; height: 42px; border-radius: 50%; font-size: 22px; }
body.m .fx-send { width: 42px; height: 42px; border-radius: 50% !important; font-size: 17px; }

/* Форма нового вопроса, выбор собеседника */
body.m .fx-main > .fx-form { max-width: 100%; margin: 0; padding: 16px; gap: 12px; }
body.m .fx-form-title { font-size: 20px; }
body.m .fx-input, body.m .fx-area { font-size: 16px; }
body.m .fx-form-btns { display: flex; gap: 10px; }
body.m .fx-form-btns > * { flex: 1; min-height: 48px; font-size: 15px; }
body.m .fx-welcome-text { max-width: 100%; }

/* ═══ ЛИЧНЫЕ КАК В TELEGRAM (2026-10-16) ═════════════════════════════════
   Слева: «Переписки», под ними «Все мастера» — цветные кружки (цвет по
   номеру мастера, --ava-h), зелёная точка = сейчас в программе.
   Справа: шапка с кружком и статусом, разделители дней, время и ✓✓ внизу
   пузыря. Цвета пузырей — по-прежнему из темы. */
.fx-sec {
  display: flex; align-items: center; gap: 8px; flex-shrink: 0;
  margin: 14px 10px 6px; font-size: 11.5px; font-weight: 600;
  letter-spacing: .06em; text-transform: uppercase; color: var(--muted);
}
.fx-sec:first-child { margin-top: 4px; }
.fx-sec-n { font-weight: 600; letter-spacing: 0; opacity: .8; }
.fx-person { align-items: center; padding: 8px 10px; }
.fx-person.unread::before { display: none; }          /* у переписок есть счётчик справа */
.fx-person .fx-topic-title { -webkit-line-clamp: 1; font-weight: 600; }
.fx-person .fx-topic-meta { margin-top: 2px; display: flex; gap: 8px; align-items: center; }

.fx-ava.fx-ava-c {
  position: relative; flex-shrink: 0; overflow: visible;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(160deg, hsl(var(--ava-h) 62% 60%), hsl(var(--ava-h) 55% 46%)) !important;
  color: #fff !important; font-weight: 600; letter-spacing: 0;
}
.fx-ava.fx-ava-c.staff { background: linear-gradient(160deg, color-mix(in srgb, var(--acc2) 85%, #fff), var(--acc2)) !important; }
.fx-person .fx-ava.fx-ava-c { width: 46px; height: 46px; font-size: 16px; }
.fx-online {
  position: absolute; right: 0; bottom: 0; width: 12px; height: 12px; border-radius: 50%;
  background: var(--green); box-shadow: 0 0 0 2.5px var(--bg);
}
.fx-topic.active .fx-online, .fx-topic:hover .fx-online { box-shadow: 0 0 0 2.5px var(--card); }
.fx-pres.online { color: var(--green); }
.fx-staff { color: var(--acc2); font-weight: 500; }
.fx-rate { color: var(--warn); font-weight: 600; font-size: 11.5px; }
.fx-you { color: var(--text); opacity: .7; }

/* шапка переписки: ‹  (кружок)  Имя / в сети */
.fx-head > .fx-ava.fx-ava-c { width: 42px; height: 42px; font-size: 15px; margin-right: 2px; }
.fx-head .fx-head-sub { display: flex; gap: 8px; align-items: center; }

/* разделитель дня */
.fx-day { display: flex; justify-content: center; margin: 10px 0 6px; flex-shrink: 0; }
.fx-feed:not(.fx-qa) > .fx-day { max-width: none; width: 100%; }
.fx-day > span {
  padding: 3px 12px; border-radius: 999px; font-size: 12px; font-weight: 500;
  background: var(--card); color: var(--muted);
}

/* пузырь: текст, а время и галочки — в правом нижнем углу */
.fx-feed:not(.fx-qa) .fx-msg { gap: 6px; }
.fx-feed:not(.fx-qa) .fx-ava.fx-ava-c, .fx-feed:not(.fx-qa) .fx-ava-hidden { width: 32px; height: 32px; font-size: 12px; }
.fx-feed:not(.fx-qa) .fx-msg.own .fx-bubble { background: color-mix(in srgb, var(--acc2) 34%, var(--card)) !important; }
.fx-feed:not(.fx-qa) .fx-bubble { padding: 7px 10px 6px 12px; }
.fx-feed:not(.fx-qa) .fx-text { white-space: pre-wrap; word-break: break-word; }
.fx-meta {
  display: flex; justify-content: flex-end; align-items: center; gap: 5px;
  margin: 1px 0 0 16px; line-height: 1.2;
}
.fx-meta .fx-msg-date { font-size: 11px; opacity: .75; }
.fx-meta .fx-edited { font-size: 11px; opacity: .65; }
.fx-meta .fx-read { font-size: 11px; color: var(--muted); letter-spacing: -2px; }
.fx-meta .fx-read.seen { color: var(--acc2); }

body.m .fx-person { padding: 9px 14px; }
body.m .fx-person .fx-ava.fx-ava-c { width: 50px; height: 50px; font-size: 17px; }
body.m .fx-sec { margin: 12px 14px 4px; }
body.m .fx-head > .fx-ava.fx-ava-c { width: 38px; height: 38px; font-size: 14px; }
