/* editor-anim.css — animation subsystem (anim-dock + actions-island +
   timeline + Action list + anim-mode overrides).
   Подключается editor.html после editor.css (и после editor-graph.css).
   Выделен 2026-05-12 (DESIGN-AUDIT-2 — план в docs/specs/design-audit/README.md). */

/* ============================================================
   Anim dock — floating редактор Action (timeline + ключи).
   Параллелен .sm-dock: тот же визуальный паттерн (resize-ручка top,
   header + body grid), но своя логика (имя Action / длительность /
   конверсия simple→nla). Общий z-index с .sm-dock; одновременно
   открыт может быть только один (см. animDock.js).
   ============================================================ */
.anim-dock {
  position: fixed;
  left: 8px;
  right: 8px;
  bottom: 8px;
  height: 44vh;
  max-height: calc(100vh - 80px);
  min-height: 200px;
  background: var(--island-bg);
  border: 1px solid var(--island-border);
  border-radius: var(--r-lg);
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
  z-index: 120;
  transform: translateY(calc(100% + 20px));
  pointer-events: none;
  transition: transform 200ms ease-out;
}
.anim-dock.is-open {
  transform: translateY(0);
  pointer-events: auto;
}
/* ANIM-LAYER-DEFAULT-TIMELINE-HEIGHT (2026-06-25): внутри слоя «Анимация»
   таймлайн открывается компактным (видно 1–2 дорожки), а не на полэкрана —
   пользователь сам тянет верхний край вверх. Высота главного редактора не
   наследуется: open() в animDock.js очищает inline-height при входе в слой, и
   это правило задаёт компактный default. min-height тоже ниже 200px (главного
   редактора), чтобы компактное состояние было допустимо при resize. */
body.is-inside-rlottie-layer .anim-dock {
  height: 180px;
  min-height: 140px;
}
/* Когда открыт animDock — освобождаем слева место под actions-island.
   Width острова — CSS-var, default 200px. Gap 8px такой же как у других
   floating-островов (sm-dock-island-gap нет, используем тот же 8 что в
   .anim-dock left).
   Эпик «Растровая жизнь», Срез 2: внутри слоя «Анимация» острова экшенов
   нет (одна неявная анимация, списка не показываем) — таймлайн занимает всю
   ширину, сдвиг под остров не нужен. Отвязка через :not(.is-inside-rlottie-layer). */
body.anim-mode:not(.is-inside-rlottie-layer) .anim-dock {
  left: calc(16px + var(--actions-island-width, 200px));
}

/* Actions island — список Action'ов слева от animDock.
   Открывается синхронно через body.anim-mode (slide-in снизу как animDock).
   Высота берётся из --anim-dock-height (animDock JS resize ставит var). */
.actions-island {
  position: fixed;
  left: 8px;
  bottom: 8px;
  width: var(--actions-island-width, 200px);
  height: var(--anim-dock-height, 44vh);
  max-height: calc(100vh - 80px);
  min-height: 200px;
  background: var(--island-bg);
  border: 1px solid var(--island-border);
  border-radius: var(--r-lg);
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
  z-index: 120;
  transform: translateY(calc(100% + 20px));
  pointer-events: none;
  transition: transform 200ms ease-out;
}
/* Эпик «Растровая жизнь», Срез 2: остров экшенов внутри слоя «Анимация» убран
   (там одна неявная анимация, видимого списка нет). Slide-in только вне слоя. */
body.anim-mode:not(.is-inside-rlottie-layer) .actions-island {
  transform: translateY(0);
  pointer-events: auto;
}
.actions-island-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-bottom: 1px solid var(--island-border);
  background: var(--dock-header-bg);
  gap: 8px;
}
.actions-island-title {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--gray-cc);
  font-weight: 500;
}
.actions-island-list {
  list-style: none;
  margin: 0;
  padding: 4px 0;
  overflow-y: auto;
  overflow-x: hidden;
}
.actions-island-list .action-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  cursor: pointer;
  user-select: none;
  position: relative;
}
.actions-island-list .action-item:hover {
  background: var(--gray-22);
}
.actions-island-list .action-item.active {
  background: var(--accent-soft);
  color: var(--white);
}
.actions-island-list .action-item-name {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 12px;
}
.actions-island-list .action-item-actions {
  display: none;
}
.actions-island-list .action-item:hover .action-item-actions,
.actions-island-list .action-item.active .action-item-actions {
  display: flex;
  visibility: visible;
  opacity: 1;
}
/* Resize handle справа — vertical bar, drag меняет --actions-island-width.
   Visual: hot zone 8px (transparent) + капсула 4×36px по центру при hover/drag.
   Унифицировано с .sm-dock-resize и .anim-dock-resize.
   position: fixed чтобы не подчиняться overflow:hidden + transform у .actions-island
   (иначе капсула срезалась бы и сдвигалась).
   Handle сидит РОВНО в gap'е (8px) между actions-island и animDock — не
   перекрывает ни один из островов. left начинается на parent.right, занимает все 8px gap'а. */
.actions-island-resize {
  position: fixed;
  left: calc(8px + var(--actions-island-width, 200px));
  bottom: 8px;
  width: 8px;
  height: var(--anim-dock-height, 44vh);
  max-height: calc(100vh - 80px);
  min-height: 200px;
  cursor: col-resize;
  z-index: 121;
  background: transparent;
  display: none;
}
/* Эпик «Растровая жизнь», Срез 2: острова экшенов внутри слоя нет — нет и его
   resize-ручки. */
body.anim-mode:not(.is-inside-rlottie-layer) .actions-island-resize {
  display: block;
}
.actions-island-resize::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 4px;
  height: 36px;
  border-radius: var(--r-sm);
  background: var(--gray-44);
  opacity: 0;
  transition: opacity 0.15s ease, background 0.15s ease, width 0.15s ease, height 0.15s ease;
  pointer-events: none;
}
.actions-island-resize:hover::after,
.actions-island-resize.is-dragging::after {
  opacity: 1;
}
.actions-island-resize.is-dragging::after {
  background: var(--gray-66);
  width: 5px;
  height: 48px;
}

/* Верхний край animDock — drag-ручка по высоте (см. .sm-dock-resize). */
.anim-dock-resize {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 8px;
  cursor: row-resize;
  z-index: 10;
  background: transparent;
}
.anim-dock-resize::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 36px;
  height: 4px;
  border-radius: var(--r-sm);
  background: var(--gray-44);
  opacity: 0;
  transition: opacity 0.15s ease, background 0.15s ease, width 0.15s ease, height 0.15s ease;
  pointer-events: none;
}
.anim-dock-resize:hover::after,
.anim-dock-resize.is-dragging::after {
  opacity: 1;
}
.anim-dock-resize.is-dragging::after {
  background: var(--gray-66);
  width: 48px;
  height: 5px;
}

.anim-dock-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  border-bottom: 1px solid var(--island-border);
  background: var(--dock-header-bg);
  gap: 12px;
}
/* Layout для title-блока. Типографика — через .dock-title / .dock-meta в HTML. */
.anim-dock-title {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;        /* чтобы name мог уменьшаться */
}
.anim-dock-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
  flex-shrink: 0;
}
/* «Анимация» — типографика через .dock-title; здесь только layout. */
.anim-dock-mode {
  flex-shrink: 0;
}
/* Имя Action — типографика через .dock-meta; здесь только поведение редактирования. */
.anim-dock-name {
  outline: none;
  border-radius: var(--r-sm);
  padding: 2px 6px;
  margin: -2px -2px;
  transition: background 0.15s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 280px;
  cursor: text;
}
.anim-dock-name:hover {
  background: var(--hover-bg-sm);
}
.anim-dock-name[contenteditable="true"] {
  background: var(--hover-bg-lg);
  cursor: text;
}
.anim-dock-name:empty::before {
  content: attr(data-placeholder);
  color: var(--gray-66);
}

.anim-dock-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
/* Layout для блоков FPS / Длительность / Кадр. Типографика — через .dock-meta. */
.anim-dock-duration,
.anim-dock-frame,
.anim-dock-fps {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
/* .lbl внутри блоков — типографика наследуется от .dock-meta родителя. */
.anim-dock-duration .ui-input,
.anim-dock-fps .ui-input,
.anim-dock-frame .ui-input {
  width: 56px;
  height: 24px;
  font-size: 12px;
  padding: 2px 6px;
  text-align: center;
}
.anim-dock-fps .ui-input,
.anim-dock-frame .ui-input { width: 44px; }
/* .suf внутри блоков — типографика наследуется от .dock-meta родителя. */
.anim-dock-frame {
  font-variant-numeric: tabular-nums;
}
/* Toggle-кнопка «Кадр / Сек» — выглядит как label, но кликабельна. */
.anim-dock-frame-toggle {
  background: transparent;
  border: none;
  padding: 1px 4px;
  margin: -1px -4px;
  font: inherit;
  color: var(--gray-66);
  cursor: pointer;
  border-radius: var(--r-sm);
  transition: background 0.15s, color 0.15s;
}
.anim-dock-frame-toggle:hover {
  background: var(--hover-bg);
  color: var(--white);
}
.anim-dock-close,
.anim-dock-play,
.anim-dock-loop,
.anim-dock-fit,
.anim-dock-fit-dur {
  width: 24px;
  height: 24px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
/* «Подогнать под частицы» (ANIM-TIMELINE-CLOCK-SYNC) — только внутри слоя
   «Анимация»: длина таймлайна = период единых часов (самая длинная анимация).
   В корне и IA единых часов нет, кнопка скрыта. */
body:not(.is-inside-rlottie-layer) .anim-dock-fit-dur { display: none; }
/* Метка обрезки: частицы/анимация длиннее таймлайна. Показывается JS-ом
   (syncCropWarning), скрыта вне слоя «Анимация». Цвет — danger-токен. */
.anim-dock-crop-warn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 24px;
  padding: 0 8px;
  border-radius: var(--r-sm);
  background: color-mix(in srgb, var(--danger) 16%, transparent);
  color: var(--danger);
  font-size: 11px;
  white-space: nowrap;
  flex-shrink: 0;
}
.anim-dock-crop-warn[hidden] { display: none; }
body:not(.is-inside-rlottie-layer) .anim-dock-crop-warn { display: none; }
.anim-dock-play.is-playing {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--white);
}
.anim-dock-play.is-playing .ic-play  { display: none; }
.anim-dock-play.is-playing .ic-pause { display: inline-block !important; }
/* Loop (default) — accent border-color активного toggle. Once — серый. */
.anim-dock-loop {
  color: var(--accent);
  border-color: var(--accent);
}
.anim-dock-loop.is-once {
  color: var(--gray-cc);
  border-color: var(--island-border);
}
.anim-dock-loop.is-once .ic-loop { display: none; }
.anim-dock-loop.is-once .ic-once { display: inline-block !important; }

.anim-dock-body {
  position: relative;
  overflow: hidden;
  background: var(--dock-canvas-bg);
}

/* ============================================================
   Anim timeline (T4) — внутри #animDockBody.
   Grid: изменяемая колонка заголовков | 1fr body. Левая колонка — track headers,
   правая — ruler + ключи + cursor.
   ============================================================ */
.anim-tl {
  position: absolute;
  inset: 0;
  display: grid;
  /* side-col (track headers) | scroll (ruler+keys) | props.
     Список Action'ов вынесен в #actionsIsland — отдельный floating-остров. */
  grid-template-columns: var(--anim-tl-channel-column-width, 140px) minmax(0, 1fr) 220px;
  overflow: hidden;
  font-size: 11px;
  color: var(--gray-cc);
}

/* Левая колонка — корнер сверху + список заголовков треков под ним.
   Верхняя ячейка повторяет ruler (26px) и range-bar (8px), поэтому центр
   каждого заголовка совпадает с центром ряда ключей справа. */
.anim-tl-side-col {
  display: grid;
  grid-template-rows: 34px 1fr;
  border-right: 1px solid var(--island-border);
  overflow: hidden;
}
.anim-tl-side-corner {
  background: rgba(255,255,255,0.02);
  border-bottom: 1px solid var(--island-border);
}

/* Прозрачная зона поверх границы колонок. Она не занимает grid-колонку,
   поэтому ruler, сетка, ключи и cursor всегда остаются в одной геометрии. */
.anim-tl-column-resize {
  position: absolute;
  top: 0;
  bottom: 0;
  left: calc(var(--anim-tl-channel-column-width, 140px) - 4px);
  width: 8px;
  cursor: col-resize;
  touch-action: none;
  z-index: 10;
}
.anim-tl-column-resize::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 3px;
  width: 2px;
  height: 36px;
  transform: translateY(-50%);
  border-radius: var(--r-sm);
  background: var(--gray-44);
  opacity: 0;
  transition: opacity 0.15s ease, height 0.15s ease, background 0.15s ease;
  pointer-events: none;
}
.anim-tl-column-resize:hover::after,
.anim-tl-column-resize.is-dragging::after { opacity: 1; }
.anim-tl-column-resize.is-dragging::after {
  height: 48px;
  background: var(--gray-66);
}

/* Скролл-обёртка таймлайна: ruler внутри (sticky top), area под ним.
   Горизонтальный pan через scrollLeft (wheel или 2 пальца).
   Вертикальный — natural overflow если треков много. */
.anim-tl-scroll {
  position: relative;
  overflow: auto;
  background: transparent;
  /* trackpad pan чувствительнее браузерного wheel — ОК */
}

.anim-tl-ruler {
  position: sticky;
  top: 0;
  z-index: 5;
  height: 26px;
  background: rgba(24,24,32,0.92);
  border-bottom: 1px solid var(--island-border);
  cursor: pointer;
  user-select: none;
}

/* Range bar (A4) — диапазон проигрывания, как в After Effects.
   Находится под ruler'ом, sticky тоже остаётся видимым при scroll. */
.anim-tl-range-bar {
  position: sticky;
  top: 26px;
  z-index: 4;
  height: 8px;
  background: rgba(255,255,255,0.02);
  border-bottom: 1px solid var(--island-border);
  user-select: none;
}
.anim-tl-range-bar-fill {
  position: absolute;
  top: 0;
  bottom: 0;
  background: var(--accent-soft);
  border-left: 2px solid var(--accent);
  border-right: 2px solid var(--accent);
  cursor: grab;
  box-sizing: border-box;
  /* Минимальная видимая ширина — handles не схлопываются в точку и
     остаются хваеtemy. Реальный data-range может быть меньше; для drag
     это не важно (вычисление в пикселях по pointermove). */
  min-width: 8px;
}
.anim-tl-range-bar-fill:active { cursor: grabbing; }
.anim-tl-range-bar-handle {
  position: absolute;
  top: -2px;
  bottom: -2px;
  width: 8px;
  background: var(--accent);
  cursor: ew-resize;
  border-radius: 1px;
  box-shadow: 0 0 6px var(--accent);
}
.anim-tl-range-bar-handle.is-left  { left:  -4px; }
.anim-tl-range-bar-handle.is-right { right: -4px; }
.anim-tl-tick {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--gray-33);
}
/* Frame-major (нумерованные кадры) — приглушённые, вторичные. */
.anim-tl-tick.is-major {
  background: var(--gray-44);
  width: 1px;
}
/* Секундные тики — основные деления, ярче и толще. */
.anim-tl-tick.is-second {
  background: var(--gray-cc);
  width: 1px;
}
.anim-tl-tick-label {
  position: absolute;
  top: 4px;
  left: 4px;
  font-size: 10px;
  color: var(--gray-66);
  white-space: nowrap;
  pointer-events: none;
}
/* Лейбл секунды — белый, жирнее: явно отделить от frame labels. */
.anim-tl-tick.is-second .anim-tl-tick-label {
  color: var(--white);
  font-weight: 600;
}

.anim-tl-side {
  overflow-y: auto;
  overflow-x: hidden;
}
/* Зебра остаётся только у свёрнутых строк слоёв. Раскрытые каналы используют
   единый основной фон в списке имён и области ключей. */
.anim-tl-layer-header.is-zebra,
.anim-tl-track-row--summary.is-zebra {
  background: var(--gray-2a);
}
.anim-tl-layer-header.is-zebra:hover {
  background: var(--hover-bg-sm);
}
.anim-tl-track-header,
.anim-tl-layer-header,
.anim-tl-channel-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 8px;
  height: 28px;
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
}
.anim-tl-track-header.is-broken,
.anim-tl-layer-header.is-broken {
  color: var(--gray-66);
}

/* Layer header (свёрнутый/раскрытый) */
.anim-tl-layer-header {
  cursor: pointer;
}
.anim-tl-layer-header:hover {
  background: var(--hover-bg-sm);
}
.anim-tl-layer-header.is-layer-selected {
  background: var(--accent-soft);
}
.anim-tl-layer-header.is-layer-selected .anim-tl-track-name {
  color: var(--accent);
}
.anim-tl-chevron {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  color: var(--gray-66);
  transition: transform 0.15s;
  cursor: pointer;
}
.anim-tl-layer-header.is-expanded .anim-tl-chevron {
  transform: rotate(90deg);
}
.anim-tl-chevron:hover { color: var(--white); }
.anim-tl-layer-badges {
  display: inline-flex;
  gap: 3px;
  margin-left: auto;
  flex-shrink: 0;
}
.anim-tl-death-spawn-badge {
  min-width: 0;
  max-width: 108px;
  overflow: hidden;
  padding: 2px 5px;
  flex-shrink: 1;
  border: 1px solid var(--node-event-soft-2);
  border-radius: var(--r-sm);
  color: var(--node-event);
  background: var(--node-event-soft);
  font-size: 8px;
  line-height: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* Кнопка удаления дорожки слоя — видна на hover layer-header. */
.anim-tl-layer-del {
  width: 18px;
  height: 18px;
  padding: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: var(--gray-66);
  cursor: pointer;
  border-radius: var(--r-sm);
  flex-shrink: 0;
}
.anim-tl-layer-header:hover .anim-tl-layer-del,
.anim-tl-layer-header.is-layer-selected .anim-tl-layer-del {
  display: inline-flex;
}
.anim-tl-layer-del:hover {
  background: rgba(239,68,68,0.12);
  color: var(--danger-bg);
}
.anim-tl-ch-badge {
  display: inline-flex;
  min-width: 14px;
  height: 14px;
  padding: 0 2px;    /* двухбуквенные бейджи (Cr/Sz/Sc/Sw) — чуть шире 14px */
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 600;
  color: var(--gray-66);
  background: rgba(255,255,255,0.05);
  border-radius: var(--r-sm);
}
/* Цвет бейджа по группе канала (ui.badge.group в channelRegistry): движение —
   синий, цвет — оранжевый, размеры в px — зелёный, контур — accent. Вид утверждён 2026-07-06
   (вариант «Цвет по семейству»). Сохраняются и при выделении слоя — выделение
   читается по фону строки + цвету имени, перекрашивать бейджи не нужно. */
.anim-tl-ch-badge--motion { color: #9aa4c8; background: rgba(122,142,200,0.14); }
.anim-tl-ch-badge--color  { color: #e0a878; background: rgba(224,136,62,0.15); }
.anim-tl-ch-badge--dim    { color: #6ec2a0; background: rgba(80,180,140,0.15); }
.anim-tl-ch-badge--path   { color: var(--accent-hover); background: var(--accent-soft); }

/* Channel header (раскрытый layer → отдельные строки каналов) */
.anim-tl-channel-header {
  background: transparent;
  cursor: pointer;        /* клик выделяет все ключи канала (TIMELINE-CHANNEL-SELECT-ALL) */
}
/* Hover-подсказка кликабельности: фон как у layer-header + имя канала светлеет. */
.anim-tl-channel-header:hover {
  background: var(--hover-bg-sm);
}
.anim-tl-channel-header:hover .anim-tl-track-channel {
  color: var(--white);
}
.anim-tl-channel-indent {
  display: inline-block;
  width: 14px;            /* отступ под chevron — channel визуально внутри layer */
  flex-shrink: 0;
}
.anim-tl-channel-header .anim-tl-track-channel {
  color: var(--gray-cc);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  transition: color 0.12s;
}

/* TIMELINE-CYCLE: кнопка «цикл» в строке канала (справа, как trash у слоя). */
.anim-tl-cycle-btn {
  width: 18px;
  height: 18px;
  padding: 0;
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: var(--gray-66);
  cursor: pointer;
  border-radius: var(--r-sm);
  flex-shrink: 0;
}
.anim-tl-cycle-btn:hover { background: var(--hover-bg-sm); color: var(--white); }
.anim-tl-cycle-btn.is-active {
  color: var(--accent);
  background: var(--accent-soft);
}
.anim-tl-cycle-btn.is-disabled {
  opacity: 0.35;
  cursor: default;
}
.anim-tl-cycle-btn.is-disabled:hover { background: transparent; color: var(--gray-66); }

/* Backward-compat: старый .anim-tl-track-row.is-layer-selected — оставлен
   для row'ов которые имеют data-layer-id (раскрытые channel rows). */
.anim-tl-track-row.is-layer-selected::before {
  background: var(--accent);
  opacity: 0.5;
}

/* Выделение дорожек для удаления (TIMELINE-TRACK-DELETE): Cmd+клик помечает
   дорожки, Backspace удаляет. Заметнее scene-selection (accent-soft) — сплошная
   accent-заливка с левой полосой, чтобы режим «помечено к удалению» читался. */
.anim-tl-layer-header.is-track-selected,
.anim-tl-channel-header.is-track-selected {
  background: rgba(139, 92, 246, 0.28);
  box-shadow: inset 2px 0 0 var(--accent);
}
.anim-tl-layer-header.is-track-selected .anim-tl-track-name,
.anim-tl-channel-header.is-track-selected .anim-tl-track-channel {
  color: var(--accent);
}
.anim-tl-track-row.is-track-selected {
  background: rgba(139, 92, 246, 0.10);
}

/* Summary key (показывается на layer-row когда свёрнут): чуть меньше
   и светлее, чтобы визуально отличался от ключа в channel-row. */
.anim-tl-key--summary {
  width: 8px;
  height: 8px;
  /* margin reset не нужен — transform translate(-50%, -50%) выше центрирует. */
}

/* Marquee (rect-select) — прозрачная рамка с accent-обводкой. */
.anim-tl-marquee {
  position: absolute;
  background: var(--accent-soft);
  border: 1px dashed var(--accent);
  pointer-events: none;
  z-index: 4;
}
.anim-tl-track-name {
  color: var(--white);
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}
.anim-tl-track-header.is-broken .anim-tl-track-name { color: var(--gray-66); font-style: italic; }
.anim-tl-track-channel {
  color: var(--gray-66);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  flex-shrink: 0;
}

.anim-tl-area {
  position: relative;
  /* width устанавливается из JS = duration * pxPerSec + gutter */
  background: transparent;
  /* Ключи и струны за пределами area.width клипятся — иначе ключ
     с time > duration растягивает scrollWidth и Fit не помогает. */
  overflow: hidden;
}
/* tabindex="-1" + focus(): pointerdown в timeline ставит focus на
   _areaEl, чтобы global Backspace/Delete/X в hotkeys.js удалили keyframe,
   а не выделенный layer. Browser default outline скрываем. */
.anim-tl-area:focus,
.anim-tl-area:focus-visible {
  outline: none;
}
/* Модальная операция G/S над группой ключей (TIMELINE-RECT-SELECT): курсор
   по горизонтали меняет время/масштаб выделения. Подсказываем ew-resize на
   всю область, чтобы было видно, что таймлайн в «захвате». */
.anim-tl-area.is-gs-active,
.anim-tl-area.is-gs-active * {
  cursor: ew-resize;
}
/* Один трек — одна струна посередине. Высота строки 28px, линия в
   геометрическом центре (top: 14px). Ключи позиционируются top:50% =
   ровно на струне. */
.anim-tl-track-row {
  position: relative;
  height: 28px;
}
/* Базовая струна больше не через ::before — рисуется явно через
   .anim-tl-track-string (sermовый сегмент + dashed по краям если есть
   ключи). Это позволяет показать пунктир ДО первого ключа и ПОСЛЕ
   последнего без перерисовки ::before. */
.anim-tl-track-string {
  position: absolute;
  top: 50%;
  height: 1px;
  background: var(--gray-33);
  transform: translateY(-0.5px);
  pointer-events: none;
  z-index: 0;
}
.anim-tl-track-string--dashed {
  background: transparent;
  border-top: 1px dashed var(--gray-44);
  height: 0;
}
/* TIMELINE-KEY-LINK-LINES: сегменты струны между соседними ключами канала.
   --linked — соседи с одинаковым значением (объект держит состояние): прямая
   сплошная связь, ярче базовой струны. --wave — соседи с разным значением (идёт
   переход): волна (период 17px, амплитуда 6px, толщина 1px, цвет --gray-66).
   Вид утверждён Алексеем 2026-07-08. */
.anim-tl-track-string--linked {
  background: var(--gray-66);
}
.anim-tl-track-string--wave {
  height: 15px;
  background-color: transparent;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='17' height='15' viewBox='0 0 17 15'%3E%3Cpath d='M0 7.5 Q4.25 1.5 8.5 7.5 T17 7.5' fill='none' stroke='%235a5a64' stroke-width='1'/%3E%3C/svg%3E");
  background-repeat: repeat-x;
  background-position: left center;
  background-size: 17px 15px;
  transform: translateY(-7.5px);
}
/* Out-of-range overlays — приглушают треки за пределами Action.range. */
.anim-tl-area-dim-left,
.anim-tl-area-dim-right {
  position: absolute;
  top: 0;
  bottom: 0;
  background: rgba(0,0,0,0.35);
  pointer-events: none;
  z-index: 1;
}

.anim-tl-key {
  position: absolute;
  top: 50%;
  width: 10px;
  height: 10px;
  background: var(--accent);
  border: 1px solid var(--white);
  /* Центрируем точно по `left` через transform — учитывает border (10px+2px). */
  transform: translate(-50%, -50%) rotate(45deg);
  border-radius: 1px;
  cursor: ew-resize;
  /* Состояния ключа должны читаться не только по смене оттенка:
     контур отделяет ключ от любой полосы дорожки, а кольца ниже дают
     отдельный силуэт hover/selected без изменения геометрии и hit-area. */
  transition: background-color 0.15s, border-color 0.15s, box-shadow 0.15s;
  z-index: 2;
  user-select: none;
  touch-action: none;
}
.anim-tl-key:hover {
  /* Белый контур заметен и на тёмной, и на zebra-полосе; мягкий accent
     остаётся вторичным сигналом наведения. */
  box-shadow: 0 0 0 1px var(--white), 0 0 0 4px var(--accent-soft);
}
.anim-tl-key.is-selected {
  /* Светлая заливка + тёмный разделительный контур не смешиваются ни с
     playhead (accent-линия), ни с рамкой box-select (accent-soft). */
  background: var(--white);
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--gray-15), 0 0 0 4px var(--accent);
  z-index: 3;
}
.anim-tl-key.is-selected:hover {
  /* Hover выбранного ключа сохраняет selected-контур и добавляет внешний
     светлый слой — состояние не становится похожим на обычный hover. */
  box-shadow: 0 0 0 2px var(--gray-15), 0 0 0 4px var(--accent), 0 0 0 5px var(--white);
}
.anim-tl-key.is-dragging {
  box-shadow: 0 0 0 2px var(--gray-15), 0 0 0 5px var(--accent);
  z-index: 4;
}

/* TIMELINE-CYCLE: технические копии (вариант C) — серые сплошные ромбы
   поменьше. Нередактируемы: нет pointer-обработчиков (рисуются без kfId),
   курсор обычный, без hover-обводки. Чуть приглушены, чтобы родительские
   (яркие accent) ключи явно читались как «оригиналы». */
.anim-tl-key--derived {
  width: 7px;
  height: 7px;
  background: var(--gray-66);
  border-color: var(--gray-44);
  opacity: 0.9;
  cursor: default;
  z-index: 1;            /* под родительскими ключами на случай совпадения */
}
.anim-tl-key--derived:hover { box-shadow: none; }

/* Полоса участка-родителя (период цикла) за ключами. Края — сплошной accent,
   чтобы родитель явно отличался от серых пунктирных границ копий-проходов. */
.anim-tl-cycle-parent-band {
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 1;
  background: var(--accent-soft);
  border-left: 1px solid var(--accent);
  border-right: 1px solid var(--accent);
  /* Хват за полосу (мимо ключей — они выше) двигает весь родительский блок. */
  pointer-events: auto;
  cursor: grab;
  touch-action: none;
}
.anim-tl-cycle-parent-band.is-dragging { cursor: grabbing; }

/* Разделитель проходов цикла (TIMELINE-CYCLE, вариант B): тонкая пунктирная
   вертикальная линия на границе периода — видно, где кончается один проход. */
.anim-tl-cycle-sep {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 0;
  border-left: 1px dashed var(--gray-44);
  pointer-events: none;
  z-index: 1;
}

/* Трек таймингов системы частиц (PARTICLE-TIMING-VIZ): компактная полоска в
   summary-строке слоя частиц. Левый край — первая частица начинает появляться,
   правый — последняя заканчивает исчезать (= куда встаёт «подогнать под частицы»).
   Секции на концах: зелёная — появление (fade-in), красная — исчезновение
   (fade-out), те же семантические цвета, что у контроллера фейдов частиц и оверлея
   траектории. Этап 2: полоску можно тянуть целиком (сдвиг старта системы) — курсор
   grab, захват за тело; фейд-секции pointer-events:none (тело полоски их перекрывает).
   Систему частиц монтируют только внутри слоя «Анимация», поэтому полоска и так не
   появится снаружи; гейт body.is-inside-rlottie-layer — подстраховка. */
.anim-tl-pstrip {
  position: absolute;
  top: 50%;
  height: 10px;
  transform: translateY(-50%);
  background: var(--accent-soft);
  border: 1px solid var(--accent);
  border-radius: var(--r-sm);
  overflow: hidden;
  pointer-events: auto;
  cursor: grab;
  z-index: 1;
}
.anim-tl-pstrip.is-dragging { cursor: grabbing; }
.anim-tl-track-row.has-death-spawn .anim-tl-pstrip--own {
  top: 18px;
}

/* «После смерти»: неинтерактивная engine-owned проекция общего диапазона запусков target. */
.anim-tl-pstrip--event {
  top: 4px;
  height: 5px;
  transform: none;
  overflow: hidden;
  border: 1px solid var(--node-event);
  border-radius: var(--r-sm);
  background: var(--node-event-soft);
  pointer-events: none;
  z-index: 3;
}
/* Ручка правого края — потянуть = изменить время жизни частиц (Этап 3). Узкая зона у
   самого конца поверх фейд-секции; курсор ew-resize; на drag'е тело полоски получает
   is-life-dragging (тот же ew-resize, чтобы курсор не моргал). */
.anim-tl-pstrip-grip {
  position: absolute;
  top: 0;
  bottom: 0;
  right: 0;
  width: 7px;
  pointer-events: auto;
  cursor: ew-resize;
  z-index: 2;
}
.anim-tl-pstrip.is-life-dragging { cursor: ew-resize; }
/* Маркер правого края зелёной секции появления — потянуть = длина появления fadeInLen
   (Этап 4). Узкая зона по центру границы зелёной секции (left задаётся inline); курсор
   ew-resize. При fadeInLen=0 left:0 — половина за overflow:hidden, вторая половина
   остаётся хватаемой у левого края. */
.anim-tl-pstrip-grip-fadein {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 7px;
  transform: translateX(-50%);
  pointer-events: auto;
  cursor: ew-resize;
  z-index: 2;
}
.anim-tl-pstrip-grip-fadein::after,
.anim-tl-pstrip-grip-fadeout::after {
  content: '';
  position: absolute;
  top: 1px;
  bottom: 1px;
  left: 50%;
  width: 1px;
  transform: translateX(-50%);
  background: var(--fade-in);
  box-shadow: 0 0 2px color-mix(in srgb, var(--fade-in) 55%, transparent);
  pointer-events: none;
}
.anim-tl-pstrip-grip-fadeout::after {
  background: var(--fade-out);
  box-shadow: 0 0 2px color-mix(in srgb, var(--fade-out) 55%, transparent);
}
.anim-tl-pstrip-grip-fadein:hover::after,
.anim-tl-pstrip.is-fadein-dragging .anim-tl-pstrip-grip-fadein::after,
.anim-tl-pstrip-grip-fadeout:hover::after,
.anim-tl-pstrip.is-fadeout-dragging .anim-tl-pstrip-grip-fadeout::after {
  width: 2px;
  box-shadow: 0 0 4px currentColor;
}
.anim-tl-pstrip-grip-fadein:hover::after,
.anim-tl-pstrip.is-fadein-dragging .anim-tl-pstrip-grip-fadein::after { color: var(--fade-in); }
.anim-tl-pstrip-grip-fadeout:hover::after,
.anim-tl-pstrip.is-fadeout-dragging .anim-tl-pstrip-grip-fadeout::after { color: var(--fade-out); }
.anim-tl-pstrip.is-fadein-dragging { cursor: ew-resize; }
/* Маркер левого края красной секции исчезновения — потянуть = длина исчезновения
   fadeOutLen (Этап 5). Узкая зона по центру внутренней границы красной секции (left
   задаётся inline = w − fo); курсор ew-resize. При fadeOutLen=0 left=w — у правого края,
   под ручкой жизни (она проверяется раньше); фейд из нуля вытягивают панелью «Появление
   и исчезновение». */
.anim-tl-pstrip-grip-fadeout {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 7px;
  transform: translateX(-50%);
  pointer-events: auto;
  cursor: ew-resize;
  z-index: 2;
}
.anim-tl-pstrip.is-fadeout-dragging { cursor: ew-resize; }
.anim-tl-pstrip-fade {
  position: absolute;
  top: 0;
  bottom: 0;
  pointer-events: none;
}
.anim-tl-pstrip-fade--in {
  left: 0;
  background: linear-gradient(to right, color-mix(in srgb, var(--fade-in) 60%, transparent), transparent);
}
.anim-tl-pstrip-fade--out {
  right: 0;
  background: linear-gradient(to left, color-mix(in srgb, var(--fade-out) 60%, transparent), transparent);
}
body:not(.is-inside-rlottie-layer) .anim-tl-pstrip { display: none; }

/* Интервал импортированного Bodymovin на общей линии. Хват за тело сдвигает
   только этот экземпляр; export берёт то же сохранённое смещение. */
.anim-tl-lottie-strip {
  position: absolute;
  top: 50%;
  height: 10px;
  transform: translateY(-50%);
  background: color-mix(in srgb, var(--gray-cc) 16%, transparent);
  border: 1px solid var(--gray-cc);
  border-radius: var(--r-sm);
  pointer-events: auto;
  cursor: grab;
  z-index: 1;
}
.anim-tl-lottie-strip.is-dragging { cursor: grabbing; }

.anim-tl-cursor {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 1px;
  background: var(--accent);
  box-shadow: 0 0 6px var(--accent);
  pointer-events: none;
  z-index: 6;     /* поверх ruler/range-bar/area */
  will-change: transform;
}
.anim-tl-cursor::before {
  content: '';
  position: absolute;
  top: 4px;
  left: -4px;
  width: 9px;
  height: 9px;
  background: var(--accent);
  transform: rotate(45deg);
  border-radius: 1px;
}

.anim-tl-empty {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: var(--gray-66);
  pointer-events: none;
  z-index: 3;
  text-align: center;
  padding: 0 24px;
  letter-spacing: 0.02em;
}
.anim-tl-empty kbd {
  display: inline-block;
  padding: 1px 6px;
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  background: var(--hover-bg);
  border: 1px solid var(--island-border);
  border-radius: var(--r-sm);
  margin: 0 2px;
  color: var(--white);
}

/* Properties panel: третья колонка animDock body. */
.anim-tl-props {
  border-left: 1px solid var(--island-border);
  background: rgba(255,255,255,0.02);
  padding: 12px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.anim-tl-props-empty {
  font-size: 11px;
  color: var(--gray-66);
  text-align: center;
  padding: 24px 0;
  line-height: 1.5;
}
.anim-tl-props-fields {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.anim-tl-props-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 11px;
  color: var(--gray-cc);
}
.anim-tl-props-row > span {
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 10px;
  color: var(--gray-66);
}
.anim-tl-props-row input,
.anim-tl-props-row select {
  height: 26px;
  padding: 0 8px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--island-border);
  border-radius: var(--r-md);
  color: var(--white);
  font-size: 12px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s;
}
.anim-tl-props-row input:focus,
.anim-tl-props-row select:focus {
  border-color: var(--accent);
}
/* Убираем native spinner у number-input (ввод через клавиши + стрелки
   в keydown handler). */
.anim-tl-props-row input[type="number"]::-webkit-inner-spin-button,
.anim-tl-props-row input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.anim-tl-props-row input[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
}
/* Number-поле с единицей справа (registry PropsPanelField.suffix). */
.anim-tl-props-row > .anim-tl-props-number {
  display: flex;
  align-items: center;
  gap: 6px;
  text-transform: none;
  letter-spacing: normal;
  font-size: 12px;
}
.anim-tl-props-number input { flex: 1; min-width: 0; }
.anim-tl-props-number-suffix { color: var(--gray-66); font-size: 11px; }
/* Строка цвета ключа (канал color): квадратик выбора (тот же .color-swatch,
   что у заливки Solid) + hex-текст рядом. */
.anim-tl-props-color {
  display: flex;
  align-items: center;
  gap: 10px;
}
.anim-tl-props-color .color-swatch {
  width: 26px;
  height: 26px;
}
.anim-tl-props-color-hex {
  flex: 1;
  font-family: var(--font-mono, monospace);
  text-transform: uppercase;
}
.anim-tl-props-del {
  margin-top: 8px;
  justify-content: center;
  color: var(--danger-bg);
  border-color: rgba(239,68,68,0.3);
}
.anim-tl-props-del:hover {
  background: rgba(239,68,68,0.1);
  border-color: var(--danger-bg);
  color: var(--danger-bg);
}

/* ── Редактор кривой easing (Motion Tools 2) — LP-EASING-BEZIER-EDITOR.
   Чипы-пресеты + график кривой с ручками (2D + overshoot) + три ползунка
   (левый усик / правый усик / симметрично). Левый акцент — --ease-start
   (старт), правый — --accent (финиш). */
.anim-tl-ease {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.anim-tl-ease-label {
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 10px;
  color: var(--gray-66);
}
/* Чипы пресетов. */
.anim-tl-ease-chips {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}
.anim-tl-ease-chip {
  font-size: 11px;
  padding: 4px 8px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--island-border);
  border-radius: var(--r-md);
  color: var(--gray-cc);
  cursor: pointer;
  font-family: inherit;
  user-select: none;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.anim-tl-ease-chip:hover {
  border-color: var(--accent);
  color: var(--white);
}
.anim-tl-ease-chip.is-active {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--white);
}
/* График кривой. */
.anim-tl-ease-graph {
  position: relative;
}
.anim-tl-ease-svg {
  display: block;
  width: 100%;
  height: auto;
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--island-border);
  border-radius: var(--r-md);
  touch-action: none;
}
.anim-tl-ease-svg .eg-grid { stroke: rgba(255,255,255,0.05); stroke-width: 1; }
.anim-tl-ease-svg .eg-frame { fill: none; stroke: rgba(255,255,255,0.12); stroke-width: 1; }
.anim-tl-ease-svg .eg-diag { stroke: rgba(255,255,255,0.10); stroke-width: 1; stroke-dasharray: 3 3; }
.anim-tl-ease-svg .eg-handle-line { stroke: var(--accent); stroke-width: 1.5; opacity: 0.5; }
.anim-tl-ease-svg .eg-curve { stroke: var(--accent); stroke-width: 2.5; fill: none; }
.anim-tl-ease-svg .eg-step { stroke: var(--accent); stroke-width: 2.5; fill: none; }
.anim-tl-ease-svg .eg-anchor { fill: var(--white); }
.anim-tl-ease-svg .eg-handle { stroke: #fff; stroke-width: 1.5; cursor: grab; }
.anim-tl-ease-svg .eg-handle:active { cursor: grabbing; }
.anim-tl-ease-svg .eg-handle.is-left  { fill: var(--ease-start); }
.anim-tl-ease-svg .eg-handle.is-right { fill: var(--accent); }
/* Ползунки. */
.anim-tl-ease-sliders {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.anim-tl-ease-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.anim-tl-ease-ico {
  flex: 0 0 16px;
  width: 16px;
  text-align: center;
  color: var(--gray-66);
  font-size: 13px;
  line-height: 1;
}
.anim-tl-ease-row.is-sym .anim-tl-ease-ico { color: var(--accent); }
.anim-tl-ease-slider {
  -webkit-appearance: none;
  appearance: none;
  flex: 1 1 auto;
  min-width: 0;
  height: 4px;
  border-radius: 999px;
  background: rgba(255,255,255,0.10);
  outline: none;
  cursor: pointer;
  padding: 0;
  border: none;
}
.anim-tl-ease-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--accent);
  cursor: grab;
  box-shadow: 0 1px 3px rgba(0,0,0,0.4);
}
.anim-tl-ease-slider::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--accent);
  cursor: grab;
}
.anim-tl-ease-row.is-left .anim-tl-ease-slider::-webkit-slider-thumb { border-color: var(--ease-start); }
.anim-tl-ease-row.is-left .anim-tl-ease-slider::-moz-range-thumb { border-color: var(--ease-start); }
.anim-tl-ease-val {
  flex: 0 0 40px;
  width: 40px;
  height: 24px;
  padding: 0 4px;
  text-align: center;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--island-border);
  border-radius: var(--r-md);
  color: var(--white);
  font-size: 12px;
  font-family: inherit;
  outline: none;
  font-variant-numeric: tabular-nums;
  transition: border-color 0.15s;
}
.anim-tl-ease-val:focus { border-color: var(--accent); }
.anim-tl-ease-row.is-disabled {
  opacity: 0.35;
  pointer-events: none;
}

/* Insert-key popup (T6a) — открывается при K, рядом с курсором. */
.anim-tl-insert-popup {
  position: fixed;
  z-index: 200;
  min-width: 220px;
  background: var(--island-bg);
  border: 1px solid var(--island-border);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-popup);
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.anim-tl-insert-popup-title {
  padding: 6px 10px 4px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gray-66);
}
.anim-tl-insert-popup-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.anim-tl-insert-popup-group + .anim-tl-insert-popup-group {
  border-top: 1px solid var(--island-border);
  margin-top: 5px;
  padding-top: 5px;
}
.anim-tl-insert-popup-group-title {
  padding: 3px 10px 4px;
  color: var(--gray-66);
  font-size: 10px;
}
.anim-tl-insert-popup-item {
  width: 100%;
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  background: transparent;
  border: none;
  border-radius: var(--r-sm);
  color: var(--gray-cc);
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
  text-align: left;
}
.anim-tl-insert-popup-icon {
  width: 16px;
  height: 16px;
  display: grid;
  place-items: center;
  color: currentColor;
}
.anim-tl-insert-popup-icon svg {
  width: 16px;
  height: 16px;
  display: block;
}
.anim-tl-insert-popup-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.anim-tl-insert-popup-item:hover:not(:disabled) {
  background: var(--hover-bg);
  color: var(--white);
}
.anim-tl-insert-popup-item:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}
.anim-tl-insert-popup-item.is-all {
  color: var(--accent);
  border-top: 1px solid var(--island-border);
  margin-top: 4px;
  padding-top: 8px;
}
.anim-tl-insert-popup-item.is-all:hover:not(:disabled) {
  background: var(--accent-soft);
  color: var(--white);
}
.anim-tl-insert-popup-key {
  font-family: monospace;
  font-size: 11px;
  color: var(--gray-66);
  padding: 1px 6px;
  background: var(--hover-bg-sm);
  border-radius: var(--r-sm);
  border: 1px solid var(--island-border);
}
.anim-tl-insert-popup-item:hover .anim-tl-insert-popup-key {
  color: var(--white);
}

/* Action list — список анимаций под табом «Анимации».
   Паттерн рендера copy-from layer list. */

/* Toolbar над списком: широкая primary-кнопка «+ Создать анимацию».
   Лежит в теле вкладки (не в header'е) — иначе tabs «прыгают» по
   ширине при переключении между «Слои» и «Анимации». */
.actions-toolbar {
  display: flex;
  margin-top: 8px;
}
.actions-toolbar .chip {
  flex: 1;
  justify-content: center;
  gap: 6px;
  padding: 6px 10px;
}

/* gap между toolbar и списком — такой же 8px как между header и
   #layerList. Empty-state не схлопывается (нужна заглушка). */
#actionList { margin-top: 8px; }
#actionList:empty::after {
  content: "Пока пусто.";
  display: block;
  padding: 12px 8px;
  font-size: 11px;
  color: var(--gray-66);
  text-align: center;
  line-height: 1.5;
}
/* Action list = layer list 1-в-1.
   Базовые стили строки/имени/actions берутся из .list li (base.css) —
   это даёт идентичный layout, hover, active, fade-gradient у actions
   и т.д. Здесь оставлен только override cursor (без grab — нет drag-
   reorder) и accent-цвет mode-badge для NLA Action'ов. */
.action-item {
  cursor: pointer;
}
/* Inline-rename Action'а — same look что у layer-name.editing. */
.action-item .layer-name[contenteditable="true"] {
  background: rgba(255,255,255,0.06);
  border-radius: var(--r-sm);
  padding: 1px 4px;
  margin: -1px -4px;
  outline: none;
}

/* Режим анимации (anim-mode) — body-класс ставится при openAnimDock.
   tool-group из `.toolbar-island` + separator скрываются — создавать
   слои в anim-mode нельзя, только анимировать существующие. Остров
   сжимается до mode-group (по фидбеку Алексея — лучше так чем
   пустое место в острове). Сжатие приводит к смещению по X
   из-за пересчёта flex-центровки top-toolbar'а — это trade-off за
   визуальную чистоту острова.
   Эпик «Растровая жизнь», Срез 2: ВНУТРИ слоя «Анимация» таймлайн постоянен
   (всегда anim-mode), но создавать обычные слои там нужно (их и анимируем) —
   поэтому кнопки-создатели прячем только ВНЕ слоя. Спец-кнопки, которые внутри
   слоя не нужны (#addRlottieBtn / #addInteractiveAnimationBtn / #addHintBtn /
   #smDockToggleBtn), скрыты отдельным гейтом body.is-inside-rlottie-layer в
   editor.css. */
body.anim-mode:not(.is-inside-rlottie-layer) .toolbar-island__group--tool,
body.anim-mode:not(.is-inside-rlottie-layer) .toolbar-island__sep {
  display: none !important;
}
/* Панель «Холст» (W/H + «Ок» + «Холст по слою») освобождает правую колонку
   под анимацию, КОГДА снизу открыт таймлайн (anim-mode) в ГЛАВНОМ редакторе.
   BUG-ANIM-CANVAS-SIZE-PANEL-HIDDEN (2026-06-27): внутри слоя «Анимация»
   таймлайн постоянен (всегда anim-mode), поэтому без этого гейта панель
   размера холста там не показывалась НИКОГДА. У слоя свой размер холста
   (inner-canvas, как у IA) — он должен быть редактируемым изнутри. Гейт
   :not(.is-inside-rlottie-layer) — ровно как у соседних правил тулбара
   (строки 982-984). */
body.anim-mode:not(.is-inside-rlottie-layer) .right_panel .panel[data-description="Настройка холста"] {
  display: none !important;
}
