/* --------------------------------------------------------------------------
           1. 外部フォントのインポート
           -------------------------------------------------------------------------- */
        @import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@300;400;700&family=Noto+Serif+JP:wght@400;700&family=Outfit:wght@300;400;600&display=swap');

        /* --------------------------------------------------------------------------
           2. デザインシステムトークン (CSS変数 & テーマ定義)
           -------------------------------------------------------------------------- */
        :root {
            --accent: #d89cff; /* パステルパープル */
        }

        /* Cosmic (ダークテーマ) */
        .theme-cosmic {
            --bg-color: #05070a;
            --text-color: #ffffff;
            --text-dim: #f1f5f9; /* 本文の可読性を高める明るいオフホワイト */
            --nav-bg: rgba(5, 7, 10, 0.9);
            --card-bg: rgba(255, 255, 255, 0.08);
            --font-main: 'Noto Serif JP', 'Noto Sans JP', serif;
            --tag-bg-news: rgba(216, 156, 255, 0.25);
            --tag-bg-press: rgba(59, 130, 246, 0.2);
            --tag-bg-award: rgba(245, 158, 11, 0.2);
            --tag-bg-research: rgba(34, 197, 94, 0.2);
            --link-border: rgba(255, 255, 255, 0.1);
            --table-header-bg: rgba(255, 255, 255, 0.05);
            --table-border: rgba(255, 255, 255, 0.1);
            --table-hover: rgba(255, 255, 255, 0.02);
            --pamphlet-bg: rgba(255, 255, 255, 0.03);
            --pamphlet-border: rgba(255, 255, 255, 0.1);
            --glow-color: rgba(216, 156, 255, 0.3);
            --student-item-bg: rgba(255, 255, 255, 0.03);
            --btn-radius: 4px;
        }

        /* Modern (カジュアルダークテーマ) */
        .theme-modern {
            --bg-color: #0b0f19; /* 青みのあるカジュアルダーク */
            --text-color: #f8fafc;
            --text-dim: #cbd5e1; /* ゴシック体でも読みやすい淡いグレー */
            --nav-bg: rgba(11, 15, 25, 0.92);
            --card-bg: rgba(30, 41, 59, 0.7); /* slate-800風のプレート */
            --font-main: 'Noto Sans JP', sans-serif;
            --accent: #d89cff; /* Cosmic と同じパステルパープル */
            --tag-bg-news: rgba(216, 156, 255, 0.25);
            --tag-bg-press: rgba(56, 189, 248, 0.2);
            --tag-bg-award: rgba(251, 191, 36, 0.2);
            --tag-bg-research: rgba(74, 222, 128, 0.2);
            --link-border: rgba(255, 255, 255, 0.08);
            --table-header-bg: rgba(30, 41, 59, 0.5);
            --table-border: rgba(255, 255, 255, 0.08);
            --table-hover: rgba(255, 255, 255, 0.03);
            --pamphlet-bg: rgba(30, 41, 59, 0.3);
            --pamphlet-border: rgba(255, 255, 255, 0.08);
            --glow-color: rgba(216, 156, 255, 0.45);
            --student-item-bg: rgba(255, 255, 255, 0.04);
            --btn-radius: 8px;
        }

        /* --------------------------------------------------------------------------
           3. ベーススタイルおよびフォント優先上書き（!importantにてTailwind既定を完全制御）
           -------------------------------------------------------------------------- */
        body, button, input, select, textarea, h1, h2, h3, h4, h5, h6 {
            font-family: var(--font-main) !important;
        }

        /* Tailwindのフォントユーティリティ自体を本方針向けにオーバーライド */
        .font-sans {
            font-family: 'Outfit', 'Noto Sans JP', sans-serif !important;
        }

        .font-serif {
            font-family: 'Noto Serif JP', serif !important;
        }

        .font-mono {
            font-family: 'Outfit', monospace !important;
        }

        body {
            background-color: var(--bg-color);
            color: var(--text-color);
            transition: background-color 0.5s ease, color 0.5s ease;
            overflow-x: hidden;
            line-height: 1.75;
        }

        /* 共通アニメーション */
        .fade-in { animation: fadeIn 0.8s ease-out forwards; }
        @keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

        /* 可読性の高いテキスト色 */
        .text-readable {
            color: var(--text-dim) !important;
            transition: color 0.5s ease;
        }

        /* --------------------------------------------------------------------------
           4. ヘッダー・ナビゲーション
           -------------------------------------------------------------------------- */
        .nav-link {
            position: relative;
            padding-bottom: 4px;
            cursor: pointer;
            white-space: nowrap;
            transition: color 0.3s ease;
        }

        .nav-link:hover {
            color: var(--accent) !important;
        }

        .nav-link::after {
            content: '';
            position: absolute;
            bottom: 0;
            left: 0;
            width: 0;
            height: 2px;
            background-color: var(--accent);
            transition: width 0.3s ease;
        }

        .nav-link.active::after {
            width: 100%;
        }

        /* --------------------------------------------------------------------------
           5. ホーム（天体パノラマスライドショー）
           -------------------------------------------------------------------------- */
        .hero-slide {
            position: absolute;
            inset: 0;
            background-size: cover;
            background-position: center;
            background-attachment: fixed;
            transition: opacity 1.2s ease-in-out;
        }
        .hero-credit {
		    position: absolute;
		    right: 1.25rem;
		    bottom: 0.75rem;
		    z-index: 20;
		    font-size: 10px;
		    line-height: 1.4;
		    color: rgba(255, 255, 255, 0.75);
		    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.95);
		    max-width: 65%;
		    text-align: right;
		    pointer-events: none;
		}

        /* --------------------------------------------------------------------------
           6. 各種共通ビジュアルコンポーネント
           -------------------------------------------------------------------------- */

        /* Glow & Floatアップカード */
        .accent-glow-card {
            transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
            border: 1px solid rgba(255, 255, 255, 0.1);
        }

        .accent-glow-card:hover {
            border-color: var(--accent);
            box-shadow: 0 0 30px var(--glow-color);
            transform: translateY(-2px);
        }

        /* 各種お知らせ・プレスリリース・受賞バッジ */
        .badge {
            font-size: 10px;
            padding: 2px 8px;
            border-radius: 2px;
            font-weight: bold;
            display: inline-block;
            margin-right: 12px;
        }

        .badge-news { background: var(--tag-bg-news); color: var(--accent); }
        .badge-research { background: var(--tag-bg-research); color: #4ade80; }
        .badge-press { background: var(--tag-bg-press); color: #60a5fa; }
        .badge-award { background: var(--tag-bg-award); color: #fbbf24; }

        /* フッターの関連リンク下線 */
        .related-link-item {
            border-bottom: 1px solid var(--link-border);
            transition: all 0.3s ease;
        }

        .related-link-item:hover {
            padding-left: 10px;
            color: var(--accent) !important;
        }

        /* メンバーカード */
        .member-card {
            background-color: var(--card-bg);
            border: 1px solid rgba(255, 255, 255, 0.1);
            padding: 1.25rem;
            display: flex;
            gap: 1.25rem;
            border-radius: 4px;
        }
        .member-card:hover {
            border-color: rgba(255, 255, 255, 0.2);
            background-color: rgba(255, 255, 255, 0.1);
        }

        .member-image-container {
            flex-shrink: 0;
            width: 70px;
            height: 77px;
            background-color: #1a1c20;
            overflow: hidden;
            border: 1px solid rgba(255, 255, 255, 0.1);
            position: relative;
        }
        .member-image { width: 100%; height: 100%; object-fit: cover; }

        .position-label {
            display: inline-block;
            font-size: 1.6rem;
            font-weight: 700;
            color: var(--text-color);
            border-left: 4px solid var(--accent);
            padding-left: 16px;
            margin-top: 1.5rem;
            margin-bottom: 2.5rem;
            line-height: 1.1;
            text-shadow: 0 0 20px var(--glow-color);
        }
        
        .prose-links a {
		    color: var(--accent);
		    text-decoration: underline;
		    text-decoration-thickness: 1px;
		    text-underline-offset: 3px;
		    transition: opacity 0.2s ease, text-decoration-thickness 0.2s ease;
		}

		.prose-links a:hover {
		    opacity: 0.8;
		    text-decoration-thickness: 2px;
		}

		/* メンバーリスト内のアスタリスク */
		.position-label.can-guide::after {
		    content: "*";
		    color: #999;
		    font-size: 0.75em;
		    vertical-align: super;
		    margin-left: 6px;
		    font-weight: normal;
		}

		.member-name.can-guide::after {
		    content: "*";
		    color: #999;
		    font-size: 0.65em;
		    vertical-align: super;
		    margin-left: 4px;
		    font-weight: normal;
		}


        /* モバイルメニュー（ドロワー）用スタイル */
        #mobile-menu {
            transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        }

/* Standalone-page additions */
.nav-link.active { color: var(--accent) !important; }
.mobile-nav-link { display:block; padding:0.5rem 0; color:var(--text-color); text-decoration:none; }
.mobile-nav-link.active { color:var(--accent); }
.colloq-abstract-row[hidden] { display: none; }

/* Education page additions */
.btn-primary {
    background-color: var(--accent);
    color: #05070a !important;
    padding: 0.75rem 1.25rem;
    border-radius: var(--btn-radius, 0.125rem);
    font-weight: 700;
    transition: opacity 0.25s ease, transform 0.25s ease;
    text-decoration: none;
}
.btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}
.theme-modern .btn-primary {
    color: #05070a !important;
}


/* News page link additions */
.news-inline-link {
    color: var(--accent);
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 3px;
}
.news-inline-link:hover {
    opacity: 0.8;
}
.news-link-sentence {
    margin-left: 0.15em;
}

@media (max-width: 768px) {
    .hero-credit {
        left: 1rem;
        right: 1rem;
        bottom: 0.5rem;
        max-width: none;
        text-align: left;
        font-size: 8.5px;
    }
}