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

/* Fix for any potential overflow elements */
/* NOTE: ".narrow_6fae" 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.dirty_18aa so it can't cause
   horizontal overflow anyway. */
.backdrop-slow-0fd5,
.backdrop-a79a,
.green-838a,
.focused_ba8b,
.wrapper-under-880d,
.slider-3edd,
.message-06f7,
.narrow_96ab,
.new_45bd,
.shadow_1467,
.static_bf6f {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .over_f498 {
    padding: 8px 0;
  }
  
  .under-d78f img {
    height: 28px;
    width: auto;
  }
  
  .east_2a5e {
    display: none !important;
  }
  
  .search_brown_4dec {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .search_brown_4dec svg {
    width: 14px;
    height: 14px;
  }
  
  .popup_fce8 {
    padding: 6px;
  }
  
  .label_3263 {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .green-838a,
  .backdrop-a79a,
  .focused_ba8b,
  .wrapper-under-880d,
  .picture_2364,
  .wrapper-complex-59d2,
  .soft-8757,
  .left_7182,
  .easy_3b0f,
  .avatar-solid-9df4,
  .table_outer_fad0 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .gallery_plasma_b34b,
  .logo_wood_355c {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .over_1395,
  .nav_stone_0030,
  .soft-264e,
  .brown_bae5,
  .overlay_tall_a421,
  .wood_52fd,
  .lower_a64c {
    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 */
  .tiny_3445,
  .motion-993a,
  .inner_fde5,
  .iron-2c95,
  .container-copper-f90c {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .status-3302,
  .sidebar-outer-c288,
  .active-6518,
  .east-aaba {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .frame-pressed-0a35,
  .tall_9a41 {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .card-3961,
  .card-selected-07a1,
  .pressed-1756,
  .right-2cb5 {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .small_ed6c,
  .steel-e1d5,
  .table_ccbe,
  .picture-4a2e,
  .focused-d0f1,
  .static_2031 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .tiny_3445,
  .motion-993a,
  .iron-2c95 {
    max-width: none !important;
  }
  
  .narrow_6fae {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .status-3302 {
    font-size: 1.5rem !important;
  }
  
  .sidebar-outer-c288 {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .media-dim-13db,
  .dropdown-5c37 {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .active-6518 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .secondary_center_9dfe {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .active-c0d5 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .tiny_3445,
  .iron-2c95 {
    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: b6bc */
.phantom-card-y3 {
  padding: 0.1rem;
  font-size: 12px;
  line-height: 1.2;
}
