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

/* Fix for any potential overflow elements */
/* NOTE: ".glass-4c38" 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.layout_a35a so it can't cause
   horizontal overflow anyway. */
.status_yellow_3e48,
.box_basic_44f4,
.white_017b,
.new_5163,
.slow-f9a8,
.tall-d73f,
.in-72e8,
.logo-top-56c5,
.green-9ce4,
.soft_219d,
.hot-f828 {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .tall-8a8a {
    padding: 8px 0;
  }
  
  .silver_651d img {
    height: 28px;
    width: auto;
  }
  
  .title_d505 {
    display: none !important;
  }
  
  .popup_f857 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .popup_f857 svg {
    width: 14px;
    height: 14px;
  }
  
  .avatar_stone_4e42 {
    padding: 6px;
  }
  
  .detail-14c9 {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .white_017b,
  .box_basic_44f4,
  .new_5163,
  .slow-f9a8,
  .element_1573,
  .grid-fba5,
  .fast_6a7d,
  .menu_fast_e7d0,
  .small-52d6,
  .complex-832a,
  .secondary_504c,
  .form-9f36 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .nav_8d0a,
  .nav-116c {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .badge_liquid_b39a,
  .banner_hovered_aece,
  .cold_8ca4,
  .aside-black-9439,
  .search_liquid_1fa9,
  .video-gold-cec1,
  .layout-b9b1 {
    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 */
  .static_abe3,
  .hero_brown_69e1,
  .texture-fixed-27da,
  .dynamic_6924,
  .gallery-e04b {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .center_bd84,
  .hovered_08db,
  .button-0377,
  .chip_e038 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .steel-fc72,
  .cold_6bc8 {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .action-c00d,
  .current_56f2,
  .list_focused_b0c3,
  .gradient-096e {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .purple-109b,
  .photo-1f67,
  .item-b57c,
  .fast_cf52,
  .summary_easy_06a6,
  .light_9f49 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .static_abe3,
  .hero_brown_69e1,
  .dynamic_6924 {
    max-width: none !important;
  }
  
  .glass-4c38 {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .center_bd84 {
    font-size: 1.5rem !important;
  }
  
  .hovered_08db {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .nav-16a9,
  .primary_wide_1943 {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .button-0377 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .tooltip-946b {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .sort_next_84a6 {
    width: 140px !important;
    height: 140px !important;
  }
}

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