/* True full-bleed modern canvas: remove the large-screen width cap. */
body:has([data-testid="itemFeed"], [data-testid="blockStatusComposer"], [data-testid="itemViewItemUser"], [data-testid*="Story"], [data-testid*="story"]) [data-testid="container.main"] {
  width: 100% !important;
  max-width: none !important;
  margin-inline: 0 !important;
  padding-inline: clamp(12px, 1.2vw, 24px) !important;
}

body:has([data-testid="itemFeed"], [data-testid="blockStatusComposer"], [data-testid="itemViewItemUser"], [data-testid*="Story"], [data-testid*="story"]) [data-testid="container.main"] > * {
  width: 100% !important;
  max-width: none !important;
}

/* Preserve a flexible feed column while keeping the right rail readable. */
body:has([data-testid="itemViewItemUser"]) [data-testid="layoutSlotMain"] {
  flex: 1 1 auto !important;
  min-width: 0 !important;
}

body:has([data-testid="itemViewItemUser"]) [data-testid="layoutSlotSide"] {
  flex: 0 0 clamp(280px, 19vw, 350px) !important;
}

@media (max-width: 860px) {
  body:has([data-testid="itemViewItemUser"]) [data-testid="layoutSlotSide"] {
    flex-basis: 100% !important;
  }
}
