/* Shared safeguards; retain the original desktop layout. */
html { -webkit-text-size-adjust: 100%; }
html, body { height: auto; min-height: 100%; overflow: visible; }
#page, #content, #sidebar, #footer { height: auto; min-width: 0; }
#content .two-columns { display: flow-root; }
/* A real white panel replaces the fixed-size white patch in the old image. */
#logo { background: none; }
#logo h1, #logo p { box-sizing: border-box; width: 320px; max-width: 100%; background: #fff; overflow-wrap: anywhere; }
#logo h1 { margin: 20px 0 0 10px; padding: 20px 16px 6px; font-size: 22px; line-height: 1.35; }
#logo p { margin: 0 0 0 10px; padding: 0 16px 20px; font-size: 14px; line-height: 1.5; }
img { max-width: 100%; height: auto; }
iframe { max-width: 100%; }
a:focus-visible, [tabindex]:focus-visible { outline: 3px solid #0082e6; outline-offset: 3px; }
.table-scroll { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table-scroll table { width: 100%; }
.table-scroll-hint { display: none; }

@media (max-width: 1024px) {
  *, *::before, *::after { box-sizing: border-box; }
  html, body { height: auto; }
  body { margin: 0; background: #fff; font-size: 16px; line-height: 1.65; }
  #header, #menu, #page, #footer { width: 100%; max-width: 778px; height: auto; margin: 0 auto; }
  #header { display: flex; flex-wrap: wrap; align-items: center; background: #0054a5 url(gazo/homepage01.jpg) center / cover; }
  #logo { float: none; width: 48%; height: auto; min-height: 0; background: none; padding: 20px 12px; }
  #logo h1 { width: 100%; max-width: 100%; margin: 0; padding: 18px 14px 6px; font-size: 22px; line-height: 1.3; }
  #logo p { width: 100%; margin: 0; padding: 0 14px 18px; font-size: 14px; }
  #slogan { float: none; width: 52%; height: auto; min-height: 140px; padding: 24px; background-size: cover; }
  #slogan h2 { padding: 0; font-size: 24px; line-height: 1.4; }
  #menu { background: #eee9df; }
  #menu ul { display: flex; flex-wrap: wrap; padding: 0; margin: 0; list-style: none; }
  #menu li, #menu li.first { float: none; flex: 1 1 auto; height: auto; padding: 0; background: none; }
  #menu a { display: flex; align-items: center; justify-content: center; min-height: 48px; padding: 10px 14px; font-size: 16px; }
  #page { display: flex; flex-direction: column; padding: 0 20px; }
  #page > div[style*="clear"] { display: none; }
  #content { float: none; width: 100%; padding: 0; overflow-wrap: anywhere; }
  #content .box .title { padding-top: 24px; }
  #box1 img.left + ul { display: flow-root; }
  h1 { font-size: 26px; line-height: 1.3; }
  h2, .style1 { font-size: 20px; line-height: 1.4; }
  h3 { font-size: 17px; }
  #content .two-columns { display: flex; gap: 20px; margin-bottom: 20px; }
  #content .two-columns .column-one, #content .two-columns .column-two { float: none; width: calc(50% - 10px); min-width: 0; background: #f7f5f0; }
  #content .box2 .title, #content .box2a .title { height: auto; padding: 12px; background: #eee9df; font-size: 18px; }
  #content .box2 .content, #content .box2a .content { padding: 16px; background: none; }
  .more a { height: auto; min-height: 44px; padding: 10px 12px; font-size: 15px; background: #e8eff1; }
  #sidebar { position: static; float: none; clear: both; order: 2; width: 100%; margin: 28px 0 0; padding: 0; }
  #sidebar .box { width: 100%; padding: 0; }
  #box4, #box4 .bg-top, #box4 .content { background: none; }
  #box4, #box5 { border: 1px solid #ded8cb; margin-bottom: 20px; }
  #box4 .title, #sidebar .box .title { height: auto; padding: 12px 16px; font-size: 18px; line-height: 1.4; background: #557682; color: #fff; }
  #box4 .content, #sidebar .box .content { padding: 16px; font-size: 16px; }
  #sidebar a { display: inline-block; padding: 5px 0; overflow-wrap: anywhere; }
  #footer { padding: 20px; background: none; border-top: 1px solid #ded8cb; }
  #footer p { padding: 0; line-height: 1.8; }
  #footer a { display: inline-block; padding: 8px; }
  iframe[src*="google.com/maps"] { width: 100%; height: 350px; }
  .table-scroll table { min-width: 640px; overflow-wrap: normal; }
  .table-scroll-hint { display: block; margin-bottom: 8px; font-size: 14px; }
  .tbl th, .tbl td { padding: 8px; font-size: 14px; line-height: 1.5; }
  body.standalone-page { padding: 20px; font-family: Arial, Helvetica, sans-serif; overflow-wrap: anywhere; }
}

@media (max-width: 520px) {
  #logo, #slogan { width: 100%; min-height: 0; padding: 22px 20px; }
  #slogan h2 { font-size: 23px; }
  #menu li, #menu li.first { flex: 1 1 33.333%; }
  #page { padding: 0 16px; }
  #content .two-columns { display: block; margin: 0; }
  #content .two-columns .column-one, #content .two-columns .column-two { width: 100%; margin-bottom: 20px; }
  iframe[src*="google.com/maps"] { height: 300px; }
}
