/* =============================================================
   site.css — サイト共通スタイル（手書き・ビルド不要）

   - このファイルは直接編集してOKです。コンパイルは要りません。
   - 色・余白などはまず下の「デザイントークン」を変更してください。
   - 記事本文（Markdown）の体裁は prose.css にあります（そちらは編集しない）。
     変えたいときは、このファイルに .prose h2 { ... } のように書いて上書きします。
   - 注意：コメントの中に「*」と「/」を続けて書かないこと（そこでコメントが終わってしまう）。
   ============================================================= */


/* -------------------------------------------------------------
   デザイントークン
   ------------------------------------------------------------- */
:root {
  /* グレー（Tailwind v3 の gray パレットと同じ値） */
  --gray-50:  #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --white:    #ffffff;

  /* 用途別の色 */
  --color-bg:        var(--gray-50);
  --color-text:      var(--gray-900);
  --color-text-sub:  var(--gray-700);
  --color-border:    var(--gray-100);

  /* 文字サイズ（font-size / line-height） */
  --text-xs:   0.75rem;   /* 12px */
  --text-sm:   0.875rem;  /* 14px */
  --text-base: 1rem;      /* 16px */
  --text-lg:   1.125rem;  /* 18px */
  --text-xl:   1.25rem;   /* 20px */
  --text-3xl:  1.875rem;  /* 30px */
  --text-4xl:  2.25rem;   /* 36px */

  /* 角丸・影 */
  --radius-sm: 0.25rem;
  --radius-md: 0.375rem;
  --radius-lg: 0.5rem;
  --radius-xl: 0.75rem;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);

  /* レイアウト */
  --content-width: 72rem;   /* 1152px：ヘッダー・フッターの最大幅 */
  --header-height: 72px;

  /* アニメーション */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --duration-fast: 150ms;
  --duration: 300ms;
}

/* ブレークポイント（CSS変数は @media で使えないため、値を直接書いています）
     sm: 640px 以上 / md: 768px 以上 */


/* -------------------------------------------------------------
   リセット
   ブラウザごとの既定の見た目の差をなくし、見出しの大きさ・余白・
   リストの記号などをいったん消す（見た目は各クラスで付ける）。
   Tailwind CSS v3.4.17 の Preflight（MIT License）と同じ内容。
   ------------------------------------------------------------- */
*,
::before,
::after {
  box-sizing: border-box;      /* 幅に padding と border を含める */
  border-width: 0;             /* border-width を指定するだけで線が出るように */
  border-style: solid;
  border-color: var(--gray-200);
}

html,
:host {
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
  -moz-tab-size: 4;
  tab-size: 4;
  font-family: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
  font-feature-settings: normal;
  font-variation-settings: normal;
  -webkit-tap-highlight-color: transparent;
}

body {
  margin: 0;
  line-height: inherit;
}

hr {
  height: 0;
  color: inherit;
  border-top-width: 1px;
}

abbr:where([title]) {
  text-decoration: underline dotted;
}

h1, h2, h3, h4, h5, h6 {
  font-size: inherit;
  font-weight: inherit;
}

a {
  color: inherit;
  text-decoration: inherit;
}

b,
strong {
  font-weight: bolder;
}

code, kbd, samp, pre {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-feature-settings: normal;
  font-variation-settings: normal;
  font-size: 1em;
}

small {
  font-size: 80%;
}

sub,
sup {
  position: relative;
  font-size: 75%;
  line-height: 0;
  vertical-align: baseline;
}
sub { bottom: -0.25em; }
sup { top: -0.5em; }

table {
  text-indent: 0;
  border-color: inherit;
  border-collapse: collapse;
}

button, input, optgroup, select, textarea {
  font-family: inherit;
  font-feature-settings: inherit;
  font-variation-settings: inherit;
  font-size: 100%;
  font-weight: inherit;
  line-height: inherit;
  letter-spacing: inherit;
  color: inherit;
  margin: 0;
  padding: 0;
}

button,
select {
  text-transform: none;
}

button,
input:where([type='button']),
input:where([type='reset']),
input:where([type='submit']) {
  -webkit-appearance: button;
  background-color: transparent;
  background-image: none;
}

:-moz-focusring { outline: auto; }
:-moz-ui-invalid { box-shadow: none; }
progress { vertical-align: baseline; }
::-webkit-inner-spin-button,
::-webkit-outer-spin-button { height: auto; }
[type='search'] { -webkit-appearance: textfield; outline-offset: -2px; }
::-webkit-search-decoration { -webkit-appearance: none; }
::-webkit-file-upload-button { -webkit-appearance: button; font: inherit; }
summary { display: list-item; }

blockquote, dl, dd, h1, h2, h3, h4, h5, h6, hr, figure, p, pre {
  margin: 0;
}

fieldset { margin: 0; padding: 0; }
legend { padding: 0; }

ol, ul, menu {
  list-style: none;
  margin: 0;
  padding: 0;
}

dialog { padding: 0; }
textarea { resize: vertical; }

input::placeholder,
textarea::placeholder {
  opacity: 1;
  color: var(--gray-400);
}

button,
[role="button"] {
  cursor: pointer;
}

:disabled {
  cursor: default;
}

/* 画像などはブロック要素にし、親の幅からはみ出さないようにする */
img, svg, video, canvas, audio, iframe, embed, object {
  display: block;
  vertical-align: middle;
}

img,
video {
  max-width: 100%;
  height: auto;
}

[hidden]:where(:not([hidden="until-found"])) {
  display: none;
}


/* -------------------------------------------------------------
   ページ全体
   ------------------------------------------------------------- */
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background-color: var(--color-bg);
  color: var(--color-text);
}


/* 各ページの本文 <main>。フッターを画面下に押しやるため、残りの高さを埋める */
.page-main {
  flex-grow: 1;
}

/* 本文を中央に寄せ、読みやすい幅（最大 896px）に収める。ほとんどのページで使う */
.page-main--narrow {
  width: 100%;
  max-width: 56rem;
  margin: 0 auto;
  padding: 2rem;
}

/* 青いボタン（エラーページの「トップページに戻る」など） */
.button {
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  background-color: #2563eb;   /* blue-600 */
  color: var(--white);

  &:hover { background-color: #1d4ed8; }   /* blue-700 */
}


/* -------------------------------------------------------------
   ヘッダー（components/Header.php）
   ------------------------------------------------------------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  background-color: var(--white);
  box-shadow: var(--shadow-sm);
  transition: all var(--duration) var(--ease);
}

.site-header__inner {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* 固定ヘッダーの下に本文が潜り込まないようにするスペーサー */
.site-header-spacer {
  height: var(--header-height);
}

/* ロゴ＋研究室名 */
.site-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  transition: opacity var(--duration-fast) var(--ease);

  &:hover { opacity: 0.8; }
}

.site-logo__image {
  width: 2.5rem;
  height: 2.5rem;
  object-fit: contain;
}

.site-logo__text {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.site-logo__short {
  font-size: var(--text-sm);
  color: var(--gray-800);
}

.site-logo__full {
  margin-top: -0.125rem;
  font-size: var(--text-xl);
  font-weight: 600;
  color: var(--gray-900);
}


/* ---------- PC用ナビゲーション ---------- */
.site-nav {
  display: none;
  gap: 1.5rem;
  font-size: var(--text-lg);
  line-height: 1.75rem;

  @media (min-width: 768px) { display: flex; }
}

.site-nav__link {
  display: flex;
  align-items: center;
  color: var(--gray-700);
  transition: color var(--duration-fast) var(--ease);

  &:hover { color: var(--gray-900); }
  &:focus { outline: none; }
}

/* ドロップダウン：ホバーで中身を表示 */
.nav-dropdown {
  position: relative;
}

.nav-dropdown__icon {
  width: 1rem;
  height: 1rem;
  margin-left: 0.25rem;
  transition: transform var(--duration-fast) var(--ease);

  .nav-dropdown:hover & { transform: rotate(180deg); }
}

.nav-dropdown__menu {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  margin-top: 0.5rem;
  white-space: nowrap;
  background-color: var(--white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transition: all 200ms var(--ease);

  .nav-dropdown:hover & {
    opacity: 1;
    visibility: visible;
  }
}

.nav-dropdown__link {
  display: block;
  padding: 0.75rem 1rem;
  color: var(--gray-700);
  transition: background-color var(--duration-fast) var(--ease);

  &:hover { background-color: var(--gray-100); }
  & + & { border-top: 1px solid var(--color-border); }
  &:first-child { border-top-left-radius: var(--radius-md); border-top-right-radius: var(--radius-md); }
  &:last-child { border-bottom-left-radius: var(--radius-md); border-bottom-right-radius: var(--radius-md); }
}


/* ---------- モバイル用メニュー ----------
   開閉は assets/js/mobileMenu.js が .is-open / .is-active を付け外しする */

/* ハンバーガーボタン */
.menu-toggle {
  position: relative;
  z-index: 50;
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;

  &:focus { outline: none; }
  @media (min-width: 768px) { display: none; }
}

.menu-toggle__icon {
  position: relative;
  width: 1.5rem;
  height: 1.5rem;
}

.menu-toggle__line {
  position: absolute;
  left: 0;
  width: 1.5rem;
  height: 0.125rem;
  background-color: var(--gray-900);
  transition: all var(--duration) var(--ease);

  &:nth-child(1) { top: 0;        transform-origin: left bottom; }
  &:nth-child(2) { top: 0.625rem; }
  &:nth-child(3) { top: 1.25rem;  transform-origin: left top; }
}

/* 開いている間は ✕ 印に変形 */
.menu-toggle.is-active .menu-toggle__line {
  &:nth-child(1) { transform: rotate(45deg) scaleX(1.15); }
  &:nth-child(2) { opacity: 0; }
  &:nth-child(3) { transform: rotate(-45deg) scaleX(1.15); }
}

/* 背景の半透明オーバーレイ */
.menu-overlay {
  position: fixed;
  inset: 0;
  z-index: 30;
  background-color: rgb(0 0 0 / 0.5);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--duration) var(--ease);

  &.is-open {
    opacity: 1;
    pointer-events: auto;
  }
  @media (min-width: 768px) { display: none; }
}

/* 右から出てくるメニュー本体 */
.mobile-menu {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 40;
  width: 18rem;
  height: 100%;
  background-color: var(--white);
  color: var(--gray-900);
  border-left: 1px solid var(--gray-200);
  box-shadow: var(--shadow-2xl);
  transform: translateX(100%);
  transition: transform var(--duration) var(--ease);

  &.is-open { transform: translateX(0); }
  @media (min-width: 768px) { display: none; }
}

.mobile-menu__inner {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 5rem 1.5rem 0;
  overflow-y: auto;
}

.mobile-menu__link {
  display: block;
  padding: 1rem;
  border-radius: var(--radius-sm);
  font-size: var(--text-lg);
  line-height: 1.75rem;
  color: var(--gray-700);
  transition: color var(--duration-fast) var(--ease), background-color var(--duration-fast) var(--ease);

  &:hover {
    color: var(--gray-900);
    background-color: var(--gray-100);
  }
}

.mobile-menu__group {
  padding: 0.5rem 0;
}

.mobile-menu__group-title {
  padding: 0.5rem 1rem;
  font-size: var(--text-sm);
  line-height: 1.25rem;
  font-weight: 600;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* グループ内のリンクは一段下げて少し小さく */
.mobile-menu__group .mobile-menu__link {
  padding: 0.75rem 0 0.75rem 2rem;
  font-size: var(--text-base);
  line-height: 1.5rem;
}


/* -------------------------------------------------------------
   フッター（components/Footer.php）
   ------------------------------------------------------------- */
.site-footer {
  margin-top: auto;
  background-color: var(--gray-900);
  color: var(--gray-400);
  border-top: 1px solid var(--gray-800);
}

.site-footer__inner {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
}

.site-footer__brand {
  margin-bottom: 2rem;
  text-align: center;
}

.site-footer__name {
  margin-bottom: 0.5rem;
  font-size: var(--text-xl);
  line-height: 1.75rem;
  font-weight: 600;
  color: var(--white);
}

.site-footer__tagline {
  max-width: 36rem;
  margin: 0 auto;
  font-size: var(--text-sm);
  line-height: 1.25rem;
  color: var(--gray-200);
}

/* リンク一覧：1列 → 2列(sm) → 4列(md) */
.site-footer__nav {
  max-width: 56rem;
  margin: 0 auto 2rem;
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 2rem;
  font-size: var(--text-sm);
  line-height: 1.25rem;

  @media (min-width: 640px) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  @media (min-width: 768px) { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.site-footer__heading {
  margin-bottom: 0.75rem;
  font-weight: 600;
  color: var(--white);
}

.site-footer__links {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.site-footer__link {
  display: block;
  transition: color var(--duration-fast) var(--ease);

  &:hover { color: var(--white); }
}

.site-footer__copyright {
  text-align: center;
  font-size: var(--text-xs);
  line-height: 1rem;
  color: var(--gray-500);
}


/* -------------------------------------------------------------
   ページタイトル（components/PageTitle.php）
   ------------------------------------------------------------- */
.page-title {
  width: 100%;
  margin-bottom: 2rem;
  text-align: center;
}

.page-title__heading {
  margin: 1.5rem 0 0.75rem;
  font-size: var(--text-3xl);
  line-height: 2.25rem;
  font-weight: 700;

  @media (min-width: 768px) {
    font-size: var(--text-4xl);
    line-height: 2.5rem;
  }
}

.page-title__desc {
  max-width: 48rem;
  margin: 0 auto;
  font-size: var(--text-base);
  line-height: 1.625;
  color: var(--gray-700);

  @media (min-width: 768px) {
    font-size: var(--text-lg);
    line-height: 1.75rem;
  }
}


/* -------------------------------------------------------------
   「さらに見る」ボタン（components/utils.php の renderViewMoreButton）
   ------------------------------------------------------------- */
.view-more-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background-color: var(--gray-900);
  color: var(--white);
  font-weight: 600;
  border-radius: var(--radius-lg);
  transition: all var(--duration) var(--ease);

  &:hover {
    background-color: var(--gray-800);
    box-shadow: var(--shadow-lg);
    transform: scale(1.05);
  }
}

.view-more-button__icon {
  width: 1rem;
  height: 1rem;
  transition: transform var(--duration) var(--ease);

  /* ホバー時に矢印を右へ少し動かしたい場合は、次の行のコメントを外す
  .view-more-button:hover & { transform: translateX(0.25rem); } */
}


/* -------------------------------------------------------------
   ページ送り（components/Pagination.php）
   ------------------------------------------------------------- */
.pagination {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 2rem;
}

.pagination__link {
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-sm);
  background-color: var(--gray-200);
  color: var(--gray-800);

  &:hover { background-color: var(--gray-300); }

  /* 現在のページ */
  &[aria-current="page"] {
    background-color: var(--gray-900);
    color: var(--white);
  }
}


/* -------------------------------------------------------------
   ニュース（components/NewsCard.php, components/NewsList.php）
   ------------------------------------------------------------- */
.news-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.news-list__empty {
  color: var(--gray-500);
}

.news-card {
  display: block;
  width: 100%;          /* flex の中に置かれても横幅いっぱいに広げる */
  max-width: 56rem;
  margin: 0 auto;
  padding: 1rem;
  background-color: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-xl);
  transition: background-color var(--duration-fast) var(--ease);

  &:hover { background-color: #eff6ff; }
}

/* 日付・タグ と タイトル：スマホでは縦並び、PCでは横並び */
.news-card__body {
  display: flex;
  flex-direction: column;

  @media (min-width: 768px) {
    flex-direction: row;
    align-items: center;
    gap: 0.75rem;
  }
}

.news-card__meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;

  @media (min-width: 768px) { margin-bottom: 0; }
}

.news-card__date {
  font-size: var(--text-sm);
  line-height: 1.25rem;
  color: var(--gray-500);
}

.news-card__title {
  font-size: var(--text-lg);
  line-height: 1.75rem;
  font-weight: 600;

  @media (min-width: 768px) { flex: 1 1 0%; }
}

/* タグ（色は種類ごとに下の --xxx で指定） */
.news-tag {
  display: inline-block;
  min-width: 4rem;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
  line-height: 1rem;
  font-weight: 600;
  text-align: center;
  background-color: var(--gray-100);   /* 下に無い種類のタグはグレー */
  color: var(--gray-800);
}

.news-tag--paper   { background-color: #f3e8ff; color: #6b21a8; }  /* 論文投稿：紫 */
.news-tag--talk    { background-color: #dbeafe; color: #1e40af; }  /* 発表：青 */
.news-tag--award   { background-color: #fef9c3; color: #854d0e; }  /* 受賞：黄 */
.news-tag--event   { background-color: #dcfce7; color: #166534; }  /* イベント：緑 */
.news-tag--notice  { background-color: #fce7f3; color: #9d174d; }  /* お知らせ：ピンク */
.news-tag--seminar { background-color: #e0e7ff; color: #3730a3; }  /* セミナー：藍 */


/* -------------------------------------------------------------
   絞り込みフォーム（components/FilterBlock.php）
   スマホ：項目を縦に並べる / PC：横一列で中央揃え
   ------------------------------------------------------------- */
.filter-form {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding-bottom: 1rem;

  @media (min-width: 768px) {
    flex-direction: row;
    justify-content: center;
  }
}

/* ラベル＋セレクトボックス 1組 */
.filter-form__field {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.5rem;

  @media (min-width: 768px) {
    display: flex;
    justify-content: flex-end;
  }
}

.filter-form__label {
  display: block;
  width: 4rem;
  align-content: center;
  text-align: center;
  white-space: nowrap;
  font-size: var(--text-sm);
  line-height: 1.25rem;
  font-weight: 600;

  @media (min-width: 768px) { width: auto; }
}

.filter-form__select {
  width: 9rem;
  padding: 0.25rem;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-sm);
}

.filter-form__submit {
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-sm);
  background-color: var(--gray-900);
  color: var(--white);

  @media (min-width: 768px) {
    flex-shrink: 0;
    &:hover { background-color: var(--gray-700); }
  }
}


/* -------------------------------------------------------------
   研究業績（components/PublicationCard.php）
   ------------------------------------------------------------- */
.publication-card {
  max-width: 56rem;
  margin: 0 auto;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--gray-200);
}

/* 年・分類タグ・サブタグの行 */
.publication-card__meta {
  margin-bottom: 0.25rem;
  font-size: var(--text-xs);
  line-height: 1rem;
  color: #4b5563;   /* gray-600 */
}

.publication-card__tag {
  display: inline-block;
  min-width: 4rem;
  padding: 0.125rem 0.5rem;
  text-align: center;
  background-color: #dbeafe;   /* blue-100 */
  color: #1d4ed8;              /* blue-700 */
}

.publication-card__subtag {
  display: inline-block;
  margin-left: 0.25rem;
  padding: 0.125rem 0.5rem;
  background-color: var(--gray-100);
  color: var(--gray-700);
}

.publication-card__title {
  margin-bottom: 0.25rem;
  font-size: var(--text-sm);
  line-height: 1.25rem;
  font-weight: 600;
}

.publication-card__authors {
  margin-bottom: 0.5rem;
  font-size: var(--text-sm);
  line-height: 1.25rem;
  color: var(--gray-700);
}

.publication-card__links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  font-size: var(--text-sm);
  line-height: 1.25rem;
}

.publication-card__link {
  color: #2563eb;   /* blue-600 */

  &:hover { text-decoration: underline; }
}


/* -------------------------------------------------------------
   メンバー（components/MemberCard.php）
   ------------------------------------------------------------- */
.member-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background-color: var(--white);
  border-radius: var(--radius-xl);
  box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
}

.member-card__photo {
  width: 5rem;
  height: 5rem;
  object-fit: cover;
  border: 1px solid var(--gray-300);
  border-radius: 9999px;
}

.member-card__body {
  flex: 1 1 0%;
}

.member-card__name {
  font-size: var(--text-lg);
  line-height: 1.75rem;
  font-weight: 600;
}

.member-card__role {
  font-size: var(--text-sm);
  line-height: 1.25rem;
  color: #4b5563;   /* gray-600 */
}

.member-card__field,
.member-card__comment {
  margin-bottom: 0.25rem;
  font-size: var(--text-sm);
  line-height: 1.25rem;
  color: var(--gray-700);
}

.member-card__comment {
  margin-bottom: 0.5rem;
  font-style: italic;
}

/* 外部リンク（テキストリンク・SNSアイコン） */
.member-card__links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

.member-card__link {
  font-size: var(--text-sm);
  line-height: 1.25rem;
  color: #2563eb;   /* blue-600 */

  &:hover { text-decoration: underline; }
}

/* SNSアイコン：ホバーで濃くなり、上にラベルが出る */
.member-card__icon-link {
  position: relative;
}

.member-card__icon {
  width: 1.25rem;
  height: 1.25rem;
  opacity: 0.7;
  transition: opacity var(--duration-fast) var(--ease);

  .member-card__icon-link:hover & { opacity: 1; }
}

.member-card__tooltip {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-bottom: 0.25rem;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  background-color: var(--gray-800);
  color: var(--white);
  font-size: var(--text-xs);
  line-height: 1rem;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--duration-fast) var(--ease);

  .member-card__icon-link:hover & { opacity: 1; }
}


/* -------------------------------------------------------------
   アクセスカード（components/AccessCard.php）
   アイコンの色は data/contact_access.json の icon.color で指定
   ------------------------------------------------------------- */
.access-card {
  padding: 1.5rem;
  background-color: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
}

.access-card__header {
  display: flex;
  align-items: center;
  margin-bottom: 1rem;
}

.access-card__icon {
  width: 1.5rem;
  height: 1.5rem;
  margin-right: 0.75rem;
}

.access-card__title {
  font-size: var(--text-xl);
  line-height: 1.75rem;
  font-weight: 600;
  color: var(--gray-900);
}

.access-card__body {
  color: var(--gray-700);

  & > * + * { margin-top: 0.75rem; }
}

.access-card__main {
  font-weight: 600;
}

.access-card__detail {
  padding-left: 1rem;
}

.access-card__note {
  padding-left: 1rem;
  font-size: var(--text-sm);
  line-height: 1.25rem;
  color: #4b5563;   /* gray-600 */
}


/* -------------------------------------------------------------
   研究分野ブロック（components/ResearchBlock.php）
   ------------------------------------------------------------- */
.research-block {
  display: block;
  background-color: var(--white);
  border-radius: var(--radius-xl);
  box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  overflow-x: auto;
}

.research-block__body {
  padding: 0.5rem 1rem;
}

.research-block__title {
  margin-bottom: 0.25rem;
  font-size: var(--text-lg);
  line-height: 1.75rem;
  font-weight: 600;
}

.research-block__subtitle {
  margin-bottom: 0.5rem;
  font-size: var(--text-sm);
  line-height: 1.25rem;
  font-weight: 600;
  color: var(--gray-700);
}

.research-block__desc {
  font-size: var(--text-sm);
  line-height: 1.25rem;
  color: var(--gray-700);
}

/* ↓ 詳細ページへのリンク版（ResearchBlock.php 内でコメントアウト中。公開時に使う） */
.research-block--link {
  overflow: hidden;
  transition: box-shadow var(--duration-fast) var(--ease);

  &:hover { box-shadow: var(--shadow-lg); }
}

.research-block__thumb {
  aspect-ratio: 16 / 9;
  background-color: var(--gray-100);
}

.research-block__thumb-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}


/* -------------------------------------------------------------
   トップページのセクションカード（components/HomeContents.php）
   ------------------------------------------------------------- */
.home-section {
  max-width: 64rem;
  margin: 0 auto;
  padding: 1rem;
}

.home-section__card {
  padding: 1rem;
  background-color: var(--white);
  border-radius: var(--radius-xl);
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  overflow: hidden;
}

.home-section__title {
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--gray-300);
  font-size: 1.5rem;
  line-height: 2rem;
  font-weight: 700;
}

/* 画像（上に置く場合） */
.home-section__image-top {
  width: 100%;
  margin-bottom: 1rem;
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.home-section__image-frame {
  width: 100%;
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.home-section__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 画像を左右に置く場合：スマホでは縦積み、PCでは横並び（半分ずつ） */
.home-section__layout--side {
  @media (min-width: 768px) {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
  }
}

.home-section__side-image {
  margin-bottom: 1rem;

  @media (min-width: 768px) {
    width: 50%;
    margin-bottom: 0;
  }
}

.home-section__side-content {
  @media (min-width: 768px) { width: 50%; }
}

/* 画像が右のときは、PCで画像とテキストの順番を入れ替える */
.home-section__layout--image-right {
  @media (min-width: 768px) {
    .home-section__side-image   { order: 2; }
    .home-section__side-content { order: 1; }
  }
}

.home-section__desc {
  margin-bottom: 1.5rem;
  line-height: 1.625;
  color: var(--gray-700);

  /* 説明文中のリンク（data/home/home_sections.json で allowHtml のもの）
     元は黒の下線の指定だったが Tailwind 側に定義がなく、薄いグレーで表示されていたので、その見た目に合わせている */
  & a { border-bottom: 1px solid var(--gray-200); }
}

.home-section__actions {
  display: flex;
  justify-content: center;
}


/* -------------------------------------------------------------
   トップページのお知らせバナー（components/HeroAnnouncement.php）
   複数あるときはカルーセルになり、assets/js/hero-announcements.js が
   表示中のお知らせ・ドットに .is-active を付け外しする
   ------------------------------------------------------------- */
.hero-announcements {
  max-width: 64rem;
  margin: 1.5rem auto 0.5rem;
  padding: 0 1rem;
}

/* お知らせ1件分。表示中のもの（.is-active）以外は隠す */
.hero-announcement {
  display: none;
  height: 100%;
  padding: 1.5rem;
  background-image: linear-gradient(to right, #eff6ff, #eef2ff);   /* blue-50 → indigo-50 */
  border: 2px solid #bfdbfe;                                       /* blue-200 */
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  transition: opacity 500ms var(--ease);

  &.is-active { display: block; }
  @media (min-width: 768px) { padding: 2rem; }
}

.hero-announcement__inner {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  height: 100%;

  @media (min-width: 768px) {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.hero-announcement__text {
  flex: 1 1 0%;
}

.hero-announcement__title {
  margin-bottom: 0.75rem;
  font-size: var(--text-xl);
  line-height: 1.75rem;
  font-weight: 700;
  color: var(--gray-900);

  @media (min-width: 768px) {
    font-size: 1.5rem;
    line-height: 2rem;
  }
}

.hero-announcement__message {
  font-size: var(--text-base);
  line-height: 1.625;
  color: var(--gray-700);

  @media (min-width: 768px) {
    font-size: var(--text-lg);
    line-height: 1.75rem;
  }
}

.hero-announcement__action {
  flex-shrink: 0;

  @media (min-width: 768px) { margin-left: 1rem; }
}

/* カルーセル：［前へ］［お知らせ］［次へ］の横並び */
.hero-carousel {
  display: flex;
  align-items: stretch;
  gap: 0.5rem;

  @media (min-width: 768px) { gap: 0.75rem; }
}

.hero-carousel__items {
  position: relative;
  flex: 1 1 0%;
}

.hero-carousel__arrow {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 0.5rem;
  background-color: var(--white);
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  transition: all 200ms var(--ease);

  &:hover {
    background-color: var(--gray-50);
    box-shadow: var(--shadow-lg);
  }
  @media (min-width: 768px) { padding: 0 0.75rem; }
}

.hero-carousel__arrow-icon {
  width: 1.25rem;
  height: 1.25rem;
  color: var(--gray-700);

  @media (min-width: 768px) {
    width: 1.5rem;
    height: 1.5rem;
  }
}

/* ドット（表示中のものは横長で濃い色） */
.hero-carousel__dots {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1rem;
}

.hero-carousel__dot {
  width: 0.625rem;
  height: 0.625rem;
  border-radius: 9999px;
  background-color: var(--gray-300);
  transition: all var(--duration) var(--ease);

  &:hover { background-color: var(--gray-500); }
  &:focus {
    outline: none;
    box-shadow: 0 0 0 2px var(--white), 0 0 0 4px var(--gray-400);
  }
  &.is-active {
    width: 2rem;
    background-color: var(--gray-700);
  }
}


/* =============================================================
   ここから下は、特定のページだけで使うスタイル
   ============================================================= */

/* -------------------------------------------------------------
   エラーページ（403.php / 404.php / 500.php）
   ------------------------------------------------------------- */
.error-page {
  padding: 5rem 0;
  text-align: center;
}

.error-page__code {
  margin-bottom: 1rem;
  font-size: 3.75rem;
  line-height: 1;
  font-weight: 700;
  color: var(--gray-800);
}

.error-page__message {
  margin-bottom: 2rem;
  font-size: var(--text-lg);
  line-height: 1.75rem;
  color: #4b5563;   /* gray-600 */
}


/* -------------------------------------------------------------
   記事ページ（article/index.php）の「無効なID」「記事が見つかりません」
   ------------------------------------------------------------- */
.article-error {
  padding: 2rem;
}

.article-error__title {
  margin-bottom: 1rem;
  font-size: 1.5rem;
  line-height: 2rem;
  font-weight: 700;
  color: #dc2626;   /* red-600 */
}


/* -------------------------------------------------------------
   メンバー紹介（members/index.php）
   ------------------------------------------------------------- */
.member-groups > * + * {
  margin-top: 2.5rem;
}

.member-group__title {
  margin-bottom: 1rem;
  padding-bottom: 0.25rem;
  border-bottom: 1px solid var(--gray-300);
  font-size: 1.5rem;
  line-height: 2rem;
  font-weight: 600;
}

/* カードの並び：スマホ1列 / PC2列 */
.member-grid {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 1rem;

  @media (min-width: 768px) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}


/* -------------------------------------------------------------
   研究内容（research/index.php）
   ------------------------------------------------------------- */
/* カードの並び：スマホ1列 / PC2列 */
.research-grid {
  display: grid;
  gap: 1.5rem;

  @media (min-width: 768px) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}


/* -------------------------------------------------------------
   研究業績（publications/index.php）
   ------------------------------------------------------------- */
.publication-list > * + * {
  margin-top: 1rem;
}

.publication-list__empty {
  color: var(--gray-500);
}


/* -------------------------------------------------------------
   トップページ（index.php）
   ------------------------------------------------------------- */
/* 画像・研究室名・キャッチコピー */
.home-hero {
  padding-bottom: 2rem;
  text-align: center;
}

.home-hero__image {
  display: block;
  width: 100%;
  max-width: 48rem;
  margin: 0 auto;
  padding-bottom: 2rem;
}

.home-hero__title {
  margin-bottom: 0.5rem;
  font-size: var(--text-4xl);
  line-height: 2.5rem;
  font-weight: 700;
}

.home-hero__tagline {
  color: var(--gray-700);
}

/* 最新ニュースのカード */
.home-news {
  max-width: 64rem;
  margin: 0 auto;
  padding: 3rem 1rem;
}

.home-news__card {
  background-color: var(--white);
  border-radius: var(--radius-xl);
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  overflow: hidden;
  transition: box-shadow var(--duration) var(--ease);

  &:hover { box-shadow: var(--shadow-lg); }
}

.home-news__image-frame {
  width: 100%;
  height: 12rem;
  overflow: hidden;
}

.home-news__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.home-news__body {
  padding: 1.5rem;
}

.home-news__title {
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--gray-300);
  font-size: 1.5rem;
  line-height: 2rem;
  font-weight: 700;
}

.home-news__desc {
  margin-bottom: 1.5rem;
  line-height: 1.625;
  color: var(--gray-700);
}

.home-news__list {
  margin-bottom: 1.5rem;

  & > * + * { margin-top: 1rem; }
}

.home-news__actions {
  display: flex;
  justify-content: center;
}


/* -------------------------------------------------------------
   ニュース一覧（news/index.php）
   ------------------------------------------------------------- */
.news-page {
  padding: 0 2rem 2rem;
}


/* -------------------------------------------------------------
   アクセス・お問合せ（contact/index.php）
   ------------------------------------------------------------- */
.contact-section {
  margin-bottom: 4rem;
}

.contact-section__title {
  margin-bottom: 1.5rem;
  font-size: 1.5rem;
  line-height: 2rem;
  font-weight: 700;
  color: var(--gray-900);
}

.contact-section__lead {
  margin-bottom: 1rem;
}

/* 所在地・お問い合わせのカード（PCでは2列） */
.contact-info {
  padding: 2rem;
  background-color: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
}

.contact-info__grid {
  display: grid;
  gap: 2rem;

  @media (min-width: 768px) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.contact-info__heading {
  margin-bottom: 1rem;
  font-size: var(--text-lg);
  line-height: 1.75rem;
  font-weight: 600;
  color: var(--gray-900);
}

.contact-info__address {
  color: var(--gray-700);

  & > * + * { margin-top: 0.5rem; }
}

/* アイコン＋テキストの1行 */
.contact-info__line {
  display: flex;
  align-items: flex-start;
}

.contact-info__icon {
  flex-shrink: 0;
  width: 1.25rem;
  height: 1.25rem;
  margin: 0.125rem 0.5rem 0 0;
  color: var(--gray-700);
}

.contact-info__contact > * + * {
  margin-top: 1rem;
}

.contact-info__text {
  color: var(--gray-700);
}

.contact-info__actions {
  display: flex;
  justify-content: center;
}

.contact-info__notice {
  font-size: var(--text-sm);
  line-height: 1.25rem;
  color: #4b5563;   /* gray-600 */
}

/* 簡易マップ */
.contact-map {
  position: relative;
  width: 100%;
  height: 100%;
  margin-bottom: 4rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

/* 電車・バスのアクセスカードの並び（PCでは2列） */
.contact-routes {
  display: grid;
  gap: 1.5rem;

  @media (min-width: 768px) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}


/* -------------------------------------------------------------
   研究環境（facilities/index.php）
   ------------------------------------------------------------- */
.facility-sections > * + * {
  margin-top: 2rem;
}

.facility-section__title {
  margin-bottom: 0.75rem;
  font-size: 1.5rem;
  line-height: 2rem;
  font-weight: 600;
}

.facility-section__image {
  margin-bottom: 0.5rem;
  border-radius: var(--radius-lg);
  box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
}

.facility-section__desc {
  color: var(--gray-700);
}

/* 表（横にはみ出す場合はスクロール） */
.facility-table-wrap {
  margin-bottom: 0.5rem;
  overflow-x: auto;
}

.facility-table {
  min-width: 100%;
  background-color: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);

  & thead { background-color: var(--gray-100); }

  & th {
    padding: 0.75rem 1.5rem;
    border-bottom: 1px solid var(--gray-200);
    text-align: left;
    font-size: var(--text-sm);
    line-height: 1.25rem;
    font-weight: 600;
    color: var(--gray-700);
  }

  & td {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--gray-200);
    font-size: var(--text-sm);
    line-height: 1.25rem;
    color: var(--gray-900);
  }

  /* 行は白とグレーの交互 */
  & tbody tr:nth-child(even) { background-color: var(--gray-50); }
}


/* -------------------------------------------------------------
   スケジュール（schedule/index.php）
   ------------------------------------------------------------- */
.schedule-page {
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 1rem;
  overflow-x: auto;

  @media (min-width: 768px) { padding: 0 2rem; }
}

/* Google カレンダーの埋め込み */
.schedule-calendar {
  margin-bottom: 2rem;
}

.schedule-calendar__frame {
  position: relative;
  width: 100%;
  height: 750px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.schedule-calendar__iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* 注意事項 */
.schedule-notes {
  margin-top: 2rem;
  padding: 1rem;
  background-color: var(--gray-50);
  border-radius: var(--radius-lg);

  @media (min-width: 768px) { padding: 1.5rem; }
}

.schedule-notes__title {
  margin-bottom: 0.75rem;
  font-size: var(--text-lg);
  line-height: 1.75rem;
  font-weight: 600;
}

.schedule-notes__list {
  list-style: disc inside;
  font-size: var(--text-sm);
  line-height: 1.25rem;
  color: var(--gray-700);

  & > * + * { margin-top: 0.5rem; }
  @media (min-width: 768px) {
    font-size: var(--text-base);
    line-height: 1.5rem;
  }
}


/* -------------------------------------------------------------
   研究テーマの詳細ページ（research/ の下の各ページ。例: research/COMET_experiment/index.php）
   ------------------------------------------------------------- */
.research-detail__title {
  margin-bottom: 1.5rem;
  font-size: var(--text-3xl);
  line-height: 2.25rem;
  font-weight: 700;
}

.research-detail__body {
  color: var(--gray-800);

  & ul { margin-left: 1.5rem; }
}


/* -------------------------------------------------------------
   記事本文（prose.css）の調整
   記事ページ（article/index.php）と研究テーマの詳細ページで使う。
   prose.css そのものは編集せず、変えたいところはここで上書きする。
   ------------------------------------------------------------- */
.prose {
  max-width: none;   /* prose.css の既定（1行65文字まで）をやめ、本文の幅いっぱいに広げる */
}
