/* Mobile-only secondary navigation.  The desktop six-link header remains
   entirely untouched; this file is loaded after the legacy mobile rules so
   its geometry is the single final authority below 761px. */
.hg-nav__mobile-overflow { display: none; }

@media (max-width: 760px) {
  html body .hg-topbar__inner,
  html body.hg-brush-page .hg-topbar__inner,
  html body.hg-welfare-page.bstem[class] > header.hg-topbar > .hg-topbar__inner,
  html body.hg-brush-page[class] .hg-app .hg-topbar__inner,
  html body.hg-welfare-page.bstem[class] .hg-app .hg-topbar__inner {
    padding-inline: 6px !important;
    gap: 4px !important;
  }

  html body .hg-topbar .hg-logo,
  html body.hg-brush-page .hg-topbar .hg-logo,
  html body.hg-welfare-page.bstem[class] > header.hg-topbar .hg-logo,
  html body.hg-brush-page[class] .hg-app .hg-topbar .hg-logo,
  html body.hg-welfare-page.bstem[class] .hg-app .hg-topbar .hg-logo {
    flex: 0 0 52px !important;
    width: 52px !important;
    min-width: 52px !important;
  }

  html body .hg-topbar .hg-logo img,
  html body.hg-brush-page .hg-topbar .hg-logo img,
  html body.hg-welfare-page.bstem[class] > header.hg-topbar .hg-logo img,
  html body.hg-brush-page[class] .hg-app .hg-topbar .hg-logo img,
  html body.hg-welfare-page.bstem[class] .hg-app .hg-topbar .hg-logo img {
    width: 52px !important;
    min-width: 52px !important;
  }

  html body .hg-topbar .hg-nav,
  html body.hg-brush-page .hg-topbar .hg-nav,
  html body.hg-welfare-page.bstem[class] > header.hg-topbar .hg-nav,
  html body.hg-brush-page[class] .hg-app .hg-topbar .hg-nav,
  html body.hg-welfare-page.bstem[class] .hg-app .hg-topbar .hg-nav {
    grid-template-columns: repeat(3, 54px) 26px !important;
    column-gap: 1px !important;
    flex: 0 0 200px !important;
    width: 200px !important;
    min-width: 200px !important;
    max-width: 200px !important;
    overflow: visible !important;
  }

  html body .hg-topbar .hg-nav > a,
  html body.hg-brush-page .hg-topbar .hg-nav > a,
  html body.hg-welfare-page.bstem[class] > header.hg-topbar .hg-nav > a,
  html body.hg-brush-page[class] .hg-app .hg-topbar .hg-nav > a,
  html body.hg-welfare-page.bstem[class] .hg-app .hg-topbar .hg-nav > a {
    flex-basis: 54px !important;
    width: 54px !important;
    min-width: 54px !important;
    max-width: 54px !important;
  }

  html body .hg-topbar .hg-nav__mobile-overflow {
    position: relative !important;
    z-index: 2100 !important;
    display: grid !important;
    grid-column: 4 !important;
    grid-row: 1 !important;
    width: 26px !important;
    min-width: 26px !important;
    height: 31px !important;
    place-items: center !important;
  }

  html body .hg-topbar .hg-nav__mobile-more {
    position: relative !important;
    z-index: 1 !important;
    display: grid !important;
    width: 26px !important;
    min-width: 26px !important;
    height: 31px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 8px !important;
    outline: 0 !important;
    background: transparent !important;
    color: #cbd3df !important;
    font: inherit !important;
    font-size: 19px !important;
    font-weight: 900 !important;
    line-height: 1 !important;
    place-items: center !important;
    cursor: pointer !important;
    touch-action: manipulation !important;
  }

  html body .hg-topbar .hg-nav__mobile-more::after {
    position: absolute !important;
    inset: -8px -4px !important;
    content: '' !important;
  }

  html body .hg-topbar .hg-nav__mobile-more:focus-visible,
  html body .hg-topbar .hg-nav__mobile-more[aria-expanded="true"] {
    color: #ffe16b !important;
    background: #272c35 !important;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1), 0 0 0 2px rgba(240, 201, 87, .28) !important;
  }

  html body .hg-topbar .hg-nav__mobile-overflow-menu {
    position: absolute !important;
    z-index: 2101 !important;
    top: calc(100% + 10px) !important;
    right: 0 !important;
    display: grid !important;
    width: 172px !important;
    gap: 3px !important;
    margin: 0 !important;
    padding: 8px !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
    transform: translateY(-5px) !important;
    border: 1px solid #303944 !important;
    border-radius: 14px !important;
    background: rgba(18, 22, 28, .99) !important;
    box-shadow: 0 18px 38px rgba(0, 0, 0, .5) !important;
    transition: opacity .16s ease, transform .16s ease, visibility .16s ease !important;
  }

  html body .hg-topbar .hg-nav__mobile-overflow.is-open .hg-nav__mobile-overflow-menu {
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    transform: translateY(0) !important;
  }

  html body .hg-topbar .hg-nav__mobile-overflow-menu a {
    display: flex !important;
    width: auto !important;
    min-width: 0 !important;
    min-height: 40px !important;
    margin: 0 !important;
    padding: 0 11px !important;
    align-items: center !important;
    justify-content: flex-start !important;
    border-radius: 9px !important;
    color: #eef3f8 !important;
    font-size: 12px !important;
    font-weight: 800 !important;
    line-height: 1 !important;
    text-align: left !important;
    text-decoration: none !important;
    white-space: nowrap !important;
  }

  html body .hg-topbar .hg-nav__mobile-overflow-menu a:hover,
  html body .hg-topbar .hg-nav__mobile-overflow-menu a:focus-visible {
    outline: 0 !important;
    background: rgba(255, 202, 5, .14) !important;
    color: #ffe16b !important;
  }

  html body .hg-topbar .hg-reel-account:not(.hg-reel-account--guest),
  html body.hg-brush-page .hg-topbar .hg-reel-account:not(.hg-reel-account--guest),
  html body.hg-welfare-page.bstem[class] > header.hg-topbar .hg-reel-account:not(.hg-reel-account--guest) {
    flex-basis: 80px !important;
    width: 80px !important;
    min-width: 80px !important;
    gap: 4px !important;
  }

  html body .hg-topbar .hg-reel-account:not(.hg-reel-account--guest) > .hg-reel-account__recharge,
  html body .hg-topbar .hg-reel-account:not(.hg-reel-account--guest) .hg-reel-account__avatar {
    flex-basis: 38px !important;
    width: 38px !important;
    min-width: 38px !important;
    height: 38px !important;
    min-height: 38px !important;
  }
}

@media (max-width: 340px) {
  html body .hg-topbar__inner,
  html body.hg-brush-page .hg-topbar__inner,
  html body.hg-welfare-page.bstem[class] > header.hg-topbar > .hg-topbar__inner {
    padding-inline: 4px !important;
    gap: 3px !important;
  }

  html body .hg-topbar .hg-logo,
  html body.hg-brush-page .hg-topbar .hg-logo,
  html body.hg-welfare-page.bstem[class] > header.hg-topbar .hg-logo {
    flex-basis: 48px !important;
    width: 48px !important;
    min-width: 48px !important;
  }

  html body .hg-topbar .hg-logo img,
  html body.hg-brush-page .hg-topbar .hg-logo img,
  html body.hg-welfare-page.bstem[class] > header.hg-topbar .hg-logo img {
    width: 48px !important;
    min-width: 48px !important;
  }

  html body .hg-topbar .hg-nav,
  html body.hg-brush-page .hg-topbar .hg-nav,
  html body.hg-welfare-page.bstem[class] > header.hg-topbar .hg-nav {
    grid-template-columns: repeat(3, 46px) 24px !important;
    flex-basis: 171px !important;
    width: 171px !important;
    min-width: 171px !important;
    max-width: 171px !important;
    column-gap: 0 !important;
  }

  html body .hg-topbar .hg-nav > a,
  html body.hg-brush-page .hg-topbar .hg-nav > a,
  html body.hg-welfare-page.bstem[class] > header.hg-topbar .hg-nav > a {
    flex-basis: 46px !important;
    width: 46px !important;
    min-width: 46px !important;
    max-width: 46px !important;
  }

  html body .hg-topbar .hg-nav__mobile-overflow,
  html body .hg-topbar .hg-nav__mobile-more {
    width: 24px !important;
    min-width: 24px !important;
  }

  html body .hg-topbar .hg-reel-account:not(.hg-reel-account--guest),
  html body.hg-brush-page .hg-topbar .hg-reel-account:not(.hg-reel-account--guest),
  html body.hg-welfare-page.bstem[class] > header.hg-topbar .hg-reel-account:not(.hg-reel-account--guest) {
    flex-basis: 76px !important;
    width: 76px !important;
    min-width: 76px !important;
  }

  html body .hg-topbar .hg-reel-account:not(.hg-reel-account--guest) > .hg-reel-account__recharge,
  html body .hg-topbar .hg-reel-account:not(.hg-reel-account--guest) .hg-reel-account__avatar {
    flex-basis: 36px !important;
    width: 36px !important;
    min-width: 36px !important;
    height: 36px !important;
    min-height: 36px !important;
  }
}
