body {
    background-color:#e3bd7d;
    margin: 0;
    font-family: Arial, sans-serif;
}
.background {
    position: relative;
    width: calc(100% - 40px);
    max-width: 1800px;
    height: 100%;
    margin: 7px;
    padding: 8px;
    background-color: #606060;
    border: 1px solid#303030; 
    border-radius: 10px; 
    box-shadow: 8px 8px 3px grey;
    color: white;
    font-size: 16px;
}
.nav-panel {
    min-height: 28px;
    width: calc(100% - 10px);
    margin-bottom: 6px;
    padding: 0 5px;
    background-color: #404040;
    border-radius: 5px;
    font-size: 14px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.nav-panel a:link,
.nav-panel a:visited {
    color: white;
}
.pic-pos,
.folder-pos {
    font-weight: normal;
    font-size: 12px;
    margin-left: auto;
    margin-right: 3px;
}
.button-list {
    width: 140px;
    display: flex;
    justify-content: space-between;
    padding-right: 5px;
}
.nav-panel svg.icon {
    display: inline-block;
    height: 20px;
    width: 20px;
    padding: 1px 0;
    text-align: center;
    font-style: normal;
    color: #8699C1;
    background-color: #D0D0D0;
    border: 1px solid #A0A0A0;
    border-radius: 5px;
    cursor: default;
}
.nav-panel svg.on.icon {
    background-color: #909090;
    border-color: #707070;
}
.nav-panel a svg.icon,
.nav-panel svg.on.icon,
.nav-panel svg.off.icon {
    color:#394b6f;
}
.nav-panel a svg.icon:hover,
.nav-panel svg.icon.off:hover {
    background-color: #C0C0C0;
    border-color: #909090;
}
.tiles {
    width: calc(100% + 12px); /* no idea where the two pixels added to the right negative margin come from */
    clear: both;
    display: flex;
    flex-wrap: wrap;
    margin: 1em -10px -10px 0;
}
.folder-title,
.tile {
    border: 2px solid #303030;
    border-radius: 5px;
    padding: 5px;
}
.tile>a {
    display: block;
    height: 100%;
    min-height: 123px; /* height plus vertical margin and border of img */
    width: 100%;
    text-decoration: none;
}
.folder-title {
    min-height: 123px; /* height plus vertical margin and border of img */
    background-color: #484848;
}
.tile {
    width: calc(100% - 26px); /* again no idea why 2 pixels more than margin plus padding plus border */
    margin: 0 10px 10px 0; /* for the "grid gutter" */
}
@media(min-width: 770px) {
    .tile {
        width: calc(50% - 25px);
    }
}
@media(min-width: 1130px) {
    .tile {
        width: calc(33.3333333% - 24.6666667px);
    }
}
@media(min-width: 1490px) {
    .tile {
        width: calc(25% - 24.5px);
    }
}
@media(min-width: 1850px) {
    .tile {
        width: calc(20% - 24.4px);
    }
}
.folder-title:after,
.background:after,
.tiles:after {
    content: "";
    clear: both;
    visibility: hidden;
    display: block;
}
.folder-title img,
.tile img {
    float: left;
    width: 150px;
    height: auto;
    border: 2px solid #303030;
    margin-right: 10px;
    margin-bottom: 7px;
}
.tile svg.icon {
    float: right;
    height: 20px;
    width: 20px;
    padding: 1px 0;
    margin: 0 3px 0 5px;
    text-align: center;
    font-style: normal;
    color: white;
}
.stats {
    float: right;
    margin-top: 7px;
    font-size: 12px;
    color: #E0E0E0;
}
.photo img,
.photo video {
    float: left;
    width: calc(100% - 4px);
    max-width: calc(120vh - 55px); /* on small screen in landscape mode, limit height! */
    height: auto;
    border: 2px solid #303030;
    border-radius: 5px;
    margin-right: 15px;
    margin-bottom: 8px;
}
@media (min-width: 1085px) {
    .photo img,
    .photo video { /* limit picture size */
        width: 1024px;
        height: auto;
    }
}
.descr {
    color: white;
    font-size: 16px;
}
.descr h3 {
    margin: 0 0 0.5em;
    font-size: 19px;
}
.tile .descr {
    font-size: 14px;
}
.tile .descr h3 {
    font-size: 17px;
}
.folder-title .descr,
.tile .descr {
    max-width: calc(164px + 90ex); /* avoid unreadable long lines! */
}
.background>.descr {
    max-width: calc(120vh - 55px + 19px + 90ex);
}
@media screen and (max-width: 1299px) and (max-aspect-ratio: 32/19) { /* aspect-ratio is not ideal, but an estimate, and avoids max-height: calc(75vw - 192px) which is not accepted by browsers */
    .background>.descr { /* show text below picture if not enough width available */
        clear: both;
        margin-top: 12px;
        float: left;
        max-width: 90ex;
    }
}
.lang_link {
    position: absolute;
    top: 5px;
    right: 5px;
}
.lang_link img {
    width: 40px;
    height: 20px;
}
.footer-left {
    float: left;
    margin: 5px 0 9px 9px;
}
.footer-right {
    float: right;
    margin: 5px 9px 9px 0;
}

