@media (max-width: 680px) {
  body { padding-bottom: calc(74px + env(safe-area-inset-bottom)); }
  body.mobile-menu-open { overflow: hidden; }
  html.mobile-menu-open,
  body.mobile-menu-open,
  .mobile-menu-panel.open {
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  html.mobile-menu-open::-webkit-scrollbar,
  body.mobile-menu-open::-webkit-scrollbar,
  .mobile-menu-panel.open::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
  }

  .mobile-menu-panel.open {
    position: fixed;
    inset-block-start: var(--mobile-menu-top, 62px);
    inset-inline: 0;
    inset-block-end: auto;
    max-height: calc(100vh - var(--mobile-menu-top, 62px) - 64px - env(safe-area-inset-bottom));
    max-height: calc(100dvh - var(--mobile-menu-top, 62px) - 64px - env(safe-area-inset-bottom));
    z-index: 9;
    display: flex;
    flex-direction: column;
    gap: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 40px 15px 15px;
    border: 0;
    border-radius: 0;
    background: #2d3544;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-overflow-scrolling: touch;
    animation: mobile-menu-enter .16s ease-out both;
  }

  .mobile-menu-grabber {
    position: absolute;
    top: 15px;
    left: 50%;
    width: 56px;
    height: 4px;
    border-radius: 99px;
    background: #707b8a;
    transform: translateX(-50%);
  }

  .mobile-menu-search {
    display: flex;
    min-height: 40px;
    align-items: center;
    gap: 9px;
    margin: 0;
    padding: 0 12px;
    border: 1px solid #465163;
    border-radius: 11px;
    background: #40495a;
    color: #aeb8c5;
    box-shadow: inset 0 1px #ffffff0a;
  }

  .mobile-menu-search svg {
    width: 17px;
    height: 17px;
    flex: 0 0 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
  }

  .mobile-menu-search input {
    width: 100%;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: #f5f7fa;
    font-size: 12px;
  }

  .mobile-menu-search input::placeholder { color: #bdc5d0; opacity: 1; }
  .mobile-menu-search:focus-within { border-color: #80c649; box-shadow: 0 0 0 2px #8aca4530; }
  .mobile-menu-search input::-webkit-search-cancel-button { cursor: pointer; }

  .mobile-menu-divider {
    height: 9px;
    flex: 0 0 9px;
    margin: 11px 0 7px;
    border-radius: 99px;
    background: #40495a;
  }

  .mobile-menu-status {
    margin: -4px 4px 10px;
    color: #b9e484;
    font-size: 11px;
  }

  .mobile-menu-list { display: flex; flex-direction: column; gap: 7px; }

  .mobile-menu-item,
  .mobile-menu-panel a.mobile-menu-item,
  .mobile-menu-panel button.mobile-menu-item {
    position: relative;
    display: flex;
    width: 100%;
    min-height: 38px;
    flex: 0 0 auto;
    align-items: center;
    gap: 9px;
    padding: 0 10px;
    border: 1px solid transparent;
    border-radius: 8px;
    background: #40495a;
    color: #d1d7df;
    text-align: left;
    text-decoration: none;
    font-size: 11px;
    font-weight: 550;
    box-shadow: none;
    transition: border-color .16s ease, background .16s ease, transform .16s ease;
  }

  .mobile-menu-item:active { transform: scale(.99); border-color: #80bb50; }
  .mobile-menu-panel .mobile-menu-item:hover { border-color: #607250; background: #414b5a; }
  .mobile-menu-panel .mobile-menu-item[hidden] { display: none !important; }

  .mobile-menu-icon {
    display: grid;
    width: 19px;
    height: 19px;
    flex: 0 0 19px;
    place-items: center;
    color: #b5bfcc;
  }

  .mobile-menu-icon svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.65;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  .mobile-menu-label { min-width: 0; flex: 1 1 auto; font-size: 10px; line-height: 1.15; }
  .mobile-menu-chevron { flex: 0 0 auto; margin-left: auto; color: #b8c1cb; font-size: 17px; line-height: 1; }

  /* Override the legacy anchor-span sizing so every menu row stays proportional. */
  .mobile-menu-panel a.mobile-menu-item > .mobile-menu-icon {
    width: 19px;
    height: 19px;
    flex: 0 0 19px;
    border-radius: 0;
    background: transparent;
    color: #b5bfcc;
  }

  .mobile-menu-panel a.mobile-menu-item > .mobile-menu-label {
    display: block;
    width: auto;
    height: auto;
    flex: 1 1 auto;
    border-radius: 0;
    background: transparent;
    color: inherit;
    font-size: 10px;
    line-height: 1.15;
  }

  .mobile-menu-panel a.mobile-menu-item > .mobile-menu-chevron {
    display: inline;
    width: auto;
    height: auto;
    flex: 0 0 auto;
    border-radius: 0;
    background: transparent;
    color: #b8c1cb;
    font-size: 17px;
  }

  .mobile-menu-badge {
    position: absolute;
    top: -7px;
    left: 8px;
    z-index: 1;
    padding: 3px 5px;
    border-radius: 4px;
    color: #fff;
    font-size: 7px;
    font-weight: 900;
    letter-spacing: .2px;
  }

  .mobile-menu-badge.is-new { background: linear-gradient(135deg, #e3478c, #c43174); }
  .mobile-menu-badge.is-free { background: linear-gradient(135deg, #438df1, #2772d9); }
  .mobile-menu-empty { padding: 18px 8px; color: #aeb8c5; font-size: 12px; text-align: center; }
  .mobile-menu-empty[hidden] { display: none; }

  .menu-center[aria-expanded="true"] .menu-orb svg { display: none; }
  .menu-center[aria-expanded="true"] .menu-orb::after { content: "×"; color: #1c2a1a; font-size: 25px; font-weight: 500; line-height: 1; }

  .mobile-dock {
    z-index: 10;
    height: calc(64px + env(safe-area-inset-bottom));
    padding: 5px 8px max(5px, env(safe-area-inset-bottom));
    background: linear-gradient(180deg, #26303ef7 0%, #202937fa 100%);
    border-top-color: #3b4658;
    box-shadow: 0 -8px 24px #10172255;
  }

  .mobile-dock a,
  .mobile-dock button {
    gap: 4px;
    color: #aeb8c5;
    font-size: 9px;
    font-weight: 650;
    transition: color .16s ease, transform .16s ease;
  }

  .mobile-dock a:active,
  .mobile-dock button:active { transform: translateY(-1px); }
  .mobile-dock a.current,
  .mobile-dock button.current { color: #c5e99b; }
  .mobile-dock a.current:before { top: 2px; width: 22px; box-shadow: 0 0 9px #83ce5080; }
  .mobile-dock .dock-icon { width: 20px; height: 20px; }
  .mobile-dock .dock-label { font-size: 8.5px; font-weight: 650; letter-spacing: .05px; }
  .mobile-dock button.menu-center { padding-bottom: 7px; }
  .mobile-dock .menu-center .menu-orb {
    top: -20px;
    width: 54px;
    height: 54px;
    border-width: 3px;
    background: linear-gradient(145deg, #c1e975, #8cc844);
    box-shadow: 0 7px 19px #81c34255, inset 0 1px #ffffff70;
    color: #1d2917;
  }
  .mobile-dock .menu-orb svg { width: 22px; height: 22px; }
  .menu-center[aria-expanded="true"] .menu-orb::after { font-size: 27px; }
}

@media (max-width: 380px) {
  .mobile-menu-panel.open { padding-inline: 15px; }
  .mobile-menu-search { min-height: 38px; }
  .mobile-menu-item,
  .mobile-menu-panel a.mobile-menu-item,
  .mobile-menu-panel button.mobile-menu-item { min-height: 36px; gap: 7px; padding-inline: 9px; font-size: 10px; }
  .mobile-menu-label { font-size: 9px; }
  .mobile-menu-panel a.mobile-menu-item > .mobile-menu-label { font-size: 9px; }
  .mobile-menu-panel a.mobile-menu-item > .mobile-menu-icon { width: 18px; height: 18px; flex-basis: 18px; }
  .mobile-menu-list { gap: 6px; }
  .mobile-menu-icon { width: 18px; height: 18px; flex-basis: 18px; }
  .mobile-menu-icon svg { width: 15px; height: 15px; }
}

@media (prefers-reduced-motion: reduce) {
  .mobile-menu-panel.open,.mobile-menu-item { animation: none; transition: none; }
}

@keyframes mobile-menu-enter {
  from { opacity: .75; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Keep mobile text fields above iOS Safari's automatic focus-zoom threshold. */
@media (max-width: 680px) {
  input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="button"]):not([type="submit"]):not([type="reset"]):not([type="hidden"]),
  select,
  textarea {
    font-size: 16px !important;
  }

  .mobile-menu-search,
  .sports-search,
  .live-search-box {
    min-height: 44px;
  }

  .mobile-menu-search input,
  .sports-search input,
  .live-search-box input {
    min-height: 42px;
    line-height: 1.25;
  }

  html {
    -webkit-text-size-adjust: 100%;
    scroll-padding-bottom: calc(86px + env(safe-area-inset-bottom));
  }

  input,
  select,
  textarea {
    scroll-margin-block: 72px calc(86px + env(safe-area-inset-bottom));
  }
}
