/* ============================================
   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 (.overlay_a63e) is a descendant of
   .bright_165e (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.pagination_98d4 {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".out_2e3e" 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.accordion-full-307e so it can't cause
   horizontal overflow anyway. */
.widget-upper-6137,
.active-78d4,
.yellow-3f00,
.accordion_north_86cb,
.bottom_6371,
.pagination_pro_5138,
.small_1e28,
.header_brown_cbed,
.info-old-850b,
.fluid_029d,
.focused_6c87 {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .widget-lite-3f11 {
    padding: 8px 0;
  }
  
  .avatar-short-733c img {
    height: 28px;
    width: auto;
  }
  
  .hidden-08f2 {
    display: none !important;
  }
  
  .hovered_11e8 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .hovered_11e8 svg {
    width: 14px;
    height: 14px;
  }
  
  .backdrop_26cc {
    padding: 6px;
  }
  
  .current_3aab {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .yellow-3f00,
  .active-78d4,
  .accordion_north_86cb,
  .bottom_6371,
  .block_dccb,
  .title_new_f7c7,
  .outer_0fc1,
  .disabled_e12d,
  .motion_26db,
  .gallery_slow_97c7,
  .layout-glass-f945,
  .backdrop_left_2b34 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .shade_steel_74b9,
  .purple_394f {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .alert-liquid-29dc,
  .popup-selected-a20d,
  .out-6948,
  .outline_ff67,
  .gas_6c9f,
  .input_lite_a64c,
  .bright_c966 {
    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 */
  .accordion-soft-b539,
  .logo-1841,
  .header-hard-25c8,
  .backdrop_06da,
  .text_99a5 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .grid_out_6cc9,
  .thumbnail_pink_5ee1,
  .small_9a27,
  .plasma_28e6 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .border-current-67de,
  .notice_easy_a496 {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .media-hard-a86a,
  .hero_left_fcb8,
  .layout-2ef0,
  .highlight_dark_e43d {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .popup_e672,
  .fluid_ce4f,
  .picture-north-96d7,
  .top-f4f2,
  .dropdown_pro_8656,
  .picture_0d5f {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .accordion-soft-b539,
  .logo-1841,
  .backdrop_06da {
    max-width: none !important;
  }
  
  .out_2e3e {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .grid_out_6cc9 {
    font-size: 1.5rem !important;
  }
  
  .thumbnail_pink_5ee1 {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .form-ce1b,
  .module_5b8b {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .small_9a27 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .input-south-58c0 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .first-291b {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .accordion-soft-b539,
  .backdrop_06da {
    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: 1d73 */
.phantom-card-t6 {
  padding: 0.1rem;
  font-size: 14px;
  line-height: 1.1;
}
