<style>
    body {
      font-family: "Segoe UI", sans-serif;
      margin: 0;
      padding: 0;
    }
.main-heading {
  font-size: 1rem;
  color: #004080;
  margin: 1.5em auto 0.5em;
  max-width: 800px;
  padding: 0 1em;
  text-align: left;
  padding-left: 0.5em;
/*   font-weight: bold; */
}
    /* ▼ バナー全体 */
.top-banner {
  display: flex;
  align-items: center;
  background-color: #004080;
  color: white;
/*  font-weight: bold; */
  font-size: 0.5em;
}
.search-form {
  margin-left: auto;
  display: flex;
  align-items: center;
  padding: 0.5em 1em;
}
.search-form input[type="text"],
.search-form .search-button {
  height: 2.2em;
  font-size: 0.95em;
  padding: 0.4em 0.8em;
  border: none;
  outline: none;
  box-sizing: border-box;
}

.search-form input[type="text"] {
  border-radius: 4px 0 0 4px;
}

.search-form .search-button {
  border-radius: 0 4px 4px 0;
  background-color: #fff;
  color: #004080;
  font-weight: bold;
  cursor: pointer;
}

.search-form .search-button:hover {
  background-color: #e0f0ff;
}
.banner-title {
  font-size: 1.3rem;       /* ← 他より大きく表示 */
  padding: 1em 2em 1em 1em; /* 上右下左：左は少なめ、右に余白 */
  white-space: nowrap;
}
.banner-title a {
  color: white;
  text-decoration: none;
}

.banner-title a:hover {
  text-decoration: underline;
}
.menu-item {
  position: relative;
}

.menu-item > a {
  display: block;
  padding: 0.8em 1.2em;
    font-size: 1.6em; /* ← 小さくする */
    color: white;
  text-decoration: none;
  border-right: 1px solid rgba(255,255,255,0.2);
}

.menu-item > a:hover {
  background-color: rgba(255,255,255,0.1);
}

/* 最後のメニュー項目は右線を消す */
.menu-item:last-child > a {
  border-right: none;
    }
    
    /* ▼ ドロップダウンメニュー */
    .dropdown {
      display: none;
      position: absolute;
      top: 100%;
      left: 0;
      min-width: 200px;
      background-color: #004080;
      border-top: 2px solid white;
      z-index: 1000;
    }

    .dropdown a {
      display: block;
      padding: 0.8em 1em;
      color: white;
      text-decoration: none;
      font-size: 1.6em;
      border-bottom: 1px solid rgba(255,255,255,0.2);
    }

    .dropdown a:hover {
      background-color: rgba(255,255,255,0.1);
    }

    /* ▼ ホバーで表示 */
    .menu-item:hover .dropdown {
      display: block;
    }

    /* ▼ レスポンシブ対応 */
    @media (max-width: 600px) {
      .top-banner {
        flex-direction: column;
        align-items: stretch;
      }
      .top-banner .menu-item > a {
        border-right: none;
        border-bottom: 1px solid rgba(255,255,255,0.2);
      }
    }
    /* お知らせ一覧 */
    .notice-section {
      max-width: 800px;
      margin: 2em auto;
      padding: 0 1em;
    }

    .notice-title {
      font-size: 1.5em;
      margin-bottom: 1em;
      border-left: 6px solid #004080;
      padding-left: 0.5em;
    }

    .notice-list {
      list-style: none;
      padding: 0;
      margin: 0;
    }

    .notice-list li {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 0.7em 0;
      border-bottom: 1px solid #ccc;
      font-size: 0.95em;
    }

    .notice-date {
	font-size:0.8em;
      color: #555;
      white-space: nowrap;
      margin-right: 1em;
      flex-shrink: 0;
    }

    .notice-text {
      flex: 1;
    }

    .new-label {
      background: red;
      color: white;
      font-size: 0.7em;
      padding: 2px 6px;
      border-radius: 4px;
      margin-left: 0.5em;
    }

    @media (max-width: 600px) {
      .notice-list li {
        flex-direction: column;
        align-items: flex-start;
      }
      .notice-date {
        margin-bottom: 0.3em;
      }
    }
table {
  border-collapse: collapse;
  width: 100%;
}

/* .table-bordered が指定されたテーブルだけに罫線 */
.table-bordered,
.table-bordered th,
.table-bordered td {
  border: 1px solid #ccc;
}

.table-bordered th,
.table-bordered td {
  padding: 0.5em;
  text-align: center;
}
  table td, table th {
    vertical-align: top;
  }
/* カードレイアウト */
.grid {
    display: grid; 
    flex-wrap: wrap;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  grid-auto-rows: auto;/* minmax(1fr, auto); /* /* ← 高さ自動＋均等配置 */
  padding: 1em 0;
  max-width: 100%;
  box-sizing: border-box;
}

.ov {
  text-decoration: none;
  color: inherit;
}
.box_txt {
  height: 11.5em; /* ← 一番長いタイトルに合わせて固定 */
  border: 1px solid #004080;
  border-radius: 8px;
  padding: 0.8em;
  background-color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  overflow: hidden;
  word-break: break-word;
  max-width: 100%;
  box-sizing: border-box;
}

.box_txt:hover {
  box-shadow: 0 0 8px rgba(0, 64, 128, 0.4);
}

.box_date .date {
  font-size: 0.75em;
  color: #004080;
  font-weight: normal;
  margin-bottom: 0.5em;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

.ttl {
  font-size: 1rem;
  font-weight: bold;
  color: #333;
  margin: 0.5em 0;
  line-height: 1.4;
}

.rule_result {
  font-size: 0.9rem;
  font-weight: normal;
  color: #333;
  margin: 0.5em 0;
  line-height: 1.4;
}

.google-search-form {
  display: flex;
  align-items: center;
  gap: 4px;
  max-width: 250px;
  margin: 0 1em 0 auto;
}

.google-search-form input[type="text"] {
  flex: 1;
  padding: 0.3em 0.6em;
  font-size: 0.8rem;
  line-height: 1;
  border: 1px solid #ccc;
  border-radius: 4px;
  height: 1.5em;
}

.google-search-form button {
  padding: 0 0.6em;
  font-size: 0.8rem;
  height: 2em; /* ← 高さをinputと揃える */
  border: 1px solid #ccc;
  background-color: #f2f2f2;
  border-radius: 4px;
  cursor: pointer;
  white-space: nowrap;
}
ul {
  list-style: none;
  padding-left: 0; /* 余白も消したい場合 */
}
ol {
  list-style: none;
  padding-left: 0; /* 余白も消したい場合 */
}
/* レスポンシブ：スマホでは2列 */
@media screen and (max-width: 600px) {
    .grid {
    grid-template-columns: 1fr;
    padding: 0 1em;

  }
}
.section {
  max-width: 800px;
  margin: 2em auto;
  padding: 0 1em;
}
   footer {
       text-align: center;
       padding: 10px;
       background-color: #004080;
       color: white;
       margin-top: 20px;
   }
   footer a{
       color:white;
       text-decoration: underline; /* 必要に応じて追加 */
   }
   footer a:link,
    footer a:visited {
      color: white;
      text-decoration: underline;
    }
    footer a:hover,
    a:active {
      color: #ccc;
    }
.sub-section-title {
  font-size: 1.5em;
  margin-bottom: 1em;
  border-left: 6px solid #004080;
  padding-left: 0.5em;
  color: #004080;
}

.link-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1em;
}

.link-card {
  display: block;
  background-color: #f5faff;
  border: 1px solid #cce0f0;
  border-radius: 8px;
  padding: 1em;
  font-size: 1em;
  text-decoration: none;
  color: #004080;
  font-weight: bold;
  transition: background-color 0.2s, box-shadow 0.2s;
}

.link-card:hover {
  background-color: #e0f0ff;
  box-shadow: 0 0 6px rgba(0, 64, 128, 0.2);
}

/* モバイル対応 */
@media screen and (max-width: 600px) {
  .link-grid {
    grid-template-columns: 1fr;
  }
}
pre {
    font-size: 0.9rem;
    font-family: sans-serif;
}
    /* ページトップへ戻るボタン */
     #back-to-top {
      position: fixed;
      bottom: 20px;
      right: 20px;
      background: none;
      border: none;
      cursor: pointer;
      z-index: 999;
      padding: 0;
    }

    #back-to-top svg {
      width: 32px;
      height: 32px;
      fill: #3498db;
      transition: fill 0.2s ease;
    }

    #back-to-top:hover svg {
      fill: #2980b9;
    }
  .no-wrap {
    white-space: nowrap;
  }
/* ベース */
:root {
  --gap: 1rem;
  --img-max: 40%;   /* PC時の画像の最大幅 */
  --img-min: 180px; /* 小さすぎる画像を防ぐ */
}

body {
  margin: 0;
  font: 16px/1.8 system-ui, -apple-system, Segoe UI, Roboto, "Hiragino Sans",
        "Noto Sans JP", "Yu Gothic UI", "Yu Gothic", Meiryo, sans-serif;
}

.article {
  max-width: 72ch;
  padding: 2rem 1rem;
  margin-inline: auto;
}

/* 画像の回り込み（左右） */
/* 衝突回避用の独自クラス */
.wrap-left, .wrap-right {
/*   max-width: 40%; */
/*   min-width: 180px; */
  height: auto;
}
.wrap-left {
  float: left;
  margin: 0 1em 1em 0;
  display: inline;             /* ← inlineにすると vertical-align が効く */
  vertical-align: top;         /* ← 上端揃えの本命 */
}

@media screen and (max-width: 600px) {
  .wrap-left {
    float: none;
    display: block;
    margin: 1em auto;
    max-width: min(90%, 500px);
  }
}
.wrap-right {
  float: right;
  display: inline;              /* vertical-align を効かせるため */
  vertical-align: top;          /* 上揃え（baselineに合わせる） */
  margin: 0 0 1em 1em;          /* 上 右 下 左 → 左に1em空ける */
  height: auto;
}

@media (max-width: 600px) {
  .wrap-right {
    float: none;
    display: block;
    margin: 1em auto;
    max-width: min(90%, 500px);
    vertical-align: baseline;
  }
}


</style>
