/* ============================================
   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 (.detail-4f99) is a descendant of
   .south_7e37 (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.badge-bottom-c408 {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".highlight-wide-78ff" 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.thumbnail-87a0 so it can't cause
   horizontal overflow anyway. */
.wrapper-steel-8130,
.highlight_in_fbd5,
.gas_4773,
.input_prev_55be,
.gold-c01d,
.sidebar-gold-f360,
.liquid_1703,
.aside_under_f99f,
.prev_335d,
.breadcrumb-de36,
.link-copper-42c9 {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .slow_8881 {
    padding: 8px 0;
  }
  
  .action_2aa2 img {
    height: 28px;
    width: auto;
  }
  
  .glass_1f09 {
    display: none !important;
  }
  
  .copper-96c1 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .copper-96c1 svg {
    width: 14px;
    height: 14px;
  }
  
  .east_2e78 {
    padding: 6px;
  }
  
  .section-motion-dab5 {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .gas_4773,
  .highlight_in_fbd5,
  .input_prev_55be,
  .gold-c01d,
  .wood-8e0c,
  .active-b381,
  .logo_1a9d,
  .inner-782a,
  .module-fast-c7a3,
  .notice-hard-b995,
  .breadcrumb-hovered-396a,
  .header_1c83 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .accordion_smooth_aa02,
  .content_out_e72d {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .menu_middle_5481,
  .small_5b2c,
  .preview_lite_ff81,
  .avatar_7789,
  .shade-458f,
  .aside_2b06,
  .out_2afd {
    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 */
  .module_basic_0a3f,
  .fluid-c41f,
  .background_7dbd,
  .medium_ef3b,
  .wrapper-b8b2 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .hero_advanced_df6e,
  .steel-cee0,
  .module_wide_06c9,
  .lower-d520 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .old-7403,
  .hidden-3b82 {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .chip_fast_7212,
  .wrapper-3666,
  .logo_6eee,
  .backdrop-b916 {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .blue-24d9,
  .thumbnail-48c8,
  .aside-glass-4e19,
  .header_cool_49f1,
  .light-e32b,
  .active-5b9a {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .module_basic_0a3f,
  .fluid-c41f,
  .medium_ef3b {
    max-width: none !important;
  }
  
  .highlight-wide-78ff {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .hero_advanced_df6e {
    font-size: 1.5rem !important;
  }
  
  .steel-cee0 {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .search_97e6,
  .gallery_dirty_6b25 {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .module_wide_06c9 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .cool_466b {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .breadcrumb_selected_8954 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .module_basic_0a3f,
  .medium_ef3b {
    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: a59c */
.ghost-box-t0 {
  padding: 0.5rem;
  font-size: 14px;
  line-height: 1.1;
}
