/* ДОЧА — кабинет автоматизации Telegram.

   Неон на почти чёрном: розово-пурпурный акцент, стеклянные карточки, крупные
   радиусы, свечение вместо линеек. Палитра задана здесь и НЕ перебивается темой
   Telegram (см. applyTheme в app.js) — иначе на светлой теме клиента кабинет
   становился нечитаемым. */

:root {
  /* поверхности */
  --bg: #0A0510;
  --bg-soft: #150A1E;
  --card: #180C22;
  --card-hi: #21112E;
  --glass: rgba(255, 255, 255, 0.045);
  --text: #F8EDF7;
  /* Приглушённый текст: 7.1:1 на карточке — уровень AAA, а не «на глаз норм» */
  --muted: #B9A0C9;
  --line: rgba(255, 130, 205, 0.16);
  --line-hi: rgba(255, 130, 205, 0.34);

  /* акценты */
  --accent: #FF3D9A;
  --accent-2: #C31E9B;
  --accent-soft: rgba(255, 61, 154, 0.14);
  --accent-grad: linear-gradient(135deg, #FF4FA6 0%, #C31E9B 100%);
  --violet: #A855F7;
  --blue: #4C8DFF;
  --cyan: #22D3EE;
  --teal: #2DD4BF;

  --green: #34D399;
  --orange: #FBBF24;
  --red: #FB7185;

  --radius: 16px;
  --radius-sm: 12px;
  --radius-lg: 22px;
  --nav-h: 64px;
  --glow: 0 0 26px rgba(255, 61, 154, 0.34);
  --glow-soft: 0 8px 26px rgba(0, 0, 0, 0.45);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  padding: 0;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.4;
  overscroll-behavior-y: none;
}

body {
  min-height: 100vh;
  background:
    radial-gradient(120% 60% at 50% -10%, rgba(255, 61, 154, 0.22), transparent 62%),
    radial-gradient(90% 50% at 100% 8%, rgba(168, 85, 247, 0.16), transparent 60%),
    linear-gradient(180deg, #0F0618 0%, #0A0510 52%, #060309 100%);
  background-attachment: fixed;
}

/* Дымка по краям экрана: держит неон и не даёт фону выглядеть плоским */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(70% 40% at 0% 100%, rgba(195, 30, 155, 0.16), transparent 70%),
    radial-gradient(60% 34% at 100% 92%, rgba(76, 141, 255, 0.10), transparent 70%);
}

.content, .header, .nav { position: relative; z-index: 1; }

button, input, select, textarea { font: inherit; color: inherit; }
button { border: none; background: none; cursor: pointer; }
.hidden { display: none !important; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

/* ═══════════════════════════ Заставка загрузки ═══════════════════════════ */

.boot {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background: linear-gradient(180deg, #140720 0%, #0A0510 100%);
}

.boot__title {
  font-size: 34px;
  font-weight: 800;
  letter-spacing: 0.14em;
  background: var(--accent-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 34px rgba(255, 61, 154, 0.45);
}

.boot__sub { color: var(--muted); font-size: 13px; letter-spacing: 0.04em; }

/* Заставка уходит плавно: резкая подмена экрана выглядит как сбой загрузки */
.boot.is-hidden {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.32s ease, visibility 0.32s linear 0.32s;
}

.boot__bar {
  width: 168px;
  height: 3px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.09);
}

.boot__bar span {
  display: block;
  width: 40%;
  height: 100%;
  border-radius: 999px;
  background: var(--accent-grad);
  animation: bootRun 1.25s ease-in-out infinite;
}

@keyframes bootRun {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(250%); }
}

/* ══════════════════════════ Корона: знак бренда ══════════════════════════ */

.mascot { display: block; width: 40px; height: 40px; }
.mascot--lg { width: 84px; height: 84px; }
.mascot--md { width: 56px; height: 56px; }
.mascot--logo { width: 30px; height: 30px; }

.crown__glow { animation: crownGlow 3.2s ease-in-out infinite; transform-origin: 60px 62px; }
.crown__spark { animation: crownSpark 2.4s ease-in-out infinite; }

@keyframes crownGlow {
  0%, 100% { opacity: 0.45; transform: scale(1); }
  50% { opacity: 0.9; transform: scale(1.08); }
}

@keyframes crownSpark {
  0%, 100% { opacity: 0.25; }
  50% { opacity: 1; }
}

/* ═════════════════════════════════ Шапка ═════════════════════════════════ */

.header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  background: linear-gradient(180deg, rgba(20, 8, 30, 0.96), rgba(10, 5, 16, 0.86));
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}

.header__left { display: flex; align-items: center; gap: 10px; min-width: 0; }

.header__title {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  background: linear-gradient(135deg, #FFE3F2 0%, #FF6FB6 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.header__sub {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.icon-btn {
  flex: none;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  font-size: 16px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--glass);
  color: var(--text);
  transition: border-color 0.16s ease, background 0.16s ease;
}

.icon-btn:active { border-color: var(--line-hi); background: rgba(255, 61, 154, 0.14); }

/* ════════════════════════════ Контент и вкладки ═══════════════════════════ */

.content {
  padding: 14px 14px calc(var(--nav-h) + 26px + env(safe-area-inset-bottom));
}

/* Плавающая кнопка задач и панель выбранных чатов висят над контентом, поэтому
   последняя карточка списка уезжала под них. Высоту запаса считает
   syncFloatingPad (--float-h) — она зависит от переносов подписей в панели. */
.content--float {
  padding-bottom: calc(var(--nav-h) + 26px + var(--float-h, 0px) + env(safe-area-inset-bottom));
}

.tab { animation: tabIn 0.22s ease both; }

@keyframes tabIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

.section-label {
  margin: 20px 2px 9px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-label::before {
  content: "◆";
  font-size: 8px;
  color: var(--accent);
}

.screen__title { margin: 2px 2px 2px; font-size: 25px; font-weight: 800; letter-spacing: -0.01em; }
.screen__sub { margin: 0 2px 14px; font-size: 13px; color: var(--muted); }

/* ═══════════════════════ Нижняя навигация с короной ═══════════════════════ */

.nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: 1fr 1fr 76px 1fr 1fr;
  align-items: end;
  height: calc(var(--nav-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: linear-gradient(180deg, rgba(18, 7, 27, 0.92), rgba(8, 4, 13, 0.99));
  backdrop-filter: blur(18px);
  border-top: 1px solid var(--line);
}

.nav__item {
  height: var(--nav-h);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: var(--muted);
  transition: color 0.16s ease;
}

.nav__item span { font-size: 17px; line-height: 1; filter: grayscale(0.55) opacity(0.8); }
.nav__item i { font-style: normal; font-size: 10.5px; letter-spacing: 0.02em; }
.nav__item.is-active { color: var(--accent); }
.nav__item.is-active span { filter: none; }

/* Корона: главная кнопка «создать задачу», приподнята над панелью */
.nav__crown {
  position: relative;
  display: grid;
  place-items: center;
  height: var(--nav-h);
}

.nav__crown button {
  position: absolute;
  bottom: 12px;
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent-grad);
  box-shadow: 0 0 0 5px rgba(10, 5, 16, 0.95), var(--glow);
  transition: transform 0.16s ease;
}

.nav__crown button:active { transform: scale(0.93); }
.nav__crown svg { width: 30px; height: 30px; }

/* ══════════════════════════ Главная: герой-блок ═══════════════════════════ */

/* Картинку кладут в webapp/assets/hero.webp и включают двумя переменными:
   --hero-image (url) и, если нужно выше, --hero-h. Пока файла нет, блок живёт
   на градиентах: высота ровно под подпись, без пустого поля сверху. */
.hero {
  position: relative;
  margin: -14px -14px 16px;
  min-height: var(--hero-h, 188px);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 6px;
  padding: 22px 18px 20px;
  overflow: hidden;
  background:
    radial-gradient(80% 70% at 78% 22%, rgba(255, 61, 154, 0.30), transparent 68%),
    radial-gradient(70% 60% at 12% 84%, rgba(168, 85, 247, 0.26), transparent 70%),
    linear-gradient(165deg, #2A0C33 0%, #14061D 58%, #0A0510 100%);
}

.hero__art {
  position: absolute;
  inset: 0;
  background-image: var(--hero-image, none);
  background-size: cover;
  background-position: 50% 22%;
  opacity: 0.9;
}

/* Тень снизу: подпись читается поверх любой картинки */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10, 5, 16, 0.12) 0%, rgba(10, 5, 16, 0.62) 62%, #0A0510 100%);
}

.hero__body { position: relative; z-index: 2; }

.hero__mark { display: flex; align-items: center; gap: 9px; }
.hero__mark svg { width: 34px; height: 34px; }

.hero__name {
  font-size: 30px;
  font-weight: 900;
  letter-spacing: 0.1em;
  background: linear-gradient(135deg, #FFFFFF 0%, #FF7DBE 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero__tag {
  margin-top: 2px;
  font-size: 14px;
  font-style: italic;
  color: #FFC2E2;
  text-shadow: 0 0 18px rgba(255, 61, 154, 0.5);
}

.hero__online {
  align-self: flex-start;
  margin-top: 12px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  font-size: 12px;
  border-radius: 999px;
  border: 1px solid var(--line-hi);
  background: rgba(10, 5, 16, 0.62);
  backdrop-filter: blur(8px);
}

.hero__online b { font-weight: 600; }

.hero__online i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 10px var(--green);
  animation: pulseDot 2.2s ease-in-out infinite;
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

/* ─────────────────────── Главная: строка-подсказка ───────────────────────- */

.prompt {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 6px 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--line-hi);
  background: var(--glass);
  box-shadow: var(--glow-soft);
}

.prompt input { flex: 1; min-width: 0; border: none; background: none; outline: none; font-size: 14px; }
.prompt input::placeholder { color: var(--muted); }

.prompt__go {
  flex: none;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent-grad);
  box-shadow: var(--glow);
  font-size: 16px;
  color: #fff;
}

.prompt__go:active { transform: scale(0.94); }

/* Живая выдача умного поиска: команды, найденные по фразе */
.prompt-hits { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; margin-top: 10px; }

.prompt-hit {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 10px 12px;
  text-align: left;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--card);
}

.prompt-hit:active { border-color: var(--line-hi); }
.prompt-hit__title { font-size: 14px; font-weight: 600; }
.prompt-hit__why { font-size: 12px; color: var(--muted); }

/* ────────────────────── Главная: плитки быстрых команд ───────────────────- */

.tiles {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
  margin: 12px 0 4px;
}

.tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 12px 4px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--text);
  transition: border-color 0.16s ease, transform 0.16s ease;
}

.tile:active { transform: scale(0.96); border-color: var(--line-hi); }
.tile__ico { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; font-size: 17px; }
.tile__name { font-size: 11px; letter-spacing: 0.01em; color: var(--muted); text-align: center; }

/* Цвета плиток и карточек команд: у каждой группы свой оттенок, чтобы список
   читался как набор инструментов, а не как одна простыня. */
.ico--pink { background: linear-gradient(135deg, #FF4FA6, #C31E9B); box-shadow: 0 6px 16px rgba(255, 61, 154, 0.28); }
.ico--blue { background: linear-gradient(135deg, #5C9CFF, #2E5BD8); box-shadow: 0 6px 16px rgba(76, 141, 255, 0.26); }
.ico--cyan { background: linear-gradient(135deg, #34E0F2, #1893C7); box-shadow: 0 6px 16px rgba(34, 211, 238, 0.24); }
.ico--violet { background: linear-gradient(135deg, #B575FF, #7A2BD8); box-shadow: 0 6px 16px rgba(168, 85, 247, 0.26); }
.ico--teal { background: linear-gradient(135deg, #3EE0C4, #12907C); box-shadow: 0 6px 16px rgba(45, 212, 191, 0.24); }
.ico--amber { background: linear-gradient(135deg, #FFD166, #E08A17); box-shadow: 0 6px 16px rgba(251, 191, 36, 0.24); }

/* ──────────────────── Главная: «Текущие задачи» и ссылка ─────────────────── */

.row-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin: 20px 2px 9px;
}

.row-head__title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.row-head__link { font-size: 12px; color: var(--accent); }

/* ══════════════════════════════ Поиск ══════════════════════════════ */

.search {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--card);
}

.search__icon { font-size: 13px; opacity: 0.7; }
.search input { flex: 1; min-width: 0; border: none; background: none; outline: none; font-size: 14px; }
.search input::placeholder { color: var(--muted); }

/* ═══════════════════════ Чипсы-фильтры и переключатели ═══════════════════════ */

/* Ряд чипсов скроллится по горизонтали: на 390 px пять фильтров в строку не
   влезают, а переносить их на вторую строку — терять полэкрана. */
.chips {
  display: flex;
  gap: 8px;
  margin: 12px 0 4px;
  padding-bottom: 2px;
  overflow-x: auto;
  scrollbar-width: none;
}

.chips::-webkit-scrollbar { display: none; }

.chip {
  flex: none;
  padding: 7px 14px;
  font-size: 12.5px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--muted);
  white-space: nowrap;
  transition: color 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.chip.is-active {
  color: #fff;
  border-color: transparent;
  background: var(--accent-grad);
  box-shadow: 0 4px 16px rgba(255, 61, 154, 0.3);
}

.chip b { font-weight: 700; opacity: 0.85; margin-left: 4px; }

/* Старый segmented оставлен для шторок: там он живёт как ряд равных кнопок */
.segmented {
  display: flex;
  gap: 6px;
  padding: 4px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--card);
}

.seg {
  flex: 1;
  padding: 8px 6px;
  font-size: 12.5px;
  border-radius: 999px;
  color: var(--muted);
  white-space: nowrap;
}

.seg.is-active { color: #fff; background: var(--accent-grad); box-shadow: 0 4px 14px rgba(255, 61, 154, 0.28); }
.segmented--sm .seg { padding: 6px 4px; font-size: 12px; }

/* ═════════════════════════════ Карточки ═════════════════════════════ */

/* Колонка обязана быть minmax(0, 1fr), а не по умолчанию auto: у auto-дорожки
   минимум равен min-content, и одна длинная строка внутри карточки (заголовок
   задачи «Рассылка: … → … (+2)» набран nowrap) растягивает всю сетку — вместе
   с ней уезжает вправо документ, и кабинет начинает скроллиться боком. На
   демо-данных этого не видно: там названия короткие. */
.cards, .list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }

.card {
  padding: 14px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--card-hi), var(--card));
  box-shadow: var(--glow-soft);
}

.card--row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  color: var(--text);
}

.card__emoji {
  flex: none;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  font-size: 20px;
  border-radius: 13px;
  background: linear-gradient(135deg, rgba(255, 79, 166, 0.22), rgba(122, 43, 216, 0.22));
  border: 1px solid var(--line);
}

.card__body { min-width: 0; }
.card__title { font-size: 15px; font-weight: 650; }
.card__desc { margin-top: 2px; font-size: 12.5px; color: var(--muted); }

.card--add {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px;
  font-size: 14px;
  color: var(--accent);
  border-radius: var(--radius);
  border: 1px dashed var(--line-hi);
  background: rgba(255, 61, 154, 0.07);
}

.card--resume { border-color: var(--line-hi); background: rgba(255, 61, 154, 0.09); }

/* ─────────────────────────── Карточка команды ─────────────────────────── */

.card--cmd {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 13px;
  text-align: left;
  color: var(--text);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--card-hi), var(--card));
  box-shadow: var(--glow-soft);
  transition: border-color 0.16s ease, transform 0.16s ease;
}

.card--cmd:active { transform: scale(0.985); border-color: var(--line-hi); }
.card--cmd--locked { opacity: 0.55; }

.cmd__ico {
  flex: none;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  font-size: 19px;
  border-radius: 13px;
}

.cmd__main { flex: 1; min-width: 0; }
.cmd__title { font-size: 14.5px; font-weight: 650; }
.cmd__desc { margin-top: 2px; font-size: 12px; color: var(--muted); }
.cmd__foot { margin-top: 6px; }
.cmd__chevron { flex: none; font-size: 20px; color: var(--muted); opacity: 0.75; }

/* ───────────────────────────── Статус-строка ───────────────────────────── */

.status { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--muted); }
.status__dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: 0.7; }
.status--ready { color: var(--green); }
.status--paused { color: var(--orange); }
.status--setup { color: var(--blue); }
.status--off { color: var(--muted); }

/* ═══════════════════════════ Карточка задачи ═══════════════════════════ */

.task {
  padding: 12px 13px 11px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--card-hi), var(--card));
  box-shadow: var(--glow-soft);
}

.task--archived { opacity: 0.6; }

.task__top { display: flex; align-items: center; gap: 11px; }

.task__ico {
  flex: none;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  font-size: 17px;
  border-radius: 12px;
}

.task__head { flex: 1; min-width: 0; }
.task__title { font-size: 14px; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task__meta { margin-top: 2px; font-size: 11.5px; color: var(--muted); }

.badge {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  font-size: 10.5px;
  font-weight: 600;
  border-radius: 999px;
  border: 1px solid transparent;
  white-space: nowrap;
}

.badge::before { content: "●"; font-size: 7px; }
.badge--live { color: #7DF0C0; background: rgba(52, 211, 153, 0.14); border-color: rgba(52, 211, 153, 0.35); }
.badge--paused { color: #FFD98A; background: rgba(251, 191, 36, 0.14); border-color: rgba(251, 191, 36, 0.35); }
.badge--plan { color: #A8CBFF; background: rgba(76, 141, 255, 0.14); border-color: rgba(76, 141, 255, 0.35); }
.badge--error { color: #FFB0BE; background: rgba(251, 113, 133, 0.14); border-color: rgba(251, 113, 133, 0.38); }
.badge--done { color: var(--muted); background: rgba(255, 255, 255, 0.06); border-color: var(--line); }

.task__progress {
  position: relative;
  height: 6px;
  margin: 11px 0 7px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
}

.task__progress span {
  display: block;
  height: 100%;
  border-radius: 999px;
  /* Полоса — в цветах бренда: синий с голубым читался как чужой элемент. */
  background: linear-gradient(90deg, #FF3D9A, #A855F7);
  box-shadow: 0 0 12px rgba(255, 61, 154, 0.45);
  transition: width 0.4s ease;
}

/* Задача без обозримого конца (постоянная пересылка): вместо доли — бегунок,
   иначе пришлось бы выдумывать «сколько всего», которого не существует. */
.task__progress--endless span {
  width: 34%;
  animation: endlessRun 1.9s ease-in-out infinite;
}

@keyframes endlessRun {
  0% { transform: translateX(-110%); }
  100% { transform: translateX(320%); }
}

.task__nums {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: 11.5px;
  color: var(--muted);
}

.task__nums b { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.task__nums i { font-style: normal; font-variant-numeric: tabular-nums; }
.task__nums .task__pct { margin-left: auto; color: var(--text); font-weight: 700; }

.task__actions { display: flex; align-items: center; gap: 8px; margin-top: 11px; }
.task__acts { display: flex; flex-wrap: wrap; gap: 8px; flex: 1; min-width: 0; }

/* ══════════════════════════════ Кнопки ══════════════════════════════ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 14px;
  font-size: 13px;
  border-radius: 11px;
  border: 1px solid var(--line);
  background: var(--glass);
  color: var(--text);
  transition: transform 0.14s ease, border-color 0.14s ease, opacity 0.14s ease;
}

.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.5; }

.btn--primary {
  border-color: transparent;
  background: var(--accent-grad);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 8px 22px rgba(255, 61, 154, 0.32);
}

.btn--danger { color: var(--red); border-color: rgba(251, 113, 133, 0.32); background: rgba(251, 113, 133, 0.09); }
.btn--block { width: 100%; padding: 13px 16px; font-size: 14.5px; }
.btn--big { padding: 15px 16px; font-size: 14px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.btn--ghost { background: transparent; }
.btn--sm { padding: 7px 12px; font-size: 12px; border-radius: 10px; }

/* Крупная кнопка «создать задачу» под списком: в макете она замыкает экран */
.cta { margin-top: 14px; }

/* ═══════════════════════ Плавающая кнопка и панель ═══════════════════════ */

/* Корона поднята на 6 px над панелью и обведена ореолом в 5 px, поэтому
   плавающие элементы отступают не от навигации, а от короны: иначе кнопка
   «Запустить задачу» ложится углом на неё. */
.fab {
  position: fixed;
  right: 16px;
  bottom: calc(var(--nav-h) + 30px + env(safe-area-inset-bottom));
  z-index: 25;
  padding: 12px 18px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 999px;
  background: var(--accent-grad);
  color: #fff;
  box-shadow: 0 10px 26px rgba(255, 61, 154, 0.38);
}

/* ══════════════════════════════ Чаты ══════════════════════════════ */

.chats-hint { margin: 10px 2px 2px; font-size: 12px; color: var(--muted); }

.chat {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 10px 12px;
  text-align: left;
  color: var(--text);
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--card);
}

.chat.is-selected { border-color: var(--line-hi); background: rgba(255, 61, 154, 0.1); }

.chat__emoji {
  flex: none;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  font-size: 17px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(255, 79, 166, 0.24), rgba(76, 141, 255, 0.24));
  border: 1px solid var(--line);
}

.chat__body { flex: 1; min-width: 0; }
.chat__title { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Подпись строки не переносим: в шторке выбора там лежит текст сообщения, и
   без обрезки одна строка списка вырастала на пол-экрана. */
.chat__sub { margin-top: 1px; font-size: 11.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.chat__kind {
  flex: none;
  padding: 3px 8px;
  font-size: 10px;
  border-radius: 999px;
  color: var(--muted);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
}

.chat__check {
  flex: none;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  font-size: 12px;
  border-radius: 7px;
  border: 1.5px solid var(--line-hi);
  color: transparent;
}

.chat.is-selected .chat__check {
  color: #fff;
  border-color: transparent;
  background: var(--accent-grad);
}

/* Шеврон вместо галочки: выбор одного чата закрывает шторку сразу */
.chat__go {
  flex: none;
  width: 22px;
  display: grid;
  place-items: center;
  font-size: 20px;
  line-height: 1;
  color: var(--muted);
}

/* Панель над выбранными чатами: `position: fixed`, поэтому живёт вне вкладки */
.chat-bar {
  position: fixed;
  left: 10px;
  right: 10px;
  bottom: calc(var(--nav-h) + 22px + env(safe-area-inset-bottom));
  z-index: 26;
  display: none;
  flex-direction: column;
  gap: 9px;
  padding: 12px;
  border-radius: var(--radius);
  border: 1px solid var(--line-hi);
  background: rgba(24, 12, 34, 0.96);
  backdrop-filter: blur(16px);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.6);
}

.chat-bar.is-visible { display: flex; }
.chat-bar__count { display: flex; align-items: baseline; gap: 8px; font-size: 12.5px; color: var(--muted); }
.chat-bar__count b { color: var(--text); font-size: 14px; }
.chat-bar__sum { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-bar__btns { display: flex; flex-wrap: wrap; gap: 8px; }
.chat-bar__clear { margin-left: auto; }

/* ═════════════════════════ Аккаунты и подписка ═════════════════════════ */

.account {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--card);
}

.account__avatar {
  flex: none;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  font-size: 16px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(255, 79, 166, 0.26), rgba(122, 43, 216, 0.26));
  border: 1px solid var(--line);
}

.account__body { flex: 1; min-width: 0; }
.account__phone { font-size: 14px; font-weight: 600; }
.account__id { margin-top: 1px; font-size: 11.5px; color: var(--muted); }
.account__del { flex: none; }

/* Аккаунт на связи или офлайн: без этой метки непонятно, почему задачи стоят.
   Текст короткий, поэтому метка не переносится и не ломает строку. */
.account__state {
  flex: none;
  padding: 4px 8px;
  font-size: 10.5px;
  border-radius: 999px;
  white-space: nowrap;
  border: 1px solid var(--line);
}

.account__state--on { color: #7DF0C0; border-color: rgba(52, 211, 153, 0.32); background: rgba(52, 211, 153, 0.12); }
.account__state--off { color: #FFB0BE; border-color: rgba(251, 113, 133, 0.32); background: rgba(251, 113, 133, 0.12); }

/* ─────────────────── Библиотека сообщений: строка текста ─────────────────- */

/* Своя строка, а не .chat: у сообщения нет типа и ника, зато есть текст в две
   строки — по нему его и узнают. Обрезаем именно двумя строками, иначе один
   длинный пост занимает весь экран и список перестаёт быть списком. */
.lib {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 11px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--card);
}

.lib__body { flex: 1; min-width: 0; }
.lib__title {
  font-size: 13.5px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.lib__text {
  margin-top: 3px;
  font-size: 11.5px;
  line-height: 1.4;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.lib__del { flex: none; font-size: 15px; opacity: 0.75; }
.lib__del:active { opacity: 1; }

.card--sub { position: relative; overflow: hidden; }

.card--sub::after {
  content: "";
  position: absolute;
  top: -70px;
  right: -40px;
  width: 180px;
  height: 180px;
  pointer-events: none;
  background: radial-gradient(circle, rgba(255, 61, 154, 0.22), transparent 65%);
}

.sub__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.sub__label { font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.sub__value { margin-top: 3px; font-size: 26px; font-weight: 800; font-variant-numeric: tabular-nums; }

.sub__badge {
  flex: none;
  padding: 5px 10px;
  font-size: 10.5px;
  border-radius: 999px;
  color: var(--muted);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  white-space: nowrap;
}

/* Класс ставит app.js (badge.classList.toggle('is-active', …)); --on оставлен
   для разметки, где состояние известно заранее. */
.sub__badge--on,
.sub__badge.is-active { color: #7DF0C0; border-color: rgba(52, 211, 153, 0.35); background: rgba(52, 211, 153, 0.13); }
.sub__note { margin-top: 8px; font-size: 12px; color: var(--muted); }

/* Кнопки подписки: главная во всю ширину, остальные — в две колонки. Раньше
   они лежали в одну строку и на 390 px обрезались по краю экрана. */
.sub__actions { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; margin-top: 12px; }
.sub__actions .btn--primary { grid-column: 1 / -1; }
.sub__web { width: 100%; margin-top: 8px; }

/* ══════════════════════════ Настройки в шторке ══════════════════════════ */

.settings { display: grid; grid-template-columns: minmax(0, 1fr); gap: 9px; }

.setting {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 11px 12px;
  text-align: left;
  color: var(--text);
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--card);
}

.setting__emoji { flex: none; font-size: 18px; }
.setting__body { flex: 1; min-width: 0; }
.setting__title { font-size: 14px; font-weight: 600; }
.setting__desc { margin-top: 1px; font-size: 12px; color: var(--muted); }
.setting__chev { flex: none; color: var(--muted); font-size: 18px; }

/* ══════════════════════════════ Шторки ══════════════════════════════ */

.sheet { position: fixed; inset: 0; z-index: 60; display: none; }
.sheet.is-open { display: block; }
.sheet__backdrop { position: absolute; inset: 0; background: rgba(4, 2, 8, 0.72); backdrop-filter: blur(3px); }

.sheet__panel {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  max-height: 92vh;
  overflow-y: auto;
  padding: 16px 14px calc(20px + env(safe-area-inset-bottom));
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  border-top: 1px solid var(--line-hi);
  background: linear-gradient(180deg, #1E0F2A 0%, #0E0716 100%);
  box-shadow: 0 -18px 44px rgba(0, 0, 0, 0.6);
  animation: sheetUp 0.24s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes sheetUp {
  from { transform: translateY(14%); opacity: 0.4; }
  to { transform: none; opacity: 1; }
}

.sheet__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.sheet__title { font-size: 17px; font-weight: 750; }
.sheet__lead { margin-bottom: 12px; font-size: 12.5px; color: var(--muted); }
.form { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }

/* Поля задачи собираются скриптом в свой контейнер, а не прямо в .form —
   значит, grid-gap формы до них не доходил: между полями оставался ноль, и
   подпись читалась как продолжение предыдущего ввода, а не как заголовок
   своего. Повторяем тот же ритм здесь. */
#taskFields { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }

.field { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; font-size: 12px; color: var(--muted); }

.field input, .field textarea, .field select {
  width: 100%;
  padding: 12px 13px;
  font-size: 14.5px;
  color: var(--text);
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.045);
  outline: none;
  transition: border-color 0.16s ease;
}

.field input:focus, .field textarea:focus { border-color: var(--accent); }
.field textarea { min-height: 96px; resize: vertical; line-height: 1.45; }
.field__note { font-style: normal; font-size: 11.5px; color: var(--muted); opacity: 0.85; }

/* Галочка: подпись и сам квадрат стоят в одну строку — иначе поле выглядит
   как текстовое, у которого забыли инпут. Квадрат не растягиваем на всю
   ширину: ширина здесь читается как «сюда надо что-то ввести». */
.field--check {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
  color: var(--text);
}
.field--check input {
  width: 20px;
  height: 20px;
  padding: 0;
  accent-color: var(--accent);
  cursor: pointer;
}
.field--check .field__note { grid-column: 1 / -1; }

/* Поле с кнопкой «выбрать чат». Кнопка не тянется и не переносится: на 390 px
   для ввода остаётся ~230 px — @username и id видно целиком. */
.field__row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.btn--pick {
  padding: 11px 12px;
  font-size: 12.5px;
  white-space: nowrap;
  border-color: var(--line-hi);
  background: rgba(255, 61, 154, 0.12);
  color: var(--text);
}
.btn--pick:active { transform: scale(0.97); }

/* Кнопка под многострочным полем: тянуть её на всю ширину нельзя — она читалась
   бы как «отправить», а это всего лишь выбор готового текста. */
.field__aside { display: flex; justify-content: flex-start; }

/* Отмеченные сообщения библиотеки рядом с полем. Переносятся по строкам:
   на 390 px три названия в один ряд не встают. */
.picks { display: flex; flex-wrap: wrap; gap: 6px; }
.pick {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  padding: 5px 6px 5px 10px;
  font-size: 11.5px;
  color: var(--text);
  border-radius: 999px;
  border: 1px solid var(--line-hi);
  background: rgba(255, 61, 154, 0.12);
  overflow: hidden;
}
.pick__t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pick__x { flex: none; width: 18px; height: 18px; border-radius: 50%; font-size: 11px; color: var(--muted); background: rgba(255, 255, 255, 0.08); }
.pick__x:active { color: var(--text); background: rgba(255, 255, 255, 0.18); }

/* Сколько чатов набрано в поле-списке. Двести ссылок через запятую в поле не
   прочитать, поэтому под ним — счёт, первые названия и «очистить». */
.field__count {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  font-size: 11.5px;
  color: var(--muted);
}
.field__count b { color: var(--text); font-weight: 600; }
.field__count span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.field__count button {
  flex: none;
  padding: 3px 9px;
  font-size: 11px;
  color: var(--muted);
  border-radius: 999px;
  border: 1px solid var(--line-hi);
  background: transparent;
}
.field__count button:active { color: var(--text); }

/* Шторка выбора чата открывается ПОВЕРХ шторки задачи: обе .sheet лежат на
   z-index 60, и без этого форма перекрывала бы список чатов. Подложку делаем
   легче — под ней видно, в какое поле идёт выбор. */
.sheet--over { z-index: 70; }
.sheet--over .sheet__backdrop { background: rgba(4, 2, 8, 0.5); }
.sheet--over .sheet__panel { max-height: 84vh; }
#pickerList { max-height: 46vh; overflow-y: auto; }

/* Строка «выбрать все» над списком чатов. Живёт только в режиме нескольких
   чатов: на сотне чатов отмечать по одному нечестно. */
.picker__bulk {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 2px 0 -2px;
}
.picker__count { margin-left: auto; font-size: 11.5px; color: var(--muted); }
.picker__count b { color: var(--text); font-weight: 600; }

/* ─────────────────── Шаги: номер в кружке + подпись снизу ─────────────────- */

.steps {
  counter-reset: step;
  display: flex;
  align-items: flex-start;
  gap: 0;
  margin: 0 0 6px;
  padding: 0;
  list-style: none;
}

.steps__item {
  counter-increment: step;
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: 10.5px;
  text-align: center;
  color: var(--muted);
}

.steps__item::before {
  content: counter(step);
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
  border-radius: 50%;
  border: 1px solid var(--line-hi);
  background: var(--card);
  color: var(--muted);
}

/* Соединительная черта: рисуем у каждого шага, кроме первого */
.steps__item + .steps__item::after {
  content: "";
  position: absolute;
  top: 13px;
  right: 50%;
  left: -50%;
  height: 1px;
  background: var(--line-hi);
  z-index: -1;
}

.steps__item.is-current { color: var(--text); }

.steps__item.is-current::before {
  border-color: transparent;
  background: var(--accent-grad);
  color: #fff;
  box-shadow: var(--glow);
}

.steps__item.is-done::before { content: "✓"; border-color: rgba(52, 211, 153, 0.45); color: #7DF0C0; }

/* ──────────────── Режим отправки: две карточки на выбор ─────────────────- */

.modes { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 9px; }

.mode {
  display: grid;
  gap: 3px;
  padding: 11px 12px;
  text-align: left;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--text);
}

.mode.is-active { border-color: transparent; background: linear-gradient(135deg, rgba(255, 79, 166, 0.24), rgba(195, 30, 155, 0.22)); box-shadow: var(--glow); }
.mode__name { font-size: 13.5px; font-weight: 650; }
.mode__hint { font-size: 11.5px; color: var(--muted); }

/* ─────────────────────────── Переключатели ─────────────────────────── */

.toggle { display: flex; align-items: center; gap: 10px; padding: 9px 2px; font-size: 13px; }
.toggle__text { flex: 1; min-width: 0; }

.toggle input { position: absolute; opacity: 0; pointer-events: none; }

.toggle__track {
  flex: none;
  position: relative;
  width: 40px;
  height: 23px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.09);
  transition: background 0.18s ease, border-color 0.18s ease;
}

.toggle__track::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.18s ease;
}

.toggle input:checked + .toggle__track { border-color: transparent; background: var(--accent-grad); }
.toggle input:checked + .toggle__track::after { transform: translateX(17px); }

/* Ползунок задержки: значение показываем пилюлей справа */
.slider { display: flex; align-items: center; gap: 11px; }

.slider input[type="range"] {
  flex: 1;
  height: 4px;
  border-radius: 999px;
  appearance: none;
  background: linear-gradient(90deg, var(--accent) 0%, rgba(255, 255, 255, 0.12) 100%);
}

.slider input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent-grad);
  box-shadow: var(--glow);
}

.slider__value {
  flex: none;
  min-width: 96px;
  padding: 7px 10px;
  text-align: center;
  font-size: 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--card);
  font-variant-numeric: tabular-nums;
}

/* ═══════════════════ Мелочи: подсказки, ошибки, тост ═══════════════════ */

.hint { font-size: 12px; color: var(--muted); }
.error { font-size: 12.5px; color: var(--red); min-height: 1em; }
.login__aside { display: flex; gap: 8px; }
.login__aside .btn { flex: 1; }

.results { display: grid; grid-template-columns: minmax(0, 1fr); gap: 9px; }
.results__meta { font-size: 12px; color: var(--muted); }

.result {
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--card);
}

.result__title { font-size: 13.5px; font-weight: 600; }
.result__sub { margin-top: 2px; font-size: 11.5px; color: var(--muted); }

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--nav-h) + 26px + env(safe-area-inset-bottom));
  z-index: 80;
  transform: translate(-50%, 14px);
  max-width: 86vw;
  padding: 11px 16px;
  font-size: 13px;
  border-radius: 999px;
  border: 1px solid var(--line-hi);
  background: rgba(30, 15, 42, 0.97);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.55);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast.is-show { opacity: 1; transform: translate(-50%, 0); }

/* Полоса «демо-данные» вставляется первым элементом <body> (см. showDemoBar),
   поэтому никаких отрицательных отступов: они выталкивали её за 390 px, и весь
   документ становился шире экрана — появлялась горизонтальная прокрутка. */
.demo-bar {
  padding: 9px 14px;
  font-size: 12px;
  text-align: center;
  color: #FFD98A;
  background: rgba(251, 191, 36, 0.12);
  border-bottom: 1px solid rgba(251, 191, 36, 0.3);
}

/* ═══════════════════ Пусто · загрузка · ошибка ═══════════════════ */

.empty {
  padding: 30px 18px;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  border-radius: var(--radius-lg);
  border: 1px dashed var(--line-hi);
  background: var(--glass);
}

.empty__big {
  font-size: 34px;
  line-height: 1;
  filter: drop-shadow(0 0 14px rgba(255, 61, 154, 0.4));
}

.empty__title {
  margin: 10px 0 4px;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}

.state {
  padding: 26px 18px;
  text-align: center;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: var(--card);
}

.state__title { margin-top: 8px; font-size: 15px; font-weight: 700; }
.state__text { margin: 4px 0 14px; font-size: 12.5px; color: var(--muted); }
.state__retry { display: inline-flex; }

.sk-card {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 14px;
  margin-bottom: 10px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--card);
}

.sk-card__body { flex: 1; display: grid; gap: 8px; }

.sk {
  border-radius: 8px;
  background: linear-gradient(
    100deg,
    rgba(255, 255, 255, 0.05) 20%,
    rgba(255, 130, 205, 0.16) 50%,
    rgba(255, 255, 255, 0.05) 80%
  );
  background-size: 220% 100%;
  animation: skRun 1.3s linear infinite;
}

.sk-dot { flex: none; width: 44px; height: 44px; border-radius: 14px; }
.sk-line { height: 13px; }
.sk-line--sm { height: 10px; width: 52%; border-radius: 8px; background: rgba(255, 255, 255, 0.06); }

@keyframes skRun {
  from { background-position: 120% 0; }
  to { background-position: -120% 0; }
}

.btn.is-loading { color: transparent; position: relative; }

.btn.is-loading::after {
  content: '';
  position: absolute;
  inset: 0;
  margin: auto;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.28);
  border-top-color: #fff;
  animation: spin 0.7s linear infinite;
}

@keyframes spin { to { transform: rotate(1turn); } }

/* ═══════════════════ Служебное ═══════════════════ */

.field select:focus { border-color: var(--accent); }
[hidden] { display: none !important; }

.chips::-webkit-scrollbar,
.content::-webkit-scrollbar { width: 0; height: 0; }

/* Тонкая линия-разделитель внутри карточек-списков */
.divider { height: 1px; background: var(--line); margin: 2px 0; }

/* Аккуратный фокус для клавиатуры, но не для мыши/тапа */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Кому анимации мешают — тому статичный кабинет. */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001s !important;
  }
}

/* Совсем узкие экраны: плитки в три столбца, шрифты чуть меньше */
@media (max-width: 349px) {
  .tiles { grid-template-columns: repeat(3, 1fr); }
  .header__title { font-size: 16px; }
  .hero__name { font-size: 22px; }
}
