(()=>{'use strict';
const phase=document.getElementById('phase');
if(!phase)return;
function sync(){
  const p=String(phase.textContent||'').trim().toUpperCase();
  document.body.classList.toggle('lz-betting-open',p==='BETTING');
  if(p!=='BETTING'){
    document.querySelectorAll(
      '#lz-bot-overlay .lz-flying-chip,'+
      '#lz-bot-overlay .lz-landed-chip,'+
      '#lz-bet-fx-layer .lz-flying-chip'
    ).forEach(el=>el.remove());
  }
}
sync();
new MutationObserver(sync).observe(phase,{childList:true,subtree:true,characterData:true});
})();