

        /* =========================================
           CSS Variables & Base (爽快な風テーマ & ダークモード)
           ========================================= */
        :root {
            --bg-color: #f7fdf8;
            --surface-color: #ffffff;
            --text-main: #123124;
            --text-muted: #5f756a;
            --accent-primary: #2f855a;
            --accent-secondary: #68d391;
            --accent-light: rgba(47, 133, 90, 0.12);
            --border-color: rgba(18, 49, 36, 0.08);
            --shadow-sm: 0 4px 6px rgba(18, 49, 36, 0.04);
            --shadow-md: 0 10px 30px rgba(18, 49, 36, 0.08);
            --shadow-hover: 0 20px 40px rgba(47, 133, 90, 0.14);
            --font-serif: 'Cinzel', serif;
            --font-sans: 'Noto Sans JP', sans-serif;
            --font-display: 'Space Grotesk', sans-serif;
            --transition: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
        }

        [data-theme="dark"] {
            --bg-color: #07110c;
            --surface-color: #12241a;
            --text-main: #f2fef7;
            --text-muted: #98b8a7;
            --accent-primary: #4ade80;
            --accent-secondary: #86efac;
            --accent-light: rgba(74, 222, 128, 0.16);
            --border-color: rgba(255, 255, 255, 0.1);
            --shadow-sm: 0 4px 6px rgba(0, 0, 0, 0.2);
            --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.35);
            --shadow-hover: 0 20px 40px rgba(74, 222, 128, 0.18);
        }

        * { margin: 0; padding: 0; box-sizing: border-box; }
        
        /* スクロール演出はオフにして、静かな閲覧体験に寄せる */
        html {
            scroll-behavior: auto;
        }
        
        body {
            font-family: var(--font-sans);
            background-color: var(--bg-color);
            color: var(--text-main);
            line-height: 1.8;
            transition: background-color var(--transition), color var(--transition);
            overflow-x: hidden;
            -webkit-text-size-adjust: 100%;
            overflow-anchor: none;
        }
        
        body.menu-open {
            overflow: hidden;
        }

        a { text-decoration: none; color: inherit; }
        button { border: none; background: none; cursor: pointer; font-family: inherit; color: inherit; }
        ul { list-style: none; }

        /* =========================================
           Layout & Typography
           ========================================= */
        .container { 
            width: 100%;
            max-width: 1200px; 
            margin: 0 auto; 
            padding: 0 1.5rem; 
        }
        @media (max-width: 640px) {
            .container { padding: 0 1rem; }
        }
        
        .section { padding: 5rem 0; }
        @media (max-width: 768px) {
            .section { padding: 3rem 0; }
        }
        
        .section-title {
            font-family: var(--font-serif);
            font-size: 2.25rem;
            text-align: center;
            margin-bottom: 3rem;
            position: relative;
        }
        @media (max-width: 768px) {
            .section-title { font-size: 1.75rem; margin-bottom: 2rem; }
        }
        .section-title::after {
            content: '';
            display: block;
            width: 60px;
            height: 3px;
            background: linear-gradient(90deg, var(--accent-primary), transparent);
            margin: 0.8rem auto 0;
            border-radius: 2px;
        }
        
        /* =========================================
           Header (Mobile Responsive)
           ========================================= */
        .site-header {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            background: rgba(248, 251, 253, 0.85);
            backdrop-filter: blur(12px);
            -webkit-backdrop-filter: blur(12px);
            border-bottom: 1px solid var(--border-color);
            z-index: 1000;
            transition: background-color var(--transition), border-color var(--transition);
        }
        [data-theme="dark"] .site-header {
            background: rgba(30, 41, 59, 0.85);
        }
        .header-inner {
            display: flex;
            justify-content: space-between;
            align-items: center;
            height: 70px;
        }
        .logo {
            font-family: var(--font-display);
            font-size: 1.4rem;
            font-weight: 600;
            color: var(--accent-primary);
            display: flex;
            align-items: center;
            gap: 0.4rem;
            z-index: 1010;
        }
        
        .nav-container {
            display: flex;
            align-items: center;
            gap: 1.5rem;
        }
        .nav-links { 
            display: flex; 
            gap: 2rem; 
            align-items: center; 
        }
        .nav-link {
            font-weight: 500;
            color: var(--text-muted);
            transition: color var(--transition);
            position: relative;
            padding: 0.5rem 0;
        }
        .nav-link:hover, .nav-link.active { color: var(--accent-primary); }
        .nav-link::after {
            content: ''; position: absolute; bottom: -2px; left: 0; width: 0; height: 2px;
            background: var(--accent-primary); transition: width 0.3s ease;
        }
        .nav-link:hover::after, .nav-link.active::after { width: 100%; }
        
        .header-actions {
            display: flex;
            align-items: center;
            gap: 1rem;
        }
        
        .icon-btn {
            color: var(--text-muted);
            font-size: 1.25rem;
            width: 40px;
            height: 40px;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 50%;
            background: rgba(94, 200, 224, 0.05);
            transition: color var(--transition), background-color var(--transition), transform var(--transition);
        }
        .icon-btn:hover { 
            color: var(--accent-primary); 
            background-color: var(--accent-light);
            transform: scale(1.05); 
        }

        .menu-toggle {
            display: none;
            flex-direction: column;
            justify-content: space-between;
            width: 30px;
            height: 20px;
            z-index: 1010;
        }
        .menu-toggle span {
            display: block;
            height: 3px;
            width: 100%;
            background-color: var(--text-main);
            border-radius: 3px;
            transition: var(--transition);
            transform-origin: left center;
        }

        @media (max-width: 768px) {
            .menu-toggle {
                display: flex;
            }
            .nav-links {
                position: fixed;
                top: 0;
                right: -100%;
                width: 75%;
                max-width: 300px;
                height: 100vh;
                background: var(--surface-color);
                box-shadow: -10px 0 30px rgba(0,0,0,0.1);
                flex-direction: column;
                justify-content: center;
                gap: 2.5rem;
                padding: 2rem;
                transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1);
                z-index: 1005;
                border-left: 1px solid var(--border-color);
            }
            .nav-links.open {
                right: 0;
            }
            .menu-toggle.open span:nth-child(1) {
                transform: rotate(45deg) translate(2px, -1px);
            }
            .menu-toggle.open span:nth-child(2) {
                opacity: 0;
                transform: scale(0);
            }
            .menu-toggle.open span:nth-child(3) {
                transform: rotate(-45deg) translate(2px, 1px);
            }
        }

        /* =========================================
           Hero Section (Home) & SNS Integration
           ========================================= */
        .hero {
            min-height: 100vh;
            display: flex;
            align-items: center;
            justify-content: center;
            text-align: center;
            position: relative;
            overflow: hidden;
            background: linear-gradient(120deg, var(--accent-light) 0%, var(--bg-color) 100%);
            padding-top: 70px;
        }
        .hero::before {
            content: ''; position: absolute; inset: 0;
            background: url('https://images.unsplash.com/photo-1507525428034-b723cf961d3e?auto=format&fit=crop&w=1600&q=80') center/cover no-repeat;
            opacity: 0.3; mix-blend-mode: overlay;
            transition: opacity var(--transition);
        }
        [data-theme="dark"] .hero::before {
            opacity: 0.15;
        }
        .hero-content { 
            position: relative; 
            z-index: 2; 
            padding: 2rem 1rem; 
            animation: none;
            max-width: 800px;
            width: 100%;
        }
        .hero-title {
            font-family: var(--font-serif);
            font-size: clamp(2.5rem, 7vw, 5.5rem);
            letter-spacing: 0.15em;
            margin-bottom: 1rem;
            line-height: 1.2;
            background: linear-gradient(90deg, var(--text-main), var(--accent-primary));
            background-clip: text;
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
        }
        .hero-subtitle { 
            font-size: clamp(1rem, 3.5vw, 1.25rem); 
            color: var(--text-muted); 
            font-weight: 300; 
            letter-spacing: 0.08em; 
            margin-bottom: 2.5rem; 
            padding: 0 1rem;
        }
        
        .sns-container {
            display: flex;
            justify-content: center;
            gap: 1.2rem;
            margin-bottom: 2.5rem;
            flex-wrap: wrap;
        }
        .sns-badge {
            display: inline-flex;
            align-items: center;
            gap: 0.5rem;
            padding: 0.6rem 1.2rem;
            background: var(--surface-color);
            color: var(--text-main);
            border: 1px solid var(--border-color);
            border-radius: 30px;
            font-size: 0.85rem;
            font-weight: 500;
            box-shadow: var(--shadow-sm);
            transition: var(--transition);
        }
        .sns-badge:hover {
            transform: translateY(-3px);
            box-shadow: var(--shadow-md);
            border-color: var(--accent-primary);
            color: var(--accent-primary);
        }
        .sns-icon {
            width: 18px;
            height: 18px;
            fill: currentColor;
        }

        .hero-actions-btns {
            display: flex;
            justify-content: center;
            gap: 1rem;
            flex-wrap: wrap;
        }
        .hero-btn {
            display: inline-block;
            padding: 0.9rem 2.2rem;
            border-radius: 50px;
            background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
            color: #fff;
            font-weight: 600;
            box-shadow: var(--shadow-md);
            transition: var(--transition);
            background-size: 200% auto;
            font-size: 0.95rem;
        }
        .hero-btn:hover {
            transform: translateY(-3px);
            box-shadow: var(--shadow-hover);
            background-position: right center;
        }

        /* =========================================
           Article Cards & Grids (Responsive)
           ========================================= */
        .article-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
            gap: 2rem;
        }
        @media (max-width: 640px) {
            .article-grid {
                grid-template-columns: 1fr;
                gap: 1.5rem;
            }
        }
        .article-card {
            background: var(--surface-color);
            border-radius: 16px;
            overflow: hidden;
            box-shadow: var(--shadow-sm);
            transition: var(--transition);
            border: 1px solid var(--border-color);
            position: relative;
            display: flex;
            flex-direction: column;
            height: 100%;
        }
        .article-card:hover {
            transform: translateY(-8px);
            box-shadow: var(--shadow-hover);
        }
        .card-img-wrap {
            position: relative;
            width: 100%;
            height: 0;
            padding-top: 56.25%;
            overflow: hidden;
        }
        .card-img-link { 
            position: absolute; 
            top: 0; 
            left: 0; 
            width: 100%; 
            height: 100%; 
            display: block; 
        }
        .card-img-link img {
            width: 100%; 
            height: 100%; 
            object-fit: cover;
            transition: transform 0.6s ease;
        }
        .article-card:hover .card-img-link img { transform: scale(1.06); }
        .card-category {
            position: absolute; top: 0.75rem; left: 0.75rem;
            background: rgba(255,255,255,0.92); color: var(--accent-primary);
            padding: 0.25rem 0.75rem; border-radius: 20px; font-size: 0.75rem; font-weight: 600;
            backdrop-filter: blur(4px);
            pointer-events: none;
            box-shadow: 0 2px 5px rgba(0,0,0,0.05);
        }
        [data-theme="dark"] .card-category { background: rgba(15,23,42,0.92); }
        
        .card-bookmark {
            position: absolute; top: 0.75rem; right: 0.75rem;
            background: rgba(255,255,255,0.92); width: 34px; height: 34px;
            border-radius: 50%; display: flex; align-items: center; justify-content: center;
            cursor: pointer; transition: var(--transition); color: #ccc; z-index: 20;
            box-shadow: 0 2px 8px rgba(0,0,0,0.1);
        }
        [data-theme="dark"] .card-bookmark { background: rgba(15,23,42,0.92); }
        .card-bookmark.active { color: #f59e0b; }
        .card-bookmark:hover { transform: scale(1.1); }
        
        .card-body-link { display: flex; flex-direction: column; flex-grow: 1; }
        .card-body { padding: 1.25rem; display: flex; flex-direction: column; flex-grow: 1; }
        .card-meta { display: flex; justify-content: space-between; font-size: 0.8rem; color: var(--text-muted); margin-bottom: 0.6rem; }
        .card-title { font-size: 1.15rem; margin-bottom: 0.75rem; line-height: 1.4; color: var(--text-main); transition: color var(--transition); font-weight: 600; }
        .article-card:hover .card-title { color: var(--accent-primary); }
        .card-excerpt { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 1.25rem; flex-grow: 1; display: -webkit-box; line-clamp: 2; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.6; }
        .card-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; }
        .tag { font-size: 0.7rem; padding: 0.15rem 0.5rem; background: var(--accent-light); color: var(--accent-primary); border-radius: 4px; font-weight: 500; }

        /* =========================================
           Archive / Search & Filters
           ========================================= */
        .archive-header { text-align: center; padding: 100px 0 30px; background: var(--accent-light); margin-bottom: 2.5rem; }
        @media (max-width: 768px) {
            .archive-header { padding: 85px 0 25px; margin-bottom: 1.5rem; }
        }
        .search-bar {
            max-width: 500px; margin: 0 auto 1.5rem; display: flex; align-items: center;
            background: var(--surface-color); border-radius: 50px; padding: 0.4rem 1.2rem;
            box-shadow: var(--shadow-sm); border: 1px solid var(--border-color);
        }
        .search-bar input { border: none; background: transparent; flex-grow: 1; outline: none; font-size: 0.95rem; color: var(--text-main); padding: 0.4rem; width: 100%; }
        .filter-tabs { display: flex; justify-content: center; gap: 0.6rem; flex-wrap: wrap; margin-bottom: 1rem; }
        .filter-tab {
            padding: 0.4rem 1.1rem; border-radius: 50px; cursor: pointer;
            background: var(--surface-color); border: 1px solid var(--border-color);
            transition: var(--transition); font-weight: 500; font-size: 0.85rem;
        }
        .filter-tab.active, .filter-tab:hover { background: var(--accent-primary); color: #fff; border-color: var(--accent-primary); }

        /* =========================================
           Article Detail (Locked to Medium Image Size)
           ========================================= */
        .article-layout {
            display: grid; grid-template-columns: 1fr 300px; gap: 2.5rem; padding-top: 100px; padding-bottom: 80px;
        }
        @media (max-width: 992px) { 
            .article-layout { grid-template-columns: 1fr; padding-top: 85px; padding-bottom: 50px; gap: 2rem; } 
        }
        
        .article-main { 
            background: var(--surface-color); 
            padding: 2.5rem; 
            border-radius: 20px; 
            box-shadow: var(--shadow-sm); 
            border: 1px solid var(--border-color); 
            overflow: hidden;
        }
        @media (max-width: 640px) {
            .article-main { padding: 1.25rem; border-radius: 12px; }
        }
        .article-meta-wrapper { margin-bottom: 2rem; }
        .article-title { font-family: var(--font-serif); font-size: clamp(1.75rem, 5vw, 2.5rem); line-height: 1.3; margin: 0.8rem 0; font-weight: 600; }
        
        .article-eyecatch,
        .article-content img { 
            max-width: clamp(320px, 70%, 650px) !important;
            max-height: 350px !important; 
            width: 100% !important;
            height: auto !important;
            aspect-ratio: 16 / 9;
            border-radius: 12px; 
            margin: 2rem auto !important; 
            object-fit: cover; 
            display: block !important;
            box-shadow: var(--shadow-md);
            transition: transform var(--transition);
        }

        .article-content { font-size: clamp(1rem, 3.5vw, 1.1rem); line-height: 2.0; word-break: break-all; }
        .article-content h2 { font-size: clamp(1.3rem, 4vw, 1.6rem); margin: 3rem 0 1.25rem; padding-bottom: 0.5rem; border-bottom: 2px solid var(--accent-light); font-weight: 600; }
        .article-content h3 { font-size: clamp(1.15rem, 3.5vw, 1.3rem); margin: 2rem 0 1rem; font-weight: 600; }
        .article-content p { margin-bottom: 1.5rem; text-align: justify; }
        
        .article-content pre { 
            background: #1e293b; 
            color: #f8fafc; 
            padding: 1.25rem; 
            border-radius: 8px; 
            overflow-x: auto; 
            margin-bottom: 1.5rem; 
            font-size: 0.9rem; 
            max-width: 100%;
        }
        .article-content code { font-family: 'Space Grotesk', monospace; background: rgba(94, 200, 224, 0.1); padding: 0.15rem 0.4rem; border-radius: 4px; font-size: 0.9em; }
        .article-content pre code { background: none; padding: 0; font-size: inherit; color: inherit; }
        
        /* KaTeXのレスポンシブ対応 */
        .katex-display {
            max-width: 100%;
            overflow-x: auto;
            overflow-y: hidden;
            padding: 0.5rem 0;
        }

        .related-articles-section {
            margin-top: 4rem;
            padding-top: 3rem;
            border-top: 2px dashed var(--border-color);
        }
        .related-title {
            font-size: 1.4rem;
            font-weight: 600;
            margin-bottom: 1.5rem;
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }

        /* =========================================
           Sidebar
           ========================================= */
        .sidebar { position: sticky; top: 90px; height: max-content; }
        @media (max-width: 992px) { 
            .sidebar { position: static; margin-top: 2rem; } 
        }
        .widget { background: var(--surface-color); border-radius: 16px; padding: 1.25rem; margin-bottom: 1.5rem; box-shadow: var(--shadow-sm); border: 1px solid var(--border-color); }
        .widget-title { font-weight: 600; font-size: 1rem; margin-bottom: 1rem; display: flex; align-items: center; gap: 0.5rem; border-bottom: 1px solid var(--border-color); padding-bottom: 0.5rem; }
        
        .toc-list { list-style: none; font-size: 0.85rem; max-height: 350px; overflow-y: auto; }
        .toc-list li { margin-bottom: 0.5rem; }
        .toc-list a { color: var(--text-muted); transition: color 0.2s; display: block; padding-left: 0.5rem; border-left: 2px solid transparent; text-overflow: ellipsis; overflow: hidden; white-space: nowrap; }
        .toc-list a:hover, .toc-list a.active { color: var(--accent-primary); border-left-color: var(--accent-primary); }
        .toc-h3 { padding-left: 1.25rem; font-size: 0.8rem; }
        
        .mini-article-list { display: flex; flex-direction: column; gap: 0.85rem; }
        .mini-article { display: flex; gap: 0.85rem; align-items: center; transition: transform 0.2s; cursor: pointer; }
        .mini-article:hover { transform: translateX(5px); }
        .mini-article img { width: 60px; height: 60px; border-radius: 8px; object-fit: cover; flex-shrink: 0; }
        .mini-title { font-size: 0.85rem; font-weight: 500; line-height: 1.4; display: -webkit-box; line-clamp: 2; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: var(--text-main); }

        /* =========================================
           Footer
           ========================================= */
        .site-footer { background: #112b3c; color: #d7e6ea; padding: 3.5rem 0 2rem; text-align: center; margin-top: 4rem; border-top: 1px solid rgba(255,255,255,0.02); }
        .footer-brand { font-family: var(--font-display); font-size: 1.6rem; color: var(--accent-secondary); margin-bottom: 1rem; }
        .footer-sns { display: flex; justify-content: center; gap: 1rem; margin-bottom: 1.5rem; }
        .footer-sns a { color: #b7d7dd; transition: color var(--transition); }
        .footer-sns a:hover { color: var(--accent-primary); }
        .footer-copy { font-size: 0.9rem; }
        
        /* Utility Classes & Animations */
        .hidden { display: none !important; }
        .fade-in { animation: none; opacity: 1; }
        
        .loader { width: 36px; height: 36px; border: 3px solid var(--accent-light); border-top-color: var(--accent-primary); border-radius: 50%; animation: spin 0.8s linear infinite; margin: 4rem auto; }
        @keyframes spin { to { transform: rotate(360deg); } }

        .svg-icon { width: 1.2em; height: 1.2em; fill: currentColor; display: inline-block; vertical-align: middle; }
    
