@media screen and (min-width:768px){
    #root{
        display: grid;
        grid-template-columns: 302px 1fr;
        min-height: 100vh;
    }

    #root>#core{
        height: 100vh;
    }

    #root>#menu{
        display: grid;
        grid-template-rows: 60px 1fr;
    }

    #root>#core>#source{
        min-height: calc( 100vh - 60px);
    }

    #root>#core>footer{
        padding: 0 10px 0 10px;
        display: flex;
        line-height: 50px;
    }

    #top{
        display: none;
    }
}

@media screen and (max-width:767px){

    body{
        max-height: 100vh;
        overflow: hidden;
    }

    #top{
        display: grid;
        /* position: fixed; */
        width: 100vw;
        grid-template-columns: 40px 1fr;
    }

    #root{
        display: block;
        max-height: calc(100vh - 40px);
        height: calc(var(--vh, 1vh) * 100 - 40px);
    }

    #root>#core{
        height: calc(var(--vh, 1vh) * 100 - 40px);
    }

    #root>#menu{
        display: none;
        width: 300px;
        display: none;
        position: absolute;
        bottom: 0px;
        height: 100vh;
        height: calc(var(--vh, 1vh) * 100);
        /* padding-bottom: 40px; */
        overflow: auto;
    }

    #root>#core>#source{
        /* margin-top: 40px; */
        /* height: calc(100vh - 40px); */
        /* height: calc( 100% -px); */
        /* overflow: auto; */
        /* height: calc(var(--vh, 1vh) * 100); */
        min-height: calc( 100% - 75px); 
    }

    #root>#core>footer{
        /* display: inline-block; */
        /* flex-direction: column; */
        display: block;
        line-height: normal;
        padding: 10px 10px 5px 10px;
    }

    #title{
        height: 60px;
    }
}

body{
    margin: 0;
    background-color: azure;
}

#top {
    height: 40px;
    background-color: greenyellow;
}

#top>#top_title {
    font-size: 20px;
    font-weight: 600;
    line-height: 40px;
}

#top>#menuOpen {
    width: 40px;
    text-align: center;
    line-height: 40px;
    text-align: center;
    background-color: aqua;
}

#top>#menuOpen:hover{
    background-color: rgb(81, 173, 173);
}

#background{
    display: none;
    position: absolute;
    background-color: rgba(0, 0, 0, 0.63);
    width: 100%;
    height: 100%;
    
}



#root>#menu{
    grid-template-rows: 60px 1fr;
    background-color: aqua;
    border-right: 2px black solid;
}

#root>#menu>#title{
    text-align: center;
    font-weight: bold;
    font-size: 30px;
    line-height: 60px;
    cursor: pointer;
}

#root>#menu>#list{
    background-color: greenyellow;
    border-top: 1px solid black;
    /* min-height: calc( 100vh - 60px); */
}

#root>#menu>#list .item {
    /* border-top: 1px solid black; */
    border-bottom: 1px solid black;
    cursor:pointer;
    padding-left: 5px;
    /* background-color: aqua  ; */
}

#root>#menu>#list .item:hover {
    background-color: aquamarine;
}

#root>#menu>#list>.root {
    border-top: 1px black solid;
    border-bottom: 1px black solid;
}


#root>#menu>#list h3{
    margin: 0;
    line-break: auto;
}


#root>#menu>#list>.root>h3 {
    border-bottom: 1px black solid;
    min-height: 35px;
    line-height: 35px;
    padding-left: 5px;

    background-color: rgb(66, 229, 82);
    cursor:pointer;
}

#root>#menu>#list>.root>h3:hover{
    background-color: rgb(60, 169, 71);
}

/* #root>#menu>#darkmode {
    background-color: rgb(51, 51, 51);
    color: white;
    font-size: 30px;
    font-weight: bold;
    text-align: center;
    line-height: 50px;
} */

#root>#core{
    /* background-color: beige; */

    overflow-y: auto;
}

#root>#core>#source{
    padding: 5px 10px 5px 10px;

    overflow-y: auto;
}

#root>#core>footer {
    background-color: rgb(180, 180, 180);
    min-height: 50px;
    justify-content: space-between;
    overscroll-behavior: contain;
    
}

#root>#core>footer a{
    text-decoration: none;
    color: rgb(54, 10, 247);
}

#root>#core>footer a:hover {
    color: rgb(38, 23, 105);
}

iframe{
    border: 0;
    margin: 5px 0 5px 0;
}

#root>#core img{
    max-width: 100%;
    margin: 5px 0 5px 0;
}

@media (prefers-color-scheme: dark) {
    body {
        background-color: rgb(36, 36, 36);
    }

    #root>#menu {
        /* background-color: rgb(59, 104, 104); */
        border-right: 2px black solid;
        /* color: white; */
    }

    #root>#menu>#list{
        background-color: rgb(118, 146, 77);
        border-top: 1px solid black;
    }

    #root>#menu>#list .item {
        /* border-top: 1px solid bla */
        border-bottom: 1px solid black;
        color: rgb(248, 248, 248);
        /* color: rgb(44, 44, 44) */
    }

    #root>#menu>#list .item:hover {
        background-color: rgb(105, 177, 153);
    }

    #core>#source {
        
        color: white;
        
    }

    #root>#core>footer {
        background-color: rgb(92, 92, 92);
        color: white;
    }

    #root>#core>footer a {
        color: rgb(53, 235, 235);
    }

    #root>#core>footer a:hover {
        color: rgb(25, 163, 163);
    }

    /* #root>#core>footer a:focus {
        color: rgb(65, 160, 160);
    } */
}

