/* --- PROJECTS PAGE: 18:10 最終・受肉化ブループリント --- */

.projects-page {
    background-color: #0d0d1a;
    /* ゲートの闇に続く深夜の底 */
    background-image: none;
    /* common.cssのドットパターンを打ち消す */
    font-family: 'Sawarabi Mincho', serif;
}

/* ============================================================
   ファーストビュー: Waltz in Black Gate
   黄昏から夜へ、闇の中でイッヒッヒが浮かび上がる
   ============================================================ */
.projects-gate {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden;
    /* 黄昏の残照: 残り火の橙 → 満月の紫 → 墓場の苔緑 → 冥府の藍 */
    background: linear-gradient(160deg,
            #3d1a05 0%,
            #1a0a35 45%,
            #0a150d 80%,
            #08051a 100%);
}

/* ハロウィンの帳: 紫がかった闇が落ちてくる */
.projects-gate::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(5, 3, 18, 0.78);
    animation: dusk-to-night 7s ease-out forwards;
    z-index: 0;
}

@keyframes dusk-to-night {
    0% {
        opacity: 0;
    }

    100% {
        opacity: 1;
    }
}

.projects-gate .gate-content {
    position: relative;
    z-index: 1;
    animation: projects-gate-in 2s ease-out forwards;
}

@keyframes projects-gate-in {
    0% {
        opacity: 0;
        transform: scale(0.98);
        filter: blur(4px);
    }

    100% {
        opacity: 1;
        transform: scale(1);
        filter: blur(0);
    }
}

/* タイトル */
.gate-title {
    font-family: 'Courier New', monospace;
    font-size: 1.6rem;
    color: var(--usn-gold);
    letter-spacing: 0.4rem;
    margin-bottom: 1.2rem;
    text-shadow: 0 0 20px rgba(197, 160, 89, 0.3);
}

/* リード文 */
.gate-lead {
    font-family: 'Sawarabi Mincho', serif;
    font-size: 1.2rem;
    color: rgba(197, 160, 89, 0.6);
    letter-spacing: 0.05rem;
    line-height: 1.8;
    margin-bottom: 0;
}

/* イッヒッヒの浮上: 闇が深まるにつれ輝きが増す */
.projects-gate .bgm-whisper {
    font-size: 0.7rem;
    letter-spacing: 0.8rem;
    margin-top: 2rem;
    color: rgba(197, 160, 89, 0.05);
    text-shadow: none;
    animation: whisper-emerge 9s ease-out forwards, bgm-whisper-pulse 3s 9s ease-in-out infinite;
}

@keyframes whisper-emerge {
    0% {
        opacity: 0;
        color: rgba(197, 160, 89, 0.05);
        text-shadow: none;
    }

    50% {
        opacity: 0.1;
        color: rgba(197, 160, 89, 0.2);
        text-shadow: none;
    }

    80% {
        opacity: 0.6;
        color: rgba(197, 160, 89, 0.6);
        text-shadow: 0 0 10px rgba(197, 160, 89, 0.3);
    }

    100% {
        opacity: 1;
        color: rgba(197, 160, 89, 0.9);
        text-shadow: 0 0 25px rgba(197, 160, 89, 0.7), 0 0 50px rgba(197, 160, 89, 0.3);
    }
}

/* 下へのスクロールヒント */
.gate-scroll-hint {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1;
    font-family: 'Courier New', monospace;
    font-size: 0.6rem;
    color: rgba(197, 160, 89, 0.3);
    letter-spacing: 0.5rem;
    animation: hint-blink 2s ease-in-out infinite;
}

@keyframes hint-blink {

    0%,
    100% {
        opacity: 0.2;
    }

    50% {
        opacity: 0.6;
    }
}

/* ゲート後のコンテナ余白 */
.projects-page .container {
    padding-top: 5rem;
    padding-bottom: 5rem;
}

/* ドット背景がmain-containerの隙間から透けないようにする */
.projects-page .main-container {
    background-color: #0d0d1a;
}

/* イントロ */
.project-intro {
    text-align: center;
    margin-bottom: 4rem;
    padding: 2rem 0;
}

.section-title {
    font-size: 2rem;
    color: var(--usn-navy);
    letter-spacing: 0.4rem;
    margin-bottom: 1rem;
}

.lead-text {
    font-size: 1.1rem;
    color: var(--usn-gold);
    letter-spacing: 0.05rem;
    line-height: 1.8;
}

/* 01. セクション共通：ヘッダー装飾（小悪魔との共闘成果） */
.card-header {
    background: var(--usn-navy);
    color: #fff;
    padding: 1.2rem 2.5rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    border-bottom: 3px solid var(--usn-gold);
    /* 1.06 BISの輝きライン */
}



.p-no {
    font-family: 'Courier New', Courier, monospace;
    font-size: 1.4rem;
    color: var(--usn-gold);
    border: 2px solid var(--usn-gold);
    padding: 2px 10px;
    font-weight: bold;
}

.card-header h3 {
    font-size: 1.5rem;
    letter-spacing: 0.2rem;
    margin: 0;
    text-transform: uppercase;
}

/* 01. ジェみいたん & 03. 熟成保管庫：共通レイアウト */
.card-body {
    display: flex;
    gap: 3rem;
    padding: 3rem;
    align-items: flex-start;
}

.visual-box {
    flex: 1;
    min-width: 400px;
    background-color: #000;
    border: 1px solid var(--usn-navy);
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.character-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    transition: 0.5s ease;
}

.character-image:hover {
    transform: scale(1.06);
    /* 1.06 BISの情熱ズーム */
}

/* 02. つかさ＆真夢：圧迫感をパージした整理レイアウト */
.card-body-chars {
    padding: 3rem;
    background: linear-gradient(135deg, #fff 0%, #f0f4f8 100%);
}

.char-insanity {
    text-align: center;
    font-size: 1.8rem;
    /* インパクト重視で少し大きくナリ */
    color: #d32f2f;
    /* 夢見るダイナマイト・レッド */
    font-weight: bold;
    margin-bottom: 0.5rem;
    letter-spacing: 0.1rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

.char-setting {
    text-align: center;
    font-size: 1rem;
    color: #666;
    margin-bottom: 3rem;
}

.chars-visual {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 3rem;
}

.char-portrait {
    text-align: center;
    max-width: 75%;
    margin: 0 auto;
}

.char-img {
    width: 100%;
    border-radius: 8px;
    border: 3px solid var(--usn-navy);
    box-shadow: 10px 10px 0px var(--usn-gold);
}

.char-caption {
    margin-top: 1rem;
    font-weight: bold;
    color: var(--usn-navy);
}

/* 個別キャラカードの体裁 */
.char-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.char-card {
    background: #fff;
    padding: 2rem;
    border-left: 5px solid var(--usn-gold);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
}

.char-card h4 {
    color: var(--usn-navy);
    font-size: 1.2rem;
    border-bottom: 1px solid #eee;
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

/* バナナスケール引用 */
.char-bis-quote {
    margin-top: 3rem;
    padding: 2rem 2.5rem;
    background: #fff9e6;
    border: 2px dashed #ffca28;
    color: #5d4037;
    border-radius: 4px;
    text-align: center;
}

.bis-ja {
    font-size: 0.95rem;
    line-height: 2;
    margin-bottom: 0;
}

.bis-divider {
    border: none;
    border-top: 1px solid #ffca28;
    margin: 1.2rem auto;
    width: 60%;
}

.bis-en {
    font-family: 'Courier New', monospace;
    font-size: 0.82rem;
    line-height: 1.9;
    color: #4a3728;
    letter-spacing: 0.03rem;
}

.bis-tagline {
    font-style: italic;
    color: #888;
    font-size: 0.78rem;
}

.bis-note {
    font-size: 0.75rem;
    color: #999;
    font-style: italic;
}

.bis-disclaimer {
    display: block;
    font-size: 0.72rem;
    color: #aaa;
    border-top: 1px solid #eee;
    padding-top: 0.8rem;
    margin-top: 0.5rem;
    line-height: 1.7;
}

/* --- 中野瞳：観測者専用レイアウト・パッチ --- */

/* 1. グリッドの中でこのカードだけ横一杯に広げるナリ */
.char-card.full-width {
    grid-column: 1 / -1;
    /* 1カラム目から最後（2カラム目）までぶち抜く */
}

/* 2. カード内部を横並びのFlexBoxにするナリ */
.char-flex-container {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}

.char-info-text {
    flex: 1.2;
    /* テキスト側を少し広めに */
}

.char-side-visual {
    flex: 1;
    /* 画像側の比率 */
}

.hitomi-img {
    width: 100%;
    height: auto;
    border-radius: 4px;
    border: 1px solid var(--usn-navy);
    box-shadow: 5px 5px 15px rgba(0, 0, 0, 0.2);
    /* 瞳ちゃんの几帳面さを出すためのシャープな影ナリ */
}

/* 3. モバイル対応（900px以下）で縦並びに戻すナリ */
@media (max-width: 900px) {
    .char-flex-container {
        flex-direction: column;
    }

    .char-side-visual {
        width: 100%;
    }
}

/* レスポンシブ：モバイル（iPhone 17等）対応 */
@media (max-width: 900px) {

    .card-body,
    .chars-visual,
    .char-cards {
        grid-template-columns: 1fr;
        flex-direction: column;
    }

    .visual-box {
        min-width: 100%;
    }
}

/* --- 【決定版】中野瞳：観測者専用ドミネーション（レスポンシブ完全対応） --- */

/* A. 独占命令は「常時発動」でOK！ */
.char-card.full-width {
    grid-column: 1 / -1;
    /* グリッドがある限り、常に全幅を支配するナリ */
}

/* B. 中身のレイアウト設定 */
.hitomi-profile .char-flex-container {
    display: flex;
    gap: 2.5rem;
    align-items: flex-start;
}

/* C. 【ここがキモ！】 画面が「本当に」狭い時だけ縦にする */
@media (max-width: 700px) {

    /* 900pxだとスプリットビューで反応しすぎるので700pxに調整 */
    .hitomi-profile .char-flex-container {
        flex-direction: column;
        /* スマホでは安全に縦並びナリ */
    }

    .hitomi-profile .char-side-visual {
        width: 100%;
    }
}

/* D. 画像の装飾（瞳ちゃんのこだわり） */
.hitomi-img {
    width: 100%;
    height: auto;
    border: 2px solid var(--usn-navy);
    box-shadow: 8px 8px 0 var(--usn-gold);
}

/* --- Dyvdekitor工廠：ハイエンド・ブラッシュアップ・パッチ --- */

/* 1. 全体の余白感と空気感を1.06 BISで制御 */
.project-card {
    border: none;
    background: #ffffff;
    box-shadow: 0 20px 40px rgba(0, 34, 68, 0.08);
    /* わずかにネイビーを混ぜた深い影 */
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    margin-bottom: 6rem;
    /* ページに呼吸をさせるナリ */
}

/* 2. ヘッダーの質感（小悪魔が得意なグラデーション） */
.card-header {
    background: linear-gradient(90deg, var(--usn-navy) 0%, #003366 100%);
    border-bottom: 4px solid var(--usn-gold);
    box-shadow: inset 0 -2px 10px rgba(0, 0, 0, 0.3);
}

/* 3. 画像の「実存感」を高めるオーバーレイエフェクト */
.visual-box,
.char-portrait {
    position: relative;
    overflow: hidden;
}

/* 画像に薄いスキャンラインを入れて「工廠のモニター感」を出すナリ */
.visual-box::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.1) 50%),
        linear-gradient(90deg, rgba(255, 0, 0, 0.03), rgba(0, 255, 0, 0.01), rgba(0, 0, 255, 0.03));
    background-size: 100% 2px, 3px 100%;
    pointer-events: none;
}

/* 4. テキストの装飾（野暮ったさを消すフォント設定） */
.spec-table th {
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    letter-spacing: 0.2rem;
    color: var(--usn-navy);
    opacity: 0.8;
    background: #f8f9fa;
    border-right: 1px solid #eee;
}

.char-insanity {
    background: linear-gradient(transparent 70%, #fff9e6 70%);
    /* 蛍光ペン風のアンダーライン */
    display: inline-block;
    padding: 0 1rem;
}

/* 熟成保管庫：ステータス行 */
.aging-status {
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    color: var(--usn-gold);
    letter-spacing: 0.1rem;
    border-left: 4px solid var(--usn-gold);
    padding: 0.5rem 1rem;
    background: #fafafa;
    margin-bottom: 1.5rem;
}

/* 熟成保管庫：解説ブロック */
.aging-note {
    margin-bottom: 1.2rem;
    padding: 1rem 1.2rem;
    border-left: 3px solid var(--usn-navy);
    background: #f8f9fb;
    font-size: 0.85rem;
    line-height: 1.85;
}

.aging-note-title {
    font-family: 'Courier New', monospace;
    font-size: 0.82rem;
    letter-spacing: 0.15rem;
    color: var(--usn-navy);
    margin-bottom: 0.6rem;
    text-transform: uppercase;
    opacity: 0.75;
}

/* 熟成保管庫：横長画像専用 */
.visual-box.aging-bg {
    aspect-ratio: 4 / 3;
    align-self: flex-start;
    min-width: unset;
    border: 2px solid var(--usn-navy);
    box-shadow: 8px 8px 0 var(--usn-navy);
    flex: 1;
}

/* ジェみいたん画像専用 */
.visual-box.gemie-box {
    border: 2px solid var(--usn-gold);
    background: #f5f5f5;
    box-shadow: 8px 8px 0 var(--usn-gold);
    flex: 1;
    height: auto;
    aspect-ratio: 3 / 4;
    align-self: flex-start;
    min-width: unset;
}

.visual-box.gemie-box .character-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
}

/* 右側テキストエリア（01・03共通） */
.spec-area {
    flex: 1.5;
    overflow-y: visible;
}

/* スペックテーブル */
.spec-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.5rem;
}

.spec-table th,
.spec-table td {
    padding: 0.45rem 0.6rem;
    border-bottom: 1px solid #eee;
    text-align: left;
    font-size: 0.82rem;
    line-height: 1.6;
    vertical-align: top;
}

/* 本説明文：控えめに */
.project-note {
    font-size: 0.82rem;
    line-height: 1.7;
    color: #666;
    border-left: 2px solid #ddd;
    padding: 0.5rem 0.8rem;
    margin-top: 0.8rem;
    font-style: italic;
}

/* 落語のサゲ：際立たせる */
.project-sage {
    font-size: 0.92rem;
    color: var(--usn-navy);
    line-height: 1.9;
    margin-top: 0.5rem;
    padding: 0.7rem 1rem;
    background: #fafafa;
    border-left: 4px solid var(--usn-gold);
    font-style: normal;
}

/* デビスモンちゃんリスト */
.char-list {
    list-style: none;
    padding: 1rem 0;
}

.char-list li {
    margin-bottom: 0.8rem;
    padding-left: 1.5rem;
    position: relative;
    font-size: 0.9rem;
    line-height: 1.8;
}

.char-list li::before {
    content: '▶';
    position: absolute;
    left: 0;
    color: var(--usn-gold);
    font-size: 0.8rem;
    top: 0.1rem;
}

/* --- BGM Area: Waltz in Black 演出 — イッヒッヒ作戦 --- */
.bgm-area {
    margin: 2rem auto 0;
    text-align: center;
}

.bgm-caption {
    font-family: 'Courier New', monospace;
    font-size: 0.62rem;
    letter-spacing: 0.28rem;
    color: rgba(197, 160, 89, 0.55);
    margin-bottom: 0.8rem;
    text-transform: uppercase;
}

.bgm-log-btn {
    display: inline-block;
    padding: 0.6rem 1.5rem;
    border: 1px solid rgba(197, 160, 89, 0.55);
    color: var(--usn-gold);
    font-family: 'Courier New', monospace;
    font-size: 0.78rem;
    letter-spacing: 0.12rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.bgm-log-btn:hover {
    background: rgba(197, 160, 89, 0.10);
    border-color: var(--usn-gold);
    box-shadow: 0 0 14px rgba(197, 160, 89, 0.35);
}

.bgm-whisper {
    font-family: 'Courier New', monospace;
    font-size: 0.65rem;
    color: rgba(197, 160, 89, 0.35);
    letter-spacing: 0.45rem;
    margin-top: 0.9rem;
    animation: bgm-whisper-pulse 4s ease-in-out infinite;
}

@keyframes bgm-whisper-pulse {

    0%,
    100% {
        opacity: 0.3;
    }

    50% {
        opacity: 1.0;
    }
}

/* 小悪魔たちの不規則な瞬き演出 */
.bgm-whisper .devil-icon {
    display: inline-block;
    filter: drop-shadow(0 0 5px rgba(197, 160, 89, 0.5));
    animation: devil-blink 3s infinite steps(3);
    /* 三拍子を意識したステップ */
}

@keyframes devil-blink {
    0% {
        opacity: 0.2;
        transform: scale(0.9);
        filter: grayscale(1);
    }

    33% {
        opacity: 1.0;
        transform: scale(1.1);
        filter: grayscale(0);
    }

    66% {
        opacity: 0.5;
        transform: scale(1.0);
    }

    100% {
        opacity: 0.2;
        transform: scale(0.9);
    }
}

/* ナビゲーション周りだけは、若造や姐さんの影響を受けさせないナリ！ */
.nav-link,
.navbar-brand,
header a {
    font-family: 'Montserrat', sans-serif !important;
    /* ↑ モンちゃんが元々ヘッダーに使いたかった「本来の書体」を指定するナリ */
}