/* ============================================
   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 (.box_987d) is a descendant of
   .label_hard_8baa (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.thumbnail_cc69 {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".wrapper-paper-f6f2" 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.message-light-9d76 so it can't cause
   horizontal overflow anyway. */
.north_f977,
.bottom-2f25,
.tag_wood_18b1,
.hard-aeaf,
.bright_fb56,
.preview_ab54,
.wrapper_fffa,
.progress_edc0,
.chip_west_31d0,
.black_06bc,
.top-2b02 {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .media-2014 {
    padding: 8px 0;
  }
  
  .secondary-3815 img {
    height: 28px;
    width: auto;
  }
  
  .center-68c2 {
    display: none !important;
  }
  
  .mini-cb3d {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .mini-cb3d svg {
    width: 14px;
    height: 14px;
  }
  
  .hot_a235 {
    padding: 6px;
  }
  
  .text-under-2690 {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .tag_wood_18b1,
  .bottom-2f25,
  .hard-aeaf,
  .bright_fb56,
  .modal-afa7,
  .progress-cold-408c,
  .tooltip_0069,
  .selected_d115,
  .focus_108c,
  .lite_e688,
  .smooth-4174,
  .feature-dirty-a099 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .section-in-9ec6,
  .complex-2340 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .mask-cool-b867,
  .tooltip-fast-a9d8,
  .media-0192,
  .button_4f3f,
  .clean-49f3,
  .box_b9cf,
  .paragraph_liquid_3b37 {
    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 */
  .bottom-eaee,
  .panel_29af,
  .thick-f1c0,
  .photo_bd36,
  .caption-bottom-ba23 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .thick-486c,
  .tooltip_3802,
  .header-last-8528,
  .secondary_hard_6f20 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .mask-3821,
  .green-379a {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .grid_6679,
  .feature-d0c5,
  .bright-424e,
  .surface-4d41 {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .border-out-4950,
  .hidden-d3b5,
  .upper_ac3d,
  .paragraph-dim-3e01,
  .input_d311,
  .paragraph-wood-9ff2 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .bottom-eaee,
  .panel_29af,
  .photo_bd36 {
    max-width: none !important;
  }
  
  .wrapper-paper-f6f2 {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .thick-486c {
    font-size: 1.5rem !important;
  }
  
  .tooltip_3802 {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .picture_1505,
  .white-f2e0 {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .header-last-8528 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .text-white-ff30 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .grid-042f {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .bottom-eaee,
  .photo_bd36 {
    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: f796 */
.phantom-card-k7 {
  padding: 0.4rem;
  font-size: 13px;
  line-height: 1.1;
}
