/* ==== MOBILE HORIZONTAL OVERFLOW HOTFIX — 2025-09-26 ==== */
@media (max-width: 1100px){
  /* Never allow sideways scroll */
  html, body { width:100%; max-width:100%; overflow-x:hidden; }

  /* Containers: let them shrink to phone width */
  .container, .content, .wrap,
  .wallet-grid, .order-layout, .row, .grid {
    width:auto !important;
    max-width:100% !important;
  }

  /* Grid/Flex children: allow shrinking (prevents overflow in CSS Grid) */
  .row > *, .grid > *,
  .wallet-grid > *, .order-layout > *,
  .card, .panel {
    min-width:0 !important;
    box-sizing:border-box;
  }

  /* Force wallet two-column layouts to single column on phones */
  .wallet-grid, .order-layout { grid-template-columns: 1fr !important; }

  /* Big inputs that were fixed-width */
  .asset-toolbar .input { width:100% !important; }

  /* Media scalers */
  img, svg, canvas, iframe, video {
    max-width:100% !important; height:auto !important;
  }

  /* Tables: full width + smooth horizontal scroll if needed */
  .table-wrap, .table-responsive, .scroll-x {
    overflow-x:auto; -webkit-overflow-scrolling:touch;
  }
  table { width:100% !important; border-collapse:separate; }

  /* Long hashes/addresses/emails can wrap instead of pushing layout wide */
  pre, code, .hash, .addr, .txid, .email, .mono {
    white-space:pre-wrap; word-break:break-word; overflow-wrap:anywhere;
  }

  /* Emergency: neutralize inline fixed widths that break mobile */
  [style*="min-width:"], [style*="width:"], [style*="max-width:"] {
    max-width:100% !important;
  }
}

/* Keep content above the bottom tabbar on phones */
@media (max-width: 1024px){
  body { padding-bottom: calc(68px + env(safe-area-inset-bottom)); }
}
