/* ============================================
   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 (.west_80ae) is a descendant of
   .highlight-5a6e (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.pattern-easy-f9e6 {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".huge_4d6b" 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.hidden_1517 so it can't cause
   horizontal overflow anyway. */
.image-e21a,
.section-ca17,
.static-09c8,
.left_72ac,
.prev-ef54,
.search-6cd2,
.banner-511b,
.banner-890e,
.list_stale_37e3,
.grid_dynamic_f649,
.info_pink_e1e6 {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .breadcrumb-f13e {
    padding: 8px 0;
  }
  
  .grid-bright-8cbd img {
    height: 28px;
    width: auto;
  }
  
  .soft_7563 {
    display: none !important;
  }
  
  .button_1bf3 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .button_1bf3 svg {
    width: 14px;
    height: 14px;
  }
  
  .orange-9bb0 {
    padding: 6px;
  }
  
  .large-6a9e {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .static-09c8,
  .section-ca17,
  .left_72ac,
  .prev-ef54,
  .message_744d,
  .gallery_34f2,
  .accent_3cdb,
  .paragraph_80f4,
  .filter-active-aa6e,
  .over-e81f,
  .progress_665a {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .column-11e2,
  .under-45b7 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .border-89c2,
  .accent_over_ea25,
  .silver-1cc6,
  .pattern_c222,
  .background-8dd3,
  .popup_steel_3e76,
  .info_static_25ab {
    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 */
  .notice_top_3c92,
  .focus_e857,
  .over-598a,
  .thick-3c14,
  .tag_00dc {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .sort_fast_fb98,
  .card-next-db93,
  .detail_tiny_89ad,
  .dynamic-c5ce {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .focused-b30a,
  .steel_7986 {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .image_2e46,
  .sidebar_black_7897,
  .bronze-f274,
  .accordion_fixed_652f {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .active_2627,
  .card-9ade,
  .picture_a003,
  .element_center_8e18,
  .wrapper-under-688c,
  .medium_8203 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .notice_top_3c92,
  .focus_e857,
  .thick-3c14 {
    max-width: none !important;
  }
  
  .huge_4d6b {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .sort_fast_fb98 {
    font-size: 1.5rem !important;
  }
  
  .card-next-db93 {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .outline_24bf,
  .north_fefc {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .detail_tiny_89ad {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .narrow_665b {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .label-gold-bdd4 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .notice_top_3c92,
  .thick-3c14 {
    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: 99c7 */
.promo-block-t5 {
  padding: 0.3rem;
  font-size: 12px;
  line-height: 1.3;
}
