@charset "UTF-8";

/* =========================================
 * 1. 基本設定 (Base & Layout)
 * ========================================= */
html {
    scroll-behavior: smooth; /* ページ内リンクをスルスル動かす */
}

body {
    background-color: #f0f0f0; /* 薄いグレーの背景 */
    color: #333333; /* 暗いグレーの文字 */
    font-family: "MS PMincho", "Hiragino Mincho ProN", serif;
    font-size: 16px;
    margin: 3px;
    padding: 0;
}

/* メインの白い箱 */
#wrapper {
    width: 900px;
    margin: 20px auto;
    background-color: #ffffff;
    border: 2px solid #aaaaaa;
    padding: 20px;
    box-sizing: border-box; 
}

/* メインコンテンツエリア */
#main_content {
    padding: 10px;
}

/* フッター */
footer {
    text-align: center;
    font-size: 12px;
    color: #888;
    margin-top: 20px;
    border-top: 1px dotted #888;
    padding-top: 10px;
}

/* --- 文字装飾クラス --- */
.highlightO { color: #ff7f50; font-weight: bold; }
.highlightB { color: #0000ff; font-weight: bold; }
.text-bold  { font-weight: bold; }


/* =========================================
 * 2. ヘッダー・見出し (Header & Headings)
 * ========================================= */
h1 {
    color: #000033;
    font-size: 24px;
    text-align: center;
    border-bottom: 1px dotted #888;
    padding-bottom: 10px;
}

/* ロゴ画像のサイズ調整 */
h1 img {
    width: 500px; /* PCでの基本サイズ */
    height: auto;
}

h2 {
    color: #000033;
    border-bottom: 1px solid #444;
    padding-bottom: 5px;
}


/* =========================================
 * 3. ナビゲーション (Navigation)
 * ========================================= */
nav {
    /* 固定表示の設定 */
    position: sticky;
    top: 0;
    z-index: 1000;
    
    /* 見た目の設定 */
    text-align: center;
    margin-bottom: 20px;
    background-color: #ffffff;
    border-bottom: 2px solid #ff7f50;
    padding: 10px 0;
}

nav a {
    color: #0000ff;
    text-decoration: none;
    margin: 0 15px;
    font-weight: bold;
}

nav a:hover {
    color: #ff7f50;
    text-decoration: underline;
}


/* =========================================
 * 4. セクション共通設定 (Scroll Offset)
 * ========================================= */
/* ページ内リンクでメニューに隠れないようにする調整 */
section {
    padding-top: 60px;
    margin-top: -60px;
    margin-bottom: 50px;
    border-bottom: 1px dashed #ccc;
    padding-bottom: 50px;
}

section:last-of-type {
    border-bottom: none;
}


/* =========================================
 * 5. 各ページ・パーツのスタイル
 * ========================================= */

/* --- TOP画像 --- */
#top_image {
    text-align: center;
    margin: 10px 0 20px 0;
}
#top_image img {
    width: 100%; 
    height: auto;
    display: block;
}

/* --- 更新履歴ボックス (Update Box) --- */
.update-box {
    width: 100%;
    height: 300px;
    background-color: #f0f0f0;
    border: 1px solid #dddddd;
    color: #333333;
    font-size: 14px;
    padding: 10px 15px;
    box-sizing: border-box;
    margin-top: 20px;
}
.update-box h3 {
    color: #444444;
    font-size: 16px;
    font-weight: bold;
    border-bottom: 1px dotted #666;
    padding-bottom: 5px;
    margin: 0 0 10px 0;
}
.update-list { height: 230px; overflow-y: auto; padding-right: 10px; }
.update-list ul { list-style-type: none; padding: 0; margin: 0; }
.update-list li { padding: 6px 0; border-bottom: 1px dashed #333; }
.update-list .date { color: #444444; margin-right: 10px; }

/* --- ブログ (Blog) --- */
.blog-article {
    background-color: #f0f0f0;
    border: 1px solid #dddddd;
    padding: 15px;
    margin-bottom: 25px;
}
.blog-header {
    border-bottom: 1px dashed #666;
    margin-bottom: 10px;
    padding-bottom: 5px;
}
.blog-title {
    font-size: 18px;
    font-weight: bold;
    color: #000033;
}
.blog-date {
    font-size: 12px;
    color: #666;
    margin-left: 10px;
}
.blog-body {
    line-height: 1.6;
    font-size: 14px;
}

/* --- キャラクター (Character) --- */
.char-profile {
    background-color: #f0f0f0;
    border: 1px solid #dddddd;
    padding: 15px;
    margin-bottom: 20px;
    overflow: auto; /* 画像回り込み解除用 */
}
.char-profile img {
    float: left;
    width: 250px;
    height: 250px;
    background-color: #333;
    border: 1px solid #555;
    margin-right: 20px;
}
.char-profile h3 { color: #ff7f50; margin-top: 0; font-size: 20px; }
.char-profile h4 { color: #0000ff; margin-top: 0; font-size: 20px; }

/* --- ギャラリー (Gallery - Flexbox版) --- */
.gallery-container {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
    text-align: center;
}
.gallery-item {
    width: 33.33%; /* PCでは3列 */
    padding: 10px;
    box-sizing: border-box;
}
.gallery-item img {
    width: 100%;
    max-width: 250px;
    height: auto;
    border: 1px solid #555;
    background-color: #333;
    margin-bottom: 5px;
}
/* サムネイルのホバー効果 */
.gallery-thumb { cursor: pointer; transition: opacity 0.2s; }
.gallery-thumb:hover { opacity: 0.8; }


/* --- スペック表 (Spec) --- */
.spec-table {
    width: 100%;
    background-color: #f0f0f0;
    border: 1px solid #444;
    border-collapse: collapse;
}
.spec-table th, .spec-table td {
    border: 1px solid #dddddd;
    padding: 12px;
    font-size: 14px;
}
.spec-table th {
    width: 30%;
    background-color: #f0f0f0;
    color: #444;
    text-align: left;
}

/* --- リンク (Links) --- */
.link-section {
    background-color: #f0f0f0;
    border: 1px solid #dddddd;
    padding: 15px;
    margin-bottom: 20px;
}
.link-section h3 {
    color: #444;
    font-size: 16px;
    font-weight: bold;
    border-bottom: 1px dotted #666;
    padding-bottom: 5px;
    margin: 0 0 10px 0;
}
.link-section ul { list-style-type: none; padding: 0; margin: 0; }
.link-section li { padding: 8px 0; border-bottom: 1px dashed #333; font-size: 14px; }
.link-section li:last-child { border-bottom: none; }
.link-section li a { color: #0000ff; text-decoration: none; font-weight: bold; }
.link-section li a:hover { color: #ff7f50; text-decoration: underline; }
.link-desc { color: #333333; }

/* バナー配布エリア */
.banner-area {
    margin-top: 15px;
    padding: 10px;
    background-color: #e9e9e9;
    border: 1px inset #fff;
}
.banner-img { margin-bottom: 10px; }
.banner-img img { max-width: 100%; height: auto; border: 1px solid #333; }
.link-code {
    width: 95%;
    height: 60px;
    background-color: #fff;
    border: 1px solid #999;
    color: #333;
    font-family: monospace;
    font-size: 12px;
    padding: 5px;
    resize: none;
}


/* =========================================
 * 6. ライトボックス (Lightbox - PC/スマホ共通)
 * ========================================= */
#lightbox {
    position: fixed;
    z-index: 2000; /* nav(1000)より上に */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    display: none; /* 初期状態は非表示 */
    align-items: center;
    justify-content: center;
}
#lightbox.show { display: flex; }

#lightbox-content {
    position: relative;
    width: auto;
    height: auto;
    max-width: 90vw;
    max-height: 90vh;
    
    /* ▼▼▼ 変更点 ▼▼▼ */
    background-color: #ffffff; /* 背景を「黒(#000)」から「白(#ffffff)」に変更 */
    border: 3px solid #555555; /* 背景が白だと枠線が見えなくなるので、「白(#fff)」から「濃いグレー(#555555)」に変更 */
    /* ▲▲▲ 変更点 ▲▲▲ */
    
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
}

#lightbox-image {
    max-height: 85vh; /* 画面からはみ出さない制限 */
    max-width: 85vw;
    width: auto;
    height: auto;
    display: block;
}

#lightbox-close {
    position: absolute;
    top: -18px;
    right: -18px;
    color: #fff;
    font-size: 30px;
    font-weight: bold;
    cursor: pointer;
    background-color: #000;
    border: 2px solid #fff;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    line-height: 28px;
    text-align: center;
}
#lightbox-close:hover { color: #ccc; }


/* =========================================
 * 7. スマートフォン表示用 (Mobile)
 * ========================================= */
@media (max-width: 900px) {
    
    /* --- レイアウト調整 --- */
    body { background-color: #2a2a2a; } /* スマホ背景 */
    
    #wrapper {
        width: 100%;
        margin: 0;
        padding: 10px;
        border: none;
    }

    h1 { font-size: 20px; }
    #top_image { margin: 5px 0 15px 0; }

    /* --- ナビゲーション (タイル状配置) --- */
    nav {
        display: flex;
        flex-wrap: wrap;
        padding: 0;
        background-color: #fff;
    }
    nav a {
        width: 25%; /* 1段目は4つ */
        margin: 0 !important; /* PCの余白を強制解除 */
        padding: 10px 0;
        font-size: 11px;
        border-bottom: 1px dotted #ccc;
        border-right: 1px dotted #ccc;
        box-sizing: border-box;
        text-align: center;
        display: block; 
    }
    /* 2段目（5個目以降）は3つ並び */
    nav a:nth-child(n+5) {
        width: 33.33%;
        border-bottom: none;
    }
    /* 右端の線を消す処理 */
    nav a:nth-child(4n), nav a:last-child {
        border-right: none;
    }

    /* --- 各コンテンツのスマホ対応 --- */
    
    /* キャラクター：縦積み */
    .char-profile img {
        float: none;
        width: 100%;
        height: auto;
        margin-right: 0;
        margin-bottom: 10px;
    }

    /* ギャラリー：縦積み (1列) */
    .gallery-item {
        width: 100%; 
    }
    .gallery-item img {
        max-width: 80%;
    }

    /* スペック表 */
    .spec-table th { width: 40%; }
    .spec-table th, .spec-table td { padding: 8px; font-size: 12px; }

    /* ライトボックス閉じるボタン (内側に配置) */
    #lightbox-close {
        top: -15px;
        right: -15px;
        background-color: #ff7f50;
        border: 2px solid #fff;
        color: #fff;
        width: 36px;
        height: 36px;
        line-height: 32px;
        font-size: 24px;
    }
}