move(card1,card2)
function move(card1,card2) {
  var c1=card1.style.gridColumnStart;
  var c2=card2.style.gridColumnStart;
  g_seq.reverse();
  var l=g_seq.length;
  for (var i=0;i<l;i++) {
    g_main_cols[c1].pop();
    var id=g_seq.pop();
    g_main_cols[c2].push(id);
  }
}

What an achievement! All should be now working faultlessly.


So it's time to introduce another panel. Before we do, make the background colour of main_panel green.
I also added padding:.5vmin;

We're going to work on the left panel which I'm going to call temp. It will simply start with four empties. I found that flex was the easiest way to set this panel up.

We'll also need a global array g_temp_col to keep track of what is in each slot.