/* The supplied image already includes the site name and URL. */
body > header .qiqi-complete-brand,
body.study999-recover-page > header .qiqi-complete-brand {
  display:inline-flex!important;align-items:center!important;
  flex:0 1 auto!important;gap:0!important;
  width:350px!important;max-width:min(350px,54vw)!important;
  min-width:0!important;height:auto!important;
  font-size:0!important;line-height:0!important;
  white-space:normal!important;text-decoration:none!important;
}
body > header .qiqi-complete-brand .study999-site-logo {
  display:block!important;width:100%!important;height:auto!important;
  max-width:100%!important;max-height:112px!important;
  flex:0 1 auto!important;object-fit:contain!important;
  margin:0!important;
}
body.study999-admin-layout .study999-admin-header .study999-admin-brand {gap:0!important}
body.study999-admin-layout .study999-admin-header .study999-admin-logo {
  display:block!important;width:350px!important;height:auto!important;
  max-width:min(350px,54vw)!important;max-height:112px!important;
  flex:0 1 auto!important;object-fit:contain!important;
}
@media(max-width:720px){
  body > header:has(.qiqi-complete-brand) {flex-wrap:wrap!important}
  body > header .qiqi-complete-brand,
  body.study999-recover-page > header .qiqi-complete-brand {
    width:170px!important;max-width:min(170px,calc(100vw - 28px))!important;
    flex:0 0 min(170px,calc(100vw - 28px))!important;
  }
  body > header .qiqi-complete-brand .study999-site-logo {max-height:56px!important}
  body.study999-admin-layout .study999-admin-header {flex-wrap:wrap!important}
  body.study999-admin-layout .study999-admin-header .study999-admin-logo {
    width:170px!important;max-width:min(170px,calc(100vw - 28px))!important;
    height:auto!important;max-height:56px!important;flex:0 0 auto!important;
  }
}

/* The old mobile lesson stylesheet caps every guest header image at 48 x 42px.
   Keep enough specificity to set the new half-size image on the guest page. */
@media(max-width:720px){
  body.study999-guest-nav-ready:not(.study999-logged-nav) > header .qiqi-complete-brand,
  body.study999-logged-nav > header .qiqi-complete-brand {
    width:min(170px,calc(100vw - 28px))!important;
    max-width:min(170px,calc(100vw - 28px))!important;
    height:auto!important;
    flex:0 0 min(170px,calc(100vw - 28px))!important;
  }
  body.study999-guest-nav-ready:not(.study999-logged-nav) > header .qiqi-complete-brand .study999-site-logo,
  body.study999-logged-nav > header .qiqi-complete-brand .study999-site-logo {
    display:block!important;
    width:100%!important;
    height:auto!important;
    max-width:100%!important;
    max-height:56px!important;
    flex:0 0 auto!important;
    object-fit:contain!important;
  }
}
