@charset "UTF-8";
/* Responsive layout only. Desktop >= 1000px is unchanged. */
@media screen and (max-width: 999px) {
  html, body { height: auto; min-width: 0; }
  body { background-size: auto; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
  #wrapper { width: 100%; min-height: 0; height: auto; margin: 0 auto; padding: 0 16px; }
  #contents { padding-bottom: 20px; overflow-wrap: anywhere; }
  header h1 { float: none; width: 250px; max-width: 100%; margin: 20px 0 10px; }
  #submenu { float: none; height: auto; margin: 0; background: none; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; }
  #sublink, #fontsize { float: none; width: auto; margin: 0; display: flex; align-items: center; flex-wrap: wrap; }
  #sublink li { float: none; margin: 0 12px 0 0; }
  #sublink a { display: inline-block; padding: 8px 0; }
  #fontsize { padding-left: 0; border: 0; }
  #fontsize li { float: none; }
  #fontsize li a { width: 36px; height: 36px; line-height: 36px; background: #149664; border-radius: 4px; border: 1px solid #149664; }
  #fontsize li:nth-child(2) a { background: #fff; color: #149664; }
  header nav { margin: 14px 0 0; }
  header nav ul.navigation { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  header nav ul.navigation:after { display: none; }
  header nav li { float: none; min-width: 0; }
  header nav ul.navigation li:nth-child(n) a { display: flex; align-items: center; justify-content: center; text-indent: 0; width: 100%; height: auto; min-height: 48px; margin: 0; padding: 8px 5px; background: #149664; border: 1px solid #149664; border-radius: 4px; color: #fff; text-align: center; font-weight: bold; line-height: 1.4; }
  header nav ul.navigation li a.current, header nav ul.navigation li a:hover { background: #e6f0eb; color: #146b49; }
  #main, #home #main, #sidebar, #home #sidebar, #localnav { float: none; width: 100%; min-width: 0; }
  #main { padding-bottom: 24px; }
  #main article { padding: 0; }
  #main article h1 { margin: 0; padding: 18px 12px; background-image: none; font-size: 1.8em; line-height: 1.5; }
  #main article h1 span { display: block; padding-left: 25px; }
  #main article h2, #main article h3, #main article h4 { overflow-wrap: anywhere; }
  #main article p { text-align: start; max-width: 100%; }
  #main article section { padding: 1.5em 0; }
  #main figure { max-width: 100%; }
  #main iframe, #main video, #main embed, #main object { max-width: 100%; }
  #main iframe, #kyukyu iframe { height: 360px; }
  #main table { max-width: 100%; }
  #main th, #main td { padding: 8px; overflow-wrap: anywhere; }
  #main .responsive-table-scroll { display: block; max-width: 100%; overflow-x: auto; margin-top: 1em; }
  #main .responsive-table-scroll > table { margin-top: 0; }
  #kyukyu th { white-space: normal; padding: 10px; }
  #kyukyu td { padding: 10px; }
  #about p { width: auto; }
  #home #main div.index { margin-left: 0; }
  #home #main div.index ul { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  #home #main div.index ul:after { display: none; }
  #home #main div.index li { float: none; margin: 0; background: none; text-align: center; }
  #home #main div.index img { display: block; width: 100%; height: auto; }
  #home #main section.topics li span.date { float: none; margin-bottom: 4px; }
  #home #main section.topics li span.item { margin-left: 0; }
  #sidebar { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-items: start; padding-bottom: 0; }
  #sidebar p.ban { margin: 0; text-align: center; }
  #sidebar div.information { grid-column: 1 / -1; grid-row: auto; width: 100%; max-width: 480px; margin: 0 auto; background-color: #fff; }
  #sidebar div.information h2, #sidebar div.information p.btn { text-align: center; }
  #sidebar div.information p.data { font-size: 14px; line-height: 1.6; }
  footer { min-width: 0; width: 100%; height: auto; padding: 12px 16px 20px; }
  footer nav, footer small { width: 100%; }
  footer nav ul { display: flex; flex-wrap: wrap; gap: 8px 16px; }
  footer nav ul:after { display: none; }
  footer nav li, footer nav li:first-child { float: none; margin: 0; padding: 0; border: 0; }
  footer nav a { display: inline-block; padding: 6px 0; }
  #toPageTop { z-index: 10; width: 40px; }
}
@media screen and (max-width: 600px) {
  #wrapper { padding: 0 12px; }
  header nav ul.navigation { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #home #main div.index ul { grid-template-columns: 1fr; }
  #home #main div.index img { width: 100%; max-width: 320px; margin: auto; }
  #main figure { float: none; margin: 1em 0; text-align: center; }
  #main article h1 { font-size: 20px; }
  #main article h2, #main article h3, #main article h4 { font-size: 1.5em; line-height: 1.5; }
  #main dt { float: none; width: auto; text-align: left; padding: 3px 8px; }
  #main dd { padding: 5px 0; display: flow-root; }
  #main iframe, #kyukyu iframe { height: 300px; }
  #kyukyu ul.nav li, #sitemap ul li { float: none; }
  #kyukyu h2, #kyukyu h3 { margin-top: 1.5em; }
  #main article .box { padding: 10px; }
}
@media screen and (max-width: 999px) {
  body:has(#styleFontsize[href*="fontsize_large"]) #fontsize li:nth-child(2) a { background: #149664; color: #fff; }
  body:has(#styleFontsize[href*="fontsize_large"]) #fontsize li:nth-child(3) a { background: #fff; color: #149664; }
  html:has(#styleFontsize[href*="fontsize_large"]) #fontsize li:nth-child(2) a { background: #149664; color: #fff; }
  html:has(#styleFontsize[href*="fontsize_large"]) #fontsize li:nth-child(3) a { background: #fff; color: #149664; }
}
@media screen and (max-width: 999px) {
  #main article { min-width: 0; }
  #main article table { display: block; overflow-x: auto; }
  #main article table tbody { width: 100%; }
  #main article table td, #main article table th { min-width: 3em; }
}

/* Smartphone: retain the three compact navigation cards and full-width banners. */
@media screen and (max-width: 600px) {
  #home #main div.index ul { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  #home #main div.index img { max-width: 100%; }
  #sidebar { grid-template-columns: minmax(0, 1fr); }
  #sidebar p.ban a, #sidebar p.ban img { display: block; width: 100%; height: auto; }
}

/* Smartphone: readable text banners, original desktop images unchanged. */
@media screen and (max-width: 600px) {
  #home #main .mobile-priority-banners[hidden] { display: grid; gap: 10px; margin: 12px 0; }
  #home #sidebar > .priority-banner { display: none; }
  .mobile-priority-banners p.ban { margin: 0; }
  .mobile-priority-banners p.ban a, #sidebar p.ban a { display: block; padding: 0; background: none; }
  .mobile-priority-banners p.ban img, #sidebar p.ban img { display: none; }
  .mobile-banner[hidden] { display: flex; flex-direction: column; gap: 4px; width: 100%; padding: 13px 12px; border: 1px solid #b7cfc0; border-radius: 4px; background: #f5faf7; color: #216b43; text-align: center; line-height: 1.5; }
  .mobile-banner-title { font-size: 1.25em; font-weight: bold; }
  .mobile-banner-detail { font-size: 1em; }
  .mobile-banner.mobile-urgent { background: #fff5f5; border-color: #e49298; color: #b51e30; }
  .mobile-banner-phone { font-size: 2em; font-weight: bold; line-height: 1.2; }
  .mobile-priority-banners a:focus-visible, #sidebar p.ban a:focus-visible { outline: 3px solid #146b49; outline-offset: 2px; }
  #home #main { padding-bottom: 16px; }
}

/* Smartphone: search attribution and accessible member login. */
@media screen and (max-width: 600px) {
  #home #main .mobile-priority-banners p.ban a[target="_blank"],
  #sidebar p.priority-banner a[target="_blank"] {
    background: none; padding: 0; margin: 0;
  }
  #sidebar div.information { background-image: none; }
  #sidebar div.information p.btn { margin: 14px 18px 18px; }
  #sidebar div.information p.btn a { display: block; text-decoration: none; }
  #sidebar div.information p.btn img { display: none; }
  #sidebar .mobile-member-login[hidden] {
    display: flex; align-items: center; justify-content: center;
    gap: 10px; min-height: 52px; padding: 12px 8px;
    background: #149664; color: #fff; border-radius: 4px;
    font-size: 1.3em; font-weight: bold; line-height: 1.5;
    text-align: center;
  }
  #sidebar .mobile-member-arrow { font-size: 1.5em; line-height: 1; }
  #sidebar div.information p.btn a:focus-visible { outline: 3px solid #146b49; outline-offset: 3px; }
}

/* Smartphone: interaction feedback for text banners and member login. */
@media screen and (max-width: 600px) {
  .mobile-banner[hidden], #sidebar .mobile-member-login[hidden] {
    cursor: pointer;
    transition: background-color .15s ease, border-color .15s ease;
  }
  .mobile-priority-banners a:active .mobile-banner[hidden],
  #sidebar p.ban a:active .mobile-banner[hidden],
  .mobile-priority-banners a:focus-visible .mobile-banner[hidden],
  #sidebar p.ban a:focus-visible .mobile-banner[hidden] {
    background-color: #dcefe4; border-color: #149664;
  }
  .mobile-priority-banners a:active .mobile-urgent[hidden],
  #sidebar p.ban a:active .mobile-urgent[hidden],
  .mobile-priority-banners a:focus-visible .mobile-urgent[hidden],
  #sidebar p.ban a:focus-visible .mobile-urgent[hidden] {
    background-color: #fce0e3; border-color: #c74756;
  }
  #sidebar div.information p.btn a:active .mobile-member-login[hidden],
  #sidebar div.information p.btn a:focus-visible .mobile-member-login[hidden] {
    background-color: #08754b;
  }
}
@media screen and (max-width: 600px) and (hover: hover) {
  .mobile-priority-banners a:hover .mobile-banner[hidden],
  #sidebar p.ban a:hover .mobile-banner[hidden] {
    background-color: #dcefe4; border-color: #149664;
  }
  .mobile-priority-banners a:hover .mobile-urgent[hidden],
  #sidebar p.ban a:hover .mobile-urgent[hidden] {
    background-color: #fce0e3; border-color: #c74756;
  }
  #sidebar div.information p.btn a:hover .mobile-member-login[hidden] {
    background-color: #08754b;
  }
}
@media screen and (max-width: 600px) and (prefers-reduced-motion: reduce) {
  .mobile-banner[hidden], #sidebar .mobile-member-login[hidden] { transition: none; }
}
