/* The one board colour sheet for every chessboard on the site (2026-11-10; themes 2026-11-11).
   The square colours live here and nowhere else; the three board engines read them:
   - chessground boards (cg-board): the squares are one crisp 8x8 SVG tile scaled to the board
     (shape-rendering crispEdges + background-size cover — the way that proved exact at every zoom and
     pixel ratio). A data URI cannot read a variable, so each theme writes its two colours once more in
     its tile: keep a theme's three lines in step.
   - chessboard.js boards (.white-1e1d7 / .black-3c85d)
   - the Elbe boards (.elbe-sq.light / .elbe-sq.dark in css/chess-board.css)
   plus the mini boards and the "board not drawn yet" placeholders.
   The member's choice is stamped on the html tag as data-board="<theme>" (Helpers/BoardLook.cs); no
   attribute, or a theme not listed here = brown. Loaded wherever /lib/pieces/pieces.css is. */

/* brown (default): light #f0d9b5, dark #b58863 */
:root { --board-light: #f0d9b5; --board-dark: #b58863; }
cg-board { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8' shape-rendering='crispEdges'%3E%3Cg id='a'%3E%3Cg id='b'%3E%3Cg id='c'%3E%3Cg id='d'%3E%3Crect width='1' height='1' fill='%23f0d9b5'/%3E%3Crect x='1' y='1' width='1' height='1' fill='%23f0d9b5'/%3E%3Crect y='1' width='1' height='1' fill='%23b58863'/%3E%3Crect x='1' width='1' height='1' fill='%23b58863'/%3E%3C/g%3E%3Cuse x='2' href='%23d'/%3E%3C/g%3E%3Cuse x='4' href='%23c'/%3E%3C/g%3E%3Cuse y='2' href='%23b'/%3E%3C/g%3E%3Cuse y='4' href='%23a'/%3E%3C/svg%3E"); }

/* blue: light #dee3e6, dark #8ca2ad */
:root[data-board="blue"] { --board-light: #dee3e6; --board-dark: #8ca2ad; }
html[data-board="blue"] cg-board { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8' shape-rendering='crispEdges'%3E%3Cg id='a'%3E%3Cg id='b'%3E%3Cg id='c'%3E%3Cg id='d'%3E%3Crect width='1' height='1' fill='%23dee3e6'/%3E%3Crect x='1' y='1' width='1' height='1' fill='%23dee3e6'/%3E%3Crect y='1' width='1' height='1' fill='%238ca2ad'/%3E%3Crect x='1' width='1' height='1' fill='%238ca2ad'/%3E%3C/g%3E%3Cuse x='2' href='%23d'/%3E%3C/g%3E%3Cuse x='4' href='%23c'/%3E%3C/g%3E%3Cuse y='2' href='%23b'/%3E%3C/g%3E%3Cuse y='4' href='%23a'/%3E%3C/svg%3E"); }

/* green: light #ffffdd, dark #86a666 */
:root[data-board="green"] { --board-light: #ffffdd; --board-dark: #86a666; }
html[data-board="green"] cg-board { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8' shape-rendering='crispEdges'%3E%3Cg id='a'%3E%3Cg id='b'%3E%3Cg id='c'%3E%3Cg id='d'%3E%3Crect width='1' height='1' fill='%23ffffdd'/%3E%3Crect x='1' y='1' width='1' height='1' fill='%23ffffdd'/%3E%3Crect y='1' width='1' height='1' fill='%2386a666'/%3E%3Crect x='1' width='1' height='1' fill='%2386a666'/%3E%3C/g%3E%3Cuse x='2' href='%23d'/%3E%3C/g%3E%3Cuse x='4' href='%23c'/%3E%3C/g%3E%3Cuse y='2' href='%23b'/%3E%3C/g%3E%3Cuse y='4' href='%23a'/%3E%3C/svg%3E"); }

/* grey: light #e8e8e8, dark #a0a0a0 */
:root[data-board="grey"] { --board-light: #e8e8e8; --board-dark: #a0a0a0; }
html[data-board="grey"] cg-board { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8' shape-rendering='crispEdges'%3E%3Cg id='a'%3E%3Cg id='b'%3E%3Cg id='c'%3E%3Cg id='d'%3E%3Crect width='1' height='1' fill='%23e8e8e8'/%3E%3Crect x='1' y='1' width='1' height='1' fill='%23e8e8e8'/%3E%3Crect y='1' width='1' height='1' fill='%23a0a0a0'/%3E%3Crect x='1' width='1' height='1' fill='%23a0a0a0'/%3E%3C/g%3E%3Cuse x='2' href='%23d'/%3E%3C/g%3E%3Cuse x='4' href='%23c'/%3E%3C/g%3E%3Cuse y='2' href='%23b'/%3E%3C/g%3E%3Cuse y='4' href='%23a'/%3E%3C/svg%3E"); }

/* purple: light #e8dff2, dark #9f90b0 */
:root[data-board="purple"] { --board-light: #e8dff2; --board-dark: #9f90b0; }
html[data-board="purple"] cg-board { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8' shape-rendering='crispEdges'%3E%3Cg id='a'%3E%3Cg id='b'%3E%3Cg id='c'%3E%3Cg id='d'%3E%3Crect width='1' height='1' fill='%23e8dff2'/%3E%3Crect x='1' y='1' width='1' height='1' fill='%23e8dff2'/%3E%3Crect y='1' width='1' height='1' fill='%239f90b0'/%3E%3Crect x='1' width='1' height='1' fill='%239f90b0'/%3E%3C/g%3E%3Cuse x='2' href='%23d'/%3E%3C/g%3E%3Cuse x='4' href='%23c'/%3E%3C/g%3E%3Cuse y='2' href='%23b'/%3E%3C/g%3E%3Cuse y='4' href='%23a'/%3E%3C/svg%3E"); }

/* wood: light #e8c48a, dark #a86f3d */
:root[data-board="wood"] { --board-light: #e8c48a; --board-dark: #a86f3d; }
html[data-board="wood"] cg-board { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8' shape-rendering='crispEdges'%3E%3Cg id='a'%3E%3Cg id='b'%3E%3Cg id='c'%3E%3Cg id='d'%3E%3Crect width='1' height='1' fill='%23e8c48a'/%3E%3Crect x='1' y='1' width='1' height='1' fill='%23e8c48a'/%3E%3Crect y='1' width='1' height='1' fill='%23a86f3d'/%3E%3Crect x='1' width='1' height='1' fill='%23a86f3d'/%3E%3C/g%3E%3Cuse x='2' href='%23d'/%3E%3C/g%3E%3Cuse x='4' href='%23c'/%3E%3C/g%3E%3Cuse y='2' href='%23b'/%3E%3C/g%3E%3Cuse y='4' href='%23a'/%3E%3C/svg%3E"); }

/* chessground: the tile above gives the squares; colour + size are the same for every theme */
cg-board { background-color: var(--board-light); background-size: cover; }

/* chessboard.js */
.white-1e1d7 { background-color: var(--board-light); color: var(--board-dark); }
.black-3c85d { background-color: var(--board-dark);  color: var(--board-light); }

/* Elbe boards: css/chess-board.css paints .elbe-sq.light / .elbe-sq.dark with the same variables. */

/* Mini boards (classroom tabs) */
.os-mini-sq.light { background: var(--board-light); }
.os-mini-sq.dark  { background: var(--board-dark); }

/* The square a board will occupy before it is drawn: a plain 8x8 in the board's colours, so nothing
   below moves when the board arrives (a conic gradient draws true squares, 2026-10-24). */
#pzBoard:empty, #prBoard:empty, #ppBoard:empty, #board:empty, .mobile-daily #mdBoard:empty {
    background: var(--board-light) conic-gradient(var(--board-dark) 25%, var(--board-light) 0 50%, var(--board-dark) 0 75%, var(--board-light) 0) 0 0 / 25% 25%;
}
