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;
/* margin-left: 20px; */
  padding-left: 10px; /* 余白も消したい場合 */
}
ol {
  list-style: none;
  padding-left: 10px; /* 余白も消したい場合 */
}
/* レスポンシブ：スマホでは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;
  }
}

.contest-summary {
  border: 2px solid #1f5f99;
  background: #f3f9ff;
  padding: 1.2em 1.5em;
  margin: 1.5em 0 2em 0;
  border-radius: 10px;
}

.contest-summary h1 {
  margin-top: 0;
}

.contest-summary h2 {
  margin-top: 1em;
  color: #1f5f99;
}

.contest-summary p {
  margin-left: 1em;
}
.page-allja .menu-allja,
.page-home .menu-home,
.page-fd .menu-fd {
  pointer-events: none;
  color: gray;
  text-decoration: none;
  cursor: default;
}

/* 追加・修正：改行の隙間を消し、確実に全角2文字分右へ下げる設定 */
.contest-summary ul li ul {
  padding-left: 0;      /* 日付リスト全体の左余白を初期化 */
  margin-top: 0;        /* 見出しとの上下余白をリセット */
  margin-bottom: 0.5em; /* セクション下部の最小限の隙間 */
}

.contest-summary .datetime-item {
  margin-top: 0;        /* 日付行どうしの隙間を無くす */
  margin-bottom: 0;     /* 日付行どうしの隙間を無くす */
  padding-left: 2em;    /* 全角2文字分の左マージン */
  text-indent: 0;       /* 突出し設定を無効化して揃える */
  list-style: none;     /* ドット（中黒）を非表示にする */
  line-height: 1.5;     /* 行間を詰めて見やすく設定 */
}
table.zebra {
  border-collapse: collapse;
}

table.zebra th,
table.zebra td {
  border: 1px solid #999;
  padding: 6px;
}

table.zebra tbody tr:nth-child(even) {
  background-color: #f2f2f2;
}

table.zebra tbody tr:nth-child(odd) {
  background-color: white;
}

table.zebra th {
  background-color: #003366;
  color: white;
}

/* ▼【修正】最新のコンテスト結果リンク用のスタイル設定（囲み＆区切り明示版） */
.result-links-section {
  max-width: 100%;
  box-sizing: border-box;
  background-color: #f0f6fa;    /* セクション全体に薄いブルーの背景色を敷く */
  border: 1px solid #cce0f0;    /* 全体をうっすら囲む枠線 */
  border-radius: 8px;           /* 角丸 */
  padding: 1.2em;               /* 内側の余白 */
  margin: 1.5em 0;
}

.result-links-title {
  font-size: 1.05em;
  font-weight: bold;
  color: #004080;
  margin-bottom: 1em;
  border-left: 4px solid #004080; /* 左側にアクセントの太線を付与 */
  padding-left: 0.5em;
}

.result-links-wrap {
  display: flex;
  flex-wrap: wrap;              /* 画面幅に収まらない場合は自動折り返し */
  gap: 8px 10px;                /* 各リンクボタン間の隙間（縦8px、横10px） */
}

.result-link-item {
  font-size: 0.9em;
  color: #004080;
  text-decoration: none;
  white-space: nowrap;          /* テキストの途中での意図しない改行を防ぐ */
  background-color: #ffffff;    /* 各コンテスト名の背景を白にして浮き立たせる */
  border: 1px solid #b3d1eb;    /* 個別の区切りを明示する枠線 */
  border-radius: 4px;           /* 各ボタンの角丸 */
  padding: 0.4em 0.8em;         /* ボタン内の余白（これで押しやすくなります） */
  transition: all 0.2s ease;
}

.result-link-item:hover {
  background-color: #e0effa;    /* ホバー時に少し濃い背景色にする */
  border-color: #004080;        /* ホバー時に枠線を強調 */
  text-decoration: none;        /* 下線は出さずにすっきり見せる */
}


/* ==========================================
   ▼ 印刷・PDF出力用スタイル設定（右切れ対策版）
========================================== */
@media print {
  /* 1. PDF化する際に不要なパーツ（ナビ、検索窓、ボタン、フッター等）を非表示に */
  [data-include="menu.html"],
  .top-banner,
  .search-form,
  .google-search-form,
  #back-to-top,
  footer,
  svg,
  .print-action-box {
    display: none !important;
  }

  /* 2. ページ余白と基本フォントの設定 */
  @page {
    size: A4 portrait;  /* A4縦に固定 */
    margin: 15mm 12mm;  /* 印刷可能領域を広げるため余白を最適化 */
  }

  body {
    background: none !important;
    color: #000 !important;   /* 文字色を純黒にして読みやすく */
    font-size: 10pt;          /* 文字サイズを少し詰め、用紙内に収めやすく */
    line-height: 1.5;
    width: 100% !important;
  }

  /* 3. 横幅の固定解除と、はみ出し（右切れ）を絶対に防止する設定 */
  .notice-section,
  .contest-summary,
  .section,
  .article {
    max-width: 100% !important;
    width: 100% !important;
    margin: 0 0 1.5em 0 !important;
    padding: 0 !important;
    float: none !important;   /* 回り込みを解除 */
    overflow: visible !important;
  }

  /* 4. コンテスト概要（囲み枠）の調整 */
  .contest-summary {
    border: 1px solid #004080 !important; /* 枠線を細く */
    background-color: #f5faff !important; /* 薄い背景は維持 */
    padding: 1em !important;
    page-break-inside: avoid;              /* 枠の途中でページがちぎれるのを防ぐ */
  }

  .contest-summary h1 {
    font-size: 1.5rem !important;
  }

  /* 5. テーブル（周波数帯や部門）の印刷・はみ出し対策 */
  table {
    max-width: 100% !important;
    width: 100% !important;
    table-layout: fixed !important;    /* セル幅が用紙を突き抜けるのを防止 */
    word-break: break-all !important;  /* 長い英数字コードが枠外に飛び出さないよう強制改行 */
    margin-bottom: 1.5em !important;
  }

  .table-bordered,
  .table-bordered th,
  .table-bordered td {
    border: 1px solid #666 !important; /* 罫線を少し濃くして見やすく */
  }

  .table-bordered th,
  .table-bordered td {
    padding: 4px 6px !important;       /* セル内の余白を少し詰めて横幅を節約 */
    font-size: 8.5pt !important;       /* 表の文字を少し小さくして1ページに収まりやすく */
    vertical-align: middle !important;
  }

  th {
    background-color: #e0f0ff !important; /* ヘッダー背景を薄いブルーに */
    color: #000 !important;
  }

  /* 6. 改ページ（ページ跨ぎ）のコントロール */
  h2, h3 {
    page-break-after: avoid;  /* 見出しの直後での不自然な改ページを禁止 */
    margin-top: 1.2em !important;
    margin-bottom: 0.5em !important;
    color: #004080 !important;
  }

  tr, li {
    page-break-inside: avoid; /* テーブルの行やリストの途中でページが分割されるのを極力防ぐ */
  }
}


/* =========================================================
   generate_html.py 出力ページ共通スタイル
   HTMLファイル内にはスタイルを書かず、ここで一括管理する
========================================================= */

.page-container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 15px;
  box-sizing: border-box;
  font-family: sans-serif;
}

h1.jarl-title a {
  color: #5a5a5a !important;
  text-decoration: none;
  font-weight: 500;
  font-size: 36px;
}

h2 {
  color: #337ab7;
  font-size: 24px;
  margin-top: 20px;
  margin-bottom: 10px;
  font-weight: 500;
}

h3 {
  color: #333333;
  font-size: 20px;
  margin-top: 20px;
  margin-bottom: 10px;
  font-weight: 500;
}

.syumoku-title {
  color: #337ab7;
  font-size: 14px;
  font-weight: bold;
  display: block;
  margin-top: 15px;
  margin-bottom: 5px;
}

pre.jarl-pre {
  display: block;
  width: fit-content;
  max-width: 100%;
  padding: 9.5px;
  margin: 0 0 10px;
  overflow-x: auto;
  font-size: 13px;
  line-height: 1.42857143;
  color: #333333;
  white-space: pre;
  word-break: normal;
  word-wrap: normal;
  background-color: #f5f5f5;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-family: monospace;
}

#back-to-top {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: #337ab7;
  color: #fff;
  padding: 10px 15px;
  border-radius: 5px;
  text-decoration: none;
  z-index: 1000;
  font-weight: bold;
  opacity: 0.8;
}

#back-to-top:hover {
  opacity: 1;
  background: #23527c;
  color: #fff;
}

/*
  style.css上部の table { width: 100%; } を結果ページ内だけ上書きする。
  表は内容に必要な幅だけを使い、見出しと数値が離れすぎないようにする。
*/
.result-page-content {
  width: fit-content;
  max-width: min(94vw, 900px);
  margin: 1.5em auto 2em;
  padding: 0 1em;
  box-sizing: border-box;
}

.result-content-scroll {
  max-width: 100%;
  overflow-x: auto;
}

.result-page-content table {
  width: auto;
  max-width: 100%;
  margin-left: 0;
  margin-right: 0;
  table-layout: auto;
}

.result-page-content th,
.result-page-content td {
  padding-left: 0.75em;
  padding-right: 0.75em;
  white-space: nowrap;
}

/* band.html */
table.jarl-band-table th {
  background-color: #fff !important;
}

table.jarl-band-table tr:has(td):nth-child(odd) {
  background-color: #f9f9f9;
}

/* checklog.html */
.jarl-checklog-container {
  line-height: 2.2;
  font-family: monospace;
  font-size: 15px;
  background-color: #f5f5f5;
  padding: 20px;
  border: 1px solid #ccc;
  border-radius: 4px;
  word-break: break-all;
}

/* スマートフォン */
@media screen and (max-width: 600px) {
  .result-page-content {
    width: 100%;
    max-width: 100%;
    margin: 1em 0;
    padding: 0 0.5em;
  }
}

/* 印刷時 */
@media print {
  .result-page-content {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }
}
/* 2番目以降の種目見出しの上に空白を作る */
.multiop-table th.category-title {
    padding-top: 40px !important;
    border-top: none !important;
}

/* 最初の種目見出しには上側の余分な罫線を付けない */
.multiop-table tr:first-child th {
    border-top: none !important;
}
