/* ============================================
   Tech Trends AI - カスタムスタイル
   可読性向上のためのデザイン最適化
   ============================================ */

/* --- Google Fonts: head-additions.html の <link> タグで読み込み (レンダリングブロック回避) --- */

/* ============================================
   1. ベースフォント & タイポグラフィ
   ============================================ */

body {
  font-family: 'Noto Sans JP', 'Inter', -apple-system, BlinkMacSystemFont,
    'Segoe UI', Roboto, 'Hiragino Sans', 'Hiragino Kaku Gothic ProN',
    'Yu Gothic', YuGothic, Meiryo, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  background-color: #f8f9fa;
  color: #2d3748;
}

/* ============================================
   2. 記事本文の可読性向上
   ============================================ */

/* 記事コンテンツエリア */
.nested-copy-line-height {
  line-height: 2 !important;
  letter-spacing: 0.02em;
  font-size: 1.05rem !important;
  word-break: auto-phrase; /* Chrome 119+ 日本語の改行最適化 */
  overflow-wrap: break-word;
}

/* 記事本文のパラグラフ */
.nested-copy-line-height p {
  margin-bottom: 1.8em;
  line-height: 2;
}

/* 記事コンテンツの最大幅を読みやすい幅に */
.nested-copy-line-height.w-two-thirds-l {
  max-width: 720px;
}

/* ============================================
   3. 見出しスタイル
   ============================================ */

.nested-copy-line-height h1,
.nested-copy-line-height h2,
.nested-copy-line-height h3,
.nested-copy-line-height h4 {
  font-family: 'Noto Sans JP', 'Inter', sans-serif;
  font-weight: 700;
  color: #1a202c;
  line-height: 1.4;
  letter-spacing: 0.01em;
}

.nested-copy-line-height h2 {
  font-size: 1.55rem;
  margin-top: 2.8em;
  margin-bottom: 1em;
  padding-bottom: 0.4em;
  border-bottom: 3px solid #3182ce;
}

.nested-copy-line-height h3 {
  font-size: 1.3rem;
  margin-top: 2.2em;
  margin-bottom: 0.8em;
  padding-left: 0.75em;
  border-left: 4px solid #63b3ed;
}

.nested-copy-line-height h4 {
  font-size: 1.15rem;
  margin-top: 1.8em;
  margin-bottom: 0.6em;
  color: #2b6cb0;
}

/* 記事タイトル (single page) */
h1.f1.athelas {
  font-family: 'Noto Sans JP', 'Inter', sans-serif !important;
  font-weight: 700;
  font-size: 2rem;
  line-height: 1.4;
  color: #1a202c;
  letter-spacing: 0.01em;
}

/* ============================================
   4. リンクスタイル
   ============================================ */

.nested-links a {
  color: #2b6cb0;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.nested-links a:hover {
  color: #2c5282;
  border-bottom-color: #2c5282;
}

/* ============================================
   5. リストの可読性向上
   ============================================ */

.nested-copy-line-height ul,
.nested-copy-line-height ol {
  padding-left: 1.5em;
  margin-bottom: 1.8em;
}

.nested-copy-line-height li {
  margin-bottom: 0.6em;
  line-height: 1.9;
}

.nested-copy-line-height ul li::marker {
  color: #3182ce;
}

.nested-copy-line-height ol li::marker {
  color: #3182ce;
  font-weight: 600;
}

/* ============================================
   6. 引用ブロック
   ============================================ */

.nested-copy-line-height blockquote,
.lh-copy blockquote {
  border-left: 4px solid #3182ce !important;
  background-color: #ebf4ff;
  padding: 1.2em 1.5em !important;
  margin: 2em 0 !important;
  margin-left: 0 !important;
  border-radius: 0 6px 6px 0;
  font-size: 0.95em !important;
  color: #2d3748;
  line-height: 1.9;
}

.nested-copy-line-height blockquote p {
  margin-bottom: 0.5em;
}

.nested-copy-line-height blockquote p:last-child {
  margin-bottom: 0;
}

/* ============================================
   7. コードブロック
   ============================================ */

.nested-copy-line-height code {
  font-family: 'JetBrains Mono', 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  background-color: #edf2f7;
  color: #c53030;
  padding: 0.15em 0.4em;
  border-radius: 4px;
  font-size: 0.88em;
  font-weight: 500;
}

pre {
  border-radius: 8px !important;
  background-color: #1a202c !important;
  margin: 2em 0 !important;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1),
    0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

pre code {
  background-color: transparent !important;
  color: #e2e8f0 !important;
  padding: 1.5em !important;
  font-size: 0.85rem !important;
  line-height: 1.75 !important;
}

/* ============================================
   8. テーブル
   ============================================ */

.nested-copy-line-height table {
  width: 100%;
  border-collapse: collapse;
  margin: 2em 0;
  font-size: 0.95em;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  overflow: hidden;
}

.nested-copy-line-height thead th {
  background-color: #2b6cb0;
  color: #fff;
  padding: 0.85em 1em;
  text-align: left;
  font-weight: 600;
  font-size: 0.9em;
  letter-spacing: 0.03em;
}

.nested-copy-line-height tbody td {
  padding: 0.75em 1em;
  border-bottom: 1px solid #e2e8f0;
}

.nested-copy-line-height tbody tr:nth-child(even) {
  background-color: #f7fafc;
}

.nested-copy-line-height tbody tr:hover {
  background-color: #ebf4ff;
}

/* ============================================
   9. 画像
   ============================================ */

.nested-copy-line-height img {
  border-radius: 8px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  margin: 1.5em 0;
  max-width: 100%;
  height: auto;
}

/* ============================================
   10. 水平線
   ============================================ */

.nested-copy-line-height hr {
  border: none;
  height: 2px;
  background: linear-gradient(to right, transparent, #cbd5e0, transparent);
  margin: 3em 0;
}

/* ============================================
   11. 記事カード（一覧ページ）
   ============================================ */

/* 一覧ページのカードスタイル */
.flex-ns.flex-wrap .relative.w-100 {
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.flex-ns.flex-wrap .relative.w-100:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

/* カード内タイトル */
.f3.fw1.athelas a {
  font-family: 'Noto Sans JP', 'Inter', sans-serif !important;
  font-weight: 600 !important;
}

/* 概要テキスト */
.f6.f5-l.lh-copy {
  line-height: 1.85 !important;
  color: #4a5568;
}

/* ============================================
   12. サイトヘッダー
   ============================================ */

/* ナビゲーション */
nav a {
  font-family: 'Noto Sans JP', 'Inter', sans-serif;
  font-weight: 500;
  letter-spacing: 0.03em;
}

/* サイトタイトル */
.f-subheadline-l,
.f2.f-subheadline-l {
  font-family: 'Noto Sans JP', 'Inter', sans-serif !important;
  font-weight: 700 !important;
  letter-spacing: 0.02em;
}

/* ============================================
   13. フッター
   ============================================ */

footer {
  font-size: 0.875rem;
  color: #718096;
}

/* ============================================
   14. タグ
   ============================================ */

.nested-copy-line-height + .pa4 a,
a.ba.b--moon-gray {
  font-family: 'Noto Sans JP', 'Inter', sans-serif;
  font-size: 0.8rem;
  letter-spacing: 0.02em;
  border-radius: 20px !important;
  padding: 0.3em 0.9em !important;
  transition: background-color 0.2s ease, color 0.2s ease;
}

/* ============================================
   15. 目次 (Table of Contents)
   ============================================ */

#TableOfContents {
  background-color: #f7fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 1.2em 1.5em;
  margin: 2em 0;
  font-size: 0.92em;
}

#TableOfContents ul {
  list-style: none;
  padding-left: 0;
}

#TableOfContents ul ul {
  padding-left: 1.2em;
}

#TableOfContents li {
  margin-bottom: 0.5em;
  line-height: 1.6;
}

#TableOfContents a {
  color: #2b6cb0;
  text-decoration: none;
  border-bottom: none;
}

#TableOfContents a:hover {
  color: #2c5282;
  text-decoration: underline;
}

/* ============================================
   16. ページネーション
   ============================================ */

.pagination li a {
  font-family: 'Noto Sans JP', 'Inter', sans-serif;
  border-radius: 6px !important;
  transition: background-color 0.2s ease;
}

.pagination li a:hover {
  background-color: #ebf4ff;
  border-color: #3182ce;
  color: #2b6cb0;
}

.pagination li.active a,
.pagination li.active a:link,
.pagination li.active a:active,
.pagination li.active a:visited {
  background-color: #3182ce !important;
  color: #fff !important;
  border-color: #3182ce !important;
}

/* ============================================
   17. セレクション（テキスト選択）
   ============================================ */

::selection {
  background-color: #bee3f8;
  color: #1a202c;
}

/* ============================================
   18. スクロールバー (Webkit)
   ============================================ */

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: #a0aec0;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #718096;
}

/* ============================================
   19. レスポンシブ調整 (モバイル最適化)
   ============================================ */

/* --- 19a. タブレット (max-width: 1024px) --- */
@media screen and (max-width: 1024px) {
  /* 記事コンテンツの最大幅を解除してフル幅活用 */
  .nested-copy-line-height.w-two-thirds-l {
    max-width: 100%;
  }
}

/* --- 19b. スマートフォン & 小型タブレット (max-width: 768px) --- */
@media screen and (max-width: 768px) {
  /* 本文テキスト調整 */
  .nested-copy-line-height {
    font-size: 1rem !important;
    line-height: 1.95 !important;
  }

  .nested-copy-line-height p {
    margin-bottom: 1.4em;
  }

  /* 見出し調整 */
  .nested-copy-line-height h2 {
    font-size: 1.3rem;
    margin-top: 2.2em;
    margin-bottom: 0.8em;
    padding-bottom: 0.3em;
  }

  .nested-copy-line-height h3 {
    font-size: 1.15rem;
    margin-top: 1.8em;
    padding-left: 0.6em;
  }

  .nested-copy-line-height h4 {
    font-size: 1.05rem;
  }

  /* 記事タイトル */
  h1.f1.athelas {
    font-size: 1.5rem;
    line-height: 1.5;
  }

  /* ヘッダータイトル */
  .f2.f-subheadline-l {
    font-size: 1.4rem !important;
    line-height: 1.4;
  }

  /* ヘッダー説明文 */
  .fw1.f5.f3-l {
    font-size: 0.95rem !important;
  }

  /* ヘッダーパディング縮小 */
  .tc-l.pv4.pv6-l,
  .tc-l.pv3 {
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
  }

  /* コードブロック */
  pre {
    margin: 1.5em -1rem !important;
    border-radius: 0 !important;
  }

  pre code {
    font-size: 0.78rem !important;
    padding: 1em !important;
    -webkit-overflow-scrolling: touch;
  }

  /* インラインコード */
  .nested-copy-line-height code {
    font-size: 0.84em;
    padding: 0.1em 0.3em;
  }

  /* テーブルのスクロール対応 */
  .nested-copy-line-height table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
    font-size: 0.85em;
  }

  .nested-copy-line-height thead th {
    padding: 0.6em 0.75em;
    font-size: 0.85em;
  }

  .nested-copy-line-height tbody td {
    padding: 0.55em 0.75em;
  }

  /* テーブルスクロールのヒント表示 */
  .table-scroll-wrapper {
    position: relative;
  }

  .table-scroll-wrapper::after {
    content: '← スクロール →';
    display: block;
    text-align: center;
    font-size: 0.75rem;
    color: #a0aec0;
    padding: 0.3em 0;
  }

  /* 引用ブロック */
  .nested-copy-line-height blockquote,
  .lh-copy blockquote {
    padding: 0.9em 1em !important;
    margin: 1.5em 0 !important;
    font-size: 0.9em !important;
  }

  /* リスト */
  .nested-copy-line-height ul,
  .nested-copy-line-height ol {
    padding-left: 1.2em;
  }

  .nested-copy-line-height li {
    margin-bottom: 0.5em;
    line-height: 1.85;
  }

  /* 画像 */
  .nested-copy-line-height img {
    margin: 1em 0;
    border-radius: 6px;
  }

  /* 目次 */
  #TableOfContents {
    padding: 1em;
    margin: 1.5em 0;
    font-size: 0.88em;
  }

  #TableOfContents li {
    margin-bottom: 0.4em;
  }

  #TableOfContents a {
    display: block;
    padding: 0.25em 0;
  }

  /* 水平線 */
  .nested-copy-line-height hr {
    margin: 2em 0;
  }

  /* タグ */
  .nested-copy-line-height + .pa4 a,
  a.ba.b--moon-gray {
    font-size: 0.75rem;
    padding: 0.35em 0.8em !important;
    margin-bottom: 0.4em;
    display: inline-block;
  }

  /* 記事カード一覧ページ */
  .flex-ns.flex-wrap .relative.w-100 {
    margin-bottom: 1rem;
  }

  .flex-ns.flex-wrap .relative.w-100 .bg-white.mb3.pa4 {
    padding: 1rem !important;
  }

  /* カードタイトル */
  .f3.near-black a {
    font-size: 1.1rem;
    line-height: 1.5;
  }

  /* 概要テキスト */
  .nested-links.f5.lh-copy {
    font-size: 0.9rem;
  }

  /* 「続きを読む」ボタン: タッチ領域拡大 */
  .ba.b--moon-gray.bg-light-gray {
    padding: 0.5em 1em !important;
    font-size: 0.8rem !important;
  }

  /* ページネーション: タッチ領域拡大 */
  .pagination li a {
    min-width: 44px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5em 0.75em !important;
  }

  /* フッター */
  footer .flex {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.5rem;
  }

  footer .f4.fw4 {
    display: block !important;
    font-size: 0.8rem;
    padding: 0.5rem 0;
  }

  /* メインコンテンツのパディング */
  main.pb7 {
    padding-bottom: 3rem !important;
  }

  /* 記事ページ本文エリアのパディング */
  .flex-l.flex-wrap.justify-between.mw8.center.ph3 {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  /* 一覧ページのパディング */
  .pa3.pa4-ns {
    padding: 0.75rem !important;
  }

  .cf.ph3.ph5-l.pv3.pv4-l {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}

/* --- 19c. 小型スマートフォン (max-width: 480px) --- */
@media screen and (max-width: 480px) {
  h1.f1.athelas {
    font-size: 1.3rem;
  }

  .f2.f-subheadline-l {
    font-size: 1.2rem !important;
  }

  .nested-copy-line-height {
    font-size: 0.95rem !important;
  }

  .nested-copy-line-height h2 {
    font-size: 1.2rem;
  }

  .nested-copy-line-height h3 {
    font-size: 1.1rem;
  }

  pre code {
    font-size: 0.72rem !important;
  }

  /* 一覧カードタイトル */
  .f3.near-black a {
    font-size: 1rem;
  }
}

/* --- 19d. タッチ操作の最適化 --- */
@media (pointer: coarse) {
  /* タッチデバイスでの最小タップ領域を確保 (44x44px) */
  .nested-links a {
    padding: 0.15em 0;
    display: inline;
  }

  nav a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }

  nav li {
    padding: 0.25em 0;
  }

  /* ホバー効果をタッチデバイスでは無効化 */
  .flex-ns.flex-wrap .relative.w-100:hover {
    transform: none;
  }

  /* 目次リンクのタッチ領域 */
  #TableOfContents a {
    padding: 0.35em 0;
    min-height: 44px;
    display: flex;
    align-items: center;
  }
}

/* --- 19e. 横向き(landscape)モバイル対応 --- */
@media screen and (max-width: 768px) and (orientation: landscape) {
  .tc-l.pv4.pv6-l,
  .tc-l.pv3 {
    padding-top: 1rem;
    padding-bottom: 1rem;
  }

  .f2.f-subheadline-l {
    font-size: 1.3rem !important;
  }
}

/* ============================================
   20. モバイルナビゲーション（ハンバーガーメニュー）
   ============================================ */

/* ハンバーガーボタン */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 1001;
}

.mobile-menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background-color: rgba(255, 255, 255, 0.9);
  margin: 6px 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
  border-radius: 1px;
}

.mobile-menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 6px);
}

.mobile-menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -6px);
}

/* モバイルメニューオーバーレイ */
.mobile-nav-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 999;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.mobile-nav-overlay.active {
  opacity: 1;
}

@media screen and (max-width: 768px) {
  .mobile-menu-toggle {
    display: block;
  }

  /* デスクトップナビメニューをモバイルスライドメニューに変換 */
  nav .flex-l.items-center {
    position: fixed;
    top: 0;
    right: -280px;
    width: 280px;
    height: 100%;
    background-color: #1a202c;
    flex-direction: column;
    align-items: flex-start;
    padding: 4rem 1.5rem 1.5rem;
    transition: right 0.3s ease;
    z-index: 1000;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  nav .flex-l.items-center.active {
    right: 0;
  }

  nav .flex-l.items-center ul {
    flex-direction: column;
    width: 100%;
    padding: 0;
    margin: 0;
  }

  nav .flex-l.items-center li {
    display: block;
    padding: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  nav .flex-l.items-center li a {
    display: block;
    padding: 0.85rem 0;
    font-size: 1rem;
    min-height: 44px;
  }

  .mobile-nav-overlay {
    display: block;
    pointer-events: none;
  }

  .mobile-nav-overlay.active {
    pointer-events: auto;
  }

  /* ナビバーのレイアウト */
  nav .flex-l.justify-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  /* サイトタイトルの調整 */
  nav .f3.fw2 {
    font-size: 1.1rem;
    max-width: calc(100% - 60px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

/* ============================================
   21. トップへ戻るボタン（モバイル）
   ============================================ */

.back-to-top {
  display: none;
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  width: 44px;
  height: 44px;
  background-color: #3182ce;
  color: #fff;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.2rem;
  line-height: 1;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  z-index: 900;
  transition: opacity 0.3s ease, background-color 0.2s ease;
  align-items: center;
  justify-content: center;
}

.back-to-top.visible {
  display: flex;
}

.back-to-top:hover {
  background-color: #2c5282;
}

/* ============================================
   22. スムーズスクロール & アニメーション
   ============================================ */

html {
  scroll-behavior: smooth;
}

article {
  animation: fadeIn 0.3s ease-in;
}

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

/* ============================================
   23. 検索機能
   ============================================ */

/* --- 検索ページ --- */
.search-container {
  max-width: 800px;
  margin: 0 auto;
}

.search-input-wrapper {
  position: relative;
  margin-bottom: 1rem;
}

.search-input-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: #a0aec0;
  pointer-events: none;
}

.search-input {
  width: 100%;
  padding: 14px 44px 14px 48px;
  font-size: 1.1rem;
  font-family: 'Noto Sans JP', sans-serif;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
  color: #2d3748;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  box-sizing: border-box;
}

.search-input:focus {
  border-color: #3182ce;
  box-shadow: 0 0 0 3px rgba(49, 130, 206, 0.15);
}

.search-input::placeholder {
  color: #a0aec0;
}

.search-clear {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  font-size: 1.5rem;
  color: #a0aec0;
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
}

.search-clear:hover {
  color: #4a5568;
}

.search-status {
  font-size: 0.9rem;
  color: #718096;
  margin-bottom: 1.5rem;
  min-height: 1.4em;
}

/* --- 検索結果カード --- */
.search-result-item {
  display: block;
  padding: 1.25rem 1.5rem;
  margin-bottom: 0.75rem;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}

.search-result-item:hover {
  border-color: #3182ce;
  box-shadow: 0 4px 12px rgba(49, 130, 206, 0.1);
  transform: translateY(-1px);
}

.search-result-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.4rem;
}

.search-result-category {
  font-size: 0.75rem;
  font-weight: 600;
  color: #3182ce;
  background: #ebf4ff;
  padding: 2px 8px;
  border-radius: 4px;
}

.search-result-date {
  font-size: 0.8rem;
  color: #718096;
}

.search-result-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #1a202c;
  margin: 0 0 0.4rem 0;
  line-height: 1.5;
  font-family: 'Noto Sans JP', sans-serif;
}

.search-result-summary {
  font-size: 0.9rem;
  color: #4a5568;
  line-height: 1.7;
  margin: 0 0 0.5rem 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.search-result-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.search-tag {
  font-size: 0.72rem;
  color: #4a5568;
  background: #f7fafc;
  border: 1px solid #e2e8f0;
  padding: 2px 8px;
  border-radius: 12px;
}

.search-result-item mark {
  background-color: #fefcbf;
  color: inherit;
  padding: 0 2px;
  border-radius: 2px;
}

.search-no-results {
  padding: 2rem;
  text-align: center;
  color: #718096;
}

.search-no-results ul {
  text-align: left;
  display: inline-block;
  margin-top: 0.5rem;
}

.search-no-results li {
  margin-bottom: 0.3rem;
  font-size: 0.9rem;
}

/* --- ナビゲーション検索ボタン --- */
.nav-search-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.9);
  padding: 6px 14px;
  font-size: 0.85rem;
  font-family: 'Noto Sans JP', sans-serif;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s ease, border-color 0.2s ease;
  white-space: nowrap;
}

.nav-search-btn:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.5);
  color: #fff;
}

.nav-search-btn svg {
  flex-shrink: 0;
}

.nav-search-kbd {
  font-size: 0.7rem;
  background: rgba(255, 255, 255, 0.15);
  padding: 1px 6px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  font-family: monospace;
}

/* --- 検索モーダル（クイック検索） --- */
.search-modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 2000;
  backdrop-filter: blur(2px);
}

.search-modal-overlay.active {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 15vh;
}

.search-modal {
  background: #fff;
  border-radius: 14px;
  width: 90%;
  max-width: 600px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  overflow: hidden;
  animation: searchModalIn 0.2s ease;
}

@keyframes searchModalIn {
  from { opacity: 0; transform: translateY(-20px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.search-modal-header {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid #e2e8f0;
}

.search-modal-header svg {
  color: #a0aec0;
  flex-shrink: 0;
  margin-right: 10px;
}

.search-modal-input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 1.05rem;
  font-family: 'Noto Sans JP', sans-serif;
  color: #2d3748;
  padding: 8px 0;
  background: transparent;
}

.search-modal-input::placeholder {
  color: #a0aec0;
}

.search-modal-close {
  background: none;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  color: #718096;
  font-size: 0.75rem;
  padding: 3px 8px;
  cursor: pointer;
  font-family: monospace;
}

.search-modal-body {
  max-height: 400px;
  overflow-y: auto;
  padding: 8px;
}

.search-modal-item {
  display: block;
  padding: 10px 12px;
  border-radius: 8px;
  text-decoration: none;
  color: inherit;
  transition: background 0.15s ease;
}

.search-modal-item:hover,
.search-modal-item.active {
  background: #f7fafc;
}

.search-modal-item-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: #1a202c;
  margin: 0 0 2px 0;
}

.search-modal-item-meta {
  font-size: 0.78rem;
  color: #718096;
}

.search-modal-item mark {
  background-color: #fefcbf;
  color: inherit;
  padding: 0 1px;
  border-radius: 2px;
}

.search-modal-empty {
  padding: 2rem;
  text-align: center;
  color: #718096;
  font-size: 0.9rem;
}

.search-modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px;
  border-top: 1px solid #e2e8f0;
  font-size: 0.75rem;
  color: #718096;
}

.search-modal-footer kbd {
  background: #f7fafc;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  padding: 1px 5px;
  font-family: monospace;
  font-size: 0.7rem;
}

/* --- 検索モーダルのモバイル対応 --- */
@media screen and (max-width: 768px) {
  .search-modal-overlay.active {
    padding-top: 5vh;
  }

  .search-modal {
    width: 95%;
  }

  .search-modal-body {
    max-height: 50vh;
  }

  .nav-search-kbd {
    display: none;
  }

  .search-input {
    font-size: 1rem;
    padding: 12px 40px 12px 44px;
  }

  .search-result-item {
    padding: 1rem;
  }

  .search-result-title {
    font-size: 1.05rem;
  }
}

/* ============================================
   24. カテゴリー・タグ一覧ページ
   ============================================ */

/* --- カテゴリーカードグリッド --- */
.taxonomy-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
  margin-top: 1rem;
}

.taxonomy-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2rem 1.5rem;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  text-align: center;
}

.taxonomy-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(49, 130, 206, 0.12);
  border-color: #3182ce;
}

.taxonomy-card-icon {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ebf4ff;
  border-radius: 14px;
  color: #3182ce;
  margin-bottom: 1rem;
}

.taxonomy-card-title {
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: #1a202c;
  margin: 0 0 0.5rem 0;
}

.taxonomy-card-count {
  font-size: 0.85rem;
  color: #718096;
}

/* --- タグクラウド --- */
.tag-cloud-section {
  margin-top: 1rem;
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: center;
}

.tag-cloud-item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45em 1em;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  text-decoration: none;
  color: #4a5568;
  font-family: 'Noto Sans JP', sans-serif;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.tag-cloud-item:hover {
  background: #ebf4ff;
  border-color: #3182ce;
  color: #2b6cb0;
}

.tag-cloud-item.tag-sm { font-size: 0.8rem; }
.tag-cloud-item.tag-md { font-size: 0.9rem; font-weight: 500; }
.tag-cloud-item.tag-lg { font-size: 1rem; font-weight: 600; color: #2b6cb0; }
.tag-cloud-item.tag-xl { font-size: 1.1rem; font-weight: 700; color: #2b6cb0; background: #ebf4ff; }

.tag-count {
  font-size: 0.7em;
  background: #edf2f7;
  color: #718096;
  padding: 1px 6px;
  border-radius: 10px;
  font-weight: 600;
}

.tag-cloud-item.tag-lg .tag-count,
.tag-cloud-item.tag-xl .tag-count {
  background: #bee3f8;
  color: #2b6cb0;
}

/* --- タクソノミー個別ページ (カテゴリー/タグの記事一覧) --- */
.taxonomy-breadcrumb {
  font-size: 0.85rem;
  font-family: 'Noto Sans JP', sans-serif;
}

.taxonomy-label-badge {
  display: inline-block;
  font-size: 0.65em;
  font-weight: 600;
  padding: 0.15em 0.6em;
  border-radius: 6px;
  vertical-align: middle;
  margin-right: 0.3em;
}

.taxonomy-label-badge--cat {
  background: #ebf4ff;
  color: #2b6cb0;
}

.taxonomy-label-badge--tag {
  background: #f0fff4;
  color: #276749;
}

.taxonomy-posts-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.taxonomy-post-item {
  display: block;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid #e2e8f0;
  text-decoration: none;
  color: inherit;
  transition: background 0.15s ease;
}

.taxonomy-post-item:first-child {
  border-top: 1px solid #e2e8f0;
}

.taxonomy-post-item:hover {
  background: #f7fafc;
}

.taxonomy-post-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.4rem;
}

.taxonomy-post-date {
  font-size: 0.8rem;
  color: #718096;
  font-family: 'Inter', sans-serif;
}

.taxonomy-post-cat {
  font-size: 0.72rem;
  font-weight: 600;
  color: #3182ce;
  background: #ebf4ff;
  padding: 2px 8px;
  border-radius: 4px;
}

.taxonomy-post-title {
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: #1a202c;
  margin: 0 0 0.3rem 0;
  line-height: 1.5;
}

.taxonomy-post-desc {
  font-size: 0.88rem;
  color: #718096;
  margin: 0 0 0.5rem 0;
  line-height: 1.6;
}

.taxonomy-post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.taxonomy-post-tag {
  font-size: 0.7rem;
  color: #4a5568;
  background: #f7fafc;
  border: 1px solid #e2e8f0;
  padding: 1px 6px;
  border-radius: 10px;
}

/* ============================================
   25. パンくずリスト
   ============================================ */

.breadcrumb {
  margin: 1rem 0 0.5rem;
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 0.82rem;
}

.breadcrumb-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  list-style: none;
  padding: 0;
  margin: 0;
  gap: 0;
}

.breadcrumb-item {
  display: inline-flex;
  align-items: center;
  color: #718096;
  line-height: 1.5;
}

.breadcrumb-item + .breadcrumb-item::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-top: 1.5px solid #a0aec0;
  border-right: 1.5px solid #a0aec0;
  transform: rotate(45deg);
  margin: 0 0.6em;
  flex-shrink: 0;
}

.breadcrumb-item a {
  color: #4a5568;
  text-decoration: none;
  transition: color 0.2s ease;
  border-bottom: none !important;
}

.breadcrumb-item a:hover {
  color: #2b6cb0;
  border-bottom: none !important;
}

.breadcrumb-current {
  color: #1a202c;
  font-weight: 600;
}

/* パンくずリスト: レスポンシブ */
@media screen and (max-width: 768px) {
  .breadcrumb {
    font-size: 0.75rem;
    margin: 0.75rem 0 0.25rem;
  }
}

/* パンくずリスト: 印刷時非表示 */
@media print {
  .breadcrumb {
    display: none !important;
  }
}

/* ============================================
   26. 記事ヘッダーのカテゴリーバッジ
   ============================================ */

.article-meta-top {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.article-category-badge {
  display: inline-block;
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  color: #fff;
  background: #3182ce;
  padding: 0.25em 0.9em;
  border-radius: 6px;
  text-decoration: none;
  transition: background 0.2s ease;
  letter-spacing: 0.02em;
}

.article-category-badge:hover {
  background: #2c5282;
  color: #fff;
}

/* ============================================
   26. 記事末尾のカテゴリー・タグセクション
   ============================================ */

.article-taxonomy-section {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 2px solid #e2e8f0;
}

.article-taxonomy-group {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
}

.article-taxonomy-label {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  color: #718096;
  white-space: nowrap;
  min-width: 100px;
  padding-top: 0.3em;
}

.article-taxonomy-items {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.article-cat-link {
  display: inline-block;
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  color: #2b6cb0;
  background: #ebf4ff;
  padding: 0.3em 0.9em;
  border-radius: 6px;
  text-decoration: none;
  border-bottom: none !important;
  transition: background 0.2s ease, color 0.2s ease;
}

.article-cat-link:hover {
  background: #bee3f8;
  color: #2c5282;
  border-bottom: none !important;
}

.article-tag-link {
  display: inline-block;
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 0.78rem;
  color: #4a5568;
  background: #f7fafc;
  border: 1px solid #e2e8f0;
  padding: 0.25em 0.75em;
  border-radius: 16px;
  text-decoration: none;
  border-bottom: none !important;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.article-tag-link:hover {
  background: #edf2f7;
  border-color: #cbd5e0;
  color: #2d3748;
  border-bottom: none !important;
}

/* ============================================
   27. サイドバーウィジェット
   ============================================ */

.sidebar-widget {
  background: #f7fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 1.25rem;
  margin-bottom: 1.25rem;
}

.sidebar-widget-title {
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  color: #1a202c;
  margin: 0 0 0.8rem 0;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #3182ce;
}

/* サイドバー: カテゴリー一覧 */
.sidebar-category-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-category-list li {
  margin-bottom: 0;
}

.sidebar-cat-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.6rem;
  border-radius: 6px;
  text-decoration: none;
  color: #4a5568;
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 0.85rem;
  transition: background 0.15s ease, color 0.15s ease;
}

.sidebar-cat-link:hover {
  background: #ebf4ff;
  color: #2b6cb0;
}

.sidebar-cat-active {
  background: #ebf4ff;
  color: #2b6cb0;
  font-weight: 600;
}

.sidebar-cat-count {
  font-size: 0.75rem;
  background: #edf2f7;
  color: #718096;
  padding: 1px 7px;
  border-radius: 10px;
  font-weight: 600;
}

.sidebar-cat-active .sidebar-cat-count {
  background: #bee3f8;
  color: #2b6cb0;
}

/* サイドバー: 関連記事 */
.sidebar-related-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-related-list li {
  margin-bottom: 0;
  border-bottom: 1px solid #edf2f7;
}

.sidebar-related-list li:last-child {
  border-bottom: none;
}

.sidebar-related-link {
  display: block;
  padding: 0.55rem 0;
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 0.82rem;
  color: #4a5568;
  text-decoration: none;
  line-height: 1.5;
  transition: color 0.15s ease;
}

.sidebar-related-link:hover {
  color: #2b6cb0;
}

/* サイドバー: 目次 */
.sidebar-toc ul {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

.sidebar-toc ul ul {
  padding-left: 1rem;
}

.sidebar-toc li {
  margin-bottom: 0.3rem;
}

.sidebar-toc a {
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 0.82rem;
  color: #4a5568;
  text-decoration: none;
  line-height: 1.5;
}

.sidebar-toc a:hover {
  color: #2b6cb0;
}

/* ============================================
   28. カテゴリー・タグのレスポンシブ
   ============================================ */

@media screen and (max-width: 768px) {
  .taxonomy-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
  }

  .taxonomy-card {
    padding: 1.25rem 1rem;
  }

  .taxonomy-card-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    margin-bottom: 0.75rem;
  }

  .taxonomy-card-icon svg {
    width: 22px;
    height: 22px;
  }

  .taxonomy-card-title {
    font-size: 0.95rem;
  }

  .taxonomy-card-count {
    font-size: 0.78rem;
  }

  .tag-cloud {
    gap: 0.4rem;
  }

  .tag-cloud-item {
    padding: 0.35em 0.8em;
  }

  .taxonomy-post-item {
    padding: 1rem;
  }

  .taxonomy-post-title {
    font-size: 1rem;
  }

  .article-taxonomy-group {
    flex-direction: column;
    gap: 0.4rem;
  }

  .article-taxonomy-label {
    min-width: auto;
  }

  /* サイドバーは非表示（モバイルでは本文下に配置される） */
  .sidebar-widget {
    padding: 1rem;
  }
}

@media screen and (max-width: 480px) {
  .taxonomy-grid {
    grid-template-columns: 1fr;
  }

  .taxonomy-card {
    flex-direction: row;
    text-align: left;
    padding: 1rem;
    gap: 1rem;
  }

  .taxonomy-card-icon {
    margin-bottom: 0;
    flex-shrink: 0;
  }

  .taxonomy-card-title {
    font-size: 0.9rem;
  }
}

/* ============================================
   29. 記事カードのカテゴリーバッジ
   ============================================ */

.summary-cat-badge {
  display: inline-block;
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  color: #3182ce;
  background: #ebf4ff;
  padding: 0.15em 0.65em;
  border-radius: 4px;
  text-decoration: none;
  transition: background 0.2s ease;
  letter-spacing: 0.02em;
}

.summary-cat-badge:hover {
  background: #bee3f8;
  color: #2c5282;
}

/* ============================================
   30. 一覧ページのカテゴリーフィルター
   ============================================ */

.list-category-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.list-cat-filter-link {
  display: inline-block;
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 0.82rem;
  color: #4a5568;
  background: #fff;
  border: 1px solid #e2e8f0;
  padding: 0.4em 1em;
  border-radius: 20px;
  text-decoration: none;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.list-cat-filter-link:hover,
.list-cat-filter-link.active {
  background: #ebf4ff;
  border-color: #3182ce;
  color: #2b6cb0;
}

/* ============================================
   31. 印刷用スタイル
   ============================================ */

@media print {
  body {
    font-size: 12pt;
    color: #000;
    background: #fff;
  }

  .nested-copy-line-height {
    line-height: 1.8 !important;
  }

  nav,
  footer,
  aside,
  .pagination {
    display: none !important;
  }

  a {
    color: #000 !important;
    text-decoration: underline !important;
  }

  pre {
    border: 1px solid #ccc !important;
    background: #f5f5f5 !important;
  }
}

/* ============================================
   32. アクセシビリティ改善
   ============================================ */

/* --- スクリーンリーダー専用テキスト (WCAG 準拠) --- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* --- スキップナビゲーション --- */
.skip-link {
  position: absolute;
  top: -100%;
  left: 50%;
  transform: translateX(-50%);
  background: #1a202c;
  color: #fff;
  padding: 0.75em 1.5em;
  border-radius: 0 0 8px 8px;
  font-size: 0.9rem;
  font-family: 'Noto Sans JP', sans-serif;
  font-weight: 600;
  text-decoration: none;
  z-index: 10000;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 0;
  outline: 3px solid #3182ce;
  outline-offset: 2px;
}

/* --- フォーカスインジケーター (キーボードナビゲーション) --- */
*:focus-visible {
  outline: 3px solid #3182ce;
  outline-offset: 2px;
}

/* ナビゲーション内のフォーカス */
nav a:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
  border-radius: 4px;
}

nav button:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
  border-radius: 4px;
}

/* フッター内のフォーカス */
footer a:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
  border-radius: 4px;
}

/* 記事リンクのフォーカス */
.search-result-item:focus-visible,
.taxonomy-card:focus-visible,
.taxonomy-post-item:focus-visible,
.tag-cloud-item:focus-visible {
  outline: 3px solid #3182ce;
  outline-offset: 2px;
  border-radius: 8px;
}

/* ボタンのフォーカス */
.back-to-top:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 2px;
}

.nav-search-btn:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

.search-modal-close:focus-visible {
  outline: 2px solid #3182ce;
  outline-offset: 2px;
}

/* 検索入力のフォーカス (既存のfocusスタイルを補完) */
.search-input:focus-visible {
  outline: none;
}

.search-modal-input:focus-visible {
  outline: none;
}

/* --- prefers-reduced-motion: アニメーション無効化 --- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  html {
    scroll-behavior: auto;
  }

  article {
    animation: none;
  }
}

/* ===================================================================
   関連記事セクション（記事下部カード表示）
   =================================================================== */

.related-posts {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 2px solid #e2e8f0;
}

.related-posts-heading {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: #1a202c;
  margin-bottom: 1.25rem;
  letter-spacing: 0.02em;
}

.related-posts-heading svg {
  color: #3182ce;
  flex-shrink: 0;
}

.related-posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.related-post-card {
  display: block;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 1.25rem;
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.related-post-card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
  border-color: #bee3f8;
  text-decoration: none;
}

.related-post-card:focus-visible {
  outline: 3px solid #3182ce;
  outline-offset: 2px;
  border-radius: 10px;
}

.related-post-category {
  display: inline-block;
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  color: #2b6cb0;
  background: #ebf4ff;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  margin-bottom: 0.5rem;
  letter-spacing: 0.02em;
}

.related-post-title {
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  color: #2d3748;
  line-height: 1.5;
  margin: 0 0 0.5rem 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.related-post-card:hover .related-post-title {
  color: #2b6cb0;
}

.related-post-desc {
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 0.78rem;
  color: #718096;
  line-height: 1.6;
  margin: 0 0 0.75rem 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.related-post-date {
  display: block;
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 0.72rem;
  color: #a0aec0;
}

/* タブレット (2列) */
@media (max-width: 1024px) {
  .related-posts-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* モバイル (1列) */
@media (max-width: 640px) {
  .related-posts {
    margin-top: 2rem;
    padding-top: 1.5rem;
  }

  .related-posts-heading {
    font-size: 1.1rem;
  }

  .related-posts-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .related-post-card {
    padding: 1rem;
  }

  .related-post-title {
    font-size: 0.85rem;
    -webkit-line-clamp: 2;
  }
}

/* Eyecatch Image */
.eyecatch-container {
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,0.12);
}
.eyecatch-image {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.3s ease;
}
.eyecatch-container:hover .eyecatch-image {
  transform: scale(1.02);
}

/* ── Article Card (List Page) ── */
.summary-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
}
.summary-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}
.summary-card-img-link {
  display: block;
  aspect-ratio: 1200 / 630;
  overflow: hidden;
  background: #1a1a2e;
}
.summary-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}
.summary-card:hover .summary-card-img {
  transform: scale(1.05);
}
.summary-card-img-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  background: linear-gradient(135deg, #1a1a2e, #2d3436);
}
.summary-card-body {
  padding: 16px 20px 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.summary-card-title {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.4;
  margin: 0 0 8px 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.summary-card-title a {
  color: #1a1a2e;
  text-decoration: none;
}
.summary-card-title a:hover {
  color: #1a73e8;
}
.summary-card-date {
  font-size: 0.75rem;
  color: #888;
  margin-bottom: 6px;
}
.summary-card-desc {
  font-size: 0.85rem;
  color: #666;
  line-height: 1.5;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

/* Override old summary styles */
.relative.w-100.w-30-l.mb4.bg-white {
  background: transparent !important;
}
