/* Track colors by type */
.trackRow.audio { --track-rgb: var(--family-audio-rgb); background: rgba(var(--track-rgb),.03); }
.trackRow.scene { --track-rgb: var(--family-scene-rgb); background: rgba(var(--track-rgb),.03); }
.trackRow.scene-child-row {
  --track-rgb: var(--family-system-rgb);
  --scene-family-wash: .075;
  height: 62px;
  background: linear-gradient(90deg, rgba(var(--track-rgb), var(--scene-family-wash)), rgba(14, 20, 31, .36));
  border-bottom-color: rgba(var(--track-rgb), .16);
}
.trackRow.scene-child-row[data-scene-family-depth="1"] { --scene-family-wash: .09; }
.trackRow.scene-child-row[data-scene-family-depth="2"] { --scene-family-wash: .065; }
.trackRow.scene-child-row[data-scene-family-depth="3"] { --scene-family-wash: .05; }
.trackRow.scene-child-row.scene-family-root {
  --scene-family-wash: .14;
  border-top-color: rgba(var(--track-rgb), .42);
  box-shadow:
    inset 3px 0 0 rgba(var(--track-rgb), .78),
    inset 0 1px 0 rgba(255, 255, 255, .045);
}
.trackRow.scene-child-row.scene-lane-camera { --track-rgb: var(--family-camera-rgb); }
.trackRow.scene-child-row.scene-lane-light { --track-rgb: var(--family-light-rgb); }
.trackRow.scene-child-row.scene-lane-object { --track-rgb: var(--family-geometry-rgb); }
.trackRow.scene-child-row.scene-lane-material { --track-rgb: var(--family-geometry-rgb); }
.trackRow.scene-child-row.scene-lane-deformer { --track-rgb: var(--family-geometry-rgb); }
.trackRow.scene-child-row.scene-lane-group { --track-rgb: var(--family-group-rgb); }
.trackRow.scene-child-row.scene-lane-cloner { --track-rgb: var(--family-cloner-rgb); }
.trackRow.scene-child-row.scene-lane-particles { --track-rgb: var(--family-particles-rgb); }
.trackRow.scene-child-row.scene-lane-system { --track-rgb: var(--family-system-rgb); }
.trackRow.scene-child-row.text-reveal-child-row { --track-rgb: var(--family-text-rgb); }
.trackRow.scene-child-row.text-postfx-child-row { --track-rgb: var(--family-postfx-rgb); }
.trackRow.shader { --track-rgb: var(--family-shader-rgb); background: rgba(var(--track-rgb),.03); }
.trackRow.media { --track-rgb: var(--family-media-rgb); background: rgba(var(--track-rgb),.03); }
.trackRow.postfx { --track-rgb: var(--family-postfx-rgb); background: rgba(var(--track-rgb),.03); }
.trackRow.text { --track-rgb: var(--family-text-rgb); background: rgba(var(--track-rgb),.03); }
.trackRow.lut { --track-rgb: var(--family-lut-rgb); background: rgba(var(--track-rgb),.03); }

.trackRow.webcam { --track-rgb: var(--family-webcam-rgb); }
.trackRow.screen { --track-rgb: var(--family-screen-rgb); }
.trackRow.mask { --track-rgb: var(--family-mask-rgb); background:rgba(var(--track-rgb),.03); }
.trackRow:not(.scene) .seg {
  background:linear-gradient(135deg,rgba(var(--track-rgb),.72),rgba(var(--track-rgb),.3));
}

/* Track header - left side with drag handle, name, buttons */
.track-header {
  display: flex;
  align-items: center;
  gap: 3px;
  min-width: var(--timeline-track-header-width, 272px);
  max-width: var(--timeline-track-header-width, 272px);
  padding: 0 8px;
  background:
    linear-gradient(90deg, rgba(var(--track-rgb, 120, 140, 170), .14), transparent 72%),
    rgba(0,0,0,0.25);
  border-right: 1px solid var(--line);
  border-left: 2px solid rgba(var(--track-rgb, 120, 140, 170), .42);
  z-index: 5;
  flex-shrink: 0;
  box-sizing: border-box;
  user-select: none;
  -webkit-user-select: none;
}
.track-drag-handle {
  cursor: grab;
  width: 12px;
  padding: 2px 0;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
  user-select: none;
  flex: 0 0 auto;
}
.track-drag-handle:hover { color: var(--fg); }
.track-drag-handle:active { cursor: grabbing; }
.trackRow.dragging { opacity: 0.5; }
.trackRow.drag-over { border-top: 2px solid var(--accent); }
.trackRow.drag-over-after::after {
  content: '';
  position: absolute;
  z-index: 40;
  right: 0;
  bottom: 0;
  left: 0;
  height: 2px;
  background: var(--accent);
  box-shadow: 0 0 8px color-mix(in srgb, var(--accent) 65%, transparent);
  pointer-events: none;
}
.trackRow.media-batch-drop-target {
  background:
    linear-gradient(90deg, rgba(93, 190, 255, .2), rgba(93, 190, 255, .06)) !important;
  box-shadow: inset 0 0 0 2px rgba(93, 190, 255, .7);
}
#timelineViewport.media-batch-drop-active::after {
  content: attr(data-media-drop-label);
  position: sticky;
  z-index: 80;
  left: calc(var(--timeline-track-header-width, 272px) + 18px);
  top: 12px;
  display: inline-flex;
  width: max-content;
  padding: 9px 12px;
  border: 1px solid rgba(93, 190, 255, .72);
  border-radius: 7px;
  background: rgba(9, 17, 29, .94);
  color: #a8dfff;
  font-size: 11px;
  letter-spacing: .02em;
  box-shadow: 0 10px 24px rgba(0, 0, 0, .35);
  pointer-events: none;
}
.trackRow.segment-drop-target { 
  background: rgba(100, 200, 255, 0.15) !important; 
  box-shadow: inset 0 0 0 2px rgba(100, 200, 255, 0.5);
}
.track-name {
  flex: 1;
  min-width: 0;
  font-size: 11.5px;
  color: var(--fg);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
}
.track-name:active { cursor: grabbing; }
.track-add-btn {
  width: 20px;
  height: 20px;
  border: none;
  background: rgba(255,255,255,0.1);
  color: var(--fg);
  border-radius: 3px;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.track-add-btn:hover { background: rgba(255,255,255,0.2); }
.track-visibility-btn {
  appearance: none;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  padding: 4px;
  border: 0 !important;
  border-radius: 4px;
  background: transparent !important;
  box-shadow: none !important;
  color: rgba(var(--track-rgb, 170, 190, 220), .9);
  cursor: pointer;
  flex: 0 0 auto;
  touch-action: manipulation;
}
.track-visibility-btn svg {
  display: block;
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.ui-icon {
  display: block;
  width: 1em;
  height: 1em;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.delete-icon-btn .ui-icon {
  width: 14px;
  height: 14px;
}
.ui-icon.ui-icon-delete { stroke-width: 1.5; }
.delete-icon-btn:not(:disabled) .ui-icon-delete {
  opacity: .7;
  transition: opacity 120ms ease;
}
.delete-icon-btn:hover:not(:disabled) .ui-icon-delete,
.delete-icon-btn:focus-visible .ui-icon-delete { opacity: 1; }
.delete-action-btn {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
.delete-action-btn .ui-icon {
  width: 14px;
  height: 14px;
}
.track-visibility-btn:hover {
  color: var(--fg);
  background: rgba(255,255,255,.1) !important;
}
.track-visibility-btn.is-hidden {
  color: var(--muted);
  opacity: .72;
}
.track-delete-btn {
  width: 18px;
  height: 18px;
  border: none;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
  opacity: 0.6;
  display: flex;
  align-items: center;
  justify-content: center;
}
.track-delete-btn:hover { color: #ff6666; opacity: 1; }
.track-delete-btn:disabled { opacity: 0.2; cursor: not-allowed; }
.track-content {
  flex: 1;
  position: relative;
  overflow: hidden;
}
.track-hint {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: var(--muted);
  font-size: 11px;
  pointer-events: none;
  opacity: 0.5;
}

.track-header.selected {
  border-left-color: rgba(var(--track-rgb, 120, 180, 255), .95);
  background:
    linear-gradient(90deg, rgba(var(--track-rgb, 120, 180, 255), .24), transparent 82%),
    rgba(120, 180, 255, 0.05);
  box-shadow: inset 0 0 0 1px rgba(var(--track-rgb, 120, 180, 255), .18);
}

.scene-child-header {
  padding-left: calc(18px + var(--scene-lane-indent, 0px));
  border-left-color: rgba(var(--track-rgb), .35);
  background:
    linear-gradient(90deg, rgba(var(--track-rgb), .14), transparent 82%),
    rgba(5, 9, 16, .42);
}
.scene-family-root .scene-child-header {
  border-left-color: rgba(var(--track-rgb), .82);
  background:
    linear-gradient(90deg, rgba(var(--track-rgb), .24), transparent 86%),
    rgba(5, 9, 16, .46);
}
.scene-family-root .scene-lane-kind {
  color: rgba(var(--track-rgb), .98);
}
.scene-auto-group .track-name { font-weight: 600; }
.scene-auto-group-summary {
  cursor: pointer;
  background: rgba(var(--track-rgb), .18);
  border: 1px solid rgba(var(--track-rgb), .5);
}
.scene-auto-group .scene-child-header { cursor: pointer; }
.scene-auto-group-summary .title { color: rgba(255, 255, 255, .85); }
.scene-child-header.selected {
  border-left-color: rgba(var(--track-rgb), 1);
  background:
    linear-gradient(90deg, rgba(var(--track-rgb), .3), transparent 88%),
    rgba(20, 40, 65, .35);
}
.scene-child-header .track-name,
.scene-child-seg .title {
  opacity: .85;
}
.scene-lane-branch {
  position: relative;
  width: 12px;
  height: 100%;
  flex: 0 0 12px;
}
.scene-lane-branch::before {
  content: "";
  position: absolute;
  left: 1px;
  top: -32px;
  bottom: 50%;
  border-left: 1px solid rgba(var(--track-rgb), .38);
  border-bottom: 1px solid rgba(var(--track-rgb), .38);
  width: 10px;
  border-bottom-left-radius: 5px;
}
.scene-lane-kind {
  display: block;
  margin-bottom: 2px;
  color: rgba(var(--track-rgb), .82);
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: .08em;
  line-height: 1;
  text-transform: uppercase;
}
.scene-child-content {
  background: linear-gradient(90deg, rgba(var(--track-rgb), .025), rgba(2, 7, 13, .18));
}
.scene-child-seg {
  top: 5px;
  height: calc(100% - 10px);
  border-color: rgba(var(--track-rgb), .46);
  background:
    linear-gradient(135deg, rgba(var(--track-rgb), .94), rgba(var(--track-rgb), .5)) !important;
  box-shadow: 0 5px 13px rgba(0,0,0,.28), inset 0 1px 0 rgba(255,255,255,.18);
}
.text-reveal-seg {
  isolation: isolate;
  background: rgba(var(--track-rgb), .28) !important;
  overflow: hidden;
}
.text-reveal-seg > .title,
.text-reveal-seg > .meta {
  z-index: 3;
}
.text-reveal-seg > .title {
  left: 42px;
  right: 42px;
  text-align: center;
}
.text-reveal-phase {
  position: absolute;
  z-index: 1;
  top: 0;
  bottom: 0;
  min-width: 1px;
  pointer-events: none;
}
.text-reveal-phase-in {
  left: 0;
  background: linear-gradient(90deg, rgba(89, 190, 255, .92), rgba(89, 190, 255, .46));
  box-shadow: inset -1px 0 0 rgba(216, 244, 255, .8);
}
.text-reveal-phase-out {
  right: 0;
  background: linear-gradient(90deg, rgba(255, 126, 191, .46), rgba(255, 126, 191, .92));
  box-shadow: inset 1px 0 0 rgba(255, 226, 241, .82);
}
.text-reveal-phase > span {
  position: absolute;
  top: 4px;
  color: rgba(4, 12, 22, .78);
  font-size: 8px;
  font-weight: 850;
  letter-spacing: .08em;
  line-height: 1;
  text-shadow: 0 1px 0 rgba(255,255,255,.24);
}
.text-reveal-phase-in > span { left: 6px; }
.text-reveal-phase-out > span { right: 6px; }
.text-reveal-phase-handle {
  position: absolute;
  z-index: 4;
  top: 0;
  bottom: 0;
  width: 13px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  cursor: ew-resize;
  pointer-events: auto;
}
.text-reveal-phase-handle::after {
  content: '';
  position: absolute;
  top: 3px;
  bottom: 3px;
  left: 6px;
  width: 2px;
  border-radius: 2px;
  background: rgba(245, 251, 255, .92);
  box-shadow: 0 0 0 1px rgba(9, 21, 36, .36), 0 0 7px rgba(190, 230, 255, .5);
}
.text-reveal-phase-handle.in-end { right: -7px; }
.text-reveal-phase-handle.out-start { left: -7px; }
.text-reveal-seg > .handle {
  z-index: 5;
  width: 10px;
}
.material-timeline-swatch {
  position: relative;
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  overflow: hidden;
  border: 1px solid rgba(var(--material-accent-rgb, 100, 214, 174), .82);
  border-radius: 50%;
  background: rgb(var(--material-base-rgb, 100, 214, 174));
  box-shadow:
    0 2px 7px rgba(0, 0, 0, .42),
    inset 0 0 0 1px rgba(255, 255, 255, .18);
}
.material-timeline-clip {
  isolation: isolate;
  border-color: rgba(var(--material-accent-rgb), .82) !important;
  background: rgb(var(--material-base-rgb)) !important;
  box-shadow:
    0 5px 13px rgba(0, 0, 0, .34),
    inset 0 1px 0 rgba(255, 255, 255, .24),
    inset 3px 0 0 rgba(var(--material-accent-rgb), .8);
}
.material-timeline-surface,
.material-timeline-texture {
  position: absolute;
  inset: 0;
  display: block;
  pointer-events: none;
}
.material-timeline-surface {
  z-index: 0;
  overflow: hidden;
  background:
    linear-gradient(135deg,
      rgba(var(--material-accent-rgb), .78),
      rgba(var(--material-base-rgb), .92) 48%,
      rgba(var(--material-base-rgb), .68));
}
.material-timeline-surface::before,
.material-timeline-surface::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.material-timeline-surface::before {
  left: 9%;
  right: auto;
  width: var(--material-highlight-width, 28%);
  opacity: var(--material-highlight-opacity, .36);
  transform: skewX(-18deg);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .84), transparent);
}
.material-timeline-texture {
  z-index: 1;
  opacity: var(--material-texture-opacity, .3);
  background-position: center;
  background-size: cover;
  filter: saturate(1.12) contrast(1.08);
  mix-blend-mode: soft-light;
}
.material-timeline-clip > .title,
.material-timeline-clip > .meta {
  z-index: 2;
  color: var(--material-text-color) !important;
  text-shadow: var(--material-text-shadow) !important;
}
.material-timeline-clip > .handle { z-index: 3; }

/* Finish grammar: readable as a small swatch and as a full timeline clip. */
.material-finish-glass .material-timeline-surface {
  background:
    repeating-conic-gradient(from 45deg, rgba(255,255,255,.11) 0 25%, rgba(0,0,0,.08) 0 50%) 0 0 / 11px 11px,
    linear-gradient(135deg, rgba(var(--material-accent-rgb), .48), rgba(var(--material-base-rgb), .3));
}
.material-finish-glass .material-timeline-surface::before {
  left: 18%;
  width: 20%;
  opacity: calc(var(--material-highlight-opacity, .36) + .2);
  transform: skewX(-24deg);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.95), rgba(255,255,255,.18), transparent);
}
.material-finish-metal .material-timeline-surface {
  background:
    linear-gradient(105deg,
      rgba(var(--material-base-rgb), .72) 0 25%,
      rgba(255,255,255,.72) 38%,
      rgba(var(--material-accent-rgb), .88) 47%,
      rgba(10,15,22,.32) 62%,
      rgba(var(--material-base-rgb), .82) 100%);
}
.material-finish-metal .material-timeline-surface::before { opacity: .16; }
.material-finish-coated .material-timeline-surface::before {
  left: 5%;
  width: 48%;
  opacity: calc(var(--material-highlight-opacity, .36) + .12);
}
.material-finish-matte .material-timeline-surface {
  background:
    radial-gradient(circle at 20% 30%, rgba(255,255,255,.09) 0 1px, transparent 1.5px) 0 0 / 7px 7px,
    linear-gradient(135deg, rgba(var(--material-accent-rgb), .6), rgba(var(--material-base-rgb), .92));
}
.material-finish-matte .material-timeline-surface::before { opacity: .08; }
.material-finish-iridescent .material-timeline-surface::after {
  opacity: .56;
  background: linear-gradient(112deg,
    rgba(255,70,150,.58), rgba(255,196,73,.42), rgba(75,245,215,.46), rgba(96,125,255,.56), rgba(216,98,255,.52));
  mix-blend-mode: screen;
}
.material-finish-wireframe .material-timeline-surface::after {
  opacity: .7;
  background:
    linear-gradient(rgba(255,255,255,.42) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.42) 1px, transparent 1px);
  background-size: 9px 9px;
  mix-blend-mode: overlay;
}
.material-finish-faceted:not(.material-finish-wireframe) .material-timeline-surface::after {
  opacity: .34;
  background:
    linear-gradient(32deg, transparent 44%, rgba(255,255,255,.48) 45% 51%, transparent 52%) 0 0 / 22px 18px,
    linear-gradient(148deg, transparent 44%, rgba(0,0,0,.42) 45% 51%, transparent 52%) 11px 0 / 22px 18px;
}
.trackRow.minimized .material-timeline-swatch {
  width: 15px;
  height: 15px;
  flex-basis: 15px;
}
.scene-child-seg.is-disabled {
  opacity: 1;
  filter: saturate(.48);
}
.chunk-trigger-marker {
  position:absolute;
  z-index:8;
  top:2px;
  width:18px;
  height:calc(100% - 4px);
  margin-left:-9px;
  padding:0;
  border:0;
  border-left:2px solid var(--exploder-accent,#ff9b62);
  background:linear-gradient(90deg,color-mix(in srgb,var(--exploder-accent,#ff9b62) 22%,transparent),transparent);
  color:var(--exploder-accent,#ff9b62);
  cursor:ew-resize;
  filter:drop-shadow(0 0 5px color-mix(in srgb,var(--exploder-accent,#ff9b62) 48%,transparent));
}
.chunk-trigger-marker span {
  position:absolute;
  left:-8px;
  top:-2px;
  display:grid;
  place-items:center;
  width:15px;
  height:15px;
  border:1px solid currentColor;
  border-radius:50%;
  background:rgba(6,10,18,.94);
  font-size:9px;
}
.chunk-trigger-marker:hover span { transform:scale(1.12); background:color-mix(in srgb,var(--exploder-accent,#ff9b62) 22%,#07101b); }
.scene-track-expand-btn {
  width: 22px;
  height: 22px;
  padding: 3px;
  flex: 0 0 22px;
  border: 1px solid rgba(var(--track-rgb, 100, 150, 255), .2);
  border-radius: 5px;
  background: rgba(var(--track-rgb, 100, 150, 255), .08);
  color: rgba(var(--track-rgb, 100, 150, 255), .86);
  cursor: pointer;
  transition: background .14s ease, border-color .14s ease, color .14s ease;
}
.scene-track-expand-btn svg {
  display: block;
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform .14s ease;
}
.scene-track-expand-btn:hover {
  border-color: rgba(var(--track-rgb, 100, 150, 255), .45);
  background: rgba(var(--track-rgb, 100, 150, 255), .18);
  color: var(--fg);
}
.scene-track-expand-btn.is-expanded svg {
  transform: rotate(90deg);
}
.scene-system-expand-btn {
  width: 19px;
  height: 19px;
  margin-left: -2px;
  padding: 2px;
  flex: 0 0 19px;
  border: 1px solid rgba(var(--track-rgb), .24);
  border-radius: 4px;
  background: rgba(var(--track-rgb), .075);
  color: rgba(var(--track-rgb), .9);
  cursor: pointer;
}
.scene-system-expand-btn svg {
  display: block;
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform .14s ease;
}
.scene-system-expand-btn:hover {
  border-color: rgba(var(--track-rgb), .5);
  background: rgba(var(--track-rgb), .16);
  color: var(--fg);
}
.scene-system-expand-btn.is-expanded svg { transform: rotate(90deg); }
.trackRow.minimized .scene-system-expand-btn {
  width: 17px;
  height: 17px;
  flex-basis: 17px;
}
.trackRow.minimized .scene-lane-kind {
  display: none;
}
.trackRow.minimized .scene-lane-branch {
  display: block;
  width: 14px;
  height: 24px;
  flex: 0 0 14px;
}
.trackRow.minimized .scene-lane-branch::before {
  left: 2px;
  top: -12px;
  bottom: 50%;
  width: 9px;
  border-left-color: rgba(var(--track-rgb), .32);
  border-bottom-color: rgba(var(--track-rgb), .32);
  border-bottom-left-radius: 4px;
}
.trackRow.minimized .scene-child-header {
  padding-left: calc(30px + var(--scene-lane-indent, 0px));
}

.trackRow.track-hidden .track-content {
  opacity: .32;
  filter: saturate(.45);
}
.trackRow.track-hidden .track-header {
  background: rgba(0,0,0,.3);
}
.trackRow.track-hidden .track-name {
  color: var(--muted);
}

/* Minimized track styling */
.trackRow.minimized {
  height: 24px !important;
  min-height: 24px !important;
  max-height: 24px !important;
}
.trackRow.minimized .track-content {
  height: 24px;
  overflow: hidden;
}
.trackRow.minimized .seg {
  top: 2px !important;
  height: 18px !important;
  border-radius: 4px;
}
.trackRow.minimized .seg .title {
  top: 2px;
  font-size: 10px;
}
.trackRow.minimized .seg .meta {
  display: none;
}
.trackRow.minimized .track-hint {
  display: none;
}

/* All tracks use flexbox layout with header */
.trackRow {
  display: flex;
  align-items: stretch;
}

/* Audio track styling */
.trackRow.audio {
  min-height: 70px;
  height: 70px;
}
.trackRow.audio .track-header {
  background:
    linear-gradient(90deg, rgba(var(--track-rgb), .15), transparent 72%),
    rgba(0,0,0,0.3);
}
.trackRow.audio .seg {
  top: 4px;
  height: calc(100% - 8px);
  background: linear-gradient(135deg, rgba(var(--track-rgb),.5), rgba(var(--track-rgb),.25));
}
.legacy-audio-track {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  min-height: 1px !important;
  overflow: hidden !important;
  opacity: 0;
  pointer-events: none;
}
.audio-segment-waveform {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  opacity: 0.9;
  pointer-events: none;
}
.trackRow.audio .seg .title,
.trackRow.audio .seg .meta {
  color: rgba(240, 253, 255, 0.96);
  text-shadow: 0 1px 2px rgba(0,0,0,.8);
  z-index: 2;
}
.audio-track-waveform {
  flex: 1;
  position: relative;
  overflow: hidden;
  cursor: pointer;
}
.audio-track-controls {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 4px 8px;
  background: rgba(0,0,0,0.2);
  z-index: 1;
}
.audio-track-btn {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: rgba(255,200,100,0.15);
  color: var(--gold);
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}
.audio-track-btn:hover {
  background: rgba(255,200,100,0.3);
  transform: scale(1.1);
}
.audio-track-btn:active {
  transform: scale(0.95);
}
.audio-track-btn.delete {
  background: rgba(255,100,100,0.15);
  color: var(--bad);
}
.audio-track-btn.delete:hover {
  background: rgba(255,100,100,0.3);
}

/* Audio Analysis Modal */
.audio-analysis-spinner {
  width: 48px;
  height: 48px;
  border: 4px solid var(--line);
  border-top-color: var(--accent);
  border-radius: 50%;
  margin: 0 auto;
  animation: spin 1s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
.audio-analysis-progress {
  height: 6px;
  background: var(--line);
  border-radius: 3px;
  overflow: hidden;
}
#audioAnalysisProgressBar {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--good));
  width: 0%;
  transition: width 0.3s ease-out;
}

/* Add button for tracks */
.trackAddBtn {
  position: absolute;
  right: 10px;
  top: 6px;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: rgba(255,200,100,0.15);
  color: var(--gold);
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: all 0.15s ease;
}
.trackAddBtn:hover {
  background: rgba(255,200,100,0.3);
  transform: scale(1.1);
}
.trackAddBtn:active {
  transform: scale(0.95);
}

/* Empty track hint */
.trackHint {
  position: absolute;
  left: 80px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255,255,255,0.25);
  font-size: 11px;
  pointer-events: none;
}

/* Fullscreen mode */
body.fullscreen-mode {
  overflow: hidden;
}
body.fullscreen-mode #app {
  position: fixed;
  inset: 0;
  z-index: auto;
}
body.fullscreen-mode #viewportWrap {
  flex: 1 1 100%;
  height: 100vh;
  border: none;
}
body.fullscreen-mode #topNav,
body.fullscreen-mode #hud,
body.fullscreen-mode #splitter,
body.fullscreen-mode #editor {
  display: none !important;
}
body.fullscreen-mode:not(.fullscreen-authoring) #canvasContainer,
body.fullscreen-mode:not(.fullscreen-authoring) #webgpuCanvas {
  cursor: none;
}
#viewportWrap:fullscreen,
#viewportWrap:-webkit-full-screen {
  width: 100vw !important;
  height: 100vh !important;
  min-height: 0 !important;
  border: 0 !important;
  background: #000;
}
#viewportWrap::backdrop {
  background: #000;
}

/* Keep the last completed frame stable while browser chrome enters or leaves
   native fullscreen. The canvases retain their authored aspect ratio instead
   of exposing the old editor-sized surface or a transient stretched frame. */
body.fullscreen-transitioning #viewportWrap {
  position: fixed !important;
  inset: 0 !important;
  z-index: 10001;
  width: 100vw !important;
  height: 100vh !important;
  min-height: 0 !important;
  flex: none !important;
  border: 0 !important;
  background: #000;
}
body.fullscreen-transitioning #canvasContainer {
  width: 100% !important;
  height: 100% !important;
  background: #000;
}
body.fullscreen-transitioning #webgpuCanvas,
body.fullscreen-transitioning #webgpuTransitionCanvas,
body.fullscreen-transitioning #imageOverlayCanvas,
body.fullscreen-transitioning #editorOverlayCanvas {
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: contain;
}

/* Clean fullscreen hides editor chrome, retaining authored canvases and script UI. */
body.fullscreen-authoring.fullscreen-ui-hidden #viewportWrap > :not(#canvasContainer):not(.script-ui-surface),
body.fullscreen-authoring.fullscreen-ui-hidden #canvasContainer > :not(canvas):not(.script-ui-surface),
body.fullscreen-authoring.fullscreen-ui-hidden #editorOverlayCanvas,
body.fullscreen-authoring.fullscreen-ui-hidden #toastContainer {
  display: none !important;
}

/* Fullscreen hint overlay */
#fullscreenHint {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  padding: 10px 20px;
  background: rgba(0,0,0,0.7);
  color: rgba(255,255,255,0.8);
  font-size: 12px;
  border-radius: 8px;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: 10000;
}
body.fullscreen-mode #fullscreenHint.show {
  opacity: 1;
}

/* Play mode (iframe player) - hide all UI immediately via CSS */
body.play-mode #topNav,
body.play-mode #editorBar,
body.play-mode #editor,
body.play-mode #splitter,
body.play-mode #startOverlay,
body.play-mode #authLoading,
body.play-mode .panel,
body.play-mode .side-panel,
body.play-mode #hud {
  display: none !important;
}

body.play-mode {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

/* The start screen supplies the permanent full-bleed gradient below this
   player. Keep the embedded surface transparent around its 16:9 presentation
   so an intermediate iframe size can never expose black gutters. */
html.start-background-surface,
body.start-background-surface,
body.start-background-surface #app,
body.start-background-surface #viewportWrap,
body.start-background-surface #canvasContainer {
  background: transparent !important;
}

/* Unlike a standalone video player, the onboarding hero is the page itself.
   Force its presentation surface to the iframe viewport instead of allowing
   the generic 16:9 player rules to letterbox it. */
body.start-background-surface #canvasContainer,
body.start-background-surface #webgpuCanvas,
body.start-background-surface #editorOverlayCanvas,
body.start-background-surface #imageOverlayCanvas {
  width: 100vw !important;
  height: 100vh !important;
  max-width: none !important;
  max-height: none !important;
}

body.start-background-surface #imageOverlayCanvas {
  top: 0 !important;
  left: 0 !important;
  transform: none !important;
}

body.play-mode #app {
  width: 100%;
  height: 100%;
  position: relative;
}

body.play-mode #viewportWrap {
  flex: 1 !important;
  width: 100% !important;
  height: 100% !important;
  border: none !important;
  position: absolute !important;
  inset: 0 !important;
}

body.play-mode #canvasContainer {
  width: 100% !important;
  height: 100% !important;
  position: absolute !important;
  inset: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

body.play-mode #webgpuCanvas,
body.play-mode #imageOverlayCanvas {
  /* Don't force 100% - let resizeRenderer handle the aspect ratio */
  max-width: 100% !important;
  max-height: 100% !important;
}

body.play-mode #imageOverlayCanvas {
  /* The overlay is the complete presentation surface on iOS. Unlike the
     flex-positioned WebGL canvas it is absolutely positioned, so center it
     explicitly inside portrait and square player viewports. */
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
}

/* Play mode controls overlay */
.play-mode-controls {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  padding: 10px 16px;
  background: linear-gradient(rgba(255,255,255,.03), rgba(255,255,255,.03)), rgba(16,21,33,0.9);
  border: 1px solid var(--line);
  border-radius: 10px;
  opacity: 0;
  transition: opacity 0.3s;
  z-index: 1000;
}

body.play-mode:hover .play-mode-controls,
body.play-mode.paused .play-mode-controls {
  opacity: 1;
}

.play-mode-btn {
  padding: 6px 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  font-family: inherit;
}

.play-mode-btn:hover {
  background: rgba(255,255,255,0.05);
  color: var(--text);
}

/* Side Panels */
.side-panel {
  position: absolute;
  top: 0;
  bottom: 0;
  background: linear-gradient(180deg, rgba(12,14,20,0.98), rgba(8,10,14,0.98));
  border: none;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 40;
  min-width: 0;
}
#objectListPanel {
  left: 0;
  border-right: 1px solid var(--line);
}
#paramPanel {
  right: 0;
  border-left: 1px solid var(--line);
}
.panel-header {
  min-height: 46px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,0.02);
  font-size: 12px;
  font-weight: 650;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 1px;
  flex-shrink: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.panel-header-actions {
  display: flex;
  gap: 4px;
  align-items: center;
}
.parameter-search {
  position: relative;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  margin: 10px 10px 7px;
  min-height: 34px;
  border: 1px solid rgba(132, 170, 218, 0.16);
  border-radius: 7px;
  background: rgba(255,255,255,0.035);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.025);
  transition: border-color 140ms ease, background-color 140ms ease, box-shadow 140ms ease;
}
.parameter-search:focus-within {
  border-color: color-mix(in srgb, var(--accent) 52%, transparent);
  background: color-mix(in srgb, var(--accent) 6%, rgba(255,255,255,0.035));
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 9%, transparent);
}
.parameter-search-icon {
  flex: 0 0 auto;
  width: 15px;
  height: 15px;
  margin-left: 10px;
  fill: none;
  stroke: var(--muted);
  stroke-width: 1.7;
  stroke-linecap: round;
}
.parameter-search input[type="search"] {
  min-width: 0;
  width: 100%;
  height: 32px;
  padding: 0 8px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font: 500 11.5px/1 var(--mono, monospace);
  letter-spacing: 0.01em;
}
.parameter-search input[type="search"]::placeholder {
  color: color-mix(in srgb, var(--muted) 72%, transparent);
}
.parameter-search input[type="search"]::-webkit-search-cancel-button {
  appearance: none;
}
.parameter-search-clear {
  flex: 0 0 auto;
  width: 27px;
  height: 27px;
  margin-right: 3px;
  padding: 0;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--muted);
  font: 500 18px/1 sans-serif;
  cursor: pointer;
}
.parameter-search-clear:hover,
.parameter-search-clear:focus-visible {
  background: rgba(255,255,255,0.07);
  color: var(--text);
  outline: none;
}
.parameter-search-empty {
  flex: 0 0 auto;
  margin: 2px 10px 7px;
  padding: 12px 10px;
  border: 1px dashed rgba(255,255,255,0.1);
  border-radius: 6px;
  color: color-mix(in srgb, var(--muted) 78%, transparent);
  text-align: center;
  font: 500 10.5px/1.4 var(--mono, monospace);
}
.parameter-search-empty[hidden],
.parameter-search-clear[hidden] {
  display: none;
}
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
.btn-small {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 4px;
  min-height: 26px;
  padding: 4px 7px;
  cursor: pointer;
  color: var(--muted);
  transition: all 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font: 600 11px/1 var(--mono, monospace);
}
.btn-small .ui-icon {
  width: 14px;
  height: 14px;
}
.btn-small:hover {
  background: rgba(255,255,255,0.15);
  color: var(--text);
}
.btn-small.is-active,
.btn-small[aria-pressed="true"] {
  color: #d9ecff;
  border-color: rgba(120,180,255,0.42);
  background: rgba(80,140,205,0.24);
}
.btn-small:active {
  transform: scale(0.95);
}
.entity-identity.has-actions { grid-template-columns: 72px minmax(0, 1fr) auto; }
.entity-identity-select {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: 72px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  width: 100%;
  min-width: 0;
  min-height: 72px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background-color .14s ease, box-shadow .14s ease;
}
.entity-identity.is-selectable.has-actions > .entity-identity-select {
  grid-column: 1 / 3;
}
.entity-identity.is-compact .entity-identity-select {
  grid-template-columns: 56px minmax(0, 1fr);
  min-height: 56px;
}
.entity-identity-select:hover {
  background: rgba(255, 255, 255, .045);
}
.entity-identity-select:focus-visible {
  outline: none;
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--entity-identity-accent, rgb(var(--layer-component-rgb))) 78%, white);
}
.entity-identity-actions {
  align-self: end;
  display: flex;
  align-items: center;
  gap: 6px;
}
.entity-identity-action {
  --identity-action-color: var(--entity-identity-action-color, rgb(var(--layer-component-rgb)));
  min-height: 31px;
  padding: 0 11px;
  border: 1px solid color-mix(in srgb, var(--identity-action-color) 52%, transparent);
  border-radius: 6px;
  background: linear-gradient(135deg,
    color-mix(in srgb, var(--identity-action-color) 30%, transparent),
    color-mix(in srgb, var(--identity-action-color) 12%, transparent));
  color: color-mix(in srgb, var(--identity-action-color) 62%, white);
  font: 680 9px/1 var(--mono, monospace);
  letter-spacing: .03em;
  cursor: pointer;
}
.entity-identity-action:hover,
.entity-identity-action:focus-visible {
  border-color: color-mix(in srgb, var(--identity-action-color) 82%, transparent);
  background: linear-gradient(135deg,
    color-mix(in srgb, var(--identity-action-color) 46%, transparent),
    color-mix(in srgb, var(--identity-action-color) 22%, transparent));
  outline: none;
}
.entity-identity-icon-action,
.entity-identity-delete {
  width: 31px;
  min-width: 31px;
  padding: 0;
  display: grid;
  place-items: center;
}
.entity-identity-library-action {
  min-width: 58px;
}
.entity-identity-icon-action {
  color: color-mix(in srgb, var(--identity-action-color) 72%, white);
}
.entity-identity-icon-action.is-hidden {
  color: color-mix(in srgb, var(--identity-action-color) 52%, transparent);
  background: color-mix(in srgb, var(--identity-action-color) 8%, transparent);
}
.entity-identity-icon-action .ui-icon,
.entity-identity-delete .ui-icon {
  width: 14px;
  height: 14px;
}
.entity-identity-delete {
  color: color-mix(in srgb, var(--identity-action-color) 72%, white);
}
.entity-identity-delete:hover,
.entity-identity-delete:focus-visible {
  color: #fff;
  border-color: rgba(255, 111, 137, .9);
  background: rgba(174, 45, 68, .58);
}
@media (max-width: 480px) {
  .entity-identity.has-actions { grid-template-columns: 64px minmax(0, 1fr); }
  .entity-identity.has-actions .entity-identity-actions { grid-column: 1 / -1; width: 100%; }
  .entity-identity-actions .entity-identity-library-action { flex: 1; }
}
.panel-content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 10px;
}
.multi-clip-parameter-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  padding-bottom: 18px;
}
.multi-clip-parameter-card {
  position: relative;
  min-width: 0;
  overflow: clip;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 9px;
  background: rgba(255,255,255,.018);
  box-shadow: 0 8px 22px rgba(0,0,0,.12);
  transition: border-color 140ms ease, box-shadow 140ms ease, background-color 140ms ease;
}
.multi-clip-parameter-card.is-active {
  border-color: color-mix(in srgb, var(--accent) 64%, transparent);
  background: color-mix(in srgb, var(--accent) 3%, rgba(255,255,255,.018));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 12%, transparent), 0 10px 26px rgba(0,0,0,.18);
}
.multi-clip-parameter-card-header {
  position: sticky;
  top: -10px;
  z-index: 6;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 39px;
  padding: 7px 9px;
  border: 0;
  border-bottom: 1px solid rgba(255,255,255,.075);
  border-radius: 0;
  background: rgba(14,18,27,.97);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  backdrop-filter: blur(12px);
}
.multi-clip-parameter-card-header:hover,
.multi-clip-parameter-card-header:focus-visible {
  outline: 0;
  background: color-mix(in srgb, var(--accent) 9%, rgba(14,18,27,.97));
}
.multi-clip-parameter-card.is-active .multi-clip-parameter-card-header {
  background: color-mix(in srgb, var(--accent) 13%, rgba(14,18,27,.97));
}
.multi-clip-parameter-type {
  padding: 3px 5px;
  border: 1px solid rgba(255,255,255,.11);
  border-radius: 4px;
  background: rgba(255,255,255,.05);
  color: color-mix(in srgb, var(--accent) 72%, white);
  font: 650 8.5px/1 var(--mono, monospace);
  letter-spacing: .08em;
  text-transform: uppercase;
}
.multi-clip-parameter-title {
  min-width: 0;
  overflow: hidden;
  font: 650 11px/1.2 var(--mono, monospace);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.multi-clip-parameter-time {
  color: color-mix(in srgb, var(--muted) 78%, transparent);
  font: 500 9px/1 var(--mono, monospace);
  white-space: nowrap;
}
.multi-clip-parameter-card-body {
  padding: 7px;
}
.multi-clip-parameter-card-body > .param-group:last-child {
  margin-bottom: 0;
}
.multi-clip-parameter-card.param-search-card-title-match {
  border-color: color-mix(in srgb, var(--accent) 46%, transparent);
}
.multi-clip-selection-summary {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.multi-clip-selection-summary-header {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 10px;
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 8px;
  background: color-mix(in srgb, var(--accent) 5%, rgba(255,255,255,.025));
}
.multi-clip-selection-summary-header strong {
  color: var(--text);
  font: 650 11px/1.2 var(--mono, monospace);
}
.multi-clip-selection-summary-header span {
  color: var(--muted);
  font: 500 9px/1.35 var(--mono, monospace);
}
.multi-clip-selection-summary-list {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.multi-clip-selection-summary-item {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  min-height: 30px;
  padding: 5px 7px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  text-align: left;
  cursor: pointer;
}
.multi-clip-selection-summary-item:hover,
.multi-clip-selection-summary-item.is-active {
  border-color: color-mix(in srgb, var(--accent) 34%, transparent);
  background: color-mix(in srgb, var(--accent) 9%, transparent);
  color: var(--text);
}
.multi-clip-selection-summary-type {
  overflow: hidden;
  color: color-mix(in srgb, var(--accent) 68%, white);
  font: 650 8px/1 var(--mono, monospace);
  letter-spacing: .06em;
  text-overflow: ellipsis;
  text-transform: uppercase;
}
.multi-clip-selection-summary-name {
  overflow: hidden;
  font: 550 10px/1.2 var(--mono, monospace);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.panel-empty {
  padding: 30px 15px;
  text-align: center;
  color: rgba(255,255,255,0.25);
  font-size: 12px;
  line-height: 1.5;
}

/* Toast notifications */
.toast-container {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10000;
  pointer-events: none;
}
.toast {
  background: rgba(40, 40, 50, 0.95);
  color: #fff;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
  border: 1px solid rgba(255,255,255,0.1);
  animation: toastIn 0.3s ease-out, toastOut 0.3s ease-in 1.7s forwards;
  backdrop-filter: blur(10px);
}
@keyframes toastIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes toastOut {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(-10px); }
}

/* Object List Items */
.obj-item {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 8px 68px 8px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  color: var(--text);
  transition: all 0.15s;
  margin-bottom: 2px;
  border: 1px solid transparent;
  position: relative;
}
.obj-item:hover {
  background: rgba(255,255,255,0.06);
}
.obj-item.selected {
  background: rgba(120,180,255,0.12);
  border-color: rgba(120,180,255,0.35);
}
.obj-item .obj-visibility-btn {
  position: absolute;
  right: 35px;
  width: 24px;
  height: 24px;
  border-radius: 4px;
  padding: 4px;
  background: transparent;
  border: none;
  color: #8ab4f8;
  line-height: 1;
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 0.15s, background 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.obj-item:hover .obj-visibility-btn {
  opacity: 1;
}
.obj-item .obj-visibility-btn:hover {
  background: rgba(100,150,255,0.16);
}
.obj-item .obj-visibility-btn.is-hidden {
  color: #666;
  background: transparent;
}
.obj-item .obj-delete-btn {
  position: absolute;
  right: 6px;
  width: 24px;
  height: 24px;
  border-radius: 4px;
  background: rgba(255,80,80,0.2);
  border: none;
  color: #ff6060;
  padding: 4px;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s, background 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.obj-item:hover .obj-delete-btn {
  opacity: 1;
}
.obj-item .obj-delete-btn:hover {
  background: rgba(255,80,80,0.4);
  color: #fff;
}
/* Multi-select styling */
.obj-item.multi-selected {
  background: rgba(120,180,255,0.08);
  border-color: rgba(120,180,255,0.25);
}
.obj-item.multi-selected.selected {
  background: rgba(120,180,255,0.15);
  border-color: rgba(120,180,255,0.4);
}
/* Group items */
.obj-item.is-group {
  background: rgba(180,120,255,0.1);
  border-color: rgba(180,120,255,0.25);
}
.obj-item.is-group.selected {
  background: rgba(180,120,255,0.18);
  border-color: rgba(180,120,255,0.4);
}
.obj-item .group-badge {
  font-size: 8px;
  padding: 1px 4px;
  border-radius: 3px;
  background: rgba(180,120,255,0.3);
  color: #c8a0ff;
  margin-left: 4px;
}
/* Group folder styles */
.obj-group-folder {
  margin-bottom: 2px;
}
.obj-group-folder-header {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 8px 68px 8px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  color: var(--text);
  transition: all 0.15s;
  border: 1px solid rgba(180,120,255,0.25);
  background: rgba(180,120,255,0.08);
  position: relative;
}
.obj-group-folder-header:hover {
  background: rgba(180,120,255,0.15);
}
.obj-group-folder-header.selected {
  background: rgba(180,120,255,0.2);
  border-color: rgba(180,120,255,0.45);
}
.obj-group-folder-header .folder-toggle {
  font-size: 10px;
  color: rgba(180,120,255,0.7);
  width: 14px;
  text-align: center;
  transition: transform 0.2s;
}
.obj-group-folder.expanded .folder-toggle {
  transform: rotate(90deg);
}
.obj-group-folder-header .icon {
  font-size: 14px;
}
.obj-group-folder-header .name {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.obj-group-folder-header .group-count {
  font-size: 9px;
  padding: 2px 5px;
  border-radius: 8px;
  background: rgba(180,120,255,0.25);
  color: #c8a0ff;
}
.obj-group-folder-header .obj-visibility-btn {
  position: absolute;
  right: 35px;
  width: 24px;
  height: 24px;
  border-radius: 4px;
  padding: 4px;
  background: transparent;
  border: none;
  color: #c8a0ff;
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.obj-group-folder-header:hover .obj-visibility-btn {
  opacity: 1;
}
.obj-group-folder-header .obj-delete-btn {
  position: absolute;
  right: 6px;
  width: 24px;
  height: 24px;
  border-radius: 4px;
  background: rgba(255,80,80,0.2);
  border: none;
  color: #ff6060;
  padding: 4px;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.obj-group-folder-header:hover .obj-delete-btn {
  opacity: 1;
}
.obj-group-folder-contents {
  display: none;
  margin-left: 12px;
  padding-left: 8px;
  border-left: 1px solid rgba(180,120,255,0.2);
  margin-top: 2px;
}
.obj-group-folder.expanded .obj-group-folder-contents {
  display: block;
}
.obj-group-folder-contents .obj-item {
  padding-left: 8px;
  opacity: 0.9;
}
.obj-group-folder-contents .obj-item::before {
  display: none; /* Remove the └ symbol since we have the border */
}
/* Selection count badge */
.selection-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  background: rgba(120,180,255,0.1);
  border-radius: 6px;
  margin-bottom: 8px;
  font-size: 12px;
  color: var(--text-dim);
}
.selection-actions .count {
  color: #8ab4f8;
  font-weight: 500;
}
.selection-actions button {
  padding: 3px 8px;
  font-size: 11px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 4px;
  color: var(--text);
  cursor: pointer;
  transition: all 0.15s;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.selection-actions button .ui-icon {
  width: 14px;
  height: 14px;
}
.selection-actions button:hover {
  background: rgba(255,255,255,0.2);
}
.selection-actions button.danger {
  background: rgba(255,80,80,0.2);
  border-color: rgba(255,80,80,0.3);
  color: #ff8080;
}
.selection-actions button.danger:hover {
  background: rgba(255,80,80,0.35);
}
.obj-item .icon {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  opacity: 0.8;
  flex-shrink: 0;
}
.obj-item .name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
.obj-group {
  margin-bottom: 12px;
}
.obj-group-header {
  padding: 8px 10px 5px;
  font-size: 11px;
  font-weight: 650;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 1.05px;
}
.clip-replace-actions {
  display: grid;
  margin-top: 8px;
}
.clip-replace-actions .layer-component-add-button {
  border-color: rgba(var(--layer-component-rgb), .46);
  background: rgba(var(--layer-component-rgb), .1);
  color: color-mix(in srgb, rgb(var(--layer-component-rgb)) 62%, white);
}
.clip-replace-actions .layer-component-add-button:hover:not(:disabled) {
  border-color: rgba(var(--layer-component-rgb), .72);
  background: rgba(var(--layer-component-rgb), .18);
  color: #fff;
}
.clip-preset-name {
  overflow: hidden;
  padding: 7px 10px;
  color: var(--text);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.lut-refine-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 36px;
  margin-top: 8px;
  padding: 8px 12px;
  border: 1px solid rgba(var(--layer-component-rgb), .52);
  border-radius: 6px;
  background: linear-gradient(180deg,
    rgba(var(--layer-component-rgb), .3),
    rgba(var(--layer-component-rgb), .14)) #101a26;
  color: color-mix(in srgb, rgb(var(--layer-component-rgb)) 62%, white);
  font-size: 12px;
  cursor: pointer;
}
.lut-refine-button:hover,
.lut-refine-button:focus-visible {
  border-color: rgba(var(--layer-component-rgb), .78);
  background: linear-gradient(180deg,
    rgba(var(--layer-component-rgb), .42),
    rgba(var(--layer-component-rgb), .22)) #101a26;
  color: #f0f8ff;
  outline: none;
}
/* Parameter Controls */
.param-group {
  margin: 0 0 12px;
  padding: 0;
  border-bottom: 0;
}
.param-group:last-child {
  border-bottom: none;
  margin-bottom: 0;
}
.param-group-title {
  font-size: 12px;
  font-weight: 600;
  color: #bfd7eb;
  text-transform: none;
  letter-spacing: .01em;
  border: 1px solid #304760;
  border-radius: 7px;
  background: linear-gradient(110deg, #203a54, #1c2d40 58%, #18222f);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .035);
}
.param-disclosure-heading {
  display: flex;
  align-items: center;
  gap: 8px;
}
.param-disclosure-trigger {
  flex: 1;
  min-width: 0;
  appearance: none;
  width: 100%;
  min-height: 36px;
  margin: 0;
  padding: 8px 11px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
  color: inherit;
  text-transform: inherit;
  letter-spacing: inherit;
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  transition: color 120ms ease, background-color 120ms ease;
}
.param-section-actions {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-left: auto;
  padding-right: 8px;
}
.param-section-action {
  border: 1px solid rgba(126, 170, 230, 0.24);
  border-radius: 5px;
  background: rgba(76, 116, 174, 0.12);
  color: #a9c8f1;
  padding: 4px 7px;
  min-height: 25px;
  font: 600 10px/1 var(--mono, monospace);
  letter-spacing: .035em;
  cursor: pointer;
}
.param-section-action:hover,
.param-section-action:focus-visible {
  background: rgba(92, 148, 225, 0.22);
  border-color: rgba(126, 185, 255, 0.5);
  color: #d9ebff;
  outline: none;
}
.param-disclosure-trigger:hover {
  color: color-mix(in srgb, var(--accent) 78%, white);
  background: rgba(255,255,255,0.035);
}
.param-disclosure-trigger:focus-visible {
  outline: 1px solid color-mix(in srgb, var(--accent) 70%, transparent);
  outline-offset: -1px;
  background: color-mix(in srgb, var(--accent) 8%, transparent);
}
.param-disclosure-label {
  min-width: 0;
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 3px 6px;
}
.param-disclosure-chevron {
  flex: 0 0 auto;
  font-size: 17px;
  font-weight: 400;
  line-height: 1;
  color: var(--muted);
  transform: rotate(0deg);
  transition: transform 140ms ease, color 120ms ease;
}
.param-disclosure-trigger[aria-expanded="true"] .param-disclosure-chevron {
  color: var(--accent);
  transform: rotate(90deg);
}
.param-group-content {
  padding: 12px 3px 4px;
}
.param-group-content[hidden],
.param-subgroup-content[hidden] {
  display: none;
}
.param-subgroup {
  margin: 1px 0 5px;
  border: 1px solid rgba(255,255,255,0.045);
  border-radius: 5px;
  background: rgba(255,255,255,0.012);
}
.param-subgroup-title {
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .01em;
  text-transform: none;
  background: rgba(120, 180, 255, .045);
}
.param-subgroup > .param-disclosure-heading > .param-disclosure-trigger {
  min-height: 29px;
  padding: 6px 7px;
  color: var(--muted);
}
.param-subgroup > .param-disclosure-heading > .param-disclosure-trigger:hover,
.param-subgroup > .param-disclosure-heading > .param-disclosure-trigger:focus-visible {
  color: var(--text);
}
.param-subgroup-content {
  padding: 5px 8px 2px;
}
.param-group.is-open > .param-disclosure-heading > .param-disclosure-trigger {
  background: color-mix(in srgb, var(--accent) 5%, transparent);
}
#paramContent .param-group:not(.speed-ramp-timing):not([data-param-disclosure-ready="true"]) > :not(.param-group-title),
#paramContent .param-subgroup:not([data-param-disclosure-ready="true"]) > :not(.param-subgroup-title) {
  display: none;
}
#paramContent .param-search-hidden {
  display: none !important;
}
#paramContent.is-searching .param-search-forced-open > .param-group-content[hidden],
#paramContent.is-searching .param-search-forced-open > .param-subgroup-content[hidden] {
  display: block !important;
}
#paramContent.is-searching .param-search-title-match > .param-disclosure-heading .param-disclosure-label {
  color: color-mix(in srgb, var(--accent) 82%, white);
}
@media (prefers-reduced-motion: reduce) {
  .param-disclosure-trigger,
  .param-disclosure-chevron {
    transition: none;
  }
}
.param-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 10px;
}
.text-reveal-phase-toggles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.text-reveal-phase-toggles > .param-row {
  min-width: 0;
}
.curves-param-group .param-group-content {
  padding: 4px 5px 12px;
}
.curves-control {
  --curve-color: #f3f4f6;
  width: 100%;
  max-width: 224px;
  margin-inline: auto;
  min-width: 0;
  color: var(--text);
}
.curves-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 6px;
  margin-bottom: 6px;
}
.curves-channel-label {
  min-width: 0;
}
.curves-channel-select,
.curves-toolbar .btn {
  box-sizing: border-box;
  width: 100%;
  min-height: 28px;
  border: 1px solid color-mix(in srgb, var(--line) 80%, white 8%);
  border-radius: 5px;
  background: color-mix(in srgb, var(--panel) 88%, black);
  color: var(--text);
  font: 600 11px/1 var(--font);
}
.curves-channel-select {
  padding: 5px 26px 5px 9px;
}
.curves-toolbar .btn {
  width: auto;
  padding: 5px 9px;
}
.curves-toolbar .btn:hover,
.curves-toolbar .btn:focus-visible,
.curves-channel-select:focus-visible {
  border-color: color-mix(in srgb, var(--curve-color) 55%, var(--accent));
  outline: none;
}
.curves-graph-shell {
  min-width: 0;
}
.curves-graph {
  display: block;
  box-sizing: border-box;
  width: 100%;
  aspect-ratio: 1;
  overflow: visible;
  border: 1px solid rgba(0, 0, 0, .88);
  border-radius: 2px 2px 0 0;
  background: #24272d;
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,.06),
    0 4px 12px rgba(0,0,0,.18);
  cursor: crosshair;
  touch-action: none;
}
.curves-graph:focus-visible {
  outline: 1px solid var(--curve-color);
  outline-offset: 2px;
}
.curves-histogram {
  fill: rgba(225, 229, 235, .34);
  stroke: none;
  pointer-events: none;
}
.curves-grid path {
  fill: none;
  stroke: rgba(8, 10, 14, .42);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
  pointer-events: none;
}
.curves-grid .curves-diagonal {
  stroke: rgba(224, 229, 237, .22);
  stroke-dasharray: 3 3;
}
.curves-master-overlay,
.curves-line {
  fill: none;
  vector-effect: non-scaling-stroke;
  pointer-events: none;
}
.curves-master-overlay {
  stroke: rgba(245, 247, 250, .42);
  stroke-width: 1;
}
.curves-line {
  stroke: var(--curve-color);
  stroke-width: 1.8;
  filter: drop-shadow(0 0 2px rgba(0,0,0,.72));
}
.curves-point {
  fill: #24272d;
  stroke: var(--curve-color);
  stroke-width: 1.7;
  vector-effect: non-scaling-stroke;
  cursor: grab;
}
.curves-point:hover,
.curves-point.is-selected {
  fill: var(--curve-color);
  stroke: #fff;
}
.curves-point:active {
  cursor: grabbing;
}
.curves-ramp {
  height: 10px;
  border: 1px solid rgba(0,0,0,.88);
  border-top: 0;
  border-radius: 0 0 2px 2px;
  background: linear-gradient(90deg, #050505, #fff);
}
.curves-readout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-top: 6px;
}
.curves-readout label {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 6px;
  min-width: 0;
  color: var(--muted);
  font-size: 10.5px;
}
.curves-readout input {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  height: 25px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: color-mix(in srgb, var(--panel) 86%, black);
  color: var(--text);
  font: 600 11px/1 var(--mono, monospace);
  text-align: right;
}
.curves-readout input:focus {
  border-color: var(--curve-color);
  outline: none;
}
.curves-readout input:disabled {
  opacity: .62;
}
.curves-help {
  margin: 5px 1px 0;
  color: var(--muted);
  font-size: 9.5px;
  line-height: 1.4;
}
.param-group.is-inherited-transform > .param-group-title,
.param-group.is-inherited-transform .param-row {
  opacity: .42;
}
.param-group.is-inherited-transform .param-row input,
.param-group.is-inherited-transform .param-row select,
.param-group.is-inherited-transform .param-row button {
  cursor: not-allowed;
}
.inherited-transform-notice {
  margin-bottom: 12px;
}
.param-label {
  font-size: 11.5px;
  color: var(--muted);
  font-weight: 500;
}
.param-value {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.camera-dof-range {
  display: block;
  color: color-mix(in srgb, var(--accent) 72%, white);
  font-size: 13px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  letter-spacing: .02em;
}
.camera-dof-preset {
  width: 100%;
}
.camera-dof-guide {
  --dof-near: 42%;
  --dof-far: 58%;
  margin: 5px 0 12px;
  padding: 11px;
  border: 1px solid color-mix(in srgb, var(--accent) 22%, var(--line));
  border-radius: 9px;
  background:
    radial-gradient(circle at 50% 0%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 65%),
    color-mix(in srgb, var(--panel) 88%, black);
}
.camera-dof-guide-summary {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 9px;
}
.camera-dof-guide-summary > span {
  color: var(--muted);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.camera-dof-depth-map {
  position: relative;
  height: 34px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--accent) 18%, var(--line));
  border-radius: 7px;
  background: linear-gradient(90deg,
    rgba(73, 94, 139, .15) 0%,
    rgba(75, 112, 180, .5) var(--dof-near),
    rgba(109, 221, 231, .82) var(--dof-near),
    rgba(145, 242, 202, .82) var(--dof-far),
    rgba(75, 112, 180, .5) var(--dof-far),
    rgba(73, 94, 139, .15) 100%);
  box-shadow: inset 0 1px rgba(255, 255, 255, .06);
}
.camera-dof-camera {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 6px;
  padding: 2px 4px;
  border: 1px solid rgba(184, 204, 236, .25);
  border-radius: 3px;
  background: rgba(4, 9, 18, .72);
  color: rgba(205, 219, 240, .62);
  font-size: 7px;
  letter-spacing: .09em;
  transform: translateY(-50%);
}
.camera-dof-marker {
  position: absolute;
  z-index: 1;
  top: 0;
  bottom: 0;
  width: 1px;
  background: rgba(227, 246, 255, .62);
  transform: translateX(-50%);
  transition: left 120ms ease;
}
.camera-dof-marker.is-near { left: var(--dof-near); }
.camera-dof-marker.is-focus {
  left: 50%;
  width: 2px;
  background: #fff;
  box-shadow: 0 0 8px color-mix(in srgb, var(--accent) 75%, white);
}
.camera-dof-marker.is-focus::after {
  position: absolute;
  top: 3px;
  left: 50%;
  width: 6px;
  height: 6px;
  border: 1px solid white;
  background: color-mix(in srgb, var(--accent) 74%, #dff);
  content: '';
  transform: translateX(-50%) rotate(45deg);
}
.camera-dof-marker.is-far { left: var(--dof-far); }
.camera-dof-guide.is-infinite .camera-dof-marker.is-far::after {
  position: absolute;
  right: 4px;
  bottom: 2px;
  color: rgba(230, 247, 255, .82);
  content: '→';
  font-size: 12px;
  transform: translateX(-100%);
}
.camera-dof-depth-labels {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
  margin-top: 7px;
  color: var(--muted);
  font-size: 8.5px;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.camera-dof-depth-labels span:nth-child(2) { text-align: center; }
.camera-dof-depth-labels span:last-child { text-align: right; }
.camera-dof-depth-labels b {
  display: block;
  margin-top: 2px;
  overflow: hidden;
  color: var(--text);
  font-size: 9.5px;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  letter-spacing: 0;
  text-overflow: ellipsis;
  text-transform: none;
  white-space: nowrap;
}
.camera-dof-guide-note {
  min-height: 14px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 9.5px;
  line-height: 1.4;
}
/* Cinematic DoF uses the inspector's native disclosure and slider controls. */
.camera-dof-panel { --dof-foreground: #89b9ee; --dof-background: #90d5c5; }
.camera-dof-toggle { text-transform: none; letter-spacing: 0; font-size: 10px; white-space: nowrap; }
.camera-dof-focus { padding: 5px 2px 13px; }
.camera-dof-focus-heading, .camera-dof-chart-caption, .camera-dof-tracking,
.camera-dof-depth-preset { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.camera-dof-focus-heading { margin: 0 0 9px; font-size: 11px; font-weight: 600; color: var(--text); }
.camera-dof-mode { font-size: 9px; font-weight: 500; color: var(--muted); }
.camera-dof-focus-source { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.camera-dof-focus-source select { flex: 1 1 130px; min-width: 0; max-width: 100%; width: auto; }
.camera-dof-panel .camera-dof-pick { flex: 0 0 auto; min-height: 29px; padding: 5px 9px; font-family: inherit; font-weight: 500; font-size: 10px; line-height: 1.2; border-radius: 6px; }
.camera-dof-pick.active { color: var(--text); border-color: var(--accent); background: color-mix(in srgb, var(--accent) 20%, var(--panel)); }
.camera-dof-tracking { margin: 8px 0 12px; font-size: 10px; color: var(--muted); }
.camera-dof-tracking output { color: var(--accent); font-variant-numeric: tabular-nums; white-space: nowrap; }
.camera-dof-panel [hidden] { display: none !important; }
.camera-dof-panel .camera-dof-guide { margin: 4px 0 8px; padding: 12px; border-radius: 9px; }
.camera-dof-panel .camera-dof-guide-summary { flex-wrap: wrap; gap: 3px 8px; }
.camera-dof-panel .camera-dof-depth-map { height: 40px; }
.camera-dof-panel .camera-dof-depth-labels { font-size: 9px; }
.camera-dof-panel .camera-dof-depth-labels b { font-size: 11px; }
.camera-dof-panel .camera-dof-guide-note { font-size: 9px; margin-top: 9px; }
.camera-dof-depth-preset select { width: auto; min-width: 0; flex: 1; max-width: 240px; font-size: 10px; }
.camera-dof-depth-preset > span { font-size: 9px; color: var(--muted); }
.camera-dof-section { margin: 0 0 7px; border-radius: 7px; }
.camera-dof-panel .param-subgroup-content { padding: 7px 10px 5px; }
.camera-dof-panel .param-row { margin-bottom: 11px; }
.camera-dof-panel .param-label { font-size: 10px; }
.camera-dof-panel .slider-min, .camera-dof-panel .slider-max { width: 42px; font-size: 10px; }
.camera-dof-panel .camera-dof-hint { margin: 0 0 11px; font-size: 9px; line-height: 1.6; color: var(--muted); text-wrap: pretty; }
.camera-dof-lens-readout { display: flex; gap: 10px; align-items: center; margin: 0 0 14px; }
.camera-dof-lens-readout > svg { width: 43px; height: 43px; flex: 0 0 auto; fill: none; stroke: color-mix(in srgb, var(--accent) 26%, var(--line)); stroke-width: 1; }
.camera-dof-lens-readout .camera-dof-aperture { fill: color-mix(in srgb, var(--accent) 26%, transparent); stroke: var(--accent); }
.camera-dof-lens-readout output { display: block; color: var(--text); font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.camera-dof-lens-readout span { display: block; margin-top: 4px; font-size: 9px; line-height: 1.4; color: var(--muted); }
.camera-dof-falloff { margin: 0 0 13px; padding: 10px 11px 8px; border: 1px solid var(--line); border-radius: 7px; background: color-mix(in srgb, var(--panel) 80%, black); }
.camera-dof-chart-caption { font-size: 9px; color: var(--muted); margin-bottom: 5px; font-variant-numeric: tabular-nums; }
.camera-dof-falloff svg { display: block; width: 100%; height: 66px; overflow: visible; }
.camera-dof-chart-grid { fill: none; stroke: var(--line); stroke-width: 1; stroke-dasharray: 2 4; vector-effect: non-scaling-stroke; }
.camera-dof-chart-line { fill: none; stroke-width: 1.7; vector-effect: non-scaling-stroke; }
.camera-dof-chart-line.is-near { stroke: var(--dof-foreground); }
.camera-dof-chart-line.is-far { stroke: var(--dof-background); }
.camera-dof-chart-fill.is-near { fill: var(--dof-foreground); opacity: .12; }
.camera-dof-chart-fill.is-far { fill: var(--dof-background); opacity: .12; }
.camera-dof-chart-focus { fill: var(--text); }
.camera-dof-chart-axis { display: grid; grid-template-columns: 1fr 1fr 1fr; color: var(--muted); font-size: 8px; margin-top: 3px; font-variant-numeric: tabular-nums; }
.camera-dof-chart-axis span:nth-child(2) { text-align: center; color: var(--text); }
.camera-dof-chart-axis span:last-child { text-align: right; }
.camera-dof-panel[data-enabled="false"] .camera-dof-depth-map,
.camera-dof-panel[data-enabled="false"] .camera-dof-falloff svg { opacity: .45; }
.camera-dof-panel[data-enabled="false"] .camera-dof-mode::after { content: ' · DoF off'; }
@media (prefers-reduced-motion: reduce) {
  .camera-dof-marker { transition: none; }
}
.param-value input[type="range"] {
  flex: 1;
  height: 4px;
  min-width: 40px;
}

/* Custom font dropdown */
.font-dropdown {
  position: relative;
  width: 100%;
}
.font-dropdown-selected {
  padding: 6px 10px;
  background: #1a1d24;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 4px;
  color: #e0e0e0;
  font-size: 12px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.font-dropdown-selected:hover {
  border-color: rgba(255,255,255,0.4);
}
.font-dropdown-selected::after {
  content: '▼';
  font-size: 8px;
  opacity: 0.6;
}
.font-dropdown.open .font-dropdown-selected::after {
  content: '▲';
}
.font-dropdown-list {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  max-height: 320px;
  overflow-y: auto;
  background: #1a1d24;
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 4px;
  margin-top: 2px;
  z-index: 1000;
  box-shadow: 0 4px 12px rgba(0,0,0,0.5);
}
.font-dropdown.open .font-dropdown-list {
  display: block;
}
.font-dropdown-item {
  padding: 8px 10px;
  cursor: pointer;
  font-size: 14px;
}
.font-dropdown-item:hover {
  background: rgba(255,255,255,0.1);
}
.font-dropdown-item.selected {
  background: var(--accent);
  color: white;
}
.font-dropdown-group {
  position: sticky;
  top: 0;
  padding: 7px 10px 5px;
  background: rgba(15, 19, 32, .96);
  color: var(--muted);
  font: 700 9px/1.2 var(--mono, ui-monospace, monospace);
  letter-spacing: .12em;
  text-transform: uppercase;
  pointer-events: none;
}

/* Custom slider with value thumb */
.slider-wrapper {
  position: relative;
  flex: 1;
  min-width: 40px;
  height: 20px;
  display: flex;
  align-items: center;
}
.slider-wrapper input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 3px;
  background: rgba(255,255,255,0.15);
  border-radius: 2px;
  outline: none;
  margin: 0;
}
.slider-wrapper input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 32px;
  height: 16px;
  background: transparent;
  cursor: pointer;
  border: none;
}
.slider-wrapper input[type="range"]::-moz-range-thumb {
  width: 32px;
  height: 16px;
  background: transparent;
  cursor: pointer;
  border: none;
}
.slider-wrapper input[type="range"]::-webkit-slider-runnable-track {
  height: 3px;
  background: rgba(255,255,255,0.15);
  border-radius: 2px;
}
.slider-wrapper input[type="range"]::-moz-range-track {
  height: 3px;
  background: rgba(255,255,255,0.15);
  border-radius: 2px;
}
.slider-thumb-value {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  background: rgba(80,140,200,0.9);
  color: #fff;
  font-size: 9px;
  font-weight: 600;
  padding: 2px 4px;
  border-radius: 3px;
  pointer-events: none;
  white-space: nowrap;
  min-width: 24px;
  text-align: center;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
  z-index: 1;
}
.slider-wrapper:hover .slider-thumb-value {
  background: rgba(100,160,220,1);
}
.slider-wrapper input[data-parameter-slider="true"] { touch-action: none; cursor: ew-resize; }
.slider-thumb-value[data-overflow="above"]::after { content: ' ›'; }
.slider-thumb-value[data-overflow="below"]::before { content: '‹ '; }
.slider-wrapper input[type="range"]:focus + .slider-thumb-value {
  background: rgba(120,180,255,1);
}

/* Grayed out sliders when keyframes exist */
.slider-wrapper.has-keyframes {
  opacity: 0.5;
  pointer-events: none;
}
input[type="range"].has-keyframes {
  opacity: 0.5;
  pointer-events: none;
}

.param-value input[type="number"] {
  width: 42px;
  min-width: 38px;
  padding: 4px 4px;
  font-size: 10.5px;
  border-radius: 4px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.05);
  color: var(--text);
  text-align: center;
  flex-shrink: 0;
}
.param-value input[type="number"]:focus {
  background: rgba(255,255,255,0.1);
  border-color: var(--accent);
  outline: none;
}
.param-value input[type="color"] {
  width: 32px;
  height: 24px;
  padding: 2px;
  border: 1px solid var(--line);
  border-radius: 5px;
  cursor: pointer;
  background: transparent;
}
.param-value input[type="checkbox"] {
  appearance: none;
  width: 36px !important;
  height: 20px !important;
  flex: 0 0 36px;
  margin: 0;
  padding: 2px;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease;
}
.param-value input[type="checkbox"]::before {
  content: '';
  display: block;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--muted);
  transition: transform 120ms ease, background 120ms ease;
}
.param-value input[type="checkbox"]:checked {
  border-color: color-mix(in srgb, var(--accent) 68%, white);
  background: color-mix(in srgb, var(--accent) 32%, transparent);
}
.param-value input[type="checkbox"]:checked::before {
  transform: translateX(16px);
  background: #d9ecff;
}
.param-value input[type="checkbox"]:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: 2px;
}
.param-value label:has(input[type="checkbox"]) {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 22px;
  cursor: pointer;
}
.param-value label > input[type="checkbox"] + span {
  color: color-mix(in srgb, var(--muted) 78%, transparent) !important;
  font: 550 10px/1.1 var(--mono, monospace) !important;
  letter-spacing: 0.035em;
  text-transform: none;
  user-select: none;
}
.param-value label:has(input[type="checkbox"]:checked) > span {
  color: color-mix(in srgb, var(--accent) 70%, var(--text)) !important;
}
.slider-min, .slider-max {
  color: var(--muted) !important;
}
.slider-min:focus, .slider-max:focus {
  color: var(--text) !important;
}
.param-value .keyframe-toggle {
  margin-left: 2px;
}
.param-select {
  flex: 1;
  padding: 4px 8px;
  font-size: 11.5px;
  background: #1a1d24;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 4px;
  color: var(--text);
  cursor: pointer;
  min-width: 100px;
}
.param-select:hover {
  border-color: rgba(255,255,255,0.35);
}
.param-select:focus {
  outline: none;
  border-color: var(--accent, #4a9eff);
}
.param-select option {
  background: #1a1d24;
  color: #e0e0e0;
}
.hemisphere-light-asset-row .param-value,
.hemisphere-light-asset {
  width: 100%;
}
.hemisphere-light-asset {
  overflow: hidden;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hemisphere-light-source-help {
  margin: -2px 0 12px;
  padding: 8px 10px;
  border: 1px solid color-mix(in srgb, var(--accent) 20%, var(--line));
  border-radius: 7px;
  background: color-mix(in srgb, var(--accent) 5%, transparent);
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.45;
}
.param-value input[type="color"][disabled] {
  cursor: default;
  filter: saturate(.8);
  opacity: .62;
}
.param-xyz {
  display: flex;
  gap: 3px;
  flex-wrap: wrap;
}

/* Texture select styles */
.texture-select {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  min-width: 0;
}
.texture-name {
  flex: 1;
  font-size: 11px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 4px 8px;
  background: rgba(255,255,255,0.05);
  border-radius: 4px;
  border: 1px solid var(--line);
}
.texture-name.has-texture {
  color: var(--text);
  background: rgba(255,255,255,0.08);
}
.texture-type-icon {
  width: 20px;
  height: 20px;
  margin-right: 7px;
  border-radius: 5px;
  object-fit: cover;
  vertical-align: middle;
}
.texture-btn {
  padding: 4px 8px !important;
  font-size: 12px !important;
  min-width: auto !important;
  height: auto !important;
}
.texture-btn img {
  width: 22px;
  height: 22px;
  border-radius: 5px;
  object-fit: cover;
}
.texture-clear-btn {
  width: 27px !important;
  min-width: 27px !important;
  height: 27px !important;
  padding: 5px !important;
  color: #ff6666 !important;
}
.texture-clear-btn:hover {
  background: rgba(255,100,100,0.2) !important;
}

/* Select dropdown styling */
.param-preset-stepper {
  display: flex;
  align-items: center;
  gap: 4px;
  max-width: 100%;
  min-width: 0;
}
.param-preset-stepper select { flex: 1; min-width: 0 !important; }
.param-preset-stepper > button {
  flex: 0 0 28px;
  height: 28px;
  padding: 0;
  font-size: 20px;
  line-height: 1;
}
.param-preset-stepper > button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.param-value select {
  padding: 4px 8px;
  font-size: 11.5px;
  border-radius: 4px;
  border: 1px solid rgba(255,255,255,0.2);
  background: #1a1d24;
  color: var(--text);
  cursor: pointer;
  min-width: 80px;
}
.param-value select:hover {
  border-color: rgba(255,255,255,0.35);
}
.param-value select:focus {
  border-color: var(--accent);
  outline: none;
}
.param-value select option {
  background: #1a1d24;
  color: #e0e0e0;
}

.param-xyz input {
  width: 42px !important;
  min-width: 38px !important;
}
.param-xyz-label {
  font-size: 10px;
  color: var(--muted);
  width: 10px;
  text-align: center;
}

/* XYZ Slider Layout */
.param-xyz-sliders {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
}
.xyz-slider-row {
  display: flex;
  align-items: center;
  gap: 4px;
}
.xyz-axis {
  font-size: 10px;
  font-weight: 600;
  color: var(--muted);
  width: 14px;
  text-align: center;
  flex-shrink: 0;
}
.xyz-slider-row input[type="range"] {
  flex: 1;
  min-width: 40px;
  height: 4px;
}
.xyz-slider-row .slider-wrapper {
  flex: 1;
  min-width: 40px;
}
.xyz-min, .xyz-max {
  width: 36px !important;
  min-width: 32px !important;
  padding: 3px 4px !important;
  font-size: 10px !important;
  text-align: center;
  border-radius: 4px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.03);
  color: var(--muted);
  flex-shrink: 0;
}
.xyz-min:focus, .xyz-max:focus {
  background: rgba(255,255,255,0.08);
  color: var(--text);
  outline: none;
  border-color: var(--accent);
}

/* Scale Lock Toggle */
.param-scale-container {
  width: 100%;
}
.scale-lock-row {
  margin-bottom: 8px;
}
.scale-lock-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--muted);
  cursor: pointer;
}
.scale-lock-label input[type="checkbox"] {
  appearance: none;
  width: 36px;
  height: 20px;
  margin: 0;
  padding: 2px;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  cursor: pointer;
}
.scale-lock-label input[type="checkbox"]::before {
  content: '';
  display: block;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--muted);
  transition: transform 120ms ease, background 120ms ease;
}
.scale-lock-label input[type="checkbox"]:checked {
  border-color: color-mix(in srgb, var(--accent) 68%, white);
  background: color-mix(in srgb, var(--accent) 32%, transparent);
}
.scale-lock-label input[type="checkbox"]:checked::before {
  transform: translateX(16px);
  background: #d9ecff;
}
.scale-lock-label span {
  user-select: none;
  color: color-mix(in srgb, var(--muted) 78%, transparent);
  font-size: 10px;
  font-weight: 550;
  letter-spacing: 0.035em;
}
.scale-lock-label:has(input:checked) span {
  color: var(--accent);
}

/* Hide panels in fullscreen */
body.fullscreen-mode .side-panel {
  display: none !important;
}

.physics-vector-action {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  align-items: center;
  gap: 6px;
  width: 100%;
  min-width: 0;
}

.physics-vector-action input[type="number"] {
  box-sizing: border-box;
  min-width: 0;
  width: 100%;
  height: 26px;
}

.physics-vector-action .physics-vector-action-button {
  min-width: 38px;
  white-space: nowrap;
}

.viewport-object-context-menu {
  position: fixed;
  z-index: 10030;
  width: 252px;
  padding: 7px;
  border: 1px solid rgba(126, 174, 229, .32);
  border-radius: 11px;
  background: rgba(12, 17, 26, .98);
  box-shadow: 0 20px 56px rgba(0, 0, 0, .62), inset 0 1px 0 rgba(255, 255, 255, .04);
  backdrop-filter: blur(18px);
  color: rgba(235, 241, 250, .92);
  font-family: var(--mono, ui-monospace, SFMono-Regular, Menlo, monospace);
}

.viewport-object-context-heading {
  display: grid;
  gap: 4px;
  padding: 8px 10px 11px;
  overflow: hidden;
}

.viewport-object-context-heading strong,
.viewport-object-context-heading span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.viewport-object-context-heading strong {
  color: rgba(153, 201, 255, .96);
  font-size: 12px;
  letter-spacing: .025em;
}

.viewport-object-context-heading span {
  color: rgba(182, 195, 214, .56);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.viewport-object-context-action {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 35px;
  padding: 0 10px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: rgba(235, 241, 250, .9);
  font: 600 12px/1 var(--mono, ui-monospace, SFMono-Regular, Menlo, monospace);
  text-align: left;
  cursor: pointer;
}

.viewport-object-context-action:hover,
.viewport-object-context-action:focus-visible {
  outline: 0;
  background: rgba(103, 164, 235, .16);
}

.viewport-object-context-action.is-danger {
  color: rgba(255, 155, 166, .9);
}

.viewport-object-context-controls {
  display: grid;
  gap: 7px;
  margin: 6px 4px 4px;
  padding: 9px;
  border: 1px solid rgba(255, 255, 255, .07);
  border-radius: 8px;
  background: rgba(255, 255, 255, .025);
}

.viewport-object-context-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 112px;
  align-items: center;
  gap: 10px;
  color: rgba(182, 195, 214, .72);
  font-size: 10px;
  font-weight: 700;
}

.viewport-object-context-control select {
  width: 100%;
  min-width: 0;
  height: 29px;
  padding: 0 25px 0 8px;
  border: 1px solid rgba(126, 174, 229, .24);
  border-radius: 6px;
  background: rgba(5, 10, 17, .86);
  color: rgba(235, 241, 250, .9);
  font: 600 10px/1 var(--mono, ui-monospace, SFMono-Regular, Menlo, monospace);
}

.viewport-object-context-control select:focus-visible {
  outline: 1px solid rgba(103, 164, 235, .75);
  outline-offset: 1px;
}

.viewport-object-context-divider {
  height: 1px;
  margin: 6px;
  background: rgba(255, 255, 255, .08);
}

/* Match timeline-row-window.js: virtual scene heights include their border. */
#dynamicTracks { overflow-anchor: none; }
.trackRow.scene-child-row[data-timeline-virtual-row] {
  box-sizing: border-box;
  height: 62px;
}
.trackRow.scene-child-row[data-timeline-virtual-row].minimized { height: 24px; }
.timeline-row-spacer { flex: none; pointer-events: none; }

/* Only covers the viewport; the inspector and transport remain available. */
.first-frame-loading { position:absolute; inset:0; z-index:30; background:#141923; display:grid; place-items:center; pointer-events:none; }
.first-frame-loading[hidden], .first-frame-loading img[hidden] { display:none; }
.first-frame-loading img { width:100%; height:100%; object-fit:contain; opacity:.55; }
.first-frame-loading-caption { position:absolute; left:20px; right:20px; bottom:20px; width:fit-content; max-width:calc(100% - 40px); padding:8px 16px 12px; border:1px solid #ffffff22; border-radius:10px; background:#111722eb; color:#ecf2fa; }
.first-frame-loading-caption span { color:#aebbd0; font-size:10px; text-transform:uppercase; letter-spacing:.12em; }
.first-frame-loading-caption p { margin:5px 0 0; font-size:13px; line-height:1.4; }
.first-frame-loading-progress { height:4px; min-width:180px; margin-top:12px; overflow:hidden; border-radius:4px; background:#aebbd026; }
.first-frame-loading-progress > div { width:35%; height:100%; border-radius:inherit; background:#aebbd0; animation:first-frame-loading-sweep 1.5s ease-in-out infinite; }
.first-frame-loading-caption .first-frame-loading-detail { margin-top:7px; color:#aebbd0; font-size:11px; }
.first-frame-loading-detail:empty, .first-frame-loading-progress[hidden] { display:none; }
.first-frame-loading[data-state="presenting"] .first-frame-loading-progress > div { width:100%; animation:none; }
@keyframes first-frame-loading-sweep { from { transform:translateX(-110%); } to { transform:translateX(390%); } }
@media (prefers-reduced-motion:reduce) { .first-frame-loading-progress > div { animation:none; width:100%; opacity:.6; } }
/* Native scene effects share Post FX authoring but have a fixed render stage. */
.scene-effect-badge {
  display: inline-block;
  padding: 2px 7px;
  border: 1px solid currentColor;
  border-radius: 5px;
  font-size: 10px;
  opacity: .8;
}
.motion-blur-scope {
  margin: 8px 0 12px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}
.motion-blur-scope p { margin: 8px 0; }
.motion-blur-help {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

/* Fullscreen authoring panels float over the same camera composition. */
.fullscreen-project-breadcrumbs.layer-breadcrumbs, .fullscreen-project-root { display: none; }
body.fullscreen-authoring .fullscreen-project-breadcrumbs:not([hidden]) {
  display: flex; flex: 0 0 32px; height:32px; box-sizing:border-box; margin: 0; padding: 6px 12px;
  border-bottom: 1px solid var(--line); gap: 3px;
  min-width:0; max-width:100%; overflow-x:auto; overflow-y:hidden; scrollbar-width:none;
}
body.fullscreen-authoring #objectListContent .layer-breadcrumbs { display:none; }
.fullscreen-project-breadcrumbs::-webkit-scrollbar { display:none; }
.fullscreen-project-breadcrumbs > * { flex:0 0 auto; white-space:nowrap; }
body.fullscreen-authoring .fullscreen-project-breadcrumbs[hidden] { display: none; }
.fullscreen-project-breadcrumbs button { max-width:160px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.fullscreen-project-breadcrumbs button:hover { background: #ffffff0d; color: var(--text); }
body.fullscreen-authoring .fullscreen-project-root:not([hidden]) { display: block; }
body.fullscreen-authoring #objectListPanel.fullscreen-project-browsing #objectListContent { display: none; }
body.fullscreen-authoring #objectListPanel.fullscreen-project-browsing > .layer-panel-header:not(.fullscreen-project-search-header),
body.fullscreen-authoring #objectListPanel.fullscreen-project-browsing > .layer-search-empty { display: none; }
.fullscreen-project-scope-heading { display: flex; align-items: center; gap: 8px; justify-content: space-between; }
body.fullscreen-authoring #objectListPanel > .layer-panel-header > strong { display:none; }
/* The identity subtitle already names the type; retain only navigable folder paths. */
#objectListContent .layer-breadcrumbs:has(> :only-child) { display:none; }
.fullscreen-project-identity { margin-bottom:12px; }
.fullscreen-project-group:first-child { margin-top:0; }
.fullscreen-project-group:first-child > .fullscreen-project-layer:first-child { margin-top:0; }
.fullscreen-project-settings { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 28px; width: 28px; height: 28px; padding: 5px; }
.fullscreen-project-settings[hidden] { display: none; }
.fullscreen-project-group { margin-top: 16px; }
.fullscreen-project-footer { margin-top: 12px; }
.fullscreen-project-scope-heading { margin-bottom: 7px; }
.fullscreen-project-scope-heading h3 { margin: 0; color: var(--muted); font-size: 11px; font-weight: 600; }
.fullscreen-project-scope-heading button { font-size: 10px; }
.fullscreen-project-layer {
  display: flex; align-items: center; gap: 2px; width: 100%; min-height: 48px; margin: 5px 0 0;
  box-sizing: border-box; border: 1px solid var(--line); border-radius: 8px; background: #ffffff04; color: var(--text);
}
.fullscreen-project-layer:hover { background: #ffffff0b; border-color: #ffffff30; }
.fullscreen-project-layer:has(.fullscreen-project-layer-select[aria-pressed="true"]) { border-color: var(--clip-color, var(--accent)); }
.fullscreen-project-layer-select { display:flex; align-items:center; gap:9px; flex:1; min-width:0; min-height:48px; align-self:stretch; padding:8px 10px; border:0; border-radius:7px; background:transparent; color:inherit; font:inherit; text-align:left; cursor:pointer; }
.fullscreen-project-layer-actions { display:flex; flex:0 0 auto; gap:2px; padding-right:6px; }
.fullscreen-project-layer-actions .clip-layer-action { width:28px; height:30px; }
.fullscreen-project-layer.is-hidden-layer .fullscreen-project-layer-icon { opacity: .5; }
.fullscreen-project-layer-icon { display: flex; flex: 0 0 24px; color: var(--clip-color, var(--muted)); }
.fullscreen-project-layer-icon .ui-icon { width: 24px; height: 24px; }
.fullscreen-project-layer-copy { display: flex; flex: 1; min-width: 0; flex-direction: column; gap: 3px; }
.fullscreen-project-layer-copy strong { font-size: 12px; font-weight: 600; overflow-wrap: anywhere; }
.fullscreen-project-layer-copy small { font-size: 10px; color: var(--muted); }
.fullscreen-project-layer[hidden], .fullscreen-project-group[hidden] { display: none; }
.fullscreen-project-error { color: var(--bad); font-size: 11px; }
.fullscreen-project-root :focus-visible, .fullscreen-project-breadcrumbs :focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
body.fullscreen-authoring.fullscreen-layers #objectListPanel,
body.fullscreen-authoring.fullscreen-parameters #paramPanel {
  display: flex !important;
  top: var(--fullscreen-panel-top, var(--fullscreen-panel-default-top, 16px));
  bottom: auto;
  height: auto;
  max-height: calc(100% - var(--fullscreen-panel-top, var(--fullscreen-panel-default-top, 16px)) - var(--fullscreen-panel-bottom-inset, var(--fullscreen-panel-default-bottom, 16px)));
  box-sizing: border-box;
  width: min(360px, 38vw) !important;
  border: 1px solid var(--viewport-widget-border);
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, .35);
}
body.fullscreen-authoring .side-panel > .panel-content {
  flex: 0 1 auto;
  min-height: 0;
}
/* Keep viewport tools together in the clear space between fullscreen panels. */
body.fullscreen-authoring .viewport-display-toolbar {
  left: 50%;
  transform: translateX(-50%);
}
body.fullscreen-authoring #canvasContainer:has(.object-transform-toolbar:not([hidden])) .viewport-display-toolbar {
  transform: translateX(calc(-100% - 6px));
}
body.fullscreen-authoring #canvasContainer:has(.viewport-display-toolbar:not([hidden])) .object-transform-toolbar {
  transform: translateX(6px);
}
body.fullscreen-authoring #objectListPanel { left: var(--fullscreen-panel-left, var(--fullscreen-panel-default-left, 16px)); }
body.fullscreen-authoring #paramPanel { left: var(--fullscreen-panel-left, auto); right: var(--fullscreen-panel-default-right, 16px); }
.fullscreen-panel-drag-handle { display: none; }
body.fullscreen-authoring .fullscreen-panel-drag-handle {
  display: grid;
  place-items: center;
  flex: 0 0 20px;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: grab;
  touch-action: none;
  user-select: none;
}
.fullscreen-panel-label { display: none; }
body.fullscreen-authoring .side-panel.fullscreen-panel-minimized > :not(.fullscreen-panel-drag-handle) { display: none !important; }
body.fullscreen-authoring .fullscreen-panel-minimized .fullscreen-panel-drag-handle {
  display: flex; justify-content: center; align-items: center; gap: 10px; flex-basis: calc(var(--viewport-widget-height) - 2px);
}
body.fullscreen-authoring .fullscreen-panel-minimized .fullscreen-panel-label { display: inline; font-size: 11px; font-weight: 600; }
.fullscreen-panel-drag-handle:focus { outline: none; }
.fullscreen-panel-drag-handle:focus-visible:not(.is-pointer-focused) { outline: 2px solid var(--accent); outline-offset: -3px; border-radius: inherit; }
body.fullscreen-authoring .is-panel-dragging .fullscreen-panel-drag-handle { cursor: grabbing; }
body.fullscreen-authoring .fullscreen-panel-front { z-index: 41; }

/* Inspector control system. Dedicated charts/maps/stacks keep their own layout. */
#paramContent {
  --inspector-control-bg: #1c222c;
  --inspector-control-border: #303946;
  --inspector-label: #bfc9d6;
  padding: 12px;
  scrollbar-width: thin;
  scrollbar-color: #37475a transparent;
}
#paramContent .param-row { gap:6px; margin-bottom:14px; min-width:0; }
#paramContent .param-label { color:var(--inspector-label); font-size:12px; font-weight:400; line-height:1.4; }
#paramContent .param-value { gap:6px; min-width:0; }
#paramContent .param-value > select,
#paramContent .script-field > select { width:100%; min-width:0; height:30px; box-sizing:border-box; border:1px solid var(--inspector-control-border); background:var(--inspector-control-bg); border-radius:6px; padding:4px 9px; color:var(--text); font:400 12px var(--font); }
#paramContent .param-row[data-parameter-kind="select"],
#paramContent .param-row[data-parameter-kind="switch"] { display:grid; grid-template-columns:minmax(0, 1fr) minmax(0, 1.2fr); align-items:center; gap:12px; }
#paramContent .param-row[data-parameter-kind="switch"] > .param-value { justify-content:flex-end; }
#paramContent .param-switch-state { display:none; }
#paramContent :is(input,select,textarea,button):disabled { opacity:.45; cursor:not-allowed; }
#paramContent .param-value > :is(input[type="text"],textarea) { min-width:0; max-width:100%; box-sizing:border-box; font:400 12px var(--font); color:var(--text); background:var(--inspector-control-bg); border:1px solid var(--inspector-control-border); border-radius:6px; padding:6px 8px; }
/* Sliders indicate focus on the value thumb, never around the track. */
#paramContent :is(input:not([type="range"]),select,textarea,button):focus-visible { outline:2px solid var(--accent); outline-offset:2px; }
#paramContent .param-hint { color:var(--muted); font:400 11px/1.5 var(--font); margin:6px 0 12px; }
#paramContent .param-subgroup { background:transparent; border:0; margin:0 0 12px; }
#paramContent .param-subgroup-title { border-radius:6px; border:1px solid #2a3b4d; background:linear-gradient(110deg,#1b2d40,#16212f); font-size:11.5px; color:#b4cee2; }
#paramContent .param-subgroup-content { padding:12px 0 0; }
#paramContent .param-group-content { padding:12px 0 0; }
#paramContent .param-subgroup > .param-disclosure-heading > .param-disclosure-trigger { color:inherit; min-height:32px; padding:7px 10px; }
#paramContent .param-colour-value {
  display:flex; align-items:center; gap:8px; min-width:0; min-height:34px; box-sizing:border-box;
  padding:4px 5px; border:1px solid var(--inspector-control-border); border-radius:7px;
  background:linear-gradient(180deg,#1a2029,#161c25);
  transition:border-color 120ms ease,box-shadow 120ms ease;
}
#paramContent .param-colour-value:hover:not(:has(input[type="color"]:disabled)) { border-color:color-mix(in srgb,var(--param-section-accent,var(--accent)) 35%,var(--inspector-control-border)); }
#paramContent .param-colour-value:focus-within { border-color:var(--param-section-accent,var(--accent)); box-shadow:0 0 0 2px color-mix(in srgb,var(--param-section-accent,var(--accent)) 12%,transparent); }
#paramContent .param-colour-value input[type="color"] { width:30px; height:24px; padding:0; border:0; border-radius:4px; flex:0 0 30px; background:transparent; }
#paramContent .param-colour-value input[type="color"]::-webkit-color-swatch-wrapper { padding:0; }
#paramContent .param-colour-value input[type="color"]::-webkit-color-swatch { border:1px solid #ffffff26; border-radius:4px; }
#paramContent .param-colour-value input[type="color"]::-moz-color-swatch { border:1px solid #ffffff26; border-radius:4px; }
#paramContent .param-colour-value input.param-colour-hex {
  flex:1; width:0; min-width:0; height:24px; padding:0 2px; border:0; border-radius:0;
  background:transparent; box-shadow:none; color:var(--text); font:500 12px/24px var(--font);
  font-variant-numeric:tabular-nums; letter-spacing:.035em; text-transform:uppercase;
}
#paramContent .param-colour-value input.param-colour-hex:focus-visible { outline:none; }
#paramContent .param-colour-expand {
  display:grid; place-items:center; flex:0 0 26px; width:26px; height:24px; padding:0;
  border:0; border-left:1px solid #ffffff12; border-radius:0 3px 3px 0;
  background:transparent; color:var(--muted); font-size:0; cursor:pointer;
}
#paramContent .param-colour-expand::before { content:""; width:5px; height:5px; border-right:1.5px solid currentColor; border-bottom:1.5px solid currentColor; transform:translateY(-2px) rotate(45deg); transition:transform 120ms ease; }
#paramContent .param-colour-expand[aria-expanded="true"]::before { transform:translateY(1px) rotate(225deg); }
#paramContent .param-colour-expand:hover:not(:disabled),#paramContent .param-colour-expand[aria-expanded="true"] { color:var(--param-section-accent,var(--accent)); background:#ffffff05; }
#paramContent .param-colour-value :is(input[type="color"],.param-colour-expand):focus-visible { outline:1px solid var(--param-section-accent,var(--accent)); outline-offset:1px; }
#paramContent .param-colour-editor { padding:10px; border:1px solid var(--inspector-control-border); border-radius:7px; background:#161c25; }
#paramContent .param-colour-editor[hidden] { display:none; }
.param-colour-sv { position:relative; height:132px; touch-action:none; background:linear-gradient(to top,#000,transparent),linear-gradient(to right,#fff,hsl(var(--picker-hue) 100% 50%)); border-radius:4px; cursor:crosshair; }
.param-colour-hue { position:relative; height:14px; margin:12px 0; touch-action:none; background:linear-gradient(to right,#f00,#ff0,#0f0,#0ff,#00f,#f0f,#f00); border-radius:4px; cursor:crosshair; }
.param-colour-sv i,.param-colour-hue i { position:absolute; width:8px; height:8px; border:2px solid white; border-radius:50%; box-shadow:0 0 0 1px #0008; transform:translate(-50%,-50%); pointer-events:none; }
.param-colour-hue i { top:50%; height:14px; width:4px; border-radius:3px; }
.param-colour-rgb { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; }
.param-colour-rgb label { display:flex; align-items:center; gap:5px; font-size:11px; color:var(--muted); }
.param-colour-rgb input { width:100%; min-width:0; box-sizing:border-box; border:1px solid var(--line); border-radius:4px; background:var(--panel); padding:4px; color:var(--text); font:400 11px var(--font); }

/* Asset sources: a short source enum plus the existing searchable libraries. */
#paramContent .param-texture-row { display:grid; grid-template-columns:minmax(0,1fr) minmax(100px,1fr); align-items:center; gap:8px 12px; padding:0 0 14px; border-bottom:1px solid var(--line2); }
#paramContent .param-texture-row > .param-value { grid-column:1/-1; display:block; }
#paramContent .texture-source-select { width:100%; min-width:0; box-sizing:border-box; height:30px; font:400 12px var(--font); color:var(--text); background:var(--inspector-control-bg); border:1px solid var(--inspector-control-border); border-radius:6px; padding:4px 8px; }
#paramContent .texture-select { display:grid; width:100%; grid-template-columns:64px minmax(0,1fr) 28px; grid-template-rows:minmax(22px,auto) minmax(30px,auto); gap:5px 10px; align-items:center; }
#paramContent .texture-card-preview { grid-column:1; grid-row:1/3; width:64px; height:64px; display:grid; place-items:center; overflow:hidden; border:1px solid var(--line2); border-radius:6px; box-sizing:border-box; background:#1b2733; color:var(--muted); text-align:center; font:400 9px/1.4 var(--font); }
#paramContent .texture-card-preview[data-state="empty"] { background:linear-gradient(135deg,#19222d,#131b24); border-style:dashed; }
#paramContent .texture-card-preview > :is(img,video,canvas) { display:block; width:100%; height:100%; object-fit:cover; }
#paramContent .texture-name { background:transparent; border:0; padding:0; border-radius:0; grid-column:2/4; grid-row:1; width:100%; min-width:0; max-width:none; white-space:normal!important; overflow-wrap:anywhere; color:var(--text)!important; font:400 12px/1.4 var(--font)!important; }
#paramContent .texture-name .texture-type-icon { display:none; }
#paramContent .texture-library-action { grid-column:2; grid-row:2; justify-self:start; width:auto; min-width:0; height:30px!important; padding:4px 9px!important; font:500 11px var(--font)!important; border:1px solid var(--inspector-control-border); background:transparent; border-radius:6px; color:var(--text); white-space:normal; }
#paramContent .texture-library-action[hidden] { display:none!important; }
#paramContent .texture-clear-btn { grid-column:3; grid-row:2; color:var(--muted)!important; width:28px; height:30px; padding:5px; border:0; background:transparent; border-radius:5px; }
#paramContent .texture-clear-btn:hover { color:var(--bad)!important; background:#ff789f12; }
#paramContent .texture-source-select[hidden] { display:none!important; }
#paramContent .script-field { min-width:0; font:400 12px/1.4 var(--font); }
#paramContent .script-field > label { color:var(--inspector-label); }
#paramContent .script-field.param-colour-value { flex-wrap:wrap; }
#paramContent .script-field.param-colour-value > label { flex:0 0 100%; margin-bottom:6px; }
#paramContent .script-field .param-colour-editor { flex:0 0 100%; box-sizing:border-box; margin-top:6px; }
#paramContent .param-colour-value > div:has(> input[type="color"]) { min-width:0; }
#paramContent .param-colour-value input[id$="_hex"] { font-family:var(--font)!important; }

/* Numeric labels and state text use the editor typeface too. */
#paramContent { --mono:var(--font); }
#paramContent .param-value label > input[type="checkbox"] + span { font:400 11px/1.4 var(--font)!important; letter-spacing:0; }
#paramContent .param-value > input[type="number"]:not(.slider-min,.slider-max,.xyz-min,.xyz-max) { height:30px; border-radius:6px; font:400 12px var(--font); }

#paramContent .script-control-group { border:0; padding:12px 0 0; margin:16px 0; min-width:0; }
#paramContent .script-control-group > legend { box-sizing:border-box; width:100%; padding:9px 10px; border:1px solid #2a3b4d; border-radius:6px; background:linear-gradient(110deg,#1b2d40,#16212f); color:#b4cee2; font:600 12px var(--font); }
#paramContent .script-field[data-parameter-kind="switch"],
#paramContent .script-field[data-parameter-kind="select"] { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1.2fr); align-items:center; gap:12px; }
#paramContent .script-field[data-parameter-kind="switch"] input { justify-self:end; }
#paramContent .param-readonly { color:var(--muted); font:400 12px/1.4 var(--font); }
#paramContent .rebuild-required-group { border:0; background:transparent; padding:0; }
#paramContent .rebuild-required-group .param-group-title { color:#b4cee2; }

/* Match selected layer cards; decoration inherits across dynamically rebuilt sections. */
#paramContent[data-section-accent] :is(.param-group-title,.param-subgroup-title,.script-control-group > legend) {
  --accent:var(--param-section-accent);
  color:var(--text);
  border-color:var(--param-section-outline);
  background:color-mix(in srgb,var(--param-section-accent) 17%,transparent);
  box-shadow:none;
}
#paramContent[data-section-accent] .param-subgroup > .param-disclosure-heading > .param-disclosure-trigger { color:inherit; }
#paramContent[data-section-icon] :is(.param-disclosure-trigger,.param-group-title:not(.param-disclosure-heading),.param-subgroup-title:not(.param-disclosure-heading),.script-control-group > legend)::before {
  content:"";
  display:inline-block;
  flex:0 0 20px;
  width:20px;
  height:20px;
  vertical-align:middle;
  background:var(--param-section-accent);
  mask:var(--param-section-icon) center / contain no-repeat;
  pointer-events:none;
}
#paramContent[data-section-icon] .param-disclosure-label { flex:1; }
#paramContent[data-section-icon] :is(.param-group-title:not(.param-disclosure-heading),.param-subgroup-title:not(.param-disclosure-heading),.script-control-group > legend)::before { margin-right:8px; }

/* Keep the selected layer's hue during pointer and keyboard slider editing. */
#paramContent[data-section-accent] input[type="range"] { accent-color:var(--param-slider-fill,var(--param-section-accent)); }
#paramContent[data-section-accent] .slider-wrapper {
  --slider-rail-tint:color-mix(in srgb,var(--param-slider-fill,var(--param-section-accent)) 35%,#68727e);
  --slider-rail-body:color-mix(in srgb,var(--slider-rail-tint) 65%,transparent);
  --slider-rail-end:color-mix(in srgb,var(--slider-rail-tint) 12%,transparent);
  --slider-rail:linear-gradient(90deg,var(--slider-rail-end),var(--slider-rail-body) 22%,var(--slider-rail-body) 78%,var(--slider-rail-end));
}
#paramContent[data-section-accent] .slider-wrapper:is(:hover,:focus-within) { --slider-rail-body:color-mix(in srgb,var(--slider-rail-tint) 82%,transparent); }
#paramContent[data-section-accent] .slider-wrapper input[type="range"] { background:transparent; }
#paramContent[data-section-accent] .slider-wrapper input[type="range"]::-webkit-slider-runnable-track { background:var(--slider-rail); border-radius:999px; }
#paramContent[data-section-accent] .slider-wrapper input[type="range"]::-moz-range-track { background:var(--slider-rail); border-radius:999px; }
#paramContent[data-section-accent] .slider-thumb-value {
  background:var(--param-slider-fill,var(--param-section-accent));
  color:var(--param-slider-text,#fff);
}
#paramContent[data-section-accent] .slider-wrapper:hover .slider-thumb-value { box-shadow:inset 0 0 0 1px #ffffff80,0 1px 3px #0005; }
#paramContent[data-section-accent] .slider-wrapper input[type="range"]:focus + .slider-thumb-value { outline:1px solid var(--param-section-accent); outline-offset:2px; }



/* The existing Animation editor becomes a bounded floating window in fullscreen. */
.fullscreen-animation-close { display:none; }
body.fullscreen-authoring.fullscreen-animation:not(.fullscreen-ui-hidden) #editor {
  display:flex !important; position:fixed; flex:none;
  left:var(--fullscreen-panel-left,max(12px,calc((100vw - 1160px)/2)));
  top:var(--fullscreen-panel-top,auto); bottom:16px;
  width:min(1160px,calc(100vw - 24px)); height:var(--fullscreen-animation-height,min(380px,44vh));
  min-height:220px; max-height:calc(100vh - 88px);
  border:1px solid var(--viewport-widget-border); border-radius:12px;
  box-shadow:0 12px 40px #0006; z-index:40; box-sizing:border-box;
}
body.fullscreen-authoring #editor.fullscreen-panel-front { z-index:41; }
body.fullscreen-authoring #editor.fullscreen-panel-minimized {
  height:42px !important; min-height:42px !important;
}
body.fullscreen-authoring #editor.fullscreen-panel-minimized > :not(.fullscreen-panel-drag-handle) { display:none !important; }
body.fullscreen-authoring #editorBar { min-height:44px; height:44px; padding:0 12px; }
body.fullscreen-authoring #editorBar .mode-toggle { display:none; }
body.fullscreen-authoring #editorBar :is(#btnModeTimeline,#btnModeClips,#btnSettings) { display:none; }
body.fullscreen-authoring #btnModeKeyframe { color:var(--text); background:none; font-size:12px; font-weight:650; padding:0; border:0; margin-left:0; }
body.fullscreen-authoring #editorBar .editorbar-right { gap:12px; }
body.fullscreen-authoring .fullscreen-animation-close {
  display:inline-flex; align-items:center; justify-content:center; flex:0 0 28px;
  width:28px; height:28px; padding:5px; border:1px solid transparent; border-radius:5px;
  background:transparent; color:var(--muted); cursor:pointer;
}
.fullscreen-animation-close .ui-icon { width:16px; height:16px; }
.fullscreen-animation-close:hover { color:var(--text); background:#ffffff0d; }
body.fullscreen-authoring #keyframeViewport { min-height:0; }

.fullscreen-animation-resize { display:none; }
body.fullscreen-authoring .fullscreen-animation-resize { display:block; position:absolute; z-index:50; top:0; left:12px; right:12px; height:6px; cursor:ns-resize; touch-action:none; }
body.fullscreen-authoring #editor > .fullscreen-panel-drag-handle::after { content:""; display:block; width:32px; height:3px; border-radius:2px; background:#8da0b35c; }
body.fullscreen-authoring #keyframeHeader { left:0; overflow-x:auto; scrollbar-width:none; }
body.fullscreen-authoring #keyframeHeader .kf-lane-hint { display:none; }
body.fullscreen-authoring #clipAnimationControls { margin-left:auto; flex-wrap:nowrap; }
body.fullscreen-authoring #editor :is(.fullscreen-animation-close,.fullscreen-animation-resize):focus-visible { outline:2px solid var(--accent); outline-offset:-2px; }
@media (max-width:800px) {
  body.fullscreen-authoring #editorBar { gap:8px; padding:0 10px; }
  body.fullscreen-authoring #editorBar .editorbar-center { gap:4px; }
  body.fullscreen-authoring #editorBar .zoom-control { width:90px; }
}

body.fullscreen-authoring #editor .keyframe-track-label { background:#141b26; }
body.fullscreen-authoring #editor .keyframe-track.selected .keyframe-track-label { background:linear-gradient(180deg,#22334b,#172131); }

/* Cloner effector falloff response graph (weight against distance). */
/* Response graph shared by cloner falloffs, particle/field affectors and deformers. */
.cloner-falloff-profile {
  margin: 4px 10px 10px;
  padding: 8px 10px 6px;
  border: 1px solid var(--line2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.025);
}
.cloner-falloff-profile svg {
  display: block;
  width: 100%;
  height: 48px;
  overflow: visible;
}
.cloner-falloff-profile-fill {
  fill: rgba(255, 146, 72, 0.16);
}
.cloner-falloff-profile-line {
  fill: none;
  stroke: #ffa25c;
  stroke-width: 1.6;
  vector-effect: non-scaling-stroke;
  stroke-linejoin: round;
}
.cloner-falloff-profile-axis {
  display: flex;
  justify-content: space-between;
  margin-top: 4px;
  color: var(--muted);
  font: 500 10px/1.2 var(--font);
}
.param-section-action.is-active {
  background: rgba(255, 146, 72, 0.2);
  border-color: rgba(255, 170, 110, 0.55);
  color: #ffd6b5;
}
