html {
    height: 100%;
    background-color: #f2f2f2; 
}
body {
    height: 100%;
}
body > header {
    padding:0;
    background-color: #ddd;
}
nav .logo {
    margin: 0;
    padding-left: 28px;
    font-size: 1.3em;
    background-image: url(family-gallery-invert-icon01.png);
    background-position: left center;
    background-size: 12%;
}
nav .logo a:hover {
    text-decoration: none;
}
nav li {
    /* height: 100%; */
}
nav .menu_items li {
    align-items: center;
}
nav .menu_items li a {
    color: #222;
    text-decoration: none;
}
nav .menu_items li:hover {
    background-color: #ccc;
}
nav .active {
    background-color: #ccc;
}

h1 {
    margin-top: 1em;
/*    color: #0f0;*/
}

p.hilite {
    color: #f00;
}

#params {
    display: none;
}
#params.visible {
    display: block;
}
.gear {
    font-size: 0.6em;
    vertical-align: top;
    cursor: pointer;
}
.btn_close {
    display: inline-block;
    padding: 0 0.1em 0.1em 0.1em;
    font-size: 1.2em;
    font-weight: bold;
    line-height: 1;
    color: #333;
    text-decoration:none;
}
.btn_close:hover {
    color: #ccc;
    background-color: #333;
}

option {
    padding: 0.5em 0;
}

.img_grid {
    width: 100%;
/*    margin: 1em 0;*/
    display:flex;
    flex-wrap: wrap;
    align-content: center;
    align-items: center;
    gap: 5px;
/*   justify-content: space-between;*/
    text-align: center;
    
    display: grid; 
    grid-template-columns: repeat(3, 1fr);
}

.slide {
    width:30%;
    aspect-ratio:1/1;
    text-align:center;
    display:flex;
    flex-direction: column;
    align-content: center;
    align-items: center;
    justify-content: center;
    background-color:#fff;
    border: 1px #ddd solid;
    border-radius: 5px;
    overflow-x: hidden;

    width: 100%; /* grid */
    height: 100%;
}
.slide:hover {
    transform: scale(1.5);
    transition: all 0.5s ease-in-out;
    border: 1px #aaa solid;
    box-shadow: 0px 5px 10px rgba(0,0,0, 0.4);
}
.slide.showmore {
    border: none;
}
.slide.showmore:hover {
    background-color:#ddd;
    transform: none;
    transition: none;
    border: none;
    box-shadow: none;
}
.slide.showmore a {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: #888;
    text-decoration: none;
}
.slide.showmore:hover a {
    color: #333;
}
.slide img {
    max-width:90%;
    max-height:80%;
}
.slide img:hover {
    cursor: pointer;
}
.label {
    display: none;
    margin-top: 0.2em;
    font-size: 0.7em;
    line-height: 1.1;
}

@media screen and (min-width: 768px) {
    .img_grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 10px;
    }
    .slide {
        width:20%;

        width: 100%; /* grid */
    }
    .slide img {
        max-width:80%;
        max-height:72%;
   }
}
@media screen and (min-width: 1024px) {
    .img_grid {
        grid-template-columns: repeat(7, 1fr);
    }
    .slide {
        width:15%;

        aspect-ratio:1/1.1;
        width: 100%; /* grid */
    }
    .slide img {
        max-width:80%;
        max-height:72%;
   }
    .label {
       display: block;
       max-width: 80%;
   }
   fieldset.magicword {
       width: 30%;
   }
}
@media screen and (min-width: 1280px) {
    
}

.cluster {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    align-content: center;
    gap: 10px;
}
.cluster img {
    width: 20%;
    height: auto;
}
@media screen and (min-width: 1024px) {
    .cluster img {
        width: 15%;
        height: auto;
    }
}

#sld {
    position: fixed;
    top: 0; right: 0; bottom: 0;
    display: block;
    width: 90%;
    height: 100vh;
    padding: 1em;
    background-color: #eee;
    box-shadow: 0 0 30px rgba(0,0,0,0.6);
}
#sld.hidden {
    display: none;
}

@media screen and (min-width: 1024px) {
    #sld {
        width: 50%;
    }
}

#mask {
    position: fixed;
    top:0; right:0; bottom:0; left:0;
    height: 100%;
    display: flex;
/*    flex-direction: column;*/
    flex-direction: row;
/*    flex-wrap: wrap;*/
/*    align-content: center;*/
    align-content: space-between;
    justify-content: center;
    align-items: center;
    text-align: center;
    background-color: rgba(0,0,0, 0.85);
}
#mask.hidden {
    display: none;
}

#mask img {
    margin: 0 auto;
}
#mask img.hires {  /* mobile  */
/*    max-width: 65%;*/
/*    max-height: 90%;*/
    max-height: 95%;
    object-fit: contain;
}
@media screen and (min-width: 1024px) {
    #mask img.hires {
        /*max-width: 65%;
        max-height: 90%;*/
    }
}
#mask .i_n_c {
    display: flex;
    flex-direction: column;
    height: 97vh;
    width: 90vw;
    align-items: center;
    justify-content: center;
/*    border: 3px #f00 solid;*/
}

#mask .caption {
    font-size: 1em;
    color: #fff;
}
@media screen and (min-width: 1024px) {
    #mask .caption {
        font-size: 1.2em;
    }
}
#mask #closing_x {
    position: absolute;
    top: 20px; right: 20px;
    display: inline;
    font-size: 2em;
    font-weight: bold;
    line-height: 1;
    color: #bbb;
    text-decoration:none;
    background-color: transparent;
    border-width: 0;
}
#mask #closing_x:hover {
    color: #fff;
}

.sld_prev, .sld_next {
    display: inline-block;
/*    margin: 0 -2em;*/
    font-size: 2em;
    color: #eee;
/*    line-height: 5em;*/
    text-decoration: none; 
    text-shadow: 0 0 5px #000;
    z-index: 10;
/*    background-color: #f00;*/
    transform: translateY(-20%)
}
.sld_prev {
    margin-right: -0.4em;
}
.sld_next {
    margin-left: -0.4em;
}
@media screen and (min-width: 1024px) {
    .sld_prev, .sld_next {
        margin: 0 0;
        padding: 0 0.2em;
        font-size: 4em;
        line-height: 1;
        color: #bbb;
    }
}
.sld_prev:hover, .sld_next:hover {
    color: #fff;
}

.clusters > h3 {
    width: 100%;
    margin: 1.5em 0 1em;
    padding: 0.3em;
    text-align: left;
    background: #ddd;
    border-radius: 4px;
    cursor: pointer;
}
.img_grid > img {
    width: 10%;
    height: auto; 
}
h3.next_hidden + .cluster {
    display: none;
}


.smpl_toggle {
    font-weight: bold;
    cursor: pointer;
}
#sample span {
    margin-right: 0.5em;
}
#sample span:not(:first-child) {
    display: inline-block;
    color: #777;
}
#sample span:not(:first-child):hover {
    color: #000;
    cursor: pointer;
}
#sample .smpli.hidden {
    display: none;
}

.hidden {
    display: none;
}
