/* Shared dialogs: keep the existing close control in view; only the body scrolls. */
.modal-overlay > .modal:not(.review-workbench-modal):has(.modal-x, .modal-close, .modal-toolbar-title, > .modal-title button, > header button) {
  max-height: calc(100dvh - 24px);
  overflow-y: auto;
  box-sizing: border-box;
  overscroll-behavior: contain;
}
.modal > :is(.modal-title, .modal-head, .modal-toolbar-title):has(button),
.modal > header:has(button),
.institution-poster-dialog > header {
  position: sticky;
  top: 0;
  z-index: 20;
  flex-shrink: 0;
  background: inherit;
  isolation: isolate;
}
.modal > :is(.modal-title, .modal-head, .modal-toolbar-title):has(button)::before,
.modal > header:has(button)::before,
.institution-poster-dialog > header::before {
  content: '';
  position: absolute;
  inset: -8px -4px;
  z-index: -1;
  border-radius: 6px;
  background: inherit;
  pointer-events: none;
}
