html body{
    margin: 0;
    box-sizing: border-box;
    font-size: 16px;
    color: #333;
    font-family: sans-serif;
    display: flex;
    flex-direction: column;
    background-color: #fefefe;
    /* 印刷時のスタイル */
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
}
/* ボディー */
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh; /* 画面全体の高さ */
  margin: 0;
}
/* ヘッダー要素 */
header{
    background-color: #333;
    color: #eee;
    /* width: 99%; */
    padding-left: 1%;

}
header h1{
    margin: 0;
}
header p{
    margin: 0;
}
header a{
    display: inline-block;
    color: #aff;
}
/* メイン */
main{
      flex: 1; /* コンテンツが少ない時に残りのスペースを埋める */
    margin: 10px auto;
    width: 80%;
}
main h2,main h3,main h4,main p{
    margin: 0;
}
main h2{
    margin-top: 3px;
}
/* フッター */
footer{
    background-color: #333;
    color: #eee;
    /* width: 99%; */
    /* padding-left: 20%; */
    text-align: center;
}
/* .box{
    border: #666 1px solid;
    border-radius: 15px;
    padding: 5px 10px;
} */
/* ～～～メニュー～～～ */
#menu{
    display: flex;
    gap: 1rem;
    justify-content: center;
    background-color: #333;
}
#menu details{
    position: relative;
}
details div{
    display: inline;
    white-space: nowrap;
    position: absolute;
}
details li{
    list-style: none;
    padding: 3px 6px;
    background-color: #555;
}

.no_list{
    list-style: none;
}
#menu summary,#menu a{
    color: #eee;
    font-weight: bold;
}
/* ～～～ハンバーガーボタン～～～ */
#hamburger{
    display: none;
}
/* ～～～グリッド～～～ */
.grid{
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    column-gap: 16px;
    grid-auto-rows: minmax(100px, auto);
}
/* ～～～テーブル～～～ */
table,tr,td,th{
    border: #666 1px solid;
    border-collapse:  collapse;
    padding: 0 5px; 
    max-width: 100%;
}
table{
    width: 100%;
    table-layout: auto;
}
th{
    width: 1px;
    white-space: nowrap; 
}
/* データ共通 */
.title{
    background-color: #333;
    text-align: left;
    font-size: 24px;
    color: #fefefe;
}
/* 魔法(テーブル形式) */
.magic_square{
    width: 24px;
    height: 24px;
    background-color: #fefefe;
    float: left;
    margin: 9px;
}
/* 特定のセルは改行禁止 */
.nowrap{
    white-space: nowrap; 
}
/* ～～～リスト～～～ */
li{
    list-style-position: inside;
}
/* ～～～スマホ対応～～～ */
@media (max-width: 800px) {
    main{
        width: 95%;
    }
    header p,header h1{
        margin:0 70px 0 0;
    }
    /* ～～～～～～ */
    .grid{
       display: block;
    }
    /* ～～～ハンバーガーボタン～～～ */
    #hamburger{
        /* display: block;
        position: absolute;
        top: 10px;
        right: 10px;
        z-index: 1001;
        width: 50px;
        height: 50px;
        font-size: 50px;
        line-height: 50px;
        background-color: #333;
        color: #fefefe;
        border: #fefefe 1px solid; */
        display: flex;
        justify-content: center;
        align-items: center;

        position: absolute;
        top: 10px;
        right: 10px;
        z-index: 1001;

        width: 50px;
        height: 50px;
        font-size: 40px; /* 少し小さめの方が中央に見える */
        background-color: #333;
        color: #fefefe;
        border: #fefefe 1px solid;
    }
    /* ～～～メニュー～～～ */
    .menu{
        display: none;
        position: absolute;
        z-index: 1000;
        width: 100%;
        height: 100vh;
        background-color: #fefefef0;
        padding: 0 0 0 1%;
    }
    #menu{
        flex-direction: column;
        align-items:flex-start;
        height: inherit;
        background-color: transparent;
    }
    #menu summary,#menu a{
        color: #333;
    }
    details{
        position: static;
    }
    details li{
        background-color: transparent;
    }
    details div{
        position: static;
        white-space: normal;
    }
    
}