/* 基本リセット */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "Yu Gothic", YuGothic, sans-serif;
    background-color: #ffffff;
    color: #333333;
    display: flex;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

/* サイドバー（PC表示） */
.sidebar {
    width: 240px;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    padding: 60px 40px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background-color: #ffffff;
    z-index: 100;
}

.nav-links {
    list-style: none;
    margin-top: 40px;
}

.nav-links li {
    margin-bottom: 14px;
    font-size: 12px;
    letter-spacing: 0.1em;
}

.nav-links a:hover {
    color: #333 !important;
}

/* メインコンテンツエリア（PC表示） */
.content-area {
    margin-left: 240px;
    flex: 1;
    padding: 60px 60px 100px 40px;
}

/* 写真グリッド（PC表示） */
.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 40px 30px;
    align-items: start;
}

.grid-item img {
    width: 100%;
    height: auto;
    display: block;
    transition: opacity 0.25s ease;
}

.grid-item img:hover {
    opacity: 0.85;
}

.grid-item p {
    margin-top: 10px;
    font-size: 10px;
    color: #999999;
    letter-spacing: 0.08em;
}

/* ライトボックス（拡大表示） */
#lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(255, 255, 255, 0.96);
    justify-content: center;
    align-items: center;
    z-index: 1000;
    cursor: pointer;
}

#lightbox img {
    max-width: 90vw;
    max-height: 88vh;
    object-fit: contain;
}

.nav-btn {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    color: #666;
    padding: 20px;
    cursor: pointer;
    user-select: none;
    z-index: 1001;
}

#prev-btn { left: 20px; }
#next-btn { right: 20px; }

/* =========================================
   スマホ・タブレット用レイアウト（画面幅 768px 以下）
   ========================================= */
@media (max-width: 768px) {
    body {
        flex-direction: column;
    }

    /* サイドバーを上部のすっきりしたヘッダーに変更 */
    .sidebar {
        position: static;
        width: 100%;
        height: auto;
        padding: 28px 20px 20px 20px;
        border-bottom: 1px solid #f2f2f2;
    }

    .sidebar-bottom {
        display: none;
    }

    .nav-links {
        margin-top: 18px;
        display: flex;
        flex-direction: row;
        gap: 22px;
    }

    .nav-links li {
        margin-bottom: 0;
        font-size: 12px;
    }

    /* メインエリアの左余白を解除し、画面幅いっぱいに使う */
    .content-area {
        margin-left: 0;
        padding: 28px 20px 60px 20px;
        width: 100%;
    }

    /* 写真を大きく見せる1列表示 */
    .grid-container {
        grid-template-columns: 1fr;
        gap: 36px;
    }

    /* Info / Archive の上余白をスマホ向けに詰める */
    .content-area > div {
        margin-top: 20px !important;
    }

    /* 拡大表示時の操作ボタン調整 */
    #lightbox img {
        max-width: 94vw;
        max-height: 82vh;
    }

    .nav-btn {
        padding: 12px;
        font-size: 16px;
    }

    #prev-btn { left: 6px; }
    #next-btn { right: 6px; }
}