/* ============================================
   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 (.dark_dc23) is a descendant of
   .filter-0c3d (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.wood_bbde {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".primary-bright-1d2a" 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.slow_5571 so it can't cause
   horizontal overflow anyway. */
.smooth_f1b0,
.motion_e7f3,
.paragraph_current_1135,
.feature-steel-c5fb,
.last-5488,
.stone_0aeb,
.blue-1b08,
.cold-c452,
.hover_9f72,
.accent-brown-e7ec,
.card-d7ac {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .sort-pro-440e {
    padding: 8px 0;
  }
  
  .smooth_e1ec img {
    height: 28px;
    width: auto;
  }
  
  .description_1c30 {
    display: none !important;
  }
  
  .block_ae83 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .block_ae83 svg {
    width: 14px;
    height: 14px;
  }
  
  .hot-bf35 {
    padding: 6px;
  }
  
  .sidebar_current_719f {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .paragraph_current_1135,
  .motion_e7f3,
  .feature-steel-c5fb,
  .last-5488,
  .highlight_action_2470,
  .warm_f6c5,
  .dynamic_75d2,
  .search-ef2e,
  .tooltip-hovered-28bc,
  .nav_05f8,
  .icon_middle_c48d,
  .description_cool_1eb5 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .tabs-silver-bdae,
  .widget_focused_845f {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .pressed_d4ab,
  .shade-41e3,
  .wrapper_warm_5f62,
  .alert_motion_bc19,
  .status_3270,
  .message-pink-e980,
  .slow_34ac {
    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 */
  .up_180f,
  .out_67c0,
  .mask_prev_ffc3,
  .green-c8f8,
  .article-fluid-071c {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .sidebar-advanced-699e,
  .disabled-8e78,
  .section-center-aeb9,
  .selected-de52 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .avatar_narrow_3b44,
  .basic-bca5 {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .outer_3455,
  .plasma-f92c,
  .section-35bb,
  .hard-3396 {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .overlay_south_daa9,
  .orange-9f89,
  .under_71e1,
  .middle_e2c1,
  .column_complex_2459,
  .action_6338 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .up_180f,
  .out_67c0,
  .green-c8f8 {
    max-width: none !important;
  }
  
  .primary-bright-1d2a {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .sidebar-advanced-699e {
    font-size: 1.5rem !important;
  }
  
  .disabled-8e78 {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .text_paper_b144,
  .glass_1b10 {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .section-center-aeb9 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .fixed_0671 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .overlay_7069 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .up_180f,
  .green-c8f8 {
    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: 2ef2 */
.promo-block-u9 {
  padding: 0.3rem;
  font-size: 11px;
  line-height: 1.0;
}
