.board {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    max-width: 360px;
    margin: 0 auto 8px;
}

.board form {
    display: contents;
}

.cell {
    aspect-ratio: 1;
    border: 1px solid var(--card-border);
    border-radius: 18px;
    background: rgba(255, 255, 255, .06);
    cursor: pointer;
    padding: 14%;
    display: grid;
    place-items: center;
    transition: background .2s, transform .2s var(--ease), box-shadow .2s;
}

.cell:not(:disabled):hover {
    background: rgba(124, 92, 255, .22);
    transform: translateY(-3px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, .3);
}

.cell:disabled {
    cursor: default;
}

.cell svg {
    width: 100%;
    height: 100%;
    overflow: visible;
}

.cell .mark {
    fill: none;
    stroke-width: 9;
    stroke-linecap: round;
    stroke-dasharray: 100;
    stroke-dashoffset: 0;
}

.cell.x .mark {
    stroke: var(--x);
    filter: drop-shadow(0 0 8px rgba(34, 211, 238, .7));
}

.cell.o .mark {
    stroke: var(--o);
    filter: drop-shadow(0 0 8px rgba(255, 122, 89, .7));
}

.cell.fresh .mark {
    animation: draw .45s ease-out both;
}

.cell.fresh.late .mark {
    animation-delay: .45s;
}

.cell.fresh.late svg {
    animation: appear 0s .45s backwards;
}

.cell.x.fresh .mark:nth-child(2) {
    animation-delay: .2s;
}

.cell.x.fresh.late .mark:nth-child(2) {
    animation-delay: .65s;
}

.cell.win {
    background: rgba(52, 211, 153, .22);
    border-color: var(--good);
    animation: winPulse 1s ease-in-out infinite alternate;
}

@keyframes draw {
    from {
        stroke-dashoffset: 100;
    }

    to {
        stroke-dashoffset: 0;
    }
}

@keyframes appear {
    from {
        opacity: 0;
    }

    to {
        opacity: 0;
    }
}

@keyframes winPulse {
    from {
        box-shadow: 0 0 0 0 rgba(52, 211, 153, .5);
    }

    to {
        box-shadow: 0 0 26px 4px rgba(52, 211, 153, .6);
    }
}

.actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 8px;
}

.actions form {
    margin: 0;
}
