@charset "utf-8";
/*--------------------------------------
  スマートフォン最適化 (2026-06-11 追加 / Trash-B)
  方針: 画面幅 768px 以下のときだけ上書き。
        769px 以上（PC）には一切影響させない。
        固定980pxレイアウトを流動化し、2カラムを縦積みにする。
--------------------------------------*/

/* ハンバーガーボタン・オーバーレイ・追加ホーム項目は PC では非表示（@media内でのみ表示） */
.mobile-nav-toggle,
.mobile-nav-overlay { display: none; }
#GNaviArea ul li.mnav-home { display: none; }

@media screen and (max-width: 768px) {

  /* ===== 全体: 横スクロールを防ぐ =====
     ※ body には掛けない（body に overflow-x:hidden を付けると
        overflow-y が auto に変わり、縦スクロールバーが二重になるため） */
  html {
    overflow-x: hidden !important;
  }
  body { font-size: 15px !important; }
  img { max-width: 100% !important; height: auto !important; }

  /* ===== 固定幅コンテナを流動化 ===== */
  #BodyArea,
  div#HeaderArea,
  div#GNaviArea,
  div#PanArea,
  div#TopPageArea,
  div#ContentsArea,
  div#FooterArea {
    width: auto !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    background-image: none !important; /* 固定幅前提の縦ストライプ背景を解除 */
  }
  /* サイト外枠全体を白背景に（ヘッダー〜ナビ〜本文を白で統一・body緑ストライプを隠す） */
  #BodyArea {
    margin-bottom: 24px !important;
    background-color: #ffffff !important;
  }
  div#PanArea,
  div#TopPageArea,
  div#ContentsArea { padding-left: 10px !important; padding-right: 10px !important; }

  /* ===== ヘッダー: 絶対配置を解除して中央揃えで見やすく ===== */
  div#HeaderArea {
    height: auto !important;
    padding: 6px 12px 16px !important;
  }
  /* 上部の緑帯（説明文）は左寄せ・☰と非重複 */
  div#HeaderArea h1 {
    overflow: visible !important;
    width: auto !important;
    height: auto !important;
    padding: 6px 10px 6px 64px !important;
    line-height: 1.5 !important;
    text-align: left !important;
    background-image: none !important; /* 緑の背景色 #00984b は残る */
  }
  /* ロゴ：中央・大きめ */
  div#HeaderArea h2 {
    position: static !important;
    width: auto !important;
    height: auto !important;
    margin: 16px 0 12px !important;
    text-align: center !important;
  }
  div#HeaderArea h2 img { width: auto !important; max-width: 90% !important; }
  /* 電話・FAX・メール：中央・上に区切り線 */
  div#HeaderArea p {
    position: static !important;
    width: auto !important;
    height: auto !important;
    margin: 0 !important;
    padding: 14px 0 4px !important;
    text-align: center !important;
    border-top: 1px solid #e3e3e3 !important;
  }
  div#HeaderArea p img { max-width: 74% !important; height: auto !important; }
  /* 連絡先テキスト（画像から置換） */
  div#HeaderArea p .mh-contact { display: block !important; }
  div#HeaderArea p .mh-contact > a,
  div#HeaderArea p .mh-contact > span {
    display: block !important;
    margin: 6px 0 !important;
    font-size: 17px !important;
    font-weight: bold !important;
    line-height: 1.4 !important;
    color: #333333 !important;
    text-decoration: none !important;
  }
  div#HeaderArea p .mh-contact .mh-tel {
    font-size: 22px !important;
    color: #00984b !important;
    letter-spacing: 0.5px !important;
  }
  div#HeaderArea p .mh-contact .mh-mail {
    color: #1565c0 !important;
    word-break: break-all !important;
  }
  div#HeaderArea p .mh-ico {
    margin-right: 7px !important;
    font-weight: normal !important;
  }
  /* ホーム/サイトマップ テキスト（画像から置換） */
  div#HeaderArea ul#HeaderNaviArea li a {
    display: inline-flex !important;
    align-items: center !important;
    padding: 8px 6px !important;
    font-size: 16px !important;
    font-weight: bold !important;
    color: #333333 !important;
    text-decoration: none !important;
  }
  div#HeaderArea ul#HeaderNaviArea li a .mh-ico { margin-right: 5px !important; }
  /* ホーム・サイトマップ：中央・区切り線・間隔広め */
  div#HeaderArea div.clearfix {
    margin-top: 14px !important;
    padding-top: 12px !important;
    border-top: 1px solid #e3e3e3 !important;
  }
  div#HeaderArea ul#HeaderNaviArea {
    float: none !important;
    margin: 0 !important;
    display: flex !important;
    justify-content: center !important;
    gap: 32px !important;
  }
  div#HeaderArea ul#HeaderNaviArea li {
    float: none !important;
    margin: 0 !important;
  }

  /* ===== ハンバーガーメニュー（左上☰）===== */
  .mobile-nav-toggle {
    display: flex !important;
    align-items: center;
    justify-content: center;
    position: fixed !important;
    top: 8px;
    left: 8px;
    z-index: 2000;
    width: 50px;
    height: 46px;
    padding: 0;
    background: #ffffff !important;
    border: 2px solid #00984b !important;
    border-radius: 6px !important;
    color: #00984b !important;
    font-size: 24px;
    line-height: 1;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
    cursor: pointer;
  }
  .mobile-nav-toggle .mnt-icon { display: block; }

  /* 開いている間の背景オーバーレイ */
  .mobile-nav-overlay {
    display: none;
    position: fixed !important;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 1500;
    background: rgba(0, 0, 0, 0.45);
  }
  body.gnav-open .mobile-nav-overlay { display: block; }

  /* 上部に余白を作り、☰ボタンと緑帯テキストが重ならないように */
  div#HeaderArea h1 { padding-left: 64px !important; }

  /* ===== グローバルナビ: 普段は隠し、☰で開く ===== */
  div#GNaviArea { padding: 0 !important; background: none !important; }
  div#GNaviArea ul {
    display: none !important;
    width: auto !important;
    height: auto !important;
  }
  /* 開いたときはドロップダウンパネルとして表示 */
  body.gnav-open div#GNaviArea ul {
    display: block !important;
    position: fixed !important;
    top: 62px !important;
    left: 8px !important;
    right: 8px !important;
    z-index: 1600 !important;
    max-height: calc(100vh - 74px) !important;
    overflow-y: auto !important;
    margin: 0 !important;
    padding: 12px !important;
    background: #ffffff !important;
    border: 2px solid #00984b !important;
    border-radius: 8px !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3) !important;
  }
  div#GNaviArea ul li {
    float: none !important;
    display: block !important;
    margin: 0 0 8px 0 !important;
  }
  /* 元の画像ボタンは非表示 */
  div#GNaviArea ul li a img { display: none !important; }
  /* リンク自体をボタン化 */
  div#GNaviArea ul li a {
    position: relative !important;
    display: block !important;
    width: auto !important;
    height: auto !important;
    padding: 15px 40px 15px 18px !important;
    background: #fafafa !important;
    border: 1px solid #d0d0d0 !important;
    border-left-width: 6px !important;
    border-radius: 5px !important;
    color: #333333 !important;
    font-size: 17px !important;
    font-weight: bold !important;
    line-height: 1.3 !important;
    text-decoration: none !important;
  }
  /* 先頭の「ホーム」項目を表示（JSで追加・実テキスト「ホーム」を持つ） */
  div#GNaviArea ul li.mnav-home { display: block !important; }
  div#GNaviArea ul li.mnav-home a { border-left-color: #00984b !important; } /* 緑 */

  /* ラベル（2番目以降は画像リンク。擬似要素でテキスト表示） */
  div#GNaviArea ul li a::before { content: ""; }
  div#GNaviArea ul li:nth-child(2) a::before { content: "一般大会"; }
  div#GNaviArea ul li:nth-child(3) a::before { content: "ジュニア大会"; }
  div#GNaviArea ul li:nth-child(4) a::before { content: "イベント"; }
  div#GNaviArea ul li:nth-child(5) a::before { content: "個人ランキング"; }
  div#GNaviArea ul li:nth-child(6) a::before { content: "協会について"; }
  /* 左アクセント色（元の下線色を踏襲） */
  div#GNaviArea ul li:nth-child(2) a { border-left-color: #d9333f !important; } /* 赤 */
  div#GNaviArea ul li:nth-child(3) a { border-left-color: #7cb342 !important; } /* 黄緑 */
  div#GNaviArea ul li:nth-child(4) a { border-left-color: #f2b500 !important; } /* 黄 */
  div#GNaviArea ul li:nth-child(5) a { border-left-color: #38a1c4 !important; } /* 水色 */
  div#GNaviArea ul li:nth-child(6) a { border-left-color: #555555 !important; } /* 黒 */
  /* 右端の「›」矢印 */
  div#GNaviArea ul li a::after {
    position: absolute !important;
    top: 50% !important;
    right: 15px !important;
    margin-top: -0.6em !important;
    color: #aaaaaa !important;
    font-size: 20px !important;
    font-weight: normal !important;
    content: "\203A" !important;
  }
  /* タップ時のフィードバック */
  div#GNaviArea ul li a:active { background: #eef3ec !important; }

  /* ===== メイン / サイドを縦積み ===== */
  div#MainContentsArea,
  div#SideMenuArea {
    float: none !important;
    width: auto !important;
    margin: 0 0 18px 0 !important;
  }
  div#MainContentsArea div.toiawase { width: auto !important; }

  /* ===== 2カラム分割を解除 ===== */
  div.col2A, div.col2B, div.col2C { width: auto !important; }
  div.col2A_left, div.col2A_right,
  div.col2B_left, div.col2B_right,
  div.col2C_left, div.col2C_right {
    float: none !important;
    width: auto !important;
    margin: 0 0 14px 0 !important;
  }
  iframe, iframe.iframeA { max-width: 100% !important; }

  /* ===== 固定幅ユーティリティの解除 ===== */
  .w710px { width: auto !important; }
  .w255px { width: auto !important; max-width: 100% !important; }

  /* ===== 「期間中・まもなく開催」一覧：テキスト行化 ===== */
  div#MainContentsArea ul.listL {
    width: auto !important;
    border-top: none !important;
  }
  div#MainContentsArea ul.listL li {
    display: block !important;
    line-height: normal !important;
    margin: 0 0 8px 0 !important;
  }
  div#MainContentsArea ul.listL li a.mh-evt {
    display: block !important;
    padding: 12px 14px !important;
    background: #fafafa !important;
    border: 1px solid #dddddd !important;
    border-left: 6px solid #999999 !important;
    border-radius: 4px !important;
    color: #333333 !important;
    font-size: 15px !important;
    font-weight: bold !important;
    line-height: 1.45 !important;
    text-decoration: none !important;
  }
  div#MainContentsArea ul.listL li a.mh-evt-ippan  { border-left-color: #d9333f !important; } /* 一般=赤 */
  div#MainContentsArea ul.listL li a.mh-evt-junior { border-left-color: #7cb342 !important; } /* ジュニア=緑 */
  div#MainContentsArea ul.listL li a.mh-evt-event  { border-left-color: #f2b500 !important; } /* イベント=黄 */
  div#MainContentsArea ul.listL li a.mh-evt:active { background: #eef3ec !important; }

  /* ===== 横長テーブルは指でスクロール ===== */
  div#MainContentsArea table {
    display: block !important;
    width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }

  /* ===== フッター: 高さ自動・白文字が読めるよう緑背景を維持 ===== */
  div#FooterArea {
    height: auto !important;
    padding: 18px 10px !important;
    background-color: #00984b !important;
  }
  div#FooterArea img { max-width: 100% !important; }
}
