/* Entry stylesheet; build combines these in order. */
:root {
  font:
    12px Arial,
    'Apple SD Gothic Neo',
    'Malgun Gothic',
    sans-serif;
  color: #ddd;
  background: #222;
  color-scheme: dark;
  --border: #414141;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  height: 100dvh;
  min-width: 780px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
button,
input,
select,
textarea {
  font: inherit;
}
button {
  border: 1px solid var(--border);
  background: #2a2a2a;
  color: inherit;
  border-radius: 2px;
  cursor: pointer;
  padding: 6px 10px;
  white-space: nowrap;
}
button:hover {
  background: #414141;
}
button.active {
  background: #505050;
  color: #fff;
}
button:disabled {
  opacity: 0.35;
  cursor: default;
}
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 1px solid #d3c390;
  outline-offset: 1px;
}
[hidden] {
  display: none !important;
}
.app-header {
  height: 45px;
  flex-shrink: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: stretch;
  background: #202020;
  border-bottom: 1px solid #414141;
  padding: 0 12px;
  gap: 12px;
}
.brand {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
  font-size: 16px;
}
.wordmark {
  display: block;
  flex: 0 0 auto;
  width: 110px;
  height: auto;
  user-select: none;
}
.brand-divider {
  flex: 0 0 1px;
  height: 16px;
  background: #565656;
  margin-left: 3px;
}
.brand input {
  background: none;
  border: 0;
  color: #ddd;
  width: 220px;
  min-width: 0;
  flex: 0 1 220px;
  padding: 6px 7px;
  border: 1px solid transparent;
  border-radius: 2px;
  font-size: 13px;
}
.main-tabs {
  justify-self: center;
  display: flex;
}
.main-tabs button {
  border: 0;
  padding: 0 20px;
  background: none;
  border-radius: 0;
}
.main-tabs button.active {
  background: #353535;
  border-bottom: 2px solid #b8b8b8;
}
.file-actions {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 3px;
}
.file-actions button {
  border: 0;
  background: none;
  font-size: 11px;
  padding: 7px;
}
.fixture-toolbar {
  height: 57px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 18px;
  border-bottom: 1px solid #3a3a3a;
  background: #282828;
}
.tool-group {
  display: flex;
  gap: 8px;
}
.icon {
  width: 35px;
  height: 34px;
  font-size: 22px;
  padding: 0;
}
.fixture-toolbar select {
  width: 112px;
  background: #292929;
  color: #ddd;
  border: 1px solid #494949;
  padding: 9px;
}
#fixture-buttons {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}
#fixture-buttons button {
  width: 36px;
  height: 33px;
  padding: 0;
  font-size: 12px;
}
#selection-count {
  color: #bbb;
  font-size: 11px;
  white-space: nowrap;
}
.attribute-toolbar {
  height: 58px;
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 0 20px;
  background: #292929;
  border-bottom: 1px solid #454545;
}
.attribute-toolbar label {
  display: flex;
  align-items: center;
  gap: 13px;
  padding-right: 20px;
  border-right: 1px solid #555;
}
.attribute-toolbar input[type='range'] {
  width: 140px;
  accent-color: #ddd;
  height: 4px;
}
.attribute-toolbar output {
  width: 49px;
  padding: 8px;
  border: 1px solid #464646;
  text-align: center;
}
.attribute-toolbar input[type='color'] {
  width: 65px;
  height: 30px;
  background: #343434;
  border: 1px solid #555;
  padding: 3px;
}
.segments {
  display: flex;
}
.segments button {
  border-radius: 0;
  min-width: 69px;
}
.attribute-toolbar > button {
  margin-left: auto;
  min-width: 105px;
}
#workspace {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 240px minmax(240px, 1fr) var(--pdf-width, 280px);
  gap: 4px;
  padding: 4px 4px 0;
}
.panel {
  background: #262626;
  border: 1px solid #3f3f3f;
  min-width: 0;
  min-height: 0;
}
.panel-heading {
  height: 36px;
  display: flex;
  align-items: center;
  padding: 0 10px;
  gap: 7px;
  border-bottom: 1px solid #3e3e3e;
  flex-shrink: 0;
}
.panel-heading b {
  font-weight: 500;
  margin-right: auto;
  white-space: nowrap;
}
.panel-heading button {
  border: 0;
  background: none;
  padding: 3px;
  font-size: 12px;
}
.panel-heading span {
  font-size: 10px;
  color: #999;
}
#cue-panel,
#pdf-panel {
  display: flex;
  flex-direction: column;
}
#cue-list {
  overflow: auto;
  flex: 1;
}
.cue-group > header {
  display: flex;
  align-items: center;
  height: 35px;
  font-size: 11px;
  padding: 0 8px;
  border-bottom: 1px solid #363636;
  gap: 7px;
}
.cue-group > header button {
  font-size: 9px;
  border: 0;
  padding: 0;
  background: none;
  width: 12px;
}
.cue-row {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 10px;
  height: 36px;
  border-bottom: 1px solid #333;
  font-size: 12px;
  cursor: pointer;
}
.cue-row.active {
  background: #494949;
}
.cue-row:hover {
  background: #393939;
}
.cue-row.drag-over {
  border-top: 2px solid #c0b998;
}
.grip {
  font-size: 11px;
  color: #828282;
  cursor: grab;
}
.cue-index {
  font-size: 11px;
  color: #c3c3c3;
  min-width: 27px;
}
.cue-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.stage-panel {
  display: flex;
  flex-direction: column;
}
.stage-heading {
  height: 37px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid #4c4c4c;
}
.view-tabs {
  display: flex;
  height: 100%;
}
.view-tabs button {
  border: 0;
  border-radius: 0;
  background: none;
  min-width: 100px;
}
.view-tabs button.active {
  background: #424242;
  border-bottom: 2px solid #ddd;
}
#sources {
  border: 0;
  background: none;
  padding: 4px 13px;
}
#stage-content {
  position: relative;
  flex: 1;
  min-height: 0;
  background: #ecebe8;
  overflow: hidden;
}
#plan {
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
  user-select: none;
}
#stage-frame {
  width: 100%;
  height: 100%;
  border: 0;
  background: #181818;
}
#pdf-content {
  flex: 1;
  min-height: 0;
  background: #f5f4f1;
  color: #383838;
  overflow: auto;
}
#pdf-content iframe {
  width: 100%;
  height: 100%;
  border: 0;
}
.pdf-placeholder {
  text-align: center;
  padding: 65px 15px;
}
.paper-icon {
  border: 1px solid #aaa;
  width: 48px;
  height: 62px;
  margin: auto;
  display: grid;
  place-items: center;
  color: #888;
  font-size: 11px;
}
.pdf-placeholder h2 {
  font-size: 14px;
  font-weight: 500;
  margin-top: 24px;
}
.pdf-placeholder p {
  color: #888;
  font-size: 11px;
  line-height: 1.8;
}
.pdf-placeholder button {
  background: #e9e8e5;
  color: #555;
  border-color: #ccc;
  margin-top: 12px;
}
#notes-panel {
  margin: 4px 4px 0;
  flex: 0 0 116px;
  display: flex;
  flex-direction: column;
}
#cue-note {
  width: 100%;
  flex: 1;
  resize: none;
  background: #272727;
  border: 0;
  padding: 16px 30px;
  color: #ddd;
  line-height: 1.6;
  font-size: 12px;
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
#toast {
  position: fixed;
  z-index: 120;
  left: 50%;
  bottom: 36px;
  transform: translate(-50%, 12px);
  padding: 9px 15px;
  border: 1px solid #505050;
  border-radius: 5px;
  background: #303030;
  color: #ddd;
  box-shadow: 0 8px 24px #0009;
  font-size: 12px;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 160ms ease,
    transform 160ms ease;
}
#toast.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}
#restore-panels {
  min-height: 30px;
  align-items: center;
  display: flex;
  gap: 4px;
  padding: 0 4px 8px;
  flex-shrink: 0;
}
#restore-panels:has(button:not([hidden])) {
  padding-top: 4px;
}
#restore-panels button {
  font-size: 10px;
  padding: 4px 10px;
}
body.hide-cues #workspace {
  grid-template-columns: 0 minmax(240px, 1fr) var(--pdf-width, 280px);
}
body.hide-pdf #workspace {
  grid-template-columns: 240px minmax(240px, 1fr) 0;
}
body.hide-cues.hide-pdf #workspace {
  grid-template-columns: 0 1fr 0;
}
body.hide-cues #cue-panel,
body.hide-pdf #pdf-panel {
  visibility: hidden;
}
body.hide-notes #notes-panel {
  display: none;
}
dialog {
  width: 440px;
  max-width: 90vw;
  background: #282828;
  color: #ddd;
  border: 1px solid #666;
  padding: 0;
  box-shadow: 0 20px 80px #0008;
}
dialog::backdrop {
  background: #0007;
}
.dialog-heading {
  padding: 12px 17px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #444;
}
.dialog-heading button {
  border: 0;
  font-size: 20px;
  background: none;
}
#dialog-content {
  padding: 20px;
  line-height: 1.7;
}
#dialog-content p {
  color: #aaa;
  font-size: 12px;
}
#dialog-content label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 10px 0;
}
#dialog-content input,
#dialog-content select {
  width: 125px;
  padding: 6px;
  border: 1px solid #555;
  background: #222;
  color: #ddd;
}
#run-bar {
  padding: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid #444;
}
#run-next {
  font-size: 12px;
}
.svg-light {
  cursor: move;
}
.svg-handle {
  cursor: nwse-resize;
}
.stage-source {
  font: 12px Arial;
  fill: #555;
}
.actor-label {
  font: 12px Arial;
  fill: #4e4e4e;
}
@media (max-width: 1200px) {
  .app-header {
    gap: 3px;
  }
  .brand {
    font-size: 14px;
  }
  .brand input {
    width: 180px;
  }
  .main-tabs button {
    padding: 0 13px;
  }
  .file-actions button {
    font-size: 10px;
    padding: 5px;
  }
  .fixture-toolbar {
    gap: 10px;
    padding: 0 12px;
  }
  #fixture-buttons {
    gap: 3px;
  }
  #fixture-buttons button {
    width: 31px;
  }
  .attribute-toolbar {
    gap: 10px;
    padding: 0 12px;
  }
  .attribute-toolbar label {
    gap: 8px;
    padding-right: 10px;
  }
  .attribute-toolbar input[type='range'] {
    width: 85px;
  }
  .segments button {
    min-width: 53px;
    padding: 6px;
  }
  .attribute-toolbar > button {
    min-width: 85px;
  }
  #workspace {
    grid-template-columns: 200px minmax(240px, 1fr) var(--pdf-width, 225px);
  }
  body.hide-cues #workspace {
    grid-template-columns: 0 minmax(240px, 1fr) var(--pdf-width, 225px);
  }
  body.hide-pdf #workspace {
    grid-template-columns: 200px minmax(240px, 1fr) 0;
  }
}

#autosave-status {
  flex: 0 0 auto;
  align-self: center;
  color: #929b91;
  font-size: 10px;
  white-space: nowrap;
  margin-left: auto;
  margin-right: 8px;
}
#autosave-status[data-state='saving'] {
  color: #a7a39a;
}
#autosave-status[data-state='error'] {
  color: #e49d86;
}

.new-work-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 22px;
}
.new-work-actions button {
  padding: 8px 14px;
}

body.stage-settings #workspace {
  grid-template-columns: 220px minmax(240px, 1fr) 285px;
}
body.stage-settings #cue-panel,
body.stage-settings #pdf-panel,
body.stage-settings #notes-panel {
  display: none;
}
#settings-list,
#settings-inspector {
  overflow: auto;
}
#settings-list .section-label {
  font-size: 10px;
  color: #8e8e8e;
  padding: 18px 13px 8px;
  letter-spacing: 0.6px;
}
.setting-row {
  display: flex;
  width: 100%;
  text-align: left;
  border: 0;
  border-bottom: 1px solid #363636;
  border-radius: 0;
  padding: 10px 13px;
  gap: 8px;
}
.setting-row span {
  font-size: 10px;
  color: #999;
  margin-left: auto;
}
.setting-section {
  padding: 15px 13px;
  border-bottom: 1px solid #414141;
}
.setting-section h3 {
  font-size: 11px;
  font-weight: 500;
  margin: 0 0 12px;
}
.setting-section p {
  font-size: 10px;
  color: #999;
  line-height: 1.7;
}
.setting-field {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 11px;
  margin: 10px 0;
}
.setting-field input:not([type='checkbox']) {
  width: 105px;
  background: #202020;
  border: 1px solid #4d4d4d;
  padding: 6px;
  color: #ddd;
}
.setting-field input[type='checkbox'] {
  accent-color: #ccc;
}
.setting-section .wide {
  width: 100%;
  margin: 5px 0;
}
.setting-section .button-pair {
  display: flex;
  gap: 5px;
}
.setting-section .button-pair button {
  flex: 1;
  font-size: 10px;
}
.setting-section select {
  width: 100%;
  padding: 7px;
  background: #252525;
  border: 1px solid #555;
  color: #ddd;
}
#settings-bottom {
  margin: 4px 4px 0;
  flex: 0 0 83px;
}
#settings-bottom p {
  padding: 0 16px;
  font-size: 11px;
  line-height: 1.7;
  color: #aaa;
}
#settings-hint {
  font-size: 11px;
  color: #aaa;
  margin-right: auto;
}
#stage-tools .attribute-toolbar > button {
  margin-left: 0;
  min-width: 80px;
}
#stage-tools .attribute-toolbar {
  height: 46px;
}
.installation-pin {
  cursor: move;
}
.calibration-cross {
  pointer-events: none;
}
.setting-empty {
  padding: 20px 14px;
  color: #999;
  line-height: 1.8;
  font-size: 11px;
}
@media (max-width: 1100px) {
  body.stage-settings #workspace {
    grid-template-columns: 170px minmax(240px, 1fr) 235px;
  }
  #stage-tools .segments button {
    min-width: 0;
    padding: 8px 14px;
  }
}
.nudge-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-areas: '. up .' 'left down right';
  gap: 5px;
  margin-top: 8px;
}
.nudge-grid [data-nudge='up'] {
  grid-area: up;
}
.nudge-grid [data-nudge='left'] {
  grid-area: left;
}
.nudge-grid [data-nudge='right'] {
  grid-area: right;
}
.nudge-grid [data-nudge='down'] {
  grid-area: down;
}
.nudge-grid button {
  min-height: 29px;
  font-size: 15px;
}
.setting-row.active {
  background: #4b4438;
  color: #f0e4ce;
}
#settings-inspector .setting-section p:first-child {
  margin-top: 0;
}
.tool-group .icon svg {
  width: 18px;
  height: 18px;
  display: block;
  margin: auto;
}
.tool-group .icon {
  display: grid;
  place-items: center;
}
.stage-actor {
  cursor: grab;
}
.stage-actor:active {
  cursor: grabbing;
}
.stage-actor .actor-label {
  pointer-events: none;
  paint-order: stroke;
  stroke: #f3f1eb;
  stroke-width: 3px;
  font-weight: 600;
}
#editor-tools .attribute-toolbar {
  gap: 12px;
  padding: 0 12px;
}
#editor-tools .attribute-toolbar label {
  gap: 7px;
  padding-right: 11px;
}
#editor-tools .attribute-toolbar input[type='range'] {
  width: 94px;
}
#editor-tools .attribute-toolbar output {
  width: 42px;
  padding: 6px 2px;
}

body.stage-settings #workspace {
  grid-template-columns: 155px minmax(240px, 1fr) 310px;
}
#stage-tools .segments {
  overflow-x: auto;
  white-space: nowrap;
  min-width: 0;
}
#stage-tools .attribute-toolbar {
  height: auto;
  min-height: 40px;
  flex-wrap: wrap;
  padding: 6px 12px;
}
#stage-tools .attribute-toolbar > button {
  min-width: 0;
  font-size: 11px;
}
.cal-curve {
  width: 100%;
  height: 95px;
  background: #242424;
}
.cal-record {
  display: flex;
  gap: 4px;
  margin: 5px 0;
}
.cal-record > button:first-child {
  flex: 1;
  text-align: left;
  font-size: 11px;
}
.cal-record i {
  display: inline-block;
  width: 14px;
  height: 14px;
  vertical-align: middle;
  border: 1px solid #777;
  border-radius: 50%;
}
.cal-focus-record {
  border-top: 1px solid #444;
  padding: 9px 0;
  font-size: 10px;
  line-height: 1.7;
}
.cal-focus-record > div {
  display: flex;
  gap: 6px;
  margin-top: 5px;
}
.cal-wheel {
  margin: 4px 0 10px;
}
.cal-wheel > summary {
  font-size: 11px;
}
.cal-wheel-label {
  font-size: 10px;
  color: #aaa;
}
.cal-result {
  padding: 10px 0;
  font-size: 11px;
  color: #dac795;
}
.preset-record {
  padding: 7px 0;
  font-size: 10px;
  line-height: 1.65;
  border-top: 1px solid #444;
}
.preset-record > span {
  display: block;
}
@media (max-width: 1000px) {
  body.stage-settings #workspace {
    grid-template-columns: 125px minmax(220px, 1fr) 260px;
  }
}

#settings-inspector input:disabled,
#settings-inspector button:disabled {
  opacity: 0.4;
  cursor: default;
}
#settings-bottom {
  flex: 0 0 auto;
  max-height: 180px;
  overflow: auto;
}
#settings-detail {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 8px 22px;
  padding: 10px 16px 14px;
}
#settings-detail summary {
  cursor: pointer;
  font-size: 11px;
  color: #ccc;
}
#settings-detail p {
  padding: 0;
  margin: 7px 0 0;
  overflow-wrap: anywhere;
}
.asset-instance-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 11px;
}
.asset-object {
  padding: 9px 0;
  border-top: 1px solid #3c3c3c;
}
.asset-object summary {
  cursor: pointer;
  font-size: 11px;
}
.asset-object-row {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  border-top: 1px solid #3c3c3c;
}
.asset-object-row .asset-object {
  flex: 1;
  min-width: 0;
  border-top: 0;
}
.asset-select-toggle {
  display: grid;
  place-items: center;
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  margin-top: 6px;
  cursor: pointer;
}
.asset-select-toggle input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}
.asset-select-toggle span {
  width: 16px;
  height: 16px;
  border: 1px solid #777;
  border-radius: 3px;
  background: #232323;
}
.asset-select-toggle input:checked + span {
  border-color: #e7cc94;
  background: #b59153;
  box-shadow: inset 0 0 0 3px #232323;
}
.asset-select-toggle input:focus-visible + span {
  outline: 2px solid #fff;
  outline-offset: 2px;
}
.preset-copy-list {
  display: grid;
  gap: 5px;
}
.preset-copy-target {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 6px 9px;
  border: 1px solid #474747;
  background: #292929;
  font-size: 11px;
  cursor: pointer;
}
.preset-copy-target:has(input:checked) {
  border-color: #b59153;
  background: #373229;
}
.preset-copy-target input {
  accent-color: #b59153;
}
dialog.stage-library-dialog {
  width: min(820px, calc(100vw - 40px));
  max-width: 820px;
}
.stage-library-dialog #dialog-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: min(650px, calc(100dvh - 130px));
  overflow: auto;
}
.library-toolbar,
.library-footer,
.library-save {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.library-toolbar .segments {
  margin-right: auto;
}
.library-toolbar [aria-pressed='true'] {
  background: #555;
}
.library-inspect-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.library-inspect-heading button {
  border: 0;
  background: transparent;
  font-size: 18px;
  padding: 0 4px;
}
.library-add h3 {
  margin: 0;
  font-size: 12px;
  font-weight: 500;
}
.library-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(145px, 1fr));
  gap: 9px;
  min-height: 110px;
  max-height: 340px;
  overflow-y: auto;
  padding: 2px;
}
.library-card {
  display: flex;
  flex-direction: column;
  text-align: left;
  padding: 8px;
  gap: 6px;
  border: 1px solid #484848;
  min-width: 0;
}
.library-card[aria-pressed='true'] {
  border-color: #d4bb80;
  background: #423e34;
}
.library-card b {
  font-size: 12px;
  font-weight: 500;
  overflow-wrap: anywhere;
}
.library-card > span:last-child,
.library-note,
.library-footer span {
  color: #aaa;
  font-size: 11px;
}
.library-preview {
  display: grid;
  place-items: center;
  height: 90px;
  width: 100%;
  background: #222;
}
.library-preview img,
.library-preview svg {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.library-save {
  border-top: 1px solid #444;
  padding-top: 12px;
}
.stage-library-dialog .library-save label {
  margin: 0;
  flex: 1;
  min-width: 180px;
}
.stage-library-dialog .library-save input {
  width: 100%;
}
.library-footer {
  border-top: 1px solid #444;
  padding-top: 12px;
  justify-content: space-between;
}
.library-footer button {
  background: #52504a;
}
.library-empty {
  padding: 20px;
}
.library-delete-confirm {
  padding: 10px;
  border: 1px solid #816a4a;
  background: #38332b;
}
.library-delete-confirm button {
  margin-right: 6px;
}
.library-inspect,
.library-add {
  border: 1px solid #48443d;
  background: #292824;
  padding: 10px 12px;
  font-size: 11px;
}
.library-inspect p,
.library-add p {
  color: #aaa;
  margin: 6px 0;
}
.library-inspect summary,
.library-add summary {
  cursor: pointer;
  color: #dfcfad;
}
.library-object-list {
  max-height: 180px;
  overflow: auto;
  margin-top: 8px;
}
.library-object-list > div {
  border-top: 1px solid #444;
  padding: 6px 0;
  display: grid;
  gap: 3px;
}
.library-object-list span {
  color: #bdbdbd;
  line-height: 1.5;
}
.library-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 12px;
}
.library-add form {
  margin-top: 12px;
}
.library-add .setting-field {
  margin: 0;
}
.library-add input {
  width: 100%;
}

#stage-reset-defaults {
  margin-left: auto;
  flex-shrink: 0;
}

#stage-reset-defaults svg {
  width: 14px;
  height: 14px;
}

#cue-context-menu {
  position: fixed;
  z-index: 100;
  background: #303030;
  border: 1px solid #666;
  box-shadow: 0 6px 24px #0008;
  padding: 4px;
}
#cue-context-menu button {
  width: 100%;
  text-align: left;
}
.file-actions #undo,
.file-actions #redo {
  font-size: 18px;
  line-height: 1;
  padding: 7px 8px;
  min-width: 28px;
}
.plan-view-controls {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: 8px;
}
.plan-view-controls button {
  padding: 4px 6px;
  font-size: 11px;
  border: 0;
  background: none;
  color: #bbb;
}
.plan-view-controls button:hover {
  background: #444;
  color: #fff;
}

.preset-record {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 0;
  border-top: 1px solid #3e3e3e;
}
.preset-record span {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 10px;
  color: #bbb;
}
.preset-record button {
  font-size: 10px;
  padding: 5px 6px;
}

#stage-brightness-control {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-left: auto;
  font-size: 10px;
  white-space: nowrap;
}
#stage-brightness {
  width: 72px;
  accent-color: #ccc;
}
#stage-brightness-value {
  width: 30px;
  text-align: right;
}
#light-panel {
  position: fixed;
  z-index: 40;
  width: 310px;
  max-width: calc(100vw - 16px);
  max-height: calc(100dvh - 16px);
  overflow: auto;
  background: #2b2b2b;
  border: 1px solid #666;
  box-shadow: 0 4px 15px #0007;
  border-radius: 2px;
  font-size: 11px;
}
#light-panel > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 9px;
  background: #383838;
  position: sticky;
  top: 0;
  z-index: 1;
}
#light-panel > header b {
  font-weight: 500;
}
#light-panel > header button {
  padding: 0 5px;
  border: 0;
  background: none;
  font-size: 18px;
}
#light-panel-content {
  padding: 9px;
}
#light-panel-content label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 8px 0;
}
#light-panel-content input,
#light-panel-content select {
  width: 134px;
  min-width: 0;
  background: #222;
  color: #ddd;
  border: 1px solid #555;
  padding: 5px;
}
#light-panel-content input[type='color'] {
  height: 29px;
}
#light-panel-content p {
  font-size: 10px;
  color: #bbb;
  line-height: 1.5;
  margin: 8px 0;
}
#light-panel-content h4 {
  font-size: 11px;
  font-weight: 500;
  border-top: 1px solid #484848;
  padding-top: 9px;
  margin: 10px 0 5px;
}
#light-panel-content .button-pair {
  display: flex;
  gap: 4px;
}
#light-panel-content .button-pair button {
  flex: 1;
  padding: 6px 3px;
  font-size: 10px;
}

.actor-color-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 12px 0;
}
.actor-color-options {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  max-width: 200px;
}
#light-panel .actor-swatch {
  background: var(--swatch);
  width: 20px;
  height: 20px;
  border-radius: 50%;
  padding: 0;
  border: 1px solid #999;
}
#light-panel .actor-swatch[aria-pressed='true'] {
  outline: 2px solid #fff;
  outline-offset: 2px;
}
#light-panel .actor-custom-color {
  position: relative;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  margin: 0;
  background: var(--swatch);
  color: #111;
  cursor: pointer;
  border: 1px solid #aaa;
}
#light-panel .actor-custom-color input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  padding: 0;
}
#active-lights-panel {
  border-top: 1px solid var(--border);
  flex-shrink: 0;
  max-height: 36%;
  overflow: auto;
}
#active-lights-summary {
  padding: 10px;
  cursor: pointer;
  font-size: 11px;
  color: #ccc;
}
#active-lights-list {
  padding: 0 10px 9px;
}
.active-light-group {
  margin-bottom: 8px;
}
.active-light-group > b {
  font-size: 10px;
  font-weight: 400;
  color: #999;
}
.active-light-group > div {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 3px;
  margin-top: 5px;
}
.active-light-group button {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 6px;
  font-size: 11px;
}
.active-light-group i {
  width: 7px;
  height: 4px;
  border-radius: 50%;
  border: 1px solid #ffffff40;
  flex-shrink: 0;
}
.active-light-group small {
  margin-left: auto;
  font-size: 10px;
  color: #aaa;
}
.active-light-empty {
  font-size: 11px;
  color: #999;
}
body.plan-pan-mode .svg-light,
body.plan-pan-mode .stage-actor {
  cursor: grab !important;
}
.plan-center.nearby .plan-center-visible {
  opacity: 0.9;
}
.plan-center-visible {
  opacity: 0;
  transition: opacity 0.12s;
}
.plan-center,
.plan-installation {
  cursor: pointer;
}
.plan-center:focus-visible .plan-center-visible {
  opacity: 1;
}
#cue-context-menu button {
  display: block;
}
#cue-context-menu > input {
  display: block;
  width: 200px;
  margin: 4px;
  padding: 6px;
  background: #222;
  color: #ddd;
  border: 1px solid #666;
}

.plan-center {
  cursor: grab;
}
.file-menu {
  position: relative;
  font-size: 12px;
}
.color-swatch {
  width: 19px;
  height: 19px;
  min-width: 19px;
  padding: 0;
  background: var(--swatch);
  border: 1px solid #777;
}
.color-swatch.active {
  outline: 1px solid #eee;
  outline-offset: 2px;
}
#select-all-fixtures,
#clear-fixtures {
  font-size: 11px;
  padding: 5px 7px;
}
.attribute-toolbar {
  height: auto;
  min-height: 58px;
  flex-wrap: wrap;
}
.attribute-toolbar .color-swatch,
.attribute-toolbar .color-swatch.active,
.attribute-toolbar .color-swatch:hover {
  background: var(--swatch);
}
#property-toolbar {
  padding: 8px 12px;
  gap: 12px;
}
#property-values,
#property-timing,
.property-colors {
  display: flex;
  align-items: center;
  gap: 8px;
}
#property-values {
  flex: 1;
  flex-wrap: wrap;
}
#property-toolbar label {
  white-space: nowrap;
  gap: 6px;
  padding-right: 0;
  border: 0;
}
#property-toolbar input[type='number'] {
  width: 58px;
  background: #222;
  border: 1px solid #4b4b4b;
  padding: 6px 4px;
}
#property-values input[type='range'] {
  width: 130px;
}
#property-values input:disabled {
  width: 70px;
}
#property-kind {
  width: 112px;
  padding: 7px;
}
#property-effect {
  margin-left: auto;
}
#property-effect[aria-pressed='true'] {
  background: #ffffff14;
  color: #fff;
}
.property-note {
  color: #aaa;
  font-size: 11px;
}
#light-actions {
  position: relative;
}
#light-actions summary {
  cursor: pointer;
  border: 1px solid #494949;
  padding: 7px 10px;
  list-style: none;
}
#light-actions summary::-webkit-details-marker {
  display: none;
}
.light-action-items {
  position: absolute;
  right: 0;
  top: 100%;
  background: #303030;
  padding: 4px;
  border: 1px solid #555;
  min-width: 210px;
  z-index: 220;
  box-shadow: 0 6px 18px #0008;
}
.light-action-items button {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
}
#undo,
#redo,
#prev,
#next {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
#undo svg,
#redo svg,
#prev svg,
#next svg {
  flex-shrink: 0;
}
#cue-context-menu [role='alert'] {
  color: #e4b4a5;
  font-size: 11px;
  padding: 4px 8px;
  max-width: 240px;
}
/* Shared compact menu surface; toolbar property/type selects retain native controls. */
:root {
  --menu-bg: #292929;
  --menu-border: #454545;
  --menu-shadow: 0 6px 18px #0008;
}
.studio-menu {
  position: relative;
}
.studio-menu > summary {
  padding: 7px 10px;
  border: 1px solid #494949;
  background: #2a2a2a;
  cursor: pointer;
  list-style: none;
  white-space: nowrap;
}
.studio-menu > summary::-webkit-details-marker {
  display: none;
}
.studio-menu > summary:hover,
.studio-menu[open] > summary {
  background: #414141;
}
.studio-menu > summary[aria-disabled='true'] {
  opacity: 0.35;
  cursor: default;
}
.studio-menu-items,
.file-menu-items,
.light-action-items {
  position: absolute;
  top: 100%;
  right: 0;
  min-width: 205px;
  padding: 5px;
  background: var(--menu-bg);
  border: 1px solid var(--menu-border);
  box-shadow: var(--menu-shadow);
  z-index: 220;
}
.studio-menu-items button,
#cue-context-menu > button {
  display: block;
  width: 100%;
  border: 0;
  padding: 10px 12px;
  text-align: left;
  background: transparent;
}
.studio-menu-items button:hover,
#cue-context-menu > button:hover {
  background: #454545;
}
.studio-menu-items button.active {
  background: #494949;
}
.select-menu .studio-menu-items {
  left: 0;
  right: auto;
  min-width: 150px;
}
.select-menu summary {
  min-width: 100px;
}
#cue-context-menu,
#light-panel {
  background: var(--menu-bg);
  border-color: var(--menu-border);
  box-shadow: var(--menu-shadow);
  border-radius: 0;
}
#light-panel {
  width: 304px;
}
#light-panel > header {
  background: var(--menu-bg);
  padding: 8px 10px;
  border-bottom: 1px solid #494949;
}
#light-panel-content:has(.quick-light-controls) {
  padding: 8px 10px 10px;
  overflow: visible;
}
#light-panel:has(.quick-light-controls) {
  overflow: visible;
}
#light-panel-content .quick-slider {
  display: grid;
  grid-template-columns: 48px 1fr 48px;
  gap: 8px;
  margin: 8px 0 12px;
}
#light-panel-content .quick-slider input[type='range'] {
  width: 100%;
  padding: 0;
  accent-color: #ccc;
  border: 0;
  background: none;
}
#light-panel-content .quick-slider input[type='number'] {
  width: 48px;
  padding: 5px 3px;
  text-align: right;
}
.quick-color {
  border-top: 1px solid #474747;
  border-bottom: 1px solid #474747;
  padding: 8px 0 10px;
  margin-bottom: 12px;
}
.quick-color-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 7px;
}
#light-panel-content .quick-color input[type='color'] {
  width: 48px;
  height: 26px;
  padding: 2px;
}
.quick-palette {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 4px;
}
.quick-palette .color-swatch {
  width: 100%;
  height: 18px;
  min-width: 0;
  background: var(--swatch);
}
.quick-palette .color-swatch:hover {
  background: var(--swatch);
  outline: 1px solid #ddd;
}
.quick-extra {
  border-top: 1px solid #474747;
  padding-top: 8px;
  margin-top: 8px;
}
.quick-extra > summary {
  color: #bbb;
  cursor: pointer;
  font-size: 11px;
}
.quick-position {
  display: flex;
  gap: 10px;
}
#light-panel-content .quick-position label {
  flex: 1;
  gap: 4px;
}
#light-panel-content .quick-position input {
  width: 68px;
}
.quick-actions {
  display: flex;
  align-items: center;
  gap: 5px;
  border-top: 1px solid #474747;
  margin-top: 10px;
  padding-top: 9px;
}
.quick-actions button,
.quick-actions summary {
  font-size: 11px;
  padding: 5px 7px;
}
.quick-more {
  margin-left: auto;
}
.quick-more .studio-menu-items {
  min-width: 110px;
}
#color-picker-popover {
  position: fixed;
  z-index: 350;
  width: 252px;
  padding: 8px;
  background: var(--menu-bg);
  border: 1px solid var(--menu-border);
  box-shadow: var(--menu-shadow);
}
#color-picker-popover > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 6px;
  font-size: 12px;
}
#color-picker-popover > header button {
  padding: 0 4px;
  border: 0;
  background: none;
  font-size: 18px;
}
.hsb-picker {
  width: 100%;
  min-width: 0;
}
.hsb-square {
  height: 140px;
  position: relative;
  background:
    linear-gradient(to top, #000, transparent), linear-gradient(to right, #fff, transparent),
    hsl(var(--hue) 100% 50%);
  cursor: crosshair;
  touch-action: none;
}
.hsb-cursor {
  position: absolute;
  width: 9px;
  height: 9px;
  border: 1px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 1px #222;
  transform: translate(-50%, -50%);
  pointer-events: none;
}
.hsb-hue-row {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 9px 0;
  font-size: 11px;
}
.hsb-hue-row input {
  flex: 1;
  min-width: 0;
  width: 100%;
  height: 12px;
  accent-color: #ccc;
}
.hsb-fields {
  display: flex;
  gap: 6px;
  margin-bottom: 8px;
}
.hsb-fields label {
  flex: 1;
  min-width: 0;
  font-size: 10px;
}
.hsb-picker input[type='number'] {
  width: 100%;
  min-width: 0;
  border: 1px solid #555;
  background: #222;
  padding: 5px 3px;
  margin-top: 3px;
}
.hsb-hex-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.hsb-preview {
  width: 34px;
  height: 30px;
  border: 1px solid #666;
}
.hsb-hex-row label {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
}
.hsb-picker .hsb-hex {
  width: 100%;
  min-width: 0;
  border: 1px solid #555;
  background: #222;
  padding: 5px;
}
.hsb-presets {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 3px;
  margin-top: 9px;
}
.hsb-presets .color-swatch {
  min-width: 0;
  width: 100%;
  height: 16px;
  background: var(--swatch);
  padding: 0;
  border: 1px solid #777;
}
.palette-editor {
  padding: 5px;
  display: block;
  width: 248px;
}
.palette-editor > b {
  display: block;
  margin-bottom: 8px;
}
.palette-editor > small {
  display: block;
  margin: 8px 0;
}
.palette-editor > button {
  text-align: center !important;
  background: #444;
}
.rgb-fields {
  display: flex;
  gap: 6px;
  margin-bottom: 8px;
}
.rgb-fields label {
  flex: 1;
  min-width: 0;
  font-size: 10px;
}
#cue-panel > .panel-heading {
  gap: 3px;
  padding: 0 5px 0 12px;
}
#cue-panel > .panel-heading > b {
  font-size: 11px;
  flex: 1;
  min-width: 0;
}
#cue-panel > .panel-heading > button {
  flex-shrink: 0;
  font-size: 10px;
  padding: 3px 2px;
}
#cue-panel > .panel-heading > button svg {
  width: 14px;
  height: 14px;
}
.cue-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cue-row {
  gap: 6px;
  padding-right: 5px;
}
.cue-rename {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 24px;
  flex-shrink: 0;
  padding: 3px;
  border: 0;
  background: none;
  visibility: hidden;
}
.cue-row.active .cue-rename,
.cue-row:hover .cue-rename,
.cue-row:focus-within .cue-rename {
  visibility: visible;
}
.cue-row.running {
  box-shadow: inset 2px 0 #9ebc8a;
}
#notes-panel {
  position: relative;
}
#notes-resize {
  position: absolute;
  top: -4px;
  height: 8px;
  left: 0;
  right: 0;
  cursor: ns-resize;
  touch-action: none;
  z-index: 4;
}
#notes-resize::after {
  content: '';
  display: block;
  height: 2px;
  width: 36px;
  margin: 3px auto;
  background: #666;
}
#notes-resize:hover::after,
#notes-resize:focus-visible::after {
  background: #ccc;
}
#cue-note {
  min-height: 0;
}
#run-next {
  flex: 1;
  font-size: 11px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#light-tooltip {
  position: fixed;
  z-index: 400;
  pointer-events: none;
  max-width: 290px;
  background: #292929f5;
  color: #ddd;
  border: 1px solid #555;
  padding: 7px 9px;
  box-shadow: 0 3px 12px #0006;
  font-size: 10px;
  line-height: 1.6;
}
#light-tooltip b {
  font-weight: 500;
  color: #fff;
}
#light-tooltip i {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 4px;
  border: 1px solid #999;
}
.actor-selection-ring {
  stroke: transparent;
  stroke-width: 1.4px;
  vector-effect: non-scaling-stroke;
  pointer-events: none;
}
.stage-actor.selected .actor-selection-ring {
  stroke: #f2d49b;
}
body.cue-running #run-bar {
  padding: 7px 9px;
}
body.cue-running #run-next {
  color: #ddd;
}
body.cue-running #run-next-button {
  min-width: 66px;
}
.actor-clipboard {
  display: flex;
  gap: 5px;
  border-top: 1px solid #484848;
  padding-top: 8px;
}
.actor-clipboard button {
  padding: 5px 7px;
  font-size: 11px;
}
.actor-clipboard #actor-delete {
  margin-left: auto;
}

/* Numeric entry retains the former percentage readout surface. */
#property-toolbar .property-readout {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 49px;
  padding: 8px 3px;
  border: 1px solid #464646;
}
#property-toolbar .property-readout input[type='number'] {
  width: 32px;
  min-width: 0;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  font: inherit;
  text-align: right;
  appearance: textfield;
  -moz-appearance: textfield;
}
#property-toolbar .property-readout input::-webkit-inner-spin-button,
#property-toolbar .property-readout input::-webkit-outer-spin-button {
  appearance: none;
  margin: 0;
}
#property-toolbar .property-readout:focus-within {
  border-color: #aaa;
}
#file-menu > summary {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 42px;
  padding: 0 16px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
}
#file-menu > summary:hover,
#file-menu[open] > summary {
  background: #ffffff0a;
  border-bottom-color: #a5a5a5;
}
#file-menu .file-menu-items #import {
  margin-top: 5px;
  padding-top: 15px;
  border-top: 1px solid #444;
}

.select-menu:has(> #property-kind) {
  min-width: 112px;
}
.select-menu:has(> #property-kind) > summary {
  min-height: 34px;
}
#pdf-panel {
  position: relative;
}
#pdf-resize {
  position: absolute;
  left: -6px;
  top: 0;
  bottom: 0;
  width: 10px;
  cursor: col-resize;
  touch-action: none;
  z-index: 10;
}
#pdf-resize:hover,
#pdf-resize:focus-visible {
  background: #aaaaaa33;
}
body.resizing-pdf {
  cursor: col-resize;
  user-select: none;
}
body.resizing-pdf iframe {
  pointer-events: none;
}
.history-button {
  border: 0;
  background: transparent;
  font-size: 11px;
}
.history-list {
  display: flex;
  flex-direction: column;
  gap: 3px;
  max-height: 50dvh;
  overflow: auto;
}
.history-list button {
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-align: left;
  gap: 24px;
  padding: 10px 12px;
}
.history-list small {
  color: #aaa;
  white-space: nowrap;
}
#pointer svg,
#marquee svg {
  display: block;
  margin: auto;
}

.brand input:hover {
  background: #ffffff08;
  border-color: #555;
}
.brand input:focus {
  background: #292929;
  border-color: #858585;
}
.selection-actions {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  gap: 2px;
}
.selection-actions button,
#stage-reset-defaults,
#property-effect,
#light-actions > summary {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px;
  border: 0;
  background: transparent;
  color: #bdbdbd;
  font-size: 11px;
}
.selection-actions button:hover,
#stage-reset-defaults:hover,
#property-effect:hover,
#light-actions > summary:hover,
#light-actions[open] > summary {
  background: #ffffff0a;
  color: #fff;
}
.selection-actions svg,
#property-effect svg,
#light-actions > summary svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.2;
}
#history svg {
  display: block;
}
.tool-group #marquee svg {
  width: 24px;
  height: 24px;
}

#fullscreen svg {
  display: block;
}
#fullscreen[aria-pressed='true'] {
  background: #ffffff12;
}

#cue-context-menu.cue-flow-panel {
  width: 285px;
  padding: 14px;
  display: grid;
  gap: 10px;
  max-height: calc(100vh - 16px);
  overflow: auto;
}
.cue-flow-panel label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.cue-flow-panel input,
.cue-flow-panel select {
  width: 145px;
  min-width: 0;
}
.cue-flow-panel small {
  font-size: 11px;
  color: #bcbcbc;
  line-height: 1.6;
}
.cue-flow-badge {
  font-size: 10px;
  color: #c4b8df;
  margin-left: auto;
  white-space: nowrap;
}

#run-next-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}
#run-next-button svg {
  flex: none;
}
input[type='range'] {
  appearance: none;
  -webkit-appearance: none;
  height: 4px;
  background: linear-gradient(
    to right,
    #d2d2d2 0 var(--range-fill, 0%),
    #505050 var(--range-fill, 0%) 100%
  );
  border: 0;
  border-radius: 2px;
  padding: 0;
}
input[type='range']::-webkit-slider-thumb::-webkit-slider-thumb {
  appearance: none;
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ddd;
  border: 0;
}
input[type='range']::-moz-range-thumb::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ddd;
  border: 0;
}

#editor-tools input[type='range'],
#stage-brightness {
  height: 4px;
}

.cue-row.multi-selected {
  background: #454545;
  box-shadow: inset 2px 0 #a6a6a6;
}
.cue-row.multi-selected.active {
  background: #535353;
}

/* Shared dropdown surfaces scroll instead of escaping the visible workspace. */
.studio-menu-items {
  box-sizing: border-box;
  max-height: min(360px, calc(100dvh - 16px));
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  color: inherit;
}
.studio-menu-items button {
  white-space: normal;
  overflow-wrap: anywhere;
}
.studio-menu-items button.has-preview {
  display: flex;
  align-items: center;
  gap: 10px;
}
.studio-menu-items button.has-preview img {
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  object-fit: contain;
  background: #111;
  border: 1px solid #555;
}
.transfer-primary {
  background: #ddd;
  color: #202020;
  border-color: #ddd;
  white-space: nowrap;
}
.transfer-primary:hover {
  background: white;
}
.transfer-primary:disabled {
  opacity: 0.4;
}
.transfer-grip {
  cursor: grab;
  color: #aaa;
}
.transfer-badge {
  font-size: 11px;
  color: #d9c798;
  margin-right: 8px;
}
.transfer-muted {
  color: #aaa;
  font-size: 12px;
  line-height: 1.65;
}
.transfer-guide {
  margin: 16px 0;
}
.transfer-guide p,
.transfer-guide li {
  color: #bbb;
  line-height: 1.7;
}
.transfer-guide ol {
  padding-left: 22px;
}
.transfer-guide pre {
  overflow: auto;
}
.transfer-footer {
  display: flex;
  align-items: center;
  gap: 10px;
  border-top: 1px solid #444;
  padding-top: 16px;
  margin-top: 20px;
}
.transfer-footer > span {
  flex: 1;
  min-width: 0;
}
#transfer-error {
  color: #e4b58c;
  line-height: 1.6;
}
.other-fixed-target:hover circle {
  fill: #b18a3e;
}
/* Shared compact control hints and clear insertion targets. */
.control-tooltip {
  position: fixed;
  inset: auto;
  margin: 0;
  max-width: 300px;
  padding: 9px 12px;
  background: #272727;
  color: #eee;
  border: 1px solid #555;
  border-radius: 5px;
  box-shadow: 0 4px 16px #0005;
  font-family: inherit;
  line-height: 1.5;
  font-size: 12px;
  pointer-events: none;
  white-space: pre-line;
}
.fixture-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 9px;
  min-width: 133px;
}
.fixture-toggle [data-type] {
  color: #888;
  font-size: 12px;
}
.fixture-toggle [data-type].active {
  color: #fff;
  font-weight: 600;
}
.fixture-toggle > :nth-child(2) {
  color: #b6a587;
}
.history-entry {
  border-bottom: 1px solid #ffffff12;
  padding: 5px 0;
}
.history-list .history-entry > button {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border: 0;
  background: transparent;
  text-align: left;
  padding: 9px 10px;
}
.history-entry[aria-current] {
  border-left: 2px solid #b8b8b8;
}
.history-entry details {
  padding: 0 10px 8px;
  font-size: 12px;
  color: #aaa;
}
.history-entry details p {
  margin: 6px 0;
  overflow-wrap: anywhere;
  color: #ddd;
}
.history-entry summary {
  cursor: pointer;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 0;
  list-style: none;
}
.history-entry summary::-webkit-details-marker {
  display: none;
}
.history-entry summary::before {
  content: '▸';
  color: #b9ad98;
}
.history-entry details[open] summary::before {
  content: '▾';
}
.history-entry summary span {
  flex: 1;
  overflow-wrap: anywhere;
}
.history-entry summary small {
  flex-shrink: 0;
}
.history-entry details > button {
  margin-top: 6px;
}
.library-save[hidden] {
  display: none;
}
.asset-prompt-text {
  width: 100%;
  min-height: 370px;
  font-size: 12px;
}
.asset-format-example {
  overflow: auto;
  max-height: 55vh;
  font-size: 12px;
  padding: 12px;
  background: #151515;
}
.history-list .history-entry > button {
  white-space: normal;
  min-width: 0;
}
.history-entry > button > span {
  min-width: 0;
  overflow-wrap: anywhere;
}
.history-entry > button > small {
  flex-shrink: 0;
}
.history-list .history-entry > button:disabled {
  opacity: 1;
  color: #e2d4bc;
}
.effect-scope-note {
  color: #a7a39a;
  font-size: 10px;
  width: 100%;
  padding: 2px 0 0;
}
#stage-image-toggle {
  font-size: 11px;
  background: transparent;
}
#stage-image-toggle[aria-pressed='true'] {
  color: #dfc69d;
}
#property-values:has([data-effect]) {
  flex-wrap: wrap;
}
.cue-row {
  touch-action: none;
  user-select: none;
}
.cue-insertion-marker {
  position: fixed;
  z-index: 999;
  pointer-events: none;
  border-top: 3px solid #e4bd79;
  color: #e4bd79;
  font-size: 10px;
  text-align: right;
  padding-right: 8px;
}
.installation-table {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  align-items: center;
  font-size: 12px;
}
.installation-table input {
  min-width: 0;
  width: 100%;
}

#reset-browser {
  border-top: 1px solid #ffffff14;
  margin-top: 6px;
  padding-top: 12px;
}

/* Sequence import / XML merge: source cards on the left, final cue strip on the right. */
dialog.sx-dialog {
  width: min(1120px, calc(100vw - 32px));
  max-width: none;
}
dialog.sx-dialog #dialog-content {
  padding: 16px 20px 14px;
  line-height: 1.5;
}
.sx {
  --sx-line: #3d3d3d;
}
.sx-intro {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 14px;
}
#dialog-content .sx-intro p {
  flex: 1;
  margin: 0;
  color: #c4c4c4;
}
.sx-body {
  display: grid;
  grid-template-columns: minmax(300px, 380px) 1fr;
  gap: 14px;
  height: min(62dvh, 640px);
  min-height: 320px;
}
.sx-sources,
.sx-order {
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.sx-sources {
  overflow: auto;
  padding-right: 4px;
  gap: 8px;
}
#sx-cards {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Source rows: same look as the other transfer lists. */
.sx-card {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 12px;
  border: 1px solid #484848;
  background: #303030;
}
.sx-card[draggable='true'] {
  cursor: grab;
}
.sx-card.is-off {
  opacity: 0.5;
}
/* Merge: the file's color runs down the card's left edge, like its cues on the right. */
.sx-card[style*='--c'] {
  box-shadow: inset 3px 0 var(--c);
}
.sx-card.is-placing {
  border-color: #aaa;
}
.sx-card > div {
  flex: 1;
  min-width: 0;
}
.sx-card b {
  display: block;
  font-weight: 500;
  overflow-wrap: anywhere;
}
.sx-card small {
  display: block;
  margin-top: 5px;
  color: #aaa;
}
.sx-card.is-failed small {
  color: #e4b58c;
}
.sx-card > button {
  padding: 5px 8px;
}
#dialog-content .sx-card input[type='checkbox'] {
  width: 14px;
  min-width: 14px;
  height: 14px;
  margin: 0;
  padding: 0;
}
.sx-icon {
  border: 0;
  background: none;
  padding: 0 4px;
  font-size: 16px;
  line-height: 1;
  color: #aaa;
}
.sx-icon:hover {
  background: none;
  color: #fff;
}
.sx-link {
  border: 0;
  background: none;
  padding: 0 2px;
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.sx-link:hover {
  background: none;
  color: #fff;
}
.sx-drop {
  padding: 32px 14px;
  border: 1px dashed #555;
  color: #9a9a9a;
  text-align: center;
  line-height: 1.7;
}
.sx-drop[hidden],
#sx-notes[hidden] {
  display: none;
}
.sx.is-file-over .sx-body {
  outline: 1px dashed #aaa;
  outline-offset: 4px;
}
#sx-notes ul {
  margin: 6px 0 0;
  padding-left: 18px;
  color: #bbb;
  line-height: 1.7;
}
.sx-sources .transfer-guide {
  margin: 4px 0 0;
}

/* Final order */
.sx-order {
  border: 1px solid #444;
  background: #252525;
}
.sx-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--sx-line);
}
.sx-legend {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #a9a9a9;
  font-size: 11px;
}
.sx-strip {
  flex: 1;
  min-height: 0;
  overflow: auto;
  margin: 0;
  padding: 4px 0 10px;
  list-style: none;
}
.sx-empty {
  padding: 30px 14px;
  color: #999;
  text-align: center;
}
.sx-row {
  box-shadow: inset 3px 0 var(--c, transparent);
  display: grid;
  grid-template-columns: 18px 46px minmax(0, 1fr) auto 64px 20px;
  align-items: center;
  gap: 2px 10px;
  margin: 0 8px;
  padding: 5px 8px 5px 10px;
  font-variant-numeric: tabular-nums;
}
.sx-row:nth-child(4n + 2) {
  background: #2a2a2a;
}
.sx-row.is-start {
  margin-top: 6px;
  border-top: 1px solid #3a3a3a;
}
.sx-row.is-focus {
  background: #333;
}
.sx-row.is-flash {
  animation: sx-flash 1.2s ease-out;
}
@keyframes sx-flash {
  from {
    background: #444;
  }
}
.sx-num {
  color: #e2e2e2;
}
.sx-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #cfcfcf;
}
.sx-src {
  max-width: 180px;
  color: var(--c, #999);
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: grab;
}
.sx-state {
  justify-self: end;
  font-size: 11px;
  color: #777;
}
.sx-problem {
  grid-column: 2 / -1;
  color: #e4b58c;
  font-size: 11px;
  line-height: 1.4;
}
/* Insertion gaps appear only while placing a source. */
.sx-gap {
  height: 0;
  margin: 0 8px;
  overflow: hidden;
  transition: height 0.12s;
}
.sx-strip.is-targeting .sx-gap {
  height: 22px;
  overflow: visible;
}
.sx-gap button {
  display: none;
  width: 100%;
  height: 18px;
  margin-top: 2px;
  padding: 0;
  border: 1px dashed #5b5b5b;
  background: transparent;
  color: #8d8d8d;
  font-size: 11px;
  line-height: 1;
}
.sx-strip.is-targeting .sx-gap button {
  display: block;
}
.sx-gap button:hover,
.sx-gap button:focus-visible,
.sx-gap.is-drop button {
  border: 1px solid #aaa;
  background: #3a3a3a;
  color: #fff;
}
/* Footer */
.sx-footer {
  margin-top: 14px;
  padding-top: 12px;
}
.sx-footer > span {
  color: #bdbdbd;
}
#dialog-content .sx-error {
  min-height: 1em;
  margin: 8px 0 0;
  color: #e4b58c;
}

/* Merge rows: grip, number, name, source, original number, remove */
.sx-row[draggable='true'] {
  cursor: grab;
}
.sx-row .sx-grip {
  border: 0;
  background: none;
  padding: 0;
  color: #7c7c7c;
  cursor: grab;
}
.sx-row .sx-grip:hover {
  background: none;
  color: #e2e2e2;
}
.sx-row.is-placing {
  outline: 1px solid #aaa;
  outline-offset: -1px;
}
.sx-orig {
  justify-self: end;
  font-size: 11px;
  color: #777;
}
.sx-row .sx-icon {
  opacity: 0;
}
.sx-row:hover .sx-icon,
.sx-row .sx-icon:focus-visible {
  opacity: 1;
}
.sx-toolbar > b {
  font-weight: 600;
}

/* Import: groups after the import */
.sx-group {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto 40px;
  align-items: center;
  gap: 2px 10px;
  margin: 0 8px;
  padding: 7px 8px 7px 10px;
  color: #9a9a9a;
}
.sx-group + .sx-group {
  border-top: 1px solid #333;
}
.sx-group.is-new {
  color: #fff;
  background: #454545;
  box-shadow: inset 2px 0 #a6a6a6;
}
.sx-group.is-new + .sx-group.is-new {
  border-top-color: #505050;
}
.sx-group.is-new .sx-state {
  color: #ddd;
}
.sx-group .sx-num {
  color: inherit;
  font-weight: 600;
}
.sx-count {
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

/* Sequence export */
dialog.xe-dialog {
  width: min(620px, calc(100vw - 32px));
  max-width: none;
}
dialog.xe-dialog #dialog-content {
  padding: 6px 20px 16px;
  line-height: 1.5;
}
.xe-section {
  padding: 12px 0;
  border-bottom: 1px solid #3d3d3d;
}
.xe-section[hidden] {
  display: none;
}
.xe-section h3 {
  margin: 0 0 8px;
  font-size: 11px;
  font-weight: 600;
  color: #8f8f8f;
  letter-spacing: 0.04em;
}
.xe-scopes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}
.xe-scopes button {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 7px 10px;
  border-radius: 0;
  text-align: left;
  white-space: normal;
}
.xe-scopes button + button {
  border-left: 0;
}
.xe-scopes button b {
  font-weight: 600;
}
.xe-scopes button small {
  color: #9a9a9a;
  font-variant-numeric: tabular-nums;
}
.xe-scopes button.active {
  background: #d9d9d9;
  border-color: #d9d9d9;
  color: #1f1f1f;
}
.xe-scopes button.active small {
  color: #474747;
}
.xe-name {
  display: flex;
  align-items: center;
  gap: 6px;
}
#dialog-content .xe-name input {
  flex: 1;
  min-width: 0;
}
.xe-name span {
  color: #aaa;
}
#dialog-content .xe-check {
  justify-content: flex-start;
  gap: 8px;
  margin: 10px 0 0;
  color: #c4c4c4;
}
#dialog-content .xe-check input {
  width: 14px;
  min-width: 14px;
  height: 14px;
  margin: 0;
  padding: 0;
}
.xe-checks {
  margin: 0;
  padding: 0;
  list-style: none;
}
.xe-checks li {
  position: relative;
  padding: 4px 0 4px 22px;
  color: #cfcfcf;
}
.xe-checks li::before {
  position: absolute;
  left: 2px;
  top: 4px;
  width: 14px;
  text-align: center;
  font-weight: 700;
}
.xe-checks .is-ok::before {
  content: '✓';
  color: #93c48b;
}
.xe-checks .is-warn::before {
  content: '!';
  color: #e0b07a;
}
.xe-checks .is-info::before {
  content: 'i';
  color: #8fbfe0;
}
.xe-checks .is-bad::before {
  content: '✕';
  color: #e57f73;
}
.xe-checks .is-pending {
  color: #8f8f8f;
}
.xe-checks .is-pending::before {
  content: '…';
}
.xe-checks details {
  margin: 4px 0;
}
.xe-checks details > div,
.xe-checks details > .sx-link {
  display: block;
  margin: 3px 0 3px 12px;
}
.xe-checks details small {
  display: block;
  color: #9a9a9a;
}
.xe-hint {
  display: block;
  color: #9a9a9a;
  font-size: 11px;
}
.xe-guide {
  border-bottom: 0;
}
/* Console command guides share one look in import and export. */
.cmd-guide {
  margin: 0;
  padding-left: 20px;
  color: #bbb;
  line-height: 1.7;
}
.transfer-guide .cmd-guide {
  margin-top: 8px;
}
.cmd-guide pre {
  margin: 4px 0 6px;
  padding: 7px 10px;
  background: #1d1d1d;
  border: 1px solid #3f3f3f;
  color: #ddd;
  font:
    12px/1.6 Menlo,
    Consolas,
    monospace;
  white-space: pre-wrap;
}
.cmd-guide code {
  color: #ddd;
}
.xe .transfer-footer {
  margin-top: 8px;
}

