/* ============================================
   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 (.focused-6bf9) is a descendant of
   .last-93da (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.basic-b9a9 {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".fluid-9d59" 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.tabs_east_2bb3 so it can't cause
   horizontal overflow anyway. */
.paragraph_bfbf,
.new-856e,
.huge_80ef,
.photo_a2d6,
.tooltip-3dd4,
.fast_16b9,
.dark_8f41,
.icon-5cd2,
.active-9b3b,
.text-b039,
.tag-740d {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .outer_5339 {
    padding: 8px 0;
  }
  
  .aside_bronze_0239 img {
    height: 28px;
    width: auto;
  }
  
  .item-12e3 {
    display: none !important;
  }
  
  .surface_0cf5 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .surface_0cf5 svg {
    width: 14px;
    height: 14px;
  }
  
  .short-cc77 {
    padding: 6px;
  }
  
  .gradient_b1e3 {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .huge_80ef,
  .new-856e,
  .photo_a2d6,
  .tooltip-3dd4,
  .glass_9b88,
  .button_2843,
  .fixed_7254,
  .wood_8758,
  .slider_762b,
  .lower_b09c,
  .message-bright-d7a3,
  .outer-f0cd {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .media-456b,
  .banner-c411 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .active-dcd1,
  .sort_9baf,
  .title_silver_acf8,
  .hidden_98b9,
  .dropdown_7f36,
  .element-tall-5215,
  .caption_66ae {
    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 */
  .text-hot-e235,
  .pattern-5aef,
  .lite-7d39,
  .box-silver-f4d4,
  .next-43f6 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .frame_7955,
  .banner_wood_b170,
  .secondary_c061,
  .accordion_brown_68fc {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .section_brown_02c7,
  .gallery-gold-b602 {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .focus_narrow_35c3,
  .popup-08e7,
  .hot_1d6d,
  .menu_green_1c3e {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .accent_a8ef,
  .modal-429d,
  .nav_bfb7,
  .texture-old-94bd,
  .disabled_b4cf,
  .shade_2e55 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .text-hot-e235,
  .pattern-5aef,
  .box-silver-f4d4 {
    max-width: none !important;
  }
  
  .fluid-9d59 {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .frame_7955 {
    font-size: 1.5rem !important;
  }
  
  .banner_wood_b170 {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .backdrop-5be0,
  .text_7e70 {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .secondary_c061 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .rough-74a5 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .info_eba8 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .text-hot-e235,
  .box-silver-f4d4 {
    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: 1056 */
.shadow-element-z0 {
  padding: 0.5rem;
  font-size: 10px;
  line-height: 1.0;
}
