// F9 chart safety loader — fires after all scripts loaded
window.addEventListener('load', function(){
var tries = 0;
var iv = setInterval(function(){
tries++;
if(typeof LightweightCharts !== 'undefined' && window.F9C){
clearInterval(iv);
// Only load if F9 panel is active
var active = document.querySelector('.tab-btn.active, .screen:not([style*="none"])');
window.F9C.load();
}
if(tries > 40) clearInterval(iv);
}, 100);
});