@charset "utf-8";
/* =====================================================================
   吉野研究室サイト モダンテーマ (modern.css)
   - 既存 RapidWeaver "ideal" テーマの上に読み込み、見た目を刷新する上書き用CSS
   - 上部固定ナビバー / 青系ブランドカラーの洗練 / レスポンシブ対応
   - 各ページの <head> 末尾（インライン<style>より後）に読み込むこと
   ===================================================================== */

/* ---------- デザイントークン ---------- */
:root {
  --brand:        #2563eb;   /* 洗練した青（従来の #3366FF を継承） */
  --brand-dark:   #1e3a8a;   /* ヘッダーグラデーション濃色 */
  --brand-deep:   #1d4ed8;
  --brand-light:  #3b82f6;
  --brand-tint:   #eff6ff;   /* 淡い青の背景 */
  --brand-tint2:  #dbeafe;

  --ink:          #0f172a;   /* 本文の濃い文字色 */
  --ink-soft:     #334155;
  --muted:        #64748b;   /* 補助テキスト */
  --line:         #e2e8f0;   /* 罫線 */
  --line-soft:    #eef2f7;

  --bg:           #f4f7fb;   /* ページ背景 */
  --surface:      #ffffff;   /* カード面 */

  --radius:       14px;
  --radius-sm:    10px;
  --shadow:       0 1px 2px rgba(15,23,42,.04), 0 8px 24px rgba(15,23,42,.06);
  --shadow-sm:    0 1px 2px rgba(15,23,42,.05), 0 4px 12px rgba(15,23,42,.05);

  --nav-h:        64px;
  --maxw:         1200px;

  --font-jp: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Noto Sans JP",
             "BIZ UDPGothic", Meiryo, "Yu Gothic", "MS PGothic", sans-serif;
}

/* ---------- ベースの上書き ---------- */
html.mjs { scroll-behavior: smooth; }

html.mjs body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-jp);
  font-size: 16px;
  line-height: 1.85;
  text-align: left;                 /* 旧 text-align:center を打ち消し */
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

html.mjs img { max-width: 100%; height: auto; border: 0; }
/* body 直下の画像はトラッキングピクセル等のみ（本文画像は #content 内）→ 非表示 */
html.mjs > body > img { display: none !important; }

html.mjs a[href] { color: var(--brand-deep); text-decoration: none; }
html.mjs a[href]:hover { color: var(--brand-dark); text-decoration: underline; }

/* 旧テーマの構造を無効化 */
html.mjs #container {
  width: auto !important;
  max-width: none;
  margin: 0;
  padding: 0;
  background: none !important;
  border: 0 !important;
  color: inherit;
}
html.mjs #pageHeader { display: none !important; }   /* タイトルは上部バーへ移動 */
html.mjs #sidebarContainer { float: none; width: auto; }
html.mjs #contentContainer,
html.mjs #breadcrumbcontainer {
  margin: 0 !important;
  line-height: inherit;
}
html.mjs .clearer { display: none; }

/* =====================================================================
   上部固定ナビバー
   ===================================================================== */
html.mjs .site-bar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: linear-gradient(100deg, var(--brand-dark) 0%, var(--brand-deep) 55%, var(--brand) 100%);
  color: #fff;
  box-shadow: 0 2px 14px rgba(15,23,42,.18);
  text-align: left;   /* 一部ページの外部CSS(header{text-align:center})に負けないように */
  padding: 0;
}
html.mjs .site-bar__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  min-height: var(--nav-h);
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

html.mjs .site-brand {
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: #fff !important;
  text-decoration: none !important;
  line-height: 1.25;
  padding: 8px 0;
  flex: 1 1 auto;
  min-width: 0;
}
html.mjs .site-brand:hover { opacity: .92; }
html.mjs .site-brand__title {
  font-size: 1.12rem;
  font-weight: 700;
  letter-spacing: .01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
html.mjs .site-brand__sub {
  font-size: .72rem;
  font-weight: 500;
  color: #cfe0ff;
  letter-spacing: .04em;
}

/* ハンバーガー */
html.mjs .nav-toggle {
  display: none;
  flex: 0 0 auto;
  width: 44px; height: 40px;
  margin-left: auto;
  padding: 0;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 10px;
  cursor: pointer;
}
html.mjs .nav-toggle span {
  display: block;
  width: 20px; height: 2px;
  margin: 4px auto;
  background: #fff;
  border-radius: 2px;
  transition: transform .25s ease, opacity .2s ease;
}
html.mjs .site-bar.is-open .nav-toggle span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
html.mjs .site-bar.is-open .nav-toggle span:nth-child(2) { opacity: 0; }
html.mjs .site-bar.is-open .nav-toggle span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ナビ本体 */
html.mjs .site-nav { flex: 1 1 100%; }
html.mjs .site-nav__list {
  list-style: none;
  margin: 0;
  padding: 0 0 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 2px 4px;
  font-size: .84rem;
}
html.mjs .site-nav__list li { margin: 0; }
html.mjs .site-nav__list a {
  display: block;
  padding: 6px 11px;
  color: #e6eeff !important;
  text-decoration: none !important;
  border-radius: 999px;
  font-weight: 600;
  white-space: nowrap;
  line-height: 1.4;
  transition: background .18s ease, color .18s ease;
}
html.mjs .site-nav__list a:hover { background: rgba(255,255,255,.16); color: #fff !important; }
html.mjs .site-nav__list a.active,
html.mjs .site-nav__list a#current {
  background: #fff;
  color: var(--brand-deep) !important;
}

/* =====================================================================
   本文レイアウト
   ===================================================================== */
html.mjs .page-wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 28px 20px 56px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  align-items: start;
}
html.mjs .page-wrap.has-aside {
  grid-template-columns: minmax(0, 1fr) 320px;
}

html.mjs #contentContainer { min-width: 0; }
html.mjs #content {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 30px 34px 40px;
  min-width: 0;
}
html.mjs #breadcrumbcontainer { margin: 0 !important; }
html.mjs #breadcrumbcontainer:empty { display: none; }

/* ---------- 見出し（.contents 系の刷新） ---------- */
html.mjs h1.contents {
  font-size: 1.6rem;
  line-height: 1.4;
  color: var(--ink);
  font-weight: 800;
  border: 0;
  padding: 0 0 14px 16px;
  margin: 4px 0 22px;
  position: relative;
}
html.mjs h1.contents::before {
  content: "";
  position: absolute;
  left: 0; top: 4px; bottom: 16px;
  width: 6px;
  border-radius: 6px;
  background: linear-gradient(var(--brand), var(--brand-light));
}
html.mjs h1.contents::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--brand-tint2), transparent);
}
html.mjs h2.contents {
  font-size: 1.24rem;
  color: var(--ink);
  font-weight: 700;
  margin: 40px 0 18px;
  padding: 6px 0 6px 16px;
  background: none;
  border: 0;
  border-left: 6px solid var(--brand);
}
html.mjs h3.contents {
  font-size: 1.08rem;
  color: var(--brand-deep);
  font-weight: 700;
  margin: 28px 0 12px;
  padding: 0 0 8px 2px;
  border: 0;
  border-bottom: 2px dashed var(--brand-tint2);
  text-indent: 0;
}

/* 見出しは回り込み画像(顔写真など)をクリアして左端から始める（年の切れ目のズレ防止） */
html.mjs h1.contents,
html.mjs h2.contents,
html.mjs h3.contents { clear: both; }

/* ---------- 本文テキスト ---------- */
html.mjs .text {
  font-size: 1rem;
  line-height: 1.9;
  color: var(--ink-soft);
  margin: 18px 4px 24px;
}
html.mjs #content p { font-size: 1rem; line-height: 1.9; }
html.mjs #content ul,
html.mjs #content ol { font-size: 1rem; padding-left: 1.4em; }
html.mjs #content li { margin: 3px 0; }

/* トップ画像などをカード風に */
html.mjs #content .text > img,
html.mjs #content > .text:first-of-type img {
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
}
html.mjs #content img { border-radius: 8px; }

/* 各エントリ(dd)がフロート写真を内包し、次のエントリに食い込まないようにする（写真と説明の対応ズレ防止） */
html.mjs #content dd { display: flow-root; }

/* 回り込み画像（顔写真など）と隣接テキストの間隔を確保 */
html.mjs #content img[align="left"],
html.mjs #main img[align="left"],
html.mjs #content img.image-left,
html.mjs #main img.image-left { float: left; clear: both; margin: 4px 20px 12px 0 !important; }
html.mjs #content img[align="right"],
html.mjs #main img[align="right"],
html.mjs #content img.image-right,
html.mjs #main img.image-right { float: right; margin: 4px 0 12px 20px !important; }

/* ---------- What's New / 更新情報のリンク ---------- */
html.mjs .detail_link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 4px 6px 4px 0;
  padding: 4px 12px 4px 10px;
  background: var(--brand-tint);
  border: 1px solid var(--brand-tint2);
  border-radius: 999px;
  font-size: .86rem;
  font-weight: 600;
  width: auto;
  text-align: left;
  vertical-align: middle;
}
html.mjs .detail_link::before {
  content: "›";
  font-weight: 800;
  color: var(--brand);
}
html.mjs .detail_link a { color: var(--brand-deep); text-decoration: none; }
html.mjs .detail_link a:hover { text-decoration: underline; }

/* 学生受賞の「受賞研究の詳細について」：矢印gifを廃止し絵文字に。写真幅(128px)＋余白(20px)に整列 */
html.mjs .detail_link_award_image {
  background: none !important;
  padding-left: 0 !important;
  margin-left: 148px !important;
}
html.mjs .detail_link_award_image::before {
  content: "▶ ";
  color: var(--brand);
  font-size: .9em;
}
html.mjs .detail_link_award_image a { color: var(--brand-deep); text-decoration: none; }
html.mjs .detail_link_award_image a:hover { text-decoration: underline; }

html.mjs font[color="red"] { color: #e11d48 !important; font-weight: 700; }

/* ---------- テーブル ---------- */
html.mjs .table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 16px 0; }
html.mjs #content table {
  border-collapse: collapse;
  width: 100%;
  font-size: .95rem;
  background: var(--surface);
}
html.mjs #content th,
html.mjs #content td {
  border: 1px solid var(--line);
  padding: 8px 12px;
  text-align: left;
  vertical-align: top;
}
html.mjs #content th { background: var(--brand-tint); font-weight: 700; color: var(--ink); }

/* =====================================================================
   サイドバー（更新履歴など）
   ===================================================================== */
html.mjs .site-aside {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 20px 20px 24px;
  position: sticky;
  top: calc(var(--nav-h) + 20px);
  max-height: calc(100vh - var(--nav-h) - 40px);
  overflow: auto;
}
html.mjs .site-aside .sideHeader { display: none; }
html.mjs .site-aside h4 {
  margin: 0 0 12px;
  padding: 0 0 10px;
  font-size: 1rem;
  color: var(--brand-deep);
  border-bottom: 2px solid var(--brand-tint2);
}
html.mjs .site-aside h4::before { content: "🕘 "; }
html.mjs ul.sidebar {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: .82rem;
  line-height: 1.6;
}
html.mjs ul.sidebar li {
  padding: 8px 2px 8px 14px;
  border-bottom: 1px dashed var(--line);
  position: relative;
  color: var(--ink-soft);
}
html.mjs ul.sidebar li::before {
  content: "";
  position: absolute;
  left: 2px; top: 15px;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--brand-light);
}
html.mjs ul.sidebar hr { border: 0; border-top: 2px solid var(--brand-tint2); margin: 8px 0; }
html.mjs ul.sidebar li:last-child { border-bottom: 0; }

/* =====================================================================
   フッター
   ===================================================================== */
html.mjs #footer {
  background: var(--brand-dark);
  height: auto;
  color: #cfe0ff;
  text-align: center;
  font-size: .9rem;
  padding: 22px 16px;
}
html.mjs #footer p {
  margin: 0;
  padding: 0;
  text-shadow: none;
  font-weight: 600;
  color: #eaf1ff;
}
html.mjs #footer a:link,
html.mjs #footer a:visited { color: #fff; }

/* 会員/受賞ページ特有クラスの微調整 */
html.mjs p.member_common_text03 {
  border-left: 6px solid var(--brand);
  border-bottom: 1px solid var(--line);
  width: auto; max-width: 260px;
  padding: 6px 10px;
  font-size: 1rem;
  color: var(--ink);
  border-radius: 0 6px 6px 0;
  background: var(--brand-tint);
}

/* =====================================================================
   レスポンシブ
   ===================================================================== */
@media (max-width: 900px) {
  html.mjs .page-wrap.has-aside { grid-template-columns: 1fr; }
  html.mjs .site-aside {
    position: static;
    max-height: none;
  }
}

@media (max-width: 760px) {
  html.mjs body { font-size: 15.5px; }
  html.mjs .nav-toggle { display: block; }
  /* brand と toggle は1行目、nav(flex-basis:100%) は2行目へ折り返す */
  html.mjs .site-bar__inner { flex-wrap: wrap; padding: 8px 16px; gap: 10px; }
  html.mjs .site-brand { flex: 1 1 auto; padding: 0; }
  html.mjs .site-brand__title { font-size: 1rem; white-space: normal; }

  /* ナビをドロップダウン化 */
  html.mjs .site-nav {
    flex-basis: 100%;
    max-height: 0;
    overflow: hidden;
    transition: max-height .3s ease;
  }
  html.mjs .site-bar.is-open .site-nav { max-height: 80vh; overflow-y: auto; }
  html.mjs .site-nav__list {
    flex-direction: column;
    gap: 2px;
    padding: 6px 0 14px;
  }
  html.mjs .site-nav__list a {
    padding: 11px 12px;
    border-radius: 8px;
    font-size: .95rem;
    white-space: normal;
  }

  html.mjs #content { padding: 22px 18px 30px; border-radius: 12px; }
  html.mjs .page-wrap { padding: 18px 14px 40px; gap: 20px; }
  html.mjs h1.contents { font-size: 1.35rem; }
  html.mjs h2.contents { font-size: 1.14rem; }
}

@media (max-width: 420px) {
  html.mjs .site-brand__sub { display: none; }
  html.mjs #content { padding: 18px 14px 26px; }
}

/* 最新情報の「過去のお知らせ」折りたたみ */
html.mjs details.news-archive { margin: 18px 0 4px; }
html.mjs details.news-archive > summary {
  display: inline-block;
  cursor: pointer;
  list-style: none;
  padding: 8px 16px;
  border: 1px solid var(--brand);
  border-radius: 999px;
  color: var(--brand);
  background: var(--brand-tint, #eef4ff);
  font-weight: 700;
  font-size: .92rem;
  user-select: none;
  transition: background .15s, color .15s;
}
html.mjs details.news-archive > summary::-webkit-details-marker { display: none; }
html.mjs details.news-archive > summary::before { content: "▶ "; font-size: .8em; }
html.mjs details.news-archive[open] > summary::before { content: "▼ "; }
html.mjs details.news-archive > summary:hover { background: var(--brand); color: #fff; }
html.mjs details.news-archive[open] > summary { background: var(--brand); color: #fff; }
html.mjs details.news-archive > ul { margin-top: 14px; }

/* 印刷 */
@media print {
  html.mjs .site-bar, html.mjs .site-aside, html.mjs #footer { display: none; }
  html.mjs #content { box-shadow: none; border: 0; }
}
