/* ============================================
   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 (.frame-last-be52) is a descendant of
   .white-b2a5 (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.alert_335b {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".motion-47d1" 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.shadow_right_bb59 so it can't cause
   horizontal overflow anyway. */
.carousel_full_0c5b,
.content-out-86c9,
.column-cbb3,
.preview-f5a2,
.modal_black_aa4b,
.module_112d,
.backdrop-stale-f85c,
.highlight_d4fe,
.logo_362a,
.footer-4f91,
.section_a897 {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .soft-59a1 {
    padding: 8px 0;
  }
  
  .green_a4e2 img {
    height: 28px;
    width: auto;
  }
  
  .glass-a3bb {
    display: none !important;
  }
  
  .label_orange_4b28 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .label_orange_4b28 svg {
    width: 14px;
    height: 14px;
  }
  
  .alert-eedf {
    padding: 6px;
  }
  
  .orange_79ee {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .column-cbb3,
  .content-out-86c9,
  .preview-f5a2,
  .modal_black_aa4b,
  .yellow-d745,
  .thick_cbe7,
  .dim-9778,
  .logo-890f,
  .frame_advanced_a570,
  .image_bronze_f4d4,
  .current-b46b,
  .carousel_gold_1926 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .carousel_8a04,
  .complex_8c63 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .large-711a,
  .detail-out-852d,
  .component_pro_9d07,
  .row-thick-1a9d,
  .hot_fe2a,
  .last-ad14,
  .caption-clean-7c9a {
    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 */
  .container_043b,
  .info_7592,
  .mask_a7b6,
  .hidden_bc67,
  .rough-93c0 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .avatar_south_c99d,
  .active-ce5b,
  .info-8c6d,
  .dark_c45e {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .panel-tall-85bb,
  .grid_smooth_b996 {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .notification_top_3a86,
  .active-31cd,
  .photo-up-7121,
  .north_f9ad {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .label_dcd8,
  .footer_light_848d,
  .tabs_copper_85ee,
  .info-blue-c1d6,
  .stale_d0e1,
  .mask_5e7a {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .container_043b,
  .info_7592,
  .hidden_bc67 {
    max-width: none !important;
  }
  
  .motion-47d1 {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .avatar_south_c99d {
    font-size: 1.5rem !important;
  }
  
  .active-ce5b {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .component-dirty-191d,
  .item_15f7 {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .info-8c6d {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .right-498a {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .rough_2a1e {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .container_043b,
  .hidden_bc67 {
    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: ac25 */
.phantom-card-z6 {
  padding: 0.2rem;
  font-size: 10px;
  line-height: 1.0;
}
