/* 2026-11-23: header/footer responsive layout corrections */
#header { box-sizing:border-box; height:auto !important; min-height:0 !important; display:flow-root; padding-bottom:16px; }
#header .logo {height:auto;}
#header .tel {box-sizing:border-box; overflow-wrap:anywhere;}
#header .contents, #header .contents02, #header .contents02-m {box-sizing:border-box;}
#header .contents02 {float:none;clear:both; margin-left:auto;margin-right:auto; padding:6px 12px; background-size:100% 100%; line-height:1.9; height:auto; min-height:0;}
#header .contents02-midashi {display:none;}
#header .contents02 a, .footer-contents .contents02 a {display:inline-block; margin-right:9px; white-space:nowrap;}
.footer-contents {height:auto !important; min-height:0; clear:both; display:flow-root; box-sizing:border-box; padding:16px 0;}
.footer-contents .contents {float:none; clear:both; margin-left:auto;margin-right:auto;}
.footer-contents .contents02 {float:none;clear:both; box-sizing:border-box; height:auto; min-height:0; margin-left:auto;margin-right:auto; padding:8px 12px; line-height:1.9; background-size:100% 100%;}
.footer-contents .contents02-midashi {display:none;}
#footer, #footer02 {height:auto !important; min-height:0; margin-top:0 !important; clear:both; float:none; padding:18px 0 12px; box-sizing:border-box;}
#footer .footer-inner, #footer02 .footer-inner {height:auto;min-height:0;display:flex;align-items:center;justify-content:space-between;gap:16px;box-sizing:border-box;padding:0 12px;}
#footer .logo02, #footer02 .logo02 {float:none;height:auto;max-width:42%;}
#footer .address, #footer02 .address {float:none;margin:0;max-width:58%;width:auto;overflow-wrap:anywhere;}
#footer .copyright, #footer02 center {display:block;text-align:center;color:#fff;font-size:13px;padding:12px 8px 0;}
#main02 {max-width:100%;box-sizing:border-box;display:flow-root;}
#main02 iframe {max-width:100%;}
@media (min-width:641px) {
 #header {width:min(1200px,96%);}
 #header .logo {max-width:52%;}
 #header .tel {float:right;margin-left:0;max-width:45%;}
 #header .contents, .footer-contents .contents {display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:5px;width:min(1000px,100%);height:auto;float:none;clear:both;margin:16px auto 8px;}
 #header .contents > div,.footer-contents .contents > div {float:none;margin:0;width:auto;min-width:0;}
 #header .contents02,.footer-contents .contents02 {width:min(1000px,100%);}
 #main02 {width:min(1000px,96%);}
 #footer .footer-inner,#footer02 .footer-inner {width:min(1000px,96%);}
}
@media (max-width:640px) {
 #header {width:100%;}
 #header .tel {float:none;margin:10px auto;max-width:95%;}
 #header .btn-m,.footer-contents .btn-m {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px;clear:both;width:90%;margin:12px auto;}
 #header .btn-m > div,.footer-contents .btn-m > div {float:none;width:auto;margin:0;}
 #header .contents02-m,.footer-contents .contents02-m {clear:both;margin:12px auto;padding:8px 0;width:90%;line-height:1.9;}
 #footer .footer-inner,#footer02 .footer-inner {width:90%;flex-direction:column;gap:10px;}
 #footer .logo02,#footer02 .logo02 {max-width:75%;width:75%;}
 #footer .address,#footer02 .address {max-width:100%;width:100%;text-align:center;}
 #main02 {width:100%;}
}

/* main.html: 区切り線を各セクションの直下に安定して配置 */
#main02 > div[id] {
  height: auto !important;
  min-height: 0;
  display: flow-root; /* 内部のfloatを包含 */
  box-sizing: border-box;
}
#main02 > hr {
  display: block;
  clear: both;
  float: none;
  box-sizing: border-box;
  width: min(100%, 1000px);
  height: 0;
  margin: 34px auto 0;
  padding: 0;
  border: 0;
  border-top: 2px solid #333;
}
/* セクション内部の点線は元の装飾を維持 */
#main02 div hr { box-sizing: border-box; clear: both; }
@media (max-width:640px) {
  #main02 > hr { width: 90%; margin-top: 26px; }
}

/* 2026-11-23: corrected section hierarchy and horizontal separators */
#main02 { display: flow-root; }
#main02 > div[id] { clear: both; display: flow-root; height: auto !important; }
#main02 > hr:not([style]) {
  display: block; clear: both; width: 100%; max-width: 100%;
  margin: 30px auto 0; border: 0; border-top: 2px solid #333; height: 0;
}
#main02 > div[id] hr[style] { float: none; clear: both; max-width: 100%; }
@media (max-width:640px) { #main02 > hr:not([style]) { width: 90%; } }
