/* Each piece carries its OWNER'S theme, so two players may wear different
   decorations on the same board. Team colours and game silhouettes remain. */
body.connect-four-game:not(.four-themed) #board .cell[data-cosmetic-piece]::before,
body.connect-four-game:not(.four-themed) .four-drop-marker i[data-cosmetic-piece]::after,
body.connect-four-game:not(.four-themed) .four-drop-ghost[data-cosmetic-piece]::after{
  content:''!important;display:block!important;position:absolute!important;
  inset:22%!important;width:auto!important;height:auto!important;
  border:0!important;border-radius:50%!important;opacity:1!important;
  background:var(--personal-emblem) center/contain no-repeat!important;
  box-shadow:0 1px 2px #0008!important;transform:none!important;
}
body.connect-four-game:not(.four-themed) #board .cell.four-drop-hidden[data-cosmetic-piece]::before{display:none!important}
/* Default counter fills are never recoloured; the medallion occupies only
   the centre, leaving a broad, readable yellow/pink team-colour edge. */
#board.xo .cell[data-cosmetic-piece][data-value]::before{
  background:var(--personal-mark) center/contain no-repeat!important;
  clip-path:none!important;mask:none!important;-webkit-mask:none!important;border-radius:0!important;
  filter:drop-shadow(0 2px 2px #0007);
}
/* Chess has shared board finishes only. Every white/black piece keeps its
   original artwork; there is no piece selector or global piece override. */
html[data-cosmetic-board] #board.chess[data-cosmetic-board]{
  background:linear-gradient(145deg,var(--cos-board-2),var(--cos-board))!important;
  border-color:var(--cos-rim)!important;
}
html[data-cosmetic-board] #board.chess[data-cosmetic-board] .chess-square.light{background:var(--cos-light)!important}
html[data-cosmetic-board] #board.chess[data-cosmetic-board] .chess-square.dark{background:var(--cos-dark)!important}
html[data-cosmetic-board] #board.chess[data-cosmetic-board] .chess-square.light,
html[data-cosmetic-board] #board.chess[data-cosmetic-board] .chess-square.dark{box-shadow:inset 0 0 0 1px #ffffff14}

/* Gameplay affordances sit above the finish; a purchase cannot hide check,
   the previous move, selection or legal destinations. */
html[data-cosmetic-board] #board.chess[data-cosmetic-board] .chess-square.chess-last{box-shadow:inset 0 0 0 3px #ffe89cbf}
html[data-cosmetic-board] #board.chess[data-cosmetic-board] .chess-square.chess-target{background-image:radial-gradient(circle,#102736a8 0 12%,transparent 13%)!important}
html[data-cosmetic-board] #board.chess[data-cosmetic-board] .chess-square.dark.chess-target{background-image:radial-gradient(circle,#e9f8f0b0 0 12%,transparent 13%)!important}
html[data-cosmetic-board] #board.chess[data-cosmetic-board] .chess-square.chess-check{background-color:#b96166!important}
