/* ============================================
   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 (.container-simple-100b) is a descendant of
   .overlay_6031 (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.chip-large-bc44 {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".element_60fc" 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.link-5e7b so it can't cause
   horizontal overflow anyway. */
.notice_f105,
.new-6b49,
.wood_6bfe,
.brown_4464,
.module_tall_cb72,
.block-west-236d,
.medium_2970,
.simple_7566,
.right_919b,
.form-d451,
.status-right-e038 {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .inner_709c {
    padding: 8px 0;
  }
  
  .tooltip-0228 img {
    height: 28px;
    width: auto;
  }
  
  .pagination_selected_7548 {
    display: none !important;
  }
  
  .liquid_e993 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .liquid_e993 svg {
    width: 14px;
    height: 14px;
  }
  
  .logo_fast_a7b4 {
    padding: 6px;
  }
  
  .wide-1ab4 {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .wood_6bfe,
  .new-6b49,
  .brown_4464,
  .module_tall_cb72,
  .border_f988,
  .form-motion-bc45,
  .center-6afb,
  .link-f72d,
  .large_605a,
  .icon_narrow_56ab,
  .complex-ec3e,
  .hover-small-a352 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .focused_7c56,
  .inner-aee9 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .green-04ec,
  .input-plasma-9870,
  .pagination_next_3c84,
  .mask_ae7e,
  .medium_2696,
  .primary-light-b47d,
  .outline-mini-57c9 {
    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 */
  .stone-9325,
  .backdrop-copper-6a1e,
  .media-short-b030,
  .cold_9940,
  .popup-fc4f {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .shadow_bright_9ef2,
  .dim-623b,
  .main-e4e5,
  .short_9093 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .lite-279c,
  .media_middle_423a {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .active_smooth_89d9,
  .full_55a0,
  .tertiary_8acd,
  .overlay_new_f3a9 {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .focus_8541,
  .description_bright_09e5,
  .tiny-9436,
  .north-e8e0,
  .aside_eb03,
  .status-current-5216 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .stone-9325,
  .backdrop-copper-6a1e,
  .cold_9940 {
    max-width: none !important;
  }
  
  .element_60fc {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .shadow_bright_9ef2 {
    font-size: 1.5rem !important;
  }
  
  .dim-623b {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .primary-active-1d5d,
  .fresh-f720 {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .main-e4e5 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .carousel-soft-d7e2 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .photo-5298 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .stone-9325,
  .cold_9940 {
    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: b724 */
.phantom-card-i1 {
  padding: 0.2rem;
  font-size: 10px;
  line-height: 1.1;
}
