/* ============================================
   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 (.summary_4d5b) is a descendant of
   .logo_b587 (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.banner_up_238c {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".black-8595" 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.form_561c so it can't cause
   horizontal overflow anyway. */
.gallery-f3a3,
.info-pink-16ed,
.search_rough_5b8b,
.message-orange-d677,
.border_bottom_0211,
.popup_bronze_996b,
.secondary_thick_7e10,
.block_right_99b3,
.backdrop-thick-e9d4,
.gallery-medium-11a2,
.outer_251b {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .in-9113 {
    padding: 8px 0;
  }
  
  .fast_9b25 img {
    height: 28px;
    width: auto;
  }
  
  .basic_906d {
    display: none !important;
  }
  
  .header_prev_24ec {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .header_prev_24ec svg {
    width: 14px;
    height: 14px;
  }
  
  .breadcrumb_dd8f {
    padding: 6px;
  }
  
  .texture_tiny_1b7d {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .search_rough_5b8b,
  .info-pink-16ed,
  .message-orange-d677,
  .border_bottom_0211,
  .detail-39be,
  .main-f899,
  .message_d90e,
  .hot_f48d,
  .footer_complex_3a7f,
  .text-19db,
  .pagination_medium_36d7 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .text-f421,
  .logo_new_22b5 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .chip-soft-7b18,
  .complex-b915,
  .image-ef29,
  .layout-7272,
  .element-liquid-5ef3,
  .content-old-1336,
  .popup_330c {
    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 */
  .bottom-8893,
  .hard-1cf2,
  .column_fresh_d117,
  .chip_0dc7,
  .dropdown_4c6b {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .section-medium-89d8,
  .banner_c172,
  .label-steel-bcc9,
  .secondary-fc01 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .chip_hot_6992,
  .last-203b {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .red-eb71,
  .backdrop_0a80,
  .over-ce52,
  .selected-eb2c {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .form_full_c790,
  .cold-6cc9,
  .box-tall-2e8e,
  .focused-cfc1,
  .active_slow_dc7f,
  .avatar_a1d7 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .bottom-8893,
  .hard-1cf2,
  .chip_0dc7 {
    max-width: none !important;
  }
  
  .black-8595 {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .section-medium-89d8 {
    font-size: 1.5rem !important;
  }
  
  .banner_c172 {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .heading_7cf0,
  .small-9ca8 {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .label-steel-bcc9 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .silver-12ae {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .wrapper-small-b5df {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .bottom-8893,
  .chip_0dc7 {
    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: 6c8c */
.shadow-element-v9 {
  padding: 0.2rem;
  font-size: 13px;
  line-height: 1.1;
}
