/* 全体の画面設定 */
body {
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    width:100vw;
    background-color: #f5f5f5;
    font-family: Arial, sans-serif, system-ui ;
}


.container {
    width: 100vw;
    height:100vh;
    /*height: calc(100vw * 9 / 16);  16:9の比率に調整 */
    display: flex;
    padding:0;
    margin:0;
}

/* 左側の「調理中」エリア */
.cookinglist {
    flex: 1;
    width:50vw;
    background-color: #ffffff;
    border-right: 2px solid #000000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0px;
    box-sizing: border-box;
}

/* 右側の「完成」エリア */
.completedlist {
    flex: 1;
    width:50vw;
    background-color: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0px;
}

.cookinglist h2{
    margin: 0;
    padding:0;
    display: flex;
    justify-content: center;
    align-items: center;
    width:50vw;
    height:10vh;
    font-size: 7vh;
    font-weight:bold;
    color: #ffffff;
    background-color: #ff0000;
}

.completedlist h2{
    margin: 0;
    padding:0;
    display: flex;
    justify-content: center;
    align-items: center;
    width:50vw;
    height:10vh;
    font-size: 7vh;
    font-weight:bold;
    color: #ffffff;
    background-color: #006000;
}


/*画面が横方向の場合---------------------------------------*/
@media screen and (orientation: landscape){
    /* 縦方向のリストが埋まったら新しい列に移動 */
    .list {
        
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(14vw, 14vw));
        grid-template-rows: repeat(auto-fill, minmax(8vh, 8vh)); 
        grid-auto-flow: row;
        gap: 3vh 1.5vw;
        width: 50vw;
        height: 100%;
        overflow-y: auto;
        justify-items: center;
        box-sizing: border-box;
        padding:2vw;
        scrollbar-width: none; /* Firefoxでスクロールバーを非表示 */
        -ms-overflow-style: none; /* IE/Edgeでスクロールバーを非表示 */
    }
    .list::-webkit-scrollbar{
        display:none;
    }


    .cooking{
        height:8vh;
        width:13vw;
        font-size: min(6.5vh, 7vw); /* タイルの高さ(8vh)に合わせる。幅が足りない画面では幅に合わせる */
        font-weight:bold;
        color: #ff0000;
        box-shadow: 0px 10px 20px rgba(0, 0, 0, 0.15), 0px 4px 6px rgba(0, 0, 0, 0.1);
        display: flex;
        justify-content: center;
        align-items: center;
        border: 6px solid #bbbbbb;
        border-radius: 15px;
        background-color: #ffffff;
    }

    .completed {
        height:8vh;
        width:13vw;
        font-size: min(6.5vh, 7vw); /* タイルの高さ(8vh)に合わせる。幅が足りない画面では幅に合わせる */
        font-weight:bold;
        color: #006000;
        box-shadow: 0px 10px 20px rgba(0, 0, 0, 0.15), 0px 4px 6px rgba(0, 0, 0, 0.1);
        display: flex;
        justify-content: center;
        align-items: center;
        border: 6px solid #bbbbbb;
        border-radius: 15px;
        background-color: #ffffff;
    }
}
/*画面が縦方向の場合---------------------------------------*/
@media screen and (orientation: portrait) {
    .list {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(20vw, 20vw));
        grid-template-rows: repeat(auto-fill, minmax(8vh, 4vh)); 
        grid-auto-flow: row;
        gap: 3vh 5vw;
        width: 100%;
        height: 100%;
        overflow-x: auto;
        justify-items: center;
        box-sizing: border-box;
        padding:2vw;
    }


    .cooking{
        height:8vh;
        width:19vw;
        font-size: min(5vh, 8vw); /* タイルの高さ(8vh)に合わせる。幅が足りない画面では幅に合わせる */
        font-weight:bold;
        color: #ff0000;
        box-shadow: 0px 10px 20px rgba(0, 0, 0, 0.15), 0px 4px 6px rgba(0, 0, 0, 0.1);
        display: flex;
        justify-content: center;
        align-items: center;
        border: 6px solid #8f8f8f;
        border-radius: 15px;
        background-color: #ffffff;
    }

    .completed {
        height:8vh;
        width:19vw;
        font-size: min(5vh, 8vw); /* タイルの高さ(8vh)に合わせる。幅が足りない画面では幅に合わせる */
        font-weight:bold;
        color: #006000;
        box-shadow: 0px 10px 20px rgba(0, 0, 0, 0.15), 0px 4px 6px rgba(0, 0, 0, 0.1);
        display: flex;
        justify-content: center;
        align-items: center;
        border: 6px solid #8f8f8f;
        border-radius: 15px;
        background-color: #ffffff;
    }
}

/* 表示を更新できていないときだけ、画面の下に控えめに出す */
.stale-notice {
    display: none;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 2vh;
    margin: 0 auto;
    width: fit-content;
    z-index: 10;
    max-width: 90vw;
    box-sizing: border-box;
    padding: 0.8vh 2vw;
    border-radius: 999px;
    background-color: rgba(0, 0, 0, 0.75);
    color: #ffffff;
    font-size: max(14px, 2.4vh);
    font-weight: bold;
    text-align: center;
}
.stale-notice.visible {
    display: block;
}
.stale-notice span {
    display: inline-block;
}
