  *,
  *::before,
  *::after {
   box-sizing: border-box;
  }
  
  /* お問い合わせフォームセクション */
  .form-heading {
    margin-top: 80px; /* フォーム用のh2の上に余白を追加 */
  }
  
  
  .contact-form {
    max-width: 56%;
    padding: 20px; /* 全体の内側余白 */
    margin: 0 auto; /* セクション全体の余白をリセット */
    background-color: transparent; /* ページ全体の背景と同化 */
  }
  
  .contact-form h2 {
    font-size: 2rem;
    text-align: center;
    color: #050505; /* 見出しをアクセントカラーに設定 */
    margin-bottom: 40px;
  }
  
  .contact-form p {
    text-align: center;
    font-size: 1rem;
    color: #666;
    margin-bottom: 50px;
  }

  .note {
    padding-top: 30px !important;
    font-size: 0.9rem; /* 少し小さめの文字 */
    color: #555; /* 落ち着いたグレー */
  }
  
  /* フォームグループ */
  .form-group {
    display: flex;
    flex-wrap: wrap; /* 入力ボックスを折り返し可能に */
    gap: 30px; /* ラベルと入力ボックスの左右間隔 */
    justify-content: space-between;
    align-items: center; /* 縦方向で中央揃え */
    margin-bottom: 35px; /* 行間を狭く設定 */
  }
  
  .form-group label {
    flex: 0 0 30%; /* ラベル幅 */
    flex-shrink: 0; /* ラベルのサイズを固定（入力ボックスの縮小に影響されない） */
    font-weight: normal;
    margin-right: 10px; /* ラベルと入力ボックスの間隔を設定 */
    margin-bottom: 10px;
  }
  
  .form-group input {
    flex-grow: 1; /* 入力ボックスを残りの幅いっぱいに拡大 */
    padding: 18px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    margin-bottom: 10px; /* 携帯表示で縦間隔を確保 */
  }
  
  .form-group input:focus {
    border-color: #ff6f61;
    outline: none;
  }

  .form-group textarea {
    width: 100%; /* 幅を全体に広げる */
    padding: 10px;
    font-size: 1rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    resize: vertical; /* ユーザーが縦方向のみリサイズ可能に */
    min-height: 100px; /* 最低の高さを設定 */
  }
  
  .form-group textarea:focus {
    border-color: #ff6f61; /* フォーカス時の強調 */
    outline: none;
  }

  
  
  /* チェックボックスグループ */
  .checkbox-group {
    flex: 1; /* 残り幅を占有 */
    display: flex;
    flex-wrap: wrap; /* 横方向に自由に配置 */
    gap: 5px; /* チェックボックス間の余白を広く */
    margin-top: 20px; /* ラベルとのスペースを広く */
    align-items: flex-start; /* 左寄せにする */;
    flex-direction: row; /* 横並び */
    justify-content: flex-start;
  }
  
  .checkbox-group label {
    display: inline-block;
    font-weight: normal;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
    text-align: left; /* テキストを左揃え */
    width:150px;
  }
  
  .checkbox-group input[type="radio"] {
    margin: 0;
    padding:0;
  }
  
  .checkbox-label {
    display: flex;
    align-items: center; /* 縦位置を揃える */
    gap: 10px; /* チェックボックスとテキストの間の余白 */
    max-width: 120px; /* 最大幅を制限 */
    min-width: 120px; /* 最小幅を指定 */
  }

  .label-text {
  display: inline;
  width: 150px; /* 必要に応じて調整 */
  text-align: left;
}
  
  /* ボタン */
  .contact-form button {
    width: 100%;
    padding: 15px;
    background-color: #ff6f61;
    color: white;
    border: none;
    font-size:1.0em;
    font-weight: bold;
    cursor: pointer;
    border-radius: 5px;
    transition: background-color 0.3s;
  }
  
  .contact-form button:hover {
    background-color: #e65c53;
  }
  
  /* 携帯表示対応 */
  @media screen and (max-width: 768px) {
    .form-heading {
      margin-top: 80px; /* フォーム用のh2の上に余白を追加 */
    }

    .contact-form {
      max-width: 70%;
      padding: 20px; /* 全体の内側余白 */
      margin: 0 auto; /* セクション全体の余白をリセット */
      background-color: transparent; /* ページ全体の背景と同化 */
    }

    .contact-form h2 {
      font-size: 1.65rem; /* 表題のフォントサイズを小さく設定 */
    }

    .form-group {
      display: flex;
      flex-direction: column; /* フォーム項目を縦並び */
      align-items: flex-start; /* 左寄せ */
      /* gapをゼロにして、フォーム全体の余白は margin-bottom で管理 */
      gap: 0 !important; 
      margin-bottom: 20px !important;  /* 次の項目との間隔 */
      flex-wrap: nowrap; /* 折り返しを無効化 */
      gap: 10px; /* ラベルと入力ボックスの間隔を縮小 */
      justify-content: flex-start; /* 左揃えに変更 */
    }
  
    .form-group label {
      margin: 0 0 5px 0 !important; /* 下だけ5px */
      line-height: 1.2;            /* 文字が大きければ調整 */
      font-size: 0.95rem;          /* 適宜調整 */
      display: block;              /* ブロック要素化 */
    }
  
    .form-group input {
      width: 100%; /* 入力ボックスを幅いっぱいに */
      font-size: 1rem; /* 入力文字のサイズを調整 */
      margin-top: 0; /* 上の余白を削除 */
      margin-bottom: 5px; /* 入力欄の下の余白を調整 */
    }

    .form-group textarea {
      margin-bottom: 5px; /* 入力欄の下の余白を調整 */
    }

    .form-group input,
    .form-group textarea {
     display: block;              /* 同じくブロック要素に */
     margin: 0 !important;        /* デフォルトの余白を消す */
     padding: 10px;               /* 入力欄の内側余白はお好みで */
     font-size: 1rem;             /* 文字サイズも適宜 */
     line-height: 1.3;
    }

    .horizontal-group {
      flex-direction: row !important;  /* 強制的に横並び */
      align-items: center !important;  /* 縦方向を中央に */
    }
  
  
    .checkbox-group {
      width: auto !important; /* 固定幅を解除 */
      overflow-x: auto; /* 横スクロールを許可（必要なら） */
      display: flex !important; /* 明示的に横並びを強制 */
      flex-direction: row !important; /* 横並びを維持 */
      flex-wrap: nowrap !important; /* 折り返しを防止 */
      gap: 55px; /* チェックボックス間の間隔 */
      overflow-x: auto; /* 横スクロールを許可（必要に応じて） */
      justify-content: flex-start; /* 左揃えにする */
      margin-top: 0!important; /* チェックボックスグループ上部の余白を完全に排除 */
      margin-bottom: 30px !important; /* 次の設問との境界を広げる */
    }
    .checkbox-group label {
      display: flex !important;       /* 横並びにする */
      align-items: center !important;  /* 子要素の縦位置を揃える */
      gap: 8px !important;             /* ラジオボタンとテキストの間隔 */
      width: auto !important;          /* 固定幅を解除 */
      margin: 0 !important;
      padding: 0 !important;
    }
      /* 次に、ラジオボタン自体が余分な幅を取らないようにする */
  .checkbox-group input[type="radio"] {
    flex: 0 0 auto;
    margin: 0;
    width: auto;
  }

    label {
      margin-bottom: 2px !important; /* モバイル時のラベルとフィールド間隔を詰める */
    }

      /* 最後に、テキスト部分のスタイルを調整 */
  .checkbox-group .label-text {
    display: inline-block !important;
    width: auto !important;           /* 固定幅を解除 */
    white-space: nowrap !important;   /* 改行を防止 */
    overflow: visible !important;      /* 隠さずに表示 */
    text-overflow: clip !important;     /* 省略記号も出さない */
  }
}

  .checkbox-label {
    display: flex; /* 横並びに設定 */
    flex: 1 0 auto; /* 子要素の幅を自動調整 */
    align-items: center; /* テキストとチェックボックスの縦位置を揃える */
    gap: 8px; /* チェックボックスとテキストの間隔 */
      /* 幅を固定しない */
    max-width: none; 
    min-width: 0;   
    width: auto !important; /* 固定幅を解除 */
    /* 改行を防ぐ */
    white-space: nowrap;
  }

  .label-text {
    width: auto !important; /* 固定幅を解除 */
    display: inline !important; /* インライン表示（デフォルト） */
    white-space: nowrap !important; /* テキストの改行を防止 */
    overflow: hidden; /* はみ出した場合に隠す */
    text-overflow: ellipsis; /* 長い場合に省略記号を表示 */
  }

  .contact-form button {
    box-sizing: border-box;   /* パディングも幅に含める */
    width: 100%;              /* 親要素の幅に合わせる */
    padding: 15px;            /* 入力欄と同じように */
    margin: 0;                /* 余分なマージンがあればリセット */
  }

  @media screen and (max-width: 430px) {
    /* フォーム全体の設定 */
    .contact-form {
      max-width: 85%;  /* FAQの幅を80%に変更 */
      padding: calc(20px * 0.55);
      margin: 0 auto;
      background-color: transparent;
    }
    .break-md::after {
      content: "\A";
      white-space: pre;  /* 改行を有効にする */
      display: block;
      line-height: 0.05;
    }
    
    .form-heading {
      margin-top: calc(80px * 0.55);
    }
    
    .contact-form h2 {
      font-size: calc(2rem * 0.55);
      margin-bottom: calc(40px * 0.55);
      text-align: center;
      color: #050505;
    }
    
    .contact-form p {
      font-size: calc(1rem * 0.55);
      margin-bottom: calc(50px * 0.55);
      text-align: center;
      color: #666;
    }
    
    .note {
      padding-top: calc(30px * 0.55) !important;
      font-size: calc(0.9rem * 0.55);
      color: #555;
    }
    
    /* フォームグループ */
    .form-group {
      display: flex;
      flex-wrap: wrap;
      gap: calc(30px * 0.55);
      justify-content: space-between;
      align-items: left;
      margin-bottom: calc(35px * 0.55);
    }
    
    .form-group label {
      flex: 0 0 30%;
      margin-right: calc(10px * 0.55);
      margin-bottom: calc(10px * 0.55);
      font-size: 0.65em;  /* 通常時の文字サイズの55% */
      text-align: left;
      font-weight: normal;
    }
    
    .form-group input {
      flex-grow: 1;
      padding: calc(18px * 0.55);
      border: 1px solid #ddd;
      border-radius: calc(5px * 0.55);
      font-size: calc(1rem * 0.65);
      margin-bottom: calc(10px * 0.55);
    }
    
    .form-group input:focus {
      border-color: #ff6f61;
      outline: none;
    }
    
    .form-group textarea {
      width: 100%;
      padding: calc(10px * 0.55);
      font-size: calc(1rem * 0.65);
      border: 1px solid #ddd;
      border-radius: calc(5px * 0.55);
      resize: vertical;
      min-height: calc(100px * 0.55);
    }
    
    .form-group textarea:focus {
      border-color: #ff6f61;
      outline: none;
    }
    
    /* チェックボックスグループ */
    .checkbox-group {
      flex: 1;
      display: flex;
      flex-wrap: wrap;
      gap: calc(5px * 0.55);
      margin-top: calc(20px * 0.55);
      align-items: flex-start;
      flex-direction: row;
      justify-content: flex-start;
    }
    
    .checkbox-group label {
      display: inline-block;
      padding: calc(10px * 0.55) calc(15px * 0.55);
      width: calc(150px * 0.55);
      font-size: 0.55em;  /* 文字サイズを55%に */
      text-align: left;
      font-weight: normal;
      border-radius: calc(5px * 0.55);
      cursor: pointer;
    }
    
    .checkbox-group input[type="radio"] {
      margin: 0;
      padding: 0;
    }
    
    .checkbox-label {
      display: flex;
      align-items: left;
      gap: calc(10px * 0.55);
      max-width: calc(120px * 0.75);
      min-width: calc(120px * 0.75);
    }
    
    .label-text {
      display: inline;
      width: calc(150px * 0.55);
      text-align: left;
    }
    
    /* ボタン */
    .contact-form button {
      width: 100%;
      padding: calc(15px * 0.55);
      background-color: #ff6f61;
      color: white;
      border: none;
      font-size: calc(1.0em * 0.65);
      font-weight: bold;
      cursor: pointer;
      border-radius: calc(5px * 0.55);
      transition: background-color 0.3s;
    }
    
    .contact-form button:hover {
      background-color: #e65c53;
    }
  }
  

   