/* Spool studio styles, one file in cascade order: notes, layout, product, dialogs. */
/* Notes (formerly notes.css) */
.clip-notes {
  margin-top: auto;
  border-top: 1px solid var(--line);
  flex-shrink: 0;
  font-size: 11px;
  padding-top: 10px;
}
.notes-heading {
  display: flex;
  align-items: center;
  margin-bottom: 6px;
}
.notes-heading h3 {
  font-size: 12px;
  font-weight: 600;
  margin: 0;
}
.notes-heading h3 span {
  font-size: 10px;
  font-weight: 400;
  color: var(--dim);
  margin-left: 7px;
}
.note-open {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  padding: 9px 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  margin-bottom: 6px;
  background: var(--bg);
}
.note-open input {
  accent-color: var(--accent);
  width: 14px;
  height: 14px;
  margin: 2px 0 0;
  flex-shrink: 0;
  cursor: pointer;
}
.note-open textarea.note-text {
  display: block;
  width: 100%;
  min-height: 17px;
  max-height: 160px;
  resize: none;
  border: 0;
  background: transparent;
  padding: 0;
  color: var(--text);
  font: inherit;
  line-height: 1.5;
}
.note-open:focus-within {
  border-color: var(--line2);
}
.note-open textarea:focus {
  outline: none;
}
.notes-composer {
  margin-top: 6px;
}
.notes-composer > textarea {
  display: block;
  width: 100%;
  max-height: 200px;
  border: 1px solid var(--line2);
  border-radius: 7px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
  line-height: 1.5;
  min-height: 30px;
  height: 30px;
  resize: none;
  padding: 6px 9px;
}
.notes-composer > textarea:focus {
  outline: 1px solid var(--accent);
  outline-offset: 1px;
}
.notes-compose-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 7px;
}
.notes-compose-actions > span {
  font-size: 10px;
  color: var(--faint);
}
.notes-compose-actions button {
  padding: 4px 10px;
  min-height: 26px;
  font-size: 10px;
}
.notes-history {
  margin-top: 13px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}
.notes-history > summary {
  cursor: pointer;
  color: var(--dim);
  font-size: 11px;
  user-select: none;
}
.notes-history > summary span {
  color: var(--faint);
  margin-left: 5px;
}
#notesHistoryList {
  margin-top: 6px;
}
.note-addressed {
  border-bottom: 1px solid var(--line);
  padding: 9px 0;
}
.note-addressed > summary {
  list-style: none;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  cursor: pointer;
}
.note-addressed > summary::-webkit-details-marker {
  display: none;
}
.note-done {
  color: #87cda5;
  flex-shrink: 0;
}
.note-done svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.note-history-title {
  color: var(--dim);
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  flex: 1;
  line-height: 1.5;
  white-space: pre-line;
  overflow-wrap: anywhere;
}
.note-chevron {
  color: var(--faint);
  line-height: 1.5;
}
.note-addressed[open] .note-chevron {
  transform: rotate(90deg);
}
.note-history-body {
  padding: 9px 0 0 22px;
}
.note-addressed[open] .note-history-title {
  -webkit-line-clamp: unset;
  white-space: pre-wrap;
}
.note-resolution {
  padding: 8px;
  border-radius: 5px;
  background: var(--bg);
  color: var(--dim);
  font-size: 11px;
  line-height: 1.5;
  margin: 0 0 8px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.note-history-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--faint);
  font-size: 10px;
  flex-wrap: wrap;
}
.note-history-meta button {
  font-size: 10px;
  min-height: 24px;
  padding: 3px 8px;
}
.note-versions {
  margin-top: 9px;
  color: var(--dim);
  font-size: 10px;
}
.note-versions summary {
  cursor: pointer;
}
.note-versions p {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.5;
  border-left: 1px solid var(--line2);
  padding-left: 8px;
}
.clip-notes .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
/* Studio layout (formerly inline in editor.html) */
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font-family: Inter, 'Segoe UI Variable Text', 'Segoe UI', system-ui, sans-serif;
  background: #0d0d0e;
}
button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}
button {
  cursor: pointer;
}
button:disabled {
  opacity: 0.35;
}
[hidden] {
  display: none !important;
}
:focus-visible {
  outline: 2px solid #ffb37a;
  outline-offset: 1px;
}
.editor {
  --preview: #62d0e0;
  --mono: 'Cascadia Mono', 'JetBrains Mono', Consolas, monospace;
  color: var(--text);
  background: var(--bg);
  font-size: 12px;
  height: 824px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  position: relative;
  overflow: hidden;
}
.standalone .editor {
  height: 100vh;
  min-height: 640px;
}
.editor:focus {
  outline: none;
}
.editor > * {
  min-width: 0;
}
.icon {
  width: 16px;
  height: 16px;
  display: inline-block;
  vertical-align: middle;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
.mono {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}
.small {
  font-size: 10px;
  color: var(--dim);
}
.iconbutton,
.textbutton {
  background: transparent;
  border: 0;
  border-radius: 6px;
  min-height: 28px;
  color: var(--dim);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
  text-decoration: none;
  padding: 4px 8px;
}
.iconbutton {
  width: 28px;
  padding: 0;
}
.iconbutton:hover:not(:disabled),
.textbutton:hover:not(:disabled) {
  background: var(--hover);
  color: var(--text);
}
.iconbutton.active {
  color: var(--accent);
  background: #ff9f5a14;
}
.primary,
.outline {
  border-radius: 6px;
  min-height: 28px;
  padding: 5px 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-weight: 600;
  white-space: nowrap;
  text-decoration: none;
}
.primary {
  background: var(--accent);
  border: 1px solid var(--accent);
  color: var(--accent-ink);
}
.primary:hover:not(:disabled) {
  background: #ffb37a;
}
.outline {
  background: transparent;
  border: 1px solid var(--line2);
  color: var(--text);
  font-weight: 500;
}
.outline:hover:not(:disabled) {
  background: var(--hover);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 10px 0 14px;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
}
.bar-left,
.bar-right {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
}
.brand {
  display: flex;
  align-items: center;
  margin-right: 10px;
  color: var(--text);
}
.brand svg {
  width: auto;
  fill: currentColor;
}
.brand-wordmark {
  display: block;
  height: 20px;
}
.brand-reels {
  fill: var(--accent);
}
.project-name {
  width: 200px;
  min-width: 80px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  font-size: 12px;
  font-weight: 550;
  padding: 5px 8px;
}
.project-name:hover {
  border-color: var(--line2);
}
.project-name:focus {
  background: var(--raised);
  border-color: var(--line2);
  outline: none;
}
.save-state {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--faint);
  font-size: 10px;
  white-space: nowrap;
  margin-left: 4px;
}
.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #7fc59a;
}
.bar-sep {
  width: 1px;
  height: 18px;
  background: var(--line2);
  margin: 0 4px;
}
.queue-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line2);
  background: transparent;
  border-radius: 999px;
  padding: 4px 11px 4px 9px;
  min-height: 28px;
  color: var(--text);
  margin: 0 4px;
}
.queue-pill:hover {
  background: var(--hover);
}
.queue-pill.busy {
  border-color: #ff9f5a66;
  color: var(--accent);
}

.workbench {
  display: grid;
  grid-template-columns: var(--media-width, 208px) minmax(0, 1fr) var(--inspector-width, 296px);
  grid-template-rows: minmax(0, 1fr) 112px;
  grid-template-areas: 'pool viewer inspector' 'pool takes inspector';
  min-height: 0;
}
.media-panel {
  position: relative;
  grid-area: pool;
  background: var(--panel);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.viewer {
  grid-area: viewer;
}
.takes {
  grid-area: takes;
}
.inspector {
  grid-area: inspector;
}
.panel-head {
  height: 40px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8px 0 10px;
  gap: 6px;
}
.seg {
  display: flex;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 2px;
  gap: 2px;
}
.seg button {
  border: 0;
  background: transparent;
  color: var(--dim);
  font-size: 11px;
  padding: 3px 9px;
  border-radius: 5px;
}
.seg button.active {
  background: var(--raised);
  color: var(--text);
}
.panel-scroll {
  overflow: auto;
  min-height: 0;
  flex: 1 1 0;
  scrollbar-width: thin;
  scrollbar-color: #3a3a3f transparent;
}
.media-panel .panel-scroll {
  padding: 2px 10px 10px;
}
.bin-title {
  font-size: 10px;
  color: var(--faint);
  margin: 4px 0 8px;
}
.bin-grid {
  display: grid;
  gap: 10px;
}
.bin-card {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  background: var(--raised);
  cursor: grab;
}
.bin-card img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  display: block;
  opacity: 0.85;
  transition: opacity 0.15s;
}
.bin-card:hover img {
  opacity: 1;
}
.bin-card .bin-text {
  padding: 7px 9px 8px;
}
.bin-card strong {
  display: block;
  font-size: 11px;
  font-weight: 550;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bin-card .small {
  display: block;
  font-size: 9px;
  margin-top: 2px;
  color: var(--faint);
}
.bin-tag {
  position: absolute;
  top: 6px;
  left: 6px;
  background: #0d0d0ecc;
  color: var(--text);
  font: 600 9px var(--mono);
  padding: 2px 5px;
  border-radius: 4px;
}
.bin-card .add {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  border: 0;
  background: #0d0d0ecc;
  color: var(--text);
  display: grid;
  place-items: center;
  opacity: 0;
  transition: opacity 0.15s;
}
.bin-card:hover .add,
.bin-card .add:focus-visible {
  opacity: 1;
}
.bin-card .add:hover {
  background: var(--accent);
  color: var(--accent-ink);
}
.panel-foot {
  flex-shrink: 0;
  padding: 10px;
  border-top: 1px solid var(--line);
}
.panel-foot .outline {
  width: 100%;
}

.viewer {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  background: var(--bg);
}
.viewer-stage {
  position: relative;
  flex: 1;
  min-height: 0;
  margin: 0 12px;
  background: #000;
  border-radius: 6px;
  overflow: hidden;
  display: grid;
  place-items: center;
  box-shadow: inset 0 0 0 1px var(--line);
}
.viewer-stage video,
.viewer-stage img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.viewer-stage video.front {
  z-index: 1;
}
.empty-stage {
  font-size: 12px;
}
.viewer.source-mode .viewer-stage::after,
.viewer.audition .viewer-stage::after {
  content: '';
  position: absolute;
  inset: 0;
  border: 2px solid var(--preview);
  border-radius: inherit;
  z-index: 2;
  pointer-events: none;
}
.viewer-head {
  height: 40px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
}
.viewer-tabs button {
  padding: 3px 12px;
}
.viewer-tabs button.active {
  font-weight: 600;
}
.viewer.source-mode #sourceTab {
  color: var(--preview);
}
.viewer-context {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--dim);
  font-size: 11px;
}
.viewer-context b {
  color: var(--text);
  font-weight: 600;
}
.viewer-context .in-edit {
  color: var(--accent);
}
.viewer-context .not-in-edit {
  color: var(--preview);
}
.viewer-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}
.viewer-actions button {
  min-height: 26px;
  padding: 3px 10px;
  font-size: 11px;
}
.viewer-actions .icon {
  width: 14px;
  height: 14px;
}
.viewer-overlay {
  position: absolute;
  left: 10px;
  bottom: 10px;
  display: flex;
  gap: 5px;
  pointer-events: none;
  z-index: 2;
}
.viewer-overlay span {
  background: #0d0d0ecc;
  color: #d8d6d0;
  font-size: 10px;
  padding: 3px 7px;
  border-radius: 4px;
}
.viewer-overlay .in-edit {
  color: var(--accent);
}
.viewer-overlay .preview-only {
  color: var(--preview);
}
.viewer-stage .fullscreen {
  position: absolute;
  z-index: 3;
  right: 8px;
  bottom: 8px;
  background: #0d0d0ecc;
  color: #d8d6d0;
  opacity: 0;
  transition: opacity 0.15s;
}
.viewer-stage:hover .fullscreen,
.viewer-stage .fullscreen:focus-visible {
  opacity: 1;
}
.viewer-tail {
  padding: 8px 12px 0;
  flex-shrink: 0;
}
.scrub {
  position: relative;
}
.scrub input {
  width: 100%;
  margin: 0;
  height: 4px;
  accent-color: var(--accent);
  display: block;
}
.viewer.source-mode .scrub input {
  accent-color: var(--preview);
}
.scrub-band {
  position: absolute;
  top: -5px;
  height: 2px;
  border-radius: 1px;
  background: var(--accent);
  pointer-events: none;
}
.viewer-controls {
  height: 42px;
  flex-shrink: 0;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 12px;
  gap: 10px;
}
.tc-block {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
}
.viewer-time {
  font-size: 16px;
  color: var(--text);
  letter-spacing: 0.02em;
}
.tc-block .small {
  font-family: var(--mono);
  color: var(--faint);
}
.transport {
  display: flex;
  align-items: center;
  gap: 2px;
}
.transport .play {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--text);
  color: var(--bg) !important;
  margin: 0 6px;
}
.transport .play:hover {
  background: #fff !important;
}
.viewer-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  min-width: 0;
}
.viewer-meta > span {
  font-size: 10px;
  color: var(--faint);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-right: 4px;
}

.takes {
  border-top: 1px solid var(--line);
  background: var(--panel);
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
}
.takes-head {
  height: 28px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
}
.takes-title {
  font-weight: 600;
  font-size: 11px;
}
.takes-title span {
  font: 600 10px var(--mono);
  color: var(--dim);
  margin-left: 3px;
}
.takes-clip {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.takes-keys {
  color: var(--faint);
  white-space: nowrap;
}
.takes-keys kbd {
  font: 9px var(--mono);
  border: 1px solid var(--line2);
  border-radius: 3px;
  padding: 0 3px;
  color: var(--dim);
}
.take-list {
  flex: 1;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0 12px 10px;
  scrollbar-width: thin;
  scrollbar-color: #3a3a3f transparent;
  min-height: 0;
  overscroll-behavior-x: contain;
}
.take-card {
  flex: 0 0 212px;
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  gap: 9px;
  padding: 5px;
  border-radius: 8px;
  background: var(--raised);
  border: 1px solid transparent;
  min-height: 0;
  position: relative;
}
.take-card.chosen {
  border-color: #ff9f5a88;
  background: #2a1f17;
}
.take-card.viewing {
  border-color: var(--preview);
  box-shadow: 0 0 0 1px var(--preview);
}
.take-thumb {
  border: 0;
  padding: 0;
  border-radius: 5px;
  overflow: hidden;
  background: #000;
  aspect-ratio: 16/9;
  align-self: center;
  position: relative;
}
.take-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.use-take {
  border-radius: 5px;
  min-height: 24px;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px;
  border: 1px solid var(--line2);
  background: transparent;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.use-take:hover:not(:disabled) {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}
.take-card.chosen .use-take {
  border-color: transparent;
  color: var(--accent);
  opacity: 1;
}
.use-take .icon {
  width: 12px;
  height: 12px;
}
.take-card.pending {
  background: transparent;
  border: 1px dashed var(--line2);
  grid-template-columns: 1fr;
}
.takes-empty {
  color: var(--faint);
  font-size: 11px;
  align-self: center;
  padding-left: 2px;
}

.inspector {
  position: relative;
  background: var(--panel);
  border-left: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
}
.inspector-head {
  height: 40px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 6px 0 8px;
  border-bottom: 1px solid var(--line);
}
.inspector-name {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  font-weight: 600;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 4px 6px;
}
.inspector-name:hover {
  border-color: var(--line2);
}
.inspector-name:focus {
  background: var(--raised);
  border-color: var(--line2);
  outline: none;
}
.inspector .panel-scroll {
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.inspector .panel-scroll > div {
  flex-shrink: 0;
}
.group-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--faint);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin: 0 0 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.field {
  display: block;
  margin-bottom: 12px;
}
.field > span {
  display: block;
  font-size: 10px;
  color: var(--dim);
  margin-bottom: 5px;
}
.field input,
.field textarea,
.field select {
  width: 100%;
  border: 1px solid var(--line2);
  border-radius: 6px;
  background: var(--bg);
  padding: 6px 8px;
  font-size: 11px;
}
.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: #ff9f5a88;
  outline: none;
}
.field textarea {
  height: 86px;
  resize: vertical;
  line-height: 1.5;
}
.three-fields {
  display: grid;
  grid-template-columns: 1fr 1fr 64px;
  gap: 8px;
}
.two-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.sources {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-bottom: 12px;
}
.sources.pair {
  grid-template-columns: 1fr 1fr;
}
.sources.pair .source {
  height: 80px;
}
.source {
  position: relative;
  border-radius: 6px;
  overflow: hidden;
  background: #000;
  height: 116px;
  border: 1px solid var(--line2);
}
.source img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0.9;
}
.source button {
  position: absolute;
  top: 5px;
  right: 5px;
  background: #0d0d0ecc;
  color: #fff;
  width: 26px;
  min-height: 26px;
}
.inspector-foot {
  flex-shrink: 0;
  padding: 10px 12px 11px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.generate {
  width: 100%;
  min-height: 34px;
  border-radius: 7px;
  font-size: 12px;
}
.foot-note {
  text-align: center;
  margin-top: 6px;
  font-size: 9px;
  color: var(--faint);
}

.timeline-toolbar {
  display: grid;
  align-items: center;
  padding: 0 8px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--panel);
}
.tools {
  display: flex;
  align-items: center;
}
.tools .sep {
  width: 1px;
  height: 16px;
  background: var(--line2);
}
.timeline-name {
  font-size: 11px;
  font-weight: 600;
  display: flex;
  gap: 10px;
  align-items: center;
  white-space: nowrap;
}
.timeline-name .small {
  font-family: var(--mono);
  font-weight: 400;
}
.zoom {
  display: flex;
  align-items: center;
  gap: 6px;
  justify-content: flex-end;
}
.zoom input {
  width: 84px;
  height: 3px;
  accent-color: var(--dim);
}
.zoom span {
  font: 10px var(--mono);
  color: var(--faint);
  min-width: 32px;
}
.timeline-shell {
  display: flex;
  min-height: 0;
  background: var(--bg);
  position: relative;
  user-select: none;
}
.track-labels {
  flex-shrink: 0;
  background: var(--panel);
  border-right: 1px solid var(--line);
  z-index: 4;
  width: 100px;
  overflow: hidden;
}
.track-label-time {
  height: 26px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  padding-left: 10px;
  font: 9px var(--mono);
  color: var(--faint);
}
.track-label {
  height: 86px;
  display: flex;
  align-items: center;
  padding: 0 10px;
  border-bottom: 1px solid var(--line);
  position: relative;
  flex-shrink: 0;
}
.track-label b {
  font: 600 11px var(--mono);
  color: var(--dim);
}
.track-label span {
  display: none;
}
.track-label.audio {
  height: 46px;
  justify-content: space-between;
  gap: 3px;
}
.track-label.audio .iconbutton {
  width: 24px;
  min-height: 24px;
}
/* Tracks fit the height (track-layout.js), so no gutter is reserved for a vertical scrollbar. */
.timeline-scroll {
  overflow-x: auto;
  flex: 1;
  min-width: 0;
  scrollbar-width: thin;
  scrollbar-color: #3a3a3f transparent;
  overflow-y: auto;
}
.timeline-content {
  position: relative;
  min-width: 100%;
  height: auto;
  min-height: 100%;
}
.ruler {
  height: 26px;
  position: relative;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
}
.tick {
  position: absolute;
  top: 0;
  height: 100%;
  border-left: 1px solid #ffffff1f;
  font: 9px var(--mono);
  color: var(--faint);
  padding: 5px 0 0 5px;
  pointer-events: none;
}
.tick.minor {
  height: 6px;
  top: 20px;
  padding: 0;
}
.clip-lane {
  height: 86px;
  position: relative;
  border-bottom: 1px solid var(--line);
}
.audio-lane {
  height: 46px;
  position: relative;
  border-bottom: 1px solid var(--line);
}
.timeline-clip {
  --wf: #8a7cd8;
  position: absolute;
  top: 6px;
  height: 74px;
  border-radius: 6px;
  overflow: hidden;
  background: #1f1f22;
  cursor: grab;
  touch-action: none;
  box-shadow: inset 0 0 0 1px #ffffff14;
  min-height: 0;
  container: clip / inline-size;
}
.timeline-clip[data-workflow='v2v'] {
  --wf: #4fb3a9;
}
.timeline-clip[data-workflow='flf'] {
  --wf: #d6b25a;
}
.timeline-clip::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 3px;
  background: var(--wf);
  z-index: 2;
}
.timeline-clip.selected {
  z-index: 2;
}
.timeline-clip.selected::after {
  content: '';
  position: absolute;
  inset: 0;
  border: 2px solid var(--accent);
  border-radius: 6px;
  z-index: 2;
  pointer-events: none;
}
.timeline-clip.current .clip-label strong {
  color: #fff;
}
.timeline-clip.audition::after {
  content: '';
  position: absolute;
  inset: 0;
  border: 2px dashed var(--preview);
  border-radius: 6px;
  z-index: 2;
  pointer-events: none;
}
.filmstrip {
  position: absolute;
  inset: 0;
  display: flex;
  pointer-events: none;
}
.filmstrip img {
  min-width: 0;
  flex: 1;
  object-fit: cover;
  height: 100%;
  opacity: 0.62;
}
.clip-label {
  position: absolute;
  left: 0;
  right: 0;
  top: 3px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 9px 12px;
  background: linear-gradient(#000b, #0000);
  white-space: nowrap;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
}
.clip-label strong {
  font-size: 11px;
  font-weight: 600;
  color: #e8e6e0;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  flex: 1;
}
.clip-type {
  font: 600 8px var(--mono);
  color: var(--wf);
  letter-spacing: 0.05em;
}
.clip-meta {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
  padding: 10px 9px 4px;
  background: linear-gradient(#0000, #000c);
  font: 9px var(--mono);
  color: #cfccc5;
  pointer-events: none;
  z-index: 1;
  white-space: nowrap;
}
.clip-takes-status {
  overflow: hidden;
  text-overflow: ellipsis;
}
.clip-takes-status.busy {
  color: var(--accent);
}
.trim-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 3;
  touch-action: none;
  width: 10px;
}
.trim-handle.in {
  left: 0;
  cursor:
    url('data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%3E%3Cg%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%224%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M12%204H8v16h4M16%209l-3%203%203%203%22%2F%3E%3C%2Fg%3E%3Cg%20fill%3D%22none%22%20stroke%3D%22white%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M12%204H8v16h4M16%209l-3%203%203%203%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E')
      8 12,
    w-resize;
}
.trim-handle.out {
  right: 0;
  cursor:
    url('data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%3E%3Cg%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%224%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M12%204h4v16h-4M8%209l3%203-3%203%22%2F%3E%3C%2Fg%3E%3Cg%20fill%3D%22none%22%20stroke%3D%22white%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M12%204h4v16h-4M8%209l3%203-3%203%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E')
      16 12,
    e-resize;
}
.trim-handle::after {
  content: '';
  position: absolute;
  top: 22px;
  bottom: 22px;
  width: 3px;
  border-radius: 2px;
  background: var(--accent);
  opacity: 0;
  transition: opacity 0.12s;
}
.trim-handle.in::after {
  left: 2px;
}
.trim-handle.out::after {
  right: 2px;
}
.timeline-clip:hover .trim-handle::after {
  opacity: 0.8;
}
.trim-handle:hover::after {
  opacity: 1 !important;
}
.audio-clip {
  position: absolute;
  top: 5px;
  height: 36px;
  border-radius: 5px;
  overflow: hidden;
  background: #173027;
  box-shadow: inset 0 0 0 1px #2c5444;
  pointer-events: auto;
  cursor: grab;
}
.audio-clip.no-audio {
  background: transparent;
  box-shadow: inset 0 0 0 1px var(--line);
  cursor: default;
  pointer-events: none;
}
.audio-clip img {
  width: 100%;
  height: 100%;
  opacity: 0.7;
  filter: hue-rotate(-10deg) saturate(0.8);
  position: absolute;
  max-width: none;
  object-fit: fill;
}
.no-audio-label {
  position: absolute;
  left: 8px;
  font-size: 9px;
  color: var(--faint);
  top: 50%;
  transform: translateY(-50%);
}
.playhead {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--head);
  z-index: 5;
  pointer-events: none;
}
.playhead::before {
  content: '';
  position: absolute;
  left: -5px;
  top: 0;
  width: 11px;
  height: 12px;
  background: var(--head);
  clip-path: polygon(0 0, 100% 0, 100% 60%, 50% 100%, 0 60%);
}
.drop-line {
  position: absolute;
  top: 26px;
  height: 86px;
  width: 2px;
  background: var(--accent);
  z-index: 6;
  pointer-events: none;
  box-shadow: 0 0 8px var(--accent);
}
.selection-marquee {
  position: absolute;
  z-index: 8;
  border: 1px solid var(--accent);
  background: #ff9f5a22;
  pointer-events: none;
}
.multi-selected .inspector-tabs {
  display: none;
}
.multi-selected #clipName {
  color: var(--text);
  opacity: 1;
}
.timeline-empty {
  position: absolute;
  top: 30px;
  left: 20px;
  color: var(--faint);
  font-size: 11px;
}
.timeline-hint {
  padding: 6px 10px;
  color: var(--faint);
  font-size: 10px;
}
.footer {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 6px 0 12px;
  background: var(--panel);
  border-top: 1px solid var(--line);
  font-size: 10px;
  color: var(--dim);
}
.status-message {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.footer .textbutton {
  min-height: 20px;
  font-size: 10px;
  padding: 2px 6px;
}
.drag-ghost {
  position: fixed;
  z-index: 100;
  pointer-events: none;
  background: #1c1c1e;
  border: 1px solid #ff9f5a;
  color: #ebe9e4;
  padding: 6px 10px;
  border-radius: 6px;
  font:
    12px Inter,
    'Segoe UI',
    sans-serif;
  box-shadow: 0 10px 30px #000a;
  max-width: min(360px, calc(100vw - 16px));
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.toast {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  background: #1c1c1e;
  border: 1px solid var(--line2);
  color: var(--text);
  padding: 9px 14px;
  border-radius: 8px;
  z-index: 50;
  font-size: 11px;
  max-width: 90%;
  box-shadow: 0 12px 30px #000a;
}
.modal-overlay {
  position: absolute;
  inset: 0;
  background: #000a;
  display: grid;
  place-items: center;
  z-index: 30;
  padding: 18px;
  backdrop-filter: blur(2px);
}
.modal {
  background: var(--panel);
  border: 1px solid var(--line2);
  border-radius: 12px;
  max-width: 440px;
  width: 100%;
  max-height: 92%;
  overflow: auto;
  padding: 20px;
  box-shadow: 0 20px 60px #000c;
}
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.modal h2 {
  font-size: 15px;
  font-weight: 600;
  margin: 0;
}
.modal p {
  color: var(--dim);
  font-size: 11px;
  line-height: 1.7;
}
.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 18px;
}
.shortcut-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 9px;
  font-size: 11px;
  color: var(--text);
}
.shortcut-grid kbd {
  font: 10px var(--mono);
  background: var(--raised);
  border: 1px solid var(--line2);
  border-radius: 4px;
  padding: 2px 6px;
}
.queue-list {
  display: grid;
  gap: 6px;
  margin-top: 12px;
}
.queue-row {
  padding: 9px 10px;
  border-radius: 8px;
  background: var(--raised);
}
.queue-row strong {
  font-size: 11px;
  font-weight: 550;
  display: block;
}
.queue-row .small {
  display: flex;
  justify-content: space-between;
  margin-top: 4px;
}
.queue-empty {
  padding: 24px 0;
  text-align: center;
  color: var(--faint);
  font-size: 11px;
}
.download-link {
  color: var(--accent);
}
#modal.project-dialog {
  max-width: 760px;
  padding: 24px;
}
.project-dialog .modal-head {
  margin-bottom: 24px;
}
.project-dialog h2 {
  font-size: 20px;
  letter-spacing: -0.4px;
}
.project-dialog-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 28px;
}
.project-dialog h3 {
  font-size: 10px;
  font-weight: 600;
  color: var(--dim);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin: 0 0 12px;
}
.project-dialog h3 span {
  float: right;
  letter-spacing: 0;
  color: var(--faint);
}
.saved-project-list {
  display: grid;
  gap: 6px;
  max-height: 300px;
  overflow: auto;
  padding: 2px;
}
.saved-project-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 14px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--raised);
  color: var(--text);
  text-decoration: none;
}
.saved-project-row:hover {
  background: var(--hover);
  border-color: var(--line2);
}
.saved-project-row[aria-current] {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 6%, var(--panel));
}
.saved-project-icon {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 7px;
  background: var(--panel);
  color: var(--dim);
}
.saved-project-copy {
  display: grid;
  gap: 5px;
  min-width: 0;
  flex: 1;
}
.saved-project-copy strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 550;
}
.saved-project-copy small {
  color: var(--dim);
  font-size: 10px;
}
.saved-project-arrow {
  color: var(--faint);
  font-size: 18px;
}
.saved-project-row[aria-current] .saved-project-icon,
.saved-project-row[aria-current] small {
  color: var(--accent);
}
.project-dialog-tools {
  border-left: 1px solid var(--line);
  padding-left: 28px;
  min-width: 0;
}
.project-dialog-group + .project-dialog-group {
  border-top: 1px solid var(--line);
  padding-top: 16px;
  margin-top: 16px;
}
.project-dialog-action {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 34px;
  padding: 7px 8px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--text);
  text-align: left;
  font-size: 12px;
}
.project-dialog-action .icon {
  color: var(--dim);
  width: 15px;
  height: 15px;
}
.project-dialog-action:hover:not(:disabled) {
  background: var(--hover);
}
.project-dialog .project-current-name {
  font-size: 13px;
  font-weight: 550;
  overflow-wrap: anywhere;
  margin-bottom: 5px;
}
.project-dialog .project-current-meta {
  font-size: 10px;
  color: var(--dim);
  margin-bottom: 10px;
}
.project-dialog .project-open-file {
  margin-top: 12px;
}
.project-dialog .modal-footer {
  border-top: 1px solid var(--line);
  padding-top: 18px;
  margin-top: 24px;
  align-items: center;
  justify-content: space-between;
}
.project-dialog .modal-footer > span {
  font-size: 10px;
  color: var(--dim);
}
@media (max-width: 600px) {
  #modal.project-dialog {
    padding: 20px;
  }
  .project-dialog-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
  }
  .project-dialog-tools {
    border-left: 0;
    border-top: 1px solid var(--line);
    padding: 20px 0 0;
  }
  .saved-project-list {
    max-height: 210px;
  }
  .project-dialog .modal-footer {
    gap: 12px;
  }
  .project-dialog .modal-footer > span {
    max-width: 45%;
  }
}

@media (max-width: 1100px) {
  .workbench {
    grid-template-columns: minmax(0, 1fr) var(--inspector-width, 280px);
    grid-template-areas: 'viewer inspector' 'takes inspector';
  }
  .media-panel {
    display: none;
  }
  .media-panel.open {
    display: flex;
    position: absolute;
    z-index: 12;
    left: 0;
    top: 44px;
    bottom: 242px;
    width: min(var(--media-width, 220px), 100%);
    box-shadow: 10px 0 30px #000a;
  }
  .save-state {
    display: none;
  }
}
@media (min-width: 1101px) {
  .workbench.hide-media {
    grid-template-columns: minmax(0, 1fr) var(--inspector-width, 296px);
    grid-template-areas: 'viewer inspector' 'takes inspector';
  }
  .workbench.hide-media .media-panel {
    display: none;
  }
  .workbench.hide-inspector {
    grid-template-columns: var(--media-width, 208px) minmax(0, 1fr);
    grid-template-areas: 'pool viewer' 'pool takes';
  }
  .workbench.hide-media.hide-inspector {
    grid-template-columns: 1fr;
    grid-template-areas: 'viewer' 'takes';
  }
  .workbench.hide-inspector .inspector {
    display: none;
  }
}
@media (min-width: 761px) and (max-width: 1100px) {
  .workbench.hide-inspector {
    grid-template-columns: 1fr;
    grid-template-areas: 'viewer' 'takes';
  }
  .workbench.hide-inspector .inspector {
    display: none;
  }
}
@media (max-width: 760px) {
  .workbench {
    grid-template-columns: 1fr;
    grid-template-areas: 'viewer' 'takes';
  }
  .inspector {
    display: none;
  }
  .inspector.open {
    display: flex;
    position: absolute;
    right: 0;
    top: 44px;
    bottom: 242px;
    width: min(var(--inspector-width, 300px), 100%);
    z-index: 13;
    box-shadow: -10px 0 30px #000a;
  }
  .project-name {
    width: 120px;
  }
  .bar-sep,
  #reset,
  #duplicate,
  .viewer-meta > span,
  .viewer-context,
  .takes-keys {
    display: none;
  }
  .brand {
    margin-right: 2px;
  }
  .timeline-name {
    display: none;
  }
  .timeline-toolbar {
    grid-template-columns: 1fr auto;
  }
  .tc-block .small {
    display: none;
  }
  .viewer-time {
    font-size: 13px;
  }
}
@media (max-width: 520px) {
  #openProject,
  #saveProject,
  #previous,
  #next {
    display: none;
  }
  .topbar {
    padding: 0 6px 0 10px;
  }
  .topbar .brand .brand-wordmark {
    height: 15px;
  }
}

.panel-resize {
  position: absolute;
  inset: 0 auto 0 -4px;
  width: 9px;
  cursor: col-resize;
  touch-action: none;
  z-index: 15;
  outline-offset: -2px;
}
.panel-resize::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 4px;
  width: 2px;
  background: var(--accent);
  opacity: 0;
  transition: opacity 0.12s;
}
.panel-resize:hover::after,
.panel-resize:focus-visible::after,
.resizing-panels .panel-resize::after {
  opacity: 1;
}
.editor.resizing-panels,
.editor.resizing-panels * {
  cursor: col-resize !important;
  user-select: none !important;
}
.media-resize {
  left: auto;
  right: -4px;
  z-index: 16;
}

input:not([type='range']):not([type='file']),
textarea {
  cursor: text;
}
input[readonly] {
  cursor: default;
}
select,
a {
  cursor: pointer;
}
button:disabled {
  cursor: not-allowed;
}
.bin-card[data-media] {
  cursor: pointer;
}
.bin-card[draggable]:active {
  cursor: grabbing;
}
.ruler {
  cursor:
    url('data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%3E%3Cg%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%224%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M12%208v13M7%203h10l-5%205z%22%2F%3E%3C%2Fg%3E%3Cg%20fill%3D%22none%22%20stroke%3D%22white%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M12%208v13M7%203h10l-5%205z%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E')
      12 8,
    crosshair;
}
.scrub input,
input[type='range'] {
  cursor: pointer;
}
[data-gesture='roll'] {
  cursor:
    url('data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%3E%3Cg%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%224%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M10%205v14M14%205v14M6%209l-3%203%203%203M18%209l3%203-3%203M3%2012h18%22%2F%3E%3C%2Fg%3E%3Cg%20fill%3D%22none%22%20stroke%3D%22white%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M10%205v14M14%205v14M6%209l-3%203%203%203M18%209l3%203-3%203M3%2012h18%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E')
      12 12,
    ew-resize;
}
[data-gesture='slip'] {
  cursor:
    url('data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%3E%3Cg%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%224%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M4%205v14M20%205v14M8%209l-3%203%203%203M16%209l3%203-3%203M5%2012h14%22%2F%3E%3C%2Fg%3E%3Cg%20fill%3D%22none%22%20stroke%3D%22white%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M4%205v14M20%205v14M8%209l-3%203%203%203M16%209l3%203-3%203M5%2012h14%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E')
      12 12,
    ew-resize;
}
.trim-handle.blocked {
  cursor: not-allowed !important;
}
.trim-handle.blocked::after {
  background: var(--faint);
}
.editor.dragging-clip,
.editor.dragging-clip * {
  cursor: grabbing !important;
  user-select: none !important;
}
.editor.scrubbing,
.editor.scrubbing * {
  cursor:
    url('data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%3E%3Cg%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%224%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M12%208v13M7%203h10l-5%205z%22%2F%3E%3C%2Fg%3E%3Cg%20fill%3D%22none%22%20stroke%3D%22white%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M12%208v13M7%203h10l-5%205z%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E')
      12 8,
    crosshair !important;
}
.editor.editing-clip,
.editor.editing-clip * {
  cursor: var(--active-edit-cursor) !important;
  user-select: none !important;
}
.edit-feedback {
  font: 10px var(--mono);
  white-space: nowrap;
}
@media (max-width: 900px) {
  .timeline-name .small {
    display: none;
  }
  .tools .sep {
    margin: 0 3px;
  }
}

/* Editing controls and comparison viewer */
.editor {
  grid-template-rows: 44px minmax(0, 1fr) 38px var(--timeline-height, 232px) 24px;
}
.timeline-toolbar {
  position: relative;
  gap: 16px;
}
.tools {
  gap: 3px;
  min-width: 0;
}
.history-tools {
  display: flex;
  gap: 2px;
  align-items: center;
  flex-shrink: 0;
}
.history-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 26px;
  border: 1px solid transparent;
  border-radius: 4px;
  background: transparent;
  padding: 0 7px;
  color: var(--text);
  font-size: 10px;
  white-space: nowrap;
}
.history-button:hover:not(:disabled) {
  background: var(--hover);
  border-color: var(--line2);
}
.history-button:disabled {
  opacity: 0.8;
  color: var(--dim);
}
.tools .sep {
  margin: 0 4px;
}
.timeline-resize {
  position: absolute;
  left: 0;
  right: 0;
  top: -4px;
  height: 8px;
  cursor: row-resize;
  touch-action: none;
  z-index: 20;
}
.timeline-resize::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 3px;
  height: 2px;
  background: var(--accent);
  opacity: 0;
}
.timeline-resize:hover::after,
.timeline-resize:focus-visible::after,
.resizing-timeline .timeline-resize::after {
  opacity: 1;
}
.resizing-timeline,
.resizing-timeline * {
  cursor: row-resize !important;
  user-select: none !important;
}
.track-title {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.track-toggle {
  border: 1px solid var(--line2);
  border-radius: 3px;
  width: 18px;
  height: 20px;
  flex-shrink: 0;
  font: 600 9px var(--mono);
  background: transparent;
  color: var(--dim);
  padding: 0;
}
.track-toggle.active {
  background: #ff9f5a20;
  color: var(--accent);
  border-color: #ff9f5a66;
}
.track-toggle:hover {
  border-color: var(--accent);
}
.audio-clip.selected {
  box-shadow: inset 0 0 0 1px var(--accent);
}
.audio-clip.muted {
  opacity: 0.3;
}
/* The name reads over the volume line, which passes behind it. */
.audio-clip .audio-name {
  position: absolute;
  z-index: 1;
  left: 4px;
  top: 3px;
  max-width: calc(100% - 11px);
  padding: 0 3px;
  border-radius: 2px;
  background: #173d32d9;
  font-size: 11px;
  font-weight: 500;
  color: #c6d9d1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-shadow: 0 1px 2px #000;
  pointer-events: none;
  display: flex;
  align-items: center;
  gap: 5px;
}
.audio-gain-line {
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  background: #9ae0b5aa;
  pointer-events: none;
}
.audio-fade {
  position: absolute;
  bottom: 0;
  height: 100%;
  width: 100%;
  pointer-events: none;
}
.music-lane {
  background: #0d1310;
}
.music-clip {
  cursor: grab;
  background: #17342d;
  touch-action: none;
}
.music-clip.selected {
  z-index: 2;
  box-shadow: inset 0 0 0 2px var(--accent);
}
.music-clip .trim-handle {
  width: 8px;
}
.inspector-tabs {
  display: flex;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--bg);
  padding: 2px;
  flex-shrink: 0;
}
.inspector-tabs button {
  border: 0;
  border-radius: 3px;
  background: transparent;
  color: var(--dim);
  padding: 3px 6px;
  font-size: 10px;
}
.inspector-tabs button.active {
  color: var(--text);
  background: var(--raised);
}
.audio-controls .field input[type='range'],
.full-editor .audio-controls .field input[type='range'] {
  padding: 0;
  border: 0;
  background: var(--line2);
  accent-color: #79cba0;
  margin: 12px 0;
}
.audio-level-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.audio-level-head input {
  width: 68px !important;
}
.audio-note {
  font-size: 10px;
  color: var(--dim);
  line-height: 1.6;
  margin: 8px 0 18px;
}
.audio-controls .outline {
  width: 100%;
}
.audio-controls .two-fields {
  margin-top: 12px;
}
.audio-controls .outline.active {
  color: var(--accent);
  border-color: #ff9f5a66;
}
.audio-summary {
  font: 10px var(--mono);
  color: var(--dim);
  margin: 0 0 16px;
}
.trim-preview {
  position: absolute;
  inset: 0;
  z-index: 4;
  background: #050506;
  display: flex;
  flex-direction: column;
}
.trim-preview-head {
  height: 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 10px;
  background: #1b1b1d;
  gap: 8px;
  font-size: 11px;
  padding-right: 78px;
}
.trim-preview-head strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.trim-preview-head .mono {
  color: var(--accent);
  font-size: 10px;
  white-space: nowrap;
}
.trim-grid {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 2px;
  background: #303033;
}
.trim-grid.two {
  grid-template-rows: 1fr;
}
.trim-frame {
  position: relative;
  min-height: 0;
  background: #000;
  overflow: hidden;
}
.trim-frame video,
.trim-frame img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.trim-frame img {
  z-index: 1;
}
.trim-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 10px;
  color: var(--faint);
}
.trim-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 5px;
  padding: 5px 7px;
  background: #0d0d0ed9;
  z-index: 2;
  font-size: 9px;
}
.trim-caption > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.trim-caption b {
  font-size: 9px;
  color: var(--dim);
  font-weight: 400;
  white-space: nowrap;
}
.trim-frame:nth-child(-n + 2) .trim-caption {
  color: var(--accent);
}
.source-handles {
  position: absolute;
  top: 3px;
  height: 80px;
  border: 1px solid #dededeb0;
  background: #fff5;
  pointer-events: none;
  z-index: 0;
  border-radius: 4px;
}
.source-handles::after {
  content: 'Source handles';
  position: absolute;
  left: 3px;
  top: 3px;
  color: #ddd;
  font: 8px var(--mono);
}
.trim-preview .trim-frame:nth-child(-n + 2) {
  box-shadow: inset 0 2px var(--accent);
}
@media (max-width: 1100px) {
  .timeline-name {
    display: none;
  }
}
@media (max-width: 700px) {
  .history-button > span:last-child {
    display: none;
  }
  .tools .sep {
    margin: 0 1px;
  }
  .zoom input {
    width: 54px;
  }
}

[data-gesture='slide'] {
  cursor: move;
}
.mix-meter {
  height: 24px;
  width: 5px;
  border-radius: 2px;
  background: #252e28;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}
.mix-meter i {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: #79cba0;
}
.mix-meter.clipping i {
  background: #ff5468;
}
.audio-name .icon {
  width: 10px;
  height: 10px;
}
.audio-selected .inspector-foot {
  display: none;
}
.track-label .track-title {
  display: flex;
}
.timeline-clip .clip-meta {
  cursor: inherit;
}
.audio-selected .foot-note {
  display: none;
}
.timeline-toolbar {
  grid-template-columns: minmax(0, 1fr) auto auto auto;
}
.tools {
  overflow-x: auto;
  scrollbar-width: none;
}
.tools::-webkit-scrollbar {
  display: none;
}
.tools > .iconbutton,
.tools > .history-button,
.tools > .sep,
.mix-meter {
  flex-shrink: 0;
}
.audio-controls .audio-level-head {
  display: flex;
}
.monitor-button {
  padding: 0 6px;
}
.monitor-button.active {
  color: var(--accent);
}
.monitor-button .icon {
  width: 16px;
  height: 16px;
}
@media (max-width: 1100px) {
  .timeline-toolbar {
    grid-template-columns: minmax(0, 1fr) auto auto;
  }
  .monitor-button > span {
    display: none;
  }
  .monitor-button {
    min-width: 28px;
  }
}
@media (max-width: 700px) {
  .timeline-toolbar {
    gap: 4px;
  }
  .history-tools {
    gap: 0;
  }
  .history-button {
    padding: 0 4px;
  }
  .mix-meter {
    display: none;
  }
}
.history-tools .history-button > span:last-child {
  display: inline;
}
.audio-fade-handle {
  position: absolute;
  top: 2px;
  width: 10px;
  height: 10px;
  border: 1px solid #d4f0df;
  background: #255741;
  opacity: 0;
  z-index: 4;
  cursor: ew-resize;
  touch-action: none;
  border-radius: 2px;
}
.audio-fade-handle.in {
  transform: translateX(1px);
}
.audio-fade-handle.out {
  transform: translateX(-1px);
}
.audio-clip:hover .audio-fade-handle,
.audio-clip.selected .audio-fade-handle {
  opacity: 1;
}
@media (max-width: 520px) {
  .editor {
    grid-template-rows: 44px minmax(0, 1fr) 62px var(--timeline-height, 232px) 24px;
  }
  .timeline-toolbar {
    grid-template-columns: 1fr auto;
    grid-template-rows: 30px 26px;
    row-gap: 0;
  }
  .tools {
    grid-column: 1/-1;
  }
  .history-tools {
    grid-column: 1;
  }
  .zoom {
    grid-column: 2;
    grid-row: 2;
  }
}
@media (max-width: 520px) {
  #importAudio,
  .tools .sep {
    display: none;
  }
}
.media-panel.open,
.inspector.open {
  bottom: calc(var(--timeline-height, 232px) + 62px);
}
@media (max-width: 520px) {
  .media-panel.open,
  .inspector.open {
    bottom: calc(var(--timeline-height, 232px) + 86px);
  }
}
@media (max-width: 520px) {
  #saveProject,
  #openProject {
    display: none;
  }
  .project-name {
    width: 80px;
  }
  #queueLabel {
    display: none;
  }
  .queue-pill {
    min-width: 30px;
    padding: 3px 7px;
  }
  #export {
    font-size: 0;
    min-width: 34px;
    padding: 4px 8px;
  }
  #export .icon {
    width: 16px;
    height: 16px;
  }
}

.gesture-hint {
  font-size: 10px;
  color: var(--dim);
  max-width: 250px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: default;
}
.trim-toggle {
  position: absolute;
  right: 8px;
  top: 8px;
  z-index: 30;
  border: 1px solid #52616b;
  background: #19242eee;
  color: var(--text);
  border-radius: 4px;
  padding: 4px 8px;
  font-size: 10px;
  cursor: pointer;
}
.trim-handle.cut-selected::after {
  opacity: 1;
  background: var(--preview);
}
.hover-source-handles {
  opacity: 0.6;
}
.audio-clip .trim-handle::after {
  top: 3px;
  bottom: 3px;
}
@media (max-width: 900px) {
  .gesture-hint {
    max-width: 115px;
  }
  .timeline-name {
    display: none;
  }
}
@media (max-width: 500px) {
  .gesture-hint {
    display: none;
  }
  .trim-toggle {
    font-size: 9px;
    padding: 3px 6px;
  }
  .trim-preview-head {
    padding-right: 66px;
  }
}

.viewer-zoom {
  padding: 2px 5px;
  font: 10px var(--mono);
  color: var(--dim);
  min-width: 40px;
}
.viewer-stage > .zoomable,
.trim-frame > .zoomable {
  transform-origin: center;
  cursor: default;
}
.viewer-stage.zoomed > .zoomable,
.viewer-stage.zoomed .trim-frame > .zoomable {
  cursor: grab;
}
.viewer-stage.panning,
.viewer-stage.panning * {
  cursor: grabbing !important;
  user-select: none;
}
.viewer-stage {
  touch-action: none;
  cursor: default;
}
.viewer:focus {
  outline: none;
}
.external-drop {
  position: absolute;
  inset: 44px 10px 32px;
  z-index: 25;
  pointer-events: none;
  border: 2px dashed var(--accent);
  border-radius: 8px;
  background: #111114e8;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--text);
}
.external-drop strong {
  font-size: 18px;
}
.external-drop span {
  font-size: 12px;
  color: var(--dim);
}
.zoom-step {
  width: 22px;
  font-size: 16px;
}
.take-compare {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 6px;
  background: var(--panel);
}
.compare-pane {
  border: 1px solid var(--line2);
  border-radius: 4px;
  min-width: 0;
}
.compare-pane.active {
  border-color: var(--preview);
}
.compare-select {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: #141416ed;
  text-align: left;
  color: var(--dim);
  gap: 4px;
  padding: 5px;
  font-size: 10px;
}
.compare-select strong {
  color: var(--text);
}
.compare-pane.active .compare-select {
  color: var(--preview);
}
.compare-badge {
  margin-left: auto;
  white-space: nowrap;
  font-size: 8px;
}
.compare-badge.used {
  color: var(--accent);
}
.compare-picture {
  position: absolute;
  inset: 29px 0 20px;
}
.compare-pane .trim-caption {
  color: var(--dim);
}
.compare-pane .trim-caption b {
  display: inline;
}
.compare-pane .trim-caption .compare-end {
  color: var(--dim);
}
.compare-strip {
  display: none;
}
.compare-strip[aria-pressed='true'],
.compare-toggle[aria-pressed='true'] {
  border-color: var(--preview);
  color: var(--preview);
}
.viewer:is(:fullscreen, .expanded) {
  display: flex !important;
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  max-height: none !important;
  transform: none !important;
  background: var(--panel);
  padding: 8px;
  box-sizing: border-box;
  border: 0 !important;
  z-index: 100;
}
.viewer:is(:fullscreen, .expanded) .viewer-head {
  height: 40px;
}
.viewer:is(:fullscreen, .expanded) .viewer-context {
  display: block;
}
.viewer:is(:fullscreen, .expanded) .viewer-stage {
  flex: 1;
  min-height: 0;
}
.viewer:is(:fullscreen, .expanded) .viewer-controls {
  height: 42px;
  grid-template-columns: 1fr auto 1fr;
}
.viewer:is(:fullscreen, .expanded) .viewer-meta {
  display: flex;
}
.viewer:is(:fullscreen, .expanded) .viewer-stage .fullscreen {
  display: inline-flex;
  opacity: 1;
}
.viewer:is(:fullscreen, .expanded) .transport {
  justify-content: center;
}
@media (max-width: 700px) {
  .zoom input {
    display: none;
  }
  .zoom {
    gap: 2px;
  }
  .zoom span {
    font-size: 9px;
    min-width: 34px;
  }
}

.native-bindings {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.native-bindings .field {
  margin: 0;
}
.native-bindings code {
  font-size: 9px;
}
#native-clip-menu.viewer-menu {
  width: 264px;
  min-width: 0;
  padding: 6px;
  background: #1c1c1e;
  border-color: #3b3b3e;
  border-radius: 10px;
  box-shadow:
    0 12px 36px #0009,
    0 2px 8px #0006;
  max-height: calc(100vh - 12px);
  overflow-y: auto;
}
#native-clip-menu.viewer-menu .menu-action {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  min-height: 36px;
  border-radius: 5px;
  line-height: 1.3;
}
#native-clip-menu.viewer-menu .menu-action > .icon {
  width: 16px;
  height: 16px;
  color: var(--dim);
}
#native-clip-menu.viewer-menu .menu-action small {
  display: block;
  margin-top: 3px;
  font-size: 10px;
  color: var(--dim);
}
#native-clip-menu.viewer-menu button:hover {
  background: #2d2d30;
  outline: 0;
}
#native-clip-menu.viewer-menu button:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: -1px;
}
#native-clip-menu.viewer-menu button:disabled:hover {
  background: transparent;
}
#native-clip-menu.viewer-menu .menu-divider {
  height: 1px;
  background: #343437;
  margin: 5px 4px;
}
#native-clip-menu.viewer-menu kbd {
  font: 10px var(--mono);
  color: var(--dim);
}
#native-clip-menu.viewer-menu .menu-format {
  font: 9px var(--mono);
  color: var(--dim);
  border: 1px solid #3b3b3e;
  padding: 3px 4px;
  border-radius: 3px;
}

/* Video lanes stack from the highest track down to V1. */
#clipLane {
  height: auto;
  border-bottom: 0;
}
.video-track-lane {
  height: 96px;
  position: relative;
  border-bottom: 1px solid var(--line);
}
#native-clip-menu {
  max-height: calc(100vh - 12px);
  overflow-y: auto;
  position: fixed;
  z-index: 100;
  background: #202022;
  border: 1px solid var(--line2);
  border-radius: 8px;
  padding: 5px;
  min-width: 205px;
  max-width: calc(100vw - 12px);
  box-shadow: 0 8px 24px #0009;
  color: #eee;
  font:
    12px system-ui,
    sans-serif;
  border-color: #48484b;
}
.track-select {
  width: 100%;
  height: 100%;
  border: 0;
  background: none;
  color: var(--dim);
  text-align: left;
  padding: 0;
  font: 600 11px var(--mono);
}
.track-select.active {
  color: var(--text);
}
.timeline-clip.disabled-clip {
  filter: grayscale(1);
  opacity: 0.45;
}
.timeline-clip.disabled-clip .clip-label strong {
  text-decoration: line-through;
}
#audioLane {
  height: auto;
  border-bottom: 0;
}
/* Semantic colour tokens. Accent marks the primary action, selection and active state;
   warnings, links, errors and success each have their own colour. */
.editor {
  --warning: #ffce7b;
  --warning-surface: #3a2d18;
  --warning-line: #6b4b1a;
  --link: #8fc7ff;
  --danger: #ed7368;
  --success: #7fc59a;
}
/* Product chrome (formerly native.css) */
.native-bindings textarea {
  min-height: 74px;
  height: 100px;
  resize: vertical;
}
.native-advanced {
  margin-top: 14px;
  font-size: 11px;
}
.native-advanced summary {
  cursor: pointer;
  color: var(--dim);
  margin-bottom: 8px;
}
.native-count {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  white-space: nowrap;
}
.native-count input {
  width: 46px;
  min-width: 0;
  padding: 4px;
  background: var(--bg);
  border: 1px solid var(--line2);
  border-radius: 4px;
  color: var(--text);
}
.inspector-foot .foot-note {
  display: none;
}
.inspector-foot .generate {
  flex: 1;
  min-width: 0;
  width: auto;
}
.native-job-status {
  flex-basis: 100%;
  font-size: 10px;
  color: var(--dim);
}
.native-job-status:empty {
  display: none;
}
.native-source-value {
  display: block;
  max-width: 100%;
  font-size: 11px;
  overflow-wrap: anywhere;
}
.native-source-preview {
  display: block;
  max-width: 100%;
  height: 76px;
  object-fit: contain;
  background: #090909;
  margin: 4px 0;
  border-radius: 4px;
}
.native-capture-values {
  display: grid;
  gap: 10px;
  margin: 14px 0;
  max-height: 40vh;
  overflow: auto;
}
.native-capture-values label {
  font-size: 12px;
}
.native-capture-values output {
  display: block;
  color: var(--dim);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  max-height: 80px;
  overflow: auto;
  margin: 4px 0 0 22px;
}
.native-capture-values input[type='checkbox'] {
  width: auto !important;
}
.native-capture-values:empty {
  display: none;
}
#native-clip-menu[hidden] {
  display: none;
}
#native-clip-menu button {
  display: flex;
  flex-direction: column;
  width: 100%;
  align-items: flex-start;
  text-align: left;
  background: transparent;
  border: 0;
  padding: 8px;
  border-radius: 4px;
  min-height: 32px;
  color: inherit;
  font: inherit;
  cursor: pointer;
}
#native-clip-menu button:hover,
#native-clip-menu button:focus-visible {
  background: #343437;
  outline: 1px solid var(--accent);
}
#native-clip-menu button:disabled {
  color: #aaa;
  opacity: 1;
  cursor: not-allowed;
}
#native-clip-menu small {
  font-size: 10px;
  margin-top: 3px;
  white-space: normal;
  color: #bcbcc2;
}
.timeline-clip .trim-handle::after {
  top: 8px;
  bottom: 8px;
}
#native-clip-menu button:focus-visible {
  outline: 1px solid #ffa455;
}
#native-clip-menu.take-file-menu {
  display: flex;
  gap: 4px;
  min-width: 0;
}
#native-clip-menu.take-file-menu[hidden] {
  display: none;
}
#native-clip-menu.take-file-menu button {
  width: auto;
  white-space: nowrap;
}

/* Shared charcoal and amber controls, with mode-specific layout below. */
.editor {
  --bg: #101113;
  --panel: #17191c;
  --raised: #22252a;
  --hover: #2c3036;
  --line: #2e3239;
  --line2: #454b55;
  --text: #ecedf0;
  --dim: #b0b6c0;
  --faint: #89929f;
  --accent: #ffb52e;
  --accent-ink: #251b08;
  --head: #ffb52e;
  color-scheme: dark;
}
.workflow-library,
#poolSearch,
#timelineTime {
  display: none;
}
.bin-card .remove-media {
  position: absolute;
  top: 5px;
  right: 34px;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  display: grid;
  place-items: center;
  background: #0d0d0ecc;
  color: var(--text);
  opacity: 0;
}
.bin-card:hover .remove-media,
.bin-card:focus-within .remove-media,
.bin-card:focus-within .add {
  opacity: 1;
}
.bin-card .remove-media:hover {
  background: #733132;
  color: #fff;
}
.bin-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.processing-status {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 70px;
  max-width: 260px;
  padding: 4px 7px;
  font-size: 10px;
  color: var(--dim);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 5px;
}
#processingLabel {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#processingElapsed {
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}
.processing-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #6c8f7b;
  flex-shrink: 0;
}
.processing-status.busy .processing-dot {
  background: var(--accent);
}
.processing-status.busy {
  color: var(--text);
}
.diagnostics-log {
  display: block;
  width: 100%;
  min-height: 230px;
  max-height: 50vh;
  padding: 12px;
  border: 1px solid var(--line2);
  border-radius: 6px;
  background: var(--bg);
  color: var(--text);
  color-scheme: dark;
  font: 12px/1.6 var(--mono);
  white-space: pre;
  resize: vertical;
  scrollbar-color: var(--line2) var(--bg);
}
.diagnostics-log:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: 1px;
}
.full-editor {
  font-size: 13px;
  padding: 0 10px 8px;
  row-gap: 8px;
  grid-template-rows: 52px minmax(0, 1fr) 40px var(--timeline-height, 236px) 0px;
}
.full-editor .topbar {
  background: var(--panel);
  border-bottom: 1px solid var(--line);
}
.full-editor .brand {
  margin-right: 12px;
}
.full-editor .project-name {
  border-radius: 0;
  border-left: 1px solid var(--line2);
  width: 205px;
  padding-left: 18px;
  font-size: 15px;
  font-weight: 500;
}
.full-editor .bar-left {
  flex: 1;
}
.full-editor .bar-right {
  gap: 10px;
}
.full-editor .save-state {
  font-size: 0;
  margin-left: auto;
  margin-right: 8px;
}
.full-editor .dot {
  width: 7px;
  height: 7px;
}
.full-editor .save-state[data-state='error'] #saveStatus,
.full-editor .save-state[data-state='conflict'] #saveStatus {
  font-size: 11px;
  color: var(--accent);
}
.full-editor .save-state[data-state='saving'] .dot {
  background: var(--accent);
}
.full-editor .save-state[data-state='error'] .dot,
.full-editor .save-state[data-state='conflict'] .dot {
  background: var(--danger);
}
.full-editor #saveProject,
.full-editor #reset,
.full-editor #nativeAddGraph,
.full-editor .bar-sep,
.full-editor .footer {
  display: none;
}
.full-editor .queue-pill {
  color: var(--accent);
  border: 0;
  background: var(--raised);
  padding: 8px 14px;
  font-size: 12px;
}
.full-editor #export {
  min-height: 36px;
  padding: 7px 18px;
  border-radius: 6px;
  font-size: 13px;
}
.full-editor .workbench {
  grid-template-columns: var(--media-width, clamp(240px, 21vw, 350px)) minmax(0, 1fr) var(
      --inspector-width,
      clamp(360px, 30vw, 520px)
    );
  grid-template-rows: minmax(0, 1fr) clamp(120px, 16vh, 180px);
  column-gap: 8px;
  row-gap: 0;
}
.full-editor .workbench:has(.takes:not(.has-clip)) {
  grid-template-rows: minmax(0, 1fr) 0px;
}
.full-editor .takes:not(.has-clip) {
  display: none;
}
.full-editor .workbench:has(.takes.has-clip:not(.has-real-takes)) {
  grid-template-rows: minmax(0, 1fr) auto;
}
.full-editor .takes:not(.has-real-takes) .takes-keys {
  display: none;
}
#openClipFolder {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 5px;
  min-height: 22px;
  font-size: 10px;
  white-space: nowrap;
  flex-shrink: 0;
}
#openClipFolder[hidden] {
  display: none;
}
#openClipFolder .icon {
  width: 13px;
  height: 13px;
}
@media (max-width: 760px) {
  .full-editor .workbench:has(.takes.has-real-takes) {
    grid-template-rows: minmax(0, 1fr) 180px;
  }
}
.full-editor .media-panel {
  display: flex;
  background: transparent;
  border: 0;
}
.full-editor .media-panel > .panel-head {
  background: var(--panel);
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  height: 36px;
  padding: 0 6px 0 4px;
}
.full-editor .media-panel > .panel-scroll {
  background: var(--panel);
  border: 1px solid var(--line);
  border-top: 0;
  border-radius: 0 0 8px 8px;
  padding: 6px 8px 8px;
  margin-bottom: 8px;
}
.full-editor .panel-head {
  padding: 0 9px;
}
.full-editor .seg {
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0;
  gap: 8px;
}
.full-editor .seg button {
  font-size: 13px;
  min-height: 31px;
  border-radius: 4px 4px 0 0;
  padding: 5px 12px;
  border-bottom: 2px solid transparent;
}
.full-editor .seg button.active {
  background: var(--raised);
  border-color: var(--accent);
}
.full-editor .pool-toolbar {
  display: flex;
  align-items: center;
  padding: 4px 9px 6px;
  background: var(--panel);
  border-inline: 1px solid var(--line);
  flex-wrap: wrap;
  gap: 6px;
}
.full-editor .bin-title {
  font-size: 11px;
  white-space: nowrap;
  margin: 0;
}
.full-editor #poolSearch {
  display: block;
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--line2);
  border-radius: 4px;
  height: 26px;
  padding: 5px 7px;
  font-size: 11px;
  flex: 1;
  min-width: 90px;
}
.full-editor .bin-grid {
  grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
  gap: 6px;
}
.full-editor .bin-card {
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--panel);
}
.full-editor .bin-card.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}
.full-editor .bin-card img {
  opacity: 1;
}
.full-editor .bin-card .bin-text {
  padding: 4px 5px;
}
.full-editor .bin-card strong {
  font-size: 11px;
  font-weight: 500;
}
.full-editor .bin-tag {
  top: auto;
  left: 5px;
  background: #080b0dcc;
  color: var(--text);
  font-size: 9px;
  padding: 2px 4px;
  bottom: 25px;
}
.full-editor .media-panel .panel-foot {
  display: none;
}
.full-editor .workflow-library {
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  max-height: 42%;
  min-height: 100px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}
.full-editor .workflow-library .panel-head {
  height: 35px;
  min-height: 35px;
}
.full-editor .workflow-library strong {
  font-size: 12px;
  font-weight: 550;
}
.full-editor #workflowList {
  overflow: auto;
  scrollbar-width: thin;
  padding: 0 7px 7px;
}
.workflow-row {
  display: block;
  position: relative;
  text-align: left;
  width: 100%;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: inherit;
  padding: 9px 10px;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: grab;
}
.workflow-row:hover,
.workflow-row:focus-visible {
  background: var(--hover);
}
.workflow-row.active {
  background: var(--raised);
}
.workflow-row.active::before {
  content: '';
  position: absolute;
  inset: 5px auto 5px 0;
  width: 3px;
  border-radius: 2px;
  background: var(--accent);
}
.full-editor .viewer {
  background: var(--panel);
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  overflow: hidden;
}

.full-editor .viewer-context {
  font-size: 12px;
}
.full-editor .viewer-settings {
  display: flex;
  gap: 6px;
  margin-left: auto;
  flex-shrink: 0;
  align-items: center;
}
.full-editor .viewer-settings .viewer-zoom {
  border: 1px solid var(--line2);
  border-radius: 4px;
  min-width: 43px;
  font-size: 11px;
}
.full-editor .viewer-meta #viewerResolution,
.full-editor .viewer-overlay {
  display: none;
}
.full-editor .viewer-stage {
  box-shadow: none;
}
.full-editor .scrub input {
  height: 2px;
}
.full-editor .viewer-controls {
  padding: 0 9px;
  gap: 5px;
}
.full-editor .viewer-time {
  font-size: 13px;
  font-weight: 400;
}
.full-editor .tc-block {
  gap: 6px;
}
.full-editor .viewer-meta {
  gap: 2px;
}
.full-editor .monitor-button > span {
  display: none;
}
.full-editor .transport .play {
  width: 30px;
  height: 30px;
  margin: 0 3px;
}
.full-editor input[type='range'] {
  appearance: none;
  border-radius: 3px;
  background: var(--line2);
  height: 3px;
}
.full-editor input[type='range']::-webkit-slider-thumb {
  appearance: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text);
}
.full-editor input[type='range']::-moz-range-thumb {
  border: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text);
}
.full-editor #seek::-webkit-slider-thumb {
  background: var(--accent);
}
.full-editor .viewer.source-mode #seek::-webkit-slider-thumb {
  background: var(--preview);
}
.full-editor .takes {
  border: 1px solid var(--line);
  border-radius: 0 0 8px 8px;
  background: var(--panel);
}
.full-editor .takes-head {
  padding: 0 9px;
}
.full-editor .takes-title {
  font-size: 12px;
  font-weight: 600;
}
.full-editor #takeCount,
.full-editor .takes-keys {
  display: none;
}
.full-editor .takes-clip {
  font-size: 11px;
}
.full-editor .takes-clip:not(:empty)::before {
  content: '— ';
  color: var(--dim);
}
.full-editor .take-list {
  padding: 2px 8px 8px;
  gap: 8px;
}
.full-editor .take-card {
  flex: 1 0 190px;
  max-width: max(190px, calc((100% - 16px) / 3));
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 5px;
  border: 1px solid var(--line2);
  border-radius: 6px;
  background: var(--raised);
}
.full-editor .take-card.chosen {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
  background: #1b211e;
}
.full-editor .take-card.viewing:not(.chosen) {
  border-color: var(--preview);
  box-shadow: none;
}
.full-editor .take-heading {
  height: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  padding-right: 20px;
}
.full-editor .take-heading strong {
  font-weight: 600;
}
.full-editor .take-badge {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 3px;
  line-height: 1;
  background: #1b3940;
  color: var(--preview);
}
.full-editor .take-badge.used {
  background: #3b311b;
  color: var(--accent);
}
.full-editor .take-thumb {
  flex: 1;
  min-height: 0;
  aspect-ratio: auto;
  width: 100%;
  align-self: stretch;
  border-radius: 3px;
}
.take-badge.new {
  background: #20334a;
  color: #aed7ff;
}
.full-editor .take-details {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 20px;
  color: var(--dim);
  font-size: 10px;
  font-family: var(--mono);
}
.full-editor .take-seed {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.full-editor .use-take {
  margin-left: auto;
  min-height: 21px;
  padding: 2px 7px;
  color: var(--text);
  background: var(--panel);
  font:
    11px 'Segoe UI',
    sans-serif;
  flex-shrink: 0;
}
.full-editor .inspector {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.full-editor .inspector-head {
  padding: 0 8px;
  gap: 6px;
}
.full-editor .inspector-name {
  min-width: 0;
  font-size: 13px;
  font-weight: 600;
}
.full-editor .inspector-tabs {
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0;
  gap: 5px;
}
.full-editor .inspector-tabs button {
  border-radius: 4px 4px 0 0;
  border-bottom: 2px solid transparent;
}
.full-editor .inspector-tabs button.active {
  border-color: var(--accent);
}
.full-editor .inspector .panel-scroll {
  padding: 8px 10px;
}
.full-editor .field > span {
  font-size: 12px;
  color: var(--dim);
  margin-bottom: 3px;
}
.full-editor .field input,
.full-editor .field select,
.full-editor .field textarea {
  background: var(--bg);
  border-color: var(--line2);
  font-size: 12px;
  padding: 6px 7px;
}
.full-editor .native-bindings {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}
.full-editor .native-bindings .field {
  grid-column: 1/-1;
  min-width: 0;
  margin: 0;
}
.full-editor .native-bindings .binding-seed,
.full-editor .native-bindings .binding-duration {
  grid-column: auto;
}
.full-editor .native-bindings textarea {
  height: 76px;
  min-height: 64px;
}
.full-editor .native-source-preview {
  height: 90px;
  width: 100%;
  object-fit: contain;
  border: 1px solid var(--line);
  margin: 0 0 5px;
}
.full-editor .native-advanced {
  font-size: 11px;
  margin-top: 8px;
}
.full-editor .inspector-foot {
  border: 0;
  gap: 0;
  padding: 8px 10px;
}
.full-editor .generate {
  border-radius: 5px 0 0 5px;
  min-height: 40px;
  font-size: 13px;
}
.full-editor .generate:only-child {
  border-radius: 5px;
}
.full-editor .native-count {
  order: 1;
  font-size: 0;
  padding: 0;
  margin: 0;
  background: var(--accent);
  border-radius: 0 5px 5px 0;
}
.full-editor .native-count input {
  width: 55px;
  height: 40px;
  border: 0;
  border-left: 1px solid #241c0840;
  border-radius: 0 5px 5px 0;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 7px 6px;
  font-size: 13px;
  text-align: center;
}
.full-editor .native-count[hidden] + .generate {
  border-radius: 5px;
}
.full-editor .native-job-status {
  order: 2;
  padding-top: 6px;
  font-size: 11px;
}
.full-editor .timeline-toolbar {
  background: var(--panel);
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 8px;
}
.full-editor .timeline-name {
  display: flex;
  justify-content: center;
  font-size: 13px;
  font-weight: 400;
}
.full-editor #timelineTime {
  display: inline;
}
.full-editor .sequence-name,
.full-editor #sequenceStats,
.full-editor .gesture-hint,
.full-editor .history-tools .history-button > span:last-child {
  display: none;
}
.full-editor .tools {
  gap: 4px;
}
.full-editor .history-tools {
  margin-left: 3px;
}
.full-editor .zoom {
  justify-content: flex-end;
}
.full-editor .zoom span {
  font-size: 10px;
}
.full-editor .zoom input {
  width: 65px;
}
.full-editor .timeline-shell {
  border: 1px solid var(--line);
  border-top: 0;
  border-radius: 0 0 7px 7px;
  overflow: hidden;
}
.full-editor .track-labels {
  width: 94px;
  background: var(--panel);
}
.full-editor .track-label-time,
.full-editor .ruler {
  height: 28px;
}
.full-editor .track-label,
.full-editor .clip-lane {
  height: 96px;
}
.full-editor .timeline-clip {
  top: 6px;
  height: 84px;
  border: 1px solid #66719888;
  background: #182126;
  border-radius: 5px;
}
.full-editor .timeline-clip::before {
  display: none;
}
.full-editor .timeline-clip.selected {
  border-color: var(--accent);
}
.full-editor .timeline-clip.selected::after {
  border-width: 1px;
}
.full-editor .clip-label {
  padding: 4px 7px;
  font-size: 12px;
}
.full-editor .clip-label strong {
  font-size: 11px;
  font-weight: 500;
}
.full-editor .clip-type,
.full-editor .clip-meta > span:not(:last-child) {
  display: none;
}
.full-editor .clip-meta {
  justify-content: flex-end;
  padding: 4px 7px;
  font-size: 10px;
}
.full-editor .filmstrip img {
  opacity: 0.85;
}
.full-editor .track-label.audio,
.full-editor .audio-lane {
  height: 48px;
}
.full-editor .audio-clip {
  height: 38px;
  background: #173d32;
  box-shadow: inset 0 0 0 1px #487064;
}
.full-editor .tick {
  font-size: 10px;
  color: var(--dim);
}
.full-editor .timeline-hint {
  display: none;
}
.add-shot {
  position: absolute;
  top: 34px;
  width: 140px;
  height: 84px;
  border: 1px dashed var(--line2);
  border-radius: 5px;
  background: var(--panel);
  color: var(--dim);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-size: 12px;
  z-index: 1;
}
.add-shot .icon {
  width: 14px;
  height: 14px;
}
.add-shot:hover {
  color: var(--text);
  border-color: var(--accent);
  background: var(--raised);
}
.full-editor .timeline-empty {
  display: none;
}
.shot-picker {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr);
  gap: 18px;
}
.shot-picker h3 {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 500;
}
.shot-workflows,
.shot-media {
  max-height: 360px;
  overflow: auto;
  margin-bottom: 12px;
}
.shot-workflows .workflow-row {
  cursor: pointer;
  border-bottom: 1px solid var(--line);
}
.shot-media {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.shot-media-item {
  background: var(--raised);
  border: 1px solid var(--line);
  border-radius: 5px;
  overflow: hidden;
  padding: 0;
  text-align: left;
  min-width: 0;
  color: inherit;
}
.shot-media-item:hover {
  border-color: var(--accent);
}
.shot-media-item img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  display: block;
}
.shot-media-item span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 6px;
  font-size: 11px;
}
@media (min-width: 1101px) {
  .full-editor #toggleMedia {
    display: none;
  }
  .full-editor .workbench.hide-media {
    grid-template-columns: minmax(0, 1fr) var(--inspector-width, clamp(360px, 30vw, 520px));
  }
  .full-editor .workbench.hide-media .media-panel {
    display: none;
  }
  .full-editor .workbench.hide-inspector {
    grid-template-columns: var(--media-width, clamp(240px, 21vw, 350px)) minmax(0, 1fr);
  }
  .full-editor .workbench.hide-media.hide-inspector {
    grid-template-columns: 1fr;
  }
  .full-editor .workbench.hide-inspector .inspector {
    display: none;
  }
}
@media (max-width: 1100px) {
  .full-editor .workbench {
    grid-template-columns: minmax(0, 1fr) var(--inspector-width, 360px);
    grid-template-areas: 'viewer inspector' 'takes inspector';
  }
  .full-editor .media-panel {
    display: none;
  }
  .full-editor .media-panel.open {
    display: flex;
    position: absolute;
    top: 60px;
    left: 10px;
    bottom: calc(var(--timeline-height, 236px) + 56px);
    width: min(var(--media-width, 300px), calc(100% - 20px));
    z-index: 14;
    background: var(--bg);
    border-radius: 8px;
    box-shadow: 10px 0 30px #0009;
  }
  .full-editor .timeline-name {
    display: flex;
  }
  .full-editor .project-name {
    width: 175px;
  }
  .full-editor .queue-pill {
    padding: 6px 10px;
  }
  .full-editor .bar-right {
    gap: 5px;
  }
}
@media (max-width: 760px) {
  .full-editor {
    padding: 0 6px 6px;
    row-gap: 6px;
    grid-template-rows: 46px minmax(0, 1fr) 36px var(--timeline-height, 236px) 0px;
  }
  .full-editor .topbar {
    margin: 0 -6px;
    padding: 0 8px;
  }
  .full-editor .brand {
    margin-right: 0;
  }
  .full-editor .brand-wordmark {
    height: 21px;
  }
  .full-editor .project-name {
    font-size: 11px;
    width: 125px;
    padding-left: 8px;
  }
  .full-editor .bar-right {
    gap: 2px;
  }
  .full-editor #export {
    font-size: 11px;
    padding: 4px 9px;
    min-height: 29px;
  }
  .full-editor #openProject {
    display: none;
  }
  .full-editor .save-state {
    display: none;
  }
  .full-editor .workbench {
    grid-template-columns: 1fr;
    grid-template-areas: 'viewer' 'takes';
    grid-template-rows: minmax(0, 1fr) 118px;
  }
  .full-editor .inspector {
    display: none;
  }
  .full-editor .inspector.open {
    display: flex;
    top: 52px;
    right: 6px;
    bottom: calc(var(--timeline-height, 236px) + 50px);
    width: min(var(--inspector-width, 300px), calc(100% - 12px));
    z-index: 14;
  }
  .full-editor .viewer-context {
    display: none;
  }
  .full-editor .viewer-settings {
    gap: 3px;
  }
  .full-editor .viewer-time {
    font-size: 11px;
  }
  .full-editor .viewer-controls {
    padding: 0 6px;
  }
  .full-editor .tc-block .small {
    display: none;
  }
  .full-editor .transport {
    gap: 0;
  }
  .full-editor .take-card {
    flex-basis: 160px;
  }
  .full-editor .timeline-name {
    display: none;
  }
  .full-editor .timeline-toolbar {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 4px;
    margin-bottom: -6px;
  }
  .full-editor .track-labels {
    width: 72px;
  }
  .full-editor .shot-picker {
    grid-template-columns: 1fr;
  }
  .full-editor .shot-workflows,
  .full-editor .shot-media {
    max-height: 180px;
  }
}

.native-bindings .binding-source button {
  margin-top: 5px;
}
.video-track-toggle {
  flex-shrink: 0;
  margin-left: 7px;
}
.video-track-toggle .icon {
  width: 15px;
  height: 15px;
}
.disabled-track .track-select {
  opacity: 0.5;
}
.video-track-toggle[aria-pressed='false'] {
  color: var(--faint);
  background: var(--raised);
}
.media-view-controls {
  display: flex;
  gap: 2px;
  flex-shrink: 0;
}
.media-view-controls[hidden] {
  display: none;
}
.media-view-controls button {
  display: grid;
  place-items: center;
  width: 26px;
  min-height: 26px;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--faint);
}
.media-view-controls button.active {
  color: var(--text);
  background: var(--raised);
}
.media-detail {
  display: none;
}
.bin-grid.media-list {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.bin-grid.media-list .bin-card {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 23px 23px;
  align-items: center;
  gap: 5px;
  padding: 5px;
  min-height: 47px;
  flex-shrink: 0;
}
.bin-grid.media-list .bin-card img {
  width: 48px;
  height: 32px;
  aspect-ratio: auto;
  border-radius: 3px;
  object-fit: cover;
}
.bin-grid.media-list .bin-text {
  grid-column: 2;
  grid-row: 1;
  padding: 0;
  min-width: 0;
}
.bin-grid.media-list .bin-tag {
  display: none;
}
.bin-grid.media-list .media-detail {
  display: block;
  font-size: 9px;
  line-height: 1.5;
  color: var(--dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-transform: capitalize;
}
.bin-grid.media-list .bin-card .add,
.bin-grid.media-list .bin-card .remove-media {
  position: static;
  opacity: 1;
  width: 23px;
  height: 25px;
  padding: 3px;
  grid-row: 1;
}
.bin-grid.media-list .bin-card .add {
  grid-column: 3;
}
.bin-grid.media-list .bin-card .remove-media {
  grid-column: 4;
}
.bin-grid.media-list .bin-card .icon {
  width: 14px;
  height: 14px;
}

.track-resize {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 7px;
  cursor: row-resize;
  touch-action: none;
  z-index: 8;
}
.track-resize::after {
  content: '';
  position: absolute;
  left: calc(50% - 10px);
  width: 20px;
  bottom: 1px;
  height: 2px;
  border-radius: 2px;
  background: var(--line2);
}
.track-resize:hover,
.track-resize:focus-visible {
  background: #ffb52620;
  outline: 1px solid var(--accent);
  outline-offset: -1px;
}
.track-resize:hover::after,
.track-resize:focus-visible::after {
  background: var(--accent);
}
.resizing-track,
.resizing-track * {
  cursor: row-resize !important;
  user-select: none !important;
}
.audio-track-lane {
  position: absolute;
  left: 0;
  right: 0;
  border-bottom: 1px solid var(--line);
  pointer-events: none;
}
.take-tools {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  margin-left: auto;
}
.take-tools[hidden] {
  display: none;
}
.take-tools button {
  padding: 2px 5px;
  min-height: 22px;
  font-size: 10px;
  white-space: nowrap;
}
#takeSelectionCount {
  font-size: 10px;
  color: var(--dim);
  white-space: nowrap;
}
.full-editor .takes-head {
  height: auto;
  min-height: 30px;
  flex-wrap: wrap;
  gap: 5px;
  padding-block: 3px;
}
.take-card.take-selected {
  outline: 2px solid var(--preview);
  outline-offset: -2px;
}
.take-card .take-select {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 14px;
  height: 14px;
  margin: 0;
  z-index: 4;
  accent-color: var(--accent);
  cursor: pointer;
}
.viewer-stage .take-scrub-preview {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
  pointer-events: none;
  z-index: 20;
}
.take-scrub-preview[hidden] {
  display: none;
}

.take-hover-label {
  display: none;
  position: absolute;
  left: 10px;
  bottom: 10px;
  max-width: calc(100% - 20px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  z-index: 21;
  pointer-events: none;
  background: #0d0d0ecc;
  color: var(--preview);
  padding: 4px 8px;
  border-radius: 4px;
  font: 11px var(--mono);
}
.take-hover-active .take-hover-label {
  display: block;
}

#exportRangeBar {
  position: absolute;
  top: 0;
  height: 6px;
  background: #ffb52633;
  border-top: 2px solid var(--accent);
  z-index: 7;
  pointer-events: auto;
}
#exportRangeBar button {
  position: absolute;
  top: -2px;
  min-height: 16px;
  padding: 1px 3px;
  border: 0;
  border-radius: 2px;
  background: var(--accent);
  color: #201400;
  font: 9px var(--mono);
  pointer-events: auto;
  cursor: ew-resize;
  touch-action: none;
  opacity: 0;
}
#exportRangeBar [data-export-edge='start'] {
  left: 0;
}
#exportRangeBar [data-export-edge='end'] {
  right: 0;
}
#exportRangeBar button:focus-visible {
  outline: 2px solid var(--preview);
  outline-offset: 2px;
}
#exportRangeSettings {
  padding: 2px 6px;
  min-height: 24px;
  font-size: 10px;
}
.export-range-presets {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.export-range-fields input {
  font-family: var(--mono);
}
#exportRangeError {
  color: var(--head);
}
.inspector-height {
  flex-shrink: 0;
  padding: 3px 5px;
  font-size: 10px;
  white-space: nowrap;
}
.inspector-height[aria-pressed='true'] {
  color: var(--accent);
  border-color: var(--accent);
}
.editor.inspector-full {
  column-gap: 8px;
  grid-template-columns: minmax(0, 1fr) var(--inspector-width, clamp(360px, 30vw, 520px));
}
.inspector-full > .topbar {
  grid-column: 1/-1;
  grid-row: 1;
}
.inspector-full > .workbench {
  grid-column: 1;
  grid-row: 2;
  grid-template-columns: var(--media-width, clamp(240px, 21vw, 350px)) minmax(0, 1fr);
  grid-template-areas: 'pool viewer' 'pool takes';
}
.inspector-full > .inspector {
  inset: auto;
  grid-column: 2;
  grid-row: 2/5;
  grid-area: 2/2/5/3;
}
.inspector-full > .timeline-toolbar {
  grid-column: 1;
  grid-row: 3;
  grid-template-columns: minmax(0, 1fr) auto auto;
}
.inspector-full > .timeline-shell {
  grid-column: 1;
  grid-row: 4;
}
.inspector-full > .footer {
  grid-column: 1/-1;
  grid-row: 5;
}
.full-editor.inspector-full > .workbench.hide-media {
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: 'viewer' 'takes';
}
.full-editor.inspector-full:has(.workbench.hide-inspector) {
  grid-template-columns: minmax(0, 1fr);
}
.full-editor.inspector-full:has(.workbench.hide-inspector) > .inspector {
  display: none;
}
@media (max-width: 1100px) {
  .full-editor.inspector-full > .workbench {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: 'viewer' 'takes';
  }
}
@media (max-width: 760px) {
  .full-editor.inspector-full {
    grid-template-columns: minmax(0, 1fr);
  }
  .full-editor.inspector-full > .inspector.open {
    position: absolute;
    top: 52px;
    bottom: 6px;
    right: 6px;
    grid-area: auto;
  }
}
.inspector .native-source-preview {
  grid-column: 1;
  grid-row: 2;
  width: 72px;
  height: 44px;
  margin: 0;
  object-fit: contain;
}
.timeline-toolbar {
  container-type: inline-size;
  container-name: timeline-tools;
}
@container timeline-tools (max-width:1000px) {
  .gesture-hint,
  .timeline-name #sequenceStats,
  .timeline-name .sequence-name {
    display: none;
  }
  .tools .sep {
    margin-inline: 2px;
  }
  .zoom input {
    width: 50px;
  }
}
@container timeline-tools (max-width:760px) {
  .timeline-name {
    display: none;
  }
  .tools #duplicate,
  .tools #gestureHelp {
    display: none;
  }
  .tools {
    gap: 1px;
  }
  .zoom input {
    width: 40px;
  }
}
.full-editor.inspector-full .binding-positive textarea {
  height: clamp(100px, 18vh, 200px);
}

/* Keep controls legible while reserving amber for the active edit and primary actions. */
.editor :focus-visible,
.editor .field :focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.editor .panel-resize {
  outline: none;
}
.editor .panel-resize::after {
  opacity: 0;
  transition: opacity 0.15s;
  transition-delay: 0s;
}
.editor .panel-resize:hover::after {
  opacity: 0.45;
  transition-delay: 0.5s;
}
.editor .panel-resize:focus-visible::after,
.editor.resizing-panels .panel-resize:focus::after {
  opacity: 0.55;
  transition-delay: 0s;
}
.editor .primary:disabled {
  background: var(--raised);
  border-color: var(--line);
  color: var(--faint);
  opacity: 1;
}
.editor .field input:hover:not(:disabled),
.editor .field textarea:hover:not(:disabled),
.editor .field select:hover:not(:disabled) {
  border-color: #626b79;
}
.editor .field input:focus,
.editor .field textarea:focus,
.editor .field select:focus {
  border-color: var(--accent);
}
.editor .seg button.active,
.editor .inspector-tabs button.active {
  color: var(--text);
  font-weight: 600;
}
.editor .history-tools {
  border-left: 1px solid var(--line2);
  padding-left: 5px;
  margin-left: 5px;
}
.editor .take-card.chosen {
  background: #2b271e;
}
.editor .take-card .take-select {
  opacity: 0;
  transition: opacity 0.12s;
}
.editor .take-card:hover .take-select,
.editor .take-card:focus-within .take-select,
.editor .take-card.take-selected .take-select {
  opacity: 1;
}
.full-editor #takeCount {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  margin-left: 6px;
  border-radius: 4px;
  background: var(--raised);
  color: var(--dim);
  font: 10px var(--mono);
}
.editor .native-advanced > summary {
  padding: 7px 0;
  color: var(--dim);
  cursor: pointer;
}
.editor .native-advanced[open] > summary {
  color: var(--text);
}

/* Empty panels explain their next useful action rather than leaving dead space. */
.empty-symbol {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line2);
  border-radius: 10px;
  background: var(--raised);
  color: var(--dim);
}
.empty-symbol .icon {
  width: 21px;
  height: 21px;
}
.empty-stage {
  max-width: 380px;
  padding: 18px;
  text-align: center;
  color: var(--dim);
}
.empty-stage strong {
  display: block;
  font-size: 20px;
  font-weight: 550;
  letter-spacing: -0.3px;
  color: var(--text);
  margin-top: 15px;
}
.empty-stage p {
  font-size: 12px;
  line-height: 1.7;
  margin: 10px 0 20px;
}
.empty-stage small {
  display: block;
  margin-top: 14px;
  font-size: 11px;
  color: var(--faint);
}
.empty-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}
.empty-actions button {
  min-height: 34px;
  font-size: 12px;
}
.empty-stage .gap-empty {
  display: none;
  font-size: 12px;
  color: var(--dim);
}
.empty-stage.in-gap .welcome-empty {
  display: none;
}
.empty-stage.in-gap .gap-empty {
  display: block;
}
.pool-empty {
  grid-column: 1/-1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 22px 10px;
  gap: 10px;
  min-width: 0;
  color: var(--dim);
}
.pool-empty strong,
.selection-empty strong {
  color: var(--text);
  font-size: 13px;
  font-weight: 550;
}
.pool-empty p,
.selection-empty p {
  font-size: 11px;
  line-height: 1.6;
  margin: 0;
  max-width: 220px;
}
.pool-empty small,
.selection-empty small {
  font-size: 10px;
  color: var(--faint);
}
.pool-empty button {
  margin-top: 2px;
  font-size: 11px;
}
.workflow-empty {
  padding: 0 5px 5px;
}
.workflow-empty p {
  font-size: 11px;
  line-height: 1.5;
  color: var(--dim);
  margin: 4px 0;
}
.workflow-empty .textbutton {
  font-size: 11px;
  color: var(--text);
  padding-left: 0;
}
.selection-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
  padding: 28px 12px;
  color: var(--dim);
}
.inspector:has(.selection-empty) .inspector-foot {
  display: none;
}
@media (prefers-reduced-motion: reduce) {
  .editor * {
    animation: none !important;
    transition: none !important;
  }
}
@media (hover: none) {
  .editor .take-card .take-select {
    opacity: 1;
  }
}

/* Project identity, workspace controls, connection, renders, then sequence output. */
.project-topbar .topbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0 12px;
  position: relative;
  z-index: 40;
  min-width: 0;
}
.project-topbar .bar-left {
  min-width: 0;
}
.project-topbar .bar-right {
  min-width: 0;
}
.project-topbar .brand {
  flex-shrink: 0;
  margin-right: 0;
}
.project-identity {
  min-width: 90px;
  max-width: 320px;
  flex: 0 1 320px;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.project-title {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 2px;
}
.editor.project-topbar .project-name {
  flex: 1;
  width: 100%;
  min-width: 0;
  border: 1px solid transparent;
  border-radius: 4px;
  padding: 2px 5px;
  font-size: 13px;
  line-height: 18px;
}
.project-topbar #projectMenu {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 4px;
  color: var(--dim);
  font-size: 11px;
}
.project-topbar #projectMenu:hover,
.project-topbar #projectMenu[aria-expanded='true'] {
  background: var(--hover);
  color: var(--text);
}
.project-save {
  align-self: flex-start;
  display: block;
  max-width: 100%;
  border: 0;
  border-radius: 3px;
  background: transparent;
  padding: 0 5px;
  color: var(--dim);
  font-size: 10px;
  line-height: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: left;
}
.project-save:hover {
  color: var(--text);
}
.project-save[data-state='error'],
.project-save[data-state='conflict'],
.project-save[data-state='connection'] {
  color: #ff9c8b;
}
.project-save[data-state='saving'] {
  color: var(--accent);
}
/* Work in progress leads the status bar and replaces the last edit message while it runs. */
.footer .processing-status {
  flex: 1;
  justify-content: flex-start;
  max-width: none;
  min-width: 0;
  height: 20px;
  padding: 0 4px 0 0;
  background: transparent;
  border: 0;
  font-size: 11px;
}
.footer .processing-status:not(.busy),
.footer:has(.processing-status.busy) .status-message {
  display: none;
}
.project-topbar .workspace-menu,
.project-topbar .topbar-connection {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 30px;
  padding: 4px 8px;
  font-size: 11px;
  white-space: nowrap;
  border: 1px solid transparent;
  border-radius: 5px;
  background: transparent;
  color: var(--dim);
}
.project-topbar .workspace-menu:hover,
.project-topbar .workspace-menu[aria-expanded='true'],
.project-topbar .topbar-connection:hover {
  background: var(--hover);
  color: var(--text);
}
.topbar-connection::before {
  content: '';
  width: 6px;
  height: 6px;
  background: #85bd9a;
  border-radius: 50%;
  flex-shrink: 0;
}
.topbar-connection:not([data-state='connected']) {
  color: var(--warning);
}
.topbar-connection:not([data-state='connected'])::before {
  background: var(--accent);
}
.project-topbar .queue-pill {
  border: 1px solid var(--line2);
  border-radius: 5px;
  background: transparent;
  color: var(--text);
  padding: 5px 10px;
  min-height: 30px;
  margin: 0;
  font-size: 11px;
  gap: 6px;
}
.project-topbar .queue-pill .icon {
  width: 14px;
  height: 14px;
}
.project-topbar .queue-pill.busy {
  border-color: #80602d;
}
.render-count {
  display: inline-grid;
  place-items: center;
  min-width: 17px;
  height: 17px;
  padding: 0 3px;
  border-radius: 3px;
  background: #4b3a1d;
  color: #ffd17e;
  font: 10px var(--mono);
}
.render-count.failed {
  background: color-mix(in srgb, var(--danger) 22%, transparent);
  color: var(--danger);
}
.render-count:empty {
  display: none;
}
.editor.project-topbar #export {
  font-size: 12px;
}
.project-topbar .topbar-menu {
  position: absolute;
  top: calc(100% - 1px);
  width: 246px;
  max-width: calc(100% - 12px);
  max-height: min(390px, calc(100vh - 80px));
  overflow: auto;
  padding: 5px;
  border: 1px solid var(--line2);
  border-radius: 6px;
  background: var(--raised);
  box-shadow: 0 10px 26px #0009;
  scrollbar-width: thin;
  scrollbar-color: var(--line2) transparent;
  z-index: 45;
}
.editor .topbar-menu .topbar-menu-item {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 30px;
  width: 100%;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--text);
  font-size: 11px;
  font-weight: 400;
  text-align: left;
  padding: 6px 9px;
  white-space: normal;
}
.topbar-menu .topbar-menu-item:hover,
.topbar-menu .topbar-menu-item:focus-visible {
  background: var(--hover);
}
.topbar-menu [role='menuitemcheckbox']::after {
  content: '';
  width: 14px;
  flex-shrink: 0;
}
.topbar-menu [aria-checked='true']::after {
  content: '✓';
  color: var(--accent);
}
.topbar-menu hr {
  border: 0;
  border-top: 1px solid var(--line2);
  margin: 5px 4px;
}
.project-topbar .connection-warning {
  display: none;
  grid-column: 1/-1;
  align-items: center;
  text-align: left;
  border: 0;
  background: var(--warning-surface);
  color: var(--warning);
  font-size: 10px;
  line-height: 14px;
  padding: 5px 9px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
@media (max-width: 800px) {
  .project-topbar .brand .brand-wordmark {
    height: 16px;
  }
  .project-topbar .bar-left {
    gap: 6px;
  }
  .project-topbar .bar-right {
    gap: 3px;
  }
  .project-topbar .project-identity {
    min-width: 70px;
  }
  .project-topbar .topbar {
    gap: 0 6px;
  }
}
@media (max-width: 760px) {
  .project-topbar.full-editor.inspector-full > .inspector.open {
    top: calc(var(--topbar-height, 56px) + 6px);
  }
}
@media (max-width: 600px) {
  .project-topbar .topbar-connection {
    display: none;
  }
  .project-topbar .connection-warning:not([hidden]) {
    display: flex;
  }
  .project-topbar.full-editor:has(.connection-warning:not([hidden])) .topbar {
    padding-block: 0;
  }
  .project-topbar .workspace-menu {
    font-size: 0;
    padding-inline: 7px;
  }
  .project-topbar .workspace-menu::after {
    content: '⋯';
    font-size: 18px;
  }
  .project-topbar .project-name {
    font-size: 11px;
  }
  .project-topbar .project-save {
    font-size: 9px;
  }
  .project-topbar .brand {
    display: none;
  }
  .project-topbar.full-editor.inspector-full > .inspector.open {
    top: calc(var(--topbar-height, 56px) + 6px);
  }
  .project-topbar .media-panel.open {
    top: calc(var(--topbar-height, 56px) + 6px);
  }
}
@media (max-width: 420px) {
  .editor.project-topbar #export {
    font-size: 0;
    min-width: 32px;
    padding: 5px 7px;
  }
  .editor.project-topbar #export .icon {
    width: 15px;
    height: 15px;
  }
  .project-topbar .queue-pill {
    font-size: 10px;
    padding: 4px 6px;
  }
  .project-topbar .queue-pill .icon {
    display: none;
  }
  .project-topbar #queueLabel {
    display: inline;
  }
  .project-topbar .workspace-menu {
    padding-inline: 5px;
  }
  .project-topbar .project-identity {
    min-width: 55px;
  }
}

/* The native Comfy chooser stays inside a disposable frame in Spool's dialog. */
#modal.template-dialog {
  max-width: 1200px;
  width: 100%;
  height: calc(100dvh - 48px);
  max-height: 850px;
  padding: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.template-dialog > .modal-head {
  flex-shrink: 0;
  padding: 12px 18px;
  margin: 0;
  border-bottom: 1px solid var(--line);
}
.template-frame-host {
  position: fixed;
  z-index: 1;
}
.template-frame-host[hidden] {
  display: none;
}
.template-mount {
  position: relative;
  flex: 1;
  min-height: 0;
  background: var(--panel);
}
.template-frame {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  opacity: 0;
}
.template-frame.ready {
  opacity: 1;
}
.template-loading {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  color: var(--dim);
  font-size: 12px;
}
.template-dialog > .modal-footer {
  flex-shrink: 0;
  align-items: center;
  margin: 0;
  padding: 12px 18px;
  border-top: 1px solid var(--line);
}
.template-dialog #templateStatus {
  flex: 1;
  min-width: 0;
  font-size: 11px;
  color: var(--dim);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.template-dialog .modal-footer button {
  flex-shrink: 0;
  font-size: 11px;
}
@media (max-width: 600px) {
  .template-dialog > .modal-footer {
    flex-wrap: wrap;
    padding: 10px;
  }
  .template-dialog #templateStatus {
    flex-basis: 100%;
  }
  .template-dialog > .modal-head {
    padding: 10px;
  }
  #modal.template-dialog {
    height: calc(100dvh - 36px);
  }
}

/* One shot heading and compact take rows; expand a row for files and actions. */
#modal.render-dialog {
  max-width: 560px;
  padding: 22px;
}
.render-dialog .modal-head {
  margin-bottom: 6px;
}
.render-dialog h2 {
  font-size: 15px;
}
.render-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--dim);
  font-size: 11px;
}
.render-toolbar button {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: var(--dim);
}
.render-toolbar button:hover:not(:disabled) {
  color: var(--text);
}
.render-toolbar .icon {
  width: 12px;
  height: 12px;
}
.render-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}
.render-dialog .queue-list {
  gap: 10px;
  margin-top: 12px;
}
/* One card per shot; each take is a single line with its own Cancel. */
.render-shot {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--raised);
  overflow: hidden;
}
.render-shot > header {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 34px;
  padding: 0 8px 0 12px;
}
.render-shot h3 {
  flex: 1;
  min-width: 0;
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.render-dialog .queue-row {
  position: relative;
  padding: 0;
  border-radius: 0;
  border-top: 1px solid var(--line);
  background: var(--panel);
  min-width: 0;
}
.render-dialog summary {
  cursor: pointer;
  font-size: 11px;
  color: var(--dim);
}
.render-dialog summary:hover {
  color: var(--text);
}
.render-dialog summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
  border-radius: 2px;
}
.render-dialog .queue-row summary {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 36px;
  padding: 0 8px 0 12px;
  list-style: none;
}
.render-dialog .queue-row summary::-webkit-details-marker {
  display: none;
}
.render-dialog .queue-row summary::after {
  content: '';
  order: 9;
  flex-shrink: 0;
  width: 5px;
  height: 5px;
  margin: 0 4px 2px 2px;
  border-right: 1.5px solid var(--faint);
  border-bottom: 1.5px solid var(--faint);
  transform: rotate(45deg);
  transition: transform 0.12s;
}
.render-dialog .queue-row details[open] > summary::after {
  transform: rotate(-135deg);
  margin-bottom: -2px;
}
.render-take {
  flex-shrink: 0;
  min-width: 52px;
  color: var(--text);
  font-size: 12px;
  font-weight: 550;
}
.render-stage {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.render-stage:before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--faint);
  flex-shrink: 0;
}
.render-stage[data-state='running'] {
  color: var(--accent);
}
.render-stage[data-state='running']:before {
  background: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent);
}
.render-stage[data-state='ready']:before {
  background: var(--success);
}
.render-stage[data-state='attention'] {
  color: var(--danger);
}
.render-stage[data-state='attention']:before {
  background: var(--danger);
}
.render-stage[data-state='cancelling'] {
  color: var(--faint);
}
.render-percent {
  flex-shrink: 0;
  font: 600 11px var(--mono);
  color: var(--text);
}
.queue-row [data-job-elapsed] {
  flex-shrink: 0;
  font: 10px var(--mono);
  white-space: nowrap;
  color: var(--faint);
}
.queue-row [data-job-elapsed]:empty {
  display: none;
}
.render-cancel {
  flex-shrink: 0;
  height: 24px;
  padding: 0 9px;
  border: 1px solid var(--line2);
  border-radius: 5px;
  background: transparent;
  color: var(--dim);
  font-size: 11px;
}
.render-cancel:hover {
  border-color: color-mix(in srgb, var(--danger) 60%, var(--line2));
  color: var(--danger);
}
.render-cancel.armed {
  border-color: var(--danger);
  background: color-mix(in srgb, var(--danger) 16%, transparent);
  color: var(--danger);
}
.render-clear {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 4px;
  background: transparent;
  padding: 3px;
  color: var(--faint);
}
.render-clear:hover {
  color: var(--text);
  background: var(--hover);
}
.render-clear .icon {
  width: 12px;
  height: 12px;
}
.render-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
}
.render-progress progress {
  display: block;
  width: 100%;
  height: 2px;
  border: 0;
  appearance: none;
  background: transparent;
  color: var(--accent);
}
.render-progress progress::-webkit-progress-bar {
  background: transparent;
}
.render-progress progress::-webkit-progress-value {
  background: var(--accent);
}
.render-progress progress::-moz-progress-bar {
  background: var(--accent);
}
.render-details {
  padding: 2px 12px 12px;
}
.render-facts {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 6px 14px;
  margin: 0;
  font-size: 11px;
  line-height: 1.4;
}
.render-facts dt {
  color: var(--faint);
}
.render-facts dd {
  margin: 0;
  min-width: 0;
  color: var(--text);
  overflow-wrap: anywhere;
}
.render-facts code {
  font: 10px var(--mono);
  color: var(--dim);
}
.render-request {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 10px;
}
.render-request .download-link {
  font-size: 11px;
}
.render-error {
  margin: 10px 0 0;
  padding: 8px 10px;
  border-radius: 6px;
  background: color-mix(in srgb, var(--danger) 10%, transparent);
  color: var(--danger);
  font: 10px/1.5 var(--mono);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.render-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.render-row-actions button {
  font-size: 11px;
}
.render-history > summary {
  padding: 7px 0;
}
.render-history > summary span {
  font: 10px var(--mono);
  margin-left: 6px;
  color: var(--faint);
}
.render-history > div {
  display: grid;
  gap: 8px;
  margin-top: 7px;
}
.render-pending {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  margin-top: 12px;
  border: 1px solid var(--warning-line);
  border-radius: 7px;
  background: var(--warning-surface);
}
.render-pending[hidden] {
  display: none;
}
.render-pending strong {
  font-size: 11px;
  font-weight: 550;
  color: var(--warning);
}
.render-pending p {
  margin: 3px 0 0;
  font-size: 10px;
}
.render-pending button {
  font-size: 11px;
  flex-shrink: 0;
}
@media (max-width: 480px) {
  #modal.render-dialog {
    padding: 16px;
  }
  .render-pending {
    align-items: flex-start;
    flex-direction: column;
  }
  .render-shot h3 {
    font-size: 11px;
  }
  .render-dialog .queue-row summary {
    gap: 7px;
  }
}

.editor.studio-sidebar {
  grid-template-columns: var(--media-width, clamp(260px, 23vw, 350px)) minmax(0, 1fr);
  column-gap: 8px;
}
.studio-sidebar > .topbar,
.studio-sidebar > .footer {
  grid-column: 1/-1;
}
.studio-sidebar > .media-panel {
  grid-area: 2/1/5/2;
  min-width: 0;
  background: var(--panel);
}
.studio-sidebar > .workbench {
  grid-area: 2/2/3/3;
  grid-template-columns: minmax(0, 1fr) var(--inspector-width, clamp(360px, 30vw, 520px));
  grid-template-areas: 'viewer inspector' 'takes inspector';
}
.studio-sidebar > .timeline-toolbar {
  grid-area: 3/2/4/3;
}
.studio-sidebar > .timeline-shell {
  grid-area: 4/2/5/3;
}
.editor.studio-sidebar.inspector-full {
  grid-template-columns: var(--media-width, clamp(260px, 23vw, 350px)) minmax(0, 1fr) var(
      --inspector-width,
      clamp(360px, 30vw, 520px)
    );
}
.studio-sidebar.inspector-full > .workbench {
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: 'viewer' 'takes';
}
.studio-sidebar.inspector-full > .inspector {
  grid-area: 2/3/5/4;
}
.studio-sidebar:has(.workbench.hide-media) {
  grid-template-columns: 0 minmax(0, 1fr);
}
.studio-sidebar.inspector-full:has(.workbench.hide-media) {
  grid-template-columns: 0 minmax(0, 1fr) var(--inspector-width, clamp(360px, 30vw, 520px));
}
.studio-sidebar:has(.workbench.hide-media) > .media-panel {
  display: none;
}
.studio-sidebar.inspector-full:has(.workbench.hide-inspector) {
  grid-template-columns: var(--media-width, clamp(260px, 23vw, 350px)) minmax(0, 1fr);
}
.studio-sidebar.inspector-full:has(.workbench.hide-media.hide-inspector) {
  grid-template-columns: 0 minmax(0, 1fr);
}
.studio-sidebar .media-panel > .panel-head {
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
}
.studio-sidebar .media-panel[data-tab='workflows'] > .pool-toolbar,
.studio-sidebar .media-panel[data-tab='workflows'] > .media-filters,
.studio-sidebar .media-panel[data-tab='workflows'] > .panel-scroll,
.studio-sidebar .media-panel[data-tab='workflows'] > .panel-foot,
.studio-sidebar .media-panel[data-tab='media'] > .workflow-library {
  display: none;
}
.studio-sidebar .workflow-library {
  flex: 1;
  min-height: 0;
  max-height: none;
  border: 0;
  border-radius: 0;
}
.studio-sidebar .media-panel .panel-foot {
  display: block;
  padding: 8px;
  border-top: 1px solid var(--line);
}
.studio-sidebar .media-panel .panel-foot .outline {
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 11px;
}
.workflow-search {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
  padding: 6px 8px 4px;
  align-items: center;
}
.workflow-search input {
  display: block;
  width: 100%;
  padding: 5px 7px;
  border: 1px solid var(--line2);
  border-radius: 4px;
  background: var(--bg);
  font-size: 11px;
  min-width: 0;
}
.workflow-search .seg button {
  padding-inline: 6px;
  font-size: 10px;
}
.workflow-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  flex-shrink: 0;
  padding: 0 4px 2px;
}
.workflow-actions button {
  font-size: 10px;
  padding: 4px;
}
.workflow-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 4px 9px 9px;
  flex-shrink: 0;
}
.workflow-filters button {
  border: 1px solid var(--line2);
  border-radius: 12px;
  padding: 4px 7px;
  background: transparent;
  font-size: 10px;
  color: var(--dim);
}
.workflow-filters button.active {
  background: var(--raised);
  border-color: var(--accent);
  color: var(--text);
}
.workflow-catalog #workflowList {
  overflow: auto;
  min-height: 0;
  flex: 1;
  scrollbar-width: thin;
  scrollbar-color: var(--line2) transparent;
  padding: 0 10px 10px;
}
.workflow-section {
  border-top: 1px solid var(--line);
  padding: 8px 0;
}
.workflow-section header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
}
.workflow-section h3 {
  font-size: 12px;
  margin: 0;
  font-weight: 600;
}
.workflow-section p {
  font-size: 10px;
  color: var(--dim);
  margin: 2px 0 6px;
}
.workflow-section h4 {
  font-size: 11px;
  font-weight: 600;
  margin: 8px 0 5px;
}
.workflow-section h4 span {
  color: var(--dim);
}
.api-key-badge {
  background: transparent;
  border: 1px solid var(--line2);
  border-radius: 4px;
  font-size: 9px;
  padding: 4px;
  color: var(--accent);
  white-space: nowrap;
}
.workflow-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(140px, 100%), 1fr));
  gap: 6px;
}
.workflow-catalog #workflowList .workflow-row {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
  background: var(--raised);
  border: 1px solid var(--line);
  border-radius: 5px;
  cursor: grab;
  white-space: normal;
  min-width: 0;
  overflow: hidden;
}
.workflow-catalog #workflowList .workflow-row:hover {
  border-color: var(--accent);
}
.workflow-row img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  pointer-events: none;
}
.workflow-row > span {
  display: block;
  padding: 7px;
  min-width: 0;
  max-width: 100%;
}
.workflow-catalog .workflow-row strong {
  display: block;
  font-size: 10px;
  line-height: 1.4;
  font-weight: 500;
  overflow-wrap: anywhere;
}
.workflow-catalog .workflow-row small {
  display: block;
  font-size: 9px;
  color: var(--dim);
  margin-top: 3px;
}
.workflow-library[data-view='list'] .workflow-cards {
  grid-template-columns: minmax(0, 1fr);
  gap: 3px;
}
.workflow-library[data-view='list'] .workflow-row img {
  display: none;
}
.workflow-library[data-view='list'] .workflow-row > span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  width: 100%;
}
.workflow-library[data-view='list'] .workflow-row small {
  margin: 0;
  white-space: nowrap;
}
.workflow-library #browseComfyTemplates {
  width: 100%;
  font-size: 11px;
}
@media (max-width: 1100px) {
  .editor.studio-sidebar,
  .editor.studio-sidebar.inspector-full,
  .studio-sidebar.inspector-full:has(.workbench.hide-media) {
    grid-template-columns: 0 minmax(0, 1fr) var(--inspector-width, clamp(300px, 34vw, 420px));
    column-gap: 6px;
  }
  .studio-sidebar > .media-panel {
    display: none;
    position: absolute;
    grid-area: auto;
    left: 6px;
    top: calc(var(--topbar-height, 56px) + 6px);
    bottom: 6px;
    width: min(var(--media-width, 350px), calc(100% - 12px));
    z-index: 35;
    box-shadow: 8px 8px 24px #0008;
  }
  .studio-sidebar > .media-panel.open {
    display: flex;
  }
  .studio-sidebar:not(.inspector-full) {
    grid-template-columns: 0 minmax(0, 1fr);
  }
  .studio-sidebar .workflow-cards {
    grid-template-columns: repeat(auto-fill, minmax(min(140px, 100%), 1fr));
  }
}
@media (max-width: 760px) {
  .editor.studio-sidebar,
  .editor.studio-sidebar.inspector-full,
  .studio-sidebar.inspector-full:has(.workbench.hide-media) {
    grid-template-columns: 0 minmax(0, 1fr);
  }
  .studio-sidebar > .workbench {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: 'viewer' 'takes';
  }
  .studio-sidebar.inspector-full > .inspector.open {
    grid-area: auto;
  }
}

/* Clip inputs are the working surface; workflow maintenance stays in Comfy. */
.clip-workflow-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 2px 0 18px;
  color: var(--dim);
  font-size: 11px;
}
.clip-workflow-heading button {
  font-size: 11px;
  padding: 6px 10px;
  flex-shrink: 0;
}
.clip-workflow-actions {
  display: flex;
  gap: 6px;
  max-width: 100%;
}
.clip-workflow-actions button {
  min-width: 0;
  flex-shrink: 1;
}
.clip-workflow-actions #editClipWorkflow {
  white-space: nowrap;
  flex-shrink: 0;
}
.workflow-problem {
  font-size: 11px;
  line-height: 1.5;
  margin: 0 0 14px;
  color: var(--warning);
}
.inspector .native-bindings {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 12px;
}
.inspector .native-bindings .binding-source,
.inspector .native-bindings .binding-positive,
.inspector .native-bindings .binding-negative,
.inspector .native-bindings .binding-seed {
  grid-column: 1/-1;
}
.inspector .native-bindings textarea {
  min-height: 150px;
  height: 190px;
  line-height: 1.6;
}
.inspector .native-bindings .field > span {
  display: block;
  font-size: 12px;
  margin-bottom: 7px;
}
.inspector .native-bindings .field input,
.inspector .native-bindings .field select,
.inspector .native-bindings .field textarea {
  padding: 9px 10px;
  font-size: 12px;
}
.seed-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 116px;
  gap: 8px;
}
.seed-controls > * {
  min-width: 0;
  width: 100%;
}
.inspector .inspector-foot {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding: 8px 10px;
  gap: 10px;
}
.inspector .inspector-foot .native-count {
  order: 0;
  display: flex;
  align-items: center;
  background: transparent;
  padding: 0;
  margin: 0;
  border-radius: 0;
  gap: 6px;
  font-size: 11px;
  color: var(--dim);
}
.inspector .inspector-foot .native-count input {
  border: 1px solid var(--line2);
  border-radius: 5px;
  background: var(--bg);
  color: var(--text);
  text-align: center;
  width: 44px;
  height: 30px;
  padding: 4px;
  font-size: 12px;
}
.inspector .inspector-foot .generate {
  order: 1;
  flex: 0 0 auto;
  width: auto;
  border-radius: 5px;
  margin: 0;
  font-size: 12px;
  min-height: 30px;
  height: 30px;
  min-width: 104px;
  padding: 4px 14px;
}
.inspector .native-job-status {
  order: 2;
  width: 100%;
  font-size: 11px;
}
.clip-attention {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
  flex-shrink: 0;
  pointer-events: auto;
}
.clip-attention-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-width: 25px;
  height: 17px;
  padding: 1px 4px;
  border: 1px solid;
  border-radius: 5px;
  font: 600 9px var(--mono);
  line-height: 1;
  white-space: nowrap;
  box-shadow: 0 1px 3px #0006;
}
.clip-attention-badge .icon {
  width: 10px;
  height: 10px;
}
.clip-attention-badge.open-notes {
  color: #ffcf77;
  background: #30250e;
  border-color: #705321;
}
.clip-attention-badge.unseen-takes {
  color: #abd4ff;
  background: #122b44;
  border-color: #396080;
}
.audio-title {
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
}
.timeline-clip,
.music-clip {
  container-type: inline-size;
}
@container (max-width:92px) {
  .clip-attention {
    gap: 3px;
  }
  .clip-attention-badge {
    min-width: 6px;
    width: 6px;
    height: 6px;
    padding: 0;
    font-size: 0;
    border-radius: 50%;
  }
  .clip-attention-badge .icon,
  .clip-label .clip-type {
    display: none;
  }
  .clip-label {
    gap: 2px;
    padding-left: 4px !important;
    padding-right: 4px !important;
  }
}
@container (max-width:40px) {
  .clip-attention {
    gap: 2px;
  }
  .clip-attention-badge {
    min-width: 4px;
    width: 4px;
    height: 4px;
  }
  .clip-label {
    gap: 0;
    padding-left: 2px !important;
    padding-right: 2px !important;
  }
}

.timeline-toolbar #timelineTime,
.timeline-toolbar #zoomValue {
  display: none;
}
.timeline-grabbing,
.timeline-grabbing * {
  cursor: grabbing !important;
  user-select: none !important;
}
.ruler .tick {
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}
.take-drop-preview {
  position: absolute;
  z-index: 8;
  pointer-events: none;
  background: #ffb52635;
  border: 2px solid var(--accent);
  border-radius: 5px;
}
.take-thumb[draggable='true'] {
  cursor: grab;
}
.take-thumb[draggable='true']:active {
  cursor: grabbing;
}
.library-drop-preview {
  position: absolute;
  inset: 0;
  z-index: 12;
  pointer-events: none;
  overflow: hidden;
}
.library-drop-ghost {
  position: absolute;
  background: #ffb52626;
  border: 1px dashed #ffb526aa;
  border-radius: 5px;
  box-shadow: inset 0 3px #ffb52666;
}
.library-drop-marker {
  position: absolute;
  width: 2px;
  background: var(--accent);
  box-shadow: 0 0 5px #ffb52655;
}
.library-drop-marker::before,
.library-drop-marker::after {
  content: '';
  position: absolute;
  left: -4px;
  width: 10px;
  height: 3px;
  background: var(--accent);
}
.library-drop-marker::after {
  bottom: 0;
}
.library-drop-label {
  position: absolute;
  padding: 4px 8px;
  border: 1px solid #ffb52666;
  border-radius: 4px;
  background: #24221df5;
  color: #f5e6c8;
  font: 11px var(--mono);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-shadow: 0 2px 8px #0006;
}
.library-drop-preview[data-mode='replace'] .library-drop-ghost {
  border: 2px solid var(--accent);
  background: #ffb5261a;
  box-shadow: none;
}
#exportRangeBar:hover button,
#exportRangeBar button:focus-visible {
  opacity: 1;
}

.take-selection-tools {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}
.take-selection-tools[hidden] {
  display: none;
}
.take-selection-tools button {
  padding: 2px 5px;
  min-height: 22px;
  font-size: 10px;
  white-space: nowrap;
}
.takes-head .takes-clip {
  flex: 1;
  min-width: 0;
}
.take-tools #deleteTakesFromDisk {
  color: #e5a1a1;
}
@media (max-width: 520px) {
  .takes-head .takes-clip,
  .takes-head .takes-title {
    display: none;
  }
  .takes-head {
    column-gap: 4px;
  }
  .take-selection-tools {
    gap: 4px;
  }
  .take-selection-tools #compareTakesStrip {
    display: none;
  }
  .take-tools {
    gap: 4px;
  }
  .take-tools button,
  .take-selection-tools button {
    font-size: 10px;
    padding-inline: 2px;
  }
}

.editor.copying-clip,
.editor.copying-clip * {
  cursor: copy !important;
  user-select: none !important;
}

.panel-toggle {
  flex-shrink: 0;
}
.panel-toggle svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
}
.clip-attention-badge.unseen-takes {
  width: auto;
  min-width: 22px;
  height: 15px;
  padding: 1px 4px;
  font-size: 8px;
  border-radius: 4px;
}
@container (max-width:40px) {
  .clip-attention-badge.unseen-takes {
    min-width: 19px;
    font-size: 7px;
    padding: 1px 2px;
  }
  .new-take-count {
    display: none;
  }
}

.workflow-route {
  display: block;
  color: var(--dim);
  font-size: 10px;
  margin-top: 4px;
}
.media-input-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.media-input-actions button {
  font-size: 11px;
}
.media-input-actions [aria-pressed='true'] {
  border-color: var(--accent);
  color: var(--accent);
}
/* Media inputs: one compact row each, with a thumbnail, label, file and actions. */
.inspector .media-slot {
  position: relative;
  display: block;
}
.inspector .media-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 52px;
  margin: 0;
  padding: 5px 6px;
  border: 1px solid var(--line2);
  border-radius: 6px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
  text-align: left;
}
.inspector .media-slot.empty .media-row {
  border-style: dashed;
}
.inspector button.media-row {
  cursor: pointer;
}
.inspector button.media-row:hover,
.inspector .media-slot.drag-over .media-row {
  border-color: var(--accent);
  background: var(--raised);
}
.inspector .media-slot:has(> .input-clear) .media-row {
  padding-right: 40px;
}
.media-thumb {
  position: relative;
  display: grid;
  place-items: center;
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  overflow: hidden;
  border-radius: 4px;
  background: var(--raised);
  color: var(--dim);
}
.media-thumb .icon {
  width: 18px;
  height: 18px;
}
.media-thumb img:not([hidden]) ~ .icon {
  display: none;
}
.inspector .media-thumb .native-source-preview {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  margin: 0;
  border: 0;
  border-radius: 0;
  object-fit: cover;
  background: none;
}
.media-text {
  display: grid;
  gap: 2px;
  flex: 1;
  min-width: 0;
}
.media-label {
  font-size: 11px;
  color: var(--dim);
}
.media-label em {
  margin-left: 6px;
  font-style: normal;
  color: var(--faint);
}
.media-text strong,
.media-text .native-source-value {
  overflow: hidden;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow-wrap: normal;
}
.media-slot.empty .media-text strong,
.media-slot.empty .media-text .native-source-value {
  font-weight: 400;
  color: var(--dim);
}
.native-bindings .media-slot .media-input-actions {
  display: flex;
  gap: 2px;
  flex-shrink: 0;
  margin-left: auto;
}
.native-bindings .media-slot .media-action {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: none;
  color: var(--dim);
}
.native-bindings .media-slot .media-action .icon {
  width: 15px;
  height: 15px;
}
.native-bindings .media-slot .media-action:hover:not(:disabled),
.native-bindings .media-slot .media-action:focus-visible {
  background: var(--hover);
  color: var(--text);
}
.native-bindings .media-slot .media-action:disabled {
  opacity: 0.4;
}
.native-bindings .media-slot .media-action[aria-pressed='true'] {
  color: var(--accent);
}
.inspector .media-slot > .input-clear {
  position: absolute;
  top: 50%;
  right: 6px;
  transform: translateY(-50%);
}
.project-topbar .panel-toggle {
  width: 24px;
  min-width: 24px;
  height: 24px;
  min-height: 24px;
  padding: 3px;
  color: var(--dim);
  border: 0;
  border-radius: 4px;
  background: transparent;
}
.project-topbar .panel-toggle:hover {
  color: var(--text);
  background: var(--hover);
}
.project-topbar .panel-toggle[hidden] {
  display: none !important;
}
.media-panel > .panel-head > #importTop {
  margin-left: auto;
}
.inspector-head > .panel-toggle {
  margin-right: 2px;
}
.setup-warning {
  border: 1px solid var(--warning-line);
  border-radius: 6px;
  background: var(--warning-surface);
  color: var(--warning);
  padding: 7px 12px;
  font-size: 12px;
  cursor: pointer;
}
.setup-warning:hover {
  background: #4a3a1f;
}
.setup-issues {
  margin: 0 0 12px;
  padding-left: 18px;
  line-height: 1.6;
}
.setup-note {
  color: var(--warning);
}
/* Dialog sizing (formerly injected by editor.js) */
#modal {
  max-width: 720px;
  max-height: calc(100dvh - 48px);
}
#modal input[type='checkbox'] {
  width: auto;
  margin-right: 6px;
  vertical-align: middle;
}
/* Studio polish (2026-10-26) */
/* A clip duration that cannot fit is hidden, never clipped into a different number. */
@container clip (max-width:52px) {
  .clip-meta {
    display: none;
  }
}
.workflow-hint {
  font-size: 11px;
  color: var(--dim);
  line-height: 1.5;
  margin: 0 0 14px;
}
.generate-reason {
  margin: 0 0 8px;
  font-size: 11px;
  line-height: 1.45;
  color: var(--warning);
}
/* The project name sizes to its text so the project menu sits beside it. */
.editor.project-topbar .project-title .project-name {
  flex: 0 1 auto;
  width: auto;
  field-sizing: content;
  min-width: 8ch;
  max-width: min(420px, 38vw);
}
.take-facts {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 6px 14px;
  margin: 6px 0 16px;
  font-size: 11px;
  line-height: 1.4;
}
.take-facts dt {
  color: var(--dim);
}
.take-facts dd {
  margin: 0;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* Short windows: a slimmer takes strip and timeline leave the picture room. */
@media (max-height: 820px) {
  .full-editor .workbench {
    grid-template-rows: minmax(0, 1fr) 92px;
  }
  .full-editor .take-card {
    flex-basis: 230px;
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr);
    grid-template-rows: auto 1fr;
    column-gap: 8px;
    row-gap: 2px;
    align-items: center;
  }
  .full-editor .take-card .take-thumb {
    grid-column: 1;
    grid-row: 1/3;
    aspect-ratio: 16/9;
    height: auto;
    flex: none;
  }
  .full-editor .take-card .take-heading {
    grid-column: 2;
    grid-row: 1;
  }
  .full-editor .take-card .take-details {
    grid-column: 2;
    grid-row: 2;
  }
  .full-editor .take-card .take-seed {
    display: none;
  }
}
/* Renders is a panel below its topbar button; the studio stays usable underneath. */
.renders-panel {
  position: fixed;
  top: calc(var(--topbar-height, 56px) + 6px);
  right: 12px;
  z-index: 30;
  width: min(480px, calc(100% - 24px));
  max-height: min(70vh, calc(100% - 80px));
  overflow: auto;
  padding: 16px 18px;
  background: var(--panel);
  border: 1px solid var(--line2);
  border-radius: 10px;
  box-shadow: 0 18px 50px #000b;
}
.renders-panel .modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
/* A panel, not a dialog: titled like Takes and Notes. */
.renders-panel h2 {
  margin: 0;
  font-size: 12px;
  font-weight: 600;
}
/* Keyboard shortcut sheet */
#modal.shortcut-dialog {
  max-width: 860px;
}
.shortcut-sheet {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 18px 28px;
}
.shortcut-sheet h3 {
  margin: 0 0 8px;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--dim);
}
.shortcut-sheet dl {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 7px 14px;
  margin: 0;
  align-items: center;
}
.shortcut-sheet dd {
  margin: 0;
  color: var(--text);
  font-size: 12px;
}
.shortcut-sheet dt {
  display: flex;
  align-items: center;
  gap: 3px;
  white-space: nowrap;
}
.shortcut-join {
  color: var(--faint);
  font-size: 11px;
  padding: 0 1px;
}
.shortcut-sheet kbd {
  min-width: 20px;
  padding: 2px 6px;
  border: 1px solid var(--line2);
  border-bottom-width: 2px;
  border-radius: 4px;
  background: var(--raised);
  color: var(--text);
  font: 11px var(--mono);
  text-align: center;
}
/* Compact studio (2026-10-27): panels meet at 1px dividers, the top bar is one line, and a
   clip's takes sit in a rail beside the viewer on desktop widths. */
.editor.project-topbar.full-editor {
  --topbar-height: 40px;
  padding: 0;
  row-gap: 0;
}
.editor.full-editor.studio-sidebar,
.editor.full-editor.inspector-full {
  column-gap: 0;
}
.full-editor .topbar {
  margin: 0;
  padding: 0 8px 0 12px;
}
.full-editor .brand-wordmark {
  height: 20px;
}
.project-topbar .bar-left {
  gap: 10px;
}
.project-topbar .bar-right {
  gap: 6px;
}
.project-topbar .project-identity {
  flex: 0 1 auto;
  max-width: none;
  flex-direction: row;
  align-items: center;
  gap: 6px;
}
.project-topbar .project-save {
  align-self: center;
}
.project-topbar .workspace-menu,
.project-topbar .topbar-connection,
.project-topbar .queue-pill {
  min-height: 26px;
  padding-block: 3px;
}
.editor.project-topbar #export {
  min-height: 26px;
  padding: 3px 11px;
}
.studio-sidebar > .media-panel {
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 0;
}
.full-editor .viewer,
.full-editor .takes,
.full-editor .inspector,
.full-editor .timeline-shell {
  border: 0;
  border-radius: 0;
}
.full-editor .takes {
  border-top: 1px solid var(--line);
}
.full-editor .inspector {
  border-left: 1px solid var(--line);
}
.full-editor .timeline-toolbar {
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  margin-bottom: 0;
}
.full-editor .viewer-head {
  height: 34px;
}
.full-editor .viewer-stage {
  margin: 0;
  border-radius: 0;
}
.full-editor .viewer-tail {
  padding: 4px 8px 0;
}
.full-editor .viewer-controls {
  height: 36px;
}
.full-editor .inspector-head {
  height: 36px;
}
/* The note composer is one line until it is used. */
.notes-composer:focus-within > textarea,
.notes-composer > textarea:not(:placeholder-shown) {
  height: auto;
  min-height: 60px;
  resize: vertical;
}
.notes-composer:not(:focus-within):has(> textarea:placeholder-shown) .notes-compose-actions {
  display: none;
}
/* Workflow location and task filters fold behind one toggle that counts active filters. */
.workflow-filter-toggle {
  position: relative;
  display: inline-grid;
  place-items: center;
  flex-shrink: 0;
  width: 28px;
  height: 26px;
  padding: 0;
  border: 1px solid var(--line2);
  border-radius: 4px;
  background: transparent;
  color: var(--dim);
}
.workflow-filter-toggle svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linejoin: round;
}
.workflow-filter-toggle:hover,
.workflow-filter-toggle[aria-expanded='true'] {
  background: var(--hover);
  color: var(--text);
}
.workflow-filter-toggle.active {
  border-color: var(--accent);
  color: var(--accent);
}
#workflowFilterCount {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 14px;
  height: 14px;
  padding: 0 3px;
  border-radius: 7px;
  background: var(--accent);
  color: var(--accent-ink);
  font: 700 9px/14px var(--mono);
}
#workflowFilterCount:empty {
  display: none;
}
.workflow-library[data-filters='closed'] .workflow-filters {
  display: none;
}
.workflow-filters {
  padding: 2px 8px 6px;
}
.workflow-cards,
.studio-sidebar .workflow-cards {
  grid-template-columns: repeat(auto-fill, minmax(min(108px, 100%), 1fr));
}
/* Pending renders sit where their takes will land. */
.take-group,
.take-pending:empty,
.media-rail {
  display: none;
}
/* Takes still rendering, and failed ones, as compact rows: no placeholder thumbnail,
   the stage wraps instead of being cut off, and the list scrolls past a third of the rail. */
.takes .take-pending:not(:empty) {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex-shrink: 0;
  max-height: 34%;
  padding: 4px;
  overflow-y: auto;
  border-top: 1px solid var(--line);
}
.take-pending-row {
  display: grid;
  gap: 2px;
  padding: 5px 7px 6px;
  border-radius: 5px;
  font-size: 11px;
  color: var(--dim);
}
.take-pending-row[data-state='failed'] {
  background: color-mix(in srgb, var(--danger) 9%, transparent);
}
.take-pending-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 18px;
}
.take-pending-line strong {
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
}
.take-pending-percent {
  font: 600 10px var(--mono);
  color: var(--text);
}
.take-pending-stage {
  font-size: 10px;
  line-height: 1.35;
}
.take-pending-row[data-state='running'] .take-pending-stage {
  color: var(--accent);
}
.take-pending-row[data-state='failed'] .take-pending-stage {
  color: var(--danger);
  font-weight: 550;
}
.take-pending-error {
  display: -webkit-box;
  margin: 1px 0 0;
  color: var(--dim);
  font-size: 10px;
  line-height: 1.4;
  overflow: hidden;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
}
.take-pending-dismiss {
  width: 20px;
  height: 20px;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--faint);
  font-size: 15px;
  line-height: 1;
}
.take-pending-dismiss:hover {
  background: var(--hover);
  color: var(--text);
}
.take-pending-bar {
  display: block;
  height: 2px;
  margin-top: 3px;
  border-radius: 1px;
  background: var(--line2);
  overflow: hidden;
}
.take-pending-bar i {
  display: block;
  height: 100%;
  background: var(--accent);
}
@media (min-width: 1101px) {
  .editor.full-editor {
    --media-width: clamp(220px, 18vw, 320px);
    --inspector-width: clamp(320px, 25vw, 460px);
    --takes-width: clamp(200px, 13vw, 240px);
  }
  /* A collapsed media pool keeps a 36px icon rail; the pool opens over the viewer from it. */
  .editor.studio-sidebar:has(.workbench.hide-media),
  .editor.studio-sidebar.inspector-full:has(.workbench.hide-media.hide-inspector) {
    grid-template-columns: 36px minmax(0, 1fr);
  }
  .editor.studio-sidebar.inspector-full:has(.workbench.hide-media:not(.hide-inspector)) {
    grid-template-columns: 36px minmax(0, 1fr) var(--inspector-width);
  }
  .studio-sidebar:has(.workbench.hide-media) > .media-rail {
    display: flex;
    grid-area: 2/1/5/2;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 6px 0;
    background: var(--panel);
    border-right: 1px solid var(--line);
  }
  .media-rail .iconbutton {
    width: 28px;
    min-height: 28px;
  }
  .media-rail .iconbutton[aria-pressed='true'] {
    color: var(--text);
    background: var(--raised);
    box-shadow: inset 2px 0 var(--accent);
  }
  .media-rail #dockMedia {
    margin-top: auto;
  }
  .editor.studio-sidebar:has(.workbench.hide-media) > .media-panel.open {
    display: flex;
    position: absolute;
    grid-area: auto;
    left: 36px;
    top: var(--topbar-height);
    bottom: 0;
    width: var(--media-width);
    z-index: 35;
    box-shadow: 12px 0 32px #0009;
  }
  /* On a wide screen the takes sit in a rail beside the viewer, with or without takes, so the viewer keeps its size. */
  .editor.studio-sidebar.inspector-full > .workbench:has(> .takes.rail),
  .editor.studio-sidebar:not(.inspector-full) > .workbench.hide-inspector:has(> .takes.rail) {
    grid-template-columns: minmax(0, 1fr) var(--takes-width);
    grid-template-rows: minmax(0, 1fr);
    grid-template-areas: 'viewer takes';
  }
  .editor.studio-sidebar:not(.inspector-full) > .workbench:not(.hide-inspector):has(> .takes.rail) {
    grid-template-columns: minmax(0, 1fr) var(--takes-width) var(--inspector-width);
    grid-template-rows: minmax(0, 1fr);
    grid-template-areas: 'viewer takes inspector';
  }
  .full-editor .takes.rail {
    display: flex;
    flex-direction: column;
    border-top: 0;
    border-left: 1px solid var(--line);
  }
  .full-editor .takes.rail .takes-head {
    flex-wrap: wrap;
    gap: 4px;
    height: auto;
    border-bottom: 1px solid var(--line);
  }
  .takes.rail .take-selection-tools {
    display: contents;
  }
  .takes.rail .takes-title {
    order: 0;
  }
  .full-editor .takes.rail .takes-clip {
    display: none;
  }
  .takes.rail #compareTakesStrip {
    order: 1;
    margin-left: auto;
  }
  .takes.rail #openClipFolder {
    height: 24px;
    justify-content: center;
  }
  .takes.rail #openClipFolder .folder-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
  .takes.rail .takes-head::after {
    content: '';
    order: 3;
    flex-basis: 100%;
  }
  .takes.rail #takeSelectionCount {
    order: 4;
  }
  .takes.rail .take-tools {
    order: 6;
    margin-left: auto;
    flex-wrap: wrap;
    justify-content: flex-end;
  }
  .full-editor .takes.rail .take-list {
    flex: 1 1 0;
    flex-direction: column;
    overflow-x: hidden;
    overflow-y: auto;
    scrollbar-gutter: stable;
  }
  .full-editor .takes.rail .take-card {
    flex: none;
    width: 100%;
    max-width: none;
    display: grid;
    grid-template-columns: minmax(84px, 46%) minmax(0, 1fr);
    grid-template-rows: auto 1fr;
    row-gap: 3px;
    align-items: start;
    border: 1px solid transparent;
    border-radius: 5px;
    background: transparent;
    box-shadow: none;
  }
  .full-editor .takes.rail .take-card:hover {
    background: var(--raised);
  }
  .full-editor .takes.rail .take-card.chosen {
    background: #2b271e;
    box-shadow: inset 3px 0 var(--accent);
  }
  .full-editor .takes.rail .take-card.viewing:not(.chosen) {
    border-color: var(--preview);
    background: #18292c;
  }
  .full-editor .takes.rail .take-thumb {
    grid-column: 1;
    grid-row: 1/3;
    width: 100%;
    height: auto;
    aspect-ratio: 16/9;
    flex: none;
    align-self: center;
  }
  .full-editor .takes.rail .take-heading {
    grid-column: 2;
    grid-row: 1;
    height: auto;
    flex-wrap: wrap;
    gap: 4px;
    padding-right: 18px;
  }
  .full-editor .takes.rail .take-details {
    grid-column: 2;
    grid-row: 2;
    flex-wrap: wrap;
    align-content: flex-start;
    gap: 2px 6px;
  }
  .full-editor .takes.rail .take-seed {
    display: block;
    flex-basis: 100%;
  }
  .full-editor .takes.rail .use-take {
    right: 5px;
    bottom: 5px;
    margin: 0;
    opacity: 0;
    transition: opacity 0.12s;
  }
  .full-editor .takes.rail .take-card:is(:hover, :focus-within, .viewing) .use-take {
    opacity: 1;
  }
  .takes.rail .take-group {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    font-size: 10px;
    color: var(--faint);
  }
  .takes.rail .take-group span:first-child {
    color: var(--dim);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .takes.rail .take-group span:last-child {
    flex-shrink: 0;
    font-family: var(--mono);
  }
  .full-editor .takes.has-real-takes .takes-keys {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 3px;
    flex-shrink: 0;
    border-top: 1px solid var(--line);
    font-size: 10px;
  }
}
@media (min-width: 1101px) and (hover: none) {
  .full-editor .takes.has-real-takes .use-take {
    opacity: 1;
  }
}
/* Three control tiers: filled for the one primary action in an area (Export, Use take,
   Generate), flat for secondary actions, and borders only around inputs. */
.full-editor
  :is(
    #compareTakes,
    #tryInEdit,
    #cancelAudition,
    #addVideoTrack,
    #exportRangeSettings,
    #selectAllTakes,
    #openClipFolder,
    #monitorMute,
    #viewerZoom,
    #editClipWorkflow,
    #reloadTakeWorkflow,
    .workspace-menu,
    .topbar-connection,
    .queue-pill,
    .workflow-filter-toggle,
    .take-tools button
  ) {
  min-height: 24px;
  padding: 2px 8px;
  border-color: transparent;
  border-radius: 4px;
  background: transparent;
  color: var(--dim);
  font-size: 11px;
  font-weight: 500;
  box-shadow: none;
}
.full-editor
  :is(
    #compareTakes,
    #tryInEdit,
    #cancelAudition,
    #addVideoTrack,
    #exportRangeSettings,
    #selectAllTakes,
    #openClipFolder,
    #monitorMute,
    #viewerZoom,
    #editClipWorkflow,
    #reloadTakeWorkflow,
    .workspace-menu,
    .topbar-connection,
    .queue-pill,
    .workflow-filter-toggle,
    .take-tools button
  ):hover:not(:disabled) {
  background: var(--hover);
  color: var(--text);
}
.full-editor :is(#compareTakes, #tryInEdit, #editClipWorkflow, #reloadTakeWorkflow) .icon {
  width: 13px;
  height: 13px;
}
.full-editor #compareTakes[aria-pressed='true'] {
  color: var(--preview);
  background: #62d0e01a;
}
.full-editor #exportRangeSettings[aria-pressed='true'],
.full-editor .workflow-filter-toggle.active {
  color: var(--accent);
  background: #ffb52614;
}
.full-editor .project-topbar .queue-pill.busy,
.project-topbar.full-editor .queue-pill.busy {
  color: var(--accent);
}
.full-editor .take-tools #deleteTakesFromDisk {
  color: #e5a1a1;
}
.full-editor :is(#useSource, #export) {
  min-height: 26px;
  padding: 3px 12px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
}
/* The viewer header carries the review actions; Fit and resolution sit with the transport. */
.full-editor .viewer-head {
  gap: 8px;
  padding: 0 10px;
}
.full-editor .viewer-actions {
  gap: 2px;
}
.full-editor .viewer-meta .viewer-settings {
  display: flex;
  align-items: center;
  gap: 2px;
  margin: 0 4px 0 0;
}
.full-editor .viewer-meta #viewerZoom {
  min-width: 0;
  font-family: var(--mono);
}
/* Tabs are one size everywhere: 12px labels, the active one bold and underlined. */
.full-editor .media-panel > .panel-head .seg button,
.full-editor .viewer-tabs button,
.full-editor .inspector-tabs button {
  min-height: 28px;
  padding: 4px 10px;
  font-size: 12px;
}
/* Media pool: search, then location, then the workflows. */
.full-editor .workflow-search {
  gap: 4px;
  padding: 8px 10px 6px;
}
.full-editor .workflow-search input {
  height: 26px;
}
.full-editor .workflow-search .seg {
  gap: 0;
  border: 0;
  background: transparent;
  padding: 0;
}
.full-editor .workflow-search .seg button {
  display: grid;
  place-items: center;
  width: 26px;
  min-height: 26px;
  padding: 0;
  border: 0;
  border-radius: 4px;
  color: var(--faint);
  background: transparent;
}
.full-editor .workflow-search .seg button.active {
  color: var(--text);
  background: var(--raised);
}
.workflow-search .seg svg,
.media-view-controls svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.workflow-location,
.media-filters {
  display: flex;
  gap: 2px;
  margin: 0 10px 6px;
  padding: 2px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--bg);
  flex-shrink: 0;
}
.workflow-location button,
.media-filters button {
  flex: 1;
  min-width: 0;
  min-height: 22px;
  padding: 2px 6px;
  border: 0;
  border-radius: 3px;
  background: transparent;
  color: var(--dim);
  font-size: 11px;
  white-space: nowrap;
}
.workflow-location button:hover,
.media-filters button:hover {
  color: var(--text);
}
.workflow-location button.active,
.media-filters button.active {
  background: var(--raised);
  color: var(--text);
  font-weight: 600;
}
.full-editor .workflow-actions {
  gap: 0;
  padding: 0 6px 4px;
}
.full-editor .workflow-actions button {
  min-height: 22px;
  padding: 2px 4px;
  font-size: 11px;
  color: var(--dim);
}
.full-editor .workflow-filters {
  gap: 4px;
  padding: 0 10px 8px;
}
.full-editor .workflow-filters button {
  padding: 2px 8px;
  font-size: 10px;
}
.full-editor .workflow-section {
  padding: 10px 0 6px;
}
.full-editor .workflow-section h3 {
  font-size: 11px;
}
.full-editor .workflow-section h4 {
  font-size: 10px;
  color: var(--dim);
  margin: 10px 0 6px;
}
.workflow-catalog #workflowList .workflow-row > span {
  padding: 5px 7px 6px;
}
/* Take rail: one header row; the selection row appears only while takes are selected. */
@media (min-width: 1101px) {
  .full-editor .takes.has-real-takes .takes-head {
    row-gap: 6px;
    padding: 0 6px 0 10px;
    min-height: 34px;
    align-content: center;
  }
  .takes.has-real-takes #selectAllTakes {
    order: 1;
    margin-left: auto;
  }
  .takes.has-real-takes #openClipFolder {
    order: 2;
    margin-left: 0;
    width: 24px;
    padding: 0;
  }
  .takes.has-real-takes:not(:has(#takeSelectionCount:not([hidden]))) .takes-head::after {
    display: none;
  }
  .full-editor .takes.has-real-takes .take-list {
    gap: 4px;
    padding: 6px;
  }
  .full-editor .takes.has-real-takes .take-card {
    padding: 5px;
    column-gap: 9px;
  }
  .full-editor .takes.has-real-takes .take-heading strong {
    font-size: 12px;
  }
  .full-editor .takes.has-real-takes .take-details {
    font-size: 10px;
    color: var(--faint);
  }
  .takes.has-real-takes .take-group {
    padding: 10px 6px 2px;
  }
  .full-editor .takes.has-real-takes .takes-keys {
    padding: 6px 10px;
    color: var(--faint);
  }
}
/* Use take shares the duration line, so its reserved space never covers text. */
@media (min-width: 1101px) {
  .full-editor .takes.has-real-takes .use-take {
    position: static;
    order: 1;
    margin-left: auto;
    min-height: 20px;
    padding: 1px 7px;
    font-size: 10px;
  }
  .full-editor .takes.has-real-takes .take-seed {
    order: 2;
  }
}
.notes-composer:not(:focus-within) > textarea:placeholder-shown {
  overflow: hidden;
}
/* Generate: a small take count beside one primary button. */
/* Timeline toolbar: icon tools, then flat text actions. */
.full-editor #addVideoTrack {
  color: var(--text);
}
.full-editor .timeline-toolbar {
  padding: 0 8px;
}
@media (max-width: 600px) {
  .editor.project-topbar.full-editor:has(.connection-warning:not([hidden])) {
    --topbar-height: 64px;
  }
  .project-topbar.full-editor:has(.connection-warning:not([hidden])) .topbar {
    grid-template-rows: 40px 24px;
  }
}
/* Studio polish (2026-10-28): amber marks the selection, the playhead and Generate; short
   inspector controls are label-left rows; a status bar holds messages, save state and the
   Comfy connection. */
.editor.project-topbar.full-editor {
  grid-template-rows: var(--topbar-height) minmax(0, 1fr) 32px var(--timeline-height, 236px) 22px;
}
@media (max-height: 820px) {
  .editor.project-topbar.full-editor {
    grid-template-rows: var(--topbar-height) minmax(0, 1fr) 32px var(--timeline-height, 196px) 22px;
  }
}
.editor.studio-sidebar:has(.workbench.hide-media) > .media-panel.open {
  bottom: 22px;
}
.editor.project-topbar #export {
  background: transparent;
  border: 1px solid var(--line2);
  color: var(--text);
}
.editor.project-topbar #export:hover:not(:disabled) {
  background: var(--hover);
}
.full-editor .seg button.active,
.full-editor .inspector-tabs button.active {
  border-color: var(--text);
}
.full-editor .timeline-toolbar .iconbutton.active {
  color: var(--text);
  background: var(--raised);
}
.editor:not(:has(#exportRangeSettings[aria-pressed='true'])) #exportRangeBar {
  background: #ffffff08;
  border-top-color: #ffffff2e;
}
.editor:not(:has(#exportRangeSettings[aria-pressed='true'])) #exportRangeBar button {
  background: var(--text);
  color: var(--bg);
}
/* Status bar: the latest message on the left, then save state, connection and shortcuts.
   A toast takes over the message area instead of floating over the timeline. */
.full-editor .footer {
  display: flex;
  gap: 2px;
  padding: 0 6px 0 12px;
  font-size: 11px;
  color: var(--dim);
}
.full-editor .footer .status-message {
  margin-right: 8px;
}
.full-editor .footer :is(.project-save, .topbar-connection, #help) {
  min-height: 20px;
  height: 20px;
  padding: 0 7px;
  border-radius: 3px;
  font-size: 11px;
  line-height: 20px;
  color: var(--faint);
}
.full-editor .footer :is(.project-save, .topbar-connection, #help):hover {
  background: var(--hover);
  color: var(--text);
}
.full-editor .footer .project-save[data-state='saving'] {
  color: var(--accent);
}
.full-editor .footer .project-save:is([data-state='error'], [data-state='conflict'], [data-state='connection']) {
  color: #ff9c8b;
}
.full-editor .footer .topbar-connection:not([data-state='connected']) {
  color: var(--warning);
}
.full-editor .footer #help .icon {
  width: 13px;
  height: 13px;
}
.full-editor .toast {
  left: 0;
  bottom: 0;
  transform: none;
  max-width: min(64%, 760px);
  min-height: 22px;
  padding: 3px 12px;
  border: 0;
  border-radius: 0;
  background: var(--raised);
  box-shadow: none;
  font-size: 11px;
  line-height: 16px;
}
.full-editor .toast::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  margin: 0 8px 1px 0;
  border-radius: 50%;
  background: var(--preview);
}
/* Inspector: workflow actions only when they apply, one callout for a blocking problem. */
.full-editor .clip-workflow-heading {
  margin: 0 0 12px;
  gap: 6px;
}
.full-editor .clip-workflow-actions {
  display: flex;
  gap: 2px;
}
.full-editor #editClipWorkflow,
.full-editor #reloadTakeWorkflow {
  border-color: transparent;
}
.full-editor #editClipWorkflow {
  color: var(--text);
}
.full-editor .workflow-problem {
  margin: 0 0 12px;
  padding: 7px 10px;
  border: 1px solid var(--warning-line);
  border-radius: 6px;
  background: var(--warning-surface);
  color: var(--warning);
  font-size: 11px;
  line-height: 1.45;
}
.inspector:has(#inspectorContent :is(.workflow-problem, .no-workflow)) #generateReason {
  display: none;
}
.clip-workflow-heading.no-workflow {
  flex-direction: column;
  justify-content: center;
  margin: 32px 0 6px;
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  text-align: center;
}
.clip-workflow-heading.no-workflow::before {
  content: '';
  width: 28px;
  height: 28px;
  background: var(--faint);
  -webkit-mask: var(--empty-workflow) center/contain no-repeat;
  mask: var(--empty-workflow) center/contain no-repeat;
}
.clip-workflow-heading.no-workflow {
  --empty-workflow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='8' height='8' rx='2'/%3E%3Crect x='13' y='13' width='8' height='8' rx='2'/%3E%3Cpath d='M7 11v4a2 2 0 0 0 2 2h4'/%3E%3C/svg%3E");
}
.clip-workflow-heading.no-workflow :is(.workflow-route, .clip-workflow-actions) {
  display: none;
}
.clip-workflow-heading.no-workflow + .workflow-hint {
  max-width: 250px;
  margin: 0 auto 16px;
  color: var(--faint);
  text-align: center;
}
/* Short controls are label-left rows; prompts, media and seeds keep the full width. */
.full-editor .native-bindings {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.full-editor .native-bindings > .two-fields {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
}
.full-editor .native-bindings > label.field:is(:has(> input), :has(> select)),
.full-editor .native-bindings > .two-fields > label.field {
  display: grid;
  grid-template-columns: minmax(72px, 36%) minmax(0, 1fr);
  align-items: center;
  column-gap: 10px;
  margin: 0;
}
.full-editor .native-bindings .field > span {
  margin: 0 0 5px;
  font-size: 11px;
  line-height: 1.35;
}
.full-editor .native-bindings > label.field:is(:has(> input), :has(> select)) > span,
.full-editor .native-bindings > .two-fields > label.field > span {
  margin: 0;
}
/* The audio inspector follows the same rule: level and fades are label-left rows. */
.full-editor .audio-controls .two-fields {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.full-editor .audio-controls .two-fields > label.field,
.full-editor .audio-controls .audio-level-head {
  display: grid;
  grid-template-columns: minmax(72px, 36%) minmax(0, 1fr);
  align-items: center;
  column-gap: 10px;
  margin: 0;
}
.full-editor .audio-controls .two-fields > label.field > span {
  margin: 0;
}
.full-editor .audio-controls .audio-level-head input {
  width: auto !important;
}
.full-editor .audio-controls .field > span,
.full-editor .audio-controls .audio-level-head {
  font-size: 11px;
}
.full-editor .audio-controls .field > .small {
  font-size: 10px;
  color: var(--dim);
}
.full-editor .audio-controls .outline {
  min-height: 28px;
  font-size: 11px;
}
.full-editor .native-bindings :is(input:not([type='file']), select) {
  height: 28px;
  padding: 3px 8px;
  font-size: 12px;
}
.full-editor .native-bindings textarea {
  padding: 7px 9px;
  line-height: 1.5;
}
.full-editor .native-bindings .seed-controls {
  display: flex;
  gap: 6px;
}
.full-editor .native-bindings .seed-controls > input {
  flex: 1;
  min-width: 0;
}
.full-editor .native-bindings .seed-controls > select {
  flex: 0 0 auto;
  width: auto;
}
/* Timeline: a clip with no take in the edit is a hatched outline, empty audio is a quiet frame. */
.full-editor .timeline-clip.no-take {
  background: repeating-linear-gradient(135deg, #17171a 0 7px, #1b1b1f 7px 14px);
  border-style: dashed;
  border-color: var(--line2);
}
.full-editor .timeline-clip.no-take :is(.filmstrip) {
  display: none;
}
.full-editor .timeline-clip.no-take :is(.clip-label, .clip-meta) {
  background: none;
}
.full-editor .timeline-clip.no-take .clip-label strong {
  color: var(--dim);
}
.full-editor .timeline-clip.no-take .clip-meta {
  justify-content: space-between;
}
.full-editor .timeline-clip.no-take .clip-meta > span:first-child {
  display: inline;
  color: var(--faint);
}
.full-editor .audio-clip.no-audio {
  background: transparent;
  box-shadow: inset 0 0 0 1px var(--line);
}
.full-editor .audio-clip.no-audio .no-audio-label {
  color: var(--faint);
}
/* A narrow viewer drops the duration readout and shortens the preview menu so the transport never overlaps. */
.full-editor .viewer {
  container: viewer / inline-size;
}
@container viewer (max-width:620px) {
  .full-editor .viewer-controls {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }
  .full-editor .viewer-controls .transport {
    justify-self: center;
  }
  .full-editor .tc-block .small {
    display: none;
  }
}

#spool-outdated {
  position: fixed;
  top: 52px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10000;
  padding: 12px 20px;
  background: #ffb526;
  color: #171717;
  border-radius: 6px;
}
/* Generation review: one card per shot, its seeds, and a warning when takes would repeat. */
#modal.review-dialog {
  max-width: 520px;
}
.review-dialog .modal-head {
  margin-bottom: 4px;
}
.review-dialog .review-summary {
  margin: 0 0 14px;
}
.review-shots {
  display: grid;
  gap: 8px;
}
.review-shot {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--raised);
}
.review-shot-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.review-shot-head strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 600;
}
.review-shot-head span {
  flex-shrink: 0;
  color: var(--dim);
  font-size: 11px;
}
.review-seed-mode {
  margin: 12px 0 6px;
  color: var(--faint);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}
.review-seeds {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.review-seeds li {
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--panel);
  color: var(--text);
  font: 11px var(--mono);
}
.review-seeds small {
  color: var(--dim);
  font: inherit;
}
.review-warning {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  padding: 8px 10px;
  border: 1px solid var(--warning-line);
  border-radius: 6px;
  background: var(--warning-surface);
  color: var(--warning);
}
.review-warning .icon {
  flex-shrink: 0;
}
.modal .review-warning p {
  flex: 1;
  margin: 0;
  color: inherit;
  line-height: 1.45;
}
.review-warning button {
  flex-shrink: 0;
}
/* Deadline settings for a clip rendered on the farm: pool and group, priority and workers. */
.deadline-settings {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 10px;
}
/* Activity: one sentence per event, newest first, problems in red, the raw event folded. */
#modal.activity-dialog {
  max-width: 600px;
}
.activity-list {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
}
.activity-row {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr);
  gap: 12px;
  padding: 8px 0;
  border-top: 1px solid var(--line);
  font-size: 12px;
}
.activity-row:first-child {
  border-top: 0;
}
.activity-row time {
  padding-top: 1px;
  color: var(--faint);
  font: 10px/1.6 var(--mono);
  white-space: nowrap;
}
.activity-row p {
  margin: 0;
}
.activity-row p:first-child {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 8px;
}
.activity-row strong {
  position: relative;
  padding-left: 12px;
  font-weight: 550;
  color: var(--text);
}
.activity-row strong::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.45em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--faint);
}
.activity-row[data-tone='done'] strong::before {
  background: var(--success);
}
.activity-row[data-tone='problem'] strong {
  color: var(--danger);
}
.activity-row[data-tone='problem'] strong::before {
  background: var(--danger);
}
.activity-row p:first-child span {
  color: var(--dim);
  font-size: 11px;
}
.activity-row .activity-detail {
  margin-top: 4px;
  padding-left: 12px;
  color: var(--dim);
  font-size: 11px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.activity-row[data-tone='problem'] .activity-detail {
  color: color-mix(in srgb, var(--danger) 75%, var(--text));
}
.activity-row details {
  margin: 3px 0 0 12px;
}
.activity-row summary {
  width: max-content;
  cursor: pointer;
  color: var(--faint);
  font-size: 10px;
}
.activity-row summary:hover {
  color: var(--dim);
}
.activity-row pre {
  margin: 6px 0 0;
  padding: 8px 10px;
  border-radius: 6px;
  background: var(--bg);
  color: var(--dim);
  font: 10px/1.5 var(--mono);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.activity-view {
  margin: 14px 0 0;
  color: var(--faint);
  font: 10px var(--mono);
}
/* Take size, beside the clip folder: large, compact (small thumbnail, one line of
   details) or list (one line per take with a tiny thumbnail). */
#takeSize {
  display: none;
}
@media (min-width: 1101px) {
  .full-editor .takes.has-real-takes #takeSize {
    display: inline-flex;
    order: 2;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    min-height: 24px;
    padding: 0;
    border-color: transparent;
    border-radius: 4px;
    background: transparent;
    color: var(--dim);
  }
  .full-editor .takes.has-real-takes #takeSize:hover {
    background: var(--hover);
    color: var(--text);
  }
  .full-editor .takes.has-real-takes:not([data-take-size='large']) #takeSize {
    background: color-mix(in srgb, var(--accent) 14%, transparent);
    color: var(--accent);
  }
  #takeSize .icon {
    width: 13px;
    height: 13px;
  }
  .full-editor .takes.has-real-takes:not([data-take-size='large']) .take-list {
    gap: 2px;
  }
  .full-editor .takes.has-real-takes[data-take-size='compact'] .take-card {
    grid-template-columns: 64px minmax(0, 1fr);
    row-gap: 0;
    padding: 3px 5px;
  }
  .full-editor .takes.has-real-takes:not([data-take-size='large']) .take-heading strong {
    font-size: 11px;
  }
  .full-editor .takes.has-real-takes:not([data-take-size='large']) .take-seed {
    display: none;
  }
  .full-editor .takes.has-real-takes[data-take-size='compact'] .take-details {
    align-content: center;
  }
  .full-editor .takes.has-real-takes[data-take-size='list'] .take-card {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 7px;
    padding: 2px 5px;
  }
  .full-editor .takes.has-real-takes[data-take-size='list'] .take-thumb {
    order: -1;
    flex: 0 0 32px;
    width: 32px;
    border-radius: 2px;
  }
  .full-editor .takes.has-real-takes[data-take-size='list'] .take-heading {
    flex: none;
    flex-wrap: nowrap;
    padding-right: 0;
  }
  .full-editor .takes.has-real-takes[data-take-size='list'] .take-details {
    flex: 1;
    min-width: 0;
    flex-wrap: nowrap;
    justify-content: flex-end;
    min-height: 0;
    overflow: hidden;
  }
  /* No room for Use take beside the duration: it floats over the row's end on hover. */
  .full-editor .takes.has-real-takes[data-take-size='list'] .use-take {
    position: absolute;
    right: 5px;
    top: 50%;
    display: none;
    min-height: 18px;
    padding: 0 6px;
    transform: translateY(-50%);
  }
  .full-editor .takes.has-real-takes[data-take-size='list'] .take-card:is(:hover, :focus-within, .viewing) .use-take {
    display: inline-flex;
    align-items: center;
  }
  .takes.has-real-takes[data-take-size='list'] .take-group {
    padding-top: 6px;
  }
}
/* While the pointer scrubs a take, a thin bar along the tile's bottom edge shows where
   in the take it is; the whole tile is the scrub area. */
.take-card.scrubbing::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: calc(var(--scrub, 0) * 100%);
  height: 2px;
  border-radius: 0 1px 1px 0;
  background: var(--accent);
  pointer-events: none;
}
/* Fitted tracks (track-layout.js) can be shorter than their headers: smaller toggles. */
.full-editor.tracks-fitted .track-label .track-toggle {
  height: 16px;
  min-height: 16px;
  font-size: 9px;
  line-height: 14px;
}

/* Directing tools (ui/directing.js): transitions, extensions and cast. */
.modal.direct-modal {
  max-width: 640px;
  padding: 18px 20px 16px;
}
.direct-dialog {
  display: grid;
  gap: 12px;
}
.direct-lede {
  margin: 0;
  color: var(--dim);
  font-size: 11.5px;
  line-height: 1.5;
}
.direct-heading {
  margin: 2px 0 0;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
}
.direct-hero {
  display: grid;
  grid-template-columns: 1fr 44px 1fr;
  align-items: center;
  gap: 8px;
}
.direct-frame {
  margin: 0;
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 8px;
  overflow: hidden;
  background: #0b0c0e;
  box-shadow: inset 0 0 0 1px #ffffff14;
}
.direct-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.direct-frame > span {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--faint);
}
.direct-frame.next {
  background: var(--raised);
  box-shadow: inset 0 0 0 1px var(--line);
}
.direct-frame figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 14px 8px 6px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fff;
  background: linear-gradient(transparent, #000c);
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.direct-frame figcaption small {
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  color: #ffffffb3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.direct-bridge {
  display: grid;
  place-items: center;
  color: var(--faint);
}
.direct-bridge .icon {
  width: 16px;
  height: 16px;
}
/* Optional wording next to a prompt field; choosing one adds it to the field. */
.direct-suggestions {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 10px;
  margin-top: -4px;
  font-size: 11px;
}
.direct-suggestions span {
  color: var(--faint);
}
.direct-suggestions button {
  padding: 0;
  border: 0;
  background: none;
  color: var(--dim);
  font: inherit;
  text-decoration: underline dotted var(--line2);
  text-underline-offset: 3px;
  cursor: pointer;
}
.direct-suggestions button:hover {
  color: var(--text);
  text-decoration-color: currentColor;
}
.direct-field {
  display: grid;
  gap: 5px;
  font-size: 11px;
  color: var(--dim);
}
.direct-field em {
  font-style: normal;
  color: var(--faint);
  margin-left: 4px;
}
.direct-field input,
.direct-field textarea {
  width: 100%;
  box-sizing: border-box;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--text);
  padding: 8px 10px;
  font: inherit;
  font-size: 12px;
  resize: vertical;
}
.direct-field input:focus,
.direct-field textarea:focus {
  outline: none;
  border-color: var(--accent);
}
.direct-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}
.direct-stepper {
  display: inline-flex;
  align-items: center;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 7px;
  overflow: hidden;
  background: var(--bg);
}
.direct-stepper button {
  width: 28px;
  height: 100%;
  border: 0;
  background: transparent;
  color: var(--dim);
  font-size: 15px;
  cursor: pointer;
}
.direct-stepper button:hover {
  background: var(--hover);
  color: var(--text);
}
.direct-stepper output {
  min-width: 44px;
  text-align: center;
  font-family: var(--mono);
  color: var(--text);
}
.direct-models {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.direct-models button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--raised);
  color: var(--dim);
  cursor: pointer;
  font-size: 11.5px;
}
.direct-models button.active {
  border-color: var(--accent);
  color: var(--text);
}
.direct-models button .icon {
  width: 13px;
  height: 13px;
}
.direct-modal .modal-footer #directGenerate {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.direct-modal .modal-footer #directGenerate .icon {
  width: 12px;
  height: 12px;
}
/* Directed clips on the timeline and the buttons on cuts. */
.timeline-clip.directed .direction-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-left: 6px;
  padding: 1px 6px 1px 4px;
  border-radius: 4px;
  font-size: 9.5px;
  font-weight: 500;
  color: var(--dim);
  background: #0009;
  flex-shrink: 0;
}
.timeline-clip.directed .direction-badge .icon {
  width: 10px;
  height: 10px;
}
@container clip (max-width: 90px) {
  .timeline-clip.directed .direction-badge > span {
    display: none;
  }
}
.timeline-clip.directed.no-take .filmstrip {
  opacity: 0.35;
}
.cut-transition {
  position: absolute;
  z-index: 6;
  width: 20px;
  height: 20px;
  margin: -4px 0 0 -10px;
  padding: 0;
  border: 1px solid var(--line2);
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #15171bee;
  color: var(--dim);
  cursor: pointer;
  opacity: 0;
  transform: scale(0.8);
  transition:
    opacity 0.12s,
    transform 0.12s;
}
.cut-transition .icon {
  width: 10px;
  height: 10px;
}
#clipLane:hover .cut-transition,
.cut-transition:focus-visible {
  opacity: 0.85;
  transform: none;
}
.cut-transition:hover {
  opacity: 1;
  color: var(--text);
  border-color: var(--dim);
}

/* The inspector card of a directed clip. */
.direction-card {
  display: grid;
  gap: 10px;
  margin: 0 0 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.direction-head {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
}
.direction-head span {
  color: var(--dim);
}
.direction-frames {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 6px;
}
.direction-frames:has(> :only-child) {
  grid-template-columns: 1fr;
}
.direction-frames .direct-bridge .icon {
  width: 13px;
  height: 13px;
}
.direction-frames figcaption {
  padding: 10px 6px 4px;
  font-size: 9px;
}
.extension-from {
  display: grid;
  grid-template-columns: 112px 1fr;
  align-items: center;
  gap: 10px;
}
.extension-from figcaption {
  display: none;
}
.direction-note {
  margin: 0;
  font-size: 11.5px;
  line-height: 1.45;
  color: var(--dim);
}
.direction-note.warn {
  color: var(--warning);
}
.extension-parent {
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: #ffffff40;
  text-underline-offset: 2px;
  cursor: pointer;
}
.extension-parent:hover,
.extension-parent:focus-visible {
  text-decoration-color: var(--accent);
}

/* A shot and the extension attached after it read as one piece on the timeline. */
.timeline-clip.extended {
  border-top-right-radius: 2px;
  border-bottom-right-radius: 2px;
}
.timeline-clip.attached {
  border-top-left-radius: 2px;
  border-bottom-left-radius: 2px;
}
.timeline-clip.extended .filmstrip img:last-child,
.timeline-clip.attached .filmstrip img:first-child {
  border-radius: 2px;
}
.timeline-clip.family::after {
  content: '';
  position: absolute;
  inset: 0;
  border: 1px solid #ffb52e8c;
  border-radius: inherit;
  z-index: 2;
  pointer-events: none;
}
.timeline-clip.directed .direction-badge.detached {
  color: var(--warning);
}
.extension-seam {
  position: absolute;
  z-index: 5;
  width: 18px;
  height: 18px;
  margin: -9px 0 0 -9px;
  border: 1px solid var(--line2);
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #15171b;
  color: var(--text);
  pointer-events: none;
  box-shadow: 0 1px 4px #0008;
}
.extension-seam .icon {
  width: 10px;
  height: 10px;
}

/* Cast panel in the left sidebar. */
.cast-panel {
  display: none;
}
.studio-sidebar .media-panel[data-tab='cast'] > .cast-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 10px;
}
.studio-sidebar .media-panel[data-tab='cast'] > .pool-toolbar,
.studio-sidebar .media-panel[data-tab='cast'] > .media-filters,
.studio-sidebar .media-panel[data-tab='cast'] > .panel-scroll,
.studio-sidebar .media-panel[data-tab='cast'] > .panel-foot,
.studio-sidebar .media-panel[data-tab='cast'] > .workflow-library {
  display: none;
}
.cast-intro strong {
  font-size: 12px;
}
.cast-intro p {
  margin: 4px 0 0;
  color: var(--dim);
  font-size: 11px;
  line-height: 1.5;
}
.cast-intro code {
  color: var(--accent);
  font-family: var(--mono);
}
.cast-list {
  display: grid;
  gap: 8px;
}
.cast-card {
  position: relative;
  display: grid;
  gap: 8px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--raised);
}
.cast-images {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 5px;
}
.cast-image {
  position: relative;
  aspect-ratio: 3 / 4;
  border-radius: 6px;
  overflow: hidden;
  background: var(--bg);
  display: grid;
  place-items: center;
  color: var(--faint);
}
.cast-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.cast-image button {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 18px;
  height: 18px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #000a;
  color: #fff;
  opacity: 0;
  cursor: pointer;
}
.cast-image button .icon {
  width: 10px;
  height: 10px;
}
.cast-image:hover button {
  opacity: 1;
}
.cast-image.add {
  border: 1px dashed var(--line2);
  cursor: pointer;
}
.cast-fields {
  display: grid;
  gap: 5px;
  padding-right: 26px;
}
.cast-fields label {
  display: flex;
  align-items: center;
}
.cast-at {
  color: var(--accent);
  font: 600 13px var(--mono);
  margin-right: 1px;
}
.cast-fields input {
  min-width: 0;
  flex: 1;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--text);
  padding: 4px 5px;
  font: inherit;
}
.cast-fields [data-cast-name] {
  font: 600 13px var(--mono);
}
.cast-fields [data-cast-description] {
  font-size: 11px;
  color: var(--dim);
}
.cast-fields input:hover,
.cast-fields input:focus {
  border-color: var(--line2);
  outline: none;
}
.cast-delete {
  position: absolute;
  right: 6px;
  bottom: 6px;
  opacity: 0.6;
}
.cast-delete:hover {
  opacity: 1;
}
.cast-drop {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 12px;
  border: 1px dashed var(--line2);
  border-radius: 10px;
  color: var(--dim);
  cursor: pointer;
}
.cast-drop span {
  display: grid;
  gap: 2px;
  color: var(--text);
  font-weight: 500;
}
.cast-drop small {
  color: var(--faint);
  font-weight: 400;
}
.cast-drop:hover,
.cast-drop.drag-over {
  border-color: var(--accent);
  color: var(--accent);
}

/* Prompt tools under a clip prompt: cast mentions and checks (ui/prompt-lint.js). */
.prompt-tools {
  display: grid;
  gap: 6px;
  margin: -4px 0 10px;
}
.prompt-tools:empty {
  display: none;
}
.prompt-mentions {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.mention-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 24px;
  padding: 0 8px 0 3px;
  border-radius: 99px;
  background: var(--raised);
  border: 1px solid var(--line);
  color: var(--text);
  font: 600 11px var(--mono);
}
.mention-chip img {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  object-fit: cover;
}
.mention-chip small {
  font-weight: 400;
  color: var(--dim);
}
.prompt-findings {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 3px;
}
.prompt-findings li {
  display: flex;
  gap: 6px;
  align-items: flex-start;
  font-size: 11px;
  line-height: 1.4;
  color: var(--dim);
}
.prompt-findings li .icon {
  width: 12px;
  height: 12px;
  margin-top: 1px;
  color: var(--faint);
}
.prompt-findings li.warn {
  color: #ffd38a;
}
.prompt-findings li.warn .icon {
  color: var(--accent);
}
.mention-menu {
  position: absolute;
  z-index: 60;
  display: grid;
  padding: 4px;
  border: 1px solid var(--line2);
  border-radius: 9px;
  background: var(--panel);
  box-shadow: 0 12px 30px #000a;
}
.mention-menu button {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 6px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  font: 600 12px var(--mono);
}
.mention-menu button.active,
.mention-menu button:hover {
  background: var(--hover);
}
.mention-menu img {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  object-fit: cover;
}
.mention-menu span {
  display: grid;
}
.mention-menu small {
  font: 400 10.5px inherit;
  font-family: inherit;
  color: var(--dim);
}

/* Draft takes: a quick low-resolution pass, made final from the take. */
.draft-toggle {
  height: 32px;
  padding: 0 10px;
  border-radius: 8px;
  font-size: 11.5px;
}
.draft-toggle.active {
  border-color: var(--preview);
  color: var(--preview);
  background: #62d0e014;
}
.take-badge.draft {
  color: #0d2a2e;
  background: var(--preview);
}
.take-badge.final {
  color: var(--dim);
  border: 1px solid #ffffff33;
  background: transparent;
}
.make-final {
  border: 1px solid #62d0e077;
  border-radius: 6px;
  background: transparent;
  color: var(--preview);
  font-size: 10.5px;
  padding: 2px 7px;
  cursor: pointer;
}
.make-final:hover {
  background: #62d0e01f;
}

/* The viewer shows the frames an ungenerated transition joins. */
.placeholder-direct {
  position: relative;
  width: min(420px, 60vw);
  max-width: 80%;
  margin: 0 auto 14px;
}
.direct-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  border-radius: 8px;
  overflow: hidden;
}
.direct-pair.single {
  grid-template-columns: 1fr;
  width: 60%;
  margin: 0 auto;
}
.direct-pair img {
  /* Not the viewer's full-size picture: these frames sit in the flow of the empty state. */
  position: static;
  inset: auto;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
  background: #000;
}
.placeholder-direct em {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 8px;
  color: var(--dim);
  font: 500 11px inherit;
  font-style: normal;
}
.placeholder-direct em .icon {
  width: 12px;
  height: 12px;
}
.empty-stage.directed > .empty-symbol {
  display: none;
}
