@media (max-width: 1024px) {

  /* ヘッダーのフォントを縮小 */
  header {
    font-size: 12px;
  }

  .mainviewWrapper img {
    width: 100%; /* 横幅に合わせてサイズを変更 */
    height: auto;
    margin: 20px auto;
  }

  /* ボタンを拡大 */
  .mainviewWrapper button {
    width: 70%;
    font-size: 40px;
  }

  /* 余白を減らす */
  .container {
    width: 90%;
    height: auto;
    margin: 20px 0;
  }

  #inquiryDetails {
    width: 70%;
    height: 10vh;/* スマホの画面サイズの10％ */
    max-width: 70%;
    max-height: 10vh;
    min-width: 70%;
    min-height: 10vh;
  }

  /* マウス用からタップ用に変更 */
  button:hover {
    filter: none;
    cursor: default;
  }

  button:active {
    filter: brightness(0.7);
  }
}

@media (max-width: 670px) {


  /* 横スクロールを防止するため */
  html,
  body {
    overflow-x: hidden;
  }

  header {
    height: 70px;
  }

  .headerRight {
    position: fixed;
    top: 70px;
    right: 0;
    width: 40%;
    height: 100vh;
    transform: translateX(100%); /* 右端に隠れている */
    transition: transform 0.3s ease; /* 開閉どちらにも適用される */
    background-image: url(image/hamburgermenu.jpg);
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    padding: 10px;
    z-index: 1;
    display: flex;
    flex-direction: column;
  }

  .menuToggle:checked ~ .headerRight {
    transform: translateX(0); /* 元の位置へ */
  }

  /* ハンバーガーアイコンを表示 */
  .headerMenu {
    display: flex;
    flex-direction: column;
    gap: 5px;
    top: 20px;
  }

  .headerMenu span {
    width: 30px;
    height: 3px;
    background: black;
  }

  .headerRight h2 {
    font-size: 15px;
  }

  .search {
    display: flex;
    margin-top: 10px;
  }

  #searchWord {
    width: 70%;
  }

  #scrollTarget {
    scroll-margin-top: 70px; /* ヘッダーの高さ分ずらす */
  }


  .mainviewWrapper {
    padding-top: 70px;
  }

  .mainviewWrapper img {
    width: 100%; /* 横幅に合わせてサイズを変更 */
    margin: 10px auto;
  }

  .mainviewWrapper button {
    width: 80%;
    font-size: 30px;
    height: 100px;
  }

  .container {
    width: 100%;
    height: auto;
    margin: 20px 0;
  }

  .container p {
    margin-left: 10px;
  }

  .apply p {
    font-size: 12px;
  }

  .applyItem {
    margin: 10px 0;
  }

  .infoFlex {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .infoNoBorder {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    height: auto;
    padding: 20px 0 10px 0;
  }

  .formIndent {
    width: 100%;
  }

  .formIndent p {
    font-size: large;
  }

  .inputIndent {
    width: 100%;
  }

  .formIndentLabel {
    width: 100%;
  }

  .formIndentLabel p {
    font-size: large;
  }

  .inputIndentLabel {
    width: 100%;
    margin-left: 10px;
  }

  #familyName,
  #lastName {
    width: 100px;
  }

  .alert {
    left: 0;
  }

  .textLength {
    width: 230px;
  }

  .marginLeft {
    margin-left: 20px;
  }

  #inquiryDetails {
    width: 65%;
    height: 20vh;
    max-width: 65%;
    max-height: 20vh;
    min-width: 65%;
    min-height: 20vh;
  }

  footer {
    font-size: 15px;
    height: 70px;
  }

}
