/* ============================================
   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 (.shadow_f07f) is a descendant of
   .panel-25e3 (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.summary-cool-dfeb {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".basic_21df" 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.hero_out_56d6 so it can't cause
   horizontal overflow anyway. */
.middle-d355,
.section_1bcb,
.gallery-wide-531f,
.gas_70ee,
.dim_1d2c,
.footer-3b54,
.aside-fixed-38f5,
.slider-fresh-2867,
.progress_a653,
.sidebar_prev_5609,
.tertiary_current_b1cb {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .heading-green-3427 {
    padding: 8px 0;
  }
  
  .rough-130e img {
    height: 28px;
    width: auto;
  }
  
  .badge-white-92a6 {
    display: none !important;
  }
  
  .current_5060 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .current_5060 svg {
    width: 14px;
    height: 14px;
  }
  
  .detail-lite-11b9 {
    padding: 6px;
  }
  
  .bronze_8080 {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .gallery-wide-531f,
  .section_1bcb,
  .gas_70ee,
  .dim_1d2c,
  .chip_ab37,
  .info_pro_a96b,
  .modal-f234,
  .backdrop-old-4dbc,
  .picture_dirty_5560,
  .center_24e3,
  .white-39b4,
  .tooltip-ef3a {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .advanced-50d3,
  .overlay_969e {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .gold-6cee,
  .info-prev-b520,
  .preview_e7c0,
  .under-71a1,
  .link-2dd1,
  .search_glass_993b,
  .solid_74a7 {
    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 */
  .dynamic-0c49,
  .status_fast_ae06,
  .modal_be3c,
  .widget_pink_c4f6,
  .active-483c {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .solid_da2c,
  .picture-2036,
  .link-4d89,
  .action_8b5f {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .current-3e2a,
  .gradient_west_7462 {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .tertiary-69a1,
  .notification_clean_e8b0,
  .banner-0135,
  .description_brown_cfea {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .notification-first-1925,
  .picture-414f,
  .purple_3307,
  .label_4503,
  .medium_6a80,
  .aside-slow-d9fa {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .dynamic-0c49,
  .status_fast_ae06,
  .widget_pink_c4f6 {
    max-width: none !important;
  }
  
  .basic_21df {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .solid_da2c {
    font-size: 1.5rem !important;
  }
  
  .picture-2036 {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .media_complex_5f8d,
  .center-0ee7 {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .link-4d89 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .secondary_c9ef {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .progress-active-f679 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .dynamic-0c49,
  .widget_pink_c4f6 {
    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: 8a08 */
.phantom-card-u7 {
  padding: 0.5rem;
  font-size: 11px;
  line-height: 1.0;
}
