*, *:before, *:after {
    box-sizing: border-box;
}

html,body {
    padding: 0px;
    margin: 0px;
}

html {
    overflow: clip;
}

body {
    image-rendering: crisp-edges;  /* Firefox */
    image-rendering: pixelated;    /* Chrome */
}

.container {
    position: relative;
}

.box {
    position: absolute;
    z-index: 1;
}

.overlay {
    pointer-events: none;
    z-index: 2;
    color: white;
    font-family: sans-serif;
}

.overlay .menu {
    position: absolute;
    right: 0%;
    bottom: 0%;
    margin: 2%;
    width: 96%;
    height: 96%;
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    grid-template-rows: repeat(8, 1fr);
    gap: 2%;
    justify-items: center;
    align-items: center;
}

.overlay button {
    font-size: 6vmin;
    overflow: clip;
    display: flex;
    align-items: center;
    justify-content: center;
    justify-self: stretch;
    align-self: stretch;
    position: relative;
    padding: 0em;
}

.overlay button.ios {
    font-size: 5vmin;
}

.overlay button.img {
    font-size: 0em; /* For safari on iOS */
}

.overlay button.img img {
    height: 90%; /* For safari on iOS */
    width: 90%;
}

.overlay button.pressed {
    border-style: inset;
    border-width: 0.1em;
}

.overlay button[disabled=""] {
    border: none;
}

.overlay button .number {
    color: black;
    opacity: 0.5;
    position: absolute;
    right: 0.2vmin;
    bottom: 0em;
    font-size: 2vmin;
}

.overlay button img {
    margin: 0em;
    max-height: 90%;
    max-width: 90%;
}

.overlay button:disabled img {
    opacity: 30%;
}

.overlay button.show_solution {
    float: right;
    font-size: 110%;
    margin-top: 0.2em;
    padding: 0.1em;
}

.overlay .highlighted {
    animation: hl 500ms infinite;
}

@keyframes hl {
    0% {
        color: black;
    }
    49% {
        color: black;
    }
    50% {
        color: #0A0;
    }
    99% {
        color: #0A0;
    }
}

.overlay span {
    font-size: 5vmin;
    width: 100%;
    height: 100%;
    position: relative;
    top: 13%;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
    text-align: center;
}

.overlay textarea,select,button,input {
    pointer-events: auto;
}

.overlay .error {
    color: red;
}

.overlay .prop-label {
    text-align: right;
    margin-right: 1vmin;
}

.overlay .vprop-label {
    height: auto;
    align-self: end;
}

.overlay .prop-label img {
    height: 70%;
}

.overlay .link {
    pointer-events: auto;
}

.overlay a {
    color: white;
}

.overlay a img {
    width: 1em;
    vertical-align: middle;
}

.overlay select,input {
    font-size: 5vmin;
    width: 100%;
}

.overlay input[type="checkbox"] {
    height: 70%;
}

.overlay .info_outer {
    display: flex;
}

.overlay .info {
    flex: 1;
    font-size: 4vmin;
    pointer-events: auto;
    overflow-y: auto;
    color: black;
}

.overlay .info p,details {
    margin-top: 0.4em;
}

.overlay .info details summary {
    color: #666;
}

.overlay .info h2 {
    font-size: 4.5vmin;
    margin-top: 0.5em;
    margin-bottom: 0.4em;
}

.overlay .info summary {
    cursor: pointer;
}

#smolpxlBar {
    margin: 0em;
    padding-top: 0.15em;
    padding-bottom: 0.15em;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    font-family: "Courier New", Courier, monospace;
    font-weight: bold;
    font-variant: small-caps;
    word-spacing: -0.3em;
}

@media (min-aspect-ratio: 1/1) {
    #smolpxlBar {
        transform: translateX(calc(50vw - 1.5em)) rotate(90deg) translateX(50vh);
    }
}


#smolpxlBar a {
    background-color: #eeeeee;
    color: black;
    display: inline-block;
    font-size: 95%;
    text-decoration: none;
    padding: 0.2em 0.4em;
    border-radius: 0.3em;
    border: 0.15em solid #2f4858;
    box-shadow: 0.1em 0.1em 0.2em rgba(0, 0, 0, .3);
    margin-right: 0.2em;
}

#smolpxlBar a span {
    display: flex;
    align-items: center;
}

#smolpxlBar a span svg {
    height: 0.9em;
    width: 0.9em;
    margin-left: 0.3em;
}

#smolpxlBar a span svg.leftimg {
    margin-left: 0em;
    margin-right: 0.3em;
}

#smolpxlBar a span span {
    margin-bottom: -0.15em;
}

.shareonBorder {
    position: absolute;
    top: 0em;
    left: 0em;
    width: 100%;
    height: 100%;
    background-color: black;
    opacity: 0.7;
    z-index: 10;
}

.shareonBox {
    background-color: white;
    opacity: 1;
    width: 22em;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 11;
    padding: 1.5em;
    border-radius: 1em;
    font-family: "Courier New", Courier, monospace;
    font-weight: bold;
    font-variant: small-caps;
    word-spacing: -0.3em;
}

.shareonBox h2 {
    margin: 0em 0em 0.5em 0em;
}

.shareonBox .shareonLink {
    display: flex;
    flex-direction: row;
    align-items: center;
    margin-top: 1.1em;
}

.shareonBox .shareonLink input {
    flex-grow: 2;
    width: 10em;
    margin-left: 0.3em;
    font-size: 0.8em;
}

.shareonBox #shareonCopied {
    height: 1.3em;
    padding: 0.5em;
    text-align: right;
    font-size: 0.9em;
    color: #666666;
}
