Could the input be a block at the bottom of the transcript (like in-line) instead of hovering at the top of the page?
The whole page gets refreshed when you run a command, so I’m not sure about retaining scroll state.
Maybe someone should write a JS interpreter :D