/* fybri — монтаж фильма: раскладка CapCut в светлой оболочке студии.
   Сцена превью тёмная (кадр должен читаться как в плеере), остальное — токены styles.css. */

.view--montage { padding: 0 18px 14px 16px; overflow: hidden; }

/* isolation: z-index превью и таймлайна не выходят за редактор и не лезут поверх модалок */
.mt {
  isolation: isolate;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto auto;
  gap: 10px;
  height: 100%;
  min-height: 0;
}

/* ---------- шапка проекта ---------- */

.mt-top {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  background: #fff;
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(66, 107, 187, .055);
  min-width: 0;
}
.mt-top__projects { width: 210px; padding-top: 8px; padding-bottom: 8px; font-size: 13px; }
.mt-top__title { width: 240px; padding: 8px 11px; font-size: 14px; font-weight: 650; }
.mt-top__right { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.mt-top .btn { white-space: nowrap; }
.mt-top__stat { font-size: 12px; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.mt-save { font-size: 11.5px; color: var(--dim); white-space: nowrap; }
.mt-save--saved::before { content: "✓ "; color: var(--ok); }
.mt-save--error { color: #c64168; }

/* ---------- средний ряд: медиатека · превью · инспектор ---------- */

.mt-body {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr) 312px;
  gap: 10px;
  min-height: 0;
}

.mt-bin, .mt-insp {
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: #fff;
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(66, 107, 187, .055);
}

.mt-tabs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 3px; padding: 8px 8px 0; }
.mt-tab {
  padding: 7px 4px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.mt-tab:hover { color: #2446b0; background: #f4f8ff; }
.mt-tab.is-active { color: #1648d6; background: linear-gradient(110deg, #eafbff, #fceaff); border-color: #bccffc; }

.mt-bin__list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: start;
  gap: 8px;
  padding: 10px;
  overflow-y: auto;
  min-height: 0;
}
.mt-bin__empty { grid-column: 1 / -1; margin: 6px 2px; font-size: 12px; color: var(--dim); }
.mt-upload { grid-column: 1 / -1; padding: 12px 10px; font-size: 12px; text-align: center; }

.mt-bincard {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  cursor: grab;
}
.mt-bincard:active { cursor: grabbing; }
.mt-bincard__thumb {
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: 9px;
  overflow: hidden;
  background: #0d1428;
  border: 1px solid var(--line);
}
.mt-bincard__thumb video, .mt-bincard__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.mt-bincard__badge {
  position: absolute;
  right: 4px;
  bottom: 4px;
  padding: 1px 6px;
  border-radius: 6px;
  background: rgba(8, 12, 30, .72);
  color: #fff;
  font-size: 10.5px;
}
.mt-bincard__name { font-size: 11.5px; color: #3a4a6d; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mt-bincard__add {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 8px;
  background: var(--grad);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  transition: opacity .12s;
}
.mt-bincard:hover .mt-bincard__add, .mt-bincard__add:focus-visible { opacity: 1; }
.mt-bincard--audio { grid-column: 1 / -1; flex-direction: row; align-items: center; gap: 8px; }
.mt-bincard--audio .mt-bincard__thumb { flex: 0 0 44px; aspect-ratio: 1; }
.mt-bincard--audio .mt-bincard__add { position: static; opacity: 1; margin-left: auto; flex: 0 0 24px; }
.mt-bin__wave {
  display: grid;
  place-items: center;
  height: 100%;
  background: linear-gradient(135deg, #1cbf8a, #2879ed);
  color: #fff;
  font-size: 18px;
}

.mt-tts {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfcff;
}
.mt-tts__head { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--dim); }
.mt-tts .input--area { min-height: 64px; }

.mt-music { background: linear-gradient(135deg, #fbf6ff, #f3f7ff); }
.mt-music__presets { gap: 4px; }
.mt-music__presets .chip, .mt-music .chips .chip { padding: 4px 8px; font-size: 11.5px; }
.mt-check { display: flex; align-items: center; gap: 6px; font-size: 12px; color: #3a4a6d; cursor: pointer; }

/* превью */

.mt-viewer {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  border-radius: 16px;
  overflow: hidden;
  background: #0b1020;
  box-shadow: 0 8px 24px rgba(28, 44, 90, .18);
}

.mt-stage {
  position: relative;
  flex: 1;
  min-height: 160px;
  display: grid;
  place-items: center;
  padding: 8px;
  background: radial-gradient(circle at 50% 40%, #182240, #0b1020 70%);
}
.mt-stage.is-over { box-shadow: inset 0 0 0 2px #5791ef; }

.mt-frame {
  position: relative;
  overflow: hidden;
  background: #000;
  box-shadow: 0 10px 40px rgba(0, 0, 0, .5);
}

.mt-layer {
  position: absolute;
  inset: 0;
  overflow: hidden;
  opacity: 0;
  background-size: cover;
  background-position: center;
}
.mt-layer video, .mt-layer img {
  position: relative;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform-origin: center;
}
.mt-layer.is-contain video, .mt-layer.is-contain img { object-fit: contain; }
/* «размытый фон»: у картинки фон слоя — тот же кадр, размытый */
.mt-layer.is-blurfit::before {
  content: "";
  position: absolute;
  inset: -24px;
  background: inherit;
  filter: blur(18px) brightness(.8);
}

.mt-titles { position: absolute; inset: 0; z-index: 50; pointer-events: none; }
.mt-cap {
  position: absolute;
  left: 7%;
  right: 7%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .18em;
  font-family: var(--font);
  font-weight: 800;
  line-height: 1.12;
  text-align: center;
  text-shadow: 0 2px 3px rgba(0, 0, 0, .55);
  pointer-events: auto;
  cursor: pointer;
}
.mt-cap span { padding: 0 .28em; border-radius: .12em; white-space: pre-wrap; }
.mt-cap--box span { background: rgba(0, 0, 0, .5); text-shadow: none; }
.mt-cap--top { top: 8%; }
.mt-cap--center { top: 50%; transform: translateY(-50%); }
.mt-cap--lower { top: 66%; }
.mt-cap--bottom { bottom: 9%; }
.mt-cap.is-selected span { outline: 1px dashed rgba(255, 255, 255, .8); outline-offset: 2px; }

.mt-fadeover { position: absolute; inset: 0; z-index: 60; background: #000; opacity: 0; pointer-events: none; }

.mt-empty {
  position: absolute;
  inset: 0;
  z-index: 70;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 16px;
  color: #c7d3ee;
  text-align: center;
  font-size: 12.5px;
  background: repeating-linear-gradient(45deg, #0d1427 0 12px, #10182e 12px 24px);
}
.mt-empty b { color: #fff; font-size: 14px; }

.mt-transport {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 7px 10px;
  border-top: 1px solid rgba(255, 255, 255, .07);
  background: #0e1428;
  color: #cfd8f0;
}
.mt-tbtn {
  min-width: 32px;
  height: 30px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #dbe4ff;
  font-size: 15px;
  cursor: pointer;
}
.mt-tbtn:hover { background: rgba(255, 255, 255, .08); }
.mt-tbtn--play { min-width: 40px; background: var(--grad); color: #fff; }
.mt-tbtn--play:hover { background: var(--grad); filter: brightness(1.08); }
.mt-time { margin-left: 8px; font-family: var(--mono); font-size: 12px; font-variant-numeric: tabular-nums; }
.mt-note { margin-left: auto; flex: 1 1 140px; min-width: 0; font-size: 10.5px; line-height: 1.3; color: #7f8db0; text-align: right; }
.mt-transport { flex-wrap: wrap; row-gap: 2px; }

/* инспектор */

.mt-insp { gap: 10px; padding: 12px; overflow-y: auto; }
.mt-insp__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.mt-insp__head h3 { font-size: 15px; font-weight: 720; }
.mt-insp__head p { margin: 2px 0 0; font-size: 11.5px; color: var(--dim); }
.mt-insp__audio { width: 100%; height: 34px; }
.mt-group { padding: 11px; gap: 8px; }
.mt-sub { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.mt-knob { display: flex; flex-direction: column; gap: 2px; }
.mt-knob__label { font-size: 12px; color: #3a4a6d; }
.mt-knob .slider__value { min-width: 50px; }
.mt-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.mt-row--end { justify-content: flex-end; }
.mt-numfield { display: flex; flex-direction: column; gap: 3px; flex: 1; min-width: 90px; font-size: 11.5px; color: var(--muted); }
.mt-num { font-variant-numeric: tabular-nums; }
.mt-hint { font-size: 11px; color: var(--dim); }
.mt-hint--block { display: block; margin: 0; line-height: 1.45; }
.mt-group .chips { gap: 5px; }
.mt-group .chip { padding: 5px 9px; font-size: 12px; }
.mt-trans-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; }
.mt-trans-grid .chip { padding: 6px 4px; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.mt-grades { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.mt-grade {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  font-size: 10.5px;
  color: #53627f;
}
.mt-grade i {
  display: block;
  aspect-ratio: 4 / 3;
  border-radius: 8px;
  border: 2px solid transparent;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0) 55%, rgba(0, 0, 0, .35)),
    linear-gradient(120deg, #f3b37a 0%, #e0785c 30%, #4e8fd1 62%, #1f4f6f 100%);
}
.mt-grade.is-active i { border-color: #3d6dff; box-shadow: 0 0 0 2px #dbe6ff; }
.mt-grade.is-active span { color: #1648d6; font-weight: 700; }

.mt-colors { display: flex; gap: 6px; }
.mt-color {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid #dbe4f7;
  cursor: pointer;
}
.mt-color.is-active { border-color: #3d6dff; box-shadow: 0 0 0 2px #dbe6ff; }

/* ---------- панель инструментов ---------- */

.mt-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  padding: 7px 10px;
  background: #fff;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
}
.mt-tool { padding: 6px 10px; }
.mt-toolbar__sep { width: 1px; height: 20px; background: var(--line); margin: 0 4px; }
.mt-snap { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: #3a4a6d; cursor: pointer; }
.mt-zoom { display: flex; align-items: center; gap: 6px; margin-left: auto; color: var(--dim); font-size: 13px; }
.mt-zoom input { width: 150px; }

/* ---------- таймлайн ---------- */

.mt-timeline {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  /* 24 линейка + 70 видео + 3 × 46 дорожки + место под горизонтальный скролл */
  height: 246px;
  background: #fff;
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(66, 107, 187, .055);
}

.mt-heads { display: flex; flex-direction: column; border-right: 1px solid var(--line-soft); background: #fafcff; }
.mt-head {
  display: flex;
  align-items: center;
  height: 70px;
  padding: 0 10px;
  font-size: 11.5px;
  font-weight: 650;
  color: #53627f;
  border-bottom: 1px solid var(--line-soft);
}
.mt-head--ruler { height: 24px; }
.mt-head--sm { height: 46px; }

.mt-scroll { overflow-x: auto; overflow-y: hidden; min-width: 0; }
.mt-tracks { position: relative; min-width: 100%; user-select: none; touch-action: pan-y; }

.mt-ruler {
  position: relative;
  height: 24px;
  border-bottom: 1px solid var(--line-soft);
  background: #fafcff;
  cursor: ew-resize;
}
.mt-tick {
  position: absolute;
  top: 0;
  bottom: 0;
  padding: 5px 0 0 4px;
  border-left: 1px solid #cad6ee;
  font-family: var(--mono);
  font-size: 10px;
  color: #8592ad;
  pointer-events: none;
}

.mt-track {
  position: relative;
  height: 70px;
  border-bottom: 1px solid var(--line-soft);
  background: linear-gradient(180deg, #fbfcff, #f6f9ff);
}
.mt-track--sm { height: 46px; }
.mt-track.is-over { background: #eef4ff; box-shadow: inset 0 0 0 2px #9dbbff; }

.mt-item {
  position: absolute;
  top: 5px;
  bottom: 5px;
  border-radius: 9px;
  overflow: hidden;
  cursor: grab;
  box-shadow: 0 2px 6px rgba(30, 50, 110, .15);
}
.mt-item.is-selected { outline: 2px solid #ffb020; outline-offset: 0; z-index: 90 !important; }
.mt-item.is-dragging { opacity: .75; cursor: grabbing; z-index: 95 !important; box-shadow: 0 8px 22px rgba(30, 50, 110, .3); }

.mt-clip { background: linear-gradient(135deg, #3d6dff, #8b46ff); color: #fff; }
.mt-clip--image { background: linear-gradient(135deg, #0aa3c2, #3d6dff); }
.mt-clip__thumb { position: absolute; inset: 0; }
.mt-clip__thumb video, .mt-clip__thumb img { width: 100%; height: 100%; object-fit: cover; opacity: .55; pointer-events: none; }
.mt-clip__label {
  position: absolute;
  inset: auto 0 0 0;
  display: flex;
  flex-direction: column;
  padding: 3px 9px 4px;
  font-size: 11px;
  line-height: 1.3;
  background: linear-gradient(180deg, transparent, rgba(8, 12, 40, .7));
  white-space: nowrap;
  overflow: hidden;
}
.mt-clip__label span { overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.mt-clip__label b { font-weight: 500; opacity: .85; font-size: 10.5px; }

.mt-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 8px;
  z-index: 3;
  cursor: ew-resize;
  background: rgba(255, 255, 255, .0);
}
.mt-handle--l { left: 0; }
.mt-handle--r { right: 0; }
.mt-item:hover .mt-handle, .mt-item.is-selected .mt-handle { background: rgba(255, 255, 255, .85); }
.mt-item.is-selected .mt-handle { background: #ffb020; }

.mt-trans {
  position: absolute;
  top: 50%;
  z-index: 92;
  width: 22px;
  height: 22px;
  margin: -11px 0 0 -11px;
  border: 1px solid #c6d4f3;
  border-radius: 7px;
  background: #fff;
  color: #6a7a9c;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
  opacity: .8;
}
.mt-trans:hover { opacity: 1; border-color: #5791ef; color: #1648d6; }
.mt-trans.is-on { background: #ffb020; border-color: #ffb020; color: #3a2600; opacity: 1; }

.mt-dropmark { position: absolute; top: 2px; bottom: 2px; width: 3px; margin-left: -1px; border-radius: 2px; background: #ffb020; z-index: 99; }

.mt-titleblk { background: linear-gradient(135deg, #ffb020, #ff7a45); color: #3a1d00; }
.mt-titleblk__text { display: block; padding: 0 10px; font-size: 11.5px; font-weight: 700; line-height: 36px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.mt-audio { background: linear-gradient(135deg, #16b87f, #0f8f86); color: #fff; }
.mt-audio--music { background: linear-gradient(135deg, #dc3ddd, #6841eb); }
.mt-audio--sfx { background: linear-gradient(135deg, #5d6b8a, #384562); }
.mt-wave { position: absolute; left: 0; top: 0; height: 100%; opacity: .55; pointer-events: none; }
.mt-audio__name {
  position: relative;
  display: block;
  padding: 0 10px;
  font-size: 11px;
  font-weight: 650;
  line-height: 36px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .35);
}

.mt-playhead {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  margin-left: -1px;
  z-index: 100;
  background: #ff3f5e;
  pointer-events: none;
}
.mt-playhead i {
  position: absolute;
  top: 0;
  left: -6px;
  width: 14px;
  height: 14px;
  border-radius: 3px 3px 7px 7px;
  background: #ff3f5e;
  pointer-events: auto;
  cursor: ew-resize;
}

/* ---------- авто-режиссёр ---------- */

.mt { grid-template-rows: auto auto minmax(0, 1fr) auto auto auto; }
.mt-director[hidden] { display: none; }
.dr-banner {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 16px;
  padding: 10px 14px;
  border: 1px solid #cfdcfb;
  border-radius: 14px;
  background: linear-gradient(110deg, #eef9ff, #f6efff 60%, #fff6e8);
}
.dr-banner--ready, .dr-banner--failed { background: #fff8e9; border-color: #f4dc9b; }
.dr-banner__text { display: flex; flex-direction: column; min-width: 220px; flex: 1; font-size: 12px; color: var(--muted); }
.dr-banner__text b { color: var(--text); font-size: 13.5px; }
.dr-banner__chips { display: flex; flex-wrap: wrap; gap: 4px; }
.dr-banner__bar { width: 100%; }
.dr-chip {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 7px;
  font-size: 11px;
  font-weight: 700;
  background: #e3eaf8;
  color: #53627f;
}
.dr-chip--running { background: #dbe6ff; color: #1648d6; animation: drpulse 1.4s ease-in-out infinite; }
.dr-chip--completed { background: #c9f1dd; color: #0d7a4f; }
.dr-chip--failed { background: #ffd9e2; color: #b3264d; }
@keyframes drpulse { 50% { opacity: .5; } }

.dr { width: min(860px, 100%); max-height: min(92vh, 900px); }
.dr__steps { display: flex; gap: 6px; padding: 10px 18px 0; }
.dr__step { padding: 4px 10px; border-radius: 999px; font-size: 12px; color: var(--dim); background: #f4f7fd; }
.dr__step.is-active { color: #1648d6; background: linear-gradient(110deg, #e8f8ff, #f5ecff); font-weight: 700; }
.dr__body { gap: 12px; }
.dr__field { gap: 5px; }
.dr__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.dr__group { gap: 10px; }
.dr__row { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 8px; }
.dr__logline { margin: 0; font-size: 13px; color: #3a4a6d; font-style: italic; }
.dr__more summary { cursor: pointer; font-size: 12.5px; color: #3956b6; margin-bottom: 8px; }
.dr__more { display: flex; flex-direction: column; gap: 8px; }
.dr__scene { display: flex; flex-direction: column; gap: 6px; padding: 10px; border: 1px solid var(--line); border-radius: 12px; background: #fbfcff; }
.dr__scenehead { display: flex; align-items: center; gap: 6px; }
.dr__num { display: grid; place-items: center; flex: 0 0 26px; height: 26px; border-radius: 8px; background: var(--grad); color: #fff; font-weight: 800; font-size: 12px; }
.dr__stitle { flex: 1 1 auto; min-width: 120px; width: auto; font-weight: 650; }
.dr__scenehead .input--select { flex: 0 0 auto; width: auto; }
.dr__dur { width: 82px; }
.dr__scenehead .input--select { padding-top: 6px; padding-bottom: 6px; }
.dr__prompt { min-height: 62px; font-size: 12.5px; }
.dr__narr { min-height: 44px; font-size: 12.5px; background: #f6fbf8; }
.dr__motion { min-height: 44px; font-size: 12.5px; background: #fbf8f1; }
.dr__end { min-height: 34px; font-size: 12.5px; background: #f7f5fb; }
.dr__words { font-size: 11px; color: var(--dim); }
.dr__words.is-over { color: #c64168; font-weight: 600; }
.dr__foot { flex-wrap: wrap; }
.dr__foot .btn--primary { margin-left: auto; }
.dr__cost { font-size: 12px; color: var(--muted); }
.dr__cost b { color: var(--text); font-size: 14px; }

.dr-hero { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 12px; align-items: start; }
.dr-hero__img { width: 120px; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 12px; border: 1px solid var(--line); background: #eef3ff; }
.dr-hero__img--empty { display: grid; place-items: center; font-size: 12px; color: var(--dim); }
.dr-hero__side { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.dr__row--btns { display: flex; flex-wrap: wrap; gap: 6px; }
.dr__kfbar { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.dr__kf { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.dr__kf img, .dr__kfempty { width: 168px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 9px; border: 1px solid var(--line); background: #eef3ff; }
.dr__kfempty { display: grid; place-items: center; font-size: 11px; color: var(--dim); }
.dr__kfside { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.dr__herochip { font-size: 12px; color: var(--dim); }
.dr-hero__img--wide { aspect-ratio: 16 / 9; width: 160px; }
.dr-cast__group { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); }
.dr__castchips { display: flex; flex-wrap: wrap; gap: 4px; }
.dr__check { margin: 0; padding: 0; list-style: none; font-size: 11.5px; line-height: 1.35; color: var(--dim); max-width: 340px; }
.dr__check.is-ok { color: #1f8a4c; }
.dr__check.is-warn { color: #b25d00; }
.dr__herochip.is-on { color: inherit; }
.dr__kfimg { cursor: zoom-in; transition: transform .15s; }
.dr__kfimg:hover { transform: scale(1.03); }
.kfzoom { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 48px 64px; }
.kfzoom__backdrop { position: absolute; inset: 0; background: rgba(4, 4, 8, .9); cursor: zoom-out; }
.kfzoom__img { position: relative; max-width: 100%; max-height: calc(100vh - 120px); object-fit: contain; border-radius: 10px; box-shadow: 0 20px 60px rgba(0, 0, 0, .5); }
.kfzoom__cap { position: absolute; left: 0; right: 0; bottom: 14px; text-align: center; color: #fff; font-size: 13px; white-space: pre; text-shadow: 0 1px 3px #000; pointer-events: none; }
.kfzoom__nav, .kfzoom__close { position: absolute; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .14); color: #fff; cursor: pointer; }
.kfzoom__nav:hover, .kfzoom__close:hover { background: rgba(255, 255, 255, .28); }
.kfzoom__nav { top: 50%; width: 44px; height: 44px; margin-top: -22px; font-size: 26px; line-height: 1; }
.kfzoom__nav--prev { left: 12px; }
.kfzoom__nav--next { right: 12px; }
.kfzoom__close { top: 12px; right: 12px; width: 36px; height: 36px; font-size: 16px; }
@media (max-width: 600px) { .kfzoom { padding: 48px 8px; } .kfzoom__nav { top: auto; bottom: 40px; } }
.mt-kfthumb { width: 100%; border-radius: 9px; border: 1px solid var(--line); }

@media (max-width: 760px) {
  .dr__grid, .dr__row { grid-template-columns: 1fr; }
  .dr__scenehead { flex-wrap: wrap; }
  .dr-hero { grid-template-columns: 1fr; }
}

/* ---------- ритм, точный кадр, логотип, площадки ---------- */

.mt-beat { position: absolute; top: 0; bottom: 0; width: 1px; background: rgba(255, 255, 255, .35); pointer-events: none; }
.mt-beat--bar { background: rgba(255, 255, 255, .8); width: 2px; }
.mt-bpm { font-size: 12.5px; color: var(--text); }
.mt-tbtn--text { min-width: 0; padding: 0 9px; font-size: 12px; white-space: nowrap; }
.mt-exact { position: absolute; inset: 0; z-index: 65; background: #000; }
.mt-exact img { width: 100%; height: 100%; object-fit: contain; display: block; }
.mt-exact__badge { position: absolute; left: 8px; top: 8px; padding: 2px 8px; border-radius: 6px; background: rgba(0, 0, 0, .65); color: #7ce8c4; font-size: 11px; }
.mt-wm { position: absolute; z-index: 55; pointer-events: none; }
.mt-wmpicks { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 5px; }
.mt-wmpick { padding: 0; aspect-ratio: 1; border: 2px solid transparent; border-radius: 8px; overflow: hidden; background: #eef3ff; cursor: pointer; }
.mt-wmpick img { width: 100%; height: 100%; object-fit: contain; display: block; }
.mt-wmpick.is-active { border-color: #3d6dff; }
.mt-platforms { display: flex; flex-wrap: wrap; gap: 5px; }
.mt-wmpick--face img { object-fit: cover; }

/* ---------- субтитры по речи ---------- */

.mt-capline {
  position: absolute;
  left: 6%;
  right: 6%;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0 .28em;
  font-family: var(--font);
  font-weight: 800;
  line-height: 1.15;
  text-align: center;
  color: #fff;
  pointer-events: none;
  -webkit-text-stroke: .06em #000;
  paint-order: stroke fill;
  text-shadow: 0 .06em .08em rgba(0, 0, 0, .6);
}
.mt-capline--bottom { bottom: 9%; }
.mt-capline--center { top: 50%; transform: translateY(-50%); }
.mt-capline--top { top: 8%; }
.mt-capline--highlight .mt-capw.is-on, .mt-capline--pop .mt-capw.is-on, .mt-capline--box .mt-capw.is-on { color: var(--acc); }
.mt-capline--pop .mt-capw { transition: transform .08s; }
.mt-capline--pop .mt-capw.is-on { transform: scale(1.15); }
.mt-capline--box { -webkit-text-stroke: 0; text-shadow: none; }
.mt-capline--box .mt-capw { padding: 0 .12em; background: rgba(0, 0, 0, .55); }
.mt-capline--karaoke .mt-capw {
  -webkit-text-stroke: .06em #000;
  background: linear-gradient(90deg, var(--acc) var(--fill, 0%), #fff var(--fill, 0%));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.mt-capline--karaoke .mt-capw.is-past { --fill: 100%; }
.mt-capline--word .mt-capw { animation: mtpop .12s ease-out; }
@keyframes mtpop { from { transform: scale(1.18); } to { transform: scale(1); } }

.mt-capblk {
  position: absolute;
  top: 34px;
  height: 6px;
  border-radius: 3px;
  background: #8b46ff;
  opacity: .55;
  pointer-events: none;
}

.mt-capstyles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.mt-capstyle {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 7px 4px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #1b2338;
  color: #fff;
  cursor: pointer;
  font-size: 10.5px;
}
.mt-capstyle b { font-size: 14px; font-weight: 800; -webkit-text-stroke: .5px #000; }
.mt-capstyle span { color: #c7d3ee; }
.mt-capstyle--highlight b, .mt-capstyle--pop b { color: #ffd400; }
.mt-capstyle--box b { background: rgba(0, 0, 0, .6); padding: 0 4px; -webkit-text-stroke: 0; }
.mt-capstyle--karaoke b { background: linear-gradient(90deg, #ffd400 55%, #fff 55%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.mt-capstyle--cinema b { font-family: 'PT Sans', var(--font); font-weight: 700; -webkit-text-stroke: 0; text-shadow: 0 1px 3px rgba(0, 0, 0, .8); }
.mt-capline--cinema { font-family: 'PT Sans', var(--font); font-weight: 700; text-shadow: 0 0 2px rgba(0, 0, 0, .7), 0 2px 4px rgba(0, 0, 0, .55); }
.mt-capline--cinema .mt-capw { -webkit-text-stroke: 0; color: #fff; }
.mt-capstyle.is-active { box-shadow: 0 0 0 2px #ffb020; border-color: #ffb020; }

/* ---------- рецепты режиссёра ---------- */

.dr-recipes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.dr-recipe {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  text-align: left;
  cursor: pointer;
  font-family: var(--font);
}
.dr-recipe b { font-size: 13px; color: var(--text); }
.dr-recipe span { font-size: 11px; color: var(--dim); }
.dr-recipe:hover { border-color: #a9beee; background: #f7faff; }
.dr-recipe.is-active { border-color: #638cf5; box-shadow: inset 0 0 0 1px #638cf5; background: linear-gradient(110deg, #eef9ff, #f6efff); }

@media (max-width: 760px) {
  .dr-recipes, .mt-capstyles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- фильм агенту AIVID ---------- */

.av { width: min(620px, 100%); }
.av-film { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 12px; align-items: start; }
.av-film video, .av-film img { width: 150px; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 10px; background: #0b1020; }
.av-film > div { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.av-agent { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: #fff; cursor: pointer; }
.av-agent.is-active { border-color: #638cf5; box-shadow: inset 0 0 0 1px #638cf5; background: #f7faff; }
.av-agent__meta { display: flex; flex-direction: column; gap: 1px; flex: 1; min-width: 0; }
.av-add summary { cursor: pointer; font-size: 12.5px; color: #3956b6; margin: 4px 0 8px; }
.av-add .input { flex: 1; min-width: 200px; }
#av-foot { justify-content: flex-end; }

/* бренд-кит */
.br { width: min(640px, 100%); }
#br-body { display: flex; flex-direction: column; gap: 10px; }
#br-body > .btn { align-self: flex-start; }
#br-foot { justify-content: flex-end; }
#br-foot .btn--ghost { margin-right: auto; }
.mt-wmpick video { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }

/* ---------- экспорты ---------- */

.mt-renders { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.mt-renders:empty { display: none; }
.mt-renders__title { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--dim); }
.mt-render {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  font-size: 12px;
}
.mt-render__meta { display: flex; flex-direction: column; min-width: 0; max-width: 260px; }
.mt-render__meta b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mt-render__meta span { color: var(--dim); font-size: 11px; }
.mt-render--failed { border-color: #f1bfcd; background: #fff6f8; }
.mt-render--completed { border-color: #bfe8d6; }
.mt-render__bar { width: 110px; height: 5px; border-radius: 99px; background: #e3eaf8; overflow: hidden; }
.mt-render__bar i { display: block; height: 100%; background: var(--grad); transition: width .4s; }

/* ---------- адаптив ---------- */

@media (max-width: 1280px) {
  .mt-body { grid-template-columns: 210px minmax(0, 1fr) 280px; }
  .mt-top__title { width: 180px; }
  .mt-note { display: none; }
}

@media (max-width: 980px) {
  .view--montage { overflow-y: auto; }
  .mt { height: auto; grid-template-rows: none; }
  .mt-body { grid-template-columns: 1fr; }
  .mt-stage { min-height: 240px; height: 42vh; }
  .mt-bin { max-height: 280px; }
  .mt-bin__list { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
  .mt-insp { max-height: none; overflow: visible; }
  .mt-top { flex-wrap: wrap; }
  .mt-top__right { width: 100%; justify-content: space-between; }
}

@media (max-width: 760px) {
  .view--montage { padding: 0 12px 20px; }
  .mt-top__projects, .mt-top__title { width: 100%; }
  .mt-timeline { grid-template-columns: 58px minmax(0, 1fr); }
  .mt-head { font-size: 10px; padding: 0 6px; }
  .mt-zoom { margin-left: 0; }
  .mt-zoom input { width: 110px; }
}
