/* 盤の外枠（木枠） */
.board-frame {
    padding: 10px;
    background: var(--color-board-frame);
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

/* 将棋盤 */
.shogi-board {
    display: grid;
    grid-template-columns: repeat(9, 1fr);
    grid-template-rows: repeat(9, 1fr);
    width: 100%;
    aspect-ratio: 1 / 1;
    background: var(--color-board);
    border: 2px solid var(--color-board-outside-line);
}

/* マス */
.cell {
    min-width: 0;
    min-height: 0;
    border: 1px solid rgba(0,0,0,0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    cursor: pointer;
}

/* 駒画像 */
.cell img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    pointer-events: none;
}

/* hover */
.cell:hover {
    background: rgba(255,255,255,0.3);
}

/* 選択状態 */
.selected {
    outline: 3px solid red;
}

/* 駒台 */
.captured {
    width: 100%;
    display: block;
    background: var(--color-board);
    border: 2px solid var(--color-board-outside-line);
    border-radius: 8px;
    gap: 6px;
    padding: 6px;
    box-sizing: border-box;
}
.captured.opponent {
    justify-content: flex-start; /* 相手の駒台を左寄せ */
}
.captured.player {
    justify-content: flex-end; /* 自分の駒台を右寄せ */
}

.hand-grid {
    width: calc(100% * 7 / 9);
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

/* 各スロット */
.hand-slot {
    aspect-ratio: 1 / 1;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    cursor: pointer;
}

/* 駒画像 */
.hand-slot img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    pointer-events: none;
}
/* 何もないとき */
.hand-slot.empty {
    background: transparent;
}

.count {
    position: absolute;
    right: 2px;
    bottom: 2px;
    font-size: 12px;
}
