/* ===== 葬送のフリーレン 世界観 共通スタイル ===== */
@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+JP:wght@300;400;500;700&family=Noto+Sans+JP:wght@300;400;500;700&display=swap');

:root {
  --bg: #f5f3ef;
  --bg-dark: #e8e4dc;
  --surface: #faf9f6;
  --border: #d8d2c8;
  --text: #3a3530;
  --text-muted: #8a8278;
  --accent: #7a9e9f;
  --accent-light: #b8d4d5;
  --accent-dark: #4a7c7d;
  --gold: #c9a84c;
  --gold-light: #e8d5a3;
  --white: #fdfcfa;
  --shadow: rgba(58, 53, 48, 0.08);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Noto Sans JP', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.8;
  min-height: 100vh;
}

/* ===== ヘッダー ===== */
header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0 32px;
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner {
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.logo {
  font-family: 'Noto Serif JP', serif;
  font-size: 1.2rem;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  gap: 10px;
}
.logo-rune {
  color: var(--accent);
  font-size: 1.4rem;
}
nav { display: flex; gap: 28px; align-items: center; }
nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 400;
  letter-spacing: 0.05em;
  transition: color 0.2s;
  position: relative;
}
nav a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width 0.3s;
}
nav a:hover { color: var(--accent); }
nav a:hover::after { width: 100%; }
nav a.active { color: var(--accent); }
nav a.active::after { width: 100%; }

/* ===== ページヒーロー ===== */
.page-hero {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  text-align: center;
  padding: 64px 24px 48px;
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(ellipse at 50% 0%, rgba(122,158,159,0.08) 0%, transparent 70%);
  pointer-events: none;
}
.page-hero .rune-deco {
  font-size: 2.5rem;
  opacity: 0.15;
  letter-spacing: 0.3em;
  margin-bottom: 16px;
  display: block;
  color: var(--accent);
}
.page-hero h1 {
  font-family: 'Noto Serif JP', serif;
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 500;
  color: var(--text);
  letter-spacing: 0.1em;
  margin-bottom: 12px;
}
.page-hero p {
  font-size: 0.95rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

/* ===== コンテナ ===== */
.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 56px 24px;
}

/* ===== 区切り線 ===== */
.divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 40px 0;
  color: var(--border);
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  color: var(--text-muted);
}
.divider::before, .divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ===== 雑学カード ===== */
.trivia-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 32px 36px;
  margin-bottom: 24px;
  transition: all 0.3s;
  position: relative;
}
.trivia-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 3px;
  height: 100%;
  background: var(--accent-light);
  border-radius: 4px 0 0 4px;
  transition: background 0.3s;
}
.trivia-card:hover {
  box-shadow: 0 4px 24px var(--shadow);
  transform: translateY(-2px);
}
.trivia-card:hover::before { background: var(--accent); }

.card-top {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 16px;
}
.emoji-box {
  width: 52px;
  height: 52px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  flex-shrink: 0;
}
.card-meta { flex: 1; }
.category-badge {
  display: inline-block;
  padding: 2px 10px;
  border: 1px solid var(--border);
  border-radius: 2px;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.trivia-title {
  font-family: 'Noto Serif JP', serif;
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--text);
  line-height: 1.5;
}
.trivia-body {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.9;
  margin-bottom: 20px;
}

/* ===== イイねボタン ===== */
.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--bg-dark);
}
.like-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 8px 20px;
  border-radius: 2px;
  font-size: 0.85rem;
  font-family: 'Noto Sans JP', sans-serif;
  cursor: pointer;
  transition: all 0.2s;
  /* GTMでこのボタンのクリックイベントを計測してください */
}
.like-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(122,158,159,0.05);
}
.like-btn.liked {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(122,158,159,0.08);
}
.like-btn .heart { font-size: 1rem; transition: transform 0.2s; }
.like-btn.liked .heart { transform: scale(1.2); }
.like-count { font-size: 0.8rem; color: var(--text-muted); }

/* ===== フィルターバー ===== */
.filter-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}
.filter-btn {
  padding: 7px 18px;
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--text-muted);
  font-size: 0.82rem;
  font-family: 'Noto Sans JP', sans-serif;
  letter-spacing: 0.05em;
  cursor: pointer;
  border-radius: 2px;
  transition: all 0.2s;
}
.filter-btn:hover, .filter-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--white);
}

/* ===== フッター ===== */
footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 48px 24px;
  text-align: center;
  margin-top: 80px;
}
.footer-rune {
  font-size: 1.5rem;
  letter-spacing: 0.3em;
  color: var(--accent-light);
  margin-bottom: 20px;
  display: block;
}
.footer-links {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  transition: color 0.2s;
}
.footer-links a:hover { color: var(--accent); }
footer p { font-size: 0.8rem; color: var(--text-muted); letter-spacing: 0.05em; }

/* ===== ジャンルグリッド（index用） ===== */
.genre-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}
.genre-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 28px;
  text-decoration: none;
  color: inherit;
  display: block;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
}
.genre-card::after {
  content: '→';
  position: absolute;
  bottom: 24px;
  right: 24px;
  color: var(--accent-light);
  font-size: 1.2rem;
  transition: all 0.3s;
}
.genre-card:hover {
  box-shadow: 0 4px 24px var(--shadow);
  transform: translateY(-3px);
  border-color: var(--accent-light);
}
.genre-card:hover::after { color: var(--accent); right: 20px; }
.genre-icon { font-size: 2.2rem; margin-bottom: 14px; display: block; }
.genre-name {
  font-family: 'Noto Serif JP', serif;
  font-size: 1.1rem;
  font-weight: 500;
  margin-bottom: 8px;
  color: var(--text);
}
.genre-desc { font-size: 0.85rem; color: var(--text-muted); line-height: 1.7; }
.genre-count {
  display: inline-block;
  margin-top: 12px;
  font-size: 0.75rem;
  color: var(--accent);
  letter-spacing: 0.05em;
}

/* ===== お気に入りページ ===== */
.empty-state {
  text-align: center;
  padding: 80px 24px;
  color: var(--text-muted);
}
.empty-state .empty-icon { font-size: 3rem; margin-bottom: 16px; opacity: 0.4; }
.empty-state p { font-size: 0.95rem; line-height: 1.8; }
