:root {
    --primaryColor: #FE9634;
    --mehColor: #caa895;
    --borderColor: #b0876f;
    --bgColor: #17191f;
    --panelColor: #0b1117;
    --shadowColor: rgba(0,0,0,0.25);
    --scrollbarBorder: 0.5rem solid transparent;
    --scrollAnimation:0;
    --safariCheck:0;
    --asciiWidth: clamp(694px, 694px, 833px);
    --asciiMaxHeight: calc(100vh - 24.5rem);
    --mobileTopBarMarginTop: 0;
    --topBarHeight: 0;
    --contentHeight: 0;
    --promptHeight: 0;
    --promptInnerHeight: calc(var(--promptHeight) - (2.5rem + 4px));
    --fontSizeS: clamp(0.35rem, 0.4rem, 0.45rem);
    --fontSizeM: clamp(0.4rem, 0.5rem, 0.6rem);
    --fontSizeL: clamp(0.8rem, 1rem, 1rem);
}

@font-face {
    font-family: 'Cascadia Mono';
    src: url('./fonts/CascadiaMono.woff2') format("woff2");
}

@font-face {
    font-family: 'Inconsolata';
    src: url('./fonts/Inconsolata.woff2') format("woff2");
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeInDim {
    from {
        opacity: 0;
    }
    to {
        opacity: 0.3;
    }
}

@keyframes fadeInScale {
    0% {
        -webkit-transform: scale(0.25);
        transform: scale(0.25);
        opacity: 0.25;
    }
    33% {
        -webkit-transform: scale(0.5);
        transform: scale(0.5);
        opacity: 0.5;
    }
    66% {
        -webkit-transform: scale(0.75);
        transform: scale(0.75);
        opacity: 0.75;
    }
    100% {
        -webkit-transform: scale(1);
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes fadeInSlideLate {
    0% {
        opacity: 0;
        transform: translateY(-1.25rem) scaleX(0.999);
    }
    66% {
        opacity: 0;
        transform: translateY(-1.25rem) scaleX(0.999);
    }
    85% {
        opacity: 1;
        transform: translateY(0.25rem) scaleX(0.999);
    }
    95% {
        opacity: 1;
        transform: translateY(-0.15rem) scaleX(0.999);
    }
    100% {
        opacity: 1;
        transform: translateY(0rem) scaleX(0.999);
    }
}

@keyframes slideInRight {
    0% {
        transform: translateX(100%);
    }
    25% {
        transform: translateX(75%);
    }
    50% {
        transform: translateX(50%);
    }
    75% {
        transform: translateX(25%);
    }
    100% {
        transform: translateX(0%);
    }
}

@keyframes wiggle {
    0% {
        opacity: 0;
        margin-left: 4px;
    }
    33% {
        opacity: 0.5;
        margin-left: 0px;
    }
    66% {
        opacity: 1;
        margin-left: 4px;
    }
    100% {
        opacity: 1;
        margin-left: 0px;
    }
}

@keyframes pulse {
    0% {
        opacity: 0.25;
    }
    50% {
        opacity: 1;
    }
    100% {
        opacity: 0.25;
    }
}

@keyframes flipIn {
    0% {
        -webkit-transform: rotateY(0deg);
        transform: rotateY(0deg);
    }
    25% {
        -webkit-transform: rotateY(90deg);
        transform: rotateY(90deg);
    }
    50% {
        -webkit-transform: rotateY(180deg);
        transform: rotateY(180deg);
    }
    75% {
        -webkit-transform: rotateY(270deg);
        transform: rotateY(270deg);
    }
    100% {
        -webkit-transform: rotateY(360deg);
        transform: rotateY(360deg);
    }
}

/* loading spinner */
@keyframes lds-dual-ring {
    0% {
        -webkit-transform: rotate(0deg);
        transform: rotate(0deg);
    }
    100% {
        -webkit-transform: rotate(360deg);
        transform: rotate(360deg);
    }
}
/* Desktop */
.lds-dual-ring {
    display: inline-block;
    width: 2.5rem;
    height: 2.5rem;
    margin-right: 2px;
    animation: 0.2s ease-out 0s normal forwards 1 fadeInScale;
}

.lds-dual-ring:after {
    content: " ";
    display: block;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    border: 5px solid var(--primaryColor);
    border-color: var(--primaryColor) transparent var(--primaryColor) transparent;
    animation: lds-dual-ring 0.75s linear infinite;
    -webkit-filter: drop-shadow(0px 1px 0px var(--shadowColor));
    filter: drop-shadow(0px 1px 0px var(--shadowColor));
}
/* Mobile */
#scrollLoader {
    display: flex;
    visibility: hidden;
    width: 100vw;
    height: 50vh;
    position: fixed;
    z-index: 98;
    justify-content: center;
    align-items: center;
    align-content: center;
    pointer-events: none;
    touch-action: none;
    transform: translateX(100%);
    transition: transform ease-in 0.2s;
}

#loadingCardWrapper {
    display: flex;
    visibility: hidden;
    opacity: 0;
    background: var(--panelColor);
    border: 4px solid var(--borderColor);
    border-radius: 15px;
    padding: 1rem;
    width: 48vw;
    font-size: var(--fontSizeM);
    justify-content: center;
    align-items: center;
    overflow: hidden;
    transition: opacity 0.6s;
}

#loadingCard {
    width: auto;
    overflow: visible;
    padding: 0;
}
/* end loading spinner */

* {
    touch-action: pan-x pan-y; /*only allow scroll gestures*/
    -webkit-tap-highlight-color: transparent;
    outline: none;
} 

body {
    margin: 0;
    background: #0b1117;
    background: var(--bgColor);
    color: var(--primaryColor);
    font-family: 'Cascadia Mono';
    overflow: hidden;
    transition: background-color ease-in 0.2s;
    text-shadow: 0px 1px 1px var(--shadowColor);
    height: 100%;
}

html {
    height: -webkit-fill-available;
}

::-webkit-scrollbar-thumb {
    min-height: 50px;
    border: var(--scrollbarBorder);
    border-radius: 15px;
    background-color: var(--borderColor) !important;
    background-clip: padding-box;
    height: 0px !important;
}

::-moz-scrollbar-thumb {
    min-height: 50px;
    border: var(--scrollbarBorder);
    border-radius: 15px;
    background-color: var(--borderColor) !important;
    background-clip: padding-box;
    height: 0px !important;
}

::-webkit-scrollbar {
    width: 16px !important;
    height: 0px !important;
}

::-moz-scrollbar {
    width: 18px !important;
    height: 0px !important;
}

::selection {
    color: var(--mehColor) !important;
    background: rgba(255,255,255,0.2) !important;
}

::-moz-selection {
    color: var(--mehColor) !important;
    background: rgba(255,255,255,0.2) !important;
}

.noselect {
    -webkit-touch-callout: none; /* iOS Safari */
      -webkit-user-select: none; /* Safari */
       -khtml-user-select: none; /* Konqueror HTML */
         -moz-user-select: none; /* Old versions of Firefox */
          -ms-user-select: none; /* Internet Explorer/Edge */
              user-select: none; /* Non-prefixed version, currently
                                    supported by Chrome, Edge, Opera and Firefox */
  }

.noClick {
    pointer-events: none;
    touch-action: none;
}

.hideAnimation {
    animation: none !important;
}

a {
    text-decoration: none;
    color: unset;
    padding: 1rem 1rem 1rem 1rem;
    margin: -1rem -1rem -1rem -1rem;
}

.wiggle {
    animation: wiggle ease-in 0.4s;
}

.slideInRight {
    animation: slideInRight ease-in 0.2s;
}

.fadeIn {
    animation: 0.3s ease-in 0s normal forwards 1 fadeIn;
}

.fadeInSlow {
    animation: 0.75s ease-in 0s normal forwards 1 fadeIn;
}

.fadeInScale {
    animation: 0.6s ease-out 0s normal forwards 1 fadeInScale;
}

.pulse {
    animation: 1.25s ease-out 0s normal forwards infinite pulse;
}

.flipIn {
    animation: flipIn 1s linear infinite;
}

.slideOut {
    -webkit-transform: translateX(-150%);
    transform: translateX(-150%);
    transition: transform ease-out 0.4s;
}

.primary {
    color: var(--primaryColor);
}

.dull {
    color: var(--borderColor);
}

.meh {
    color: var(--mehColor);
}

.space {
    font-size: 5px;
}

.inconsolata {
    font-family: 'Inconsolata', monospace;
}

#appWrapper {
    display: flex;
    justify-content: space-between;
    flex-direction: column;
    align-items: center;
    height: -webkit-fill-available;
    align-content: center;
}

#topBar {
    display: flex;
    background: var(--panelColor);
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    width: var(--asciiWidth);
    padding: 0.5rem 1.25rem 0.5rem 1.25rem;
    margin: 0 0 0 0;
    border: 4px solid var(--borderColor);
    border-top: none;
    border-radius: 0 0 15px 15px;
    box-shadow: 0 0 0 2px var(--shadowColor);
    transition: margin 0.3s, background-color ease-in 0.2s;
    justify-content: space-between;
    animation: 0.3s ease-in 0s normal forwards 1 fadeIn;
}

#questionMark {
    font-size: 1.8rem;
    color: var(--mehColor);
    cursor: pointer;
    transition: color 0.2s;
}

#questionMark:active {
    opacity: 0.5;
}

#helpDialogWrapper {
    display: none;
    opacity: 0;
    position: absolute;
    top: 0;
    z-index: 99;
    width: 100vw;
    height: 100vh;
    justify-content: center;
    align-items: center;
    align-content: center;
    pointer-events: none;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

#helpDialog {
    display: flex;
    z-index: 100;
    width: 60vw;
    background: var(--panelColor);
    border: 4px solid var(--borderColor);
    border-radius: 15px;
    padding: 2rem;
    justify-content: center;
    flex-direction: column;
    align-items: center;
    pointer-events: all;
    overflow: hidden;
    -webkit-transform: translateY(-175%) scaleY(1);
    transform: translateY(-175%) scaleY(1);
    box-shadow: 0 0 0 2px rgb(0 0 0 / 30%);
    transition: transform cubic-bezier(0.68, -0.55, 0.27, 1.55) 0.6s;
}

#helpText h2 {
    text-align: center;
    margin: 0 0 1rem 0;
}

#helpText ul {
    padding: 0 1rem 0 1rem;
    margin: 0;
}

#helpText li {
    color: var(--mehColor)
}

::marker {
    color: var(--primaryColor);
}

#helpText ul > li {
    line-height: 1.25rem;
    padding: 0.25rem 0 0.25rem 0;
}

#helpText ul > li > svg {
    fill: var(--primaryColor);
    transform: translateY(3px);
}

#closeHelp {
    text-align: center;
    font-size: 1rem;
    width: 50%;
    margin: 1.5rem 0 0 0;
    padding: 0.5rem;
    color: var(--panelColor);
    text-shadow: none;
    background: var(--mehColor);
    border-radius: 15px;
    cursor: pointer;
    transition: background-color 0.2s;
}

#logo {
    margin: 0.5rem 6rem;
    font-family: 'Cascadia Mono';
    font-size: var(--fontSizeS);
    text-align: center;
}

#color {
    display: flex;
    align-items: center;
    margin-bottom: -4px;
}

#colorPicker {
    justify-self: end;
    align-self: end;
    transition: background-color ease-in 0.2s;
}

#colorPicker img {
    display: none;
}

#primaryColor {
    border-radius: 50%;
    height: 3.3rem;
    width: 3.3rem;
    padding: 1rem;
    margin: -1rem -1rem -1.2rem -1rem;
    background: transparent;
    outline: none;
    -webkit-appearance: none;
    cursor: pointer;
    transition: opacity 0.2s;
}

#primaryColor::-webkit-color-swatch-wrapper {
    padding: 0; 
}

#primaryColor::-moz-color-swatch-wrapper {
    padding: 0; 
}

#primaryColor::-webkit-color-swatch {
    border: 4px solid var(--mehColor);
    border-radius: 50%;
    box-shadow: inset 0px 0px 0px 2px var(--panelColor);
    transition: 0.3s;
}

#primaryColor::-moz-color-swatch {
    border: 4px solid var(--mehColor);
    border-radius: 50%;
    box-shadow: inset 0px 0px 0px 2px var(--panelColor);
    transition: 0.3s;
}

#primaryColor::-webkit-color-swatch:active {
    opacity: 0.5;
}

#primaryColor::-moz-color-swatch:active {
    opacity: 0.5;
}

#centerWrapper {
    display: flex;
    align-items: center;
}

.slideButton {
    display: none;
    font-size: 3rem;
    font-weight: bold;
    height: 1.5rem;
    width: 1.5rem;
    cursor: pointer;
    color: var(--mehColor);
    align-items: center;
    z-index: 5;
    text-shadow: 0 2px 0 var(--shadowColor);
    justify-content: center;
    animation: 0.3s ease-in 0s normal forwards 1 fadeIn;
    transition: color ease-in 0.2s;
}

#slideLeft {
    padding: 1.15rem;
    opacity: 0.3;
    pointer-events: none;
    animation: 0.3s ease-in 0s normal forwards 1 fadeInDim;
}

#slideRight {
    padding: 1.15rem;
}

#slideRight:active, #slideLeft:active {
    opacity: 0.5;
}

#galleryContainer {
    overflow: visible;
}

#gallery {
    display: flex;
    /* align-items: center; */
    align-items: stretch;
    justify-content: start;
    width: calc(var(--asciiWidth) + 2.5rem + 14px);
    scroll-behavior: smooth;
    overflow: scroll;
    overflow-y: hidden;
    scroll-snap-type: inline mandatory;
    -webkit-overflow-scrolling: touch;
    padding: 0.65rem 0 0.65rem 0;
    padding-left: 6px;
}

.contentWrapper {
    display: flex;
    padding: 1.25rem 0 1.25rem 0;
    overflow: visible;
    flex-direction: column;
    justify-content: center;
    z-index: 0;
}

.content {
    background: var(--panelColor);
    scroll-snap-align: center;
    scroll-snap-stop: always;
    width: var(--asciiWidth);
    border: 4px solid var(--borderColor);
    border-radius: 15px;
    padding: 1.25rem;
    margin-right: 80px;
    margin-left: 80px;
    box-shadow: 0 0 0 2px var(--shadowColor);
    z-index: 1;
    transition: background-color ease-in 0.2s;
}

.contentPlaceholder {
    background: none;
    background-image: none;
    border: none;
    box-shadow: none;
}

.ASCIIwrapper {
    overflow: visible;
    font-size: var(--fontSizeM);
    width: var(--asciiWidth);
}

.ASCII {
    width: var(--asciiWidth);
    max-height: var(--asciiMaxHeight);
    padding-right: 30px;
    overflow-y: auto;
    overflow-x: hidden;
    white-space: pre;
    text-align: center;
    transition: max-height ease-out 0.3s;
}

.submInfo {
    display: flex;
    justify-content: space-between;
    margin: 1.25rem 0 0 0;
}

.submTitle {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    max-width: 28rem;
    overflow: hidden;
    text-indent: -1.3ch;
    padding-left: 1.3ch;
    line-height: 1.4rem;
    max-height: 2.9rem;
}

.submTitle * {
    display: inline;
}

.submAuthor {
    line-height: 1.4rem;
}

.submTitle, .submAuthor {
    flex-shrink: 0;
}

.submTitle:visited, .submAuthor:visited {
    color: unset;
}

.moreButtonWrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    height: 0;
    position: relative;
}

.moreButton {
    cursor: pointer;
    position: relative;
    z-index: -1;
    padding: 0.5rem;
    height: 2rem;
    text-align: center;
    animation: 1.25s 0s normal forwards 1 fadeInSlideLate;
}

.moreButton svg {
    fill: var(--borderColor);
    height: 2rem;
    padding: 0 0.5rem 0.5rem 0.5rem;
    filter: drop-shadow(0 2px 0 var(--shadowColor));
    -webkit-transform: translateY(calc(0rem + 3px));
    transform: translateY(calc(0rem + 3px)) scaleX(0.999);
    transition: transform ease 0.2s, fill ease-in 0.2s;
}

.moreTrayWrapper {
    display: flex;
    justify-content: center;
    position: relative;
    z-index: 0;
    margin-top: -2.25rem;
    visibility: hidden;
    transition: margin ease-out 0.2s;
}

.moreTray {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 0.5rem;
    padding: 0 0.5rem;
    position: relative;
    overflow: hidden;
    background: var(--borderColor);
    border-radius: 0px 0px 0px 0px;
    /* box-shadow: 0 0 0 2px var(--shadowColor); */
    -webkit-transform: translate3d(0,0,0);
    transition: box-shadow ease-out 0.2s 0.2s, border-radius ease-out 0.2s 0.2s, top ease-out 0.2s, background-color ease-in 0.2s, width ease-out 0.2s 0.2s;
}

.moreTray div {
    opacity: 0;
    cursor: pointer;
    padding: 0.5rem;
    height: 1rem;
    -webkit-transform: scale(0.01);
    transform: scale(0.01);
    transition: transform ease-out 0.2s 0.2s, opacity ease-out 0.2s 0.2s;
}

.moreTray * > svg {
    fill: var(--bgColor);
    height: 1rem;
}

.buttonSpacer {
    padding-left: 0 !important;
    padding-right: 0 !important;
    color: var(--shadowColor);
}

#snapWrapper {
    display: none;
    position: absolute;
    bottom: -500%;
}

#snapshot {
    padding: 3px;
}

#fsWrapper {
    display: none;
    opacity: 0;
    justify-content: center;
    align-items: center;
    align-content: center;
    flex-direction: column;
    position: absolute;
    top: 0;
    z-index: 99;
    width: 100vw;
    height: 100vh;
    background: var(--panelColor);
    touch-action: pinch-zoom;
}

#fsClose {
    cursor: pointer;
    padding: 0.5rem;
    height: 1.5rem;
    text-align: center;
    animation: 0.3s 0s normal forwards 1 fadeIn;
}

#fsClose svg {
    fill: var(--borderColor);
    height: 1.25rem;
    filter: drop-shadow(0 2px 0 var(--shadowColor));
    transition: fill ease-in 0.2s;
}

#statusWrapper {
    grid-column: span 2;
    padding-bottom: 0.75rem;
}

#nsfwText {
    display: none;
    font-size: 0.8rem;
    color: var(--mehColor);
    text-align: center;
    position: fixed;
    bottom: var(--promptHeight);
    margin-bottom: 0.5rem;
    z-index: 98;
    width: 100%;
}

#status {
    display: inline-block;
}

#deepSearchState {
    display: none;
}

#currentSub {
    display: none;
}

#prompt {
    overflow: hidden;
    background: var(--panelColor);
    width: var(--asciiWidth);
    max-height: var(--promptInnerHeight);
    display: grid;
    align-content: center;
    grid-template-columns: 1fr auto;
    grid-template-rows: 1fr auto;
    justify-items: stretch;
    margin: 0 0 0 0;
    padding: 1.25rem 1.25rem 1.25rem 1.25rem;
    transition: background-color ease-in 0.2s;
    border: 4px solid var(--borderColor);
    border-bottom: none;
    border-radius: 15px 15px 0 0;
    animation: 0.3s ease-in 0s normal forwards 1 fadeIn;
    flex-shrink: 0;
    box-shadow: 0 0 0 2px var(--shadowColor);
}

#mainInput {
    font-size: 1rem !important;
}

#input {
    overflow: hidden;
}

#inputGlyph {
    animation: 0.3s ease-in 0s normal forwards 1 fadeIn;
    position: relative;
    z-index: 1;
    background-image: linear-gradient(90deg, var(--panelColor) 80%, rgba(0,0,0,0) 97%);
    margin-right: -0.75rem;
    padding-right: 0.25rem;
    transition: background-color ease-in 0.2s;
}

.domColor {
    display: none;
}

.nsfwStatus {
    display: none;
}

#random {
    display: flex;
    align-items: center;
    justify-self: end;
    grid-column-start: 2;
    grid-column-end: 3;
    margin-top: -0.2rem;
}

#shuffleBG {
    padding-right: 1.25rem;
    margin-right: -1.25rem;
    padding-left: 0.25rem;
    position: relative;
    z-index: 0;
    transition: background-color ease-in 0.2s;
}

#shuffle {
    font-size: 1.5rem;
    z-index: 6;
    cursor: pointer;
    position: relative;
    z-index: 1;
}

#shuffle:active {
    opacity: 0.5;
}

#shuffle svg {
    height: 1.5rem;
    fill: var(--mehColor);
    filter: drop-shadow(0px 2px 0px var(--shadowColor));
    transition: fill ease-in 0.2s;
}

#randText {
    display: none;
    color: var(--mehColor);
    font-size: var(--fontSizeL);
    margin-right: -62px;
    align-self: center;
    line-height: 1.1rem;
    position: relative;
    z-index: -1;
}

input, input:active, input:hover, input:focus,
input:focus-within, input:target, input:focus-visible,
input:visited, input:-webkit-autofill,
input:-webkit-autofill:hover, 
input:-webkit-autofill:focus, 
input:-webkit-autofill:active,
input:-internal-autofill-selected {
    -webkit-background-clip: text;
    background-clip: text;
    border: 0px;
    outline: none;
    background-color: transparent;
    font-family: 'Cascadia Mono';
    font-size: var(--fontSizeL);
    color: var(--primaryColor);
    caret-color: var(--primaryColor);
    margin-top: 0.5rem;
    margin-right: -5%;
    text-shadow: 0px 1px 1px var(--shadowColor);
    width: 90%;
}

[type="search"]::-webkit-search-cancel-button {
    -webkit-appearance: none;
    appearance: none;
    margin-top: 2px;
    height: 8pt;
    width: 8pt;
    background-size: 8pt 8pt;
}

[type="search"]::-moz-search-cancel-button {
    -webkit-appearance: none;
    appearance: none;
    margin-top: 2px;
    height: 8pt;
    width: 8pt;
    background-size: 8pt 8pt;
}

::placeholder {
    color: var(--mehColor);
}

/* Safari/Firefox input styling */
input {
    border: 0;
}
  
input[type="search"] {
    -webkit-appearance: none;
    color: var(--mehColor);
    background-color: transparent;
    font-size: var(--fontSizeL);
    caret-color: var(--primaryColor);
    font-family: 'Cascadia Mono';
    border: 0;
    border-radius: 0;
    padding: 1rem 0 1rem 0;
    margin: -1rem 0 -1rem 0;
    width: calc(100% - 4rem);
}

input[type="search"]::-webkit-search-decoration {
    display: none;
}

@media only screen and (max-width: 600px) and (orientation: portrait){
    :root {
        --asciiWidth: clamp(334px, 334px, 334px);
        --asciiMaxHeight: calc(100vh - 24.5rem);
        --fontSizeS: clamp(0.3rem, 0.35rem, 0.4rem);
        --fontSizeM: clamp(0.241rem, 0.241rem, 0.6rem);
        --fontSizeL: clamp(0.8rem, 0.9rem, 1rem);
        --scrollbarBorder: 0.25rem solid transparent !important;
    }

    * {
        scrollbar-width: none;
    }
    
    body {
        font-size: var(--fontSizeL);
    }
    
    #appWrapper {
        align-items: unset;
        min-height: 100%;
        align-content: unset;
        overflow: hidden;
    }

    #topBar {
        display: flex;
        justify-content: space-between;
        flex-direction: row;
        flex-wrap: nowrap;
        align-items: center;
        width: 100vw;
        padding: 0.5rem 0 0.5rem 0;
        margin-top: var(--mobileTopBarMarginTop);
        border: none;
        border-radius: 0px;
        border-bottom: 4px solid var(--borderColor);
    }

    #help {
        margin-left: 1.5rem;
    }

    #questionMark {
        padding: 1rem;
        margin: -1rem;
    }

    #helpDialog {
        width: 75vw;
        padding: 1rem;
    }

    #logo {
        margin: 0.5rem;
        line-height: 0.35rem;
    }

    #color {
        margin-right: 1.5rem;
    }

    #centerWrapper {
        justify-content: center;
    }

    #gallery {
        width: 100vw;
        justify-content: revert;
        -webkit-justify-content: start;
        margin: -1rem 0 -1rem 0;
        padding-left: 0;
    }

    .content {
        margin-right: 80px;
        margin-left: 80px;
        padding: 1rem;
    }

    .ASCII {
        padding-right: 26px;
        /* min-height: var(--asciiMaxHeight); */
        /* min-height: -webkit-fill-available; */
        max-height: var(--asciiMaxHeight);
    }

    .submInfo {
        margin: 1rem 0 0 0;
        justify-content: center;
    }

    .submTitle {
        max-width: 40ch;
        text-align: center;
        font-size: var(--fontSizeL);
        text-indent: unset;
        padding-left: 0;
        max-height: 2.5rem;
        line-height: 1.2rem;
        flex-shrink: 0;
    }

    .submAuthor {
        display: none;
    }

    #prompt {
        overflow: hidden;
        background: var(--panelColor);
        width: 100%;
        display: grid;
        align-content: center;
        grid-template-columns: 1fr auto;
        grid-template-rows: 1fr auto;
        justify-items: stretch;
        margin: 0 0 0 0;
        padding: 1rem 1rem 1.5rem 1rem;
        border: 0;
        border-top: 4px solid var(--borderColor);
        border-radius: 0px;
        animation: 0.3s ease-in 0s normal forwards 1 fadeIn;
        flex-shrink: 0;
    }
    
    #statusWrapper {
        padding-bottom: 0.5rem;
    }

    #status {
        max-width: 90vw;
    }

    #input {
        font-size: 1rem !important;
        margin-left: 0.5rem;
    }

    #inputLine {
        position: absolute;
        bottom: 1.2rem;
        left: 2rem;
        background: var(--mehColor);
        width: calc(100% - 5.4rem);
        height: 1px;
        margin-bottom: 0.5rem;
    }

    #colorText, #randText {
        display: none !important;
    }

    #random {
        margin-top: -0.3rem;
        margin-right: 0.5rem;
        margin-bottom: 0;
    }

    #shuffleBG {
        padding-right: 0;
        padding-left: 0;
        margin: -1rem 1rem -1rem -1rem;
        background: none;
        transition: background-color ease-in 0.2s;
    }

    #shuffle, #help, #color {
        -webkit-tap-highlight-color: transparent;
    }

    #shuffle {
        font-size: 1.5rem;
        padding-left: 0;
        padding: 1rem;
    }

    #shuffle:active {
        opacity: 1;
    }

}

@media only screen and (min-resolution: 200dpi) and (orientation: portrait) {
    :root {
        --asciiWidth: clamp(334px, 334px, 334px);
        --asciiMaxHeight: calc(100vh - 24.5rem);
        --fontSizeS: clamp(0.25rem, 0.3rem, 0.35rem);
        --fontSizeM: clamp(0.241rem, 0.241rem, 0.6rem);
        --fontSizeL: clamp(0.8rem, 0.9rem, 1rem);
        --scrollbarBorder: 0.25rem solid transparent !important;
    }

    * {
        scrollbar-width: none;
    }

    body {
        font-size: var(--fontSizeL);
    }
    
    #appWrapper {
        align-items: unset;
        min-height: 100%;
        align-content: unset;
        overflow: hidden;
    }

    #topBar {
        display: flex;
        justify-content: space-between;
        flex-direction: row;
        flex-wrap: nowrap;
        align-items: center;
        width: 100vw;
        padding: 0.5rem 0 0.5rem 0;
        margin-top: var(--mobileTopBarMarginTop);
        border: none;
        border-radius: 0px;
        border-bottom: 4px solid var(--borderColor);
    }

    #help {
        margin-left: 1.5rem;
    }

    #questionMark {
        padding: 1rem;
        margin: -1rem;
    }

    #helpDialog {
        width: 75vw;
        padding: 1rem;
    }

    #logo {
        margin: 0.5rem;
        line-height: 0.35rem;
    }

    #color {
        margin-right: 1.5rem;
    }

    #centerWrapper {
        justify-content: center;
    }
    
    #gallery {
        width: 100vw;
        justify-content: revert;
        -webkit-justify-content: start;
        margin: -1rem 0 -1rem 0;
        padding-left: 0;
    }

    .content {
        margin-right: 80px;
        margin-left: 80px;
        padding: 1rem;
    }
    
    .ASCII {
        padding-right: 26px;
        /* min-height: var(--asciiMaxHeight); */
        /* min-height: -webkit-fill-available; */
        max-height: var(--asciiMaxHeight);
    }

    .submInfo {
        margin: 1rem 0 0 0;
        justify-content: center;
    }

    .submTitle {
        max-width: 40ch;
        text-align: center;
        font-size: var(--fontSizeL);
        text-indent: unset;
        padding-left: 0;
        max-height: 2.5rem;
        line-height: 1.2rem;
    }

    .submAuthor {
        display: none;
    }

    #prompt {
        overflow: hidden;
        background: var(--panelColor);
        width: 100%;
        display: grid;
        align-content: center;
        grid-template-columns: 1fr auto;
        grid-template-rows: 1fr auto;
        justify-items: stretch;
        margin: 0 0 0 0;
        padding: 1rem 1rem 1.5rem 1rem;
        border: 0;
        border-top: 4px solid var(--borderColor);
        border-radius: 0px;
        animation: 0.5s ease-in 0s normal forwards 1 fadeIn;
        flex-shrink: 0;
    }

    #statusWrapper {
        padding-bottom: 0.5rem;
    }

    #status {
        max-width: 90vw;
    }

    #input {
        font-size: 1rem !important;
        margin-left: 0.5rem;
    }

    #inputLine {
        position: absolute;
        bottom: 1.2rem;
        left: 2rem;
        background: var(--mehColor);
        width: calc(100% - 5.4rem);
        height: 1px;
        margin-bottom: 0.5rem;
    }

    #colorText, #randText {
        display: none !important;
    }

    #random {
        margin-top: -0.3rem;
        margin-right: 0.5rem;
        margin-bottom: 0;
    }

    #shuffleBG {
        padding-right: 0;
        padding-left: 0;
        margin: -1rem 1rem -1rem -1rem;
        background: none;
        transition: background-color ease-in 0.2s;
    }

    #shuffle, #help, #color {
        -webkit-tap-highlight-color: transparent;
    }

    #shuffle {
        font-size: 1.5rem;
        padding-left: 0;
        padding: 1rem;
    }

    #shuffle:active {
        opacity: 1;
    }

}

@media only screen and (min-width: 600px) {
    .ASCII {
        min-height: unset;
        max-height: var(--asciiMaxHeight);
    }
 }

@media (hover: hover) {

    #questionMark:hover {
        color: var(--primaryColor);
        text-shadow: 0px 1px 1px var(--shadowColor), 0px 0px 2px var(--primaryColor);
    }

    #closeHelp:hover {
        background: var(--primaryColor);
        color: var(--panelColor);
        text-shadow: none;
    }

    #primaryColor::-webkit-color-swatch:hover {
        border: 4px solid transparent;
        box-shadow: inset 0px 0px 0px 0px transparent;
    }

    #primaryColor::-moz-color-swatch:hover {
        border: 4px solid transparent;
        box-shadow: inset 0px 0px 0px 0px transparent;
    }

    .slideButton {
        display: flex;
    }

    .slideButton:hover {
        color: var(--primaryColor);
        text-shadow: 0px 2px 0px var(--shadowColor), 0px 0px 2px var(--primaryColor);
    }

    #shuffleBG {
        background-image: linear-gradient(90deg, rgba(0,0,0,0) 0%, var(--panelColor) 10%);
    }

}

/* Safari */
@supports (hanging-punctuation: first) and (font: -apple-system-body) and (-webkit-appearance: none) {
    :root {
        --safariCheck:1;
        --scrollAnimation:300;
        --asciiMaxHeight: calc(100vh - 25rem);
    }
}