/* Opt-in natural flow. No height here depends on the iframe viewport height. */
html.noumi-embed,
.noumi-embed body {
  height: auto;
  min-height: 0;
  max-height: none;
  overflow: visible;
  overscroll-behavior: auto;
}
.noumi-embed #noumi-embed-root {
  display: flow-root;
  height: auto;
  min-height: 0;
  padding: 24px 0 40px;
}
.noumi-embed .showcase-shell { margin: 0 auto; }
.noumi-embed .showcase-sidebar {
  position: static;
  height: auto;
  min-height: 0;
  max-height: none;
  overflow: visible;
  overscroll-behavior: auto;
}
.noumi-embed :is(.workspace, .tree, .folder-content, .conversation, .retrieval) {
  height: auto;
  min-height: 0;
  max-height: none !important;
  overflow: visible;
  overscroll-behavior: auto;
}
.noumi-embed .tree { flex: none; }
.noumi-embed .work-foot { border-radius: 0 0 16px 16px; }
.noumi-embed .memory h2 { padding-right: 0; }
.noumi-embed .memory-evidence { position: static; display: block; margin-top: 4px; }
.noumi-embed .memory-popover {
  position: static;
  width: 100%;
  max-width: 100%;
  height: auto;
  max-height: none;
  overflow: visible;
}
/* Enlarged previews expand inline; a viewport-sized modal would reintroduce
   a second vertical scrollbar inside the embedded page. */
.noumi-embed #preview-dialog {
  position: relative;
  inset: auto;
  width: calc(100% - 60px);
  max-width: none;
  height: auto;
  max-height: none;
  margin: 0 30px 26px;
  overflow: visible;
}
.noumi-embed :is(.modal-head, .modal-body) {
  position: static;
  max-height: none;
  overflow: visible;
}
.noumi-embed .modal-head { border-radius: 14px 14px 0 0; }
.noumi-embed :is(.preview-rail, .page-image) { overscroll-behavior-y: auto; }
@media (max-width: 780px) {
  .noumi-embed #noumi-embed-root { padding: 0; }
  .noumi-embed .showcase-sidebar { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .noumi-embed #preview-dialog { width: calc(100% - 28px); margin: 0 14px 18px; }
}
@media (max-width: 420px) {
  .noumi-embed .showcase-sidebar { grid-template-columns: 1fr; }
}
