/* Экран «Каналы» (префикс ch-). Только токены; тёмная тема работает сама.
   Вид взят у «Коннекторов» Закупщика: строка состояния, плоские вкладки, карточки по группам. */

.screen-channels { max-width: 1560px; padding-bottom: 24px; }
/* как в «Коннекторах»: кнопка справа — на уровне заголовка, а не пояснения */
.screen-channels .ph { align-items: flex-start; }
.screen-channels .ph-r { margin-top: 18px; }

/* ── Строка состояния и «Демо» ───────────────────────────────────────────────── */
.ch-meta { margin: -8px 0 21px; font-size: 13px; color: var(--mut); }
.ch-meta-r { display: flex; align-items: center; justify-content: space-between; gap: 8px 20px; flex-wrap: wrap; }
/* отклонения: что сломано и что сделать — строками под счётчиком */
.ch-devs { display: flex; flex-direction: column; margin-top: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--l1); overflow: hidden; }   /* r4: без янтарной рамки и заливки — глиф у строки */
.ch-dev > span::before { content: ""; flex: 0 0 auto; width: 7px; height: 7px; border-radius: 50%; background: var(--sig-late); box-shadow: 0 0 0 3px var(--sig-late-halo); }
.ch-dev { display: flex; align-items: center; gap: 10px 16px; padding: 10px 14px; }
.ch-dev + .ch-dev { border-top: 1px solid var(--line); }
.ch-dev > span { display: flex; align-items: center; gap: 6px 10px; flex-wrap: wrap; flex: 1 1 auto; min-width: 0; color: var(--ink); font-weight: 600; }
.ch-dev em { font-style: normal; font-weight: 450; color: var(--mut); }
.ch-dev .btn { flex: 0 0 auto; }
.ch-conn { display: inline-flex; align-items: center; gap: 9px; }
.ch-conn > i { width: 7px; height: 7px; border-radius: 999px; background: var(--vyg); box-shadow: 0 0 0 3px var(--vyg-soft); flex: 0 0 auto; }
.ch-conn em { font-style: normal; font-weight: 600; color: var(--sig-ink); }
.ch-demo { display: inline-flex; align-items: center; gap: 9px; font-size: 12.5px; color: var(--mut2); }
.ch-demo-b { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: 6px; border: 1px solid var(--line-2); background: var(--l2); color: var(--mut); font-size: 10.5px; font-weight: 600; letter-spacing: .01em; line-height: 1; flex: 0 0 auto; }

/* ── Вкладки и поиск ─────────────────────────────────────────────────────────── */
.ch-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px 16px; flex-wrap: wrap; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.ch-tabs { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; min-width: 0; }
.ch-tab { height: 36px; padding: 0 14px; border-radius: 10px; border: 1px solid transparent; background: none; color: var(--mut); font-size: 13.5px; font-weight: 560; cursor: pointer; white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s; }
.ch-tab:hover { color: var(--ink); }
.ch-tab[aria-selected="true"] { background: var(--acc-soft); border-color: var(--acc-soft-brd); color: var(--acc); font-weight: 620; }
.ch-search { width: 280px; max-width: 100%; }

/* ── Группы и карточки ───────────────────────────────────────────────────────── */
.ch-groups { display: flex; flex-direction: column; min-height: 200px; }
.ch-gh { display: flex; align-items: baseline; gap: 8px; margin: 26px 2px 11px; font-size: 13.5px; color: var(--ink); }
.ch-gh b { font-weight: 650; }
.ch-gh em { font-style: normal; font-size: 12px; color: var(--mut2); }
.ch-group:first-child .ch-gh { margin-top: 22px; }
.ch-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }

.ch-card { position: relative; display: flex; flex-direction: column; min-width: 0; padding: 20px 20px 16px; border-radius: 16px; border: 1px solid var(--line); cursor: pointer;
  background: radial-gradient(130% 100% at 100% 0%, color-mix(in srgb, var(--acc) 7%, transparent), transparent 58%), var(--l1);
  transition: border-color .15s, box-shadow .2s; }
.ch-card:hover { border-color: var(--acc-soft-brd); box-shadow: var(--sh-pop); }
.ch-card-h { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.ch-card-t { display: flex; flex-direction: column; gap: 4px; min-width: 0; padding-top: 2px; }
.ch-card-n { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
.ch-card-n b { font-size: 15px; font-weight: 650; letter-spacing: -.01em; line-height: 22px; overflow-wrap: anywhere; }
.ch-card-t > span { font-size: 12px; line-height: 17px; color: var(--mut2); }
.ch-brand { display: inline-flex; flex: 0 0 auto; filter: drop-shadow(0 6px 12px color-mix(in srgb, var(--acc) 20%, transparent)); }
.ch-desc { margin: 14px 0 14px; font-size: 13px; line-height: 20px; color: var(--mut); min-height: 40px; }
.ch-live { display: flex; flex-direction: column; gap: 4px; margin: 14px 0; min-height: 40px; font-size: 13px; line-height: 19px; color: var(--mut); }
.ch-live b { font-weight: 600; color: var(--ink); }
.ch-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); }
.ch-foot .btn { height: 34px; }
.ch-st { display: inline-flex; align-items: center; gap: 7px; min-width: 0; font-size: 12px; font-weight: 600; line-height: 16px; color: var(--mut2); }
.ch-st[data-st="idea"] { color: var(--ai); }
.ch-st > svg { flex: 0 0 auto; }
.ch-card[data-state="idea"] .ch-brand { opacity: .8; }
.ch-card[data-state="idea"] .ch-st { font-size: 11.5px; }

/* ── Нижний блок и пояснение ─────────────────────────────────────────────────── */

/* ── Каталог «Добавить канал» ────────────────────────────────────────────────── */
.ch-lib-q { width: 100%; }
.ch-lib { display: flex; flex-direction: column; min-height: 240px; }
.ch-lib .ch-gh { margin: 18px 2px 10px; }
.ch-lib-g:first-child .ch-gh { margin-top: 2px; }
.ch-lib-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ch-lib-i { display: flex; align-items: center; gap: 12px; min-width: 0; padding: 11px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--l1); text-align: left; cursor: pointer;
  transition: border-color .15s, background .15s; }
.ch-lib-i:hover { border-color: var(--acc-soft-brd); background: var(--acc-row); }
.ch-lib-t { display: flex; flex-direction: column; min-width: 0; flex: 1 1 auto; }
.ch-lib-t b { font-size: 13.5px; font-weight: 620; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ch-lib-t small { font-size: 12px; color: var(--mut2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ch-lib-s { flex: 0 0 auto; }
.ch-lib-i > svg:last-child { color: var(--mut2); flex: 0 0 auto; }
.ch-idea { display: flex; gap: 16px; align-items: flex-start; }
.ch-idea b { font-size: 15px; font-weight: 640; }
.ch-idea p { margin-top: 6px; font-size: 13px; line-height: 19px; color: var(--mut); }

/* ── Мастер подключения ──────────────────────────────────────────────────────── */
.ch-mh { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; min-width: 0; }
.ch-mh-n { margin-right: 2px; }
.ch-wiz-b { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.ch-demo-row .ch-demo { align-items: flex-start; line-height: 18px; }
.ch-demo-row .ch-demo > svg { margin-top: 2px; flex: 0 0 auto; }
.ch-demo-row { display: flex; align-items: center; justify-content: space-between; gap: 10px 14px; flex-wrap: wrap; padding: 9px 12px; border-radius: 12px; background: var(--l2); border: 1px solid var(--line); }
.ch-lead { font-size: 13.5px; line-height: 20px; color: var(--mut); max-width: 74ch; }
.ch-lead code { padding: 1px 5px; border-radius: 5px; background: var(--l2); border: 1px solid var(--line); font-size: 12px; }
.ch-sec { margin-bottom: 8px; font-size: 11px; font-weight: 650; letter-spacing: .07em; text-transform: uppercase; color: var(--mut2); }
.ch-sec-x { margin: 6px 0 -2px; padding-top: 14px; border-top: 1px solid var(--line); }
.ch-kv-b { display: inline-flex; align-items: center; gap: 8px; }

.ch-opts { display: grid; gap: 10px; }
.ch-opts.is-2 { grid-template-columns: 1fr 1fr; }
.ch-opt { position: relative; display: flex; align-items: flex-start; gap: 12px; padding: 13px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--l1); cursor: pointer; transition: border-color .14s, background .14s; }
.ch-opt:hover { border-color: var(--line-2); }
.ch-opt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.ch-opt-b { width: 18px; height: 18px; flex: 0 0 auto; margin-top: 1px; border-radius: 999px; border: 1.5px solid var(--line-3); transition: border-color .14s, background .14s; }
.ch-opt input:checked + .ch-opt-b { border-color: var(--acc); background: radial-gradient(circle, var(--acc) 0 4.5px, transparent 5.5px); }
.ch-opt input:focus-visible + .ch-opt-b { outline: 2px solid var(--focus); outline-offset: 2px; }
.ch-opt:has(input:checked) { border-color: var(--acc-soft-brd); background: var(--acc-row); }
.ch-opt-t { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ch-opt-t b { font-size: 13.5px; font-weight: 600; }
.ch-opt-t i { font-style: normal; font-size: 12px; line-height: 17px; color: var(--mut2); }

.ch-cols { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 22px; align-items: start; min-width: 0; }
.ch-side { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.ch-form { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.ch-form-2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px 16px; }
.ch-form .in.is-bad, .ch-form .ta.is-bad, .ch-wiz-b .in.is-bad { border-color: var(--zav-brd); box-shadow: 0 0 0 3px var(--zav-soft); }
.ch-secret { position: relative; display: block; }
.ch-secret .in { padding-right: 42px; }
.ch-secret .ib { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); }
.ch-inline { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.ch-checks + .ch-inline { margin: 12px 0 14px; }
.ch-inline .hint.is-ok { color: var(--vyg); font-weight: 600; }

.ch-how { display: flex; flex-direction: column; gap: 10px; padding: 14px 16px; border-radius: 12px; background: var(--l2); border: 1px solid var(--line); }
.ch-how ol { display: flex; flex-direction: column; gap: 9px; }
.ch-how li { display: flex; align-items: flex-start; gap: 10px; font-size: 12.5px; line-height: 18px; color: var(--ink); }
.ch-how li b { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; flex: 0 0 auto; border-radius: 999px; background: var(--l1); border: 1px solid var(--line-2); font-size: 11px; font-weight: 650; color: var(--acc); }

.ch-code-w { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.ch-code-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ch-code { margin: 0; padding: 12px 14px; border-radius: 12px; background: var(--l2); border: 1px solid var(--line); font: 12px/18px ui-monospace, SFMono-Regular, 'Cascadia Mono', Consolas, monospace; color: var(--ink); overflow-x: auto; white-space: pre; user-select: all; }

.ch-qr { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 16px; border-radius: 12px; border: 1px dashed var(--line-3); background: var(--l1); text-align: center; }
.ch-qr-c { padding: 10px; border-radius: 10px; border: 1px solid var(--line-2); color: var(--ink); background: var(--l1); }
.ch-qr-svg { display: block; }

.ch-tpls { display: flex; flex-direction: column; gap: 10px; }
.ch-tpls-h { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.ch-tpls-h b { font-size: 14px; font-weight: 640; }
.ch-tpl-list { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.ch-tpl { display: flex; flex-direction: column; gap: 6px; min-width: 0; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--l1); }
.ch-tpl-h { display: flex; align-items: center; gap: 8px; min-width: 0; }
.ch-tpl-h b { min-width: 0; font-size: 13px; font-weight: 620; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ch-tpl p { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; font-size: 12.5px; line-height: 18px; color: var(--mut); }
.ch-tpl-a { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 2px; }
.ch-phone { padding: 22px 18px; border-radius: 16px; background: var(--l2); border: 1px solid var(--line); }
.ch-phone-b { position: relative; max-width: 94%; padding: 10px 12px 20px; border-radius: 12px 12px 12px 4px; background: var(--bubble-in); border: 1px solid var(--line); font-size: 13.5px; line-height: 20px; white-space: pre-wrap; overflow-wrap: anywhere; }
.ch-phone-b time { position: absolute; right: 10px; bottom: 4px; font-size: 10.5px; color: var(--mut2); }

.ch-opts-s { display: flex; flex-direction: column; gap: 12px; padding: 14px 16px; border-radius: 12px; border: 1px solid var(--line); background: var(--l1); }

/* проверка связи: строки со спиннером */
.ch-checks { display: flex; flex-direction: column; gap: 6px; }
.ch-chk { display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 10px; border: 1px solid transparent; background: var(--l2); font-size: 13px; line-height: 18px; color: var(--mut2); transition: background .2s, border-color .2s, color .2s; }
.ch-chk-i { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; flex: 0 0 auto; border-radius: 999px; border: 1.5px dashed var(--line-3); }
.ch-chk[data-st="run"] { color: var(--ink); }
.ch-chk[data-st="run"] .ch-chk-i { border-style: solid; border-color: transparent; }
.ch-chk[data-st="ok"] { color: var(--ink); background: var(--l1); border-color: var(--line-2); }
.ch-chk[data-st="ok"] .ch-chk-i { background: var(--vyg); border: 0; color: var(--l1); }
.ch-chk[data-st="warn"] { color: var(--ink); background: var(--l1); border-color: var(--line-2); }
.ch-chk[data-st="warn"] .ch-chk-i { background: var(--ryn); border: 0; color: var(--l1); }
.ch-chk[data-st="err"] { color: var(--ink); background: var(--l1); border-color: var(--line-2); }
.ch-chk[data-st="err"] .ch-chk-i { background: var(--zav); border: 0; color: var(--l1); }
.ch-spin { display: block; width: 14px; height: 14px; border-radius: 999px; border: 2px solid var(--acc-soft-brd); border-top-color: var(--acc); animation: ch-spin .7s linear infinite; }
@keyframes ch-spin { to { transform: rotate(360deg); } }

/* ── Живое превью виджета «Чат на сайте» ─────────────────────────────────────── */
.ch-sws { display: flex; gap: 10px; flex-wrap: wrap; }
.ch-sw { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; padding: 0; border-radius: 999px; border: 2px solid var(--l1); background: var(--wc, var(--acc)); color: var(--l1);
  box-shadow: 0 0 0 1px var(--line-2); cursor: pointer; transition: box-shadow .15s, transform .12s; }
.ch-sw svg { opacity: 0; transition: opacity .12s; }
.ch-sw:hover { box-shadow: 0 0 0 1px var(--line-3); }
.ch-sw[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--wc, var(--acc)); }
.ch-hex { display: inline-flex; align-items: center; gap: 8px; margin-left: 4px; font-size: 12.5px; color: var(--mut2); }
.ch-hex .in { width: 96px; height: 32px; font-family: var(--mono, ui-monospace, monospace); font-size: 12.5px; text-transform: lowercase; }
.ch-sw[aria-pressed="true"] svg { opacity: 1; }
.ch-wp { position: relative; height: 364px; border-radius: 14px; border: 1px solid var(--line-2); background: var(--l2); overflow: hidden; }
.ch-wp-bar { display: flex; align-items: center; gap: 5px; height: 28px; padding: 0 10px; background: var(--l1); border-bottom: 1px solid var(--line); }
.ch-wp-bar i { width: 7px; height: 7px; border-radius: 999px; background: var(--line-3); }
.ch-wp-bar span { margin-left: 8px; font-size: 10.5px; color: var(--mut2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ch-wp-page { display: flex; flex-direction: column; gap: 8px; padding: 16px 16px 0; }
.ch-wp-page .l1, .ch-wp-page .l2, .ch-wp-page .l3 { display: block; height: 7px; border-radius: 4px; background: var(--line-2); }
.ch-wp-page .l1 { width: 42%; height: 11px; }
.ch-wp-page .l2 { width: 70%; background: var(--line); }
.ch-wp-page .l3 { width: 56%; background: var(--line); }
.ch-wp-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 8px; }
.ch-wp-cards span { height: 58px; border-radius: 8px; background: var(--l1); border: 1px solid var(--line); }
.ch-wp-win { position: absolute; bottom: 68px; width: min(236px, calc(100% - 28px)); border-radius: 14px; background: var(--l1); border: 1px solid var(--line-2); box-shadow: var(--sh-pop); overflow: hidden; }
.ch-wp[data-pos="right"] .ch-wp-win { right: 14px; }
.ch-wp[data-pos="left"] .ch-wp-win { left: 14px; }
.ch-wp-fab { position: absolute; bottom: 12px; display: inline-flex; align-items: center; justify-content: center; width: 46px; height: 46px; border-radius: 999px; background: var(--wc, var(--acc)); color: var(--l1); box-shadow: var(--sh-pop); }
.ch-wp[data-pos="right"] .ch-wp-fab { right: 14px; }
.ch-wp[data-pos="left"] .ch-wp-fab { left: 14px; }
.ch-wp-h { display: flex; align-items: center; gap: 9px; padding: 10px 12px; background: var(--wc, var(--acc)); color: var(--l1); }
.ch-wp { color: var(--ink); }
.ch-wp-h span { display: flex; flex-direction: column; min-width: 0; }
.ch-wp-h b { font-size: 12.5px; font-weight: 640; line-height: 16px; }
.ch-wp-h em { font-style: normal; font-size: 10.5px; line-height: 14px; opacity: .85; }
.ch-wp-b { display: flex; flex-direction: column; gap: 10px; min-height: 92px; padding: 12px; }
.ch-wp-m { max-width: 94%; padding: 8px 10px; border-radius: 10px 10px 10px 3px; background: var(--l2); border: 1px solid var(--line); font-size: 11.5px; line-height: 16px; color: var(--ink); overflow-wrap: anywhere; }
.ch-wp-ch small { font-size: 10.5px; color: var(--mut2); }
.ch-wp-ch div { display: flex; gap: 6px; margin-top: 5px; }
.ch-wp-in { display: flex; align-items: center; justify-content: space-between; margin: 0 10px 10px; padding: 7px 9px 7px 11px; border-radius: 10px; border: 1px solid var(--line-2); font-size: 11px; color: var(--ink-off); }
.ch-wp-in i { display: inline-flex; color: var(--t, var(--acc)); }

/* ── Окно подключённого канала ───────────────────────────────────────────────── */
.ch-mtabs { position: sticky; top: 0; z-index: 2; padding: 0 24px; background: var(--l1); }
.ch-mtabs .utab { height: 44px; }
.ch-mbody { display: flex; flex-direction: column; gap: 18px; min-height: 380px; padding: 20px 24px 26px; min-width: 0; }
.ch-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.ch-tiles.is-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ch-tiles.is-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ch-wl { display: flex; flex-direction: column; }
.ch-wl-i { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; font-size: 13px; }
.ch-wl-i:last-child { border-bottom: 0; }
.ch-wl-i:hover { color: var(--acc); text-decoration: none; }
.ch-wl-i b { font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ch-wl-i span { flex: 0 0 auto; font-size: 12px; color: var(--mut2); }
.ch-ro { display: flex; align-items: center; justify-content: space-between; gap: 10px 16px; flex-wrap: wrap; padding: 12px 16px; border-radius: 12px; border: 1px dashed var(--line-2); }
.ch-ro-t { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 260px; }
.ch-ro-t b { font-size: 13.5px; font-weight: 620; }
.ch-ro-t span { font-size: 12px; line-height: 17px; color: var(--mut2); }
.ch-noauto { margin: 0; }
.ch-mbody .note .btn { margin-left: auto; flex: 0 0 auto; }
.ch-two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
.ch-box { min-width: 0; padding: 14px 16px 8px; border-radius: 14px; border: 1px solid var(--line); background: var(--l1); }
.ch-box h3 { margin-bottom: 4px; font-size: 13.5px; font-weight: 640; }
.ch-box-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 2px; }
.ch-box-h h3 { margin: 0; }
.ch-evs { display: flex; flex-direction: column; }
.ch-ev { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line); }
.ch-ev:last-child { border-bottom: 0; }
.ch-ev-i { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 9px; background: var(--ts); border: 1px solid var(--tb); color: var(--t); }
.ch-ev-t { font-size: 12.5px; line-height: 17px; color: var(--ink); overflow-wrap: anywhere; }
.ch-ev time { font-size: 11.5px; color: var(--mut2); white-space: nowrap; }
.ch-evs-l { padding: 4px 16px; border: 1px solid var(--line); border-radius: 14px; }
.ch-log-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.ch-acc-h { display: flex; align-items: center; justify-content: space-between; gap: 12px 16px; flex-wrap: wrap; }
.ch-acc-h p { max-width: 62ch; font-size: 13px; line-height: 19px; color: var(--mut); }
.ch-acc-l { display: flex; flex-direction: column; gap: 10px; }
.ch-acc { display: grid; grid-template-columns: 36px minmax(0, 1.4fr) minmax(0, 1fr) 132px 214px; gap: 14px; align-items: center; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--l1); }
.ch-acc.is-cur { border-color: var(--acc-soft-brd); background: var(--acc-row); }
.ch-acc-n { display: flex; flex-direction: column; min-width: 0; }
.ch-acc-n b { font-size: 13.5px; font-weight: 620; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ch-acc-n em { font-style: normal; font-size: 12px; color: var(--mut2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ch-acc-m { display: flex; flex-direction: column; min-width: 0; font-size: 12px; line-height: 17px; color: var(--mut2); }
.ch-acc-m span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ch-acc-a { display: flex; align-items: center; justify-content: flex-end; gap: 6px; }
.ch-acc > .pill { justify-self: start; }

.ch-modal:focus-visible { outline: none; }

/* ── Узкий экран ─────────────────────────────────────────────────────────────── */
@media (max-height: 640px) {
  .ch-modal .sh .kicker { display: none; }
  .ch-modal .sh { padding-top: 12px; padding-bottom: 10px; }
  .ch-modal .sh-sub { margin-top: 0; }
}
@media (max-width: 1100px) {
  .ch-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .ch-cols, .ch-two { grid-template-columns: minmax(0, 1fr); }
  .ch-form-2, .ch-tpl-list, .ch-lib-grid, .ch-opts.is-2 { grid-template-columns: minmax(0, 1fr); }
  .ch-acc { grid-template-columns: 36px minmax(0, 1fr) auto; }
  .ch-acc-m { display: none; }
  .ch-acc-a { grid-column: 1 / -1; justify-content: flex-end; }
  .ch-mtabs { padding: 0 16px; overflow-x: auto; }
  .ch-mbody { padding: 16px 16px 22px; }
}
@media (max-width: 560px) {
  .ch-cards { grid-template-columns: minmax(0, 1fr); }
  .ch-search { width: 100%; }
}

/* ── r4 (H2): карточка канала — аккаунты одной строкой, отклонения строкой-сигналом; статус — глиф и слово ── */
.ch-live { gap: 6px; min-height: 0; margin: 12px 0 14px; }
.ch-live > p { min-width: 0; }
.ch-acc1 { color: var(--mut2); font-size: 12.5px; }
/* описание не режется посреди слова (K5-С5): до двух строк с переносом по словам; полное — в подсказке */
.ch-desc.ell { min-height: 0; margin: 12px 0 14px; white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: normal; }
.ch-foot > .sig { min-width: 0; }
