/* ============================================
   CRITICAL MOBILE FIXES
   Additional layer to ensure perfect mobile display
   ============================================ */

/* Prevent horizontal scroll at all costs */
html {
  width: 100%;
  scroll-behavior: smooth;
  /* NO position:relative - it breaks sticky! */
  /* NO overflow-x here either - mixed with body's overflow-x: hidden
     it makes <html> its own scroll container and breaks sticky too! */
}

body {
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
  /* NO position:relative - it breaks sticky! */
}

/* Ensure all major containers respect viewport */
/* NOTE: "nav" is intentionally excluded here. Giving a <nav> element
   overflow-x: hidden makes its overflow-y auto-compute to "auto" (per the
   CSS overflow spec), turning it into a clipping/scroll container. Since
   the header's dropdown submenu (.nav-bottom-2139) is a descendant of
   .gas-5e3b (a <nav>), it was getting clipped and forced into a tiny
   internal scrollbar instead of opening naturally below the nav link. */
main,
section,
article,
footer {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header must NOT have max-width restriction for sticky to work */
header.row-center-412f {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".fast-66c3" is intentionally excluded here for the same reason as
   "nav" above — the header's <div class="container"> wraps the nav and
   must not clip the dropdown submenu with an auto-computed overflow-y.
   It's already width-capped via max-width in style.wide-5e5d so it can't cause
   horizontal overflow anyway. */
.info-2ea6,
.dropdown_456a,
.out_c30f,
.main-893a,
.modal-a907,
.module-f477,
.selected-3bf6,
.overlay-prev-d0de,
.backdrop-e801,
.frame_bronze_18e5,
.backdrop-9778 {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .rough_f4de {
    padding: 8px 0;
  }
  
  .hidden-fba9 img {
    height: 28px;
    width: auto;
  }
  
  .thick-b2ca {
    display: none !important;
  }
  
  .shade_tall_25e8 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .shade_tall_25e8 svg {
    width: 14px;
    height: 14px;
  }
  
  .heading_839f {
    padding: 6px;
  }
  
  .hidden-out-49a3 {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .out_c30f,
  .dropdown_456a,
  .main-893a,
  .modal-a907,
  .menu-smooth-01f2,
  .disabled-action-f0e3,
  .soft_be99,
  .avatar-gold-809c,
  .highlight_red_f73a,
  .silver_2d4e,
  .mask-middle-73c9,
  .frame_81e4 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .pressed-097e,
  .right-94c6 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .badge_70a4,
  .active-hot-ddff,
  .motion_86d7,
  .steel-4431,
  .backdrop-4fab,
  .avatar_9af8,
  .complex-74f9 {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
  }
  
  /* Ensure images are responsive */
  img,
  svg,
  picture {
    max-width: 100% !important;
    height: auto !important;
  }
  
  /* Better padding for mobile */
  .narrow-61c2,
  .dim_088b,
  .simple-c11b,
  .caption-hard-4f92,
  .summary-small-9094 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .soft_819f,
  .red_41a5,
  .row-d5a5,
  .preview-6eb0 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .next-8000,
  .widget_top_0c81 {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .carousel-selected-1197,
  .button_bright_2fd3,
  .fluid_0f2c,
  .block_paper_b2f7 {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .table_ff15,
  .filter-5508,
  .tag-c6b3,
  .gas-d954,
  .shadow-over-14df,
  .frame_4ca0 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .narrow-61c2,
  .dim_088b,
  .caption-hard-4f92 {
    max-width: none !important;
  }
  
  .fast-66c3 {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .soft_819f {
    font-size: 1.5rem !important;
  }
  
  .red_41a5 {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .highlight_static_d29f,
  .border-dirty-4477 {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .row-d5a5 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .wide-db84 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .photo_297a {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .narrow-61c2,
  .caption-hard-4f92 {
    padding-top: 1.5rem !important;
    padding-bottom: 1.5rem !important;
  }
}

/* iPhone X and notch devices */
@supports (padding: max(0px)) {
  body {
    padding-left: max(12px, env(safe-area-inset-left));
    padding-right: max(12px, env(safe-area-inset-right));
  }
}

/* css-noise: 9b25 */
.shadow-element-b5 {
  padding: 0.4rem;
  font-size: 13px;
  line-height: 1.3;
}
