.header-contactBtn {
    mix-blend-mode: difference;
}

@media screen and (min-width: 769px) {
    .header-contactBtn {
        display: flex;
        /* border: 1px solid #fff; */
        border: 1px solid #000;
        outline: 1px solid #fff;
        cursor: pointer;
        align-items: center;
        justify-content: center;
        text-align: center;
        width: 150px;
        padding: 5px 0;
        border-radius: 50px;
        margin-left: 12px;
        margin-right: 12px;
    }
}

@media screen and (max-width: 980px) and (min-width: 769px) {
    .header-contactBtn {
        max-width: 55px;
        width: 55px;
        margin: 0;
        padding: 0 !important;
    }
}

.headPanel .headerMain>.inner>.col-nav .header-contactBtn {
    border: 1px solid #000;
    color: #000;
    mix-blend-mode: normal;
    outline: none;
}

@media screen and (min-width: 769px) {
    .globalNav ul.parent>li:last-child>a.header-contactBtn {
        padding-right: 12px;
        border: 1px solid #000;
        mix-blend-mode: normal;
        mix-blend-mode: difference;
    }
}

body.home .header-contactBtn {
    border: 1px solid #fff !important;
    outline: none;
}

body.home .headPanel .headerMain>.inner>.col-nav .header-contactBtn {
    border: 1px solid #000 !important;
    color: #000;
    mix-blend-mode: normal;
}

/* ファーストビューBtn */
.kv-contactBtn {
    margin-top: 40px;
}

.btnStyle_02.contactBtn {
    border: 1px solid #fff;
    color: #fff;
    z-index: 1000;
}

.btnStyle_02.contactBtn:before {
    background-color: #3ca96c;
}

.kv-contactBtn {
    margin-top: 40px;
}

@media screen and (min-width: 769px) {
    .btnStyle_02.contactBtn {
        max-width: 185px;
    }
}

@media screen and (max-width: 767px) {
    .btnStyle_02.contactBtn {
        width: 100%;
        margin: 0 auto;
        z-index: 90;
    }

    body.home .header-contactBtn {
        border: none !important;
        color: #231815;
    }

    .header-contactBtn {
        mix-blend-mode: normal !important;
    }
}

.cdcSec {
    margin-bottom: 5rem;
}

.bnrRecruit video {
    width: 100%;
    opacity: 0.6;
}

.bnrRecruit .bgImg {
    background-color: #000;
}

.c-page-fv:before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAYAAABWdVznAAAAHUlEQVR4AWMAAilseOLEiTbY8MjUgEsCl0EjUgMAbTiSifwrdrcAAAAASUVORK5CYII=);
    background-size: 6px 6px;
}

#info {
    position: absolute;
    top: 20px;
    left: 20px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    pointer-events: none;
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
}

#structure-name {
    font-size: 28px;
    font-weight: 300;
    letter-spacing: 6px;
    margin-bottom: 8px;
    color: #00ffff;
    text-shadow: 0 0 20px rgba(0, 255, 255, 0.8);
    transition: color 0.5s ease;
}

#progress-bar {
    width: 200px;
    height: 3px;
    background: rgba(255, 255, 255, 0.2);
    margin-top: 15px;
    border-radius: 2px;
    overflow: hidden;
}

#progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #00ffff, #ff00ff, #00ffff);
    background-size: 200% 100%;
    width: 0%;
    animation: shimmer 2s linear infinite;
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

#structure-indicator {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}

.indicator.active {
    background: #00ffff;
    box-shadow: 0 0 10px #00ffff;
}

/* LabLife, Research, Facility セクションの View More を右下に配置 */
.slider-view-more {
    display: flex;
    justify-content: flex-end;
    margin-top: 12px;
}

@media screen and (max-width: 768px) {
    .slider-view-more {
        justify-content: center;
    }
}

/* スクロールボタンでhomeContainerの上端にぴったり合わせる */
#homeContainer {
    scroll-margin-top: 0;
}

/* NEWSセクション */
#home-news .news-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

#home-news .news-item {
    display: flex;
    align-items: flex-start;
    gap: 24px;
    padding: 20px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

#home-news .news-item:first-child {
    padding-top: 0;
}

#home-news .news-date {
    flex-shrink: 0;
    font-size: 15px;
    font-weight: 500;
    color: #333;
    min-width: 90px;
}

#home-news .news-content {
    font-size: 15px;
    line-height: 1.8;
    color: #333;
    margin: 0;
}

#home-news .news-content a {
    color: #1d3178;
    text-decoration: underline;
}

#home-news .news-content a:hover {
    text-decoration: none;
}

@media screen and (max-width: 768px) {
    #home-news .news-item {
        flex-direction: column;
        gap: 6px;
        padding: 16px 0;
    }

    #home-news .news-date {
        font-size: 13px;
    }

    #home-news .news-content {
        font-size: 14px;
    }
}


.header-contactBtn {
    mix-blend-mode: difference;
}

@media screen and (min-width: 769px) {
    .header-contactBtn {
        display: flex;
        /* border: 1px solid #fff; */
        border: 1px solid #000;
        outline: 1px solid #fff;
        cursor: pointer;
        align-items: center;
        justify-content: center;
        text-align: center;
        width: 150px;
        padding: 5px 0;
        border-radius: 50px;
        margin-left: 12px;
        margin-right: 12px;
    }
}

@media screen and (max-width: 980px) and (min-width: 769px) {
    .header-contactBtn {
        max-width: 55px;
        width: 55px;
        margin: 0;
        padding: 0 !important;
    }
}

.headPanel .headerMain>.inner>.col-nav .header-contactBtn {
    border: 1px solid #000;
    color: #000;
    mix-blend-mode: normal;
    outline: none;
}

@media screen and (min-width: 769px) {
    .globalNav ul.parent>li:last-child>a.header-contactBtn {
        padding-right: 12px;
        border: 1px solid #000;
        mix-blend-mode: normal;
        mix-blend-mode: difference;
    }
}

body.home .header-contactBtn,
body.page-template-page-sustainability .header-contactBtn {
    border: 1px solid #fff !important;
    outline: none;
}

body.home .headPanel .headerMain>.inner>.col-nav .header-contactBtn,
body.page-template-page-sustainability .headPanel .headerMain>.inner>.col-nav .header-contactBtn {
    border: 1px solid #000 !important;
    color: #000;
    mix-blend-mode: normal;
}


#homeFv,
#mainVis {
    height: 100svh
}

#mainVis {
    position: relative;
}

#mainVis .bgImg {
    height: 100% !important;
    position: absolute;
    inset: 0;
}

#vcontainer {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    z-index: 1 !important;
    pointer-events: auto;
}

#vcontainer canvas {
    width: 100% !important;
    height: 100% !important;
    display: block;
    z-index: 0;
}

/* 背景装飾レイヤーはイベントを奪わない */
#mainVis .bgImg>.carouselStyle_06,
#mainVis .bgImg .swiper-main,
#mainVis .bgImg .swiper-wrapper,
#mainVis .bgImg .swiper-slide,
#mainVis #homeCover {
    pointer-events: none;
}

/* テキストは前面。リンクだけクリック可能にし、それ以外はドラッグ等を背景へ通す */
#mainVis .content {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
}

#mainVis .content a,
#mainVis .content button,
#mainVis .content input,
#mainVis .content textarea,
#mainVis .content select,
#mainVis .content [role="button"] {
    pointer-events: auto;
}

.heroScrollHint {
    position: absolute;
    left: 50%;
    bottom: 32px;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    z-index: 3;
    pointer-events: none;
}

.heroScrollHint span {
    display: block;
    width: 12px;
    height: 12px;
    border-right: 2px solid rgba(255, 255, 255, 0.8);
    border-bottom: 2px solid rgba(255, 255, 255, 0.8);
    transform: rotate(45deg);
    animation: scrollArrow 1.5s infinite;
}

.heroScrollHint span:nth-child(1) {
    animation-delay: 0s;
}

.heroScrollHint span:nth-child(2) {
    animation-delay: 0.15s;
}

.heroScrollHint span:nth-child(3) {
    animation-delay: 0.3s;
}

@keyframes scrollArrow {
    0% {
        opacity: 0;
        transform: rotate(45deg) translate(-4px, -4px);
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0;
        transform: rotate(45deg) translate(4px, 4px);
    }
}

/* 3Dモード時はスクロールヒントを非表示 */
#mainVis.is-3d-mode .heroScrollHint {
    opacity: 0;
    pointer-events: none;
}

/* 3Dモード時はbodyのスクロールを完全に禁止（Android対応） */
body.is-3d-mode-active {
    overflow: hidden !important;
    position: fixed !important;
    width: 100% !important;
    touch-action: none !important;
}

#info {
    position: absolute;
    bottom: 24px;
    right: 24px;
    top: auto;
    color: rgba(255, 255, 255, 0.5);
    font-size: 14px;
    pointer-events: none;
    text-shadow: 0 0 8px rgba(0, 255, 255, 0.3);
    z-index: 10;
    text-align: right;
    opacity: 0.6;
}

#structure-name {
    font-size: 20px;
    font-weight: 300;
    letter-spacing: 4px;

    margin-bottom: 6px;
    color: #00ffff;
    text-shadow: 0 0 12px rgba(0, 255, 255, 0.5);
    transition: color 0.5s ease;
}

#vertices-count,
#edges-count {
    font-size: 12px;
    opacity: 0.7;
    margin-bottom: 2px;
    display: none;
}

#progress-bar {
    width: 120px;
    height: 2px;
    background: rgba(255, 255, 255, 0.15);
    margin-top: 10px;
    margin-left: auto;
    border-radius: 1px;
    overflow: hidden;
}

#progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #00ffff, #ff00ff, #00ffff);
    background-size: 200% 100%;
    width: 0%;
    animation: shimmer 2s linear infinite;
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

#structure-indicator {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    justify-content: flex-end;
}

.indicator {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.indicator.active {
    background: rgba(0, 255, 255, 0.7);
    box-shadow: 0 0 6px rgba(0, 255, 255, 0.5);
}

/* 操作ヒント */
#controls-hint {
    position: absolute;
    bottom: 24px;
    left: 24px;
    z-index: 10;
    pointer-events: none;
    opacity: 0.35;
}

.wasd-keys {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    margin-bottom: 8px;
}

.wasd-row {
    display: flex;
    gap: 3px;
}

.key {
    width: 22px;
    height: 22px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.6);
    font-size: 10px;
    font-family: 'Inter', monospace;
    display: flex;
    align-items: center;
    justify-content: center;
    text-transform: uppercase;
}

.hint-text {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.5);
    text-align: center;
    line-height: 1.4;
}

@media screen and (max-width: 768px) {
    #controls-hint {
        display: none;
    }
}

/* canvas操作モード時はデフォルトカーソルを非表示 */
#vcontainer.controls-active {
    cursor: none;
}

/* カスタムカーソル（呼吸する円・塗りつぶし） */
.custom-cursor {
    position: fixed;
    width: 60px;
    height: 60px;
    background: rgba(0, 255, 255, 0.4);
    border: 2px solid rgba(0, 255, 255, 0.8);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.custom-cursor.active {
    opacity: 1;
    animation: cursorBreath 2s ease-in-out infinite;
}

@keyframes cursorBreath {

    0%,
    100% {
        transform: translate(-50%, -50%) scale(1);
        background: rgba(0, 255, 255, 0.4);
    }

    50% {
        transform: translate(-50%, -50%) scale(1.3);
        background: rgba(0, 255, 255, 0.6);
    }
}

/* ロゴの色変更（スクロール前：白） - トップページのみに適用 */
body.home header #siteLogo .st0 {
    fill: #ffffff;
    transition: fill 0.4s ease;
}

/* モバイルメニューオープン時：白ロゴを黒に上書き（#wrapperにmenuOpenが付く） */
.menuOpen header #siteLogo .st0 {
    fill: #231815 !important;
}

/* ローディング画面 */
#page-loader,
.page-loader {
    position: fixed;
    inset: 0;
    background: #0a0a0f;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

#page-loader.hidden,
.page-loader.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader-content,
.page-loader__content {
    text-align: center;
}

.loader-spinner,
.page-loader__spinner {
    width: 40px;
    height: 40px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-top-color: rgba(0, 255, 255, 0.8);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 16px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loader-text,
.page-loader__text {
    color: rgba(255, 255, 255, 0.5);
    font-size: 12px;
    letter-spacing: 3px;
    text-transform: uppercase;
}

.sp-followButton {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    width: 84%;
    height: 12vw;
    color: #fff;

    border: 1px solid #000;
    /* font-size: 4vw; */
    border-radius: 100px;
    color: #000;
    opacity: 0;
    z-index: 1000;
    pointer-events: none;
    transition: opacity 0.5s ease-in-out;
    cursor: pointer;
    background-color: #fff;
    box-shadow: none;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-weight: normal;
}

.sp-followButton.visible {
    opacity: 1;
    pointer-events: auto;
}

@media screen and (min-width: 769px) {
    .sp-followButton {
        display: none;
    }
}

/* Swiper for Geometry of Silence section */
.swiper-about {
    width: 100%;
    height: 100%;
}

.swiper-about .swiper-slide {
    width: 100%;
    height: 100%;
}

.swiper-about .swiper-slide figure,
.swiper-about .swiper-slide picture {
    width: 100%;
    height: 100%;
    display: block;
}

.swiper-about .swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Swiper fade effect */
.swiper-about .swiper-slide {
    opacity: 0 !important;
    transition: opacity 1s ease;
}

.swiper-about .swiper-slide-active {
    opacity: 1 !important;
}

/* SP対応: Geometry of Silence セクションの文字切れ修正 */
@media screen and (max-width: 768px) {
    .cdcSec .col-content .inner {
        padding-left: 4vw;
        padding-right: 4vw;
    }

    /* white-space: nowrap; を上書き */
    .colStyle_01 .subTtl {
        white-space: normal;
    }

    /* SP: body の overflow: hidden を強制解除してスクロールを有効化 */
    body,
    html {
        overflow: auto !important;
        overflow-x: hidden !important;
        height: auto !important;
    }

    /* SP: #vcontainer のタッチイベントを1本指は無視 */
    #vcontainer {
        touch-action: pan-y;
    }
}

/* アニメーション一時停止ボタン */
.pause-button {
    position: absolute;
    bottom: 90px;
    right: 16px;
    width: 38px;
    height: 38px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    font-size: 20px;
    cursor: pointer;
    z-index: 1000;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    pointer-events: auto;
    opacity: 0;
    visibility: hidden;
}

/* 3D操作モード時のみ表示 */
#vcontainer.controls-active .pause-button {
    opacity: 1;
    visibility: visible;
}

.pause-button:hover {
    background: rgba(255, 255, 255, 1);
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.pause-button:active {
    transform: scale(0.95);
}

.pause-button .icon {
    display: block;
    line-height: 1;
}

/* モバイル対応 */
@media screen and (max-width: 768px) {
    .pause-button {
        width: 44px;
        height: 44px;
        font-size: 18px;
        bottom: 12px;
        right: 12px;
    }
}

/* SP用: 3D操作トグルボタン */
.sp-3d-toggle,
.sp-3d-overlay {
    display: none;
}

@media screen and (max-width: 768px) {
    .pause-button {
        position: absolute;
        bottom: 27px;
        left: 16px;
    }
    /* SP: デフォルトでcanvasはタッチ無効（スクロール優先） */
    #vcontainer canvas {
        pointer-events: none;
    }

    /* 3Dモード時はcanvasを有効化 */
    #vcontainer.is-3d-mode canvas {
        pointer-events: auto;
    }

    /* 3D操作ボタン */
    .sp-3d-toggle {
        display: flex;
        position: absolute;
        bottom: 80px;
        left: 50%;
        transform: translateX(-50%);
        background: rgba(255, 255, 255, 0.95);
        color: #333;
        border: none;
        padding: 6px 24px;
        border-radius: 30px;
        font-size: 13px;
        font-weight: 600;
        z-index: 100;
        gap: 6px;
        align-items: center;
        cursor: pointer;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
        transition: transform 0.2s, box-shadow 0.2s;
    }

    .sp-3d-toggle:active {
        transform: translateX(-50%) scale(0.95);
    }

    .sp-3d-toggle .icon {
        font-size: 18px;
    }

    /* 3Dモード時はボタンを非表示 */
    #vcontainer.is-3d-mode .sp-3d-toggle {
        display: none;
    }

    /* 3Dモード時は一時停止ボタンを表示 */
    #vcontainer.is-3d-mode .pause-button {
        opacity: 1;
        visibility: visible;
    }

    /* 3Dモード時のオーバーレイUI */
    .sp-3d-overlay {
        display: none;
        position: absolute;
        inset: 0;
        background: transparent;
        /* 背景を透明に */
        z-index: 99;
        flex-direction: column;
        justify-content: flex-end;
        align-items: center;
        padding-bottom: 80px;
        gap: 16px;
        pointer-events: none;
        /* タッチをcanvasに通す */
    }

    #vcontainer.is-3d-mode .sp-3d-overlay {
        display: flex;
    }

    .sp-3d-overlay .hint {
        background: rgba(0, 0, 0, 0.7);
        color: #fff;
        padding: 6px 24px;
        border-radius: 20px;
        font-size: 12px;
        backdrop-filter: blur(4px);
        -webkit-backdrop-filter: blur(4px);
        pointer-events: auto;
        /* ヒントはタップ可能 */
    }

    .sp-3d-overlay .hint.fade-out {
        opacity: 0;
        transition: opacity 0.5s ease;
    }

    .sp-3d-overlay .close-btn {
        background: #fff;
        color: #333;
        border: none;
        padding: 6px 24px;
        border-radius: 24px;
        font-size: 13px;

        cursor: pointer;
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
        pointer-events: auto;
        /* ボタンはタップ可能 */
    }

    .sp-3d-overlay .close-btn:active {
        transform: scale(0.95);
    }
}


/* =============================================
   Home Research Slider - Overlay Title Style
   ============================================= */
#home-research .carouselStyle_04 .articleStyle_03 .inner {
    position: relative;
}

#home-research .carouselStyle_04 .articleStyle_03 .eyecatch {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
}

#home-research .carouselStyle_04 .articleStyle_03 .eyecatch::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100%;
    background: linear-gradient(to top, rgba(255, 255, 255, 0.75) 0%, rgba(255, 255, 255, 0) 100%);
    pointer-events: none;
}

#home-research .carouselStyle_04 .articleStyle_03 .content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    z-index: 2;
    display: flex;
    align-items: center;
    height: 100%;
    border-radius: 8px;
    border: 1px solid #ccc;
}


#home-research .carouselStyle_04 .articleStyle_03 .content h2 {
    color: #fff;
    font-size: clamp(2.4rem, 3vw, 3.2rem);
    font-weight: 500;
    line-height: 1.4;
    margin: 0;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

#home-research .carouselStyle_04 .articleStyle_03 .content h2 span {
    color: #000;
}

#home-research .carouselStyle_04 .articleStyle_03 .headInfo {
    display: none;
}

@media screen and (max-width: 768px) {
    #home-research .carouselStyle_04 .articleStyle_03 .content {
        padding: 12px 14px;
    }

    #home-research .carouselStyle_04 .articleStyle_03 .content h2 {
        font-size: 13px;
        line-height: 1.5;
    }

    .cdcSec .ttl {
        font-size: clamp(5rem, 7.0625vw, 8.6rem);
        line-height: 1;
    }

    .cdcSec .col-content {
        margin-top: -0.6em;
    }
}

/* =============================================
   Methods Section
   ============================================= */
.methods-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px;
}

.method-item {}

.method-item h3 {
    font-size: clamp(1.8rem, 1.5vw, 2.2rem);
    margin-bottom: 10px;
    font-weight: 500;
    display: flex;
    align-items: center;
}

.method-item i {
    font-size: 1.2em;
    opacity: 0.8;
    padding-right: 15px;
}

.method-item p {
    line-height: 1.8;
    font-size: 15px;
    opacity: 0.9;
}

@media screen and (max-width: 768px) {
    .methods-list {
        gap: 24px;
    }

    .method-item {
        margin-bottom: 24px;
    }

    .method-item h3 {

        gap: 10px;
    }

    .method-item p {
        font-size: 14px;
    }
}


/* 通常ページ(.pages)のロゴは常に黒 */
body.pages header #siteLogo .st0 {
    fill: #231815 !important;
}

/* fixedHeader時はナビゲーションテキストを黒に設定 */
@media screen and (min-width: 769px) {
    .home.fixedHeader .headerMain>.inner>.col-nav a,
    .home.fixedHeader .globalNav ul.parent>li>a span {
        color: #231815 !important;
        mix-blend-mode: normal !important;
    }

    .home.fixedHeader .globalNav ul.parent>li>a {
        mix-blend-mode: normal !important;
    }

    /* fixedHeader時のコンタクトボタン */
    .home.fixedHeader .header-contactBtn {
        border: 1px solid #231815 !important;
        mix-blend-mode: normal !important;
    }

    .home.fixedHeader .header-contactBtn span {
        color: #231815 !important;
    }

    /* fixedHeader時のロゴを黒に変更 */
    .home.fixedHeader header #siteLogo .st0 {
        fill: #231815 !important;
    }
}

/* モバイル版：fixedHeader時のロゴとナビゲーションを黒に設定 */
@media screen and (max-width: 768px) {
    .home.fixedHeader .headerMain .col-logo a svg .st0,
    .home.fixedHeader header #siteLogo .st0 {
        fill: #231815 !important;
    }

    .home.fixedHeader .burgerNav .burger span {
        background-color: #231815 !important;
    }

    .home.fixedHeader .header-contactBtn {
        border: 1px solid #231815 !important;
        color: #231815 !important;
        mix-blend-mode: normal !important;
    }

    /* モバイル版：fixedHeader時の言語切り替えテキストを黒に設定 */
    .home.fixedHeader .langSelector li {
        color: #231815 !important;
    }

    .home.fixedHeader .langSelector a {
        color: #231815 !important;
    }

    .home.fixedHeader .langSelector .language-switcher__name {
        color: #231815 !important;
    }
}

/* =============================================
   Home Page Slider Image Aspect Ratio (500x400)
   Applied to: Selected Papers, Lab Life, Facility, Research
   ============================================= */
.carouselStyle_04 .articleStyle_03 .eyecatch img {
    aspect-ratio: 500/400;
    object-fit: cover;
    border-radius: 8px;
}

/* =============================================
   Research Page Grid Image Aspect Ratio (500x400)
   Applied to: research.php, research-en.php
   ============================================= */
.research-card .eyecatch img {
    aspect-ratio: 500/400;
    object-fit: cover;
    border-radius: 8px;
}

.research-card h2 {
    min-height: 65px;
    font-size: clamp(1.2rem, 1.3vw, 1.5rem);
}

/* =============================================
   Facilities Page Grid Image Aspect Ratio (500x400)
   Applied to: facilities.php, facilities-en.php
   ============================================= */
.itemWrapStyle_07 .imgStyle_02 img {
    aspect-ratio: 500/400;
    object-fit: cover;
    border-radius: 8px;
}

/* =============================================
   Selected Papers Card Layout
   - Image: top-aligned only
   ============================================= */
#home-papers .carouselStyle_04 .swiper-wrapper {
    align-items: flex-start;
}

/* =============================================
   View More Button for Papers Pagination
   ============================================= */
.view-more-btn-wrapper {
    display: flex;
    justify-content: center;
    width: 100%;
}

.view-more-btn {
    display: inline-block;
    padding: 14px 40px;
    border: 1px solid #231815;
    color: #231815;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
    background: transparent;
    border-radius: 50px;
    font-family: inherit;
}

.view-more-btn:hover {
    background: #231815;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.view-more-btn:active {
    transform: translateY(0);
}

@media screen and (max-width: 768px) {
    .view-more-btn {
        padding: 12px 32px;
        font-size: 14px;
    }
}

/* ========================================
   Tag Filter for Papers Page
   ======================================== */

.tag-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding-left: 12px;
}

.tag-btn {
    display: inline-block;
    padding: 6px 16px;
    font-size: 13px;
    font-weight: 500;
    color: #666;
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.tag-btn:hover {
    background: #e8e8e8;
    border-color: #ccc;
    color: #333;
}

.tag-btn.active {
    background: #231815;
    color: #fff;
    border-color: #231815;
}

@media screen and (max-width: 768px) {
    .tag-filter {
        padding-left: 12px;
        gap: 6px;
    }

    .tag-btn {
        padding: 5px 12px;
        font-size: 12px;
    }
}

/* Filtered out items (hidden by tag filter) */
.papers-item.filtered-out {
    display: none !important;
}

/* =============================================
   Facilities Page - Scroll Animation
   ============================================= */

/* 初期状態: 下に配置して非表示 */
.itemWrapStyle_07 {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.4s ease-out, transform 0.4s ease-out;
}

/* 視野に入った状態: 表示 */
.itemWrapStyle_07.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* モバイル版: 順序変更（装置名→説明文→写真） */
@media screen and (max-width: 768px) {
    .itemWrapStyle_07 {
        display: flex !important;
        flex-direction: column !important;
    }

    /* 写真（.imgStyle_02を含む要素）を2番目に */
    .itemWrapStyle_07 .col-left:has(.imgStyle_02),
    .itemWrapStyle_07 .col-right:has(.imgStyle_02) {
        order: 2 !important;
    }

    /* テキスト（h3やpを含む要素）を1番目に */
    .itemWrapStyle_07 .col-left:has(h3, p),
    .itemWrapStyle_07 .col-right:has(h3, p) {
        order: 1 !important;
    }

    /* フォールバック: すべての.col-rightを1番目、.col-leftを2番目 */
    .itemWrapStyle_07 .col-right {
        order: 1 !important;
    }

    .itemWrapStyle_07 .col-left {
        order: 2 !important;
    }

    .itemWrapStyle_07 .col-left .imgStyle_02 {
        margin-bottom: 0;
        margin-top: 24px;
    }

    /* モバイル版での各要素の幅調整 */
    .itemWrapStyle_07 > * {
        width: 100% !important;
    }
}

/* =============================================
   Facilities Page - Item Spacing
   ============================================= */

/* 各装置アイテムの上下マージン */
.itemWrapStyle_07 {
    margin-top: 80px;
    margin-bottom: 80px;
}

/* 最初のアイテムの上マージンはキャンセル */
.itemWrapStyle_07:first-child {
    margin-top: 0;
}

/* モバイル版 */
@media screen and (max-width: 768px) {
    .itemWrapStyle_07 {
        margin-top: 12vw;
        margin-bottom: 12vw;
    }

    .itemWrapStyle_07 .col-left .imgStyle_02 {
        margin-bottom: 6vw;
    }
}