/* Smartphone Responsive Styles (768px以下のみ適用) */
@media screen and (max-width: 768px) {
  html, body {
    min-width: 0 !important;
    width: 100% !important;
    overflow-x: hidden !important;
    font-size: 14px !important;
    line-height: 1.6 !important;
  }
  img {
    max-width: 100% !important;
    height: auto !important;
  }

  /* ヘッダー（背景画像の縦リピートを解除し黒単色へ） */
  #header_hld {
    position: relative !important;
    height: auto !important;
    padding: 12px 0 14px !important;
    background: #000000 !important;
  }
  .header {
    width: 100% !important;
    height: auto !important;
    padding: 0 10px !important;
    box-sizing: border-box !important;
    position: static !important;
  }
  .header_logo {
    position: static !important;
    width: 100% !important;
    max-width: 320px !important;
    height: 55px !important;
    margin: 0 auto 10px !important;
    background-size: contain !important;
    background-position: center !important;
  }
  .header_bnr {
    position: static !important;
    width: 100% !important;
    height: auto !important;
    margin: 0 auto !important;
  }
  .header_bnr ul {
    display: flex !important;
    justify-content: center !important;
    gap: 6px !important;
  }
  .header_bnr ul li {
    float: none !important;
    width: 31% !important;
    max-width: 116px !important;
    margin: 0 !important;
  }
  .header_link {
    position: static !important;
    width: 100% !important;
    margin-top: 10px !important;
  }
  .header_link ul {
    display: flex !important;
    justify-content: center !important;
    flex-wrap: wrap !important;
    gap: 8px 14px !important;
  }
  .header_link ul li {
    float: none !important;
  }

  /* メイン枠 */
  #wrap {
    width: 100% !important;
    padding: 12px 10px 0 !important;
    box-sizing: border-box !important;
    overflow: visible !important;
  }
  #main_img, #main_ttl {
    width: 100% !important;
    height: auto !important;
    margin: 10px auto !important;
    background-size: 100% auto !important;
    background-position: center top !important;
  }

  /* 背景画像置換セクション（比率を維持してスマホ幅100%に縮小） */
  #about_col1_hld { width: 100% !important; height: auto !important; aspect-ratio: 1000 / 750; background-size: 100% auto !important; }
  #info_col1_hld  { width: 100% !important; height: auto !important; aspect-ratio: 1000 / 510; background-size: 100% auto !important; }
  #info_col2_hld  { width: 100% !important; height: auto !important; aspect-ratio: 1000 / 320; background-size: 100% auto !important; }
  #zizobon_col1_hld { width: 100% !important; height: auto !important; aspect-ratio: 1000 / 500; background-size: 100% auto !important; }
  #col1_hld { width: 100% !important; height: auto !important; aspect-ratio: 1000 / 500; background-size: 100% auto !important; }
  #col2_hld { width: 100% !important; height: auto !important; aspect-ratio: 1000 / 500; background-size: 100% auto !important; }
  #col3_hld { width: 100% !important; height: auto !important; aspect-ratio: 1000 / 208; background-size: 100% auto !important; }

  /* お知らせ・テキストコンテンツ */
  #news_hld, #news_left, #news_right, #left_column, #right_column,
  .news_left, .news_right, #main, #sidebar, #content {
    width: 100% !important;
    max-width: 100% !important;
    float: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    box-sizing: border-box !important;
  }
  table {
    width: 100% !important;
    max-width: 100% !important;
    display: block !important;
    overflow-x: auto !important;
  }
  iframe {
    max-width: 100% !important;
  }

  /* フッター */
  #footer, #footer.second {
    width: 100% !important;
    height: auto !important;
    margin-top: 30px !important;
    background: #6b1d1d !important;
    padding: 20px 14px 28px !important;
    box-sizing: border-box !important;
    position: relative !important;
  }
  #footer #footer_center, #footer.second #footer_center {
    width: 100% !important;
    height: auto !important;
    background: none !important;
    position: relative !important;
    text-align: center !important;
  }
  #footer #footer_center *, #footer.second #footer_center * {
    position: static !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    box-sizing: border-box !important;
  }
  /* TOPに戻るボタン：幅をautoにして右切れを解消し中央配置 */
  #footer a img[src*="top_"], #footer.second a img[src*="top_"] {
    display: none !important;
  }
  #footer a:has(img[src*="top_"]), #footer.second a:has(img[src*="top_"]) {
    display: inline-block !important;
    width: auto !important;
    max-width: 100% !important;
    height: auto !important;
    padding: 8px 26px !important;
    margin: 0 auto 16px !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.85) !important;
    border-radius: 24px !important;
    background: rgba(255, 255, 255, 0.12) !important;
    text-decoration: none !important;
    font-size: 13px !important;
    font-weight: bold !important;
    letter-spacing: 0.05em !important;
    line-height: 1.4 !important;
  }
  #footer a:has(img[src*="top_"])::after, #footer.second a:has(img[src*="top_"])::after {
    content: "▲ TOPに戻る";
  }
  #footer iframe, #footer.second iframe {
    display: block !important;
    width: 100% !important;
    height: 220px !important;
    margin: 0 auto 14px !important;
    border: 0 !important;
  }
  .foot_txt, #footer.second #footer_center .foot_txt {
    width: 100% !important;
    text-align: center !important;
    margin: 10px 0 !important;
    color: #ffffff !important;
  }
  #footer.second #footer_center .foot_more {
    width: 100% !important;
    text-align: center !important;
    margin: 10px 0 !important;
  }
  #feed {
    width: 100% !important;
    margin: 12px auto !important;
    box-sizing: border-box !important;
  }
  #feed p {
    width: auto !important;
  }
}
