/* 全体のリセット */
body {
  margin: 0; /* 余白を完全にリセット */
  padding: 0; /* 内側の余白もリセット */
  font-family: "Noto Sans JP", "Helvetica Neue", "Zen Kurenaido", "Meiryo",
    "Helvetica", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Arial",
    "Yu Gothic", sans-serif;
  overflow-x: hidden;
  background-color: #e6dfdb;
  color: #3e3e3e;
} /* メディアクエリでスマホサイズに対応 */
@media (max-width: 768px) {
  /* ヒーローセクションの調整 */
  .hero {
    height: auto; /* 高さを自動調整 */
  }

  /* メニューアイコンの調整 */
  .menu-icon {
    top: 1%;
    right: 2px;
    transform: none; /* PC版で使用していない中央揃え解除 */
    width: 60px;
    position: fixed; /* 固定表示 */
    z-index: 1001; /* アイコンを前面に */
  }

  .menu-icon img {
    width: 100%; /* 親要素に合わせたサイズ */
    height: auto; /* アスペクト比を維持 */
  }

  .menu-icon #menuText {
    margin-top: 5px; /* PC版の間隔に調整 */
    color: rgb(243, 191, 191);
  }

  /* 猫の腕メニュー */
  .menu {
    position: fixed;
    top: 0; /* 初期位置は画面外 */
    right: 0;
    width: 100%;
    height: 100%; /* 高さを調整 */
    transform: translateY(-100%); /* 初期状態で画面外に移動 */
    background: url("images/menuArm.svg") no-repeat center top;
    background-size: contain;
    z-index: 1000;
    transition: transform 0.5s ease; /* スムーズなアニメーション */
  }

  .menu.show {
    top: 0;
    transform: translateY(0); /* `show` クラスで画面内にスライドイン */
  }

  /* メニュー項目 */
  .menu ul {
    padding: 10px 0; /* 上下の余白を設定 */
    margin: 0;
    list-style: none; /* リストマーカーを削除 */
    text-align: center;
    margin-top: 115px;
  }

  .menu ul li {
    margin: 35px 0; /* 各項目の間隔を設定 */
  }

  .menu ul li a {
    font-family: "Kaisei Decol", serif;
    text-decoration: none; /* 下線を削除 */
    color: #896a75; /* 通常時の色 */
    display: inline-block; /* ブロック化してホバー範囲を広げる */
    transition: color 0.3s, background-color 0.3s; /* スムーズなアニメーション */
  }

  /* ホバー時のスタイル */
  .menu ul li a:hover {
    color: #ff8b8b; /* ホバー時の文字色 */
    background-color: rgba(255, 200, 200, 0.2); /* ホバー時の背景色（任意） */
    text-decoration: none; /* ホバー時も下線をつけない */
  }
  /* ヒーロー画像の調整 */
  .hero-image video {
    object-fit: cover; /* PC版の配置方法を維持 */
    width: 100%;
    height: 100%;
  }

  /* コンセプトセクションの調整 */
  .concept-title {
    top: 34%;
    left: 65%;
    transform: translateX(-50%); /* 水平中央揃え */
  }

  .concept-catch {
    left: 68%;
    transform: translateX(-50%); /* 水平中央揃え */
  }

  /* ニュースセクションのスクロールバー */
  .news-container::-webkit-scrollbar {
    width: 8px;
  }

  .news-container::-webkit-scrollbar-thumb {
    background-color: #ee95ab;
    border-radius: 10px;
  }

  .news-container::-webkit-scrollbar-track {
    background-color: #f8f5f0;
  }

  /* 猫の詳細表示エリア */
  #cat-detail {
    margin-top: 20px;
    padding: 20px;

    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  }

  #cat-large-image {
    width: 100%; /* モバイル向けに幅を広げる */
    height: auto;
    border-radius: 8px;
    margin-bottom: 20px;
  }

  #cat-description {
    font-size: 1rem;
    color: #4a403a;
    line-height: 1.5;
  }
  /* モーダルの閉じるボタン */
  .close-btn {
    position: absolute;
    top: 10px; /* 画像の上部からの距離 */
    right: 10px; /* 画像の右端からの距離 */
    background: #fff; /* 背景色 */
    border: none;
    color: #333;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  }
  .back-to-top {
    display: none;
    position: fixed;
    bottom: 50px; /* ボタンをさらに上に移動 */
    right: 3px; /* 右端から少し左に寄せる */
    width: 80px; /* 画像を大きくする */
    height: 88px; /* アスペクト比を維持するため、同じ値に設定 */
    z-index: 100;
    cursor: pointer; /* カーソルをポインターに */
    transition: transform 0.3s ease, opacity 0.3s ease;
  }
  .contact-bg h2 {
    font-size: 20px;
    margin-bottom: 30px;
  }
  .contact-form input {
    padding: 4px;
    margin-bottom: 10px;
  }
  .contact-bg {
    height: 560px;
  }
  .rule-section h3 {
    margin-top: 40px;
  }

  /* スマホサイズ調整 */
  @media (max-width: 600px) {
    .pricing-cards {
      grid-template-columns: 1fr; /* スマホでは1列表示 */
    }

    .pricing-card {
      padding: 15px; /* スマホでは少し狭めに */
    }
  }
}

/* Fix cat modal image aspect on tablets */
@media (min-width: 601px) and (max-width: 1024px) {
  .cat-modal .modal-content {
    width: 80%; /* make modal slightly narrower on tablets */
    max-width: 80%;
  }
  .cat-modal .modal-content img {
    width: auto !important; /* let intrinsic width define size */
    height: auto !important; /* maintain natural aspect ratio */
    max-width: 100% !important; /* but never exceed container */
    object-fit: contain !important; /* avoid cropping */
  }
}

/* Extend tablet fix to all larger screens */
@media (min-width: 601px) {
  .cat-modal .modal-content {
    width: 80%; /* keep modal narrower on tablets and above */
    max-width: 80%;
  }
  .cat-modal .modal-content img {
    width: auto !important; /* intrinsic width */
    height: auto !important; /* natural aspect ratio */
    max-width: 100% !important; /* never exceed container width */
    object-fit: contain !important; /* no cropping */
  }
}
