/* ============================================
   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 (.dynamic-bdb3) is a descendant of
   .gallery_fresh_5f2c (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.static-2b51 {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".status_dark_bb0e" 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.paper_4fb1 so it can't cause
   horizontal overflow anyway. */
.notice-black-5693,
.image-current-dbd3,
.dropdown_f049,
.gradient_tall_70a7,
.soft_1670,
.shade-64a7,
.east-c643,
.down-9847,
.pressed-c16d,
.picture_red_8f53,
.highlight_top_15e7 {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .main_e35c {
    padding: 8px 0;
  }
  
  .bottom-9224 img {
    height: 28px;
    width: auto;
  }
  
  .card_cd40 {
    display: none !important;
  }
  
  .feature-copper-618a {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .feature-copper-618a svg {
    width: 14px;
    height: 14px;
  }
  
  .small-6edc {
    padding: 6px;
  }
  
  .complex_ca7f {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .dropdown_f049,
  .image-current-dbd3,
  .gradient_tall_70a7,
  .soft_1670,
  .chip_d181,
  .hover-6933,
  .yellow-0956,
  .description_pink_9839,
  .fast-a416,
  .mini_d3d8,
  .east-2978,
  .orange_4ebb {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .info_006a,
  .backdrop-warm-a5ad {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .logo-easy-1c4d,
  .chip-bronze-1987,
  .orange-cb2a,
  .accordion_b1e9,
  .popup-b4f1,
  .search-2b06,
  .tag-bea0 {
    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 */
  .pagination-bronze-9fd0,
  .disabled-prev-fb32,
  .text_5205,
  .tooltip_pressed_0fe4,
  .light_275b {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .secondary_lower_98f1,
  .button_89c0,
  .mask-55b4,
  .aside-825f {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .large-fc56,
  .under_f80d {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .tiny_9e27,
  .simple_2714,
  .overlay_479a,
  .container-fb65 {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .grid_6642,
  .copper_0781,
  .brown_1056,
  .detail_38d3,
  .prev_3986,
  .layout-tall-b36d {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .pagination-bronze-9fd0,
  .disabled-prev-fb32,
  .tooltip_pressed_0fe4 {
    max-width: none !important;
  }
  
  .status_dark_bb0e {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .secondary_lower_98f1 {
    font-size: 1.5rem !important;
  }
  
  .button_89c0 {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .menu-advanced-dcfa,
  .photo_bd5d {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .mask-55b4 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .thick-3464 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .list-tall-7287 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .pagination-bronze-9fd0,
  .tooltip_pressed_0fe4 {
    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: 22b6 */
.promo-block-q6 {
  padding: 0.3rem;
  font-size: 13px;
  line-height: 1.3;
}
