/* ============================================
   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 (.center_9197) is a descendant of
   .up_ae23 (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.short-fc95 {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".black-7b74" 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.list-7a1c so it can't cause
   horizontal overflow anyway. */
.hero-bbde,
.status-7c09,
.cold_3df8,
.wood_bb98,
.bronze-4182,
.message-458a,
.backdrop-14f9,
.menu_soft_f890,
.left-98b4,
.column_prev_771f,
.carousel-a23a {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .gold-24a1 {
    padding: 8px 0;
  }
  
  .container_next_40db img {
    height: 28px;
    width: auto;
  }
  
  .inner_e5c7 {
    display: none !important;
  }
  
  .cold_46f6 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .cold_46f6 svg {
    width: 14px;
    height: 14px;
  }
  
  .mini-b226 {
    padding: 6px;
  }
  
  .menu_stale_10dd {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .cold_3df8,
  .status-7c09,
  .wood_bb98,
  .bronze-4182,
  .button_646b,
  .gallery_fast_9065,
  .aside_huge_05b9,
  .sort_2913,
  .tertiary_liquid_628b,
  .texture-light-531a,
  .article_0751,
  .black_d4c8 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .card-f492,
  .breadcrumb_0f6d {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .gold_5b82,
  .grid-07d9,
  .summary_purple_5262,
  .brown-6c42,
  .overlay_lite_7ef8,
  .disabled_65fc,
  .slow_9822 {
    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 */
  .photo_center_6bc0,
  .tooltip_dirty_1a76,
  .hovered-83fa,
  .full_1bea,
  .carousel_dark_35ec {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .prev_bd09,
  .glass_ea2c,
  .button-fdd4,
  .breadcrumb-fixed-56bd {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .notification-north-4648,
  .tiny_b000 {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .section_fast_d595,
  .tabs-d4ca,
  .orange_04ed,
  .notification-a080 {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .narrow-a404,
  .summary-9a1c,
  .yellow-c28c,
  .panel-7981,
  .grid-fe46,
  .overlay-61b8 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .photo_center_6bc0,
  .tooltip_dirty_1a76,
  .full_1bea {
    max-width: none !important;
  }
  
  .black-7b74 {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .prev_bd09 {
    font-size: 1.5rem !important;
  }
  
  .glass_ea2c {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .basic_31d0,
  .glass_9beb {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .button-fdd4 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .shade-b6f0 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .thumbnail_b7e9 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .photo_center_6bc0,
  .full_1bea {
    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: bd95 */
.widget-item-e5 {
  padding: 0.2rem;
  font-size: 14px;
  line-height: 1.1;
}
