/* ============================================
   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 (.pink_acc4) is a descendant of
   .notification-69a6 (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.progress-8feb {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".bright-5f9b" 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.progress_static_d72e so it can't cause
   horizontal overflow anyway. */
.breadcrumb_2680,
.caption-77ee,
.filter-3c17,
.picture_bronze_d8ac,
.row_8195,
.banner-mini-669b,
.liquid_0670,
.alert_in_6512,
.bronze-b170,
.silver-5027,
.footer-over-2a7c {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .image-hard-944e {
    padding: 8px 0;
  }
  
  .logo_pressed_1049 img {
    height: 28px;
    width: auto;
  }
  
  .popup-15bc {
    display: none !important;
  }
  
  .full_000c {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .full_000c svg {
    width: 14px;
    height: 14px;
  }
  
  .wide_1831 {
    padding: 6px;
  }
  
  .background_gas_aabb {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .filter-3c17,
  .caption-77ee,
  .picture_bronze_d8ac,
  .row_8195,
  .panel-west-1424,
  .grid-12b5,
  .input-9eea,
  .tertiary-64be,
  .disabled_last_bf7f,
  .header_b9f1,
  .media_left_ff5d,
  .primary-bcf7 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .focused_8a6b,
  .block-down-1df0 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .frame-3a9e,
  .logo-645d,
  .tall_56a2,
  .basic_6fe3,
  .overlay-7727,
  .tabs-orange-c6f2,
  .active_c852 {
    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 */
  .mini_255b,
  .caption-4bf6,
  .pattern_down_cdf0,
  .title_simple_01ad,
  .summary_purple_e451 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .light_0c62,
  .texture_old_45d1,
  .narrow_68ae,
  .gallery-cold-68ca {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .hard-fecc,
  .button_in_5c3a {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .detail-0fed,
  .cool-3075,
  .notice_current_74c2,
  .element-white-d29d {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .video_fast_4277,
  .item_21d0,
  .black-e608,
  .content-d9b0,
  .shade-fce8,
  .texture-508c {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .mini_255b,
  .caption-4bf6,
  .title_simple_01ad {
    max-width: none !important;
  }
  
  .bright-5f9b {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .light_0c62 {
    font-size: 1.5rem !important;
  }
  
  .texture_old_45d1 {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .nav_static_0e55,
  .slider-183d {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .narrow_68ae {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .detail-8188 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .table_over_87cf {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .mini_255b,
  .title_simple_01ad {
    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: 89a5 */
.promo-block-z7 {
  padding: 0.3rem;
  font-size: 12px;
  line-height: 1.1;
}
