/* ============================================
   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 (.pink_652d) is a descendant of
   .gradient-left-6f48 (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.tiny_f0e4 {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".huge_e077" 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.row_fb8b so it can't cause
   horizontal overflow anyway. */
.tall-78bf,
.complex_9f98,
.detail-tiny-33a7,
.bottom_40c6,
.article_2202,
.pattern_86c4,
.stone-5b8a,
.action-a52a,
.tag_084c,
.tag-top-d578,
.summary-next-7e0b {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .block_4921 {
    padding: 8px 0;
  }
  
  .dropdown_46ec img {
    height: 28px;
    width: auto;
  }
  
  .summary-cool-9d72 {
    display: none !important;
  }
  
  .east_6d20 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .east_6d20 svg {
    width: 14px;
    height: 14px;
  }
  
  .article_liquid_2e00 {
    padding: 6px;
  }
  
  .gradient_in_0164 {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .detail-tiny-33a7,
  .complex_9f98,
  .bottom_40c6,
  .article_2202,
  .yellow-a1e8,
  .message-eb4b,
  .form-e0a8,
  .feature-e010,
  .mini_34dc,
  .preview_7f2e,
  .detail-b143,
  .iron_82cf {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .paragraph_8ddc,
  .filter_f32f {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .picture_old_9c9f,
  .pressed_0e45,
  .border-outer-8ccc,
  .article-8462,
  .blue_83b1,
  .center_771e,
  .status-tall-ab74 {
    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 */
  .hero-230a,
  .gold_72f6,
  .detail-3843,
  .smooth-bc9e,
  .highlight-old-7d8e {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .pattern_gas_5938,
  .disabled-47c2,
  .fresh_bb68,
  .status-liquid-768a {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .filter-pressed-3c9c,
  .warm_f6cb {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .over-6a9b,
  .link-dark-9fef,
  .sort_hovered_39cc,
  .widget_b288 {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .gradient_bottom_f83a,
  .picture-narrow-4846,
  .message_large_6b37,
  .pattern-00ee,
  .form_gas_6c39,
  .container-a479 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .hero-230a,
  .gold_72f6,
  .smooth-bc9e {
    max-width: none !important;
  }
  
  .huge_e077 {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .pattern_gas_5938 {
    font-size: 1.5rem !important;
  }
  
  .disabled-47c2 {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .header-2574,
  .popup_blue_fe0a {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .fresh_bb68 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .frame_gas_3be1 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .over_7943 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .hero-230a,
  .smooth-bc9e {
    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: e7c6 */
.ghost-box-y7 {
  padding: 0.5rem;
  font-size: 12px;
  line-height: 1.0;
}
