/* Shared viewport rules; model and result renderers keep their own controls. */
html.cb-studio #module-section .module-shell { min-width: 0; max-width: 1760px !important; margin-inline: auto !important; }
html.cb-studio #module-section :is(.module-hero,.module-preview-grid,.esmfold-input-panel,.esmfold-output-panel,.screening-left-panel,.screening-right-panel) { min-width: 0; }
html.cb-studio[data-cb-page="platform"] #module-section.esmfold2-clean.cb-esm-workspace .esmfold-workbench-shell {
  grid-template-columns: clamp(270px, 24vw, 350px) minmax(0, 1fr) !important;
}
html.cb-studio[data-cb-page="platform"] #module-section.esmfold2-clean.cb-esm-workspace[data-cb-view="history"] .esmfold-workbench-shell { grid-template-columns: minmax(0, 1fr) !important; }
html.cb-studio #module-section.cb-esm-workspace .cb-esm-scene { height: clamp(340px, 56dvh, 680px) !important; }
html.cb-studio #module-section :is(.module-header,.module-hero) :is(h1,h2,p) { overflow-wrap: anywhere; }
@media (min-width: 901px) {
  html.cb-studio[data-cb-page="platform"] #module-section.esmfold2-clean.cb-esm-workspace:not([data-cb-view="history"]) .esmfold-workbench-shell {
    height: calc(100dvh - 130px) !important; min-height: 0 !important; overflow: hidden !important;
  }
  html.cb-studio[data-cb-page="platform"] #module-section.cb-esm-workspace :is(.esmfold-input-panel,.esmfold-output-panel) {
    min-height: 0 !important; height: 100% !important; overflow: auto !important;
  }
  html.cb-studio[data-cb-page="platform"] #module-section.cb-esm-workspace .esmfold-form-body {
    min-height: 0 !important; overflow-y: auto !important;
  }
  html.cb-studio[data-cb-page="platform"] #module-section.cb-esm-workspace .esmfold-form-actions { flex-shrink: 0; }
  html.cb-studio[data-cb-page="platform"] #module-section.cb-esm-workspace .esmfold-empty {
    min-height: min(440px, 58dvh) !important;
  }
}
@media (max-width: 900px) {
  html.cb-studio[data-cb-page="platform"] #module-section.esmfold2-clean.cb-esm-workspace .esmfold-workbench-shell {
    display: flex !important; flex-direction: column;
  }
  html.cb-studio #module-section.cb-esm-workspace .esmfold-input-panel { width: 100%; border-right: 0 !important; }
  html.cb-studio #module-section.cb-esm-workspace .cb-esm-scene { height: clamp(300px, 52dvh, 520px) !important; }
}
@media (max-height: 700px) {
  html.cb-studio #module-section.cb-esm-workspace .cb-esm-scene { min-height: 280px !important; }
}
