/* Shared notation layout: number / White / Black, twice when space permits.
   Use the notation panel width, including inside embedded workshop tools. */
.moves-panel,
.variation-analysis-panel,
#movesPre,
#movesPanel {
  container:move-notation / inline-size;
}

#moveList,
.variation-moves,
.mv-table {
  box-sizing:border-box;
  min-width:0;
  grid-template-columns:var(--notation-columns, 2.5em repeat(2, minmax(0, 1fr)));
  grid-auto-rows:minmax(30px, max-content);
  align-content:start;
  align-items:stretch;
  justify-content:stretch;
  gap:4px;
  font-size:var(--notation-font-size, 15px);
  line-height:1.42;
}

#moveList > .move-cell,
#moveList > .move-number,
.variation-moves > .variation-move-cell,
.mv-table .mv-cell,
.mv-table .mv-num {
  box-sizing:border-box;
  min-width:0;
  min-height:30px;
  padding:4px 3px;
  white-space:nowrap;
  overflow-wrap:normal;
  word-break:normal;
}

/* Replace the Gamer's old extra padding on every second move number. */
#moveList > .move-cell:nth-child(6n + 4):not(.move-result) {
  padding:4px 3px;
}

#moveList > .move-cell:nth-child(3n + 1):not(.move-result),
#moveList > .move-number,
.variation-moves > .move-number,
.mv-table .mv-num {
  text-align:right;
  justify-content:flex-end;
}

.mv-table .mv {
  padding-inline:0;
  white-space:nowrap;
  overflow-wrap:normal;
  word-break:normal;
}

/* Keep empty states and game results independent of the column count. */
#moveList > .move-result,
.variation-moves > .variation-moves-empty {
  grid-column:1 / -1;
}

/* The fitting script measures all moves in bold at 15 and 14px, including
   padding and the actual scrollbar width, before enabling six columns. */
