/* ==========================================================================
   冒険者の目安箱 - メインレイアウト & ユーティリティ
   ========================================================================== */

/* --- メインコンテナ --- */
.container {
  max-width: 860px;
  margin: 0 auto;
  padding: 1.5rem 1rem 4rem 1rem;
}

/* --- Hero Banner (背景: haikei.jpg ＋ 醫皮紙暗色オーバーレイ) --- */
.hero-banner {
  background:
    linear-gradient(180deg, rgba(20, 12, 6, 0.78) 0%, rgba(12, 8, 3, 0.88) 100%),
    url('../images/haikei.jpg') center center / cover no-repeat;
  border: 2px solid var(--metal-gold-mid);
  border-radius: var(--radius-lg);
  padding: 1.8rem;
  margin-bottom: 2rem;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6), inset 0 0 20px rgba(247, 210, 121, 0.15);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero-banner h2 {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  color: var(--text-gold-bright);
  margin-top: 0;
  margin-bottom: 0.6rem;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.9);
}

.hero-banner p {
  color: #dfcdb3;
  font-size: 0.95rem;
  max-width: 650px;
  margin: 0 auto 1.2rem auto;
  line-height: 1.7;
}

/* --- フィルター & ソート切り替えタブ --- */
.filter-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
  background: rgba(18, 25, 35, 0.7);
  padding: 0.6rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(184, 155, 114, 0.25);
}

.sort-tabs {
  display: flex;
  gap: 0.5rem;
}

.sort-tab {
  background: rgba(255, 255, 255, 0.08);
  color: #c9b495;
  border: 1px solid rgba(184, 155, 114, 0.3);
  padding: 0.45rem 1rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-serif);
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.sort-tab:hover {
  background: rgba(247, 210, 121, 0.15);
  color: var(--text-gold-bright);
}

.sort-tab.active {
  background: linear-gradient(180deg, var(--metal-gold-top) 0%, var(--metal-gold-bottom) 100%);
  color: #2b1809;
  border-color: #fff2c4;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

/* --- ローディング＆空状態 --- */
.loading-state, .empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-gold);
  font-family: var(--font-serif);
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(247, 210, 121, 0.2);
  border-top: 3px solid var(--metal-gold-top);
  border-radius: 50%;
  margin: 0 auto 1rem auto;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* --- レスポンシブ調整 --- */
@media (max-width: 640px) {
  .fantasy-header-inner {
    flex-direction: column;
    gap: 0.8rem;
    text-align: center;
  }

  .brand-title-group h1 {
    font-size: 1.2rem;
  }

  .card-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .card-actions-left, .card-actions-right {
    justify-content: space-between;
    width: 100%;
  }

  .btn-vote {
    width: 100%;
  }
}
