/* ============================================
   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 (.texture-88e0) is a descendant of
   .current_ec72 (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.sort_f758 {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".short-a97e" 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.fast_810a so it can't cause
   horizontal overflow anyway. */
.over_7b7a,
.progress-e654,
.basic_26b7,
.cold_4337,
.sort-gas-08f0,
.logo-6f9f,
.aside_5344,
.thumbnail-bright-f6d4,
.popup_silver_70fc,
.caption-50f7,
.gold_8309 {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .left_8f8f {
    padding: 8px 0;
  }
  
  .fluid_dd17 img {
    height: 28px;
    width: auto;
  }
  
  .outline_5c1d {
    display: none !important;
  }
  
  .label-current-8c42 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .label-current-8c42 svg {
    width: 14px;
    height: 14px;
  }
  
  .photo_9a2a {
    padding: 6px;
  }
  
  .shadow_ce77 {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .basic_26b7,
  .progress-e654,
  .cold_4337,
  .sort-gas-08f0,
  .feature-stale-cfeb,
  .right-d913,
  .accent-top-ba7a,
  .hard_24b9,
  .frame-right-560f,
  .modal-rough-6bef,
  .link-tiny-57e8,
  .pro-cdca {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .orange-c668,
  .copper_e079 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .notification_gold_99a8,
  .medium_cfd5,
  .photo-bf63,
  .row-light-a8aa,
  .tabs-57d7,
  .row_0a18,
  .message_static_ddaa {
    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 */
  .black_8a3f,
  .cold-6081,
  .hover_4cc6,
  .footer_easy_3909,
  .glass_ca84 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .banner_gold_6f35,
  .component_c8d6,
  .tooltip_yellow_91db,
  .bright-61ec {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .hidden-large-1307,
  .description_new_2336 {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .label-77ca,
  .thumbnail-df20,
  .iron-be14,
  .content_steel_5835 {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .overlay_b6b5,
  .under_0043,
  .picture-e101,
  .avatar_cold_0d4d,
  .paragraph_93d6,
  .paper_44f2 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .black_8a3f,
  .cold-6081,
  .footer_easy_3909 {
    max-width: none !important;
  }
  
  .short-a97e {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .banner_gold_6f35 {
    font-size: 1.5rem !important;
  }
  
  .component_c8d6 {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .upper-6381,
  .huge_aa80 {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .tooltip_yellow_91db {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .overlay-a0d6 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .main-thick-58d3 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .black_8a3f,
  .footer_easy_3909 {
    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: 0ccb */
.shadow-element-l9 {
  padding: 0.1rem;
  font-size: 14px;
  line-height: 1.3;
}
