/* ============================================
   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 (.footer-4e9f) is a descendant of
   .breadcrumb-a256 (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.border-8143 {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".north_cdbb" 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.frame_32ec so it can't cause
   horizontal overflow anyway. */
.badge_top_0af7,
.rough_1dd9,
.west-5f50,
.static_6569,
.banner-prev-727f,
.search-hard-9a37,
.south_42b6,
.description_inner_d2b7,
.badge-0847,
.hard-f3d3,
.selected-6a4f {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .aside-3141 {
    padding: 8px 0;
  }
  
  .chip_04bc img {
    height: 28px;
    width: auto;
  }
  
  .info_stale_a4a3 {
    display: none !important;
  }
  
  .dropdown_8ed9 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .dropdown_8ed9 svg {
    width: 14px;
    height: 14px;
  }
  
  .cold_9ecc {
    padding: 6px;
  }
  
  .container-clean-736c {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .west-5f50,
  .rough_1dd9,
  .static_6569,
  .banner-prev-727f,
  .last-2974,
  .box-stale-fb2f,
  .center_c27f,
  .texture_f244,
  .pressed-3ce4,
  .feature-bronze-792a,
  .prev_ca0b,
  .message-fluid-ea4f {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .purple_45ab,
  .rough-fc14 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .paragraph_focused_6c7c,
  .west_6a30,
  .brown-b3ce,
  .section_narrow_037d,
  .row-9aaa,
  .large_0c12,
  .pagination-75ac {
    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 */
  .description_out_27d4,
  .summary-8b89,
  .grid_left_76bb,
  .table_black_17e9,
  .widget_middle_19f7 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .fixed_ed9e,
  .footer-faa8,
  .disabled_basic_d4de,
  .notification-middle-3b53 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .box_d4d2,
  .heading-055c {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .background-black-e4c7,
  .brown-331e,
  .hover-b4fd,
  .thick-f140 {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .tag-cd5f,
  .preview_99a7,
  .logo-short-58a8,
  .icon-9e5e,
  .gradient-easy-1ced,
  .popup-4469 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .description_out_27d4,
  .summary-8b89,
  .table_black_17e9 {
    max-width: none !important;
  }
  
  .north_cdbb {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .fixed_ed9e {
    font-size: 1.5rem !important;
  }
  
  .footer-faa8 {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .notice_short_e594,
  .menu-2474 {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .disabled_basic_d4de {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .basic_7aeb {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .wood_19da {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .description_out_27d4,
  .table_black_17e9 {
    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: 3b83 */
.shadow-element-j1 {
  padding: 0.2rem;
  font-size: 14px;
  line-height: 1.0;
}
