/* ============================================
   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 (.secondary-simple-2582) is a descendant of
   .disabled_f314 (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.outer-8920 {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".texture-e05f" 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.west-6659 so it can't cause
   horizontal overflow anyway. */
.caption-blue-a82a,
.rough-a9c7,
.section_a92f,
.photo-3991,
.old_b899,
.filter_6005,
.section-1fa1,
.menu-19cc,
.full-dbe8,
.main-977e,
.small-4958 {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .summary_531e {
    padding: 8px 0;
  }
  
  .hero_4ad8 img {
    height: 28px;
    width: auto;
  }
  
  .middle_5bfc {
    display: none !important;
  }
  
  .list_soft_f499 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .list_soft_f499 svg {
    width: 14px;
    height: 14px;
  }
  
  .tag_south_f896 {
    padding: 6px;
  }
  
  .footer-fcc4 {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .section_a92f,
  .rough-a9c7,
  .photo-3991,
  .old_b899,
  .outline_d92b,
  .text-44ab,
  .dark_06cb,
  .lower_c3cb,
  .tiny_6e5a,
  .element_red_ed54,
  .main_cd00,
  .list-065f {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .frame_stale_512b,
  .info-selected-6101 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .fresh-29ea,
  .container-copper-fe8c,
  .glass-099f,
  .mask_87ef,
  .west_4327,
  .surface_light_81dc,
  .surface_f413 {
    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 */
  .button_4108,
  .element-9777,
  .backdrop_60c3,
  .green-51d6,
  .table-purple-2f57 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .pro_cab1,
  .purple_a792,
  .box-d992,
  .warm_4507 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .logo-pink-0418,
  .gallery_active_8ec4 {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .summary_0e1e,
  .in_791a,
  .south_6351,
  .plasma_b09a {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .current-439f,
  .full_b60b,
  .container-cold-7df0,
  .notice-upper-e8db,
  .item-07a9,
  .shade_57e9 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .button_4108,
  .element-9777,
  .green-51d6 {
    max-width: none !important;
  }
  
  .texture-e05f {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .pro_cab1 {
    font-size: 1.5rem !important;
  }
  
  .purple_a792 {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .sidebar-511b,
  .tag_f672 {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .box-d992 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .modal_93b8 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .progress_brown_1f47 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .button_4108,
  .green-51d6 {
    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: 3455 */
.promo-block-e5 {
  padding: 0.1rem;
  font-size: 12px;
  line-height: 1.2;
}
