/* Своя тёмная тема в стиле продукта Альтаира («партнерка»): почти чёрный фон, карточки с тонкой
   рамкой, один лаймовый акцент — кнопки, выбранное, прогресс. Тему Telegram больше не берём:
   анкета — витрина эксперта, она должна выглядеть одинаково у всех. Шапку и низ Telegram
   красим в тот же фон из app.js (BG там же — меняются вместе). Основа — анкета предзаписи (1.txt). */
:root {
  color-scheme: dark;
  --bg: #0b0c0a;
  --card: #141512;
  --card2: #1c1d1a;          /* варианты, поля, вложенное в карточку */
  --line: #262822;
  --line2: #363930;
  --text: #f3f4ef;
  --hint: #a6a89f;           /* вторичный текст: светлее #9c9993, иначе на тёмном не читается */
  --faint: #73766c;
  --acc: #c5f04b;
  --acc-ink: #11140a;        /* текст на лаймовом */
  --acc-soft: color-mix(in srgb, var(--acc) 11%, var(--card));
  --acc-line: color-mix(in srgb, var(--acc) 42%, transparent);
  --danger: #ff6b57;
  --radius: 18px;            /* карточки */
  --r-in: 12px;              /* всё внутри карточек и кнопки */
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; background: var(--bg); }
body {
  color: var(--text);
  font: 16px/1.45 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  padding: 16px 16px calc(28px + env(safe-area-inset-bottom));
  max-width: 620px; margin: 0 auto;
  overscroll-behavior-y: contain;
  -webkit-font-smoothing: antialiased;
}
button { font-family: inherit; }
button:focus-visible, a:focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; }

/* ─── Шапка с видеокружком ───
   Кружок на «пьедестале»: свечение и эллипс под ним — мотив экрана наград в продукте эксперта.
   Полосы больше нет, но высота шапки прежняя: центр кружка на 96px, его считает app.js (BAND). */
.hero { position: relative; margin: -16px -16px 8px; padding-bottom: 100px; }
.hero__band { height: 96px; }
.hero::before {
  content: ''; position: absolute; left: 50%; top: 96px; width: 340px; height: 240px;
  transform: translate(-50%, -50%);
  background: radial-gradient(closest-side, color-mix(in srgb, var(--acc) 20%, transparent), transparent);
  pointer-events: none;
}
.hero::after {
  content: ''; position: absolute; left: 50%; top: 141px; width: 236px; height: 46px;
  transform: translateX(-50%);
  border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--acc) 30%, transparent);
  background: radial-gradient(closest-side, color-mix(in srgb, var(--acc) 12%, transparent), transparent);
  pointer-events: none;
}
.circ {
  position: absolute; left: 50%; top: 96px;   /* = высоте полосы */
  transform: translate(-50%, -50%);
  width: 136px; height: 136px; padding: 0; z-index: 1;
  border: none; background: none; cursor: pointer;
  display: block;
  /* Горизонталь забираем себе — это перемотка. Вертикаль оставляем
     браузеру, иначе страница перестанет прокручиваться пальцем с кружка. */
  touch-action: pan-y;
  -webkit-user-select: none; user-select: none;
  /* Масштаб правит скролл покадрово — transition на transform дал бы вязкость */
  will-change: transform;
}
.circ__v {
  position: absolute; inset: 5px;
  width: calc(100% - 10px); height: calc(100% - 10px);
  border-radius: 50%; object-fit: cover;
  background: var(--card2);
  /* Видео под кольцом не должно перехватывать тап — жмём по зонам */
  pointer-events: none;
}
.circ__ring { position: absolute; inset: 0; transform: rotate(-90deg); }
.circ__track { fill: none; stroke: rgba(255,255,255,0.12); stroke-width: 2.5; }
.circ__bar {
  fill: none; stroke: var(--acc); stroke-width: 2.5; stroke-linecap: round;
  transition: stroke-dashoffset 0.15s linear;
}
.circ__mute {
  position: absolute; right: 4px; bottom: 6px;
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--card2); color: var(--text); border: 1px solid var(--line2);
  display: flex; align-items: center; justify-content: center;
  pointer-events: none;
}
.circ__mute svg { width: 17px; height: 17px; display: block; }
/* Три зоны нажатия поверх кружка: слева скорость, по центру пауза, справа
   звук. Прозрачные — рисуют состояние значки, а не сами зоны. */
.circ__zone {
  position: absolute; top: 0; bottom: 0; width: 33.34%;
  border: none; background: none; padding: 0; margin: 0;
  cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.circ__zone--l { left: 0; }
.circ__zone--c { left: 33.33%; }
.circ__zone--r { right: 0; }
.circ__zone:focus-visible { outline: 2px solid var(--acc); outline-offset: -4px; border-radius: 50%; }
/* Значок паузы виден, только пока стоим: иначе он закрывал бы лицо всё время. */
.circ__play {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity 0.18s ease;
  pointer-events: none; color: #fff;
}
.circ__play svg {
  width: 46px; height: 46px; display: block;
  background: rgba(0,0,0,0.42); border-radius: 50%; padding: 6px;
  box-sizing: content-box;
}
.circ--paused .circ__play { opacity: 1; }
/* Подсказки перемотки. Жест ничем себя не выдаёт, поэтому шевроны
   показываются на нажатии — и один раз сами, когда кружок начал играть. */
.circ__hint {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 26px; height: 26px; color: #fff;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity 0.18s ease, transform 0.18s ease;
  pointer-events: none;
  filter: drop-shadow(0 1px 3px rgba(0,0,0,0.5));
}
.circ__hint svg { width: 22px; height: 22px; display: block; }
.circ__hint--l { left: 1px; }
.circ__hint--r { right: 1px; }
.circ--seek .circ__hint, .circ--tip .circ__hint { opacity: 0.85; }
.circ--seek .circ__hint--on { opacity: 1; transform: translateY(-50%) scale(1.25); }
/* Скорость — зеркало значка звука, по другую сторону кружка. Ширина фиксированная:
   «1×» и «1,5×» разной длины, и значок дёргался при каждом переключении. */
.circ__rate {
  position: absolute; left: 4px; bottom: 6px;
  width: 46px; height: 30px; padding: 0;
  font-variant-numeric: tabular-nums;
  border: 1px solid var(--line2); border-radius: 15px;
  background: var(--card2); color: var(--text);
  font-family: inherit; font-size: 12px; font-weight: 600; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}
@media (prefers-reduced-motion: reduce) {
  .circ__hint { transition: none; }
  .circ { transition: none !important; }
}

/* ─── Вступление ─── короткие строки по центру, под кружком, как экран награды */
.intro { margin: 0 0 6px; text-align: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  color: var(--acc); margin: 0 0 12px;
}
.eyebrow svg { width: 14px; height: 14px; flex: none; }
.intro h1 { font-size: 28px; line-height: 1.14; margin: 0 auto 12px; font-weight: 700; letter-spacing: -0.02em; max-width: 16em; text-wrap: balance; }
.intro p { margin: 0 auto 10px; color: var(--hint); font-size: 16px; max-width: 34ch; text-wrap: pretty; }
.intro p:last-of-type { margin-bottom: 0; }
.intro__list { margin: 14px auto 12px; max-width: 34ch; text-align: left; }
.intro__li {
  display: flex; gap: 10px; color: var(--hint); font-size: 15px;
  margin: 0 0 8px; align-items: flex-start;
}
.intro__li::before {
  content: ''; flex: none;
  width: 6px; height: 6px; margin-top: 8px;
  border-radius: 50%; background: var(--acc);
}
/* Повторный заход: человек уже отправлял — говорим, что можно поправить, а не «заполни заново» */
.resume {
  margin: 18px 0 0; padding: 12px 14px; border-radius: var(--r-in);
  background: var(--acc-soft); border: 1px solid var(--acc-line);
  font-size: 14px; color: var(--text); text-align: left;
}
/* Прогресс прилипает к верху: на длинной анкете «осталось 3» видно с любого вопроса.
   Высота постоянная — меняется только текст и ширина полосы, вопросы не сдвигаются. */
.meter {
  position: sticky; top: 0; z-index: 4;
  margin: 18px -16px 14px; padding: 12px 16px;
  display: flex; align-items: center; gap: 12px;
  background: var(--bg); border-bottom: 1px solid var(--line);
}
.meter__track { flex: 1; height: 6px; border-radius: 6px; background: var(--card2); overflow: hidden; }
.meter__fill { height: 100%; width: 0%; background: var(--acc); border-radius: 6px; transition: width .3s ease; }
.meter__label { font-size: 13px; color: var(--hint); font-variant-numeric: tabular-nums; white-space: nowrap; }
.meter__label b { color: var(--text); font-weight: 600; }

/* ─── Вопросы ─── */
.q {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; margin-bottom: 12px; scroll-margin-top: 64px;
  transition: border-color .2s ease;
}
.q[hidden] { display: none; }
/* Условный вопрос появляется мягко — иначе блок «прыгает» в форму и человек теряет место */
.q--appear { animation: appear .28s ease; }
@keyframes appear { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.q--flag { border-color: var(--danger); animation: nudge 0.32s ease; }
@keyframes nudge {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}
@media (prefers-reduced-motion: reduce) { .q--flag, .q--appear { animation: none; } }
/* Номер вопроса — как шаг в мастере: отвеченный становится лаймовой галочкой */
.q__top { display: flex; gap: 12px; align-items: flex-start; }
.q__tb { flex: 1; min-width: 0; }
.q__num {
  flex: none; position: relative; width: 26px; height: 26px; margin-top: -1px; border-radius: 50%;
  border: 1px solid var(--line2); color: var(--hint);
  font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s ease, border-color .2s ease, color .2s ease;
}
.q--done .q__num { background: var(--acc); border-color: var(--acc); color: transparent; }
.q--done .q__num::after {
  content: ''; position: absolute; left: 9px; top: 5px; width: 6px; height: 11px;
  border: solid var(--acc-ink); border-width: 0 2px 2px 0; transform: rotate(45deg);
}
.q__title { font-size: 17px; font-weight: 600; line-height: 1.3; margin: 1px 0 0; }
.q__opt-note { font-size: 13px; color: var(--hint); font-weight: 400; }
.q__hint { font-size: 14px; color: var(--hint); margin: 5px 0 0; }
.q__err { margin-top: 8px; font-size: 13px; color: var(--hint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.q__err.on { color: var(--danger); }

.opts { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.opt {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 13px 14px; border-radius: var(--r-in);
  background: var(--card2); border: 1px solid transparent; width: 100%; text-align: left;
  color: var(--text); font: inherit; font-size: 15px; line-height: 1.34;
  cursor: pointer; transition: background .15s ease, border-color .15s ease;
}
.opt:active { background: color-mix(in srgb, #fff 4%, var(--card2)); }
.opt__mark {
  flex: none; width: 20px; height: 20px; margin-top: 0; border-radius: 50%;
  border: 1.5px solid var(--line2); position: relative;
  transition: background .15s ease, border-color .15s ease;
}
.opt[aria-pressed="true"] { background: var(--acc-soft); border-color: var(--acc-line); }
.opt[aria-pressed="true"] .opt__mark { background: var(--acc); border-color: var(--acc); }
.opt[aria-pressed="true"] .opt__mark::after {
  content: ''; position: absolute; left: 5.5px; top: 2px; width: 5px; height: 10px;
  border: solid var(--acc-ink); border-width: 0 2px 2px 0; transform: rotate(45deg);
}

input[type="text"], textarea {
  width: 100%; margin-top: 14px; padding: 13px 14px;
  border-radius: var(--r-in); border: 1px solid var(--line); background: var(--card2);
  color: var(--text); font: inherit; font-size: 16px; /* 16px — иначе iOS зумит при фокусе */
  resize: none; transition: border-color .15s ease;
}
input::placeholder, textarea::placeholder { color: var(--faint); opacity: 1; }
input:focus, textarea:focus { outline: none; border-color: var(--acc-line); }
textarea { min-height: 96px; line-height: 1.4; }
.other-wrap { display: none; }
.other-wrap.on { display: block; }
.other-wrap input[type="text"] { margin-top: 8px; }

.fallback-submit {
  display: none; width: 100%; margin-top: 8px; padding: 16px;
  border: none; border-radius: var(--r-in); background: var(--acc); color: var(--acc-ink);
  font: inherit; font-size: 16px; font-weight: 600; cursor: pointer;
}
.fallback-submit.on { display: block; }
.fallback-submit:disabled { opacity: 0.6; }

.err {
  margin-top: 12px; padding: 12px 14px; border-radius: var(--r-in);
  background: color-mix(in srgb, var(--danger) 14%, var(--card)); border: 1px solid color-mix(in srgb, var(--danger) 45%, transparent);
  color: var(--text); font-size: 14px;
}

/* ─── Экран «готово» ─── карточка награды: свечение, жетон с галочкой на эллипсе, приглашение */
.reward {
  position: relative; overflow: hidden; text-align: center;
  margin-top: 8px; padding: 28px 20px 22px;
  background: var(--card); border: 1px solid var(--line); border-radius: 24px;
}
.reward::before {
  content: ''; position: absolute; left: 50%; top: -60px; width: 420px; height: 300px;
  transform: translateX(-50%);
  background: radial-gradient(closest-side, color-mix(in srgb, var(--acc) 16%, transparent), transparent);
  pointer-events: none;
}
.reward > * { position: relative; }
.reward__art { height: 132px; margin: 0 auto 14px; width: 220px; }
.reward__ring {
  position: absolute; left: 50%; bottom: 6px; width: 200px; height: 42px; transform: translateX(-50%);
  border-radius: 50%; border: 1px solid color-mix(in srgb, var(--acc) 34%, transparent);
  background: radial-gradient(closest-side, color-mix(in srgb, var(--acc) 14%, transparent), transparent);
}
.reward__token {
  position: absolute; left: 50%; top: 4px; width: 92px; height: 92px; transform: translateX(-50%);
  border-radius: 50%; color: var(--acc-ink);
  background: radial-gradient(circle at 34% 28%, #ecffb0, var(--acc) 46%, #7fa81d 100%);
  box-shadow: 0 0 0 6px color-mix(in srgb, var(--acc) 12%, transparent), 0 14px 40px color-mix(in srgb, var(--acc) 30%, transparent);
  display: flex; align-items: center; justify-content: center;
  animation: pop .5s cubic-bezier(.2,1.4,.4,1) both;
}
.reward__token svg { width: 42px; height: 42px; }
.reward--muted .reward__token {
  background: var(--card2); color: var(--hint); box-shadow: 0 0 0 6px rgba(255,255,255,0.03);
  border: 1px solid var(--line2);
}
.reward--muted::before, .reward--muted .reward__ring { opacity: 0.35; }
@keyframes pop { from { opacity: 0; transform: translateX(-50%) scale(.6); } to { opacity: 1; transform: translateX(-50%) scale(1); } }
@media (prefers-reduced-motion: reduce) { .reward__token { animation: none; } }
.reward h2 { font-size: 26px; line-height: 1.18; letter-spacing: -0.02em; margin: 0 auto 10px; max-width: 15em; text-wrap: balance; }
.reward p { color: var(--hint); margin: 0 auto 10px; max-width: 34ch; font-size: 15px; text-wrap: pretty; }
.reward p:last-child { margin-bottom: 0; }
.invite { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--line); }
.invite h3 { margin: 0 0 6px; font-size: 18px; }
.invite p { margin-bottom: 18px; }
.cta {
  display: block; padding: 16px; border-radius: var(--r-in); text-align: center;
  background: var(--acc); color: var(--acc-ink); text-decoration: none; font-weight: 600; font-size: 16px;
}
.done__edit {
  display: block; margin: 16px auto 0; padding: 10px 14px; border: none; background: none;
  color: var(--hint); font: inherit; font-size: 14px; cursor: pointer;
  text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line2);
}
/* Когда приглашения нет, на экране одна карточка — прижатая к верху она выглядит как
   обрезанная страница. Центрируем по высоте. */
.done--center {
  min-height: calc(100vh - 64px);
  display: flex; flex-direction: column; justify-content: center;
}
.empty { text-align: center; color: var(--hint); padding: 40px 12px; font-size: 15px; }
.empty--small { padding: 18px 12px; }

/* ─── Админка ─── основа — админский экран анкеты предзаписи (1.txt) */
.adm-switch {
  display: flex; gap: 4px; padding: 4px; margin-bottom: 16px;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
}
.adm-switch button {
  flex: 1; padding: 9px 6px; border: none; border-radius: 10px; background: transparent;
  color: var(--hint); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
}
.adm-switch button[aria-selected="true"] { background: var(--acc-soft); color: var(--acc); }
.adm-switch + .hero { margin-top: 0; }
/* Пока грузится новый срез — приглушаем, чтобы было видно, что тап услышан */
body.adm-busy .kpis, body.adm-busy .sq, body.adm-busy .rows, body.adm-busy .srcs { opacity: 0.55; transition: opacity .15s ease; }

/* Счётчики — плитки в одной рамке, как статистика в продукте; главная — с лаймовой чертой */
.kpis {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1px; margin-bottom: 10px;
  background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
}
.kpi { position: relative; background: var(--card); padding: 14px 14px 13px; min-width: 0; display: flex; flex-direction: column; }
.kpi__l { order: -1; display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--hint); }
.kpi__l svg { width: 15px; height: 15px; flex: none; }
.kpi__n { font-size: 28px; line-height: 1.15; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; margin-top: 6px; }
.kpi__p { font-size: 13px; margin-top: 2px; font-variant-numeric: tabular-nums; color: var(--hint); }
.kpi--acc .kpi__l { color: var(--acc); }
.kpi--acc::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--acc); }
.adm-note { font-size: 13px; color: var(--hint); margin: 6px 2px 10px; }
.adm-h { font-size: 18px; font-weight: 600; color: var(--text); letter-spacing: -0.01em; margin: 28px 2px 10px; }
.adm-hrow { display: flex; align-items: center; gap: 8px; margin: 28px 2px 10px; }
.adm-hrow .adm-h { margin: 0; flex: 1; }
.adm-legend { font-size: 13px; color: var(--hint); margin: -4px 2px 10px; }

/* Активные условия фильтра — прилипают к верху, пока листаешь сводку */
.fbar {
  position: sticky; top: 0; z-index: 5;
  display: flex; flex-wrap: wrap; gap: 6px;
  margin: 0 -16px; padding: 10px 16px;
  background: var(--bg); border-bottom: 1px solid var(--line);
}
.chip {
  display: inline-flex; align-items: center; gap: 6px; max-width: 100%;
  padding: 6px 9px 6px 10px; border: 1px solid var(--acc-line); border-radius: 10px;
  background: var(--acc-soft); color: var(--text);
  font: inherit; font-size: 13px; cursor: pointer; text-align: left;
}
.chip__q { color: var(--hint); max-width: 9.5em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: none; }
.chip__v { font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip__x { color: var(--acc); font-size: 16px; line-height: 1; flex: none; }
.chip--reset { background: none; border-color: transparent; color: var(--acc); padding-left: 6px; }

.srcs { display: flex; flex-direction: column; gap: 8px; }
.src {
  display: block; width: 100%; padding: 13px 14px; border: 1px solid var(--line); border-radius: 14px;
  background: var(--card); color: var(--text); font: inherit; text-align: left; cursor: pointer;
}
.src[aria-pressed="true"], .bar[aria-pressed="true"] { border-color: var(--acc); }
.src__top { display: flex; align-items: baseline; gap: 8px; }
.src__t { font-weight: 600; font-size: 15px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.src__n { margin-left: auto; font-size: 14px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.src__sub { font-size: 13px; color: var(--hint); margin-top: 3px; }
.src--empty { opacity: 0.5; }

/* Сводка по вопросу */
.sq { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 10px; }
.sq__t { font-size: 16px; font-weight: 600; line-height: 1.3; }
.sq__arch { font-weight: 400; color: var(--hint); font-size: 13px; }
.sq__meta { font-size: 13px; color: var(--hint); margin-top: 3px; }
.bars { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; }
.bar {
  position: relative; overflow: hidden;
  display: flex; align-items: baseline; gap: 10px;
  width: 100%; padding: 10px 12px; border: 1px solid transparent; border-radius: 10px;
  background: var(--card2); color: var(--text);
  font: inherit; font-size: 14px; line-height: 1.3; text-align: left; cursor: pointer;
}
.bar__fill {
  position: absolute; left: 0; top: 0; bottom: 0; pointer-events: none;
  background: color-mix(in srgb, var(--acc) 16%, transparent);
  border-right: 2px solid color-mix(in srgb, var(--acc) 55%, transparent);
}
.bar__fill[style*="width: 0%"] { border-right: none; }
.bar--good .bar__fill { background: color-mix(in srgb, var(--acc) 26%, transparent); }
.bar--other .bar__label { font-style: italic; }
.bar--gone .bar__label { color: var(--hint); text-decoration: line-through; }
.bar__label { position: relative; flex: 1; min-width: 0; }
.bar__n { position: relative; flex: none; font-size: 13px; color: var(--hint); font-variant-numeric: tabular-nums; white-space: nowrap; }
.texts { margin-top: 10px; }
.texts__toggle {
  border: none; background: none; padding: 4px 0; color: var(--acc);
  font: inherit; font-size: 14px; cursor: pointer;
}
.texts__toggle::after { content: ' ▾'; }
.texts__toggle.on::after { content: ' ▴'; }
.texts__list { margin-top: 6px; max-height: 420px; overflow-y: auto; border-top: 1px solid var(--line); }
.texts__it { padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; white-space: pre-wrap; overflow-wrap: anywhere; }
.texts__who { font-size: 12px; color: var(--hint); margin-top: 2px; }

/* Второстепенные кнопки — контуром, как «Обновить» в продукте */
.csv {
  padding: 7px 12px; border: 1px solid var(--line2); border-radius: 10px;
  background: transparent; color: var(--text); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
}
.csv:disabled { opacity: 0.45; }
.more {
  display: block; width: 100%; margin-top: 4px; padding: 13px; border: 1px solid var(--line2); border-radius: var(--r-in);
  background: transparent; color: var(--text); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
}

/* Список людей */
.row { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px 15px; margin-bottom: 8px; cursor: pointer; }
.row__top { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.row__name { font-weight: 600; font-size: 15px; min-width: 0; overflow-wrap: anywhere; }
.row__when { margin-left: auto; font-size: 12px; color: var(--hint); white-space: nowrap; }
.row__sub { font-size: 13px; color: var(--hint); margin-top: 5px; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.tag { font-size: 11px; padding: 2px 8px; border-radius: 6px; background: var(--card2); border: 1px solid var(--line); color: var(--hint); white-space: nowrap; }
.tag--in { background: var(--acc-soft); border-color: var(--acc-line); color: var(--acc); }
/* «Не знаем» — не то же, что «нельзя»: метка есть, но не кричит */
.tag--faint { opacity: 0.6; }
.row__body { display: none; margin: 12px 0 0; padding-top: 12px; border-top: 1px solid var(--line); font-size: 14px; }
.row.open { border-color: var(--line2); }
.row.open .row__body { display: block; }
.row__body dt { font-size: 12px; color: var(--hint); margin-top: 10px; }
.row__body dt:first-child { margin-top: 0; }
.row__body dd { margin: 2px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.row__body .write { display: inline-block; margin-top: 14px; color: var(--acc); text-decoration: none; font-weight: 600; }
.row--pale { cursor: default; }
.row--pale .row__name { font-weight: 500; }

/* ─── Конструктор ─── */
.bcard { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 10px; }
.bset__row { display: flex; align-items: center; gap: 12px; }
.bset__t { flex: 1; min-width: 0; }
.bset__h { font-size: 15px; font-weight: 600; }
.bset__h--group { margin-top: 18px; }
.bset__h--group:first-child { margin-top: 0; }
.bset__s { font-size: 13px; color: var(--hint); margin-top: 2px; }
/* Переключатель «принимает ответы» */
.tgl {
  flex: none; position: relative; width: 50px; height: 30px; border: none; border-radius: 15px;
  background: var(--line2); cursor: pointer; transition: background .15s ease;
}
.tgl::after {
  content: ''; position: absolute; left: 3px; top: 3px; width: 24px; height: 24px; border-radius: 50%;
  background: #d9dbd3; transition: transform .15s ease, background .15s ease;
}
.tgl[aria-checked="true"] { background: var(--acc); }
.tgl[aria-checked="true"]::after { transform: translateX(20px); background: var(--acc-ink); }

/* Список вопросов: карточка — открыть редактор, стрелки — порядок */
.bq { display: flex; align-items: stretch; gap: 4px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; margin-bottom: 8px; }
.bq__main {
  flex: 1; min-width: 0; display: flex; gap: 10px; align-items: flex-start;
  padding: 13px 4px 13px 14px; border: none; background: none; color: var(--text);
  font: inherit; text-align: left; cursor: pointer;
}
.bq__n {
  flex: none; width: 26px; height: 26px; border-radius: 50%; margin-top: 0;
  border: 1px solid var(--line2); color: var(--hint); font-size: 12px; font-weight: 600;
  display: flex; align-items: center; justify-content: center; font-variant-numeric: tabular-nums;
}
.bq__body { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.bq__t { font-size: 15px; font-weight: 600; line-height: 1.3; }
.bq__meta { font-size: 12px; color: var(--hint); }
.bq__cond { font-size: 12px; color: var(--acc); }
.bq--cond { margin-left: 18px; }
.bq__arrows { flex: none; display: flex; flex-direction: column; justify-content: center; gap: 4px; padding: 8px 8px 8px 0; }
.ibtn {
  flex: none; width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--card2); color: var(--text); font: inherit; font-size: 16px; cursor: pointer;
}
.ibtn:disabled { opacity: 0.3; cursor: default; }
.ibtn--x { font-size: 20px; color: var(--danger); }
.badd {
  display: block; width: 100%; padding: 14px; margin-bottom: 10px;
  border: 1px dashed var(--line2); border-radius: 16px;
  background: none; color: var(--acc); font: inherit; font-size: 15px; font-weight: 600; cursor: pointer;
}
.barch { display: flex; align-items: center; gap: 10px; }
.barch__t { flex: 1; min-width: 0; font-size: 14px; }
.lbtn {
  flex: none; padding: 6px 2px; border: none; background: none; color: var(--acc);
  font: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
}
.lbtn:disabled { opacity: 0.4; }
.lbtn--danger { color: var(--danger); }
.lbtn--back { padding: 2px 0 10px; color: var(--hint); }

/* Поля редактора */
.ed__h { font-size: 22px; letter-spacing: -0.01em; margin: 0 2px 12px; }
.fld { display: block; margin-top: 16px; }
.fld:first-child { margin-top: 0; }
.fld__l { display: block; font-size: 13px; color: var(--hint); margin-bottom: 6px; }
.fld__n { display: block; font-size: 12px; color: var(--hint); margin-top: 6px; overflow-wrap: anywhere; }
.fld__ro { font-size: 14px; }
.fld input[type="text"], .fld textarea, .bcard select, .linkrow__i, .bsrc__in { margin-top: 0; }
.fld textarea { min-height: 0; }
.bcard select {
  width: 100%; padding: 12px 13px; border: 1px solid var(--line); border-radius: var(--r-in);
  background: var(--card2); color: var(--text); font: inherit; font-size: 16px;
}
.seg { display: flex; gap: 4px; background: var(--card2); border: 1px solid var(--line); padding: 4px; border-radius: var(--r-in); }
.seg button {
  flex: 1; padding: 9px 4px; border: none; border-radius: 8px; background: transparent;
  color: var(--hint); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; line-height: 1.2;
}
.seg button[aria-selected="true"] { background: var(--acc-soft); color: var(--acc); }
.optrow { display: flex; gap: 6px; align-items: center; margin-bottom: 6px; }
.optrow input[type="text"] { flex: 1; min-width: 0; margin: 0; }
.chk { display: flex; gap: 10px; align-items: flex-start; margin-top: 14px; font-size: 15px; cursor: pointer; }
.chk input { flex: none; width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--acc); }
.fld .chk { margin-top: 8px; }
.bbtn {
  display: block; width: 100%; margin: 4px 0 10px; padding: 15px; border: none; border-radius: var(--r-in);
  background: var(--acc); color: var(--acc-ink); font: inherit; font-size: 16px; font-weight: 600; cursor: pointer;
}
.bbtn:disabled { opacity: 0.6; }
.bbtn + .lbtn--danger { display: block; margin: 6px auto 0; }

/* Источники */
.bsrc__top { display: flex; align-items: center; gap: 8px; }
.bsrc__t { font-weight: 600; font-size: 15px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bsrc__in { flex: 1; min-width: 0; padding: 8px 10px !important; }
.bsrc__acts { display: flex; align-items: center; gap: 16px; margin-top: 8px; }
.linkrow { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.linkrow__i {
  flex: 1; min-width: 0; padding: 9px 10px !important; font-size: 13px !important;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace !important; color: var(--text);
}

/* Догон ботом */
.fu-step { border-top: 1px solid var(--line); margin-top: 14px; }
.fu-step .chk { font-weight: 600; margin-top: 14px; }
.fu-delay { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 10px 0 8px; font-size: 14px; }
.fu-delay input[type="text"] { width: 64px; margin: 0; padding: 9px 10px; text-align: center; }
.bcard .fu-delay select { width: auto; padding: 9px 10px; }
.fu-step textarea { margin-top: 0; min-height: 0; overflow: hidden; }
.fu-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 6px 0 2px; }
.fu-stat { font-size: 12px; color: var(--hint); min-width: 0; }
.fu-warn { color: var(--danger); }
.fu-btn { border-top: 1px solid var(--line); padding-top: 14px; }

.toast {
  position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom)); z-index: 20;
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  max-width: calc(100% - 32px); padding: 12px 16px; border-radius: var(--r-in);
  background: var(--card2); border: 1px solid var(--line2); color: var(--text); font-size: 14px; text-align: center;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  transition: opacity .2s ease, transform .2s ease;
}
.toast.on { opacity: 1; transform: translate(-50%, 0); }

/* Ссылки на профили: цвет фирменный — в списке площадку ищут по цвету, а не по значку */
.blink { display: inline-flex; align-items: center; gap: 4px; text-decoration: none; font-weight: 600; white-space: nowrap; }
.blink__i { width: 14px; height: 14px; display: block; flex: none; }
.blink--tg { color: #4cbcf5; }
.blink--ig { color: #f0588d; }
