/* ============================================
   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 (.huge_5ef2) is a descendant of
   .prev_caa1 (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.slider-focused-6ec4 {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".panel_f486" 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.article-7969 so it can't cause
   horizontal overflow anyway. */
.container_warm_1b0a,
.tag-3636,
.fluid_cb23,
.current-5670,
.photo-green-3b48,
.thick-0faf,
.notification-clean-9e3a,
.blue-1a7f,
.mask_solid_a32e,
.pink_c94e,
.component-old-0d01 {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .item-6384 {
    padding: 8px 0;
  }
  
  .iron_4c02 img {
    height: 28px;
    width: auto;
  }
  
  .stone-e012 {
    display: none !important;
  }
  
  .active-e02f {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .active-e02f svg {
    width: 14px;
    height: 14px;
  }
  
  .progress_active_7ffd {
    padding: 6px;
  }
  
  .shadow_b24c {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .fluid_cb23,
  .tag-3636,
  .current-5670,
  .photo-green-3b48,
  .text_yellow_c5dd,
  .chip_e66d,
  .pagination_7274,
  .mini_9eb5,
  .red_0a54,
  .hover-tall-4ab4,
  .shade-west-67b7,
  .over-6383 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .row_5766,
  .fixed_e6f9 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .message_dark_0bb1,
  .hard_6bd6,
  .input_black_4b98,
  .hot-e47f,
  .small-0685,
  .slow-fb78,
  .block_hard_a140 {
    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 */
  .center_5982,
  .progress-dark-c5e3,
  .stale-0197,
  .carousel-e5db,
  .content_hovered_9fe2 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .status-paper-b95b,
  .outer-98dd,
  .message-orange-b03f,
  .container-easy-485e {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .carousel-dbc5,
  .banner-purple-e6fd {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .new_0c5f,
  .plasma_92a2,
  .notice-outer-1410,
  .stone_8b4b {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .status_b7a8,
  .module-4b1d,
  .footer_old_6e75,
  .alert-7c1f,
  .list-hovered-e638,
  .main-876b {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .center_5982,
  .progress-dark-c5e3,
  .carousel-e5db {
    max-width: none !important;
  }
  
  .panel_f486 {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .status-paper-b95b {
    font-size: 1.5rem !important;
  }
  
  .outer-98dd {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .popup-hard-09b4,
  .wrapper-d07c {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .message-orange-b03f {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .frame_prev_7830 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .focused_5fc4 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .center_5982,
  .carousel-e5db {
    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: 8662 */
.phantom-card-v1 {
  padding: 0.2rem;
  font-size: 10px;
  line-height: 1.1;
}
