
/* 本文全体の行間を調整する */
.md-typeset {
  line-height: 1.7; /* デフォルトより少し広め（1.6〜1.8が読みやすいです） */
}

/* 段落（pタグ）ごとの下の余白を調整する場合 */
.md-typeset p {
  margin-bottom: 1.2em;
}

.md-typeset table {
  margin-left: auto;
  margin-right: auto;
}
.md-typeset table:not([class]) {
  font-size: 0.7rem;    /* 既定 0.64rem */
}

/* Markdownの見出しの色を上書きする */
:root {
  --md-default-fg-color--bold: #1e3d59; /* 👈 ここに好きな見出しの色（HEXコードなど） */
}


/* ヘッダーのカラーモード（ダークモード）切り替えボタンを非表示にする */
.md-header__option {
  display: none !important;
}
/* 1カラムのカードリスト全体のコンテナ */
.card-column-1 {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;               /* 0.2remだと詰まりすぎるため、適度な隙間（約13px）に調整 */
  margin: 0.2rem 0;
}

/* カード単体のデザイン */
.card-column-1 > div,
.card-column-1 > a {
  display: block;
  padding: 1rem 1.2rem !important; /* 重複していた指定をここに統合し、コンパクトに固定 */
  background-color: var(--zs-card-background, #ffffff);
  border: 1px solid var(--zs-border-color, #e0e0e0);
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
  text-decoration: none !important;
  color: inherit !important;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* カーソルを乗せたとき（ホバー時）のちょっと浮き上がるエフェクト */
.card-column-1 > div:hover,
.card-column-1 > a:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* カード内のタイトルサイズ（h3、および .card-title） */
.card-column-1 h3, 
.card-column-1 strong.card-title {
  display: block;
  font-size: 0.8rem !important;      /* 本文と同じスマートなサイズに固定 */
  font-weight: 700 !important;       /* 太字にしてタイトルらしさを強調 */
  margin-top: 0 !important;
  margin-bottom: 0.2rem !important;  /* 本文との隙間をキュッと詰める（後の指定と統合） */
  color: var(--zs-heading-color, #1a1a1a);
}

/* カードの中にある文章（pタグ）の上下余白 */
.card-column-1 p {
  margin-top: 0.1rem !important;
  margin-bottom: 0.1rem !important;  /* 上下を極限まで詰めてコンパクトに */
}

/* 3段組カードのグリッドレイアウト */
.card-column-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin: 1rem 0;
}

/* カード単体のデザイン */
.card-column-3 > div,
.card-column-3 > a {
  display: block;
  padding: 1rem 1.2rem !important;
  background-color: var(--zs-card-background, #ffffff);
  border: 1px solid var(--zs-border-color, #e0e0e0);
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
  text-decoration: none !important;
  color: inherit !important;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* ホバー時のエフェクト */
.card-column-3 > div:hover,
.card-column-3 > a:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* カード内のタイトル */
.card-column-3 h3,
.card-column-3 strong.card-title {
  display: block;
  font-size: 0.8rem !important;
  font-weight: 700 !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  color: var(--zs-heading-color, #1a1a1a);
}

/* カード内の本文 */
.card-column-3 p {
  margin-top: 0.1rem !important;
  margin-bottom: 0.1rem !important;
}

/* 画面が狭い場合は1列に折り返す */
@media (max-width: 768px) {
  .card-column-3 {
    grid-template-columns: 1fr;
  }
}

/* Zensical：ボックス（アドモニション）内の文字サイズを地の文と完全に同期させる */
.zs-admonition__content,
.zs-admonition__content p,
.zs-admonition__content ul,
.zs-admonition__content li,
.zs-admonition dl,
.zs-admonition dt,
.zs-admonition dd {
  font-size: 1rem !important;        /* 地の文（通常の文字）と同じ 100% の大きさに強制固定 */
  line-height: 1.7 !important;      /* 行間も地の文と同じに整える */
}

/* ボックス内のリスト（箇条書き）の文字サイズも完全に同期 */
.zs-admonition__content ul li,
.zs-admonition__content ol li {
  font-size: 1.5rem !important;
}

/* ついでにボックスのタイトル（教科書・参考書）も、地の文より少しだけ存在感を出す */
.zs-admonition__title,
.zs-admonition__summary {
  font-size: 1.1rem !important;      /* 地の文よりほんの少しだけ大きくして見出しらしく */
  font-weight: bold !important;
}

/* クラス名を特定せず、[class*="admonition"]（名前にadmonitionが含まれる要素）の中身をすべて強制変更 */
[class*="admonition"] *,
[class*="admonition"] li,
[class*="admonition"] p {
  font-size: 0.75rem !important;  /* 変わったことがハッキリわかるように少し大きめに設定 */
  line-height: 1.6 !important;
}

/* タイトル部分もまとめて強制上書き */
[class*="admonition-title"] *,
[class*="admonition__title"] * {
  font-size: 0.75rem !important;
  font-weight: bold !important;
}

/* 本文の行間 */
.md-typeset {
  line-height: 1.7;
}
.md-typeset p {
  margin-bottom: 1.2em;
}

/* Bootstrap 由来のバッジ（Publications / Talks）を再現 */
/* Bootstrap 由来のバッジ（Publications / Talks） */
/* Bootstrap 由来のバッジ（Publications / Talks） */
.md-typeset .badge {
  display: inline-block;
  padding: 0.3em 0.7em;
  font-size: 0.64rem;
  font-weight: 500;
  line-height: 1.3;
  border: none;
  border-radius: 0.35rem;
  vertical-align: middle;
  white-space: nowrap;
}
.md-typeset .badge.bg-success {
  color: #37773a;
  background-color: rgba(55, 119, 58, 0.10);
}
.md-typeset .badge.bg-info {
  color: #1f6b6e;
  background-color: rgba(31, 107, 110, 0.10);
}
.md-typeset .badge.bg-secondary {
  color: #4e565c;
  background-color: rgba(78, 86, 92, 0.10);
}
.md-typeset .badge a,
.md-typeset .badge a:hover {
  color: inherit;
  text-decoration: none;
}

/* 表を中央寄せ */
.md-typeset table:not([class]) {
  margin-left: auto;
  margin-right: auto;   
}

/* ---- トップページのプロフィール ---- */
.md-typeset .hero {
  display: flex;
  flex-wrap: wrap;
  gap: 1.6rem;
  align-items: flex-start;
  margin-bottom: 2em;
}
.md-typeset .hero__text {
  flex: 1 1 0rem;      /* 20rem から縮小 */
}
.md-typeset .hero > p {
  margin: 0;            /* 画像を包む <p> の余白を消す */
}
.md-typeset .hero__text h1 {
  margin-top: 0;
  margin-bottom: 0.2em;
}
.md-typeset .hero__image {
  width: 9.5rem;
  height: 9.5rem;
  object-fit: cover;
  border-radius: 50%;
  box-shadow: var(--md-shadow-z1);
  /* order: 1;                 /* 写真を右に置く。左にしたければこの行を削除 */
}
.md-typeset .hero__role {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--md-primary-fg-color);
  margin: 0 0 0.4em;
}
.md-typeset .hero__affil {
  color: var(--md-default-fg-color--light);
  font-size: 0.72rem;
  line-height: 1.7;
  margin: 0 0 1em;
}
.md-typeset .hero .md-button {
  padding: 0.4em 0.9em;
  margin: 0 0.3em 0.4em 0;
  font-size: 0.68rem;
}

/* カード内の見出し行 */
.md-typeset .grid.cards .twemoji {
  height: 1.1rem;
  vertical-align: -0.2rem;
}

@media screen and (max-width: 44.98em) {
  .md-typeset .hero {
    flex-direction: column;      /* row-reverse を打ち消す */
    align-items: center;
    text-align: center;
  }
}
/* ---- カードの列数を固定する ---- */
@media screen and (min-width: 45em) {
  .md-typeset .grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
  .md-typeset .grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
  .md-typeset .grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
}

/* ---- CV：日付を左カラムに固定した 2 カラムレイアウト ---- */
.md-typeset .cv dl {
  display: grid;
  grid-template-columns: 8.5rem 1fr;
  gap: 0.9em 1.2rem;
  margin: 1em 0 1.6em;
}
.md-typeset .cv.cv--narrow dl {
  grid-template-columns: 6rem 1fr;
  gap: 0.5em 1.2rem;
}
.md-typeset .cv dt {
  margin: 0;
  padding-top: 0.05em;
  font-size: 0.68rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--md-default-fg-color--light);
  white-space: nowrap;
}
.md-typeset .cv dd {
  margin: 0;
  line-height: 1.6;
}
.md-typeset .cv dd strong {
  font-weight: 600;
}
.md-typeset .cv-ja {
  display: inline-block;
  font-size: 0.68rem;
  color: var(--md-default-fg-color--light);
}
.md-typeset .cv-role {
  display: inline-block;
  padding: 0.1em 0.45em;
  font-size: 0.58rem;
  font-weight: 600;
  color: var(--md-default-fg-color--light);
  border: 1px solid var(--md-default-fg-color--lightest);
  border-radius: 0.2rem;
  vertical-align: 0.1em;
  white-space: nowrap;
}

/* Reviews のような単純な一覧を 2 段組にする */
.md-typeset .cv-cols ul {
  columns: 2;
  column-gap: 2rem;
  margin-top: 0.4em;
}
.md-typeset .cv-cols li {
  break-inside: avoid;
  margin-top: 0.2em;
}

@media screen and (max-width: 44.98em) {
  .md-typeset .cv dl,
  .md-typeset .cv.cv--narrow dl {
    grid-template-columns: 1fr;
    gap: 0.2em;
  }
  .md-typeset .cv dt { margin-top: 0.8em; }
  .md-typeset .cv-cols ul { columns: 1; }
}

/* ---- 講義ページ：ヘッダーと講義回テーブル ---- */
.md-typeset .page-lead {
  margin-top: -0.6em;
  font-size: 0.75rem;
  color: var(--md-default-fg-color--light);
}
.md-typeset h1 .course-code {
  font-size: 0.7rem;
  vertical-align: 0.35em;
}

/* 講義回テーブル：回・教科書・資料の列を詰める */
/* 資料列の PDF アイコン */
.md-typeset td .twemoji {
  height: 1.3rem;
  vertical-align: -0.15rem;
}

.md-typeset table:not([class]) th:last-child,
.md-typeset table:not([class]) td:last-child {
  width: 5rem;
}

.md-typeset .topics {
  display: inline-block;
  margin-top: 0.2em;
  font-size: 0.6rem;
  line-height: 1.5;
  color: var(--md-default-fg-color--light);
}

/* 以下は削除
.md-typeset td .twemoji {
  height: 1rem;
  vertical-align: -0.15rem;
}
*/
