﻿.shikaku-page {
    min-height: 100vh;
    position: relative;
    padding: 8px 12px 28px;
}

/*    .shikaku-page::before {
        content: "";
        position: fixed;
        inset: 0;
        background: rgba(255, 255, 255, 0.72);
        pointer-events: none;
        z-index: 0;
    }*/

.shikaku-wrapper {
    position: relative;
    z-index: 1;
    margin: 0 auto;
}

.shikaku-wrapper--compact {
    width: min(600px, 96vw);
    max-width: 600px;
}

.shikaku-topbar {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 10px;
    background: rgba(0, 40, 70, 0.1);

    padding-left: 10px;
    padding-right: 10px;
}

.shikaku-title {
    margin: 0;
    line-height: 1.2;
    text-align: left;
    flex: 0 0 auto;
}

.shikaku-stats {
    flex: 1 1 auto;
    margin: 0;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0);
    border-radius: 6px;
    text-align: right;
    font-size: 1rem;
    line-height: 1.45;
    min-height: 0;
    overflow-wrap: break-word;
}

.shikaku-board-section {
    width: 100%;
    display: flex;
    justify-content: center;
}

.shikaku-grid-container {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    margin: 0;
}

#gridCanvas {
    display: block;
    width: 100%;
    max-width: 600px;
    border: 3px solid darkblue;
    background: white;
    touch-action: none;
    box-sizing: border-box;
}

.shikaku-controls {
    width: 100%;
    margin-top: 12px;
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

    .shikaku-controls button {
        padding: 10px 16px;
        background: #0044cc;
        color: white;
        border: none;
        border-radius: 6px;
        cursor: pointer;
        font-size: 1rem;
        min-width: 160px;
    }

        .shikaku-controls button:hover {
            background: #0033aa;
        }

        .shikaku-controls button:disabled {
            background: #8fa7d9;
            cursor: default;
        }

.shikaku-message {
    width: 100%;
    margin-top: 12px;
    min-height: 46px;
    padding: 10px 12px;
    border-radius: 6px;
    background: #fff4f4;
    color: #b00020;
    font-weight: 600;
    line-height: 1.4;
    text-align: center;
    transition: transform 0.15s ease;
    box-sizing: border-box;
}

@media (max-width: 760px) {
    .shikaku-page {
        padding: 6px 8px 24px;
    }

    .shikaku-wrapper--compact {
        width: 96vw;
        max-width: 96vw;
    }

    .shikaku-topbar {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        margin-bottom: 8px;
    }

    .shikaku-title {
        text-align: center;
    }

    .shikaku-stats {
        text-align: center;
        font-size: 0.96rem;
    }

    #gridCanvas {
        max-width: 96vw;
    }

    .shikaku-controls button {
        flex: 1 1 160px;
        min-width: 140px;
    }
}
