/* Студия в системе сайта (18.10, решение заказчика): тёмная сталь, как у
   sonviz.com и кабинета. Вся краска — в кадре, интерфейс вокруг него
   серебристо-стальной и не тянет внимание на себя. Цвет остаётся только там,
   где он что-то значит:
     --accent  серебро — главное действие и выбранное (кнопка, вкладка, уровень);
     --accent2 песочный — время: ключи и автоматизация, всегда им и только им;
     --err     красный — эфир и ошибки;  --ok зелёный — «работает».
   Скругления малые (заказчик: меньше, чем на сайте; у холста — ни одного):
   студия — рабочий инструмент, плотная сетка читается лучше «таблеток».
   Цвета и линии совпадают с cloud/public/assets/landing.css — менять вместе. */
@font-face { font-family: "Commissioner"; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url(fonts/commissioner-latin-full-normal.woff2) format("woff2-variations");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Commissioner"; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url(fonts/commissioner-latin-ext-full-normal.woff2) format("woff2-variations");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Commissioner"; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url(fonts/commissioner-cyrillic-full-normal.woff2) format("woff2-variations");
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family: "Commissioner"; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url(fonts/commissioner-cyrillic-ext-full-normal.woff2) format("woff2-variations");
  unicode-range: U+0460-052F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F; }
:root {
  --bg: #050607;
  --bg2: #0a0c0f;
  --panel: #0a0c0f;
  --panel2: #11141a;
  --hover: #151920;
  --field: #07080a;
  --line: rgba(176, 199, 217, .145);    /* стальные линии — как у сайта */
  --line2: rgba(176, 199, 217, .26);
  --text: #e9edf1;
  --fg: #e9edf1;
  --dim: #a1a6ac;
  --dim2: #6b727b;
  --accent: #d9e0e7;
  --accent-ink: #0a0c0f;               /* текст на серебре */
  --silver: linear-gradient(180deg, #ffffff 0%, #e3e8ee 42%, #9ea8b4 100%);
  --silver-btn: linear-gradient(180deg, #f6f8fa 0%, #cdd4dc 100%);
  --tint: rgba(176, 199, 217, .07);    /* подложка выбранного */
  --accent2: #e5c58f;
  --accent2-dim: #7d6c4f;              /* «здесь есть ключи», но не под курсором */
  --ok: #9fe0bc;
  --warn: #e5c58f;
  --err: #ff6f61;
  --r: 4px;                            /* кнопки, поля */
  --r2: 6px;                           /* карточки, окна */
  --mono: 'IBM Plex Mono', ui-monospace, "Cascadia Mono", Consolas, monospace;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 400 13.5px/1.45 "Commissioner", system-ui, "Segoe UI", Roboto, sans-serif;
  font-variation-settings: "VOLM" 0;
  -webkit-font-smoothing: antialiased;
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
}
::selection { background: rgba(176, 199, 217, .35); color: #fff; }

header {
  display: flex; align-items: center; gap: 12px;
  padding: 8px 14px; border-bottom: 1px solid var(--line);
  background: var(--bg);
}
header h1 { margin: 0; line-height: 0; flex: none; }
/* Логотип — полная надпись «огибающая», цвет текста. На сайте ведёт в кабинет
   (адрес ставит studio/brand.js), на своей машине — просто знак. */
header .brand { display: inline-flex; align-items: center; color: var(--text); padding: 2px 0; }
header .brand svg { height: 18px; width: auto; display: block; }
header a.brand:hover { color: #fff; }
header .spacer { flex: 1; }
/* Отмена и повтор (js/studio/history.js) — два значка сразу за логотипом, как
   в редакторах. Погашенные — когда отменять или возвращать нечего. */
header .hist { display: inline-flex; gap: 2px; flex: none; }
header .hist-btn { width: 28px; height: 26px; padding: 0; display: inline-flex; align-items: center;
  justify-content: center; color: var(--dim); background: none; border-color: transparent; }
header .hist-btn svg { width: 16px; height: 16px; display: block; }
header .hist-btn:hover:not(:disabled) { color: var(--text); border-color: var(--line2); background: var(--hover); }
header .hist-btn:disabled { opacity: .35; cursor: default; }
/* Переключатель языка — по ширине названия, а не на всю шапку (общее правило select растягивает его на 100%). */

/* ---- шапка (21.10, js/studio/header.js) ----
   Один индикатор «Звук · OBS · к/с» вместо четырёх плашек; подробности по
   щелчку. Цвет точки: зелёный — работает, песочный — ждёт, красный — беда. */
header .hud-wrap { position: relative; flex: none; }
header .hud {
  display: inline-flex; align-items: center; gap: 0; height: 28px; padding: 0 4px;
  background: none; border: 1px solid var(--line); color: var(--dim); font-size: 12px;
}
header .hud:hover, header .hud[aria-expanded="true"] { border-color: var(--line2); background: var(--hover); color: var(--text); }
header .hud .seg { display: inline-flex; align-items: center; gap: 6px; padding: 0 7px; white-space: nowrap; }
header .hud .seg + .seg { border-left: 1px solid var(--line); }
header .hud .seg[hidden] { display: none; }
header .hud .dot { width: 7px; height: 7px; border-radius: 50%; background: #3a4048; flex: none; }
header .hud .seg.ok .dot { background: var(--ok); box-shadow: 0 0 6px rgba(159, 224, 188, .5); }
header .hud .seg.warn .dot { background: var(--warn); }
header .hud .seg.err .dot { background: var(--err); }
header .hud #hudFps { font-variant-numeric: tabular-nums; }
header .hud #hudFps.warn { color: var(--warn); }
header .hud #hudFps.err { color: var(--err); }
.hud-pop, .menu-pop {
  position: absolute; top: calc(100% + 6px); z-index: 60; min-width: 230px;
  background: var(--panel2); border: 1px solid var(--line2); border-radius: var(--r2);
  box-shadow: 0 16px 40px rgba(0, 0, 0, .6); padding: 8px; display: flex; flex-direction: column; gap: 6px;
}
.hud-pop { left: 0; }
.hud-pop[hidden], .menu-pop[hidden] { display: none; }
.hud-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 12px; color: var(--dim2); }
.hud-src { font-size: 11px; color: var(--dim); border-top: 1px solid var(--line); padding-top: 6px; max-width: 280px; }
.hud-src[hidden] { display: none; }
header .meter-hdr { flex: none; width: 64px; min-width: 0; }
header #btnStart[hidden], header #btnStop[hidden], header #btnRender[hidden] { display: none; }
/* Серебро в шапке одно — «Запустить звук»; «Рендер» — обводкой, чтобы два
   главных действия не спорили. */
header .render-btn { flex: none; height: 30px; padding: 0 12px; font-size: 13px; font-weight: 600;
  background: transparent; color: var(--text); border-color: var(--line2); }
header .render-btn:hover { background: var(--hover); border-color: var(--accent); }
header .render-btn.busy { background: var(--panel2); color: var(--accent2); border-color: var(--accent2-dim); font-variant-numeric: tabular-nums; }
header .hdr-menu { position: relative; flex: none; }
header .menu-btn { width: 32px; height: 28px; padding: 0; font-size: 16px; line-height: 1; color: var(--dim); background: none; }
header .menu-btn:hover, header .menu-btn[aria-expanded="true"] { color: var(--text); background: var(--hover); }
.menu-pop { right: 0; min-width: 250px; }
.menu-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 13px; color: var(--dim); padding: 2px 4px; }
.menu-pop select.lang { width: auto; padding: 4px 8px; font-size: 13px; }
.menu-item {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%;
  background: none; border: 0; padding: 7px 6px; text-align: left; color: var(--text); font-size: 13px;
}
.menu-item:hover { background: var(--hover); }
kbd {
  font: 11px/1 var(--mono); color: var(--dim); background: var(--field);
  border: 1px solid var(--line2); border-bottom-width: 2px; border-radius: 3px; padding: 2px 5px;
}

.badge {
  font-size: 12px; color: var(--dim); border: 1px solid var(--line);
  border-radius: var(--r); padding: 3px 8px; white-space: nowrap;
}
.badge.on { color: var(--ok); border-color: rgba(159, 224, 188, .35); }
.badge.err { color: var(--err); border-color: rgba(255, 111, 97, .4); }
.badge.warn { color: var(--warn); border-color: rgba(229, 197, 143, .4); }
/* «Речь: …» — кнопка, но выглядит как соседние значки; клик открывает раздел речи. */
header .sp-badge { background: none; cursor: pointer; font: inherit; font-size: 12px; }
header .sp-badge:hover { border-color: var(--line2); color: var(--text); }
header .sp-badge[hidden] { display: none; }
section.group.flash > h2 { color: #fff; transition: color .3s; }

main { display: grid; grid-template-columns: 1fr 40px 340px; min-height: 0; }

/* ---- сцена ---- */
.stage-wrap {
  min-width: 0; min-height: 0; padding: 0;
  display: flex; flex-direction: column;
}
/* Кадру отдано всё, что остаётся от полос; таймлиния берёт свою долю снизу.
   Доли, а не пиксели: на ноутбуке 900 px по высоте таймлиния в 320 px
   съедала бы половину кадра. */
.stage-box {
  flex: 1 1 58%; min-height: 160px; padding: 14px;
  display: flex; align-items: center; justify-content: center; background: var(--bg);
}
#stage {
  /* Холст без скругления (заказчик, 18.10): кадр — это кадр ролика, его углы
     прямые, и скругление обманывало бы о том, что попадёт в файл. */
  position: relative; overflow: hidden; border-radius: 0;
  outline: 1px solid var(--line);
  box-shadow: 0 24px 70px rgba(0, 0, 0, .7);
  background-image:
    linear-gradient(45deg, #15181d 25%, transparent 25%),
    linear-gradient(-45deg, #15181d 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #15181d 75%),
    linear-gradient(-45deg, transparent 75%, #15181d 75%);
  background-size: 22px 22px;
  background-position: 0 0, 0 11px, 11px -11px, -11px 0;
  background-color: #0c0e11;
}
#stage.plain { background-image: none; }
.we-canvas { position: absolute; inset: 0; display: block; }

.stage-bar {
  display: flex; align-items: center; gap: 10px; height: 30px; flex-shrink: 0;
  padding: 0 14px; background: var(--panel); border-top: 1px solid var(--line);
  font-size: 11px; color: var(--dim2); white-space: nowrap;
}
.meter { flex: 1; min-width: 120px; height: 4px; background: var(--panel2); border-radius: 2px; overflow: hidden; }
.meter i { display: block; height: 100%; width: 0%; background: linear-gradient(90deg, #6b727b, #e9edf1); transition: width .06s linear; }

/* ---- вкладки панели: узкая полоса значков, как в Blender (17.10, studio/rail.js) ----
   Не прокручивается вместе с панелью: за вкладкой не надо листать наверх.
   18.10 (заказчик: громоздко): только значки, 40 px вместо 66 — ширина уходит
   кадру. Название вкладки — во всплывающей подсказке и для экранного диктора;
   вкладок три, и их узнают по значку после первого щелчка. Выбранная — белый
   значок и серебряная черта у края, обращённого к панели: «вот что открыто». */
#ptabs {
  display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 0;
  border-left: 1px solid var(--line); background: var(--bg); min-height: 0; overflow: hidden;
}
#ptabs .rail-tab {
  position: relative; width: 32px; height: 32px; display: grid; place-items: center;
  padding: 0; border: 0; border-radius: var(--r); background: transparent; color: var(--dim);
}
#ptabs .rail-tab svg { width: 18px; height: 18px; }
#ptabs .rail-tab:hover { background: var(--hover); color: var(--text); border: 0; }
#ptabs .rail-tab.active { background: rgba(176, 199, 217, .12); color: #fff; }
#ptabs .rail-tab.active::before {
  content: ""; position: absolute; right: -4px; top: 7px; bottom: 7px; width: 2px;
  background: var(--silver);
}
/* Подпись не видна, но остаётся в разметке: её читает диктор и проверки. */
#ptabs .rail-name {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}
#ptabs .rail-badge {
  position: absolute; top: 0; right: -1px; min-width: 13px; height: 13px; padding: 0 3px;
  font: 9px/13px var(--mono); text-align: center; border-radius: 7px;
  background: var(--panel2); color: var(--dim); box-shadow: 0 0 0 2px var(--bg);
}
#ptabs .rail-tab.active .rail-badge { background: var(--silver-btn); color: var(--accent-ink); }
#ptabs .rail-gap { flex: 1; }
#ptabs .rail-fold {
  width: 32px; height: 28px; padding: 0; border: 0; border-radius: var(--r);
  background: transparent; color: var(--dim2); display: grid; place-items: center;
}
#ptabs .rail-fold svg { width: 16px; height: 16px; }
#ptabs .rail-fold:hover { color: var(--text); background: var(--hover); border: 0; }
#ptabs .rail-fold.folded svg { transform: rotate(180deg); }

/* «Сцена» и «Слои» (17.10, studio/stack.js): разделитель базы и метка «своё». */
.base-divider { padding: 14px 16px 10px; border-bottom: 1px solid var(--line); background: var(--tint); }
.base-divider .base-title { font-size: 13px; font-weight: 600; color: var(--text); }
.base-divider .base-hint { margin-top: 4px; font-size: 11.5px; line-height: 1.4; color: var(--dim); }
.own-chip {
  margin-left: 8px; padding: 1px 6px; border-radius: var(--r); border: 1px solid var(--line2);
  background: var(--tint); color: var(--text); font-size: 10.5px; line-height: 1.5; cursor: pointer;
}
.own-chip:hover { background: var(--hover); border-color: var(--accent); }

/* ---- панель ---- */
aside {
  border-left: 1px solid var(--line);
  background: var(--panel);
  overflow-y: auto; padding: 4px 0 40px;
}
/* Полосы прокрутки — одни на всю студию (21.10, заказчик: «скролл дорожек как
   в панели»): панель, дорожки таймлинии, окна мастера и меню. Без стрелок по
   краям, тонкий стальной ползунок. Firefox не знает ::-webkit-scrollbar — ему
   то же самое стандартными свойствами. */
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track, ::-webkit-scrollbar-corner { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(176, 199, 217, .18); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(176, 199, 217, .3); }
@supports not selector(::-webkit-scrollbar) {
  * { scrollbar-width: thin; scrollbar-color: rgba(176, 199, 217, .18) transparent; }
}

section.group { border-bottom: 1px solid var(--line); }
section.group > h2 {
  margin: 0; padding: 10px 16px; font-size: 13px; font-weight: 560;
  letter-spacing: -.005em; color: var(--text);
  cursor: pointer; display: flex; align-items: center; gap: 8px;
  user-select: none;
}
section.group > h2::before { content: "▾"; font-size: 10px; color: var(--dim2); }
section.group.collapsed > h2::before { content: "▸"; }
section.group.collapsed .body { display: none; }
.body { padding: 2px 16px 14px; display: flex; flex-direction: column; gap: 9px; }

.row { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 8px; }
.row > label { font-size: 13px; color: #c9ced4; }
.row .val { font-size: 11px; color: var(--dim); min-width: 42px; text-align: right; font-variant-numeric: tabular-nums; }
.row.full { grid-template-columns: 1fr; }

input[type="range"] { grid-column: 1 / -1; width: 100%; accent-color: var(--accent); height: 18px; }
select, input[type="text"], input[type="number"], input[type="search"] {
  background: var(--field); color: var(--text); border: 1px solid var(--line);
  border-radius: var(--r); padding: 6px 8px; font: inherit; width: 100%; min-width: 0;
}
input[type="color"] {
  width: 42px; height: 26px; padding: 0; border: 1px solid var(--line);
  border-radius: var(--r); background: none; cursor: pointer;
}
button {
  background: var(--panel2); color: var(--text); border: 1px solid var(--line);
  border-radius: var(--r); padding: 7px 12px; font: inherit; cursor: pointer;
}
button:hover { border-color: var(--line2); background: var(--hover); }
button.primary {
  /* Главное действие — серебро, как главная кнопка сайта. */
  background: var(--silver-btn); border-color: transparent; color: var(--accent-ink); font-weight: 600;
}
button.primary:hover { background: #fff; border-color: transparent; }
.btns { display: flex; gap: 8px; flex-wrap: wrap; }
/* Переключатель «простой / полный». Стоит первым в панели и не прячется:
   короткий список должен читаться как выбор, а не как всё, что есть. */
/* Вкладки панели: «Эффект / Слои / Проект». Стоят выше переключателя уровня —
   вкладка решает, О ЧЁМ настройки, уровень — сколько их показать. Порядок
   сверху вниз повторяет этот порядок вопросов. */
.tab-row {
  display: flex; gap: 0; padding: 0 12px;
  border-bottom: 1px solid var(--line); background: var(--tint);
}
.tab-row button {
  flex: 1; font-size: 13px; padding: 9px 0 8px;
  background: none; border: 0; border-bottom: 2px solid transparent;
  border-radius: 0; color: var(--dim);
  display: flex; align-items: center; justify-content: center; gap: 6px;
}
.tab-row button:hover { color: var(--fg); }
.tab-row button.active { color: var(--fg); border-bottom-color: var(--accent); }
.tab-row .badge {
  font: 11px/1 var(--mono); padding: 2px 5px; border-radius: var(--r);
  background: var(--panel2); color: var(--dim2);
}
.tab-row button.active .badge { background: var(--accent); color: var(--accent-ink); }

.level-row {
  /* Прилипает к верху: уровень виден, как глубоко ни пролистана панель (17.10). */
  position: sticky; top: -4px; z-index: 2;
  display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 12px;
  border-bottom: 1px solid var(--line); background: var(--panel);
}
.level-row button {
  flex: 1; font-size: 12px; padding: 5px 0;
}
.level-row button.active { background: var(--silver-btn); border-color: transparent; color: var(--accent-ink); font-weight: 600; }

/* Рендер ролика: полоса прогресса и ссылка на готовый файл. */
.render-state { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.render-bar {
  flex: 1; height: 4px; border-radius: 2px; overflow: hidden;
  background: var(--panel2);
}
.render-bar i { display: block; height: 100%; background: var(--silver); transition: width .3s; }
/* Ссылка на скачивание стоит в ряду кнопок и обязана выглядеть кнопкой:
   иначе глаз ищет кнопку и не находит её там, где она есть. */
.btn-link {
  display: inline-flex; align-items: center; padding: 6px 10px; border-radius: var(--r);
  border: 1px solid var(--line); background: var(--panel2);
  color: var(--fg); text-decoration: none; font-size: 13px;
}
.btn-link:hover { border-color: var(--line2); color: #fff; background: var(--hover); }

/* «изменено в сцене: N» — вход в то, что простой уровень спрятал. */
.extra-toggle { font-size: 11px !important; color: var(--dim); }

.presets { display: flex; gap: 6px; flex-wrap: wrap; }

/* --- карточки слоёв --- */
.layer {
  border: 1px solid var(--line); border-radius: var(--r2); padding: 8px 9px;
  background: rgba(255, 255, 255, .015);
  display: flex; flex-direction: column; gap: 7px;
}
.layer.open { border-color: var(--line2); background: var(--tint); }
.layer-head { display: flex; align-items: center; gap: 4px; }
.layer-name {
  flex: 1; min-width: 0; text-align: left; font-size: 12.5px; font-weight: 600;
  padding: 6px 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.layer-name.active { color: #fff; border-color: var(--line2); }
.layer-act { padding: 6px 7px; font-size: 12px; line-height: 1; }
.layer-act:disabled { opacity: .28; cursor: default; }
.layer-act:disabled:hover { border-color: var(--line); background: var(--panel2); }
.layer-body {
  margin-top: 1px; padding-top: 9px; border-top: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 10px;
}
.presets button { font-size: 12px; padding: 5px 9px; }

.switch { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.switch input { display: none; }
.switch i {
  width: 32px; height: 18px; border-radius: 9px; background: #1d2128;
  position: relative; transition: background .15s; flex: none;
}
.switch i::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px;
  border-radius: 50%; background: #6b727b; transition: transform .15s, background .15s;
}
.switch input:checked + i { background: rgba(214, 224, 234, .38); }
.switch input:checked + i::after { transform: translateX(14px); background: #fff; }

.hint { font-size: 11.5px; color: var(--dim); line-height: 1.5; }
/* Предупреждение в панели (рендер: прозрачность потеряется, подпись не в той азбуке). */
.hint.warn { color: var(--warn); }
.hint.warn[hidden] { display: none; }
.hint code { background: var(--field); padding: 1px 5px; border-radius: 3px; color: var(--text); }
textarea {
  width: 100%; height: 74px; resize: vertical; font: 11.5px/1.4 ui-monospace, Consolas, monospace;
  background: var(--field); color: #c9ced4; border: 1px solid var(--line); border-radius: var(--r); padding: 8px;
}
.mode-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.mode-tabs button { padding: 9px 4px; font-size: 12.5px; }
.mode-tabs button.active {
  border-color: var(--accent); color: #fff;
  background: var(--tint);
}
@media (max-width: 900px) { main { grid-template-columns: 1fr; } aside, #ptabs { display: none; } }

.size-custom {
  display: grid; grid-template-columns: 1fr auto 1fr auto; gap: 6px; align-items: center;
}
.size-custom .x { color: var(--dim); font-size: 12px; }
.size-custom input[type="number"] { text-align: center; }
.size-custom .swap { padding: 6px 9px; line-height: 1; }

.body .sub {
  font-size: 11px; letter-spacing: .06em; text-transform: uppercase;
  color: var(--dim2); margin-top: 6px; padding-top: 8px;
  border-top: 1px solid var(--line);
}

/* подсказки: пунктир под подписью намекает, что есть описание */
.row.has-hint > label,
.row.has-hint .switch { cursor: help; }
/* 10.11: пунктир под подписями убран по замечанию заказчика — подсказка
   и так открывается наведением, на неё указывает курсор-вопрос. */
.mode-group {
  font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase;
  color: var(--dim2); margin: 8px 0 4px;
}
.mode-tabs { grid-template-columns: repeat(2, 1fr); }

/* Строка «Участвуют в переборе»: кнопки режимов гасятся по одной. */
.skip-tabs { grid-template-columns: repeat(4, 1fr); gap: 4px; margin-top: 4px; }
.skip-tabs button { padding: 6px 2px; font-size: 11px; opacity: .45; }
.skip-tabs button.active { opacity: 1; }
.skip-all { display: flex; gap: 6px; margin-top: 6px; }
.skip-all button { font-size: 11px; padding: 4px 10px; }

/* Сцены: кнопки-иконки в карточке сохранённой сцены. */
.layer-head button.icon { padding: 4px 8px; font-size: 12px; line-height: 1; }

/* ---------- каркас нового экрана ----------
   Макеты: артефакт «WebEffector — экран редактора», 23.09.2026.
   Кадр занимает всё, что можно: это единственное место, на которое человек
   смотрит по-настоящему. Транспорт и таймлиния идут полосами под ним и не
   переезжают при смене режима — меняется только то, чем полоса живёт. */

.mode-switch { display: flex; gap: 3px; padding: 3px; background: var(--bg2);
  border: 1px solid var(--line); border-radius: var(--r2); }
.mode-switch button {
  height: 26px; padding: 0 18px; border: 0; border-radius: var(--r); cursor: pointer;
  background: transparent; color: var(--dim); font: 500 13px/1 inherit;
}
.mode-switch button.active { background: var(--silver-btn); color: var(--accent-ink); font-weight: 600; }
.mode-switch button.live.active { background: var(--err); color: #1a0604; }

#transport {
  display: flex; align-items: center; gap: 10px; height: 44px; flex-shrink: 0;
  padding: 0 14px; background: var(--panel);
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
#transport .play {
  width: 32px; height: 32px; border: 0; border-radius: var(--r); cursor: pointer;
  background: var(--silver-btn); color: var(--accent-ink); font-size: 13px; line-height: 1;
}
#transport .tc { font: 14px/1 var(--mono); color: var(--text); }
#transport .tc.total { color: var(--dim2); }
#transport .sep { width: 1px; height: 20px; background: var(--line); }
#transport .note { font-size: 12px; color: var(--dim2); }
#transport .spacer { flex: 1; }
#transport .live-dot { width: 9px; height: 9px; border-radius: 5px; background: var(--err); }

#timeline {
  flex: 1 1 42%; min-height: 120px; display: flex; flex-direction: column;
  background: var(--bg2); overflow: hidden;
}
#timeline .tl-head {
  display: flex; align-items: center; gap: 10px; height: 30px; flex-shrink: 0;
  padding: 0 14px; border-bottom: 1px solid var(--line);
  font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  color: var(--dim2);
}
#timeline .tl-head .spacer { flex: 1; }
#timeline .tl-head button {
  height: 22px; padding: 0 8px; font-size: 11px; text-transform: none; letter-spacing: 0;
  font-weight: 400; color: var(--dim); background: transparent;
  border: 1px solid var(--line); border-radius: var(--r); cursor: pointer;
}
#timeline .tl-head button.on { background: var(--panel2); border-color: var(--line2); color: var(--text); }

#timeline .tl-body { flex: 1; min-height: 0; display: flex; position: relative; overflow-y: auto; }
#timeline .tl-names { width: 186px; flex-shrink: 0; border-right: 1px solid var(--line); }
#timeline .tl-lanes { flex: 1; position: relative; min-width: 0; }

#timeline .tl-name {
  display: flex; align-items: center; gap: 8px; height: 46px; padding: 0 10px;
  border-bottom: 1px solid rgba(176, 199, 217, .07); font-size: 12.5px; color: #d5d9de;
}
#timeline .tl-name .dot { width: 8px; height: 8px; border-radius: 2px; flex-shrink: 0; }
#timeline .tl-name .nm { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#timeline .tl-name.sel { background: var(--tint); }
#timeline .tl-name button.eye {
  width: 22px; height: 22px; padding: 0; border: 0; background: transparent;
  color: var(--dim2); cursor: pointer; font-size: 12px;
}
#timeline .tl-name button.eye.off { color: #2e333b; }

#timeline .tl-lane { height: 46px; position: relative; border-bottom: 1px solid rgba(176, 199, 217, .07); }
#timeline .tl-seg {
  position: absolute; top: 8px; height: 30px; border-radius: 3px; cursor: grab;
  display: flex; align-items: center; padding: 0 8px; overflow: hidden;
  font-size: 11px; font-weight: 600; color: var(--text); user-select: none;
  /* Стекло с цветной кромкой: цвет дорожки (--c из tracks.js) узнаётся по
     кромке и оттенку, а яркое пятно на экране остаётся одно — кадр. */
  --c: #aeb6bf;
  background: color-mix(in srgb, var(--c) 24%, #0a0c0f);
  border: 1px solid color-mix(in srgb, var(--c) 45%, transparent);
  border-left: 3px solid var(--c);
}
#timeline .tl-seg:hover { background: color-mix(in srgb, var(--c) 34%, #0a0c0f); }
#timeline .tl-seg .grip { position: absolute; top: 0; bottom: 0; width: 7px; cursor: ew-resize; }
#timeline .tl-seg .grip.a { left: 0; } #timeline .tl-seg .grip.b { right: 0; }
/* Линейка прилипает к верху полосы дорожек: метки времени и флажок курсора
   видны и доступны, как глубоко ни пролистаны дорожки (18.10). Вся линейка —
   место для перемотки: щелчок ставит курсор, протяжка мотает. */
#timeline .tl-ruler {
  height: 24px; display: flex; border-bottom: 1px solid var(--line); flex-shrink: 0;
  position: sticky; top: 0; z-index: 4; background: var(--bg2); cursor: pointer;
}
#timeline .tl-ruler i {
  flex: 1; border-left: 1px solid var(--line); padding-left: 6px;
  font: 10px/24px var(--mono); color: var(--dim2); font-style: normal;
  user-select: none;
}
#timeline .tl-head-pad { height: 24px; border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 4; background: var(--bg2); }
#timeline .tl-play { position: absolute; top: 0; bottom: 0; width: 1px; background: #fff; pointer-events: none; }
/* Флажок курсора — в линейке, над линией. Видимая часть 13 × 10 px, а
   ловит мышь поле пошире: попасть в тонкий флажок трудно. */
#timeline .tl-grip {
  position: absolute; top: 0; width: 13px; height: 10px; margin-left: -6px;
  background: #fff; border-radius: 0 0 2px 2px; cursor: ew-resize; z-index: 1;
}
#timeline .tl-grip::after { content: ''; position: absolute; left: -6px; right: -6px; top: 0; height: 24px; }
#timeline .tl-grip:hover { box-shadow: 0 0 0 3px rgba(255, 255, 255, .18); }
/* Пока мотают: текст нигде не выделяется, курсор не мигает над чужими
   элементами. */
body.tl-scrubbing, body.tl-scrubbing * { user-select: none !important; cursor: ew-resize !important; }
/* Эфир (21.10): нижний блок — одна полоса транспорта с часами и слоями,
   таймлиния и разделитель скрыты, кадр получает почти всю высоту. */
.stage-wrap.tl-live #timeline, .stage-wrap.tl-live .dock-split { display: none; }
.stage-wrap.tl-live #transport { height: 48px; }
#transport .tl-chips {
  display: flex; gap: 6px; min-width: 0; flex: 0 1 auto; overflow-x: auto; scrollbar-width: none;
}
#transport .tl-chips::-webkit-scrollbar { display: none; }
.tl-chip {
  display: flex; align-items: center; gap: 7px; height: 28px; padding: 0 10px; flex-shrink: 0;
  border-radius: var(--r); font-size: 12px; cursor: default; white-space: nowrap;
  background: var(--panel2); border: 1px solid var(--line2); color: var(--text);
}
.tl-chip.off { background: transparent; border-color: var(--line); color: var(--dim2); }
.tl-chip .dot { width: 8px; height: 8px; border-radius: 2px; }
.tl-chip .op { font: 11px/1 var(--mono); opacity: .7; }

/* Приглашение создать отрезок на дорожке-выключателе: он выключен, и полосы
   на нём нет — рисовать её было бы прямой ложью. */
#timeline .tl-add {
  position: absolute; top: 10px; left: 8px; height: 26px; padding: 0 12px;
  background: transparent; border: 1px dashed var(--line2); border-radius: var(--r);
  color: var(--dim2); font: 12px/1 inherit; cursor: pointer; z-index: 2;
}
#timeline .tl-add:hover { color: var(--text); border-color: var(--accent); }
/* На дорожке с отрезками «＋» стоит у имени дорожки (22.10): в правом краю
   полосы он ложился на конец отрезка и закрывал его ×. */
#timeline .tl-name .tl-addn {
  flex: none; width: 22px; height: 22px; padding: 0; border: 1px dashed var(--line2); border-radius: var(--r);
  background: transparent; color: var(--dim2); font: 13px/1 inherit; cursor: pointer; opacity: .55;
}
#timeline .tl-name:hover .tl-addn, #timeline .tl-name.sel .tl-addn { opacity: 1; }
#timeline .tl-name .tl-addn:hover { color: var(--text); border-color: var(--accent); opacity: 1; }

#timeline .tl-seg .lbl { pointer-events: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#timeline .tl-seg .kill {
  /* Левее правой ручки (7 px): иначе × закрывал середину края, и потянуть
     отрезок за правый край посередине было нельзя (22.10). */
  position: absolute; right: 9px; top: 2px; width: 18px; height: 18px; padding: 0;
  border: 0; border-radius: 3px; background: rgba(5, 6, 7, .45); color: var(--text);
  font: 13px/1 inherit; cursor: pointer; opacity: 0;
}
#timeline .tl-seg:hover .kill { opacity: 1; }
#timeline .tl-seg .kill:hover { background: var(--err); color: #fff; }

/* Звуковая дорожка: не слой, а линейка под слоями. */
#timeline .tl-name.audio { border-top: 1px solid var(--line); }
/* Ключ громкости дорожки звука (17.10) — тот же ромб, что у настроек панели. */
#timeline .tl-vkey { flex: none; padding: 0 2px; border: 0; background: transparent; color: #2e333b; font-size: 11px; line-height: 1; cursor: pointer; }
#timeline .tl-vkey:hover { color: var(--accent2); }
#timeline .tl-vkey.has { color: var(--accent2-dim); }
#timeline .tl-vkey.at { color: var(--accent2); }
#timeline .tl-lane.audio { border-top: 1px solid var(--line); background: #08090c; }
/* Пустая дорожка «Звук» — место для трека (js/studio/track-drop.js). */
#timeline .tl-lane.audio.empty { cursor: pointer; }
#timeline .tl-lane.audio.empty:hover { background: #0c0e12; }
#timeline .tl-lane.audio.empty:hover .tl-note { color: var(--text); }
#timeline .tl-lane.audio.drop { background: var(--tint); outline: 1px dashed var(--accent); outline-offset: -3px; }
#timeline .tl-wave { position: absolute; left: 0; top: 1px; height: 44px; display: block; }
#timeline .tl-note {
  position: absolute; left: 10px; top: 15px; font-size: 11px; color: var(--dim2);
  pointer-events: none;
}
#timeline .tl-note.warn { left: auto; right: 10px; color: var(--warn); }

/* Полоса автоматизации: кривая (выборка того же valueAt, что у движка) и ромбы
   на ключах. Форма ромба говорит о сглаживании на ВХОДЕ в ключ. */
#timeline .tl-name.key { height: 38px; padding-left: 26px; font-size: 12px; color: var(--dim); }
#timeline .tl-name.key .kdot {
  width: 8px; height: 8px; background: var(--accent2); border-radius: 1px;
  transform: rotate(45deg); flex-shrink: 0;
}
#timeline .tl-name.key .val { font: 11px/1 var(--mono); color: var(--dim2); }
/* «Перенести на…» у полосы ключей: маленький значок, список — по щелчку. */
#timeline .tl-name.key .tl-move {
  width: 26px; height: 20px; padding: 0 2px; margin-left: 4px; font-size: 11px; flex: none;
  background: transparent; border: 1px solid var(--line); border-radius: var(--r); color: var(--dim); cursor: pointer;
}
#timeline .tl-name.key .tl-move:hover { color: var(--accent2); border-color: var(--accent2); }
#timeline .tl-lane.key { height: 38px; background: #0d0f12; }
#timeline .tl-curve { position: absolute; inset: 0; width: 100%; height: 38px; }
#timeline .tl-key {
  position: absolute; width: 11px; height: 11px; margin-left: -5px;
  background: var(--accent2); border-radius: 2px; transform: rotate(45deg);
  /* Тянется в двух измерениях — курсор обязан это обещать, иначе вертикаль
     никто не найдёт. */
  cursor: move;
}
/* Сглаженный ключ — ромб (по умолчанию). Прямой — без скругления, видно угол.
   Ступенька — квадрат без поворота: форма сама подсказывает, что значение
   не едет, а переключается. */
#timeline .tl-key.linear { border-radius: 0; }
#timeline .tl-key.step {
  transform: none; border-radius: 0; width: 9px; height: 9px; margin-left: -4px;
  outline: 2px solid var(--accent2); outline-offset: -4px; background: #0d0f12;
}
#timeline .tl-key.step .kill { transform: none; left: 10px; top: -3px; }
#timeline .tl-key .kill {
  position: absolute; left: 11px; top: -9px; width: 14px; height: 14px; padding: 0;
  border: 0; border-radius: 3px; background: var(--err); color: #fff;
  font: 11px/1 inherit; cursor: pointer; opacity: 0; transform: rotate(-45deg);
}
#timeline .tl-key:hover .kill { opacity: 1; }

/* Ромб «поставить ключ» в строке настройки. */
.row .keybtn {
  width: 22px; height: 22px; padding: 0; flex-shrink: 0; line-height: 1;
  font-size: 11px; background: transparent; border: 0; cursor: pointer;
  color: #2e333b;
}
.row .keybtn:hover { color: var(--accent2); background: transparent; border: 0; }
.row .keybtn.has { color: var(--accent2-dim); }
.row .keybtn.at { color: var(--accent2); }
.row:has(.keybtn) { grid-template-columns: 1fr auto auto; }

/* Строка ползунка — в одну линию (P1 отчёта 20.10, сделано 21.10):
   подпись · ползунок · число · ◆. Раньше подпись с числом шли строкой, а
   ползунок — второй, и раздел на десяток настроек не помещался в экран.
   Ромб ключа ставится только в «Ролике» (panel.js, keyBtn) — в эфире его
   колонки нет. Разметка строки не менялась: места задаёт сетка. */
.row:has(> input[type="range"]) {
  grid-template-columns: minmax(0, 40%) minmax(56px, 1fr) 38px; column-gap: 8px; row-gap: 0;
}
.row:has(> input[type="range"]):has(> .keybtn) {
  grid-template-columns: minmax(0, 37%) minmax(56px, 1fr) 38px 20px;
}
.row:has(> input[type="range"]) > label { grid-column: 1; grid-row: 1; font-size: 12.5px; line-height: 1.25; }
.row:has(> input[type="range"]) > input[type="range"] { grid-column: 2; grid-row: 1; min-width: 0; }
.row:has(> input[type="range"]) > .val { grid-column: 3; grid-row: 1; min-width: 0; }
.row:has(> input[type="range"]) > .keybtn { grid-column: 4; grid-row: 1; width: 20px; }

/* ---------- разделитель нижнего блока (js/studio/dock.js) ----------
   Класс `docked` ставит модуль разделителя: с ним высоту таймлинии задаёт он
   (в пикселях, от доли, которую тянет человек), а превью берёт всё остальное.
   Без модуля остаются доли 58 / 42 из правил выше. Нижние пределы — превью
   140 px, таймлиния до шапки — тоже держит модуль: CSS-минимум здесь мешал
   бы ему, потому что flex молча перераспределил бы место. */
.stage-wrap.docked .stage-box { flex: 1 1 0; min-height: 0; }
.stage-wrap.docked #timeline { flex: 0 0 auto; min-height: 0; }

/* Полоска не отнимает у раскладки места: она вдвое шире линии, на которой
   стоит, и отрицательными полями ложится поверх границы превью и транспорта.
   Попасть в неё легко, а кадр от неё не уменьшается. */
.dock-split {
  position: relative; z-index: 5; flex: 0 0 auto;
  height: 11px; margin: -5px 0 -6px;
  cursor: row-resize; touch-action: none; outline: none;
  display: flex; align-items: center; justify-content: center;
}
/* Линия на всю ширину видна только при наведении и во время перетаскивания:
   в покое достаточно ручки, а двойная граница над транспортом шумела бы. */
.dock-split::before {
  content: ''; position: absolute; left: 0; right: 0; top: 5px; height: 1px;
  background: transparent; transition: background .12s;
}
.dock-split i {
  position: relative; width: 44px; height: 5px; border-radius: 3px;
  background: #3a4048; border: 1px solid var(--bg);
  transition: background .12s, width .12s;
}
.dock-split:hover::before, .dock-split:focus-visible::before,
body.dock-dragging .dock-split::before { background: var(--line2); }
.dock-split:hover i, .dock-split:focus-visible i,
body.dock-dragging .dock-split i { background: var(--accent); width: 64px; }
.dock-split:focus-visible i { box-shadow: 0 0 0 2px rgba(214, 224, 234, .35); }
/* Пока тянут: курсор не мигает над чужими элементами, текст не выделяется. */
body.dock-dragging, body.dock-dragging * { cursor: row-resize !important; user-select: none; }
/* Масштаб кадра на время перетаскивания — вокруг центра, как его и
   вписывает коробка; тень перерисовывается вместе с ним. */
#stage { transform-origin: 50% 50%; }

/* Безопасные зоны вертикального кадра (js/studio/safe-zones.js). Слой над
   холстами и линзой — z-index, а не порядок в DOM: сцена переставляет свои
   холсты appendChild'ом и иначе накрыла бы разметку. Мышь проходит насквозь
   к перетаскиванию слоя (js/studio/place.js). */
.safe-guide { position: absolute; inset: 0; z-index: 20; pointer-events: none; }
.safe-guide[hidden] { display: none; }
.sg-zone {
  position: absolute; background: rgba(8, 9, 12, .42);
  background-image: repeating-linear-gradient(135deg, rgba(255, 255, 255, .05) 0 6px, transparent 6px 12px);
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.sg-zone span {
  font: 600 10px/1.2 system-ui, sans-serif; color: rgba(255, 255, 255, .62);
  letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; padding: 2px 4px;
}
.sg-right span { writing-mode: vertical-rl; }
.sg-safe { position: absolute; border: 1px dashed rgba(214, 224, 234, .8); border-radius: 0; }
.safe-row { display: flex; flex-direction: column; gap: 6px; margin: 2px 0 8px; }
.safe-row[hidden] { display: none; }

/* Зона камеры (20.11, js/studio/camzone-ui.js): рамка над холстами. На
   вкладке «Сцена» (`.edit`) её тянут за подпись и углы; на прочих она
   прозрачна для мыши — перетаскивание слоя работает сквозь неё. */
.cam-guide { position: absolute; inset: 0; z-index: 21; pointer-events: none; }
.cam-guide[hidden] { display: none; }
.cz-rect { position: absolute; border: 1px dashed rgba(214, 224, 234, .55); box-sizing: border-box; }
.cam-guide.edit .cz-rect { border: 1.5px dashed rgba(240, 246, 252, .9); background: rgba(120, 180, 255, .06); }
.cz-tag {
  position: absolute; left: -1px; top: -1px; transform: translateY(-100%);
  font: 600 10px/1.2 system-ui, sans-serif; letter-spacing: .04em; text-transform: uppercase; white-space: nowrap;
  color: rgba(255, 255, 255, .7); background: rgba(10, 12, 16, .55); padding: 3px 6px; border-radius: 3px 3px 0 0;
}
.cam-guide.edit .cz-tag { pointer-events: auto; cursor: move; color: #0b0d10; background: rgba(240, 246, 252, .92); }
.cz-h { position: absolute; width: 11px; height: 11px; margin: -6px 0 0 -6px; border-radius: 2px;
  background: rgba(240, 246, 252, .95); box-shadow: 0 0 0 1px rgba(0, 0, 0, .5); display: none; }
.cam-guide.edit .cz-h { display: block; pointer-events: auto; }
.cz-nw { left: 0; top: 0; cursor: nwse-resize; } .cz-ne { left: 100%; top: 0; cursor: nesw-resize; }
.cz-sw { left: 0; top: 100%; cursor: nesw-resize; } .cz-se { left: 100%; top: 100%; cursor: nwse-resize; }
.cz-tools .presets { margin-top: 6px; }

/* Эфир в OBS (27.10, js/studio/onair.js): надпись над приглушённым превью,
   частота оверлея в индикаторе, ссылка OBS в подробностях. */
.onair-note { position: absolute; left: 50%; top: 10px; transform: translateX(-50%); z-index: 5;
  display: flex; gap: 10px; align-items: center; padding: 6px 8px 6px 12px; border-radius: 8px;
  background: rgba(11, 12, 16, .82); border: 1px solid var(--line, #2a2f3a); color: var(--text, #e8e8e8);
  font-size: 12.5px; max-width: calc(100% - 24px); }
.onair-note[hidden] { display: none; }
.onair-note button { white-space: nowrap; }
.hud .ov-fps.warn { color: #E3A455; }
.hud .ov-fps.err { color: #ff6b6b; }
.hud-hint { font-size: 12px; color: #E3A455; padding: 2px 0 6px; max-width: 320px; }
.hud-hint[hidden] { display: none; }
.hud-url { display: grid; grid-template-columns: 1fr auto; gap: 6px; padding: 6px 0; }
.hud-url-lab { grid-column: 1 / -1; font-size: 12px; opacity: .8; }
.hud-url-box { min-width: 0; font-size: 12px; }
.hud-copy.ok { color: #58B9AE; }
.stage-box { position: relative; }

/* ---------- студия-гость /try (12.11, js/studio/guest.js) ---------- */
body.is-guest { grid-template-rows: auto auto 1fr; }
.guest-bar { display: flex; align-items: center; gap: 12px; min-height: 36px; padding: 6px 14px;
  border-bottom: 1px solid var(--line); background: #0d1013; font-size: 12.5px; color: var(--dim); }
.guest-bar b { color: var(--text); font-weight: 600; }
.guest-bar-ico { flex: none; width: 15px; height: 15px; border-radius: 50%; border: 1.6px solid var(--warn); color: var(--warn);
  font-size: 10px; font-weight: 600; line-height: 12px; text-align: center; }
.guest-bar-gap { flex: 1; }
.guest-bar-login { flex: none; color: var(--text); font-weight: 600; white-space: nowrap; }
.guest-bar.warn { background: #15120b; border-bottom-color: rgba(229, 197, 143, .45); }
.guest-bar.warn b { color: var(--warn); }
.guest-bar.over { background: #120d0d; border-bottom-color: rgba(255, 111, 97, .4); }
.guest-tag { height: 22px; padding: 0 8px; display: inline-flex; align-items: center; border-radius: var(--r);
  background: rgba(229, 197, 143, .12); color: var(--warn); font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.guest-login { height: 30px; padding: 0 14px; display: inline-flex; align-items: center; border-radius: var(--r);
  border: 1px solid rgba(176, 199, 217, .42); background: var(--tint); color: var(--text); font-weight: 600; font-size: 13px; text-decoration: none; }
.guest-login:hover { border-color: var(--accent); }
svg.guest-lock { width: 15px; height: 15px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; }
.guest-card { display: flex; flex-direction: column; gap: 9px; padding: 13px; border: 1px solid var(--line2);
  border-radius: var(--r2); background: #0e1116; }
.guest-card.warn { border-color: rgba(229, 197, 143, .45); background: #13110c; }
.guest-card-top { display: flex; align-items: center; gap: 8px; color: var(--accent); }
.guest-card-title { flex: 1; font-weight: 600; font-size: 13.5px; color: var(--text); }
.guest-card-text { margin: 0; color: var(--dim); font-size: 12.5px; line-height: 1.5; }
.guest-card-btn { height: 32px; display: flex; align-items: center; justify-content: center; border-radius: var(--r);
  border: 1px solid rgba(255, 255, 255, .55); background: var(--silver-btn); color: var(--accent-ink); font-weight: 600; font-size: 13px; text-decoration: none; }
.guest-card-btn.quiet { border-color: rgba(176, 199, 217, .42); background: var(--tint); color: var(--text); }
.guest-pill { height: 20px; padding: 0 7px; display: inline-flex; align-items: center; border-radius: var(--r);
  background: rgba(229, 197, 143, .12); color: var(--warn); font-size: 11px; font-weight: 600; }
.guest-meter { display: flex; flex-direction: column; gap: 5px; }
.guest-meter-line { display: flex; font-size: 12px; color: var(--dim); }
.guest-link-st.on { color: var(--ok); }
.guest-track { display: block; position: relative; height: 4px; border-radius: 2px; background: var(--line); }
.guest-track i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 2px; background: var(--accent); }
.guest-card.warn .guest-track i { background: var(--warn); }
.mode-switch button.locked { color: #4f565e; display: inline-flex; align-items: center; gap: 6px; cursor: not-allowed; }
.mode-switch button.locked svg.guest-lock { width: 12px; height: 12px; }
.guest-pop { position: fixed; z-index: 60; width: 320px; box-shadow: 0 16px 40px -12px rgba(0, 0, 0, .8); }
.fig-lock { display: inline-flex; align-items: center; gap: 4px; color: var(--dim); font-size: 12px; }
.fig-lock a { color: var(--text); font-weight: 600; }
.guest-toast { position: fixed; z-index: 60; left: 50%; bottom: 84px; transform: translateX(-50%); display: flex; align-items: center; gap: 12px;
  max-width: min(640px, 92vw); padding: 11px 12px 11px 14px; border: 1px solid rgba(159, 224, 188, .35); border-radius: var(--r2);
  background: #0d1512; font-size: 12.5px; box-shadow: 0 16px 40px -12px rgba(0, 0, 0, .8); }
.guest-toast-ok { color: var(--ok); font-weight: 700; }
.guest-toast-text { flex: 1; color: var(--dim); }
.guest-toast-text b { color: var(--text); font-weight: 600; }
.guest-toast-save { height: 30px; padding: 0 12px; border-radius: var(--r); border: 1px solid rgba(255, 255, 255, .55);
  background: var(--silver-btn); color: var(--accent-ink); font-family: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.guest-toast-x { background: none; border: 0; color: var(--dim2); font-size: 16px; cursor: pointer; padding: 0 4px; }

/* ---------- источник звука у кнопки (12.11, js/studio/source-menu.js) ---------- */
header .snd-split { position: relative; flex: none; display: flex; align-items: stretch; border-radius: var(--r); }
header .snd-split > button { border-radius: 0; height: 32px; }
header .snd-split > button:first-child, header .snd-split > button[hidden] + button:not([hidden]) { border-radius: var(--r) 0 0 var(--r); }
header .snd-split #btnStart { padding: 0 12px; }
header .snd-split #btnStop { padding: 0 12px; }
header .snd-split #btnStart:not([hidden]) + #btnStop:not([hidden]) { border-left: 1px solid rgba(10, 12, 15, .22); }
header .src-btn { display: inline-flex; align-items: center; gap: 6px; padding: 0 10px; border-radius: 0 var(--r) var(--r) 0;
  background: linear-gradient(180deg, #e6ebf0 0%, #bcc5cf 100%); color: var(--accent-ink); border: 0;
  border-left: 1px solid rgba(10, 12, 15, .22); font-size: 12.5px; font-weight: 600; white-space: nowrap; }
header .src-btn:hover { background: linear-gradient(180deg, #f2f5f8 0%, #cdd4dc 100%); }
header .src-btn.on { background: var(--panel2); color: var(--text); border-left-color: var(--line2); }
header .src-btn.on:hover { background: var(--hover); }
header .src-btn .src-caret { font-size: 10px; opacity: .7; }
svg.src-ico { width: 15px; height: 15px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.src-dot { width: 7px; height: 7px; border-radius: 50%; display: block; flex: none; }
.src-dot.on { background: var(--ok); box-shadow: 0 0 6px rgba(159, 224, 188, .5); }
.src-dot.err { background: var(--err); }
.src-pop { position: absolute; top: calc(100% + 6px); right: 0; z-index: 60; width: 360px; box-sizing: border-box; padding: 8px;
  background: var(--panel2); border: 1px solid var(--line2); border-radius: var(--r2); box-shadow: 0 16px 40px rgba(0, 0, 0, .6);
  display: flex; flex-direction: column; gap: 2px; }
.src-pop[hidden] { display: none; }
.src-head { padding: 4px 10px 6px; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--dim2); }
.src-item { display: flex; align-items: flex-start; gap: 10px; width: 100%; padding: 9px 10px; text-align: left; border: 0; border-radius: var(--r);
  background: none; color: var(--dim); }
.src-item:hover, .src-item:focus-visible { background: var(--hover); }
.src-item.sel { background: var(--tint); color: var(--text); }
.src-item.off { opacity: .5; cursor: default; }
.src-item svg.src-ico { margin-top: 2px; }
.src-tx { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.src-item-name { font-weight: 600; font-size: 13px; color: var(--text); }
.src-item-text { font-size: 11.5px; line-height: 1.4; color: var(--dim2); }
.src-check { width: 14px; color: var(--ok); font-weight: 700; }
.src-dev { display: flex; flex-direction: column; gap: 4px; padding: 0 10px 8px 35px; }
.src-dev select { width: 100%; }
.src-note { font-size: 11px; color: var(--dim2); }
.src-foot { display: flex; align-items: center; gap: 8px; margin-top: 6px; padding: 8px 10px 2px; border-top: 1px solid var(--line); }
.src-gap { flex: 1; }
.src-link { background: none; border: 0; padding: 0; font-size: 12px; color: var(--dim); cursor: pointer; }
.src-link:hover { color: var(--text); background: none; }
.src-link.sel { color: var(--text); }
