::-webkit-scrollbar {
    width: .6em;
}

h5 {
    margin-bottom: .6em;
    position: sticky;
    top: 0;
    z-index: 4;
    display: inline-block;
}

#gallery-wrapper > div {
    border-bottom: 1px dashed var(--border);
    margin-bottom: .6em;
    padding-bottom: .6em;
}

#gallery-wrapper > div:nth-last-child(1) {
    border-bottom: 0;
    margin-bottom: unset;
    padding-bottom: unset;
}

.bg {
    border: 1px solid var(--border);
    border-right: 0;
    padding-right: 0;
}

.bg2 {
    border: 1px solid var(--border);
}

.badge {
    outline: 1px solid var(--darkgreen);
    border: 2px solid var(--green);
    background: var(--secondarybg);
    color: var(--text);
    padding: .2em .4em;
}

#side-bg {
    height: 60px;
    box-shadow: none;
    border-bottom: 0;
}

nav {
    align-items: center;
}

nav img {
    max-width: 100%;
    margin-inline: auto;
    display: block;
    margin-bottom: .6em;
}

#sort > .nav-item {
    border: 1px solid var(--border);
}

#sort > .nav-item:nth-child(n+1):nth-child(-n+4) {
    border-bottom: 0;
}

.fa-ul {
    align-self: flex-start;
}

#sort {
    display: flex;
    flex-flow: column nowrap;
    width: 100%;
    padding: 0;
    margin: 0;
    list-style-type: none;
}

#warning b {
    color: inherit;
}

#warning p > .fas {
    margin-right: .4em;
}

.flex-item {
    min-width: 0;
}

.carousel-inner {
    overflow: unset;
}

#va:hover {
    color: var(--darkgreen);
}

.col-3 > p {
    text-align: center;
}

/* controls */
#controls {
    display: flex;
    align-items: center;
    margin-top: .6em;
    gap: 1em;
    user-select: none;
    -webkit-user-drag: none;
}

.carousel-control-prev,
.carousel-control-next {
    position: unset;
    opacity: unset;
    color: inherit;
}

.carousel-control-prev:focus,
.carousel-control-next:focus {
    color: unset;
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
    color: var(--darkgreen)
}

#gallery-wrapper {
    display: flex;
    flex-flow: column nowrap;
    justify-content: start;
    overflow-y: auto;
    overflow-x: hidden;
    flex: 1 1 0;
}

.gallery {
    max-width: 100%;
    display: flex;
    flex-flow: row wrap;
    justify-content: center;
    gap: .5em;
    padding: 0;
}

.gallery div, .gallery a {
    flex: 0 0 32%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    padding: 0;
    border: 0;
    background: transparent;
}

.gallery img {
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border: 0;
    padding: 0;
    user-select: none;
    -webkit-user-drag: none;
    opacity: 1;
}

.gallery img:hover {
    border: 1px solid var(--green);
}

.filterDiv {
    display: none;
}

.show {
    display: inherit;
}

summary {
    user-select: none;
}

details>summary {
    list-style: none;
}

summary::-webkit-details-marker {
    display: none
}

summary::after {
    content: '\f105';
    font-family: "Font Awesome 5 Free";
    font-weight: 600;
    margin-left: .4em;
}

details[open] summary:after {
    content: '\f107';
    font-family: "Font Awesome 5 Free";
    font-weight: 600;
    margin-left: .4em;
}

.fancybox__slide.has-caption {
    flex-flow: column nowrap;
    word-break: break-word;
}

.fancybox__caption {
    max-width: 60%;
    text-align: center;
    font-size: 8pt;
    margin-top: 1em;
    outline: 1px solid var(--darkgreen);
    border: 2px solid var(--green);
    background: var(--secondarybg);
    color: var(--text);
    padding: .4em .6em;
    border-radius: .8em;
}

.fancybox__backdrop {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    z-index: -1;
    background: rgba(224, 199, 152, 0.8);
}

.fancybox__container {
    padding: 6em;
    --fancybox-color: white;
}

.fancybox__toolbar,
.fancybox__nav {
    --f-button-color: var(--darkgreen);
    --f-button-hover-color: var(--green);

    --f-button-bg: none;
    --f-button-hover-bg: none;
    --f-button-active-bg: none;

    --f-button-svg-width: 30px;
    --f-button-svg-height: 30px;

    --f-button-svg-stroke-width: 4;
    --f-button-svg-filter: none;
}

.fancybox__toolbar__column.is-left {
    padding: 0 .6em;
    margin: 0;
}

.fancybox__content {
    opacity: 1;
}

iframe {
    flex: 1 1 0;
    overflow-y: auto;
    margin: 0;
    padding: 0;
    border: none;
}

/* content warnings */
.gore:before, .nudity:before {
    font-family: "Font Awesome 5 Free";
    font-weight: 600;
    content: "\f071";
    position: absolute;
    left: 0; 
    right: 0;
    top: 0; 
    bottom: 0;
    background: var(--red);
    opacity: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20pt;
    color: var(--bg);
    pointer-events: none;
    z-index: 3;
}

.gore:after, .nudity:after {
    backdrop-filter: blur(4px); /* Supported in all major browsers */
    content: "";
    display: block;
    position: absolute;
    width: 100%; height: 100%;
    top: 0;
    pointer-events: none;
}

.gore:hover:before, .nudity:hover:before {
    font-family: monospace;
    content: "gore";
    position: absolute;
    left: 0; 
    right: 0;
    top: 0; 
    bottom: 0;
    background: rgba(248, 124, 115, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10pt;
    pointer-events: none;
    border: 1px solid var(--darkgreen);
    z-index: 3;
}

.nudity:hover:before {
    content: "nudity";
}

.multi:before {
    font-family: "Font Awesome 5 Free";
    font-weight: 600;
    content: "\f302";
    position: absolute;
    left: 0; 
    right: 0;
    top: 0; 
    bottom: 0;
    opacity: 1;
    display: flex;
    align-items: end;
    justify-content: right;
    font-size: 12pt;
    color: var(--bg);
    pointer-events: none;
    z-index: 3;
    padding: .2em .4em;
}

.multi:hover:before {
    border: 1px solid var(--green);
}