/* Narrow-viewport fixes: do not change desktop layout. */

/* Root cause: the PDF preview tablist is inline-flex + w-fit, and its
   tab labels are whitespace-nowrap shrink-0, so the control is 381px
   wide and overflows a 390px (or 360px) viewport after horizontal padding. */
[role="tablist"] {
  max-width: 100%;
  flex-wrap: wrap;
}
[role="tablist"] > [role="tab"] {
  min-width: 0;
  flex-shrink: 1;
  white-space: normal;
}

/* Last-resort safety net, in addition to the tablist fix above. */
html,
body {
  overflow-x: clip;
}
