@charset "UTF-8";

/* ==============================================================
   1. 共通基本スタイル & 変数定義
   ============================================================== */
:root {
    --primary-color: #003366;
    --secondary-color: #0066cc;
    --text-color: #333;
    --bg-light: #f4f6f9;
    --white: #ffffff;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* スムーズスクロールをサイト全体に適用 */
html {
    scroll-behavior: smooth;
}

/* 固定ヘッダーに隠れないように見出し要素にアンカーオフセットを設定 */
h1[id], h2[id], h3[id], h4[id], section[id] {
    scroll-margin-top: 90px;
}

body {
    font-family: 'Helvetica Neue', Arial, 'Hiragino Kaku Gothic ProN', sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    background-color: var(--white);
    overflow-x: hidden; /* スマホでの横揺れを防止 */
}

/* 固有ページで背景をグレーにするための指定 */
body.sub-page {
    background-color: var(--bg-light);
}

section {
    padding: 80px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    text-align: center;
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 40px;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 50px;
    height: 3px;
    background-color: var(--secondary-color);
    margin: 10px auto 0;
}

/* ==============================================================
   2. 共通ヘッダー（追従型）
   ============================================================== */
#global-header {
    position: sticky;
    top: 0;
    z-index: 1000;
}

header {
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 5%;
}

/* --- ロゴ周りのスタイル調整 --- */
.logo {
    font-weight: bold;
    font-size: 1.1rem;
    color: var(--primary-color);
    text-decoration: none;
    line-height: 1.3;
    display: flex;             /* 画像とテキストを横並びにする */
    align-items: center;        /* 垂直方向の中央に揃える */
    gap: 10px;                  /* ロゴ画像とテキストの間の余白 */
}

/* ロゴ画像のサイズ制御 */
.logo-img {
    height: 35px;               /* ヘッダーの高さに合わせた画像の高さ */
    width: auto;                /* 横幅は自動計算 */
    display: block;
}

.logo span {
    word-break: keep-all; /* 単語途中（スペース以外）での改行を防止 */
    overflow-wrap: break-word; /* 画面幅をどうしても超えてしまう場合の安全策 */
}

nav ul {
    display: flex;
    list-style: none;
}

nav ul li {
    margin-left: 15px;
    flex-shrink: 0;
}

nav ul li a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: color 0.3s;
    white-space: nowrap;
}

nav ul li a:hover {
    color: var(--secondary-color);
}

/* --- 言語切替リンク --- */
.lang-switch-item {
    display: none; /* data-lang-alt を持つページで main.js から表示される */
}

.lang-switch-link {
    padding: 4px 12px;
    border: 1px solid var(--secondary-color);
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--secondary-color) !important;
}

.lang-switch-link:hover {
    background-color: var(--secondary-color);
    color: var(--white) !important;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
    background: transparent;
    border: none;
    padding: 0;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background-color: var(--primary-color);
    transition: 0.3s;
}

/* ==============================================================
   3. 共通レイアウトコンテナ（下層ページ用）
   ============================================================== */
.container {
    max-width: 950px;
    margin: 15px auto 40px;
    background: #ffffff;
    padding: 25px 40px 40px;
    border-radius: 4px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.container.wide {
    max-width: 1100px;
}

.page-title {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 20px;
    text-align: center;
}

.page-title::after {
    content: '';
    display: block;
    width: 50px;
    height: 3px;
    background-color: var(--secondary-color);
    margin: 10px auto 0;
}

.intro-text {
    text-align: center;
    color: #555;
    max-width: 850px;
    margin: 0 auto 40px;
    font-size: 0.95rem;
}

/* ==============================================================
   4. index.html (トップページ) 固有スタイル
   ============================================================== */
.hero {
    height: 60vh;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #000;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slide.active {
    opacity: 0.5;
}

.hero-content {
    position: relative;
    z-index: 10;
    text-align: center;
    color: var(--white);
    padding: 0 20px;
}

.hero-content h1 {
    font-size: 2.3rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.6);
    margin-bottom: 15px;
}

.news-list {
    max-width: 850px;
    margin: 0 auto;
}

.news-item {
    display: flex;
    border-bottom: 1px solid #e2e8f0;
    padding: 15px 10px;
    font-size: 0.95rem;
    align-items: flex-start;
}

.news-date {
    width: 120px;
    color: #64748b;
    font-weight: bold;
    flex-shrink: 0;
}

.news-item-tags {
    display: flex;
}

.news-tag {
    color: white;
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 4px;
    margin-right: 15px;
    flex-shrink: 0;
    font-weight: bold;
    background-color: #64748b;
}
.news-tag.award { background-color: #ea580c; }
.news-tag.paper { background-color: #dc2626; }
.news-tag.academic { background-color: var(--secondary-color); }
.news-tag.international { background-color: #10b981; }

.news-text {
    color: var(--text-color);
    flex-grow: 1;
}

.news-banner {
    margin: 8px 0 12px 120px;
    max-width: 450px;
}

.news-archive {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out;
}

.news-archive.open {
    overflow: visible;
}

.news-toggle-btn {
    display: none;
    width: 220px;
    margin: 30px auto 0;
    padding: 10px;
    text-align: center;
    background: transparent;
    border: 1px solid var(--secondary-color);
    color: var(--secondary-color);
    font-weight: bold;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s;
}
.news-toggle-btn:hover {
    background-color: var(--secondary-color);
    color: white;
}

.vision-box {
    background-color: var(--white);
    border-left: 5px solid var(--primary-color);
    padding: 25px;
    margin-bottom: 40px;
    border-radius: 0 5px 5px 0;
}

.vision-box h3 {
    color: var(--primary-color);
    margin-bottom: 10px;
}

.research-theme-list {
    list-style: none;
    max-width: 850px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.research-theme-item {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.research-theme-link {
    display: block;
    padding: 22px 25px;
    color: var(--primary-color);
    font-weight: bold;
    font-size: 1.15rem;
}

.research-banner-link {
    display: block;
    max-width: 360px;
    margin: 25px auto 0;
    text-align: center;
    background-color: var(--primary-color);
    color: var(--white);
    padding: 16px 20px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.05rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.research-banner-link:hover {
    background-color: var(--secondary-color);
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.academic-container {
    display: flex;
    gap: 24px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 20px;
}

.academic-card {
    background: #ffffff;
    border-top: 3px solid var(--primary-color);
    border-left: 1px solid #e2e8f0;
    border-right: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
    border-radius: 4px;
    padding: 30px;
    width: 48%;
    min-width: 340px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.academic-card h4 {
    color: var(--primary-color);
    font-size: 1.15rem;
    margin-bottom: 15px;
    padding-bottom: 8px;
}

.academic-card ul {
    list-style-type: none;
    padding-left: 0;
    margin-bottom: 25px;
}

.academic-card li {
    position: relative;
    padding-left: 18px;
    margin-bottom: 12px;
    font-size: 0.95rem;
    color: #334155;
}

.academic-card li::before {
    content: "■";
    position: absolute;
    left: 0;
    color: var(--secondary-color);
    font-size: 0.75rem;
    top: 2px;
}

.academic-lead-text {
    font-size: 0.9em;
    color: #334155;
    margin-top: 15px;
    margin-bottom: 10px;
    font-weight: bold;
    line-height: 1.5;
}

.academic-link {
    display: inline-block;
    color: var(--secondary-color);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    margin-top: auto;
}

.academic-link:hover {
    text-decoration: underline;
}

.academic-btn {
    display: block;
    text-align: center;
    border: 2px solid var(--primary-color);
    color: var(--white);
    background-color: var(--primary-color);
    padding: 12px 20px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: bold;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    margin-top: auto;
}

.academic-btn:hover {
    background-color: var(--white);
    color: var(--primary-color);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.official-link {
    display: inline-block;
    margin-top: 15px;
    font-size: 0.85rem;
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: bold;
}
.official-link:hover {
    text-decoration: underline;
}

.tabs {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
    border-bottom: 2px solid #ddd;
}

.tab-btn {
    background: none;
    border: none;
    padding: 10px 20px;
    font-size: 1rem;
    cursor: pointer;
    color: #666;
    position: relative;
    bottom: -2px;
}

.tab-btn.active {
    color: var(--secondary-color);
    border-bottom: 2px solid var(--secondary-color);
    font-weight: bold;
}

.tab-content {
    display: none;
    background-color: var(--white);
    padding: 20px;
    border-radius: 5px;
}

.tab-content.active {
    display: block;
}

/* ==============================================================
   5. research.html (研究内容詳細) 固有スタイル
   ============================================================== */
.theme-block {
    margin-top: 50px;
}
.theme-block:first-of-type {
    margin-top: 20px;
}

.theme-title {
    color: var(--primary-color);
    background-color: #f0f4f8;
    padding: 12px 18px;
    margin-bottom: 15px;
    font-size: 1.3rem;
    border-left: 5px solid var(--primary-color);
    border-radius: 0 4px 4px 0;
    scroll-margin-top: 90px;
}

.tech-tags {
    margin-bottom: 25px;
    padding-left: 5px;
}
.tag {
    display: inline-block;
    background-color: #e2e8f0;
    color: #4a5568;
    padding: 3px 12px;
    border-radius: 15px;
    font-size: 0.85rem;
    margin-right: 8px;
    margin-bottom: 5px;
    font-weight: 500;
}

.markdown-body h4 {
    color: #475569; font-size: 1.1rem; margin-top: 30px; margin-bottom: 12px;
    padding-left: 10px; border-left: 3px solid var(--secondary-color); display: block;
}

/* --- 文字テキストは完全に左寄せ（両端揃え）に固定 --- */
.markdown-body p {
    font-size: 0.95rem;
    color: var(--text-color);
    margin-bottom: 15px;
    text-align: left;           /* 左寄せ */
    display: block;
}

/* --- 画像（図）のみの中央揃え設定 --- */
.markdown-body img {
    display: block;             /* ブロック要素化して左右auto余白を有効にする */
    height: 250px;              /* 高さを250pxに統一 */
    width: auto;                /* 比率維持 */
    max-width: 100%;            /* はみ出し防止 */
    object-fit: contain;
    margin: 15px auto;          /* 左右autoで画像を親要素中央に強制配置 */
}

/* 2枚連続して並ぶ画像の場合（横並び＋中央配置） */
.markdown-body img + img,
.markdown-body img:first-child:not(:last-child) {
    display: inline-block;      /* 横並びを許可 */
    margin: 8px;
}

/* 2枚画像の親コンテナのみ中央揃え */
.markdown-body p:has(img + img),
.markdown-body p:has(img:first-child:not(:last-child)) {
    text-align: center;
}

.markdown-body ul { padding-left: 25px; margin-bottom: 25px; }
.markdown-body li { font-size: 0.9rem; color: #475569; margin-bottom: 6px; text-align: left; }
.markdown-body strong { color: var(--primary-color); }
.markdown-body a { color: var(--secondary-color); text-decoration: none; font-weight: bold; }
.markdown-body hr { border: none; border-top: 1px dashed #cbd5e1; margin: 40px 0; }

/* ==============================================================
   6. publications.html (研究業績) 固有スタイル
   ============================================================== */
.pub-container {
    max-width: 1000px;
    margin: 20px auto 40px;
    background: #ffffff;
    padding: 40px;
    border-radius: 4px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

#publications-content h3 {
    color: var(--primary-color); border-bottom: 2px solid var(--primary-color);
    padding-bottom: 5px; margin-top: 35px; margin-bottom: 20px;
    font-size: 1.3rem; clear: both;
    scroll-margin-top: 90px;
}

.pub-category-block { margin-bottom: 25px; display: block; clear: both; }
.pub-category-block h4 {
    color: #555; font-size: 1.1rem; margin-top: 25px; margin-bottom: 12px;
    font-weight: bold; display: block;
}
.pub-category-block:first-of-type h4 { margin-top: 10px; }

#publications-content ul,
#publications-content ol {
    list-style-type: decimal;
    list-style-position: outside;
    margin: 0;
    padding: 0 0 0 3em;
}

#publications-content li {
    margin-bottom: 15px;
    font-size: 0.95rem;
    line-height: 1.6;
    text-align: left;
    word-break: break-word;
}

#publications-content li::marker {
    color: var(--secondary-color);
    font-weight: bold;
}

.pub-toc {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    padding: 12px;
    margin-bottom: 30px;
    border-radius: 4px;
}

.pub-toc a {
    display: inline-block;
    padding: 6px 12px;
    margin: 4px;
    background-color: var(--white);
    border: 1px solid #ccc;
    border-radius: 20px;
    color: var(--secondary-color);
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s ease;
}

.pub-toc a:hover {
    background-color: var(--secondary-color);
    color: var(--white);
    border-color: var(--secondary-color);
}

.oa-badge {
    display: inline-block;
    background-color: #10b981;
    color: white;
    font-size: 0.75rem;
    font-weight: bold;
    padding: 2px 8px;
    border-radius: 4px;
    margin-left: 6px;
    white-space: nowrap;
}

.pub-link {
    display: inline-block;
    font-size: 0.85rem;
    margin-left: 6px;
    white-space: nowrap;
}
.pub-link a {
    color: var(--secondary-color);
    text-decoration: underline;
    font-weight: normal;
}

#to-top-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 45px;
    height: 45px;
    background-color: #333;
    color: var(--white);
    border: none;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    z-index: 999;
}

#to-top-btn.show {
    opacity: 1;
    visibility: visible;
}

#to-top-btn:hover {
    background-color: var(--secondary-color);
    transform: translateY(-3px);
}

/* ==============================================================
   7. equipment.html (主要研究設備) 固有スタイル
   ============================================================== */
.equipment-section {
    margin-bottom: 50px;
}
.category-title {
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 6px;
    margin-bottom: 25px;
    font-size: 1.3rem;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
    gap: 24px;
}
.eq-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
    display: flex;
    flex-direction: column;
}
.eq-card h4 {
    color: var(--primary-color);
    font-size: 1.05rem;
    margin-bottom: 12px;
    display: flex;
    align-items: flex-start;
    font-weight: bold;
}
.eq-card h4::before {
    content: "■";
    color: var(--secondary-color);
    font-size: 0.8rem;
    margin-right: 8px;
    margin-top: 2px;
}

.eq-img-wrapper {
    width: 100%;
    height: 160px;
    background-color: #f8fafc;
    border: 1px solid #f1f5f9;
    border-radius: 4px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.eq-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.eq-card p {
    font-size: 0.88rem;
    color: #475569;
    margin-bottom: 12px;
    line-height: 1.5;
}

.models-list {
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px dashed #e2e8f0;
}
.model-tag {
    font-size: 0.8rem;
    color: #4b5563;
    background-color: var(--bg-light);
    padding: 2px 6px;
    border-radius: 4px;
    display: block;
    margin-bottom: 4px;
    font-family: monospace;
}
.model-tag:last-child {
    margin-bottom: 0;
}

/* ==============================================================
   8. members.html (メンバー紹介) 固有スタイル
   ============================================================== */
.year-tabs { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; margin-bottom: 40px; border-bottom: 2px solid #e2e8f0; padding-bottom: 15px; }
.year-btn { background: none; border: 1px solid #cbd5e1; padding: 8px 20px; font-size: 1rem; cursor: pointer; color: #64748b; border-radius: 20px; transition: all 0.3s; }
.year-btn.active { background-color: var(--primary-color); color: white; border-color: var(--primary-color); font-weight: bold; }

.year-content { display: none; }
.year-content.active { display: block; }
.member-section { margin-bottom: 40px; }
.grade-title { color: var(--primary-color); border-bottom: 2px solid var(--primary-color); padding-bottom: 6px; margin-bottom: 15px; font-size: 1.2rem; font-weight: bold; }
.member-list { list-style: none; padding-left: 0; }

.member-item {
    background-color: #f8fafc;
    border-left: 4px solid var(--secondary-color);
    padding: 5px 16px;
    margin-bottom: 4px;
    border-radius: 0 4px 4px 0;
}

.member-main {
    display: flex;
    align-items: baseline;
    gap: 12px;
}

.member-name {
    font-weight: bold;
    font-size: 1.1rem;
	white-space: nowrap;
    color: var(--text-color);
}

.member-role {
    font-size: 0.85rem;
    color: var(--secondary-color);
    font-weight: bold;
}

.member-detail {
    font-size: 0.85rem;
    color: #475569;
    margin-top: 3px;
    margin-bottom: 3px;
}

/* members.htmlのコンテンツエリアに初期高さを確保 */
#members-content {
    min-height: 500px; /* 概算の最低限の高さを保持してガタつきを軽減 */
}

/* タブエリアも高さが後から変わらないように保持 */
#tabs-container {
    min-height: 48px;
}

/* ==============================================================
   9. inquiry.html (お問い合わせフォーム) 固有スタイル
   ============================================================== */
.form-container {
    max-width: 760px;
    margin: 30px auto;
    background: #ffffff;
    padding: 20px;
    border-radius: 4px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.iframe-wrapper {
    position: relative;
    width: 100%;
    height: 850px;
    overflow: hidden;
}
.iframe-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.form-container .intro-text {
    margin-bottom: 25px;
}

.email-tab-content {
    padding: 20px 10px 30px;
}

.email-banner {
    display: inline-block;
    max-width: 100%;
    margin-top: 20px;
    padding: 20px 25px;
    background-color: var(--bg-light);
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}

.email-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
}

.email-banner canvas {
    max-width: 100%;
}

.email-copy-btn {
    border: 1px solid var(--secondary-color);
    background: var(--white);
    color: var(--secondary-color);
    padding: 8px 18px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}
.email-copy-btn:hover {
    background-color: var(--secondary-color);
    color: var(--white);
}

.email-copy-feedback {
    display: block;
    margin-top: 6px;
    font-size: 0.85rem;
    color: #10b981;
    font-weight: bold;
    min-height: 1.2em;
}

.email-note {
    margin-top: 30px;
    font-size: 0.7rem;
    color: #94a3b8;
}

/* ==============================================================
   10. for-students.html (配属希望生向けページ) 固有スタイル
   ============================================================== */
.policy-box {
    background-color: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 25px;
    margin-bottom: 30px;
}

.policy-box h3 {
    color: var(--primary-color);
    margin-bottom: 12px;
    font-size: 1.2rem;
    border-bottom: 2px solid var(--secondary-color);
    padding-bottom: 6px;
}

.student-list {
    padding-left: 20px;
    font-size: 0.95rem;
    color: #334155;
}

.student-list.mb-15 {
    margin-bottom: 15px;
}

.schedule-list {
    list-style: none;
    padding-left: 0;
    margin-bottom: 30px;
}

.schedule-item {
    display: flex;
    border-bottom: 1px dashed #cbd5e1;
    padding: 12px 5px;
    align-items: baseline;
}

.schedule-month {
    width: 90px;
    font-weight: bold;
    color: var(--primary-color);
    flex-shrink: 0;
}

.schedule-desc {
    color: var(--text-color);
    font-size: 0.95rem;
}

.tab-content.mb-30 {
    margin-bottom: 30px;
}

.tab-list {
    padding-left: 20px;
    font-size: 0.95rem;
    line-height: 1.8;
}

.tab-text {
    font-size: 0.95rem;
    line-height: 1.7;
    color: #334155;
}

.faq-item {
    margin-bottom: 20px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 20px 24px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.faq-item:hover {
    border-color: #cbd5e1;
    box-shadow: 0 4px 8px rgba(0,0,0,0.04);
}

.faq-q {
    font-weight: bold;
    color: var(--primary-color);
    font-size: 1.05rem;
    margin-bottom: 10px;
    display: flex;
    align-items: baseline;
    gap: 8px;
    line-height: 1.5;
}

.faq-q::before {
    content: "Q.";
    color: var(--secondary-color);
    font-size: 1.25rem;
    font-weight: bold;
    flex-shrink: 0;
    line-height: 1;
}

.faq-a {
    color: #475569;
    font-size: 0.95rem;
    padding-left: 28px;
    line-height: 1.7;
}

.contact-box {
    text-align: center;
    margin-top: 40px;
    background: #f0f4f8;
    padding: 30px;
    border-radius: 6px;
}

.contact-title {
    color: var(--primary-color);
    margin-bottom: 10px;
}

.contact-text {
    font-size: 0.95rem;
    color: #475569;
    margin-bottom: 20px;
}

.contact-btn {
    display inline-block;
    width: auto;
    padding: 12px 30px;
}

/* ==============================================================
   11. 共通フッター
   ============================================================== */
.shared-footer {
    text-align: center;
    padding: 20px 0;
    background-color: var(--white); /* 必要に応じて変更してください */
}

.shared-copyright {
    font-size: 0.85rem;
    color: #666;
}

/* ==============================================================
   12. レスポンシブ対応（スマホ表示全般・メディアクエリ）
   ============================================================= */
@media (max-width: 768px) {
    .logo {
        font-size: 0.85rem;
        max-width: calc(100% - 40px);
        gap: 6px;
    }
    .logo-img {
        height: 28px;
    }

    .menu-toggle { display: flex; }

	nav ul {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        right: 5%;           /* 左固定(left:0, width:100%)を解除し、右側に配置 */
        left: auto;
        width: max-content;  /* 中身のテキストに合わせた最低限の幅 */
        min-width: 160px;    /* 押しやすさを保つための最小幅 */
        background-color: var(--white);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); /* カード風の影 */
        border-radius: 6px;  /* 角丸にして見た目を整える */
        padding: 12px 20px;
    }
    nav ul.show { display: flex; }
    nav ul li { margin: 10px 0; margin-left: 0; }

    .container, .pub-container {
        padding: 25px 20px;
        margin: 15px;
    }

    .hero h1 { font-size: 1.6rem; }
    .hero::before {
        content: ""; position: absolute; inset: 0;
        background: rgba(0, 0, 0, 0.30); z-index: 5;
    }
    .hero-content { position: relative; z-index: 10; }
    .academic-card { width: 100%; }
    .news-item { flex-direction: column; }
    .news-date { margin-bottom: 5px; }

    /* スマホ表示時にニュースバナーの左固定余白(120px)を解除 */
    .news-banner {
        margin: 8px 0 12px 0 !important;
    }

    .research-theme-link { padding: 18px 20px; font-size: 1rem; }
    .research-banner-link { font-size: 0.95rem; padding: 14px 16px; }

    .faq-item {
        padding: 16px;
    }
    .faq-a {
        padding-left: 22px;
    }

    #publications-content ul,
    #publications-content ol {
        padding: 0 0 0 2.5em;
    }

    .iframe-wrapper { height: 1000px; }

    #to-top-btn {
        bottom: 20px;
        right: 20px;
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
}

/* ==============================================================
   CLS対策：動的読み込みコンテンツの高さ確保
   ============================================================== */

/* タブエリアの表示領域を事前に確保 */
#tabs-container {
    min-height: 55px;
}

/* メンバーコンテンツエリアの初期高さを十分に確保してガタつきを防止 */
#members-content {
    min-height: 800px; /* PCでの一般的なメンバーリストの高さを確保 */
    transition: min-height 0.3s ease;
}

/* データ読み込み中のプレースホルダー表示を綺麗整える */
.loading-placeholder {
    padding: 40px;
    text-align: center;
    color: #64748b;
    font-size: 1rem;
}
