/* ───────────────────────────────────────────────────────────────
   tictactoe.css : ○×ゲーム
   scope: .game-ttt
   ─────────────────────────────────────────────────────────────── */

.game-ttt .board {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 1fr;
    width: var(--board-max);
    max-width: 100%;
    aspect-ratio: 1 / 1;
    gap: 10px;
    padding: 12px;
    background: linear-gradient(135deg, #f3f4f6, #e5e7eb);
    border-radius: var(--r-lg);
    box-shadow:
        var(--sh-md),
        inset 0 1px 2px rgba(255, 255, 255, 0.7);
    align-self: center;
}

.game-ttt .cell {
    background: var(--surface);
    border-radius: var(--r-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: inherit;
    font-weight: 800;
    overflow: hidden;
    user-select: none;
    transition:
        background 0.15s ease,
        transform 0.12s var(--ease-pop),
        box-shadow 0.15s ease;
    box-shadow: var(--sh-sm);
}

.game-ttt .cell.clickable {
    cursor: pointer;
}

.game-ttt .cell.clickable:hover {
    background: #f8fafc;
    transform: translateY(-2px);
    box-shadow: var(--sh-md);
}

.game-ttt .cell.clickable:active {
    transform: scale(0.95);
}

.game-ttt .cell.x {
    color: var(--p1);
}
.game-ttt .cell.o {
    color: var(--p2);
}

.game-ttt .cell .mark {
    display: inline-block;
    font-size: clamp(2.5rem, 16vmin, 5rem);
    line-height: 0.82;
    animation: ttt-mark-appear 0.28s var(--ease-pop);
}

@keyframes ttt-mark-appear {
    0% {
        opacity: 0;
        transform: scale(0.4) rotate(-12deg);
    }
    100% {
        opacity: 1;
        transform: scale(1) rotate(0);
    }
}
