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

.mini-board {
    position: relative;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3px;
    border: 2px solid #adb5bd;
    padding: 5px;
    aspect-ratio: 1;
    background: #f8f9fa;
    border-radius: 6px;
    transition: border-color 120ms ease, box-shadow 120ms ease, background-color 120ms ease;
}

.mini-board.active {
    border-color: #0d6efd;
    background: #e7f1ff;
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.15);
}

.mini-board.decided .cell {
    opacity: 0.55;
    cursor: default;
}

.mini-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(48px, 12vw, 96px);
    font-weight: 800;
    pointer-events: none;
    user-select: none;
}

.mini-board.won-x .mini-overlay { color: rgba(13, 110, 253, 0.5); }
.mini-board.won-o .mini-overlay { color: rgba(220, 53, 69, 0.5); }
.mini-board.drawn .mini-overlay { color: rgba(108, 117, 125, 0.5); }

.cell {
    aspect-ratio: 1;
    border: 1px solid #ced4da;
    background: white;
    border-radius: 3px;
    font-size: clamp(14px, 3.5vw, 22px);
    font-weight: 700;
    cursor: pointer;
    padding: 0;
    transition: background-color 100ms ease, border-color 100ms ease;
}

.cell:hover:not(:disabled) {
    background: #f1f3f5;
    border-color: #0d6efd;
}

.cell:disabled { cursor: not-allowed; }
.cell.x { color: #0d6efd; }
.cell.o { color: #dc3545; }

.player-side-x { color: #0d6efd; font-weight: 700; }
.player-side-o { color: #dc3545; font-weight: 700; }

@keyframes hypertoe-cell-flash {
    0% { background-color: #fff3cd; }
    100% { background-color: white; }
}
.cell.flash { animation: hypertoe-cell-flash 600ms ease-out; }

.game-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1050;
}

.overlay-content {
    background: white;
    padding: 32px 40px;
    border-radius: 8px;
    text-align: center;
    max-width: 90vw;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
}

.overlay-content h3 { margin-bottom: 0.5rem; }

.turn-timer {
    text-align: center;
    font-size: 0.75rem;
    color: #adb5bd;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.05em;
    min-height: 1.1em;
}

@media (max-width: 560px) {
    .hypertoe-board { max-width: 100%; gap: 6px; }
    .mini-board { padding: 3px; gap: 2px; }
    .mini-overlay { font-size: clamp(32px, 14vw, 72px); }
}
