/* NovaCat 1.01.39: shared mobile viewport / safe-area acceptance foundation.
   Applies to owned pages only. Internal horizontal rails and data tables remain scrollable. */
@media (max-width: 900px) {
  html:has(body.novacat-command-center-screen),
  html:has(body.novacat-public),
  html:has(body.novacat-platform-root),
  html:has(body.novacat-front-facing) { max-width:100%; overflow-x:clip; }
  body:is(.novacat-command-center-screen,.novacat-public,.novacat-platform-root,.novacat-front-facing) {
    max-width:100%; min-width:0; overflow-x:clip; -webkit-text-size-adjust:100%;
  }
  body:is(.novacat-command-center-screen,.novacat-public,.novacat-platform-root,.novacat-front-facing)
    :where(main,article,section,form,fieldset,figure,.novacat-cc,.novacat-cc-stage,.novacat-cc-main,.novacat-87-workspace,.novacat-cc-panel) {
    min-width:0; box-sizing:border-box;
  }
  body:is(.novacat-command-center-screen,.novacat-public,.novacat-platform-root,.novacat-front-facing)
    :where(img,video,canvas,svg) { max-width:100%; height:auto; }
  body:is(.novacat-command-center-screen,.novacat-public,.novacat-platform-root,.novacat-front-facing)
    :where(input:not([type=checkbox]):not([type=radio]),select,textarea) { max-width:100%; min-width:0; box-sizing:border-box; font-size:16px; }
  body:is(.novacat-command-center-screen,.novacat-public,.novacat-platform-root,.novacat-front-facing)
    :where(.novacat-cc-tablewrap,.novacat-table-scroll,[data-horizontal-scroll]) {
    max-width:100%; overflow-x:auto; overscroll-behavior-inline:contain; -webkit-overflow-scrolling:touch;
  }
  body.novacat-command-center-screen .novacat-cc[data-window-layout="unified"] .novacat-cc-main {
    min-width:0; max-width:100%; padding-bottom:calc(105px + env(safe-area-inset-bottom,0px))!important;
  }
  body.novacat-command-center-screen .novacat-cc[data-window-layout="unified"] .novacat-cc-sidebar {
    max-width:min(320px,88vw); overscroll-behavior-y:contain; -webkit-overflow-scrolling:touch;
  }
  body.novacat-window-drawer-open { overflow:hidden!important; }
  body.novacat-command-center-screen .novacat-cc-stage :where(.novacat-95b-edit-grid,.novacat-95a-grid,.novacat-footprint-inputs) {
    min-width:0; max-width:100%;
  }
  body:is(.novacat-public,.novacat-front-facing) .novacat-mobile-nav {
    bottom:0; left:0; right:0; padding-bottom:calc(7px + env(safe-area-inset-bottom,0px));
  }
  body:is(.novacat-public,.novacat-front-facing) :where(main,.novacat-main) {
    padding-bottom:max(20px,env(safe-area-inset-bottom,0px));
  }
  body:is(.novacat-public,.novacat-front-facing) .novacat-mobile-nav ~ main {padding-bottom:calc(84px + env(safe-area-inset-bottom,0px));}
  body:is(.novacat-public,.novacat-platform-root,.novacat-front-facing) :where(.novacat-image-player,[role=dialog]) {
    max-width:100vw; max-height:100dvh; overscroll-behavior:contain;
  }
}
@media (max-width: 600px) {
  body.novacat-command-center-screen .novacat-cc-main :where(.novacat-cc-filters,.novacat-cc-pageactions) {flex-wrap:wrap;min-width:0;}
  body.novacat-command-center-screen .novacat-cc-main :where(.novacat-cc-panel,.novacat-87-workspace) {max-width:100%;}
}
@media (prefers-reduced-motion: reduce) {
  body:is(.novacat-command-center-screen,.novacat-public,.novacat-platform-root,.novacat-front-facing) :where(*, *::before, *::after) {
    scroll-behavior:auto!important;
  }
}

/* v1.01.43 — bounded, full-height NovaImage viewer, not a sideways-scrolling page. */
@media (max-width: 700px) {
 body:is(.novacat,.novacat-public,.novacat-front-facing,.novacat-platform-root) .novacat-image-player {
  position:fixed; inset:0; margin:0; width:100%; max-width:100%; height:100dvh; max-height:100dvh;
  border:0; border-radius:0; padding:calc(10px + env(safe-area-inset-top,0px)) 10px calc(16px + env(safe-area-inset-bottom,0px));
  overflow-x:hidden; overflow-y:auto; overscroll-behavior:contain;
 }
 .novacat-image-player .novacat-image-top{position:sticky;top:0;z-index:3;background:#17191d;padding-bottom:6px}
 .novacat-image-player .novacat-image-stage{grid-template-columns:44px minmax(0,1fr) 44px;min-width:0}
 .novacat-image-player .novacat-image-stage img{max-width:100%;height:min(48dvh,450px);object-fit:contain;touch-action:pan-y}
 .novacat-image-player .novacat-image-story{padding:10px 2px}
 .novacat-image-player .novacat-player-discussion{overflow-wrap:anywhere;max-width:100%}
}
