/**
 * Shared MEDIA / TIMELINE studio shell.
 * Source of truth: editor-de-video-online chrome (see AGENTS.md).
 *
 * Classes (same chrome):
 *   .mstudio-*   preferred for new tools (criar GIF, GIF editors)
 *   .veditor-*   video editor (aliased so existing JS/HTML keep working)
 *   .aeditor-*   audio editor (aliased)
 *
 * Workspace: .fs-workspace.mstudio-fs | .veditor-fs | .aeditor-fs | .vcrop-fs
 * Tool-only UI (clip lanes, audio mix, GIF filmstrip thumbs, crop overlay) stays in tool CSS.
 */

/* ---- Tokens + workspace ---- */
body.is-fullscreen .fs-workspace.mstudio-fs,
body.is-fullscreen .fs-workspace.veditor-fs,
body.is-fullscreen .fs-workspace.aeditor-fs,
body.is-fullscreen .fs-workspace.vcrop-fs {
  --ms-bg: #eef1f6;
  --ms-app: #ffffff;
  --ms-panel: #f8fafc;
  --ms-panel-2: #f1f5f9;
  --ms-line: #e2e8f0;
  --ms-text: var(--dica-ink, #0f172a);
  --ms-muted: var(--dica-muted, #64748b);
  --ms-faint: #94a3b8;
  --ms-accent: #fa5b0f;
  --ms-accent-2: #e04f0a;
  --ms-btn: #eef2f7;
  --ms-btn-hover: #e2e8f0;
  --ms-input: #ffffff;
  --ms-stage: #dce2ec;
  --ms-stage-glow: rgba(148, 163, 184, 0.35);
  --ms-drop-bg: rgba(255, 255, 255, 0.88);
  --ms-drop-border: #cbd5e1;
  --ms-item: #ffffff;
  --ms-item-hover: #f1f5f9;
  --ms-timeline-bg: #f1f5f9;
  --ms-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 10px 32px rgba(15, 23, 42, 0.07);
  --ms-topbar-h: 52px;
  --ms-timeline-h: 168px;
  --ms-side-w: 240px;
  --ms-danger: #b91c1c;

  /* Legacy --ve-* aliases for video-editor.css */
  --ve-bg: var(--ms-bg);
  --ve-app: var(--ms-app);
  --ve-panel: var(--ms-panel);
  --ve-panel-2: var(--ms-panel-2);
  --ve-line: var(--ms-line);
  --ve-text: var(--ms-text);
  --ve-muted: var(--ms-muted);
  --ve-faint: var(--ms-faint);
  --ve-accent: var(--ms-accent);
  --ve-accent-2: var(--ms-accent-2);
  --ve-btn: var(--ms-btn);
  --ve-btn-hover: var(--ms-btn-hover);
  --ve-input-bg: var(--ms-input);
  --ve-stage: var(--ms-stage);
  --ve-stage-glow: var(--ms-stage-glow);
  --ve-drop-bg: var(--ms-drop-bg);
  --ve-drop-border: var(--ms-drop-border);
  --ve-item: var(--ms-item);
  --ve-item-hover: var(--ms-item-hover);
  --ve-timeline-bg: var(--ms-timeline-bg);
  --ve-shadow: var(--ms-shadow);
  --ve-topbar-h: var(--ms-topbar-h);
  --ve-timeline-h: var(--ms-timeline-h);
  --ve-side-w: var(--ms-side-w);
  --ve-danger: var(--ms-danger);

  /* Audio editor --ae-* aliases */
  --ae-bg: var(--ms-bg);
  --ae-app: var(--ms-app);
  --ae-panel: var(--ms-panel);
  --ae-panel-2: var(--ms-panel-2);
  --ae-line: var(--ms-line);
  --ae-text: var(--ms-text);
  --ae-muted: var(--ms-muted);
  --ae-faint: var(--ms-faint);
  --ae-accent: var(--ms-accent);
  --ae-accent-2: var(--ms-accent-2);
  --ae-btn: var(--ms-btn);
  --ae-btn-hover: var(--ms-btn-hover);
  --ae-input-bg: var(--ms-input);
  --ae-stage: var(--ms-stage);
  --ae-stage-glow: var(--ms-stage-glow);
  --ae-drop-bg: var(--ms-drop-bg);
  --ae-drop-border: var(--ms-drop-border);
  --ae-item: var(--ms-item);
  --ae-item-hover: var(--ms-item-hover);
  --ae-timeline-bg: var(--ms-timeline-bg);
  --ae-shadow: var(--ms-shadow);
  --ae-topbar-h: var(--ms-topbar-h);
  --ae-timeline-h: 220px;
  --ae-side-w: var(--ms-side-w);
  --ae-danger: var(--ms-danger);

  /* Cortar vídeo --vc-* aliases */
  --vc-bg: var(--ms-bg);
  --vc-app: var(--ms-app);
  --vc-line: var(--ms-line);
  --vc-text: var(--ms-text);
  --vc-muted: var(--ms-muted);
  --vc-faint: var(--ms-faint);
  --vc-accent: var(--ms-accent);
  --vc-accent-2: var(--ms-accent-2);
  --vc-btn: var(--ms-btn);
  --vc-btn-hover: var(--ms-btn-hover);
  --vc-stage: var(--ms-stage);
  --vc-shadow: var(--ms-shadow);
  --vc-topbar: var(--ms-panel);
  --vc-bottom: var(--ms-panel);
  --vc-tool: var(--ms-item);

  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  padding: 12px 14px 16px !important;
  box-sizing: border-box;
  background: var(--ms-bg) !important;
  border-color: var(--ms-line) !important;
  color: var(--ms-text);
  min-height: min(78vh, 900px) !important;
  height: min(calc(100vh - 120px), 920px);
  max-height: none;
  overflow: hidden;
}

html[data-theme="dark"] body.is-fullscreen .fs-workspace.mstudio-fs,
html[data-theme="dark"] body.is-fullscreen .fs-workspace.veditor-fs,
html[data-theme="dark"] body.is-fullscreen .fs-workspace.aeditor-fs,
html[data-theme="dark"] body.is-fullscreen .fs-workspace.vcrop-fs {
  --ms-bg: #0b0e14;
  --ms-app: #151922;
  --ms-panel: #1a2030;
  --ms-panel-2: #12161f;
  --ms-line: #2a3140;
  --ms-text: #e8eef6;
  --ms-muted: rgba(232, 238, 246, 0.62);
  --ms-faint: rgba(232, 238, 246, 0.42);
  --ms-accent: #fa5b0f;
  --ms-accent-2: #ff8a3d;
  --ms-btn: rgba(255, 255, 255, 0.08);
  --ms-btn-hover: rgba(255, 255, 255, 0.14);
  --ms-input: rgba(0, 0, 0, 0.28);
  --ms-stage: #080b11;
  --ms-stage-glow: rgba(40, 60, 90, 0.25);
  --ms-drop-bg: rgba(12, 16, 24, 0.78);
  --ms-drop-border: rgba(255, 255, 255, 0.16);
  --ms-item: rgba(255, 255, 255, 0.04);
  --ms-item-hover: rgba(255, 255, 255, 0.08);
  --ms-timeline-bg: rgba(0, 0, 0, 0.28);
  --ms-shadow: none;
  --ms-danger: #fca5a5;
  background: var(--ms-bg) !important;
  border-color: #0a0e14 !important;
}

.mstudio-app,
.veditor-app,
.aeditor-app,
.vcrop-app {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  height: 100%;
  min-height: min(70vh, 860px);
  width: 100%;
  max-width: 100%;
  min-width: 0;
  background: var(--ms-app);
  color: var(--ms-text);
  font-family: inherit;
  border-radius: 18px;
  border: 1px solid var(--ms-line);
  box-shadow: var(--ms-shadow);
  overflow: hidden;
}

.mstudio-app *,
.veditor-app *,
.aeditor-app *,
.vcrop-app * {
  box-sizing: border-box;
}

.mstudio-sr,
.veditor-sr,
.aeditor-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.mstudio-file-input,
.veditor-file-input,
.aeditor-file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

/* ---- Top bar ---- */
.mstudio-topbar,
.veditor-topbar,
.aeditor-topbar {
  flex: 0 0 var(--ms-topbar-h);
  display: grid;
  grid-template-columns: minmax(160px, 1fr) auto minmax(200px, 1fr);
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  background: var(--ms-panel);
  border-bottom: 1px solid var(--ms-line);
  z-index: 5;
}

.mstudio-topbar-left,
.veditor-topbar-left,
.aeditor-topbar-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.mstudio-brand,
.veditor-brand,
.aeditor-brand {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: rgba(250, 91, 15, 0.12);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.mstudio-brand svg,
.veditor-brand svg,
.aeditor-brand svg {
  width: 18px;
  height: 18px;
  fill: var(--ms-accent);
}

.mstudio-brand-text,
.veditor-brand-text,
.aeditor-brand-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.2;
}

.mstudio-brand-text strong,
.veditor-brand-text strong,
.aeditor-brand-text strong {
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--ms-text);
}

.mstudio-project-meta,
.veditor-project-meta,
.aeditor-project-meta {
  font-size: 0.72rem;
  color: var(--ms-faint);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mstudio-topbar-center,
.veditor-topbar-center,
.aeditor-topbar-center {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
}

.mstudio-topbar-sep,
.veditor-topbar-sep,
.aeditor-topbar-sep {
  width: 1px;
  height: 22px;
  background: var(--ms-line);
  margin: 0 2px;
}

.mstudio-topbar-right,
.veditor-topbar-right,
.aeditor-topbar-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
}

/* Buttons */
.mstudio-btn,
.veditor-btn,
.aeditor-btn {
  appearance: none;
  border: 0;
  border-radius: 9px;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  font-size: 0.84rem;
  padding: 8px 14px;
  transition: background 0.12s ease, opacity 0.12s ease, transform 0.1s ease;
  color: var(--ms-text);
  background: var(--ms-btn);
  white-space: nowrap;
}

.mstudio-btn:disabled,
.veditor-btn:disabled,
.aeditor-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.mstudio-btn:not(:disabled):active,
.veditor-btn:not(:disabled):active,
.aeditor-btn:not(:disabled):active {
  transform: scale(0.98);
}

.mstudio-btn:focus-visible,
.veditor-btn:focus-visible,
.aeditor-btn:focus-visible {
  outline: 2px solid var(--ms-accent);
  outline-offset: 2px;
}

.mstudio-btn-ghost,
.veditor-btn-ghost,
.aeditor-btn-ghost {
  background: var(--ms-btn);
}

.mstudio-btn-ghost:hover:not(:disabled),
.veditor-btn-ghost:hover:not(:disabled),
.aeditor-btn-ghost:hover:not(:disabled) {
  background: var(--ms-btn-hover);
}

.mstudio-btn-primary,
.veditor-btn-primary,
.aeditor-btn-primary {
  background: linear-gradient(180deg, var(--ms-accent) 0%, #e04f0a 100%);
  color: #fff;
  box-shadow: 0 3px 12px rgba(250, 91, 15, 0.28);
}

.mstudio-btn-primary:hover:not(:disabled),
.veditor-btn-primary:hover:not(:disabled),
.aeditor-btn-primary:hover:not(:disabled) {
  background: linear-gradient(180deg, #ff6a1f 0%, var(--ms-accent) 100%);
}

.mstudio-btn-sm,
.veditor-btn-sm,
.aeditor-btn-sm {
  padding: 5px 10px;
  font-size: 0.75rem;
  border-radius: 7px;
}

.mstudio-icon-btn,
.veditor-icon-btn,
.aeditor-icon-btn {
  appearance: none;
  border: 1px solid var(--ms-line);
  background: var(--ms-item);
  color: var(--ms-text);
  border-radius: 8px;
  padding: 6px 11px;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 650;
  cursor: pointer;
}

.mstudio-icon-btn:hover:not(:disabled),
.veditor-icon-btn:hover:not(:disabled),
.aeditor-icon-btn:hover:not(:disabled) {
  background: var(--ms-item-hover);
}

.mstudio-icon-btn:disabled,
.veditor-icon-btn:disabled,
.aeditor-icon-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

/* ---- Body: left | stage | right  (is-2col drops the right rail) ---- */
.mstudio-body,
.veditor-body,
.aeditor-body {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: var(--ms-side-w) minmax(0, 1fr) var(--ms-side-w);
  gap: 0;
  background: var(--ms-app);
}

.mstudio-body.is-2col {
  grid-template-columns: var(--ms-side-w) minmax(0, 1fr);
}

.mstudio-panel,
.veditor-panel,
.aeditor-panel {
  background: var(--ms-panel);
  min-height: 0;
  overflow: auto;
  padding: 10px 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mstudio-panel--left,
.veditor-panel--left,
.aeditor-panel--left {
  border-right: 1px solid var(--ms-line);
}

.mstudio-panel--right,
.veditor-panel--right,
.aeditor-panel--right {
  border-left: 1px solid var(--ms-line);
}

.mstudio-panel-head,
.veditor-panel-head,
.aeditor-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--ms-faint);
  margin-bottom: 2px;
}

.mstudio-panel-section,
.veditor-panel-section,
.aeditor-panel-section {
  margin-top: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--ms-line);
}

/* Stage */
.mstudio-stage,
.veditor-stage,
.aeditor-stage {
  position: relative;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(ellipse at 50% 30%, var(--ms-stage-glow), transparent 55%),
    var(--ms-stage);
}

.mstudio-drop,
.veditor-drop,
.aeditor-drop {
  position: absolute;
  inset: 16px;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 8px;
  border: 2px dashed var(--ms-drop-border);
  border-radius: 16px;
  background: var(--ms-drop-bg);
  backdrop-filter: blur(6px);
  cursor: pointer;
  padding: 24px;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.mstudio-drop:hover,
.mstudio-drop.is-dragover,
.veditor-drop:hover,
.aeditor-drop:hover,
.veditor-drop.is-dragover,
.aeditor-drop.is-dragover {
  border-color: var(--ms-accent);
  background: rgba(250, 91, 15, 0.08);
}

.mstudio-drop:focus-visible,
.veditor-drop:focus-visible,
.aeditor-drop:focus-visible {
  outline: 2px solid var(--ms-accent);
  outline-offset: 2px;
}

.mstudio-app.has-media .mstudio-drop,
.veditor-app.has-media .veditor-drop,
.aeditor-app.has-media .aeditor-drop {
  display: none;
}

.mstudio-drop-icon,
.veditor-drop-icon,
.aeditor-drop-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(250, 91, 15, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 6px;
}

.mstudio-drop-icon svg,
.veditor-drop-icon svg,
.aeditor-drop-icon svg {
  width: 30px;
  height: 30px;
  fill: var(--ms-accent);
}

.mstudio-drop h3,
.veditor-drop h3,
.aeditor-drop h3 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 750;
  color: var(--ms-text);
}

.mstudio-drop p,
.veditor-drop p,
.aeditor-drop p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--ms-muted);
  max-width: 320px;
}

.mstudio-drop-cta,
.veditor-drop-cta,
.aeditor-drop-cta {
  margin-top: 10px;
  display: inline-flex;
  padding: 10px 18px;
  border-radius: 10px;
  background: linear-gradient(180deg, var(--ms-accent) 0%, #e04f0a 100%);
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  box-shadow: 0 4px 14px rgba(250, 91, 15, 0.3);
}

.mstudio-editor,
.veditor-editor,
.aeditor-editor {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  opacity: 0.35;
  pointer-events: none;
}

.mstudio-app.has-media .mstudio-editor,
.veditor-app.has-media .veditor-editor,
.aeditor-app.has-media .aeditor-editor {
  opacity: 1;
  pointer-events: auto;
}

.mstudio-preview-wrap,
.veditor-preview-wrap,
.aeditor-preview-wrap {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px 20px 8px;
}

.mstudio-preview-shell,
.veditor-preview-shell,
.aeditor-preview-shell {
  position: relative;
  width: min(100%, 920px);
  max-height: 100%;
  background: #000;
  border-radius: 6px;
  border: 1px solid var(--ms-line);
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.18);
  overflow: hidden;
}

html[data-theme="dark"] .mstudio-preview-shell,
html[data-theme="dark"] .veditor-preview-shell,
html[data-theme="dark"] .aeditor-preview-shell {
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}

.mstudio-preview-shell::before,
.veditor-preview-shell::before,
.aeditor-preview-shell::before {
  content: "";
  display: block;
  width: 100%;
  padding-top: var(--veditor-aspect-pad, 56.25%);
}

.mstudio-preview-inner,
.veditor-preview-inner,
.aeditor-preview-inner {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
}

.mstudio-preview-inner video,
.mstudio-preview-inner img,
.mstudio-preview-inner canvas,
.veditor-preview-inner video,
.aeditor-preview-inner video {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
  background: #000;
}

.mstudio-preview-empty,
.veditor-preview-empty,
.aeditor-preview-empty {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.45);
  font-size: 0.88rem;
  pointer-events: none;
}

.mstudio-preview-empty[hidden],
.veditor-preview-empty[hidden],
.aeditor-preview-empty[hidden] {
  display: none;
}

.mstudio-transport,
.veditor-transport,
.aeditor-transport {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 8px 16px 14px;
}

.mstudio-play-btn,
.veditor-play-btn,
.aeditor-play-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--ms-line);
  background: var(--ms-item);
  color: var(--ms-text);
  font-size: 1rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.12s ease;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}

.mstudio-play-btn:hover,
.veditor-play-btn:hover,
.aeditor-play-btn:hover {
  background: var(--ms-item-hover);
}

.mstudio-play-btn:focus-visible,
.veditor-play-btn:focus-visible,
.aeditor-play-btn:focus-visible {
  outline: 2px solid var(--ms-accent);
  outline-offset: 2px;
}

.mstudio-time,
.veditor-time,
.aeditor-time {
  font-variant-numeric: tabular-nums;
  font-size: 0.86rem;
  color: var(--ms-muted);
  min-width: 10rem;
}

/* Fields */
.mstudio-fields,
.veditor-fields,
.aeditor-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.mstudio-field label,
.veditor-field label,
.aeditor-field label {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--ms-faint);
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.mstudio-field input,
.mstudio-field select,
.veditor-field input,
.aeditor-field input,
.veditor-field select,
.aeditor-field select {
  width: 100%;
  appearance: none;
  border: 1px solid var(--ms-line);
  background: var(--ms-input);
  color: var(--ms-text);
  border-radius: 8px;
  padding: 8px 9px;
  font: inherit;
  font-size: 0.86rem;
  font-variant-numeric: tabular-nums;
}

.mstudio-field input:focus,
.mstudio-field select:focus,
.veditor-field input:focus,
.aeditor-field input:focus,
.veditor-field select:focus,
.aeditor-field select:focus {
  outline: 2px solid var(--ms-accent);
  outline-offset: 1px;
}

.mstudio-hint,
.veditor-hint,
.aeditor-hint {
  margin: 10px 0 0;
  font-size: 0.74rem;
  color: var(--ms-faint);
  line-height: 1.35;
}

.mstudio-status,
.veditor-status,
.aeditor-status {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.4;
  color: var(--ms-muted);
}

.mstudio-status.is-ok {
  color: #079455;
}

.mstudio-status.is-error {
  color: var(--ms-danger);
}

/* Timeline wrap (tool fills the inside) */
.mstudio-timeline-wrap,
.veditor-timeline-wrap,
.aeditor-timeline-wrap {
  flex: 0 0 auto;
  background: var(--ms-panel);
  border-top: 1px solid var(--ms-line);
  padding: 8px 12px 12px;
  min-height: var(--ms-timeline-h);
}

.mstudio-timeline-toolbar,
.veditor-timeline-toolbar,
.aeditor-timeline-toolbar {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}

.mstudio-timeline-title,
.veditor-timeline-title,
.aeditor-timeline-title {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--ms-faint);
}

.mstudio-timeline-hint,
.veditor-timeline-hint,
.aeditor-timeline-hint {
  font-size: 0.72rem;
  color: var(--ms-faint);
}

@media (max-width: 960px) {
  body.is-fullscreen .fs-workspace.mstudio-fs,
  body.is-fullscreen .fs-workspace.veditor-fs,
  body.is-fullscreen .fs-workspace.aeditor-fs,
  body.is-fullscreen .fs-workspace.vcrop-fs {
    height: auto;
    min-height: min(85vh, 980px) !important;
    overflow: visible;
  }

  .mstudio-app,
  .veditor-app,
  .aeditor-app {
    min-height: min(85vh, 980px);
    height: auto;
  }

  .mstudio-body,
  .veditor-body,
  .aeditor-body,
  .mstudio-body.is-2col {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(280px, 42vh) auto;
  }

  .mstudio-panel--left,
  .veditor-panel--left,
  .aeditor-panel--left {
    border-right: 0;
    border-bottom: 1px solid var(--ms-line);
    max-height: 220px;
  }

  .mstudio-panel--right,
  .veditor-panel--right,
  .aeditor-panel--right {
    border-left: 0;
    border-top: 1px solid var(--ms-line);
    max-height: 220px;
  }

  .mstudio-topbar,
  .veditor-topbar,
  .aeditor-topbar {
    grid-template-columns: 1fr;
    height: auto;
    flex: 0 0 auto;
    padding: 10px 12px;
    gap: 8px;
  }

  .mstudio-topbar-center,
  .veditor-topbar-center,
  .aeditor-topbar-center {
    order: 3;
    justify-content: flex-start;
  }

  .mstudio-topbar-right,
  .veditor-topbar-right,
  .aeditor-topbar-right {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .mstudio-timeline-hint,
  .veditor-timeline-hint,
  .aeditor-timeline-hint {
    display: none;
  }
}

body.is-fullscreen .fs-workspace.aeditor-fs {
  --ms-timeline-h: 220px;
}
