/* =================================================================
   Glossary 用語集 — 索引 + 詳細ページ
   ================================================================= */
.glossary-index,
.glossary-term-page {
  --brand: #c8102e;
  --text: #222;
  --text-muted: #666;
  --border: #e8e8e8;
  --bg-soft: #faf7f5;
  font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic", "Noto Sans JP", sans-serif;
  color: var(--text);
}
.glossary-index .container,
.glossary-term-page .container {
  padding: 32px 20px 60px;
  max-width: 880px;
}

/* ───── 索引 header ───── */
.glossary-header {
  margin: 16px 0 24px;
}
.glossary-h1 {
  font-size: 28px;
  font-weight: 700;
  margin: 0 0 12px;
}
.glossary-lead {
  background: var(--bg-soft);
  padding: 18px 22px;
  border-left: 4px solid var(--brand);
  border-radius: 0 6px 6px 0;
  font-size: 14px;
  line-height: 1.85;
  color: #444;
  margin: 0;
}

/* ───── カテゴリーナビ ───── */
.glossary-cat-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 16px 0 24px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 32px;
}
.glossary-cat-nav a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--text);
  font-size: 13px;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s;
}
.glossary-cat-nav a:hover {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}
.glossary-cat-count {
  background: var(--brand);
  color: #fff;
  padding: 1px 7px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
}
.glossary-cat-nav a:hover .glossary-cat-count {
  background: #fff;
  color: var(--brand);
}

/* ───── カテゴリーセクション ───── */
.glossary-cat-section { margin: 0 0 40px; scroll-margin-top: 80px; }
.glossary-cat-h2 {
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 16px;
  padding: 8px 0 8px 14px;
  border-left: 5px solid var(--brand);
  display: flex;
  align-items: baseline;
  gap: 12px;
}
.glossary-cat-h2-count {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 400;
}

/* ───── 用語カードグリッド ───── */
.glossary-term-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}
.glossary-term-card {
  display: block;
  padding: 14px 16px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  text-decoration: none;
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
}
.glossary-term-card:hover {
  border-color: var(--brand);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(200, 16, 46, 0.08);
}
.glossary-term-card strong {
  font-size: 15px;
  display: block;
  color: var(--text);
  margin: 0 0 4px;
}
.glossary-term-alias {
  font-size: 11px;
  color: var(--text-muted);
  font-style: normal;
  display: block;
  margin-bottom: 6px;
}
.glossary-term-card p {
  margin: 4px 0 0;
  font-size: 12px;
  color: #555;
  line-height: 1.55;
  /* 3 行で省略 */
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* =================================================================
   用語詳細ページ
   ================================================================= */
.glossary-term-header {
  margin: 16px 0 24px;
}
.glossary-term-cat {
  display: inline-block;
  background: var(--brand);
  color: #fff;
  font-size: 12px;
  padding: 3px 12px;
  border-radius: 3px;
  font-weight: 600;
  margin-bottom: 12px;
}
.glossary-term-title {
  font-size: 30px;
  font-weight: 700;
  margin: 0 0 8px;
  letter-spacing: -0.01em;
}
.glossary-term-aliases {
  font-size: 12px;
  color: var(--text-muted);
  margin: 4px 0;
}
.glossary-term-aliases span {
  background: #f5f5f5;
  padding: 2px 8px;
  border-radius: 3px;
  margin-right: 8px;
  color: #555;
  font-size: 11px;
}
.glossary-term-reading {
  font-size: 12px;
  color: var(--text-muted);
  margin: 4px 0 0;
}

.glossary-term-summary {
  background: var(--bg-soft);
  padding: 18px 22px;
  border-left: 4px solid var(--brand);
  border-radius: 0 6px 6px 0;
  margin: 24px 0 32px;
}
.glossary-term-summary strong {
  display: block;
  font-size: 11px;
  color: var(--brand);
  letter-spacing: 0.15em;
  margin-bottom: 6px;
  text-transform: uppercase;
}
.glossary-term-summary p {
  font-size: 15px;
  line-height: 1.85;
  color: #333;
  margin: 0;
}

.glossary-term-h2 {
  font-size: 20px;
  font-weight: 700;
  margin: 36px 0 16px;
  padding: 8px 0 8px 14px;
  border-left: 5px solid var(--brand);
}

.glossary-term-body {
  font-size: 15px;
  line-height: 1.95;
  color: #333;
}
.glossary-term-body ul {
  margin: 12px 0;
  padding-left: 24px;
}
.glossary-term-body ul li { margin-bottom: 6px; }
.glossary-term-body strong { color: #111; }

/* ───── 関連用語/商品/記事 ───── */
.glossary-related { margin: 36px 0 24px; }
.glossary-related-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 10px;
}
.glossary-related-list a {
  display: block;
  padding: 12px 14px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: inherit;
  text-decoration: none;
  transition: border-color 0.15s;
}
.glossary-related-list a:hover { border-color: var(--brand); }
.glossary-related-list strong { display: block; font-size: 14px; margin-bottom: 3px; }
.glossary-related-list span { font-size: 12px; color: var(--text-muted); }

.glossary-related-products {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}
.glossary-related-products a {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s;
}
.glossary-related-products a:hover { border-color: var(--brand); }
.glossary-related-products img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: 4px;
}
.glossary-related-products strong { font-size: 12px; line-height: 1.4; }
.glossary-related-products span { color: var(--brand); font-weight: 700; font-size: 13px; }

.glossary-related-articles {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}
.glossary-related-articles a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 6px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s;
}
.glossary-related-articles a:hover { border-color: var(--brand); }
.glossary-related-articles strong { font-size: 14px; }
.glossary-related-articles small { color: var(--text-muted); font-size: 11px; }

.glossary-back {
  margin: 40px 0 0;
  text-align: center;
}
.glossary-back a {
  color: var(--brand);
  font-size: 13px;
  text-decoration: none;
  font-weight: 600;
}
.glossary-back a:hover { text-decoration: underline; }
