.game-board {
    --board-size: 3;
    display: grid;
    grid-template-columns: repeat(var(--board-size), minmax(0, 1fr));
    grid-template-rows: repeat(var(--board-size), minmax(0, 1fr));
    width: min(100%, 420px);
    aspect-ratio: 1;
    border: 2px solid #243447;
    background: #243447;
    gap: 2px;
}

.game-cell {
    display: grid;
    min-width: 0;
    min-height: 0;
    place-items: center;
    background: #f4f1ea;
}

.game-cell:nth-child(even) {
    background: #e5edf2;
}

.board-piece-form {
    width: 100%;
    height: 100%;
    margin: 0;
}

.board-piece {
    display: flex;
    width: 100%;
    height: 100%;
    min-width: 0;
    padding: 0.3rem;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 0;
    color: #243447;
    font-weight: 700;
    line-height: 1.15;
    overflow-wrap: anywhere;
}

.board-piece.problem-piece {
    position: relative;
    background: #f6c85f;
}

.board-piece.problem-piece.is-solved {
    background: #adb5bd;
    color: #495057;
    cursor: not-allowed;
}

.board-piece.problem-piece:not(.is-solved):hover,
.board-piece.problem-piece:not(.is-solved):focus-visible,
.board-piece.problem-piece:not(.is-solved).is-selected {
    background: #e76f51;
    color: #fff;
}

.board-piece.special-piece {
    background: #b8e0d2;
    color: #1d4d4f;
}

.board-piece.special-piece:not(.is-used):hover,
.board-piece.special-piece:not(.is-used):focus-visible {
    background: #2a9d8f;
    color: #fff;
}

.board-piece.special-piece.is-used {
    background: #ced4da;
    color: #495057;
    cursor: not-allowed;
}

.problem-piece-name {
    font-size: clamp(0.65rem, 2vw, 0.9rem);
}

.problem-piece-hp {
    font-size: 0.7rem;
    font-weight: 400;
}

.special-piece-name {
    font-size: clamp(0.65rem, 2vw, 0.9rem);
}

.special-piece-effect,
.special-piece-status {
    font-size: 0.65rem;
    font-weight: 400;
}

.player-piece-marker {
    position: absolute;
    top: 0.25rem;
    right: 0.35rem;
    display: grid;
    width: 1.35rem;
    height: 1.35rem;
    place-items: center;
    border-radius: 50%;
    background: #2a9d8f;
    color: #fff;
    font-size: 0.75rem;
}

.player-piece {
    display: grid;
    width: 2.75rem;
    aspect-ratio: 1;
    place-items: center;
    border-radius: 50%;
    background: #2a9d8f;
    color: #fff;
    font-size: 1.25rem;
}

@media (max-width: 575.98px) {
    .game-board {
        width: 100%;
    }
}
