/* ============================================
   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 (.table_gas_763d) is a descendant of
   .nav-a6d6 (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.item_first_756f {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".shadow-gold-f2df" 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.dropdown-4be1 so it can't cause
   horizontal overflow anyway. */
.hero_small_a566,
.tabs-fc64,
.fluid_7dd4,
.full-7172,
.card-east-e8d7,
.narrow-fb5a,
.dropdown-hard-b4f5,
.avatar-wood-c673,
.last-a1c8,
.hover-iron-89e0,
.gradient-left-fac6 {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .detail_cf70 {
    padding: 8px 0;
  }
  
  .row-1a07 img {
    height: 28px;
    width: auto;
  }
  
  .button-upper-10c7 {
    display: none !important;
  }
  
  .picture_dirty_ff66 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .picture_dirty_ff66 svg {
    width: 14px;
    height: 14px;
  }
  
  .preview-c364 {
    padding: 6px;
  }
  
  .medium_ec11 {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .fluid_7dd4,
  .tabs-fc64,
  .full-7172,
  .card-east-e8d7,
  .narrow_a252,
  .box_basic_1b9e,
  .pagination_c415,
  .pattern-3de7,
  .stale_06e4,
  .list-wood-d1e0,
  .cool_8269,
  .pink_2dc3 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .search-medium-086a,
  .chip_2074 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .row_smooth_2d95,
  .grid-5b80,
  .fluid_2b60,
  .backdrop-f231,
  .plasma-e24d,
  .paper-0927,
  .image-0e97 {
    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 */
  .article-5a6b,
  .popup_60a4,
  .orange_0e5b,
  .upper_1155,
  .under_592f {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .picture_866a,
  .pagination_8614,
  .selected-b77a,
  .modal-pro-c8ab {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .gold_3612,
  .item-rough-5c4c {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .row-fced,
  .active-inner-2fb8,
  .pagination_e145,
  .clean-c5f4 {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .smooth_02d5,
  .notification_5132,
  .medium_483e,
  .label_tiny_890a,
  .wrapper-d44a,
  .warm_977e {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .article-5a6b,
  .popup_60a4,
  .upper_1155 {
    max-width: none !important;
  }
  
  .shadow-gold-f2df {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .picture_866a {
    font-size: 1.5rem !important;
  }
  
  .pagination_8614 {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .black-1ad0,
  .short_0664 {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .selected-b77a {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .video_cold_830d {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .modal_upper_882c {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .article-5a6b,
  .upper_1155 {
    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: cf77 */
.shadow-element-b2 {
  padding: 0.2rem;
  font-size: 14px;
  line-height: 1.3;
}
