/* ================================================
   占い師一覧・詳細ページ固有スタイル
   カラーパレットはcore/common.cssで定義済み
   ================================================ */

.fortuneteller-list-page,
.fortuneteller-detail-page {
  min-height: 100vh;
  background-color: var(--bg-light);
}

.main-content {
  padding: 3rem 0;
  min-height: calc(100vh - 400px);
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
}

.loading-text,
.no-data-text {
  text-align: center;
  font-size: 1.2rem;
  color: var(--text-light);
  padding: 3rem 0;
}

/* ================================================
   占い師一覧ページ
   ================================================ */

.page-title {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 3rem;
  color: var(--text-dark);
  position: relative;
}

.page-title::after {
  content: '';
  display: block;
  width: 80px;
  height: 4px;
  background: linear-gradient(90deg, var(--dusty-pink), var(--gold));
  margin: 1rem auto 0;
  border-radius: 2px;
}

/* ソートメニュー */
.sort-menu {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 3rem;
}

.sort-btn {
  background-color: var(--white);
  border: 2px solid var(--dusty-lavender);
  padding: 0.7rem 2rem;
  border-radius: 25px;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s;
  color: var(--text-dark);
  font-weight: 500;
}

.sort-btn:hover {
  background-color: var(--dusty-pink);
  border-color: var(--dusty-pink);
  transform: translateY(-2px);
}

.sort-btn.active {
  background-color: var(--dusty-lavender);
  border-color: var(--dusty-lavender);
  color: var(--white);
}

/* 占い師グリッド */
.fortuneteller-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

.fortuneteller-item {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border-radius: 15px;
  padding: 1.5rem;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s, box-shadow 0.3s;
  cursor: pointer;
  height: 100%;
  position: relative;
  display: flex;
  flex-direction: column;
}

.fortuneteller-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

/* 一覧ページ用フレームラッパー */
.fortuneteller-item .fortuneteller-frame-wrapper {
  position: relative;
  width: 280px;
  height: 280px;
  margin: 0 auto 1rem;
}

/* 一覧ページ用ゴールドフレーム */
.fortuneteller-item .fortuneteller-frame {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('/assets/images/fortune-teller_card/RoundFrame.png') center/contain no-repeat;
  z-index: 2;
  pointer-events: none;
}

/* 一覧ページ用画像ラッパー */
.fortuneteller-item .fortuneteller-image-wrapper {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 190px;
  height: 190px;
  border-radius: 50%;
  overflow: hidden;
  background-color: #f8f9fa;
  z-index: 1;
}

.fortuneteller-item .fortuneteller-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

/* 一覧ページ用リボン */
.fortuneteller-item .availability-ribbon {
  position: absolute;
  top: 0;
  right: 1.5rem;
  width: 70px;
  height: auto;
  z-index: 3;
}

/* 一覧ページ用統計アイコン */
.fortuneteller-item .stat-icon {
  width: 20px;
  height: 20px;
  vertical-align: middle;
  margin-right: 2px;
}

.item-content {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

/* 名前: 1行固定 */
.item-name {
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
  color: var(--text-dark);
  min-height: 2rem; /* 1行分の高さを確保 */
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* タグ: 2行固定 */
.item-specialties {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.75rem;
  min-height: 3.6rem; /* 2行分の高さを確保 */
  max-height: 3.6rem;
  overflow: hidden;
  align-content: flex-start;
}

.specialty-tag {
  background-color: var(--dusty-lavender);
  color: var(--text-dark);
  padding: 0.3rem 0.8rem;
  border-radius: 15px;
  font-size: 0.8rem;
  font-weight: 500;
  line-height: 1.2;
}

/* 省略タグ（+N表示） */
.specialty-tag.specialty-more {
  background-color: var(--text-light);
  color: var(--white);
  font-weight: 600;
}

/* 自己紹介メッセージ: 3行固定 */
.item-description {
  color: var(--text-dark);
  line-height: 1.6;
  margin-bottom: 0.75rem;
  font-size: 1rem;
  min-height: 4.32rem; /* 3行分の高さを確保 (0.9rem * 1.6 * 3) */
  max-height: 4.32rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 統計: 固定高さ */
.item-stats {
  display: flex;
  justify-content: center;
  padding: 0.75rem 0;
  border-top: 1px solid var(--bg-light);
  border-bottom: 1px solid var(--bg-light);
  margin-bottom: 0.75rem;
  min-height: 2.5rem;
  gap: 1.5rem;
}

.stat-item {
  font-size: 0.95rem;
  color: var(--text-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
}

.detail-btn {
  width: 100%;
  background-color: var(--dusty-pink);
  border: none;
  padding: 0.8rem;
  border-radius: 25px;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s;
  color: var(--text-dark);
  font-weight: 600;
}

.detail-btn:hover {
  background-color: var(--gold);
  color: var(--white);
  transform: translateY(-2px);
}

/* バナーセクション */
.banner-section {
  margin: 2rem 0;
  padding: 0 2rem;
}

.banner-carousel-wrapper {
  max-width: 1200px;
  margin: 0 auto;
}

.banner-item {
  position: relative;
  width: 100%;
  height: 400px;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
}

.gradient-banner {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.banner-content {
  text-align: center;
  color: white;
  padding: 2rem;
  max-width: 700px;
  z-index: 2;
}

.banner-title {
  font-size: 2rem;
  font-weight: bold;
  margin-bottom: 1rem;
  line-height: 1.5;
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.2);
}

.banner-subtitle {
  font-size: 1rem;
  margin-bottom: 2rem;
  opacity: 0.95;
  line-height: 1.6;
  text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.2);
}

.banner-btn {
  display: inline-block;
  padding: 1rem 3rem;
  background: white;
  color: #667eea;
  text-decoration: none;
  border-radius: 50px;
  font-size: 1.1rem;
  font-weight: bold;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.banner-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 25px rgba(0, 0, 0, 0.3);
}

/* ================================================
   占い師詳細ページ
   ================================================ */

.back-link {
  display: inline-block;
  color: var(--text-light);
  text-decoration: none;
  margin-bottom: 2rem;
  font-size: 0.9rem;
  transition: color 0.3s;
  background: none;
  border: none;
  cursor: pointer;
}

.back-link:hover {
  color: var(--gold);
}

.detail-header {
  display: grid;
  grid-template-columns: 450px 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
  background-color: var(--white);
  padding: 2rem;
  border-radius: 20px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.header-left {
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.fortune-profile-image {
  position: relative;
  width: 450px;
  height: 450px;
}

.fortune-profile-image .fortuneteller-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: top;
  border-radius: 10px;
}

/* 詳細ページ用リボン */
.fortune-profile-image .availability-ribbon {
  position: absolute;
  top: 0;
  right: 0;
  width: 90px;
  height: auto;
  z-index: 3;
}

/* 詳細ページ用統計アイコン */
.stat-box .stat-icon {
  width: 40px;
  height: 40px;
  display: block;
  margin: 0 auto 0.5rem;
}

.header-right {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* お気に入りボタン付き名前行 */
.fortune-name-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.fortune-name {
  font-size: 2.5rem;
  margin-bottom: 0;
  color: var(--text-dark);
  flex: 1;
}

.favorite-btn {
  width: 40px;
  height: 40px;
  min-width: 40px;
  border-radius: 50%;
  border: 2px solid var(--dusty-pink);
  background: var(--white);
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.favorite-btn .favorite-icon-img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.favorite-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
}

.favorite-btn.active {
  background: transparent;
  border-color: var(--dusty-pink);
}

.specialties-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-bottom: 2rem;
}

.specialty-badge {
  background-color: var(--dusty-lavender);
  color: var(--text-dark);
  padding: 0.5rem 1.2rem;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 500;
}

.stats-summary {
  display: grid;
  /* レビュー機能コメントアウト 2025-12-15: 3列→2列に変更 */
  /* grid-template-columns: repeat(3, 1fr); */
  /* セッション数コメントアウト 2026-02-18: 2列→1列に変更 */
  /* grid-template-columns: repeat(2, 1fr); */
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.stat-box {
  background-color: var(--bg-light);
  padding: 1.5rem;
  border-radius: 15px;
  text-align: center;
  width: 250px;
  margin: 0 auto;
}

.stat-value {
  display: block;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 0.5rem;
}

.stat-label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-light);
}

.action-buttons {
  display: flex;
  gap: 1rem;
}

.reserve-btn,
.shop-btn {
  flex: 1;
  padding: 1rem 2rem;
  border: none;
  border-radius: 30px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}

.reserve-btn {
  background-color: var(--gold);
  color: var(--white);
}

.reserve-btn:hover {
  background-color: #C29D2E;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
}

.shop-btn {
  background-color: var(--dusty-pink);
  color: var(--text-dark);
}

.shop-btn:hover {
  background-color: var(--dusty-lavender);
  transform: translateY(-2px);
}

/* タブメニュー */
.tab-menu {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  border-bottom: 2px solid var(--bg-light);
}

.tab-btn {
  background: none;
  border: none;
  padding: 1rem 2rem;
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-light);
  cursor: pointer;
  position: relative;
  transition: all 0.3s;
}

.tab-btn:hover {
  color: var(--text-dark);
}

.tab-btn.active {
  color: var(--gold);
}

.tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background-color: var(--gold);
}

/* タブコンテンツエリア */
.tab-content-area {
  background-color: var(--white);
  padding: 2.5rem;
  border-radius: 20px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  min-height: 400px;
}

/* 占い師詳細ページ: タブ内のセクションは枠・影なし */
.tab-content-area .profile-section,
.tab-content-area .message-section,
.tab-content-area .stats-section {
  background: transparent;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
}

/* 旧タブコンテンツスタイル（互換性のため残す） */
.tab-content {
  background-color: var(--white);
  padding: 2.5rem;
  border-radius: 20px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  min-height: 400px;
}

.tab-content-area h2,
.tab-content h2 {
  font-size: 1.8rem;
  margin-bottom: 1.5rem;
  color: var(--text-dark);
}

.tab-content-area h3,
.tab-content h3 {
  font-size: 1.4rem;
  margin: 2rem 0 1rem;
  color: var(--text-dark);
}

.profile-text,
.message-text {
  line-height: 1.8;
  color: var(--text-dark);
  font-size: 1rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: 2rem;
}

.stat-card {
  background-color: var(--bg-light);
  padding: 2rem;
  border-radius: 15px;
  text-align: center;
}

.stat-number {
  display: block;
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 0.5rem;
}

.stat-description {
  color: var(--text-light);
  font-size: 0.9rem;
}

.error-container {
  text-align: center;
  padding: 3rem 0;
}

.error-text {
  font-size: 1.2rem;
  color: var(--text-light);
  margin-bottom: 2rem;
}

.back-btn {
  display: inline-block;
  padding: 0.8rem 2rem;
  background-color: var(--dusty-pink);
  border: none;
  border-radius: 25px;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s;
  color: var(--text-dark);
  font-weight: 500;
}

.back-btn:hover {
  background-color: var(--gold);
  color: var(--white);
}

/* ================================================
   レスポンシブ
   ================================================ */

@media (max-width: 1200px) {
  .detail-header {
    grid-template-columns: 380px 1fr;
    gap: 2rem;
  }

  .fortune-profile-image {
    width: 380px;
    height: 380px;
  }
}

@media (max-width: 1024px) {
  .detail-header {
    grid-template-columns: 1fr;
  }

  .fortune-profile-image {
    width: 450px;
    height: 450px;
    margin: 0 auto;
  }

  .stats-summary {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .container {
    padding: 0 1rem;
  }

  .stat-box {
    width: 200px;
  }

  .page-title {
    font-size: 2rem;
  }

  .sort-menu {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .sort-btn {
    padding: 0.6rem 1.5rem;
    font-size: 0.9rem;
  }

  .fortuneteller-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }

  /* スマホ用カード縮小 */
  .fortuneteller-item {
    border-radius: 10px;
    padding: 0.75rem;
  }

  .fortuneteller-item .fortuneteller-frame-wrapper {
    width: 135px;
    height: 135px;
    margin: 0 auto 0.5rem;
  }

  .fortuneteller-item .fortuneteller-image-wrapper {
    width: 95px;
    height: 95px;
  }

  .fortuneteller-item .availability-ribbon {
    width: 48px;
    right: 0.75rem;
  }

  .fortuneteller-item .stat-icon {
    width: 14px;
    height: 14px;
  }

  .item-content {
    padding: 0;
  }

  .item-name {
    font-size: 1rem;
    margin-bottom: 0.4rem;
    min-height: 1.3rem;
  }

  .item-specialties {
    gap: 0.25rem;
    margin-bottom: 0.4rem;
    min-height: 2.8rem;
    max-height: 2.8rem;
  }

  .specialty-tag {
    padding: 0.2rem 0.5rem;
    font-size: 0.65rem;
    border-radius: 10px;
  }

  .item-description {
    font-size: 0.75rem;
    line-height: 1.4;
    margin-bottom: 0.4rem;
    min-height: 3.15rem;
    max-height: 3.15rem;
  }

  .item-stats {
    padding: 0.5rem 0;
    margin-bottom: 0.5rem;
    min-height: auto;
    flex-wrap: wrap;
    gap: 0.25rem;
  }

  .stat-item {
    font-size: 0.7rem;
  }

  .detail-btn {
    padding: 0.5rem;
    font-size: 0.8rem;
    border-radius: 15px;
  }

  .banner-item {
    height: 300px;
  }

  .banner-title {
    font-size: 1.5rem;
  }

  .banner-subtitle {
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
  }

  .banner-btn {
    padding: 0.8rem 2rem;
    font-size: 1rem;
  }

  .fortune-name-row {
    gap: 0.75rem;
  }

  .favorite-btn {
    width: 40px;
    height: 40px;
    min-width: 40px;
  }

  .favorite-btn .favorite-icon {
    font-size: 1.25rem;
  }

  .fortune-name {
    font-size: 2rem;
  }

  .fortune-profile-image {
    width: 100%;
    max-width: 350px;
    height: auto;
    aspect-ratio: 1 / 1;
  }

  .fortune-profile-image .availability-ribbon {
    width: 70px;
  }

  .action-buttons {
    flex-direction: column;
  }

  .tab-menu {
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 2px; /* 下線が切れないように余白追加 */
  }

  .tab-btn {
    padding: 0.8rem 1.5rem;
    white-space: nowrap;
    flex-shrink: 0;
  }

  .tab-content {
    padding: 1.5rem;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .banner-item {
    height: 250px;
  }

  .banner-title {
    font-size: 1.2rem;
  }

  .banner-subtitle {
    font-size: 0.85rem;
  }
}