@charset "utf-8";
/* ============================================================
   Gallery（アルバム）PC用CSS
   design60 の album.css をベースに、index.html（design64）の
   レイアウトへ載せられるよう調整したもの。

   ・design60 の .wrap は使わず、design64 の .pageWrap をそのまま使用
   ・design60.css は読み込まない（h1/h2/h3 等が index と食い違うため）
   ・ブレイクポイントは design64.css に合わせて 699px / 700px
   ============================================================ */


/* アンカーで飛んだとき、上に少し余白を残す */
*[id] {
    scroll-margin-top: 5vh;
    scroll-snap-margin-top: 5vh;/* safari用 */
}


/* ---------- セクションまわり ---------- */

.gallerySection {
    padding: 6vh 0 0;
}
.galleryNote {
    padding: 1.2em 2em;
    margin: 2em 0 0;
    background: #f4f4f4;
    border-radius: 4px;
    font-size: .95em;
    text-align: left;
}
.galleryNote p {
    padding: 0;
}
.galleryNote em {
    background: #d6d6d6;
    font-style: normal;
}


/* ---------- 一覧部分（クリック前） ---------- */

.album {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    padding-left: calc(12% / 4);/* 下記liの右マージンと同じ幅の余白 */
    margin: 3vh auto 6vh;
}
.album li {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    margin: 0 calc(12% / 4) 2em 0;
    width: 22%;/* 横4列。design60どおり6列にするなら 15% ／ 上下のcalcを (10% / 6) に */
    border-radius: 4px;
    cursor: zoom-in;
    overflow: hidden;
}
.thumb {
    display: flex;
     justify-content: center;
     align-items: center;
    width: 100%;
    aspect-ratio: 1 / 1;/* サムネイルは正方形。縦長にするなら 3 / 4 など */
    background: #f4f4f4;/* 透過PNGの下地 */
    border-radius: 4px;
    overflow: hidden;
}
.thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;/* 全身を切らずに表示。顔アップ寄せにするなら cover ＋ 下行を有効化 */
    /* object-position: center top; */
    transition: transform .4s;
}
.album li:not(.active):hover .thumb img {
    transform: scale(1.06);
}
.illustTitle {
    padding: .6em .2em 0;
    width: 100%;
    color: #999999;
    font-size: .9em;
    line-height: 1.5;
    text-align: center;
    /* 一覧にタイトルを出したくない場合は display: none; を追記 */
}
.link {
    display: none;
}


/* ---------- 拡大表示時 ---------- */

li.active {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    position: fixed;
     top: 0;
     left: 0;
    padding: 0;
    margin: 0;
    width: 100vw;
    height: 100vh;
    max-height: 100vh;
    background: rgba(0,0,0,.92);
    border-radius: 0;
    box-sizing: border-box;
    cursor: auto;
    overflow: hidden;
    z-index: 5;/* design64 の .scrollTop（z-index:2）より上 */
}
li.active .thumb::before {
    content: '閉じる ×';
    display: block;
    position: absolute;
     top: 1.5em;
     right: 8%;
    padding: 1em 2em;
    color: #ffffff;
    cursor: pointer;
    font-size: 1.2em;
    z-index: 2;
}
.active .thumb {
    justify-content: center;
    align-items: center;
    flex-basis: 70%;
    width: auto;
    height: 100%;
    aspect-ratio: auto;
    background: transparent;
    border-radius: 0;
}
.active .thumb img {
    width: auto;
    max-width: 68vw;
    height: auto;
    max-height: 78vh;
    object-fit: contain;
    transform: none;
    animation: fadeIn .8s;
}
.active .illustTitle {
    box-sizing: border-box;
    order: 1;
    position: absolute;
     bottom: 0;
     left: 0;
    padding: 1.5em 1em;
    width: 100%;
    background: transparent;
    color: #dbdbdb;
    font-size: 1em;
    text-align: center;
}
@keyframes fadeIn {
    from {
        opacity: .3;
    }
    to {
        opacity: 1;
    }
}


/* ---------- 戻る／次へリンク ---------- */

.active .link {
    flex-grow: 1;
    visibility: visible;
    display: block;
    padding: 15% 5%;
    background: url('../img/album.svg') center / auto no-repeat;
    cursor: pointer;
    opacity: .5;
    transition: opacity .3s;
}
.active .link:hover {
    opacity: 1;
}
.active .prev {
    transform: rotate(180deg);
}
.album li:first-of-type .prev {
    visibility: hidden;
}
.album li:last-of-type .next {
    visibility: hidden;
}


/* 拡大表示中は背面をスクロールさせない */
body.albumOpen {
    overflow: hidden;
}
