* { box-sizing: border-box; }
html { 
    --thumbs_bg: rgb(152,13,13,0.9);
    --css_version: "1.1";
}
body {
    margin: 0; padding: 0; height: 100%; width: 100%; 
    /* Set the height to match that of the viewport. */
    height: 100vh;

    /* Set the width to match that of the viewport. */
    width: 100vw;
    font-family:arial; background-color: black;
}
header {
    position: absolute; top: calc(50% - 20px); left: 0; right: 0;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px;
    background-color: rgba(152,13,13,0.8);
    border-left: 2px solid rgb(225,163,133); 
    border-bottom: 2px solid rgb(234,136,151); 
    box-shadow: 0 2px 5px #555;
    z-index:10;
    opacity: 0;
    visibility: hidden;
}
header h1 {color: white; font-size: 12pt;}
body.header-visible header {
    opacity: 1;
    visibility: visible;
}
body.header-visible.loaded header {
    animation: showHeader 2s forwards;
}
#hourglass {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: black;
    z-index: 20;
}
#hourglass img {
    width: min(33vh, 33vw);
    height: auto;
    animation: blinkHourglass 1s infinite ease-in-out;
}
body.loaded #hourglass {
    display: none;
}

body.loaded #hourglass {
    display: none;
}
main {
    min-height: 100%;
    position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    display: flex; align-items: center; justify-content: center;
    z-index: 1;
    background-color: black;
}

#thumb-toggle {
    position: fixed;
    top: 50%;
    right: 0;
    width: 32px;
    height: 64px;
    padding: 0;
    border: 2px inset rgb(225,163,133);
    border-right: 0;
    border-radius: 6px 0 0 6px;
    background: var(--thumbs_bg);
    color: white;
    cursor: pointer;
    font-size: 20px;
    transition: right 200ms ease-in-out;
    z-index: 12;
}
aside {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 200px; border-left: 5px inset var(--thumbs_bg);
    padding: 0;
    overflow-y: auto;
    background: var(--thumbs_bg);
    transform: translateX(100%);
    transition: transform 200ms ease-in-out;
    z-index: 11;
}
body.thumbs-open aside {
    transform: translateX(0);
}
body.thumbs-open #thumb-toggle {
    right: 200px;
}
aside > img {
    display: block;
    margin: 0 0 10px;
    border-radius: 8px;
    background: #d8d0bd;
    box-shadow: 1px 2px 3px rgba(0,0,0,0.65), inset 0 0 0 1px #f4eedf;
    cursor: pointer;
    object-position: center;
}
aside > img.current {
    border-color: rgb(234,136,151);
    box-shadow: 0 0 0 2px rgb(234,136,151), 1px 2px 3px rgba(0,0,0,0.65);
}
img {position:relative; margin:0 0 0 0}
@media screen and (orientation: landscape) {
    main img {max-height:100%}
}
@media screen and (orientation: portrait) {
    main img {max-width:100%}
}
@keyframes showHeader {
    0%, 90% { opacity: 1; visibility: visible; }
    100% { opacity: 0; visibility: hidden; }
}
@keyframes shiftMain {
    0%, 90% { top: 40px; }
    100% { top: 0; }
}
@keyframes blinkHourglass {
    0%, 100% { opacity: 0.2; }
    50% { opacity: 0.8; }
}
