#area {
    margin-top: 10vh;
    padding-bottom: 5vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2vh;
    width: 100%;

    height: 75%;

    overflow-y: auto;
}

.grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    border: 2px solid #444;
    border-radius: 8px;
    height: fit-content;
    width: calc(50vw + 20vh);
    max-width: 75vw;

    & :nth-child(even) {
        opacity: 0.95;
    }
}

.cell {
    height: 100%;
    aspect-ratio: 1;
    background-color: #222;
    border: 1px solid #333;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;

    &:hover {
        border-color: silver;
    }

    &.on {
        background-color: whitesmoke;
        box-shadow: inset 0 0 10px rgba(255, 255, 255, 0.5);
    }

    &.answer {
        position: relative;

        &::after {
            content: "〇";
            color: red;
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
        }
    }
}

#mode-buttons {
    display: flex;
    flex-direction: column;
    gap: 2vh;

    & button {
        width: 35vh;

        font-size: 4vh;
        font-weight: bold;
    }
}

#resolver {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2vh;

    & button {
        font-weight: bold;
        font-size: 4vh;
    }

    & #solution-no {
        text-align: center;
        font-size: 4vh;
    }
}

.setting {
    bottom: 0;
    position: absolute;
    display: flex;
    align-items: center;
    gap: 2vh;
    width: 100vw;
    flex-direction: column;

    & input,
    & button {
        font-size: 3vh;
        padding: 0.5vh;
        border: 1px solid #555;
        border-radius: 4px;
        background-color: #222;
        color: #f0f0f0;
        transition: background-color 0.1s, color 0.1s;

        &:focus,
        &:hover {
            background-color: #333;
            color: #fff;
            outline: none;
        }
    }

    & .inputs {
        display: flex;
        width: 100vw;
        justify-content: center;

        & input {
            width: 50%;
            max-width: 32vh;
        }
    }

    & .buttons {
        display: flex;

        & button {
            font-size: 2.3vh;
        }
    }
}

#clicked {
    display: none;
    font-size: 3vh;
    width: 80vw;
    height: 12vh;
    overflow: auto;

    /* min-height: 5vh; */
}

@media (min-width: 767px) {
    #area {
        height: 80vh;
    }

    .grid {
        width: 35%;
        aspect-ratio: 1;
    }

    .setting {
        flex-direction: column;
        width: 100%;
        justify-content: center;

        & .buttons {
            width: 100%;
            justify-content: center;

            & button {
                font-size: 3vh;
            }
        }

        & input {
            font-size: 4vh;
            padding: 0.5vh 1vh;
        }
    }

    #mode,
    #resolve {
        font-size: 8vh;
    }

    #clicked {
        font-size: 5vh;
        width: 16vh;
        height: 50vh;
    }
}
