/* Board themes — переопределяют только background-color у cg-board.
   chessground.brown.css задаёт overlay-SVG (0.2 opacity dark squares) поверх любого цвета.
   То есть: background-color = light square; dark = light + 20% чёрного.
   Темы добавляются классом .theme-X на родительский элемент cg-wrap. */

.cg-wrap.theme-brown cg-board     { background-color: #f0d9b5 !important; }
.cg-wrap.theme-blue cg-board      { background-color: #b9c9d8 !important; }
.cg-wrap.theme-green cg-board     { background-color: #d6e3c2 !important; }
.cg-wrap.theme-wood cg-board      { background-color: #c8965a !important; }
.cg-wrap.theme-gray cg-board      { background-color: #d8d8d8 !important; }
.cg-wrap.theme-purple cg-board    { background-color: #d8c5e0 !important; }
.cg-wrap.theme-pink cg-board      { background-color: #f5d5d5 !important; }
.cg-wrap.theme-newspaper cg-board { background-color: #ffffff !important; }
.cg-wrap.theme-sea cg-board       { background-color: #b8d8d2 !important; }

/* Тёмная тема — здесь нужен другой подход: меняем сам overlay через filter.
   Используем CSS filter invert чтобы overlay стал светлым на тёмном фоне. */
.cg-wrap.theme-ic cg-board {
  background-color: #1f2528 !important;
  filter: invert(1) hue-rotate(180deg);
}
.cg-wrap.theme-ic cg-board piece {
  filter: invert(1) hue-rotate(180deg); /* фигуры обратно нормально */
}
