em;font-weight:800;margin-top:0.5rem;">Time ${endType === 'ended' ? 'up' : 'stopped'}!</div><div style="margin-top:0.3rem;color:var(--muted);">${summary}</div>`;
        els.endMessage.classList.remove('hidden');
      }

      function tick() {
        state.timeLeft -= 1;
        els.timeLeft.textContent = String(Math.max(0, state.timeLeft));
        if (state.timeLeft <= 0) {
          stop('ended');
        }
      }

      function submitAnswer() {
        if (!state.running) return;
        const raw 