/* ============================================
   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 (.media-c66a) is a descendant of
   .mini_5c53 (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.easy_6139 {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".table_2519" 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.tiny_4b0c so it can't cause
   horizontal overflow anyway. */
.complex_ad55,
.easy_efd9,
.chip-0af3,
.label-315d,
.badge-bronze-c1dc,
.pro_c3c1,
.black_6cda,
.basic_e061,
.module-9841,
.avatar_7150,
.link_full_fa3b {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .shadow_center_bef4 {
    padding: 8px 0;
  }
  
  .highlight-eee9 img {
    height: 28px;
    width: auto;
  }
  
  .hard_7da5 {
    display: none !important;
  }
  
  .gold-f0bf {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .gold-f0bf svg {
    width: 14px;
    height: 14px;
  }
  
  .card-cold-e96d {
    padding: 6px;
  }
  
  .small-2993 {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .chip-0af3,
  .easy_efd9,
  .label-315d,
  .badge-bronze-c1dc,
  .fixed-214c,
  .photo-pro-6174,
  .tag_5f8f,
  .summary-current-12f2,
  .list-gold-38f2,
  .caption_6712,
  .dropdown-7d13,
  .left-e557 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .content_huge_f5ec,
  .layout-e2e6 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .button_pressed_1efa,
  .photo_steel_170c,
  .list_pressed_a5e8,
  .text-65c2,
  .huge_240b,
  .menu-stale-87f8,
  .solid_bb6e {
    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 */
  .hero-47f5,
  .cold-7b59,
  .list-c6bc,
  .liquid_cd2c,
  .footer-c7a8 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .disabled_cool_a8e0,
  .layout_38cc,
  .overlay_center_382b,
  .description_1038 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .link_abaa,
  .mini_5224 {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .accordion-1343,
  .tabs-outer-e69d,
  .aside_04dc,
  .white-4c55 {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .container-d626,
  .badge-middle-455f,
  .shadow_e83a,
  .glass_87f6,
  .gradient-clean-e3ff,
  .description-c6a9 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .hero-47f5,
  .cold-7b59,
  .liquid_cd2c {
    max-width: none !important;
  }
  
  .table_2519 {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .disabled_cool_a8e0 {
    font-size: 1.5rem !important;
  }
  
  .layout_38cc {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .section_4e55,
  .preview_steel_1f7d {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .overlay_center_382b {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .white_0ac1 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .south-7c4f {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .hero-47f5,
  .liquid_cd2c {
    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: 839b */
.ghost-box-p7 {
  padding: 0.4rem;
  font-size: 12px;
  line-height: 1.1;
}
