/* QQG.NET v18 mobile navigation final layout.
   This layer deliberately owns the complete mobile panel so earlier desktop
   flex/grid rules cannot shrink submenu cards to half width. */

@media (max-width: 1120px) {
  html.qqg-front-v9 body.menu-open,
  body.menu-open {
    overflow: hidden !important;
  }

  html.qqg-front-v9 body .qqg-unified-header .header-panel,
  body .qqg-unified-header .header-panel {
    position: fixed !important;
    z-index: 140 !important;
    top: 66px !important;
    right: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    display: flex !important;
    visibility: hidden !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    height: calc(100vh - 66px) !important;
    height: calc(100dvh - 66px) !important;
    max-height: none !important;
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    gap: 0 !important;
    margin: 0 !important;
    padding: 10px 12px calc(28px + env(safe-area-inset-bottom)) !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    opacity: 0 !important;
    transform: translateX(100%) !important;
    overscroll-behavior: contain !important;
    -webkit-overflow-scrolling: touch !important;
    box-sizing: border-box !important;
  }

  html.qqg-front-v9 body .qqg-unified-header .header-panel.open,
  body .qqg-unified-header .header-panel.open {
    visibility: visible !important;
    opacity: 1 !important;
    transform: none !important;
  }

  html.qqg-front-v9 body .qqg-unified-header .primary-nav,
  body .qqg-unified-header .primary-nav {
    display: flex !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    flex: 0 0 auto !important;
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    gap: 8px !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    box-sizing: border-box !important;
  }

  html.qqg-front-v9 body .qqg-unified-header .nav-item,
  body .qqg-unified-header .nav-item {
    display: block !important;
    position: relative !important;
    right: auto !important;
    left: auto !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    height: auto !important;
    min-height: 0 !important;
    flex: 0 0 auto !important;
    align-self: stretch !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    transform: none !important;
    box-sizing: border-box !important;
  }

  html.qqg-front-v9 body .qqg-unified-header .nav-label,
  body .qqg-unified-header .nav-label {
    display: grid !important;
    position: relative !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    grid-template-columns: minmax(0, 1fr) 64px !important;
    align-items: stretch !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    box-sizing: border-box !important;
  }

  html.qqg-front-v9 body .qqg-unified-header .nav-item > a,
  html.qqg-front-v9 body .qqg-unified-header .nav-label > a,
  body .qqg-unified-header .nav-item > a,
  body .qqg-unified-header .nav-label > a {
    display: flex !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    min-height: 64px !important;
    align-items: center !important;
    padding: 0 22px !important;
    overflow: visible !important;
    box-sizing: border-box !important;
    white-space: normal !important;
  }

  html.qqg-front-v9 body .qqg-unified-header .nav-label > button,
  body .qqg-unified-header .nav-label > button {
    position: static !important;
    width: 64px !important;
    min-width: 64px !important;
    height: 64px !important;
    margin: 0 !important;
    align-self: stretch !important;
    box-sizing: border-box !important;
  }

  html.qqg-front-v9 body .qqg-unified-header .submenu,
  body .qqg-unified-header .submenu {
    display: none !important;
    position: static !important;
    visibility: visible !important;
    right: auto !important;
    left: auto !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    flex: 0 0 auto !important;
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    gap: 8px !important;
    margin: 0 !important;
    padding: 10px !important;
    overflow: visible !important;
    opacity: 1 !important;
    transform: none !important;
    box-sizing: border-box !important;
  }

  html.qqg-front-v9 body .qqg-unified-header .has-sub.open > .submenu,
  html.qqg-front-v9 body .qqg-unified-header .has-sub.open:hover > .submenu,
  body .qqg-unified-header .has-sub.open > .submenu,
  body .qqg-unified-header .has-sub.open:hover > .submenu {
    display: flex !important;
  }

  html.qqg-front-v9 body .qqg-unified-header .submenu > a,
  body .qqg-unified-header .submenu > a {
    display: flex !important;
    position: relative !important;
    right: auto !important;
    left: auto !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    min-height: 64px !important;
    flex: 0 0 auto !important;
    align-self: stretch !important;
    align-items: flex-start !important;
    justify-content: center !important;
    flex-direction: column !important;
    gap: 4px !important;
    margin: 0 !important;
    padding: 12px 16px !important;
    overflow: visible !important;
    transform: none !important;
    box-sizing: border-box !important;
    white-space: normal !important;
  }

  html.qqg-front-v9 body .qqg-unified-header .submenu > a > span,
  html.qqg-front-v9 body .qqg-unified-header .submenu > a > small,
  body .qqg-unified-header .submenu > a > span,
  body .qqg-unified-header .submenu > a > small {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    margin: 0 !important;
    overflow: visible !important;
    text-align: left !important;
    text-overflow: clip !important;
    overflow-wrap: anywhere !important;
    white-space: normal !important;
  }

  html.qqg-front-v9 body .qqg-unified-header .header-tools,
  body .qqg-unified-header .header-tools {
    display: grid !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    flex: 0 0 auto !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
    margin: 16px 0 0 !important;
    padding: 16px 0 0 !important;
    border-top: 1px solid #dce6f2 !important;
    box-sizing: border-box !important;
  }

  html.qqg-front-v9 body .qqg-unified-header .header-tools .language,
  body .qqg-unified-header .header-tools .language {
    width: 100% !important;
    grid-column: 1 / -1 !important;
    justify-content: center !important;
  }

  html.qqg-front-v9 body .qqg-unified-header .header-tools > a,
  body .qqg-unified-header .header-tools > a {
    width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }
}

