@charset "utf-8";
/* CSS Document */

/* 背景ぼかし用のコンテナ */
#main-content {
    transition: filter 0.3s ease;
}
.is-blurred {
    filter: blur(10px);
    pointer-events: none;
}

/* ギャラリー一覧 */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); 
    gap: var(--space-l);
    width: var(--width-space);
    max-width: var(--width-sub);
    margin: 0 auto calc(var(--space-xxl) *2);
    box-sizing: border-box;
}
.thumb { 
    cursor: pointer;
    overflow: hidden;
    border-radius: var(--radius-base);
    transition: 0.2s;
    width: var(--width-base);
}
.thumb:hover {
    transform: translateY(-5px);
}
.thumb img {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    display: block;
}
.thumb-title {
    padding: 10px;
    font-size: 0.9rem;
    text-align: center;
}

/* モーダル */
.modal-layer {
    display: none;
    position: fixed;
    inset: 0;
    background-color: color-mix(in srgb, var(--color-accent) 90%, transparent);
    z-index: 1002;
    justify-content: center; align-items: center; padding: 20px;
}
.modal-window {
    background: #252525; width: 100%; max-width: 1000px;
    max-height: 95vh; border-radius: 8px; position: relative;
    display: flex; flex-direction: column; overflow: hidden;
    box-shadow: 0 0 30px rgba(0,0,0,0.5);
}

/* メイン画像とフェードアニメーション */
.main-img-container {
    width: 100%;
    background: var(--color-dark);
    text-align: center;
    height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
}
#modal-img {
    max-width: 100%;
    max-height: 100%;
    transition: opacity 0.3s ease;
}
.modal-window {
    max-width: 1200px; /* 必要に応じて少し横幅を広げると迫力が出ます */
    width: 95%;        /* スマホ等でも左右の余白を最小限に */
}
.fade-out {
    opacity: 0;
}

@media screen and (max-width: 720px) {
    .main-img-container {
        height: 30vh;
    }
}

/* 差分サムネイル（横スクロール） */
.thumb-nav {
    display: flex;
    justify-content: center;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 10px;
    padding: var(--space-s);
    scrollbar-width: thin;
    height: 90px;
}
.thumb-nav::-webkit-scrollbar {
    height: 6px;
}
.thumb-nav::-webkit-scrollbar-thumb {
    background: #555;
    border-radius: 10px;
}
.nav-item {
    flex: 0 0 100px;
    height: 80px;
    object-fit: cover;
    cursor: pointer;
    opacity: 0.4;
    border: 2px solid transparent;
    transition: 0.2s;
    border-radius: 2px;
}
.nav-item.active {
    opacity: 1;
    border-color: var(--color-light);
}

/* テキストエリア */
.info-area {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
    background: var(--color-dark);
}
#modal-title {
    margin: 0 0 10px 0;
    border-left: 4px solid #fff;
    padding-left: 10px; font-size: 1.2rem;
}
#modal-desc {
    white-space: pre-wrap;
    line-height: 1.8;
    color: var(--color-light-sub);
    font-size: var(--font-size-base);
    margin: 0;
}

.close-btn {
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 35px;
    cursor: pointer;
    color: var(--color-light);
    z-index: 10;
    text-shadow: 0 0 10px #000;
}