/* --- 新しいH1のデザイン（左寄せ・隙間最小設定） --- */

H1 {

    display: block;

    max-width: 900px;

    margin: 0 auto 5px;

    padding: 0px 15px 8px;

    text-align: left;

    background-color: #fff;

    line-height: 1.3;

    border-top: 1px solid #eee;

    border-bottom: 2px solid #ffa74f;

}



H1 .main-title {

    display: block;

    font-size: 22px;

    font-weight: bold;

    color: #333;

    letter-spacing: 0.05em;

    margin-bottom: 0px;

}



H1 .sub-title {

    display: block;

    font-size: 16px;

    font-weight: normal;

    color: #666;

    letter-spacing: 0.02em;

}



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

    H1 {

        margin: 0 auto 2px;

        padding: 0px 10px 8px;

    }

    H1 .main-title { font-size: 19px; }

    H1 .sub-title { font-size: 14px; }

}



/* --- 既存CSS --- */

#menu LI A{text-align:center}

#menu{max-width:900px;margin:0 auto}

#menu,#menu li{padding:0}

#soto,H2{color:#000}



@media only screen and (min-width:921px){

    #main,body{background-color:#fff}

    #contents,body{font-size:1pc}

    body{width:100%;margin-top:0;color:#333;-webkit-text-size-adjust:none}

    #main{width:900px;overflow:hidden;margin:0 auto;padding:0;text-align:center;border-right:solid 2px #e5e4e6;border-left:solid 2px #e5e4e6}

    #contents{float:right;margin:0;padding:4px 0 5px;width:40pc;letter-spacing:.05em;text-align:left;line-height:1.5}

}



#contents p{margin:15px 0;padding:0 2px;line-height:1.5;font-size:1pc}



/* ▼ ここから重要（修正済み） */

#menu{width:100%}



/* clearfix追加（崩れ防止） */

#menu:after {

  content: "";

  display: block;

  clear: both;

}



#menu li{

  display:block;

  float:left;

  width:16.666%;

  margin:0;

  font-size:14px;

}

/* ▲ ここまで */



#menu LI A{display:block;padding:6px 3px;background-color:#ffa74f;color:#fff;text-decoration:none;border-right:1px solid #4baacb}

#menu li:last-child a{border:0}

#menu li a:hover{background:#00f}

#toggle{display:none}



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

    #menu li{

        width:33.333%;

        border-bottom:1px solid #4baacb;

    }

}



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

    #menu li,#toggle{width:100%}

    #toggle,#toggle a{position:relative}

    #toggle a:after,#toggle a:before,#toggle:before{display:block;content:"";position:absolute;top:50%;left:10px;width:30px}

    #menu{display:none}

    #toggle{display:block;background:#ffa74f}

    #toggle a{display:block;padding:10px 0;border-bottom:1px solid #4baacb;color:#fff;text-align:center;text-decoration:none}

    #toggle:before{height:30px;margin-top:-15px;background:#fff}

    #toggle a:after,#toggle a:before{height:6px;background:#ffa74f}

    #toggle a:before{margin-top:-9px}

    #toggle a:after{margin-top:3px}

}



#soto{border-style:none}

H2{font-size:1pc;text-decoration:none;color:maroon}

#soto{

  background-color:#fff;

  max-width:600px;

  width:100%;

  border-width:1px;

  padding:5px;

}



body,html{font-family:Hiragino Kaku Gothic ProN,メイリオ,Meiryo,ＭＳ\ ゴシック,sans-serif}



H2.opening{

    line-height:1.5;

    margin:0 0 9pt;

    padding:10px;

    background-color:green;

    text-align:center;

}



p.staff_name{

    font-size:18px;

    margin:0 0 24px;

    font-weight:700;

}



ul.site{

    width:220px;

    margin:0;

    padding:0;

    list-style:none;

    background-color:#fed;

}



li a{display:block;padding:1px 1pc;text-decoration:none;color:#000}

li a.active{color:#fff;background-color:#da3c41;text-align:center}

li a:hover:not(.active){color:#fff;background-color:#1b2538}



#site ul{list-style:none;margin:0;padding:0}

#site li a{

    display:block;

    padding:2px 10px 3px 18px;

    margin:8px 0;

    border-bottom:1px dotted #666;

}



p.top{

    font-size:9pt;

    max-width:900px;

    margin:0 auto;

}



#page-top{

    position:fixed;

    bottom:50px;

    right:20px;

}



#page-top a {

    width: 50px;        /* 文字が入り切るよう少し幅を広げるのがおすすめ */

    height: 40px;       /* 高さを少し調整 */

    display: flex;

    align-items: center;    /* 垂直方向の中央 */

    justify-content: center; /* 水平方向の中央 */

    background: #ffa74f;

    border-radius: 5px;

    color: #000;

    text-decoration: none;

    font-size: 14px;

    font-weight: bold;      /* 少し太くすると見やすくなります */

}



#page-top a span{

    display:inline-block;

    transform: translateY(0px);

}



.box{

    margin:0 auto;

    background:#fff;

    border:#ddd 5px solid;

    border-radius:10px;

}



.head_test{

    margin:0;

    font-size:18px;

    background-color:#c40000;

    color:#fff;

    padding:5px 13px;

    margin-bottom:20px;

    border-radius:30px;

}



/* ▼ 画像最適化（最終仕上げ） */

img {

  max-width: 100%;

  height: auto;

  display: block;

}



/* ロゴ中央 */

td > a > img {

  margin: 0 auto;

}



/* メイン画像中央 */

#mainImage {

  margin: 0 auto;

}



/* サムネイルだけ横並び */

img[onclick] {

  display: inline-block;

  vertical-align: top;

}





#page-top img {

  display: inline-block;

  width: 50px;

  height: auto;

}