/* =============================
   🌿 ベーススタイル
============================= */
.nav-btn.active {
  background-color: #10b981;
  color: white;
}
.nav-btn:hover {
  background-color: #f3f4f6;
}
.nav-btn.active:hover {
  background-color: #059669;
}

/* カード */
.account-card {
  transition: all 0.3s ease;
  transform: translateY(0);
  height: 100%;
  display: flex;
  flex-direction: column;
}
.account-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1),
              0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* アニメーション */
.fade-in { animation: fadeIn 0.5s ease-in; }
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* セレクト */
.custom-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
  background-position: right 0.5rem center;
  background-repeat: no-repeat;
  background-size: 1.5em 1.5em;
  padding-right: 2.5rem;
}
.custom-checkbox { accent-color: #ea580c; }

/* スクロールバー */
.custom-scrollbar::-webkit-scrollbar { width: 6px; }
.custom-scrollbar::-webkit-scrollbar-track { background: #f1f5f9; border-radius: 3px; }
.custom-scrollbar::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; }
.custom-scrollbar::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* モーダル */
.modal-enter { animation: modalEnter 0.3s ease-out; }
@keyframes modalEnter {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

/* =============================
   🔍 検索フォーム
============================= */
#search-form { margin-bottom: 2rem; }

#search-form .search-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
}
#search-form .search-grid > div { width: 48%; }

@media (max-width: 360px) {
  #search-form .search-grid > div { width: 100%; }
}

#search-form select,
#search-form input {
  width: 100%;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  height: 44px;
  padding: 0 10px;
  font-size: 0.95rem;
}

#search-form #search-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 42px;
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  background-image: linear-gradient(to right, var(--tw-gradient-from, #f97316), var(--tw-gradient-to, #ef4444));
  border: none;
  border-radius: 10px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
  cursor: pointer;
  transition: all 0.25s ease;
  margin-top: 10px;
}
#search-form #search-btn:hover { filter: brightness(1.05); transform: translateY(-1px); }
@media (max-width: 480px) {
  #search-form #search-btn { height: 38px; font-size: 0.9rem; border-radius: 8px; }
}

/* =============================
   🧡 こだわり条件（安定版）
============================= */
#search-form .filter-section {
  display: flex;
  flex-direction: column; /* ← 縦並び固定 */
  gap: 6px;
  align-items: flex-start;
  width: 100%;
  box-sizing: border-box;
}

#search-form .filter-section label {
  display: flex;
  align-items: center;
  font-size: 0.95rem;
  line-height: 1.3;
  color: #374151;
  white-space: normal;
  word-break: break-word;
}

#search-form .filter-section input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin-right: 8px;
  flex-shrink: 0;
  accent-color: #f97316;
}

@media (max-width: 480px) {
  #search-form .filter-section { gap: 4px; }
  #search-form .filter-section label { font-size: 0.9rem; }
}

/* =============================
   🪄 その他補正
============================= */
html, body {
  overflow-x: hidden !important;
  width: 100%;
}

/* ====== ヒーロータイトル（見切れ防止・端末共通） ====== */
.hero-container {
  max-width: 100vw;
  overflow-x: hidden;
  padding: 0 12px;           /* 端ギリ防止の左右余白 */
  box-sizing: border-box;
}

.hero-title {
  display: block;
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  color: #111827;
  font-weight: 800;
  line-height: 1.25;         /* つめ過ぎ防止 */
  /* 画面幅に応じて自動で縮小（下限18px〜上限28px） */
  font-size: clamp(18px, 5.2vw, 28px);

  /* 見切れ防止のため、基本は改行OKにしておく */
  white-space: normal;
  /* CJK でもはみ出し時に強制的に折り返す最終手段 */
  overflow-wrap: anywhere;   /* = word-break: break-word の上位互換 */
  word-break: keep-all;      /* 日本語の自然な改行を優先 */
  text-wrap: balance;        /* 対応ブラウザで見栄え良く改行 */
}

/* かなり小さい端末向けの微調整 */
@media (max-width: 360px) {
  .hero-title {
    font-size: clamp(16px, 5.6vw, 22px);
    line-height: 1.3;
  }
}


/* ============================
   💚 こだわり条件専用スタイル
   （都道府県などのselectとは完全分離）
============================ */

/* コンテナ設定 */
#search-form .filter-section {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  width: 100%;
  box-sizing: border-box;
  margin-top: 8px;
}

/* ラベル設定 */
#search-form .filter-section label {
  display: flex;
  align-items: center;
  font-size: 0.9rem;
  color: #374151;
  line-height: 1.4;
  cursor: pointer;
  user-select: none;
}

/* ✅ チェックボックス（独立定義） */
#search-form .filter-section input[type="checkbox"].filter-checkbox {
  width: 16px;
  height: 16px;
  margin-right: 8px;
  accent-color: #f97316; /* orange-500 */
  flex-shrink: 0;
  transform: scale(0.9); /* やや小さめ */
  cursor: pointer;
}

/* モバイル時 */
@media (max-width: 480px) {
  #search-form .filter-section label {
    font-size: 0.85rem;
  }
  #search-form .filter-section input[type="checkbox"].filter-checkbox {
    width: 14px;
    height: 14px;
    transform: scale(0.85);
  }
}

/* ============================
   💚 こだわり条件専用レイアウト修正
   （1列整列＆バランス調整）
============================ */

/* こだわり条件コンテナ */
#search-form #filters-content {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* 各行を横並びにし、折り返さない */
#search-form #filters-content > div {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  flex-wrap: nowrap;
  width: 100%;
}

/* チェックボックス */
#search-form #filters-content input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #f97316; /* orange-500 */
  flex-shrink: 0;
  margin: 0;
}

/* テキストラベル */
#search-form #filters-content label {
  font-size: 0.95rem;
  color: #374151;
  font-weight: 500;
  line-height: 1.4;
  white-space: normal;
}

/* モバイル時の微調整 */
@media (max-width: 480px) {
  #search-form #filters-content {
    gap: 6px;
  }
  #search-form #filters-content input[type="checkbox"] {
    width: 16px;
    height: 16px;
  }
  #search-form #filters-content label {
    font-size: 0.9rem;
  }
}

/* ============================
   💚 こだわり条件＋ボタンの整列修正
============================ */

/* こだわり条件セクション全体を縦並びに固定 */
#search-form .filter-section-wrapper {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  box-sizing: border-box;
}

/* こだわり条件のチェック群 */
#search-form #filters-content {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
}

/* 各チェックボックス行 */
#search-form #filters-content > div {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
  width: 100%;
}

/* チェックボックス */
#search-form #filters-content input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #f97316;
  flex-shrink: 0;
  margin: 0;
}

/* ラベル */
#search-form #filters-content label {
  font-size: 0.95rem;
  color: #374151;
  line-height: 1.4;
}

/* 絞り込みボタンの配置（条件の下に固定） */
#search-form .filter-submit {
  display: flex;
  justify-content: center;
  margin-top: 10px;
  width: 100%;
}

/* ボタンのスタイル統一 */
#search-form .filter-submit button {
  background-image: linear-gradient(to right, #f97316, #ef4444);
  color: white;
  font-weight: 600;
  padding: 10px 20px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  width: 100%;
  max-width: 300px;
}

#search-form .filter-submit button:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
}

/* モバイル対応 */
@media (max-width: 480px) {
  #search-form .filter-submit button {
    width: 100%;
    font-size: 0.9rem;
    padding: 8px 14px;
  }
}

/* ============================
   💚 こだわり条件（SearchForm構造維持・表示安定版）
============================ */

/* こだわり条件コンテナ */
#search-form #filters-content {
  display: none; /* デフォルト非表示（JSで切替） */
  flex-direction: column;
  gap: 8px;
  background-color: #fff7ed; /* orange-50 */
  border: 2px solid #fed7aa; /* orange-200 */
  border-radius: 8px;
  padding: 12px 14px;
  margin-top: 12px;
  transition: all 0.3s ease;
  box-sizing: border-box;
}

/* 表示状態時に出す */
#search-form #filters-content.active {
  display: flex;
}

/* 各行（1行ごとに横並び） */
#search-form #filters-content .filter-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
}

/* チェックボックス */
#search-form #filters-content input[type="checkbox"].custom-checkbox {
  width: 18px;
  height: 18px;
  accent-color: #f97316;
  flex-shrink: 0;
  margin: 0;
  cursor: pointer;
}

/* ラベル */
#search-form #filters-content label {
  font-size: 0.95rem;
  color: #374151;
  font-weight: 500;
  cursor: pointer;
  white-space: normal;
}

/* 見出し */
#search-form #filters-content p {
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 4px;
}

/* モバイル最適化 */
@media (max-width: 480px) {
  #search-form #filters-content {
    padding: 10px;
  }

  #search-form #filters-content input[type="checkbox"].custom-checkbox {
    width: 16px;
    height: 16px;
  }

  #search-form #filters-content label {
    font-size: 0.9rem;
  }
}

/* ==============================
   ✅ こだわり条件の最終安定版
============================== */

/* デフォルトでは非表示（hidden クラスまたは JSで制御） */
#search-form #filters-content.hidden {
  display: none !important;
}

/* 表示時 */
#search-form #filters-content {
  display: flex !important;
  flex-direction: column;
  gap: 8px;
  background-color: #fff7ed; /* orange-50 */
  border: 2px solid #fed7aa; /* orange-200 */
  border-radius: 8px;
  padding: 12px 14px;
  margin-top: 12px;
  transition: all 0.3s ease;
  box-sizing: border-box;
}

/* 各行を横並びに整列 */
#search-form #filters-content > div {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
  width: 100%;
}

/* チェックボックスの見た目 */
#search-form #filters-content input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #f97316;
  flex-shrink: 0;
  margin: 0;
}

/* ラベル */
#search-form #filters-content label {
  font-size: 0.95rem;
  color: #374151;
  font-weight: 500;
  line-height: 1.4;
  cursor: pointer;
  white-space: normal;
}

/* モバイル微調整 */
@media (max-width: 480px) {
  #search-form #filters-content {
    padding: 10px;
  }
  #search-form #filters-content input[type="checkbox"] {
    width: 16px;
    height: 16px;
  }
  #search-form #filters-content label {
    font-size: 0.9rem;
  }
}

/* ==============================
   💬 検索結果カテゴリバッジ（薄灰色丸囲み）
============================== */

.category-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 10px;
  border-radius: 9999px; /* 丸型 */
  font-size: 0.85rem;
  font-weight: 600;
  color: #4b5563; /* text-gray-700 */
  background-color: #f3f4f6; /* bg-gray-100 */
  border: 1px solid #d1d5db; /* border-gray-300 */
  white-space: nowrap;
  line-height: 1.2;
}

/* モバイル最適化 */
@media (max-width: 480px) {
  .category-badge {
    font-size: 0.8rem;
    padding: 3px 8px;
  }
}

/* =============================
   📸 Instagramボタン（検索画面用）
============================= */
/* =============================
   📸 Instagramボタン（検索画面専用・160px）
============================= */
.insta_btn2 {
  color: #FFF;
  border-radius: 7px;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 50px;
  width: 160px; /* ✅ 検索画面は160px固定 */
  font-size: 18px;
  font-weight: 600;
  background: linear-gradient(135deg, #427eff 0%, #f13f79 70%) no-repeat;
  border: none;
  text-decoration: none;
  transition: all 0.3s ease;
  overflow: hidden;
}

.insta_btn2 .fa-instagram {
  font-size: 26px;
  line-height: 1;
}

.insta_btn2 span {
  display: inline-block;
  transition: 0.5s;
}

.insta_btn2:hover span {
  transform: rotateX(360deg);
}


/* =============================
   📸 Instagramボタン（詳細画面専用・独立サイズ）
============================= */
.insta_btn_detail {
  color: #FFF;
  border-radius: 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 50px;
  width: 190px; /* ✅ 詳細画面専用のサイズ（LINEと統一） */
  font-size: 20px;
  font-weight: 600;
  background: linear-gradient(135deg, #427eff 0%, #f13f79 70%) no-repeat;
  text-decoration: none;
  transition: all 0.3s ease;
}

.insta_btn_detail .fa-instagram {
  font-size: 30px;
  line-height: 1;
}

.insta_btn_detail span {
  display: inline-block;
  transition: 0.5s;
}

.insta_btn_detail:hover span {
  transform: rotateX(360deg);
}


/* =============================
   💚 LINEボタン（Instagramと統一デザイン）
============================= */
.line-add-btn {
  display: inline-block;
  height: 50px;
  width: 190px;
  border-radius: 7px;
  overflow: hidden;
  background-color: #06c755; /* LINEのブランドカラー */
  text-align: center;
  line-height: 50px;
  color: white;
  font-size: 20px;
  font-weight: bold;
  text-decoration: none;
  position: relative;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.line-add-btn:hover {
  transform: scale(1.05);
  opacity: 0.9;
}

.line-add-btn img {
  height: 100%;
  width: 100%;
  object-fit: cover;
  border-radius: 7px;
}

/* 入力UIの視認性UP（スマホ優先） */
.custom-select{
  width:100%;border:1px solid #d1d5db;border-radius:10px;height:44px;padding:0 12px;font-size:16px;background:#fff
}
.custom-select:focus{outline:none;box-shadow:0 0 0 3px rgba(251,146,60,.25)}

/* 画像角丸陰影（高齢者にも視認性◎） */
img{image-rendering:auto}

/* ===============================
   検索モーダル共通スタイル
   =============================== */

.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}
.modal.show {
  display: flex;
}
.modal .panel {
  background: #fff;
  border-radius: 10px;
  width: 90%;
  max-width: 900px;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.modal .card {
  display: flex;
  flex-direction: column;
  height: 100%;
}
.modal .head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid #eee;
}
.modal .body {
  flex: 1;
  overflow-y: auto;
  padding: 15px;
}
.modal .foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 10px 16px;
  border-top: 1px solid #eee;
}

/* ===============================
   モーダル内部のリスト構造
   =============================== */

.grid-3 {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 0;
  height: 100%;
}

.side-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-right: 1px solid #ddd;
  background: #fafafa;
  overflow-y: auto;
}
.side-list li {
  border-bottom: 1px solid #eee;
}
.side-btn {
  display: block;
  width: 100%;
  padding: 10px 12px;
  text-align: left;
  background: transparent;
  border: none;
  font-size: 14px;
  cursor: pointer;
}
.side-btn.active {
  background: #f0f0f0;
  font-weight: bold;
}

.pref-block {
  border-bottom: 1px solid #eee;
  padding: 8px 0;
}
.pref-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.city-block {
  padding-left: 12px;
}
.city-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 3px 0;
}
.inner {
  padding-left: 14px;
  margin-top: 4px;
}
.hidden {
  display: none;
}

.opt {
  display: block;
  padding: 4px 0;
  font-size: 14px;
}

.checkbox {
  margin-right: 6px;
}
.toggle {
  background: transparent;
  border: none;
  cursor: pointer;
  font-weight: bold;
  font-size: 16px;
  color: #444;
}

/* 検索条件選択エリア */
.search-condition {
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}
.cond-row {
  /* display: flex; */
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  border-bottom: 1px solid #eee;
  cursor: pointer;
}
.cond-row:last-child {
  border-bottom: none;
}
.cond-label {
  font-weight: 600;
}
.cond-value {
  flex: 1;
  text-align: right;
  color: #666;
  margin-right: 8px;
}
.cond-arrow {
  color: #888;
}

/* スライドページコンテナ */
#slide-container {
  position: fixed;
  inset: 0;
  overflow: hidden;
  z-index: 2000;
}

/* 各ページ */
.slide-page {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #fff;
  transform: translateX(100%);
  transition: transform 0.35s ease;
  display: flex;
  flex-direction: column;
  visibility: hidden;
}

/* 開いたとき（右→左にスライドイン） */
.slide-page.active {
  transform: translateX(0);
  visibility: visible;
}

/* 左メニューと右エリア構造 */
.slide-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
}
.slide-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px;
  border-bottom: 1px solid #eee;
  background: #fafafa;
}
.slide-header h3 {
  font-size: 18px;
  font-weight: 600;
}
.back-btn {
  background: transparent;
  border: none;
  font-size: 18px;
  cursor: pointer;
}
.slide-content {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: grid;
  grid-template-columns: 30% 70%;
  gap: 12px;
}
.slide-footer {
  padding: 10px 16px;
  border-top: 1px solid #eee;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

input[type="checkbox"] {
  accent-color: #e53935;
}

label.opt {
  border-radius: 4px;
  transition: background 0.2s ease;
}

.side-list li {
  position: relative;
  padding: 6px 0;
}

.dot {
  animation: popin 0.2s ease;
}

@keyframes popin {
  from { transform: scale(0); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.footer-buttons {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #fff;
  padding: 12px 16px;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.08);
  z-index: 1000;
  gap: 12px;
}
.footer-buttons .btn-clear {
  flex: 0 0 25%;
  background: #fff;
  color: #333;
  border: 1.8px solid #333;
  font-weight: 600;
  font-size: 15px;
  border-radius: 8px;
  padding: 12px 0;
  text-align: center;
}
.footer-buttons .btn-apply {
  flex: 0 0 70%;
  background: #e53935;
  color: #fff;
  border: none;
  font-weight: 600;
  font-size: 16px;
  border-radius: 8px;
  padding: 13px 0;
  text-align: center;
}

.footer-buttons .btn-apply:hover {
  background: #d32f2f;
}
.footer-buttons .btn-clear:hover {
  background: #f8f8f8;
}

/* ------------------------------
   ✅ こだわり条件：丸枠タグスタイル
------------------------------ */
.pref-option:hover {
  background-color: #f3f4f6;
}

.pref-option.active {
  background-color: #fee2e2; /* 薄い赤背景 */
  border-color: #ef4444;
  color: #b91c1c;
  font-weight: 600;
}
/* こだわり条件：1行1項目＆丸枠 */
.pref-option {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  padding: 8px 12px;
  margin-bottom: 6px;
  background-color: #fff;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.pref-option input[type="checkbox"] {
  accent-color: #e53935;
  transform: scale(1.1);
}

.pref-option:hover {
  background-color: #f9fafb;
}

.pref-option input[type="checkbox"]:checked + span {
  color: #b91c1c;
  font-weight: 600;
}

.clear-btn {
  color: #1e88e5;
  font-size: 0.9rem;
  cursor: pointer;
}

.clear-btn:hover {
  text-decoration: underline;
}
