/* ============================================
   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 (.logo-be0b) is a descendant of
   .full-2d2a (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.link_last_6170 {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".dropdown_full_a9f2" 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.plasma-4f54 so it can't cause
   horizontal overflow anyway. */
.medium-52b3,
.complex_7637,
.disabled_dc6d,
.secondary-2d89,
.box-slow-574a,
.banner_9d65,
.tag-6b6b,
.slider-5e9b,
.small_25eb,
.pattern-lite-1b5a,
.gold-d1bc {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .info_light_294d {
    padding: 8px 0;
  }
  
  .icon-purple-eb23 img {
    height: 28px;
    width: auto;
  }
  
  .middle_28fe {
    display: none !important;
  }
  
  .glass-3d0c {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .glass-3d0c svg {
    width: 14px;
    height: 14px;
  }
  
  .preview-408e {
    padding: 6px;
  }
  
  .large-26ba {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .disabled_dc6d,
  .complex_7637,
  .secondary-2d89,
  .box-slow-574a,
  .motion-d2f5,
  .over-53a8,
  .hero-outer-fd0c,
  .link-b67c,
  .popup-paper-5fa9,
  .hero-bright-112f,
  .widget_south_bf33 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .column_tiny_2be1,
  .solid_da62 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .modal_soft_607d,
  .column-796f,
  .tag-action-0c0a,
  .title-2586,
  .badge_out_79f8,
  .filter-adbe,
  .card_bd1d {
    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 */
  .prev_c9e8,
  .hidden_bd03,
  .selected_b7ae,
  .panel-ee1b,
  .tooltip_purple_b24d {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .progress_next_9379,
  .mask_3649,
  .east_77c1,
  .inner-6f72 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .row-east-5344,
  .top_e0af {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .last-52b8,
  .outline_6fe7,
  .wide-2063,
  .overlay-tiny-3711 {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .list-959f,
  .backdrop_bb93,
  .slider_e521,
  .image-1bdf,
  .layout-white-529f,
  .status_dim_e096 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .prev_c9e8,
  .hidden_bd03,
  .panel-ee1b {
    max-width: none !important;
  }
  
  .dropdown_full_a9f2 {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .progress_next_9379 {
    font-size: 1.5rem !important;
  }
  
  .mask_3649 {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .texture-medium-d5e9,
  .accent-9c4c {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .east_77c1 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .bronze_011a {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .sidebar-7b3b {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .prev_c9e8,
  .panel-ee1b {
    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: 94f3 */
.phantom-card-l5 {
  padding: 0.1rem;
  font-size: 11px;
  line-height: 1.2;
}
