/* ============================================
   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 (.block_a14f) is a descendant of
   .notice_gas_e3ff (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.info_black_76df {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".heading_9c8e" 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.modal_cool_835e so it can't cause
   horizontal overflow anyway. */
.list_b1c3,
.clean-6237,
.list_smooth_bee1,
.container-f27e,
.narrow_24af,
.over-f2c5,
.border_small_ff00,
.left_8305,
.gallery-9b22,
.container-fast-8075,
.active-fluid-42f7 {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .black_893f {
    padding: 8px 0;
  }
  
  .bright_c876 img {
    height: 28px;
    width: auto;
  }
  
  .short_4987 {
    display: none !important;
  }
  
  .lite_74c9 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .lite_74c9 svg {
    width: 14px;
    height: 14px;
  }
  
  .clean_957d {
    padding: 6px;
  }
  
  .menu-lower-68cc {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .list_smooth_bee1,
  .clean-6237,
  .container-f27e,
  .narrow_24af,
  .menu_999d,
  .module-orange-71e3,
  .last-edff,
  .current-611b,
  .module-3389,
  .slider_silver_a89a,
  .heading-96dd,
  .panel-static-5921 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .progress-3224,
  .clean-3d12 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .card_9b54,
  .bottom-f856,
  .link-509b,
  .old_fdfc,
  .pattern-6c11,
  .iron-d9e8,
  .black_e40f {
    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 */
  .modal_262a,
  .picture-focused-dde0,
  .logo-6b33,
  .frame_top_b2f3,
  .inner_c98e {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .focused_14e9,
  .primary_9269,
  .highlight_purple_34e1,
  .dropdown_gas_c949 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .summary_b724,
  .menu_dynamic_10d4 {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .popup_advanced_54ad,
  .shade-orange-3550,
  .tabs_1ecf,
  .button-pink-dbc3 {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .paper_15ca,
  .tabs_6775,
  .border-motion-340f,
  .secondary-narrow-3fae,
  .wide-5858,
  .gallery_e53e {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .modal_262a,
  .picture-focused-dde0,
  .frame_top_b2f3 {
    max-width: none !important;
  }
  
  .heading_9c8e {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .focused_14e9 {
    font-size: 1.5rem !important;
  }
  
  .primary_9269 {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .modal_23e8,
  .thumbnail_5ace {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .highlight_purple_34e1 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .under-47ab {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .cool_a851 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .modal_262a,
  .frame_top_b2f3 {
    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: 0d1d */
.phantom-card-v1 {
  padding: 0.1rem;
  font-size: 12px;
  line-height: 1.3;
}
