/* SP対応CSS - 768px以下で適用 */
@media screen and (max-width: 768px) {

  /* 基本設定 */
  body,
  #container,
  #wrapper,
  #header,
  #header div {
    width: 100%;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
  }

  #header h1 {
    width: 100%;
    font-size: 18px;
  }

  #header2 {
    font-size: 12px;
    padding: 10px;
  }

  #header2 table {
    width: 100%;
  }

  #header2 td {
    display: block;
    width: 100%;
    margin-bottom: 10px;
  }

  /* レイアウト */
  #wrapper {
    display: block;
    width: 100%;
  }

  #left {
    display: none;
    width: 100%;
    margin-bottom: 20px;
  }

  #content,
  #right {
    width: 100%;
    padding: 10px;
    box-sizing: border-box;
  }

  /* 検索メニュー */
  #search_kamoku,
  #search_name,
  #search_map,
  #search_syoujou,
  #search_keyword {
    width: 100%;
    margin-bottom: 15px;
  }

  .selectmenu select {
    width: 100% !important;
    font-size: 14px;
    padding: 8px;
  }

  #search_syoujou .search_list_bg2,
  #search_keyword .search_list_bg {
    column-count: 1 !important;
    padding: 10px;
  }

  #search_syoujou ul,
  #search_keyword ul {
    padding-left: 20px;
  }

  #search_syoujou li,
  #search_keyword li {
    font-size: 14px;
    margin-bottom: 8px;
  }

  .search_google_howto {
    text-align: center;
    margin: 10px 0;
  }

  .search_google_howto img {
    width: 100%;
    max-width: 100%;
    height: auto;
  }

  .symptom-lists-wrapper .shoujou-list,
  .splide__pagination {
    display: none;
  }

  /* タブパネル */
  .TabbedPanels {
    width: 100%;
  }

  .TabbedPanelsTabGroup {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    width: 100%;
    height: auto;
    margin-bottom: 15px;
  }

  .TabbedPanelsTab {
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 0;
    cursor: pointer;
    transition: all 0.3s ease;
    line-height: 1.5;
    margin: -1px 0 0 -1px;
    width: auto;
    font-size: 12px;
    padding: 8px 3px;
    background-image: none;
    background: #618fcc;
  }

  .TabbedPanelsTabSelected {
    background-color: #fff;
    color: #000;
    border-color: #999;
  }

  .TabbedPanelsContentGroup {
    border: 1px solid #ccc;
  }

  #search .borderbottom {
    display: none;
  }

  .TabbedPanelsContent table {
    width: 100%;
  }

  .TabbedPanelsContent td {
    display: block;
    width: 100%;
    margin-bottom: 20px;
  }

  .TabbedPanelsContent ul {
    padding-left: 20px;
    columns: 1;
  }

  .TabbedPanelsContent li {
    font-size: 14px;
    margin-bottom: 6px;
  }

  .tabpanel,
  .tabpanel2 {
    font-size: 14px;
    margin: 10px 0 !important;
    padding-bottom: 10px;
    border-bottom: 2px solid #333;
  }

  /* 症状画像マップ */
  #search img[usemap] {
    display: none;
  }

  .symptom-map-container {
    background-image: url(/images/top/navi_syoujou.png);
    background-position: bottom center;
    background-repeat: no-repeat;
    background-size: auto;
    width: 100%;
    height: 450px;
    text-align: center;
    margin-bottom: 15px;
  }

  /* コラムセクション */
  .top_column_category {
    margin-bottom: 20px;
  }

  .top_column_category table {
    width: 100%;
  }

  .top_column_photo {
    text-align: center;
    margin: 10px 15px 0px 0px;
    width: 80px;
  }

  .top_column_photo img {
    width: 100%;
    max-width: 150px;
    height: auto;
  }

  .top_ttl_column2 {
    font-size: 16px;
    margin: 10px 0;
  }

  .top_column_textby {
    font-size: 12px;
    margin: 5px 0;
  }

  .top_column_txt {
    font-size: 14px;
    line-height: 1.6;
  }

  .top_column_next {
    margin-top: 10px;
  }

  .top_column_next img {
    width: 100%;
    max-width: 120px;
    height: auto;
  }

  /* 右サイドバー */
  #news,
  #kyujitsu,
  #links {
    width: 100%;
    margin-bottom: 15px;
  }

  .right_content_bg {
    padding: 10px;
  }

  .right_content_bg ul {
    padding-left: 20px;
  }

  .right_content_bg li,
  .right_content_bg p {
    font-size: 13px;
    margin-bottom: 8px;
  }

  .right_content_bg p {
    margin: 8px 0;
  }

  /* Facebook埋め込み */
  iframe {
    width: 100% !important;
    max-width: 100%;
  }

  /* リストセクション */
  #list {
    padding: 10px;
  }

  .ttl_kihonform {
    font-size: 16px;
    margin: 15px 0 10px 0;
  }

  #listinside table {
    width: 100%;
  }

  #listinside tr {
    display: block;
    margin-bottom: 20px;
  }

  #listinside td {
    display: block;
    width: 100%;
    margin-bottom: 10px;
  }

  .midashi {
    font-size: 18px;
    font-weight: bold;
    padding: 10px;
    background-color: #f0f0f0;
    margin-bottom: 10px;
  }

  #listinside strong {
    display: block;
    font-size: 14px;
    margin: 10px 0 5px 0;
    border-bottom: 1px solid #ccc;
    padding-bottom: 5px;
  }

  #listinside ul {
    padding-left: 20px;
    column-count: 1 !important;
  }

  #listinside li {
    font-size: 13px;
    margin-bottom: 6px;
  }

  /* フッター / 汎用 */
  #footer {
    font-size: 12px;
    padding: 15px 0;
    text-align: center;
    width: 100%;
  }

  .clear {
    clear: both;
  }

  h2 {
    font-size: 16px;
  }

  h3 {
    font-size: 14px;
  }

  a {
    font-size: inherit;
  }

  /* 画像最適化 */
  img {
    max-width: 100%;
    height: auto;
    display: block;
  }

  /* カルーセル関連 */
  .splide {
    display: block;
    position: relative;
    top: 250px;
  }

  .splide__slide .slide_inner {
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    border-radius: 5px;
    width: 60%;
    max-width: 250px;
    padding: 1em;
    margin: auto;
    text-align: left;
    height: 140px;
  }

  .splide__slide .slide_inner a {
    display: inline-flex;
    font-size: 13px;
    margin-right: 1em;
  }

  .splide__slide .slide_inner a::before {
    content: "⚫︎";
  }

  .slide_inner p {
    margin: 0 0 5px 0;
    padding: 5px;
    font-size: 1.4em;
    font-weight: 800;
    background: linear-gradient(180deg, rgba(245, 218, 80, 1), rgba(255, 255, 255, 1));
  }

  .category-dansei .slide_inner p {
    color: #0d106f;
    background: linear-gradient(180deg, rgba(196, 219, 251, 1), rgba(255, 255, 255, 1));
  }

  .category-kodomo .slide_inner p {
    color: #0a5224;
    background: linear-gradient(180deg, rgba(199, 247, 187, 1), rgba(255, 255, 255, 1));
  }

  .category-kokoro .slide_inner p {
    color: #71319a;
    background: linear-gradient(180deg, rgba(221, 205, 247, 1), rgba(255, 255, 255, 1));
  }

  .category-josei .slide_inner p {
    color: #e51e52;
    background: linear-gradient(180deg, rgba(253, 210, 224, 1), rgba(255, 255, 255, 1));
  }

  /* スマートフォン用 Facebook 埋め込み（アスペクト比保持） */
  .facebook-wrapper {
    max-width: 100%;
    margin: 0 auto;
  }

  .facebook-container {
    position: relative;
    width: 100%;
    padding-top: 100%; /* アスペクト比を保持 */
  }

  .facebook-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
  }

  .facebook-wrapper,
  .facebook-container,
  .facebook-container iframe {
    width: 100% !important;
    max-width: 100% !important;
  }

  .facebook-plugin {
    display: none;
  }

  /* 一覧テーブル（レスポンシブ） */
  #ichiran table {
    text-align: center;
  }

  #ichiran tr {
    border: solid 1px #999;
  }

  #ichiran th {
    display: none;
  }

  #ichiran td {
    display: block;
    border: none;
    padding: 0 1em;
  }

  #ichiran td:first-child {
    padding-top: 1em;
  }

  #ichiran td:last-child {
    padding-bottom: 1em;
  }

  .ttl_search {
    background-color: #eee;
    border: solid 1px #bbb;
    width: calc(100% - 10px);
    margin-right: 0;
    padding: 10px 5px;
    max-width: 100%;
    font-size: 14px;
    height: auto;
    background-image: none;
  }

  .menu_h2_2 {
    border: solid 1px #618fcc;
    background-color: #618fcc;
    padding: 5px;
    color: #fff;
  }
  #map {
    width: 100%!important;
  }
}
