/* Film list + CapCut-like full editor */
.film-page { max-width: 1100px; }
.film-list { display: flex; flex-direction: column; gap: 0.6rem; margin-top: 1rem; }
.film-card {
  display: flex; align-items: center; gap: 0.85rem;
  padding: 0.65rem 0.85rem; border: 1px solid var(--border, #e5e5e5); border-radius: 10px;
  cursor: pointer; background: var(--card, #fff);
}
.film-card:hover { border-color: var(--green, #2d8a4e); }
.film-card-thumb {
  width: 48px; height: 72px; border-radius: 6px; overflow: hidden; background: #111; flex-shrink: 0;
}
.film-card-thumb img, .film-card-thumb video,
.film-thumb-img, .film-thumb-video { width: 100%; height: 100%; object-fit: cover; display: block; }
.film-card-body { display: flex; flex-direction: column; gap: 0.2rem; flex: 1; min-width: 0; }
.film-card-meta { font-size: 0.85rem; color: var(--muted, #777); }
.film-clip-placeholder { width: 100%; height: 100%; display: grid; place-items: center; color: #999; }
.film-preview-empty {
  height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 0.5rem; color: #999; text-align: center; padding: 1rem;
}

/* —— Full-bleed editor —— */
body.film-editor-body #view.film-editor-active {
  padding: 0 !important;
  max-width: none !important;
  width: 100%;
}
body.film-editor-body .main-content,
body.film-editor-body main,
body.film-editor-body #app-main {
  padding-bottom: 0;
}

.film-editor-shell {
  display: flex;
  flex-direction: column;
  height: calc(100dvh - 56px);
  height: calc(100vh - 56px);
  min-height: 520px;
  background: #fff;
  overflow: hidden;
}

.fed-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 1rem;
  border-bottom: 1px solid var(--border, #e5e5e5);
  flex-shrink: 0;
  background: #fff;
}
.fed-topbar-left { display: flex; align-items: center; gap: 0.75rem; min-width: 0; }
.fed-title-wrap { display: flex; flex-direction: column; min-width: 0; }
.fed-title-wrap h2 {
  margin: 0; font-size: 1.05rem; font-weight: 700; outline: none;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.fed-title-wrap h2:focus { box-shadow: inset 0 -2px 0 var(--green, #2d8a4e); }
.fed-sub { font-size: 0.75rem; color: var(--muted, #777); }
.fed-topbar-actions { display: flex; flex-wrap: wrap; gap: 0.35rem; justify-content: flex-end; }

.fed-preview-wrap {
  position: relative;
  background: #0b0f19;
  height: min(46vh, 480px);
  min-height: 220px;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem;
  overflow: hidden;
}
.fed-preview-stage {
  position: relative;
  height: 100%;
  max-width: 100%;
  background: #000;
  overflow: hidden;
}
.fed-preview-stage[data-ratio="9:16"] {
  aspect-ratio: 9/16;
  width: auto;
  height: 100%;
  max-width: min(42%, 320px);
}
.fed-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: transparent;
  display: block;
}
.fed-video-under {
  z-index: 1;
  background: #000;
}
.fed-video-top {
  z-index: 2;
  background: transparent;
}
.fed-preview-time {
  position: absolute;
  left: 0.85rem;
  bottom: 0.75rem;
  padding: 0.25rem 0.55rem;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
  z-index: 2;
}

.fed-toolbar {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
  padding: 0.5rem 0.85rem;
  border-bottom: 1px solid var(--border, #e5e5e5);
  background: #f8f9fa;
  flex-shrink: 0;
}
.fed-tool {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: 1px solid var(--border, #ddd);
  background: #fff;
  color: inherit;
  border-radius: 10px;
  padding: 0.4rem 0.65rem;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
}
.fed-tool:hover { background: #eef2ff; border-color: #c7d2fe; }
.fed-tool:disabled { opacity: 0.45; cursor: not-allowed; }
.fed-tool-accent {
  background: #0d6efd;
  border-color: #0d6efd;
  color: #fff;
}
.fed-tool-accent:hover { background: #0b5ed7; color: #fff; }
.fed-tool-sep {
  width: 1px; height: 22px; background: var(--border, #ddd); margin: 0 0.15rem;
}
.fed-tool-hint {
  margin-left: auto;
  font-size: 0.72rem;
  color: var(--muted, #777);
  max-width: 360px;
  text-align: right;
}

.fed-inspector {
  padding: 0.55rem 0.85rem;
  border-bottom: 1px solid var(--border, #e5e5e5);
  background: #eef2ff;
  flex-shrink: 0;
}
.fed-insp-title {
  font-size: 0.78rem;
  font-weight: 700;
  color: #312e81;
  margin-bottom: 0.35rem;
}
.fed-insp-empty {
  font-size: 0.82rem;
  color: var(--muted, #666);
  padding: 0.25rem 0;
}
.fed-insp-row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
  font-size: 0.78rem;
  font-weight: 600;
}
.fed-insp-row label { display: inline-flex; align-items: center; gap: 0.3rem; }
.fed-insp-row input[type="text"],
.fed-insp-row input[type="number"] {
  border: 1px solid #c7d2fe;
  border-radius: 6px;
  padding: 0.3rem 0.4rem;
  font-size: 0.8rem;
  font-weight: 500;
}
.fed-insp-row input[type="range"] {
  flex: 1;
  min-width: 140px;
  max-width: 280px;
}
.fed-vol-row { margin-top: 0.4rem; }
.fed-fade-row {
  margin-top: 0.35rem;
  padding-top: 0.35rem;
  border-top: 1px dashed #c7d2fe;
}
.fed-insp-hint { font-size: 0.7rem; font-weight: 500; color: var(--muted, #6b7280); }
.fed-check { font-weight: 600; }

/* Timeline */
.fed-timeline-wrap {
  padding: 0.55rem 0.75rem 0.45rem;
  background: #111827;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.fed-timeline-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  cursor: ew-resize;
  -webkit-overflow-scrolling: touch;
}
.fed-timeline {
  position: relative;
  min-width: 100%;
  padding-bottom: 0.5rem;
}
.fed-ruler {
  position: relative;
  height: 20px;
  margin-bottom: 0.4rem;
  border-bottom: 1px solid #374151;
  cursor: ew-resize;
  touch-action: none;
}
.fed-ruler-mark {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  font-size: 0.62rem;
  color: #9ca3af;
  white-space: nowrap;
}
.fed-track {
  display: flex;
  align-items: stretch;
  gap: 0.45rem;
  margin-bottom: 0.45rem;
  min-height: 52px;
}
.fed-track-audio { min-height: 56px; align-items: flex-end; }
.fed-lane-v2 {
  min-height: 44px !important;
  background: #1e293b !important;
  border-color: #f59e0b55 !important;
}
.fed-lane-v1 {
  min-height: 48px !important;
}
.fed-track-label {
  width: 48px;
  flex-shrink: 0;
  font-size: 0.68rem;
  font-weight: 700;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  display: flex;
  align-items: center;
}
.fed-track-lane {
  position: relative;
  flex: 0 0 auto;
  min-height: 48px;
  background: #1f2937;
  border-radius: 8px;
  border: 1px solid #374151;
}
.fed-track-audio .fed-track-lane {
  min-height: 52px;
  display: flex;
  align-items: flex-end;
}
.fed-track-empty {
  height: 100%;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6b7280;
  font-size: 0.78rem;
  font-weight: 600;
  pointer-events: none;
}

.fed-vclip {
  position: absolute;
  top: 4px;
  bottom: auto;
  border-radius: 8px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--clip-color) 85%, #fff), var(--clip-color));
  border: 2px solid transparent;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
  overflow: hidden;
  cursor: grab;
  touch-action: none;
  z-index: 1;
  min-height: 30px;
}
.fed-vclip:active { cursor: grabbing; }
.fed-vclip.selected, .fed-vclip.is-active {
  border-color: #fff;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.35), 0 4px 14px rgba(0, 0, 0, 0.45);
  z-index: 2;
}
.fed-vclip.is-muted { filter: saturate(0.55); }
.fed-vclip.dragging { opacity: 0.45; }
.fed-vclip.drag-over { outline: 2px dashed #fff; }
.fed-vclip-body {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 14px;
  color: #fff;
  pointer-events: none;
}
.fed-vclip-title { font-size: 0.72rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fed-vclip-dur { font-size: 0.64rem; opacity: 0.9; }

.fed-fade {
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 4;
  cursor: ew-resize;
  touch-action: none;
  min-width: 8px;
}
.fed-fade-in {
  left: 8px;
  background: linear-gradient(90deg, rgba(0,0,0,0.55), transparent);
  border-left: 2px solid rgba(255,255,255,0.85);
}
.fed-fade-out {
  right: 8px;
  background: linear-gradient(270deg, rgba(0,0,0,0.55), transparent);
  border-right: 2px solid rgba(255,255,255,0.85);
}
.fed-fade.has-fade {
  background: linear-gradient(90deg, rgba(0,0,0,0.7), transparent);
}
.fed-fade-out.has-fade {
  background: linear-gradient(270deg, rgba(0,0,0,0.7), transparent);
}
.fed-fade::after {
  content: '';
  position: absolute;
  top: 2px;
  width: 0;
  height: 0;
  border-style: solid;
}
.fed-fade-in::after {
  left: 0;
  border-width: 6px 0 6px 8px;
  border-color: transparent transparent transparent #fff;
}
.fed-fade-out::after {
  right: 0;
  border-width: 6px 8px 6px 0;
  border-color: transparent #fff transparent transparent;
}

.fed-hud {
  position: sticky;
  top: 0;
  left: 56px;
  z-index: 20;
  display: inline-block;
  margin: 0 0 0.35rem 56px;
  padding: 0.3rem 0.65rem;
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.92);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  pointer-events: none;
  box-shadow: 0 4px 14px rgba(0,0,0,0.35);
}
.fed-hud[hidden] { display: none !important; }

.fed-handle {
  position: absolute;
  top: 0; bottom: 0;
  width: 10px;
  border: none;
  padding: 0;
  background: rgba(255, 255, 255, 0.35);
  cursor: ew-resize;
  z-index: 5;
  touch-action: none;
}
.fed-handle-l { left: 0; border-radius: 6px 0 0 6px; }
.fed-handle-r { right: 0; border-radius: 0 6px 6px 0; }
.fed-handle:hover { background: rgba(255, 255, 255, 0.7); }

.fed-aclip {
  position: absolute;
  bottom: 4px;
  border-radius: 8px;
  background: #059669;
  border: 2px solid transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  color: #fff;
  cursor: ns-resize;
  touch-action: none;
  overflow: hidden;
  min-height: 20px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  z-index: 1;
}
.fed-aclip.selected, .fed-aclip.is-active {
  border-color: #fff;
  z-index: 2;
}
.fed-aclip.is-muted { background: #4b5563; opacity: 0.7; }
.fed-aclip-vol {
  font-size: 0.68rem;
  font-weight: 700;
  pointer-events: none;
  z-index: 1;
}
.fed-aclip .fed-fade-in { left: 0; }
.fed-aclip .fed-fade-out { right: 0; }
.fed-wave-bars {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: space-around;
  padding: 4px 6px;
  opacity: 0.45;
  pointer-events: none;
}
.fed-wave-bars i {
  display: block;
  width: 3px;
  background: #fff;
  border-radius: 2px;
  height: 40%;
}
.fed-wave-bars i:nth-child(odd) { height: 70%; }
.fed-wave-bars i:nth-child(3n) { height: 55%; }

.fed-playhead {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #ff6b6b;
  z-index: 8;
  pointer-events: auto;
  cursor: ew-resize;
}
.fed-playhead::before {
  content: '';
  position: absolute;
  top: 0;
  left: -6px;
  border-left: 7px solid transparent;
  border-right: 7px solid transparent;
  border-top: 9px solid #ff6b6b;
}

.film-import-list {
  display: flex; flex-direction: column; gap: 0.4rem;
  max-height: 420px; overflow-y: auto;
}
.film-import-row {
  display: flex; align-items: center; gap: 0.75rem; width: 100%;
  padding: 0.5rem 0.65rem; border: 1px solid var(--border, #e5e5e5);
  border-radius: 8px; background: var(--card, #fff); cursor: pointer; text-align: left;
}
.film-import-row:hover { border-color: var(--green, #2d8a4e); }
.film-import-thumb {
  width: 40px; height: 56px; border-radius: 4px; overflow: hidden; background: #111; flex-shrink: 0;
}
.film-import-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.film-import-meta { display: flex; flex-direction: column; gap: 0.15rem; min-width: 0; }
.film-import-meta span { font-size: 0.75rem; color: var(--muted, #777); }
.empty-state.compact { padding: 0.75rem; font-size: 0.9rem; }

.film-ctx-mode {
  display: flex; gap: 0.65rem; align-items: flex-start;
  padding: 0.65rem 0.75rem; margin: 0.4rem 0;
  border: 1px solid var(--border, #e5e5e5); border-radius: 8px;
  cursor: pointer; background: var(--card, #fff);
}
.film-ctx-mode:has(input:checked) { border-color: var(--green, #2d8a4e); background: rgba(45,138,78,0.06); }
.film-ctx-mode input { margin-top: 0.2rem; flex-shrink: 0; }
.film-ctx-mode span { font-size: 0.9rem; line-height: 1.35; }
.film-ctx-list { display: flex; flex-direction: column; gap: 0.5rem; max-height: 320px; overflow-y: auto; }
.film-ctx-row {
  display: flex; align-items: center; gap: 0.65rem;
  padding: 0.4rem 0.5rem; border: 1px solid var(--border, #e5e5e5);
  border-radius: 8px; cursor: pointer; background: var(--card, #fff);
}
.film-ctx-row:has(input:checked) { border-color: var(--green, #2d8a4e); }
.film-ctx-thumb {
  width: 36px; height: 48px; border-radius: 4px; overflow: hidden;
  background: #111; flex-shrink: 0;
}
.film-ctx-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.film-ctx-meta { display: flex; flex-direction: column; gap: 0.1rem; min-width: 0; flex: 1; }
.film-ctx-meta strong { font-size: 0.85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.film-ctx-meta small { font-size: 0.7rem; color: var(--muted, #777); }

.film-ctx-modal {
  width: min(960px, 96vw);
  max-width: min(960px, 96vw) !important;
  max-height: 94vh !important;
  max-height: 94dvh !important;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.film-ctx-modal .modal-header h3 {
  font-size: 1.25rem;
  font-weight: 700;
}
.film-ctx-modal .modal-body {
  overflow-y: auto;
  max-height: calc(94vh - 140px);
  padding: 1rem 1.15rem 1.25rem;
}
.film-ctx-howto {
  margin: 0 0 1rem;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  background: linear-gradient(135deg, #f0fdf4 0%, #eff6ff 100%);
  border: 1px solid #bbf7d0;
  font-size: 0.92rem;
  line-height: 1.45;
  color: #14532d;
}
.film-ctx-howto strong { color: #0f172a; }
.film-ctx-mode-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.55rem;
  margin-bottom: 0.85rem;
}
@media (max-width: 720px) {
  .film-ctx-mode-grid { grid-template-columns: 1fr; }
}
.film-ctx-mode-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.25rem;
  text-align: left;
  padding: 0.75rem 0.85rem;
  border-radius: 12px;
  border: 2px solid #cbd5e1;
  background: #fff;
  cursor: pointer;
  font: inherit;
  color: inherit;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}
.film-ctx-mode-card:hover { border-color: #94a3b8; }
.film-ctx-mode-card.is-on {
  border-color: #16a34a;
  background: #f0fdf4;
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.18);
}
.film-ctx-mode-card .m-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: #0f172a;
}
.film-ctx-mode-card .m-desc {
  font-size: 0.78rem;
  line-height: 1.35;
  color: #475569;
}
.film-ctx-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-height: none;
  overflow: visible;
}
.film-ctx-pick {
  border: 2px solid #e2e8f0;
  border-radius: 16px;
  padding: 0.9rem 1rem 1rem;
  background: #fff;
  margin-bottom: 0;
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.06);
}
.film-ctx-pick.is-start {
  border-color: #16a34a;
  background: linear-gradient(180deg, #f0fdf4 0%, #fff 42%);
  box-shadow: 0 0 0 1px rgba(22, 163, 74, 0.2), 0 6px 20px rgba(22, 163, 74, 0.08);
}
.film-ctx-pick.is-end {
  border-color: #d97706;
  background: linear-gradient(180deg, #fffbeb 0%, #fff 42%);
  box-shadow: 0 0 0 1px rgba(217, 119, 6, 0.2), 0 6px 20px rgba(217, 119, 6, 0.08);
}
.film-ctx-pick.is-ref {
  border-color: #2563eb;
  background: linear-gradient(180deg, #eff6ff 0%, #fff 42%);
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.18), 0 6px 20px rgba(37, 99, 235, 0.07);
}
.film-ctx-pick-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.65rem;
  margin-bottom: 0.65rem;
  flex-wrap: wrap;
}
.film-ctx-step-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
  background: #e2e8f0;
  color: #334155;
}
.film-ctx-pick.is-start .film-ctx-step-badge { background: #166534; color: #fff; }
.film-ctx-pick.is-end .film-ctx-step-badge { background: #b45309; color: #fff; }
.film-ctx-pick.is-ref .film-ctx-step-badge { background: #1d4ed8; color: #fff; }
.film-ctx-pick-title {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
  flex: 1;
}
.film-ctx-pick-title strong {
  font-size: 1.05rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.25;
}
.film-ctx-pick-title small {
  font-size: 0.82rem;
  color: #64748b;
  line-height: 1.35;
  font-weight: 500;
}
.film-ctx-seek-label {
  font-variant-numeric: tabular-nums;
  font-size: 0.9rem;
  color: #166534;
  font-weight: 700;
  flex-shrink: 0;
  padding: 0.25rem 0.5rem;
  border-radius: 8px;
  background: rgba(22, 163, 74, 0.1);
}
.film-ctx-pick.is-end .film-ctx-seek-label { color: #b45309; background: rgba(217, 119, 6, 0.12); }
.film-ctx-pick.is-ref .film-ctx-seek-label { color: #1d4ed8; background: rgba(37, 99, 235, 0.1); }
.film-ctx-src-tabs {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 0.7rem;
  flex-wrap: wrap;
}
.film-ctx-src-tabs .btn {
  flex: 1;
  min-width: 8rem;
  justify-content: center;
  font-weight: 700;
  padding: 0.55rem 0.75rem;
  border-radius: 10px;
}
.film-ctx-pick-clipbox {
  background: #ecfdf5;
  border: 2px solid #16a34a;
  border-radius: 12px;
  padding: 0.7rem 0.8rem;
  margin-bottom: 0.65rem;
}
.film-ctx-pick.is-ref .film-ctx-pick-clipbox,
.film-ctx-pick.is-end .film-ctx-pick-clipbox {
  background: #eff6ff;
  border-color: #2563eb;
}
.film-ctx-pick.is-end .film-ctx-pick-clipbox {
  background: #fffbeb;
  border-color: #d97706;
}
.film-ctx-pick-clipbox-title {
  font-size: 0.9rem;
  font-weight: 800;
  margin-bottom: 0.45rem;
  color: #14532d;
}
.film-ctx-pick.is-ref .film-ctx-pick-clipbox-title { color: #1e3a8a; }
.film-ctx-pick.is-end .film-ctx-pick-clipbox-title { color: #92400e; }
.film-ctx-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
}
.film-ctx-chip {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  border: 2px solid #64748b;
  background: #0f172a;
  color: #f8fafc;
  border-radius: 12px;
  padding: 0.4rem 0.5rem 0.45rem;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  min-width: 72px;
}
.film-ctx-chip-thumb {
  width: 56px;
  height: 74px;
  border-radius: 8px;
  overflow: hidden;
  background: #111;
  display: flex;
  align-items: center;
  justify-content: center;
}
.film-ctx-chip-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.film-ctx-chip-lab { font-size: 0.78rem; }
.film-ctx-chip.is-on {
  background: #166534;
  border-color: #22c55e;
  color: #fff;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.3);
}
.film-ctx-pick.is-ref .film-ctx-chip.is-on,
.film-ctx-pick.is-end .film-ctx-chip.is-on {
  background: #1d4ed8;
  border-color: #60a5fa;
  box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.3);
}
.film-ctx-pick.is-end .film-ctx-chip.is-on {
  background: #b45309;
  border-color: #fbbf24;
  box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.35);
}
.film-ctx-clip-count {
  margin: 0 0 0.4rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: #15803d;
}
.film-ctx-clip-sel {
  display: block;
  width: 100%;
  max-width: none;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.6rem 0.7rem;
  border-radius: 10px;
  border: 2px solid #94a3b8;
  background: #fff;
  color: #0f172a;
}
.film-ctx-clip-lab {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.3rem;
  font-size: 0.82rem;
  font-weight: 700;
  margin-bottom: 0.55rem;
  color: #334155;
}
.film-ctx-clip-lab .film-ctx-clip-sel { flex: 1; max-width: none; }
.film-ctx-scrub-vid {
  display: block;
  width: 100%;
  max-height: min(42vh, 320px);
  min-height: 200px;
  object-fit: contain;
  background: #0a0a0a;
  border-radius: 12px;
  margin-bottom: 0.5rem;
}
.film-ctx-scrub {
  width: 100%;
  cursor: pointer;
  height: 1.4rem;
}
.film-ctx-quick {
  display: flex;
  gap: 0.45rem;
  margin-top: 0.45rem;
  flex-wrap: wrap;
}
.film-ctx-quick .btn { font-weight: 600; }
.film-ctx-count {
  font-weight: 600;
  font-size: 0.85rem;
  color: #64748b;
}
.film-ctx-rm { margin-left: auto; }
.film-ctx-upload-zone {
  min-height: 180px;
  border: 2px dashed #94a3b8;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background: #f8fafc;
  overflow: hidden;
}
.film-ctx-upload-zone:hover { border-color: #16a34a; background: #f0fdf4; }
.film-ctx-upload-preview {
  width: 100%;
  max-height: 280px;
  object-fit: contain;
  display: block;
}
.film-ctx-upload-empty {
  padding: 1.5rem;
  text-align: center;
  font-weight: 600;
  color: #64748b;
  font-size: 0.95rem;
}
.film-ctx-footer-note {
  margin: 0.75rem 0 0;
  font-size: 0.82rem;
  color: #64748b;
  line-height: 1.4;
}
.film-ctx-modal .modal-footer .btn-primary {
  font-size: 1rem;
  font-weight: 700;
  padding: 0.7rem 1.35rem;
  border-radius: 10px;
}
.film-ctx-row-check { border: none; padding: 0 0 0.35rem; margin: 0; background: transparent; }
.film-ctx-section { margin-top: 0.75rem; }
.film-ctx-section-title {
  display: flex; align-items: center; justify-content: space-between; gap: 0.5rem;
  font-size: 0.85rem; font-weight: 600; margin-bottom: 0.4rem;
}

@media (max-width: 900px) {
  .film-editor-shell { height: calc(100dvh - 48px); }
  .fed-preview-wrap { height: min(38vh, 360px); }
  .fed-tool-hint { display: none; }
  .fed-topbar { flex-direction: column; align-items: stretch; }
}

.job-failed-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  margin: 0.75rem 0;
  padding: 0.7rem 0.85rem;
  border-radius: 10px;
  border: 1px solid #fecaca;
  background: #fef2f2;
}
.job-failed-bar-label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: #991b1b;
}
.job-failed-bar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
