@charset "utf-8";
/* ============================================================
   Gallery（アルバム）モバイル用CSS（699px以下）
   design60 の album_mobile.css がベース。
   design64.css の @media (max-width:699px) と対になる想定。
   ============================================================ */


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


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

.gallerySection {
    padding: 3vh 0 0;
}
.galleryNote {
    padding: 1em;
    margin: 1.5em 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(10% / 2);/* 下記liの右マージンと同じ幅の余白 */
    margin: 2vh auto 4vh;
}
.album li {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    margin: 0 calc(10% / 2) 1.5em 0;
    width: 45%;/* 横2列。3列にするなら 30% ／ 上下のcalcを (10% / 3) に */
    border-radius: 4px;
    cursor: zoom-in;
    overflow: hidden;
}
.thumb {
    display: flex;
     justify-content: center;
     align-items: center;
    width: 100%;
    aspect-ratio: 1 / 1;
    background: #f4f4f4;
    border-radius: 4px;
    overflow: hidden;
}
.thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    /* object-position: center top; */
}
.illustTitle {
    padding: .5em .2em 0;
    width: 100%;
    color: #999999;
    font-size: .9em;
    line-height: 1.5;
    text-align: center;
}
.link {
    display: none;
}


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

li.active {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: stretch;
    position: fixed;
     top: 0;
     left: 0;
    padding: 2em 1em;
    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;
}
li.active .thumb::before {
    content: '×';
    display: block;
    position: absolute;
     top: 0;
     right: 5%;
    padding: .5em 1em;
    color: #ffffff;
    cursor: pointer;
    font-size: 2em;
    z-index: 2;
}
.active .thumb {
    order: -2;
    flex-basis: 100%;
    margin-top: 8%;
    padding: 0;
    width: 100%;
    height: 70%;
    min-height: 60%;
    aspect-ratio: auto;
    background: transparent;
    border-radius: 0;
    box-sizing: border-box;
}
.active .thumb img {
    width: auto;
    max-width: 88vw;
    height: auto;
    max-height: 60vh;
    object-fit: contain;
    animation: fadeIn .8s;
}
.active .illustTitle {
    box-sizing: border-box;
    order: -1;
    padding: 1em;
    width: 100%;
    background: transparent;
    color: #e0dbce;
    font-size: 1em;
}
@keyframes fadeIn {
    from {
        opacity: .3;
    }
    to {
        opacity: 1;
    }
}


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

.active .link {
    flex-grow: 1;
    align-self: flex-end;
    visibility: visible;
    display: block;
    padding: 2em;
    width: 50%;
    background: url('../img/album.svg') center / 2em no-repeat;
    cursor: pointer;
    opacity: .6;
    box-sizing: border-box;
}
.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;
}
