ast._t);
      showToast._t = setTimeout(()=> toast.hidden = true, 2200);
    }

    function setConnUI(state) {
      connText.dataset.state = state;
      connDot.classList.remove('ok','bad','warn');

      if (state === 'connected') {
        connDot.classList.add('ok');
        connText.textContent = 'Connected';
      } else if (state === 'connecting' || state === 'stale') {
        connDot.classList.add('warn');
        connText.textContent = state === 'connecting' ? 'Waiting for telemetry…' : 'No t