/* KSL mobile header final compatibility layer
   Loaded last to neutralize earlier conflicting mobile rules. */
@media (max-width: 900px) {
  .feeder-site-header {
    position: sticky;
    top: 0;
    z-index: 180;
    width: 100%;
    background: rgba(255,255,255,.96);
    border-bottom: 1px solid rgba(20,115,230,.12);
    box-shadow: 0 8px 26px rgba(30,74,116,.08);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
  }

  .feeder-site-header .header-inner {
    width: min(1180px, 100%);
    min-height: 68px;
    margin: 0 auto;
    padding: 8px 12px;
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
  }

  .feeder-site-header .brand-logo {
    flex: 1 1 auto;
    min-width: 0;
    max-width: 190px;
    overflow: hidden;
  }

  .feeder-site-header .brand-logo img {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 48px;
    object-fit: contain;
    object-position: left center;
  }

  .feeder-site-header .desktop-nav,
  .feeder-site-header .desktop-auth {
    display: none !important;
  }

  .feeder-site-header .header-actions {
    flex: 0 0 auto;
    min-width: 0;
    display: flex !important;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
  }

  /* Wallet first */
  .feeder-site-header .compact-wallet-pill {
    order: 1 !important;
    display: inline-flex !important;
    align-items: center;
    gap: 8px;
    min-width: 112px;
    max-width: 164px;
    height: 46px;
    margin: 0;
    padding: 6px 11px;
    border: 1px solid rgba(20,115,230,.16);
    border-radius: 15px;
    background: linear-gradient(145deg,#fff,#edf7ff);
    box-shadow: 0 8px 22px rgba(20,76,128,.10);
    color: #173650;
    text-decoration: none;
    overflow: hidden;
  }

  .feeder-site-header .compact-wallet-pill .ico {
    flex: 0 0 29px;
    width: 29px;
    height: 29px;
    display: grid;
    place-items: center;
    border-radius: 9px;
    background: linear-gradient(135deg,#1473e6,#25a4ea);
    color: #fff;
    font-size: .9rem;
    box-shadow: 0 6px 14px rgba(20,115,230,.22);
  }

  .feeder-site-header .compact-wallet-pill > span:last-child {
    min-width: 0;
    display: grid !important;
    line-height: 1.05;
  }

  .feeder-site-header .compact-wallet-pill small {
    display: block !important;
    margin: 0 0 3px;
    color: #71879a;
    font-size: .55rem;
    font-weight: 800;
    letter-spacing: .05em;
    text-transform: uppercase;
  }

  .feeder-site-header .compact-wallet-pill b {
    display: block !important;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #173650;
    font-size: .72rem;
    font-weight: 950;
  }

  /* Menu second */
  .feeder-site-header .mobile-toggle {
    order: 2 !important;
    flex: 0 0 46px;
    width: 46px;
    height: 46px;
    margin: 0;
    padding: 0;
    display: grid !important;
    place-content: center;
    gap: 5px;
    border: 1px solid rgba(20,115,230,.16);
    border-radius: 15px;
    background: linear-gradient(145deg,#fff,#edf6ff);
    box-shadow: 0 8px 22px rgba(20,76,128,.10);
    cursor: pointer;
  }

  .feeder-site-header .mobile-toggle span {
    display: block !important;
    width: 20px;
    height: 2px;
    margin: 0;
    border: 0;
    border-radius: 999px;
    background: #173650;
  }
}

@media (max-width: 560px) {
  .feeder-site-header .header-inner { padding-inline: 8px; gap: 6px; }
  .feeder-site-header .brand-logo { max-width: 132px; }
  .feeder-site-header .brand-logo img { max-height: 42px; }
  .feeder-site-header .header-actions { gap: 6px; }
  .feeder-site-header .compact-wallet-pill {
    min-width: 100px;
    max-width: 130px;
    height: 43px;
    padding: 5px 8px;
    border-radius: 13px;
    gap: 6px;
  }
  .feeder-site-header .compact-wallet-pill .ico {
    flex-basis: 27px;
    width: 27px;
    height: 27px;
    font-size: .82rem;
  }
  .feeder-site-header .compact-wallet-pill b { font-size: .65rem; }
  .feeder-site-header .compact-wallet-pill small { font-size: .49rem; }
  .feeder-site-header .mobile-toggle {
    flex-basis: 43px;
    width: 43px;
    height: 43px;
    border-radius: 13px;
  }
}

@media (max-width: 390px) {
  .feeder-site-header .brand-logo { max-width: 102px; }
  .feeder-site-header .compact-wallet-pill {
    min-width: 88px;
    max-width: 108px;
    padding-inline: 7px;
  }
  .feeder-site-header .compact-wallet-pill .ico { display: none !important; }
  .feeder-site-header .compact-wallet-pill b { font-size: .61rem; }
}

@media (max-width: 330px) {
  .feeder-site-header .brand-logo { max-width: 82px; }
  .feeder-site-header .compact-wallet-pill { min-width: 82px; max-width: 92px; }
  .feeder-site-header .compact-wallet-pill small { display: none !important; }
}
