let target = location.hash ? document.querySelector(location.hash) : null;
if (target) {
target.childNodes[3].style.display = 'block';
target.childNodes[3].classList.add('opened');
target.scrollIntoView();
}
без window.scrollBy(0, -120);
твой код отрабатывает точно так же
но ты конечно написала получше меня, и выглядит стабильнее и увереннее, так что возьму лучше твой код😅😂 спасибо)