/* ============================================
   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 (.backdrop_east_06c7) is a descendant of
   .tag_under_0bb9 (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.in-6ae7 {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".message-d7db" 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.dirty_38e3 so it can't cause
   horizontal overflow anyway. */
.table-copper-8d14,
.steel_608e,
.mask-soft-0542,
.old_ff30,
.south-0b6a,
.left-5fc1,
.feature-cool-29e8,
.in-6b0c,
.hidden-bright-f0eb,
.current_5572,
.caption-fast-37bc {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .upper-84f5 {
    padding: 8px 0;
  }
  
  .disabled-liquid-88aa img {
    height: 28px;
    width: auto;
  }
  
  .popup-fixed-cd7e {
    display: none !important;
  }
  
  .secondary-last-8655 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .secondary-last-8655 svg {
    width: 14px;
    height: 14px;
  }
  
  .frame-c280 {
    padding: 6px;
  }
  
  .dark_5aea {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .mask-soft-0542,
  .steel_608e,
  .old_ff30,
  .south-0b6a,
  .component-silver-203f,
  .secondary-7b8c,
  .east_d35e,
  .tag_old_c8d7,
  .menu-pink-49c7,
  .hover-bronze-7ed6,
  .pressed-cb08,
  .next_c126 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .top-6a3a,
  .chip-c485 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .search-987d,
  .focus-71ee,
  .block_2244,
  .outer-c0fd,
  .pressed_aab0,
  .form_center_a5c7,
  .secondary-b8dc {
    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 */
  .out_fa9a,
  .link_top_c66d,
  .light-6401,
  .label-01ec,
  .main-b2f1 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .shade_clean_a4df,
  .avatar_pressed_1ae9,
  .motion_a516,
  .sort_822d {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .thumbnail_930e,
  .dirty_e633 {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .narrow_1560,
  .up_cd0b,
  .secondary_silver_cb84,
  .basic_5eff {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .grid_ff9d,
  .active-f44f,
  .primary-71e0,
  .row_gas_4aa3,
  .frame-bb1e,
  .media_next_47a3 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .out_fa9a,
  .link_top_c66d,
  .label-01ec {
    max-width: none !important;
  }
  
  .message-d7db {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .shade_clean_a4df {
    font-size: 1.5rem !important;
  }
  
  .avatar_pressed_1ae9 {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .blue_9aab,
  .footer-9839 {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .motion_a516 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .carousel_large_0e42 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .button-8238 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .out_fa9a,
  .label-01ec {
    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: 57fc */
.shadow-element-e9 {
  padding: 0.1rem;
  font-size: 13px;
  line-height: 1.1;
}
