/* Экран созвона (Этап 3, часть 2б, Дизайн-спека §4.8–4.14, §5.4). Префикс cl-, скрипт cs-, прерывание fm-.
   Цвета только из tokens.css. Анимируются только transform и opacity. Телефон: кнопки исхода внизу, не ниже 56 px. */

/* ---------- Режим сосредоточения ---------- */
.app--call .topbar,
.app--call .tabbar-wrap {
  display: none;
}
.main--call {
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.main--call .page {
  flex: 1;
  min-height: 0;
  width: 100%;
  max-width: none;
  padding: 0;
  gap: 0;
}
.copy-ghost {
  position: fixed;
  top: 0;
  left: 0;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
/* на экране созвона одна полоса про связь (чип «Нет связи, не записано: N» под шапкой), общая полоса сверху не нужна и съедает 56 px */
body.on-call .net-banner {
  display: none !important;
}
/* тост не закрывает нижнюю зону: высота зоны кладётся в --cl-dock-h экраном созвона */
body.on-call .toast-stack {
  bottom: calc(var(--cl-dock-h, 0px) + var(--s-3));
}

.cl {
  flex: 1;
  min-height: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
}
.cl-loading,
.cl-fail {
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
  padding: var(--s-4);
}

/* ---------- Шапка ---------- */
/* Вариант 2 (решение Ильи 10.11): шапка спокойная. Телефон: «свернуть», имя лида, «Скрипт». Таймер, возраст и ник под именем только на компьютере, на телефоне они в листе «Ещё». */
.cl-head {
  flex: none;
  display: flex;
  align-items: center;
  gap: var(--s-3);
  min-height: calc(60px + env(safe-area-inset-top));
  padding: calc(env(safe-area-inset-top) + var(--s-2)) var(--s-4) var(--s-2);
  background: var(--bg);
}
.cl-back {
  flex: none;
  min-width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  border-radius: var(--r-m);
  background: var(--surface-2);
  color: var(--text-2);
  transition: transform var(--dur-press) var(--ease-out), background-color var(--dur-fast) var(--ease-out);
}
.cl-back:active {
  transform: scale(0.97);
}
.cl-back__t {
  display: none;
  font-weight: 600;
}
.cl-who {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.cl-name {
  font: 700 1.0625rem / 1.2 var(--f-text);
  overflow-wrap: anywhere;
}
.cl-flags {
  font-size: 0.8125rem;
  line-height: 1.25;
  color: var(--accent-text);
}
.cl-timer {
  font-size: 0.8125rem;
  line-height: 1.2;
  color: var(--mute);
  font-variant-numeric: tabular-nums;
}
.cl-sub {
  display: none;
  font-size: 0.875rem;
  line-height: 1.25;
  color: var(--mute);
  overflow-wrap: anywhere;
}
.cl-sub .cl-timer {
  display: inline;
  font-size: inherit;
}
.cl-scriptbtn.btn {
  flex: none;
  min-height: 44px;
  padding: 0 var(--s-5);
  border-radius: var(--r-pill);
  background: var(--surface-2);
  box-shadow: inset 0 0 0 1px var(--line-2);
  color: var(--accent-text);
  font-weight: 600;
}
.cl-scriptbtn.btn[aria-pressed="true"] {
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1px var(--accent-line);
}
.cl-sync {
  flex: none;
  display: flex;
  gap: 6px;
  padding: 0 var(--s-4);
}
.cl-sync:empty {
  display: none;
}
.cl-sync .chip {
  height: 26px;
  padding: 0 10px;
  font-size: 0.75rem;
}

/* ---------- Корпус экрана ---------- */
.cl-main {
  flex: 1;
  min-height: 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.cl-body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

/* ---------- Карточка продукта ---------- */
.cl-stage {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  display: flex;
  flex-direction: column;
  padding: var(--s-2) var(--s-4);
}
.cl-card {
  margin-block: auto; /* карточка по центру свободного места; если не помещается, прокрутка начинается сверху, а не режет верх */
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
}
.cl-card.cl-in {
  animation: cl-in var(--dur-base) var(--ease-out) both;
}
.cl-card.cl-in--back {
  animation-name: cl-in-back;
}
@keyframes cl-in {
  from {
    opacity: 0;
    transform: translateX(24px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes cl-in-back {
  from {
    opacity: 0;
    transform: translateX(-24px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.cl-pcard {
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
  padding: var(--s-5) var(--s-5) var(--s-4);
  border-radius: var(--r-l);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line), var(--glow-wait);
}
.cl-cmeta {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mute);
}
.cl-cmeta__n {
  white-space: nowrap;
}
.cl-cmeta__n b {
  color: var(--text);
  font-weight: 800;
  letter-spacing: 0.04em;
}
.cl-cmeta .cl-strip {
  flex: 1;
  min-width: 24px;
}
.cl-cmeta__vpn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  color: var(--accent-text);
}
.cl-strip {
  display: flex;
  align-items: center;
  gap: 2px;
  height: 8px;
}
.cl-seg {
  flex: 1;
  min-width: 0;
  display: block;
  height: 4px;
  max-width: 28px;
  border-radius: 2px;
  background: var(--ring-track);
}
.cl-seg.is-issued {
  background: var(--accent-lo);
}
.cl-seg.is-not {
  background: var(--mute);
}
.cl-seg.is-cur {
  height: 5px;
  background: var(--accent);
}
.cl-title {
  font: 800 2.25rem / 0.98 var(--f-display);
  text-transform: uppercase;
  letter-spacing: 0.005em;
  overflow-wrap: anywhere;
}
.cl-state {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
}
.cl-state__pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 12px;
  border-radius: var(--r-pill);
  font-weight: 700;
  background: var(--surface-2);
  color: var(--text-2);
}
.cl-state[data-state="issued"] .cl-state__pill {
  background: var(--accent-soft);
  color: var(--accent-text);
}
.cl-reset.btn {
  min-height: 44px;
}
/* «Главное при оформлении»: одна заметная строка из условий оффера (например «Получить курьером, не в отделении») */
.cl-key {
  display: flex;
  gap: var(--s-3);
  align-items: flex-start;
  padding: var(--s-3) var(--s-4);
  border-radius: var(--r-m);
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1px var(--accent-line);
}
.cl-key > .icon {
  flex: none;
  margin-top: 2px;
  color: var(--accent-text);
}
.cl-key__b {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.cl-key__l {
  color: var(--accent-text);
}
.cl-key__t {
  margin: 0;
  font-size: 1.1875rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text);
  overflow-wrap: anywhere;
  text-wrap: balance;
}
.cl-cond {
  margin: 0;
  font-size: 1.0625rem;
  line-height: 1.4;
  color: var(--text-2);
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  overflow: hidden;
}
.cl-goal {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0 var(--s-2);
}
.cl-goal__t {
  margin: 0;
  font-size: 1rem;
  line-height: 1.4;
  color: var(--text-2);
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  overflow: hidden;
}
.cl-caps {
  font-weight: 800;
  color: var(--warn);
}
.cl-caps-cd {
  font-weight: 700;
  color: var(--text);
}

/* строка «Вернуть» после отметки: спокойная, без суммы; ложится над кнопкой «Ещё»,
   кнопки исхода внизу остаются на месте */
.cl-last {
  flex: none;
  min-height: 52px;
  display: flex;
  align-items: center;
  gap: var(--s-2);
  padding: 0 var(--s-1) 0 var(--s-3);
  border-radius: var(--r-m);
  background: var(--raised);
  box-shadow: inset 0 0 0 1px var(--line-2);
  color: var(--text-2);
  font-size: var(--t-small);
  animation: cl-fade var(--dur-fast) var(--ease-out) both;
}
@keyframes cl-fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
.cl-last .icon {
  flex: none;
  color: var(--ok);
}
.cl-last__t {
  flex: 1;
  min-width: 0;
  padding: var(--s-1) 0;
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.cl-last__b.btn {
  flex: none;
  min-height: 44px;
  padding: 0 var(--s-3);
}

/* ---------- Нижняя зона ---------- */
.cl-dock {
  flex: none;
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
  padding: var(--s-2) var(--s-4) calc(var(--s-3) + env(safe-area-inset-bottom));
  background: var(--bg);
  position: relative;
  z-index: var(--z-sticky);
}
.cl-dock .caps-warn {
  padding: var(--s-2) var(--s-3);
  gap: var(--s-2);
  font-size: 0.875rem;
  line-height: 1.25;
}
/* «Ещё» стоит над кнопками исхода (не в самом низу) и чуть ниже их: 52 px против 72 */
.cl-more-btn.btn {
  min-height: 52px;
  background: transparent; /* не такая же плашка, как «Скопировать ссылку»: проверка просила различать две похожие кнопки */
  box-shadow: inset 0 0 0 1px var(--line-2);
  color: var(--accent-text);
  font-weight: 600;
}
.cl-more-btn.btn .icon:last-child {
  color: var(--accent-text);
}
.cl-copy {
  display: flex;
  flex-direction: column;
  gap: var(--s-1);
}
.cl-copy .btn {
  min-height: 56px;
  background: var(--surface-2);
  box-shadow: inset 0 0 0 1px var(--line-2);
  color: var(--text);
}
.cl-copy .btn .icon {
  color: var(--accent-text);
}
.cl-copy .btn.is-done {
  background: var(--ok-soft);
  color: var(--ok);
  box-shadow: inset 0 0 0 1px var(--ok);
}
.cl-copy .btn.is-done .icon {
  color: var(--ok);
}
.cl-untag {
  color: var(--text-2);
  line-height: 1.35;
}
.cl-copyerr {
  margin: 0;
}
.cl-outsbox {
  display: flex;
  flex-direction: column;
  gap: var(--s-1);
}
.cl-outs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-3);
}
.cl-out {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  border-radius: 20px;
  font: 700 1.1875rem / 1.2 var(--f-text);
  user-select: none;
  transition: transform var(--dur-press) var(--ease-out), background-color var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}
.cl-out:active {
  transform: scale(0.97);
}
.cl-out--not_issued {
  background: var(--raised);
  color: var(--text);
  box-shadow: inset 0 0 0 1px var(--line-strong);
}
.cl-out--issued {
  background: var(--btn-fill);
  color: var(--accent-ink);
  box-shadow: var(--glow-btn);
}
/* продукт уже отмечен: выбранная кнопка яркая, вторая спокойная */
.cl-outs--set .cl-out:not(.is-on) {
  background: var(--surface-2);
  color: var(--text-2);
  box-shadow: inset 0 0 0 1px var(--line);
}
.cl-outs--set .cl-out--not_issued.is-on {
  background: var(--raised);
  color: var(--text);
  box-shadow: inset 0 0 0 2px var(--text-2);
}
.cl-out[aria-disabled="true"] {
  background: var(--surface-2);
  color: var(--disabled);
  box-shadow: none;
}
.cl-fin.btn {
  min-height: 48px;
}

/* ---------- Вопрос-«ворота» ---------- */
.cl-gate {
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
  padding-top: var(--s-4);
}
.cl-gate__after {
  margin: 0;
  font-size: var(--t-small);
  line-height: 1.4;
}
.cl-gate__q {
  font: 800 1.875rem / 1.02 var(--f-display);
  text-transform: uppercase;
  letter-spacing: 0.005em;
}
.cl-gbtns {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
}
.cl-gbtn {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  padding: var(--s-2) var(--s-4);
  border-radius: var(--r-m);
  background: var(--surface-2);
  box-shadow: inset 0 0 0 1px var(--line-strong);
  font: 700 var(--t-btn) / 1.2 var(--f-text);
  text-align: center;
  transition: transform var(--dur-press) var(--ease-out), background-color var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}
.cl-gbtn:active {
  transform: scale(0.97);
}
.cl-gbtn.is-on {
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1px var(--accent-line);
  color: var(--accent-text);
}
.cl-parked {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
  padding: var(--s-4);
  border-radius: var(--r-m);
  background: var(--surface-2);
}
.cl-alldone,
.cl-empty {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--s-3);
  padding-top: var(--s-5);
}
.cl-alldone__ic {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: var(--r-m);
  background: var(--ok-soft);
  color: var(--ok);
}
.cl-h1 {
  font: 800 var(--t-h1) / 1 var(--f-display);
  text-transform: uppercase;
  letter-spacing: 0.005em;
  overflow-wrap: anywhere;
}
.cl-h2 {
  font: 800 1.75rem / 1.05 var(--f-display);
  text-transform: uppercase;
}

/* ---------- Список продуктов (внутри «Ещё») ---------- */
/* ---------- «Ещё»: условия, про лида, вопросы, продукты, «Прервать», «Завершить» ---------- */
.cl-more {
  display: flex;
  flex-direction: column;
  gap: var(--s-5);
}
.cl-more__sub {
  margin: calc(-1 * var(--s-2)) 0 0;
}
.cl-sec {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
}
.cl-sec__l {
  margin: 0;
  color: var(--accent-text);
}
.cl-sec__t {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.45;
  color: var(--text-2);
  overflow-wrap: anywhere;
  white-space: pre-line;
}
.cl-sec__t--clamp {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  overflow: hidden;
}
.cl-sec__t--clamp.is-open {
  display: block;
  overflow: visible;
}
.cl-sec__more.btn {
  align-self: flex-start;
  min-height: 44px;
  padding: 0;
  color: var(--accent-text);
  font-size: 0.9375rem;
  font-weight: 700;
}
.cl-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-2);
}
.cl-nav .btn {
  min-height: 48px;
}
.cl-nav .btn[aria-disabled="true"] {
  opacity: 0.5;
}
.cl-q--last {
  margin-top: 0;
}
/* «Прервать» и «Завершить созвон» закреплены внизу листа: достаются одним нажатием после «Ещё» */
.cl-more__foot {
  position: sticky;
  bottom: calc(-1 * var(--s-6));
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-2);
  margin: 0 calc(-1 * var(--s-5)) calc(-1 * var(--s-6));
  padding: var(--s-3) var(--s-5) calc(var(--s-3) + env(safe-area-inset-bottom));
  background: var(--raised);
  border-top: 1px solid var(--line);
}
.cl-more__foot .btn {
  min-height: 52px;
  background: var(--surface-2);
}
.cl-more__foot .cl-tool--fm.btn {
  color: var(--stop-text);
}
.cl-more__foot .js-finish.btn,
.cl-more__foot .js-to-summary.btn {
  color: var(--accent-text);
}
.cl-more__foot:has(> .btn:only-child) {
  grid-template-columns: 1fr;
}

.cl-lst {
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
}
.cl-qs {
  display: flex;
  flex-direction: column;
  gap: var(--s-1);
}
.cl-q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-2);
  min-height: 48px;
  padding: 0 var(--s-1) 0 var(--s-3);
  border-radius: var(--r-s);
  background: var(--surface-2);
  font-size: var(--t-small);
}
.cl-q__t {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
  line-height: 1.25;
}
.cl-q__b.btn {
  min-height: 44px;
  padding: 0 var(--s-3);
  color: var(--text-2); /* вторичное действие: не спорит с главной оранжевой кнопкой */
}
.cl-ol {
  display: flex;
  flex-direction: column;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.cl-li {
  width: 100%;
  min-height: 48px;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) 20px;
  align-items: center;
  gap: var(--s-2);
  padding: 6px var(--s-3);
  border-radius: var(--r-s);
  text-align: left;
  color: var(--text-2);
  transition: background-color var(--dur-fast) var(--ease-out), transform var(--dur-press) var(--ease-out);
}
.cl-li:active {
  transform: scale(0.985);
}
.cl-li.is-here {
  background: var(--accent-soft);
  color: var(--text);
  box-shadow: inset 0 0 0 1px var(--accent-line);
}
.cl-li.is-parked {
  color: var(--mute);
}
.cl-li__n {
  font: 800 1rem / 1 var(--f-display);
  color: var(--mute);
}
.cl-li__t {
  display: flex;
  flex-direction: column;
  gap: 1px;
  font-size: 0.9375rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
  min-width: 0;
}
.cl-li__w {
  font-size: 0.8125rem;
  color: var(--mute);
}
.cl-li.is-issued .cl-li__w {
  color: var(--accent-text);
}
.cl-li__s {
  display: inline-flex;
  align-items: center;
  width: 20px;
  color: var(--mute);
}
.cl-li.is-issued .cl-li__s {
  color: var(--accent-text);
}

/* ---------- Страницы без хода созвона: подсказка, итог, прерванный, закрытый ---------- */
.cl-head--simple .cl-who {
  flex: 1;
}
.cl-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.cl-page {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
  padding: var(--s-4) var(--s-4) var(--s-5);
}
.cl-when {
  color: var(--text-2);
}
.cl-lead {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
}
.cl-msg {
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
  padding: var(--s-3) var(--s-4);
  border-radius: var(--r-m);
  background: var(--warn-soft);
  color: var(--warn);
}
.cl-msg__t {
  display: flex;
  gap: var(--s-2);
  align-items: flex-start;
  line-height: 1.4;
}
.cl-msg__t .icon {
  flex: none;
  margin-top: 1px;
}
.cl-dock--page {
  border-radius: var(--r-l) var(--r-l) 0 0;
}
.cl-dock--page .cl-acts {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
}
.cl-acts {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
}
.cl-nextcall:empty {
  display: none;
}
/* имя лида и время в кнопке следующего созвона не режутся: текст переносится на вторую строку */
.cl-nextcall .btn {
  height: auto;
  min-height: 56px;
  padding-top: var(--s-2);
  padding-bottom: var(--s-2);
  white-space: normal;
  text-align: center;
  line-height: 1.25;
}
.cl-nextcall .btn .btn__label {
  white-space: normal;
  overflow-wrap: anywhere;
}
/* строка ссылок под главной кнопкой итога: одна-две строки вместо четырёх кнопок */
.cl-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0 var(--s-3);
}
.cl-links .btn {
  min-height: 44px;
  padding: 0 var(--s-2);
  font-size: 0.9375rem;
}
.cl-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-2);
}
.cl-pair .btn {
  min-height: 52px;
  padding: 0 var(--s-3);
}
.cl-recap .recap__sum {
  font-size: 3.25rem;
}
.cl-recap .recap__sum--text {
  font-size: var(--t-num-m);
  white-space: normal;
}
.cl-final-note {
  font-size: var(--t-small);
}
.cl-next {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
}
.cl-step {
  display: flex;
  flex-direction: column;
  gap: var(--s-1);
  padding: var(--s-3) var(--s-4);
  background: var(--surface-2);
  border-radius: var(--r-m);
}
.cl-step__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--s-3);
}
.cl-step__n {
  min-width: 0;
  overflow-wrap: anywhere;
}
.cl-step__t {
  font-size: var(--t-small);
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.cl-step .chip,
.cl-step__d {
  flex: none;
  max-width: 48%;
  font-size: 0.8125rem;
  font-weight: 600;
  text-align: right;
}
.cl-step__d {
  line-height: 1.3;
}
.cl-next__note {
  font-size: var(--t-small);
}
.cl-next__ip {
  display: flex;
  gap: var(--s-2);
  align-items: center;
  color: var(--warn);
  font-weight: 600;
}
.cl-fm-card,
.cl-fm-when {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
  padding: var(--s-4);
  border-radius: var(--r-m);
  background: var(--surface-2);
}
.cl-fm-when {
  flex-direction: row;
  align-items: flex-start;
  flex-wrap: wrap;
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1px var(--accent-line);
}
.cl-fm-when .icon {
  flex: none;
  margin-top: 1px;
  color: var(--accent-text);
}

/* ---------- Прерывание (лист) ---------- */
.fm {
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
}
.fm__reasons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-2);
}
.fm__reason {
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: var(--s-1) var(--s-3);
  border-radius: var(--r-m);
  background: var(--surface-2);
  box-shadow: inset 0 0 0 1px var(--line-strong);
  font-weight: 600;
  line-height: 1.15;
  text-align: center;
  transition: transform var(--dur-press) var(--ease-out), background-color var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}
.fm__reason:active {
  transform: scale(0.97);
}
.fm__reason:last-child:nth-child(odd) {
  grid-column: 1 / -1;
}
.fm__reason[aria-checked="true"] {
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1px var(--accent-line);
  color: var(--accent-text);
}
.fm__err {
  margin: 0;
}
.fm__wait {
  min-height: 52px;
  padding: var(--s-1) var(--s-3);
  border-radius: var(--r-m);
  background: var(--surface-2);
  box-shadow: inset 0 0 0 1px var(--line-strong);
  font-weight: 600;
  text-align: center;
}
.fm__wait[aria-pressed="true"] {
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1px var(--accent-line);
  color: var(--accent-text);
}
.fm__quick {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-2);
}
.fm__quick[hidden] {
  display: none;
}
.slots__quick {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--s-2);
}
.slots__quick[hidden] {
  display: none;
}
.slots__quick .slot-chip--quick {
  min-height: 52px;
  padding-inline: var(--s-2);
}
.slot-chip--quick {
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 2px;
  line-height: 1.15;
}
.slot-chip--quick .fm__q-t {
  font-size: 0.875rem;
  font-weight: 500;
  opacity: 0.85;
}
.slot-chip.is-picked {
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 2px var(--accent-text);
  color: var(--accent-text);
}
/* закреплённая кнопка: «Прервать · причина · время» всегда под большим пальцем, а время и причину нельзя перепутать с самим прерыванием */
.fm__foot {
  position: sticky;
  bottom: calc(-1 * var(--s-6));
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: var(--s-1);
  margin: var(--s-2) calc(-1 * var(--s-5)) calc(-1 * var(--s-6));
  padding: var(--s-3) var(--s-5) calc(var(--s-3) + env(safe-area-inset-bottom));
  background: var(--raised);
  border-top: 1px solid var(--line);
}
.fm__foot .btn {
  height: auto;
  min-height: 56px;
  padding-top: var(--s-2);
  padding-bottom: var(--s-2);
}
.fm__foot .btn .btn__label {
  white-space: normal;
  text-align: center;
  line-height: 1.2;
}
.fm__foot .btn.is-off {
  opacity: 0.55;
}
.fm__hint {
  margin: 0;
  text-align: center;
  min-height: 1.2em;
}
.fm__when {
  margin-top: var(--s-2);
}
.confirm-gap {
  margin-top: var(--s-2);
}
.cl-confirm__t {
  font: 700 var(--t-h2) / var(--t-lh-h2) var(--f-text);
}

/* ---------- Скрипт ---------- */
.cs {
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1;
  gap: var(--s-3);
}
.sheet .cs {
  height: min(72dvh, 640px);
}
.cs-wait {
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
  align-items: flex-start;
  padding: var(--s-4);
  border-radius: var(--r-m);
  background: var(--surface-2);
}
.cs-wait__ic {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: var(--r-m);
  background: var(--accent-soft);
  color: var(--accent-text);
}
.cs-wait__t {
  font: 700 var(--t-h2) / var(--t-lh-h2) var(--f-text);
}
.cs-wait__p {
  color: var(--text-2);
  line-height: 1.5;
}
.cs-tabs {
  position: relative;
  flex: none;
  display: flex;
  gap: var(--s-2);
  overflow-x: auto;
  scrollbar-width: none;
  padding: 2px 0;
}
.cs-tabs::-webkit-scrollbar {
  display: none;
}
.cs-tab {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 12px;
  border-radius: var(--r-pill);
  background: var(--surface-2);
  color: var(--text-2);
  font: 600 0.8125rem / 1 var(--f-text);
  white-space: nowrap;
  transition: transform var(--dur-press) var(--ease-out), background-color var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}
.cs-tab:active {
  transform: scale(0.97);
}
.cs-tab__n {
  color: var(--mute);
  font-variant-numeric: tabular-nums;
}
.cs-tab[aria-selected="true"] {
  background: var(--accent-soft);
  color: var(--accent-text);
  box-shadow: inset 0 0 0 1px var(--accent-line);
}
.cs-tab[aria-selected="true"] .cs-tab__n {
  color: var(--accent-text);
}
.cs-head {
  flex: none;
  display: flex;
  flex-direction: column;
  gap: var(--s-1);
}
.cs-head__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-2);
}
.cs-title {
  font: 800 1.625rem / 1.05 var(--f-display);
  text-transform: uppercase;
}
.cs-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
  padding-right: 2px;
}
.cs-goal {
  font-size: 1.125rem;
  line-height: 1.45;
  color: var(--text);
  font-weight: 600;
}
.cs-block {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
}
.cs-label {
  color: var(--accent-text);
}
.cs-p {
  font-size: 1.125rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.cs-list {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
  font-size: 1.0625rem;
  line-height: 1.45;
  padding-left: var(--s-4);
  list-style: disc;
}
.cs-list--n {
  list-style: decimal;
}
.cs-qa {
  display: flex;
  flex-direction: column;
  gap: var(--s-1);
  padding: var(--s-3) var(--s-4);
  border-radius: var(--r-m);
  background: var(--surface-2);
}
.cs-q {
  font-weight: 700;
  line-height: 1.4;
  color: var(--text-2);
}
.cs-a {
  font-size: 1.0625rem;
  line-height: 1.5;
  padding-left: var(--s-3);
  box-shadow: inset 2px 0 0 var(--accent-line);
}
.cs-foot {
  flex: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-2);
}
.cs-foot .btn.is-off {
  opacity: 0.45;
}

/* ---------- Компьютер ---------- */
@media (min-width: 1024px) {
  .main--call .page {
    padding: var(--s-6) var(--s-7) var(--s-5);
  }
  .cl-head {
    border: 0;
    min-height: 0;
    padding: 0 0 var(--s-4);
    background: none;
    gap: var(--s-3);
  }
  .cl-back {
    padding: 0 var(--s-4);
  }
  .cl-back__t {
    display: inline;
  }
  .cl-name {
    font-size: 1.375rem;
  }
  .cl-timer {
    font-size: var(--t-small);
  }
  .cl-sub {
    display: block;
  }
  .cl--work:not(.has-script) .cl-head {
    width: 100%;
    max-width: 720px;
    margin: 0 auto;
  }
  .cl-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: var(--s-6);
  }
  .cl--work.has-script .cl-body {
    grid-template-columns: minmax(0, 1fr) 380px;
  }
  /* на компьютере вся рабочая область отдана карточке текущего продукта: списка продуктов слева нет (он в «Ещё»), всё главное в окне 1280×640 без прокрутки */
  .cl-main {
    width: 100%;
    max-width: 720px;
    margin: 0 auto;
  }
  .cl-sync {
    padding: 0 0 var(--s-2);
  }
  .cl-stage {
    padding: 0;
  }
  .cl-card {
    gap: var(--s-3);
  }
  .cl-pcard {
    padding: var(--s-5) var(--s-6) var(--s-4);
    gap: var(--s-3);
    box-shadow: inset 0 0 0 1px var(--line);
  }
  .cl-title {
    font-size: 2.5rem;
  }
  .cl-key__t {
    font-size: 1.125rem;
  }
  .cl-cond {
    -webkit-line-clamp: 2;
    line-clamp: 2;
  }
  .cl-goal__t {
    -webkit-line-clamp: 2;
    line-clamp: 2;
  }
  .cl-copy .btn {
    min-height: 52px;
  }
  .cl--work.has-script .cl-title {
    font-size: 2.125rem;
  }
  .cl-gate__q {
    font-size: 2.5rem;
  }
  .cl--work.has-script .cl-title {
    font-size: 2.125rem;
  }
  .cl-dock {
    background: none;
    padding: var(--s-4) 0 0;
    gap: var(--s-2);
  }
  .cl-more-btn.btn {
    min-height: 48px;
  }
  .cl-out {
    min-height: 64px;
  }
  .cl-dock .caps-warn {
    font-size: 1rem;
  }
  .cl-gbtns {
    flex-direction: row;
  }
  .cl-gbtn {
    flex: 1;
  }
  .cl-script {
    min-height: 0;
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-xl);
    overflow: hidden;
    padding: 0 var(--s-5) var(--s-4);
  }
  .cl-script .cs {
    flex: 1;
    min-height: 0;
  }
  .cl-script__head {
    flex: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--s-4) 0 var(--s-2);
  }
  .cl-script__t {
    font: 700 var(--t-h2) / var(--t-lh-h2) var(--f-text);
  }
  .sheet .cs {
    height: calc(100dvh - 140px);
  }
  .cl-page {
    padding-top: var(--s-2);
  }
  .cl--start .cl-scroll,
  .cl--sum .cl-scroll,
  .cl--fm .cl-scroll,
  .cl--closed .cl-scroll {
    flex: 0 1 auto;
  }
  .cl-dock--page {
    border-radius: var(--r-l);
    border: 1px solid var(--line);
    background: var(--surface);
    margin: var(--s-3) auto 0;
    width: 100%;
    max-width: 720px;
  }
  .cl--sum .cl-page,
  .cl--sum .cl-dock--page,
  .cl--sum .cl-head--simple {
    max-width: 1040px;
  }
  .cl--sum .cl-page {
    display: grid;
    grid-template-columns: minmax(320px, 400px) minmax(0, 1fr);
    align-items: start;
    gap: var(--s-5);
  }
  .cl--sum .cl-dock--page .cl-acts {
    max-width: none;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: stretch;
  }
  .cl--sum .cl-dock--page .cl-acts > .btn,
  .cl--sum .cl-dock--page .cl-acts > .cl-nextcall,
  .cl--sum .cl-dock--page .cl-acts > .cl-pair {
    flex: 1 1 240px;
  }
  .cl--sum .cl-nextcall .btn {
    height: 100%;
  }
  .cl-head--simple {
    max-width: 720px;
    width: 100%;
    margin: 0 auto;
  }
  .cl-recap .recap__sum {
    font-size: 4.5rem;
  }
  .cl-pair {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 1023px) {
  .cl-script {
    display: none;
  }
}
/* компьютер с высоким окном (1440×900): то же, но крупнее; в низком (1280×640) остаётся плотный вид без прокрутки */
@media (min-width: 1024px) and (min-height: 800px) {
  .cl-main {
    max-width: 760px;
  }
  .cl--work:not(.has-script) .cl-head {
    max-width: 760px;
  }
  .cl-card {
    gap: var(--s-4);
  }
  .cl-pcard {
    padding: var(--s-6) var(--s-7) var(--s-5);
    gap: var(--s-4);
  }
  .cl-cmeta {
    font-size: 0.875rem;
  }
  .cl-title {
    font-size: 3.25rem;
  }
  .cl--work.has-script .cl-title {
    font-size: 2.5rem;
  }
  .cl-key {
    padding: var(--s-4) var(--s-5);
  }
  .cl-key__t {
    font-size: 1.375rem;
  }
  .cl-cond {
    font-size: 1.125rem;
  }
  .cl-goal__t {
    font-size: 1.125rem;
  }
  .cl-copy .btn {
    min-height: 56px;
  }
  .cl-more-btn.btn {
    min-height: 52px;
  }
  .cl-out {
    min-height: 76px;
  }
}

.cl-when__lead {
  color: var(--mute);
}
/* метка «Заметка» над текстом, а не вплотную к нему (проверка: «ЗАМЕТКАИП открыт…») */
.cl-notes {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
/* маленькая подпись «Время созвона показано по твоему времени» (решение Ильи 10.11, 11:10) */
.tz-note {
  display: block;
  font-size: var(--t-small);
  color: var(--mute);
  line-height: 1.3;
}
.cl-when .tz-note {
  margin-top: 2px;
}

/* компьютер с низким окном (1280×640, замечание Ильи): всё главное без прокрутки, поэтому плотнее */
@media (min-width: 1024px) and (max-height: 719px) {
  .main--call .page {
    padding-top: var(--s-3);
    padding-bottom: var(--s-3);
  }
  .cl-head {
    padding-bottom: var(--s-2);
  }
  .cl-card {
    gap: var(--s-2);
  }
  .cl-pcard {
    padding: var(--s-4) var(--s-5) var(--s-3);
    gap: var(--s-2);
  }
  .cl-title {
    font-size: 2.125rem;
  }
  .cl-key {
    padding: var(--s-2) var(--s-3);
  }
  .cl-key__t {
    font-size: 1rem;
    line-height: 1.25;
  }
  .cl-copy .btn {
    min-height: 44px;
  }
  .cl-dock {
    padding-top: var(--s-2);
    gap: var(--s-2);
  }
  .cl-dock .caps-warn {
    padding: var(--s-1) var(--s-3);
    font-size: 0.875rem;
  }
  .cl-more-btn.btn {
    min-height: 44px;
  }
  .cl-out {
    min-height: 56px;
  }
}
