/* Board-only colors — see docs/DESIGN.md */
.c-board-frame cg-board square.last-move {
  background: rgba(155, 199, 0, 0.28);
}

.c-board-frame cg-board square.selected {
  background: rgba(155, 199, 0, 0.18) !important;
}

.c-board-frame cg-board piece.selected {
  box-shadow: none;
}

.c-board-frame cg-board square.move-dest:not(.oc) {
  background: radial-gradient(
    circle at center,
    rgba(20, 18, 16, 0.22) 25%,
    transparent 26%
  ) !important;
}

.c-board-frame cg-board square.move-dest.oc,
.c-board-frame cg-board square.oc.move-dest,
.c-board-frame cg-board square.move-dest.oc:hover,
.c-board-frame cg-board square.oc.move-dest:hover {
  background: none !important;
}

.c-board-frame cg-board square.move-dest.oc::before,
.c-board-frame cg-board square.oc.move-dest::before {
  content: "";
  position: absolute;
  inset: 7%;
  border: 3px solid rgba(20, 18, 16, 0.38);
  border-radius: 50%;
  pointer-events: none;
  box-sizing: border-box;
}

.c-board-frame cg-board square.move-dest:hover:not(.oc) {
  background: radial-gradient(
    circle at center,
    rgba(20, 18, 16, 0.22) 25%,
    transparent 26%
  ) !important;
}

/* Coordinates inside the board (lichess-style) */
.c-board-frame .cg-wrap coords {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 600;
  pointer-events: none;
  opacity: 1;
  z-index: 3;
}

.c-board-frame .cg-wrap coords.ranks {
  left: 0;
  top: 0;
  right: auto;
  bottom: auto;
  width: 12.5%;
  height: 100%;
  flex-flow: column-reverse;
}

.c-board-frame .cg-wrap coords.ranks.black {
  flex-flow: column;
}

.c-board-frame .cg-wrap coords.ranks.left {
  left: 0;
  align-items: flex-start;
}

.c-board-frame .cg-wrap coords.ranks coord {
  transform: none;
  flex: 1 1 0;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  padding: 3px 0 0 4px;
  text-transform: none;
}

.c-board-frame .cg-wrap coords.files {
  bottom: 0;
  left: 0;
  top: auto;
  width: 100%;
  height: 12.5%;
  flex-flow: row;
  text-transform: lowercase;
}

.c-board-frame .cg-wrap coords.files.black {
  flex-flow: row-reverse;
}

.c-board-frame .cg-wrap coords.files coord {
  flex: 1 1 0;
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  padding: 3px 4px 0 0;
  text-transform: lowercase;
}

.c-board-frame .orientation-white coords.ranks coord:nth-child(even),
.c-board-frame .orientation-white coords.files coord:nth-child(even),
.c-board-frame .orientation-black coords.ranks coord:nth-child(odd),
.c-board-frame .orientation-black coords.files coord:nth-child(odd) {
  color: rgba(0, 0, 0, 0.5);
}

.c-board-frame .orientation-white coords.ranks coord:nth-child(odd),
.c-board-frame .orientation-white coords.files coord:nth-child(odd),
.c-board-frame .orientation-black coords.ranks coord:nth-child(even),
.c-board-frame .orientation-black coords.files coord:nth-child(even) {
  color: rgba(255, 255, 255, 0.75);
}