/* Mobile identity uses the authenticated session, independently of wallet lock.
 * Existing wallet/search/menu nodes and desktop sidebar relocation stay intact. */
.mobile-account-link { display:none; }
@media (max-width:1023px) {
  body #topBar {
    display:grid !important;
    grid-template-columns:minmax(0,auto) minmax(0,1fr) !important;
    align-items:center !important;
    gap:8px !important;
    padding:8px 12px !important;
  }
  body #topBar > .mobile-brand-wallet {
    flex:initial !important;
    flex-direction:row-reverse !important;
    justify-content:flex-end !important;
    padding-left:0 !important;
    gap:6px !important;
  }
  body #topBar > div:nth-child(2) { display:none !important; }
  body #topBar > div:last-child { margin-left:0 !important; min-width:0; }
  body #topBar .mobile-brand {
    flex-direction:column;
    align-items:center;
    flex-shrink:0;
    gap:2px !important;
    line-height:1.1;
  }
  body #topBar .mobile-brand > a[href="/"] { font-size:22px !important; }
  body #topBar .mobile-brand > a[href="/beta"] { font-size:9px !important; padding:1px 5px !important; margin:0 !important; }
  body.ww-cosmos-body #topBar .mobile-brand::before { display:none; }
  body #topBar #walletContainer {
    position:static !important;
    flex-shrink:0;
    box-sizing:border-box;
    max-width:min(36vw,144px);
    padding:5px 6px !important;
    margin:0;
  }
  body #topBar #walletContainer > div:first-child { font-size:9px !important; letter-spacing:.7px !important; margin-bottom:3px !important; }
  body #topBar #walletStatus { font-size:13px !important; max-width:100%; gap:4px !important; flex-wrap:wrap; justify-content:center; overflow-wrap:anywhere; }
  body #topBar #walletDot { flex-shrink:0; }
  body #topBar #walletFiat { max-width:100%; overflow-wrap:anywhere; font-size:10px !important; }
  body #topBar .nav-auth-cluster,
  body #topBar .nav-guest-cluster { width:100%; min-width:0; gap:6px !important; justify-content:flex-end; }
  body.munia-has-bnav #topBar .nav-auth-cluster { gap:0 !important; }
  body #topBar .nav-auth-cluster > .nav-user-profile { display:none !important; }
  body #topBar .mobile-account-link {
    display:flex;
    flex:1;
    flex-direction:column;
    align-items:flex-end;
    justify-content:center;
    min-width:0;
    min-height:44px;
    text-align:right;
    text-decoration:none;
    color:var(--munia-text, #000);
    font:14px/1.2 Arial,sans-serif;
  }
  body #topBar .mobile-account-link > span { display:block; max-width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  body #topBar .mobile-account-name { font-weight:700; }
  body #topBar .mobile-account-handle { margin-top:3px; font-size:12px; opacity:.85; }
  body #topBar .mobile-account-link:focus-visible { outline:2px solid #00865d; outline-offset:2px; border-radius:4px; }
}
