/* ============================================
   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 (.texture_south_5359) is a descendant of
   .container-ee98 (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.large_892d {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".dark-d8cb" 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.disabled-6365 so it can't cause
   horizontal overflow anyway. */
.active-f7ea,
.wrapper_small_23db,
.orange_0eb1,
.section-advanced-a69f,
.widget_ef63,
.status-simple-f038,
.preview-1be6,
.dim_9a4f,
.advanced-7933,
.card_50c6,
.mini-3a16 {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .next-0f17 {
    padding: 8px 0;
  }
  
  .logo_upper_7921 img {
    height: 28px;
    width: auto;
  }
  
  .tooltip-0b05 {
    display: none !important;
  }
  
  .rough_038b {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .rough_038b svg {
    width: 14px;
    height: 14px;
  }
  
  .full_eaf7 {
    padding: 6px;
  }
  
  .down_1a92 {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .orange_0eb1,
  .wrapper_small_23db,
  .section-advanced-a69f,
  .widget_ef63,
  .form-6d27,
  .footer-20f1,
  .wrapper_d5d0,
  .widget_gold_1dbc,
  .photo-3376,
  .hard-f6e9,
  .surface-750a,
  .static_e248 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .clean_78d3,
  .info_fa80 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .preview_green_350b,
  .pattern_pro_337a,
  .module-0e3e,
  .logo_thick_4859,
  .section-pink-97aa,
  .hard-1f90,
  .bottom_b41c {
    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 */
  .huge_9fe9,
  .left-340b,
  .easy_2396,
  .out_052c,
  .paragraph-e6eb {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .liquid-7ba3,
  .component_83de,
  .main-dim-a267,
  .outline-fixed-6bdc {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .huge_a41a,
  .description_ba57 {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .cool_5fd1,
  .overlay-wood-566f,
  .icon-focused-b12f,
  .notice-current-2534 {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .overlay_top_7b6d,
  .focused-a757,
  .title-dirty-6582,
  .hidden_glass_3b0e,
  .accordion_blue_8909,
  .block_active_a0a3 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .huge_9fe9,
  .left-340b,
  .out_052c {
    max-width: none !important;
  }
  
  .dark-d8cb {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .liquid-7ba3 {
    font-size: 1.5rem !important;
  }
  
  .component_83de {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .badge-tall-5dc4,
  .header-1b17 {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .main-dim-a267 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .detail-d3e6 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .menu-c6cf {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .huge_9fe9,
  .out_052c {
    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: 05c7 */
.promo-block-v0 {
  padding: 0.2rem;
  font-size: 10px;
  line-height: 1.3;
}
