.board-shell {
  --bottom-frame-height: clamp(18px, 4.5cqh, 40px);
  width: min(98cqw, calc(98cqh - var(--bottom-frame-height)));
  margin: 0 auto;
}

.board-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--border-radius-md) var(--border-radius-md) 0 0;
  overflow: hidden;
  background: var(--color-text-primary);
}

.square {
  position: relative;
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
  overflow: hidden;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  border: 0;
  padding: 0;
  cursor: pointer;
}

.square[draggable='true'] {
  cursor: grab;
}

.square.drag-source {
  opacity: 0.65;
  cursor: grabbing;
}

.square.drag-over {
  outline: 3px dashed var(--color-primary);
  outline-offset: -4px;
}

.square.light {
  background-image: url('/assets/arabian-chess/sprites/board/board_square_white.png');
}

.square.dark {
  background-image: url('/assets/arabian-chess/sprites/board/board_square_black.png');
}

.board-grid--classic {
  border-radius: var(--border-radius-md);
}

.board-grid--classic .square {
  background-image: none;
  transition: filter 160ms ease;
}

.board-grid--classic .square.light {
  background-color: #f3c8a0;
}

.board-grid--classic .square.dark {
  background-color: #ba6d4b;
}

.board-grid--classic .square.drag-over {
  outline-color: #5a2c28;
}

.board-grid--classic .square.selected {
  outline-color: #5a2c28;
}

.board-grid--classic .square.highlighted::after {
  background: #b9dad1;
  border-color: #5a2c28;
}

.square.highlighted::after {
  content: '';
  position: absolute;
  width: 28%;
  height: 28%;
  border-radius: 50%;
  background: var(--color-secondary-purple);
  opacity: 0.75;
  border: var(--border-width) solid var(--color-border);
}

.square.selected {
  outline: 3px solid var(--color-primary);
  outline-offset: -3px;
}

.board-bottom {
  height: var(--bottom-frame-height);
  width: 100%;
  display: block;
  object-fit: fill;
  border: var(--border-width) solid var(--color-border);
  border-top: 0;
  border-radius: 0 0 var(--border-radius-md) var(--border-radius-md);
}
