/* ===========================================
   化粧品OEM用語集（knowledge/glossary） 専用スタイル
   既存デザインシステム（CSS変数・text-*・button--cta 等）に乗せる前提で
   glossary- プレフィックスのコンポーネントのみを追加する
   =========================================== */

/* ---------- Hero（検索ボックス付き） ---------- */
.glossary-hero {
  position: relative;
  overflow: hidden;
  padding: 150px 0 64px;
  background: linear-gradient(135deg, #0c2340 0%, #123a63 45%, #0c5d9e 100%);
  color: #fff;
  text-align: center;
}

.glossary-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(
      circle at 15% 20%,
      rgba(255, 255, 255, 0.08) 0,
      transparent 40%
    ),
    radial-gradient(
      circle at 85% 80%,
      rgba(255, 255, 255, 0.08) 0,
      transparent 45%
    );
  pointer-events: none;
}

.glossary-hero-inner {
  position: relative;
  z-index: 1;
  max-width: 880px;
  margin: 0 auto;
  padding: 0 20px;
}

.glossary-hero-kicker {
  display: inline-block;
  margin-bottom: 14px;
  padding: 6px 18px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 999px;
  font-size: 13px;
  letter-spacing: 0.08em;
}

.glossary-hero-title {
  margin: 0 0 14px;
  font-size: 40px;
  font-weight: 700;
  line-height: 1.4;
  color: #fff;
}

.glossary-hero-lead {
  margin: 0 auto 36px;
  max-width: 640px;
  font-size: 16px;
  line-height: 1.9;
  color: rgba(255, 255, 255, 0.88);
}

/* ---------- 検索ボックス ---------- */
.glossary-search {
  position: relative;
  max-width: 560px;
  margin: 0 auto;
  text-align: left;
}

.glossary-search-field {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 18px 40px rgba(8, 20, 40, 0.28);
}

.glossary-search-field svg {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  color: #5d666f;
}

.glossary-search-field input {
  flex: 1 1 auto;
  border: none;
  outline: none;
  font-size: 16px;
  color: #20282d;
  background: transparent;
}

.glossary-search-field input::placeholder {
  color: #8b96a1;
}

.glossary-search-count {
  margin-top: 10px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.75);
  text-align: center;
}

.glossary-intro {
  margin-top: 20px;
  padding: 26px 28px;
  border: 1px solid #dfe7ef;
  border-radius: 8px;
  background: #f8fbfd;
}

.glossary-intro__title {
  margin: 0 0 12px;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.5;
  color: #111827;
}

.glossary-intro__text {
  margin: 0;
  font-size: 15px;
  line-height: 1.9;
  color: #354252;
}

.glossary-intro__text + .glossary-intro__text {
  margin-top: 12px;
}

.glossary-suggest {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 20;
  overflow: hidden;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 24px 48px rgba(8, 20, 40, 0.22);
  display: none;
}

.glossary-suggest.is-open {
  display: block;
}

.glossary-suggest-item {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 12px 20px;
  text-decoration: none;
  color: #20282d;
  border-bottom: 1px solid #eef1f4;
}

.glossary-suggest-item:last-child {
  border-bottom: none;
}

.glossary-suggest-item:hover,
.glossary-suggest-item.is-active {
  background: #f3f7fb;
}

.glossary-suggest-item .term {
  font-weight: 700;
  font-size: 15px;
}

.glossary-suggest-item .cat {
  font-size: 12px;
  color: #6b94b8;
}

.glossary-suggest-empty {
  padding: 16px 20px;
  font-size: 14px;
  color: #6b7680;
}

/* ---------- 索引タブ（あ行〜わ行／ABC／すべて） ---------- */
.glossary-index-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin: 0 0 28px;
  padding: 0;
  list-style: none;
}

.glossary-index-btn {
  min-width: 40px;
  padding: 8px 14px;
  border: 1px solid #d7e0e8;
  border-radius: 999px;
  background: #fff;
  color: #20282d;
  font-size: 14px;
  cursor: pointer;
  transition:
    background 0.15s ease,
    color 0.15s ease,
    border-color 0.15s ease;
}

.glossary-index-btn:hover {
  border-color: var(--color-primary, #00529f);
}

.glossary-index-btn.is-active {
  border-color: var(--color-primary, #00529f);
  background: var(--color-primary, #00529f);
  color: #fff;
}

/* ---------- カテゴリチップ ---------- */
.glossary-category-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin: 0 0 48px;
  padding: 0;
  list-style: none;
}

.glossary-chip {
  padding: 8px 16px;
  border: 1px solid #d7e0e8;
  border-radius: 999px;
  background: #f7f9fb;
  color: #354252;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
}

.glossary-chip.is-active {
  border-color: var(--color-primary, #00529f);
  background: rgba(0, 82, 159, 0.1);
  color: var(--color-primary, #00529f);
  font-weight: 700;
}

/* ---------- 注目の用語（フィーチャーカード） ---------- */
.glossary-featured-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.glossary-featured-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 28px;
  border-radius: 18px;
  background: #f4f6f8;
  border-left: 4px solid var(--color-primary, #00529f);
  text-decoration: none;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.glossary-featured-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 32px rgba(17, 24, 39, 0.1);
}

.glossary-featured-card .badge {
  align-self: flex-start;
  padding: 3px 12px;
  border-radius: 999px;
  background: rgba(0, 82, 159, 0.12);
  color: var(--color-primary, #00529f);
  font-size: 12px;
  font-weight: 700;
}

.glossary-featured-card .term-title {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  color: #111827;
}

.glossary-featured-card .term-summary {
  margin: 0;
  font-size: 14px;
  line-height: 1.8;
  color: #4f5f6f;
}

/* ---------- 用語一覧（行リスト） ---------- */
.glossary-list {
  margin-top: 16px;
  border-top: 1px solid #e3e8ec;
}

.glossary-term-row {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 18px 8px;
  border-bottom: 1px solid #e3e8ec;
  text-decoration: none;
  color: inherit;
  transition: background 0.15s ease;
}

.glossary-term-row:hover {
  background: #f7f9fb;
}

.glossary-term-row .kana-badge {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #eef3f8;
  color: var(--color-primary, #00529f);
  font-size: 14px;
  font-weight: 700;
}

.glossary-term-row .term-body {
  flex: 1 1 auto;
  min-width: 0;
}

.glossary-term-row .term-title {
  margin: 0 0 4px;
  font-size: 17px;
  font-weight: 700;
  color: #111827;
}

.glossary-term-row .term-title small {
  margin-left: 6px;
  font-size: 12px;
  font-weight: 400;
  color: #8b96a1;
}

.glossary-term-row .term-summary {
  margin: 0;
  font-size: 13px;
  line-height: 1.7;
  color: #5d666f;
}

.glossary-term-row .term-cat {
  flex: 0 0 auto;
  padding: 4px 12px;
  border-radius: 999px;
  background: #f0f3f6;
  color: #5d666f;
  font-size: 12px;
  white-space: nowrap;
}

.glossary-term-row .term-arrow {
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
  color: #9aa7b4;
}

.glossary-empty-state {
  padding: 64px 20px;
  text-align: center;
  color: #6b7680;
}

.glossary-result-count {
  margin: 0 0 8px;
  font-size: 13px;
  color: #6b7680;
}

/* ---------- 用語詳細ページ ---------- */
.glossary-article-head {
  padding: 56px 0 32px;
  border-bottom: 1px solid #e3e8ec;
}

.glossary-term-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.glossary-badge {
  padding: 4px 14px;
  border-radius: 999px;
  background: rgba(0, 82, 159, 0.1);
  color: var(--color-primary, #00529f);
  font-size: 12px;
  font-weight: 700;
}

.glossary-badge--ghost {
  background: #f0f3f6;
  color: #5d666f;
  font-weight: 400;
}

.glossary-lead-box {
  margin: 24px 0 0;
  padding: 22px 26px;
  border-left: 4px solid var(--color-primary, #00529f);
  border-radius: 4px;
  background: #f4f8fb;
  font-size: 17px;
  line-height: 1.9;
  color: #1c2539;
}

.glossary-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 56px;
  margin-top: 56px;
}

.glossary-main h2 {
  margin: 56px 0 18px;
  font-size: 26px;
  font-weight: 700;
  color: #111827;
  scroll-margin-top: 110px;
}

.glossary-main h2:first-child {
  margin-top: 0;
}

.glossary-main p {
  font-size: 16px;
  line-height: 1.95;
  color: #354252;
}

.glossary-inline-link {
  color: var(--color-primary, #00529f);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.glossary-inline-link:hover {
  color: #003f7c;
}

.glossary-steps {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: glossary-step;
}

.glossary-steps li {
  position: relative;
  padding: 6px 0 6px 44px;
  margin-bottom: 10px;
  font-size: 15px;
  line-height: 1.8;
  color: #354252;
}

.glossary-steps li::before {
  counter-increment: glossary-step;
  content: counter(glossary-step);
  position: absolute;
  left: 0;
  top: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--color-primary, #00529f);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}

.glossary-keypoints {
  display: grid;
  gap: 12px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}

.glossary-keypoints li {
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr);
  gap: 18px;
  padding: 18px 20px;
  border: 1px solid #e3e8ec;
  border-left: 4px solid var(--color-primary, #00529f);
  border-radius: 8px;
  background: #fff;
}

.glossary-keypoints strong {
  color: #111827;
  font-size: 14px;
  line-height: 1.7;
}

.glossary-keypoints span {
  color: #354252;
  font-size: 15px;
  line-height: 1.8;
}

.glossary-caution-list {
  margin: 18px 0 0;
  padding: 20px 24px 20px 44px;
  border-radius: 8px;
  background: #fff8ef;
  color: #4b3a25;
}

.glossary-caution-list li {
  margin-bottom: 10px;
  font-size: 15px;
  line-height: 1.85;
}

.glossary-caution-list li:last-child {
  margin-bottom: 0;
}

.glossary-reference-list {
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid #e3e8ec;
}

.glossary-reference-list li {
  border-bottom: 1px solid #e3e8ec;
}

.glossary-reference-list a {
  display: block;
  padding: 14px 0;
  color: var(--color-primary, #00529f);
  font-size: 14px;
  line-height: 1.7;
  text-decoration: none;
}

.glossary-reference-list a:hover {
  text-decoration: underline;
}

.glossary-figure {
  margin: 24px 0 32px;
  border-radius: 14px;
  overflow: hidden;
  background: #eef1f4;
}

.glossary-figure img {
  display: block;
  width: 100%;
  height: auto;
}

.glossary-figure figcaption {
  padding: 10px 16px;
  font-size: 12px;
  color: #6b7680;
  background: #f7f9fb;
}

.glossary-faq .accordion-block {
  margin-bottom: 14px;
}

.glossary-faq .accordion-block:last-child {
  margin-bottom: 0;
}

.glossary-related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  margin: 18px 0 0;
}

.glossary-related-card {
  display: block;
  padding: 18px 20px;
  border: 1px solid #e3e8ec;
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  transition:
    border-color 0.15s ease,
    transform 0.15s ease;
}

.glossary-related-card:hover {
  border-color: var(--color-primary, #00529f);
  transform: translateY(-2px);
}

.glossary-related-card .term-title {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 700;
  color: #111827;
}

.glossary-related-card .term-summary {
  margin: 0;
  font-size: 13px;
  line-height: 1.7;
  color: #5d666f;
}

.glossary-disclaimer {
  margin-top: 48px;
  padding: 18px 22px;
  border-radius: 8px;
  background: #f7f7f7;
  color: #6b7680;
  font-size: 13px;
  line-height: 1.8;
}

.glossary-updated {
  margin-top: 8px;
  font-size: 13px;
  color: #8b96a1;
}

/* ---------- サイドバー ---------- */
.glossary-sidebar {
  position: sticky;
  top: 110px;
  align-self: start;
}

.glossary-sidebar-block {
  margin-bottom: 32px;
  padding: 22px;
  border: 1px solid #e3e8ec;
  border-radius: 14px;
}

.glossary-sidebar-block h3 {
  margin: 0 0 14px;
  font-size: 15px;
  font-weight: 700;
  color: #111827;
}

.glossary-toc-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.glossary-toc-list li {
  margin-bottom: 8px;
}

.glossary-toc-list a {
  font-size: 13px;
  color: #354252;
  text-decoration: none;
}

.glossary-toc-list a:hover {
  color: var(--color-primary, #00529f);
}

.glossary-sidebar-cta {
  display: block;
  padding: 20px;
  border: 1px solid #d9e5ef;
  border-left: 4px solid var(--color-primary, #00529f);
  border-radius: 8px;
  background: #f4f8fb;
  color: #111827;
  text-decoration: none;
  box-shadow: 0 10px 24px rgba(12, 35, 64, 0.06);
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease;
}

.glossary-sidebar-cta:hover,
.glossary-sidebar-cta:focus-visible {
  border-color: #b8d0e3;
  color: #111827;
  text-decoration: none;
  box-shadow: 0 16px 32px rgba(12, 35, 64, 0.12);
  transform: translateY(-2px);
}

.glossary-sidebar-cta__eyebrow {
  display: block;
  margin-bottom: 8px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--color-primary, #00529f);
  letter-spacing: 0;
}

.glossary-sidebar-cta__title {
  display: block;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.7;
}

.glossary-sidebar-cta__action {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  padding: 9px 12px;
  border-radius: 4px;
  background: var(--color-primary, #00529f);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
}

.glossary-sidebar-cta__action svg {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- レスポンシブ ---------- */
@media (max-width: 991px) {
  .glossary-layout {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .glossary-sidebar {
    position: static;
  }

  .glossary-sidebar-cta {
    max-width: 420px;
  }

  .glossary-featured-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 575px) {
  .glossary-hero {
    padding: 110px 0 40px;
  }

  .glossary-hero-title {
    font-size: 28px;
  }

  .glossary-article-head {
    padding: 36px 0 24px;
  }
}

/* ---------- breadcrumb（白背景上） ---------- */
.glossary-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 120px 0 0;
  padding: 0;
  list-style: none;
  font-size: 13px;
  color: #6b7680;
}

.glossary-breadcrumb a {
  color: #5d666f;
  text-decoration: none;
}

.glossary-breadcrumb a:hover {
  color: var(--color-primary, #00529f);
}

.glossary-breadcrumb svg {
  width: 7px;
  height: 10px;
  color: #c2cad1;
}
@media (max-width: 575px) {
  .glossary-breadcrumb {
    margin: 100px 0 0;
  }

  .glossary-keypoints li {
    grid-template-columns: 1fr;
    gap: 6px;
  }
}

/* ---------- ページ下部ナビゲーション ---------- */
.glossary-footer-nav {
  margin-top: 48px;
  padding-top: 8px;
}

.glossary-back-link {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  max-width: 100%;
  min-height: 44px;
  padding: 11px 16px;
  border: 1px solid #d7e0e8;
  border-radius: 6px;
  background: #fff;
  color: #354252;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.5;
  text-decoration: none;
  transition:
    border-color 0.2s ease,
    color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease;
}

.glossary-back-link svg {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.glossary-back-link:hover,
.glossary-back-link:focus-visible {
  border-color: #b8d0e3;
  color: var(--color-primary, #00529f);
  text-decoration: none;
  box-shadow: 0 10px 22px rgba(12, 35, 64, 0.08);
  transform: translateY(-1px);
}

@media (max-width: 575px) {
  .glossary-footer-nav {
    margin-top: 36px;
  }

  .glossary-back-link {
    width: 100%;
    justify-content: center;
    padding-right: 12px;
    padding-left: 12px;
    text-align: center;
  }
}

/* ---------- CTA（OEM相談導線） ---------- */
.glossary-cta {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  margin-top: 64px;
  padding: 34px 38px;
  overflow: hidden;
  border-left: 5px solid var(--color-primary, #00529f);
  border-radius: 8px;
  background: #f4f8fb;
  box-shadow: 0 12px 32px rgba(17, 24, 39, 0.08);
}

.glossary-cta__content {
  flex: 1 1 auto;
  min-width: 0;
}

.glossary-cta__title {
  margin: 0 0 8px;
  font-size: 24px;
  line-height: 1.4;
  color: #111827;
}

.glossary-cta__text {
  margin: 0;
  line-height: 1.8;
  color: #354252;
}

.glossary-cta__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex: 0 0 auto;
  min-width: 224px;
  min-height: 54px;
  padding: 14px 24px;
  border: 1px solid var(--color-primary, #00529f);
  border-radius: 4px;
  background: var(--color-primary, #00529f);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.3;
  text-decoration: none;
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    transform 0.2s ease;
}

.glossary-cta__button svg {
  width: 12px;
  height: 12px;
  flex: 0 0 auto;
}

.glossary-cta__button:hover,
.glossary-cta__button:focus-visible {
  border-color: #003f78;
  background: #003f78;
  color: #fff;
  transform: translateY(-1px);
}

@media (max-width: 767px) {
  .glossary-cta {
    align-items: flex-start;
    flex-direction: column;
  }

  .glossary-cta__button {
    width: 100%;
    min-width: 1px;
  }
}

/* ===========================================
   極限UI拡張：アニメーション付きヒーロー／コマンドパレット検索／
   アイコン付きカテゴリカード／読了プログレス／スクロールスパイ／
   View Transitions（対応ブラウザのみ自動有効化・非対応環境では無視される）
   =========================================== */

/* ---------- ヒーロー：動くグラデーション＋装飾フォント ---------- */
.glossary-hero {
  background-size: 200% 200%;
  animation: glossaryHeroShift 18s ease-in-out infinite;
}

@keyframes glossaryHeroShift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.glossary-kicker-accent {
  display: block;
  margin-bottom: 10px;
  font-family: "Klee One", cursive;
  font-weight: 600;
  font-size: 22px;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.92);
}

.glossary-search-field .glossary-kbd-hint {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px 8px;
  border: 1px solid #d7e0e8;
  border-radius: 6px;
  background: #f4f6f8;
  color: #6b7680;
  font-size: 11px;
  font-family: monospace;
}

@media (prefers-reduced-motion: reduce) {
  .glossary-hero {
    animation: none;
  }
}

/* ---------- コマンドパレット（⌘K 風フルスクリーン検索） ---------- */
.glossary-palette {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  padding: 10vh 20px 20px;
  background: rgba(8, 16, 30, 0.55);
  backdrop-filter: blur(3px);
}

.glossary-palette.is-open {
  display: block;
}

.glossary-palette-panel {
  max-width: 640px;
  margin: 0 auto;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 32px 64px rgba(8, 16, 30, 0.35);
  overflow: hidden;
  animation: glossaryPaletteIn 0.18s ease-out;
}

@keyframes glossaryPaletteIn {
  from {
    opacity: 0;
    transform: translateY(-8px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.glossary-palette-input-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 22px;
  border-bottom: 1px solid #eef1f4;
}

.glossary-palette-input-row svg {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  color: #5d666f;
}

.glossary-palette-input-row input {
  flex: 1 1 auto;
  border: none;
  outline: none;
  font-size: 18px;
  color: #20282d;
  background: transparent;
}

.glossary-palette-close {
  flex: 0 0 auto;
  padding: 4px 10px;
  border: 1px solid #d7e0e8;
  border-radius: 6px;
  background: #f4f6f8;
  color: #6b7680;
  font-size: 12px;
  cursor: pointer;
}

.glossary-palette-results {
  max-height: 56vh;
  overflow-y: auto;
}

.glossary-palette-item {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 14px 22px;
  text-decoration: none;
  color: #20282d;
  border-left: 3px solid transparent;
}

.glossary-palette-item .term {
  font-weight: 700;
  font-size: 15px;
}

.glossary-palette-item .cat {
  font-size: 12px;
  color: #6b94b8;
}

.glossary-palette-item.is-active {
  background: #f3f7fb;
  border-left-color: var(--color-primary, #00529f);
}

.glossary-palette-hint {
  padding: 12px 22px;
  border-top: 1px solid #eef1f4;
  font-size: 12px;
  color: #8b96a1;
  background: #fafbfc;
}

.glossary-palette-empty {
  padding: 28px 22px;
  font-size: 14px;
  color: #6b7680;
}

/* ---------- アイコン付きカテゴリカード ---------- */
.glossary-category-chips {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
  list-style: none;
  margin: 0 0 48px;
  padding: 0;
}

.glossary-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 100%;
  height: 112px;
  padding: 20px 10px;
  border: 1px solid #e3e8ec;
  border-radius: 14px;
  background: #fff;
  color: #354252;
  font-size: 13px;
  line-height: 1.5;
  cursor: pointer;
  min-width: 0;
  text-align: center;
  white-space: nowrap;
  overflow-wrap: normal;
  word-break: normal;
  transition:
    border-color 0.15s ease,
    transform 0.15s ease,
    box-shadow 0.15s ease;
}

.glossary-chip[data-category="branding"] {
  font-size: 12px;
}

.glossary-chip:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(17, 24, 39, 0.08);
}

.glossary-chip .glossary-chip-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(0, 82, 159, 0.08);
  color: var(--color-primary, #00529f);
}

.glossary-chip .glossary-chip-icon svg {
  width: 20px;
  height: 20px;
}

.glossary-chip.is-active {
  border-color: var(--color-primary, #00529f);
  background: rgba(0, 82, 159, 0.06);
  color: var(--color-primary, #00529f);
  font-weight: 700;
}

.glossary-chip.is-active .glossary-chip-icon {
  background: var(--color-primary, #00529f);
  color: #fff;
}

/* ---------- 一覧の出現アニメーション ---------- */
.glossary-term-row {
  animation: glossaryRowIn 0.3s ease both;
}

@keyframes glossaryRowIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .glossary-term-row {
    animation: none;
  }
}

/* ---------- スクロール出現演出（カード等） ----------
   .glossary-reveal は初期状態では通常表示のまま。
   JSが実際に監視を開始できたときだけ .will-reveal を付与して非表示にし、
   交差した時点で .is-visible を付けて表示する。
   こうすることで、JS未実行・読み込み漏れ・エラー時でもコンテンツが
   非表示のまま固まる事故を防ぐ（フェイルセーフなプログレッシブエンハンスメント）。 */
.glossary-reveal.will-reveal {
  opacity: 0;
  transform: translateY(16px);
  transition:
    opacity 0.5s ease,
    transform 0.5s ease;
}

.glossary-reveal.will-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- 読了プログレスバー（用語詳細ページ） ---------- */
.glossary-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 90;
  width: 100%;
  height: 3px;
  background: transparent;
}

.glossary-progress-bar {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--color-primary, #00529f), #4fb6e8);
  transition: width 0.1s linear;
}

/* ---------- サイドバーTOC：スクロールスパイ ---------- */
.glossary-toc-list a {
  position: relative;
  display: inline-block;
  padding-left: 14px;
  transition: color 0.15s ease;
}

.glossary-toc-list a::before {
  content: "";
  position: absolute;
  left: 0;
  top: 4px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #d7e0e8;
  transition: background 0.15s ease;
}

.glossary-toc-list a.is-active {
  color: var(--color-primary, #00529f);
  font-weight: 700;
}

.glossary-toc-list a.is-active::before {
  background: var(--color-primary, #00529f);
}

/* ---------- スムーススクロール（glossary配下のみ） ---------- */
html:has(.glossary-layout),
html:has([data-glossary-root]) {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html:has(.glossary-layout),
  html:has([data-glossary-root]) {
    scroll-behavior: auto;
  }
}

/* ---------- View Transitions（対応ブラウザのみ。非対応環境は無視） ---------- */
@supports (view-transition-name: none) {
  .glossary-term-row .term-title,
  .glossary-featured-card .term-title,
  .glossary-article-head h1 {
    view-transition-name: var(--vt-name, none);
  }
}

@media (max-width: 1359px) {
  .glossary-category-chips {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 991px) {
  .glossary-category-chips {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  .glossary-category-chips {
    display: flex;
    flex-wrap: nowrap;
    justify-content: flex-start;
    gap: 8px;
    margin-bottom: 28px;
    padding: 0 2px 10px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }

  .glossary-category-chips > li {
    flex: 0 0 auto;
    scroll-snap-align: start;
  }

  .glossary-chip {
    flex-direction: row;
    gap: 8px;
    width: auto;
    min-width: 132px;
    height: 48px;
    padding: 8px 12px;
    border-radius: 999px;
    font-size: 12px;
    line-height: 1.35;
  }

  .glossary-chip[data-category="branding"] {
    min-width: 180px;
    font-size: 12px;
  }

  .glossary-chip .glossary-chip-icon {
    flex: 0 0 auto;
    width: 30px;
    height: 30px;
  }

  .glossary-chip .glossary-chip-icon svg {
    width: 16px;
    height: 16px;
  }
}

@media (max-width: 480px) {
  .glossary-category-chips {
    margin-left: -4px;
    margin-right: -4px;
  }

  .glossary-chip {
    min-width: 126px;
  }

  .glossary-chip[data-category="branding"] {
    min-width: 176px;
  }
}

.index_bread {
  margin: 30px 0 0;
}
