/* StarAPI Mobile Optimizations v2
   Injected via Nginx sub_filter on all pages.
   v2: removed destructive rules (btn width:100%, [class*="card"] padding reset),
   hero top padding sized to clear the fixed floating nav card (~86px tall). */

@media (max-width: 640px) {
  /* Prevent horizontal overflow */
  html, body { overflow-x: hidden; }

  /* Smaller base font for very small screens */
  body { font-size: 14px; }

  /* Fixed header horizontal padding on mobile */
  header, [class*="header"] {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }

  /* Custom page hero: start below the fixed floating nav card */
  .hero {
    padding: 128px 16px 64px !important;
    min-height: auto !important;
  }

  /* Sections: tighter but readable vertical rhythm */
  .section { padding: 60px 16px !important; }

  /* Tighter gaps in grids */
  .grid { gap: 10px !important; }

  /* Tables: allow horizontal scroll */
  table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }

  /* Code blocks: scroll on mobile */
  pre, code {
    overflow-x: auto;
    max-width: 100%;
  }
}

@media (max-width: 380px) {
  body { font-size: 13px; }
}
