/* 💬 Войс-Торрент: текстовые каналы в боковой панели, ⚙ настройки сервера, 🌐 каталог общедоступных (textchans.js).
   Единый стиль (tokens.css): открытый канал — --active и красная черта 2 px слева высотой 16 px; значки — контурные 16 px. */
.tc-list { margin-bottom:6px; }
.tc-item .tk-ch-btn { gap:8px; }
.tc-ic { display:inline-grid; place-items:center; width:16px; height:16px; flex:0 0 16px; color:var(--muted); }
.tc-ic .i { width:16px; height:16px; stroke-width:1.75; }
/* открытый канал — --active и черта выбора слева (не зелёная «я в этом голосовом») */
.tk-ch.tc-item.mine .tk-ch-row { position:relative; background:var(--active); }
.tk-ch.tc-item.mine .tk-ch-row::before { content:""; position:absolute; left:0; top:50%; width:var(--sel-line); height:16px; margin-top:-8px; background:var(--brand-line); }
.tc-item.mine .tk-ch-btn { color:var(--text); }
.tc-item.mine .tc-ic { color:var(--text); }
/* непрочитанное — белым, без смены жирности (строка не прыгает) */
.tc-item.unread .tk-ch-name { color:var(--text); }
/* место под счётчик есть всегда — строка не прыгает */
.tc-un { min-width:22px; height:18px; margin-left:auto; padding:0 6px; border-radius:var(--r-chip); font-size:11px; line-height:18px; text-align:center; font-weight:600; font-variant-numeric:tabular-nums;
  color:var(--primary-ink); background:var(--text); visibility:hidden; box-sizing:border-box; }
.tc-item.unread .tc-un { visibility:visible; }
.tc-un.dot { min-width:8px; width:8px; height:8px; padding:0; background:var(--text); }
.tc-more { opacity:.7; }
.tm-item .tc-flip { transform:rotate(180deg); }   /* «Выше» — перевёрнутая стрелка «Ниже» */
@media (hover:hover) { .tc-more:hover { opacity:1; } }
.tc-more:focus-visible { opacity:1; }
.tc-mode { margin-left:8px; padding:2px 10px; border-radius:var(--r-chip); font-size:var(--fs-small); line-height:var(--lh-small); white-space:nowrap; background:var(--raised); color:var(--muted); }
.tc-role { display:inline-flex; margin-left:4px; color:var(--muted); line-height:1; }
.tc-role .i { width:13px; height:13px; stroke-width:1.75; }
/* звезда в меню участника — той же ширины, что значки */
.tk-mn-own .btn .tc-emo { display:inline-flex; align-items:center; justify-content:center; flex:none; }

/* ⚙ настройки сервера — окно плавающее: --raised, --r-card, --shadow-float; кнопки справа */
.tk-dlg.tc-dlg { width:min(480px, calc(100vw - 32px)); padding:24px; border:0; border-radius:var(--r-card); background:var(--raised); color:var(--text); box-shadow:var(--shadow-float); font-family:var(--font); }
.tc-dlg h2 { margin:0 0 8px; font-size:var(--fs-section); font-weight:600; line-height:28px; letter-spacing:-.01em; }
.tc-sec { border-top:1px solid var(--nested); padding:16px 0 8px; }
.tc-sec h3 { margin:0 0 6px; font-size:var(--fs-card); font-weight:var(--fw-card); line-height:22px; }
.tc-note { margin:0 0 12px; font-size:var(--fs-body); line-height:var(--lh-body); color:var(--muted); }
/* «Общедоступный сервер» — переключатель (тот же checkbox): выкл — --control, вкл — зелёный */
.tc-chk { display:flex; align-items:center; justify-content:space-between; gap:12px; min-height:var(--control-h); margin:0 0 8px; cursor:pointer; font-weight:500; }
.tc-chk input { order:2; -webkit-appearance:none; appearance:none; flex:none; width:40px; height:24px; margin:0; border:0; border-radius:var(--r-control); cursor:pointer;
  background:var(--control) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Ccircle cx='9' cy='9' r='9' fill='%23fff'/%3E%3C/svg%3E") 3px 50% / 18px 18px no-repeat;
  transition:background-color var(--dur-1) var(--ease), background-position var(--dur-2) var(--ease); }
.tc-chk input:checked { background-color:var(--positive); background-position:19px 50%; }
.tc-chk input:focus-visible { outline:2px solid var(--focus); outline-offset:2px; }
.tc-lbl { display:block; font-size:var(--fs-small); line-height:var(--lh-small); color:var(--muted); margin:0 0 6px; }
/* поле на --raised — на ступень светлее (--nested), иначе его не видно */
#tcPubDesc { width:100%; height:var(--field-h); box-sizing:border-box; margin:0 0 12px; padding:0 16px; border:1px solid transparent; border-radius:var(--r-field); background:var(--nested); color:var(--text); font:inherit; }
#tcPubDesc::placeholder { color:var(--faint); }
#tcPubDesc:focus { outline:none; border-color:var(--control); }
#tcPubDesc:focus-visible { outline:2px solid var(--focus); outline-offset:2px; }
.tc-sec .btn, .tc-dlg-b .btn { min-height:var(--control-h); border:0; border-radius:var(--r-control); background:var(--secondary); color:var(--secondary-ink); box-shadow:none; }
@media (hover:hover) { .tc-sec .btn:hover, .tc-dlg-b .btn:hover { background:var(--secondary-hover); } }
.tc-bans { list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:4px; max-height:260px; min-height:44px; overflow:auto; scrollbar-gutter:stable; }
.tc-ban-row { display:flex; align-items:center; gap:8px; min-height:var(--row-h); box-sizing:border-box; padding:0 4px 0 12px; border:0; border-radius:var(--r-nested); background:var(--nested); }
.tc-ban-n { font-weight:600; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.tc-ban-row small { flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:var(--muted); font-size:var(--fs-small); }
.tc-ban-row .btn { min-height:32px; padding:0 14px; }
.tc-empty { color:var(--muted); font-size:var(--fs-body); padding:8px 0; }
.tc-dlg-b { display:flex; justify-content:flex-end; margin-top:16px; }

/* 🌐 каталог на главной — карточки --surface постоянной высоты, без рамок */
.tc-pub { width:100%; max-width:none; margin:0; padding:var(--pad); border-radius:var(--r-card); background:var(--surface); text-align:left; }   /* карточка в правой колонке главной, как «Недавние» */
.tc-pub h2 { margin:0 0 16px; font-size:var(--fs-card); font-weight:var(--fw-card); line-height:22px; letter-spacing:0; text-transform:none; color:var(--text); }
.tc-pub-list { list-style:none; margin:0; padding:0; display:grid; grid-template-columns:minmax(0, 1fr); gap:6px; }
.tc-card { box-sizing:border-box; display:flex; flex-direction:column; gap:4px; padding:12px 14px; border:0; border-radius:var(--r-nested); background:var(--raised); }
.tc-card-t { display:flex; min-width:0; }
.tc-card-n { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:var(--fs-card); font-weight:600; }
.tc-card-d { margin:0; flex:none; font-size:13px; line-height:18px; color:var(--muted); overflow:hidden; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow-wrap:anywhere; }
.tc-card-f { margin-top:6px; display:flex; align-items:center; gap:12px; font-size:var(--fs-small); color:var(--muted); white-space:nowrap; font-variant-numeric:tabular-nums; }
.tc-on, .tc-vc { display:inline-flex; align-items:center; gap:6px; }
.tc-dot { width:8px; height:8px; flex:none; border-radius:50%; background:var(--positive); }
.tc-vc .i { width:14px; height:14px; stroke-width:1.75; }
.tc-go { margin-left:auto; min-height:32px; padding:0 14px; border:0; border-radius:var(--r-control); background:var(--secondary); color:var(--secondary-ink); }
@media (hover:hover) { .tc-go:hover { background:var(--secondary-hover); } }

@media (max-width: 760px) {
  .tc-pub-list { grid-template-columns:1fr; }
  .tc-card { padding:12px; }
  .tc-more { opacity:1; }
  .tc-go { min-height:var(--control-h-big); }
}
