.pentago-page .omok-topbar-copy h1 {
    letter-spacing: 0;
}

.pentago-board-pane {
    gap: 14px;
}

.pentago-board-wrap {
    position: relative;
    width: min(72vh, 620px);
    max-width: 100%;
    aspect-ratio: 1;
}

.pentago-board {
    width: 100%;
    height: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: repeat(2, minmax(0, 1fr));
    gap: 10px;
    padding: clamp(12px, 2vw, 20px);
    border-radius: 30px;
    background:
        radial-gradient(circle at 28% 20%, rgba(255, 255, 255, 0.42), transparent 34%),
        linear-gradient(135deg, #f7d68d, #c88a3a);
    box-shadow:
        inset 0 0 0 8px rgba(95, 55, 22, 0.58),
        inset 0 0 0 16px rgba(255, 239, 184, 0.26),
        0 22px 46px rgba(42, 28, 17, 0.32);
}

.pentago-quadrant {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-rows: repeat(3, minmax(0, 1fr));
    gap: 6px;
    min-width: 0;
    min-height: 0;
    transform-origin: center;
    will-change: transform;
}

.pentago-quadrant.is-rotating-cw {
    z-index: 3;
    animation: pentago-rotate-cw 720ms cubic-bezier(0.2, 0.9, 0.24, 1) both;
}

.pentago-quadrant.is-rotating-ccw {
    z-index: 3;
    animation: pentago-rotate-ccw 720ms cubic-bezier(0.2, 0.9, 0.24, 1) both;
}

@keyframes pentago-rotate-cw {
    0% {
        transform: rotate(-90deg) scale(0.98);
        filter: drop-shadow(0 16px 20px rgba(15, 23, 42, 0.28));
    }
    72% {
        transform: rotate(5deg) scale(1.01);
    }
    100% {
        transform: rotate(0deg) scale(1);
        filter: none;
    }
}

@keyframes pentago-rotate-ccw {
    0% {
        transform: rotate(90deg) scale(0.98);
        filter: drop-shadow(0 16px 20px rgba(15, 23, 42, 0.28));
    }
    72% {
        transform: rotate(-5deg) scale(1.01);
    }
    100% {
        transform: rotate(0deg) scale(1);
        filter: none;
    }
}

.pentago-cell {
    position: relative;
    display: grid;
    place-items: center;
    min-width: 0;
    min-height: 0;
    border: 0;
    border-radius: 18px;
    background:
        radial-gradient(circle at 50% 50%, rgba(90, 48, 18, 0.2) 0 14%, transparent 15%),
        rgba(255, 236, 182, 0.54);
    box-shadow: inset 0 0 0 1px rgba(106, 71, 31, 0.24);
    cursor: pointer;
}

.pentago-cell:disabled {
    cursor: default;
}

.pentago-cell:not(:disabled):hover,
.pentago-cell:not(:disabled):focus-visible {
    outline: 3px solid rgba(59, 130, 246, 0.55);
    outline-offset: -3px;
}

.pentago-cell .stone {
    width: 78%;
    aspect-ratio: 1;
    border-radius: 50%;
    transform: scale(0);
    transition: transform 0.16s ease;
}

.pentago-cell.black .stone,
.pentago-cell.white .stone,
.pentago-cell.preview-black .stone,
.pentago-cell.preview-white .stone {
    transform: scale(1);
}

.pentago-cell.black .stone,
.pentago-cell.preview-black .stone {
    background:
        radial-gradient(circle at 34% 28%, rgba(255, 255, 255, 0.28), transparent 22%),
        linear-gradient(135deg, #1f2937, #020617);
    box-shadow: inset -8px -10px 14px rgba(0, 0, 0, 0.28), 0 5px 10px rgba(15, 23, 42, 0.35);
}

.pentago-cell.white .stone,
.pentago-cell.preview-white .stone {
    background:
        radial-gradient(circle at 34% 28%, rgba(255, 255, 255, 0.92), transparent 24%),
        linear-gradient(135deg, #ffffff, #dbeafe);
    box-shadow: inset -8px -10px 14px rgba(148, 163, 184, 0.28), 0 5px 10px rgba(15, 23, 42, 0.24);
}

.pentago-cell.preview-black .stone,
.pentago-cell.preview-white .stone {
    opacity: 0.55;
    outline: 4px solid rgba(37, 99, 235, 0.42);
}

.pentago-cell.last-move::after {
    content: "";
    position: absolute;
    inset: 14%;
    border: 3px solid rgba(34, 197, 94, 0.82);
    border-radius: 999px;
    pointer-events: none;
}

.pentago-rotation-panel {
    position: absolute;
    inset: 0;
    z-index: 8;
    pointer-events: none;
}

.pentago-rotate-hint {
    position: absolute;
    left: 50%;
    bottom: 18px;
    transform: translateX(-50%);
    width: min(88%, 360px);
    padding: 10px 14px;
    border: 1px solid rgba(59, 130, 246, 0.22);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.72);
    color: #dbeafe;
    font-size: 0.86rem;
    font-weight: 800;
    text-align: center;
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.24);
}

.pentago-rotation-card {
    position: absolute;
    z-index: 9;
    width: clamp(86px, 17%, 116px);
    transform: translate(-50%, -50%);
    border: 1px solid rgba(148, 163, 184, 0.26);
    border-radius: 16px;
    padding: 8px;
    background: rgba(15, 23, 42, 0.74);
    color: #e5f0ff;
    pointer-events: auto;
    box-shadow: 0 16px 30px rgba(15, 23, 42, 0.3);
    backdrop-filter: blur(5px);
}

.pentago-rotation-card[data-quadrant="0"] {
    left: 25%;
    top: 25%;
}

.pentago-rotation-card[data-quadrant="1"] {
    left: 75%;
    top: 25%;
}

.pentago-rotation-card[data-quadrant="2"] {
    left: 25%;
    top: 75%;
}

.pentago-rotation-card[data-quadrant="3"] {
    left: 75%;
    top: 75%;
}

.pentago-rotation-card strong {
    display: block;
    margin-bottom: 6px;
    font-size: 0.78rem;
    text-align: center;
}

.pentago-rotation-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}

.pentago-rotation-actions button {
    min-height: 34px;
    border: 0;
    border-radius: 11px;
    background: rgba(59, 130, 246, 0.92);
    color: #ffffff;
    font-weight: 900;
    font-size: 1rem;
    cursor: pointer;
}

.pentago-rotation-actions button:disabled {
    cursor: not-allowed;
    opacity: 0.45;
}

@media (max-width: 760px) {
    .pentago-board-wrap {
        width: min(92vw, 560px);
    }

    .pentago-board {
        gap: 4px;
        border-radius: 22px;
    }

    .pentago-quadrant {
        gap: 4px;
    }

    .pentago-cell {
        border-radius: 12px;
    }

    .pentago-rotation-card {
        width: clamp(78px, 24%, 100px);
        padding: 6px;
    }

    .pentago-rotation-actions button {
        min-height: 30px;
    }

    .pentago-rotate-hint {
        bottom: 12px;
        font-size: 0.78rem;
    }
}
