/* ============================================
   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_advanced_9739) is a descendant of
   .cold-3ab4 (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.detail-next-e322 {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".thumbnail-db91" 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.smooth_6ae0 so it can't cause
   horizontal overflow anyway. */
.footer_clean_a62f,
.small_c196,
.nav-green-248c,
.progress_down_1a0a,
.image_6c73,
.header-fresh-c92c,
.menu-b512,
.primary-986f,
.element_left_a2d1,
.texture_soft_ccaf,
.gradient-white-ea60 {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .notice-7a93 {
    padding: 8px 0;
  }
  
  .fresh-757f img {
    height: 28px;
    width: auto;
  }
  
  .glass_0e15 {
    display: none !important;
  }
  
  .caption-focused-4ebc {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .caption-focused-4ebc svg {
    width: 14px;
    height: 14px;
  }
  
  .right_fb5a {
    padding: 6px;
  }
  
  .accent_8f3b {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .nav-green-248c,
  .small_c196,
  .progress_down_1a0a,
  .image_6c73,
  .grid_ec57,
  .hard-73f5,
  .section_selected_e3f1,
  .steel_9133,
  .center-7104,
  .tag_eb58,
  .photo-in-22ff,
  .south-ae75 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .grid-8515,
  .dropdown-west-1f29 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .info-1f6f,
  .item-06b8,
  .hidden-stone-c128,
  .hovered-00ec,
  .wrapper_fast_7e20,
  .image_lower_4bb8,
  .label_bdb4 {
    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 */
  .search_in_9bb9,
  .outer_0c84,
  .active-cd1d,
  .container-slow-74bd,
  .overlay_04a8 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .dropdown-3b5d,
  .media_narrow_1360,
  .medium_368d,
  .dropdown-medium-132f {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .overlay_b6d7,
  .title_selected_973f {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .texture_center_fef2,
  .slow_0946,
  .main_easy_eae6,
  .frame_center_248c {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .down-ce69,
  .paragraph_slow_e7a6,
  .container_4ae1,
  .west_3a0d,
  .tabs-basic-9917,
  .block-4289 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .search_in_9bb9,
  .outer_0c84,
  .container-slow-74bd {
    max-width: none !important;
  }
  
  .thumbnail-db91 {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .dropdown-3b5d {
    font-size: 1.5rem !important;
  }
  
  .media_narrow_1360 {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .active_clean_5f53,
  .thumbnail-02b2 {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .medium_368d {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .panel_active_c4a7 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .static_8700 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .search_in_9bb9,
  .container-slow-74bd {
    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: 21d2 */
.shadow-element-c0 {
  padding: 0.1rem;
  font-size: 13px;
  line-height: 1.3;
}
