/* «🎧 Войс-Торрент» — единый стиль SaSiTe (2026-10-30, tokens.css): раскладка «Пульт» — рейка пространств 56 · каналы 220 · чат · участники 212,
   мягкость «Чёрной студии» — чёрный фон, чат на --surface без рамок, кнопки-«пилюли», главная — белая. Выбор — красная черта 2 px слева.
   Без градиентов, свечений, размытия и эмодзи в интерфейсе. Телефон — внизу, блок «телефон» */
.talk { --side:var(--ground); --soft:var(--hover); --spk:var(--positive); --c-in:var(--wave); --c-out:var(--faint); --av-gap:var(--ground); }
.i { width:16px; height:16px; flex:none; fill:none; stroke:currentColor; stroke-width:1.75; stroke-linecap:round; stroke-linejoin:round; }
kbd { font:500 11px/1 var(--font); padding:2px 5px; border-radius:6px; background:var(--nested); color:var(--text); }
.tk-lbl { font-size:var(--fs-small); line-height:var(--lh-small); color:var(--muted); }

/* кнопка-значок: круглая, наведение — подложка; размер не меняется */
.tk-ib { display:inline-grid; place-items:center; width:32px; height:32px; padding:0; border:0; border-radius:var(--r-control); background:none; color:var(--muted); cursor:pointer; flex:none;
  transition:background-color var(--dur-1) var(--ease), color var(--dur-1) var(--ease); }
.tk-ib[aria-expanded="true"] { background:var(--hover); color:var(--text); }
@media (hover: hover) { .tk-ib:hover { background:var(--hover); color:var(--text); } }
.tk-ib:active { transform:scale(.97); }
.tk-ib:focus-visible { outline:2px solid var(--focus); outline-offset:2px; }
/* главная кнопка экрана — белая «пилюля» (одна на экран) */
.btn.tk-go { min-height:var(--control-h-big); padding:0 22px; border:0; border-radius:var(--r-control); background:var(--primary); color:var(--primary-ink); font-weight:600; box-shadow:none;
  transition:background-color var(--dur-1) var(--ease), transform var(--dur-1) var(--ease); }
@media (hover: hover) { .btn.tk-go:hover { background:var(--primary-hover); color:var(--primary-ink); } }
.btn.tk-go:active { background:var(--primary-press); transform:scale(.97); }
.btn.tk-go:focus-visible { outline:2px solid var(--focus); outline-offset:2px; }
.btn.tk-go:disabled { background:var(--disabled); color:var(--disabled-ink); opacity:1; transform:none; }

/* кружок-аватар: цвет человека и эмодзи/буква; говорит — контур 2 px --positive (без свечения) */
.tk-av { display:inline-grid; place-items:center; width:32px; height:32px; border-radius:50%; flex:none; font-weight:600; font-size:14px; line-height:1; user-select:none;
  box-shadow:0 0 0 2px transparent; transition:box-shadow var(--dur-1) var(--ease); }
.tk-av.xs { width:20px; height:20px; font-size:10px; }
.tk-av.sm { width:24px; height:24px; font-size:11px; }
.tk-av.md { width:36px; height:36px; font-size:15px; }
.tk-av.big { width:48px; height:48px; font-size:20px; }
.tk-av.xl { width:72px; height:72px; font-size:30px; }
.tk-av.spk, .tk-av.xl.spk { box-shadow:0 0 0 2px var(--av-gap), 0 0 0 4px var(--spk); }
/* цвет: 12 кружков ровной сеткой (на телефоне — 2 ряда по 6), выбранный — с белым кольцом */
.tk-colors { display:grid; grid-template-columns:repeat(12, minmax(0, 24px)); justify-content:space-between; gap:10px 4px; }
.sw { width:100%; aspect-ratio:1; border-radius:50%; border:0; padding:0; cursor:pointer; box-shadow:0 0 0 2px transparent; transition:box-shadow var(--dur-1) var(--ease); }
@media (hover: hover) { .sw:hover { box-shadow:0 0 0 2px var(--surface), 0 0 0 4px var(--control); } }
.sw[aria-checked="true"] { box-shadow:0 0 0 2px var(--surface), 0 0 0 4px var(--text); }
.sw:focus-visible { outline:2px solid var(--focus); outline-offset:4px; border-radius:50%; }
@media (max-width: 480px) { .tk-colors { grid-template-columns:repeat(6, 32px); gap:12px; justify-content:start; } }

/* ---------- главная: заголовок экрана слева, две карточки, внизу — три пары «название — пояснение» ---------- */
.tk-wrap:has(> .tk-home:not([hidden])) { max-width:var(--screen-max); }
.tk-home { display:flex; flex-direction:column; gap:var(--head-gap); margin:0; text-align:left; }
.tk-hhead { display:flex; flex-direction:column; gap:8px; }
.tk-title { margin:0; font-size:var(--fs-title); font-weight:var(--fw-title); line-height:32px; letter-spacing:-.015em; color:var(--text); }
.tk-sub { max-width:var(--sub-max); min-height:40px; margin:0; color:var(--muted); font-size:var(--fs-body); line-height:var(--lh-body); text-wrap:pretty; }
.tk-sub b { color:var(--text); font-weight:500; }
/* место под ошибку — всегда (ничего не прыгает) */
.tk-herr { min-height:var(--lh-body); font-size:13px; line-height:var(--lh-body); }
.tk-herr[hidden] { display:block; visibility:hidden; }
.tk-herr .btn { display:inline-flex; margin:0 0 0 10px; min-height:28px; }
.tk-hgrid { display:grid; grid-template-columns:minmax(0, 1fr) minmax(0, 1fr); gap:var(--gap); align-items:stretch; }
/* справа ещё «Общедоступные» / «Недавние» — левая карточка своей высоты, не тянется пустой до низа правой колонки */
.tk-hgrid:has(> .tk-hcol > .tc-pub:not([hidden]), > .tk-hcol > #recentBox:not([hidden])) { align-items:start; }
/* низ карточек — на одной линии: справа тянется последняя видимая (недавние, а без них — «Войти по коду») */
.tk-hcol > #recentBox:not([hidden]), .tk-hcol:not(:has(> :not(.tk-joinc):not([hidden]))) > .tk-joinc { flex:1; }
.tk-hcol { display:flex; flex-direction:column; gap:var(--gap); min-width:0; }
.tk-home .start-card, .tk-join { max-width:none; margin:0; padding:var(--pad); gap:14px; border:0; border-radius:var(--r-card); background:var(--surface); box-shadow:none; text-align:left; }
.tk-home .start-card { gap:16px; }
.tk-ch2 { margin:0; font-size:var(--fs-card); font-weight:var(--fw-card); line-height:22px; color:var(--text); }
.tk-start { --av-gap:var(--surface); }
.tk-me-row { display:flex; align-items:center; gap:14px; }
.tk-me-in { flex:1; min-width:0; display:flex; flex-direction:column; gap:6px; }
.tk-me-in label, .tk-home .tk-lbl { font-size:13px; line-height:18px; color:var(--muted); }
.tk-home input, .tk-join input { width:100%; min-height:var(--field-h); padding:0 16px; border:1px solid transparent; border-radius:var(--r-field); background:var(--field); color:var(--text); font:inherit; font-size:var(--fs-body); }
.tk-home input::placeholder, .tk-join input::placeholder { color:var(--faint); }
.tk-home input:focus, .tk-join input:focus { outline:none; border-color:transparent; box-shadow:0 0 0 2px var(--focus); }
.tk-color-row { gap:8px; }
.tk-create { display:flex; flex-direction:column; gap:8px; margin:0; }
.tk-create .btn.tk-go { margin-top:6px; width:100%; }
/* 🎲 случайное название — внутри поля справа (поле той же ширины) */
.tk-namebox { position:relative; display:block; }
.tk-namebox input { width:100%; padding-right:46px; }
.tk-dice { position:absolute; top:50%; right:3px; transform:translateY(-50%); width:30px; height:30px; display:grid; place-items:center; padding:0; border:0; border-radius:var(--r-control); background:transparent; color:var(--muted); cursor:pointer; }
.tk-dice .i { width:16px; height:16px; }
@media (hover: hover) { .tk-dice:hover { background:var(--nested); color:var(--text); } }
.tk-dice:focus-visible { outline:2px solid var(--focus); outline-offset:1px; }
.tk-dice.roll .i { animation:tk-dice .4s var(--ease); }
@keyframes tk-dice { from { transform:rotate(0); } to { transform:rotate(360deg); } }
/* код — моноширинным, обычным регистром подсказки */
.tk-home .code-form { display:flex; gap:8px; }
.tk-home .code-in, .tk-home .code-in:focus { flex:1; min-width:0; min-height:var(--control-h-big); font-family:var(--font-mono); font-size:18px; font-weight:500; letter-spacing:.08em; text-align:left; text-transform:uppercase; }
.tk-home .code-in::placeholder { font-family:var(--font); font-size:var(--fs-body); font-weight:400; letter-spacing:0; text-transform:none; }
.tk-home .code-form .btn { min-height:var(--control-h-big); padding:0 22px; border:0; border-radius:var(--r-control); background:var(--secondary); color:var(--secondary-ink); font-weight:500; }
@media (hover: hover) { .tk-home .code-form .btn:hover { background:var(--secondary-hover); } }
.tk-home .code-form .btn:active { background:var(--secondary-press); transform:scale(.97); }
.tk-pass { margin:0; font-size:13px; line-height:18px; color:var(--faint); text-align:left; }
/* недавние: строки на --raised, плитка с буквами как в рейке */
.tk-recent { width:auto; }
.tk-recent ul { list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:6px; }
.tk-rc { display:flex; align-items:center; gap:4px; padding-right:6px; border-radius:var(--r-nested); background:var(--raised); transition:background-color var(--dur-1) var(--ease); }
@media (hover: hover) { .tk-rc:hover { background:var(--nested); } }
.tk-rc-a { flex:1; min-width:0; display:flex; align-items:center; gap:12px; min-height:var(--row-h); padding:6px 10px; color:var(--text); text-decoration:none; border-radius:var(--r-nested); }
.tk-rc-a:focus-visible { outline:2px solid var(--focus); outline-offset:-2px; }
.tk-rc-av { width:36px; height:36px; border-radius:var(--r-nested); display:grid; place-items:center; flex:none; background:var(--nested); color:var(--text); font-weight:600; font-size:13px; }
.tk-rc-t { min-width:0; display:flex; flex-direction:column; }
.tk-rc-t b { display:flex; align-items:center; gap:6px; min-width:0; font-weight:500; }
.tk-rc-n { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.tk-rc-t small { color:var(--faint); font-size:13px; }
.tk-code { font-family:var(--font-mono); letter-spacing:.04em; }
.tk-feats { list-style:none; margin:4px 0 0; padding:0; display:grid; grid-template-columns:repeat(3, minmax(0, 1fr)); gap:var(--gap); }
.tk-feats li { display:flex; flex-direction:column; gap:2px; padding:0; }
.tk-feats b { font-size:var(--fs-body); font-weight:600; }
.tk-feats small { color:var(--muted); font-size:13px; line-height:19px; }
/* вход по ссылке без имени: одна карточка */
.tk-wrap:has(> .tk-join:not([hidden])) { max-width:520px; }
#join.tk-join { display:flex; flex-direction:column; gap:14px; margin:8px 0 0; --av-gap:var(--surface); }
.tk-join h1 { margin:0; font-size:var(--fs-title); font-weight:var(--fw-title); line-height:1.2; text-align:left; overflow-wrap:anywhere; }
.tk-join-sub { margin:-4px 0 4px; text-align:left; color:var(--muted); font-size:var(--fs-body); line-height:var(--lh-body); text-wrap:pretty; }
#join.tk-join .join-form { display:flex; flex-direction:column; gap:8px; }
#join.tk-join .join-form label { font-size:13px; color:var(--muted); text-align:left; }
.tk-join .tk-lbl { margin-top:6px; }
.tk-join .tk-colors { margin-bottom:8px; }
.tk-join .btn.tk-go { width:100%; }
.tk-join .link { align-self:flex-start; min-height:var(--control-h); padding:0; color:var(--muted); }
@media (hover: hover) { .tk-join .link:hover { color:var(--text); } }

/* ---------- пространство: ровно на экран под шапкой, страница не прокручивается ----------
   рейка 56 · каналы 220 · чат (--surface) · участники 212; разделение — линия рейки и ступень светлоты, без рамок-коробок */
body.in-space { height:100dvh; overflow:hidden; }
body.in-space .brand-foot { display:none; }
body.in-space .tk-wrap { max-width:none; margin:0; padding:0; }
@media (max-height: 460px) { body.in-space { height:auto; overflow:visible; } }
.tk-app { position:relative; display:grid; grid-template-columns:var(--rail-w) var(--sidebar-w) minmax(0, 1fr) 212px; grid-template-rows:minmax(0, 1fr) auto;
  grid-template-areas:"rail side center right" "me me center right";   /* панель «я» — под рейкой и каналами (как в Discord): имени и кнопкам хватает места */
  height:calc(100dvh - var(--barH, 57px) - var(--dk-tb, 0px)); min-height:400px; background:var(--ground); }
.tk-app:not(.no-stats) { grid-template-columns:var(--rail-w) var(--sidebar-w) minmax(0, 1fr) 312px; }
.tk-app:not(.no-stats) .tk-mem { display:none; }
.tk-app.no-stats .tk-stats { display:none; }
.tk-tabs { display:none; }
.tk-scroll { overflow-y:auto; overscroll-behavior:contain; min-height:0; scrollbar-width:thin; scrollbar-gutter:stable; }

/* 🧭 рейка пространств: плитки 36 с буквами, выбранное — красная черта 2 × 16 слева; «+» пунктиром */
.tk-rail { grid-area:rail; display:flex; flex-direction:column; align-items:center; gap:8px; min-height:0; padding:10px 0 8px; border-right:1px solid var(--rule); overflow-y:auto; scrollbar-width:none; }
.tk-rail-l { list-style:none; margin:0; padding:0; display:flex; flex-direction:column; align-items:center; gap:8px; width:100%; }
.tk-rail-i { position:relative; display:flex; justify-content:center; width:100%; }
.tk-rail-i.on::before { content:""; position:absolute; left:0; top:50%; width:var(--sel-line); height:16px; margin-top:-8px; background:var(--brand-line); border-radius:0 2px 2px 0; }
.tk-rail-a, .tk-rail-add { display:grid; place-items:center; width:36px; height:36px; border-radius:var(--r-nested); font-size:12.5px; font-weight:600; letter-spacing:.02em; text-decoration:none;
  transition:background-color var(--dur-1) var(--ease), color var(--dur-1) var(--ease); }
.tk-rail-a { background:var(--raised); color:var(--muted); }
.tk-rail-i.on .tk-rail-a { background:var(--active); color:var(--text); }
@media (hover: hover) { .tk-rail-a:hover { background:var(--nested); color:var(--text); } }
.tk-rail-add { position:relative; flex:none; border:1px dashed var(--control); color:var(--muted); }
.tk-rail-l:not(:empty) + .tk-rail-add { margin-top:9px; }
.tk-rail-l:not(:empty) + .tk-rail-add::before { content:""; position:absolute; left:8px; right:8px; top:-10px; height:1px; background:var(--rule); }
@media (hover: hover) { .tk-rail-add:hover { color:var(--text); border-color:var(--muted); } }
.tk-rail-a:active, .tk-rail-add:active { transform:scale(.97); }
.tk-rail-a:focus-visible, .tk-rail-add:focus-visible { outline:2px solid var(--focus); outline-offset:2px; }

/* колонка каналов */
.tk-side { grid-area:side; display:flex; flex-direction:column; min-height:0; min-width:0; background:var(--ground); }
.tk-shead { position:relative; padding:14px 8px 8px 16px; display:flex; flex-direction:column; gap:6px; }
.tk-sname { display:flex; align-items:center; gap:4px; min-width:0; min-height:24px; }
.tk-sname-t { margin:0 auto 0 0; font-size:var(--fs-card); font-weight:var(--fw-card); line-height:24px; letter-spacing:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; min-width:0; }
.tk-scode { display:flex; align-items:center; gap:6px; min-width:0; }
.tk-invite { display:inline-flex; align-items:center; gap:6px; min-height:28px; padding:0 10px 0 8px; border:0; border-radius:var(--r-control); background:var(--secondary); color:var(--secondary-ink); font:inherit; font-size:var(--fs-small); cursor:pointer;
  transition:background-color var(--dur-1) var(--ease); }
@media (hover: hover) { .tk-invite:hover { background:var(--secondary-hover); } }
.tk-invite:active { background:var(--secondary-press); transform:scale(.97); }
.tk-invite:focus-visible { outline:2px solid var(--focus); outline-offset:2px; }
.tk-invite .i { width:14px; height:14px; }
/* 🔒 код пространства скрыт («••••••»), глаз — показать на 10 с (полоска внизу убывает). Ширина плашки постоянная — ничего не прыгает */
.tk-codebox { position:relative; display:inline-flex; align-items:center; flex:none; min-height:28px; padding-right:2px; border-radius:var(--r-control); background:var(--raised); overflow:hidden; }
.tk-scode .tk-codebox .tk-code { display:inline-block; box-sizing:content-box; width:calc(6ch + .3em); padding:3px 2px 3px 10px; background:none; border-radius:0; font-size:12px; line-height:20px; white-space:nowrap; overflow:hidden; text-align:center; color:var(--muted); }
.tk-codebox.shown .tk-code { color:var(--text); }
.tk-eye { display:grid; place-items:center; width:26px; height:24px; padding:0; border:0; border-radius:var(--r-control); background:transparent; color:var(--muted); cursor:pointer; }
@media (hover: hover) { .tk-eye:hover { color:var(--text); background:var(--nested); } }
.tk-eye .i { width:14px; height:14px; }
.tk-codebox::after { content:""; position:absolute; left:10px; right:10px; bottom:0; height:1px; background:var(--muted); transform:scaleX(0); transform-origin:left; pointer-events:none; }
.tk-codebox.shown::after { animation:tk-codebar 10s linear forwards; }
@keyframes tk-codebar { from { transform:scaleX(1); } to { transform:scaleX(0); } }
@media (max-width: 760px) {
  .tk-codebox { min-height:36px; }
  .tk-eye { width:36px; height:34px; }
}
@media (prefers-reduced-motion: reduce) { .tk-dice.roll .i { animation:none; } }
/* выпадающее меню пространства «⋯» — плавающее: --raised и тень */
.tk-pop { position:absolute; z-index:6; top:44px; right:8px; min-width:220px; display:flex; flex-direction:column; padding:6px; border-radius:var(--r-nested); background:var(--raised); border:0;
  box-shadow:var(--shadow-float); animation:tk-pop var(--dur-1) var(--ease); }
.tk-pop button { display:flex; align-items:center; gap:10px; min-height:36px; padding:0 10px; border:0; border-radius:8px; background:none; color:var(--text); cursor:pointer; text-align:left; font:inherit; font-size:13.5px; }
@media (hover: hover) { .tk-pop button:hover { background:var(--nested); } }
.tk-pop button .i { color:var(--muted); }
.tk-pop button.bad, .tk-pop button.bad .i { color:var(--brand-ink); }
.tk-pop button.sep { margin-top:5px; position:relative; }
.tk-pop button.sep::before { content:""; position:absolute; left:6px; right:6px; top:-3px; height:1px; background:var(--rule); }
@media (hover: hover) { .tk-pop button.bad:hover { background:var(--brand-soft); } }
.tk-side .tk-scroll { flex:1; padding:4px 4px 12px 8px; }
/* заголовки разделов — 12 px, обычный регистр */
.tk-sec { display:flex; align-items:center; justify-content:space-between; gap:6px; min-height:28px; padding:12px 4px 2px 8px; font-size:var(--fs-small); font-weight:500; color:var(--faint); }
.tk-sec:first-child { padding-top:4px; }
.tk-sec .tk-ib { width:24px; height:24px; }
.tk-sec .tk-ib .i { width:14px; height:14px; }
.tk-cnt { font:500 var(--fs-small) var(--font); color:var(--faint); font-variant-numeric:tabular-nums; }
.tk-tip { display:flex; align-items:center; gap:6px; margin:2px 4px 6px 8px; padding:6px 10px; border-radius:var(--r-nested); font-size:var(--fs-small); line-height:var(--lh-small); color:var(--muted); background:var(--raised); }
.tk-chans, .tk-people, .tk-vms { list-style:none; margin:0; padding:0; }
/* строка канала 30 px: наведение — подложка; голосовой «я здесь» — --active и зелёный значок */
.tk-ch-row { position:relative; display:flex; align-items:center; border-radius:var(--r-nested); }
@media (hover: hover) { .tk-ch-row:hover { background:var(--hover); } }
.tk-ch-btn { flex:1; min-width:0; display:flex; align-items:center; gap:8px; min-height:30px; padding:4px 8px; border:0; background:none; color:var(--muted); cursor:pointer; text-align:left; border-radius:var(--r-nested); font:inherit; font-size:var(--fs-body); font-weight:400; }
.tk-ch-btn:focus-visible { outline:2px solid var(--focus); outline-offset:-2px; }
.tk-ch-btn .i { color:var(--faint); }
@media (hover: hover) { .tk-ch-row:hover .tk-ch-btn { color:var(--text); } }
.tk-ch-name { flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.tk-ch-n { flex:none; font-size:var(--fs-small); font-weight:400; color:var(--faint); font-variant-numeric:tabular-nums; }   /* видно всегда, и при наведении (владелец) */
.tk-ch-n.full { color:var(--warning); }
/* «Войти» — при наведении (на телефоне — всегда, пока вы не в голосе); место под неё не нужно: число и подпись — в одной ячейке справа */
.tk-ch-go { display:none; flex:none; padding:0 8px; border-radius:var(--r-chip); font-size:11.5px; font-weight:500; line-height:20px; color:var(--text); background:var(--secondary); }
.tk-ch:not(.mine) .tk-ch-row:hover .tk-ch-go, .tk-ch:not(.mine) .tk-ch-btn:focus-visible .tk-ch-go { display:inline-block; }
.tk-ch:not(.mine) .tk-ch-row:hover .tk-ch-n { display:none; }
@media (hover: none) { .tk-chans:not(.voiced) .tk-ch-go { display:inline-block; } }
.tk-ch.mine .tk-ch-row { background:var(--active); }
.tk-ch.mine .tk-ch-btn { color:var(--text); cursor:default; }
.tk-ch.mine .tk-ch-btn .i { color:var(--positive); }
.tk-own { opacity:0; }
.tk-ch-row:hover .tk-own, .tk-own:focus-visible { opacity:1; }
.tk-ch-row .tk-ib { width:26px; height:26px; }
.tk-ch-row .tk-ib .i { width:14px; height:14px; }
@media (hover: none) { .tk-own { opacity:.8; } }
.tk-vms { padding:0 0 4px 20px; }
/* человек в списке: строка 32 px, круглый аватар 24 */
.tk-p-btn { width:100%; display:flex; align-items:center; gap:8px; min-height:32px; padding:4px 8px; border:0; border-radius:var(--r-nested); background:none; cursor:pointer; text-align:left; color:var(--muted); font:inherit; }
@media (hover: hover) { .tk-p-btn:hover { background:var(--hover); color:var(--text); } }
.tk-p-btn:focus-visible { outline:2px solid var(--focus); outline-offset:-2px; }
.tk-p-name { flex:1; min-width:0; display:flex; align-items:center; gap:4px; white-space:nowrap; font-size:13.5px; }
.tk-p-t { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.tk-vms .tk-p-name { color:var(--text); }
.tk-p-name.me { font-weight:500; }
.tk-crown { display:inline-flex; flex:none; color:var(--warning); }
.tk-crown .i { width:13px; height:13px; }
.tk-fl { display:inline-flex; flex:none; color:var(--faint); }
.tk-fl .i { width:14px; height:14px; }
.tk-fl.bad { color:var(--negative); }
.tk-p.off { opacity:.5; }
.tk-people .tk-p-name { color:var(--muted); }
/* пинг и тип связи: значок того же цвета, что и число */
.tk-ping { display:inline-flex; align-items:center; gap:3px; flex:none; min-width:4ch; justify-content:flex-end; font-size:var(--fs-small); font-variant-numeric:tabular-nums; color:var(--faint); white-space:nowrap; }
.tk-ping .i { width:12px; height:12px; }
.tk-ping.g { color:var(--positive); } .tk-ping.y { color:var(--warning); } .tk-ping.r, .tk-ping.bad { color:var(--negative); }
/* «соединяемся» — точка мигает только прозрачностью */
.tk-wdot { display:inline-block; width:6px; height:6px; margin:0 3px; border-radius:50%; background:var(--muted); animation:tk-blink 1.2s ease-in-out infinite; }
@keyframes tk-blink { 50% { opacity:.25; } }

/* 👥 участники справа: в сети не в голосе и недавно были; пусто — одна строка */
.tk-mem { grid-area:right; display:flex; flex-direction:column; min-height:0; min-width:0; background:var(--ground); }
.tk-mem .tk-scroll { flex:1; padding:8px 4px 12px 8px; }
.tk-mem .tk-sec:first-child { padding-top:6px; }
.tk-mem-empty { margin:0; padding:10px 8px; font-size:var(--fs-small); line-height:var(--lh-small); color:var(--faint); }
#peopleScroll:has(#idleList > li, #offList > li) .tk-mem-empty { display:none; }

/* панель «я» внизу колонки каналов: мягкая карточка; сверху — «Голос подключён» и опасная «выйти», ниже — я и кнопки */
.tk-me { grid-area:me; display:grid; grid-template-columns:minmax(0, 1fr) auto; margin:0 8px 8px; border-radius:var(--r-card); background:var(--surface); --av-gap:var(--surface); }
.tk-me .tk-me-row { grid-column:1 / -1; grid-row:2; display:flex; align-items:center; gap:2px; padding:6px; }
.tk-vc:not([hidden]) ~ .tk-me-row { border-top:1px solid var(--rule); }
.tk-vc { grid-column:1; grid-row:1; min-width:0; display:flex; align-items:center; gap:8px; padding:8px 4px 8px 12px; }
#hangBtn { grid-column:2; grid-row:1; align-self:center; margin-right:8px; }
.tk-vc-ico { display:grid; place-items:center; width:16px; height:16px; flex:none; color:var(--positive); background:none; }
.tk-vc-ico .i { width:16px; height:16px; }
.tk-vc-t { flex:1; min-width:0; display:flex; flex-direction:column; line-height:1.25; }
.tk-vc-t b { font-size:13px; font-weight:600; color:var(--positive); }
.tk-vc-t small, .tk-me-t small { display:flex; align-items:center; gap:4px; min-width:0; white-space:nowrap; }
.tk-vc-t small { font-size:var(--fs-small); color:var(--muted); }
.tk-st-t { min-width:0; overflow:hidden; text-overflow:ellipsis; }
.tk-vc.warn .tk-vc-t b, .tk-vc.warn .tk-vc-ico { color:var(--warning); }
.tk-me-who { flex:1; min-width:0; display:flex; align-items:center; gap:8px; padding:4px; border:0; border-radius:var(--r-nested); background:none; color:var(--text); cursor:pointer; text-align:left; font:inherit; }
@media (hover: hover) { .tk-me-who:hover { background:var(--hover); } }
.tk-me-who:focus-visible { outline:2px solid var(--focus); outline-offset:-2px; }
.tk-me-t { min-width:0; display:flex; flex-direction:column; line-height:1.25; }
.tk-me-t b { font-size:13.5px; font-weight:600; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.tk-me-t small { font-size:var(--fs-small); color:var(--muted); overflow:hidden; font-variant-numeric:tabular-nums; }
.tk-me-t small.ok { color:var(--positive); }
.tk-me-t small.warn, .tk-me-t small.warn .tk-ping { color:var(--warning); }
.tk-me-t small.bad { color:var(--negative); }
.tk-me-btns { display:flex; gap:0; }
.tk-me .tk-me-btns .tk-cb { width:32px; }
.tk-cb { position:relative; display:grid; place-items:center; width:32px; height:32px; padding:0; border:0; border-radius:var(--r-control); background:none; color:var(--muted); cursor:pointer;
  transition:background-color var(--dur-1) var(--ease), color var(--dur-1) var(--ease); }
@media (hover: hover) { .tk-cb:hover { background:var(--hover); color:var(--text); } }
.tk-cb:active { transform:scale(.97); }
.tk-cb:focus-visible { outline:2px solid var(--focus); outline-offset:2px; }
.tk-cb .i { width:18px; height:18px; }
.tk-cb .on-on { display:none; }
.tk-cb[aria-pressed="true"] { color:var(--negative); }
.tk-cb[aria-pressed="true"] .on-on { display:block; }
.tk-cb[aria-pressed="true"] .on-off { display:none; }
/* «выйти из голоса» — опасная кнопка: --brand-soft, значок --brand-ink */
.tk-cb.hang { color:var(--brand-ink); background:var(--brand-soft); }
@media (hover: hover) { .tk-cb.hang:hover { color:var(--brand-ink); background:var(--negative-bg); filter:brightness(1.25); } }

/* центр: чат на --surface (светлее фона), баннер, плитки голоса */
.tk-center { grid-area:center; position:relative; display:flex; flex-direction:column; min-width:0; min-height:0; margin:8px 0; border-radius:var(--r-card); background:var(--surface); --av-gap:var(--surface); }
/* «нет связи с сервером» — предупреждение, а не авария: голос-то работает */
.tk-banner { display:flex; align-items:flex-start; gap:10px; margin:10px 12px 0; padding:9px 12px; border-radius:var(--r-nested); font-size:13px; line-height:1.45; color:var(--text); background:var(--warning-bg); border:0; }
.tk-banner > .i { margin-top:2px; color:var(--warning); }
.tk-b-t { flex:1; min-width:0; }
.tk-b-t b { font-weight:500; }
.tk-b-more { color:var(--muted); }
.tk-banner .btn { margin:0; min-height:32px; flex:none; }
.tk-b-tog { display:none; flex:none; padding:0 2px; border:0; background:none; color:var(--muted); font-size:12.5px; text-decoration:underline; text-underline-offset:3px; cursor:pointer; min-height:22px; }
.tk-banner.wait, .tk-banner.kick { background:var(--raised); color:var(--muted); }
.tk-banner.wait > .i, .tk-banner.kick > .i { color:var(--muted); }
.tk-banner.kick { align-items:center; flex-wrap:wrap; }
.tk-stage { margin:12px 12px 0; padding:8px 10px 10px 12px; border-radius:var(--r-nested); background:var(--raised); border:0; --av-gap:var(--raised); }
.tk-stage-h { display:flex; align-items:center; gap:8px; min-width:0; font-size:13.5px; }
.tk-stage-h > .i { color:var(--positive); }
.tk-stage-h b { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; min-width:0; max-width:40%; font-weight:600; }
.tk-stage-h .muted { font-size:var(--fs-small); flex:none; font-variant-numeric:tabular-nums; }
.tk-stage-avs { flex:1; min-width:0; display:flex; align-items:center; gap:6px; padding:3px 2px 3px 6px; overflow:hidden; }
.tk-stage:not(.fold) .tk-stage-avs { visibility:hidden; }
.tk-stage.fold { padding-bottom:8px; }
.tk-stage.fold .tk-tiles { display:none; }
.tk-stage.fold #stageFold .i { transform:rotate(-90deg); }
/* до 4 человек — крупные плитки по центру (рядом — плитка «Позвать друзей»); запас по краям — кольцо «говорит» не обрезается */
.tk-tiles { display:flex; flex-wrap:wrap; justify-content:center; gap:8px; margin:2px -8px -8px; padding:6px 8px 8px; max-height:38vh; overflow-y:auto; scrollbar-width:thin; }
.tk-tile, .tk-inv { flex:0 0 172px; }
.tk-tile { --c:var(--faint); position:relative; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:10px; min-width:0; min-height:132px; padding:16px 10px 12px; border-radius:var(--r-nested);
  border:0; cursor:pointer; color:var(--text); background:var(--nested); --av-gap:var(--nested); transition:background-color var(--dur-1) var(--ease); }
@media (hover: hover) { .tk-tile:hover { background:var(--secondary-hover); } }
.tk-tile:has(.spk) { box-shadow:inset 0 0 0 2px var(--positive); }
.tk-tile-b { display:flex; align-items:center; gap:4px; min-width:0; max-width:100%; }
.tk-tile-n { min-width:0; font-size:13px; font-weight:500; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.tk-tile-st { position:absolute; top:8px; right:10px; }
/* больше 4 человек — компактные плитки, не больше двух рядов (дальше — прокрутка внутри) */
.tk-tiles.many { display:grid; grid-template-columns:repeat(auto-fit, minmax(120px, 1fr)); gap:6px; max-height:calc(2 * 96px + 6px + 14px); }
.tk-tiles.many .tk-tile { min-height:96px; padding:10px 8px 8px; gap:6px; }
.tk-tiles.many .tk-av.xl { width:48px; height:48px; font-size:20px; }
/* плитка-приглашение на свободном месте */
.tk-inv { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:8px; min-height:132px; padding:12px; border-radius:var(--r-nested); border:1px dashed var(--control);
  background:none; color:var(--muted); cursor:pointer; font:inherit; font-size:13px; font-weight:500; }
@media (hover: hover) { .tk-inv:hover { color:var(--text); border-color:var(--muted); } }
.tk-inv .i { width:20px; height:20px; }
/* чат: шапка 48 px, строки сообщений, поле ввода-«пилюля» */
.tk-chat-h { display:flex; align-items:center; gap:8px; min-height:48px; padding:8px 10px 8px 18px; border-bottom:1px solid var(--rule); }
.tk-chat-h .i { color:var(--faint); }
.tk-chat-h b { font-size:var(--fs-card); font-weight:600; }
.tk-chat-sub { font-size:13px; margin-right:auto; color:var(--muted); }
.tk-msgs { flex:1; min-height:0; overflow-y:auto; overscroll-behavior:contain; padding:10px 0 8px; scrollbar-width:thin; scrollbar-gutter:stable; }
/* пусто: одна фраза и действие, по центру ленты */
.tk-empty { height:100%; min-height:160px; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:4px; color:var(--muted); text-align:center; padding:20px; font-size:var(--fs-body); }
.tk-empty b { color:var(--text); font-size:var(--fs-card); font-weight:600; }
.tk-empty-inv { display:flex; flex-wrap:wrap; align-items:center; justify-content:center; gap:8px; margin-top:12px; }
.tk-empty-inv .tk-invite { min-height:var(--control-h); padding:0 14px 0 12px; font-size:13px; }
/* загрузка: серые полосы реального размера (аватар, имя, строка текста), без мерцания */
.tk-skel { display:flex; flex-direction:column; gap:18px; padding:14px 18px; }
.tk-skel-m { display:grid; grid-template-columns:36px minmax(0, 1fr); column-gap:12px; row-gap:8px; align-items:center; }
.tk-skel-m i { display:block; height:12px; border-radius:6px; background:var(--raised); }
.tk-skel-m i:first-child { grid-row:span 2; width:36px; height:36px; border-radius:50%; }
.tk-skel-m i:nth-child(2) { width:120px; }
.tk-skel-m i:nth-child(3) { width:62%; height:14px; }
.tk-skel-m:nth-child(2n) i:nth-child(3) { width:44%; }
.tk-skel-c { display:block; height:14px; margin:9px 8px; border-radius:7px; background:var(--raised); }
.tk-skel-c:nth-child(2n) { width:60%; }
.tk-day { display:flex; align-items:center; gap:10px; margin:12px 18px 4px; font-size:var(--fs-small); color:var(--faint); }
.tk-day::before, .tk-day::after { content:""; flex:1; height:1px; background:var(--rule); }
.tk-msg { --c:var(--muted); position:relative; display:grid; grid-template-columns:36px minmax(0, 1fr); column-gap:12px; padding:6px 52px 2px 18px; margin-top:10px; }
.tk-msg.cont { margin-top:0; padding-top:1px; }
@media (hover: hover) { .tk-msg:hover { background:var(--hover); } }
.tk-msg.pend { opacity:.6; }
.tk-mh { display:flex; align-items:baseline; gap:8px; flex-wrap:nowrap; min-width:0; }
.tk-mname { min-width:0; max-width:70%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-weight:600; color:var(--c); }
.tk-mh time { flex:none; font-size:var(--fs-small); color:var(--faint); font-variant-numeric:tabular-nums; }
.tk-mtext { white-space:pre-wrap; overflow-wrap:anywhere; line-height:var(--lh-body); }
.tk-mtext a { color:var(--text); text-decoration:underline; text-decoration-color:var(--faint); text-underline-offset:2px; }
@media (hover: hover) { .tk-mtext a:hover { text-decoration-color:var(--text); } }
.tk-mside { font-size:11px; color:var(--faint); opacity:0; align-self:center; text-align:right; font-variant-numeric:tabular-nums; }
.tk-msg:hover .tk-mside { opacity:1; }
@media (hover: none) { .tk-mside { opacity:.6; } }
.tk-direct { display:inline-flex; align-items:center; gap:3px; flex:none; margin-left:6px; padding:0 7px; border-radius:var(--r-chip); font-size:11px; font-weight:500; line-height:18px; color:var(--warning); background:var(--warning-bg); white-space:nowrap; vertical-align:1px; }
.tk-direct .i { width:11px; height:11px; }
.tk-mh .tk-direct { margin-left:0; }
.tk-mdel { position:absolute; top:2px; right:14px; display:grid; place-items:center; width:30px; height:30px; padding:0; border:0; border-radius:var(--r-control); background:var(--raised); color:var(--muted); cursor:pointer; opacity:0; }
.tk-msg:hover .tk-mdel, .tk-mdel:focus-visible { opacity:1; }
@media (hover: hover) { .tk-mdel:hover { color:var(--brand-ink); background:var(--brand-soft); } }
.tk-mdel .i { width:14px; height:14px; }
@media (hover: none) { .tk-mdel { opacity:.6; } }
.tk-compose { display:flex; align-items:flex-end; gap:4px; margin:4px 14px 14px; min-height:var(--control-h-big); padding:4px 4px 4px 14px; border-radius:calc(var(--control-h-big) / 2); background:var(--field); border:1px solid transparent; }
.tk-compose:focus-within { box-shadow:0 0 0 2px var(--focus); }
.tk-compose textarea { flex:1; min-width:0; resize:none; border:0; background:none; padding:8px 0; min-height:34px; max-height:160px; font:inherit; font-size:var(--fs-body); line-height:var(--lh-body); color:var(--text); outline:none; box-shadow:none; }
.tk-compose textarea::placeholder { color:var(--faint); }
.tk-compose textarea:focus { box-shadow:none; border:0; }
.tk-send { display:grid; place-items:center; width:34px; height:34px; border:0; border-radius:var(--r-control); background:none; color:var(--muted); cursor:pointer; flex:none; transition:background-color var(--dur-1) var(--ease), color var(--dur-1) var(--ease); }
.tk-send .i { width:16px; height:16px; }
@media (hover: hover) { .tk-send:hover { background:var(--nested); color:var(--text); } }
.tk-send:active { transform:scale(.97); }
.tk-send:focus-visible { outline:2px solid var(--focus); outline-offset:1px; }

/* правая колонка: статистика соединения (открыта — вместо «Участников») */
.tk-stats { grid-area:right; display:flex; flex-direction:column; min-height:0; min-width:0; background:var(--ground); }
.tk-st-h { display:flex; align-items:center; justify-content:space-between; gap:8px; min-height:48px; padding:8px 8px 8px 16px; font-size:var(--fs-body); }
.tk-st-h b { display:inline-flex; align-items:center; gap:8px; font-weight:600; }
.tk-st-h b .i { color:var(--faint); }
.tk-stats .tk-scroll { flex:1; padding:4px 12px 16px 16px; }
.tk-st-empty { display:flex; flex-direction:column; align-items:center; gap:6px; padding:28px 8px 12px; text-align:center; color:var(--muted); font-size:13px; line-height:1.45; }
.tk-st-empty b { color:var(--text); font-size:15px; font-weight:600; }
.tk-st-eico { display:grid; place-items:center; width:40px; height:40px; margin-bottom:6px; color:var(--faint); background:none; }
.tk-st-eico .i { width:32px; height:32px; stroke-width:1.75; }
.tk-st-ping { margin:10px 0 0; padding-top:12px; border-top:1px solid var(--rule); align-self:stretch; font-size:12.5px; font-variant-numeric:tabular-nums; }
.tk-big { display:grid; grid-template-columns:1fr 1fr; gap:8px; }
.tk-kpi { display:flex; flex-direction:column; gap:2px; padding:10px 12px; border-radius:var(--r-nested); background:var(--surface); border:0; }
.tk-kpi span { font-size:var(--fs-small); color:var(--muted); }
.tk-kpi b { font:600 24px/1.15 var(--font); font-variant-numeric:tabular-nums; letter-spacing:-.01em; }
.tk-kpi small { font-size:11px; color:var(--faint); }
.tk-kpi.in b { color:var(--c-in); } .tk-kpi.out b { color:var(--muted); }
.tk-chart { --c-grid:var(--rule); --c-txt:var(--faint); display:block; width:100%; height:92px; margin-top:10px; border-radius:var(--r-nested); background:var(--surface); border:0; }
.tk-legend { display:flex; gap:12px; margin:6px 2px 0; font-size:var(--fs-small); color:var(--muted); }
.tk-legend span::before { content:""; display:inline-block; width:10px; height:2px; border-radius:1px; margin-right:5px; vertical-align:middle; background:currentColor; }
.tk-legend .in::before { background:var(--c-in); } .tk-legend .out::before { background:var(--c-out); }
.tk-legend .muted { margin-left:auto; } .tk-legend .muted::before { display:none; }
.tk-facts { display:grid; grid-template-columns:minmax(0, 1fr) auto; gap:6px 10px; margin:14px 0 0; font-size:12.5px; }
.tk-facts dt { color:var(--muted); }
.tk-facts dt small { font-size:11px; }
.tk-facts dd { margin:0; text-align:right; font-variant-numeric:tabular-nums; white-space:nowrap; }
.tk-facts .tk-vrow { grid-column:1 / -1; white-space:normal; display:flex; flex-wrap:wrap; justify-content:flex-start; gap:4px; text-align:left; }
.tk-h3 { margin:18px 0 8px; font-size:var(--fs-small); font-weight:500; color:var(--faint); }
.tk-ptab { display:flex; flex-direction:column; gap:6px; }
.tk-pr { padding:8px 10px; border-radius:var(--r-nested); background:var(--surface); border:0; }
.tk-pr-h { display:flex; align-items:center; gap:8px; }
.tk-pr-h b { flex:1; min-width:0; font-weight:500; font-size:13px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.tk-via { display:inline-flex; align-items:center; gap:4px; min-width:0; max-width:100%; font-size:11.5px; white-space:nowrap; padding:1px 8px; border-radius:var(--r-chip); background:var(--raised); color:var(--muted); }
.tk-via .i { width:12px; height:12px; }
.tk-via > span { min-width:0; overflow:hidden; text-overflow:ellipsis; }
.tk-via.direct { color:var(--positive); } .tk-via.turn { color:var(--warning); } .tk-via.relay { color:var(--muted); } .tk-via.bad { color:var(--negative); }
.tk-pr-h .tk-via { max-width:55%; }
.tk-pr-n { display:flex; flex-wrap:wrap; gap:2px 12px; margin-top:6px; padding-left:28px; font-size:var(--fs-small); color:var(--muted); font-variant-numeric:tabular-nums; }
.tk-pr-n .pg b { font-size:13px; }
.tk-pr-n small { font-size:10.5px; }
.tk-pr-n .warn { color:var(--warning); } .tk-pr-n .bad { color:var(--negative); }
.tk-none { margin:0; }
/* как идёт голос: три метки с пояснением и цвета пинга */
.tk-key { display:grid; grid-template-columns:auto minmax(0, 1fr); align-items:center; gap:7px 10px; margin:0; font-size:var(--fs-small); color:var(--muted); line-height:1.35; }
.tk-key dt { margin:0; }
.tk-key dd { margin:0; }
.tk-key-pg { margin:10px 0 0; font-size:var(--fs-small); color:var(--muted); }
.tk-key-pg .pg { font-weight:600; }
.tk-key-pg .pg.g { color:var(--positive); } .tk-key-pg .pg.y { color:var(--warning); } .tk-key-pg .pg.r { color:var(--negative); }
.tk-small { margin:0; font-size:var(--fs-small); line-height:1.45; color:var(--muted); }

/* меню человека — плавающее: --raised, тень */
.tk-menu { position:fixed; z-index:40; width:268px; display:flex; flex-direction:column; gap:10px; padding:14px; border-radius:var(--r-card); background:var(--raised); border:0; --av-gap:var(--raised);
  box-shadow:var(--shadow-float); animation:tk-pop var(--dur-1) var(--ease); }
@keyframes tk-pop { from { opacity:0; transform:scale(.97); } }
.tk-menu-bg { display:none; }
.tk-mn-h { display:flex; align-items:center; gap:10px; }
.tk-mn-h > span:not(.tk-av) { min-width:0; display:flex; flex-direction:column; }
.tk-mn-h b { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.tk-mn-h small { font-size:var(--fs-small); color:var(--muted); }
.tk-vol { display:flex; justify-content:space-between; font-size:12.5px; color:var(--muted); margin-top:2px; }
.tk-vol-v { min-width:5ch; text-align:right; color:var(--text); font-variant-numeric:tabular-nums; font-weight:500; }
.tk-menu input[type=range] { width:100%; min-height:0; height:18px; padding:0; border:0; background:none; accent-color:var(--text); cursor:pointer; }
.tk-mn-chk { font-size:13.5px; color:var(--text); align-items:center; }
.tk-mn-chk input { accent-color:var(--positive); margin:0; }
.tk-mn-b { min-height:var(--control-h); font-size:13px; }
.tk-mn-b .i { width:16px; height:16px; }
/* действие владельца — отдельно, ниже черты */
.tk-mn-own { margin-top:2px; padding-top:8px; border-top:1px solid var(--rule); }
.tk-mn-own .btn { width:100%; justify-content:flex-start; min-height:var(--control-h); padding:0 10px; border:0; border-radius:var(--r-control); background:none; font-size:13px; color:var(--brand-ink); }
@media (hover: hover) { .tk-mn-own .btn:hover { background:var(--brand-soft); color:var(--brand-ink); } }

/* диалоги — плавающие: --raised, тень, без размытия фона */
.tk-dlg { width:min(460px, calc(100vw - 32px)); max-height:calc(100dvh - 32px); border:0; border-radius:var(--r-card); padding:20px 22px 18px; background:var(--raised); color:var(--text); box-shadow:var(--shadow-float); }
.tk-dlg::backdrop { background:rgba(0,0,0,.6); }
.tk-dlg h2 { font-size:var(--fs-card); font-weight:600; margin:0; }
.tk-dlg-h { display:flex; align-items:center; justify-content:space-between; margin-bottom:6px; }
.tk-set { display:flex; flex-direction:column; gap:14px; }
.tk-grp { display:flex; flex-direction:column; gap:12px; }
.tk-grp + .tk-grp { border-top:1px solid var(--rule); padding-top:12px; }
.tk-gh { margin:0; font-size:13px; font-weight:600; color:var(--muted); }
.tk-row { display:flex; flex-direction:column; gap:6px; }
.tk-row label { font-size:var(--fs-small); color:var(--muted); }
.tk-row select, .tk-row input { width:100%; }
.tk-lvl-box { display:flex; flex-direction:column; gap:4px; margin-top:2px; }
.tk-lvl { height:8px; }
.tk-out { display:grid; grid-template-columns:1fr 1fr; width:100%; }
.tk-out span { display:flex; align-items:center; justify-content:center; gap:7px; padding:7px 10px; }
.tk-out .i { width:16px; height:16px; }
.tk-bg { display:flex; align-items:center; gap:10px; width:100%; min-height:40px; padding:4px 8px 4px 4px; margin:-2px 0; border:0; border-radius:var(--r-nested); background:none; font:inherit; font-size:13px; color:var(--muted); cursor:pointer; text-align:left; }
.tk-bg[aria-expanded="true"] { color:var(--text); background:var(--hover); }
@media (hover: hover) { .tk-bg:hover { color:var(--text); background:var(--hover); } }
.tk-hint { display:grid; place-items:center; width:22px; height:22px; flex:none; border-radius:50%; border:1.5px solid currentColor; background:none; color:var(--muted); font-weight:600; font-size:12px; }
.tk-bg:hover .tk-hint, .tk-bg[aria-expanded="true"] .tk-hint { color:var(--text); }
.tk-bg-t { padding:10px 12px; border-radius:var(--r-nested); background:var(--surface); }
.tk-set .chk b { font-size:13.5px; }
.tk-ver { margin:2px 0 0; padding-top:12px; border-top:1px solid var(--rule); text-align:center; font-size:11.5px; color:var(--faint); font-variant-numeric:tabular-nums; }
.tk-ver a { color:inherit; }
.tk-phones { text-align:center; width:min(420px, calc(100vw - 32px)); }
.tk-ph-ico { display:grid; place-items:center; margin:4px 0 8px; color:var(--text); }
.tk-ph-ico .i { width:40px; height:40px; stroke-width:1.5; }
.tk-phones p { margin:8px 0 0; color:var(--muted); line-height:1.5; }
.tk-ph-acts { display:flex; flex-direction:column; gap:8px; margin:16px 0 14px; }
.tk-ph-acts .btn { width:100%; white-space:normal; text-align:center; }
.btn.tk-two { flex-direction:column; gap:1px; min-height:52px; padding:6px 18px; border-radius:var(--r-card); line-height:1.25; }
.btn.tk-two small { font-size:var(--fs-small); font-weight:400; color:var(--muted); }
.tk-phones .tk-small { margin-top:4px; }
.tk-ask { width:min(400px, calc(100vw - 32px)); }
.tk-ask form { display:flex; flex-direction:column; gap:14px; }
.tk-ask input { min-height:var(--control-h-big); font-size:15px; }
/* непрочитанное во вкладке «Чат» (телефон) — белая метка, не красная */
.tk-badge { display:inline-grid; place-items:center; min-width:18px; height:18px; padding:0 5px; margin-left:4px; border-radius:var(--r-chip); background:var(--primary); color:var(--primary-ink); font-size:11px; font-weight:600; font-variant-numeric:tabular-nums; }
/* всплывающее сообщение — над полем ввода, не закрывает его и кнопки */
body.in-space .toast { bottom:96px; max-width:min(320px, calc(100vw - 32px)); text-align:center; line-height:1.4; }

/* ---------- телефон: вкладки «Каналы · Чат · Связь» (выбранная — белая подпись и красная черта под ней), панель «я» внизу ----------
   «Каналы»: рейка слева, каналы, ниже — участники */
@media (max-width: 760px) {
  body.in-space .tk-wrap { padding:0; }
  .tk-app, .tk-app.no-stats, .tk-app:not(.no-stats) { grid-template-columns:minmax(0, 1fr); grid-template-rows:auto minmax(0, 1fr) auto; grid-template-areas:"tabs" "pane" "me";
    height:calc(100dvh - var(--barH, 57px)); min-height:360px; }
  .tk-app[data-pane="chans"] { grid-template-columns:var(--rail-w) minmax(0, 1fr); grid-template-rows:auto minmax(0, 1fr) auto auto; grid-template-areas:"tabs tabs" "rail pane" "rail people" "me me"; }
  .tk-tabs { grid-area:tabs; display:flex; gap:0; padding:0 8px; border-bottom:1px solid var(--rule); background:var(--ground); }
  .tk-tabs button { position:relative; flex:1; display:inline-flex; align-items:center; justify-content:center; min-height:44px; border:0; border-radius:0; background:none; color:var(--muted); font:inherit; font-weight:500; cursor:pointer; }
  .tk-tabs button[aria-selected="true"] { color:var(--text); text-decoration:underline var(--sel-line) var(--brand-line); text-underline-offset:13px; }
  .tk-tabs button:focus-visible { outline:2px solid var(--focus); outline-offset:-4px; border-radius:var(--r-nested); }
  .tk-rail { display:none; }
  .tk-app[data-pane="chans"] .tk-rail { display:flex; }
  .tk-side, .tk-center, .tk-stats, .tk-mem { grid-area:pane; display:none; }
  .tk-app[data-pane="chans"] .tk-side, .tk-app[data-pane="chat"] .tk-center, .tk-app[data-pane="stats"] .tk-stats { display:flex; }
  .tk-app[data-pane="chans"] .tk-mem, .tk-app[data-pane="chans"]:not(.no-stats) .tk-mem { grid-area:people; display:flex; max-height:34dvh; border-top:1px solid var(--rule); }
  .tk-app.no-stats[data-pane="stats"] .tk-stats { display:flex; }
  .tk-center { margin:0; border-radius:0; }
  #statsClose, #statsOpen { display:none; }
  /* заголовок «Связь» повторяет вкладку — не нужен; у чата — компактный */
  .tk-st-h { display:none; }
  .tk-chat-h { min-height:44px; padding:4px 8px 4px 14px; }
  /* панель «я» — одной строкой: я · опасная «выйти из голоса» · микрофон, звук, настройки */
  .tk-me { grid-area:me; grid-template-columns:minmax(0, 1fr) auto auto; align-items:center; margin:0; border-radius:0; border-top:1px solid var(--rule); background:var(--ground); --av-gap:var(--ground); padding:4px 8px calc(4px + env(safe-area-inset-bottom)); }
  .tk-me .tk-vc { display:none; }
  .tk-me .tk-me-row { display:contents; }
  .tk-me-who { grid-column:1; grid-row:1; min-height:44px; }
  #hangBtn { grid-column:2; grid-row:1; margin:0 6px 0 4px; }
  .tk-me-btns { grid-column:3; grid-row:1; }
  .tk-cb, .tk-me .tk-me-btns .tk-cb { width:44px; height:44px; }
  .tk-cb .i { width:20px; height:20px; }
  .tk-ib, .tk-own, .tk-mdel, .tk-ch-row .tk-ib, .tk-sec .tk-ib { width:44px; height:44px; }
  .tk-own + .tk-own { margin-left:0; }
  .tk-own { opacity:.8; }
  .tk-pop button { min-height:44px; }
  .tk-p-btn { min-height:44px; }
  .tk-ch-btn { min-height:44px; padding:8px; }
  .tk-shead { padding:10px 4px 6px 12px; }
  .tk-invite { min-height:36px; }
  .tk-pop { top:52px; right:6px; }
  .tk-rail-a, .tk-rail-add { width:40px; height:40px; }
  .tk-stage { margin:8px 8px 0; padding:6px 6px 8px 10px; }
  .tk-stage.fold { padding-bottom:6px; }
  .tk-stage-avs { gap:0; padding-left:10px; }
  .tk-stage-avs .tk-av { margin-left:-5px; box-shadow:0 0 0 2px var(--raised); }
  .tk-stage-avs .tk-av.spk { box-shadow:0 0 0 2px var(--raised), 0 0 0 4px var(--spk); position:relative; z-index:1; }
  .tk-tiles, .tk-tiles.many { display:flex; flex-wrap:nowrap; justify-content:flex-start; overflow-x:auto; overflow-y:hidden; gap:8px; max-height:none; padding:6px 8px 8px; scrollbar-width:none; }
  .tk-tile, .tk-tiles.many .tk-tile { flex:none; width:104px; min-width:0; min-height:104px; padding:12px 6px 8px; gap:8px; }
  .tk-tile .tk-av.xl, .tk-tiles.many .tk-av.xl { width:52px; height:52px; font-size:22px; }
  .tk-tile-n { font-size:var(--fs-small); }
  .tk-tile-st { top:5px; right:6px; font-size:10px; }
  .tk-inv { flex:none; width:104px; min-height:104px; padding:8px; font-size:var(--fs-small); text-align:center; }
  .tk-msg { padding:6px 48px 2px 12px; column-gap:10px; }
  .tk-mdel { right:4px; top:0; }
  .tk-compose { margin:4px 8px 8px; }
  .tk-send { width:40px; height:40px; }
  .tk-banner { margin:8px 8px 0; padding:8px 10px; }
  /* баннер на телефоне — одной строкой, «Подробнее» раскрывает */
  .tk-banner:not(.open) .tk-b-more { display:none; }
  .tk-b-tog { display:inline-block; }
  .tk-menu { left:0 !important; right:0; top:auto !important; bottom:0; width:auto; border-radius:var(--r-card) var(--r-card) 0 0; padding:22px 16px calc(16px + env(safe-area-inset-bottom)); animation:tk-sheet var(--dur-2) var(--ease); }
  .tk-menu::before { content:""; position:absolute; top:8px; left:50%; width:36px; height:4px; margin-left:-18px; border-radius:2px; background:var(--control); }
  .tk-menu-bg:not([hidden]) { display:block; position:fixed; inset:0; z-index:39; background:rgba(0,0,0,.5); }
  /* главная: одна колонка, кнопки во всю ширину */
  .tk-wrap:has(> .tk-home:not([hidden])), .tk-wrap:has(> .tk-join:not([hidden])) { padding:16px 16px 8px; }
  .tk-home { margin-top:0; gap:12px; }
  .tk-hgrid { grid-template-columns:minmax(0, 1fr); gap:12px; }
  .tk-hcol { gap:12px; }
  .tk-home .start-card, .tk-join { padding:16px; }
  .tk-home input, .tk-join input { min-height:44px; }
  .tk-home .code-form { flex-direction:column; }
  .tk-home .code-form .btn { width:100%; }
  .tk-feats { grid-template-columns:minmax(0, 1fr); gap:10px; }
  .tk-dice { width:40px; height:40px; right:2px; }
  .tk-rc-a { min-height:52px; }
  body.in-space .toast { bottom:calc(var(--meH, 64px) + 76px); }
}
@keyframes tk-sheet { from { transform:translateY(24px); opacity:.6; } }
@media (max-width: 380px) {
  .tk-me-t small { font-size:11px; }
  .tk-me { padding-left:4px; padding-right:4px; }
  .tk-me-who { padding:4px; gap:6px; }
  #hangBtn { margin:0 2px; }
}
.tk-direct.bad { color:var(--negative); background:var(--negative-bg); }
.tk-mb { min-width:0; }
.tk-mb.fail .tk-mtext { opacity:.6; }
.tk-retry { border:0; cursor:pointer; font:inherit; font-size:11px; font-weight:500; }
@media (hover: hover) { .tk-retry:hover { text-decoration:underline; } }
/* связь человека с сервером оборвалась — ещё в канале, но «переподключается» */
.tk-p.away .tk-p-btn, .tk-tile.away { opacity:.55; }
.tk-p.away .tk-p-name::after, .tk-tile.away .tk-tile-n::after { content:" ⟳"; color:var(--warning); }

/* меньше движения — по просьбе системы */
@media (prefers-reduced-motion: reduce) {
  .tk-menu, .tk-pop, .tk-wdot { animation:none; }
  .tk-av, .tk-tile, .tk-rc, .sw, .tk-ib, .tk-cb, .tk-send, .tk-rail-a, .tk-rail-add { transition:none; }
  .tk-ib:active, .tk-cb:active, .tk-send:active, .btn.tk-go:active, .tk-rail-a:active, .tk-rail-add:active, .tk-invite:active { transform:none; }
}

/* ---------- 📎 файлы в чате: скрепка, лоток вложений, картинки и файлы в ленте, перетаскивание, просмотр ---------- */
.tk-center { position:relative; }
.tk-compose { flex-wrap:wrap; padding-left:6px; }
.tk-compose textarea { padding-left:2px; }
.tk-clip { display:grid; place-items:center; width:36px; height:36px; flex:none; padding:0; border:0; border-radius:10px; background:none; color:var(--muted); cursor:pointer; transition:color .12s, background-color .12s; }
.tk-clip:hover { color:var(--text); background:var(--soft); }
.tk-clip .i { width:20px; height:20px; }
.tk-clip[aria-disabled="true"] { opacity:.38; cursor:not-allowed; }
.tk-clip[aria-disabled="true"]:hover { color:var(--muted); background:none; }
/* «ждём загрузку…» вместо стрелки */
.tk-send .tk-sw { display:none; }
.tk-send.wait { width:auto; padding:0 12px; font-size:12.5px; font-weight:500; white-space:nowrap; cursor:progress; filter:saturate(.75); }
.tk-send.wait > .i { display:none; }
.tk-send.wait .tk-sw { display:inline-flex; align-items:center; gap:7px; }
.tk-spin { width:13px; height:13px; flex:none; border-radius:50%; border:2px solid rgba(255,255,255,.35); border-top-color:#fff; animation:tk-rot .8s linear infinite; }
@keyframes tk-rot { to { transform:rotate(360deg); } }

/* лоток: ряд карточек над полем ввода (не помещается — прокрутка вбок) */
.tk-tray { flex:1 0 100%; order:-1; display:flex; gap:8px; overflow-x:auto; overscroll-behavior-x:contain; margin:0 0 6px; padding:4px 2px 10px; border-bottom:1px solid var(--rule); scrollbar-width:thin; }
.tk-at { position:relative; flex:none; width:132px; display:flex; flex-direction:column; border-radius:12px; background:var(--surface); border:1px solid var(--rule); overflow:hidden; animation:tk-pop .14s ease-out; }
.tk-at-pv { position:relative; display:grid; place-items:center; height:88px; background:var(--soft); overflow:hidden; }
.tk-at-pv img { display:block; width:100%; height:100%; object-fit:cover; transition:opacity .2s; }
.tk-at.up .tk-at-pv img, .tk-at.wait .tk-at-pv img { opacity:.7; }
.tk-at-b { display:flex; flex-direction:column; gap:1px; min-width:0; padding:6px 9px 8px; }
.tk-at-n { font-size:12.5px; font-weight:500; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.tk-at-m { font-size:11px; color:var(--muted); font-variant-numeric:tabular-nums; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.tk-at-bar { position:absolute; left:8px; right:8px; top:76px; height:5px; border-radius:3px; background:rgba(0,0,0,.45); box-shadow:0 0 0 1px rgba(255,255,255,.12); overflow:hidden; }
.tk-at-bar i { display:block; width:0; height:100%; border-radius:3px; background:var(--secondary); transition:width .2s linear; }
.tk-at:not(.up):not(.wait) .tk-at-bar { display:none; }
.tk-at-x { position:absolute; top:5px; right:5px; display:grid; place-items:center; width:24px; height:24px; padding:0; border:0; border-radius:50%; background:rgba(0,0,0,.6); color:#fff; cursor:pointer; }
.tk-at-x:hover { background:var(--brand); }
.tk-at-x .i { width:13px; height:13px; stroke-width:2.6; }
.tk-at-re { display:none; position:absolute; top:24px; left:50%; width:40px; height:40px; margin-left:-20px; padding:0; border:0; border-radius:50%; background:var(--brand); color:#fff; cursor:pointer;
  box-shadow:0 6px 16px -6px rgba(0,0,0,.6); }
.tk-at-re:hover { filter:brightness(1.1); }
.tk-at-re .i { width:20px; height:20px; stroke-width:2.4; }
.tk-at.err { border-color:var(--negative); background:color-mix(in srgb, var(--negative) 8%, var(--surface)); }
.tk-at.err .tk-at-pv > * { opacity:.3; }
.tk-at.err .tk-at-re { display:grid; place-items:center; }
.tk-at.err .tk-at-m { color:var(--negative); white-space:normal; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; line-height:1.3; }

/* значок файла: лист с цветной меткой расширения */
.tk-fi { --fc:var(--muted); position:relative; display:inline-grid; place-items:center; width:40px; height:46px; flex:none; color:var(--fc); }
.tk-fi .i { position:absolute; inset:0; width:100%; height:100%; stroke-width:1.3; fill:color-mix(in srgb, var(--fc) 13%, transparent); }
.tk-fi-e { position:absolute; left:50%; bottom:9px; transform:translateX(-50%); padding:1px 4px; border-radius:4px; background:var(--fc); color:#fff; font:700 8.5px/1.25 var(--font); letter-spacing:.04em; text-transform:uppercase; white-space:nowrap; }
.tk-fi[data-k] { --fc:var(--muted); }   /* 🎨 одна приглушённая метка для всех типов (без цветных) */
.tk-fi.gone { --fc:var(--muted); }
.tk-fi.gone .i { inset:auto; width:26px; height:26px; position:static; fill:none; stroke-width:1.8; }
.tk-at-pv .tk-fi { width:46px; height:54px; }
.tk-at-pv .tk-fi-e { bottom:11px; font-size:9.5px; }

/* картинки и гифки в ленте */
.tk-media { display:flex; flex-direction:column; align-items:flex-start; gap:6px; margin:4px 0 2px; min-width:0; }
.tk-mtext + .tk-media { margin-top:6px; }
.tk-mmarks { margin-top:2px; }
.tk-mmarks .tk-direct { margin-left:0; }
.tk-pic { position:relative; display:block; min-width:0; min-height:0; overflow:hidden; background:var(--soft); cursor:zoom-in; }
.tk-pic img { display:block; transition:filter .15s; }
.tk-pic:hover img { filter:brightness(.92); }
.tk-pic:focus-visible { outline-offset:2px; }
.tk-gal { display:grid; gap:4px; max-width:100%; border-radius:12px; overflow:hidden; }
.tk-gal.one { display:block; width:fit-content; }
.tk-gal.one .tk-pic { border-radius:12px; }
.tk-gal.one img { max-width:100%; height:auto; }
.tk-gal.one .nodim img { object-fit:cover; }
.tk-gal:not(.one) { width:min(420px, 100%); }
.tk-gal:not(.one) img { width:100%; height:100%; object-fit:cover; }
.tk-gal.n2 { grid-template-columns:1fr 1fr; aspect-ratio:2 / 1; }
.tk-gal.n3 { grid-template-columns:2fr 1fr; grid-template-rows:1fr 1fr; aspect-ratio:3 / 2; }
.tk-gal.n3 .tk-pic:first-child { grid-row:span 2; }
.tk-gal.n4 { grid-template-columns:1fr 1fr; grid-template-rows:1fr 1fr; aspect-ratio:4 / 3; }
.tk-gal.n5 { grid-template-columns:repeat(3, 1fr); }
.tk-gal.n5 .tk-pic { aspect-ratio:1; }
.tk-gif { position:absolute; left:6px; bottom:6px; padding:0 6px; border-radius:6px; background:rgba(0,0,0,.62); color:#fff; font:700 10px/17px var(--font); letter-spacing:0; pointer-events:none; }
/* успела истечь, а лента ещё не знает — вместо картинки серая плашка */
.tk-pic.broken { cursor:default; background:var(--soft); border:1px dashed var(--rule); }
.tk-pic.broken img { visibility:hidden; }
.tk-pic.broken .tk-gif { display:none; }
.tk-pic.broken::after { content:"Файл удалён — файлы хранятся сутки"; position:absolute; inset:0; display:grid; place-items:center; padding:8px; text-align:center; font-size:12px; color:var(--muted); }
.tk-gal.one .tk-pic.broken img { min-width:200px; min-height:70px; }

/* файл — карточка: значок, имя, размер и «до ЧЧ:ММ завтра», «⬇ Скачать» */
.tk-fc { display:flex; align-items:center; gap:12px; width:min(440px, 100%); padding:10px; border-radius:12px; background:var(--side); border:1px solid var(--rule); }
.tk-fc-t { flex:1; min-width:0; display:flex; flex-direction:column; gap:1px; }
.tk-fc-n { min-width:0; font-weight:500; color:var(--text); text-decoration:none; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
a.tk-fc-n:hover { text-decoration:underline; text-underline-offset:2px; }
.tk-fc-t small { font-size:12px; color:var(--muted); font-variant-numeric:tabular-nums; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.tk-fc-exp { opacity:.8; }
.tk-fc-dl { display:inline-flex; align-items:center; gap:6px; flex:none; min-height:34px; padding:0 14px 0 11px; border-radius:17px; border:1px solid var(--rule); background:var(--surface); color:var(--text);
  font-size:13px; font-weight:500; text-decoration:none; white-space:nowrap; transition:border-color .12s, background-color .12s; }
.tk-fc-dl:hover { border-color:color-mix(in srgb, var(--muted) 55%, var(--rule)); background:color-mix(in srgb, var(--muted) 8%, var(--surface)); }
.tk-fc-dl .i { width:16px; height:16px; stroke-width:2.2; }
.tk-fc.gone { background:none; border-style:dashed; }
.tk-fc.gone .tk-fc-n { color:var(--muted); font-weight:500; text-decoration:line-through; text-decoration-color:color-mix(in srgb, var(--muted) 50%, transparent); }
.tk-fc.gone .tk-fi { width:40px; height:40px; border-radius:10px; background:var(--soft); }

/* перетаскивание: подсветка всего чата */
.tk-drop { position:absolute; inset:8px; z-index:8; display:grid; place-items:center; border-radius:16px; pointer-events:none;
  border:2px dashed color-mix(in srgb, var(--muted) 75%, transparent); background:color-mix(in srgb, var(--surface) 84%, transparent); animation:tk-pop .12s ease-out; }
.tk-drop-in { display:flex; flex-direction:column; align-items:center; gap:6px; padding:20px; text-align:center; }
.tk-drop-ico { display:grid; place-items:center; width:68px; height:68px; margin-bottom:6px; border-radius:22px; background:var(--secondary); color:#fff; box-shadow:none; }
.tk-drop-ico .i { width:32px; height:32px; stroke-width:2.2; }
.tk-drop b { font-size:18px; font-weight:700; }
.tk-drop small { font-size:13px; color:var(--muted); }
.tk-drop.off { border-color:color-mix(in srgb, var(--warning) 70%, transparent); }
.tk-drop.off .tk-drop-ico { background:var(--soft); color:var(--warning); box-shadow:none; }

/* просмотр картинки поверх страницы */
.tk-lb { width:100vw; height:100dvh; max-width:none; max-height:none; margin:0; padding:0; border:0; inset:0; overflow:hidden; color:#fff; background:rgba(6,6,8,.9); }
.tk-lb[open] { display:flex; flex-direction:column; animation:tk-fade .14s ease-out; }
.tk-lb::backdrop { background:rgba(0,0,0,.35); }
@keyframes tk-fade { from { opacity:0; } }
.tk-lb-top { display:flex; align-items:center; gap:8px; padding:12px 14px 12px 20px; padding-top:max(12px, env(safe-area-inset-top)); background:linear-gradient(rgba(0,0,0,.5), transparent); }
.tk-lb-t { flex:1; min-width:0; display:flex; flex-direction:column; line-height:1.3; }
.tk-lb-t b { font-weight:500; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.tk-lb-t small { font-size:12px; color:rgba(255,255,255,.62); font-variant-numeric:tabular-nums; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.tk-lb-b { display:inline-flex; align-items:center; justify-content:center; gap:7px; flex:none; min-height:38px; padding:0 15px 0 12px; border:0; border-radius:19px; background:rgba(255,255,255,.1);
  color:#fff; font-size:13.5px; font-weight:500; text-decoration:none; cursor:pointer; transition:background-color .12s; }
.tk-lb-b:hover { background:rgba(255,255,255,.2); }
.tk-lb-b .i { width:17px; height:17px; stroke-width:2.1; }
.tk-lb-b.ic { width:38px; padding:0; }
.tk-lb :focus-visible { outline-color:#fff; }
.tk-lb-stage { position:relative; flex:1; min-height:0; }
.tk-lb-stage img { position:absolute; inset:0; margin:auto; max-width:calc(100% - 136px); max-height:calc(100% - 28px); width:auto; height:auto; border-radius:6px;
  box-shadow:0 24px 70px -10px rgba(0,0,0,.7); background:repeating-conic-gradient(#2a2a2a 0 25%, #222 0 50%) 0 0 / 16px 16px; }
.tk-lb-nav { position:absolute; top:50%; display:grid; place-items:center; width:48px; height:48px; margin-top:-24px; padding:0; border:0; border-radius:50%; background:rgba(255,255,255,.12); color:#fff; cursor:pointer; }
.tk-lb-nav:hover { background:rgba(255,255,255,.24); }
.tk-lb-nav .i { width:24px; height:24px; stroke-width:2.2; }
.tk-lb-nav.prev { left:16px; } .tk-lb-nav.next { right:16px; }

/* телефон: всё помещается, лоток вбок, картинки — во всю колонку */
@media (max-width: 760px) {
  .tk-clip { width:40px; height:40px; }
  .tk-clip .i { width:22px; height:22px; }
  .tk-send.wait { height:40px; }
  .tk-at { width:112px; }
  .tk-at-pv { height:76px; }
  .tk-at-bar { top:65px; }
  .tk-at-x { width:28px; height:28px; top:4px; right:4px; }
  .tk-gal:not(.one) { width:100%; }
  .tk-fc { gap:10px; padding:8px; }
  .tk-lb-top { padding:10px 8px 10px 14px; padding-top:max(10px, env(safe-area-inset-top)); gap:6px; }
  .tk-lb-b { padding:0; width:40px; min-height:40px; }
  .tk-lb-b span { display:none; }
  .tk-lb-stage img { max-width:100%; max-height:calc(100% - 16px); border-radius:0; }
  .tk-lb-nav { top:auto; bottom:calc(14px + env(safe-area-inset-bottom)); margin:0; width:44px; height:44px; background:rgba(0,0,0,.5); }
  .tk-lb-nav.prev { left:12px; } .tk-lb-nav.next { right:12px; }
  .tk-drop b { font-size:16px; }
}
@media (max-width: 400px) {
  .tk-fc-dl { width:38px; padding:0; justify-content:center; }
  .tk-fc-dl span, .tk-sw-l { display:none; }
  .tk-fc .tk-fi { width:34px; height:40px; }
  .tk-fc-t small { white-space:normal; line-height:1.3; }
  .tk-fc-exp { display:block; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
}
@media (prefers-reduced-motion: reduce) {
  .tk-at, .tk-drop, .tk-lb[open] { animation:none; }
  .tk-spin { animation-duration:2.4s; }
}
@media (max-width: 400px) { .tk-fc-sep { display:none; } }
.tk-lb:focus { outline:none; }

/* ---------- 🎙 голос: настройки как в Discord — режим ввода, чувствительность со шкалой, проверка, обработка; рация ---------- */
#setDlg { width:min(520px, calc(100vw - 32px)); }
/* заголовок окна прилипает сверху — ✕ всегда под рукой в длинных настройках */
#setDlg .tk-dlg-h { position:sticky; top:-20px; z-index:3; margin:-20px -22px 6px; padding:16px 22px 10px; background:var(--surface); }
/* строка «заголовок + серая подпись — справа тумблер / кнопка» */
.tk-swr { display:flex; align-items:center; justify-content:space-between; gap:16px; }
.tk-swr-t { flex:1; min-width:0; display:flex; flex-direction:column; gap:2px; }
.tk-swr-t b, .tk-set .tk-swr-t label { font-size:14px; font-weight:500; color:var(--text); line-height:1.35; }
.tk-set .tk-swr-t label { cursor:pointer; }
.tk-swr-t small { font-size:12px; line-height:1.4; color:var(--muted); }
.tk-swr-t small.tk-live { color:var(--positive); font-weight:500; font-variant-numeric:tabular-nums; }
/* тумблер: role="switch", Space/Enter — как у кнопки; в ручке — ✕ / ✓ */
.tk-tg { position:relative; flex:none; width:42px; height:24px; min-height:0; padding:0; border:0; border-radius:12px; cursor:pointer;
  background:color-mix(in srgb, var(--text) 26%, transparent); transition:background-color .18s; }
.tk-tg:hover { background:color-mix(in srgb, var(--text) 34%, transparent); }
.tk-tg[aria-checked="true"] { background:var(--positive); }
.tk-tg[aria-checked="true"]:hover { background:color-mix(in srgb, var(--positive) 88%, var(--text)); }
.tk-tg:focus-visible { outline-offset:3px; border-radius:12px; }
.tk-tg-k { position:absolute; top:3px; left:3px; width:18px; height:18px; border-radius:50%; background:#fff; box-shadow:0 1px 3px rgba(0,0,0,.3);
  transition:transform .2s cubic-bezier(.3, .7, .4, 1); }
.tk-tg[aria-checked="true"] .tk-tg-k { transform:translateX(18px); }
.tk-tg-k::before, .tk-tg-k::after { content:""; position:absolute; left:50%; top:50%; width:8px; height:2px; margin:-1px 0 0 -4px; border-radius:1px;
  background:#8a8a8a; transition:transform .2s, width .2s, background-color .2s; }
.tk-tg-k::before { transform:rotate(45deg); }
.tk-tg-k::after { transform:rotate(-45deg); }
.tk-tg[aria-checked="true"] .tk-tg-k::before { width:5px; background:var(--positive); transform:translate(-2px, 1.5px) rotate(45deg); }
.tk-tg[aria-checked="true"] .tk-tg-k::after { width:9px; background:var(--positive); transform:translate(1.6px, -.2px) rotate(-45deg); }

/* режим ввода — две карточки с кружком */
.tk-modes { display:grid; grid-template-columns:1fr 1fr; gap:8px; }
.tk-set .tk-mode { position:relative; display:flex; align-items:flex-start; gap:10px; padding:10px 12px; border:1px solid var(--rule); border-radius:12px;
  font-size:13px; color:var(--text); cursor:pointer; transition:border-color .15s, background-color .15s; }
.tk-mode:hover { background:var(--soft); }
.tk-row .tk-mode input { position:absolute; width:1px; height:1px; min-height:0; margin:0; padding:0; opacity:0; pointer-events:none; }
.tk-mode-r { flex:none; width:18px; height:18px; margin-top:1px; border-radius:50%; border:2px solid color-mix(in srgb, var(--text) 40%, transparent); transition:border-color .15s, box-shadow .15s, background-color .15s; }
.tk-mode-t { min-width:0; display:flex; flex-direction:column; gap:2px; }
.tk-mode-t b { font-size:13.5px; font-weight:500; line-height:1.3; }
.tk-mode-t small { font-size:12px; line-height:1.4; color:var(--muted); }
.tk-mode:has(input:checked) { border-color:color-mix(in srgb, var(--positive) 65%, var(--rule)); background:color-mix(in srgb, var(--positive) 8%, transparent); }
.tk-mode input:checked + .tk-mode-r { border-color:var(--positive); background:var(--positive); box-shadow:inset 0 0 0 3px var(--surface); }
.tk-mode input:focus-visible + .tk-mode-r { outline:2px solid var(--focus); outline-offset:2px; }

/* клавиша рации: [Ё] Изменить → «Нажмите клавишу» */
.tk-keybtn { flex:none; display:inline-flex; align-items:center; gap:9px; min-height:40px; padding:0 13px 0 6px; border:1px solid var(--rule); border-radius:11px;
  background:var(--hover); color:var(--muted); font-size:12.5px; cursor:pointer; transition:border-color .15s, color .15s; }
.tk-keybtn:hover { color:var(--text); border-color:color-mix(in srgb, var(--text) 30%, var(--rule)); }
.tk-keybtn kbd { display:inline-grid; place-items:center; min-width:30px; height:28px; padding:0 8px; border-radius:7px; border:1px solid var(--rule);
  background:var(--surface); color:var(--text); font:600 14px/1 var(--font); box-shadow:0 2px 0 var(--rule); }
.tk-keybtn.wait { border-color:var(--text); color:var(--text); }
.tk-keybtn.wait kbd { animation:tk-blink 1s ease-in-out infinite; }

/* шкала уровня: --lv — уровень, --th — порог (0…1 по шкале −60…0 дБ) */
.tk-sens { gap:8px; }
.tk-vu { --lv:0; --th:.17; position:relative; display:flex; align-items:center; height:24px; }
.tk-vu-bar { position:relative; flex:1; height:10px; border-radius:5px; transition:box-shadow .2s, opacity .2s;
  background:linear-gradient(90deg, color-mix(in srgb, var(--warning) 20%, var(--raised)) 0 calc(var(--th) * 100%), color-mix(in srgb, var(--positive) 22%, var(--raised)) 0); }
.tk-vu-fill { position:absolute; inset:0; border-radius:inherit; clip-path:inset(0 calc((1 - var(--lv)) * 100%) 0 0 round 5px);
  background:linear-gradient(90deg, var(--warning) 0 calc(var(--th) * 100%), var(--positive) 0); transition:clip-path .07s linear; }
.tk-vu-mark { position:absolute; top:-5px; bottom:-5px; left:calc(var(--th) * 100%); width:3px; margin-left:-1.5px; border-radius:2px;
  background:var(--text); box-shadow:0 0 0 2px var(--surface); transition:left .3s ease; }
.tk-vu:not(.live) .tk-vu-bar { opacity:.55; }
.tk-vu.open .tk-vu-bar { box-shadow:0 0 0 3px color-mix(in srgb, var(--positive) 22%, transparent); }
.tk-vu.nomark .tk-vu-bar { background:var(--raised); }
.tk-vu.nomark .tk-vu-fill { background:color-mix(in srgb, var(--text) 38%, transparent); }
.tk-vu.nomark.open .tk-vu-fill { background:var(--positive); }
.tk-vu.nomark .tk-vu-mark, .tk-vu.manual .tk-vu-mark { display:none; }
/* вручную — ползунок порога прямо на шкале (центр ручки совпадает с делением шкалы) */
.tk-vu-range { -webkit-appearance:none; appearance:none; position:absolute; top:0; left:-7px; width:calc(100% + 14px); height:24px; min-height:0; margin:0; padding:0;
  border:0; border-radius:0; background:none; cursor:pointer; }
.tk-vu-range:focus { outline:none; }
.tk-vu-range::-webkit-slider-runnable-track { height:24px; background:transparent; border:0; }
.tk-vu-range::-moz-range-track { height:24px; background:transparent; border:0; }
.tk-vu-range::-webkit-slider-thumb { -webkit-appearance:none; appearance:none; width:14px; height:22px; margin-top:1px; border:0; border-radius:7px; background:#fff;
  box-shadow:0 0 0 1px rgba(0,0,0,.18), 0 2px 6px rgba(0,0,0,.35); transition:transform .12s; }
.tk-vu-range::-moz-range-thumb { width:14px; height:22px; border:0; border-radius:7px; background:#fff; box-shadow:0 0 0 1px rgba(0,0,0,.18), 0 2px 6px rgba(0,0,0,.35); }
.tk-vu-range:hover::-webkit-slider-thumb, .tk-vu-range:active::-webkit-slider-thumb { transform:scale(1.08); }
.tk-vu-range:focus-visible::-webkit-slider-thumb { box-shadow:0 0 0 2px var(--surface), 0 0 0 4px var(--focus); }
.tk-vu-range:focus-visible::-moz-range-thumb { box-shadow:0 0 0 2px var(--surface), 0 0 0 4px var(--focus); }
.tk-vu-foot { display:flex; align-items:baseline; justify-content:space-between; gap:12px; }
.tk-vu-st { flex:none; display:inline-flex; align-items:center; gap:6px; font-size:12px; font-weight:500; color:var(--muted); white-space:nowrap; font-variant-numeric:tabular-nums; }
.tk-vu-st:empty { display:none; }
.tk-vu-st::before { content:""; width:7px; height:7px; border-radius:50%; background:currentColor; opacity:.5; transition:box-shadow .15s; }
.tk-vu-st.on { color:var(--positive); }
.tk-vu-st.on::before { opacity:1; box-shadow:0 0 0 3px color-mix(in srgb, var(--positive) 25%, transparent); }

/* «Проверить» / «Остановить» */
.btn.tk-test { flex:none; min-height:36px; padding:0 16px; gap:8px; font-size:13px; font-weight:500; }
.tk-test-dot { width:8px; height:8px; border-radius:50%; background:color-mix(in srgb, var(--text) 35%, transparent); }
.btn.tk-test.on { border-color:color-mix(in srgb, var(--positive) 60%, var(--rule)); color:var(--positive); }
.btn.tk-test.on .tk-test-dot { background:var(--positive); animation:tk-blink 1.2s ease-in-out infinite; }
.btn.tk-test:disabled { cursor:progress; }

/* шумоподавление: три варианта, две строки в каждом */
.seg.tk-nz { display:grid; grid-template-columns:repeat(3, minmax(0, 1fr)); width:100%; border-radius:14px; }
.tk-nz label > span { display:flex; flex-direction:column; align-items:center; gap:1px; height:100%; padding:7px 4px; border-radius:11px; white-space:normal; text-align:center; line-height:1.2; }
.tk-nz b { font-size:13px; font-weight:500; }
.tk-nz small { font-size:11px; color:var(--muted); font-weight:400; }
.tk-nz input:checked + span b { color:var(--text); }
.tk-warn-t { color:var(--warning); }
.tk-lat { padding:8px 11px; border-radius:10px; background:var(--hover); font-variant-numeric:tabular-nums; }

/* «Обработка голоса» — главный тумблер; выключена — шумодав и громкость неактивны */
.tk-procrow { padding:10px 12px; margin:0 -2px; border-radius:12px; background:var(--hover); }
.tk-procbody { display:flex; flex-direction:column; gap:12px; transition:opacity .2s, filter .2s; }
.tk-procbody.off { opacity:.42; filter:grayscale(.6); user-select:none; }
.tk-procoff { padding:8px 11px; border-radius:10px; border:1px dashed var(--rule); }
.seg .tk-nz-ms { display:inline; padding:0; border-radius:0; font-size:inherit; color:inherit; white-space:nowrap; font-variant-numeric:tabular-nums; }
/* 📶 задержка своей обработки — рядом с пингом */
.tk-proc-parts .tk-via { color:var(--muted); }

/* рация в панели «я»: держать — говорить (на телефоне — большая, над строкой с именем) */
.tk-me .tk-me-row { grid-row:3; }
.tk-ptt { grid-column:1 / -1; grid-row:2; display:flex; align-items:center; justify-content:center; gap:8px; min-height:var(--control-h); margin:0 8px 8px; padding:0 12px;
  border:0; border-radius:var(--r-control); background:var(--secondary); color:var(--text);
  font-size:13px; font-weight:500; cursor:pointer; touch-action:none; user-select:none; -webkit-user-select:none; -webkit-touch-callout:none; -webkit-tap-highlight-color:transparent;
  transition:background-color .1s, border-color .1s, color .1s, box-shadow .15s, transform .08s; }
.tk-ptt .i { width:18px; height:18px; color:var(--positive); }
@media (hover: hover) { .tk-ptt:hover { background:var(--secondary-hover); } }
.tk-ptt-t { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.tk-ptt-k { flex:none; font-size:11px; padding:1px 6px; }
.tk-ptt.on { background:var(--positive-bg); color:var(--text); transform:scale(.97); }
.tk-ptt.on .tk-ptt-k { background:var(--nested); color:var(--text); }
.tk-ptt.on.live { box-shadow:inset 0 0 0 2px var(--positive); }
.tk-ptt.off { background:var(--disabled); color:var(--disabled-ink); cursor:not-allowed; }
.tk-ptt.off .i { color:var(--negative); }
@media (hover: none) { .tk-ptt-k { display:none; } }
/* компьютер: колонка узкая — вместо значка микрофона клавиша, текст целиком */
@media (min-width: 761px) and (hover: hover) { .tk-ptt { gap:7px; padding:0 10px; font-size:12.5px; } .tk-ptt .i { display:none; } }

/* телефон */
@media (max-width: 760px) {
  .tk-ptt { grid-row:1; min-height:56px; margin:2px 0 8px; border-radius:16px; font-size:15px; }
  .tk-ptt .i { width:22px; height:22px; }
  .tk-me.ptt .tk-me-who, .tk-me.ptt #hangBtn, .tk-me.ptt .tk-me-btns { grid-row:2; }
}
@media (max-width: 520px) {
  .tk-dlg, #setDlg { width:calc(100vw - 16px); max-height:calc(100dvh - 16px); padding:16px 14px 14px; }
  #setDlg .tk-dlg-h { top:-16px; margin:-16px -14px 4px; padding:12px 14px 8px; }
  .tk-modes { grid-template-columns:1fr; }
  .tk-swr { gap:12px; }
  .tk-keyrow { flex-wrap:wrap; }
}
@media (max-width: 440px) {
  .tk-vu-foot { flex-wrap:wrap; row-gap:4px; }
  .tk-vu-foot .tk-small { flex:1 1 220px; }
  .tk-testrow, .tk-keyrow { flex-wrap:wrap; row-gap:8px; }
  .tk-testrow .tk-swr-t, .tk-keyrow .tk-swr-t { flex-basis:100%; }
  .btn.tk-test { width:100%; min-height:40px; }
}
@media (max-width: 360px) {
  .tk-nz small { display:none; }
}
@media (prefers-reduced-motion: reduce) {
  .tk-tg, .tk-tg-k, .tk-tg-k::before, .tk-tg-k::after, .tk-vu-fill, .tk-vu-mark, .tk-ptt { transition:none; }
  .tk-keybtn.wait kbd, .btn.tk-test.on .tk-test-dot { animation:none; }
}

/* ---------- 🖥 стрим экрана: кнопка, окно выбора, «🔴 В эфире», LIVE, сцена просмотра, «Видео» в статистике ---------- */
.talk { --live:var(--brand); }
/* кнопка «Стрим» — рядом с выходом из голоса */
.tk-scr-btn { color:var(--muted); }
.tk-scr-btn:hover { color:var(--text); }
.tk-scr-btn.on { color:var(--live); background:color-mix(in srgb, var(--live) 13%, transparent); }
.tk-scr-btn.busy { opacity:.55; cursor:progress; }
@media (min-width: 761px) {
  .tk-me { grid-template-columns:minmax(0, 1fr) auto auto; }
  #scrBtn { grid-column:2; grid-row:1; align-self:center; margin-right:4px; }
  #hangBtn { grid-column:3; }
  .tk-live { grid-row:2; }
  .tk-ptt { grid-row:4; }
  .tk-me .tk-me-row { grid-row:5; }
}
/* «В эфире» — плашка над именем (красное — только точка и метка) */
.tk-live { grid-column:1 / -1; margin:0 8px 8px; padding:8px 6px 8px 11px; border-radius:var(--r-nested); border:0; background:var(--raised); }
.tk-live-h { display:flex; align-items:center; gap:6px; min-width:0; }
.tk-live-dot { position:relative; display:inline-block; width:10px; height:10px; flex:none; border-radius:50%; background:var(--live); margin-right:2px; }
.tk-live-dot { animation:tk-blink 1.6s ease-in-out infinite; }   /* мигает только прозрачностью */
.tk-live-t { flex:1; min-width:0; font-size:13px; font-weight:600; color:var(--brand-ink); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.tk-live-sub { display:block; margin:3px 0 0 18px; font-size:12px; color:var(--text); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-variant-numeric:tabular-nums; }
.tk-live-sub[hidden] { display:none; }
.tk-live .tk-ib { width:28px; height:28px; }
.tk-live .tk-ib:disabled { opacity:.45; cursor:default; }   /* 🔁 идёт смена источника */
.tk-live-stop { display:inline-flex; align-items:center; gap:5px; flex:none; min-height:28px; padding:0 10px 0 8px; border:0; border-radius:var(--r-control); background:var(--brand-soft); color:var(--brand-ink); font-size:12px; font-weight:500; cursor:pointer; transition:filter .12s; }
.tk-live-stop:hover { filter:brightness(1.1); }
.tk-live-stop .i { width:14px; height:14px; }
.tk-live-warn, .tk-live-fps { margin:7px 0 0; padding:6px 8px; border-radius:8px; font-size:12px; line-height:1.35; }
.tk-live-warn { color:var(--warning); background:color-mix(in srgb, var(--warning) 13%, transparent); }
.tk-live-fps { color:var(--muted); background:var(--soft); font-variant-numeric:tabular-nums; }
.tk-live-enc { margin-top:1px; color:var(--muted); }
.tk-live-relay { color:var(--muted); }
.tk-live-box { display:flex; flex-direction:column; align-items:flex-start; gap:6px; margin:7px 0 0; padding:7px 9px; border-radius:9px; font-size:12px; line-height:1.4;
  color:var(--text); background:color-mix(in srgb, var(--muted) 11%, transparent); }
.tk-live-box[hidden] { display:none; }
.tk-live-box.warn { color:var(--warning); background:color-mix(in srgb, var(--warning) 13%, transparent); }
.tk-live-act { align-self:stretch; min-height:28px; padding:0 8px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; border:0; border-radius:8px; background:var(--surface); color:var(--text); font-size:12px; font-weight:500; cursor:pointer;
  box-shadow:inset 0 0 0 1px var(--rule); transition:box-shadow .12s; }
.tk-live-act:hover { box-shadow:inset 0 0 0 1px var(--muted); }
.tk-live-act[hidden] { display:none; }
.tk-me-t small.fwd, .tk-fwd { color:var(--muted); }
.tk-relayrow { display:flex; flex-direction:column; gap:6px; padding:10px 12px; margin:0 -2px; border-radius:12px; background:color-mix(in srgb, var(--muted) 8%, var(--hover)); }
.tk-relay-h { display:flex; align-items:center; gap:14px; }
.tk-relay-seg { flex:none; }
.tk-relay-seg span { padding:5px 11px; font-size:12.5px; }
.tk-relay-n { font-size:12px; color:var(--muted); }
.tk-gentlerow { padding:10px 12px; margin:0 -2px; border-radius:12px; background:color-mix(in srgb, var(--positive) 9%, var(--hover)); }
/* пункты сверх «🎮 Бережно» — обычные, с мелкой пометкой «выключит 🎮» */
.tk-q-f.gx { color:var(--warning); }
.tk-swr-t .tk-gentle-n { align-self:flex-start; margin-top:4px; padding:4px 8px; border-radius:7px; font-size:12px; line-height:1.35; color:var(--text); background:color-mix(in srgb, var(--positive) 14%, transparent); }
.tk-swr-t .tk-gentle-n[hidden] { display:none; }
.tk-live-auto { color:var(--positive); white-space:normal; line-height:1.35; }
/* 🔁 я раздаю чужой стрим (лёгкий стрим) — строка в панели «я» */
.tk-fwdp { grid-column:1 / -1; display:flex; align-items:center; gap:8px; margin:0 8px 8px; padding:6px 10px; border-radius:10px; font-size:12px; line-height:1.35;
  color:var(--muted); background:color-mix(in srgb, var(--muted) 10%, transparent); }
.tk-fwdp[hidden] { display:none; }
@media (min-width: 761px) { .tk-fwdp { grid-row:3; } }
@media (max-width: 760px) { .tk-fwdp { display:none; } }
@media (max-width: 520px) { .tk-relay-h { flex-direction:column; align-items:stretch; gap:8px; } .tk-relay-seg { align-self:flex-start; } }
.tk-live-enc.hw { color:var(--positive); }
.tk-live-enc.cpu { color:var(--warning); }
/* 🐢 «Маша лагает — снизить качество?»: ненавязчивая строка + две кнопки; ⚙ мягко светится (3 вспышки, потом ровно) */
.tk-live-box.tk-lag { color:var(--text); background:color-mix(in srgb, var(--warning) 12%, transparent); box-shadow:inset 0 0 0 1px color-mix(in srgb, var(--warning) 30%, transparent); }
.tk-lag-acts { display:flex; gap:6px; align-self:stretch; min-width:0; }
.tk-lag-acts .tk-live-act { align-self:auto; }
.tk-lag-go { flex:1; min-width:0; color:var(--warning); box-shadow:inset 0 0 0 1px color-mix(in srgb, var(--warning) 55%, transparent); }
.tk-lag-go:hover { box-shadow:inset 0 0 0 1px var(--warning); }
.tk-lag-no { flex:none; background:none; color:var(--muted); box-shadow:none; }
.tk-lag-no:hover { color:var(--text); box-shadow:none; background:var(--soft); }
.tk-live .tk-ib.lag { color:var(--warning); background:color-mix(in srgb, var(--warning) 14%, transparent); box-shadow:inset 0 0 0 1.5px color-mix(in srgb, var(--warning) 70%, transparent); }
.tk-live .tk-ib.lag.lag-p { animation:tk-lag-glow 1.1s ease-in-out 3; }
@keyframes tk-lag-glow {
  0%, 100% { box-shadow:inset 0 0 0 1.5px color-mix(in srgb, var(--warning) 70%, transparent), 0 0 0 0 color-mix(in srgb, var(--warning) 0%, transparent); }
  50% { box-shadow:inset 0 0 0 1.5px var(--warning), 0 0 0 0 transparent; }
}
/* «Без перекодирования (бета)» — под переключателем лёгкого стрима */
.tk-fwdrow { margin-top:4px; padding-top:9px; border-top:1px solid color-mix(in srgb, var(--muted) 18%, transparent); }
.tk-fwdrow .tk-swr-t b { font-size:13px; }
.tk-fwdrow.dis .tk-swr-t b { color:var(--muted); }
.tk-beta { display:inline-block; margin-left:4px; padding:0 6px; border-radius:6px; font-size:10.5px; font-weight:600; line-height:16px; letter-spacing:0; vertical-align:1px;
  color:var(--muted); background:color-mix(in srgb, var(--muted) 14%, transparent); }

/* значок «LIVE» и кнопка «LIVE» в списке канала */
.tk-live-b { display:inline-flex; align-items:center; flex:none; height:18px; padding:0 6px; border-radius:5px; background:var(--live); color:#fff; font:700 10.5px/18px var(--font); letter-spacing:0; }
.tk-p { display:flex; align-items:center; gap:2px; }
.tk-p > .tk-p-btn { flex:1; min-width:0; }
.tk-live-btn { display:inline-flex; align-items:center; gap:3px; flex:none; height:20px; margin-right:4px; padding:0 7px; border:0; border-radius:6px; background:var(--live); color:#fff;
  font:700 10.5px/20px var(--font); letter-spacing:0; cursor:pointer; box-shadow:0 4px 12px -6px var(--live); transition:filter .12s, transform .12s; }
.tk-live-btn:hover { filter:brightness(1.1); transform:translateY(-1px); }
.tk-live-btn.on { background:none; color:var(--live); box-shadow:inset 0 0 0 1.5px var(--live); }
.tk-live-btn.warn { background:color-mix(in srgb, var(--live) 55%, #555); }
.tk-live-btn .i { width:11px; height:11px; stroke-width:2.6; }
/* плитка стримера: «LIVE» в углу, кнопка «Смотреть» под именем */
.tk-tile-w { position:relative; display:flex; flex:0 0 172px; min-width:0; }
.tk-tile-w > .tk-tile { flex:1; }
.tk-tile.live { padding-bottom:50px; border-color:color-mix(in srgb, var(--live) 45%, var(--rule)); }
.tk-tile-live { position:absolute; top:8px; left:10px; }
.tk-watch-row { position:absolute; left:8px; right:8px; bottom:12px; display:flex; justify-content:center; align-items:center; gap:6px; pointer-events:none; }
.tk-watch-row > * { pointer-events:auto; }
.tk-watch-fs { display:grid; place-items:center; flex:none; width:30px; height:30px; padding:0; border:1px solid var(--rule); border-radius:50%; background:var(--surface); color:var(--muted); cursor:pointer; transition:color .12s, border-color .12s; }
.tk-watch-fs:hover { color:var(--text); border-color:var(--muted); }
.tk-watch-fs .i { width:15px; height:15px; stroke-width:2.2; }
.tk-watch { display:inline-flex; align-items:center; gap:6px; min-width:0; max-width:100%; min-height:30px; padding:0 13px 0 10px;
  border:0; border-radius:15px; background:var(--secondary); color:#fff; font-size:12.5px; font-weight:500; white-space:nowrap; cursor:pointer; box-shadow:none; transition:filter .12s; }
.tk-watch:hover { filter:brightness(1.1); }
.tk-watch .i { width:13px; height:13px; }
.tk-watch.on { background:var(--soft); color:var(--muted); box-shadow:inset 0 0 0 1px var(--rule); }
.tk-watch.warn { background:color-mix(in srgb, var(--warning) 18%, var(--surface)); color:var(--warning); box-shadow:inset 0 0 0 1px color-mix(in srgb, var(--warning) 50%, transparent); }
.tk-tiles.many .tk-tile-w { flex:auto; }
.tk-tiles.many .tk-tile.live { padding-bottom:42px; }
.tk-tiles.many .tk-watch-row { bottom:8px; }
.tk-tiles.many .tk-watch { min-height:26px; font-size:12px; }
.tk-tiles.many .tk-watch-fs { width:26px; height:26px; }
/* меню человека: «▶ Смотреть стрим» */
.btn.tk-mn-watch { justify-content:flex-start; gap:8px; background:var(--secondary); border:0; color:#fff; }
.btn.tk-mn-watch:hover { background:var(--secondary); filter:brightness(1.08); }
.btn.tk-mn-watch small { margin-left:auto; font-size:11.5px; opacity:.85; font-weight:400; }
.btn.tk-mn-watch.warn { background:color-mix(in srgb, var(--warning) 16%, var(--surface)); color:var(--warning); }

/* окно «Демонстрация экрана» */
.tk-dlg.tk-scr { width:min(580px, calc(100vw - 32px)); }
.tk-scr-sub { margin:0 0 14px; }
.tk-qs { display:grid; grid-template-columns:repeat(4, minmax(0, 1fr)); gap:8px; }
.tk-fs { display:grid; grid-template-columns:repeat(3, minmax(0, 1fr)); gap:8px; }
.tk-cs { display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:8px; }
.tk-q, .tk-cc { position:relative; display:flex; flex-direction:column; gap:1px; min-width:0; padding:9px 12px; border:1px solid var(--rule); border-radius:12px; cursor:pointer;
  transition:border-color .15s, background-color .15s, box-shadow .15s; }
.tk-cc { padding:10px 12px; gap:2px; }
.tk-q:hover, .tk-cc:hover { background:var(--soft); }
.tk-q input, .tk-cc input { position:absolute; width:1px; height:1px; margin:0; padding:0; opacity:0; pointer-events:none; }
.tk-q.on, .tk-cc.on { border-color:transparent; background:color-mix(in srgb, var(--muted) 9%, var(--surface));
  box-shadow:0 0 0 2px var(--muted); }
.tk-q:has(input:focus-visible), .tk-cc:has(input:focus-visible) { outline:2px solid var(--focus); outline-offset:3px; }
.tk-q b { font-size:16px; font-weight:700; letter-spacing:-.01em; white-space:nowrap; }
.tk-q-u { font-size:12px; font-weight:500; letter-spacing:0; }
.tk-q-f { font-size:11.5px; color:var(--muted); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.tk-q.on b { color:var(--muted); }
.tk-cc-h { display:flex; align-items:center; gap:6px; min-width:0; }
.tk-cc-h b { font-size:15px; font-weight:700; }
.tk-rec { margin-left:auto; padding:0 6px; border-radius:6px; background:var(--secondary); color:#fff; font-size:10px; font-weight:700; line-height:16px; letter-spacing:0; white-space:nowrap; }
.tk-cc small { margin-top:3px; font-size:11.5px; line-height:1.35; color:var(--muted); }
.tk-av1-dl { white-space:nowrap; color:inherit; text-decoration:underline; text-underline-offset:2px; }   /* AV1 в браузере до 60 к/с → «Скачать приложение» */
.tk-tag { display:inline-flex; align-items:center; gap:5px; align-self:flex-start; margin-top:3px; padding:1px 8px 1px 7px; border-radius:9px; font-size:11.5px; font-weight:500; white-space:nowrap; background:var(--soft); color:var(--muted); }
.tk-tag i { width:6px; height:6px; border-radius:50%; background:currentColor; }
.tk-tag .tk-wdot { margin:0; }
.tk-tag.hw { color:var(--positive); background:color-mix(in srgb, var(--positive) 14%, transparent); }
.tk-tag.cpu { color:var(--warning); background:color-mix(in srgb, var(--warning) 15%, transparent); }
.tk-tag.bad { color:var(--negative); background:color-mix(in srgb, var(--negative) 13%, transparent); }
.tk-tag.off { color:var(--muted); background:var(--soft); }
.tk-cc.off { cursor:not-allowed; opacity:.5; border-style:dashed; }
.tk-cc.off:hover { background:none; }
.tk-cc.cpu:not(.on) .tk-cc-h b { color:var(--muted); }
#scrCNote { min-height:1.45em; }
.tk-scr-warn { display:flex; gap:8px; align-items:flex-start; padding:8px 10px; border-radius:10px; background:color-mix(in srgb, var(--warning) 11%, transparent); }
.tk-scr-warn .i { width:16px; height:16px; margin-top:1px; }
.tk-tg:disabled { opacity:.45; cursor:not-allowed; }
/* битрейт: «Авто» или ползунок 1…50 Мбит/с */
.tk-rate { gap:8px; }
.tk-rate-h { display:flex; align-items:center; gap:10px; }
.tk-rate-v { margin-left:auto; font-size:13.5px; font-weight:500; font-variant-numeric:tabular-nums; }
.tk-rate-auto { font-size:12.5px; color:var(--muted); }
.tk-rate-in { --p:30%; -webkit-appearance:none; appearance:none; width:100%; height:22px; min-height:0; margin:0; padding:0; border:0; background:none; cursor:pointer; }
.tk-rate-in[hidden] { display:none; }
.tk-rate-in::-webkit-slider-runnable-track { height:6px; border-radius:3px; background:linear-gradient(90deg, var(--text) var(--p), color-mix(in srgb, var(--text) 18%, transparent) 0); }
.tk-rate-in::-moz-range-track { height:6px; border-radius:3px; background:color-mix(in srgb, var(--text) 18%, transparent); }
.tk-rate-in::-moz-range-progress { height:6px; border-radius:3px; background:var(--text); }
.tk-rate-in::-webkit-slider-thumb { -webkit-appearance:none; appearance:none; width:18px; height:18px; margin-top:-6px; border:0; border-radius:50%; background:#fff; box-shadow:0 0 0 1px rgba(0,0,0,.18), 0 2px 6px rgba(0,0,0,.35); }
.tk-rate-in::-moz-range-thumb { width:18px; height:18px; border:0; border-radius:50%; background:#fff; box-shadow:0 0 0 1px rgba(0,0,0,.18), 0 2px 6px rgba(0,0,0,.35); }
.tk-rate-in:focus-visible::-webkit-slider-thumb { box-shadow:0 0 0 2px var(--surface), 0 0 0 4px var(--focus); }
.tk-rate-f { display:flex; justify-content:space-between; gap:12px; margin-top:-4px; font-size:11.5px; color:var(--muted); }
.tk-rate-f[hidden] { display:none; }
.tk-rate-live { padding:7px 10px; border-radius:9px; background:var(--hover); font-variant-numeric:tabular-nums; }
/* оценка отдачи */
.tk-est { display:flex; align-items:center; gap:12px; padding:11px 13px; border-radius:12px; background:var(--hover); border:1px solid var(--rule); }
.tk-est-i { display:grid; place-items:center; width:36px; height:36px; flex:none; border-radius:11px; background:var(--secondary); color:#fff; }
.tk-est-i .i { width:19px; height:19px; stroke-width:2.2; }
.tk-est-t { min-width:0; display:flex; flex-direction:column; gap:2px; line-height:1.35; }
.tk-est-t b { font-size:14px; font-weight:500; font-variant-numeric:tabular-nums; }
.tk-est-n { font-size:12px; font-weight:400; color:var(--positive); }
.tk-est-t small { font-size:12px; color:var(--muted); }
.tk-scr-acts { margin-top:16px; }
.tk-scr-acts .btn.tk-go { gap:8px; }
.tk-scr-acts .btn .i { width:18px; height:18px; }

/* сцена: стрим над чатом */
.tk-scene { display:flex; flex-direction:column; gap:8px; margin:10px 12px 0; }
.tk-scene[hidden] { display:none; }
.tk-sc-tabs { display:flex; gap:6px; overflow-x:auto; scrollbar-width:none; }
.tk-sc-tabs[hidden] { display:none; }
.tk-sc-tab { display:inline-flex; align-items:center; flex:none; border-radius:11px; border:1px solid var(--rule); background:var(--side); transition:border-color .12s, background-color .12s; }
.tk-sc-tab.on { border-color:color-mix(in srgb, var(--live) 50%, var(--rule)); background:color-mix(in srgb, var(--live) 8%, var(--surface)); }
.tk-sc-tb { display:inline-flex; align-items:center; gap:7px; min-height:32px; padding:0 4px 0 8px; border:0; background:none; color:var(--muted); font-size:13px; font-weight:500; cursor:pointer; }
.tk-sc-tab.on .tk-sc-tb { color:var(--text); }
.tk-sc-tb > .i { width:14px; height:14px; color:var(--warning); }
.tk-sc-tb .tk-live-dot { width:7px; height:7px; margin:0 2px; }
.tk-sc-tb .tk-live-dot::after { inset:-3px; border-width:1.5px; }
.tk-sc-x { display:grid; place-items:center; width:26px; height:26px; margin-right:3px; padding:0; border:0; border-radius:8px; background:none; color:var(--muted); cursor:pointer; }
.tk-sc-x:hover { background:var(--soft); color:var(--text); }
.tk-sc-x .i { width:14px; height:14px; }
.tk-sv { position:relative; width:100%; aspect-ratio:16 / 9; min-height:200px; max-height:max(220px, min(66vh, calc(100dvh - var(--barH, 57px) - 330px)));
  border-radius:14px; overflow:hidden; background:#060608; color:#fff; isolation:isolate; user-select:none; }
.tk-sv[hidden] { display:none; }
.tk-sv::before { content:""; position:absolute; inset:0; z-index:-1;
  background:var(--surface); }
.tk-sv[data-st="play"]::before { display:none; }
.tk-sv-v { position:absolute; inset:0; width:100%; height:100%; object-fit:contain; background:#000; }
.tk-sv:not([data-st="play"]) .tk-sv-v { visibility:hidden; }
.tk-sv-ph { position:absolute; inset:0; display:grid; place-items:center; padding:52px 20px 48px; text-align:center; }
.tk-sv[data-st="play"] .tk-sv-ph { display:none; }
.tk-sv-wait, .tk-sv-err { display:flex; flex-direction:column; align-items:center; gap:6px; max-width:440px; }
.tk-sv-wait b, .tk-sv-err b { font-size:15px; font-weight:500; line-height:1.35; text-wrap:balance; }
.tk-sv-wait small, .tk-sv-err small { font-size:12.5px; line-height:1.45; color:rgba(255,255,255,.66); text-wrap:balance; }
.tk-spin.big { width:30px; height:30px; border-width:3px; margin-bottom:8px; }
.tk-sv-ei { display:grid; place-items:center; width:56px; height:56px; margin-bottom:6px; border-radius:18px; color:#F2C14E; background:rgba(242,193,78,.13); box-shadow:inset 0 0 0 1px rgba(242,193,78,.28); }
.tk-sv-ei .i { width:30px; height:30px; stroke-width:1.9; }
.tk-sv-retry { display:inline-flex; align-items:center; gap:7px; min-height:34px; margin-top:10px; padding:0 15px 0 12px; border:0; border-radius:17px; background:rgba(255,255,255,.12); color:#fff; font-size:13px; font-weight:500; cursor:pointer; }
.tk-sv-retry:hover { background:rgba(255,255,255,.2); }
.tk-sv-retry .i { width:16px; height:16px; }
/* поверх видео: имя и качество сверху, LIVE, звук игры и полный экран снизу; прячутся, когда мышь не двигается */
.tk-sv-top, .tk-sv-bot { position:absolute; left:0; right:0; z-index:2; display:flex; align-items:center; gap:8px; transition:opacity .2s; }
.tk-sv-top { top:0; padding:10px 10px 26px 12px; background:linear-gradient(rgba(0,0,0,.62), transparent); }
.tk-sv-bot { bottom:0; padding:26px 10px 10px 12px; background:linear-gradient(transparent, rgba(0,0,0,.62)); }
/* прячется и курсор; фокус мышью (кнопка нажата) не держит панель — только с клавиатуры (:focus-visible) */
.tk-sv[data-st="play"]:not(.act):not(.menu):not(.paused):not(:has(:focus-visible)) .tk-sv-top, .tk-sv[data-st="play"]:not(.act):not(.menu):not(.paused):not(:has(:focus-visible)) .tk-sv-bot { opacity:0; pointer-events:none; }
.tk-sv[data-st="play"]:not(.act):not(.menu):not(.paused):not(:has(:focus-visible)) { cursor:none; }
.tk-sv-b.tk-sv-big { width:40px; height:40px; background:rgba(255,255,255,.16); }
.tk-sv-b.tk-sv-big:hover { background:rgba(255,255,255,.28); }
.tk-sv-b.tk-sv-big .i { width:20px; height:20px; stroke-width:2.3; }
.tk-sv-b.on { background:#fff; color:#111; }
.tk-sv-av { display:inline-flex; flex:none; }
.tk-sv-av .tk-av { box-shadow:0 0 0 2px rgba(0,0,0,.35); }
.tk-sv-t { flex:1; min-width:0; display:flex; flex-direction:column; line-height:1.3; text-shadow:0 1px 2px rgba(0,0,0,.6); }
.tk-sv-t b { font-size:13.5px; font-weight:500; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.tk-sv-t small { font-size:11.5px; color:rgba(255,255,255,.75); font-variant-numeric:tabular-nums; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.tk-sv-sp { flex:1; }
.tk-sv-b { display:grid; place-items:center; flex:none; width:36px; height:36px; padding:0; border:0; border-radius:50%; background:rgba(0,0,0,.42); color:#fff; cursor:pointer; transition:background-color .12s; }
.tk-sv-b:hover { background:rgba(0,0,0,.72); }
.tk-sv-b .i { width:18px; height:18px; stroke-width:2.1; }
.tk-sv :focus-visible { outline:2px solid #fff; outline-offset:2px; }
.tk-sv-aud { display:inline-flex; align-items:center; gap:2px; padding-right:12px; border-radius:18px; background:rgba(0,0,0,.42); }
.tk-sv-aud[hidden] { display:none; }
.tk-sv:not([data-st="play"]) .tk-sv-aud, .tk-sv:not([data-st="play"]) .tk-sv-fs { display:none; }   /* нет видео — нечего слушать и растягивать */
.tk-sv-aud .tk-sv-b { background:none; }
.tk-sv-vol { --p:100%; -webkit-appearance:none; appearance:none; width:92px; height:18px; min-height:0; margin:0; padding:0; border:0; background:none; cursor:pointer; }
.tk-sv-vol::-webkit-slider-runnable-track { height:4px; border-radius:2px; background:linear-gradient(90deg, #fff var(--p), rgba(255,255,255,.3) 0); }
.tk-sv-vol::-moz-range-track { height:4px; border-radius:2px; background:linear-gradient(90deg, #fff var(--p), rgba(255,255,255,.3) 0); }
.tk-sv-vol::-webkit-slider-thumb { -webkit-appearance:none; appearance:none; width:13px; height:13px; margin-top:-4.5px; border:0; border-radius:50%; background:#fff; box-shadow:0 1px 4px rgba(0,0,0,.5); }
.tk-sv-vol::-moz-range-thumb { width:13px; height:13px; border:0; border-radius:50%; background:#fff; }
/* 🔊 громкость: значок + ползунок + % слева в нижней панели; нет звука игры — значок перечёркнут */
.tk-sv-aud.na, .tk-sv-aud.fixed { padding-right:0; }
.tk-sv-aud.na .tk-sv-b { opacity:.7; cursor:help; }
.tk-sv-vol[hidden] { display:none; }
.tk-sv-volb .i { width:20px; height:20px; }
/* «🔊 55 %» на миг по центру (клавиши, колесо) */
.tk-sv-flash { position:absolute; left:50%; top:50%; z-index:3; display:inline-flex; align-items:center; gap:8px; padding:9px 16px 9px 13px; border-radius:22px; transform:translate(-50%, -50%);
  background:rgba(0,0,0,.62); color:#fff; font-size:15px; font-weight:600; font-variant-numeric:tabular-nums; pointer-events:none; }
.tk-sv-flash[hidden] { display:none; }
.tk-sv-flash .i { width:22px; height:22px; }
/* браузер не дал звук без нажатия — большая кнопка по центру */
.tk-sv-tap { position:absolute; left:50%; top:50%; z-index:4; display:inline-flex; align-items:center; gap:9px; min-height:46px; padding:0 22px 0 17px; border:0; border-radius:23px; transform:translate(-50%, -50%);
  background:#fff; color:#111; font-size:15px; font-weight:600; cursor:pointer; box-shadow:0 8px 28px rgba(0,0,0,.45); }
.tk-sv-tap:hover { background:#f1f1f1; }
.tk-sv-tap .i { width:20px; height:20px; }
/* ⋯ меню сцены */
.tk-sv-menu { position:absolute; right:10px; bottom:60px; z-index:5; min-width:230px; padding:6px; border-radius:12px; background:rgba(22,22,26,.94); color:#fff;
  box-shadow:0 10px 30px rgba(0,0,0,.5); }
.tk-sv-menu[hidden] { display:none; }
.tk-sv-mi { display:flex; align-items:center; justify-content:space-between; gap:12px; width:100%; min-height:38px; padding:0 10px; border:0; border-radius:8px; background:none; color:#fff; font-size:13.5px; text-align:left; cursor:pointer; }
.tk-sv-mi:hover, .tk-sv-mi:focus-visible { background:rgba(255,255,255,.1); }
.tk-sv-mi .i { width:16px; height:16px; stroke-width:2.4; color:#7fd8a6; visibility:hidden; }
.tk-sv-mi.on .i { visibility:visible; }
/* 📊 статистика видео (как на Twitch): слева сверху, полупрозрачная, моноширинные цифры */
.tk-vs { position:absolute; top:58px; left:12px; z-index:3; width:max-content; max-width:min(440px, calc(100% - 24px)); max-height:calc(100% - 128px); overflow:auto; overscroll-behavior:contain;
  padding:8px 10px 10px; border-radius:10px; background:rgba(0,0,0,.72); color:#fff; font-size:12px; line-height:1.4; }
.tk-vs[hidden] { display:none; }
.tk-vs-h { display:flex; align-items:center; gap:8px; margin-bottom:6px; }
.tk-vs-h b { flex:1; font-size:12.5px; font-weight:600; }
.tk-vs-b { min-height:24px; padding:0 9px; border:0; border-radius:6px; background:rgba(255,255,255,.14); color:#fff; font-size:11.5px; cursor:pointer; }
.tk-vs-b:hover { background:rgba(255,255,255,.24); }
.tk-vs-x { display:grid; place-items:center; width:24px; height:24px; padding:0; border:0; border-radius:6px; background:none; color:#fff; cursor:pointer; }
.tk-vs-x:hover { background:rgba(255,255,255,.16); }
.tk-vs-x .i { width:14px; height:14px; }
.tk-vs-dl { display:grid; grid-template-columns:auto minmax(0, 1fr); gap:2px 14px; margin:0; }
.tk-vs-dl dt { color:rgba(255,255,255,.62); white-space:nowrap; }
.tk-vs-dl dd { margin:0; font-size:12px; font-variant-numeric:tabular-nums; overflow-wrap:anywhere; }
.tk-sv:fullscreen .tk-vs { top:78px; left:20px; font-size:13px; }
.tk-sv:fullscreen .tk-vs-dl dd { font-size:12.5px; }
.tk-sv-tap[hidden] { display:none; }
/* 🐢 «Лагает» — попросить стримера снизить качество */
/* подпись «Переключил на Олю — у Маши медленный интернет»: 5 с, видна и когда кнопки спрятаны */
.tk-sv-note { position:absolute; top:58px; left:50%; z-index:3; max-width:calc(100% - 24px); transform:translateX(-50%); padding:5px 12px; border-radius:14px;
  background:rgba(0,0,0,.62); color:#fff; font-size:12px; line-height:1.35; text-align:center; text-wrap:balance; pointer-events:none; }
.tk-sv-note[hidden] { display:none; }
/* сенсорный экран: маленькая полупрозрачная ⛶ в углу, пока панель спрятана (панель видна — на её месте обычная ⛶) */
.tk-sv-fsm { display:none; }
@media (hover: none) {
  .tk-sv { touch-action:manipulation; -webkit-tap-highlight-color:transparent; }
  .tk-sv[data-st="play"]:not(.act):not(.menu):not(.paused):not(:has(:focus-visible)) .tk-sv-fsm { position:absolute; right:6px; bottom:6px; z-index:3; display:grid; place-items:center; width:48px; height:48px; padding:0; border:0;
    background:none; color:#fff; opacity:.92; cursor:pointer; touch-action:manipulation; }
  .tk-sv-fsm .i { width:23px; height:23px; stroke-width:2.2; filter:drop-shadow(0 1px 2px rgba(0,0,0,.7)) drop-shadow(0 0 6px rgba(0,0,0,.35)); }
}

/* полный экран: видео на весь экран, без скруглений */
.tk-sv:fullscreen { width:100vw; height:100dvh; max-height:none; aspect-ratio:auto; border-radius:0; }
.tk-sv:fullscreen .tk-sv-top { padding:16px 18px 40px 20px; }
.tk-sv:fullscreen .tk-sv-bot { padding:40px 18px 16px 20px; }
.tk-sv:fullscreen .tk-sv-t b { font-size:15px; }

/* 📶 «Видео» в статистике */
.tk-vcard .tk-pr-h .tk-via { margin-left:auto; }
.tk-vcard .tk-pr-h b { flex:0 1 auto; }
.tk-vcard .tk-pr-h .tk-live-b { height:17px; font-size:10px; }
.tk-vf { display:grid; grid-template-columns:auto minmax(0, 1fr); gap:3px 12px; margin:8px 0 0; padding-left:28px; font-size:12px; }
.tk-vf dt { color:var(--muted); }
.tk-vf dd { margin:0; text-align:right; font-variant-numeric:tabular-nums; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.tk-vf dd.ok { color:var(--positive); } .tk-vf dd.warn { color:var(--warning); } .tk-vf dd.bad { color:var(--negative); }
.tk-via.wait { color:var(--muted); }

/* телефон: стримить нельзя (кнопки нет), смотреть — сцена во всю ширину */
@media (max-width: 760px) {
  #scrBtn, .tk-live { display:none; }
  .tk-scene { margin:8px 8px 0; }
  .tk-sv { min-height:0; max-height:46dvh; border-radius:12px; }
  .tk-sv-b { width:40px; height:40px; }
  .tk-sv-vol { width:72px; }
  .tk-vs { top:50px; left:6px; right:6px; width:auto; max-width:none; max-height:calc(100% - 104px); padding:6px 8px 8px; font-size:11px; }
  .tk-vs-dl { gap:1px 10px; }
  .tk-vs-dl dt { white-space:normal; }
  .tk-vs-dl dd { font-size:10.5px; }
  .tk-sv-menu { right:6px; bottom:56px; min-width:0; }
  .tk-sv-ph { padding:44px 14px 44px; }
  .tk-sv-wait b, .tk-sv-err b { font-size:14px; }
  .tk-sv-err small { font-size:12px; }
  .tk-sv-ei { width:44px; height:44px; border-radius:14px; margin-bottom:2px; }
  .tk-sv-ei .i { width:24px; height:24px; }
  .tk-tile-w { flex:none; width:104px; }
  .tk-tile.live { padding-bottom:42px; }
  .tk-tile-live { top:5px; left:6px; height:16px; font-size:9.5px; padding:0 4px; }
  .tk-watch-row { bottom:8px; left:4px; right:4px; }
  .tk-watch-fs { display:none; }
  .tk-watch { min-height:28px; padding:0 10px 0 8px; font-size:12px; }
  .tk-live-btn { height:24px; padding:0 8px; }
  .tk-sv-note { top:52px; font-size:11.5px; }
}
@media (max-width: 560px) {
  .tk-qs { grid-template-columns:repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 440px) { .tk-cs { grid-template-columns:1fr; } }
@media (prefers-reduced-motion: reduce) {
  .tk-live-dot::after { animation:none; }
  .tk-sv-top, .tk-sv-bot, .tk-live-btn { transition:none; }
  .tk-live .tk-ib.lag.lag-p { animation:none; }
}

/* AV1 на видеокарте выключен Chrome на Windows: подсказка под кодеками и окно «Как включить» */
.tk-av1h { display:flex; align-items:center; gap:8px; padding:8px 8px 8px 10px; border-radius:10px; font-size:12.5px; line-height:1.4; color:var(--warning);
  background:color-mix(in srgb, var(--warning) 11%, transparent); }
.tk-av1h[hidden] { display:none; }
.tk-av1h > .i { flex:none; width:16px; height:16px; }
.tk-av1h > span { flex:1; min-width:0; }
.tk-av1h-b { flex:none; min-height:30px; padding:0 12px; border:0; border-radius:8px; background:var(--surface); color:var(--text); font-size:12.5px; font-weight:500; cursor:pointer;
  box-shadow:inset 0 0 0 1px color-mix(in srgb, var(--warning) 50%, transparent); }
.tk-av1h-b:hover { box-shadow:inset 0 0 0 1px var(--warning); }
.tk-av1d { width:min(500px, calc(100vw - 32px)); }
.tk-av1d > .tk-small { margin:4px 0 0; color:var(--muted); line-height:1.5; }
.tk-av1-steps { margin:14px 0 18px; padding-left:22px; display:flex; flex-direction:column; gap:12px; font-size:14px; line-height:1.5; }
.tk-av1-steps li::marker { color:var(--muted); font-weight:600; }
.tk-av1-steps b { font-weight:600; }
.tk-av1-steps small { display:block; margin-top:4px; font-size:12px; color:var(--muted); word-break:break-all; }
.tk-av1-code { display:flex; align-items:center; gap:8px; margin-top:7px; padding:5px 5px 5px 10px; border-radius:9px; background:var(--soft); }
.tk-av1-code code { flex:1; min-width:0; font:500 12.5px/1.4 ui-monospace, Consolas, monospace; overflow-wrap:anywhere; }
.tk-av1-copy { flex:none; min-height:30px; padding:0 12px; font-size:12.5px; }
@media (max-width: 520px) { .tk-av1h { flex-wrap:wrap; } .tk-av1h-b { margin-left:24px; } }
.tk-av1-steps small code { font:12px/1.4 ui-monospace, Consolas, monospace; }
.tk-nowrap { white-space:nowrap; }

/* нижняя панель сцены — как на Twitch/YouTube: белые значки без подложек, с мягкой тенью; громкость — значок + тонкая полоса */
.tk-sv-bot .tk-sv-b, .tk-sv-bot .tk-sv-b.tk-sv-big { width:40px; height:40px; border-radius:8px; background:none; color:#fff; }
.tk-sv-bot .tk-sv-b:hover, .tk-sv-bot .tk-sv-b.tk-sv-big:hover, .tk-sv-bot .tk-sv-b.on { background:none; }
.tk-sv-bot .tk-sv-b .i, .tk-sv-bot .tk-sv-b.tk-sv-big .i { width:22px; height:22px; stroke-width:2.1; filter:drop-shadow(0 1px 2px rgba(0,0,0,.65)); transition:transform .12s; }
.tk-sv-bot .tk-sv-b:hover .i { transform:scale(1.12); }
.tk-sv-bot .tk-sv-b.on { color:#9fd0ff; }
.tk-sv-bot .tk-sv-set[aria-expanded="true"] .i { transform:rotate(30deg); }
.tk-sv-aud { gap:2px; padding:0; border-radius:0; background:none; }
.tk-sv-vol { width:104px; height:24px; margin-right:4px; }
.tk-sv-vol::-webkit-slider-runnable-track { height:4px; border-radius:2px; background:linear-gradient(90deg, #fff var(--p), rgba(255,255,255,.3) 0); box-shadow:0 1px 2px rgba(0,0,0,.35); }
.tk-sv-vol::-moz-range-track { height:4px; border-radius:2px; background:rgba(255,255,255,.3); box-shadow:0 1px 2px rgba(0,0,0,.35); }
.tk-sv-vol::-moz-range-progress { height:4px; border-radius:2px; background:#fff; }
.tk-sv-vol::-webkit-slider-thumb { width:13px; height:13px; margin-top:-4.5px; background:#fff; box-shadow:0 1px 3px rgba(0,0,0,.55); transition:transform .12s; }
.tk-sv-vol::-moz-range-thumb { width:13px; height:13px; background:#fff; box-shadow:0 1px 3px rgba(0,0,0,.55); transition:transform .12s; }
.tk-sv-vol:hover::-webkit-slider-thumb, .tk-sv-vol:active::-webkit-slider-thumb, .tk-sv-vol:focus-visible::-webkit-slider-thumb { transform:scale(1.2); }
.tk-sv-vol:hover::-moz-range-thumb, .tk-sv-vol:active::-moz-range-thumb { transform:scale(1.2); }
.tk-sv-vol:focus-visible { outline:none; }
.tk-sv-vol:focus-visible::-webkit-slider-runnable-track { box-shadow:0 0 0 2px rgba(255,255,255,.55); }
@media (max-width: 760px) {
  .tk-sv-bot { gap:4px; }
  .tk-sv-bot .tk-sv-b, .tk-sv-bot .tk-sv-b.tk-sv-big { width:44px; height:44px; }
  .tk-sv-vol { width:76px; height:44px; }
}
@media (prefers-reduced-motion: reduce) { .tk-sv-bot .tk-sv-b .i, .tk-sv-vol::-webkit-slider-thumb { transition:none; } }

/* кодеки: пока идёт проверка видеокарты — лёгкий скелетон */
.tk-cc.sk { cursor:progress; animation:tk-sk 1.2s ease-in-out infinite alternate; }
.tk-cc.sk small { visibility:hidden; }
@keyframes tk-sk { from { opacity:.55; } to { opacity:.9; } }
@media (prefers-reduced-motion: reduce) { .tk-cc.sk { animation:none; opacity:.7; } }

/* ▶/❚❚: в панели — белый значок; большая круглая ▶ по центру, когда видео стоит */
.tk-sv-bot .tk-sv-play .i { width:21px; height:21px; }
.tk-sv-bot .tk-sv-play[hidden] { display:none; }
.tk-sv-bigplay { position:absolute; left:50%; top:50%; z-index:4; display:grid; place-items:center; width:76px; height:76px; padding:0; border:0; border-radius:50%; transform:translate(-50%, -50%);
  background:rgba(0,0,0,.55); color:#fff; cursor:pointer; box-shadow:0 6px 26px rgba(0,0,0,.45); touch-action:manipulation; transition:background-color .12s, transform .12s; }
.tk-sv-bigplay:hover { background:rgba(0,0,0,.72); transform:translate(-50%, -50%) scale(1.05); }
.tk-sv-bigplay[hidden] { display:none; }
.tk-sv-bigplay .i { width:34px; height:34px; margin-left:4px; fill:currentColor; stroke-width:1.6; }
/* пункт меню с подписью: «🐢 Попросить снизить качество» / «можно через N с» */
.tk-sv-mi[hidden] { display:none; }
.tk-sv-mit { display:flex; flex-direction:column; gap:1px; min-width:0; padding:5px 0; }
.tk-sv-mis { font-size:11.5px; color:rgba(255,255,255,.6); }
.tk-sv-mi:disabled { cursor:default; opacity:.6; }
.tk-sv-mi:disabled:hover { background:none; }
@media (max-width: 760px) { .tk-sv-bigplay { width:64px; height:64px; } .tk-sv-bigplay .i { width:28px; height:28px; } }
@media (prefers-reduced-motion: reduce) { .tk-sv-bigplay { transition:none; } }

/* ⏱ буфер в меню ⚙: заголовок раздела и радиопункты */
.tk-sv-mh { display:flex; flex-direction:column; gap:2px; margin:6px 4px 2px; padding:8px 6px 4px; border-top:1px solid rgba(255,255,255,.12); font-size:12.5px; font-weight:600; }
.tk-sv-mh small { font-size:11px; font-weight:400; line-height:1.35; color:rgba(255,255,255,.6); max-width:250px; }
.tk-sv-mr { min-height:34px; }
.tk-sv-mr b { font-weight:500; }
.tk-sv-menu { max-height:calc(100% - 70px); overflow-y:auto; overscroll-behavior:contain; }

/* 👁 глазик (как в Discord): смотреть / перестать смотреть; «👁 3» — сколько смотрят */
.tk-live-g { display:inline-flex; align-items:center; gap:2px; flex:none; margin-right:4px; }
.tk-live-g .tk-live-btn { margin-right:0; }
.tk-eye { display:grid; place-items:center; flex:none; width:24px; height:24px; padding:0; border:0; border-radius:6px; background:none; color:var(--muted); cursor:pointer; transition:color .12s, background-color .12s; }
.tk-eye:hover { color:var(--text); background:var(--soft); }
.tk-eye.on { color:var(--live); }
.tk-eye .i { width:16px; height:16px; stroke-width:2; }
.tk-eye.tk-eye-t { width:30px; height:30px; border:1px solid var(--rule); border-radius:50%; background:var(--surface); }
.tk-eye.tk-eye-t.on { border-color:color-mix(in srgb, var(--live) 55%, var(--rule)); background:color-mix(in srgb, var(--live) 12%, var(--surface)); }
.tk-tiles.many .tk-eye.tk-eye-t { width:26px; height:26px; }
.tk-vw { display:inline-flex; align-items:center; gap:2px; flex:none; font-size:11px; font-weight:600; font-variant-numeric:tabular-nums; color:var(--muted); }
.tk-vw .i { width:13px; height:13px; stroke-width:2.2; }
.tk-tile-live { display:inline-flex; align-items:center; gap:5px; }
.tk-vw.tk-vw-t { height:18px; padding:0 6px 0 5px; border-radius:5px; background:rgba(0,0,0,.55); color:#fff; }
.tk-mn-watch.on { color:var(--live); }
/* сцена: несколько стримов сразу — сетка; развёрнутый крупно, остальные превью сбоку */
.tk-sc-box.multi { display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:8px; }
.tk-sc-box.multi .tk-sv { min-height:0; max-height:none; border-radius:12px; }
.tk-sc-box.multi .tk-sv.main { box-shadow:0 0 0 2px color-mix(in srgb, var(--live) 55%, transparent); }
.tk-sc-box.multi .tk-sv-vol { width:72px; }
.tk-sc-box.multi .tk-sv-bot { gap:2px; padding:22px 6px 6px 8px; }
.tk-sc-box.multi .tk-sv-top { padding:8px 8px 22px 10px; }
.tk-sc-box.focus { grid-template-columns:minmax(0, 1fr) minmax(150px, 26%); grid-auto-rows:min-content; align-items:start; }
.tk-sc-box.focus .tk-sv.big { grid-column:1; grid-row:1 / span 3; box-shadow:none; }
.tk-sc-box.focus .tk-sv.mini { grid-column:2; cursor:pointer; }
.tk-sv.mini .tk-sv-bot > :not(.tk-sv-volb):not(.tk-sv-aud):not(.tk-sv-play), .tk-sv.mini .tk-sv-vol, .tk-sv.mini .tk-vs, .tk-sv.mini .tk-sv-t small, .tk-sv.mini .tk-sv-av, .tk-sv.mini .tk-sv-note { display:none; }
.tk-sv.mini .tk-sv-t b { font-size:12px; }
.tk-sv.mini .tk-sv-bigplay { width:44px; height:44px; }
.tk-sv.mini .tk-sv-bigplay .i { width:20px; height:20px; }
.tk-sv-foc[hidden] { display:none; }
.tk-sv-top .tk-sv-b.tk-sv-foc { margin-left:auto; }
.tk-sv-top .tk-sv-foc + .tk-sv-b { margin-left:0; }
@media (max-width: 760px) {
  .tk-sc-box.multi { display:flex; flex-direction:column; gap:8px; }
  .tk-sc-box.multi .tk-sv { max-height:40dvh; }
  .tk-sv-foc { display:none; }
}

/* «бета» — приглушённо, как BETA в Discord; у кодека — в строке с названием */
.tk-beta { cursor:help; color:color-mix(in srgb, var(--muted) 75%, var(--muted)); background:color-mix(in srgb, var(--muted) 11%, transparent); text-transform:lowercase; }
.tk-cc-h .tk-beta { margin-left:auto; }
.tk-cc-h .tk-rec + .tk-beta { margin-left:0; }

/* 🎮 что показываем: окно игры / весь экран */
.tk-qs.tk-srfs { grid-template-columns:repeat(2, minmax(0, 1fr)); }
.tk-q.tk-srf.dis { opacity:.55; cursor:not-allowed; }
#scrSTip { margin:2px 0 0; }
/* плашка поверх страницы, пока открыт выбор браузера («Шаг 1 из 2…») */
.tk-pick { position:fixed; top:14px; left:50%; z-index:2147483000; transform:translateX(-50%); display:flex; flex-direction:column; gap:2px; max-width:min(560px, calc(100vw - 24px)); padding:12px 18px;
  border-radius:14px; background:var(--secondary); color:#fff; box-shadow:0 12px 34px rgba(0,0,0,.4); text-align:center; }
.tk-pick[hidden] { display:none; }
.tk-pick b { font-size:15px; font-weight:700; line-height:1.35; }
.tk-pick small { font-size:12.5px; opacity:.9; }
.tk-live-noaud { flex-direction:row; align-items:center; justify-content:space-between; }
.tk-live-noaud .tk-live-act { align-self:auto; flex:none; }

/* 🧱 без прыжков: окно стрима — постоянная ширина и высота, полоса прокрутки не сдвигает раскладку, кнопки внизу на месте */
.tk-dlg.tk-scr { width:min(640px, calc(100vw - 32px)); height:min(1400px, calc(100dvh - 32px)); max-height:none; padding:20px 12px 0 22px;
  overflow-y:auto; overscroll-behavior:contain; scrollbar-gutter:stable; scrollbar-width:thin; scroll-padding-bottom:96px; }
.tk-dlg.tk-scr[open] { display:flex; flex-direction:column; }
.tk-dlg.tk-scr > * { flex:none; }
.tk-scr-acts { position:sticky; bottom:0; z-index:2; margin-top:auto; padding:12px 0 18px; background:var(--surface); box-shadow:0 -1px 0 var(--rule); }
.tk-dlg.tk-scr .tk-set { padding-bottom:16px; }
/* «Что показываем»: совет (окно игры) и предупреждение (весь экран) — в одной клетке, место под бо́льшее */
#scrDlg section[aria-labelledby="scrSL"]:not([hidden]) { display:grid; grid-template-columns:minmax(0, 1fr); row-gap:12px; }
#scrDlg #scrSHint, #scrDlg #scrSTip { grid-row:3; grid-column:1; align-self:start; }
#scrDlg #scrSHint[hidden] { display:flex !important; visibility:hidden; }
#scrDlg #scrSTip[hidden] { display:block !important; visibility:hidden; }
/* битрейт: ползунок всегда на месте; «Авто» — бледный */
.tk-rate-in.auto, .tk-rate-f.auto { opacity:.4; }
.tk-rate-in.auto:hover, .tk-rate-in.auto:focus-visible { opacity:.7; }
/* 🎮 строка «Бережно … включено» — поверх пояснения, а не под ним */
#scrDlg .tk-gentlerow .tk-swr-t { display:grid; grid-template-columns:minmax(0, 1fr); row-gap:2px; }
#scrDlg #scrGentleD, #scrDlg #scrGentleN { grid-row:2; grid-column:1; }
#scrDlg #scrGentleN { justify-self:start; }
#scrDlg .tk-gentlerow .tk-swr-t:has(#scrGentleN:not([hidden])) #scrGentleD { visibility:hidden; }
/* спрятано, но место держит */
.tk-ghost { visibility:hidden; }
@media (max-width: 760px) {
  .tk-dlg.tk-scr { width:calc(100vw - 16px); height:calc(100dvh - 16px); padding:16px 8px 0 14px; }
  .tk-scr-acts { padding-bottom:14px; }
}
/* 🧱 без прыжков: ⚙ Настройки — полоса прокрутки не сужает содержимое, окно не перецентрируется по высоте,
   переключатель стоит у заголовка строки (меняется пояснение — сам не уезжает) */
#setDlg { scrollbar-gutter:stable; }
#setDlg[open] { margin:max(16px, calc((100dvh - 1600px) / 2)) auto auto; }
#setDlg .tk-swr:has(> .tk-tg) { align-items:flex-start; }
#setDlg .tk-swr > .tk-tg { margin-top:-2px; }
/* 📶 Статистика соединения: появилась полоса — строки не переносятся заново */
.tk-stats .tk-scroll { scrollbar-gutter:stable; }
/* 💻 тексты приложения: кнопка в тосте («Открыть настройки Windows») — тост светлый на тёмном, кнопка — контурная в цвет текста тоста */
.toast .tk-toast-b { display:block; margin:8px auto 0; padding:5px 14px; border-radius:16px; border:1px solid currentColor; background:transparent; color:inherit; font:inherit; font-weight:600; cursor:pointer; }
.toast .tk-toast-b:hover { background:color-mix(in srgb, currentColor 12%, transparent); }
.toast .tk-toast-b:focus-visible { outline:2px solid currentColor; outline-offset:2px; }
/* 🦊 ⚙ Профиль → «Аватарка»: крупный кружок (эмодзи Apple на своём цвете, EMOJI.md) и две кнопки; размер постоянный — без прыжков */
.tk-avset { display:flex; align-items:center; gap:16px; min-height:72px; }
.tk-avset > .tk-av { width:72px; height:72px; font-size:30px; }
.tk-avset-b { display:flex; flex-wrap:wrap; gap:8px; min-width:0; }
.tk-avdice { display:inline-block; }
.tk-avdice.roll { animation:tk-avdice .4s ease; }
@keyframes tk-avdice { from { transform:rotate(0); } to { transform:rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .tk-avdice.roll { animation:none; } }
