/* ============================================
   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 (.title_9d40) is a descendant of
   .panel_short_77be (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.right-97ab {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".avatar_15cb" 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.row-dim-ac32 so it can't cause
   horizontal overflow anyway. */
.slider_dde1,
.simple-0fda,
.glass_82d3,
.frame-879f,
.message-77cc,
.small_4541,
.tag-red-7e88,
.panel_c5d8,
.lite_c6f5,
.layout_in_3bce,
.widget_stone_cc59 {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .disabled-30c8 {
    padding: 8px 0;
  }
  
  .notification-d676 img {
    height: 28px;
    width: auto;
  }
  
  .input-fixed-730b {
    display: none !important;
  }
  
  .out-3a73 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .out-3a73 svg {
    width: 14px;
    height: 14px;
  }
  
  .alert_3d2e {
    padding: 6px;
  }
  
  .tag-silver-ee47 {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .glass_82d3,
  .simple-0fda,
  .frame-879f,
  .message-77cc,
  .grid-full-c101,
  .carousel-pink-f845,
  .old_77e5,
  .chip_0cf0,
  .steel-f349,
  .under_9caf,
  .active-hot-080b,
  .container_2998 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .outline_7b81,
  .huge-7ecf {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .center-eab1,
  .right-8748,
  .thumbnail_first_38ac,
  .hidden_d81c,
  .icon_black_2de7,
  .gradient-lower-710a,
  .photo_green_4d61 {
    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 */
  .green-f7e6,
  .plasma_0722,
  .panel-simple-cd83,
  .texture_left_50f5,
  .caption-c797 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .stale_b172,
  .tertiary_upper_2c25,
  .outer_ba8a,
  .popup-7803 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .search-current-96e8,
  .nav-daa9 {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .focus_033e,
  .accent-9cb1,
  .active-1825,
  .wood_0d63 {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .footer_b826,
  .detail-f2b2,
  .down_c501,
  .caption-fast-382c,
  .hard-1d38,
  .card_0315 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .green-f7e6,
  .plasma_0722,
  .texture_left_50f5 {
    max-width: none !important;
  }
  
  .avatar_15cb {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .stale_b172 {
    font-size: 1.5rem !important;
  }
  
  .tertiary_upper_2c25 {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .rough_b1ec,
  .disabled_2133 {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .outer_ba8a {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .backdrop-west-77ff {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .content_3d58 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .green-f7e6,
  .texture_left_50f5 {
    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: 9d5d */
.ghost-box-m3 {
  padding: 0.1rem;
  font-size: 12px;
  line-height: 1.1;
}
