/* Approved moderate page margins. No changes to module behaviour or data. */
body.gramjet-shell-active .service-content {
  box-sizing: border-box;
  min-width: 0;
  container: gj-workspace / inline-size;
  /* Center within the workspace, not within the viewport/sidebar combined. */
  padding-inline: max(32px, 6%, calc((100% - 1440px) / 2)) !important;
}

/* Breakpoints follow usable space, including a pinned sidebar. */
@container gj-workspace (max-width: 1200px) {
  .neuro-chat-delays-body { grid-template-columns: minmax(0, 1fr); }
  .neuro-chat-assignment-head { flex-wrap: wrap; }
  .neuro-chat-assignment-actions { flex-wrap: wrap; }
}
@container gj-workspace (max-width: 760px) {
  body.neurodialogs-active .neuro-account-filters,
  body.neurodialogs-active .neuro-grid.three,
  body.neurodialogs-active .neuro-protection-grid,
  body.neurodialogs-active .neuro-mode-grid,
  body.neurodialogs-active .neuro-billing-grid,
  body.neurodialogs-active .neuro-run-dialogs {
    grid-template-columns: minmax(0, 1fr);
  }
  body.neurodialogs-active .neuro-account-filters > *,
  body.neurodialogs-active .neuro-account-filters > .neuro-check:first-of-type {
    grid-column: 1;
  }
  body.neurodialogs-active .neuro-status-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .neuro-delay-field { grid-template-columns: minmax(0, 1fr); }
  .neuro-delay-pair { flex-wrap: wrap; }
  .neuro-chat-mode-grid,
  .neuro-chat-secondary-grid { grid-template-columns: minmax(0, 1fr); }
}

body.gramjet-shell-active .service-content > .service-view,
body.gramjet-shell-active .service-content > .gpw-workspace-header {
  min-width: 0;
  max-width: 100%;
}

/* Keep the existing local scroll areas, including the fullscreen viewer. */
@media (max-width: 1200px) {
  body.gramjet-shell-active .service-content {
    padding-inline: 24px !important;
  }
}
@media (max-width: 760px) {
  body.gramjet-shell-active .service-content {
    padding-inline: 16px !important;
  }
}
