/* Mobil főmenü: teljes képernyős lap (2026-10-02). A ☰ megnyitásakor a fejléc maga lesz a lap
   (Karakter-szakasz + Menü-lista), a ☰ helyén ✕ áll. Csak telefonon (body.mx-mobile-mode). */
@media (max-width: 820px) {
  body.mx-mobile-mode.mx-menu-open { overflow: hidden; }

  body.mx-mobile-mode.mx-menu-open header {
    position: fixed !important; inset: 0; z-index: 10040; overflow-y: auto; overscroll-behavior: contain;
    background: inherit; border-bottom: 0 !important;
    grid-template-columns: minmax(0, 1fr) auto !important; align-content: start; align-items: center;
    row-gap: 1rem !important;
    padding: calc(env(safe-area-inset-top, 0px) + .55rem) 16px calc(env(safe-area-inset-bottom, 0px) + 28px) !important;
    animation: mx-mm-in .2s ease-out;
  }
  @keyframes mx-mm-in { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }

  /* ☰ → ✕ (a festett ikon helyén), a többi gyorsgomb elbújik */
  body.mx-mobile-mode.mx-menu-open #mobileQuickBar > :not(#mobileMenuToggle) { display: none !important; }
  body.mx-mobile-mode.mx-menu-open #mobileMenuToggle {
    width: 44px; height: 44px; justify-content: center; align-items: center;
    border: 1px solid var(--border); border-radius: 12px; background: var(--panel);
  }
  body.mx-mobile-mode.mx-menu-open #mobileMenuToggle img { display: none; }
  body.mx-mobile-mode.mx-menu-open #mobileMenuToggle::after {
    content: "\2715"; font-size: 1.25rem; line-height: 1; color: var(--accent);
  }

  /* közös szakasz-címke */
  body.mx-mobile-mode.mx-menu-open .header-group-char::before,
  body.mx-mobile-mode.mx-menu-open .header-account.open::before {
    position: static !important; display: block; background: none !important;
    padding: 0 !important; margin: 0 2px .6rem; top: auto; left: auto;
    font-size: .74rem !important; font-weight: 600; letter-spacing: .16em !important;
    text-transform: uppercase; color: var(--accent) !important;
  }

  /* Karakter-szakasz */
  body.mx-mobile-mode.mx-menu-open .header-toolbar {
    grid-column: 1 / -1 !important; order: 3 !important; gap: 0 !important;
    background: none !important; border: 0 !important; box-shadow: none !important; padding: 0 !important;
  }
  body.mx-mobile-mode.mx-menu-open .header-toolbar .header-group-char {
    display: block !important; background: none !important; border: 0 !important; box-shadow: none !important; padding: 0 !important;
  }
  body.mx-mobile-mode.mx-menu-open .header-group-char .char-widget-row {
    display: grid !important; grid-template-columns: 1fr 1fr; gap: .55rem; width: 100%;
  }
  body.mx-mobile-mode.mx-menu-open .header-group-char .char-widget-row select {
    grid-column: 1 / -1; width: 100%; max-width: none; min-width: 0; height: 3.1rem;
    font-size: 1rem; padding: 0 .8rem; border: 1px solid var(--border); border-radius: 12px;
  }
  body.mx-mobile-mode.mx-menu-open .header-group-char .char-widget-row > button:not(.hidden):not([hidden]) {
    display: flex !important; align-items: center; justify-content: flex-start; gap: .6rem;
    width: 100%; min-width: 0; height: 3.5rem; padding: 0 .75rem !important; margin: 0 !important;
    font-size: .98rem !important; background: var(--panel) !important;
    border: 1px solid var(--border) !important; border-radius: 12px !important; box-shadow: var(--shadow-sm);
  }
  body.mx-mobile-mode.mx-menu-open .header-group-char .char-widget-row > button:active { transform: scale(.985); }
  body.mx-mobile-mode.mx-menu-open .header-group-char .char-widget-row img.icon-img {
    width: 36px !important; height: 36px !important; margin: 0 !important; flex: 0 0 auto; vertical-align: middle;
  }

  /* Menü-szakasz: egy kártya, lapozható sorokkal */
  body.mx-mobile-mode.mx-menu-open .header-account.open {
    grid-column: 1 / -1 !important; justify-self: stretch !important; width: 100% !important; min-width: 0;
    order: 4 !important; margin-top: 0 !important; padding: 0 !important;
    background: none !important; border: 0 !important; box-shadow: none !important;
  }
  body.mx-mobile-mode.mx-menu-open .header-account.open .journey-statebar { padding: 0 2px .6rem; margin-bottom: 0; border-bottom: 0; }
  body.mx-mobile-mode.mx-menu-open .header-account.open .mx-um-trg {
    display: flex !important; align-items: center; justify-content: flex-start !important; gap: .9rem;
    min-height: 3.9rem; padding: .35rem 1rem !important; border-radius: 0 !important;
    font-size: 1.08rem !important; background: var(--panel) !important;
    border: 0 !important; border-left: 1px solid var(--border) !important; border-right: 1px solid var(--border) !important;
    animation: mx-mm-row .3s ease both;
  }
  body.mx-mobile-mode.mx-menu-open .header-account.open .mx-um-trg + .mx-um-trg { border-top: 1px solid var(--border-dim) !important; }
  body.mx-mobile-mode.mx-menu-open .header-account.open .mx-um-trg:first-of-type {
    border-top: 1px solid var(--border) !important; border-radius: 16px 16px 0 0 !important;
  }
  body.mx-mobile-mode.mx-menu-open .header-account.open .mx-um-trg:last-of-type {
    border-bottom: 1px solid var(--border) !important; border-radius: 0 0 16px 16px !important;
  }
  body.mx-mobile-mode.mx-menu-open .header-account.open .mx-um-trg img.icon-img {
    width: 46px !important; height: 46px !important; margin: 0 !important; flex: 0 0 auto; vertical-align: middle;
  }
  body.mx-mobile-mode.mx-menu-open .header-account.open .mx-um-trg .mx-um-label { flex: 1 1 auto; text-align: left; }
  body.mx-mobile-mode.mx-menu-open .header-account.open .mx-um-trg::after {
    content: "\203A"; margin-left: auto; padding-left: .5rem; font-size: 1.7rem; line-height: 1; opacity: .4; color: var(--accent);
  }
  body.mx-mobile-mode.mx-menu-open .header-account.open .mx-um-trg:active { background: rgba(127,127,127,.18) !important; }
  @keyframes mx-mm-row { from { opacity: 0; transform: translateX(10px); } to { opacity: 1; transform: none; } }
  body.mx-mobile-mode.mx-menu-open .header-account.open .mx-um-trg:nth-of-type(2) { animation-delay: .03s; }
  body.mx-mobile-mode.mx-menu-open .header-account.open .mx-um-trg:nth-of-type(3) { animation-delay: .06s; }
  body.mx-mobile-mode.mx-menu-open .header-account.open .mx-um-trg:nth-of-type(4) { animation-delay: .09s; }
  body.mx-mobile-mode.mx-menu-open .header-account.open .mx-um-trg:nth-of-type(5) { animation-delay: .12s; }
  body.mx-mobile-mode.mx-menu-open .header-account.open .mx-um-trg:nth-of-type(6) { animation-delay: .15s; }
  body.mx-mobile-mode.mx-menu-open .header-account.open .mx-um-trg:nth-of-type(7) { animation-delay: .18s; }
}
@media (max-width: 820px) and (prefers-reduced-motion: reduce) {
  body.mx-mobile-mode.mx-menu-open header,
  body.mx-mobile-mode.mx-menu-open .header-account.open .mx-um-trg { animation: none; }
}
