body.mode-drone-show-editor {
  height: 100vh;
  overflow: hidden;
}

body.mode-drone-show-editor header,
body.mode-drone-show-editor footer {
  flex: 0 0 auto;
}

body.mode-drone-show-editor #mainContent {
  flex: 1 1 auto;
  min-height: 0;
  padding: 10px clamp(8px, 1vw, 16px);
  overflow: hidden;
}

.dse-root {
  --dse-bg: #080a14;
  --dse-panel: #101426;
  --dse-panel-soft: #151a30;
  --dse-line: rgba(255, 255, 255, .1);
  --dse-muted: #a2a8ba;
  --dse-text: #f6f7fb;
  --dse-cyan: #52e2d0;
  --dse-violet: #9b87ff;
  --dse-amber: #ffd36e;
  --dse-danger: #ff7285;
  display: grid;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  grid-template-rows: auto minmax(280px, 1fr) minmax(220px, 30vh);
  overflow: hidden;
  color: var(--dse-text);
  background: var(--dse-bg);
  border: 1px solid var(--dse-line);
  border-radius: 8px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, .28);
}

.dse-root *,
.dse-root *::before,
.dse-root *::after {
  box-sizing: border-box;
}

.dse-root button,
.dse-root input,
.dse-root select {
  font: inherit;
}

.dse-root button {
  color: inherit;
}

.dse-toolbar {
  z-index: 8;
  display: grid;
  min-height: 62px;
  padding: 8px 12px;
  grid-template-columns: minmax(210px, .7fr) auto minmax(250px, .8fr);
  align-items: center;
  gap: 12px;
  background: #11162a;
  border-bottom: 1px solid var(--dse-line);
}

.dse-title {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.dse-title span {
  color: var(--dse-cyan);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .14em;
}

.dse-title input {
  width: min(330px, 100%);
  min-height: 31px;
  padding: 0 8px;
  color: #fff;
  background: rgba(255, 255, 255, .035);
  border: 1px solid transparent;
  border-radius: 7px;
  outline: none;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0;
}

.dse-title input:focus {
  border-color: rgba(82, 226, 208, .45);
}

.dse-toolbar-actions,
.dse-render-settings,
.dse-stage-tools,
.dse-timebar,
.dse-audiobar {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 6px;
}

.dse-toolbar-actions {
  justify-content: center;
}

.dse-toolbar-menu {
  position: relative;
}

.dse-menu-button {
  min-height: 36px;
  padding: 0 12px;
  color: #e9ecff;
  background: rgba(255, 255, 255, .045);
  border: 1px solid rgba(255, 255, 255, .075);
  border-radius: 7px;
  cursor: pointer;
  font-size: 10px;
  font-weight: 850;
}

.dse-menu-button:hover,
.dse-toolbar-menu.is-open .dse-menu-button {
  background: rgba(155, 135, 255, .14);
  border-color: rgba(155, 135, 255, .32);
}

.dse-toolbar-menu-panel {
  position: absolute;
  z-index: 40;
  top: calc(100% + 8px);
  left: 0;
  display: none;
  min-width: 178px;
  padding: 6px;
  background: #101426;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 8px;
  box-shadow: 0 18px 38px rgba(0, 0, 0, .38);
}

.dse-toolbar-menu.is-open .dse-toolbar-menu-panel {
  display: grid;
  gap: 4px;
}

.dse-menu-action {
  min-height: 30px;
  padding: 0 9px;
  color: #eef2ff;
  background: transparent;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  font-size: 10px;
  font-weight: 750;
  text-align: left;
}

.dse-menu-action:hover {
  background: rgba(82, 226, 208, .12);
}

.dse-menu-action:disabled {
  opacity: .45;
  cursor: not-allowed;
}

.dse-render-settings {
  justify-content: flex-end;
}

.dse-render-settings label,
.dse-stage-tools label,
.dse-timebar label,
.dse-audiobar label {
  display: grid;
  min-width: 0;
  gap: 3px;
  color: var(--dse-muted);
  font-size: 8px;
  font-weight: 800;
}

.dse-render-settings select,
.dse-render-settings input,
.dse-timebar input,
.dse-timebar select,
.dse-audiobar input {
  min-height: 30px;
  min-width: 70px;
  padding: 5px 7px;
  color: #fff;
  background: rgba(7, 9, 20, .82);
  border: 1px solid var(--dse-line);
  border-radius: 7px;
  outline: none;
  font-size: 10px;
}

.dse-icon-button {
  display: grid;
  min-width: 43px;
  height: 43px;
  padding: 4px 7px;
  place-items: center;
  gap: 1px;
  background: rgba(255, 255, 255, .035);
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
}

.dse-icon-button:hover {
  background: rgba(155, 135, 255, .12);
  border-color: rgba(155, 135, 255, .28);
}

.dse-icon-button:disabled {
  opacity: .42;
  cursor: not-allowed;
}

.dse-icon-button:disabled:hover {
  background: rgba(255, 255, 255, .035);
  border-color: transparent;
}

.dse-icon-button span {
  color: #d8d2ff;
  font-size: 18px;
  line-height: 1;
}

.dse-icon-button small {
  color: #bdc3d2;
  font-size: 8px;
  font-weight: 750;
  white-space: nowrap;
}

.dse-workspace {
  display: grid;
  min-width: 0;
  min-height: 0;
  grid-template-columns: 230px minmax(420px, 1fr) 300px;
  overflow: hidden;
}

.dse-panel {
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: var(--dse-panel);
}

.dse-left {
  display: grid;
  grid-template-rows: auto minmax(90px, .42fr) auto minmax(120px, .58fr);
  border-right: 1px solid var(--dse-line);
}

.dse-right {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  border-left: 1px solid var(--dse-line);
}

.dse-panel-heading {
  display: flex;
  min-height: 41px;
  padding: 8px 10px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--dse-line);
  color: #e8eaf4;
  font-size: 10px;
  font-weight: 900;
}

.dse-panel-heading button {
  width: 26px;
  height: 26px;
  padding: 0;
  color: #07120f;
  background: var(--dse-cyan);
  border: 0;
  border-radius: 7px;
  cursor: grab;
  font-size: 17px;
}

.dse-panel-heading span:last-child:not(:first-child) {
  padding: 4px 7px;
  color: #d8d1ff;
  background: rgba(155, 135, 255, .1);
  border: 1px solid rgba(155, 135, 255, .18);
  border-radius: 8px;
  font-size: 8px;
}

.dse-list,
.dse-inspector {
  min-height: 0;
  overflow: auto;
}

.dse-list {
  padding: 7px;
}

.dse-list-row {
  display: grid;
  width: 100%;
  min-height: 42px;
  padding: 6px;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  text-align: left;
}

.dse-list-row:hover {
  background: rgba(255, 255, 255, .035);
}

.dse-list-row.is-selected {
  background: rgba(155, 135, 255, .14);
  border-color: rgba(155, 135, 255, .26);
}

.dse-group-row {
  padding-left: calc(6px + var(--indent, 0px));
}

.dse-group-row[data-depth]:not([data-depth="0"]) {
  border-left-color: rgba(82, 226, 208, .22);
}

.dse-list-row strong,
.dse-list-row small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dse-list-row strong {
  font-size: 10px;
  font-weight: 800;
}

.dse-list-row small {
  color: var(--dse-muted);
  font-size: 8px;
}

.dse-swatch {
  width: 18px;
  height: 18px;
  background: var(--swatch);
  border: 2px solid rgba(255, 255, 255, .75);
  border-radius: 6px;
  box-shadow: 0 0 12px color-mix(in srgb, var(--swatch), transparent 45%);
}

.dse-stage {
  display: grid;
  min-width: 0;
  min-height: 0;
  grid-template-rows: 40px minmax(0, 1fr);
  background: #070914;
}

.dse-stage-tools {
  padding: 5px 8px;
  justify-content: space-between;
  background: #0f1428;
  border-bottom: 1px solid var(--dse-line);
}

.dse-stage-tools label {
  display: flex;
  align-items: center;
  gap: 4px;
}

.dse-stage-tools input {
  accent-color: var(--dse-violet);
}

.dse-segmented {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 3px;
  padding: 3px;
  background: rgba(7, 9, 20, .75);
  border: 1px solid var(--dse-line);
  border-radius: 8px;
}

.dse-segmented button {
  min-height: 26px;
  padding: 4px 8px;
  color: var(--dse-muted);
  background: transparent;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  font-size: 8px;
  font-weight: 800;
}

.dse-segmented button.is-active {
  color: #fff;
  background: rgba(155, 135, 255, .2);
}

.dse-gizmo-tools {
  display: grid;
  grid-template-columns: repeat(2, minmax(58px, 1fr));
  gap: 3px;
  padding: 3px;
  background: rgba(7, 9, 20, .75);
  border: 1px solid var(--dse-line);
  border-radius: 8px;
}

.dse-gizmo-tools button {
  min-height: 26px;
  padding: 4px 7px;
  color: var(--dse-muted);
  background: transparent;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  font-size: 8px;
  font-weight: 800;
}

.dse-gizmo-tools button.is-active {
  color: #07120f;
  background: var(--dse-cyan);
}

.dse-stage-tools .dse-stage-action {
  flex: 0 0 auto;
  min-height: 28px;
  padding: 0 10px;
  color: #e9ecff;
  background: rgba(255, 255, 255, .045);
  border: 1px solid var(--dse-line);
  border-radius: 7px;
  cursor: pointer;
  font-size: 8px;
  font-weight: 850;
  white-space: nowrap;
}

.dse-stage-tools .dse-stage-action:hover {
  color: #fff;
  background: rgba(82, 226, 208, .12);
  border-color: rgba(82, 226, 208, .32);
}

.dse-canvas-wrap {
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

#dseCanvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
}

.dse-axis {
  position: absolute;
  top: 11px;
  left: 11px;
  display: flex;
  gap: 4px;
  pointer-events: none;
}

.dse-axis span {
  display: grid;
  width: 20px;
  height: 20px;
  color: #fff;
  border-radius: 6px;
  place-items: center;
  font-size: 9px;
  font-weight: 900;
}

.dse-axis .x { background: #d94d64; }
.dse-axis .y { background: #2aa56c; }
.dse-axis .z { background: #347bc1; }

.dse-inspector {
  padding: 9px;
}

.dse-inspector-section {
  display: grid;
  gap: 8px;
  padding-bottom: 12px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--dse-line);
}

.dse-inspector-section h3 {
  margin: 0;
  color: #d9dce8;
  font-size: 10px;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.dse-note {
  margin: 0;
  color: var(--dse-muted);
  font-size: 9px;
}

.dse-inspector-section label {
  display: grid;
  gap: 4px;
  color: var(--dse-muted);
  font-size: 8px;
  font-weight: 800;
}

.dse-inspector-section input,
.dse-inspector-section select {
  width: 100%;
  min-height: 30px;
  padding: 6px 8px;
  color: #fff;
  background: rgba(7, 9, 20, .82);
  border: 1px solid var(--dse-line);
  border-radius: 7px;
  outline: none;
  font-size: 10px;
}

.dse-inspector-section input[type="color"] {
  padding: 3px;
}

.dse-check {
  display: flex !important;
  align-items: center;
  gap: 7px !important;
}

.dse-check input {
  width: auto;
  accent-color: var(--dse-violet);
}

.dse-vector {
  display: grid;
  padding: 7px;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
  background: rgba(255, 255, 255, .018);
  border: 1px solid var(--dse-line);
  border-radius: 8px;
}

.dse-vector legend {
  padding: 0 5px;
  color: var(--dse-muted);
  font-size: 8px;
  font-weight: 800;
}

.dse-vector label {
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: center;
}

.dse-vector span {
  font-size: 8px;
  font-weight: 900;
}

.dse-vector input {
  min-width: 0;
  padding-inline: 5px;
}

.dse-point-compact {
  display: grid;
  grid-template-columns: minmax(0, .85fr) minmax(0, 1fr);
  gap: 7px;
}

.dse-point-more {
  padding: 7px;
  background: rgba(255, 255, 255, .018);
  border: 1px solid var(--dse-line);
  border-radius: 8px;
}

.dse-point-more summary {
  color: #d9dce8;
  cursor: pointer;
  font-size: 9px;
  font-weight: 850;
}

.dse-point-more[open] {
  display: grid;
  gap: 7px;
}

.dse-point-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}

.dse-color-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}

.dse-inspector-section button,
.dse-timebar button,
.dse-audiobar button,
.dse-library-row button {
  min-height: 31px;
  padding: 6px 9px;
  background: rgba(255, 255, 255, .04);
  border: 1px solid var(--dse-line);
  border-radius: 7px;
  cursor: pointer;
  font-size: 9px;
  font-weight: 750;
}

.dse-primary {
  color: #07120f !important;
  background: var(--dse-cyan) !important;
  border-color: transparent !important;
}

.dse-danger {
  color: var(--dse-danger) !important;
  border-color: rgba(255, 114, 133, .25) !important;
}

.dse-timeline {
  display: grid;
  min-width: 0;
  min-height: 0;
  grid-template-rows: auto auto auto minmax(0, 1fr);
  background: #0b0d1b;
  border-top: 1px solid var(--dse-line);
}

.dse-timebar {
  padding: 7px 9px;
  border-bottom: 1px solid var(--dse-line);
}

.dse-timebar input[type="range"] {
  flex: 1 1 auto;
  min-width: 160px;
  accent-color: var(--dse-violet);
}

.dse-playback-buttons {
  display: flex;
  gap: 4px;
}

.dse-playback-buttons button {
  width: 32px;
  padding-inline: 0;
}

.dse-time-readout {
  min-width: 108px;
  color: #dfe2ee;
  font-size: 9px;
  font-variant-numeric: tabular-nums;
  font-weight: 800;
}

.dse-audiobar,
.dse-previewbar {
  display: flex;
  min-width: 0;
  padding: 6px 9px;
  align-items: center;
  gap: 7px;
  overflow-x: auto;
  border-bottom: 1px solid var(--dse-line);
}

.dse-audiobar {
  background: rgba(82, 226, 208, .035);
}

.dse-audiobar strong,
.dse-previewbar strong {
  color: var(--dse-cyan);
  font-size: 8px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.dse-audiobar label,
.dse-previewbar label {
  display: grid;
  gap: 2px;
  color: var(--dse-muted);
  font-size: 8px;
  font-weight: 800;
}

.dse-audiobar input,
.dse-previewbar input,
.dse-previewbar select {
  width: 72px;
  min-height: 27px;
  padding: 4px 6px;
  color: #fff;
  background: rgba(7, 9, 20, .82);
  border: 1px solid var(--dse-line);
  border-radius: 7px;
  outline: none;
  font-size: 9px;
}

.dse-audiobar input[type="checkbox"] {
  width: auto;
  min-height: auto;
  accent-color: var(--dse-cyan);
}

.dse-check-inline {
  display: flex !important;
  align-items: center;
  gap: 6px !important;
  white-space: nowrap;
}

#dseAudioStatus {
  max-width: 210px;
  overflow: hidden;
  color: var(--dse-muted);
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dse-audiobar button.is-active {
  color: #07120f;
  background: var(--dse-cyan);
  border-color: transparent;
}

.dse-previewbar select {
  width: 92px;
}

.dse-previewbar button {
  min-height: 29px;
  padding: 5px 8px;
  background: rgba(255, 255, 255, .04);
  border: 1px solid var(--dse-line);
  border-radius: 7px;
  cursor: pointer;
  font-size: 9px;
  font-weight: 750;
  white-space: nowrap;
}

.dse-keyframes {
  display: block;
  min-height: 0;
  padding: 0;
  overflow: auto;
}

.dse-timeline-grid {
  display: grid;
  min-width: 0;
  min-height: 100%;
  grid-template-columns: 190px minmax(0, 1fr);
}

.dse-track-labels {
  min-width: 0;
  background: #101426;
  border-right: 1px solid var(--dse-line);
}

.dse-track-label {
  display: grid;
  min-width: 0;
  padding: 5px 8px 5px calc(8px + var(--indent, 0px));
  grid-template-columns: 26px minmax(0, 1fr);
  grid-template-rows: 1fr 1fr;
  align-items: center;
  column-gap: 7px;
  border-bottom: 1px solid rgba(255, 255, 255, .055);
  cursor: pointer;
}

.dse-track-label:hover {
  background: rgba(255, 255, 255, .025);
}

.dse-track-label.is-selected {
  background: linear-gradient(90deg, rgba(155, 135, 255, .16), rgba(82, 226, 208, .04));
  box-shadow: inset 3px 0 0 var(--dse-violet);
}

.dse-track-label > span {
  overflow: hidden;
  font-size: 9px;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dse-track-label small {
  overflow: hidden;
  color: var(--dse-muted);
  font-size: 7px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dse-visibility-button {
  display: grid;
  width: 22px;
  height: 22px;
  padding: 0 !important;
  grid-row: 1 / 3;
  place-items: center;
  color: var(--dse-muted);
  background: rgba(255, 255, 255, .045) !important;
  border: 1px solid var(--dse-line) !important;
  border-radius: 7px !important;
  font-size: 9px !important;
}

.dse-visibility-button.is-visible {
  color: #07120f !important;
  background: var(--dse-cyan) !important;
  border-color: transparent !important;
}

.dse-wave-label {
  display: grid;
  padding: 8px;
  align-content: center;
  gap: 4px;
  border-top: 1px solid var(--dse-line);
}

.dse-wave-label span {
  font-size: 9px;
  font-weight: 850;
}

.dse-wave-label small {
  overflow: hidden;
  color: var(--dse-muted);
  font-size: 7px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dse-timeline-scroll {
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow: auto;
}

.dse-timeline-content {
  position: relative;
  min-height: 100%;
  background-image: linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px);
  background-size: var(--timeline-step, 80px) 100%;
}

.dse-ruler {
  position: sticky;
  z-index: 5;
  top: 0;
  background: rgba(13, 16, 32, .97);
  border-bottom: 1px solid var(--dse-line);
}

.dse-ruler span {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: rgba(255, 255, 255, .13);
}

.dse-ruler b {
  position: absolute;
  top: 7px;
  left: 5px;
  color: var(--dse-muted);
  font-size: 7px;
  font-weight: 650;
  white-space: nowrap;
}

.dse-timeline-row {
  position: absolute;
  right: 0;
  left: 0;
  background: rgba(255, 255, 255, .006);
  border-bottom: 1px solid rgba(255, 255, 255, .055);
}

.dse-timeline-row:hover {
  background: rgba(155, 135, 255, .025);
}

.dse-timeline-row.is-selected {
  background: linear-gradient(90deg, rgba(155, 135, 255, .07), transparent 70%);
}

.dse-motion-bar {
  position: absolute;
  z-index: 2;
  top: 10px;
  height: 22px;
  min-width: 8px;
  padding: 0 9px;
  overflow: hidden;
  color: #e9e6ff;
  background: linear-gradient(90deg, rgba(116, 87, 255, .76), rgba(82, 226, 208, .66));
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 7px;
  cursor: pointer;
}

.dse-motion-bar span {
  display: block;
  overflow: hidden;
  font-size: 7px;
  font-weight: 850;
  line-height: 20px;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
  pointer-events: none;
}

.dse-motion-bar.is-curve {
  background: linear-gradient(90deg, rgba(255, 211, 110, .8), rgba(82, 226, 208, .66));
  border-style: dashed;
}

.dse-motion-point {
  position: absolute;
  z-index: 5;
  top: 50%;
  display: grid;
  width: 17px;
  height: 17px;
  padding: 0;
  color: #07120f;
  background: var(--swatch);
  border: 2px solid rgba(255, 255, 255, .9);
  border-radius: 50%;
  box-shadow: 0 3px 8px rgba(0, 0, 0, .35);
  cursor: pointer;
  place-items: center;
  transform: translate(-50%, -50%);
}

.dse-motion-point span {
  font-size: 6px;
  font-weight: 900;
  pointer-events: none;
}

.dse-motion-point:active {
  cursor: grabbing;
}

.dse-motion-point:hover,
.dse-motion-point.is-related {
  width: 20px;
  height: 20px;
  box-shadow: 0 0 14px rgba(82, 226, 208, .7);
}

.dse-motion-point.is-selected {
  width: 23px;
  height: 23px;
  border-color: #ffd36e;
  box-shadow: 0 0 0 3px rgba(255, 211, 110, .22), 0 0 16px rgba(255, 211, 110, .74);
}

.dse-motion-point.is-curve span::after {
  content: "~";
  margin-left: 1px;
}

.dse-waveform-row {
  position: absolute;
  right: 0;
  left: 0;
  overflow: hidden;
  background: #090b17;
  border-top: 1px solid var(--dse-line);
}

#dseWaveformCanvas {
  display: block;
  width: 100%;
  height: 100%;
}

.dse-playhead {
  position: absolute;
  z-index: 7;
  top: 0;
  bottom: 0;
  width: 1px;
  pointer-events: none;
  background: #ffd264;
  box-shadow: 0 0 8px rgba(255, 210, 100, .65);
}

.dse-playhead::before {
  position: absolute;
  top: 0;
  left: -5px;
  width: 11px;
  height: 7px;
  content: '';
  background: #ffd264;
  clip-path: polygon(0 0, 100% 0, 50% 100%);
}

.dse-axis-buttons {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
}

.dse-axis-buttons button {
  min-width: 0;
  padding-inline: 5px;
}

.dse-empty {
  padding: 18px 10px;
  color: var(--dse-muted);
  font-size: 10px;
  text-align: center;
}

.dse-modal-backdrop {
  position: fixed;
  z-index: 2200;
  inset: 0;
  display: grid;
  padding: 24px;
  overflow: auto;
  background: rgba(2, 3, 10, .78);
  backdrop-filter: blur(8px);
  place-items: center;
}

.dse-modal {
  width: min(620px, 100%);
  max-height: min(720px, 88vh);
  display: flex;
  flex-direction: column;
  color: #eef2ff;
  font-size: 14px;
  overflow: hidden;
  background: #12172c;
  border: 1px solid rgba(155, 135, 255, .28);
  border-radius: 8px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .5);
}

.dse-modal > header {
  display: flex;
  padding: 18px 20px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--dse-line);
}

.dse-modal > header > div {
  min-width: 0;
}

.dse-modal h2 {
  margin: 0;
  font-size: 20px;
  line-height: 1.15;
}

.dse-modal header p {
  margin: 6px 0 0;
  color: var(--dse-muted);
  font-size: 13px;
  line-height: 1.45;
}

.dse-modal .dse-note {
  font-size: 12px;
  line-height: 1.45;
}

.dse-modal-kicker {
  display: block;
  margin-bottom: 5px;
  color: var(--dse-cyan);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.dse-modal > header button {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  color: #eef2ff;
  background: transparent;
  border: 0;
  cursor: pointer;
  font-size: 24px;
}

.dse-modal-body {
  display: grid;
  flex: 1 1 auto;
  min-height: 0;
  max-height: 68vh;
  padding: 20px;
  gap: 14px;
  overflow: auto;
}

.dse-modal footer {
  display: flex;
  padding: 16px 20px;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  border-top: 1px solid var(--dse-line);
}

.dse-modal footer button {
  min-height: 44px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, .04);
  border: 1px solid var(--dse-line);
  border-radius: 7px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 750;
}

.dse-modal-wide {
  width: min(820px, 100%);
}

.dse-tool-modal {
  width: min(820px, calc(100vw - 32px));
  max-height: min(780px, calc(100vh - 32px));
}

.dse-color-modal {
  width: min(720px, calc(100vw - 32px));
}

.dse-color-modal-body {
  gap: 16px;
}

.dse-tool-modal-body {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.dse-tool-card {
  display: grid;
  min-width: 0;
  align-content: start;
  gap: 13px;
  padding: 16px;
  background: rgba(255, 255, 255, .028);
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 8px;
}

.dse-tool-card-wide {
  grid-column: 1 / -1;
}

.dse-tool-card h3 {
  margin: 0;
  color: #f4f6ff;
  font-size: 15px;
}

.dse-field-row,
.dse-dimension-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.dse-field-row {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
}

.dse-auto-count {
  min-height: 34px;
  padding: 8px 10px;
  background: rgba(82, 226, 208, .055);
  border: 1px solid rgba(82, 226, 208, .18);
  border-radius: 7px;
}

.dse-auto-count input:disabled {
  opacity: .45;
  cursor: not-allowed;
}

.dse-estimate {
  margin: 0;
  padding: 9px 10px;
  color: #dffcf8;
  background: rgba(82, 226, 208, .08);
  border: 1px solid rgba(82, 226, 208, .2);
  border-radius: 7px;
  font-size: 11px;
  font-weight: 850;
}

.dse-color-picker-row {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
}

.dse-color-picker-row input[type="color"] {
  width: 64px;
  height: 48px;
  padding: 3px;
  background: rgba(7, 9, 20, .88);
  border: 1px solid var(--dse-line);
  border-radius: 8px;
  cursor: pointer;
}

.dse-color-picker-row input[type="text"] {
  min-height: 44px;
  min-width: 0;
  padding: 10px 12px;
  color: #fff;
  background: rgba(7, 9, 20, .88);
  border: 1px solid var(--dse-line);
  border-radius: 8px;
  font-size: 14px;
}

.dse-color-picker-row button,
.dse-active-palette button {
  min-height: 44px;
  border-radius: 8px;
}

.dse-tool-card button {
  min-height: 44px;
  padding: 10px 14px;
  color: #eef2ff;
  background: rgba(255, 255, 255, .055);
  border: 1px solid var(--dse-line);
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
}

.dse-active-palette {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(134px, 1fr));
  gap: 8px;
}

.dse-active-palette button {
  display: grid;
  min-width: 0;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  color: #eef2ff;
  background: rgba(255, 255, 255, .045);
  border: 1px solid var(--dse-line);
  cursor: pointer;
  font-size: 12px;
}

.dse-active-palette button span {
  width: 24px;
  height: 24px;
  background: var(--swatch);
  border: 2px solid rgba(255, 255, 255, .72);
  border-radius: 7px;
  box-shadow: 0 0 12px color-mix(in srgb, var(--swatch), transparent 52%);
}

.dse-active-palette button strong {
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dse-active-palette button small {
  color: #ffb8c2;
  font-size: 18px;
  line-height: 1;
}

.dse-json-text {
  width: 100%;
  min-height: 360px;
  padding: 11px;
  color: #f6f7fb;
  background: rgba(7, 9, 20, .92);
  border: 1px solid var(--dse-line);
  border-radius: 8px;
  outline: none;
  resize: vertical;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 11px;
  line-height: 1.45;
}

.dse-compact-text {
  width: 100%;
  min-height: 78px;
  padding: 9px;
  color: #f6f7fb;
  background: rgba(7, 9, 20, .92);
  border: 1px solid var(--dse-line);
  border-radius: 8px;
  outline: none;
  resize: vertical;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 10px;
  line-height: 1.45;
}

.dse-palette-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(26px, 1fr));
  gap: 6px;
}

.dse-palette-row button {
  min-width: 0;
  height: 28px;
  padding: 0;
  background: var(--swatch);
  border: 2px solid rgba(255, 255, 255, .74);
  border-radius: 7px;
  cursor: pointer;
  box-shadow: 0 0 12px color-mix(in srgb, var(--swatch), transparent 48%);
}

.dse-color-modal .dse-palette-row {
  grid-template-columns: repeat(auto-fill, minmax(42px, 1fr));
  gap: 9px;
}

.dse-color-modal .dse-palette-row button {
  height: 42px;
}

.dse-context-menu {
  --dse-line: rgba(255, 255, 255, .1);
  --dse-muted: #a2a8ba;
  --dse-cyan: #52e2d0;
  --dse-danger: #ff7285;
  position: fixed;
  z-index: 4200;
  display: grid;
  width: 272px;
  max-height: calc(100vh - 16px);
  padding: 10px;
  gap: 8px;
  color: #eef2ff;
  background: #101426;
  border: 1px solid rgba(82, 226, 208, .28);
  border-radius: 8px;
  overflow: auto;
  box-shadow: 0 18px 48px rgba(0, 0, 0, .48);
}

.dse-context-menu header {
  display: grid;
  gap: 2px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.dse-context-menu strong {
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dse-context-menu small {
  color: var(--dse-muted);
  font-size: 8px;
}

.dse-context-menu label {
  display: grid;
  gap: 3px;
  color: var(--dse-muted);
  font-size: 8px;
  font-weight: 800;
}

.dse-context-menu input,
.dse-context-menu select {
  min-height: 30px;
  padding: 5px 7px;
  color: #fff;
  background: rgba(7, 9, 20, .9);
  border: 1px solid var(--dse-line);
  border-radius: 7px;
  outline: none;
  font-size: 10px;
}

.dse-context-menu .dse-check {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.dse-context-menu button {
  min-height: 31px;
  padding: 6px 9px;
  background: rgba(255, 255, 255, .045);
  border: 1px solid var(--dse-line);
  border-radius: 7px;
  cursor: pointer;
  font-size: 9px;
  font-weight: 800;
}

.dse-context-menu button:disabled {
  opacity: .42;
  cursor: not-allowed;
}

.dse-url-field {
  display: grid;
  gap: 8px;
  color: var(--dse-muted);
  font-size: 13px;
  font-weight: 800;
}

.dse-url-field input,
.dse-url-field select,
.dse-url-field textarea {
  width: 100%;
  min-width: 0;
  min-height: 46px;
  padding: 11px 12px;
  color: #fff;
  background: rgba(7, 9, 20, .88);
  border: 1px solid var(--dse-line);
  border-radius: 7px;
  outline: none;
  font-size: 14px;
}

.dse-url-field input[type="range"] {
  padding-inline: 0;
  accent-color: var(--dse-cyan);
}

.dse-shape-options {
  display: grid;
  gap: 7px;
}

.dse-shape-option {
  display: grid;
  padding: 9px;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  background: rgba(255, 255, 255, .035);
  border: 1px solid var(--dse-line);
  border-radius: 8px;
  cursor: pointer;
}

.dse-shape-option input {
  accent-color: var(--dse-cyan);
}

.dse-shape-option span {
  display: grid;
  gap: 2px;
}

.dse-shape-option strong {
  color: #f4f6ff;
  font-size: 10px;
}

.dse-shape-option small {
  color: var(--dse-muted);
  font-size: 8px;
}

@media (max-width: 720px) {
  .dse-modal-backdrop {
    padding: 10px;
    place-items: stretch;
  }

  .dse-tool-modal,
  .dse-modal {
    width: 100%;
    max-height: calc(100vh - 20px);
  }

  .dse-tool-modal-body,
  .dse-field-row,
  .dse-dimension-grid {
    grid-template-columns: 1fr;
  }

  .dse-modal footer {
    justify-content: stretch;
  }

  .dse-modal footer button {
    flex: 1 1 130px;
  }
}

.dse-library-row {
  display: grid;
  padding: 8px;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 7px;
  background: rgba(255, 255, 255, .028);
  border: 1px solid var(--dse-line);
  border-radius: 8px;
}

.dse-library-row div {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.dse-library-row strong,
.dse-library-row small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dse-library-row strong {
  font-size: 11px;
}

.dse-library-row small {
  color: var(--dse-muted);
  font-size: 8px;
}

.dse-toast {
  position: fixed;
  z-index: 2300;
  right: 22px;
  bottom: 22px;
  max-width: 360px;
  padding: 10px 13px;
  color: #fff;
  background: #1b203d;
  border: 1px solid var(--dse-line);
  border-radius: 8px;
  box-shadow: 0 18px 45px rgba(0, 0, 0, .35);
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: .2s ease;
  font-size: 10px;
  font-weight: 750;
}

.dse-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.dse-toast[data-type="success"] {
  border-color: rgba(82, 226, 155, .45);
}

.dse-toast[data-type="error"] {
  border-color: rgba(255, 114, 133, .5);
}

.dse-library-shell {
  --dse-text: #f6f7fb;
  display: grid;
  width: 100%;
  height: 100%;
  min-height: 0;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 12px;
  color: var(--dse-text);
}

.dse-library-header {
  display: flex;
  padding: 18px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: #101426;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 8px;
}

.dse-library-header span {
  color: #52e2d0;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .14em;
}

.dse-library-header h1 {
  margin: 4px 0 0;
  font-size: 28px;
  letter-spacing: 0;
}

.dse-library-header p {
  margin: 5px 0 0;
  color: #a2a8ba;
  font-size: 11px;
}

.dse-library-header-actions,
.dse-library-toolbar,
.dse-library-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.dse-library-toolbar {
  min-height: 44px;
  justify-content: space-between;
}

.dse-library-search {
  display: flex;
  width: min(520px, 100%);
  min-height: 40px;
  padding: 0 12px;
  align-items: center;
  gap: 8px;
  background: rgba(16, 20, 38, .96);
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 8px;
}

.dse-library-search input {
  width: 100%;
  color: #fff;
  background: transparent;
  border: 0;
  outline: none;
  font-size: 13px;
}

#dseLibraryCount {
  color: #a2a8ba;
  font-size: 11px;
  font-weight: 800;
}

.dse-library-grid {
  display: grid;
  min-height: 0;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  align-content: start;
  gap: 10px;
  overflow: auto;
}

.dse-library-card {
  display: grid;
  min-height: 142px;
  padding: 14px;
  align-content: space-between;
  gap: 12px;
  background: #101426;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 8px;
  cursor: pointer;
}

.dse-library-card:hover {
  border-color: rgba(82, 226, 208, .35);
}

.dse-library-card span {
  color: #52e2d0;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .12em;
}

.dse-library-card h3 {
  margin: 4px 0;
  overflow: hidden;
  font-size: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dse-library-card p {
  margin: 0;
  color: #a2a8ba;
  font-size: 10px;
}

.dse-library-actions {
  flex-wrap: wrap;
}

.dse-library-actions button {
  min-height: 29px;
  padding: 5px 8px;
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 7px;
  cursor: pointer;
  font-size: 9px;
  font-weight: 750;
}

.dse-library-empty {
  padding: 28px;
  color: #a2a8ba;
  background: #101426;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 8px;
  text-align: center;
}

@media (max-width: 1280px) {
  .dse-workspace {
    grid-template-columns: 205px minmax(330px, 1fr) 270px;
  }

  .dse-toolbar {
    grid-template-columns: minmax(170px, .7fr) auto minmax(190px, .7fr);
    gap: 7px;
  }

  .dse-icon-button {
    min-width: 38px;
    padding-inline: 4px;
  }

  .dse-icon-button small {
    display: none;
  }

  .dse-render-settings {
    flex-wrap: wrap;
  }
}

@media (max-width: 900px) {
  body.mode-drone-show-editor {
    overflow: auto;
  }

  body.mode-drone-show-editor #mainContent {
    overflow: auto;
  }

  .dse-root {
    min-height: 980px;
    grid-template-rows: auto minmax(640px, 1fr) 280px;
  }

  .dse-toolbar,
  .dse-workspace {
    grid-template-columns: 1fr;
  }

  .dse-left,
  .dse-right {
    min-height: 180px;
    border: 0;
  }

  .dse-workspace {
    grid-template-rows: 220px 1fr 260px;
  }
}
