/* Shared editor viewport contract: controls scroll; header and actions stay reachable. */
#admin-side-editor {
  max-height: 100vh;
  max-height: 100dvh;
  overflow: hidden;
}
#admin-side-editor > .admin-side-editor-head,
#admin-side-editor > .admin-side-editor-foot,
#admin-side-editor > .nano-cast-foot {
  flex-shrink: 0;
}
#admin-side-editor > :is(.admin-side-editor-body, .nano-cast-body, [data-editor-scroll-body]) {
  min-height: 0;
  flex: 1 1 0%;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: var(--ed-muted, #b9b2a9) var(--ed-bg, #211f1d);
}
#admin-side-editor > :is(.admin-side-editor-body, .nano-cast-body, [data-editor-scroll-body])::-webkit-scrollbar {
  width: 9px;
}
#admin-side-editor > :is(.admin-side-editor-body, .nano-cast-body, [data-editor-scroll-body])::-webkit-scrollbar-track {
  background: var(--ed-bg, #211f1d);
}
#admin-side-editor > :is(.admin-side-editor-body, .nano-cast-body, [data-editor-scroll-body])::-webkit-scrollbar-thumb {
  background: var(--ed-muted, #b9b2a9);
  border: 2px solid var(--ed-bg, #211f1d);
  border-radius: 8px;
}
#admin-side-editor #admin-side-editor-stage-shell,
#admin-side-editor .nano-cast-stage {
  flex-shrink: 0 !important;
  flex-basis: 220px !important;
  min-height: 220px;
}
#admin-side-editor .admin-side-editor-expand-panel,
#admin-side-editor .admin-side-editor-color-panel {
  max-height: none;
  overflow: visible;
}
@media (max-height: 480px) {
  #admin-side-editor > .admin-side-editor-head {
    padding-top: 8px;
    padding-bottom: 8px;
    gap: 6px;
  }
  #admin-side-editor > .admin-side-editor-foot,
  #admin-side-editor > .nano-cast-foot {
    padding-top: 8px;
    padding-bottom: 8px;
  }
}
