/* The canvas is centered on the viewport, independently of sidebar state.
   Below 1760px, retain useful content width while clearing the expanded rail.
   The dimensions meet continuously; no resize breakpoint moves the canvas. */
.has-workspace-sidebar .page-shell,
.has-workspace-sidebar[data-sidebar-collapsed=true] .page-shell {
  box-sizing: border-box;
  width: min(1600px, max(1200px, calc(100% - 560px)), calc(100% - 304px));
  max-width: 1600px;
  min-width: 0;
  margin: 0 auto 0 max(280px, calc((100% - 1600px) / 2));
  padding: 24px 0 40px;
}

/* Keep existing mobile drawer behavior and leave room for its trigger.
   Safe-area insets also protect content on landscape phones. */
@media (max-width: 800px) {
  .has-workspace-sidebar .page-shell,
  .has-workspace-sidebar[data-sidebar-collapsed=true] .page-shell {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 58px max(16px, env(safe-area-inset-right)) 28px max(16px, env(safe-area-inset-left));
  }
}
