/* ═══ Клип: доска кадров (задача 11) ═════════════════════════════════
   Снимают ночью: всё на тёмном, без белых плашек, текст не ярче #F4F1EC, цели касания от 44 px.
   · карточка кадра как карточки «Музыки» (#161618, радиус 24, волосок), тон раздела розовый;
   · наша болванка помечена розовой плашкой, свет подписан тёплым жёлтым, как свет на площадке;
   · лента медиа выходит к краям карточки: плитка 62 % ширины экрана, видно начало следующей;
   · на весь экран чёрный фон, внизу перемотка, шаг по кадру и замедление.
   Каркас страницы, шапка и «+» из css/more.css и css/music.css. */

.cb { gap: 14px; }

/* ── шапка и сводка ───────────────────────────────────────────── */
.cb-head-l { display: flex; align-items: center; gap: 4px; min-width: 0; }
.cb-back { flex: none; margin-left: -10px; }
.cb-head .page-head-txt { min-width: 0; }
.cb-head .eyebrow { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cb-order {
  flex: none; min-height: 44px; padding: 0 16px; border-radius: 22px; border: 1px solid rgba(232, 144, 210, .35);
  color: #E890D2; font-size: 14px; white-space: nowrap; transition: background-color .15s, color .15s;
}
.cb-order:hover { background: rgba(232, 144, 210, .08); }
.cb-order.on { background: #E890D2; border-color: #E890D2; color: #1A0F17; font-weight: 600; }
.cb-offline {
  padding: 12px 14px; border-radius: 16px; background: rgba(242, 193, 78, .08); border: 1px solid rgba(242, 193, 78, .28);
  font-size: 14px; line-height: 1.45; color: #EBDDB6;
}
.cb-bar { display: flex; align-items: flex-start; gap: 8px; }
.cb-sum { flex: 1; min-width: 0; padding-top: 12px; font-family: var(--mono); font-size: 13px; line-height: 1.6; color: var(--ink-2); }
.cb-sum span + span::before { content: ' · '; color: var(--ink-3); }
.cb-sum b { font-weight: 500; color: #F2C14E; }

/* ── карточка кадра ───────────────────────────────────────────── */
.cb-list { display: flex; flex-direction: column; gap: 14px; }
.cb-shot {
  display: flex; flex-direction: column; gap: 12px; padding: 8px 0 14px; border-radius: 24px;
  background: var(--surface); border: 1px solid var(--line); scroll-margin: 16px;
}
.cb-shot > :not(.cb-strip) { margin: 0 16px; }
.cb-shot-head { display: flex; align-items: center; gap: 10px; min-height: 48px; }
.cb-code { flex: none; font-family: var(--disp); font-size: 22px; font-weight: 700; letter-spacing: -.01em; color: #FFF6FB; }
.cb-time { flex: none; font-family: var(--mono); font-size: 13px; color: var(--ink-2); white-space: nowrap; }
.cb-prio {
  flex: none; display: inline-flex; align-items: center; min-height: 26px; padding: 0 10px; border-radius: 13px;
  font-size: 12px; font-weight: 600; white-space: nowrap;
}
.cb-prio.is-must { background: rgba(242, 193, 78, .12); border: 1px solid rgba(242, 193, 78, .38); color: #F2C14E; }
.cb-prio.is-nice { border: 1px dashed rgba(255, 255, 255, .2); color: var(--ink-3); font-weight: 500; }
.cb-min { flex: 1; min-width: 0; text-align: right; font-family: var(--mono); font-size: 13px; color: var(--ink-2); white-space: nowrap; }
.cb-edit { flex: none; margin-right: -10px; color: var(--ink-3); }
.cb-what { font-size: 15px; line-height: 1.45; color: var(--ink); overflow-wrap: anywhere; }

/* ── лента медиа: наш кадр → движение → свет ─────────────────── */
.cb-strip {
  display: flex; gap: 10px; overflow-x: auto; padding: 2px 16px 2px; scroll-padding: 0 16px;
  scroll-snap-type: x mandatory; overscroll-behavior-x: contain; scrollbar-width: none;
}
.cb-strip::-webkit-scrollbar { display: none; }
.cb-tile {
  --tile: min(62vw, 330px);
  flex: none; width: var(--tile); display: flex; flex-direction: column; gap: 6px; scroll-snap-align: start;
  text-align: left; border-radius: 16px; -webkit-touch-callout: none;
}
.cb-frame {
  position: relative; display: block; width: 100%; aspect-ratio: 4 / 3; border-radius: 16px; overflow: hidden;
  background: #0E0E10; border: 1px solid var(--line-2); transition: border-color .15s;
}
.cb-tile:hover .cb-frame { border-color: rgba(255, 255, 255, .2); }
.cb-media { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.cb-role {
  position: absolute; left: 8px; bottom: 8px; display: inline-flex; align-items: center; min-height: 24px; padding: 0 9px;
  border-radius: 12px; background: rgba(11, 11, 12, .74); color: #E9E4DD; font-size: 12px; font-weight: 600; line-height: 1;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.cb-role.is-own { background: #E890D2; color: #1A0F17; }      /* наша болванка выделена цветом */
.cb-role.is-light { color: #F2C14E; }
.cb-kind {
  position: absolute; right: 8px; top: 8px; width: 24px; height: 24px; border-radius: 12px; display: grid; place-items: center;
  background: rgba(11, 11, 12, .6); color: #E9E4DD;
}
.cb-noposter, .cb-missing {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  color: #5E5A55; font-size: 13px; text-align: center;
}
.cb-missing small { max-width: 90%; font-family: var(--mono); font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cb-take {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  padding: 0 2px; font-size: 13px; line-height: 1.35; color: var(--ink-3);
}
.cb-add-ref {
  flex: none; width: min(28vw, 150px); height: calc(min(62vw, 330px) * .75); scroll-snap-align: start;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 8px;
  border-radius: 16px; border: 1.5px dashed rgba(232, 144, 210, .35); color: #E890D2; font-size: 14px; font-weight: 600;
  text-align: center; transition: background-color .15s;
}
.cb-add-ref:hover { background: rgba(232, 144, 210, .06); }
.cb-add-ref small { font-size: 11px; font-weight: 400; line-height: 1.3; color: var(--ink-3); }
.cb-add-ic { width: 36px; height: 36px; border-radius: 18px; display: grid; place-items: center; background: rgba(232, 144, 210, .12); }

/* ── как снимаем и заметка ────────────────────────────────────── */
.cb-lbl { font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.cb-how { display: flex; flex-direction: column; gap: 7px; padding-top: 12px; border-top: 1px solid var(--line); }
.cb-cam, .cb-light { display: flex; align-items: flex-start; gap: 9px; font-size: 14px; line-height: 1.4; overflow-wrap: anywhere; }
.cb-cam { color: var(--ink); }
.cb-cam svg { flex: none; margin-top: 1px; color: var(--ink-3); }
.cb-light { color: #F2C14E; }                                   /* свет отдельной строкой цветом */
.cb-light svg { flex: none; margin-top: 1px; }
.cb-note { display: flex; flex-direction: column; gap: 7px; }
.cb-note-in {
  width: 100%; min-height: 48px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line-2);
  background: rgba(255, 255, 255, .03); color: var(--ink); font-size: 16px; line-height: 1.4; resize: none; overflow: hidden;
  transition: border-color .15s, background-color .15s;
}
.cb-note-in::placeholder { color: #6A6660; }
.cb-note-in:focus { outline: none; border-color: rgba(232, 144, 210, .55); background: rgba(232, 144, 210, .04); }
.cb-note-st { min-height: 16px; font-size: 12px; color: var(--ink-3); }
.cb-note-st:empty { display: none; }

/* ── порядок: кадры за ручку, рефы фишками внутри своей роли ──── */
.cb-ord-hint { font-size: 13px; line-height: 1.45; color: var(--ink-3); }
.cb-ord-list { display: flex; flex-direction: column; gap: 8px; }
.cb-ord {
  position: relative; display: flex; flex-direction: column; gap: 8px; padding: 8px 6px 10px 14px; border-radius: 18px;
  background: var(--surface); border: 1px solid var(--line); transition: transform .18s var(--ease), box-shadow .18s;
}
.cb-ord.is-drag { z-index: 2; transition: box-shadow .18s; background: var(--surface-2); border-color: rgba(232, 144, 210, .4); box-shadow: 0 14px 34px rgba(0, 0, 0, .55); }
.cb-ord-list.is-sorting, .cb-chips.is-sorting { user-select: none; -webkit-user-select: none; }
.cb-ord-top { display: flex; align-items: center; gap: 12px; min-height: 48px; }
.cb-ord-code { flex: none; min-width: 32px; font-family: var(--disp); font-size: 16px; font-weight: 700; color: #FFF6FB; }
.cb-ord-t { flex: 1; min-width: 0; font-size: 14px; line-height: 1.35; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cb-ord-h {
  flex: none; width: 44px; height: 48px; border-radius: 14px; display: grid; place-items: center; color: var(--ink-3);
  cursor: grab; touch-action: none; transition: background-color .15s, color .15s;
}
.cb-ord-h:hover { color: var(--ink); background: rgba(255, 255, 255, .06); }
.cb-ord.is-drag .cb-ord-h { cursor: grabbing; color: #E890D2; }
.cb-ord-refs { display: flex; flex-wrap: wrap; gap: 8px 14px; padding: 0 8px 2px 44px; }
.cb-ord-g { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.cb-ord-gl { font-family: var(--mono); font-size: 10px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.cb-ord-gl.is-own { color: #E890D2; }
.cb-ord-gl.is-light { color: #F2C14E; }
.cb-chips { display: flex; flex-wrap: wrap; gap: 8px; min-width: 0; }
.cb-chip {
  flex: none; width: 64px; height: 48px; border-radius: 10px; overflow: hidden; border: 1.5px solid var(--line-3);
  background: #0E0E10; color: #5E5A55; display: grid; place-items: center; touch-action: none; cursor: grab;
  transition: transform .18s var(--ease), border-color .15s, box-shadow .18s; -webkit-touch-callout: none;
}
.cb-chip img { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.cb-chip.is-own { border-color: rgba(232, 144, 210, .6); }
.cb-chip[data-fixed] { cursor: default; touch-action: auto; }
.cb-chip.is-drag { z-index: 2; transition: box-shadow .18s; border-color: #E890D2; box-shadow: 0 10px 26px rgba(0, 0, 0, .6); cursor: grabbing; }

/* ── на весь экран ────────────────────────────────────────────── */
body.cb-viewing { overflow: hidden; }
.cb-view {
  position: fixed; inset: 0; z-index: 55; display: flex; flex-direction: column; outline: none;
  padding: var(--sat) 0 calc(8px + var(--sab)); background: #030304; opacity: 0; transition: opacity .2s;
}
.cb-view.on { opacity: 1; }
.cb-v-top { flex: none; display: flex; align-items: center; gap: 2px; min-height: 56px; padding: 4px 6px 0 18px; }
.cb-v-n { flex: 1; min-width: 0; font-family: var(--mono); font-size: 12px; letter-spacing: .06em; color: var(--ink-3); }
.cb-v-top .icon-btn { color: #CFCAC3; }
.cb-v-stage { position: relative; flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 6px 0; }
.cb-v-media { display: block; max-width: 100%; max-height: 100%; object-fit: contain; background: #000; }
.cb-v-nav {
  position: absolute; top: 50%; width: 44px; height: 64px; margin-top: -32px; border-radius: 14px; display: grid; place-items: center;
  background: rgba(11, 11, 12, .55); color: #E9E4DD; transition: background-color .15s;
}
.cb-v-nav:hover { background: rgba(40, 40, 44, .8); }
.cb-v-nav.is-prev { left: 6px; }
.cb-v-nav.is-next { right: 6px; }
.cb-v-bar { flex: none; display: flex; align-items: center; gap: 2px; padding: 4px 10px; }
.cb-v-btn { flex: none; width: 44px; height: 44px; border-radius: 22px; display: grid; place-items: center; color: #E9E4DD; transition: background-color .15s; }
.cb-v-btn:hover { background: rgba(255, 255, 255, .07); }
.cb-v-scrub { flex: 1; min-width: 0; height: 44px; margin: 0 4px; accent-color: #E890D2; background: none; cursor: pointer; }
.cb-v-speed {
  flex: none; min-width: 52px; height: 44px; padding: 0 12px; margin-left: 2px; border-radius: 22px; border: 1px solid rgba(255, 255, 255, .16);
  font-family: var(--mono); font-size: 13px; color: #E9E4DD;
}
.cb-v-speed.on { background: #E890D2; border-color: #E890D2; color: #1A0F17; }
.cb-v-cap { flex: none; display: flex; flex-direction: column; gap: 7px; max-height: 34vh; overflow-y: auto; padding: 8px 20px 6px; }
.cb-v-t { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.cb-v-t .cb-role { position: static; }
.cb-v-time { font-family: var(--mono); font-size: 12px; color: var(--ink-3); }
.cb-v-p { display: flex; gap: 10px; font-size: 15px; line-height: 1.45; color: var(--ink); }
.cb-v-p b { flex: none; width: 86px; font-family: var(--mono); font-size: 11px; font-weight: 400; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); padding-top: 3px; }
.cb-v-file { font-family: var(--mono); font-size: 11px; color: #6A6660; overflow-wrap: anywhere; }
.cb-v-warn { font-size: 13px; line-height: 1.4; color: #F2C14E; }

/* ── шторки: кадр, реф, выбор файла, подтверждение ───────────── */
.cb-role-chip.on.is-own { background: #E890D2; border-color: #E890D2; color: #1A0F17; }
.cb-role-chip.on.is-light { background: #F2C14E; border-color: #F2C14E; color: #1A150B; }
.cb-file { display: flex; flex-direction: column; gap: 10px; }
.cb-file-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.cb-file-btn { gap: 8px; padding: 0 12px; font-size: 14px; cursor: pointer; }
.cb-file-btn:focus-within { outline: 2px solid var(--coral); outline-offset: 2px; }
.cb-file-sel, .cb-pick-it {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 64px; padding: 8px 8px 8px 8px;
  border-radius: 16px; background: var(--surface); border: 1px solid var(--line); text-align: left; color: var(--ink);
}
.cb-pick-it { transition: background-color .15s; }
.cb-pick-it:hover { background: var(--surface-hover); }
.cb-file-th {
  flex: none; width: 64px; height: 48px; border-radius: 10px; overflow: hidden; background: #0E0E10; color: #5E5A55;
  display: grid; place-items: center;
}
.cb-file-th img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cb-file-n { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.cb-file-n > span { font-size: 14px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cb-file-n small { font-size: 12px; color: var(--ink-3); }
.cb-file-x { flex: none; min-height: 44px; padding: 0 14px; border-radius: 22px; font-size: 14px; color: var(--coral); }
.cb-file-x:hover { background: rgba(234, 131, 105, .08); }
.cb-file-up { display: flex; flex-direction: column; gap: 8px; padding: 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.cb-file-bar { display: block; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.cb-file-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #F5B8E4, #E890D2); transition: width .2s; }
.cb-file-up-t { font-size: 13px; color: var(--ink-2); }
.cb-pick-list { display: flex; flex-direction: column; gap: 6px; max-height: 46vh; overflow-y: auto; }
.cb-pick-back { align-self: flex-start; }
.cb-confirm { display: flex; flex-direction: column; gap: 10px; }
.cb-confirm .sheet-lead { margin-top: 4px; }
.cb-danger { background: #E86A5A; color: #1A0C0A; }
.cb-danger:hover { background: #F08577; }

/* пункт «Клип» в «Музыке» */
.cb-entry { color: var(--ink); }

/* ── компьютер: карточка шире, плитки постоянной ширины, три роли в ряд ── */
@media (min-width: 900px) {
  .m-page.cb { max-width: 1040px; }
  .cb-tile { --tile: 288px; }
  .cb-add-ref { width: 110px; height: 216px; }             /* три роли и «+ Реф» в один ряд */
  .cb-strip { scrollbar-width: thin; scrollbar-color: #3A3A3E transparent; padding-bottom: 8px; }
  .cb-strip::-webkit-scrollbar { display: block; height: 8px; }
  .cb-strip::-webkit-scrollbar-thumb { background: #3A3A3E; border-radius: 4px; }
  .cb-v-stage { padding: 12px 72px; }
  .cb-v-nav { width: 52px; height: 72px; margin-top: -36px; }
  .cb-v-nav.is-prev { left: 12px; }
  .cb-v-nav.is-next { right: 12px; }
  .cb-v-bar, .cb-v-cap { width: 100%; max-width: 760px; margin: 0 auto; }
}

@media (prefers-reduced-motion: reduce) {
  .cb-view { transition: none; }
}

/* лента: подержал плитку и тащишь (27.09.2026) */
.cb-tile { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
.cb-tile img, .cb-tile video { -webkit-user-drag: none; pointer-events: none; }
.cb-strip.is-sorting .cb-tile { transition: transform .16s ease; }
.cb-strip.is-sorting .cb-tile.is-drag { transition: none; position: relative; z-index: 3; box-shadow: 0 14px 34px rgba(0,0,0,.55); }
.cb-strip.is-sorting { scroll-snap-type: none; }

/* кнопка «Поделиться» в шапке доски (27.09.2026) */
.cb-head-r { display: flex; gap: 10px; align-items: center; }
.cb-share-btn.on { border-color: rgba(92,196,154,.45); color: #7ED8B0; }

/* кадры вверх-вниз: на время переноса доска свёрнута до шапок (27.09.2026) */
.cb-shot-head { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
.cb-list.is-reorder .cb-shot > :not(.cb-shot-head) { display: none; }
.cb-list.is-reorder .cb-shot { padding-bottom: 4px; transition: transform .16s ease; }
.cb-list.is-reorder .cb-shot.is-drag { transition: none; position: relative; z-index: 5; box-shadow: 0 16px 40px rgba(0,0,0,.6); border-color: rgba(234,131,105,.5); }

/* перенос рефа в другой кадр (27.09.2026) */
.cb-ghost { position: fixed; left: 0; top: 0; z-index: 60; pointer-events: none; opacity: .94; margin: 0;
  box-shadow: 0 18px 44px rgba(0,0,0,.65); border-radius: 18px; transform-origin: 30% 30%; }
.cb-tile.is-away { opacity: .25; }
.cb-shot.is-target { border-color: rgba(234,131,105,.75) !important; box-shadow: 0 0 0 2px rgba(234,131,105,.45); }

/* ссылки «посмотреть» и «работать вместе» (27.09.2026) */
.cb-sh-sec { display: flex; flex-direction: column; gap: 10px; padding-top: 16px; margin-top: 4px; border-top: 1px solid var(--line); }
.cb-sh-h { margin: 0; font-family: var(--disp); font-size: 17px; font-weight: 600; color: var(--ink); }
.cb-sh-t { margin: 0; font-size: 14px; line-height: 1.45; color: var(--ink-2); }
.cb-sh-link { display: flex; flex-direction: column; gap: 8px; }
.cb-sh-link .input { font-family: var(--mono); font-size: 12px; }
.cb-sh-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.cb-sh-btns > * { margin: 0; }
.cb-sh-who { display: flex; align-items: baseline; gap: 10px; padding-top: 8px; }
.cb-sh-who b { font-size: 16px; font-weight: 600; color: #B9C8FF; }
.cb-sh-who small { font-size: 13px; color: var(--ink-3); }
.cb-sh-purge { margin: 0; }
.cb-sh-new { display: flex; flex-direction: column; gap: 10px; padding-top: 6px; }

/* подпись соавтора на кадре и плитке */
.cb-by {
  flex: none; display: inline-flex; align-items: center; min-height: 24px; max-width: 40%; padding: 0 9px; border-radius: 12px;
  background: rgba(157, 180, 255, .12); border: 1px solid rgba(157, 180, 255, .35); color: #B9C8FF;
  font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cb-by.is-tile {
  position: absolute; left: 8px; top: 8px; max-width: calc(100% - 50px); border: 0;
  background: rgba(20, 24, 44, .78); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.cb-by.is-mine { background: rgba(126, 216, 176, .12); border-color: rgba(126, 216, 176, .4); color: #7ED8B0; }
.cb-by.is-tile.is-mine { background: rgba(10, 32, 24, .8); }
