/** * theme.js: Board and piece theming module * * Owns the chess board's visual styling: square colours, rank/file label * colours, last-move highlight colour, and the piece-set image path. Colours * are read from the --board-* tokens in styles/tokens.css. The board uses * Libre Brown and the piece set uses CBurnett. * Exposes a small public API consumed by board.js and useExplorer.js. * * The CSS-generation function below targets chessground's DOM/class model * (`cg-board`, `coords.ranks`/`coords.files`) - see the comment above * _coordLabelCss() for how coordinate-label positioning and colouring are * derived against that model. * * Public API: * Theme.init(reconstructBoard) - register board reconstruction callback * Theme.apply() - inject the board's theme