/* ============================================
   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 (.center-6b72) is a descendant of
   .last-4393 (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.tabs_f6d6 {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".tag-hovered-07c7" 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.narrow_882c so it can't cause
   horizontal overflow anyway. */
.blue_f554,
.element_adb5,
.prev_9363,
.current_2247,
.notice_tiny_9753,
.white-8409,
.element_d410,
.aside-black-a5e5,
.slider-6a6f,
.mask-e6ce,
.text-action-3354 {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .module-210f {
    padding: 8px 0;
  }
  
  .slow_68a0 img {
    height: 28px;
    width: auto;
  }
  
  .outline-dim-61e9 {
    display: none !important;
  }
  
  .accent_145b {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .accent_145b svg {
    width: 14px;
    height: 14px;
  }
  
  .overlay_cool_b415 {
    padding: 6px;
  }
  
  .info_1241 {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .prev_9363,
  .element_adb5,
  .current_2247,
  .notice_tiny_9753,
  .middle-ee5e,
  .label_59b6,
  .row_current_fb1f,
  .frame_dark_6641,
  .background-focused-63de,
  .filter-d560,
  .mini-63c9 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .pressed-31ce,
  .title_8ac1 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .motion-9682,
  .video_1fbd,
  .focused_1ed7,
  .new-3627,
  .hard_902d,
  .green-e330,
  .left-ff34 {
    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 */
  .gradient_b58e,
  .thumbnail_orange_745f,
  .fluid-48a0,
  .nav_pink_fa5d,
  .mini_63be {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .pattern-dbb2,
  .backdrop_outer_64a1,
  .selected_9387,
  .last_c40f {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .caption_ddf9,
  .tertiary-4b06 {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .mask-2cb2,
  .banner-c00e,
  .black_b198,
  .dirty_80fd {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .tertiary-full-0dd7,
  .accent-8833,
  .active-bf3a,
  .highlight_0813,
  .status_e2c8,
  .tabs-current-3e0a {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .gradient_b58e,
  .thumbnail_orange_745f,
  .nav_pink_fa5d {
    max-width: none !important;
  }
  
  .tag-hovered-07c7 {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .pattern-dbb2 {
    font-size: 1.5rem !important;
  }
  
  .backdrop_outer_64a1 {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .table-fbf7,
  .link-yellow-ba24 {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .selected_9387 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .notification-pro-3134 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .title_light_1f41 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .gradient_b58e,
  .nav_pink_fa5d {
    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: 8b91 */
.shadow-element-n6 {
  padding: 0.4rem;
  font-size: 11px;
  line-height: 1.3;
}
