body {
  font-family: Arial, sans-serif;
  text-align: center;
}

header, footer {
  background: #f2f2f2;
  padding: 10px;
}

#board {
  /*
  use inline-block instead here


  display: inline-block;
  margin-top: 20px;
  */
  display:inline-block; flex-direction:column; gap:10px;  
  position: relative; /* added to move lines in place */
}

.row {
  display: flex;
  gap: 10px;
}

.dot {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: black;
  margin: 20px;
  cursor: pointer;
  position: relative;

  /* added */
  display :flex;
  justify-content: center;
  align-items: center;
}

/*
  .line {
    position:absolute; height:4px; background:red; z-index:0;
  }
*/
  #lines {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none; /* clicks pass through to dots */
}

#boxes {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none; /* clicks pass through to dots */
  z-index: -1; /* behind dots */
}

.box {
  position: absolute;
  opacity: 0.3;
  z-index: 0;
}

.box_deprecate {
  position: absolute;
  width: 30px;  /* match dot spacing */
  height: 30px;
  opacity: 0.3;
  z-index: -1;
}
