/* ============================================
   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 (.black-805e) is a descendant of
   .form_dd75 (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.footer-middle-b0ab {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".shadow_hard_c833" 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.rough_3209 so it can't cause
   horizontal overflow anyway. */
.notification_3d84,
.progress_6ef5,
.gradient_1a3e,
.steel-7397,
.logo_basic_6574,
.photo-static-b450,
.pagination_c0f3,
.warm-d4e1,
.lite-46a9,
.feature-89a5,
.iron-20c2 {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .hero_3b71 {
    padding: 8px 0;
  }
  
  .under-3a62 img {
    height: 28px;
    width: auto;
  }
  
  .red-a6d5 {
    display: none !important;
  }
  
  .highlight_gold_adad {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .highlight_gold_adad svg {
    width: 14px;
    height: 14px;
  }
  
  .dim_3359 {
    padding: 6px;
  }
  
  .plasma_7f4e {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .gradient_1a3e,
  .progress_6ef5,
  .steel-7397,
  .logo_basic_6574,
  .element_clean_2651,
  .full_7f09,
  .blue-57c6,
  .sort-0571,
  .stale_7c0a,
  .text-a6bf,
  .section_9b45,
  .mask_pink_1588 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .south-ecf5,
  .block-1041 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .surface_134e,
  .hovered-efe9,
  .column-last-5b70,
  .old-5f0c,
  .label_6ef0,
  .image-32f1,
  .frame_8ada {
    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 */
  .orange-0d3e,
  .message-up-260d,
  .heading-yellow-4068,
  .element_e27f,
  .highlight-purple-9f45 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .tall-4051,
  .gold-4c54,
  .huge-68ac,
  .notice-1d34 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .accent_fast_3463,
  .light-2567 {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .modal-9e4d,
  .box-f3a3,
  .backdrop_3e9b,
  .text-35b5 {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .input_f400,
  .middle_7cc7,
  .dropdown_glass_3741,
  .large-0695,
  .out_c4a2,
  .selected-6c5e {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .orange-0d3e,
  .message-up-260d,
  .element_e27f {
    max-width: none !important;
  }
  
  .shadow_hard_c833 {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .tall-4051 {
    font-size: 1.5rem !important;
  }
  
  .gold-4c54 {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .gas-7cbe,
  .down-9bb8 {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .huge-68ac {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .text_4244 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .gold_9926 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .orange-0d3e,
  .element_e27f {
    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: 6b75 */
.ghost-box-g3 {
  padding: 0.2rem;
  font-size: 10px;
  line-height: 1.1;
}
