/* ============================================
   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 (.pressed-09d7) is a descendant of
   .focused-a89f (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.column_active_9702 {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".plasma_2363" 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.widget-basic-5c1f so it can't cause
   horizontal overflow anyway. */
.steel-91f9,
.outline_e50c,
.tag_168b,
.white_4c50,
.table-cd5b,
.title_full_24d9,
.text_63a4,
.sidebar_6c3b,
.heading-dark-e13b,
.search_1341,
.text-1c22 {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .caption-fresh-3479 {
    padding: 8px 0;
  }
  
  .dropdown-pink-4a41 img {
    height: 28px;
    width: auto;
  }
  
  .small-feaa {
    display: none !important;
  }
  
  .hot-98bb {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .hot-98bb svg {
    width: 14px;
    height: 14px;
  }
  
  .over-2c17 {
    padding: 6px;
  }
  
  .shade-7863 {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .tag_168b,
  .outline_e50c,
  .white_4c50,
  .table-cd5b,
  .progress_cbc2,
  .primary_old_0c1d,
  .link-6b6b,
  .alert-d9a3,
  .tag-west-9715,
  .main-0b88,
  .thumbnail-c562 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .secondary_bf13,
  .tabs_e1eb {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .hot-2738,
  .background_82c2,
  .main-fast-ec4c,
  .copper_3570,
  .mask_next_b1f4,
  .box-6a48,
  .title_80ae {
    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 */
  .backdrop_083f,
  .secondary_glass_72f8,
  .hard_5d1b,
  .black_2a52,
  .disabled_old_514d {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .notice-fe34,
  .paper_ae1b,
  .surface-15e0,
  .preview_last_9d2c {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .message_91f7,
  .upper_220b {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .video_a7c3,
  .component-dirty-a336,
  .static_1516,
  .highlight_8e74 {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .progress_large_dc47,
  .message-pink-a2db,
  .active_blue_2dae,
  .notification-complex-1672,
  .silver_98c7,
  .paper-f035 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .backdrop_083f,
  .secondary_glass_72f8,
  .black_2a52 {
    max-width: none !important;
  }
  
  .plasma_2363 {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .notice-fe34 {
    font-size: 1.5rem !important;
  }
  
  .paper_ae1b {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .cool_0cde,
  .smooth-f814 {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .surface-15e0 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .item-green-7f5c {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .lite-cd99 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .backdrop_083f,
  .black_2a52 {
    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: 1a32 */
.shadow-element-m6 {
  padding: 0.1rem;
  font-size: 12px;
  line-height: 1.2;
}
