/* Keep Studio controls visible with the published editor and its current API modules. */
.ve-shell.ve-focus-editor[data-preview-size] {
  --ve-compact-preview-height: clamp(154px, 34dvh, 390px);
  padding-top: 12px;
}
.ve-shell.ve-focus-editor[data-preview-size="expanded"] {
  --ve-compact-preview-height: min(63dvh, 680px);
}
.ve-shell.ve-focus-editor > .ve-workspace-rail,
.ve-focus-editor .ve-preview-zone-heading {
  display: none;
}
.ve-shell.ve-focus-editor[data-preview-size] .ve-screen {
  box-sizing: border-box;
  width: min(100%, calc(var(--ve-compact-preview-height) * 16 / 9));
  max-height: none !important;
  margin-inline: auto;
}
.ve-shell.ve-focus-editor[data-preview-size] .ve-screen.vertical {
  width: min(100%, calc(var(--ve-compact-preview-height) * 9 / 16));
  max-width: none;
}
.ve-shell.ve-focus-editor[data-preview-size] .ve-screen canvas {
  max-height: none !important;
}
.ve-shell.ve-focus-editor[data-preview-size] .ve-layout > section.ve-preview {
  display: flex;
  flex-direction: column;
  padding: 8px;
}
.ve-focus-editor .ve-preview > * { order: 2; min-width: 0; }
.ve-focus-editor .ve-preview > :is(.ve-scene-workbench, .ve-playback, input[type="range"]) { order: 0; }
.ve-focus-editor .ve-preview > .ve-preview-timeline { order: 1; }
.ve-focus-editor .ve-preview > input[type="range"] { margin: 4px 0; }
.ve-focus-editor .ve-playback {
  gap: 6px;
  align-items: center;
  margin: 4px 0 3px;
  padding: 4px 6px;
}
.ve-focus-editor .ve-quick-actions-wrap .ve-zone-label,
.ve-focus-editor .ve-quick-actions > button:not(:first-child),
.ve-focus-editor .ve-compact-tools > svg {
  display: none;
}
.ve-focus-editor .ve-compact-tools::before {
  content: "⋯";
  font-size: 21px;
  line-height: 1;
}
@media(min-width:801px) {
  .ve-shell.ve-focus-editor .ve-quick-actions-wrap {
    flex: 0 0 auto !important;
    order: 0 !important;
    width: auto !important;
    min-width: 0;
  }
  .ve-shell.ve-focus-editor .ve-quick-actions {
    display: flex;
    width: auto;
    min-width: 0;
  }
  .ve-shell.ve-focus-editor .ve-quick-actions button {
    min-height: 44px;
    padding: 4px 8px;
  }
}
.ve-focus-editor .ve-edit-timeline {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 3px 7px;
  padding: 8px;
}
.ve-focus-editor .ve-edit-timeline > * { grid-column: 1 / -1; order: 3; }
.ve-focus-editor .ve-edit-timeline > header { display: contents; }
.ve-focus-editor .ve-edit-timeline > header > div:first-child {
  grid-column: 1;
  order: 0;
  align-self: center;
  min-width: 0;
}
.ve-focus-editor .ve-edit-timeline > header > .ve-timeline-view {
  grid-column: 2;
  order: 0;
  align-self: center;
}
.ve-focus-editor .ve-edit-timeline > header > small { display: none; }
.ve-focus-editor .ve-edit-timeline > header > :is(button,label) {
  grid-column: 1 / -1;
  order: 2;
  justify-self: start;
}
.ve-focus-editor .ve-edit-timeline > header > button { min-height: 44px; }
.ve-focus-editor .ve-edit-timeline > header input[type="range"] {
  width: min(118px, 42vw);
  margin: 0;
}
.ve-focus-editor .ve-edit-timeline > :is(.ve-track-scroll,.ve-scene-cards) { order: 1; }
.ve-focus-editor .ve-timeline-row:has(> .ve-scene-rail):not(:has(> .ve-scene-rail > button)) {
  display: none;
}
.ve-focus-editor :is(.ve-scene-rail,.ve-layer-rail) button[aria-pressed="true"],
.ve-focus-editor .ve-scene-cards button[aria-pressed="true"] {
  outline: 2px solid var(--studio-action,#d2b8ff);
  outline-offset: -2px;
}
@media(max-width:800px) {
  .ve-shell.ve-focus-editor[data-preview-size="normal"] {
    --ve-compact-preview-height: clamp(112px, 23dvh, 238px);
  }
  .ve-focus-editor .ve-edit-timeline h2 { font-size: 14px; }
}
@media(max-width:355px) {
  .ve-shell.ve-focus-editor[data-preview-size="normal"] {
    --ve-compact-preview-height: clamp(100px, 19dvh, 164px);
  }
  .ve-focus-editor .ve-timeline-view button { padding-inline: 6px; }
}
@media(max-height:500px) and (orientation:landscape) {
  .ve-shell.ve-focus-editor[data-preview-size="normal"] {
    --ve-compact-preview-height: clamp(100px, 25dvh, 135px);
  }
}

@media(min-width:720px) and (max-height:500px) and (orientation:landscape) {
  .ve-shell.ve-focus-editor > .ve-focus-top {
    margin: 2px 0 5px;
    padding: 4px 8px;
  }
  .ve-focus-top .ve-project-title { min-height: 34px; }
  .ve-focus-top .ve-focus-project > small { font-size: 11px; line-height: 1.15; }
  .ve-focus-editor .ve-edit-timeline { padding: 6px; }
  .ve-shell.ve-focus-editor[data-preview-size] .ve-layout > section.ve-preview {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
    grid-template-rows: min-content min-content min-content;
    column-gap: 8px;
  }
  .ve-focus-editor .ve-preview > * { grid-column: 1 / -1; }
  .ve-focus-editor .ve-preview > :is(.ve-scene-workbench,.ve-playback,input[type="range"]) { grid-column: 1; }
  .ve-focus-editor .ve-preview > .ve-scene-workbench { grid-row: 1; }
  .ve-focus-editor .ve-preview > .ve-playback { grid-row: 2; }
  .ve-focus-editor .ve-preview > input[type="range"] { grid-row: 3; }
  .ve-focus-editor .ve-preview > .ve-preview-timeline {
    grid-column: 2;
    grid-row: 1 / span 3;
    align-self: start;
    max-height: calc(100dvh - 105px);
    overflow: auto;
  }
}
