* {
    box-sizing: border-box;
    margin: 0;
    font-family: 'Yusei Magic', sans-serif;
}

body {
    font-family: 'Arial', sans-serif;
    background-color: #e5e7e9;
    color: #3a3a3a;
    display: grid;
    overflow-y: hidden;
    grid-template-rows: 70px 1fr 70px;
    grid-template-columns: 200px 1fr;
    grid-template-areas:
        "header header"
        "sidebar main"
        "footer footer";
    margin: 0;
    padding: 0;
}

header {
    grid-area: header;
    display: flex;
    align-items: center;
    background-color: #7ba9e0;
    padding: 10px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.sidebar {
    grid-area: sidebar;
    background-color: #555;
    padding: 10px 0;
    position: sticky;
    top: 0;
    z-index: 99;
}

.hamburger-menu {
    display: none;
}

footer {
    grid-area: footer;
    display: flex;
    justify-content: flex-end;
    background-color: #7ba9e0;
    padding: 10px;
    position: sticky;
    bottom: 0;
    z-index: 100;
}

header img,
footer img {
    width: 50px;
    height: auto;
    margin-right: 10px;
}

header p,
footer p {
    margin: 0;
    padding: 0;
    font-size: 24px;
}

.header-link,
.footer-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: inherit;
}

.header-button-link {
    text-decoration: none;
    margin-left: auto;
    padding: 10px 20px;
    background-color: #7ba9e0;
    color: white;
    border: none;
    transition: background-color 0.3s;
    margin-right: 8vh;
}

.login {
    margin-left: auto;
}

.header-ex {
    margin-left: 1rem;
}

.header-button {
    background-color: #7ba9e0;
    color: white;
    cursor: pointer;
    padding: 1.2%;
    border: none;
    border-radius: 4px;
    transition: background-color 0.3s;
    font-size: large;
}

.header-button:hover {
    background-color: #0056b3;
}

.sidebar button {
    color: white;
    background-color: #777;
    padding: 10px;
    border: none;
    width: 100%;
    cursor: pointer;
    transition: background-color 0.3s;
    margin-top: 4%;
}

.sidebar button:hover {
    background-color: #5c8ac5;
}

.main-cont {
    text-align: center;
    align-items: center;
    height: calc(100vh - 70px - 70px);
    grid-area: main;
    overflow-y: scroll;
}

/* これ付けたら縦書きになるよ
#text_contents {
    margin: auto;
    writing-mode: vertical-rl;
    text-orientation: upright;
} */

@media screen and (max-width: 750px) {
    body {
        display: grid;
        grid-template-rows: 50px 1fr 50px;
        grid-template-columns: 1fr;
        grid-template-areas:
            "header"
            "main"
            "footer";
    }

    .header-ex {
        margin-left: 1%;
    }

    .main-cont {
        height: calc(100svh - 50px - 50px);
    }

    .sidebar {
        display: none;
    }

    header {
        grid-area: header;
        width: 100%;
        position: sticky;
        top: 0;
        z-index: 100;
    }

    footer {
        grid-area: footer;
        width: 100%;
        align-items: center;
        position: sticky;
        bottom: 0;
        z-index: 100;
    }

    header img {
        width: 5vh;
    }

    footer img {
        width: 6vh;
    }

    header img,
    footer img {
        margin-right: 0vh;
    }

    header p,
    footer p {
        font-size: medium;
    }

    .hamburger-menu {
        position: fixed;
        top: 65px;
        left: 0;
        width: 200px;
        z-index: 1;
        display: block;
    }

    .menu-icon {
        cursor: pointer;
        display: inline-block;
        padding: 5px;
        position: absolute;
        z-index: 2;
        top: -20px;
    }

    .bar {
        background-color: #333;
        display: block;
        height: 3px;
        margin: 5px auto;
        width: 25px;
    }

    .menu {
        background-color: rgba(85, 85, 85, 0.7);
        flex-direction: column;
        gap: 15px;
        height: 0;
        overflow: hidden;
        position: absolute;
        top: 0;
        transition: height 0.3s ease;
        width: 120px;
        z-index: 1;
    }

    .menu a {
        color: white;
        display: block;
        padding: 10px;
        text-decoration: none;
    }

    #menu-toggle:checked+.menu-icon+.menu {
        height: auto;
        padding: 10px 0;
    }

    #menu-toggle {
        display: none;
    }

    a {
        width: fit-content;
        height: fit-content;
    }
}