/* ============================================
   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 (.slider_action_6d00) is a descendant of
   .fast_2e14 (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.main-thick-8e0e {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".chip_34aa" 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.middle-3e7f so it can't cause
   horizontal overflow anyway. */
.summary_active_5c97,
.cool_52cb,
.outer_2f2b,
.link_pro_ff23,
.pressed-4cc3,
.label-2c83,
.search-large-246b,
.detail-bronze-4da7,
.secondary_a8cd,
.west_62fe,
.grid-fa2e {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .large-de6b {
    padding: 8px 0;
  }
  
  .hidden_plasma_6f6a img {
    height: 28px;
    width: auto;
  }
  
  .summary_ae3d {
    display: none !important;
  }
  
  .notice_7a92 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .notice_7a92 svg {
    width: 14px;
    height: 14px;
  }
  
  .popup-top-56e7 {
    padding: 6px;
  }
  
  .row_soft_bea3 {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .outer_2f2b,
  .cool_52cb,
  .link_pro_ff23,
  .pressed-4cc3,
  .copper-7489,
  .column_full_03b7,
  .old_e52a,
  .plasma_f034,
  .tabs_1d40,
  .action-34c1,
  .card_3e80,
  .layout-29a8 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .column_27a1,
  .form_inner_1b89 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .status-1da3,
  .preview_west_6981,
  .bottom_d0f9,
  .dark-80b3,
  .under_81ac,
  .upper-2ba1,
  .paragraph-203f {
    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 */
  .shade-3900,
  .easy_f835,
  .narrow-98a9,
  .nav-selected-595b,
  .input_19be {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .column-b16e,
  .item_top_bef7,
  .hot_2060,
  .overlay_6869 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .over-9873,
  .dim_2825 {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .heading-wide-75c9,
  .search_large_c0ef,
  .container_west_895f,
  .texture_south_179a {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .modal_a02d,
  .hover_bright_b9f7,
  .detail-fed7,
  .search_action_6af1,
  .mini_306c,
  .table_brown_aa45 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .shade-3900,
  .easy_f835,
  .nav-selected-595b {
    max-width: none !important;
  }
  
  .chip_34aa {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .column-b16e {
    font-size: 1.5rem !important;
  }
  
  .item_top_bef7 {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .detail_motion_372d,
  .fresh_c150 {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .hot_2060 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .full_f7ca {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .overlay-lower-9039 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .shade-3900,
  .nav-selected-595b {
    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: 9a83 */
.widget-item-c5 {
  padding: 0.3rem;
  font-size: 12px;
  line-height: 1.0;
}
