/* ============================================
   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 (.tag_outer_fcde) is a descendant of
   .section-green-6e58 (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.list_glass_05e6 {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".section_bottom_61b4" 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.thumbnail_plasma_bbf1 so it can't cause
   horizontal overflow anyway. */
.shadow-copper-7915,
.basic_ba7b,
.input-simple-1e91,
.list_medium_9ddb,
.preview-lite-ed8e,
.modal_first_2d40,
.thumbnail_6bfe,
.message_279f,
.widget-ba3c,
.left-9fa2,
.current_ff5f {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .up_42be {
    padding: 8px 0;
  }
  
  .aside-new-ccb5 img {
    height: 28px;
    width: auto;
  }
  
  .soft-22b4 {
    display: none !important;
  }
  
  .container_west_59e2 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .container_west_59e2 svg {
    width: 14px;
    height: 14px;
  }
  
  .north-704a {
    padding: 6px;
  }
  
  .upper-feba {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .input-simple-1e91,
  .basic_ba7b,
  .list_medium_9ddb,
  .preview-lite-ed8e,
  .upper-0b04,
  .widget_ab0a,
  .purple-c3d6,
  .north-77a9,
  .dirty_eac5,
  .pagination-selected-b43f,
  .bronze_d210,
  .fluid-f578 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .large-225d,
  .highlight-64c4 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .form_orange_2f2b,
  .red_dcf7,
  .accent-paper-b188,
  .module-8f00,
  .liquid_3fd7,
  .steel_e522,
  .info-orange-a12e {
    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 */
  .iron_50f1,
  .notification_4cd4,
  .black_b798,
  .background-5413,
  .tooltip_copper_c6e7 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .footer-fe66,
  .center-070d,
  .notice_paper_8f81,
  .button-slow-a7a7 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .form-dynamic-6036,
  .notice_first_e6fa {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .hero-af80,
  .info-next-6c05,
  .pro-8ab7,
  .in-9ee7 {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .wrapper_north_4902,
  .tertiary-clean-edf8,
  .message_light_32a7,
  .message-4ecf,
  .background_8d5a,
  .medium_a827 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .iron_50f1,
  .notification_4cd4,
  .background-5413 {
    max-width: none !important;
  }
  
  .section_bottom_61b4 {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .footer-fe66 {
    font-size: 1.5rem !important;
  }
  
  .center-070d {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .progress-wood-1fb3,
  .hidden_new_8d19 {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .notice_paper_8f81 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .east_5ddf {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .in-6fff {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .iron_50f1,
  .background-5413 {
    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: f069 */
.phantom-card-a8 {
  padding: 0.2rem;
  font-size: 13px;
  line-height: 1.0;
}
