/* The Athlete HQ: phone layout fixes (Nov 12, 2026). Applies to phones only; desktop is unchanged.
   Backups of the pages before this change: athletehq_private/bak-nov12-mobile-* */
@media (max-width: 760px){
  /* Let grid and flex items shrink instead of pushing the page wider than the screen */
  body * { min-width: 0; }
  /* Long emails, links and names wrap instead of running off the edge */
  body { overflow-wrap: anywhere; }
  .share code, pre, code { white-space: pre-wrap; }
  img, video, iframe, svg, canvas { max-width: 100%; }

  /* Top tab bars scroll sideways instead of running off the screen */
  nav.tabs, .tabs { overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; flex-wrap: nowrap; }
  nav.tabs::-webkit-scrollbar, .tabs::-webkit-scrollbar { display: none; }
  nav.tabs > *, .tabs > * { flex: 0 0 auto; }

  /* Stat tiles: two per row */
  .stats, .hgrid, .quick, .p-quick, .p-actions { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  /* Two-column layouts stack */
  .hero, .pub-grid, .edit-layout, .bar-row { grid-template-columns: minmax(0, 1fr) !important; }

  /* Wide tables (coach messages, college lists) scroll inside their own box */
  table { max-width: 100%; }
  table.msgs, table.clist { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }

  /* Safety net: trim any leftover sideways overflow (clip keeps sticky headers working) */
  html, body { overflow-x: clip; }
  .vtabs, .view { max-width: 100%; }
}