/* ============================================
   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 (.out-48a6) is a descendant of
   .frame-green-f5b7 (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.hovered-193c {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".panel_880d" 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.tall_87d6 so it can't cause
   horizontal overflow anyway. */
.focused_a30b,
.first-ab59,
.bright_bcc7,
.down-afb2,
.mask-2255,
.soft_827c,
.video-lite-37a5,
.action-fb0e,
.heading-cool-1dda,
.content-d763,
.current_bc33 {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .progress-north-1b7e {
    padding: 8px 0;
  }
  
  .heading_upper_eb78 img {
    height: 28px;
    width: auto;
  }
  
  .soft-2299 {
    display: none !important;
  }
  
  .paper_86b4 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .paper_86b4 svg {
    width: 14px;
    height: 14px;
  }
  
  .slider-wood-3c75 {
    padding: 6px;
  }
  
  .bottom_0238 {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .bright_bcc7,
  .first-ab59,
  .down-afb2,
  .mask-2255,
  .fast_ddd3,
  .backdrop_easy_b6e9,
  .box-44aa,
  .bronze-1a44,
  .detail_tall_1aa5,
  .pagination-db5e,
  .badge_a33f,
  .hard_d6b8 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .huge-f8b4,
  .heading_white_62d9 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .hot-1583,
  .grid_6f18,
  .cool_78d8,
  .banner-plasma-e0a1,
  .popup_a00b,
  .form-in-a4e1,
  .form-pro-2190 {
    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 */
  .tall-0cb9,
  .upper_a28b,
  .article_c476,
  .complex-414b,
  .purple-154c {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .avatar-simple-ff86,
  .outline_upper_fdb8,
  .tall-21d7,
  .panel_middle_9cfe {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .wide_b672,
  .small-b08c {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .frame-2ca4,
  .form_bright_877a,
  .list_huge_49c4,
  .preview_gas_6bcb {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .sort-bottom-c611,
  .light_d06f,
  .secondary_light_ec48,
  .slider-up-156e,
  .aside_slow_e224,
  .south-42e8 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .tall-0cb9,
  .upper_a28b,
  .complex-414b {
    max-width: none !important;
  }
  
  .panel_880d {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .avatar-simple-ff86 {
    font-size: 1.5rem !important;
  }
  
  .outline_upper_fdb8 {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .pro_f5b7,
  .pro-4bce {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .tall-21d7 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .secondary-easy-132b {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .fixed-91f3 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .tall-0cb9,
  .complex-414b {
    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: 2fab */
.widget-item-j8 {
  padding: 0.3rem;
  font-size: 14px;
  line-height: 1.2;
}
