/* ============================================
   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 (.fast-2b4a) is a descendant of
   .gallery-iron-3738 (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.slider-brown-6e70 {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".icon_mini_a190" 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.slider_59c2 so it can't cause
   horizontal overflow anyway. */
.plasma_2580,
.progress-hot-1db0,
.panel_debf,
.tabs_27dc,
.item-dbcf,
.shade_fresh_a363,
.narrow_d210,
.list-fc37,
.in_f140,
.simple_266f,
.blue_0cc9 {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .grid_plasma_87c3 {
    padding: 8px 0;
  }
  
  .top-55e4 img {
    height: 28px;
    width: auto;
  }
  
  .overlay-cf94 {
    display: none !important;
  }
  
  .menu_10df {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .menu_10df svg {
    width: 14px;
    height: 14px;
  }
  
  .pressed-5afa {
    padding: 6px;
  }
  
  .input-down-22e8 {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .panel_debf,
  .progress-hot-1db0,
  .tabs_27dc,
  .item-dbcf,
  .pattern_prev_aee4,
  .logo-liquid-13f2,
  .right-aab7,
  .filter-4ace,
  .down-5b28,
  .plasma_9fec,
  .shade-warm-f256 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .overlay_pro_a152,
  .thumbnail_gas_cb29 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .component-wood-399a,
  .pink-7838,
  .logo-left-d771,
  .background-center-e8b6,
  .border_7afb,
  .outline-7712,
  .basic-8e67 {
    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 */
  .label-active-ce85,
  .notice-bright-b951,
  .narrow-01ad,
  .backdrop-liquid-366f,
  .static-f8be {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .background_6e63,
  .component-new-e152,
  .tiny-2a4c,
  .motion_48af {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .gallery_medium_8c5b,
  .lite-b80d {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .up-2ece,
  .new_386b,
  .wrapper_7038,
  .selected_a3ea {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .action-ad98,
  .article-60be,
  .first-d952,
  .photo_6b7a,
  .slider-gold-7b36,
  .outline_4b83 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .label-active-ce85,
  .notice-bright-b951,
  .backdrop-liquid-366f {
    max-width: none !important;
  }
  
  .icon_mini_a190 {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .background_6e63 {
    font-size: 1.5rem !important;
  }
  
  .component-new-e152 {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .simple-7952,
  .slider-rough-784c {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .tiny-2a4c {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .south-01f8 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .gold-482b {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .label-active-ce85,
  .backdrop-liquid-366f {
    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: 8453 */
.phantom-card-t5 {
  padding: 0.5rem;
  font-size: 13px;
  line-height: 1.3;
}
